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.ReferenceMapBuilderFactoryinitialSpillSize, 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, spillSlotRangeSizepublic SPARCFrameMap(CodeCacheProvider codeCache, RegisterConfig registerConfig, FrameMap.ReferenceMapBuilderFactory referenceMapFactory)
public int totalFrameSize()
FrameMapreturn address slot.totalFrameSize in class FrameMappublic int currentFrameSize()
FrameMapFrameMap.frameSize() if FrameMap.finish() were called now.currentFrameSize in class FrameMapprotected int calleeSaveAreaSize()
calleeSaveAreaSize in class FrameMapprotected int alignFrameSize(int size)
FrameMapalignFrameSize in class FrameMapsize - the initial frame size to be alignedpublic int offsetToCalleeSaveArea()
FrameMapoffsetToCalleeSaveArea in class FrameMapprotected StackSlot allocateNewSpillSlot(LIRKind kind, int additionalOffset)
FrameMapallocateNewSpillSlot in class FrameMapkind - The kind of the spill slot to be reserved.public int spillSlotSize(LIRKind kind)
spillSlotSize in class FrameMapkind - the LIRKind to be stored in the spill slot.public int offsetForStackSlot(StackSlot slot)
FrameMapoffsetForStackSlot in class FrameMapslot - a stack slotpublic boolean frameNeedsAllocating()
FrameMapreturn address slot.frameNeedsAllocating in class FrameMappublic StackSlot allocateDeoptimizationRescueSlot()