org.jikesrvm.compilers.opt.ir
Class GenericPhysicalRegisterTools

java.lang.Object
  extended by org.jikesrvm.compilers.opt.ir.IRTools
      extended by org.jikesrvm.compilers.opt.ir.GenericPhysicalRegisterTools
Direct Known Subclasses:
PhysicalRegisterTools

public abstract class GenericPhysicalRegisterTools
extends IRTools

This abstract class provides a set of useful architecture-independent methods for manipulating physical registers for an IR.


Constructor Summary
GenericPhysicalRegisterTools()
           
 
Method Summary
protected  RegisterOperand A(int regnum)
          Create an address register operand for a given physical GPR.
(package private)  RegisterOperand D(int regnum)
          Create a double register operand for a given physical FPR.
(package private)  RegisterOperand F(int regnum)
          Create a float register operand for a given physical FPR.
abstract  IR getIR()
          Return the governing IR.
(package private) static boolean hasPhysicalOperand(Instruction s)
          Does instruction s have an operand that contains a physical register?
protected  RegisterOperand I(int regnum)
          Create an integer register operand for a given physical GPR.
(package private)  RegisterOperand L(int regnum)
          Create a long register operand for a given GPR number.
 
Methods inherited from class org.jikesrvm.compilers.opt.ir.IRTools
A, AC, AC, CPOS, CR, D, DC, defDoublesAsUse, definedIn, F, FC, getCondMoveOp, getDefaultOperand, getLoadOp, getLoadOp, getMoveOp, getStoreOp, getStoreOp, I, IC, insertInstructionsAfter, L, LC, makeBlockOnEdge, mayBeVolatileFieldLoad, moveInstruction, moveIntoRegister, moveIntoRegister, nonPEIGC, TG, usedIn, useDoublesAsDef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericPhysicalRegisterTools

public GenericPhysicalRegisterTools()
Method Detail

getIR

public abstract IR getIR()
Return the governing IR.


A

protected final RegisterOperand A(int regnum)
Create an address register operand for a given physical GPR. To be used in passthrough expressions like
    ... Load.create(INT_LOAD, I(2), A(1), IC(4)) ...
 

Parameters:
regnum - the given GPR register number
Returns:
integer register operand

I

protected final RegisterOperand I(int regnum)
Create an integer register operand for a given physical GPR. To be used in passthrough expressions like
    ... Load.create(INT_LOAD, I(2), A(1), IC(4)) ...
 

Parameters:
regnum - the given GPR register number
Returns:
integer register operand

F

final RegisterOperand F(int regnum)
Create a float register operand for a given physical FPR. To be used in passthrough expressions like
    ... Load.create(FLOAT_LOAD, F(2), A(1), IC(4)) ...
 

Parameters:
regnum - the given DOUBLE register number
Returns:
float register operand

D

final RegisterOperand D(int regnum)
Create a double register operand for a given physical FPR. To be used in passthrough expressions like
    ... Load.create(DOUBLE_LOAD, D(2), A(1), IC(4)) ...
 

Parameters:
regnum - the given double register number
Returns:
double register operand

L

final RegisterOperand L(int regnum)
Create a long register operand for a given GPR number. To be used in passthrough expressions like
    ... Load.create(LONG_LOAD, L(2), A(1), IC(4)) ...
 

Parameters:
regnum - the given GPR register number
Returns:
long register operand

hasPhysicalOperand

static boolean hasPhysicalOperand(Instruction s)
Does instruction s have an operand that contains a physical register?