summaryrefslogtreecommitdiff
path: root/src/arch/x86/instruction.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2008-09-20 15:28:57 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2008-09-20 15:28:57 (GMT)
commit2ccf097c9344465944089bebbc2ffd66ac93e1fd (patch)
tree74c535a32198bb04139cd85431e7c6ed780c5973 /src/arch/x86/instruction.h
parent286c0872cc37d3dd6c2633cb61e4680123015d52 (diff)
Centralized all the code used to decode instructions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@32 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/x86/instruction.h')
-rw-r--r--src/arch/x86/instruction.h39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/arch/x86/instruction.h b/src/arch/x86/instruction.h
index 68a5fff..8ef603f 100644
--- a/src/arch/x86/instruction.h
+++ b/src/arch/x86/instruction.h
@@ -40,7 +40,12 @@ typedef enum _X86Opcodes
{
X86_OP_SUB_R1632_RM1632, /* sub ([0x66] 0x29) */
- X86_OP_XOR_REG1632, /* xor ([0x66] 0x31) */
+ X86_OP_XOR_RM8_R8, /* xor (0x30) */
+ X86_OP_XOR_RM1632_R1632, /* xor ([0x66] 0x31) */
+ X86_OP_XOR_R8_RM8, /* xor (0x32) */
+ X86_OP_XOR_R1632_RM1632, /* xor ([0x66] 0x33) */
+ X86_OP_XOR_AL_IMM8, /* xor (0x34) */
+ X86_OP_XOR_E_AX_IMM1632, /* xor ([0x66] 0x35) */
X86_OP_CMP_RM1632_R1632, /* cmp ([0x66] 0x39) */
@@ -85,25 +90,27 @@ typedef enum _X86Opcodes
X86_OP_JE_8, /* je (0x74) */
X86_OP_JNE_8, /* jne (0x75) */
+ X86_OP_XOR_RM8_IMM8, /* xor (0x81 6) */
X86_OP_CMP_RM8_IMM8, /* cmp (0x80 7) */
- X86_OP_ADD_IMM1632_REG1632, /* add ([0x66] 0x81 0) */
+ X86_OP_ADD_RM1632_IMM1632, /* add ([0x66] 0x81 0) */
+ X86_OP_XOR_RM1632_IMM1632, /* xor ([0x66] 0x81 6) */
- X86_OP_ADD8_REG1632, /* add ([0x66] 0x83 0) */
- X86_OP_OR8_REG1632, /* or ([0x66] 0x83 1) */
- X86_OP_ADC8_REG1632, /* adc ([0x66] 0x83 2) */
- X86_OP_SBB8_REG1632, /* sbb ([0x66] 0x83 3) */
- X86_OP_AND8_REG1632, /* and ([0x66] 0x83 4) */
- X86_OP_SUB8_REG1632, /* sub ([0x66] 0x83 5) */
- X86_OP_XOR8_REG1632, /* xor ([0x66] 0x83 6) */
+ X86_OP_ADD_RM1632_IMM8, /* add ([0x66] 0x83 0) */
+ X86_OP_OR_RM1632_IMM8, /* or ([0x66] 0x83 1) */
+ X86_OP_ADC_RM1632_IMM8, /* adc ([0x66] 0x83 2) */
+ X86_OP_SBB_RM1632_IMM8, /* sbb ([0x66] 0x83 3) */
+ X86_OP_AND_RM1632_IMM8, /* and ([0x66] 0x83 4) */
+ X86_OP_SUB_RM1632_IMM8, /* sub ([0x66] 0x83 5) */
+ X86_OP_XOR_RM1632_IMM8, /* xor ([0x66] 0x83 6) */
X86_OP_CMP_RM1632_IMM8, /* cmp ([0x66] 0x08 7) */
- X86_OP_TEST_RM8, /* test ([0x66] 0x84) */
- X86_OP_TEST_RM1632, /* test ([0x66] 0x85) */
+ X86_OP_TEST_RM8_R8, /* test ([0x66] 0x84) */
+ X86_OP_TEST_RM1632_R1632, /* test ([0x66] 0x85) */
- X86_OP_MOV_REG1632, /* mov ([0x66] 0x89) */
+ X86_OP_MOV_RM1632_R1632, /* mov ([0x66] 0x89) */
- X86_OP_MOV_FROM_CONTENT1632, /* mov ([0x66] 0x8b) */
+ X86_OP_MOV_R1632_RM1632, /* mov ([0x66] 0x8b) */
X86_OP_LEA, /* lea ([0x66] 0x8d) */ /* 66 ? */
@@ -131,20 +138,20 @@ typedef enum _X86Opcodes
X86_OP_RET, /* ret (0xc3) */
X86_OP_MOV_IMM8_TO_RM8, /* mov (0xc6) */
- X86_OP_MOV_TO_CONTENT1632, /* mov ([0x66] 0xc7) */
+ X86_OP_MOV_IMM1632_TO_RM1632, /* mov ([0x66] 0xc7) */
X86_OP_LEAVE, /* leave (0xc9) */
X86_OP_INT, /* int (0xcd) */
- X86_OP_CALL, /* call (0xe8) */
+ X86_OP_CALL_REL1632, /* call ([0x66] 0xe8) */
X86_OP_JMP_8, /* jmp (0xeb) */
X86_OP_HLT, /* hlt (0xf4) */
X86_OP_CALL_RM1632, /* call ([0x66] 0xff 2) */
- X86_OP_PUSH_CONTENT, /* push ([0x66] 0xff 6) */ /* 66 ? */
+ X86_OP_PUSH_RM1632, /* push ([0x66] 0xff 6) */
X86_OP_COUNT