summaryrefslogtreecommitdiff
path: root/src/arch/instruction.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-12-15 22:08:44 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-12-15 22:08:44 (GMT)
commit4d313d845a60e908b9e2723cc1fe2bdbbdded315 (patch)
tree96b3c599e250b987e284e4bfcf33a7ae201cf637 /src/arch/instruction.c
parenta847082da67c5af831d1f4b66a628de2e9d61395 (diff)
Stored and provided the encoding used by an instruction.
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r--src/arch/instruction.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index c3c32dc..184d98c 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -150,6 +150,45 @@ static void g_arch_instruction_finalize(GArchInstruction *instr)
/******************************************************************************
* *
+* Paramètres : instr = instruction quelconque à consulter. *
+* *
+* Description : Indique l'encodage d'une instruction de façon détaillée. *
+* *
+* Retour : Description humaine de l'encodage utilisé. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+const char *g_arch_instruction_get_encoding(const GArchInstruction *instr)
+{
+ return G_ARCH_INSTRUCTION_GET_CLASS(instr)->get_encoding(instr);
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : instr = instruction quelconque à modifier. *
+* encoding = encodage de l'instruction. *
+* *
+* Description : Précise l'encodage d'une instruction de façon détaillée. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_arch_instruction_set_encoding(GArchInstruction *instr, const char *encoding)
+{
+ instr->encoding = encoding;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : instr = instruction quelconque à modifier. *
* suffix = chaîne de caractères fournie en complément. *
* *