summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/decomp
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik/decomp')
-rw-r--r--src/arch/dalvik/decomp/arithm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/dalvik/decomp/arithm.c b/src/arch/dalvik/decomp/arithm.c
index 464694f..e2278aa 100644
--- a/src/arch/dalvik/decomp/arithm.c
+++ b/src/arch/dalvik/decomp/arithm.c
@@ -125,6 +125,7 @@ GDecInstruction *dalvik_decomp_instr_arithm_2addr(const GArchInstruction *instr,
vmpa_t addr; /* Adresse de l'instruction */
GArchOperand *operand; /* Opérande de l'instruction */
GDecInstruction *op1; /* Premier opérande utilisé */
+ GDecInstruction *op2; /* Second opérande utilisé */
GDecInstruction *dest; /* Enregistrement du résultat */
GDecInstruction *arithm; /* Opération arithmétique */
@@ -160,12 +161,13 @@ GDecInstruction *dalvik_decomp_instr_arithm_2addr(const GArchInstruction *instr,
g_arch_instruction_get_location(instr, NULL, NULL, &addr);
operand = g_arch_instruction_get_operand(instr, 1);
- op1 = g_dec_context_convert_register(ctx, operand, false, addr);
+ op2 = g_dec_context_convert_register(ctx, operand, false, addr);
operand = g_arch_instruction_get_operand(instr, 0);
+ op1 = g_dec_context_convert_register(ctx, operand, false, addr);
dest = g_dec_context_convert_register(ctx, operand, true, addr);
- arithm = g_arithm_expression_new(G_DEC_EXPRESSION(dest), type, G_DEC_EXPRESSION(op1));
+ arithm = g_arithm_expression_new(G_DEC_EXPRESSION(op1), type, G_DEC_EXPRESSION(op2));
result = g_assign_expression_new(G_DEC_EXPRESSION(dest), G_DEC_EXPRESSION(arithm));
return result;