org.jikesrvm.compilers.opt.ir
Class GenericPhysicalRegisterSet

java.lang.Object
  extended by org.jikesrvm.compilers.opt.ir.GenericPhysicalRegisterSet
All Implemented Interfaces:
BitSetMapping
Direct Known Subclasses:
PhysicalRegisterSet

public abstract class GenericPhysicalRegisterSet
extends Object
implements BitSetMapping

This class represents a set of Registers corresponding to the physical register set. This class holds the architecture-independent functionality

Implementation Note: Each register has an integer field Register.number. This class must number the physical registers so that get(n) returns an Register r with r.number = n!


Constructor Summary
GenericPhysicalRegisterSet()
           
 
Method Summary
abstract  Enumeration<Register> enumerateAll()
          Enumerate all the physical registers in this set.
abstract  Enumeration<Register> enumerateGPRs()
          Enumerate all the GPRs in this set.
abstract  Enumeration<Register> enumerateNonvolatileFPRs()
          Enumerate all the nonvolatile FPRs in this set.
 Enumeration<Register> enumerateNonvolatileFPRsBackwards()
          Enumerate all the nonvolatile FPRs in this set, backwards.
abstract  Enumeration<Register> enumerateNonvolatileGPRs()
          Enumerate all the nonvolatile GPRs in this set.
 Enumeration<Register> enumerateNonvolatileGPRsBackwards()
          Enumerate all the nonvolatile GPRs in this set, backwards
abstract  Enumeration<Register> enumerateVolatileFPRs()
          Enumerate all the volatile FPRs in this set.
abstract  Enumeration<Register> enumerateVolatileGPRs()
          Enumerate all the volatile GPRs in this set.
abstract  Enumeration<Register> enumerateVolatiles()
          Enumerate all the volatile physical registers
abstract  Register get(int n)
           
abstract  Register getFirstReturnGPR()
           
abstract  Register getFP()
           
abstract  Register getFPR(int n)
           
abstract  Register getGPR(int n)
           
 int getMappedIndex(Object o)
          Return the number of a given object.
 Object getMappedObject(int n)
          Return the object numbered n.
 int getMappingSize()
          Return the size of the domain of the bijection.
abstract  int getNumberOfPhysicalRegisters()
          Return the total number of physical registers.
abstract  Register getTR()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericPhysicalRegisterSet

public GenericPhysicalRegisterSet()
Method Detail

getNumberOfPhysicalRegisters

public abstract int getNumberOfPhysicalRegisters()
Return the total number of physical registers.


getFP

public abstract Register getFP()
Returns:
the FP register

getTR

public abstract Register getTR()
Returns:
the thread register

getGPR

public abstract Register getGPR(int n)
Returns:
the nth physical GPR

getFirstReturnGPR

public abstract Register getFirstReturnGPR()
Returns:
the first GPR return

getFPR

public abstract Register getFPR(int n)
Returns:
the nth physical FPR

get

public abstract Register get(int n)
Returns:
the nth physical register in the pool.

enumerateAll

public abstract Enumeration<Register> enumerateAll()
Enumerate all the physical registers in this set.


enumerateGPRs

public abstract Enumeration<Register> enumerateGPRs()
Enumerate all the GPRs in this set.


enumerateVolatileGPRs

public abstract Enumeration<Register> enumerateVolatileGPRs()
Enumerate all the volatile GPRs in this set.


enumerateNonvolatileGPRs

public abstract Enumeration<Register> enumerateNonvolatileGPRs()
Enumerate all the nonvolatile GPRs in this set.


enumerateVolatileFPRs

public abstract Enumeration<Register> enumerateVolatileFPRs()
Enumerate all the volatile FPRs in this set.


enumerateNonvolatileFPRs

public abstract Enumeration<Register> enumerateNonvolatileFPRs()
Enumerate all the nonvolatile FPRs in this set.


enumerateVolatiles

public abstract Enumeration<Register> enumerateVolatiles()
Enumerate all the volatile physical registers


enumerateNonvolatileGPRsBackwards

public Enumeration<Register> enumerateNonvolatileGPRsBackwards()
Enumerate all the nonvolatile GPRs in this set, backwards


enumerateNonvolatileFPRsBackwards

public Enumeration<Register> enumerateNonvolatileFPRsBackwards()
Enumerate all the nonvolatile FPRs in this set, backwards.


getMappedObject

public final Object getMappedObject(int n)
Description copied from interface: BitSetMapping
Return the object numbered n.

Specified by:
getMappedObject in interface BitSetMapping

getMappedIndex

public final int getMappedIndex(Object o)
Description copied from interface: BitSetMapping
Return the number of a given object.

Specified by:
getMappedIndex in interface BitSetMapping

getMappingSize

public final int getMappingSize()
Description copied from interface: BitSetMapping
Return the size of the domain of the bijection.

Specified by:
getMappingSize in interface BitSetMapping