< prev index next >

src/hotspot/cpu/arm/frame_arm.inline.hpp

Print this page

 24 
 25 #ifndef CPU_ARM_FRAME_ARM_INLINE_HPP
 26 #define CPU_ARM_FRAME_ARM_INLINE_HPP
 27 
 28 #include "code/codeCache.hpp"
 29 #include "code/vmreg.inline.hpp"
 30 
 31 // Inline functions for ARM frames:
 32 
 33 // Constructors:
 34 
 35 inline frame::frame() {
 36   _pc = NULL;
 37   _sp = NULL;
 38   _unextended_sp = NULL;
 39   _fp = NULL;
 40   _cb = NULL;
 41   _deopt_state = unknown;
 42 }
 43 




 44 inline void frame::init(intptr_t* sp, intptr_t* fp, address pc) {
 45   _sp = sp;
 46   _unextended_sp = sp;
 47   _fp = fp;
 48   _pc = pc;
 49   assert(pc != NULL, "no pc?");
 50   _cb = CodeCache::find_blob(pc);
 51   adjust_unextended_sp();
 52 
 53   address original_pc = CompiledMethod::get_deopt_original_pc(this);
 54   if (original_pc != NULL) {
 55     _pc = original_pc;
 56     _deopt_state = is_deoptimized;
 57   } else {
 58     _deopt_state = not_deoptimized;
 59   }
 60 }
 61 
 62 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) {
 63   init(sp, fp, pc);

153 }
154 
155 
156 // Constant pool cache
157 
158 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
159   return (ConstantPoolCache**)addr_at(interpreter_frame_cache_offset);
160 }
161 
162 // Method
163 
164 inline Method** frame::interpreter_frame_method_addr() const {
165   return (Method**)addr_at(interpreter_frame_method_offset);
166 }
167 
168 inline oop* frame::interpreter_frame_mirror_addr() const {
169   return (oop*)addr_at(interpreter_frame_mirror_offset);
170 }
171 
172 // top of expression stack

173 inline intptr_t* frame::interpreter_frame_tos_address() const {
174   intptr_t* last_sp = interpreter_frame_last_sp();
175   if (last_sp == NULL ) {
176     return sp();
177   } else {
178     // sp() may have been extended or shrunk by an adapter.  At least
179     // check that we don't fall behind the legal region.
180     // For top deoptimized frame last_sp == interpreter_frame_monitor_end.
181     assert(last_sp <= (intptr_t*) interpreter_frame_monitor_end(), "bad tos");
182     return last_sp;
183   }
184 }
185 
186 inline oop* frame::interpreter_frame_temp_oop_addr() const {
187   return (oop *)(fp() + interpreter_frame_oop_temp_offset);
188 }
189 
190 inline int frame::interpreter_frame_monitor_size() {
191   return BasicObjectLock::size();
192 }
193 
194 
195 // expression stack
196 // (the max_stack arguments are used by the GC; see class FrameClosure)
197 

198 inline intptr_t* frame::interpreter_frame_expression_stack() const {
199   intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end();
200   return monitor_end-1;
201 }
202 
203 
204 // Entry frames
205 
206 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
207  return (JavaCallWrapper**)addr_at(entry_frame_call_wrapper_offset);
208 }
209 
210 
211 // Compiled frames
212 
213 inline oop frame::saved_oop_result(RegisterMap* map) const {
214   oop* result_adr = (oop*) map->location(R0->as_VMReg());
215   guarantee(result_adr != NULL, "bad register save location");
216   return (*result_adr);
217 }
218 
219 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
220   oop* result_adr = (oop*) map->location(R0->as_VMReg());
221   guarantee(result_adr != NULL, "bad register save location");
222   *result_adr = obj;
223 }
224 




















































