< prev index next >

src/hotspot/cpu/s390/s390.ad

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


 902 #endif
 903 
 904 void MachEpilogNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
 905   MacroAssembler _masm(&cbuf);
 906   Compile* C = ra_->C;
 907   __ verify_thread();
 908 
 909   // If this does safepoint polling, then do it here.
 910   bool need_polling = do_polling() && C->is_method_compilation();
 911 
 912   // Pop frame, restore return_pc, and all stuff needed by interpreter.
 913   int frame_size_in_bytes = Assembler::align((C->frame_slots() << LogBytesPerInt), frame::alignment_in_bytes);
 914   __ pop_frame_restore_retPC(frame_size_in_bytes);
 915 
 916   if (StackReservedPages > 0 && C->has_reserved_stack_access()) {
 917     __ reserved_stack_check(Z_R14);
 918   }
 919 
 920   // Touch the polling page.
 921   if (need_polling) {



 922     AddressLiteral pp(os::get_polling_page());
 923     __ load_const_optimized(Z_R1_scratch, pp);

 924     // We need to mark the code position where the load from the safepoint
 925     // polling page was emitted as relocInfo::poll_return_type here.
 926     __ relocate(relocInfo::poll_return_type);
 927     __ load_from_polling_page(Z_R1_scratch);
 928   }
 929 }
 930 
 931 uint MachEpilogNode::size(PhaseRegAlloc *ra_) const {
 932   // Variable size. determine dynamically.
 933   return MachNode::size(ra_);
 934 }
 935 
 936 int MachEpilogNode::reloc() const {
 937   // Return number of relocatable values contained in this instruction.
 938   return 1; // One for load_from_polling_page.
 939 }
 940 
 941 const Pipeline * MachEpilogNode::pipeline() const {
 942   return MachNode::pipeline_class();
 943 }




 902 #endif
 903 
 904 void MachEpilogNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
 905   MacroAssembler _masm(&cbuf);
 906   Compile* C = ra_->C;
 907   __ verify_thread();
 908 
 909   // If this does safepoint polling, then do it here.
 910   bool need_polling = do_polling() && C->is_method_compilation();
 911 
 912   // Pop frame, restore return_pc, and all stuff needed by interpreter.
 913   int frame_size_in_bytes = Assembler::align((C->frame_slots() << LogBytesPerInt), frame::alignment_in_bytes);
 914   __ pop_frame_restore_retPC(frame_size_in_bytes);
 915 
 916   if (StackReservedPages > 0 && C->has_reserved_stack_access()) {
 917     __ reserved_stack_check(Z_R14);
 918   }
 919 
 920   // Touch the polling page.
 921   if (need_polling) {
 922     if (SafepointMechanism::uses_thread_local_poll()) {
 923       __ z_lg(Z_R1_scratch, Address(Z_thread, Thread::polling_page_offset()));
 924     } else {
 925       AddressLiteral pp(os::get_polling_page());
 926       __ load_const_optimized(Z_R1_scratch, pp);
 927     }
 928     // We need to mark the code position where the load from the safepoint
 929     // polling page was emitted as relocInfo::poll_return_type here.
 930     __ relocate(relocInfo::poll_return_type);
 931     __ load_from_polling_page(Z_R1_scratch);
 932   }
 933 }
 934 
 935 uint MachEpilogNode::size(PhaseRegAlloc *ra_) const {
 936   // Variable size. determine dynamically.
 937   return MachNode::size(ra_);
 938 }
 939 
 940 int MachEpilogNode::reloc() const {
 941   // Return number of relocatable values contained in this instruction.
 942   return 1; // One for load_from_polling_page.
 943 }
 944 
 945 const Pipeline * MachEpilogNode::pipeline() const {
 946   return MachNode::pipeline_class();
 947 }


< prev index next >