public final class PhysicalRegisterSet extends GenericPhysicalRegisterSet
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PhysicalRegisterSet.PhysicalRegisterEnumeration
An enumerator for use by the physical register utilities.
|
(package private) class |
PhysicalRegisterSet.RangeEnumeration
An enumerator for use by the physical register utilities.
|
Modifier and Type | Field and Description |
---|---|
private BitSet |
fpSet
Cache the set of floating-point registers for efficiency
|
private Register[] |
reg
This array holds a pool of objects representing physical registers
|
private static String[] |
registerName
Register names for each class. used in printing the IR
|
private BitSet |
volatileSet
Cache the set of volatile registers for efficiency
|
Constructor and Description |
---|
PhysicalRegisterSet() |
asIA32, asPPC, enumerateNonvolatileFPRsBackwards, getMappedIndex, getMappedObject, getMappingSize
private final BitSet volatileSet
private static final String[] registerName
public PhysicalRegisterSet()
public static int getSize()
public int getNumberOfPhysicalRegisters()
getNumberOfPhysicalRegisters
in class GenericPhysicalRegisterSet
public static int getNumberOfNonvolatileGPRs()
public static int getNumberOfGPRParams()
public Register getNativeGPRParam(int n)
n
- register indexpublic static int getNumberOfFPRParams()
public static int getNumberOfNativeGPRParams()
public static int getNumberOfNativeFPRParams()
public Register getGPRParam(int n)
n
- register indexpublic Register getFPRParam(int n)
n
- register indexpublic Register getNativeFPRParam(int n)
n
- register indexpublic Register getReturnGPR(int n)
n
- register indexpublic boolean isAllocatable(Register r)
isAllocatable
in class GenericPhysicalRegisterSet
r
- the register to checktrue
if and only if a particular register is subject to allocationpublic Register getTR()
getTR
in class GenericPhysicalRegisterSet
public Register getFP()
getFP
in class GenericPhysicalRegisterSet
public Register getGPR(MachineRegister n)
getGPR
in class GenericPhysicalRegisterSet
n
- a registerpublic Register getGPR(int n)
getGPR
in class GenericPhysicalRegisterSet
public static int getGPRIndex(Register r)
r
- a physical GPRpublic Register getFirstReturnGPR()
getFirstReturnGPR
in class GenericPhysicalRegisterSet
public Register getSecondReturnGPR()
public Register getReturnFPR()
public Register getFPR(RegisterConstants.FloatingPointMachineRegister n)
public Register getFPR(int n)
getFPR
in class GenericPhysicalRegisterSet
public static int getFPRIndex(Register r)
r
- a physical FPRpublic Register get(int n)
get
in class GenericPhysicalRegisterSet
n
- register numberpublic static int getPhysicalRegisterType(Register r)
r
- a symbolic registerpublic static String getName(int number)
number
- register numberpublic static int getSpillSize(int type)
type
- one of INT_REG, DOUBLE_REG, SPECIAL_REGpublic static int getSpillAlignment(int type)
type
- one of INT_REG, DOUBLE_REG, SPECIAL_REGpublic Enumeration<Register> enumerateAll()
enumerateAll
in class GenericPhysicalRegisterSet
public Enumeration<Register> enumerateGPRs()
enumerateGPRs
in class GenericPhysicalRegisterSet
public Enumeration<Register> enumerateFPRs()
public PhysicalRegisterSet.PhysicalRegisterEnumeration enumerateVolatileGPRs()
enumerateVolatileGPRs
in class GenericPhysicalRegisterSet
public PhysicalRegisterSet.PhysicalRegisterEnumeration enumerateNonvolatileGPRs()
enumerateNonvolatileGPRs
in class GenericPhysicalRegisterSet
public Enumeration<Register> enumerateNonvolatileGPRsBackwards()
enumerateNonvolatileGPRsBackwards
in class GenericPhysicalRegisterSet
public PhysicalRegisterSet.PhysicalRegisterEnumeration enumerateVolatileFPRs()
enumerateVolatileFPRs
in class GenericPhysicalRegisterSet
public PhysicalRegisterSet.PhysicalRegisterEnumeration enumerateNonvolatileFPRs()
enumerateNonvolatileFPRs
in class GenericPhysicalRegisterSet
public Enumeration<Register> enumerateVolatiles(int regClass)
enumerateVolatiles
in class GenericPhysicalRegisterSet
public Enumeration<Register> enumerateVolatiles()
enumerateVolatiles
in class GenericPhysicalRegisterSet
public BitSet getVolatiles()
public Enumeration<Register> enumerateNonvolatiles(int regClass)
public Enumeration<Register> enumerateNonvolatilesBackwards(int regClass)
enumerateNonvolatilesBackwards
in class GenericPhysicalRegisterSet