summaryrefslogtreecommitdiff
path: root/src/arch/x86/instruction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/instruction.c')
-rw-r--r--src/arch/x86/instruction.c22
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);
+
+}