diff options
Diffstat (limited to 'src/arch/operand.h')
-rw-r--r-- | src/arch/operand.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/arch/operand.h b/src/arch/operand.h index 0a00d9f..fab1344 100644 --- a/src/arch/operand.h +++ b/src/arch/operand.h @@ -36,14 +36,25 @@ typedef enum _AsmOperandSize { AOS_UNDEFINED, /* Taille non définie */ - AOS_8_BITS, /* Opérande sur 8 bits */ - AOS_16_BITS, /* Opérande sur 16 bits */ - AOS_32_BITS, /* Opérande sur 32 bits */ - AOS_64_BITS /* Opérande sur 64 bits */ + AOS_8_BITS_UNSIGNED, /* Opérande sur 8 bits n.-s. */ + AOS_16_BITS_UNSIGNED, /* Opérande sur 16 bits n.-s. */ + AOS_32_BITS_UNSIGNED, /* Opérande sur 32 bits n.-s. */ + AOS_64_BITS_UNSIGNED, /* Opérande sur 64 bits n.-s. */ + + AOS_8_BITS_SIGNED, /* Opérande sur 8 bits signés */ + AOS_16_BITS_SIGNED, /* Opérande sur 16 bits signés */ + AOS_32_BITS_SIGNED, /* Opérande sur 32 bits signés */ + AOS_64_BITS_SIGNED /* Opérande sur 64 bits signés */ } AsmOperandSize; +#define AOS_8_BITS AOS_8_BITS_UNSIGNED +#define AOS_16_BITS AOS_16_BITS_UNSIGNED +#define AOS_32_BITS AOS_32_BITS_UNSIGNED +#define AOS_64_BITS AOS_64_BITS_UNSIGNED + + /* Définition générique d'une opérande */ typedef struct _asm_operand asm_operand; @@ -67,6 +78,9 @@ void print_db_operand(const asm_operand *, char *, size_t, AsmSyntax); /* Lit une valeur (signée ou non) sur x bits. */ bool read_imm_value(AsmOperandSize, const uint8_t *, off_t *, off_t, ...); +/* Indique le signe d'une valeur immédiate. */ +bool is_imm_operand_negative(const asm_operand *); + /* Crée une opérande contenant une valeur sur x bits. */ bool fill_imm_operand(asm_operand *, AsmOperandSize, const uint8_t *, off_t *, off_t); |