public class AMD64FrameMap extends FrameMap
Base Contents : : ----- caller | incoming overflow argument n | ^ frame : ... : | positive | incoming overflow argument 0 | | offsets ---------+--------------------------------+--------------------- | return address | | ^ current +--------------------------------+ | | ----- frame | | | | ^ : callee save area : | | | | | | | | +--------------------------------+ | | | | spill slot 0 | | negative | | : ... : v offsets | | | spill slot n | ----- total frame +--------------------------------+ frame size | alignment padding | size | +--------------------------------+ ----- | | | outgoing overflow argument n | ^ | | : ... : | positive | | | outgoing overflow argument 0 | | offsets v v %sp--> +--------------------------------+---------------------------The spill slot area also includes stack allocated memory blocks (ALLOCA blocks). The size of such a block may be greater than the size of a normal spill slot or the word size.
A runtime can reserve space at the beginning of the overflow argument area. The calling
convention can specify that the first overflow stack argument is not at offset 0, but at a
specified offset. Use CodeCacheProvider.getMinimumOutgoingSize()
to make sure that
call-free methods also have this space reserved. Then the VM can use the memory at offset 0
relative to the stack pointer.
FrameMap.ReferenceMapBuilderFactory
Modifier and Type | Field and Description |
---|---|
private StackSlot |
rbpSpillSlot |
initialSpillSize, outgoingSize, spillSize
Constructor and Description |
---|
AMD64FrameMap(CodeCacheProvider codeCache,
RegisterConfig registerConfig,
FrameMap.ReferenceMapBuilderFactory referenceMapFactory) |
Modifier and Type | Method and Description |
---|---|
protected int |
alignFrameSize(int size)
Aligns the given frame size to the stack alignment size and return the aligned size.
|
StackSlot |
allocateDeoptimizationRescueSlot() |
protected StackSlot |
allocateNewSpillSlot(LIRKind kind,
int additionalOffset)
Reserves a new spill slot in the frame of the method being compiled.
|
(package private) StackSlot |
allocateRBPSpillSlot()
For non-leaf methods, RBP is preserved in the special stack slot required by the HotSpot
runtime for walking/inspecting frames of such methods.
|
int |
currentFrameSize()
Gets the current size of this frame.
|
(package private) void |
freeRBPSpillSlot() |
int |
offsetForStackSlot(StackSlot slot)
Computes the offset of a stack slot relative to the frame register.
|
int |
offsetToCalleeSaveArea()
Gets the offset from the stack pointer to the stack area where callee-saved registers are
stored.
|
int |
totalFrameSize()
Gets the total frame size of the compiled frame, including the size of the
return address slot . |
accessesCallerFrame, addLiveValues, addObjectStackSlot, allocateSpillSlot, allocateStackSlots, calleeSaveAreaSize, callsMethod, finish, frameNeedsAllocating, frameSize, getRegisterConfig, getTarget, newReferenceMapBuilder, outgoingSize, reserveOutgoing, returnAddressSize, spillSlotRangeSize, spillSlotSize
private StackSlot rbpSpillSlot
public AMD64FrameMap(CodeCacheProvider codeCache, RegisterConfig registerConfig, FrameMap.ReferenceMapBuilderFactory referenceMapFactory)
public int totalFrameSize()
FrameMap
return address slot
.totalFrameSize
in class FrameMap
public int currentFrameSize()
FrameMap
FrameMap.frameSize()
if FrameMap.finish()
were called now.currentFrameSize
in class FrameMap
protected int alignFrameSize(int size)
FrameMap
alignFrameSize
in class FrameMap
size
- the initial frame size to be alignedpublic int offsetToCalleeSaveArea()
FrameMap
offsetToCalleeSaveArea
in class FrameMap
protected StackSlot allocateNewSpillSlot(LIRKind kind, int additionalOffset)
FrameMap
allocateNewSpillSlot
in class FrameMap
kind
- The kind of the spill slot to be reserved.public int offsetForStackSlot(StackSlot slot)
FrameMap
offsetForStackSlot
in class FrameMap
slot
- a stack slotStackSlot allocateRBPSpillSlot()
void freeRBPSpillSlot()
public StackSlot allocateDeoptimizationRescueSlot()