diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2011-12-27 16:49:18 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2011-12-27 16:49:18 (GMT) |
commit | ce12c2bb85d26b0f6de5ba42ff53e2ff6788f4e4 (patch) | |
tree | 216c4c4db2b92c05f29143b9c28fc9d8fb6151e2 /src/arch/dalvik/instruction.c | |
parent | 8a12f3685fab7c975c307bbc7dc5e721616be6a3 (diff) |
Added support for more Dalvik opcodes.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@220 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik/instruction.c')
-rw-r--r-- | src/arch/dalvik/instruction.c | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/src/arch/dalvik/instruction.c b/src/arch/dalvik/instruction.c index 54b8afd..8779428 100644 --- a/src/arch/dalvik/instruction.c +++ b/src/arch/dalvik/instruction.c @@ -59,7 +59,12 @@ static dalvik_instruction _instructions[DOP_COUNT] = { [DOP_MOVE] = { 0x01, "move" }, [DOP_MOVE_FROM_16] = { 0x02, "move/from16" }, + + [DOP_MOVE_WIDE_FROM_16] = { 0x05, "move-wide/from16" }, + + [DOP_MOVE_OBJECT] = { 0x07, "move-object" }, + [DOP_MOVE_OBJECT_FROM_16] = { 0x08, "move-object/from16" }, [DOP_MOVE_RESULT] = { 0x0a, "move-result" }, [DOP_MOVE_RESULT_WIDE] = { 0x0b, "move-result-wide" }, @@ -74,10 +79,12 @@ static dalvik_instruction _instructions[DOP_COUNT] = { [DOP_CONST] = { 0x14, "const" }, [DOP_CONST_HIGH16] = { 0x15, "const/high16" }, [DOP_CONST_WIDE_16] = { 0x16, "const-wide/16" }, - + [DOP_CONST_WIDE_32] = { 0x17, "const-wide/32" }, [DOP_CONST_WIDE] = { 0x18, "const-wide" }, - + [DOP_CONST_WIDE_HIGH16] = { 0x19, "const-wide/high16" }, [DOP_CONST_STRING] = { 0x1a, "const-string" }, + [DOP_CONST_STRING_JUMBO] = { 0x1b, "const-string/jumbo" }, + [DOP_CONST_CLASS] = { 0x1c, "const-class" }, [DOP_CHECK_CAST] = { 0x1f, "check-cast" }, @@ -92,7 +99,8 @@ static dalvik_instruction _instructions[DOP_COUNT] = { [DOP_GOTO] = { 0x28, "goto" }, [DOP_GOTO_16] = { 0x29, "goto/16" }, [DOP_GOTO_32] = { 0x2a, "goto/32" }, - + [DOP_PACKED_SWITCH] = { 0x2b, "packed-switch" }, + [DOP_SPARSE_SWITCH] = { 0x2c, "sparse-switch" }, [DOP_CMPL_FLOAT] = { 0x2d, "cmp-long" }, [DOP_CMPG_FLOAT] = { 0x2e, "cmpg-float" }, [DOP_CMPL_DOUBLE] = { 0x2f, "cmpl-double" }, @@ -161,6 +169,14 @@ static dalvik_instruction _instructions[DOP_COUNT] = { [DOP_INVOKE_STATIC] = { 0x71, "invoke-static" }, [DOP_INVOKE_INTERFACE] = { 0x72, "invoke-interface" }, + [DOP_INVOKE_VIRTUAL_RANGE] = { 0x74, "invoke-virtual/range" }, + [DOP_INVOKE_SUPER_RANGE] = { 0x75, "invoke-static/range" }, + [DOP_INVOKE_DIRECT_RANGE] = { 0x76, "invoke-direct/range" }, + [DOP_INVOKE_STATIC_RANGE] = { 0x77, "invoke-static/range" }, + [DOP_INVOKE_INTERFACE_RANGE]= { 0x78, "invoke-interface/range" }, + + + [DOP_TO_INT_LONG] = { 0x81, "int-to-long" }, [DOP_TO_INT_FLOAT] = { 0x82, "int-to-float" }, [DOP_TO_INT_DOUBLE] = { 0x83, "int-to-double" }, @@ -185,6 +201,17 @@ static dalvik_instruction _instructions[DOP_COUNT] = { [DOP_OR_INT] = { 0x96, "or-int", dalvik_decomp_instr_arithm }, [DOP_XOR_INT] = { 0x97, "xor-int", dalvik_decomp_instr_arithm }, [DOP_SHL_INT] = { 0x98, "shl-int" }, + [DOP_SHR_INT] = { 0x99, "shr-int" }, + [DOP_USHR_INT] = { 0x9a, "ushr-int" }, + + + [DOP_MUL_LONG] = { 0x9d, "mul-long" }, + [DOP_DIV_LONG] = { 0x9e, "div-long" }, + + + [DOP_SHL_LONG] = { 0xa3, "shl-long" }, + [DOP_SHR_LONG] = { 0xa4, "shr-long" }, + [DOP_USHR_LONG] = { 0xa5, "ushr-long" }, [DOP_ADD_INT_2ADDR] = { 0xb0, "add-int/2addr", dalvik_decomp_instr_arithm_2addr }, @@ -197,6 +224,13 @@ static dalvik_instruction _instructions[DOP_COUNT] = { [DOP_OR_INT_2ADDR] = { 0xb6, "or-int/2addr", dalvik_decomp_instr_arithm_2addr }, [DOP_XOR_INT_2ADDR] = { 0xb7, "xor-int/2addr", dalvik_decomp_instr_arithm_2addr }, [DOP_SHL_INT_2ADDR] = { 0xb8, "shl-int/2addr" }, + [DOP_SHR_INT_2ADDR] = { 0xb9, "shr-int/2addr" }, + [DOP_USHR_INT_2ADDR] = { 0xba, "ushr-int/2addr" }, + [DOP_ADD_LONG_2ADDR] = { 0xbb, "add-long/2addr" }, + + [DOP_SHL_LONG_2ADDR] = { 0xc3, "shl-long/2addr" }, + [DOP_SHR_LONG_2ADDR] = { 0xc4, "shr-long/2addr" }, + [DOP_USHR_LONG_2ADDR] = { 0xc5, "ushr-long/2addr" }, [DOP_MUL_DOUBLE_2ADDR] = { 0xcd, "mul-double/2addr", dalvik_decomp_instr_arithm_2addr }, @@ -216,7 +250,9 @@ static dalvik_instruction _instructions[DOP_COUNT] = { [DOP_AND_INT_LIT8] = { 0xdd, "and-int/lit8", dalvik_decomp_instr_arithm_lit }, [DOP_OR_INT_LIT8] = { 0xde, "or-int/lit8", dalvik_decomp_instr_arithm_lit }, [DOP_XOR_INT_LIT8] = { 0xdf, "xor-int/lit8", dalvik_decomp_instr_arithm_lit }, - [DOP_SHL_INT_LIT8] = { 0xe0, "shl-int/lit8" } + [DOP_SHL_INT_LIT8] = { 0xe0, "shl-int/lit8" }, + [DOP_SHR_INT_LIT8] = { 0xe1, "shr-int/lit8" }, + [DOP_USHR_INT_LIT8] = { 0xe2, "ushr-int/lit8" } }; |