< prev index next >

src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp

Print this page
rev 47415 : Add Thread Local handshakes and thread local polling

*** 33,42 **** --- 33,43 ---- #include "gc/shared/barrierSet.hpp" #include "gc/shared/cardTableModRefBS.hpp" #include "gc/shared/collectedHeap.hpp" #include "nativeInst_sparc.hpp" #include "oops/objArrayKlass.hpp" + #include "runtime/safepointMechanism.inline.hpp" #include "runtime/sharedRuntime.hpp" #define __ _masm->
*** 1413,1436 **** --- 1414,1446 ---- void LIR_Assembler::return_op(LIR_Opr result) { if (StackReservedPages > 0 && compilation()->has_reserved_stack_access()) { __ reserved_stack_check(); } + if (SafepointMechanism::uses_thread_local_poll()) { + __ ld_ptr(Address(G2_thread, Thread::polling_page_offset()), L0); + } else { __ set((intptr_t)os::get_polling_page(), L0); + } __ relocate(relocInfo::poll_return_type); __ ld_ptr(L0, 0, G0); __ ret(); __ delayed()->restore(); } int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) { + if (SafepointMechanism::uses_thread_local_poll()) { + __ ld_ptr(Address(G2_thread, Thread::polling_page_offset()), tmp->as_register()); + } else { __ set((intptr_t)os::get_polling_page(), tmp->as_register()); + } if (info != NULL) { add_debug_info_for_branch(info); } int offset = __ offset(); + __ relocate(relocInfo::poll_type); __ ld_ptr(tmp->as_register(), 0, G0); return offset; }
< prev index next >