120 intptr_t* _fp; // frame pointer
121 int _offset_fp; // relative frame pointer for use in stack-chunk frames
122 };
123 // The interpreter and adapters will extend the frame of the caller.
124 // Since oopMaps are based on the sp of the caller before extension
125 // we need to know that value. However in order to compute the address
126 // of the return address we need the real "raw" sp. By convention we
127 // use sp() to mean "raw" sp and unextended_sp() to mean the caller's
128 // original sp.
129
130 union {
131 intptr_t* _unextended_sp;
132 int _offset_unextended_sp; // for use in stack-chunk frames
133 };
134
135 intptr_t* ptr_at_addr(int offset) const {
136 return (intptr_t*) addr_at(offset);
137 }
138
139 public:
140 // Constructors
141
142 frame(intptr_t* sp, intptr_t* fp, address pc);
143
144 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc);
145
146 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb);
147 // used for heap frame construction by continuations
148 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map, bool relative);
149
150 frame(intptr_t* sp, intptr_t* fp);
151
152 void init(intptr_t* sp, intptr_t* fp, address pc);
153 void setup(address pc);
154
155 // accessors for the instance variables
156 // Note: not necessarily the real 'frame pointer' (see real_fp)
157 intptr_t* fp() const { assert_absolute(); return _fp; }
158 void set_fp(intptr_t* newfp) { _fp = newfp; }
159 int offset_fp() const { assert_offset(); return _offset_fp; }
|
120 intptr_t* _fp; // frame pointer
121 int _offset_fp; // relative frame pointer for use in stack-chunk frames
122 };
123 // The interpreter and adapters will extend the frame of the caller.
124 // Since oopMaps are based on the sp of the caller before extension
125 // we need to know that value. However in order to compute the address
126 // of the return address we need the real "raw" sp. By convention we
127 // use sp() to mean "raw" sp and unextended_sp() to mean the caller's
128 // original sp.
129
130 union {
131 intptr_t* _unextended_sp;
132 int _offset_unextended_sp; // for use in stack-chunk frames
133 };
134
135 intptr_t* ptr_at_addr(int offset) const {
136 return (intptr_t*) addr_at(offset);
137 }
138
139 public:
140 // Support for scalarized inline type calling convention
141 intptr_t* repair_sender_sp(intptr_t* sender_sp, intptr_t** saved_fp_addr) const;
142 struct CompiledFramePointers {
143 intptr_t* sender_sp; // The top of the stack of the sender
144 intptr_t** saved_fp_addr; // Where RBP is saved on the stack
145 address* sender_pc_addr; // Where return address (copy #1 in remove_frame's comment) is saved on the stack
146 };
147 CompiledFramePointers compiled_frame_details() const;
148 static intptr_t* repair_sender_sp(nmethod* nm, intptr_t* sp, intptr_t** saved_fp_addr);
149 bool was_augmented_on_entry(int& real_size) const;
150
151 // Constructors
152
153 frame(intptr_t* sp, intptr_t* fp, address pc);
154
155 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc);
156
157 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb);
158 // used for heap frame construction by continuations
159 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map, bool relative);
160
161 frame(intptr_t* sp, intptr_t* fp);
162
163 void init(intptr_t* sp, intptr_t* fp, address pc);
164 void setup(address pc);
165
166 // accessors for the instance variables
167 // Note: not necessarily the real 'frame pointer' (see real_fp)
168 intptr_t* fp() const { assert_absolute(); return _fp; }
169 void set_fp(intptr_t* newfp) { _fp = newfp; }
170 int offset_fp() const { assert_offset(); return _offset_fp; }
|