diff options
Diffstat (limited to 'src/arch/dalvik/dop_arithm.c')
-rw-r--r-- | src/arch/dalvik/dop_arithm.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/arch/dalvik/dop_arithm.c b/src/arch/dalvik/dop_arithm.c index 388f906..7657f99 100644 --- a/src/arch/dalvik/dop_arithm.c +++ b/src/arch/dalvik/dop_arithm.c @@ -51,7 +51,6 @@ GDecInstruction *dalvik_decomp_instr_arithm_2addr(const GArchInstruction *instr, GArchOperand *operand; /* Opérande de l'instruction */ GDecInstruction *dest; /* Enregistrement du résultat */ GDecInstruction *op1; /* Premier opérande utilisé */ - GDecInstruction *op2; /* Second opérande utilisé */ GDecInstruction *arithm; /* Opération arithmétique */ switch (g_dalvik_instruction_get_opcode(G_DALVIK_INSTRUCTION(instr))) @@ -84,15 +83,12 @@ GDecInstruction *dalvik_decomp_instr_arithm_2addr(const GArchInstruction *instr, } operand = g_arch_instruction_get_operand(instr, 0); - dest = g_pseudo_register_new(); + dest = g_dec_context_convert_register(ctx, operand); operand = g_arch_instruction_get_operand(instr, 1); - op1 = g_pseudo_register_new(); - - operand = g_arch_instruction_get_operand(instr, 2); - op2 = g_pseudo_register_new(); + op1 = g_dec_context_convert_register(ctx, operand); - arithm = g_arithm_expression_new(G_DEC_EXPRESSION(op1), type, G_DEC_EXPRESSION(op2)); + arithm = g_arithm_expression_new(G_DEC_EXPRESSION(dest), type, G_DEC_EXPRESSION(op1)); result = g_assign_expression_new(G_DEC_EXPRESSION(dest), G_DEC_EXPRESSION(arithm)); return result; @@ -159,10 +155,10 @@ GDecInstruction *dalvik_decomp_instr_arithm_lit(const GArchInstruction *instr, G } operand = g_arch_instruction_get_operand(instr, 0); - dest = g_pseudo_register_new(); + dest = g_dec_context_convert_register(ctx, operand); operand = g_arch_instruction_get_operand(instr, 1); - op1 = g_pseudo_register_new(); + op1 = g_dec_context_convert_register(ctx, operand); operand = g_arch_instruction_get_operand(instr, 2); op2 = g_imm_expression_new(G_IMM_OPERAND(operand)); |