|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.backend.Displacement
public abstract class Displacement
This class represents a displacement field in an instruction.
$Id: Displacement.java,v 1.22 2007-09-20 18:57:39 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
It is the base class for displacements that are represented symbolicly or as an expression.
Constructor Summary | |
---|---|
Displacement()
|
Method Summary | |
---|---|
void |
adjust(int adjustment)
Adjust the displacement by the specified value. |
abstract java.lang.String |
assembler(Assembler asm)
Generate a String representation that can be used by the assembly code generater. |
static int |
created()
Return the number of instances of this class that were created. |
boolean |
equivalent(java.lang.Object o)
Return true if the displacements are equivalent. |
Displacement |
getBase()
Return the base of the displacement. |
long |
getDisplacement()
Return the displacement. |
boolean |
isNumeric()
Return true if the displacement can be represented as an integer. |
boolean |
isStack()
Return true if the displacement is from the stack pointer. |
boolean |
isSymbol()
Return true if the displacement is from a symbol. |
boolean |
isZero()
Return true if the displacement is zero. |
OffsetDisplacement |
offset(long offset)
Obtain a Displacement with an offset from this Displacement. |
abstract Displacement |
unique()
Return a unique displacement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Displacement()
Method Detail |
---|
public static int created()
public void adjust(int adjustment)
public OffsetDisplacement offset(long offset)
public Displacement getBase()
public long getDisplacement()
public boolean isStack()
public boolean isZero()
public boolean isNumeric()
public boolean isSymbol()
public abstract Displacement unique()
SymbolDisplacement
public abstract java.lang.String assembler(Assembler asm)
public boolean equivalent(java.lang.Object o)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |