equal
deleted
inserted
replaced
1204 #ifndef PRODUCT |
1204 #ifndef PRODUCT |
1205 void MachEpilogNode::format( PhaseRegAlloc *ra_, outputStream *st ) const { |
1205 void MachEpilogNode::format( PhaseRegAlloc *ra_, outputStream *st ) const { |
1206 Compile* C = ra_->C; |
1206 Compile* C = ra_->C; |
1207 |
1207 |
1208 if(do_polling() && ra_->C->is_method_compilation()) { |
1208 if(do_polling() && ra_->C->is_method_compilation()) { |
1209 st->print("SETHI #PollAddr,L0\t! Load Polling address\n\t"); |
1209 if (SafepointMechanism::uses_global_page_poll()) { |
|
1210 st->print("SETHI #PollAddr,L0\t! Load Polling address\n\t"); |
|
1211 } else { |
|
1212 st->print("LDX [R_G2 + #poll_offset],L0\t! Load local polling address\n\t"); |
|
1213 } |
1210 st->print("LDX [L0],G0\t!Poll for Safepointing\n\t"); |
1214 st->print("LDX [L0],G0\t!Poll for Safepointing\n\t"); |
1211 } |
1215 } |
1212 |
1216 |
1213 if(do_polling()) { |
1217 if(do_polling()) { |
1214 if (UseCBCond && !ra_->C->is_method_compilation()) { |
1218 if (UseCBCond && !ra_->C->is_method_compilation()) { |
1231 __ reserved_stack_check(); |
1235 __ reserved_stack_check(); |
1232 } |
1236 } |
1233 |
1237 |
1234 // If this does safepoint polling, then do it here |
1238 // If this does safepoint polling, then do it here |
1235 if(do_polling() && ra_->C->is_method_compilation()) { |
1239 if(do_polling() && ra_->C->is_method_compilation()) { |
1236 AddressLiteral polling_page(os::get_polling_page()); |
1240 if (SafepointMechanism::uses_thread_local_poll()) { |
1237 __ sethi(polling_page, L0); |
1241 __ ld_ptr(Address(G2_thread, Thread::polling_page_offset()), L0); |
|
1242 } else { |
|
1243 AddressLiteral polling_page(os::get_polling_page()); |
|
1244 __ sethi(polling_page, L0); |
|
1245 } |
1238 __ relocate(relocInfo::poll_return_type); |
1246 __ relocate(relocInfo::poll_return_type); |
1239 __ ld_ptr(L0, 0, G0); |
1247 __ ld_ptr(L0, 0, G0); |
1240 } |
1248 } |
1241 |
1249 |
1242 // If this is a return, then stuff the restore in the delay slot |
1250 // If this is a return, then stuff the restore in the delay slot |
1264 const Pipeline * MachEpilogNode::pipeline() const { |
1272 const Pipeline * MachEpilogNode::pipeline() const { |
1265 return MachNode::pipeline_class(); |
1273 return MachNode::pipeline_class(); |
1266 } |
1274 } |
1267 |
1275 |
1268 int MachEpilogNode::safepoint_offset() const { |
1276 int MachEpilogNode::safepoint_offset() const { |
|
1277 assert(SafepointMechanism::uses_global_page_poll(), "sanity"); |
1269 assert( do_polling(), "no return for this epilog node"); |
1278 assert( do_polling(), "no return for this epilog node"); |
1270 return MacroAssembler::insts_for_sethi(os::get_polling_page()) * BytesPerInstWord; |
1279 return MacroAssembler::insts_for_sethi(os::get_polling_page()) * BytesPerInstWord; |
1271 } |
1280 } |
1272 |
1281 |
1273 //============================================================================= |
1282 //============================================================================= |