< prev index next >

src/hotspot/cpu/ppc/continuationHelper_ppc.inline.hpp

Print this page

 89   return (intptr_t**)&f.own_abi()->callers_sp;
 90 }
 91 
 92 inline address* ContinuationHelper::InterpretedFrame::return_pc_address(const frame& f) {
 93   return (address*)&f.callers_abi()->lr;
 94 }
 95 
 96 inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, const frame& caller) {
 97   intptr_t* sp = caller.unextended_sp();
 98   if (!f.is_heap_frame() && caller.is_interpreted_frame()) {
 99     // See diagram "Interpreter Calling Procedure on PPC" at the end of continuationFreezeThaw_ppc.inline.hpp
100     sp = (intptr_t*)caller.at_relative(ijava_idx(top_frame_sp));
101   }
102   assert(f.is_interpreted_frame(), "");
103   assert(f.is_heap_frame() || is_aligned(sp, frame::alignment_in_bytes), "");
104   intptr_t* la = f.addr_at(ijava_idx(sender_sp));
105   *la = f.is_heap_frame() ? (intptr_t)(sp - f.fp()) : (intptr_t)sp;
106 }
107 
108 inline address* ContinuationHelper::Frame::return_pc_address(const frame& f) {


109   return (address*)&f.callers_abi()->lr;
110 }
111 
112 inline address ContinuationHelper::Frame::real_pc(const frame& f) {
113   return (address)f.own_abi()->lr;
114 }
115 
116 inline void ContinuationHelper::Frame::patch_pc(const frame& f, address pc) {
117   f.own_abi()->lr = (uint64_t)pc;
118 }
119 
120 //                     | Minimal ABI          |
121 //                     | (frame::java_abi)    |
122 //                     | 4 words              |
123 //                     | Caller's SP          |<- FP of f's caller
124 //                     |======================|
125 //                     |                      |                                 Frame of f's caller
126 //                     |                      |
127 // frame_bottom of f ->|                      |
128 //                     |----------------------|

 89   return (intptr_t**)&f.own_abi()->callers_sp;
 90 }
 91 
 92 inline address* ContinuationHelper::InterpretedFrame::return_pc_address(const frame& f) {
 93   return (address*)&f.callers_abi()->lr;
 94 }
 95 
 96 inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, const frame& caller) {
 97   intptr_t* sp = caller.unextended_sp();
 98   if (!f.is_heap_frame() && caller.is_interpreted_frame()) {
 99     // See diagram "Interpreter Calling Procedure on PPC" at the end of continuationFreezeThaw_ppc.inline.hpp
100     sp = (intptr_t*)caller.at_relative(ijava_idx(top_frame_sp));
101   }
102   assert(f.is_interpreted_frame(), "");
103   assert(f.is_heap_frame() || is_aligned(sp, frame::alignment_in_bytes), "");
104   intptr_t* la = f.addr_at(ijava_idx(sender_sp));
105   *la = f.is_heap_frame() ? (intptr_t)(sp - f.fp()) : (intptr_t)sp;
106 }
107 
108 inline address* ContinuationHelper::Frame::return_pc_address(const frame& f) {
109   assert(f.cb() == nullptr || !f.cb()->is_nmethod() || !f.cb()->as_nmethod()->needs_stack_repair(),
110          "unsupported");
111   return (address*)&f.callers_abi()->lr;
112 }
113 
114 inline address ContinuationHelper::Frame::real_pc(const frame& f) {
115   return (address)f.own_abi()->lr;
116 }
117 
118 inline void ContinuationHelper::Frame::patch_pc(const frame& f, address pc) {
119   f.own_abi()->lr = (uint64_t)pc;
120 }
121 
122 //                     | Minimal ABI          |
123 //                     | (frame::java_abi)    |
124 //                     | 4 words              |
125 //                     | Caller's SP          |<- FP of f's caller
126 //                     |======================|
127 //                     |                      |                                 Frame of f's caller
128 //                     |                      |
129 // frame_bottom of f ->|                      |
130 //                     |----------------------|
< prev index next >