1277 #endif 1278 } 1279 1280 if(do_polling()) { 1281 if (UseCBCond && !ra_->C->is_method_compilation()) { 1282 st->print("NOP\n\t"); 1283 } 1284 st->print("RET\n\t"); 1285 } 1286 1287 st->print("RESTORE"); 1288 } 1289 #endif 1290 1291 void MachEpilogNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { 1292 MacroAssembler _masm(&cbuf); 1293 Compile* C = ra_->C; 1294 1295 __ verify_thread(); 1296 1297 // If this does safepoint polling, then do it here 1298 if(do_polling() && ra_->C->is_method_compilation()) { 1299 AddressLiteral polling_page(os::get_polling_page()); 1300 __ sethi(polling_page, L0); 1301 __ relocate(relocInfo::poll_return_type); 1302 __ ld_ptr(L0, 0, G0); 1303 } 1304 1305 // If this is a return, then stuff the restore in the delay slot 1306 if(do_polling()) { 1307 if (UseCBCond && !ra_->C->is_method_compilation()) { 1308 // Insert extra padding for the case when the epilogue is preceded by 1309 // a cbcond jump, which can't be followed by a CTI instruction 1310 __ nop(); 1311 } 1312 __ ret(); 1313 __ delayed()->restore(); 1314 } else { 1315 __ restore(); 1316 } | 1277 #endif 1278 } 1279 1280 if(do_polling()) { 1281 if (UseCBCond && !ra_->C->is_method_compilation()) { 1282 st->print("NOP\n\t"); 1283 } 1284 st->print("RET\n\t"); 1285 } 1286 1287 st->print("RESTORE"); 1288 } 1289 #endif 1290 1291 void MachEpilogNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { 1292 MacroAssembler _masm(&cbuf); 1293 Compile* C = ra_->C; 1294 1295 __ verify_thread(); 1296 1297 if (StackReservedPages > 0 && C->has_reserved_stack_access()) { 1298 __ reserved_stack_check(); 1299 } 1300 1301 // If this does safepoint polling, then do it here 1302 if(do_polling() && ra_->C->is_method_compilation()) { 1303 AddressLiteral polling_page(os::get_polling_page()); 1304 __ sethi(polling_page, L0); 1305 __ relocate(relocInfo::poll_return_type); 1306 __ ld_ptr(L0, 0, G0); 1307 } 1308 1309 // If this is a return, then stuff the restore in the delay slot 1310 if(do_polling()) { 1311 if (UseCBCond && !ra_->C->is_method_compilation()) { 1312 // Insert extra padding for the case when the epilogue is preceded by 1313 // a cbcond jump, which can't be followed by a CTI instruction 1314 __ nop(); 1315 } 1316 __ ret(); 1317 __ delayed()->restore(); 1318 } else { 1319 __ restore(); 1320 } |