dioscuri.module.cpu32
Class FpuState

java.lang.Object
  extended by dioscuri.module.cpu32.FpuState
All Implemented Interfaces:
Hibernatable
Direct Known Subclasses:
FpuState64

public abstract class FpuState
extends java.lang.Object
implements Hibernatable

Author:
Bram Lohman, Bart Kiers

Field Summary
 int conditionCode
           
static int FPU_PRECISION_CONTROL_DOUBLE
           
static int FPU_PRECISION_CONTROL_EXTENDED
           
static int FPU_PRECISION_CONTROL_SINGLE
           
static int FPU_ROUNDING_CONTROL_DOWN
           
static int FPU_ROUNDING_CONTROL_EVEN
           
static int FPU_ROUNDING_CONTROL_TRUNCATE
           
static int FPU_ROUNDING_CONTROL_UP
           
static int FPU_TAG_EMPTY
           
static int FPU_TAG_SPECIAL
           
static int FPU_TAG_VALID
           
static int FPU_TAG_ZERO
           
 boolean infinityControl
           
 long lastData
           
 long lastIP
           
 int lastOpcode
           
static int STACK_DEPTH
           
 int top
           
 
Constructor Summary
FpuState()
           
 
Method Summary
abstract  void checkExceptions()
           
abstract  void clearExceptions()
           
 void copyStateInto(FpuState copy)
           
abstract  void dumpState(java.io.DataOutput output)
           
 boolean equals(java.lang.Object another)
           
abstract  boolean getBusy()
           
abstract  int getControl()
           
abstract  boolean getDenormalizedOperand()
           
abstract  boolean getDenormalizedOperandMask()
           
abstract  boolean getErrorSummaryStatus()
           
abstract  boolean getInvalidOperation()
           
abstract  boolean getInvalidOperationMask()
           
abstract  boolean getOverflow()
           
abstract  boolean getOverflowMask()
           
abstract  boolean getPrecision()
           
abstract  int getPrecisionControl()
           
abstract  boolean getPrecisionMask()
           
abstract  int getRoundingControl()
           
abstract  boolean getStackFault()
           
abstract  int getStatus()
           
abstract  int getTag(int index)
           
abstract  int getTagWord()
           
abstract  boolean getUnderflow()
           
abstract  boolean getUnderflowMask()
           
abstract  boolean getZeroDivide()
           
abstract  boolean getZeroDivideMask()
           
 int hashCode()
           
abstract  void init()
           
abstract  void loadState(java.io.DataInput input)
           
abstract  double pop()
           
abstract  void push(double x)
           
abstract  void setAllMasks(boolean value)
           
abstract  void setControl(int w)
           
abstract  void setDenormalizedOperand()
           
abstract  void setDenormalizedOperandMask(boolean value)
           
abstract  void setInvalidOperation()
           
abstract  void setInvalidOperationMask(boolean value)
           
abstract  void setOverflow()
           
abstract  void setOverflowMask(boolean value)
           
abstract  void setPrecision()
           
abstract  void setPrecisionControl(int value)
           
abstract  void setPrecisionMask(boolean value)
           
abstract  void setRoundingControl(int value)
           
abstract  void setST(int index, double value)
           
abstract  void setStackFault()
           
abstract  void setStatus(int w)
           
abstract  void setTagWord(int w)
           
abstract  void setUnderflow()
           
abstract  void setUnderflowMask(boolean value)
           
abstract  void setZeroDivide()
           
abstract  void setZeroDivideMask(boolean value)
           
abstract  double ST(int index)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STACK_DEPTH

public static final int STACK_DEPTH
See Also:
Constant Field Values

FPU_PRECISION_CONTROL_SINGLE

public static final int FPU_PRECISION_CONTROL_SINGLE
See Also:
Constant Field Values

FPU_PRECISION_CONTROL_DOUBLE

public static final int FPU_PRECISION_CONTROL_DOUBLE
See Also:
Constant Field Values

FPU_PRECISION_CONTROL_EXTENDED

public static final int FPU_PRECISION_CONTROL_EXTENDED
See Also:
Constant Field Values

FPU_ROUNDING_CONTROL_EVEN

public static final int FPU_ROUNDING_CONTROL_EVEN
See Also:
Constant Field Values

FPU_ROUNDING_CONTROL_DOWN

public static final int FPU_ROUNDING_CONTROL_DOWN
See Also:
Constant Field Values

FPU_ROUNDING_CONTROL_UP

public static final int FPU_ROUNDING_CONTROL_UP
See Also:
Constant Field Values

FPU_ROUNDING_CONTROL_TRUNCATE

public static final int FPU_ROUNDING_CONTROL_TRUNCATE
See Also:
Constant Field Values

FPU_TAG_VALID

