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