< prev index next >
src/hotspot/cpu/sparc/sparc.ad
Print this page
rev 47591 : Add Thread Local handshakes and thread local polling
*** 1204,1214 ****
--- 1204,1218 ----
#ifndef PRODUCT
void MachEpilogNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
Compile* C = ra_->C;
if(do_polling() && ra_->C->is_method_compilation()) {
+ if (SafepointMechanism::uses_global_page_poll()) {
st->print("SETHI #PollAddr,L0\t! Load Polling address\n\t");
+ } else {
+ st->print("LDX [R_G2 + #poll_offset],L0\t! Load local polling address\n\t");
+ }
st->print("LDX [L0],G0\t!Poll for Safepointing\n\t");
}
if(do_polling()) {
if (UseCBCond && !ra_->C->is_method_compilation()) {
*** 1231,1242 ****
--- 1235,1250 ----
__ reserved_stack_check();
}
// If this does safepoint polling, then do it here
if(do_polling() && ra_->C->is_method_compilation()) {
+ if (SafepointMechanism::uses_thread_local_poll()) {
+ __ ld_ptr(Address(G2_thread, Thread::polling_page_offset()), L0);
+ } else {
AddressLiteral polling_page(os::get_polling_page());
__ sethi(polling_page, L0);
+ }
__ relocate(relocInfo::poll_return_type);
__ ld_ptr(L0, 0, G0);
}
// If this is a return, then stuff the restore in the delay slot
*** 1264,1273 ****
--- 1272,1282 ----
const Pipeline * MachEpilogNode::pipeline() const {
return MachNode::pipeline_class();
}
int MachEpilogNode::safepoint_offset() const {
+ assert(SafepointMechanism::uses_global_page_poll(), "sanity");
assert( do_polling(), "no return for this epilog node");
return MacroAssembler::insts_for_sethi(os::get_polling_page()) * BytesPerInstWord;
}
//=============================================================================
< prev index next >