summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/instruction.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2010-06-20 20:47:17 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2010-06-20 20:47:17 (GMT)
commitdad83b556250a85a9b2ccf68e5fb6f4df7dca1f4 (patch)
tree81f90d9966d712d006aa639d90874627ccd6970b /src/arch/dalvik/instruction.c
parent0d7908e0c8282050ebbcc8a7c18fafd13152a36e (diff)
Supported more Dalvik opcodes.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@169 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik/instruction.c')
-rw-r--r--src/arch/dalvik/instruction.c97
1 files changed, 84 insertions, 13 deletions
diff --git a/src/arch/dalvik/instruction.c b/src/arch/dalvik/instruction.c
index 165d4d2..17c19a4 100644
--- a/src/arch/dalvik/instruction.c
+++ b/src/arch/dalvik/instruction.c
@@ -69,25 +69,74 @@ typedef struct _dalvik_instruction
static dalvik_instruction _instructions[DOP_COUNT] = {
[DOP_NOP] = { 0x00, "nop" },
+ [DOP_MOVE] = { 0x01, "move" },
- [DOP_MOVE_RESULT_OBJECT] = { 0x0c, "move-result-object" },
+ [DOP_MOVE_OBJECT] = { 0x07, "move-object" },
+ [DOP_MOVE_RESULT] = { 0x0a, "move-result" },
+ [DOP_MOVE_RESULT_WIDE] = { 0x0b, "move-result-wide" },
+ [DOP_MOVE_RESULT_OBJECT] = { 0x0c, "move-result-object" },
+ [DOP_MOVE_EXCEPTION] = { 0x0d, "move-exception" },
+ [DOP_RETURN_VOID] = { 0x0e, "return-void" },
+ [DOP_RETURN] = { 0x0f, "return" },
+ [DOP_RETURN_WIDE] = { 0x10, "return-wide" },
+ [DOP_RETURN_OBJECT] = { 0x11, "return-object" },
[DOP_CONST_4] = { 0x12, "const/4" },
[DOP_CONST_16] = { 0x13, "const/16" },
-
-
+ [DOP_CONST] = { 0x14, "const" },
[DOP_CONST_HIGH16] = { 0x15, "const/high16" },
+ [DOP_CONST_WIDE_16] = { 0x16, "const-wide/16" },
+
+ [DOP_CONST_WIDE] = { 0x18, "const-wide" },
[DOP_CONST_STRING] = { 0x1a, "const-string" },
-
- [DOP_RETURN_VOID] = { 0x0e, "return-void" },
- [DOP_RETURN] = { 0x0f, "return" },
+ [DOP_CHECK_CAST] = { 0x1f, "check-cast" },
+ [DOP_ARRAY_LENGTH] = { 0x21, "array-length" },
[DOP_NEW_INSTANCE] = { 0x22, "new-instance" },
-
-
+ [DOP_NEW_ARRAY] = { 0x23, "new-array" },
+
+ [DOP_GOTO] = { 0x28, "goto" },
+ [DOP_GOTO_16] = { 0x29, "goto/16" },
+ [DOP_GOTO_32] = { 0x2a, "goto/32" },
+
+ [DOP_CMPL_FLOAT] = { 0x2d, "cmp-long" },
+ [DOP_CMPG_FLOAT] = { 0x2e, "cmpg-float" },
+ [DOP_CMPL_DOUBLE] = { 0x2f, "cmpl-double" },
+ [DOP_CMPG_DOUBLE] = { 0x30, "cmpg-double" },
+ [DOP_CMP_LONG] = { 0x31, "cmp-long" },
+ [DOP_IF_EQ] = { 0x32, "if-eq" },
+ [DOP_IF_EQZ] = { 0x33, "if-eqz" },
+ [DOP_IF_GE] = { 0x34, "if-ge" },
+ [DOP_IF_GEZ] = { 0x35, "if-gez" },
+ [DOP_IF_GT] = { 0x36, "if-gt" },
+ [DOP_IF_GTZ] = { 0x37, "if-gtz" },
+ [DOP_IF_LE] = { 0x38, "if-le" },
+ [DOP_IF_LEZ] = { 0x39, "if-lez" },
+ [DOP_IF_LT] = { 0x3a, "if-lt" },
+ [DOP_IF_LTZ] = { 0x3b, "if-ltz" },
+ [DOP_IF_NE] = { 0x3c, "if-ne" },
+ [DOP_IF_NEZ] = { 0x3d, "if-nez" },
+
+
+
+
+ [DOP_AGET] = { 0x44, "aget" },
+ [DOP_AGET_WIDE] = { 0x45, "aget-wide" },
+ [DOP_AGET_OBJECT] = { 0x46, "aget-object" },
+ [DOP_AGET_BOOLEAN] = { 0x47, "aget-boolean" },
+ [DOP_AGET_BYTE] = { 0x48, "aget-byte" },
+ [DOP_AGET_CHAR] = { 0x49, "aget-char" },
+ [DOP_AGET_SHORT] = { 0x4a, "aget-short" },
+ [DOP_APUT] = { 0x4b, "aput" },
+ [DOP_APUT_WIDE] = { 0x4c, "aput-wide" },
+ [DOP_APUT_OBJECT] = { 0x4d, "aput-object" },
+ [DOP_APUT_BOOLEAN] = { 0x4e, "aput-boolean" },
+ [DOP_APUT_BYTE] = { 0x4f, "aput-byte" },
+ [DOP_APUT_CHAR] = { 0x50, "aput-char" },
+ [DOP_APUT_SHORT] = { 0x51, "aput-short" },
[DOP_IGET] = { 0x52, "iget" },
[DOP_IGET_WIDE] = { 0x53, "iget-wide" },
[DOP_IGET_OBJECT] = { 0x54, "iget-object" },
@@ -105,17 +154,38 @@ static dalvik_instruction _instructions[DOP_COUNT] = {
[DOP_SGET] = { 0x60, "sget" },
[DOP_SGET_WIDE] = { 0x61, "sget-wide" },
[DOP_SGET_OBJECT] = { 0x62, "sget-object" },
-
-
-
+ [DOP_SGET_BOOLEAN] = { 0x63, "sget-boolean" },
+ [DOP_SGET_BYTE] = { 0x64, "sget-byte" },
+ [DOP_SGET_CHAR] = { 0x65, "sget-char" },
+ [DOP_SGET_SHORT] = { 0x66, "sget-short" },
+ [DOP_SPUT] = { 0x67, "sput" },
+ [DOP_SPUT_WIDE] = { 0x68, "sput-wide" },
+ [DOP_SPUT_OBJECT] = { 0x69, "sput-object" },
+ [DOP_SPUT_BOOLEAN] = { 0x6a, "sput-boolean" },
+ [DOP_SPUT_BYTE] = { 0x6b, "sput-byte" },
+ [DOP_SPUT_CHAR] = { 0x6c, "sput-char" },
+ [DOP_SPUT_SHORT] = { 0x6d, "sput-short" },
[DOP_INVOKE_VIRTUAL] = { 0x6e, "invoke-virtual" },
[DOP_INVOKE_SUPER] = { 0x6f, "invoke-static" },
[DOP_INVOKE_DIRECT] = { 0x70, "invoke-direct" },
[DOP_INVOKE_STATIC] = { 0x71, "invoke-static" },
[DOP_INVOKE_INTERFACE] = { 0x72, "invoke-interface" },
-
-
+ [DOP_TO_INT_LONG] = { 0x81, "int-to-long" },
+ [DOP_TO_INT_FLOAT] = { 0x82, "int-to-float" },
+ [DOP_TO_INT_DOUBLE] = { 0x83, "int-to-double" },
+ [DOP_TO_LONG_INT] = { 0x84, "long-to-int" },
+ [DOP_TO_LONG_FLOAT] = { 0x85, "long-to-float" },
+ [DOP_TO_LONG_DOUBLE] = { 0x86, "long-to-double" },
+ [DOP_TO_FLOAT_INT] = { 0x87, "float-to-int" },
+ [DOP_TO_FLOAT_LONG] = { 0x88, "float-to-long" },
+ [DOP_TO_FLOAT_DOUBLE] = { 0x89, "float-to-double" },
+ [DOP_TO_DOUBLE_INT] = { 0x8a, "double-to-int" },
+ [DOP_TO_DOUBLE_LONG] = { 0x8b, "double-to-long" },
+ [DOP_TO_DOUBLE_FLOAT] = { 0x8c, "double-to-float" },
+ [DOP_TO_INT_BYTE] = { 0x8d, "int-to-byte" },
+ [DOP_TO_INT_CHAR] = { 0x8e, "int-to-char" },
+ [DOP_TO_INT_SHORT] = { 0x8f, "int-to-short" },
[DOP_ADD_INT] = { 0x90, "add-int" },
[DOP_MUL_INT] = { 0x92, "mul-int" },
@@ -136,6 +206,7 @@ static dalvik_instruction _instructions[DOP_COUNT] = {
[DOP_OR_INT_2ADDR] = { 0xb6, "or-int/2addr" },
[DOP_XOR_INT_2ADDR] = { 0xb7, "xor-int/2addr" },
+ [DOP_MUL_DOUBLE_2ADDR] = { 0xcd, "mul-double/2addr" },
[DOP_ADD_INT_LIT16] = { 0xd0, "add-int/lit16" },
[DOP_RSUB_INT] = { 0xd1, "rsub-int" },