225 #endif // CPU_ARM_FRAME_ARM_INLINE_HPP

 24 
 25 #ifndef CPU_ARM_FRAME_ARM_INLINE_HPP
 26 #define CPU_ARM_FRAME_ARM_INLINE_HPP
 27 
 28 #include "code/codeCache.hpp"
 29 #include "code/vmreg.inline.hpp"
 30 
 31 // Inline functions for ARM frames:
 32 
 33 // Constructors:
 34 
 35 inline frame::frame() {
 36   _pc = NULL;
 37   _sp = NULL;
 38   _unextended_sp = NULL;
 39   _fp = NULL;
 40   _cb = NULL;
 41   _deopt_state = unknown;
 42 }
 43 
 44 inline frame::frame(intptr_t* sp) {
 45   Unimplemented();
 46 }
 47 
 48 inline void frame::init(intptr_t* sp, intptr_t* fp, address pc) {
 49   _sp = sp;
 50   _unextended_sp = sp;
 51   _fp = fp;
 52   _pc = pc;
 53   assert(pc != NULL, "no pc?");
 54   _cb = CodeCache::find_blob(pc);
 55   adjust_unextended_sp();
 56 
 57   address original_pc = CompiledMethod::get_deopt_original_pc(this);
 58   if (original_pc != NULL) {
 59     _pc = original_pc;
 60     _deopt_state = is_deoptimized;
 61   } else {
 62     _deopt_state = not_deoptimized;
 63   }
 64 }
 65 
 66 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) {
 67   init(sp, fp, pc);

157 }
158 
159 
160 // Constant pool cache
161 
162 inline ConstantPoolCache** frame::interpreter_frame_cache_addr() const {
163   return (ConstantPoolCache**)addr_at(interpreter_frame_cache_offset);
164 }
165 
166 // Method
167 
168 inline Method** frame::interpreter_frame_method_addr() const {
169   return (Method**)addr_at(interpreter_frame_method_offset);
170 }
171 
172 inline oop* frame::interpreter_frame_mirror_addr() const {
173   return (oop*)addr_at(interpreter_frame_mirror_offset);
174 }
175 
176 // top of expression stack
177 template <bool relative>
178 inline intptr_t* frame::interpreter_frame_tos_address() const {
179   intptr_t* last_sp = interpreter_frame_last_sp();
180   if (last_sp == NULL ) {
181     return sp();
182   } else {
183     // sp() may have been extended or shrunk by an adapter.  At least
184     // check that we don't fall behind the legal region.
185     // For top deoptimized frame last_sp == interpreter_frame_monitor_end.
186     assert(last_sp <= (intptr_t*) interpreter_frame_monitor_end(), "bad tos");
187     return last_sp;
188   }
189 }
190 
191 inline oop* frame::interpreter_frame_temp_oop_addr() const {
192   return (oop *)(fp() + interpreter_frame_oop_temp_offset);
193 }
194 
195 inline int frame::interpreter_frame_monitor_size() {
196   return BasicObjectLock::size();
197 }
198 
199 
200 // expression stack
201 // (the max_stack arguments are used by the GC; see class FrameClosure)
202 
203 template <bool relative>
204 inline intptr_t* frame::interpreter_frame_expression_stack() const {
205   intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end();
206   return monitor_end-1;
207 }
208 
209 
210 // Entry frames
211 
212 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
213  return (JavaCallWrapper**)addr_at(entry_frame_call_wrapper_offset);
214 }
215 
216 
217 // Compiled frames
218 
219 inline oop frame::saved_oop_result(RegisterMap* map) const {
220   oop* result_adr = (oop*) map->location(R0->as_VMReg(), (intptr_t*) NULL);
221   guarantee(result_adr != NULL, "bad register save location");
222   return (*result_adr);
223 }
224 
225 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
226   oop* result_adr = (oop*) map->location(R0->as_VMReg(), (intptr_t*) NULL);
227   guarantee(result_adr != NULL, "bad register save location");
228   *result_adr = obj;
229 }
230 
231 inline int frame::frame_size() const {
232   return sender_sp() - sp();
233 }
234 
235 inline const ImmutableOopMap* frame::get_oop_map() const {
236   Unimplemented();
237   return NULL;
238 }
239 
240 inline int frame::compiled_frame_stack_argsize() const {
241   Unimplemented();
242   return 0;
243 }
244 
245 inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {
246   Unimplemented();
247 }
248 
249 inline int frame::interpreted_frame_num_oops(InterpreterOopMap* mask) const {
250   Unimplemented();
251   return 0;
252 }
253 
254 template <bool relative>
255 inline intptr_t* frame::interpreter_frame_last_sp() const {
256   Unimplemented();
257   return NULL;
258 }
259 
260 inline int frame::sender_sp_ret_address_offset() {
261   Unimplemented();
262   return 0;
263 }
264 
265 template <typename RegisterMapT>
266 void frame::update_map_with_saved_link(RegisterMapT* map, intptr_t** link_addr) {
267   Unimplemented();
268 }
269 
270 inline void frame::set_unextended_sp(intptr_t* value) {
271   Unimplemented();
272 }
273 
274 inline int frame::offset_unextended_sp() const {
275   Unimplemented();
276   return 0;
277 }
278 
279 inline void frame::set_offset_unextended_sp(int value) {
280   Unimplemented();
281 }
282 
283 #endif // CPU_ARM_FRAME_ARM_INLINE_HPP
< prev index next >