282 283 // Compiled frames 284 285 inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) { 286 return (nof_args - local_index + (local_index < nof_args ? 1: -1)); 287 } 288 289 inline int frame::monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) { 290 return local_offset_for_compiler(local_index, nof_args, max_nof_locals, max_nof_monitors); 291 } 292 293 inline int frame::min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors) { 294 return (nof_args - (max_nof_locals + max_nof_monitors*2) - 1); 295 } 296 297 inline bool frame::volatile_across_calls(Register reg) { 298 return true; 299 } 300 301 inline oop frame::saved_oop_result(RegisterMap* map) const { 302 oop* result_adr = (oop *)map->location(rax->as_VMReg()); 303 guarantee(result_adr != NULL, "bad register save location"); 304 305 return (*result_adr); 306 } 307 308 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) { 309 oop* result_adr = (oop *)map->location(rax->as_VMReg()); 310 guarantee(result_adr != NULL, "bad register save location"); 311 312 *result_adr = obj; 313 } 314 315 #endif // CPU_X86_VM_FRAME_X86_INLINE_HPP | 282 283 // Compiled frames 284 285 inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) { 286 return (nof_args - local_index + (local_index < nof_args ? 1: -1)); 287 } 288 289 inline int frame::monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) { 290 return local_offset_for_compiler(local_index, nof_args, max_nof_locals, max_nof_monitors); 291 } 292 293 inline int frame::min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors) { 294 return (nof_args - (max_nof_locals + max_nof_monitors*2) - 1); 295 } 296 297 inline bool frame::volatile_across_calls(Register reg) { 298 return true; 299 } 300 301 inline oop frame::saved_oop_result(RegisterMap* map) const { 302 oop* result_adr = (oop *)map->location(rax.as_VMReg()); 303 guarantee(result_adr != NULL, "bad register save location"); 304 305 return (*result_adr); 306 } 307 308 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) { 309 oop* result_adr = (oop *)map->location(rax.as_VMReg()); 310 guarantee(result_adr != NULL, "bad register save location"); 311 312 *result_adr = obj; 313 } 314 315 #endif // CPU_X86_VM_FRAME_X86_INLINE_HPP |