134 // we need to know that value. However in order to compute the address
135 // of the return address we need the real "raw" sp. Since sparc already
136 // uses sp() to mean "raw" sp and unextended_sp() to mean the caller's
137 // original sp we use that convention.
138
139 union {
140 intptr_t* _unextended_sp;
141 int _offset_unextended_sp; // for use in stack-chunk frames
142 };
143
144 // true means _sp value is correct and we can use it to get the sender's sp
145 // of the compiled frame, otherwise, _sp value may be invalid and we can use
146 // _fp to get the sender's sp if PreserveFramePointer is enabled.
147 bool _sp_is_trusted;
148
149 intptr_t* ptr_at_addr(int offset) const {
150 return (intptr_t*) addr_at(offset);
151 }
152
153 public:
154 // Constructors
155
156 frame(intptr_t* sp, intptr_t* fp, address pc);
157
158 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc);
159
160 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, bool allow_cb_null = false);
161 // used for fast frame construction by continuations
162 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map, bool on_heap);
163
164 frame(intptr_t* sp, intptr_t* fp);
165
166 void init(intptr_t* sp, intptr_t* fp, address pc);
167 void setup(address pc);
168
169 // accessors for the instance variables
170 // Note: not necessarily the real 'frame pointer' (see real_fp)
171 intptr_t* fp() const { assert_absolute(); return _fp; }
172 void set_fp(intptr_t* newfp) { _fp = newfp; }
173 int offset_fp() const { assert_offset(); return _offset_fp; }
|
134 // we need to know that value. However in order to compute the address
135 // of the return address we need the real "raw" sp. Since sparc already
136 // uses sp() to mean "raw" sp and unextended_sp() to mean the caller's
137 // original sp we use that convention.
138
139 union {
140 intptr_t* _unextended_sp;
141 int _offset_unextended_sp; // for use in stack-chunk frames
142 };
143
144 // true means _sp value is correct and we can use it to get the sender's sp
145 // of the compiled frame, otherwise, _sp value may be invalid and we can use
146 // _fp to get the sender's sp if PreserveFramePointer is enabled.
147 bool _sp_is_trusted;
148
149 intptr_t* ptr_at_addr(int offset) const {
150 return (intptr_t*) addr_at(offset);
151 }
152
153 public:
154 // Support for scalarized inline type calling convention
155 intptr_t* repair_sender_sp(intptr_t* sender_sp, intptr_t** saved_fp_addr) const;
156 struct CompiledFramePointers {
157 intptr_t* sender_sp; // The top of the stack of the sender
158 intptr_t** saved_fp_addr; // Where rfp (x29) is saved on the stack (FP #1 in remove_frame's comment)
159 address* sender_pc_addr; // Where lr (x30) is saved on the stack (LR #1)
160 };
161 CompiledFramePointers compiled_frame_details() const;
162 static intptr_t* repair_sender_sp(nmethod* nm, intptr_t* sp, intptr_t** saved_fp_addr);
163 bool was_augmented_on_entry(int& real_size) const;
164
165 // Constructors
166
167 frame(intptr_t* sp, intptr_t* fp, address pc);
168
169 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc);
170
171 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, bool allow_cb_null = false);
172 // used for fast frame construction by continuations
173 frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map, bool on_heap);
174
175 frame(intptr_t* sp, intptr_t* fp);
176
177 void init(intptr_t* sp, intptr_t* fp, address pc);
178 void setup(address pc);
179
180 // accessors for the instance variables
181 // Note: not necessarily the real 'frame pointer' (see real_fp)
182 intptr_t* fp() const { assert_absolute(); return _fp; }
183 void set_fp(intptr_t* newfp) { _fp = newfp; }
184 int offset_fp() const { assert_offset(); return _offset_fp; }
|