diff options
Diffstat (limited to 'src/arch/dalvik/decomp/move.c')
-rw-r--r-- | src/arch/dalvik/decomp/move.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/arch/dalvik/decomp/move.c b/src/arch/dalvik/decomp/move.c index 9165447..a502952 100644 --- a/src/arch/dalvik/decomp/move.c +++ b/src/arch/dalvik/decomp/move.c @@ -44,15 +44,18 @@ GDecInstruction *dalvik_decomp_instr_move(const GArchInstruction *instr, GDecContext *ctx) { GDecInstruction *result; /* Instruction à retourner */ + vmpa_t addr; /* Adresse de l'instruction */ GArchOperand *operand; /* Opérande de l'instruction */ GDecInstruction *src; /* Registre de l'object */ GDecInstruction *dest; /* Registre de destination */ + g_arch_instruction_get_location(instr, NULL, NULL, &addr); + operand = g_arch_instruction_get_operand(instr, 1); - src = g_dec_context_convert_register(ctx, operand, false); + src = g_dec_context_convert_register(ctx, operand, false, addr); operand = g_arch_instruction_get_operand(instr, 0); - dest = g_dec_context_convert_register(ctx, operand, true); + dest = g_dec_context_convert_register(ctx, operand, true, addr); result = g_assign_expression_new(G_DEC_EXPRESSION(dest), G_DEC_EXPRESSION(src)); @@ -77,15 +80,18 @@ GDecInstruction *dalvik_decomp_instr_move(const GArchInstruction *instr, GDecCon GDecInstruction *dalvik_decomp_instr_move_object(const GArchInstruction *instr, GDecContext *ctx) { GDecInstruction *result; /* Instruction à retourner */ + vmpa_t addr; /* Adresse de l'instruction */ GArchOperand *operand; /* Opérande de l'instruction */ GDecInstruction *src; /* Registre de l'object */ GDecInstruction *dest; /* Registre de destination */ + g_arch_instruction_get_location(instr, NULL, NULL, &addr); + operand = g_arch_instruction_get_operand(instr, 1); - src = g_dec_context_convert_register(ctx, operand, false); + src = g_dec_context_convert_register(ctx, operand, false, addr); operand = g_arch_instruction_get_operand(instr, 0); - dest = g_dec_context_convert_register(ctx, operand, true); + dest = g_dec_context_convert_register(ctx, operand, true, addr); result = g_assign_expression_new(G_DEC_EXPRESSION(dest), G_DEC_EXPRESSION(src)); @@ -111,6 +117,7 @@ GDecInstruction *dalvik_decomp_instr_move_result(const GArchInstruction *instr, { GDecInstruction *result; /* Instruction à retourner */ GDecInstruction *list; /* Instructions décompilées */ + vmpa_t addr; /* Adresse de l'instruction */ GArchOperand *operand; /* Opérande de l'instruction */ GDecInstruction *last; /* Instruction précédante */ GDecInstruction *dest; /* Registre de destination */ @@ -122,8 +129,10 @@ GDecInstruction *dalvik_decomp_instr_move_result(const GArchInstruction *instr, g_dec_instruction_delete(&list, last); g_dec_context_set_decomp_instrs(ctx, list); + g_arch_instruction_get_location(instr, NULL, NULL, &addr); + operand = g_arch_instruction_get_operand(instr, 0); - dest = g_dec_context_convert_register(ctx, operand, true); + dest = g_dec_context_convert_register(ctx, operand, true, addr); result = g_assign_expression_new(G_DEC_EXPRESSION(dest), G_DEC_EXPRESSION(last)); |