|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.ir.GenericPhysicalRegisterSet org.jikesrvm.compilers.opt.ir.ia32.PhysicalRegisterSet
public abstract class PhysicalRegisterSet
This class represents a set of Registers corresponding to the IA32 register set.
Nested Class Summary | |
---|---|
(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. |
Nested classes/interfaces inherited from interface org.jikesrvm.ia32.RegisterConstants |
---|
RegisterConstants.FloatingPointMachineRegister, RegisterConstants.FPR, RegisterConstants.GPR, RegisterConstants.MachineRegister, RegisterConstants.MM, RegisterConstants.XMM |
Field Summary | |
---|---|
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 |
Fields inherited from interface org.jikesrvm.compilers.opt.regalloc.ia32.PhysicalRegisterConstants |
---|
AF, C0, C1, C2, C3, CF, CONDITION_VALUE, DOUBLE_REG, DOUBLE_VALUE, FIRST_DOUBLE, FIRST_INT, FIRST_SPECIAL, FLOAT_VALUE, INT_REG, INT_VALUE, NUM_SPECIALS, NUMBER_TYPE, OF, PF, SF, SPECIAL_REG, ST0, ST1, ZF |
Fields inherited from interface org.jikesrvm.ia32.RegisterConstants |
---|
ALL_FPRS, ALL_GPRS, EAX, EBP, EBX, ECX, EDI, EDX, ESI, ESP, FP0, FP1, FP2, FP3, FP4, FP5, FP6, FP7, INSTRUCTION_WIDTH, LG_INSTRUCTION_WIDTH, MM0, MM1, MM10, MM11, MM12, MM13, MM14, MM15, MM2, MM3, MM4, MM5, MM6, MM7, MM8, MM9, NATIVE_NONVOLATILE_FPRS, NATIVE_NONVOLATILE_GPRS, NATIVE_PARAMETER_FPRS, NATIVE_PARAMETER_GPRS, NATIVE_VOLATILE_FPRS, NATIVE_VOLATILE_GPRS, NONVOLATILE_FPRS, NONVOLATILE_GPRS, NUM_FPRS, NUM_GPRS, NUM_NONVOLATILE_FPRS, NUM_NONVOLATILE_GPRS, NUM_PARAMETER_FPRS, NUM_PARAMETER_GPRS, NUM_RETURN_FPRS, NUM_RETURN_GPRS, NUM_VOLATILE_FPRS, NUM_VOLATILE_GPRS, PARAMETER_FPRS, PARAMETER_GPRS, R0, R1, R10, R11, R12, R13, R14, R15, R2, R3, R4, R5, R6, R7, R8, R9, RETURN_FPRS, RETURN_GPRS, STACK_POINTER, THREAD_REGISTER, VOLATILE_FPRS, VOLATILE_GPRS, XMM0, XMM1, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, XMM8, XMM9 |
Constructor Summary | |
---|---|
protected |
PhysicalRegisterSet()
Constructor: set up a pool of physical registers. |
Method Summary | |
---|---|
Enumeration<Register> |
enumerateAll()
Enumerate all the physical registers in this set. |
Enumeration<Register> |
enumerateFPRs()
Enumerate all the FPRs in this set. |
Enumeration<Register> |
enumerateGPRs()
Enumerate all the GPRs in this set. |
PhysicalRegisterSet.PhysicalRegisterEnumeration |
enumerateNonvolatileFPRs()
Enumerate all the nonvolatile FPRs in this set. |
PhysicalRegisterSet.PhysicalRegisterEnumeration |
enumerateNonvolatileGPRs()
Enumerate all the nonvolatile GPRs in this set. |
Enumeration<Register> |
enumerateNonvolatileGPRsBackwards()
Enumerate all the nonvolatile GPRs in this set, backwards |
Enumeration<Register> |
enumerateNonvolatiles(int regClass)
Enumerate the nonvolatile physical registers of a given class. |
Enumeration<Register> |
enumerateNonvolatilesBackwards(int regClass)
Enumerate the nonvolatile physical registers of a given class, backwards |
PhysicalRegisterSet.PhysicalRegisterEnumeration |
enumerateVolatileFPRs()
Enumerate all the volatile FPRs in this set. |
PhysicalRegisterSet.PhysicalRegisterEnumeration |
enumerateVolatileGPRs()
Enumerate all the volatile GPRs in this set. |
Enumeration<Register> |
enumerateVolatiles()
Enumerate all the volatile physical registers |
Enumeration<Register> |
enumerateVolatiles(int regClass)
Enumerate the volatile physical registers of a given class. |
Register |
get(int n)
|
Register |
getAF()
|
Register |
getC0()
|
Register |
getC1()
|
Register |
getC2()
|
Register |
getC3()
|
Register |
getCF()
|
Register |
getEAX()
|
Register |
getEBP()
|
Register |
getEBX()
|
Register |
getECX()
|
Register |
getEDI()
|
Register |
getEDX()
|
Register |
getESI()
|
Register |
getESP()
|
Register |
getFirstReturnGPR()
|
Register |
getFP()
|
Register |
getFPR(int n)
|
Register |
getFPR(RegisterConstants.FloatingPointMachineRegister n)
|
static int |
getFPRIndex(Register r)
|
Register |
getFPRParam(int n)
Return the (zero-based indexed) nth FPR that may hold a parameter. |
BitSet |
getFPRs()
|
Register |
getGPR(int n)
|
Register |
getGPR(RegisterConstants.GPR n)
|
static int |
getGPRIndex(Register r)
|
Register |
getGPRParam(int n)
Return the (zero-based indexed) nth GPR that may hold a parameter. |
static String |
getName(int number)
Get the register name for a register with a particular number in the pool |
static int |
getNumberOfFPRParams()
Return the total number of FPRs that may hold parameters. |
static int |
getNumberOfGPRParams()
Return the total number of GPRs that may hold parameters. |
static int |
getNumberOfNonvolatileGPRs()
Return the total number of nonvolatile GPRs. |
int |
getNumberOfPhysicalRegisters()
Return the total number of physical registers. |
Register |
getOF()
|
Register |
getPF()
|
static int |
getPhysicalRegisterType(Register r)
Given a symbolic register, return a code that gives the physical register type to hold the value of the symbolic register. |
Register |
getReturnFPR()
|
Register |
getReturnGPR(int n)
Return the (zero-based indexed) nth GPR that may hold a return value. |
Register |
getSecondReturnGPR()
|
Register |
getSF()
|
static int |
getSize()
Return the total number of physical registers. |
static int |
getSpillAlignment(int type)
Get the required spill alignment for a register with a particular type |
static int |
getSpillSize(int type)
Get the spill size for a register with a particular type |
Register |
getST0()
|
Register |
getST1()
|
Register |
getTR()
|
BitSet |
getVolatiles()
|
Register |
getZF()
|
boolean |
isAllocatable(Register r)
Is a particular register subject to allocation? |
Methods inherited from class org.jikesrvm.compilers.opt.ir.GenericPhysicalRegisterSet |
---|
enumerateNonvolatileFPRsBackwards, getMappedIndex, getMappedObject, getMappingSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Register[] reg
private final BitSet volatileSet
private final BitSet fpSet
private static final String[] registerName
Constructor Detail |
---|
protected PhysicalRegisterSet()
Method Detail |
---|
public static int getSize()
public final int getNumberOfPhysicalRegisters()
GenericPhysicalRegisterSet
getNumberOfPhysicalRegisters
in class GenericPhysicalRegisterSet
public static int getNumberOfNonvolatileGPRs()
public static int getNumberOfGPRParams()
public static int getNumberOfFPRParams()
public final Register getGPRParam(int n)
public final Register getFPRParam(int n)
public Register getReturnGPR(int n)
public boolean isAllocatable(Register r)
public Register getTR()
getTR
in class GenericPhysicalRegisterSet
public Register getFP()
getFP
in class GenericPhysicalRegisterSet
public Register getEAX()
public Register getECX()
public Register getEDX()
public Register getEBX()
public Register getESP()
public Register getEBP()
public Register getESI()
public Register getEDI()
public Register getAF()
public Register getCF()
public Register getOF()
public Register getPF()
public Register getSF()
public Register getZF()
public Register getC0()
public Register getC1()
public Register getC2()
public Register getC3()
public Register getGPR(RegisterConstants.GPR n)
public Register getGPR(int n)
getGPR
in class GenericPhysicalRegisterSet
public static int getGPRIndex(Register r)
public Register getFirstReturnGPR()
getFirstReturnGPR
in class GenericPhysicalRegisterSet
public Register getSecondReturnGPR()
public Register getST0()
public Register getST1()
public Register getReturnFPR()
public Register getFPR(RegisterConstants.FloatingPointMachineRegister n)
public Register getFPR(int n)
getFPR
in class GenericPhysicalRegisterSet
public static int getFPRIndex(Register r)
public Register get(int n)
get
in class GenericPhysicalRegisterSet
public static int getPhysicalRegisterType(Register r)
r
- a symbolic register
public static String getName(int number)
public 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()
GenericPhysicalRegisterSet
enumerateAll
in class GenericPhysicalRegisterSet
public Enumeration<Register> enumerateGPRs()
GenericPhysicalRegisterSet
enumerateGPRs
in class GenericPhysicalRegisterSet
public Enumeration<Register> enumerateFPRs()
public PhysicalRegisterSet.PhysicalRegisterEnumeration enumerateVolatileGPRs()
GenericPhysicalRegisterSet
enumerateVolatileGPRs
in class GenericPhysicalRegisterSet
public PhysicalRegisterSet.PhysicalRegisterEnumeration enumerateNonvolatileGPRs()
GenericPhysicalRegisterSet
enumerateNonvolatileGPRs
in class GenericPhysicalRegisterSet
public Enumeration<Register> enumerateNonvolatileGPRsBackwards()
GenericPhysicalRegisterSet
enumerateNonvolatileGPRsBackwards
in class GenericPhysicalRegisterSet
public PhysicalRegisterSet.PhysicalRegisterEnumeration enumerateVolatileFPRs()
GenericPhysicalRegisterSet
enumerateVolatileFPRs
in class GenericPhysicalRegisterSet
public PhysicalRegisterSet.PhysicalRegisterEnumeration enumerateNonvolatileFPRs()
GenericPhysicalRegisterSet
enumerateNonvolatileFPRs
in class GenericPhysicalRegisterSet
public Enumeration<Register> enumerateVolatiles(int regClass)
regClass
- one of INT_REG, DOUBLE_REG, SPECIAL_REGpublic Enumeration<Register> enumerateVolatiles()
GenericPhysicalRegisterSet
enumerateVolatiles
in class GenericPhysicalRegisterSet
public BitSet getVolatiles()
public BitSet getFPRs()
public Enumeration<Register> enumerateNonvolatiles(int regClass)
regClass
- one of INT_REG, DOUBLE_REG, SPECIAL_REGpublic Enumeration<Register> enumerateNonvolatilesBackwards(int regClass)
regClass
- one of INT_REG, DOUBLE_REG, SPECIAL_REG
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |