Package iota

Class NRegister

java.lang.Object
iota.NRegister
Direct Known Subclasses:
NPhysicalRegister, NVirtualRegister

abstract class NRegister extends Object
Abstract representation of a register.
  • Field Details

    • number

      public int number
      Register number.
    • name

      public String name
      Register name.
  • Constructor Details

    • NRegister

      protected NRegister(int number, String name)
      Constructs an NRegister object.
      Parameters:
      number - register number.
      name - register name.
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this register.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this register.
    • toPhysicalRegister

      public static NPhysicalRegister toPhysicalRegister(NRegister reg)
      Returns the physical reg associated with the given reg.
      Parameters:
      reg - the reg.
      Returns:
      the physical reg associated with the given reg.