diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-11-28 09:43:50 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-11-28 09:43:50 (GMT) |
commit | f95598b68b98f6eda701f8f02bc09cb13f65fc72 (patch) | |
tree | eefee33963448a1ce53a7eb80dacabbcdce8fc21 /src/arch/dalvik/decomp/move.c | |
parent | fbb4b6f53d2189ba9f61c1fd149534d8aef82dcd (diff) |
Followed the excution flow to decompile instructions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@293 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik/decomp/move.c')
-rw-r--r-- | src/arch/dalvik/decomp/move.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/arch/dalvik/decomp/move.c b/src/arch/dalvik/decomp/move.c index f700737..9165447 100644 --- a/src/arch/dalvik/decomp/move.c +++ b/src/arch/dalvik/decomp/move.c @@ -33,6 +33,39 @@ * Paramètres : instr = instruction d'origine à convertir. * * ctx = contexte de la phase de décompilation. * * * +* Description : Décompile une instruction de type 'move'. * +* * +* Retour : Instruction mise en place ou NULL. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GDecInstruction *dalvik_decomp_instr_move(const GArchInstruction *instr, GDecContext *ctx) +{ + GDecInstruction *result; /* Instruction à retourner */ + GArchOperand *operand; /* Opérande de l'instruction */ + GDecInstruction *src; /* Registre de l'object */ + GDecInstruction *dest; /* Registre de destination */ + + operand = g_arch_instruction_get_operand(instr, 1); + src = g_dec_context_convert_register(ctx, operand, false); + + operand = g_arch_instruction_get_operand(instr, 0); + dest = g_dec_context_convert_register(ctx, operand, true); + + result = g_assign_expression_new(G_DEC_EXPRESSION(dest), G_DEC_EXPRESSION(src)); + + return result; + +} + + +/****************************************************************************** +* * +* Paramètres : instr = instruction d'origine à convertir. * +* ctx = contexte de la phase de décompilation. * +* * * Description : Décompile une instruction de type 'move-object'. * * * * Retour : Instruction mise en place ou NULL. * |