< prev index next >

src/hotspot/cpu/s390/frame_s390.inline.hpp

Print this page

102 }
103 
104 // Accessors
105 
106 // Return unique id for this frame. The id must have a value where we
107 // can distinguish identity and younger/older relationship. NULL
108 // represents an invalid (incomparable) frame.
109 inline intptr_t* frame::id(void) const {
110   // Use _fp. _sp or _unextended_sp wouldn't be correct due to resizing.
111   return _fp;
112 }
113 
114 // Return true if this frame is older (less recent activation) than
115 // the frame represented by id.
116 inline bool frame::is_older(intptr_t* id) const {
117   assert(this->id() != NULL && id != NULL, "NULL frame id");
118   // Stack grows towards smaller addresses on z/Architecture.
119   return this->id() > id;
120 }
121 
122 inline int frame::frame_size(RegisterMap* map) const {
123   // Stack grows towards smaller addresses on z/Linux: sender is at a higher address.
124   return sender_sp() - sp();
125 }
126 
127 // Ignore c2i adapter frames.
128 inline intptr_t* frame::unextended_sp() const {
129   return _unextended_sp;
130 }
131 
132 inline address frame::sender_pc() const {
133   return (address) callers_abi()->return_pc;
134 }
135 
136 // Get caller pc, if caller is native from stack slot of gpr14.
137 inline address frame::native_sender_pc() const {
138   return (address) callers_abi()->gpr14;
139 }
140 
141 // Get caller pc from stack slot of gpr10.
142 inline address frame::callstub_sender_pc() const {

151   return (intptr_t*) callers_abi();
152 }
153 
154 inline intptr_t* frame::link() const {
155   return (intptr_t*) callers_abi()->callers_sp;
156 }
157 
158 inline intptr_t** frame::interpreter_frame_locals_addr() const {
159   return (intptr_t**) &(ijava_state()->locals);
160 }
161 
162 inline intptr_t* frame::interpreter_frame_bcp_addr() const {
163   return (intptr_t*) &(ijava_state()->bcp);
164 }
165 
166 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
167   return (intptr_t*) &(ijava_state()->mdx);
168 }
169 
170 // Bottom(base) of the expression stack (highest address).

171 inline intptr_t* frame::interpreter_frame_expression_stack() const {
172   return (intptr_t*)interpreter_frame_monitor_end() - 1;
173 }
174 
175 inline intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
176   return &interpreter_frame_tos_address()[offset];
177 }
178 
179 
180 // monitor elements
181 
182 // End is lower in memory than begin, and beginning element is oldest element.
183 // Also begin is one past last monitor.
184 
185 inline intptr_t* frame::interpreter_frame_top_frame_sp() {
186   return (intptr_t*)ijava_state()->top_frame_sp;
187 }
188 
189 inline void frame::interpreter_frame_set_top_frame_sp(intptr_t* top_frame_sp) {
190   ijava_state()->top_frame_sp = (intptr_t) top_frame_sp;
191 }
192 
193 inline void frame::interpreter_frame_set_sender_sp(intptr_t* sender_sp) {
194   ijava_state()->sender_sp = (intptr_t) sender_sp;
195 }
196 
197 #ifdef ASSERT
198 inline void frame::interpreter_frame_set_magic() {
199   ijava_state()->magic = (intptr_t) frame::z_istate_magic_number;
200 }
201 #endif
202 
203 // Where z_ijava_state.esp is saved.
204 inline intptr_t** frame::interpreter_frame_esp_addr() const {
205   return (intptr_t**) &(ijava_state()->esp);
206 }
207 
208 // top of expression stack (lowest address)

209 inline intptr_t* frame::interpreter_frame_tos_address() const {
210   return *interpreter_frame_esp_addr() + 1;
211 }
212 
213 inline void frame::interpreter_frame_set_tos_address(intptr_t* x) {
214   *interpreter_frame_esp_addr() = x - 1;
215 }
216 
217 // Stack slot needed for native calls and GC.
218 inline oop * frame::interpreter_frame_temp_oop_addr() const {
219   return (oop *) ((address) _fp + _z_ijava_state_neg(oop_tmp));
220 }
221 
222 // In keeping with Intel side: end is lower in memory than begin.
223 // Beginning element is oldest element. Also begin is one past last monitor.
224 inline BasicObjectLock * frame::interpreter_frame_monitor_begin() const {
225   return (BasicObjectLock*)ijava_state();
226 }
227 
228 inline BasicObjectLock * frame::interpreter_frame_monitor_end() const {
229   return interpreter_frame_monitors();
230 }
231 
232 inline void frame::interpreter_frame_set_monitor_end(BasicObjectLock* monitors) {
233   interpreter_frame_set_monitors((BasicObjectLock *)monitors);
234 }
235 
236 inline int frame::interpreter_frame_monitor_size() {
237   // Number of stack slots for a monitor
238   return align_up(BasicObjectLock::size() /* number of stack slots */,
239                   WordsPerLong /* Number of stack slots for a Java long. */);
240 }
241 
242 inline int frame::interpreter_frame_monitor_size_in_bytes() {
243   // Number of bytes for a monitor.
244   return frame::interpreter_frame_monitor_size() * wordSize;
245 }
246 
247 inline int frame::interpreter_frame_interpreterstate_size_in_bytes() {
248   return z_ijava_state_size;
249 }
250 
251 inline Method** frame::interpreter_frame_method_addr() const {

260 
261 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
262   return (ConstantPoolCache**)&(ijava_state()->cpoolCache);
263 }
264 
265 // entry frames
266 
267 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
268   // Since an entry frame always calls the interpreter first,
269   // the parameters are on the stack and relative to known register in the
270   // entry frame.
271   intptr_t* tos = (intptr_t*) entry_frame_locals()->arguments_tos_address;
272   return &tos[offset + 1]; // prepushed tos
273 }
274 
275 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
276   return (JavaCallWrapper**) &entry_frame_locals()->call_wrapper_address;
277 }
278 
279 inline oop frame::saved_oop_result(RegisterMap* map) const {
280   return *((oop*) map->location(Z_R2->as_VMReg()));  // R2 is return register.
281 }
282 
283 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
284   *((oop*) map->location(Z_R2->as_VMReg())) = obj;  // R2 is return register.
285 }
286 
287 inline intptr_t* frame::real_fp() const {
288   return fp();
289 }
290 
















































291 #endif // CPU_S390_FRAME_S390_INLINE_HPP

102 }
103 
104 // Accessors
105 
106 // Return unique id for this frame. The id must have a value where we
107 // can distinguish identity and younger/older relationship. NULL
108 // represents an invalid (incomparable) frame.
109 inline intptr_t* frame::id(void) const {
110   // Use _fp. _sp or _unextended_sp wouldn't be correct due to resizing.
111   return _fp;
112 }
113 
114 // Return true if this frame is older (less recent activation) than
115 // the frame represented by id.
116 inline bool frame::is_older(intptr_t* id) const {
117   assert(this->id() != NULL && id != NULL, "NULL frame id");
118   // Stack grows towards smaller addresses on z/Architecture.
119   return this->id() > id;
120 }
121 
122 inline int frame::frame_size() const {
123   // Stack grows towards smaller addresses on z/Linux: sender is at a higher address.
124   return sender_sp() - sp();
125 }
126 
127 // Ignore c2i adapter frames.
128 inline intptr_t* frame::unextended_sp() const {
129   return _unextended_sp;
130 }
131 
132 inline address frame::sender_pc() const {
133   return (address) callers_abi()->return_pc;
134 }
135 
136 // Get caller pc, if caller is native from stack slot of gpr14.
137 inline address frame::native_sender_pc() const {
138   return (address) callers_abi()->gpr14;
139 }
140 
141 // Get caller pc from stack slot of gpr10.
142 inline address frame::callstub_sender_pc() const {

151   return (intptr_t*) callers_abi();
152 }
153 
154 inline intptr_t* frame::link() const {
155   return (intptr_t*) callers_abi()->callers_sp;
156 }
157 
158 inline intptr_t** frame::interpreter_frame_locals_addr() const {
159   return (intptr_t**) &(ijava_state()->locals);
160 }
161 
162 inline intptr_t* frame::interpreter_frame_bcp_addr() const {
163   return (intptr_t*) &(ijava_state()->bcp);
164 }
165 
166 inline intptr_t* frame::interpreter_frame_mdp_addr() const {
167   return (intptr_t*) &(ijava_state()->mdx);
168 }
169 
170 // Bottom(base) of the expression stack (highest address).
171 template <bool relative>
172 inline intptr_t* frame::interpreter_frame_expression_stack() const {
173   return (intptr_t*)interpreter_frame_monitor_end() - 1;
174 }
175 





