< prev index next >

src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp

Print this page
rev 48251 : 8193257: PPC64, s390 implementation for Thread-local handshakes
Reviewed-by:

*** 34,43 **** --- 34,44 ---- #include "gc/shared/collectedHeap.hpp" #include "gc/shared/barrierSet.hpp" #include "gc/shared/cardTableModRefBS.hpp" #include "nativeInst_s390.hpp" #include "oops/objArrayKlass.hpp" + #include "runtime/safepointMechanism.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "vmreg_s390.inline.hpp" #define __ _masm->
*** 1133,1144 **** --- 1134,1149 ---- (result->is_single_cpu() && result->as_register() == Z_R2) || (result->is_double_cpu() && result->as_register_lo() == Z_R2) || (result->is_single_fpu() && result->as_float_reg() == Z_F0) || (result->is_double_fpu() && result->as_double_reg() == Z_F0), "convention"); + if (SafepointMechanism::uses_thread_local_poll()) { + __ z_lg(Z_R1_scratch, Address(Z_thread, Thread::polling_page_offset())); + } else { AddressLiteral pp(os::get_polling_page()); __ load_const_optimized(Z_R1_scratch, pp); + } // Pop the frame before the safepoint code. __ pop_frame_restore_retPC(initial_frame_size_in_bytes()); if (StackReservedPages > 0 && compilation()->has_reserved_stack_access()) {
*** 1152,1168 **** __ z_br(Z_R14); // Return to caller. } int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) { AddressLiteral pp(os::get_polling_page()); ! __ load_const_optimized(tmp->as_register_lo(), pp); guarantee(info != NULL, "Shouldn't be NULL"); add_debug_info_for_branch(info); int offset = __ offset(); __ relocate(relocInfo::poll_type); ! __ load_from_polling_page(tmp->as_register_lo()); return offset; } void LIR_Assembler::emit_static_call_stub() { --- 1157,1178 ---- __ z_br(Z_R14); // Return to caller. } int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) { + const Register poll_addr = tmp->as_register_lo(); + if (SafepointMechanism::uses_thread_local_poll()) { + __ z_lg(poll_addr, Address(Z_thread, Thread::polling_page_offset())); + } else { AddressLiteral pp(os::get_polling_page()); ! __ load_const_optimized(poll_addr, pp); ! } guarantee(info != NULL, "Shouldn't be NULL"); add_debug_info_for_branch(info); int offset = __ offset(); __ relocate(relocInfo::poll_type); ! __ load_from_polling_page(poll_addr); return offset; } void LIR_Assembler::emit_static_call_stub() {
< prev index next >