diff options
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. * |