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