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