|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.backend.Displacement scale.backend.SymbolDisplacement
public class SymbolDisplacement
This class represents a displacement field in an instruction when the displacement refers to an offset that must be relocated by the loader.
$Id: SymbolDisplacement.java,v 1.25 2007-09-20 18:57:40 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Constructor Summary | |
---|---|
SymbolDisplacement(java.lang.String name,
int handle)
Create a displacement that the loader can relocate. |
|
SymbolDisplacement(java.lang.String name,
int handle,
boolean addressTaken)
|
Method Summary | |
---|---|
boolean |
addressTaken()
Return true if the address of this symbol was taken. |
java.lang.String |
assembler(Assembler asm)
Generate a String representation that can be used by the assembly code generater. |
boolean |
equivalent(java.lang.Object o)
Return true if the displacements are equivalent. |
int |
getHandle()
Return the data area handle associated with the displacement. |
java.lang.String |
getName()
Return the symbolic name. |
int |
getSequence()
Return the relocation sequence number. |
boolean |
isSymbol()
Return true if the displacement is from a symbol. |
static void |
reset()
Reset the relocation information for each generated assembly language file. |
void |
setAddressTaken(boolean addressTaken)
Set that the address of this symbol has been taken. |
java.lang.String |
toString()
|
Displacement |
unique()
Return a unique displacement. |
static int |
used()
Return the relocation sequence number. |
Methods inherited from class scale.backend.Displacement |
---|
adjust, created, getBase, getDisplacement, isNumeric, isStack, isZero, offset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SymbolDisplacement(java.lang.String name, int handle)
name
- is the symbol's namehandle
- is information associated with the displacement for
use by the code generator.public SymbolDisplacement(java.lang.String name, int handle, boolean addressTaken)
Method Detail |
---|
public static int used()
public Displacement unique()
unique
in class Displacement
SymbolDisplacement
public void setAddressTaken(boolean addressTaken)
public boolean addressTaken()
public static void reset()
public int getSequence()
public java.lang.String getName()
public int getHandle()
public boolean isSymbol()
isSymbol
in class Displacement
public java.lang.String assembler(Assembler asm)
assembler
in class Displacement
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equivalent(java.lang.Object o)
equivalent
in class Displacement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |