summaryrefslogtreecommitdiff
path: root/src/arch/instruction.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-01-24 11:19:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-01-24 11:19:32 (GMT)
commit141d2f0fbb2ce3b4ddf85383c55b891fd59dc598 (patch)
tree085fa1a20d77f86825e1a6f4215b1ffd8fd961e8 /src/arch/instruction.c
parent3df9f6dc8548b0562312036abfbfcf9850a81041 (diff)
Introduced conditional calls in instruction definition rules.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@459 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r--src/arch/instruction.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index 598da6d..67fd184 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -105,6 +105,8 @@ static void g_arch_instruction_init(GArchInstruction *instr)
{
DL_LIST_ITEM_INIT(&instr->flow);
+ instr->is_return = false;
+
}
@@ -475,6 +477,28 @@ InstructionLinkType g_arch_instruction_get_link(const GArchInstruction *instr, v
/******************************************************************************
* *
+* Paramètres : instr = instruction à consulter. *
+* status = statut de l'instruction vis à vis du flot. *
+* *
+* Description : Précise si l'instruction correspond à un retour de fonction. *
+* *
+* Retour : true (pour respecter le prototypage depuis les fichiers D). *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool g_arch_instruction_define_as_return(GArchInstruction *instr, bool status)
+{
+ instr->is_return = status;
+
+ return true;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : instr = instruction à consulter. *
* *
* Description : Indique si l'instruction correspond à un retour de fonction. *
@@ -487,7 +511,7 @@ InstructionLinkType g_arch_instruction_get_link(const GArchInstruction *instr, v
bool g_arch_instruction_is_return(const GArchInstruction *instr)
{
- return instr->is_return(instr);
+ return instr->is_return;
}