diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-11-12 22:13:21 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-11-12 22:13:21 (GMT) |
commit | ae8cf6257c8d929de1b7ee86e29fcb45ab4af91c (patch) | |
tree | 59fa356b2f83020e23df4cf6975ca5d97567df4d /src/arch/dalvik/dop_arithm.c | |
parent | abaf85fdc0edb2bfe67d07d52ae734d50c6fbf61 (diff) |
Changed the display of the pseudo registers by using an index.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@192 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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)); |