Package com.android.dx.io
Class Opcodes
java.lang.Object
com.android.dx.io.Opcodes
All the Dalvik opcode value constants.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
special pseudo-opcode value for fill-array-data data payload instructionsstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
maximum valid opcode valuestatic final int
minimum valid opcode valuestatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
pseudo-opcode used to indicate there is no next opcode; used in opcode chaining listsstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
special pseudo-opcode value for packed-switch data payload instructionsstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
special pseudo-opcode value for packed-switch data payload instructionsstatic final int
pseudo-opcode used for nonstandard format payload "instructions".static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
extractOpcodeFromUnit
(int opcodeUnit) Gets the opcode out of an opcode unit, the latter of which may also include one or more argument values.static boolean
isValidShape
(int opcode) Determines if the given opcode has the right "shape" to be valid.
-
Field Details
-
SPECIAL_FORMAT
public static final int SPECIAL_FORMATpseudo-opcode used for nonstandard format payload "instructions". TODO: Retire this concept, and start treating the payload instructions more like the rest.- See Also:
-
NO_NEXT
public static final int NO_NEXTpseudo-opcode used to indicate there is no next opcode; used in opcode chaining lists- See Also:
-
MIN_VALUE
public static final int MIN_VALUEminimum valid opcode value- See Also:
-
MAX_VALUE
public static final int MAX_VALUEmaximum valid opcode value- See Also:
-
NOP
public static final int NOP- See Also:
-
MOVE
public static final int MOVE- See Also:
-
MOVE_FROM16
public static final int MOVE_FROM16- See Also:
-
MOVE_16
public static final int MOVE_16- See Also:
-
MOVE_WIDE
public static final int MOVE_WIDE- See Also:
-
MOVE_WIDE_FROM16
public static final int MOVE_WIDE_FROM16- See Also:
-
MOVE_WIDE_16
public static final int MOVE_WIDE_16- See Also:
-
MOVE_OBJECT
public static final int MOVE_OBJECT- See Also:
-
MOVE_OBJECT_FROM16
public static final int MOVE_OBJECT_FROM16- See Also:
-
MOVE_OBJECT_16
public static final int MOVE_OBJECT_16- See Also:
-
MOVE_RESULT
public static final int MOVE_RESULT- See Also:
-
MOVE_RESULT_WIDE
public static final int MOVE_RESULT_WIDE- See Also:
-
MOVE_RESULT_OBJECT
public static final int MOVE_RESULT_OBJECT- See Also:
-
MOVE_EXCEPTION
public static final int MOVE_EXCEPTION- See Also:
-
RETURN_VOID
public static final int RETURN_VOID- See Also:
-
RETURN
public static final int RETURN- See Also:
-
RETURN_WIDE
public static final int RETURN_WIDE- See Also:
-
RETURN_OBJECT
public static final int RETURN_OBJECT- See Also:
-
CONST_4
public static final int CONST_4- See Also:
-
CONST_16
public static final int CONST_16- See Also:
-
CONST
public static final int CONST- See Also:
-
CONST_HIGH16
public static final int CONST_HIGH16- See Also:
-
CONST_WIDE_16
public static final int CONST_WIDE_16- See Also:
-
CONST_WIDE_32
public static final int CONST_WIDE_32- See Also:
-
CONST_WIDE
public static final int CONST_WIDE- See Also:
-
CONST_WIDE_HIGH16
public static final int CONST_WIDE_HIGH16- See Also:
-
CONST_STRING
public static final int CONST_STRING- See Also:
-
CONST_STRING_JUMBO
public static final int CONST_STRING_JUMBO- See Also:
-
CONST_CLASS
public static final int CONST_CLASS- See Also:
-
MONITOR_ENTER
public static final int MONITOR_ENTER- See Also:
-
MONITOR_EXIT
public static final int MONITOR_EXIT- See Also:
-
CHECK_CAST
public static final int CHECK_CAST- See Also:
-
INSTANCE_OF
public static final int INSTANCE_OF- See Also:
-
ARRAY_LENGTH
public static final int ARRAY_LENGTH- See Also:
-
NEW_INSTANCE
public static final int NEW_INSTANCE- See Also:
-
NEW_ARRAY
public static final int NEW_ARRAY- See Also:
-
FILLED_NEW_ARRAY
public static final int FILLED_NEW_ARRAY- See Also:
-
FILLED_NEW_ARRAY_RANGE
public static final int FILLED_NEW_ARRAY_RANGE- See Also:
-
FILL_ARRAY_DATA
public static final int FILL_ARRAY_DATA- See Also:
-
THROW
public static final int THROW- See Also:
-
GOTO
public static final int GOTO- See Also:
-
GOTO_16
public static final int GOTO_16- See Also:
-
GOTO_32
public static final int GOTO_32- See Also:
-
PACKED_SWITCH
public static final int PACKED_SWITCH- See Also:
-
SPARSE_SWITCH
public static final int SPARSE_SWITCH- See Also:
-
CMPL_FLOAT
public static final int CMPL_FLOAT- See Also:
-
CMPG_FLOAT
public static final int CMPG_FLOAT- See Also:
-
CMPL_DOUBLE
public static final int CMPL_DOUBLE- See Also:
-
CMPG_DOUBLE
public static final int CMPG_DOUBLE- See Also:
-
CMP_LONG
public static final int CMP_LONG- See Also:
-
IF_EQ
public static final int IF_EQ- See Also:
-
IF_NE
public static final int IF_NE- See Also:
-
IF_LT
public static final int IF_LT- See Also:
-
IF_GE
public static final int IF_GE- See Also:
-
IF_GT
public static final int IF_GT- See Also:
-
IF_LE
public static final int IF_LE- See Also:
-
IF_EQZ
public static final int IF_EQZ- See Also:
-
IF_NEZ
public static final int IF_NEZ- See Also:
-
IF_LTZ
public static final int IF_LTZ- See Also:
-
IF_GEZ
public static final int IF_GEZ- See Also:
-
IF_GTZ
public static final int IF_GTZ- See Also:
-
IF_LEZ
public static final int IF_LEZ- See Also:
-
AGET
public static final int AGET- See Also:
-
AGET_WIDE
public static final int AGET_WIDE- See Also:
-
AGET_OBJECT
public static final int AGET_OBJECT- See Also:
-
AGET_BOOLEAN
public static final int AGET_BOOLEAN- See Also:
-
AGET_BYTE
public static final int AGET_BYTE- See Also:
-
AGET_CHAR
public static final int AGET_CHAR- See Also:
-
AGET_SHORT
public static final int AGET_SHORT- See Also:
-
APUT
public static final int APUT- See Also:
-
APUT_WIDE
public static final int APUT_WIDE- See Also:
-
APUT_OBJECT
public static final int APUT_OBJECT- See Also:
-
APUT_BOOLEAN
public static final int APUT_BOOLEAN- See Also:
-
APUT_BYTE
public static final int APUT_BYTE- See Also:
-
APUT_CHAR
public static final int APUT_CHAR- See Also:
-
APUT_SHORT
public static final int APUT_SHORT- See Also:
-
IGET
public static final int IGET- See Also:
-
IGET_WIDE
public static final int IGET_WIDE- See Also:
-
IGET_OBJECT
public static final int IGET_OBJECT- See Also:
-
IGET_BOOLEAN
public static final int IGET_BOOLEAN- See Also:
-
IGET_BYTE
public static final int IGET_BYTE- See Also:
-
IGET_CHAR
public static final int IGET_CHAR- See Also:
-
IGET_SHORT
public static final int IGET_SHORT- See Also:
-
IPUT
public static final int IPUT- See Also:
-
IPUT_WIDE
public static final int IPUT_WIDE- See Also:
-
IPUT_OBJECT
public static final int IPUT_OBJECT- See Also:
-
IPUT_BOOLEAN
public static final int IPUT_BOOLEAN- See Also:
-
IPUT_BYTE
public static final int IPUT_BYTE- See Also:
-
IPUT_CHAR
public static final int IPUT_CHAR- See Also:
-
IPUT_SHORT
public static final int IPUT_SHORT- See Also:
-
SGET
public static final int SGET- See Also:
-
SGET_WIDE
public static final int SGET_WIDE- See Also:
-
SGET_OBJECT
public static final int SGET_OBJECT- See Also:
-
SGET_BOOLEAN
public static final int SGET_BOOLEAN- See Also:
-
SGET_BYTE
public static final int SGET_BYTE- See Also:
-
SGET_CHAR
public static final int SGET_CHAR- See Also:
-
SGET_SHORT
public static final int SGET_SHORT- See Also:
-
SPUT
public static final int SPUT- See Also:
-
SPUT_WIDE
public static final int SPUT_WIDE- See Also:
-
SPUT_OBJECT
public static final int SPUT_OBJECT- See Also:
-
SPUT_BOOLEAN
public static final int SPUT_BOOLEAN- See Also:
-
SPUT_BYTE
public static final int SPUT_BYTE- See Also:
-
SPUT_CHAR
public static final int SPUT_CHAR- See Also:
-
SPUT_SHORT
public static final int SPUT_SHORT- See Also:
-
INVOKE_VIRTUAL
public static final int INVOKE_VIRTUAL- See Also:
-
INVOKE_SUPER
public static final int INVOKE_SUPER- See Also:
-
INVOKE_DIRECT
public static final int INVOKE_DIRECT- See Also:
-
INVOKE_STATIC
public static final int INVOKE_STATIC- See Also:
-
INVOKE_INTERFACE
public static final int INVOKE_INTERFACE- See Also:
-
INVOKE_VIRTUAL_RANGE
public static final int INVOKE_VIRTUAL_RANGE- See Also:
-
INVOKE_SUPER_RANGE
public static final int INVOKE_SUPER_RANGE- See Also:
-
INVOKE_DIRECT_RANGE
public static final int INVOKE_DIRECT_RANGE- See Also:
-
INVOKE_STATIC_RANGE
public static final int INVOKE_STATIC_RANGE- See Also:
-
INVOKE_INTERFACE_RANGE
public static final int INVOKE_INTERFACE_RANGE- See Also:
-
NEG_INT
public static final int NEG_INT- See Also:
-
NOT_INT
public static final int NOT_INT- See Also:
-
NEG_LONG
public static final int NEG_LONG- See Also:
-
NOT_LONG
public static final int NOT_LONG- See Also:
-
NEG_FLOAT
public static final int NEG_FLOAT- See Also:
-
NEG_DOUBLE
public static final int NEG_DOUBLE- See Also:
-
INT_TO_LONG
public static final int INT_TO_LONG- See Also:
-
INT_TO_FLOAT
public static final int INT_TO_FLOAT- See Also:
-
INT_TO_DOUBLE
public static final int INT_TO_DOUBLE- See Also:
-
LONG_TO_INT
public static final int LONG_TO_INT- See Also:
-
LONG_TO_FLOAT
public static final int LONG_TO_FLOAT- See Also:
-
LONG_TO_DOUBLE
public static final int LONG_TO_DOUBLE- See Also:
-
FLOAT_TO_INT
public static final int FLOAT_TO_INT- See Also:
-
FLOAT_TO_LONG
public static final int FLOAT_TO_LONG- See Also:
-
FLOAT_TO_DOUBLE
public static final int FLOAT_TO_DOUBLE- See Also:
-
DOUBLE_TO_INT
public static final int DOUBLE_TO_INT- See Also:
-
DOUBLE_TO_LONG
public static final int DOUBLE_TO_LONG- See Also:
-
DOUBLE_TO_FLOAT
public static final int DOUBLE_TO_FLOAT- See Also:
-
INT_TO_BYTE
public static final int INT_TO_BYTE- See Also:
-
INT_TO_CHAR
public static final int INT_TO_CHAR- See Also:
-
INT_TO_SHORT
public static final int INT_TO_SHORT- See Also:
-
ADD_INT
public static final int ADD_INT- See Also:
-
SUB_INT
public static final int SUB_INT- See Also:
-
MUL_INT
public static final int MUL_INT- See Also:
-
DIV_INT
public static final int DIV_INT- See Also:
-
REM_INT
public static final int REM_INT- See Also:
-
AND_INT
public static final int AND_INT- See Also:
-
OR_INT
public static final int OR_INT- See Also:
-
XOR_INT
public static final int XOR_INT- See Also:
-
SHL_INT
public static final int SHL_INT- See Also:
-
SHR_INT
public static final int SHR_INT- See Also:
-
USHR_INT
public static final int USHR_INT- See Also:
-
ADD_LONG
public static final int ADD_LONG- See Also:
-
SUB_LONG
public static final int SUB_LONG- See Also:
-
MUL_LONG
public static final int MUL_LONG- See Also:
-
DIV_LONG
public static final int DIV_LONG- See Also:
-
REM_LONG
public static final int REM_LONG- See Also:
-
AND_LONG
public static final int AND_LONG- See Also:
-
OR_LONG
public static final int OR_LONG- See Also:
-
XOR_LONG
public static final int XOR_LONG- See Also:
-
SHL_LONG
public static final int SHL_LONG- See Also:
-
SHR_LONG
public static final int SHR_LONG- See Also:
-
USHR_LONG
public static final int USHR_LONG- See Also:
-
ADD_FLOAT
public static final int ADD_FLOAT- See Also:
-
SUB_FLOAT
public static final int SUB_FLOAT- See Also:
-
MUL_FLOAT
public static final int MUL_FLOAT- See Also:
-
DIV_FLOAT
public static final int DIV_FLOAT- See Also:
-
REM_FLOAT
public static final int REM_FLOAT- See Also:
-
ADD_DOUBLE
public static final int ADD_DOUBLE- See Also:
-
SUB_DOUBLE
public static final int SUB_DOUBLE- See Also:
-
MUL_DOUBLE
public static final int MUL_DOUBLE- See Also:
-
DIV_DOUBLE
public static final int DIV_DOUBLE- See Also:
-
REM_DOUBLE
public static final int REM_DOUBLE- See Also:
-
ADD_INT_2ADDR
public static final int ADD_INT_2ADDR- See Also:
-
SUB_INT_2ADDR
public static final int SUB_INT_2ADDR- See Also:
-
MUL_INT_2ADDR
public static final int MUL_INT_2ADDR- See Also:
-
DIV_INT_2ADDR
public static final int DIV_INT_2ADDR- See Also:
-
REM_INT_2ADDR
public static final int REM_INT_2ADDR- See Also:
-
AND_INT_2ADDR
public static final int AND_INT_2ADDR- See Also:
-
OR_INT_2ADDR
public static final int OR_INT_2ADDR- See Also:
-
XOR_INT_2ADDR
public static final int XOR_INT_2ADDR- See Also:
-
SHL_INT_2ADDR
public static final int SHL_INT_2ADDR- See Also:
-
SHR_INT_2ADDR
public static final int SHR_INT_2ADDR- See Also:
-
USHR_INT_2ADDR
public static final int USHR_INT_2ADDR- See Also:
-
ADD_LONG_2ADDR
public static final int ADD_LONG_2ADDR- See Also:
-
SUB_LONG_2ADDR
public static final int SUB_LONG_2ADDR- See Also:
-
MUL_LONG_2ADDR
public static final int MUL_LONG_2ADDR- See Also:
-
DIV_LONG_2ADDR
public static final int DIV_LONG_2ADDR- See Also:
-
REM_LONG_2ADDR
public static final int REM_LONG_2ADDR- See Also:
-
AND_LONG_2ADDR
public static final int AND_LONG_2ADDR- See Also:
-
OR_LONG_2ADDR
public static final int OR_LONG_2ADDR- See Also:
-
XOR_LONG_2ADDR
public static final int XOR_LONG_2ADDR- See Also:
-
SHL_LONG_2ADDR
public static final int SHL_LONG_2ADDR- See Also:
-
SHR_LONG_2ADDR
public static final int SHR_LONG_2ADDR- See Also:
-
USHR_LONG_2ADDR
public static final int USHR_LONG_2ADDR- See Also:
-
ADD_FLOAT_2ADDR
public static final int ADD_FLOAT_2ADDR- See Also:
-
SUB_FLOAT_2ADDR
public static final int SUB_FLOAT_2ADDR- See Also:
-
MUL_FLOAT_2ADDR
public static final int MUL_FLOAT_2ADDR- See Also:
-
DIV_FLOAT_2ADDR
public static final int DIV_FLOAT_2ADDR- See Also:
-
REM_FLOAT_2ADDR
public static final int REM_FLOAT_2ADDR- See Also:
-
ADD_DOUBLE_2ADDR
public static final int ADD_DOUBLE_2ADDR- See Also:
-
SUB_DOUBLE_2ADDR
public static final int SUB_DOUBLE_2ADDR- See Also:
-
MUL_DOUBLE_2ADDR
public static final int MUL_DOUBLE_2ADDR- See Also:
-
DIV_DOUBLE_2ADDR
public static final int DIV_DOUBLE_2ADDR- See Also:
-
REM_DOUBLE_2ADDR
public static final int REM_DOUBLE_2ADDR- See Also:
-
ADD_INT_LIT16
public static final int ADD_INT_LIT16- See Also:
-
RSUB_INT
public static final int RSUB_INT- See Also:
-
MUL_INT_LIT16
public static final int MUL_INT_LIT16- See Also:
-
DIV_INT_LIT16
public static final int DIV_INT_LIT16- See Also:
-
REM_INT_LIT16
public static final int REM_INT_LIT16- See Also:
-
AND_INT_LIT16
public static final int AND_INT_LIT16- See Also:
-
OR_INT_LIT16
public static final int OR_INT_LIT16- See Also:
-
XOR_INT_LIT16
public static final int XOR_INT_LIT16- See Also:
-
ADD_INT_LIT8
public static final int ADD_INT_LIT8- See Also:
-
RSUB_INT_LIT8
public static final int RSUB_INT_LIT8- See Also:
-
MUL_INT_LIT8
public static final int MUL_INT_LIT8- See Also:
-
DIV_INT_LIT8
public static final int DIV_INT_LIT8- See Also:
-
REM_INT_LIT8
public static final int REM_INT_LIT8- See Also:
-
AND_INT_LIT8
public static final int AND_INT_LIT8- See Also:
-
OR_INT_LIT8
public static final int OR_INT_LIT8- See Also:
-
XOR_INT_LIT8
public static final int XOR_INT_LIT8- See Also:
-
SHL_INT_LIT8
public static final int SHL_INT_LIT8- See Also:
-
SHR_INT_LIT8
public static final int SHR_INT_LIT8- See Also:
-
USHR_INT_LIT8
public static final int USHR_INT_LIT8- See Also:
-
INVOKE_POLYMORPHIC
public static final int INVOKE_POLYMORPHIC- See Also:
-
INVOKE_POLYMORPHIC_RANGE
public static final int INVOKE_POLYMORPHIC_RANGE- See Also:
-
INVOKE_CUSTOM
public static final int INVOKE_CUSTOM- See Also:
-
INVOKE_CUSTOM_RANGE
public static final int INVOKE_CUSTOM_RANGE- See Also:
-
CONST_METHOD_HANDLE
public static final int CONST_METHOD_HANDLE- See Also:
-
CONST_METHOD_TYPE
public static final int CONST_METHOD_TYPE- See Also:
-
PACKED_SWITCH_PAYLOAD
public static final int PACKED_SWITCH_PAYLOADspecial pseudo-opcode value for packed-switch data payload instructions- See Also:
-
SPARSE_SWITCH_PAYLOAD
public static final int SPARSE_SWITCH_PAYLOADspecial pseudo-opcode value for packed-switch data payload instructions- See Also:
-
FILL_ARRAY_DATA_PAYLOAD
public static final int FILL_ARRAY_DATA_PAYLOADspecial pseudo-opcode value for fill-array-data data payload instructions- See Also:
-
-
Method Details
-
isValidShape
public static boolean isValidShape(int opcode) Determines if the given opcode has the right "shape" to be valid. This includes the range0x01..0xfe
, the range0x00ff..0xffff
where the low-order byte is either0
or0xff
, and the special opcode valuesSPECIAL_FORMAT
andNO_NEXT
. Note that not all of the opcode values that pass this test are in fact used. This method is meant to perform a quick check to reject blatantly wrong values (e.g. when validating arguments).- Parameters:
opcode
- the opcode value- Returns:
true
iff the value has the right "shape" to be possibly valid
-
extractOpcodeFromUnit
public static int extractOpcodeFromUnit(int opcodeUnit) Gets the opcode out of an opcode unit, the latter of which may also include one or more argument values.- Parameters:
opcodeUnit
- the opcode-containing code unit- Returns:
- the extracted opcode
-