< prev index next >

src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp

Print this page
rev 48494 : 8195112: x86 (32 bit): implementation for Thread-local handshakes
Reviewed-by:

*** 527,542 **** // Note: we do not need to round double result; float result has the right precision // the poll sets the condition code, but no data registers if (SafepointMechanism::uses_thread_local_poll()) { #ifdef _LP64 ! __ movptr(rscratch1, Address(r15_thread, Thread::polling_page_offset())); ! __ relocate(relocInfo::poll_return_type); ! __ testl(rax, Address(rscratch1, 0)); #else ! ShouldNotReachHere(); #endif } else { AddressLiteral polling_page(os::get_polling_page(), relocInfo::poll_return_type); if (Assembler::is_polling_page_far()) { __ lea(rscratch1, polling_page); --- 527,546 ---- // Note: we do not need to round double result; float result has the right precision // the poll sets the condition code, but no data registers if (SafepointMechanism::uses_thread_local_poll()) { #ifdef _LP64 ! const Register poll_addr = rscratch1; ! __ movptr(poll_addr, Address(r15_thread, Thread::polling_page_offset())); #else ! const Register poll_addr = rbx; ! assert(FrameMap::is_caller_save_register(poll_addr), "will overwrite"); ! __ get_thread(poll_addr); ! __ movptr(poll_addr, Address(poll_addr, in_bytes(Thread::polling_page_offset()))); #endif + __ relocate(relocInfo::poll_return_type); + __ testl(rax, Address(poll_addr, 0)); } else { AddressLiteral polling_page(os::get_polling_page(), relocInfo::poll_return_type); if (Assembler::is_polling_page_far()) { __ lea(rscratch1, polling_page);
*** 553,572 **** int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) { guarantee(info != NULL, "Shouldn't be NULL"); int offset = __ offset(); if (SafepointMechanism::uses_thread_local_poll()) { #ifdef _LP64 ! __ movptr(rscratch1, Address(r15_thread, Thread::polling_page_offset())); add_debug_info_for_branch(info); __ relocate(relocInfo::poll_type); address pre_pc = __ pc(); ! __ testl(rax, Address(rscratch1, 0)); address post_pc = __ pc(); ! guarantee(pointer_delta(post_pc, pre_pc, 1) == 3, "must be exact length"); ! #else ! ShouldNotReachHere(); ! #endif } else { AddressLiteral polling_page(os::get_polling_page(), relocInfo::poll_type); if (Assembler::is_polling_page_far()) { __ lea(rscratch1, polling_page); offset = __ offset(); --- 557,580 ---- int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) { guarantee(info != NULL, "Shouldn't be NULL"); int offset = __ offset(); if (SafepointMechanism::uses_thread_local_poll()) { #ifdef _LP64 ! const Register poll_addr = rscratch1; ! __ movptr(poll_addr, Address(r15_thread, Thread::polling_page_offset())); ! #else ! assert(tmp->is_cpu_register(), "needed"); ! const Register poll_addr = tmp->as_register(); ! __ get_thread(poll_addr); ! __ movptr(poll_addr, Address(poll_addr, in_bytes(Thread::polling_page_offset()))); ! #endif add_debug_info_for_branch(info); __ relocate(relocInfo::poll_type); address pre_pc = __ pc(); ! __ testl(rax, Address(poll_addr, 0)); address post_pc = __ pc(); ! guarantee(pointer_delta(post_pc, pre_pc, 1) == 2 LP64_ONLY(+1), "must be exact length"); } else { AddressLiteral polling_page(os::get_polling_page(), relocInfo::poll_type); if (Assembler::is_polling_page_far()) { __ lea(rscratch1, polling_page); offset = __ offset();
< prev index next >