public class SPARCAddress extends AbstractAddress
| Modifier and Type | Field and Description |
|---|---|
private Register |
base |
private int |
displacement |
private Register |
index |
| Constructor and Description |
|---|
SPARCAddress(Register base,
int displacement)
Creates an
SPARCAddress with given base register, no scaling and a given
displacement. |
SPARCAddress(Register base,
Register index)
Creates an
SPARCAddress with given base register, no scaling and a given index. |
| Modifier and Type | Method and Description |
|---|---|
Register |
getBase() |
int |
getDisplacement()
|
Register |
getIndex() |
boolean |
hasIndex() |
String |
toString() |
private final int displacement
public SPARCAddress(Register base, int displacement)
SPARCAddress with given base register, no scaling and a given
displacement.base - the base registerdisplacement - the displacementpublic SPARCAddress(Register base, Register index)
SPARCAddress with given base register, no scaling and a given index.base - the base registerindex - the index registerpublic Register getBase()
Register.None.public Register getIndex()
getBase(). If not present, is
denoted by Register.None.public boolean hasIndex()
public int getDisplacement()
SPARC.sp or SPARC.fp.