scale.backend
Class DiffDisplacement

java.lang.Object
  |
  +--scale.backend.Displacement
        |
        +--scale.backend.DiffDisplacement

public class DiffDisplacement
extends Displacement

This class represents a displacement field in an instruction that is the difference between two displacements.

$Id: DiffDisplacement.java,v 1.5 2002/01/03 21:41:29 burrill Exp $

Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.


Constructor Summary
DiffDisplacement(Displacement lDisplacement, Displacement rDisplacement)
          Obtain a Displacement which is a difference between two other Displacements.
 
Method Summary
 java.lang.String assembler(Assembler asm)
          Generate a String representation that can be used by the assembly code generater.
protected  void finalize()
          Keep the count of instances up-to-date.
 int getDisplacement()
          Return the displacement.
 boolean isNumeric()
          Return true if the displacement is zero.
 boolean isZero()
          Return true if the displacement is zero.
static int number()
          Return the current number of instances of this class.
 OffsetDisplacement offset(int offset)
          Obtain a Displacement with an offset from this Displacement.
 java.lang.String toString()
           
 Displacement unique()
          Return a unique displacement.
 
Methods inherited from class scale.backend.Displacement
adjust, remap
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiffDisplacement

public DiffDisplacement(Displacement lDisplacement,
                        Displacement rDisplacement)
Obtain a Displacement which is a difference between two other Displacements.
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Keep the count of instances up-to-date.
Overrides:
finalize in class Displacement
Throws:
java.lang.Throwable - [needs description]

number

public static int number()
Return the current number of instances of this class.

unique

public Displacement unique()
Return a unique displacement.
Overrides:
unique in class Displacement
Following copied from class: scale.backend.Displacement
See Also:
SymbolDisplacement

isZero

public boolean isZero()
Return true if the displacement is zero.
Overrides:
isZero in class Displacement

isNumeric

public boolean isNumeric()
Return true if the displacement is zero.
Overrides:
isNumeric in class Displacement

getDisplacement

public int getDisplacement()
Return the displacement.
Overrides:
getDisplacement in class Displacement

offset

public OffsetDisplacement offset(int offset)
Obtain a Displacement with an offset from this Displacement.
Overrides:
offset in class Displacement

assembler

public java.lang.String assembler(Assembler asm)
Generate a String representation that can be used by the assembly code generater.
Overrides:
assembler in class Displacement

toString

public java.lang.String toString()
Overrides:
toString in class Displacement