public final class SPARCFrameMap extends FrameMap
Base Contents : : ----- caller | incoming overflow argument n | ^ frame : ... : | positive | incoming overflow argument 0 | | offsets +--------------------------------+ | | | | : register save area : | | | | ---------+--------------------------------+--------------------------- | spill slot 0 | | negative ^ ^ : ... : v offsets | | | spill slot n | ----- total | +--------------------------------+ frame | current | alignment padding | size | frame +--------------------------------+ ----- | | | outgoing overflow argument n | ^ | frame : ... : | positive | size | outgoing overflow argument 0 | | offsets | | +--------------------------------+ | | | | return address | | | | +--------------------------------+ | | | | | | | | : callee save area : | | | | | | 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
initialSpillSize, outgoingSize, spillSize
Constructor and Description |
---|
SPARCFrameMap(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.
|
protected int |
calleeSaveAreaSize() |
int |
currentFrameSize()
Gets the current size of this frame.
|
boolean |
frameNeedsAllocating()
Determines if any space is used in the frame apart from the
return address slot . |
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 |
spillSlotSize(LIRKind kind)
In SPARC we have spill slots word aligned.
|
int |
totalFrameSize()
Gets the total frame size of the compiled frame, including the size of the
return address slot . |
accessesCallerFrame, addLiveValues, addObjectStackSlot, allocateSpillSlot, allocateStackSlots, callsMethod, finish, frameSize, getRegisterConfig, getTarget, newReferenceMapBuilder, outgoingSize, reserveOutgoing, returnAddressSize, spillSlotRangeSize
public SPARCFrameMap(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 calleeSaveAreaSize()
calleeSaveAreaSize
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 spillSlotSize(LIRKind kind)
spillSlotSize
in class FrameMap
kind
- the LIRKind
to be stored in the spill slot.public int offsetForStackSlot(StackSlot slot)
FrameMap
offsetForStackSlot
in class FrameMap
slot
- a stack slotpublic boolean frameNeedsAllocating()
FrameMap
return address slot
.frameNeedsAllocating
in class FrameMap
public StackSlot allocateDeoptimizationRescueSlot()