summaryrefslogtreecommitdiff
path: root/src/arch/x86/operand.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/operand.h')
-rw-r--r--src/arch/x86/operand.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/src/arch/x86/operand.h b/src/arch/x86/operand.h
index fc40b38..2d8232d 100644
--- a/src/arch/x86/operand.h
+++ b/src/arch/x86/operand.h
@@ -169,6 +169,30 @@ GArchOperand *g_x86_moffs_operand_new(const bin_t *, off_t *, off_t, AsmOperandS
+/* ---------------------- OPERANDES DE MANIPULATION DE DONNEES ---------------------- */
+
+
+#define G_TYPE_X86_DATA_OPERAND g_x86_data_operand_get_type()
+#define G_X86_DATA_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_x86_data_operand_get_type(), GX86DataOperand))
+#define G_IS_X86_DATA_OPERAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_x86_data_operand_get_type()))
+#define G_X86_DATA_OPERAND_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_x86_data_operand_get_type(), GX86DataOperandIface))
+
+
+/* Définition d'un opérande x86 de manipulation de données (instance) */
+typedef struct _GX86DataOperand GX86DataOperand;
+
+/* Définition d'un opérande x86 de manipulation de données (classe) */
+typedef struct _GX86DataOperandClass GX86DataOperandClass;
+
+
+/* Indique le type défini par la GLib pour un opérande x86 de manipulation de données. */
+GType g_x86_data_operand_get_type(void);
+
+/* Crée un opérande x86 de manipulation de données. */
+GArchOperand *g_x86_data_operand_new(MemoryDataSize, bool);
+
+
+
/* ------------------------- AIDE A LA CREATION D'OPERANDES ------------------------- */
@@ -177,10 +201,12 @@ GArchOperand *g_x86_moffs_operand_new(const bin_t *, off_t *, off_t, AsmOperandS
#define X86_OTP_IMM_TYPE 0x8000
#define X86_OTP_REG_TYPE 0x4000
#define X86_OTP_RM_TYPE 0x2000
+#define X86_OTP_DATA_TYPE 0x1000
-#define X86_OTP_IMM(b) X86_OTP_IMM_TYPE | (1 << b)
-#define X86_OTP_REG(b) X86_OTP_REG_TYPE | (1 << b)
-#define X86_OTP_RM(b) X86_OTP_RM_TYPE | (1 << b)
+#define X86_OTP_IMM(b) X86_OTP_IMM_TYPE | (1 << b)
+#define X86_OTP_REG(b) X86_OTP_REG_TYPE | (1 << b)
+#define X86_OTP_RM(b) X86_OTP_RM_TYPE | (1 << b)
+#define X86_OTP_DATA(b) X86_OTP_DATA_TYPE | (1 << b)
/* Types d'opérandes supportés */
typedef enum _X86OperandType
@@ -200,6 +226,11 @@ typedef enum _X86OperandType
X86_OTP_RM8 = X86_OTP_RM(1), /* Registre 8 bits ou mémoire */
X86_OTP_RM1632 = X86_OTP_RM(2), /* Registre 16/32b ou mémoire */
+ X86_OTP_DST_8 = X86_OTP_DATA(1), /* Emplacement sur 8 bits */
+ X86_OTP_DST_1632 = X86_OTP_DATA(2), /* Emplacement sur 16/32 bits */
+ X86_OTP_SRC_8 = X86_OTP_DATA(3), /* Emplacement sur 8 bits */
+ X86_OTP_SRC_1632 = X86_OTP_DATA(4), /* Emplacement sur 16/32 bits */
+
X86_OTP_CL = 0x0ffd, /* Registre cl */
X86_OTP_AL = 0x0ffe, /* Registre al */
X86_OTP_E_AX = 0x0fff /* Registre eax ou ax */