1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox disassembler:
|
---|
4 | * Tables for x64 (long mode)
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2006-2007 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 |
|
---|
20 | /*******************************************************************************
|
---|
21 | * Header Files *
|
---|
22 | *******************************************************************************/
|
---|
23 | #ifdef USING_VISUAL_STUDIO
|
---|
24 | # include <stdafx.h>
|
---|
25 | #endif
|
---|
26 | #include <VBox/dis.h>
|
---|
27 | #include <VBox/disopcode.h>
|
---|
28 | #include "DisasmTables.h"
|
---|
29 | #include "DisasmInternal.h"
|
---|
30 |
|
---|
31 |
|
---|
32 | /** @def O
|
---|
33 | * Wrapper which initializes an OPCODE.
|
---|
34 | * We must use this so that we can exclude unused fields in order
|
---|
35 | * to save precious bytes in the GC version.
|
---|
36 | *
|
---|
37 | * @internal
|
---|
38 | */
|
---|
39 | #ifndef DIS_CORE_ONLY
|
---|
40 | # define OP(pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype) \
|
---|
41 | { pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype }
|
---|
42 | #else
|
---|
43 | # define OP(pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype) \
|
---|
44 | { idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype }
|
---|
45 | #endif
|
---|
46 |
|
---|
47 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
---|
48 | //TODO: Verify tables for correctness
|
---|
49 | //TODO: opcode type (harmless, potentially dangerous, dangerous)
|
---|
50 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
---|
51 |
|
---|
52 | #ifndef DIS_CORE_ONLY
|
---|
53 | static char SZINVALID_OPCODE[] = "Invalid Opcode";
|
---|
54 | #endif
|
---|
55 |
|
---|
56 | #define INVALID_OPCODE \
|
---|
57 | OP(SZINVALID_OPCODE, 0, 0, 0, OP_INVALID, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_INVALID)
|
---|
58 |
|
---|
59 | #define INVALID_OPCODE_BLOCK \
|
---|
60 | INVALID_OPCODE,\
|
---|
61 | INVALID_OPCODE,\
|
---|
62 | INVALID_OPCODE,\
|
---|
63 | INVALID_OPCODE,\
|
---|
64 | INVALID_OPCODE,\
|
---|
65 | INVALID_OPCODE,\
|
---|
66 | INVALID_OPCODE,\
|
---|
67 | INVALID_OPCODE,\
|
---|
68 | INVALID_OPCODE,\
|
---|
69 | INVALID_OPCODE,\
|
---|
70 | INVALID_OPCODE,\
|
---|
71 | INVALID_OPCODE,\
|
---|
72 | INVALID_OPCODE,\
|
---|
73 | INVALID_OPCODE,\
|
---|
74 | INVALID_OPCODE,\
|
---|
75 | INVALID_OPCODE,
|
---|
76 |
|
---|
77 | /* Tables for the elegant Intel X64 instruction set */
|
---|
78 |
|
---|
79 | const OPCODE g_aOneByteMapX64[256] =
|
---|
80 | {
|
---|
81 | /* 0 */
|
---|
82 | OP("add %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
83 | OP("add %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
84 | OP("add %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
85 | OP("add %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
86 | OP("add AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_ADD, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
87 | OP("add %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_ADD, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
88 | INVALID_OPCODE,
|
---|
89 | INVALID_OPCODE,
|
---|
90 | OP("or %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
91 | OP("or %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
92 | OP("or %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
93 | OP("or %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
94 | OP("or AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_OR, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
95 | OP("or %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_OR, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
96 | INVALID_OPCODE,
|
---|
97 | OP("2-BYTE ESCAPE", IDX_ParseTwoByteEsc,0, 0, OP_2B_ESC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
98 |
|
---|
99 | /* 1 */
|
---|
100 | OP("adc %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
101 | OP("adc %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
102 | OP("adc %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
103 | OP("adc %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
104 | OP("adc AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_ADC, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
105 | OP("adc %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_ADC, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
106 | INVALID_OPCODE,
|
---|
107 | INVALID_OPCODE,
|
---|
108 | OP("sbb %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
109 | OP("sbb %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
110 | OP("sbb %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
111 | OP("sbb %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
112 | OP("sbb AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_SBB, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
113 | OP("sbb %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_SBB, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
114 | INVALID_OPCODE,
|
---|
115 | INVALID_OPCODE,
|
---|
116 |
|
---|
117 | /* 2 */
|
---|
118 | OP("and %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
119 | OP("and %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
120 | OP("and %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
121 | OP("and %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
122 | OP("and AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_AND, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
123 | OP("and %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_AND, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
124 | OP("SEG ES", 0, 0, 0, OP_SEG, OP_PARM_REG_ES, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
125 | INVALID_OPCODE,
|
---|
126 | OP("sub %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
127 | OP("sub %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
128 | OP("sub %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
129 | OP("sub %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
130 | OP("sub AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_SUB, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
131 | OP("sub %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_SUB, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
132 | /* Branch not taken hint prefix for branches on a Pentium 4 or Xeon CPU (or higher)! */
|
---|
133 | OP("SEG CS", 0, 0, 0, OP_SEG, OP_PARM_REG_CS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
134 | INVALID_OPCODE,
|
---|
135 |
|
---|
136 | /* 3 */
|
---|
137 | OP("xor %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
138 | OP("xor %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
139 | OP("xor %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
140 | OP("xor %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
141 | OP("xor AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_XOR, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
142 | OP("xor %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_XOR, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
143 | OP("SEG SS", 0, 0, 0, OP_SEG, OP_PARM_REG_SS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
144 | INVALID_OPCODE,
|
---|
145 | OP("cmp %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
146 | OP("cmp %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
147 | OP("cmp %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
148 | OP("cmp %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
149 | OP("cmp AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_CMP, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
150 | OP("cmp %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_CMP, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
151 | /* Branch not taken hint prefix for branches on a Pentium 4 or Xeon CPU (or higher)! */
|
---|
152 | OP("SEG DS", 0, 0, 0, OP_SEG, OP_PARM_REG_DS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
153 | INVALID_OPCODE,
|
---|
154 |
|
---|
155 | /* 4 */
|
---|
156 | OP("REX", 0, 0, 0, OP_REX, OP_PARM_REX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
157 | OP("REX.B", 0, 0, 0, OP_REX, OP_PARM_REX_B, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
158 | OP("REX.X", 0, 0, 0, OP_REX, OP_PARM_REX_X, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
159 | OP("REX.XB", 0, 0, 0, OP_REX, OP_PARM_REX_XB, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
160 | OP("REX.R", 0, 0, 0, OP_REX, OP_PARM_REX_R, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
161 | OP("REX.RB", 0, 0, 0, OP_REX, OP_PARM_REX_RB, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
162 | OP("REX.RX", 0, 0, 0, OP_REX, OP_PARM_REX_RX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
163 | OP("REX.RXB", 0, 0, 0, OP_REX, OP_PARM_REX_RXB, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
164 | OP("REX.W", 0, 0, 0, OP_REX, OP_PARM_REX_W, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
165 | OP("REX.WB", 0, 0, 0, OP_REX, OP_PARM_REX_WB, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
166 | OP("REX.WX", 0, 0, 0, OP_REX, OP_PARM_REX_WX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
167 | OP("REX.WXB", 0, 0, 0, OP_REX, OP_PARM_REX_WXB, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
168 | OP("REX.WR", 0, 0, 0, OP_REX, OP_PARM_REX_WR, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
169 | OP("REX.WRB", 0, 0, 0, OP_REX, OP_PARM_REX_WRB, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
170 | OP("REX.WRX", 0, 0, 0, OP_REX, OP_PARM_REX_WRX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
171 | OP("REX.WRXB", 0, 0, 0, OP_REX, OP_PARM_REX_WRXB, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
172 |
|
---|
173 | /* 5 */
|
---|
174 | OP("push %eAX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
175 | OP("push %eCX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
176 | OP("push %eDX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
177 | OP("push %eBX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
178 | OP("push %eSP", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
179 | OP("push %eBP", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
180 | OP("push %eSI", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
181 | OP("push %eDI", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
182 | OP("pop %eAX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
183 | OP("pop %eCX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
184 | OP("pop %eDX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
185 | OP("pop %eBX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
186 | OP("pop %eSP", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
187 | OP("pop %eBP", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
188 | OP("pop %eSI", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
189 | OP("pop %eDI", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
190 |
|
---|
191 | /* 6 */
|
---|
192 | INVALID_OPCODE,
|
---|
193 | INVALID_OPCODE,
|
---|
194 | INVALID_OPCODE,
|
---|
195 | OP("movsxd %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSXD, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
196 | OP("SEG FS", 0, 0, 0, OP_SEG, OP_PARM_REG_FS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
197 | OP("SEG GS", 0, 0, 0, OP_SEG, OP_PARM_REG_GS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
198 | OP("OP SIZE", 0, 0, 0, OP_OPSIZE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
199 | OP("ADDR SIZE", 0, 0, 0, OP_ADDRSIZE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
200 | OP("push %Iz", IDX_ParseImmZ, 0, 0, OP_PUSH, OP_PARM_Iz, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
|
---|
201 | OP("imul %Gv,%Ev,%Iz", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmZ, OP_IMUL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_Iz, OPTYPE_HARMLESS),
|
---|
202 | OP("push %Ib", IDX_ParseImmByteSX, 0, 0, OP_PUSH, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
|
---|
203 | OP("imul %Gv,%Ev,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByteSX, OP_IMUL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_Ib, OPTYPE_HARMLESS),
|
---|
204 | OP("insb %Yb,DX", IDX_ParseYb, IDX_ParseFixedReg, 0, OP_INSB, OP_PARM_Yb, OP_PARM_REG_DX, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
|
---|
205 | OP("insw/d %Yv,DX", IDX_ParseYv, IDX_ParseFixedReg, 0, OP_INSWD, OP_PARM_Yv, OP_PARM_REG_DX, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
|
---|
206 | OP("outsb DX,%Xb", IDX_ParseFixedReg, IDX_ParseXb, 0, OP_OUTSB, OP_PARM_REG_DX, OP_PARM_Yb, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
|
---|
207 | OP("outsw/d DX,%Xv", IDX_ParseFixedReg, IDX_ParseXv, 0, OP_OUTSWD, OP_PARM_REG_DX, OP_PARM_Yv, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
|
---|
208 |
|
---|
209 |
|
---|
210 | /* 7 */
|
---|
211 | OP("jo %Jb", IDX_ParseImmBRel, 0, 0, OP_JO, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
212 | OP("jno %Jb", IDX_ParseImmBRel, 0, 0, OP_JNO, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
213 | OP("jc %Jb", IDX_ParseImmBRel, 0, 0, OP_JC, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
214 | OP("jnc %Jb", IDX_ParseImmBRel, 0, 0, OP_JNC, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
215 | OP("je %Jb", IDX_ParseImmBRel, 0, 0, OP_JE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
216 | OP("jne %Jb", IDX_ParseImmBRel, 0, 0, OP_JNE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
217 | OP("jbe %Jb", IDX_ParseImmBRel, 0, 0, OP_JBE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
218 | OP("jnbe %Jb", IDX_ParseImmBRel, 0, 0, OP_JNBE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
219 | OP("js %Jb", IDX_ParseImmBRel, 0, 0, OP_JS, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
220 | OP("jns %Jb", IDX_ParseImmBRel, 0, 0, OP_JNS, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
221 | OP("jp %Jb", IDX_ParseImmBRel, 0, 0, OP_JP, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
222 | OP("jnp %Jb", IDX_ParseImmBRel, 0, 0, OP_JNP, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
223 | OP("jl %Jb", IDX_ParseImmBRel, 0, 0, OP_JL, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
224 | OP("jnl %Jb", IDX_ParseImmBRel, 0, 0, OP_JNL, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
225 | OP("jle %Jb", IDX_ParseImmBRel, 0, 0, OP_JLE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
226 | OP("jnle %Jb", IDX_ParseImmBRel, 0, 0, OP_JNLE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
227 |
|
---|
228 | /* 8 */
|
---|
229 | OP("Imm Grp1 %Eb,%Ib", IDX_ParseImmGrpl, 0, 0, OP_IMM_GRP1,OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
230 | OP("Imm Grp1 %Ev,%Iz", IDX_ParseImmGrpl, 0, 0, OP_IMM_GRP1,OP_PARM_Ev, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
231 | INVALID_OPCODE,
|
---|
232 | OP("Imm Grp1 %Ev,%Ib", IDX_ParseImmGrpl, 0, 0, OP_IMM_GRP1,OP_PARM_Ev, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
233 | OP("test %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_TEST, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
234 | OP("test %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_TEST, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
235 | OP("xchg %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XCHG, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
236 | OP("xchg %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_XCHG, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
237 | OP("mov %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
238 | OP("mov %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
239 | OP("mov %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
240 | OP("mov %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
241 | OP("mov %Ev,%Sw", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Sw, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS),
|
---|
242 | OP("lea %Gv,%M", IDX_ParseModRM, IDX_UseModRM, 0, OP_LEA, OP_PARM_Gv, OP_PARM_M, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
243 | OP("mov %Sw,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Sw, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS | OPTYPE_INHIBIT_IRQS),
|
---|
244 | OP("pop %Ev", IDX_ParseModRM, 0, 0, OP_POP, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
245 |
|
---|
246 | /* 9 */
|
---|
247 | OP("nop/pause/xchg %eAX,%eAX", IDX_ParseNopPause, 0, 0, OP_NOP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
248 | OP("xchg %eCX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_ECX, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
249 | OP("xchg %eDX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EDX, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
250 | OP("xchg %eBX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EBX, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
251 | OP("xchg %eSP,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_ESP, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
252 | OP("xchg %eBP,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EBP, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
253 | OP("xchg %eSI,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_ESI, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
254 | OP("xchg %eDI,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EDI, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
255 | OP("cbw", 0, 0, 0, OP_CBW, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
256 | OP("cwd", 0, 0, 0, OP_CWD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
257 | INVALID_OPCODE,
|
---|
258 | OP("wait", 0, 0, 0, OP_WAIT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
259 | OP("pushf %Fv", 0, 0, 0, OP_PUSHF, OP_PARM_Fv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS | OPTYPE_DEFAULT_64_OP_SIZE),
|
---|
260 | OP("popf %Fv", 0, 0, 0, OP_POPF, OP_PARM_Fv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS | OPTYPE_DEFAULT_64_OP_SIZE),
|
---|
261 | OP("sahf", 0, 0, 0, OP_SAHF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
262 | OP("lahf", 0, 0, 0, OP_LAHF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
263 |
|
---|
264 |
|
---|
265 | /* A */
|
---|
266 | OP("mov AL,%Ob", IDX_ParseFixedReg, IDX_ParseImmAddr, 0, OP_MOV, OP_PARM_REG_AL, OP_PARM_Ob, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
267 | OP("mov %eAX,%Ov", IDX_ParseFixedReg, IDX_ParseImmAddr, 0, OP_MOV, OP_PARM_REG_EAX, OP_PARM_Ov, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
268 | OP("mov %Ob,AL", IDX_ParseImmAddr, IDX_ParseFixedReg, 0, OP_MOV, OP_PARM_Ob, OP_PARM_REG_AL, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
269 | OP("mov %Ov,%eAX", IDX_ParseImmAddr, IDX_ParseFixedReg, 0, OP_MOV, OP_PARM_Ov, OP_PARM_REG_EAX,OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
270 | OP("movsb %Xb,%Yb", IDX_ParseXb, IDX_ParseYb, 0, OP_MOVSB, OP_PARM_Xb, OP_PARM_Yb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
271 | OP("movsw/d %Xv,%Yv", IDX_ParseXv, IDX_ParseYv, 0, OP_MOVSWD, OP_PARM_Xv, OP_PARM_Yv, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
272 | OP("cmpsb %Xb,%Yb", IDX_ParseXb, IDX_ParseYb, 0, OP_CMPSB, OP_PARM_Xb, OP_PARM_Yb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
273 | OP("cmpsw/d %Xv,%Yv", IDX_ParseXv, IDX_ParseYv, 0, OP_CMPWD, OP_PARM_Xv, OP_PARM_Yv, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
274 | OP("test AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_TEST, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
275 | OP("test %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_TEST, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
276 | OP("stosb %Yb,AL", IDX_ParseYb, IDX_ParseFixedReg, 0, OP_STOSB, OP_PARM_Yb, OP_PARM_REG_AL, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
277 | OP("stosw/d %Yv,%eAX", IDX_ParseYv, IDX_ParseFixedReg, 0, OP_STOSWD, OP_PARM_Yv, OP_PARM_REG_EAX,OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
278 | OP("lodsb AL,%Xb", IDX_ParseFixedReg, IDX_ParseXb, 0, OP_LODSB, OP_PARM_REG_AL, OP_PARM_Xb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
279 | OP("lodsw/d %eAX,%Xv", IDX_ParseFixedReg, IDX_ParseXv, 0, OP_LODSWD, OP_PARM_REG_EAX, OP_PARM_Xv, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
280 | OP("scasb AL,%Xb", IDX_ParseFixedReg, IDX_ParseXb, 0, OP_SCASB, OP_PARM_REG_AL, OP_PARM_Xb, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
281 | OP("scasw/d %eAX,%Xv", IDX_ParseFixedReg, IDX_ParseXv, 0, OP_SCASWD, OP_PARM_REG_EAX, OP_PARM_Xv, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
282 |
|
---|
283 |
|
---|
284 | /* B */
|
---|
285 | OP("mov AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
286 | OP("mov CL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_CL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
287 | OP("mov DL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_DL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
288 | OP("mov BL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_BL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
289 | OP("mov AH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_AH, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
290 | OP("mov CH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_CH, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
291 | OP("mov DH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_DH, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
292 | OP("mov BH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_BH, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
293 | OP("mov %eAX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EAX, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
294 | OP("mov %eCX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_ECX, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
295 | OP("mov %eDX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EDX, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
296 | OP("mov %eBX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EBX, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
297 | OP("mov %eSP,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_ESP, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
298 | OP("mov %eBP,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EBP, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
299 | OP("mov %eSI,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_ESI, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
300 | OP("mov %eDI,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EDI, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
|
---|
301 |
|
---|
302 | /* C */
|
---|
303 | OP("Shift Grp2 %Eb,%Ib", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
304 | OP("Shift Grp2 %Ev,%Ib", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Ev, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
305 | OP("retn %Iw", IDX_ParseImmUshort, 0, 0, OP_RETN, OP_PARM_Iw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
306 | OP("retn", 0, 0, 0, OP_RETN, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
307 | INVALID_OPCODE,
|
---|
308 | INVALID_OPCODE,
|
---|
309 | /* @todo these two are actually group11 */
|
---|
310 | OP("mov %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
311 | OP("mov %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
312 | OP("enter %Iw,%Ib", IDX_ParseImmUshort, IDX_ParseImmByte, 0, OP_ENTER, OP_PARM_Iw, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
313 | OP("leave", 0, 0, 0, OP_LEAVE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
|
---|
314 | OP("retf %Iw", IDX_ParseImmUshort, 0, 0, OP_RETF, OP_PARM_Iw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW),
|
---|
315 | OP("retf", 0, 0, 0, OP_RETF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW),
|
---|
316 | OP("int 3", 0, 0, 0, OP_INT3, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_INTERRUPT),
|
---|
317 | OP("int %Ib", IDX_ParseImmByte, 0, 0, OP_INT, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_INTERRUPT),
|
---|
318 | INVALID_OPCODE,
|
---|
319 | OP("iret", 0, 0, 0, OP_IRET, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW),
|
---|
320 |
|
---|
321 | /* D */
|
---|
322 | OP("Shift Grp2 %Eb,1", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Eb, OP_PARM_1, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
323 | OP("Shift Grp2 %Ev,1", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Ev, OP_PARM_1, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
324 | OP("Shift Grp2 %Eb,CL", IDX_ParseShiftGrp2, IDX_ParseFixedReg, 0, OP_SHIFT_GRP2, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
325 | OP("Shift Grp2 %Ev,CL", IDX_ParseShiftGrp2, IDX_ParseFixedReg, 0, OP_SHIFT_GRP2, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
326 | INVALID_OPCODE,
|
---|
327 | INVALID_OPCODE,
|
---|
328 | /* setalc?? */
|
---|
329 | INVALID_OPCODE,
|
---|
330 | OP("xlat", 0, 0, 0, OP_XLAT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
331 | OP("esc 0xf0", IDX_ParseEscFP, 0, 0, OP_ESCF0, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
332 | OP("esc 0xf1", IDX_ParseEscFP, 0, 0, OP_ESCF1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
333 | OP("esc 0xf2", IDX_ParseEscFP, 0, 0, OP_ESCF2, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
334 | OP("esc 0xf3", IDX_ParseEscFP, 0, 0, OP_ESCF3, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
335 | OP("esc 0xf4", IDX_ParseEscFP, 0, 0, OP_ESCF4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
336 | OP("esc 0xf5", IDX_ParseEscFP, 0, 0, OP_ESCF5, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
337 | OP("esc 0xf6", IDX_ParseEscFP, 0, 0, OP_ESCF6, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
338 | OP("esc 0xf7", IDX_ParseEscFP, 0, 0, OP_ESCF7, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
339 |
|
---|
340 |
|
---|
341 | /* E */
|
---|
342 | OP("loopne %Jb", IDX_ParseImmBRel, 0, 0, OP_LOOPNE, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
343 | OP("loope %Jb", IDX_ParseImmBRel, 0, 0, OP_LOOPE, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
344 | OP("loop %Jb", IDX_ParseImmBRel, 0, 0, OP_LOOP, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
345 | OP("j(e)cxz %Jb", IDX_ParseImmBRel, 0, 0, OP_JECXZ, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
346 | OP("in AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_IN, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
|
---|
347 | OP("in %eAX,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_IN, OP_PARM_REG_EAX, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
|
---|
348 | OP("out %Ib,AL", IDX_ParseImmByte, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_Ib, OP_PARM_REG_AL, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
|
---|
349 | OP("out %Ib,%eAX", IDX_ParseImmByte, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_Ib, OP_PARM_REG_EAX,OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
|
---|
350 | OP("call %Jv", IDX_ParseImmVRel, 0, 0, OP_CALL, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
351 | OP("jmp %Jv", IDX_ParseImmVRel, 0, 0, OP_JMP, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
352 | INVALID_OPCODE,
|
---|
353 | OP("jmp %Jb", IDX_ParseImmBRel, 0, 0, OP_JMP, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
|
---|
354 | OP("in AL,DX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_IN, OP_PARM_REG_AL, OP_PARM_REG_DX, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
|
---|
355 | OP("in %eAX,DX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_IN, OP_PARM_REG_EAX, OP_PARM_REG_DX, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
|
---|
356 | OP("out DX,AL", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_REG_DX, OP_PARM_REG_AL, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
|
---|
357 | OP("out DX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_REG_DX, OP_PARM_REG_EAX,OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
|
---|
358 |
|
---|
359 |
|
---|
360 | /* F */
|
---|
361 | OP("lock", 0, 0, 0, OP_LOCK, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
362 | /* softice bp */
|
---|
363 | INVALID_OPCODE,
|
---|
364 | OP("repne", 0, 0, 0, OP_REPNE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
365 | OP("rep(e)", 0, 0, 0, OP_REPE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
366 | OP("hlt", 0, 0, 0, OP_HLT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_PRIVILEGED),
|
---|
367 | OP("cmc", 0, 0, 0, OP_CMC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
368 | OP("Unary Grp3 %Eb", IDX_ParseGrp3, 0, 0, OP_UNARY_GRP3, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
369 | OP("Unary Grp3 %Ev", IDX_ParseGrp3, 0, 0, OP_UNARY_GRP3, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
370 | OP("clc", 0, 0, 0, OP_CLC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
371 | OP("stc", 0, 0, 0, OP_STC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
372 | OP("cli", 0, 0, 0, OP_CLI, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
|
---|
373 | OP("sti", 0, 0, 0, OP_STI, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED | OPTYPE_INHIBIT_IRQS),
|
---|
374 | OP("cld", 0, 0, 0, OP_CLD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
375 | OP("std", 0, 0, 0, OP_STD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
376 | OP("inc/dec Grp4", IDX_ParseGrp4, 0, 0, OP_INC_GRP4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
377 | OP("Indirect Grp5", IDX_ParseGrp5, 0, 0, OP_IND_GRP5, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
|
---|
378 | };
|
---|
379 |
|
---|