public class ILOCOperand extends Object implements Cloneable
ILOCOperand
objects yourself; rather, you could call one of
the factory methods ("newX()
").Modifier and Type | Class and Description |
---|---|
static class |
ILOCOperand.Type |
Modifier and Type | Field and Description |
---|---|
int |
id
Unique ID (for virtual register and jump label operands)
|
int |
intConstant
Integer constant (for int constant operands)
|
static ILOCOperand |
INVALID
Invalid operand tag
|
static ILOCOperand |
REG_BP
Base pointer register (ebp/rbp on x86)
|
static ILOCOperand |
REG_RET
Function return value register (eax/rax on x86)
|
static ILOCOperand |
REG_SP
Base pointer register (ebp/rbp on x86)
|
String |
strConstant
String constant (for call label and string constant operands)
|
ILOCOperand.Type |
type
Operand type
|
static ILOCOperand |
ZERO
Special constant (zero)
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of this
ILOCOperand object. |
boolean |
equals(Object o)
Ensure that two operands are considered "equal" if their string-based
representations are identical.
|
int |
hashCode()
Ensure that operands can be stored in hash sets and maps properly.
|
static ILOCOperand |
newAnonymousLabel()
Allocate and return a new anonymous jump label
|
static ILOCOperand |
newCallLabel(String name)
Return an operand for the given call target
|
static ILOCOperand |
newIntConstant(int value)
Return an operand for the given integer literal
|
static ILOCOperand |
newStrConstant(String value)
Return an operand for the given string literal
|
static ILOCOperand |
newVirtualReg()
Allocate and return a new virtual register reference
|
String |
toString()
Builds a string representing the operand
|
public ILOCOperand.Type type
public int id
public String strConstant
public int intConstant
public static final ILOCOperand REG_SP
public static final ILOCOperand REG_BP
public static final ILOCOperand REG_RET
public static final ILOCOperand ZERO
public static final ILOCOperand INVALID
public static ILOCOperand newVirtualReg()
public static ILOCOperand newAnonymousLabel()
public static ILOCOperand newCallLabel(String name)
name
- Target function namepublic static ILOCOperand newIntConstant(int value)
value
- Integer literalpublic static ILOCOperand newStrConstant(String value)
value
- String literalpublic Object clone() throws CloneNotSupportedException
ILOCOperand
object.clone
in class Object
CloneNotSupportedException
public boolean equals(Object o)
public int hashCode()
Copyright © 2019. All rights reserved.