org.jikesrvm.ia32
Enum RegisterConstants.GPR

java.lang.Object
  extended by java.lang.Enum<RegisterConstants.GPR>
      extended by org.jikesrvm.ia32.RegisterConstants.GPR
All Implemented Interfaces:
Serializable, Comparable<RegisterConstants.GPR>, RegisterConstants.MachineRegister
Enclosing interface:
RegisterConstants

public static enum RegisterConstants.GPR
extends Enum<RegisterConstants.GPR>
implements RegisterConstants.MachineRegister

Representation of general purpose registers


Enum Constant Summary
EAX
           
EBP
           
EBX
           
ECX
           
EDI
           
EDX
           
EIP
           
ESI
           
ESP
           
R10
           
R11
           
R12
           
R13
           
R14
           
R15
           
R8
           
R9
           
 
Field Summary
private static RegisterConstants.GPR[] vals
          Local copy of the backing array.
 
Method Summary
static RegisterConstants.GPR getForOpcode(int opcode)
          Convert encoded value representing an opcode into the GPR to represent it
static RegisterConstants.GPR lookup(int num)
          Convert encoded value into the GPR it represents
 boolean needsREXprefix()
           
 byte value()
           
 byte valueForOpcode()
           
static RegisterConstants.GPR valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RegisterConstants.GPR[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EAX

public static final RegisterConstants.GPR EAX

ECX

public static final RegisterConstants.GPR ECX

EDX

public static final RegisterConstants.GPR EDX

EBX

public static final RegisterConstants.GPR EBX

ESP

public static final RegisterConstants.GPR ESP

EBP

public static final RegisterConstants.GPR EBP

ESI

public static final RegisterConstants.GPR ESI

EDI

public static final RegisterConstants.GPR EDI

R8

public static final RegisterConstants.GPR R8

R9

public static final RegisterConstants.GPR R9

R10

public static final RegisterConstants.GPR R10

R11

public static final RegisterConstants.GPR R11

R12

public static final RegisterConstants.GPR R12

R13

public static final RegisterConstants.GPR R13

R14

public static final RegisterConstants.GPR R14

R15

public static final RegisterConstants.GPR R15

EIP

public static final RegisterConstants.GPR EIP
Field Detail

vals

private static final RegisterConstants.GPR[] vals
Local copy of the backing array. Copied here to avoid calls to clone

Method Detail

values

public static RegisterConstants.GPR[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RegisterConstants.GPR c : RegisterConstants.GPR.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RegisterConstants.GPR valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

value

public byte value()
Specified by:
value in interface RegisterConstants.MachineRegister
Returns:
encoded value of this register

valueForOpcode

public byte valueForOpcode()
Returns:
encoded value of this register to be included in the opcode byte

needsREXprefix

public boolean needsREXprefix()
Specified by:
needsREXprefix in interface RegisterConstants.MachineRegister
Returns:
does this register require a REX prefix byte?

lookup

public static RegisterConstants.GPR lookup(int num)
Convert encoded value into the GPR it represents

Parameters:
num - encoded value
Returns:
represented GPR

getForOpcode

public static RegisterConstants.GPR getForOpcode(int opcode)
Convert encoded value representing an opcode into the GPR to represent it

Parameters:
opcode - encoded value
Returns:
represented GPR