public class SPARCHotSpotRegisterConfig extends Object implements RegisterConfig
Modifier and Type | Field and Description |
---|---|
private Register[] |
allocatable |
private Architecture |
architecture |
private RegisterAttributes[] |
attributesMap |
private Register[] |
calleeSaveRegisters
Registers saved by the callee.
|
private Register[] |
callerSaveRegisters |
private Register[] |
cpuCalleeParameterRegisters |
private Register[] |
cpuCallerParameterRegisters |
private CalleeSaveLayout |
csl |
private Register[] |
fpuDoubleParameterRegisters |
private Register[] |
fpuParameterRegisters |
Constructor and Description |
---|
SPARCHotSpotRegisterConfig(TargetDescription target,
HotSpotVMConfig config) |
SPARCHotSpotRegisterConfig(TargetDescription target,
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. |
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 |
getReturnRegister(Kind kind,
CallingConvention.Type type) |
private static Register[] |
initAllocatable(boolean reserveForHeapBase) |
private static int |
roundUp(int number,
int mod) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMaximumFrameSize
private final Architecture architecture
private final Register[] allocatable
private final RegisterAttributes[] attributesMap
private final Register[] cpuCallerParameterRegisters
private final Register[] cpuCalleeParameterRegisters
private final Register[] fpuParameterRegisters
private final Register[] fpuDoubleParameterRegisters
private final Register[] callerSaveRegisters
private final Register[] calleeSaveRegisters
private final CalleeSaveLayout csl
public SPARCHotSpotRegisterConfig(TargetDescription target, HotSpotVMConfig config)
public SPARCHotSpotRegisterConfig(TargetDescription target, Register[] allocatable)
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)
private static int roundUp(int number, int mod)
public Register getReturnRegister(Kind kind)
RegisterConfig
getReturnRegister
in interface RegisterConfig
private static Register getReturnRegister(Kind kind, CallingConvention.Type type)
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