|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.Quads.Qop
public abstract class Qop
Qop
is an enumerated type for the various kinds of
OPER
opcodes. The basic rationale is to use a
minimal set of opcodes to simplify later analysis.
Note that (x - y) is uniformly expressed as (x + (-y)), and that (~x) is typically expressed (compiler-dependent) as (x ^ (-1)). There is also a minimal set of comparison operations; all other comparisons can be synthesized from the ones present. Note that floating-point (float/double) comparisons have special behaviors when NaN is an operand. Note also that one each of IAND/IOR and LAND/LOR could be removed, but the translation involved too many steps to be deemed worthwhile.
Field Summary | |
---|---|
static int |
ACMPEQ
Compares references for equality. |
static int |
D2F
Converts a double to a float. |
static int |
D2I
Converts a double to an int. |
static int |
D2L
Converts a double to a long. |
static int |
DADD
Computes the sum of two double values. |
static int |
DCMPEQ
Evaluates to true if double values are equal and neither is NaN, or false otherwise. |
static int |
DCMPGE
Evaluates to true if first double value is greater than or equal to the second double value and neither is NaN, or false otherwise. |
static int |
DCMPGT
Evaluates to true if first double value is greater than the second double value and neither is NaN, or false otherwise. |
static int |
DDIV
Computes the quotient of two double values. |
static int |
DMUL
Computes the product of two double values. |
static int |
DNEG
Computes the negation of a double value. |
static int |
DREM
Computes the remainder of two double values. |
static int |
F2D
Converts a float to a double. |
static int |
F2I
Converts a float to an int. |
static int |
F2L
Converts a float to a long. |
static int |
FADD
Computes the sum of two float values. |
static int |
FCMPEQ
Evaluates to true if the float values are equal and neither is NaN, or false otherwise. |
static int |
FCMPGE
Evaluates to true if the first float value is greater than or equal to the second float value and neither is NaN, or false otherwise. |
static int |
FCMPGT
Evaluates to true if the first float value is greater than the second float value and neither is NaN, or false otherwise. |
static int |
FDIV
Computes the quotient of two float values. |
static int |
FMUL
Computes the product of two float values. |
static int |
FNEG
Computes the negation of a float value. |
static int |
FREM
Computes the remainder of two float values. |
static int |
I2B
Converts an int to a byte. |
static int |
I2C
Converts an int to a character. |
static int |
I2D
Converts an int to a double. |
static int |
I2F
Converts an int to a float. |
static int |
I2L
Converts an int to a long. |
static int |
I2S
Converts an int to a short. |
static int |
IADD
Computes the sum of two int values. |
static int |
IAND
Computes the binary-AND of two int values. |
static int |
ICMPEQ
Evaluates to true if the two int values are equal, or false otherwise. |
static int |
ICMPGT
Evalutates to true if the first int value is greater than the second int value, or false otherwise. |
static int |
IDIV
Computes the int quotient of two int values. |
static int |
IMUL
Computes the product of two int values. |
static int |
INEG
Computes the negation of an int value. |
static int |
IOR
Computes the binary-OR of two int values. |
static int |
IREM
Computes the remainder of two int values. |
static int |
ISHL
Computes the value of the first int value shifted left by the number of bits specified in the low five bits of the second int value. |
static int |
ISHR
Computes the value of the first int value shifted right with sign extension by the number of bits specified in the low five bits of the second int value. |
static int |
IUSHR
Computes the value of the first int value shifted right without sign extension by the number of bits specified in the low five bits of the second int value. |
static int |
IXOR
Computes the binary-XOR of two int values. |
static int |
L2D
Converts a long to a double. |
static int |
L2F
Converts a long to a float. |
static int |
L2I
Converts a long to an int. |
static int |
LADD
Computes the sum of two long values. |
static int |
LAND
Computes the binary-AND of two long values. |
static int |
LCMPEQ
Evaluates to true if the two long values are equal, or false otherwise. |
static int |
LCMPGT
Evaluates to true if the first long value is greater than the second, or false otherwise. |
static int |
LDIV
Computes the quotient of two long values. |
static int |
LMUL
Computes the product of two long values. |
static int |
LNEG
Computes the negation of a long value. |
static int |
LOR
Computes the binary-OR of two long values. |
static int |
LREM
Computes the remainder of two long values. |
static int |
LSHL
Computes the value of the first long value shifted left by the number of bits specified in the low six bits of the second int value. |
static int |
LSHR
Computes the value of the first long value shifted right with sign extension by the number of bits specified in the low six bits of the second int value. |
static int |
LUSHR
Computes the value of the first long value shifted right without sign extension by the number of bits specified in the low six bits of the second int value. |
static int |
LXOR
Computes the binary-XOR of two long values. |
Constructor Summary | |
---|---|
Qop()
|
Method Summary | |
---|---|
static Object |
evaluate(int opc,
Object[] opd)
Evaluates a constant value for the result of an OPER ,
given constant values for the operands. |
static int |
forString(String op)
Returns the enumerated Qop that corresponds to a given
descriptive string. |
static boolean |
isValid(int v)
Determines if a given Qop value is valid. |
static HClass |
resultType(int v)
Determines the result type of an OPER . |
static String |
toString(int v)
Converts the enumerated Qop value to a descriptive
string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACMPEQ
public static final int D2F
public static final int D2I
public static final int D2L
public static final int DADD
public static final int DCMPEQ
public static final int DCMPGE
public static final int DCMPGT
public static final int DDIV
public static final int DMUL
public static final int DNEG
public static final int DREM
public static final int F2D
public static final int F2I
public static final int F2L
public static final int FADD
public static final int FCMPEQ
public static final int FCMPGE
public static final int FCMPGT
public static final int FDIV
public static final int FMUL
public static final int FNEG
public static final int FREM
public static final int I2B
public static final int I2C
public static final int I2D
public static final int I2F
public static final int I2L
public static final int I2S
public static final int IADD
public static final int IAND
public static final int ICMPEQ
public static final int ICMPGT
public static final int IDIV
public static final int IMUL
public static final int INEG
public static final int IOR
public static final int IREM
public static final int ISHL
( 1 << 34 ) == 4
.
Also, (x << -1) == (x << 31)
.
public static final int ISHR
( -4 >> 33 ) == -2
.
Also, (x >> -1) == (x >> 31)
.
public static final int IUSHR
( -4 >>> 30) == 3
.
Also, (x >>> -1) == (x >>> 31)
.
public static final int IXOR
public static final int L2D
public static final int L2F
public static final int L2I
public static final int LADD
public static final int LAND
public static final int LCMPEQ
public static final int LCMPGT
public static final int LDIV
public static final int LMUL
public static final int LNEG
public static final int LOR
public static final int LREM
public static final int LSHL
(1 << 66) == 4
.
Also, (x << -1) == (x << 63)
.
public static final int LSHR
(-4 >> 65) == -2
.
Also, (x >> -1) == (x >> 63)
.
public static final int LUSHR
(-4 >>> 62) == 3
.
Also, (x >>> -1) == (x >>> 63)
.
public static final int LXOR
Constructor Detail |
---|
public Qop()
Method Detail |
---|
public static boolean isValid(int v)
Qop
value is valid.
public static String toString(int v)
Qop
value to a descriptive
string.
public static int forString(String op)
Qop
that corresponds to a given
descriptive string.
public static HClass resultType(int v)
OPER
.
public static Object evaluate(int opc, Object[] opd)
OPER
,
given constant values for the operands.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |