public class AMD64HotSpotRegisterConfig extends Object implements RegisterConfig
Modifier and Type | Field and Description |
---|---|
private boolean |
allAllocatableAreCallerSaved |
private Register[] |
allocatable |
private Architecture |
architecture |
private RegisterAttributes[] |
attributesMap |
private Register[] |
callerSaved
The caller saved registers always include all parameter registers.
|
private CalleeSaveLayout |
csl |
private Register[] |
javaGeneralParameterRegisters |
private int |
maxFrameSize |
private Register[] |
nativeGeneralParameterRegisters |
private boolean |
needsNativeStackHomeSpace |
private Register[] |
xmmParameterRegisters |
Constructor and Description |
---|
AMD64HotSpotRegisterConfig(Architecture architecture,
HotSpotVMConfig config) |
AMD64HotSpotRegisterConfig(Architecture architecture,
HotSpotVMConfig config,
Register[] allocatable) |
Modifier and Type | Method and Description |
---|---|
boolean |
areAllAllocatableRegistersCallerSaved()
Determines if all
allocatable registers are
caller saved . |
private CallingConvention |
callingConvention(Register[] generalParameterRegisters,
JavaType returnType,
JavaType[] parameterTypes,
CallingConvention.Type type,
TargetDescription target,
boolean stackOnly) |
Register[] |
filterAllocatableRegisters(PlatformKind kind,
Register[] registers)
Filters a set of registers and returns only those that can be used by the register allocator
for a value of a particular kind.
|
Register[] |
getAllocatableRegisters()
Gets the set of all registers that might be used by the register allocator.
|
RegisterAttributes[] |
getAttributesMap()
Gets a map from register numbers to register
attributes for this register configuration.
|
CalleeSaveLayout |
getCalleeSaveLayout()
Gets the layout of the callee save area of this register configuration.
|
Register[] |
getCallerSaveRegisters()
Gets the registers whose values must be preserved by a method across any call it makes.
|
CallingConvention |
getCallingConvention(CallingConvention.Type type,
JavaType returnType,
JavaType[] parameterTypes,
TargetDescription target,
boolean stackOnly)
Gets the calling convention describing how arguments are passed.
|
Register[] |
getCallingConventionRegisters(CallingConvention.Type type,
Kind kind)
Gets the ordered set of registers that are can be used to pass parameters according to a
given calling convention.
|
Register |
getFrameRegister()
Gets the register to which
Register.Frame and Register.CallerFrame are bound. |
int |
getMaximumFrameSize()
Gets the maximum allowed size of the frame.
|
Register |
getRegisterForRole(int index)
Gets the register corresponding to a runtime-defined role.
|
Register |
getReturnRegister(Kind kind)
Gets the register to be used for returning a value of a given kind.
|
private static Register[] |
initAllocatable(boolean reserveForHeapBase) |
String |
toString() |
private final Architecture architecture
private final Register[] allocatable
private final int maxFrameSize
private final Register[] callerSaved
private final boolean allAllocatableAreCallerSaved
private final RegisterAttributes[] attributesMap
private final Register[] javaGeneralParameterRegisters
private final Register[] nativeGeneralParameterRegisters
private final Register[] xmmParameterRegisters
private final boolean needsNativeStackHomeSpace
private final CalleeSaveLayout csl
public AMD64HotSpotRegisterConfig(Architecture architecture, HotSpotVMConfig config)
public AMD64HotSpotRegisterConfig(Architecture architecture, HotSpotVMConfig config, Register[] allocatable)
public int getMaximumFrameSize()
RegisterConfig
getMaximumFrameSize
in interface RegisterConfig
public Register[] getAllocatableRegisters()
RegisterConfig
RegisterAllocationConfig#getAllocatableRegisters()
getAllocatableRegisters
in interface RegisterConfig
public Register[] filterAllocatableRegisters(PlatformKind kind, Register[] registers)
RegisterConfig
filterAllocatableRegisters
in interface RegisterConfig
public RegisterAttributes[] getAttributesMap()
RegisterConfig
getAttributesMap
in interface RegisterConfig
private static Register[] initAllocatable(boolean reserveForHeapBase)
public Register[] getCallerSaveRegisters()
RegisterConfig
getCallerSaveRegisters
in interface RegisterConfig
public boolean areAllAllocatableRegistersCallerSaved()
RegisterConfig
allocatable
registers are
caller saved
.areAllAllocatableRegistersCallerSaved
in interface RegisterConfig
public Register getRegisterForRole(int index)
RegisterConfig
getRegisterForRole
in interface RegisterConfig
index
- the identifier of a runtime-defined register roleid
public CallingConvention getCallingConvention(CallingConvention.Type type, JavaType returnType, JavaType[] parameterTypes, TargetDescription target, boolean stackOnly)
RegisterConfig
getCallingConvention
in interface RegisterConfig
type
- the type of calling convention being requestedreturnType
- the return type (can be null for methods returning void
)parameterTypes
- the types of the arguments of the calltarget
- the target platformstackOnly
- ignore registerspublic Register[] getCallingConventionRegisters(CallingConvention.Type type, Kind kind)
RegisterConfig
getCallingConventionRegisters
in interface RegisterConfig
type
- the type of calling conventionkind
- specifies what kind of registers is being requestedtype
private CallingConvention callingConvention(Register[] generalParameterRegisters, JavaType returnType, JavaType[] parameterTypes, CallingConvention.Type type, TargetDescription target, boolean stackOnly)
public Register getReturnRegister(Kind kind)
RegisterConfig
getReturnRegister
in interface RegisterConfig
public Register getFrameRegister()
RegisterConfig
Register.Frame
and Register.CallerFrame
are bound.getFrameRegister
in interface RegisterConfig
public CalleeSaveLayout getCalleeSaveLayout()
RegisterConfig
getCalleeSaveLayout
in interface RegisterConfig
null
if there is no callee save area