< 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,10 +34,11 @@
#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,12 +1134,16 @@
(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,17 +1157,22 @@
__ 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(tmp->as_register_lo(), pp);
+ __ 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(tmp->as_register_lo());
+ __ load_from_polling_page(poll_addr);
return offset;
}
void LIR_Assembler::emit_static_call_stub() {
< prev index next >