summaryrefslogtreecommitdiff
path: root/src/arch/x86/instruction.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2010-08-16 23:04:49 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2010-08-16 23:04:49 (GMT)
commit9ed927a6b6405633a82f378438c533fd0112f16d (patch)
tree69875ffb288bf0dcd57a3b7cee546eca85115914 /src/arch/x86/instruction.h
parentdb70af80e01199bd2329f0363b9f7769dee1a783 (diff)
Supported several extra x86 instructions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@181 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/x86/instruction.h')
-rw-r--r--src/arch/x86/instruction.h71
1 files changed, 52 insertions, 19 deletions
diff --git a/src/arch/x86/instruction.h b/src/arch/x86/instruction.h
index 0fc7513..bd57ff6 100644
--- a/src/arch/x86/instruction.h
+++ b/src/arch/x86/instruction.h
@@ -35,6 +35,8 @@ typedef enum _X86Prefix X86Prefix;
/* Enumération de tous les opcodes */
typedef enum _X86Opcodes
{
+ /* Instructions avec opcode sur un octet */
+
XOP_ADD_RM8_R8, /* add (0x00) */
XOP_ADD_RM1632_R1632, /* add ([0x66] 0x01) */
XOP_ADD_R8_RM8, /* add (0x02) */
@@ -48,26 +50,10 @@ typedef enum _X86Opcodes
XOP_OR_R1632_RM1632, /* or ([0x66] 0x0b) */
XOP_OR_AL_IMM8, /* or (0x0c) */
- XOP_JE_REL1632, /* je ([0x66] 0x0f 0x84) */
- XOP_JNE_REL1632, /* jne ([0x66] 0x0f 0x85) */
- XOP_JBE_REL1632, /* jbe ([0x66] 0x0f 0x86) */
- XOP_JA_REL1632, /* jne ([0x66] 0x0f 0x87) */
-
- XOP_JGE_REL1632, /* jge ([0x66] 0x0f 0x8d) */
- XOP_JLE_REL1632, /* jle ([0x66] 0x0f 0x8e) */
- XOP_JG_REL1632, /* jle ([0x66] 0x0f 0x8f) */
-
- XOP_SETE_RM8, /* sete ([0x66] 0x0f 0x94) */
- XOP_SETNE_RM8, /* setne ([0x66] 0x0f 0x95) */
-
- XOP_SETL_RM8, /* setl ([0x66] 0x0f 0x9c) */
-
- XOP_MOVZX_R1632_RM8, /* movzx ([0x66] 0x0f 0xb6) */
- XOP_MOVSX_R1632_RM8, /* movsx ([0x66] 0x0f 0xbe) */
- XOP_MOVSX_R1632_RM1632, /* movsx ([0x66] 0x0f 0xbf) */
-
XOP_ADC_RM8_R8, /* adc (0x10) */
+ XOP_SBB_RM1632_R1632, /* and ([0x66] 0x19) */
+
XOP_AND_RM8_R8, /* and (0x20) */
XOP_AND_RM1632_R1632, /* and ([0x66] 0x21) */
@@ -77,6 +63,7 @@ typedef enum _X86Opcodes
XOP_SUB_RM1632_R1632, /* sub ([0x66] 0x29) */
XOP_SUB_R8_RM8, /* sub (0x2a) */
+ XOP_SUB_R1632_RM1632, /* sub ([0x66] 0x2b) */
XOP_SUB_AL_IMM8, /* sub (0x2c) */
XOP_SUB_E_AX_IMM1632, /* sub ([0x66] 0x2d) */
@@ -89,9 +76,12 @@ typedef enum _X86Opcodes
XOP_XOR_AL_IMM8, /* xor (0x34) */
XOP_XOR_E_AX_IMM1632, /* xor ([0x66] 0x35) */
+ XOP_CMP_RM8_R8, /* cmp (0x38) */
XOP_CMP_RM1632_R1632, /* cmp ([0x66] 0x39) */
XOP_CMP_R1632_RM1632, /* cmp ([0x66] 0x3b) */
+ XOP_CMP_AL_IMM8, /* cmp (0x3c) */
+ XOP_CMP_E_AX_IMM1632, /* cmp ([0x66] 0x3d) */
XOP_INC_E_AX, /* inc ([0x66] 0x40) */
@@ -216,6 +206,7 @@ typedef enum _X86Opcodes
XOP_MOVS_M1632_M1632, /* movs ([0x66] 0xa5) */
+ XOP_CMPS_M8_M8, /* cmps (0xa6) */
XOP_TEST_AL_IMM8, /* test (0xa8) */
XOP_TEST_E_AX_IMM1632, /* test ([0x66] 0xa9) */
@@ -292,6 +283,47 @@ typedef enum _X86Opcodes
XOP_JMP_RM1632, /* jmp ([0x66] 0xff 4) */
XOP_PUSH_RM1632, /* push ([0x66] 0xff 6) */
+ /* Instructions avec opcode sur deux octets */
+
+ XOP_JO_REL1632, /* jo (0x0f 0x80) */
+ XOP_JNO_REL1632, /* jno (0x0f 0x81) */
+ XOP_JB_REL1632, /* jb (0x0f 0x82) */
+ XOP_JNB_REL1632, /* jnb (0x0f 0x83) */
+ XOP_JE_REL1632, /* je (0x0f 0x84) */
+ XOP_JNE_REL1632, /* jne (0x0f 0x85) */
+ XOP_JNA_REL1632, /* jna (0x0f 0x86) */
+ XOP_JA_REL1632, /* ja (0x0f 0x87) */
+ XOP_JS_REL1632, /* js (0x0f 0x88) */
+ XOP_JNS_REL1632, /* jns (0x0f 0x89) */
+ XOP_JP_REL1632, /* jp (0x0f 0x8a) */
+ XOP_JNP_REL1632, /* jnp (0x0f 0x8b) */
+ XOP_JL_REL1632, /* jl (0x0f 0x8c) */
+ XOP_JNL_REL1632, /* jnl (0x0f 0x8d) */
+ XOP_JNG_REL1632, /* jng (0x0f 0x8e) */
+ XOP_JG_REL1632, /* jg (0x0f 0x8f) */
+ XOP_SETO_RM8, /* seto (0x0f 0x90) */
+ XOP_SETNO_RM8, /* setno (0x0f 0x91) */
+ XOP_SETB_RM8, /* setb (0x0f 0x92) */
+ XOP_SETNB_RM8, /* setnb (0x0f 0x93) */
+ XOP_SETE_RM8, /* sete (0x0f 0x94) */
+ XOP_SETNE_RM8, /* setne (0x0f 0x95) */
+ XOP_SETNA_RM8, /* setna (0x0f 0x96) */
+ XOP_SETA_RM8, /* seta (0x0f 0x97) */
+ XOP_SETS_RM8, /* sets (0x0f 0x98) */
+ XOP_SETNS_RM8, /* setns (0x0f 0x99) */
+ XOP_SETP_RM8, /* setp (0x0f 0x9a) */
+ XOP_SETNP_RM8, /* setnp (0x0f 0x9b) */
+ XOP_SETL_RM8, /* setl (0x0f 0x9c) */
+ XOP_SETNL_RM8, /* setnl (0x0f 0x9d) */
+ XOP_SETNG_RM8, /* setng (0x0f 0x9e) */
+ XOP_SETG_RM8, /* setg (0x0f 0x9f) */
+
+
+
+ XOP_MOVZX_R1632_RM8, /* movzx ([0x66] 0x0f 0xb6) */
+ XOP_MOVSX_R1632_RM8, /* movsx ([0x66] 0x0f 0xbe) */
+ XOP_MOVSX_R1632_RM1632, /* movsx ([0x66] 0x0f 0xbf) */
+
XOP_COUNT
} X86Opcodes;
@@ -334,7 +366,8 @@ enum _X86Prefix
XPX_OPERAND_SIZE_OVERRIDE = (1 << 0), /* Taille des opérandes */
- XPX_REPEAT_STRING_OPERATION = (1 << 2), /* Boucle pour les chaînes */
+ XPX_REPEAT_STR_OPERATION_F2 = (1 << 1), /* Boucle pour les chaînes #1 */
+ XPX_REPEAT_STR_OPERATION_F3 = (1 << 2), /* Boucle pour les chaînes #2 */
XPX_TWO_BYTES = (1 << 3) /* Instruction sur deux octets */