FileDocCategorySizeDatePackage
OpcodeInfo.javaAPI DocAndroid 5.1 API44703Thu Mar 12 22:18:30 GMT 2015com.android.dx.io

OpcodeInfo

public final class OpcodeInfo extends Object
Information about each Dalvik opcode.

Fields Summary
private static final Info[]
INFO
non-null; array containing all the information
public static final Info
SPECIAL_FORMAT
pseudo-opcode used for nonstandard formatted "instructions" (which are mostly not actually instructions, though they do appear in instruction lists). TODO: Retire the usage of this constant.
public static final Info
PACKED_SWITCH_PAYLOAD
public static final Info
SPARSE_SWITCH_PAYLOAD
public static final Info
FILL_ARRAY_DATA_PAYLOAD
public static final Info
NOP
public static final Info
MOVE
public static final Info
MOVE_FROM16
public static final Info
MOVE_16
public static final Info
MOVE_WIDE
public static final Info
MOVE_WIDE_FROM16
public static final Info
MOVE_WIDE_16
public static final Info
MOVE_OBJECT
public static final Info
MOVE_OBJECT_FROM16
public static final Info
MOVE_OBJECT_16
public static final Info
MOVE_RESULT
public static final Info
MOVE_RESULT_WIDE
public static final Info
MOVE_RESULT_OBJECT
public static final Info
MOVE_EXCEPTION
public static final Info
RETURN_VOID
public static final Info
RETURN
public static final Info
RETURN_WIDE
public static final Info
RETURN_OBJECT
public static final Info
CONST_4
public static final Info
CONST_16
public static final Info
CONST
public static final Info
CONST_HIGH16
public static final Info
CONST_WIDE_16
public static final Info
CONST_WIDE_32
public static final Info
CONST_WIDE
public static final Info
CONST_WIDE_HIGH16
public static final Info
CONST_STRING
public static final Info
CONST_STRING_JUMBO
public static final Info
CONST_CLASS
public static final Info
MONITOR_ENTER
public static final Info
MONITOR_EXIT
public static final Info
CHECK_CAST
public static final Info
INSTANCE_OF
public static final Info
ARRAY_LENGTH
public static final Info
NEW_INSTANCE
public static final Info
NEW_ARRAY
public static final Info
FILLED_NEW_ARRAY
public static final Info
FILLED_NEW_ARRAY_RANGE
public static final Info
FILL_ARRAY_DATA
public static final Info
THROW
public static final Info
GOTO
public static final Info
GOTO_16
public static final Info
GOTO_32
public static final Info
PACKED_SWITCH
public static final Info
SPARSE_SWITCH
public static final Info
CMPL_FLOAT
public static final Info
CMPG_FLOAT
public static final Info
CMPL_DOUBLE
public static final Info
CMPG_DOUBLE
public static final Info
CMP_LONG
public static final Info
IF_EQ
public static final Info
IF_NE
public static final Info
IF_LT
public static final Info
IF_GE
public static final Info
IF_GT
public static final Info
IF_LE
public static final Info
IF_EQZ
public static final Info
IF_NEZ
public static final Info
IF_LTZ
public static final Info
IF_GEZ
public static final Info
IF_GTZ
public static final Info
IF_LEZ
public static final Info
AGET
public static final Info
AGET_WIDE
public static final Info
AGET_OBJECT
public static final Info
AGET_BOOLEAN
public static final Info
AGET_BYTE
public static final Info
AGET_CHAR
public static final Info
AGET_SHORT
public static final Info
APUT
public static final Info
APUT_WIDE
public static final Info
APUT_OBJECT
public static final Info
APUT_BOOLEAN
public static final Info
APUT_BYTE
public static final Info
APUT_CHAR
public static final Info
APUT_SHORT
public static final Info
IGET
public static final Info
IGET_WIDE
public static final Info
IGET_OBJECT
public static final Info
IGET_BOOLEAN
public static final Info
IGET_BYTE
public static final Info
IGET_CHAR
public static final Info
IGET_SHORT
public static final Info
IPUT
public static final Info
IPUT_WIDE
public static final Info
IPUT_OBJECT
public static final Info
IPUT_BOOLEAN
public static final Info
IPUT_BYTE
public static final Info
IPUT_CHAR
public static final Info
IPUT_SHORT
public static final Info
SGET
public static final Info
SGET_WIDE
public static final Info
SGET_OBJECT
public static final Info
SGET_BOOLEAN
public static final Info
SGET_BYTE
public static final Info
SGET_CHAR
public static final Info
SGET_SHORT
public static final Info
SPUT
public static final Info
SPUT_WIDE
public static final Info
SPUT_OBJECT
public static final Info
SPUT_BOOLEAN
public static final Info
SPUT_BYTE
public static final Info
SPUT_CHAR
public static final Info
SPUT_SHORT
public static final Info
INVOKE_VIRTUAL
public static final Info
INVOKE_SUPER
public static final Info
INVOKE_DIRECT
public static final Info
INVOKE_STATIC
public static final Info
INVOKE_INTERFACE
public static final Info
INVOKE_VIRTUAL_RANGE
public static final Info
INVOKE_SUPER_RANGE
public static final Info
INVOKE_DIRECT_RANGE
public static final Info
INVOKE_STATIC_RANGE
public static final Info
INVOKE_INTERFACE_RANGE
public static final Info
NEG_INT
public static final Info
NOT_INT
public static final Info
NEG_LONG
public static final Info
NOT_LONG
public static final Info
NEG_FLOAT
public static final Info
NEG_DOUBLE
public static final Info
INT_TO_LONG
public static final Info
INT_TO_FLOAT
public static final Info
INT_TO_DOUBLE
public static final Info
LONG_TO_INT
public static final Info
LONG_TO_FLOAT
public static final Info
LONG_TO_DOUBLE
public static final Info
FLOAT_TO_INT
public static final Info
FLOAT_TO_LONG
public static final Info
FLOAT_TO_DOUBLE
public static final Info
DOUBLE_TO_INT
public static final Info
DOUBLE_TO_LONG
public static final Info
DOUBLE_TO_FLOAT
public static final Info
INT_TO_BYTE
public static final Info
INT_TO_CHAR
public static final Info
INT_TO_SHORT
public static final Info
ADD_INT
public static final Info
SUB_INT
public static final Info
MUL_INT
public static final Info
DIV_INT
public static final Info
REM_INT
public static final Info
AND_INT
public static final Info
OR_INT
public static final Info
XOR_INT
public static final Info
SHL_INT
public static final Info
SHR_INT
public static final Info
USHR_INT
public static final Info
ADD_LONG
public static final Info
SUB_LONG
public static final Info
MUL_LONG
public static final Info
DIV_LONG
public static final Info
REM_LONG
public static final Info
AND_LONG
public static final Info
OR_LONG
public static final Info
XOR_LONG
public static final Info
SHL_LONG
public static final Info
SHR_LONG
public static final Info
USHR_LONG
public static final Info
ADD_FLOAT
public static final Info
SUB_FLOAT
public static final Info
MUL_FLOAT
public static final Info
DIV_FLOAT
public static final Info
REM_FLOAT
public static final Info
ADD_DOUBLE
public static final Info
SUB_DOUBLE
public static final Info
MUL_DOUBLE
public static final Info
DIV_DOUBLE
public static final Info
REM_DOUBLE
public static final Info
ADD_INT_2ADDR
public static final Info
SUB_INT_2ADDR
public static final Info
MUL_INT_2ADDR
public static final Info
DIV_INT_2ADDR
public static final Info
REM_INT_2ADDR
public static final Info
AND_INT_2ADDR
public static final Info
OR_INT_2ADDR
public static final Info
XOR_INT_2ADDR
public static final Info
SHL_INT_2ADDR
public static final Info
SHR_INT_2ADDR
public static final Info
USHR_INT_2ADDR
public static final Info
ADD_LONG_2ADDR
public static final Info
SUB_LONG_2ADDR
public static final Info
MUL_LONG_2ADDR
public static final Info
DIV_LONG_2ADDR
public static final Info
REM_LONG_2ADDR
public static final Info
AND_LONG_2ADDR
public static final Info
OR_LONG_2ADDR
public static final Info
XOR_LONG_2ADDR
public static final Info
SHL_LONG_2ADDR
public static final Info
SHR_LONG_2ADDR
public static final Info
USHR_LONG_2ADDR
public static final Info
ADD_FLOAT_2ADDR
public static final Info
SUB_FLOAT_2ADDR
public static final Info
MUL_FLOAT_2ADDR
public static final Info
DIV_FLOAT_2ADDR
public static final Info
REM_FLOAT_2ADDR
public static final Info
ADD_DOUBLE_2ADDR
public static final Info
SUB_DOUBLE_2ADDR
public static final Info
MUL_DOUBLE_2ADDR
public static final Info
DIV_DOUBLE_2ADDR
public static final Info
REM_DOUBLE_2ADDR
public static final Info
ADD_INT_LIT16
public static final Info
RSUB_INT
public static final Info
MUL_INT_LIT16
public static final Info
DIV_INT_LIT16
public static final Info
REM_INT_LIT16
public static final Info
AND_INT_LIT16
public static final Info
OR_INT_LIT16
public static final Info
XOR_INT_LIT16
public static final Info
ADD_INT_LIT8
public static final Info
RSUB_INT_LIT8
public static final Info
MUL_INT_LIT8
public static final Info
DIV_INT_LIT8
public static final Info
REM_INT_LIT8
public static final Info
AND_INT_LIT8
public static final Info
OR_INT_LIT8
public static final Info
XOR_INT_LIT8
public static final Info
SHL_INT_LIT8
public static final Info
SHR_INT_LIT8
public static final Info
USHR_INT_LIT8
Constructors Summary
private OpcodeInfo()
This class is uninstantiable.


    // END(opcode-info-defs)

    // Static initialization.
     
        INFO = new Info[Opcodes.MAX_VALUE - Opcodes.MIN_VALUE + 1];

        // TODO: Stop using this constant.
        set(SPECIAL_FORMAT);

        // TODO: These payload opcodes should be generated by opcode-gen.
        set(PACKED_SWITCH_PAYLOAD);
        set(SPARSE_SWITCH_PAYLOAD);
        set(FILL_ARRAY_DATA_PAYLOAD);

        // BEGIN(opcode-info-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(opcode-info-init)
    
        // This space intentionally left blank.
    
