< prev index next >

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

Print this page

 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 //                     |----------------------|
129 //                     | L0 aka P0            |
130 //                     | :                    |
131 //                     | :      Pn            |
132 //                     | :                    |
133 //                     | Lm                   |
134 //                     |----------------------|
135 //                     | SP alignment (opt.)  |
136 //                     |----------------------|

 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, bool callee_augmented) {
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 //                     |----------------------|
129 //                     | L0 aka P0            |
130 //                     | :                    |
131 //                     | :      Pn            |
132 //                     | :                    |
133 //                     | Lm                   |
134 //                     |----------------------|
135 //                     | SP alignment (opt.)  |
136 //                     |----------------------|
< prev index next >