summaryrefslogtreecommitdiff
path: root/src/arch/instruction.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-04-02 11:58:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-04-02 12:39:30 (GMT)
commit1db4ef323b7a76093356ae76268132f3760e1631 (patch)
treefec36ee0ec1b6b2010b62ca4177edca0e31e2114 /src/arch/instruction.h
parent1bc80837dde03a32b5ab185067f7bd4c499a9850 (diff)
Rewritten the whole instruction definition format.
Diffstat (limited to 'src/arch/instruction.h')
-rw-r--r--src/arch/instruction.h44
1 files changed, 27 insertions, 17 deletions
diff --git a/src/arch/instruction.h b/src/arch/instruction.h
index ca047b7..0f6eac6 100644
--- a/src/arch/instruction.h
+++ b/src/arch/instruction.h
@@ -53,12 +53,6 @@ typedef struct _GArchInstruction GArchInstruction;
typedef struct _GArchInstructionClass GArchInstructionClass;
-/* Indique le type défini pour une instruction d'architecture. */
-GType g_arch_instruction_get_type(void);
-
-/* Indique l'encodage d'une instruction de façon détaillée. */
-const char *g_arch_instruction_get_encoding(const GArchInstruction *);
-
/* Drapeaux pour informations complémentaires */
typedef enum _ArchInstrFlag
{
@@ -68,12 +62,36 @@ typedef enum _ArchInstrFlag
} ArchInstrFlag;
+/* Type pour les types d'instructions */
+typedef uint16_t itid_t;
+
+/* Types de crochet de traitement */
+typedef enum _InstrProcessHook
+{
+ IPH_FETCH, /* Itinéraire de désassemblage */
+ IPH_LINK, /* Edition des liens */
+ IPH_POST, /* Résolution des symboles */
+
+ IPH_COUNT
+
+} InstrProcessHook;
+
+
+/* Indique le type défini pour une instruction d'architecture. */
+GType g_arch_instruction_get_type(void);
+
+/* Indique l'encodage d'une instruction de façon détaillée. */
+const char *g_arch_instruction_get_encoding(const GArchInstruction *);
+
/* Ajoute une information complémentaire à une instruction. */
bool g_arch_instruction_set_flag(GArchInstruction *, ArchInstrFlag);
/* Fournit les informations complémentaires d'une instruction. */
ArchInstrFlag g_arch_instruction_get_flags(const GArchInstruction *);
+/* Fournit l'identifiant unique pour un ensemble d'instructions. */
+itid_t g_arch_instruction_get_type_id(const GArchInstruction *instr);
+
/**
* La définition de "GArchProcessor", utile aux traitements complémentaires, ne peut
@@ -87,17 +105,6 @@ ArchInstrFlag g_arch_instruction_get_flags(const GArchInstruction *);
typedef struct _GArchProcessor GArchProcessor;
-/* Types de crochet de traitement */
-typedef enum _InstrProcessHook
-{
- IPH_FETCH, /* Itinéraire de désassemblage */
- IPH_LINK, /* Edition des liens */
- IPH_POST, /* Résolution des symboles */
-
- IPH_COUNT
-
-} InstrProcessHook;
-
/* Complète un désassemblage accompli pour une instruction. */
typedef void (* instr_hook_fc) (GArchInstruction *, GArchProcessor *, GProcContext *, GExeFormat *);
@@ -251,6 +258,9 @@ const char *g_arch_instruction_get_keyword(GArchInstruction *, AsmSyntax);
/* Construit un petit résumé concis de l'instruction. */
char *g_arch_instruction_build_tooltip(const GArchInstruction *);
+/* Fournit une description pour l'instruction manipulée. */
+const char *g_arch_instruction_get_description(const GArchInstruction *);
+
#endif /* _ARCH_INSTRUCTION_H */