File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -360,17 +360,11 @@ void PatchingStub::emit_code(LIR_Assembler* ce) {
360360 }
361361 assert (_obj != noreg, " must be a valid register" );
362362 Register tmp = rax;
363- Register tmp2 = rbx;
364363 __ push (tmp);
365- __ push (tmp2);
366- // Load without verification to keep code size small. We need it because
367- // begin_initialized_entry_offset has to fit in a byte. Also, we know it's not null.
368- __ movptr (tmp2, Address (_obj, java_lang_Class::klass_offset ()));
369- __ get_thread (tmp);
370- __ cmpptr (tmp, Address (tmp2, InstanceKlass::init_thread_offset ()));
371- __ pop (tmp2);
372- __ pop (tmp);
373- __ jcc (Assembler::notEqual, call_patch);
364+ __ movptr (tmp, Address (_obj, java_lang_Class::klass_offset ()));
365+ __ cmpptr (r15_thread, Address (tmp, InstanceKlass::init_thread_offset ()));
366+ __ pop (tmp); // pop it right away, no matter which path we take
367+ __ jccb (Assembler::notEqual, call_patch);
374368
375369 // access_field patches may execute the patched code before it's
376370 // copied back into place so we need to jump back into the main
You can’t perform that action at this time.
0 commit comments