src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp

changeset 2658
c7f3d0b4570f
parent 2488
e4fee0bdaa85
child 2662
32f7097f9d8f
equal deleted inserted replaced
2657:d673ef06fe96 2658:c7f3d0b4570f
299 // initializer is being run so we emit a test which can be used to 299 // initializer is being run so we emit a test which can be used to
300 // check that this code is being executed by the initializing 300 // check that this code is being executed by the initializing
301 // thread. 301 // thread.
302 assert(_obj != noreg, "must be a valid register"); 302 assert(_obj != noreg, "must be a valid register");
303 assert(_oop_index >= 0, "must have oop index"); 303 assert(_oop_index >= 0, "must have oop index");
304 __ ld_ptr(_obj, instanceKlass::init_thread_offset_in_bytes() + sizeof(klassOopDesc), G3); 304 __ ld_ptr(_obj, java_lang_Class::klass_offset_in_bytes(), G3);
305 __ ld_ptr(G3, instanceKlass::init_thread_offset_in_bytes() + sizeof(klassOopDesc), G3);
305 __ cmp(G2_thread, G3); 306 __ cmp(G2_thread, G3);
306 __ br(Assembler::notEqual, false, Assembler::pn, call_patch); 307 __ br(Assembler::notEqual, false, Assembler::pn, call_patch);
307 __ delayed()->nop(); 308 __ delayed()->nop();
308 309
309 // load_klass patches may execute the patched code before it's 310 // load_klass patches may execute the patched code before it's

mercurial