< prev index next >

src/hotspot/cpu/x86/frame_x86.inline.hpp

Print this page




 193 }
 194 
 195 // top of expression stack
 196 inline intptr_t* frame::interpreter_frame_tos_address() const {
 197   intptr_t* last_sp = interpreter_frame_last_sp();
 198   if (last_sp == NULL) {
 199     return sp();
 200   } else {
 201     // sp() may have been extended or shrunk by an adapter.  At least
 202     // check that we don't fall behind the legal region.
 203     // For top deoptimized frame last_sp == interpreter_frame_monitor_end.
 204     assert(last_sp <= (intptr_t*) interpreter_frame_monitor_end(), "bad tos");
 205     return last_sp;
 206   }
 207 }
 208 
 209 inline oop* frame::interpreter_frame_temp_oop_addr() const {
 210   return (oop *)(fp() + interpreter_frame_oop_temp_offset);
 211 }
 212 
 213 inline int frame::pd_oop_map_offset_adjustment() const {
 214   return 0;
 215 }
 216 
 217 inline int frame::interpreter_frame_monitor_size() {
 218   return BasicObjectLock::size();
 219 }
 220 
 221 
 222 // expression stack
 223 // (the max_stack arguments are used by the GC; see class FrameClosure)
 224 
 225 inline intptr_t* frame::interpreter_frame_expression_stack() const {
 226   intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end();
 227   return monitor_end-1;
 228 }
 229 
 230 
 231 inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
 232 
 233 
 234 // Entry frames
 235 
 236 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
 237  return (JavaCallWrapper**)addr_at(entry_frame_call_wrapper_offset);
 238 }
 239 
 240 // Compiled frames
 241 
 242 inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
 243   return (nof_args - local_index + (local_index < nof_args ? 1: -1));
 244 }
 245 
 246 inline int frame::monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
 247   return local_offset_for_compiler(local_index, nof_args, max_nof_locals, max_nof_monitors);
 248 }
 249 
 250 inline int frame::min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors) {
 251   return (nof_args - (max_nof_locals + max_nof_monitors*2) - 1);
 252 }
 253 
 254 inline bool frame::volatile_across_calls(Register reg) {
 255   return true;
 256 }
 257 
 258 inline oop frame::saved_oop_result(RegisterMap* map) const {
 259   oop* result_adr = (oop *)map->location(rax->as_VMReg());
 260   guarantee(result_adr != NULL, "bad register save location");
 261 
 262   return (*result_adr);
 263 }
 264 
 265 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
 266   oop* result_adr = (oop *)map->location(rax->as_VMReg());
 267   guarantee(result_adr != NULL, "bad register save location");
 268 
 269   *result_adr = obj;
 270 }
 271 
 272 #endif // CPU_X86_VM_FRAME_X86_INLINE_HPP


 193 }
 194 
 195 // top of expression stack
 196 inline intptr_t* frame::interpreter_frame_tos_address() const {
 197   intptr_t* last_sp = interpreter_frame_last_sp();
 198   if (last_sp == NULL) {
 199     return sp();
 200   } else {
 201     // sp() may have been extended or shrunk by an adapter.  At least
 202     // check that we don't fall behind the legal region.
 203     // For top deoptimized frame last_sp == interpreter_frame_monitor_end.
 204     assert(last_sp <= (intptr_t*) interpreter_frame_monitor_end(), "bad tos");
 205     return last_sp;
 206   }
 207 }
 208 
 209 inline oop* frame::interpreter_frame_temp_oop_addr() const {
 210   return (oop *)(fp() + interpreter_frame_oop_temp_offset);
 211 }
 212 




 213 inline int frame::interpreter_frame_monitor_size() {
 214   return BasicObjectLock::size();
 215 }
 216 
 217 
 218 // expression stack
 219 // (the max_stack arguments are used by the GC; see class FrameClosure)
 220 
 221 inline intptr_t* frame::interpreter_frame_expression_stack() const {
 222   intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end();
 223   return monitor_end-1;
 224 }
 225 
 226 
 227 inline jint frame::interpreter_frame_expression_stack_direction() { return -1; }
 228 
 229 
 230 // Entry frames
 231 
 232 inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
 233  return (JavaCallWrapper**)addr_at(entry_frame_call_wrapper_offset);
 234 }
 235 
 236 // Compiled frames
















 237 
 238 inline oop frame::saved_oop_result(RegisterMap* map) const {
 239   oop* result_adr = (oop *)map->location(rax->as_VMReg());
 240   guarantee(result_adr != NULL, "bad register save location");
 241 
 242   return (*result_adr);
 243 }
 244 
 245 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
 246   oop* result_adr = (oop *)map->location(rax->as_VMReg());
 247   guarantee(result_adr != NULL, "bad register save location");
 248 
 249   *result_adr = obj;
 250 }
 251 
 252 #endif // CPU_X86_VM_FRAME_X86_INLINE_HPP
< prev index next >