310
311
312 // For OopMaps, map a local variable or spill index to an VMReg.
313 // This is the offset from sp() in the frame of the slot for the index,
314 // skewed by SharedInfo::stack0 to indicate a stack location (vs.a register.)
315 //
316 // C ABI size +
317 // framesize + framesize +
318 // stack0 stack0 stack0 0 <- VMReg->value()
319 // | | | <registers> |
320 // ..........|..............|..............|.............|
321 // 0 1 2 3 | <C ABI area> | 4 5 6 ...... | <- local indices
322 // ^ ^ sp()
323 // | |
324 // arguments non-argument locals
325
326
327 VMReg FrameMap::regname(LIR_Opr opr) const {
328 if (opr->is_single_cpu()) {
329 assert(!opr->is_virtual(), "should not see virtual registers here");
330 return opr->as_register()->as_VMReg();
331 } else if (opr->is_single_stack()) {
332 return sp_offset2vmreg(sp_offset_for_slot(opr->single_stack_ix()));
333 } else if (opr->is_address()) {
334 LIR_Address* addr = opr->as_address_ptr();
335 assert(addr->base() == stack_pointer(), "sp based addressing only");
336 return sp_offset2vmreg(in_ByteSize(addr->index()->as_jint()));
337 }
338 ShouldNotReachHere();
339 return VMRegImpl::Bad();
340 }
341
342
343
344
345 // ------------ extra spill slots ---------------
|
310
311
312 // For OopMaps, map a local variable or spill index to an VMReg.
313 // This is the offset from sp() in the frame of the slot for the index,
314 // skewed by SharedInfo::stack0 to indicate a stack location (vs.a register.)
315 //
316 // C ABI size +
317 // framesize + framesize +
318 // stack0 stack0 stack0 0 <- VMReg->value()
319 // | | | <registers> |
320 // ..........|..............|..............|.............|
321 // 0 1 2 3 | <C ABI area> | 4 5 6 ...... | <- local indices
322 // ^ ^ sp()
323 // | |
324 // arguments non-argument locals
325
326
327 VMReg FrameMap::regname(LIR_Opr opr) const {
328 if (opr->is_single_cpu()) {
329 assert(!opr->is_virtual(), "should not see virtual registers here");
330 return opr->as_register().as_VMReg();
331 } else if (opr->is_single_stack()) {
332 return sp_offset2vmreg(sp_offset_for_slot(opr->single_stack_ix()));
333 } else if (opr->is_address()) {
334 LIR_Address* addr = opr->as_address_ptr();
335 assert(addr->base() == stack_pointer(), "sp based addressing only");
336 return sp_offset2vmreg(in_ByteSize(addr->index()->as_jint()));
337 }
338 ShouldNotReachHere();
339 return VMRegImpl::Bad();
340 }
341
342
343
344
345 // ------------ extra spill slots ---------------
|