summaryrefslogtreecommitdiff
path: root/src/arch/dalvik
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik')
-rw-r--r--src/arch/dalvik/decomp/if.c5
-rw-r--r--src/arch/dalvik/instruction.c12
2 files changed, 9 insertions, 8 deletions
diff --git a/src/arch/dalvik/decomp/if.c b/src/arch/dalvik/decomp/if.c
index 93e21d9..f7591b9 100644
--- a/src/arch/dalvik/decomp/if.c
+++ b/src/arch/dalvik/decomp/if.c
@@ -26,6 +26,7 @@
#include "../instruction.h"
#include "../../../decomp/expr/cond.h"
+#include "../../../decomp/expr/immediate.h"
#include "../../../decomp/instr/ite.h"
@@ -153,8 +154,8 @@ GDecInstruction *dalvik_decomp_instr_if_zero(const GArchInstruction *instr, GDec
operand = g_arch_instruction_get_operand(instr, 0);
op1 = g_dec_context_convert_register(ctx, operand, false, addr);
- operand = g_imm_operand_new_from_value(MDS_8_BITS_UNSIGNED, (unsigned int)0);
- op2 = g_imm_expression_new(operand);
+ operand = g_imm_operand_new_from_value(MDS_32_BITS_UNSIGNED, (unsigned int)0);
+ op2 = g_imm_expression_new(G_IMM_OPERAND(operand));
operand = g_arch_instruction_get_operand(instr, 2);
jmp = 0x1234ull;/*g_dec_context_convert_register(ctx, operand, addr);*/
diff --git a/src/arch/dalvik/instruction.c b/src/arch/dalvik/instruction.c
index 81b8993..1ab6e3c 100644
--- a/src/arch/dalvik/instruction.c
+++ b/src/arch/dalvik/instruction.c
@@ -117,12 +117,12 @@ static dalvik_instruction _instructions[DOP_COUNT] = {
[DOP_IF_GE] = { 0x35, "if-ge", dalvik_decomp_instr_if },
[DOP_IF_GT] = { 0x36, "if-gt", dalvik_decomp_instr_if },
[DOP_IF_LE] = { 0x37, "if-le", dalvik_decomp_instr_if },
- [DOP_IF_EQZ] = { 0x38, "if-eqz"/*, dalvik_decomp_instr_if_zero*/ },
- [DOP_IF_NEZ] = { 0x39, "if-nez"/*, dalvik_decomp_instr_if_zero*/ },
- [DOP_IF_LTZ] = { 0x3a, "if-ltz"/*, dalvik_decomp_instr_if_zero*/ },
- [DOP_IF_GEZ] = { 0x3b, "if-gez"/*, dalvik_decomp_instr_if_zero*/ },
- [DOP_IF_GTZ] = { 0x3c, "if-gtz"/*, dalvik_decomp_instr_if_zero*/ },
- [DOP_IF_LEZ] = { 0x3d, "if-lez"/*, dalvik_decomp_instr_if_zero*/ },
+ [DOP_IF_EQZ] = { 0x38, "if-eqz", dalvik_decomp_instr_if_zero },
+ [DOP_IF_NEZ] = { 0x39, "if-nez", dalvik_decomp_instr_if_zero },
+ [DOP_IF_LTZ] = { 0x3a, "if-ltz", dalvik_decomp_instr_if_zero },
+ [DOP_IF_GEZ] = { 0x3b, "if-gez", dalvik_decomp_instr_if_zero },
+ [DOP_IF_GTZ] = { 0x3c, "if-gtz", dalvik_decomp_instr_if_zero },
+ [DOP_IF_LEZ] = { 0x3d, "if-lez", dalvik_decomp_instr_if_zero },
[DOP_UNUSED_3E] = { 0x3e, NULL /* unused */ },
[DOP_UNUSED_3F] = { 0x3f, NULL /* unused */ },
[DOP_UNUSED_40] = { 0x40, NULL /* unused */ },