diff options
Diffstat (limited to 'src/arch/operand.h')
-rw-r--r-- | src/arch/operand.h | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/src/arch/operand.h b/src/arch/operand.h index 9e1b5a8..234ee64 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)) @@ -71,23 +88,32 @@ GArchOperand *g_arch_operand_get_inner_operand_from_path(const GArchOperand *, c /* Traduit un opérande en version humainement lisible. */ void g_arch_operand_print(const GArchOperand *, GBufferLine *); +#ifdef INCLUDE_GTK_SUPPORT + /* Construit un petit résumé concis de l'opérande. */ char *g_arch_operand_build_tooltip(const GArchOperand *, const GLoadedBinary *); +#endif +/* Ajoute une information complémentaire à un opérande. */ +bool g_arch_operand_set_flag(GArchOperand *, ArchOperandFlag); -/* --------------------- TRANSPOSITIONS VIA CACHE DES OPERANDES --------------------- */ +/* 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 *); -/* Depuis "storage.h" : définition d'une conservation d'instructions d'assemblage (instance) */ -typedef struct _GAsmStorage GAsmStorage; -/* Charge un opérande depuis une mémoire tampon. */ -GArchOperand *g_arch_operand_load(GAsmStorage *, GBinFormat *, packed_buffer_t *); +/* --------------------- TRANSPOSITIONS VIA CACHE DES OPERANDES --------------------- */ + -/* Sauvegarde un opérande dans une mémoire tampon. */ -bool g_arch_operand_store(const GArchOperand *, GAsmStorage *, packed_buffer_t *); +/* Depuis "storage.h" : définition d'une conservation d'instructions d'assemblage (instance) */ +typedef struct _GAsmStorage GAsmStorage; |