< prev index next >

src/hotspot/cpu/x86/continuationHelper_x86.inline.hpp

Print this page

 86   intptr_t* fp = *(intptr_t**)(sp - frame::sender_sp_offset);
 87   anchor->set_last_Java_fp(fp);
 88 }
 89 
 90 #ifdef ASSERT
 91 inline bool ContinuationHelper::Frame::assert_frame_laid_out(frame f) {
 92   intptr_t* sp = f.sp();
 93   address pc = *(address*)(sp - frame::sender_sp_ret_address_offset());
 94   intptr_t* fp = *(intptr_t**)(sp - frame::sender_sp_offset);
 95   assert(f.raw_pc() == pc, "f.ra_pc: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.raw_pc()), p2i(pc));
 96   assert(f.fp() == fp, "f.fp: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.fp()), p2i(fp));
 97   return f.raw_pc() == pc && f.fp() == fp;
 98 }
 99 #endif
100 
101 inline intptr_t** ContinuationHelper::Frame::callee_link_address(const frame& f) {
102   return (intptr_t**)(f.sp() - frame::sender_sp_offset);
103 }
104 
105 inline address* ContinuationHelper::Frame::return_pc_address(const frame& f) {
106   return (address*)(f.real_fp() - 1);

107 }
108 
109 inline address* ContinuationHelper::InterpretedFrame::return_pc_address(const frame& f) {
110   return (address*)(f.fp() + frame::return_addr_offset);
111 }
112 
113 inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, const frame& caller) {
114   intptr_t* sp = caller.unextended_sp();
115   assert(f.is_interpreted_frame(), "");
116   intptr_t* la = f.addr_at(frame::interpreter_frame_sender_sp_offset);
117   *la = f.is_heap_frame() ? (intptr_t)(sp - f.fp()) : (intptr_t)sp;
118 }
119 
120 inline address ContinuationHelper::Frame::real_pc(const frame& f) {
121   address* pc_addr = &(((address*) f.sp())[-1]);
122   return *pc_addr;
123 }
124 
125 inline void ContinuationHelper::Frame::patch_pc(const frame& f, address pc) {
126   address* pc_addr = &(((address*) f.sp())[-1]);

 86   intptr_t* fp = *(intptr_t**)(sp - frame::sender_sp_offset);
 87   anchor->set_last_Java_fp(fp);
 88 }
 89 
 90 #ifdef ASSERT
 91 inline bool ContinuationHelper::Frame::assert_frame_laid_out(frame f) {
 92   intptr_t* sp = f.sp();
 93   address pc = *(address*)(sp - frame::sender_sp_ret_address_offset());
 94   intptr_t* fp = *(intptr_t**)(sp - frame::sender_sp_offset);
 95   assert(f.raw_pc() == pc, "f.ra_pc: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.raw_pc()), p2i(pc));
 96   assert(f.fp() == fp, "f.fp: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.fp()), p2i(fp));
 97   return f.raw_pc() == pc && f.fp() == fp;
 98 }
 99 #endif
100 
101 inline intptr_t** ContinuationHelper::Frame::callee_link_address(const frame& f) {
102   return (intptr_t**)(f.sp() - frame::sender_sp_offset);
103 }
104 
105 inline address* ContinuationHelper::Frame::return_pc_address(const frame& f) {
106   frame::CompiledFramePointers cfp = f.compiled_frame_details();
107   return cfp.sender_pc_addr;
108 }
109 
110 inline address* ContinuationHelper::InterpretedFrame::return_pc_address(const frame& f) {
111   return (address*)(f.fp() + frame::return_addr_offset);
112 }
113 
114 inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, const frame& caller) {
115   intptr_t* sp = caller.unextended_sp();
116   assert(f.is_interpreted_frame(), "");
117   intptr_t* la = f.addr_at(frame::interpreter_frame_sender_sp_offset);
118   *la = f.is_heap_frame() ? (intptr_t)(sp - f.fp()) : (intptr_t)sp;
119 }
120 
121 inline address ContinuationHelper::Frame::real_pc(const frame& f) {
122   address* pc_addr = &(((address*) f.sp())[-1]);
123   return *pc_addr;
124 }
125 
126 inline void ContinuationHelper::Frame::patch_pc(const frame& f, address pc) {
127   address* pc_addr = &(((address*) f.sp())[-1]);
< prev index next >