summaryrefslogtreecommitdiff
path: root/src/arch/instruction-int.h
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-int.h
parenta847082da67c5af831d1f4b66a628de2e9d61395 (diff)
Stored and provided the encoding used by an instruction.
Diffstat (limited to 'src/arch/instruction-int.h')
-rw-r--r--src/arch/instruction-int.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/arch/instruction-int.h b/src/arch/instruction-int.h
index 6b2b5c7..2d3a6a6 100644
--- a/src/arch/instruction-int.h
+++ b/src/arch/instruction-int.h
@@ -35,6 +35,9 @@
/* Liste les registres lus et écrits par l'instruction. */
typedef void (* get_instruction_rw_regs_fc) (const GArchInstruction *, GArchRegister ***, size_t *, GArchRegister ***, size_t *);
+/* Indique l'encodage d'une instruction de façon détaillée. */
+typedef const char * (* get_instruction_encoding_fc) (const GArchInstruction *);
+
/* Ajoute à un tampon GLib le contenu de l'instance spécifiée. */
typedef GBufferLine * (* print_instruction_fc) (const GArchInstruction *, GCodeBuffer *, MemoryDataSize, const GBinContent *, AsmSyntax);
@@ -52,6 +55,8 @@ struct _GArchInstruction
DL_LIST_ITEM(flow); /* Maillon de liste chaînée */
+ const char *encoding; /* Encodage de l'instruction */
+
const char *suffix; /* Complément au nom affiché */
char *cached_keyword; /* Désignation complète */
@@ -97,6 +102,8 @@ struct _GArchInstructionClass
{
GObjectClass parent; /* A laisser en premier */
+ get_instruction_encoding_fc get_encoding; /* Obtention de l'encodage */
+
print_instruction_fc print; /* Imprime l'ensemble */
build_instruction_keyword_fc build_key; /* Texte humain équivalent */