|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmars.assembler.DataTypes
public final class DataTypes
Information about MIPS data types.
Field Summary | |
---|---|
static int |
BYTE_SIZE
Number of bytes occupied by MIPS byte is 1. |
static int |
CHAR_SIZE
Number of bytes occupied by MIPS character is 1. |
static int |
DOUBLE_SIZE
Number of bytes occupied by MIPS double is 8. |
static int |
FLOAT_SIZE
Number of bytes occupied by MIPS float is 4. |
static int |
HALF_SIZE
Number of bytes occupied by MIPS halfword is 2. |
static double |
LOW_DOUBLE_VALUE
Largest magnitude negative value that can be stored in a MIPS double(negative of the max) |
static double |
LOW_FLOAT_VALUE
Largest magnitude negative value that can be stored in a MIPS float (negative of the max) |
static int |
MAX_BYTE_VALUE
Maximum value that can be stored in a MIPS byte is 27-1 |
static double |
MAX_DOUBLE_VALUE
Maximum positive finite value that can be stored in a MIPS double is same as Java Double |
static double |
MAX_FLOAT_VALUE
Maximum positive finite value that can be stored in a MIPS float is same as Java Float |
static int |
MAX_HALF_VALUE
Maximum value that can be stored in a MIPS halfword is 215-1 |
static int |
MAX_UHALF_VALUE
Maximum value that can be stored in an unsigned MIPS halfword is 216-1 |
static int |
MAX_WORD_VALUE
Maximum value that can be stored in a MIPS word is 231-1 |
static int |
MIN_BYTE_VALUE
Lowest value that can be stored in a MIPS byte is -27 |
static int |
MIN_HALF_VALUE
Lowest value that can be stored in a MIPS halfword is -215 |
static int |
MIN_UHALF_VALUE
Lowest value that can be stored in na unsigned MIPS halfword is 0 |
static int |
MIN_WORD_VALUE
Lowest value that can be stored in a MIPS word is -231 |
static int |
WORD_SIZE
Number of bytes occupied by MIPS word is 4. |
Constructor Summary | |
---|---|
DataTypes()
|
Method Summary | |
---|---|
static int |
getLengthInBytes(Directives direct)
Get length in bytes for numeric MIPS directives. |
static boolean |
outOfRange(Directives direct,
double value)
Determines whether given floating point value falls within value range for given directive. |
static boolean |
outOfRange(Directives direct,
int value)
Determines whether given integer value falls within value range for given directive. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DOUBLE_SIZE
public static final int FLOAT_SIZE
public static final int WORD_SIZE
public static final int HALF_SIZE
public static final int BYTE_SIZE
public static final int CHAR_SIZE
public static final int MAX_WORD_VALUE
public static final int MIN_WORD_VALUE
public static final int MAX_HALF_VALUE
public static final int MIN_HALF_VALUE
public static final int MAX_UHALF_VALUE
public static final int MIN_UHALF_VALUE
public static final int MAX_BYTE_VALUE
public static final int MIN_BYTE_VALUE
public static final double MAX_FLOAT_VALUE
public static final double LOW_FLOAT_VALUE
public static final double MAX_DOUBLE_VALUE
public static final double LOW_DOUBLE_VALUE
Constructor Detail |
---|
public DataTypes()
Method Detail |
---|
public static int getLengthInBytes(Directives direct)
direct
- Directive to be measured.
public static boolean outOfRange(Directives direct, int value)
direct
- Directive that controls storage allocation for value.value
- The value to be stored.
public static boolean outOfRange(Directives direct, double value)
direct
- Directive that controls storage allocation for value.value
- The value to be stored.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |