summaryrefslogtreecommitdiff
path: root/src/arch/operand.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/operand.h')
-rw-r--r--src/arch/operand.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/arch/operand.h b/src/arch/operand.h
index 9e1b5a8..f8d2536 100644
--- a/src/arch/operand.h
+++ b/src/arch/operand.h
@@ -41,6 +41,23 @@
typedef struct _GLoadedBinary GLoadedBinary;
+/* Indications supplémentaires liées aux opérandes */
+
+#define AOF_USER_BIT 1
+
+typedef enum _ArchOperandFlag
+{
+ AOF_NONE = (0 << 0), /* Aucune propriété */
+ AOF_READ_ONLY = (1 << 0), /* Indication de nature */
+
+ AOF_LOW_USER = (1 << AOF_USER_BIT), /* Premier bit disponible */
+ AOF_HIGH_USER = (1 << 7), /* Dernier bit disponible */
+
+} ArchOperandFlag;
+
+#define AOF_USER_FLAG(n) (1 << (AOF_USER_BIT + n))
+
+
#define G_TYPE_ARCH_OPERAND g_arch_operand_get_type()
#define G_ARCH_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_ARCH_OPERAND, GArchOperand))
#define G_IS_ARCH_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_ARCH_OPERAND))
@@ -74,6 +91,18 @@ void g_arch_operand_print(const GArchOperand *, GBufferLine *);
/* Construit un petit résumé concis de l'opérande. */
char *g_arch_operand_build_tooltip(const GArchOperand *, const GLoadedBinary *);
+/* Ajoute une information complémentaire à un opérande. */
+bool g_arch_operand_set_flag(GArchOperand *, ArchOperandFlag);
+
+/* Retire une information complémentaire à un opérande. */
+bool g_arch_operand_unset_flag(GArchOperand *, ArchOperandFlag);
+
+/* Détermine si un opérande possède un fanion particulier. */
+bool g_arch_operand_has_flag(const GArchOperand *, ArchOperandFlag);
+
+/* Fournit les particularités de l'opérande. */
+ArchOperandFlag g_arch_operand_get_flags(const GArchOperand *);
+
/* --------------------- TRANSPOSITIONS VIA CACHE DES OPERANDES --------------------- */