summaryrefslogtreecommitdiff
path: root/src/arch/operand-int.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/operand-int.h')
-rw-r--r--src/arch/operand-int.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/arch/operand-int.h b/src/arch/operand-int.h
index f09d9a9..49470a4 100644
--- a/src/arch/operand-int.h
+++ b/src/arch/operand-int.h
@@ -29,22 +29,36 @@
+/* Types d'opérandes rencontrables */
+typedef enum _AsmOperandType
+{
+ AOT_NONE, /* Type d'opérande inconnu ! */
+ AOT_IMM, /* Valeur immédiate */
+ AOT_REG, /* Registre quelconque */
+ AOT_MEM /* Accès à la mémoire */
+
+} AsmOperandType;
/* Définition générique d'une opérande */
struct _asm_operand
{
-
+ AsmOperandType type; /* Type d'opérande */
+ AsmOperandSize size; /* Taille de l'opérande */
union
{
uint8_t val8; /* Valeur sur 8 bits */
+ uint16_t val16; /* Valeur sur 16 bits */
+ uint32_t val32; /* Valeur sur 32 bits */
+ uint64_t val64; /* Valeur sur 64 bits */
} value;
+};
-};
+#define ASM_OPERAND(o) ((asm_operand *)o)