< prev index next >

src/hotspot/cpu/aarch64/continuationHelper_aarch64.inline.hpp

Print this page

108   anchor->set_last_Java_fp(fp);
109 }
110 
111 #ifdef ASSERT
112 inline bool ContinuationHelper::Frame::assert_frame_laid_out(frame f) {
113   intptr_t* sp = f.sp();
114   address pc = ContinuationHelper::return_address_at(
115                  sp - frame::sender_sp_ret_address_offset());
116   intptr_t* fp = *(intptr_t**)(sp - frame::sender_sp_offset);
117   assert(f.raw_pc() == pc, "f.ra_pc: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.raw_pc()), p2i(pc));
118   assert(f.fp() == fp, "f.fp: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.fp()), p2i(fp));
119   return f.raw_pc() == pc && f.fp() == fp;
120 }
121 #endif
122 
123 inline intptr_t** ContinuationHelper::Frame::callee_link_address(const frame& f) {
124   return (intptr_t**)(f.sp() - frame::sender_sp_offset);
125 }
126 
127 inline address* ContinuationHelper::Frame::return_pc_address(const frame& f) {
128   return (address*)(f.real_fp() - 1);

129 }
130 
131 inline address* ContinuationHelper::InterpretedFrame::return_pc_address(const frame& f) {
132   return (address*)(f.fp() + frame::return_addr_offset);
133 }
134 
135 inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, const frame& caller) {
136   intptr_t* sp = caller.unextended_sp();
137   assert(f.is_interpreted_frame(), "");
138   intptr_t* la = f.addr_at(frame::interpreter_frame_sender_sp_offset);
139   *la = f.is_heap_frame() ? (intptr_t)(sp - f.fp()) : (intptr_t)sp;
140 }
141 
142 inline address ContinuationHelper::Frame::real_pc(const frame& f) {
143   // Always used in assertions. Just strip it.
144   address* pc_addr = &(((address*) f.sp())[-1]);
145   return pauth_strip_pointer(*pc_addr);
146 }
147 
148 inline void ContinuationHelper::Frame::patch_pc(const frame& f, address pc) {

108   anchor->set_last_Java_fp(fp);
109 }
110 
111 #ifdef ASSERT
112 inline bool ContinuationHelper::Frame::assert_frame_laid_out(frame f) {
113   intptr_t* sp = f.sp();
114   address pc = ContinuationHelper::return_address_at(
115                  sp - frame::sender_sp_ret_address_offset());
116   intptr_t* fp = *(intptr_t**)(sp - frame::sender_sp_offset);
117   assert(f.raw_pc() == pc, "f.ra_pc: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.raw_pc()), p2i(pc));
118   assert(f.fp() == fp, "f.fp: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.fp()), p2i(fp));
119   return f.raw_pc() == pc && f.fp() == fp;
120 }
121 #endif
122 
123 inline intptr_t** ContinuationHelper::Frame::callee_link_address(const frame& f) {
124   return (intptr_t**)(f.sp() - frame::sender_sp_offset);
125 }
126 
127 inline address* ContinuationHelper::Frame::return_pc_address(const frame& f) {
128   frame::CompiledFramePointers cfp = f.compiled_frame_details();
129   return cfp.sender_pc_addr;
130 }
131 
132 inline address* ContinuationHelper::InterpretedFrame::return_pc_address(const frame& f) {
133   return (address*)(f.fp() + frame::return_addr_offset);
134 }
135 
136 inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, const frame& caller) {
137   intptr_t* sp = caller.unextended_sp();
138   assert(f.is_interpreted_frame(), "");
139   intptr_t* la = f.addr_at(frame::interpreter_frame_sender_sp_offset);
140   *la = f.is_heap_frame() ? (intptr_t)(sp - f.fp()) : (intptr_t)sp;
141 }
142 
143 inline address ContinuationHelper::Frame::real_pc(const frame& f) {
144   // Always used in assertions. Just strip it.
145   address* pc_addr = &(((address*) f.sp())[-1]);
146   return pauth_strip_pointer(*pc_addr);
147 }
148 
149 inline void ContinuationHelper::Frame::patch_pc(const frame& f, address pc) {
< prev index next >