|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.ir.operand.Operand org.jikesrvm.compilers.opt.ir.operand.MemoryOperand
public final class MemoryOperand
A memory operand. Used to represent complex addressing modes on CISC machines. A memory operand contains some set of other operands that are used in the address calculation.
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
Field Summary | |
---|---|
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) |
Fields inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand |
---|
instruction |
Constructor Summary | |
---|---|
MemoryOperand(RegisterOperand base,
RegisterOperand index,
byte scale,
Offset disp,
byte size,
LocationOperand loc,
Operand guard)
|
Method Summary | |
---|---|
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) |
Methods inherited from class org.jikesrvm.compilers.opt.ir.operand.Operand |
---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public LocationOperand loc
public Operand guard
public RegisterOperand base
null
)
public RegisterOperand index
null
)
public byte scale
public Offset disp
public byte size
Constructor Detail |
---|
public MemoryOperand(RegisterOperand base, RegisterOperand index, byte scale, Offset disp, byte size, LocationOperand loc, Operand guard)
Method Detail |
---|
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
.
copy
in class Operand
this
public boolean similar(Operand op)
Operand
similar
in class Operand
op
- other operand
true
if this
and op
are semantically equivalent or false
if they are not.public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |