summaryrefslogtreecommitdiff
path: root/src/arch/instruction.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-02-02 20:38:58 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-02-02 20:38:58 (GMT)
commit296b4ed15fd074f80266e1d22ef4ade7ee11905e (patch)
tree9ec0dc238f42c5f3b7f12e96dd1c631685c539b3 /src/arch/instruction.h
parent62f178cc3dcc889d56ba6d94f6fc8bba7b503c1a (diff)
Relied on flags for raw instructions.
Diffstat (limited to 'src/arch/instruction.h')
-rw-r--r--src/arch/instruction.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/arch/instruction.h b/src/arch/instruction.h
index 6c04acb..78f0cdb 100644
--- a/src/arch/instruction.h
+++ b/src/arch/instruction.h
@@ -54,12 +54,18 @@ typedef struct _GArchInstructionClass GArchInstructionClass;
/* Drapeaux pour informations complémentaires */
+
+#define AIF_USER_BIT 3
+
typedef enum _ArchInstrFlag
{
AIF_NONE = (0 << 0), /* Aucune information */
AIF_ROUTINE_START = (1 << 0), /* Début de routine */
AIF_RETURN_POINT = (1 << 1), /* Retour de fonction appelée */
- AIF_CALL = (1 << 2) /* Instruction d'appel */
+ AIF_CALL = (1 << 2), /* Instruction d'appel */
+
+ AIF_LOW_USER = (1 << AIF_USER_BIT), /* Premier bit disponible */
+ AIF_HIGH_USER = (1 << 14), /* Dernier bit disponible */
} ArchInstrFlag;
@@ -87,6 +93,9 @@ const char *g_arch_instruction_get_encoding(const GArchInstruction *);
/* Ajoute une information complémentaire à une instruction. */
bool g_arch_instruction_set_flag(GArchInstruction *, ArchInstrFlag);
+/* Retire une information complémentaire à une instruction. */
+bool g_arch_instruction_unset_flag(GArchInstruction *, ArchInstrFlag);
+
/* Détermine si une instruction possède un fanion particulier. */
bool g_arch_instruction_has_flag(const GArchInstruction *, ArchInstrFlag);