--- old/src/cpu/x86/vm/templateTable_x86_32.cpp 2014-09-08 15:36:17.825739018 +0200 +++ new/src/cpu/x86/vm/templateTable_x86_32.cpp 2014-09-08 15:36:17.497739008 +0200 @@ -1724,9 +1724,8 @@ __ testptr(rax, rax); // test result __ jcc(Assembler::zero, dispatch); // no osr if null // nmethod may have been invalidated (VM may block upon call_VM return) - __ movl(rcx, Address(rax, nmethod::entry_bci_offset())); - __ cmpl(rcx, InvalidOSREntryBci); - __ jcc(Assembler::equal, dispatch); + __ cmpb(Address(rax, nmethod::state_offset()), 0); + __ jcc(Assembler::notEqual, dispatch); // We have the address of an on stack replacement routine in rax, // We need to prepare to execute the OSR method. First we must @@ -1734,8 +1733,7 @@ __ mov(rbx, rax); // save the nmethod - const Register thread = rcx; - __ get_thread(thread); + __ get_thread(rcx); call_VM(noreg, CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin)); // rax, is OSR buffer, move it to expected parameter location __ mov(rcx, rax);