176 // monitor elements
177 
178 // End is lower in memory than begin, and beginning element is oldest element.
179 // Also begin is one past last monitor.
180 
181 inline intptr_t* frame::interpreter_frame_top_frame_sp() {
182   return (intptr_t*)ijava_state()->top_frame_sp;
183 }
184 
185 inline void frame::interpreter_frame_set_top_frame_sp(intptr_t* top_frame_sp) {
186   ijava_state()->top_frame_sp = (intptr_t) top_frame_sp;
187 }
188 
189 inline void frame::interpreter_frame_set_sender_sp(intptr_t* sender_sp) {
190   ijava_state()->sender_sp = (intptr_t) sender_sp;
191 }
192 
193 #ifdef ASSERT
194 inline void frame::interpreter_frame_set_magic() {
195   ijava_state()->magic = (intptr_t) frame::z_istate_magic_number;
196 }
197 #endif
198 
199 // Where z_ijava_state.esp is saved.
200 inline intptr_t** frame::interpreter_frame_esp_addr() const {
201   return (intptr_t**) &(ijava_state()->esp);
202 }
203 
204 // top of expression stack (lowest address)
205 template <bool relative>
206 inline intptr_t* frame::interpreter_frame_tos_address() const {
207   return *interpreter_frame_esp_addr() + 1;
208 }
209 
210 inline void frame::interpreter_frame_set_tos_address(intptr_t* x) {
211   *interpreter_frame_esp_addr() = x - 1;
212 }
213 
214 // Stack slot needed for native calls and GC.
215 inline oop * frame::interpreter_frame_temp_oop_addr() const {
216   return (oop *) ((address) _fp + _z_ijava_state_neg(oop_tmp));
217 }
218 
219 // In keeping with Intel side: end is lower in memory than begin.
220 // Beginning element is oldest element. Also begin is one past last monitor.
221 inline BasicObjectLock * frame::interpreter_frame_monitor_begin() const {
222   return (BasicObjectLock*)ijava_state();
223 }
224 




225 inline void frame::interpreter_frame_set_monitor_end(BasicObjectLock* monitors) {
226   interpreter_frame_set_monitors((BasicObjectLock *)monitors);
227 }
228 
229 inline int frame::interpreter_frame_monitor_size() {
230   // Number of stack slots for a monitor
231   return align_up(BasicObjectLock::size() /* number of stack slots */,
232                   WordsPerLong /* Number of stack slots for a Java long. */);
233 }
234 
235 inline int frame::interpreter_frame_monitor_size_in_bytes() {
236   // Number of bytes for a monitor.
237   return frame::interpreter_frame_monitor_size() * wordSize;
238 }
239 
240 inline int frame::interpreter_frame_interpreterstate_size_in_bytes() {
241   return z_ijava_state_size;
242 }
243 
244 inline Method** frame::interpreter_frame_method_addr() const {

253 
254 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
255   return (ConstantPoolCache**)&(ijava_state()->cpoolCache);
256 }
257 
258 // entry frames
259 
260 inline intptr_t* frame::entry_frame_argument_at(int offset) const {
261   // Since an entry frame always calls the interpreter first,
262   // the parameters are on the stack and relative to known register in the
263   // entry frame.
264   intptr_t* tos = (intptr_t*) entry_frame_locals()->arguments_tos_address;
265   return &tos[offset + 1]; // prepushed tos
266 }
267 
268 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
269   return (JavaCallWrapper**) &entry_frame_locals()->call_wrapper_address;
270 }
271 
272 inline oop frame::saved_oop_result(RegisterMap* map) const {
273   return *((oop*) map->location(Z_R2->as_VMReg(), (intptr_t*) NULL));  // R2 is return register.
274 }
275 
276 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
277   *((oop*) map->location(Z_R2->as_VMReg(), (intptr_t*) NULL)) = obj;  // R2 is return register.
278 }
279 
280 inline intptr_t* frame::real_fp() const {
281   return fp();
282 }
283 
284 inline const ImmutableOopMap* frame::get_oop_map() const {
285   Unimplemented();
286   return NULL;
287 }
288 
289 inline int frame::compiled_frame_stack_argsize() const {
290   Unimplemented();
291   return 0;
292 }
293 
294 inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {
295   Unimplemented();
296 }
297 
298 inline int frame::interpreted_frame_num_oops(InterpreterOopMap* mask) const {
299   Unimplemented();
300   return 0;
301 }
302 
303 template <bool relative>
304 inline intptr_t* frame::interpreter_frame_last_sp() const {
305   Unimplemented();
306   return NULL;
307 }
308 
309 inline int frame::sender_sp_ret_address_offset() {
310   Unimplemented();
311   return 0;
312 }
313 
314 template <typename RegisterMapT>
315 void frame::update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr) {
316   Unimplemented();
317 }
318 
319 inline void frame::set_unextended_sp(intptr_t* value) {
320   Unimplemented();
321 }
322 
323 inline int frame::offset_unextended_sp() const {
324   Unimplemented();
325   return 0;
326 }
327 
328 inline void frame::set_offset_unextended_sp(int value) {
329   Unimplemented();
330 }
331 
332 #endif // CPU_S390_FRAME_S390_INLINE_HPP
< prev index next >