Dopspublic final class Dops extends Object Standard instances of {@link Dop} and utility methods for getting
them. |
Fields Summary |
---|
private static final Dop[] | DOPSnon-null; array containing all the standard instances | public static final Dop | SPECIAL_FORMATpseudo-opcode used for nonstandard formatted "instructions"
(which are mostly not actually instructions, though they do
appear in instruction lists) | public static final Dop | NOP | public static final Dop | MOVE | public static final Dop | MOVE_FROM16 | public static final Dop | MOVE_16 | public static final Dop | MOVE_WIDE | public static final Dop | MOVE_WIDE_FROM16 | public static final Dop | MOVE_WIDE_16 | public static final Dop | MOVE_OBJECT | public static final Dop | MOVE_OBJECT_FROM16 | public static final Dop | MOVE_OBJECT_16 | public static final Dop | MOVE_RESULT | public static final Dop | MOVE_RESULT_WIDE | public static final Dop | MOVE_RESULT_OBJECT | public static final Dop | MOVE_EXCEPTION | public static final Dop | RETURN_VOID | public static final Dop | RETURN | public static final Dop | RETURN_WIDE | public static final Dop | RETURN_OBJECT | public static final Dop | CONST_4 | public static final Dop | CONST_16 | public static final Dop | CONST | public static final Dop | CONST_HIGH16 | public static final Dop | CONST_WIDE_16 | public static final Dop | CONST_WIDE_32 | public static final Dop | CONST_WIDE | public static final Dop | CONST_WIDE_HIGH16 | public static final Dop | CONST_STRING | public static final Dop | CONST_STRING_JUMBO | public static final Dop | CONST_CLASS | public static final Dop | MONITOR_ENTER | public static final Dop | MONITOR_EXIT | public static final Dop | CHECK_CAST | public static final Dop | INSTANCE_OF | public static final Dop | ARRAY_LENGTH | public static final Dop | NEW_INSTANCE | public static final Dop | NEW_ARRAY | public static final Dop | FILLED_NEW_ARRAY | public static final Dop | FILLED_NEW_ARRAY_RANGE | public static final Dop | FILL_ARRAY_DATA | public static final Dop | THROW | public static final Dop | GOTO | public static final Dop | GOTO_16 | public static final Dop | GOTO_32 | public static final Dop | PACKED_SWITCH | public static final Dop | SPARSE_SWITCH | public static final Dop | CMPL_FLOAT | public static final Dop | CMPG_FLOAT | public static final Dop | CMPL_DOUBLE | public static final Dop | CMPG_DOUBLE | public static final Dop | CMP_LONG | public static final Dop | IF_EQ | public static final Dop | IF_NE | public static final Dop | IF_LT | public static final Dop | IF_GE | public static final Dop | IF_GT | public static final Dop | IF_LE | public static final Dop | IF_EQZ | public static final Dop | IF_NEZ | public static final Dop | IF_LTZ | public static final Dop | IF_GEZ | public static final Dop | IF_GTZ | public static final Dop | IF_LEZ | public static final Dop | AGET | public static final Dop | AGET_WIDE | public static final Dop | AGET_OBJECT | public static final Dop | AGET_BOOLEAN | public static final Dop | AGET_BYTE | public static final Dop | AGET_CHAR | public static final Dop | AGET_SHORT | public static final Dop | APUT | public static final Dop | APUT_WIDE | public static final Dop | APUT_OBJECT | public static final Dop | APUT_BOOLEAN | public static final Dop | APUT_BYTE | public static final Dop | APUT_CHAR | public static final Dop | APUT_SHORT | public static final Dop | IGET | public static final Dop | IGET_WIDE | public static final Dop | IGET_OBJECT | public static final Dop | IGET_BOOLEAN | public static final Dop | IGET_BYTE | public static final Dop | IGET_CHAR | public static final Dop | IGET_SHORT | public static final Dop | IPUT | public static final Dop | IPUT_WIDE | public static final Dop | IPUT_OBJECT | public static final Dop | IPUT_BOOLEAN | public static final Dop | IPUT_BYTE | public static final Dop | IPUT_CHAR | public static final Dop | IPUT_SHORT | public static final Dop | SGET | public static final Dop | SGET_WIDE | public static final Dop | SGET_OBJECT | public static final Dop | SGET_BOOLEAN | public static final Dop | SGET_BYTE | public static final Dop | SGET_CHAR | public static final Dop | SGET_SHORT | public static final Dop | SPUT | public static final Dop | SPUT_WIDE | public static final Dop | SPUT_OBJECT | public static final Dop | SPUT_BOOLEAN | public static final Dop | SPUT_BYTE | public static final Dop | SPUT_CHAR | public static final Dop | SPUT_SHORT | public static final Dop | INVOKE_VIRTUAL | public static final Dop | INVOKE_SUPER | public static final Dop | INVOKE_DIRECT | public static final Dop | INVOKE_STATIC | public static final Dop | INVOKE_INTERFACE | public static final Dop | INVOKE_VIRTUAL_RANGE | public static final Dop | INVOKE_SUPER_RANGE | public static final Dop | INVOKE_DIRECT_RANGE | public static final Dop | INVOKE_STATIC_RANGE | public static final Dop | INVOKE_INTERFACE_RANGE | public static final Dop | NEG_INT | public static final Dop | NOT_INT | public static final Dop | NEG_LONG | public static final Dop | NOT_LONG | public static final Dop | NEG_FLOAT | public static final Dop | NEG_DOUBLE | public static final Dop | INT_TO_LONG | public static final Dop | INT_TO_FLOAT | public static final Dop | INT_TO_DOUBLE | public static final Dop | LONG_TO_INT | public static final Dop | LONG_TO_FLOAT | public static final Dop | LONG_TO_DOUBLE | public static final Dop | FLOAT_TO_INT | public static final Dop | FLOAT_TO_LONG | public static final Dop | FLOAT_TO_DOUBLE | public static final Dop | DOUBLE_TO_INT | public static final Dop | DOUBLE_TO_LONG | public static final Dop | DOUBLE_TO_FLOAT | public static final Dop | INT_TO_BYTE | public static final Dop | INT_TO_CHAR | public static final Dop | INT_TO_SHORT | public static final Dop | ADD_INT | public static final Dop | SUB_INT | public static final Dop | MUL_INT | public static final Dop | DIV_INT | public static final Dop | REM_INT | public static final Dop | AND_INT | public static final Dop | OR_INT | public static final Dop | XOR_INT | public static final Dop | SHL_INT | public static final Dop | SHR_INT | public static final Dop | USHR_INT | public static final Dop | ADD_LONG | public static final Dop | SUB_LONG | public static final Dop | MUL_LONG | public static final Dop | DIV_LONG | public static final Dop | REM_LONG | public static final Dop | AND_LONG | public static final Dop | OR_LONG | public static final Dop | XOR_LONG | public static final Dop | SHL_LONG | public static final Dop | SHR_LONG | public static final Dop | USHR_LONG | public static final Dop | ADD_FLOAT | public static final Dop | SUB_FLOAT | public static final Dop | MUL_FLOAT | public static final Dop | DIV_FLOAT | public static final Dop | REM_FLOAT | public static final Dop | ADD_DOUBLE | public static final Dop | SUB_DOUBLE | public static final Dop | MUL_DOUBLE | public static final Dop | DIV_DOUBLE | public static final Dop | REM_DOUBLE | public static final Dop | ADD_INT_2ADDR | public static final Dop | SUB_INT_2ADDR | public static final Dop | MUL_INT_2ADDR | public static final Dop | DIV_INT_2ADDR | public static final Dop | REM_INT_2ADDR | public static final Dop | AND_INT_2ADDR | public static final Dop | OR_INT_2ADDR | public static final Dop | XOR_INT_2ADDR | public static final Dop | SHL_INT_2ADDR | public static final Dop | SHR_INT_2ADDR | public static final Dop | USHR_INT_2ADDR | public static final Dop | ADD_LONG_2ADDR | public static final Dop | SUB_LONG_2ADDR | public static final Dop | MUL_LONG_2ADDR | public static final Dop | DIV_LONG_2ADDR | public static final Dop | REM_LONG_2ADDR | public static final Dop | AND_LONG_2ADDR | public static final Dop | OR_LONG_2ADDR | public static final Dop | XOR_LONG_2ADDR | public static final Dop | SHL_LONG_2ADDR | public static final Dop | SHR_LONG_2ADDR | public static final Dop | USHR_LONG_2ADDR | public static final Dop | ADD_FLOAT_2ADDR | public static final Dop | SUB_FLOAT_2ADDR | public static final Dop | MUL_FLOAT_2ADDR | public static final Dop | DIV_FLOAT_2ADDR | public static final Dop | REM_FLOAT_2ADDR | public static final Dop | ADD_DOUBLE_2ADDR | public static final Dop | SUB_DOUBLE_2ADDR | public static final Dop | MUL_DOUBLE_2ADDR | public static final Dop | DIV_DOUBLE_2ADDR | public static final Dop | REM_DOUBLE_2ADDR | public static final Dop | ADD_INT_LIT16 | public static final Dop | RSUB_INT | public static final Dop | MUL_INT_LIT16 | public static final Dop | DIV_INT_LIT16 | public static final Dop | REM_INT_LIT16 | public static final Dop | AND_INT_LIT16 | public static final Dop | OR_INT_LIT16 | public static final Dop | XOR_INT_LIT16 | public static final Dop | ADD_INT_LIT8 | public static final Dop | RSUB_INT_LIT8 | public static final Dop | MUL_INT_LIT8 | public static final Dop | DIV_INT_LIT8 | public static final Dop | REM_INT_LIT8 | public static final Dop | AND_INT_LIT8 | public static final Dop | OR_INT_LIT8 | public static final Dop | XOR_INT_LIT8 | public static final Dop | SHL_INT_LIT8 | public static final Dop | SHR_INT_LIT8 | public static final Dop | USHR_INT_LIT8 |
Constructors Summary |
---|
private Dops()This class is uninstantiable.
// END(dops)
// Static initialization.
DOPS = new Dop[DalvOps.MAX_VALUE - DalvOps.MIN_VALUE + 1];
set(SPECIAL_FORMAT);
// BEGIN(dops-init); GENERATED AUTOMATICALLY BY opcode-gen
set(NOP);
set(MOVE);
set(MOVE_FROM16);
set(MOVE_16);
set(MOVE_WIDE);
set(MOVE_WIDE_FROM16);
set(MOVE_WIDE_16);
set(MOVE_OBJECT);
set(MOVE_OBJECT_FROM16);
set(MOVE_OBJECT_16);
set(MOVE_RESULT);
set(MOVE_RESULT_WIDE);
set(MOVE_RESULT_OBJECT);
set(MOVE_EXCEPTION);
set(RETURN_VOID);
set(RETURN);
set(RETURN_WIDE);
set(RETURN_OBJECT);
set(CONST_4);
set(CONST_16);
set(CONST);
set(CONST_HIGH16);
set(CONST_WIDE_16);
set(CONST_WIDE_32);
set(CONST_WIDE);
set(CONST_WIDE_HIGH16);
set(CONST_STRING);
set(CONST_STRING_JUMBO);
set(CONST_CLASS);
set(MONITOR_ENTER);
set(MONITOR_EXIT);
set(CHECK_CAST);
set(INSTANCE_OF);
set(ARRAY_LENGTH);
set(NEW_INSTANCE);
set(NEW_ARRAY);
set(FILLED_NEW_ARRAY);
set(FILLED_NEW_ARRAY_RANGE);
set(FILL_ARRAY_DATA);
set(THROW);
set(GOTO);
set(GOTO_16);
set(GOTO_32);
set(PACKED_SWITCH);
set(SPARSE_SWITCH);
set(CMPL_FLOAT);
set(CMPG_FLOAT);
set(CMPL_DOUBLE);
set(CMPG_DOUBLE);
set(CMP_LONG);
set(IF_EQ);
set(IF_NE);
set(IF_LT);
set(IF_GE);
set(IF_GT);
set(IF_LE);
set(IF_EQZ);
set(IF_NEZ);
set(IF_LTZ);
set(IF_GEZ);
set(IF_GTZ);
set(IF_LEZ);
set(AGET);
set(AGET_WIDE);
set(AGET_OBJECT);
set(AGET_BOOLEAN);
set(AGET_BYTE);
set(AGET_CHAR);
set(AGET_SHORT);
set(APUT);
set(APUT_WIDE);
set(APUT_OBJECT);
set(APUT_BOOLEAN);
set(APUT_BYTE);
set(APUT_CHAR);
set(APUT_SHORT);
set(IGET);
set(IGET_WIDE);
set(IGET_OBJECT);
set(IGET_BOOLEAN);
set(IGET_BYTE);
set(IGET_CHAR);
set(IGET_SHORT);
set(IPUT);
set(IPUT_WIDE);
set(IPUT_OBJECT);
set(IPUT_BOOLEAN);
set(IPUT_BYTE);
set(IPUT_CHAR);
set(IPUT_SHORT);
set(SGET);
set(SGET_WIDE);
set(SGET_OBJECT);
set(SGET_BOOLEAN);
set(SGET_BYTE);
set(SGET_CHAR);
set(SGET_SHORT);
set(SPUT);
set(SPUT_WIDE);
set(SPUT_OBJECT);
set(SPUT_BOOLEAN);
set(SPUT_BYTE);
set(SPUT_CHAR);
set(SPUT_SHORT);
set(INVOKE_VIRTUAL);
set(INVOKE_SUPER);
set(INVOKE_DIRECT);
set(INVOKE_STATIC);
set(INVOKE_INTERFACE);
set(INVOKE_VIRTUAL_RANGE);
set(INVOKE_SUPER_RANGE);
set(INVOKE_DIRECT_RANGE);
set(INVOKE_STATIC_RANGE);
set(INVOKE_INTERFACE_RANGE);
set(NEG_INT);
set(NOT_INT);
set(NEG_LONG);
set(NOT_LONG);
set(NEG_FLOAT);
set(NEG_DOUBLE);
set(INT_TO_LONG);
set(INT_TO_FLOAT);
set(INT_TO_DOUBLE);
set(LONG_TO_INT);
set(LONG_TO_FLOAT);
set(LONG_TO_DOUBLE);
set(FLOAT_TO_INT);
set(FLOAT_TO_LONG);
set(FLOAT_TO_DOUBLE);
set(DOUBLE_TO_INT);
set(DOUBLE_TO_LONG);
set(DOUBLE_TO_FLOAT);
set(INT_TO_BYTE);
set(INT_TO_CHAR);
set(INT_TO_SHORT);
set(ADD_INT);
set(SUB_INT);
set(MUL_INT);
set(DIV_INT);
set(REM_INT);
set(AND_INT);
set(OR_INT);
set(XOR_INT);
set(SHL_INT);
set(SHR_INT);
set(USHR_INT);
set(ADD_LONG);
set(SUB_LONG);
set(MUL_LONG);
set(DIV_LONG);
set(REM_LONG);
set(AND_LONG);
set(OR_LONG);
set(XOR_LONG);
set(SHL_LONG);
set(SHR_LONG);
set(USHR_LONG);
set(ADD_FLOAT);
set(SUB_FLOAT);
set(MUL_FLOAT);
set(DIV_FLOAT);
set(REM_FLOAT);
set(ADD_DOUBLE);
set(SUB_DOUBLE);
set(MUL_DOUBLE);
set(DIV_DOUBLE);
set(REM_DOUBLE);
set(ADD_INT_2ADDR);
set(SUB_INT_2ADDR);
set(MUL_INT_2ADDR);
set(DIV_INT_2ADDR);
set(REM_INT_2ADDR);
set(AND_INT_2ADDR);
set(OR_INT_2ADDR);
set(XOR_INT_2ADDR);
set(SHL_INT_2ADDR);
set(SHR_INT_2ADDR);
set(USHR_INT_2ADDR);
set(ADD_LONG_2ADDR);
set(SUB_LONG_2ADDR);
set(MUL_LONG_2ADDR);
set(DIV_LONG_2ADDR);
set(REM_LONG_2ADDR);
set(AND_LONG_2ADDR);
set(OR_LONG_2ADDR);
set(XOR_LONG_2ADDR);
set(SHL_LONG_2ADDR);
set(SHR_LONG_2ADDR);
set(USHR_LONG_2ADDR);
set(ADD_FLOAT_2ADDR);
set(SUB_FLOAT_2ADDR);
set(MUL_FLOAT_2ADDR);
set(DIV_FLOAT_2ADDR);
set(REM_FLOAT_2ADDR);
set(ADD_DOUBLE_2ADDR);
set(SUB_DOUBLE_2ADDR);
set(MUL_DOUBLE_2ADDR);
set(DIV_DOUBLE_2ADDR);
set(REM_DOUBLE_2ADDR);
set(ADD_INT_LIT16);
set(RSUB_INT);
set(MUL_INT_LIT16);
set(DIV_INT_LIT16);
set(REM_INT_LIT16);
set(AND_INT_LIT16);
set(OR_INT_LIT16);
set(XOR_INT_LIT16);
set(ADD_INT_LIT8);
set(RSUB_INT_LIT8);
set(MUL_INT_LIT8);
set(DIV_INT_LIT8);
set(REM_INT_LIT8);
set(AND_INT_LIT8);
set(OR_INT_LIT8);
set(XOR_INT_LIT8);
set(SHL_INT_LIT8);
set(SHR_INT_LIT8);
set(USHR_INT_LIT8);
// END(dops-init)
// This space intentionally left blank.
|
Methods Summary |
---|
public static Dop | get(int opcode)Gets the {@link Dop} for the given opcode value.
int idx = opcode - DalvOps.MIN_VALUE;
try {
Dop result = DOPS[idx];
if (result != null) {
return result;
}
} catch (ArrayIndexOutOfBoundsException ex) {
// Fall through.
}
throw new IllegalArgumentException("bogus opcode");
| public static Dop | getOrNull(int family, InsnFormat format)Gets the {@link Dop} with the given family/format combination, if
any.
if (format == null) {
throw new NullPointerException("format == null");
}
int len = DOPS.length;
// TODO: Linear search is bad.
for (int i = 0; i < len; i++) {
Dop dop = DOPS[i];
if ((dop != null) &&
(dop.getFamily() == family) &&
(dop.getFormat() == format)) {
return dop;
}
}
return null;
| private static void | set(Dop opcode)Puts the given opcode into the table of all ops.
int idx = opcode.getOpcode() - DalvOps.MIN_VALUE;
DOPS[idx] = opcode;
|
|