public static final int FPU_TAG_VALID
See Also:
Constant Field Values

FPU_TAG_ZERO

public static final int FPU_TAG_ZERO
See Also:
Constant Field Values

FPU_TAG_SPECIAL

public static final int FPU_TAG_SPECIAL
See Also:
Constant Field Values

FPU_TAG_EMPTY

public static final int FPU_TAG_EMPTY
See Also:
Constant Field Values

conditionCode

public int conditionCode

top

public int top

infinityControl

public boolean infinityControl

lastIP

public long lastIP

lastData

public long lastData

lastOpcode

public int lastOpcode
Constructor Detail

FpuState

public FpuState()
Method Detail

setInvalidOperation

public abstract void setInvalidOperation()

setDenormalizedOperand

public abstract void setDenormalizedOperand()

setZeroDivide

public abstract void setZeroDivide()

setOverflow

public abstract void setOverflow()

setUnderflow

public abstract void setUnderflow()

setPrecision

public abstract void setPrecision()

setStackFault

public abstract void setStackFault()

clearExceptions

public abstract void clearExceptions()

checkExceptions

public abstract void checkExceptions()
                              throws ProcessorException
Throws:
ProcessorException

getInvalidOperation

public abstract boolean getInvalidOperation()
Returns:
-

getDenormalizedOperand

public abstract boolean getDenormalizedOperand()
Returns:
-

getZeroDivide

public abstract boolean getZeroDivide()
Returns:
-

getOverflow

public abstract boolean getOverflow()
Returns:
-

getUnderflow

public abstract boolean getUnderflow()
Returns:
-

getPrecision

public abstract boolean getPrecision()
Returns:
-

getStackFault

public abstract boolean getStackFault()
Returns:
-

getErrorSummaryStatus

public abstract boolean getErrorSummaryStatus()
Returns:
-

getBusy

public abstract boolean getBusy()
Returns:
-

getInvalidOperationMask

public abstract boolean getInvalidOperationMask()
Returns:
-

getDenormalizedOperandMask

public abstract boolean getDenormalizedOperandMask()
Returns:
-

getZeroDivideMask

public abstract boolean getZeroDivideMask()
Returns:
-

getOverflowMask

public abstract boolean getOverflowMask()
Returns:
-

getUnderflowMask

public abstract boolean getUnderflowMask()
Returns:
-

getPrecisionMask

public abstract boolean getPrecisionMask()
Returns:
-

getPrecisionControl

public abstract int getPrecisionControl()
Returns:
-

getRoundingControl

public abstract int getRoundingControl()
Returns:
-

setInvalidOperationMask

public abstract void setInvalidOperationMask(boolean value)
Parameters:
value -

setDenormalizedOperandMask

public abstract void setDenormalizedOperandMask(boolean value)
Parameters:
value -

setZeroDivideMask

public abstract void setZeroDivideMask(boolean value)
Parameters:
value -

setOverflowMask

public abstract void setOverflowMask(boolean value)
Parameters:
value -

setUnderflowMask

public abstract void setUnderflowMask(boolean value)
Parameters:
value -

setPrecisionMask

public abstract void setPrecisionMask(boolean value)
Parameters:
value -

setPrecisionControl

public abstract void setPrecisionControl(int value)
Parameters:
value -

setRoundingControl

public abstract void setRoundingControl(int value)
Parameters:
value -

setAllMasks

public abstract void setAllMasks(boolean value)
Parameters:
value -

init

public abstract void init()

push

public abstract void push(double x)
                   throws ProcessorException
Parameters:
x -
Throws:
ProcessorException

pop

public abstract double pop()
                    throws ProcessorException
Returns:
-
Throws:
ProcessorException

ST

public abstract double ST(int index)
                   throws ProcessorException
Parameters:
index -
Returns:
-
Throws:
ProcessorException

setST

public abstract void setST(int index,
                           double value)
Parameters:
index -
value -

getStatus

public abstract int getStatus()
Returns:
-

setStatus

public abstract void setStatus(int w)
Parameters:
w -

getControl

public abstract int getControl()
Returns:
-

setControl

public abstract void setControl(int w)
Parameters:
w -

getTagWord

public abstract int getTagWord()
Returns:
-

setTagWord

public abstract void setTagWord(int w)
Parameters:
w -

getTag

public abstract int getTag(int index)
Parameters:
index -
Returns:
-

dumpState

public abstract void dumpState(java.io.DataOutput output)
                        throws java.io.IOException
Parameters:
output -
Throws:
java.io.IOException

loadState

public abstract void loadState(java.io.DataInput input)
                        throws java.io.IOException
Parameters:
input -
Throws:
java.io.IOException

copyStateInto

public void copyStateInto(FpuState copy)
Parameters:
copy -

equals

public boolean equals(java.lang.Object another)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object