diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2013-01-21 20:40:38 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2013-01-21 20:40:38 (GMT) |
commit | b0b35292cb22899b1b23556be452eb827e4010d7 (patch) | |
tree | 931366e5439efb3b8a3a30e6da83c0c100f9f2b2 | |
parent | 0c29fdf7d4d7388f02613efe2d05c9f5997e9d47 (diff) |
Fixed a little bug with source/destination operands of XXX/2addr instructions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@329 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/arch/dalvik/decomp/arithm.c | 6 |
2 files changed, 9 insertions, 2 deletions
@@ -1,5 +1,10 @@ 13-01-21 Cyrille Bagard <nocbos@gmail.com> + * src/arch/dalvik/decomp/arithm.c: + Fix a little bug with source/destination operands of XXX/2addr instructions. + +13-01-21 Cyrille Bagard <nocbos@gmail.com> + * plugins/pychrysa/gui/panels/log.c: * plugins/pychrysa/gui/panels/log.h: New entries: restore a fully functional access to the log panel. 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; |