diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-07-18 15:41:02 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-07-18 15:41:02 (GMT) |
commit | 3a9fe39c6a8923f45e7c96d80b0bfe52b8686ff9 (patch) | |
tree | 30c3bfa3df145a74d3237513b9eb6dc5559d32be /src/arch/x86 | |
parent | 10105a5f877fd2c6d1e67343956269f1b19a5133 (diff) |
Computed the end of routines with no limit.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@98 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/instruction.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/arch/x86/instruction.c b/src/arch/x86/instruction.c index 0321e88..0af29c1 100644 --- a/src/arch/x86/instruction.c +++ b/src/arch/x86/instruction.c @@ -326,6 +326,8 @@ static const char *x86_get_instruction_text(const GX86Instruction *, const exe_f /* Informe sur une éventuelle référence à une autre instruction. */ static InstructionLinkType x86_get_instruction_link(const GX86Instruction *, vmpa_t *); +/* Indique si l'instruction correspond à un retour de fonction. */ +static bool x86_instruction_is_return(const GX86Instruction *); @@ -372,6 +374,7 @@ static void g_x86_instruction_init(GX86Instruction *instr) parent->get_text = (get_instruction_text_fc)x86_get_instruction_text; parent->get_link = (get_instruction_link_fc)x86_get_instruction_link; + parent->is_return = (is_instruction_return_fc)x86_instruction_is_return; } @@ -622,3 +625,22 @@ static InstructionLinkType x86_get_instruction_link(const GX86Instruction *instr return result; } + + +/****************************************************************************** +* * +* Paramètres : instr = instruction à consulter. * +* * +* Description : Indique si l'instruction correspond à un retour de fonction. * +* * +* Retour : true si l'instruction est un 'return' quelconque ou false. * +* * +* Remarques : - * +* * +******************************************************************************/ + +static bool x86_instruction_is_return(const GX86Instruction *instr) +{ + return (instr->type == XOP_RET); + +} |