--- old/src/cpu/x86/vm/c1_CodeStubs_x86.cpp 2015-08-12 14:08:56.000000000 +0200 +++ new/src/cpu/x86/vm/c1_CodeStubs_x86.cpp 2015-08-12 14:08:56.000000000 +0200 @@ -518,6 +518,33 @@ __ jmp(_continuation); } +void C1ThreadLocalSafepoint::emit_code(LIR_Assembler* ce) { +#ifdef _LP64 + __ bind(_entry); + InternalAddress pc_addr(safepoint_pc()); + __ lea(rscratch1, pc_addr); + __ movptr(Address(r15_thread, JavaThread::saved_exception_pc_offset()), rscratch1); + + address stub; + + if (is_return()) { + assert(SharedRuntime::polling_page_return_handler_blob() != NULL, + "polling page return stub not created yet"); + stub = SharedRuntime::polling_page_return_handler_blob()->entry_point(); + } else { + assert(SharedRuntime::polling_page_safepoint_handler_blob() != NULL, + "polling page safepoint stub not created yet"); + stub = SharedRuntime::polling_page_safepoint_handler_blob()->entry_point(); + } + + RuntimeAddress callback_addr(stub); + + __ jump(callback_addr); +#else + ShouldNotReachHere(); +#endif /* _LP64 */ +} + ///////////////////////////////////////////////////////////////////////////// #if INCLUDE_ALL_GCS