summaryrefslogtreecommitdiff
path: root/src/arch/operand-int.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2008-07-27 19:38:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2008-07-27 19:38:15 (GMT)
commit1bf9c5ebe8bb3326e10491974cd43b221e2a56a1 (patch)
tree01a745a798661478eb7a6e02c0a0831bb1b4950c /src/arch/operand-int.h
parentdbf4d1f93e54251568854bff0ebc9c84f60857f6 (diff)
Supported new x86 opcodes (nop and mov).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@7 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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)