public final class MemoryOperand extends Operand
May contain 0, 1, or 2 RegisterOperands as well as a scale factor and displacement.
The effective address represented by this operand is:
[base] + [index]*(2^scale) + disp
Operand
Modifier and Type | Field and Description |
---|---|
RegisterOperand |
base
The base register (may be
null ) |
Offset |
disp
The displacement
|
Operand |
guard
The guard operand that validates this memory access
|
RegisterOperand |
index
The index register (may be
null ) |
LocationOperand |
loc
The location operand describing this memory access
|
byte |
scale
The scale value (log power of 2)
valid values are 0,1,2,3
|
byte |
size
Number of bytes being accessed (1,2,4,8)
|
instruction
Constructor and Description |
---|
MemoryOperand(RegisterOperand base,
RegisterOperand index,
byte scale,
Offset disp,
byte size,
LocationOperand loc,
Operand guard) |
Modifier and Type | Method and Description |
---|---|
static MemoryOperand |
B(RegisterOperand base,
byte size,
LocationOperand loc,
Operand guard) |
static MemoryOperand |
BD(RegisterOperand base,
Offset disp,
byte size,
LocationOperand loc,
Operand guard) |
static MemoryOperand |
BI(RegisterOperand base,
RegisterOperand index,
byte size,
LocationOperand loc,
Operand guard) |
static MemoryOperand |
BID(RegisterOperand base,
RegisterOperand index,
Offset disp,
byte size,
LocationOperand loc,
Operand guard) |
static MemoryOperand |
BIS(RegisterOperand base,
RegisterOperand index,
byte scale,
byte size,
LocationOperand loc,
Operand guard) |
Operand |
copy()
Return a new operand that is semantically equivalent to
this . |
static MemoryOperand |
D(Address disp,
byte size,
LocationOperand loc,
Operand guard) |
static MemoryOperand |
I(RegisterOperand base,
byte size,
LocationOperand loc,
Operand guard) |
boolean |
similar(Operand op)
Are two operands semantically equivalent?
|
String |
toString()
Return a string rep of the operand (ie the effective address)
|
asAddressConstant, asBlock, asBranch, asClassConstant, asCondition, asDoubleConstant, asFloatConstant, asIntConstant, asLocation, asLongConstant, asMemory, asMethod, asNullConstant, asObjectConstant, asRegister, asStackLocation, asStringConstant, asTIBConstant, asType, conservativelyApproximates, getIndexInInstruction, getType, isAddress, isAddressConstant, isBlock, isBranch, isClassConstant, isConstant, isDefinitelyNull, isDouble, isDoubleConstant, isFloat, isFloatConstant, isInt, isIntConstant, isIntLike, isLocation, isLong, isLongConstant, isMemory, isMethod, isMovableObjectConstant, isNullConstant, isObjectConstant, isRef, isRegister, isStackLocation, isStringConstant, isTIBConstant, isTrueGuard, isType, meet
public LocationOperand loc
public RegisterOperand base
null
)public RegisterOperand index
null
)public byte scale
public byte size
public MemoryOperand(RegisterOperand base, RegisterOperand index, byte scale, Offset disp, byte size, LocationOperand loc, Operand guard)
public static MemoryOperand B(RegisterOperand base, byte size, LocationOperand loc, Operand guard)
public static MemoryOperand BI(RegisterOperand base, RegisterOperand index, byte size, LocationOperand loc, Operand guard)
public static MemoryOperand BD(RegisterOperand base, Offset disp, byte size, LocationOperand loc, Operand guard)
public static MemoryOperand BID(RegisterOperand base, RegisterOperand index, Offset disp, byte size, LocationOperand loc, Operand guard)
public static MemoryOperand BIS(RegisterOperand base, RegisterOperand index, byte scale, byte size, LocationOperand loc, Operand guard)
public static MemoryOperand D(Address disp, byte size, LocationOperand loc, Operand guard)
public static MemoryOperand I(RegisterOperand base, byte size, LocationOperand loc, Operand guard)
public Operand copy()
Operand
this
.public boolean similar(Operand op)
Operand