< prev index next >

src/hotspot/share/c1/c1_FrameMap.cpp

Print this page

266     assert(in_bytes(offset) + 4 < framesize() * 4, "spill outside of frame");
267   }
268   return offset;
269 }
270 
271 
272 ByteSize FrameMap::sp_offset_for_spill(const int index) const {
273   assert(index >= 0 && index < _num_spills, "out of range");
274   int offset = align_up(first_available_sp_in_frame + _reserved_argument_area_size, (int)sizeof(double)) +
275     index * spill_slot_size_in_bytes;
276   return in_ByteSize(offset);
277 }
278 
279 ByteSize FrameMap::sp_offset_for_monitor_base(const int index) const {
280   int end_of_spills = align_up(first_available_sp_in_frame + _reserved_argument_area_size, (int)sizeof(double)) +
281     _num_spills * spill_slot_size_in_bytes;
282   int offset = align_up(end_of_spills, HeapWordSize) + index * (int)sizeof(BasicObjectLock);
283   return in_ByteSize(offset);
284 }
285 
286 ByteSize FrameMap::sp_offset_for_monitor_lock(int index) const {
287   check_monitor_index(index);
288   return sp_offset_for_monitor_base(index) + in_ByteSize(BasicObjectLock::lock_offset_in_bytes());;
289 }
290 
291 ByteSize FrameMap::sp_offset_for_monitor_object(int index) const {
292   check_monitor_index(index);
293   return sp_offset_for_monitor_base(index) + in_ByteSize(BasicObjectLock::obj_offset_in_bytes());
294 }
295 
296 
297 // For OopMaps, map a local variable or spill index to an VMReg.
298 // This is the offset from sp() in the frame of the slot for the index,
299 // skewed by SharedInfo::stack0 to indicate a stack location (vs.a register.)
300 //
301 //         C ABI size +
302 //         framesize +     framesize +
303 //         stack0          stack0         stack0          0 <- VMReg->value()
304 //            |              |              | <registers> |
305 //  ..........|..............|..............|.............|
306 //    0 1 2 3 | <C ABI area> | 4 5 6 ...... |               <- local indices
307 //    ^                        ^          sp()
308 //    |                        |
309 //  arguments            non-argument locals
310 

266     assert(in_bytes(offset) + 4 < framesize() * 4, "spill outside of frame");
267   }
268   return offset;
269 }
270 
271 
272 ByteSize FrameMap::sp_offset_for_spill(const int index) const {
273   assert(index >= 0 && index < _num_spills, "out of range");
274   int offset = align_up(first_available_sp_in_frame + _reserved_argument_area_size, (int)sizeof(double)) +
275     index * spill_slot_size_in_bytes;
276   return in_ByteSize(offset);
277 }
278 
279 ByteSize FrameMap::sp_offset_for_monitor_base(const int index) const {
280   int end_of_spills = align_up(first_available_sp_in_frame + _reserved_argument_area_size, (int)sizeof(double)) +
281     _num_spills * spill_slot_size_in_bytes;
282   int offset = align_up(end_of_spills, HeapWordSize) + index * (int)sizeof(BasicObjectLock);
283   return in_ByteSize(offset);
284 }
285 





286 ByteSize FrameMap::sp_offset_for_monitor_object(int index) const {
287   check_monitor_index(index);
288   return sp_offset_for_monitor_base(index) + in_ByteSize(BasicObjectLock::obj_offset_in_bytes());
289 }
290 
291 
292 // For OopMaps, map a local variable or spill index to an VMReg.
293 // This is the offset from sp() in the frame of the slot for the index,
294 // skewed by SharedInfo::stack0 to indicate a stack location (vs.a register.)
295 //
296 //         C ABI size +
297 //         framesize +     framesize +
298 //         stack0          stack0         stack0          0 <- VMReg->value()
299 //            |              |              | <registers> |
300 //  ..........|..............|..............|.............|
301 //    0 1 2 3 | <C ABI area> | 4 5 6 ...... |               <- local indices
302 //    ^                        ^          sp()
303 //    |                        |
304 //  arguments            non-argument locals
305 
< prev index next >