Methods Summary
public static com.android.dx.io.OpcodeInfo$Infoget(int opcode)
Gets the {@link @Info} for the given opcode value.

param
opcode {@code Opcodes.MIN_VALUE..Opcodes.MAX_VALUE;} the opcode value
return
non-null; the associated opcode information instance

        int idx = opcode - Opcodes.MIN_VALUE;

        try {
            Info result = INFO[idx];
            if (result != null) {
                return result;
            }
        } catch (ArrayIndexOutOfBoundsException ex) {
            // Fall through.
        }

        throw new IllegalArgumentException("bogus opcode: "
                + Hex.u2or4(opcode));
    
public static com.android.dx.io.instructions.InstructionCodecgetFormat(int opcode)
Gets the format (an {@link InstructionCodec}) for the given opcode value.

        return get(opcode).getFormat();
    
public static IndexTypegetIndexType(int opcode)
Gets the {@link IndexType} for the given opcode value.

        return get(opcode).getIndexType();
    
public static java.lang.StringgetName(int opcode)
Gets the name of the given opcode.

        return get(opcode).getName();
    
private static voidset(com.android.dx.io.OpcodeInfo$Info opcode)
Puts the given opcode into the table of all ops.

param
opcode non-null; the opcode

        int idx = opcode.getOpcode() - Opcodes.MIN_VALUE;
        INFO[idx] = opcode;