VirtualBox

source: vbox/trunk/src/VBox/Disassembler/DisasmTables-x86-amd64.cpp@ 105847

Last change on this file since 105847 was 105314, checked in by vboxsync, 5 months ago

Disassembler: Fix disassembly of vcvttsd2si and vcvtsd2si, bugref:9898

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 359.8 KB
Line 
1/* $Id: DisasmTables-x86-amd64.cpp 105314 2024-07-12 17:37:43Z vboxsync $ */
2/** @file
3 * VBox disassembler - Tables for X86 (32-bit and 16-bit modes).
4 */
5
6/*
7 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28
29/*********************************************************************************************************************************
30* Header Files *
31*********************************************************************************************************************************/
32#include <VBox/dis.h>
33#include <VBox/disopcode-x86-amd64.h>
34#include "DisasmInternal-x86-amd64.h"
35
36
37//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
38/// @todo Verify tables for correctness
39/// @todo opcode type (harmless, potentially dangerous, dangerous)
40//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41
42#ifndef DIS_CORE_ONLY
43static char g_szInvalidOpcode[] = "Invalid Opcode";
44#endif
45
46#define INVALID_OPCODE \
47 OP(g_szInvalidOpcode, 0, 0, 0, OP_INVALID, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_INVALID)
48#define INVALID_OPCODE_BLOCK \
49 INVALID_OPCODE,\
50 INVALID_OPCODE,\
51 INVALID_OPCODE,\
52 INVALID_OPCODE,\
53 INVALID_OPCODE,\
54 INVALID_OPCODE,\
55 INVALID_OPCODE,\
56 INVALID_OPCODE,\
57 INVALID_OPCODE,\
58 INVALID_OPCODE,\
59 INVALID_OPCODE,\
60 INVALID_OPCODE,\
61 INVALID_OPCODE,\
62 INVALID_OPCODE,\
63 INVALID_OPCODE,\
64 INVALID_OPCODE,
65
66#define INVALID_OPCODE_MOD_RM(a_Index) \
67 OP(g_szInvalidOpcode, IDX_ParseInvOpModRM, 0, 0, OP_INVALID, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_INVALID)
68#define INVALID_OPCODE_BLOCK_MOD_RM(a_UpperDigit) \
69 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 0),\
70 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 1),\
71 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 2),\
72 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 3),\
73 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 4),\
74 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 5),\
75 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 6),\
76 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 7),\
77 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 8),\
78 INVALID_OPCODE_MOD_RM(a_UpperDigit ## 9),\
79 INVALID_OPCODE_MOD_RM(a_UpperDigit ## a),\
80 INVALID_OPCODE_MOD_RM(a_UpperDigit ## b),\
81 INVALID_OPCODE_MOD_RM(a_UpperDigit ## c),\
82 INVALID_OPCODE_MOD_RM(a_UpperDigit ## d),\
83 INVALID_OPCODE_MOD_RM(a_UpperDigit ## e),\
84 INVALID_OPCODE_MOD_RM(a_UpperDigit ## f),
85
86
87/* Invalid opcode */
88const DISOPCODE g_InvalidOpcode[1] =
89{
90 INVALID_OPCODE
91};
92
93/* Tables for the elegant Intel X86 instruction set */
94const DISOPCODE g_aOneByteMapX86[256] =
95{
96 /* 0 */
97 OP("add %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
98 OP("add %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
99 OP("add %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
100 OP("add %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
101 OP("add AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_ADD, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
102 OP("add %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_ADD, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
103 OP("push ES", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ES, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
104 OP("pop ES", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ES, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
105 OP("or %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
106 OP("or %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
107 OP("or %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
108 OP("or %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
109 OP("or AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_OR, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
110 OP("or %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_OR, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
111 OP("push CS", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_CS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64 | DISOPTYPE_POTENTIALLY_DANGEROUS),
112 OP("EscTwo0f", IDX_ParseTwoByteEsc, 0, 0, OP_2B_ESC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
113
114 /* 1 */
115 OP("adc %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
116 OP("adc %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
117 OP("adc %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
118 OP("adc %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
119 OP("adc AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_ADC, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
120 OP("adc %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_ADC, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
121 OP("push SS", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_SS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64 | DISOPTYPE_RRM_DANGEROUS),
122 OP("pop SS", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_SS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_INHIBIT_IRQS | DISOPTYPE_X86_INVALID_64 | DISOPTYPE_RRM_DANGEROUS),
123 OP("sbb %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
124 OP("sbb %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
125 OP("sbb %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
126 OP("sbb %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
127 OP("sbb AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_SBB, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
128 OP("sbb %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_SBB, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
129 OP("push DS", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_DS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
130 OP("pop DS", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_DS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64 | DISOPTYPE_RRM_DANGEROUS),
131
132 /* 2 */
133 OP("and %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
134 OP("and %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
135 OP("and %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
136 OP("and %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
137 OP("and AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_AND, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
138 OP("and %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_AND, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
139 OP("SEG ES", 0, 0, 0, OP_SEG, OP_PARM_REG_ES, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
140 OP("daa", 0, 0, 0, OP_DAA, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
141 OP("sub %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
142 OP("sub %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
143 OP("sub %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
144 OP("sub %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
145 OP("sub AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_SUB, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
146 OP("sub %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_SUB, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
147 /* Branch not taken hint prefix for branches on a Pentium 4 or Xeon CPU (or higher)! */
148 OP("SEG CS", 0, 0, 0, OP_SEG, OP_PARM_REG_CS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
149 OP("das", 0, 0, 0, OP_DAS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
150
151 /* 3 */
152 OP("xor %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
153 OP("xor %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
154 OP("xor %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
155 OP("xor %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
156 OP("xor AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_XOR, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
157 OP("xor %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_XOR, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
158 OP("SEG SS", 0, 0, 0, OP_SEG, OP_PARM_REG_SS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
159 OP("aaa", 0, 0, 0, OP_AAA, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
160 OP("cmp %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
161 OP("cmp %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
162 OP("cmp %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
163 OP("cmp %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
164 OP("cmp AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_CMP, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
165 OP("cmp %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_CMP, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
166 /* Branch not taken hint prefix for branches on a Pentium 4 or Xeon CPU (or higher)! */
167 OP("SEG DS", 0, 0, 0, OP_SEG, OP_PARM_REG_DS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
168 OP("aas", 0, 0, 0, OP_AAS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
169
170 /* 4 */
171 OP("inc %eAX", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
172 OP("inc %eCX", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
173 OP("inc %eDX", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
174 OP("inc %eBX", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
175 OP("inc %eSP", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
176 OP("inc %eBP", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
177 OP("inc %eSI", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
178 OP("inc %eDI", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
179 OP("dec %eAX", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
180 OP("dec %eCX", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
181 OP("dec %eDX", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
182 OP("dec %eBX", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
183 OP("dec %eSP", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
184 OP("dec %eBP", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
185 OP("dec %eSI", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
186 OP("dec %eDI", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
187
188 /* 5 */
189 OP("push %eAX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
190 OP("push %eCX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
191 OP("push %eDX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
192 OP("push %eBX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
193 OP("push %eSP", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
194 OP("push %eBP", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
195 OP("push %eSI", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
196 OP("push %eDI", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
197 OP("pop %eAX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
198 OP("pop %eCX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
199 OP("pop %eDX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
200 OP("pop %eBX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
201 OP("pop %eSP", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
202 OP("pop %eBP", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
203 OP("pop %eSI", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
204 OP("pop %eDI", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
205
206 /* 6 */
207 OP("pusha", 0, 0, 0, OP_PUSHA, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
208 OP("popa", 0, 0, 0, OP_POPA, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
209 OP("bound %Gv,%Ma", IDX_ParseModRM, IDX_UseModRM, 0, OP_BOUND, OP_PARM_Gv, OP_PARM_Ma, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
210 OP("arpl %Ew,%Gw", IDX_ParseModRM, IDX_UseModRM, 0, OP_ARPL, OP_PARM_Ew, OP_PARM_Gw, OP_PARM_NONE, DISOPTYPE_HARMLESS),
211 OP("SEG FS", 0, 0, 0, OP_SEG, OP_PARM_REG_FS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
212 OP("SEG GS", 0, 0, 0, OP_SEG, OP_PARM_REG_GS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
213 OP("OP SIZE", 0, 0, 0, OP_OPSIZE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
214 OP("ADR SIZE", 0, 0, 0, OP_ADDRSIZE,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
215 OP("push %Iz", IDX_ParseImmZ, 0, 0, OP_PUSH, OP_PARM_Iz, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
216 OP("imul %Gv,%Ev,%Iz", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmZ, OP_IMUL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_Iz, DISOPTYPE_HARMLESS),
217 OP("push %Ib", IDX_ParseImmByteSX, 0, 0, OP_PUSH, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
218 OP("imul %Gv,%Ev,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByteSX, OP_IMUL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_Ib, DISOPTYPE_HARMLESS),
219 OP("insb %Yb,DX", IDX_ParseYb, IDX_ParseFixedReg, 0, OP_INSB, OP_PARM_Yb, OP_PARM_REG_DX, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_READ),
220 OP("insw/d %Yv,DX", IDX_ParseYv, IDX_ParseFixedReg, 0, OP_INSWD, OP_PARM_Yv, OP_PARM_REG_DX, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_READ),
221 OP("outsb DX,%Xb", IDX_ParseFixedReg, IDX_ParseXb, 0, OP_OUTSB, OP_PARM_REG_DX, OP_PARM_Yb, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_WRITE),
222 OP("outsw/d DX,%Xv", IDX_ParseFixedReg, IDX_ParseXv, 0, OP_OUTSWD, OP_PARM_REG_DX, OP_PARM_Yv, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_WRITE),
223
224
225 /* 7 */
226 OP("jo %Jb", IDX_ParseImmBRel, 0, 0, OP_JO, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
227 OP("jno %Jb", IDX_ParseImmBRel, 0, 0, OP_JNO, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
228 OP("jc %Jb", IDX_ParseImmBRel, 0, 0, OP_JC, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
229 OP("jnc %Jb", IDX_ParseImmBRel, 0, 0, OP_JNC, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
230 OP("je %Jb", IDX_ParseImmBRel, 0, 0, OP_JE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
231 OP("jne %Jb", IDX_ParseImmBRel, 0, 0, OP_JNE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
232 OP("jbe %Jb", IDX_ParseImmBRel, 0, 0, OP_JBE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
233 OP("jnbe %Jb", IDX_ParseImmBRel, 0, 0, OP_JNBE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
234 OP("js %Jb", IDX_ParseImmBRel, 0, 0, OP_JS, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
235 OP("jns %Jb", IDX_ParseImmBRel, 0, 0, OP_JNS, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
236 OP("jp %Jb", IDX_ParseImmBRel, 0, 0, OP_JP, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
237 OP("jnp %Jb", IDX_ParseImmBRel, 0, 0, OP_JNP, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
238 OP("jl %Jb", IDX_ParseImmBRel, 0, 0, OP_JL, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
239 OP("jnl %Jb", IDX_ParseImmBRel, 0, 0, OP_JNL, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
240 OP("jle %Jb", IDX_ParseImmBRel, 0, 0, OP_JLE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
241 OP("jnle %Jb", IDX_ParseImmBRel, 0, 0, OP_JNLE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
242
243 /* 8 */
244 OP("Imm Grp1 %Eb,%Ib", IDX_ParseGrp1, 0, 0, OP_IMM_GRP1,OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
245 OP("Imm Grp1 %Ev,%Iz", IDX_ParseGrp1, 0, 0, OP_IMM_GRP1,OP_PARM_Ev, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
246 OP("Imm Grp1 %Eb,%Ib", IDX_ParseGrp1, 0, 0, OP_IMM_GRP1,OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
247 OP("Imm Grp1 %Ev,%Ib", IDX_ParseGrp1, 0, 0, OP_IMM_GRP1,OP_PARM_Ev, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
248 OP("test %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_TEST, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
249 OP("test %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_TEST, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
250 OP("xchg %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XCHG, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
251 OP("xchg %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_XCHG, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
252 OP("mov %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
253 OP("mov %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
254 OP("mov %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
255 OP("mov %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
256 OP("mov %Ev,%Sw", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Sw, OP_PARM_NONE, DISOPTYPE_POTENTIALLY_DANGEROUS),
257 OP("lea %Gv,%M", IDX_ParseModRM, IDX_UseModRM, 0, OP_LEA, OP_PARM_Gv, OP_PARM_M, OP_PARM_NONE, DISOPTYPE_HARMLESS),
258 OP("mov %Sw,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Sw, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_POTENTIALLY_DANGEROUS | DISOPTYPE_INHIBIT_IRQS),
259 /** @todo this is grp 1a, actually */
260 OP("pop %Ev", IDX_ParseModRM, 0, 0, OP_POP, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
261
262 /* 9 */
263 OP("nop/pause/xchg %eAX,%eAX", IDX_ParseNopPause, 0, 0, OP_NOP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
264 OP("xchg %eCX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_ECX, OP_PARM_REG_EAX, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
265 OP("xchg %eDX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EDX, OP_PARM_REG_EAX, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
266 OP("xchg %eBX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EBX, OP_PARM_REG_EAX, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
267 OP("xchg %eSP,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_ESP, OP_PARM_REG_EAX, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
268 OP("xchg %eBP,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EBP, OP_PARM_REG_EAX, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
269 OP("xchg %eSI,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_ESI, OP_PARM_REG_EAX, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
270 OP("xchg %eDI,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EDI, OP_PARM_REG_EAX, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
271 OP("cbw", 0, 0, 0, OP_CBW, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
272 OP("cwd", 0, 0, 0, OP_CWD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
273 OP("call %Ap", IDX_ParseImmAddrF, 0, 0, OP_CALL, OP_PARM_Ap, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_INVALID_64),
274 OP("wait", 0, 0, 0, OP_WAIT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
275 OP("pushf %Fv", 0, 0, 0, OP_PUSHF, OP_PARM_Fv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_POTENTIALLY_DANGEROUS),
276 OP("popf %Fv", 0, 0, 0, OP_POPF, OP_PARM_Fv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_X86_DEFAULT_64_OP_SIZE | DISOPTYPE_POTENTIALLY_DANGEROUS),
277 OP("sahf", 0, 0, 0, OP_SAHF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
278 OP("lahf", 0, 0, 0, OP_LAHF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
279
280
281 /* A */
282 OP("mov AL,%Ob", IDX_ParseFixedReg, IDX_ParseImmAddr, 0, OP_MOV, OP_PARM_REG_AL, OP_PARM_Ob, OP_PARM_NONE, DISOPTYPE_HARMLESS),
283 OP("mov %eAX,%Ov", IDX_ParseFixedReg, IDX_ParseImmAddr, 0, OP_MOV, OP_PARM_REG_EAX, OP_PARM_Ov, OP_PARM_NONE, DISOPTYPE_HARMLESS),
284 OP("mov %Ob,AL", IDX_ParseImmAddr, IDX_ParseFixedReg, 0, OP_MOV, OP_PARM_Ob, OP_PARM_REG_AL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
285 OP("mov %Ov,%eAX", IDX_ParseImmAddr, IDX_ParseFixedReg, 0, OP_MOV, OP_PARM_Ov, OP_PARM_REG_EAX,OP_PARM_NONE, DISOPTYPE_HARMLESS),
286 OP("movsb %Xb,%Yb", IDX_ParseXb, IDX_ParseYb, 0, OP_MOVSB, OP_PARM_Xb, OP_PARM_Yb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
287 OP("movsw/d %Xv,%Yv", IDX_ParseXv, IDX_ParseYv, 0, OP_MOVSWD, OP_PARM_Xv, OP_PARM_Yv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
288 OP("cmpsb %Xb,%Yb", IDX_ParseXb, IDX_ParseYb, 0, OP_CMPSB, OP_PARM_Xb, OP_PARM_Yb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
289 OP("cmpsw/d %Xv,%Yv", IDX_ParseXv, IDX_ParseYv, 0, OP_CMPWD, OP_PARM_Xv, OP_PARM_Yv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
290 OP("test AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_TEST, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
291 OP("test %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_TEST, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
292 OP("stosb %Yb,AL", IDX_ParseYb, IDX_ParseFixedReg, 0, OP_STOSB, OP_PARM_Yb, OP_PARM_REG_AL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
293 OP("stosw/d %Yv,%eAX", IDX_ParseYv, IDX_ParseFixedReg, 0, OP_STOSWD, OP_PARM_Yv, OP_PARM_REG_EAX,OP_PARM_NONE, DISOPTYPE_HARMLESS),
294 OP("lodsb AL,%Xb", IDX_ParseFixedReg, IDX_ParseXb, 0, OP_LODSB, OP_PARM_REG_AL, OP_PARM_Xb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
295 OP("lodsw/d %eAX,%Xv", IDX_ParseFixedReg, IDX_ParseXv, 0, OP_LODSWD, OP_PARM_REG_EAX, OP_PARM_Xv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
296 OP("scasb AL,%Xb", IDX_ParseFixedReg, IDX_ParseXb, 0, OP_SCASB, OP_PARM_REG_AL, OP_PARM_Xb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
297 OP("scasw/d %eAX,%Xv", IDX_ParseFixedReg, IDX_ParseXv, 0, OP_SCASWD, OP_PARM_REG_EAX, OP_PARM_Xv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
298
299
300 /* B */
301 OP("mov AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
302 OP("mov CL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_CL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
303 OP("mov DL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_DL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
304 OP("mov BL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_BL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
305 OP("mov AH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_AH, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
306 OP("mov CH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_CH, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
307 OP("mov DH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_DH, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
308 OP("mov BH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_BH, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
309 OP("mov %eAX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EAX, OP_PARM_Iv, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
310 OP("mov %eCX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_ECX, OP_PARM_Iv, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
311 OP("mov %eDX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EDX, OP_PARM_Iv, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
312 OP("mov %eBX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EBX, OP_PARM_Iv, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
313 OP("mov %eSP,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_ESP, OP_PARM_Iv, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
314 OP("mov %eBP,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EBP, OP_PARM_Iv, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
315 OP("mov %eSI,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_ESI, OP_PARM_Iv, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
316 OP("mov %eDI,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EDI, OP_PARM_Iv, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
317
318 /* C */
319 OP("Shift Grp2 %Eb,%Ib", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
320 OP("Shift Grp2 %Ev,%Ib", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Ev, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
321 OP("retn %Iw", IDX_ParseImmUshort, 0, 0, OP_RETN, OP_PARM_Iw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE),
322 OP("retn", 0, 0, 0, OP_RETN, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE),
323 OP("vex3b/les %Gv,%Mp", IDX_ParseVex3b, 0, 0, OP_VEX3B, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
324 OP("vex2b/lds %Gv,%Mp", IDX_ParseVex2b, 0, 0, OP_VEX2B, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
325 /** @todo these two are actually group11 */
326 OP("mov %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
327 OP("mov %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Iz, OP_PARM_NONE, DISOPTYPE_HARMLESS),
328 OP("enter %Iw,%Ib", IDX_ParseImmUshort, IDX_ParseImmByte, 0, OP_ENTER, OP_PARM_Iw, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
329 OP("leave", 0, 0, 0, OP_LEAVE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
330 OP("retf %Iw", IDX_ParseImmUshort, 0, 0, OP_RETF, OP_PARM_Iw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW),
331 OP("retf", 0, 0, 0, OP_RETF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW),
332 OP("int 3", 0, 0, 0, OP_INT3, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_INTERRUPT),
333 OP("int %Ib", IDX_ParseImmByte, 0, 0, OP_INT, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_INTERRUPT),
334 OP("into", 0, 0, 0, OP_INTO, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_INTERRUPT | DISOPTYPE_X86_INVALID_64),
335 OP("iret", 0, 0, 0, OP_IRET, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW),
336
337 /* D */
338 OP("Shift Grp2 %Eb,1", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Eb, OP_PARM_1, OP_PARM_NONE, DISOPTYPE_HARMLESS),
339 OP("Shift Grp2 %Ev,1", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Ev, OP_PARM_1, OP_PARM_NONE, DISOPTYPE_HARMLESS),
340 OP("Shift Grp2 %Eb,CL", IDX_ParseShiftGrp2, IDX_ParseFixedReg, 0, OP_SHIFT_GRP2, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
341 OP("Shift Grp2 %Ev,CL", IDX_ParseShiftGrp2, IDX_ParseFixedReg, 0, OP_SHIFT_GRP2, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
342 OP("aam %Ib", IDX_ParseImmByte, 0, 0, OP_AAM, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
343 OP("aad %Ib", IDX_ParseImmByte, 0, 0, OP_AAD, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
344 OP("salc", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_SALC, OP_PARM_REG_AL, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64),
345 /** @todo xlat has AL as both source and destination and DS:xBX as
346 * translation table pointer. */
347 OP("xlat", 0, 0, 0, OP_XLAT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
348 OP("esc 0xf0", IDX_ParseEscFP, 0, 0, OP_ESCF0, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
349 OP("esc 0xf1", IDX_ParseEscFP, 0, 0, OP_ESCF1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
350 OP("esc 0xf2", IDX_ParseEscFP, 0, 0, OP_ESCF2, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
351 OP("esc 0xf3", IDX_ParseEscFP, 0, 0, OP_ESCF3, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
352 OP("esc 0xf4", IDX_ParseEscFP, 0, 0, OP_ESCF4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
353 OP("esc 0xf5", IDX_ParseEscFP, 0, 0, OP_ESCF5, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
354 OP("esc 0xf6", IDX_ParseEscFP, 0, 0, OP_ESCF6, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
355 OP("esc 0xf7", IDX_ParseEscFP, 0, 0, OP_ESCF7, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
356
357
358 /* E */
359 OP("loopne %Jb", IDX_ParseImmBRel, 0, 0, OP_LOOPNE, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
360 OP("loope %Jb", IDX_ParseImmBRel, 0, 0, OP_LOOPE, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
361 OP("loop %Jb", IDX_ParseImmBRel, 0, 0, OP_LOOP, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
362 OP("j(e)cxz %Jb", IDX_ParseImmBRel, 0, 0, OP_JECXZ, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_COND_CONTROLFLOW | DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE | DISOPTYPE_RELATIVE_CONTROLFLOW),
363 OP("in AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_IN, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_READ),
364 OP("in %eAX,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_IN, OP_PARM_REG_EAX, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_READ),
365 OP("out %Ib,AL", IDX_ParseImmByte, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_Ib, OP_PARM_REG_AL, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_WRITE),
366 OP("out %Ib,%eAX", IDX_ParseImmByte, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_Ib, OP_PARM_REG_EAX,OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_WRITE),
367 OP("call %Jv", IDX_ParseImmVRel, 0, 0, OP_CALL, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_RELATIVE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE),
368 OP("jmp %Jv", IDX_ParseImmVRel, 0, 0, OP_JMP, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW | DISOPTYPE_RELATIVE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE),
369 OP("jmp %Ap", IDX_ParseImmAddrF, 0, 0, OP_JMP, OP_PARM_Ap, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW | DISOPTYPE_X86_INVALID_64),
370 OP("jmp %Jb", IDX_ParseImmBRel, 0, 0, OP_JMP, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW | DISOPTYPE_RELATIVE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE),
371 OP("in AL,DX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_IN, OP_PARM_REG_AL, OP_PARM_REG_DX, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_READ),
372 OP("in %eAX,DX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_IN, OP_PARM_REG_EAX, OP_PARM_REG_DX, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_READ),
373 OP("out DX,AL", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_REG_DX, OP_PARM_REG_AL, OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_WRITE),
374 OP("out DX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_REG_DX, OP_PARM_REG_EAX,OP_PARM_NONE, DISOPTYPE_PORTIO | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_PORTIO_WRITE),
375
376
377 /* F */
378 OP("lock", 0, 0, 0, OP_LOCK, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
379 OP("icebp", 0, 0, 0, OP_INT1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_INTERRUPT),
380 OP("repne", 0, 0, 0, OP_REPNE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
381 OP("rep(e)", 0, 0, 0, OP_REPE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
382 OP("hlt", 0, 0, 0, OP_HLT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_PRIVILEGED),
383 OP("cmc", 0, 0, 0, OP_CMC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
384 OP("Unary Grp3 %Eb", IDX_ParseGrp3, 0, 0, OP_UNARY_GRP3, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
385 OP("Unary Grp3 %Ev", IDX_ParseGrp3, 0, 0, OP_UNARY_GRP3, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
386 OP("clc", 0, 0, 0, OP_CLC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
387 OP("stc", 0, 0, 0, OP_STC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
388 OP("cli", 0, 0, 0, OP_CLI, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED),
389 OP("sti", 0, 0, 0, OP_STI, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED | DISOPTYPE_INHIBIT_IRQS),
390 OP("cld", 0, 0, 0, OP_CLD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
391 OP("std", 0, 0, 0, OP_STD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
392 OP("inc/dec Grp4", IDX_ParseGrp4, 0, 0, OP_INC_GRP4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
393 OP("Indirect Grp5", IDX_ParseGrp5, 0, 0, OP_IND_GRP5, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
394};
395
396const DISOPCODE g_OpcodeLES =
397 OP("les %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LES, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64);
398const DISOPCODE g_OpcodeLDS =
399 OP("lds %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LDS, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_INVALID_64 | DISOPTYPE_RRM_DANGEROUS);
400
401const DISOPCODE g_aTwoByteMapX86[256] =
402{
403 /* 0 */
404 OP("Grp6", IDX_ParseGrp6, 0, 0, OP_GRP6, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
405 OP("Grp7", IDX_ParseGrp7, 0, 0, OP_GRP7, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
406 OP("lar %Gv,%Ew", IDX_ParseModRM, IDX_UseModRM, 0, OP_LAR, OP_PARM_Gv, OP_PARM_Ew, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED_NOTRAP),
407 OP("lsl %Gv,%Ew", IDX_ParseModRM, IDX_UseModRM, 0, OP_LSL, OP_PARM_Gv, OP_PARM_Ew, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED_NOTRAP),
408 INVALID_OPCODE,
409 OP("syscall", 0, 0, 0, OP_SYSCALL, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_ONLY_64),
410 OP("clts", 0, 0, 0, OP_CLTS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_PRIVILEGED),
411 OP("sysret", 0, 0, 0, OP_SYSRET, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW | DISOPTYPE_X86_ONLY_64),
412 OP("invd", 0, 0, 0, OP_INVD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_PRIVILEGED),
413 OP("wbinvd", 0, 0, 0, OP_WBINVD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_PRIVILEGED),
414 INVALID_OPCODE,
415 OP("Two Byte Illegal Opcodes UD2", 0, 0, 0, OP_ILLUD2, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_ILLEGAL),
416 INVALID_OPCODE,
417 /* NOP Ev or prefetch (Intel vs AMD) */
418 OP("nop %Ev/prefetch", IDX_ParseModRM, 0, 0, OP_NOP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
419 OP("femms", 0, 0, 0, OP_FEMMS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
420 OP("3DNow! Esc", IDX_Parse3DNow, 0, 0, OP_3DNOW, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
421
422 /* 1 */
423 OP("movups %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVUPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
424 OP("movups %Wps,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVUPS, OP_PARM_Wps, OP_PARM_Vps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
425 /* Next instruction has the following format:
426 * &name1/name2,
427 * where name1 is used when one of the operands
428 * is a location in memory, name2 otherwise. */
429 OP("&movlps/movhlps %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVLPS, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
430 OP("movlps %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVLPS, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
431 OP("unpcklps %Vps,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_UNPCKLPS, OP_PARM_Vps, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
432 OP("unpckhps %Vps,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_UNPCKHPS, OP_PARM_Vps, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
433 /* can also be movlhps when reg->reg */
434 OP("&movhps/movlhps %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVHPS, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
435 OP("movhps %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVHPS, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
436 OP("prefetch Grp16", IDX_ParseGrp16, 0, 0, OP_PREFETCH_GRP16, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
437 INVALID_OPCODE,
438 INVALID_OPCODE,
439 INVALID_OPCODE,
440 INVALID_OPCODE,
441 INVALID_OPCODE,
442 INVALID_OPCODE,
443 OP("nop %Ev", IDX_ParseModRM, 0, 0, OP_NOP, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
444
445 /* 2 */
446 OP("mov %Rd,%Cd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_CR, OP_PARM_Rd, OP_PARM_Cd, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_MOD_FIXED_11 | DISOPTYPE_X86_FORCED_32_OP_SIZE_X86),
447 OP("mov %Rd,%Dd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_DR, OP_PARM_Rd, OP_PARM_Dd, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_MOD_FIXED_11 | DISOPTYPE_X86_FORCED_32_OP_SIZE_X86),
448 OP("mov %Cd,%Rd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_CR, OP_PARM_Cd, OP_PARM_Rd, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_MOD_FIXED_11 | DISOPTYPE_X86_FORCED_32_OP_SIZE_X86),
449 OP("mov %Dd,%Rd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_DR, OP_PARM_Dd, OP_PARM_Rd, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED | DISOPTYPE_X86_MOD_FIXED_11 | DISOPTYPE_X86_FORCED_32_OP_SIZE_X86),
450 /* only valid for Pentium Pro & Pentium II */
451 OP("mov %Rd,%Td", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_TR, OP_PARM_Rd, OP_PARM_Td, OP_PARM_NONE, DISOPTYPE_PRIVILEGED),
452 INVALID_OPCODE,
453 /* only valid for Pentium Pro & Pentium II */
454 OP("mov %Td,%Rd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_TR, OP_PARM_Td, OP_PARM_Rd, OP_PARM_NONE, DISOPTYPE_PRIVILEGED),
455 INVALID_OPCODE,
456
457 OP("movaps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVAPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
458 OP("movaps %Wps,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVAPS, OP_PARM_Wps, OP_PARM_Vps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
459 OP("cvtpi2ps %Vps,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPI2PS,OP_PARM_Vps, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
460 OP("movntps %Wps,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTPS, OP_PARM_Wps, OP_PARM_Vps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
461 OP("cvttps2pi %Qq,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTPS2PI,OP_PARM_Qq, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
462 OP("cvtps2pi %Qq,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPS2PI,OP_PARM_Qq, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
463 OP("ucomiss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_UCOMISS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
464 OP("comiss %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_COMISS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
465
466 /* 3 */
467 OP("wrmsr", 0, 0, 0, OP_WRMSR, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED),
468 OP("rdtsc", 0, 0, 0, OP_RDTSC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_POTENTIALLY_DANGEROUS),
469 OP("rdmsr", 0, 0, 0, OP_RDMSR, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_PRIVILEGED),
470 OP("rdpmc", 0, 0, 0, OP_RDPMC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_PRIVILEGED),
471 OP("sysenter", 0, 0, 0, OP_SYSENTER,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW),
472 OP("sysexit", 0, 0, 0, OP_SYSEXIT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW),
473 INVALID_OPCODE,
474 OP("getsec", 0, 0, 0, OP_GETSEC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
475 OP("3 byte escape A4", IDX_ParseThreeByteEsc4, 0, 0, OP_3B_ESC4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
476 INVALID_OPCODE,
477 OP("3 byte escape A5", IDX_ParseThreeByteEsc5, 0, 0, OP_3B_ESC5, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
478 INVALID_OPCODE,
479 /* SSE2 */
480 INVALID_OPCODE,
481 INVALID_OPCODE,
482 INVALID_OPCODE,
483 INVALID_OPCODE,
484
485 /* 4 */
486 OP("cmovo %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVO, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
487 OP("cmovno %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNO, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
488 OP("cmovc %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVC, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
489 OP("cmovnc %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNC, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
490 OP("cmovz %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVZ, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
491 OP("cmovnz %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNZ, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
492 OP("cmovbe %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVBE, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
493 OP("cmovnbe %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNBE, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
494 OP("cmovs %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVS, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
495 OP("cmovns %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNS, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
496 OP("cmovp %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVP, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
497 OP("cmovnp %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNP, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
498 OP("cmovl %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
499 OP("cmovnl %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
500 OP("cmovle %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVLE, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
501 OP("cmovnle %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNLE, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
502
503 /* 5 */
504 OP("movmskps %Ed,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVMSKPS,OP_PARM_Ed, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
505 OP("sqrtps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_SQRTPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
506 OP("rsqrtps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_RSQRTPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
507 OP("rcpps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_RCPPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
508 OP("andps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_ANDPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
509 OP("andnps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_ANDNPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
510 OP("orps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_ORPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
511 OP("xorps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_XORPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
512 OP("addps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADDPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
513 OP("mulps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MULPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
514 /** @todo wrong cvtps2pd memory source size, its not oword by dword. */
515 OP("cvtps2pd %Vpd,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPS2PD,OP_PARM_Vpd, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
516 OP("cvtdq2ps %Vps,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTDQ2PS,OP_PARM_Vps, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
517 OP("subps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUBPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
518 OP("minps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MINPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
519 OP("divps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_DIVPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
520 OP("maxps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MAXPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
521
522 /* 6 */
523 OP("punpcklbw %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLBW, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
524 OP("punpcklwd %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLWD, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
525 OP("punpckldq %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLDQ, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
526 OP("packsswb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKSSWB,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
527 OP("pcmpgtb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
528 OP("pcmpgtw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
529 OP("pcmpgtd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
530 OP("packuswb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKUSWB,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
531 OP("punpckhbw %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHBW, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
532 OP("punpckhwd %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHWD, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
533 OP("punpckhdq %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHDQ, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
534 OP("packssdw %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKSSDW,OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
535 INVALID_OPCODE, /** @todo 0x0f 0x6c punpcklqdq Vdq,Wdq */
536 INVALID_OPCODE, /** @todo 0x0f 0x6d punpckhqdq Vdq,Wdq */
537 OP("movd %Pd,%Ed", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVD, OP_PARM_Pd, OP_PARM_Ed, OP_PARM_NONE, DISOPTYPE_HARMLESS),
538 OP("movq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
539
540 /* 7 */
541 OP("pshufw %Pq,%Qq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PSHUFW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
542 OP("Grp12", IDX_ParseGrp12, 0, 0, OP_GRP12, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
543 OP("Grp13", IDX_ParseGrp13, 0, 0, OP_GRP13, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
544 OP("Grp14", IDX_ParseGrp14, 0, 0, OP_GRP14, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
545 OP("pcmpeqb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
546 OP("pcmpeqw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
547 OP("pcmpeqd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
548 OP("emms", 0, 0, 0, OP_EMMS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
549 OP("vmread %Ey,%Gy", IDX_ParseModRM, IDX_UseModRM, 0, OP_VMREAD, OP_PARM_Ey, OP_PARM_Gy, OP_PARM_NONE, DISOPTYPE_HARMLESS|DISOPTYPE_X86_FORCED_64_OP_SIZE),
550 OP("vmwrite %Gy,%Ey", IDX_ParseModRM, IDX_UseModRM, 0, OP_VMWRITE, OP_PARM_Gy, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS|DISOPTYPE_X86_FORCED_64_OP_SIZE),
551 OP("MMX UD 0x7A", 0, 0, 0, OP_MMX_UD7A,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
552 OP("MMX UD 0x7B", 0, 0, 0, OP_MMX_UD7B,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
553 OP("MMX UD 0x7C", 0, 0, 0, OP_MMX_UD7C,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS), /** @todo 0x0f 0x7c haddpd/haddps */
554 OP("MMX UD 0x7D", 0, 0, 0, OP_MMX_UD7D,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS), /** @todo 0x0f 0x7d hsubpd/hsubps */
555 OP("movd %Ed,%Pd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVD, OP_PARM_Ed, OP_PARM_Pd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
556 OP("movq %Qq,%Pq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ, OP_PARM_Qq, OP_PARM_Pq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
557
558 /* 8 */
559 OP("jo %Jv", IDX_ParseImmVRel, 0, 0, OP_JO, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
560 OP("jno %Jv", IDX_ParseImmVRel, 0, 0, OP_JNO, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
561 OP("jc %Jv", IDX_ParseImmVRel, 0, 0, OP_JC, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
562 OP("jnc %Jv", IDX_ParseImmVRel, 0, 0, OP_JNC, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
563 OP("je %Jv", IDX_ParseImmVRel, 0, 0, OP_JE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
564 OP("jne %Jv", IDX_ParseImmVRel, 0, 0, OP_JNE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
565 OP("jbe %Jv", IDX_ParseImmVRel, 0, 0, OP_JBE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
566 OP("jnbe %Jv", IDX_ParseImmVRel, 0, 0, OP_JNBE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
567 OP("js %Jv", IDX_ParseImmVRel, 0, 0, OP_JS, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
568 OP("jns %Jv", IDX_ParseImmVRel, 0, 0, OP_JNS, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
569 OP("jp %Jv", IDX_ParseImmVRel, 0, 0, OP_JP, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
570 OP("jnp %Jv", IDX_ParseImmVRel, 0, 0, OP_JNP, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
571 OP("jl %Jv", IDX_ParseImmVRel, 0, 0, OP_JL, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
572 OP("jnl %Jv", IDX_ParseImmVRel, 0, 0, OP_JNL, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
573 OP("jle %Jv", IDX_ParseImmVRel, 0, 0, OP_JLE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
574 OP("jnle %Jv", IDX_ParseImmVRel, 0, 0, OP_JNLE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW|DISOPTYPE_RELATIVE_CONTROLFLOW|DISOPTYPE_COND_CONTROLFLOW|DISOPTYPE_X86_FORCED_64_OP_SIZE),
575
576 /* 9 */
577 OP("seto %Eb", IDX_ParseModRM, 0, 0, OP_SETO, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
578 OP("setno %Eb", IDX_ParseModRM, 0, 0, OP_SETNO, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
579 OP("setc %Eb", IDX_ParseModRM, 0, 0, OP_SETC, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
580 OP("setnc %Eb", IDX_ParseModRM, 0, 0, OP_SETNC, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
581 OP("sete %Eb", IDX_ParseModRM, 0, 0, OP_SETE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
582 OP("setne %Eb", IDX_ParseModRM, 0, 0, OP_SETNE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
583 OP("setbe %Eb", IDX_ParseModRM, 0, 0, OP_SETBE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
584 OP("setnbe %Eb", IDX_ParseModRM, 0, 0, OP_SETNBE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
585 OP("sets %Eb", IDX_ParseModRM, 0, 0, OP_SETS, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
586 OP("setns %Eb", IDX_ParseModRM, 0, 0, OP_SETNS, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
587 OP("setp %Eb", IDX_ParseModRM, 0, 0, OP_SETP, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
588 OP("setnp %Eb", IDX_ParseModRM, 0, 0, OP_SETNP, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
589 OP("setl %Eb", IDX_ParseModRM, 0, 0, OP_SETL, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
590 OP("setnl %Eb", IDX_ParseModRM, 0, 0, OP_SETNL, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
591 OP("setle %Eb", IDX_ParseModRM, 0, 0, OP_SETLE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
592 OP("setnle %Eb", IDX_ParseModRM, 0, 0, OP_SETNLE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
593
594 /* a */
595 OP("push fs", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_FS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
596 OP("pop fs", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_FS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
597 OP("cpuid", 0, 0, 0, OP_CPUID, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_POTENTIALLY_DANGEROUS),
598 OP("bt %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BT, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
599 OP("shld %Ev,%Gv,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_SHLD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_Ib, DISOPTYPE_HARMLESS),
600 OP("shld %Ev,%Gv,CL", IDX_ParseModRM, IDX_UseModRM, 0, OP_SHLD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_Ib, DISOPTYPE_HARMLESS),
601 INVALID_OPCODE,
602 INVALID_OPCODE,
603 OP("push gs", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_GS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
604 OP("pop gs", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_GS, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
605 OP("rsm", 0, 0, 0, OP_RSM, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
606 OP("bts %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BTS, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
607 OP("shrd %Ev,%Gv,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_SHRD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_Ib, DISOPTYPE_HARMLESS),
608 OP("shrd %Ev,%Gv,CL", IDX_ParseModRM, IDX_UseModRM, IDX_ParseFixedReg,OP_SHRD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_REG_CL, DISOPTYPE_HARMLESS),
609 OP("Grp15", IDX_ParseGrp15, 0, 0, OP_GRP15, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
610 OP("imul %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_IMUL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
611
612 /* b */
613 OP("cmpxchg %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMPXCHG, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
614 OP("cmpxchg %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMPXCHG, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
615 OP("lss %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LSS, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_RRM_DANGEROUS),
616 OP("btr %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BTR, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
617 OP("lfs %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LFS, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, DISOPTYPE_HARMLESS),
618 OP("lgs %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LGS, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, DISOPTYPE_HARMLESS),
619 OP("movzx %Gv,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVZX, OP_PARM_Gv, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
620 OP("movzx %Gv,%Ew", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVZX, OP_PARM_Gv, OP_PARM_Ew, OP_PARM_NONE, DISOPTYPE_HARMLESS),
621 INVALID_OPCODE, /** @todo 0x0f 0xb8 popcnt Gv,Ev / jmpe */
622 OP("Grp10 Invalid Op", IDX_ParseGrp10, 0, 0, OP_GRP10_INV,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
623 OP("Grp8", IDX_ParseGrp8, 0, 0, OP_GRP8, OP_PARM_Ev, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
624 OP("btc %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BTC, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
625 OP("bsf %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_BSF, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
626 OP("bsr %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_BSR, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
627 OP("movsx %Gv,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSX, OP_PARM_Gv, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
628 OP("movsx %Gv,%Ew", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSX, OP_PARM_Gv, OP_PARM_Ew, OP_PARM_NONE, DISOPTYPE_HARMLESS),
629
630 /* c */
631 OP("xadd %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XADD, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
632 OP("xadd %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_XADD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, DISOPTYPE_HARMLESS),
633 OP("cmpps %Vps,%Wps,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_CMPPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_Ib, DISOPTYPE_HARMLESS),
634 /* SSE2 */
635 OP("movnti %Ed,%Gd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTI, OP_PARM_Ed, OP_PARM_Gd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
636 OP("pinsrw %Pq,%Ed,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PINSRW, OP_PARM_Pq, OP_PARM_Ed, OP_PARM_Ib, DISOPTYPE_HARMLESS),
637 OP("pextrw %Gd,%Pq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PEXTRW, OP_PARM_Gd, OP_PARM_Pq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
638 OP("shufps %Vps,%Wps,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_SHUFPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_Ib, DISOPTYPE_HARMLESS),
639 OP("Grp9", IDX_ParseGrp9, 0, 0, OP_GRP9, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
640 OP("bswap EAX", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
641 OP("bswap ECX", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
642 OP("bswap EDX", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
643 OP("bswap EBX", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
644 OP("bswap ESP", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
645 OP("bswap EBP", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
646 OP("bswap ESI", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
647 OP("bswap EDI", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_REXB_EXTENDS_OPREG),
648
649 /* d */
650 INVALID_OPCODE, /** @todo 0x0f 0xd0 addsubpd/addsubps */
651 OP("psrlw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
652 OP("psrld %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
653 OP("psrlq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
654 OP("paddq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
655 OP("pmullw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULLW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
656 INVALID_OPCODE,
657 OP("pmovmskb %Gd,%Pq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVMSKB,OP_PARM_Gd, OP_PARM_Pq, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
658 OP("psubusb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBUSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
659 OP("psubusw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBUSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
660 OP("pminub %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINUB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
661 OP("pand %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAND, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
662 OP("paddusb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDUSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
663 OP("paddusw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDUSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
664 OP("pmaxub %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXUB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
665 OP("pandn %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PANDN, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
666
667 /* e */
668 OP("pavgb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
669 OP("psraw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRAW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
670 OP("psrad %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRAD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
671 OP("pavgw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
672 OP("pmulhuw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHUW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
673 OP("pmulhw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
674 INVALID_OPCODE,
675 OP("movntq %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTQ, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
676 OP("psubsb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
677 OP("psubsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
678 OP("pminsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
679 OP("por %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_POR, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
680 OP("paddsb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
681 OP("paddsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
682 OP("pmaxsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
683 OP("pxor %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PXOR, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
684
685 /* f */
686 INVALID_OPCODE,
687 OP("psllw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSLLW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
688 OP("pslld %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSLLD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
689 OP("psllq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSSQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
690 OP("pmuludq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULUDQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
691 OP("pmaddwd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMADDWD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
692 OP("psadbw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSADBW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
693 OP("maskmovq %Ppi,%Qpi", IDX_ParseModRM, IDX_UseModRM, 0, OP_MASKMOVQ,OP_PARM_Ppi, OP_PARM_Qpi, OP_PARM_NONE, DISOPTYPE_HARMLESS),
694 OP("psubb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
695 OP("psubw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
696 OP("psubd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
697 OP("psubq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
698 OP("paddb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
699 OP("paddw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
700 OP("paddd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
701 INVALID_OPCODE,
702};
703
704/** Two byte opcode map with prefix 0x66 */
705const DISOPCODE g_aTwoByteMapX86_PF66[256] =
706{
707 /* 0 */
708 INVALID_OPCODE_BLOCK
709
710 /* 1 */
711 OP("movupd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVUPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
712 OP("movupd %Wpd,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVUPD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
713 OP("movlpd %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVLPD, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
714 OP("movlpd %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVLPD, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
715 OP("unpcklpd %Vpd,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_UNPCKLPD,OP_PARM_Vpd, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
716 OP("unpckhpd %Vpd,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_UNPCKHPD,OP_PARM_Vpd, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
717 OP("movhpd %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVHPD, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
718 OP("movhpd %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVHPD, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
719 INVALID_OPCODE,
720 INVALID_OPCODE,
721 INVALID_OPCODE,
722 INVALID_OPCODE,
723 INVALID_OPCODE,
724 INVALID_OPCODE,
725 INVALID_OPCODE,
726 INVALID_OPCODE,
727
728 /* 2 */
729 INVALID_OPCODE,
730 INVALID_OPCODE,
731 INVALID_OPCODE,
732 INVALID_OPCODE,
733 INVALID_OPCODE,
734 INVALID_OPCODE,
735 INVALID_OPCODE,
736 INVALID_OPCODE,
737 OP("movapd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVAPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
738 OP("movapd %Wpd,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVAPD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
739 OP("cvtpi2pd %Vpd,%Qdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPI2PD,OP_PARM_Vpd, OP_PARM_Qdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
740 OP("movntpd %Wpd,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTPD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
741 OP("cvttpd2pi %Qdq,%Wpd",IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTPD2PI,OP_PARM_Qdq, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
742 OP("cvtpd2pi %Qdq,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPD2PI,OP_PARM_Qdq, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
743 OP("ucomisd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_UCOMISD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
744 OP("comisd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_COMISD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
745
746 /* 3 */
747 INVALID_OPCODE,
748 INVALID_OPCODE,
749 INVALID_OPCODE,
750 INVALID_OPCODE,
751 INVALID_OPCODE,
752 INVALID_OPCODE,
753 INVALID_OPCODE,
754 INVALID_OPCODE,
755 OP("3 byte escape A4", IDX_ParseThreeByteEsc4, 0, 0, OP_3B_ESC4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
756 INVALID_OPCODE,
757 OP("3 byte escape A5", IDX_ParseThreeByteEsc5, 0, 0, OP_3B_ESC5, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
758 INVALID_OPCODE,
759 INVALID_OPCODE,
760 INVALID_OPCODE,
761 INVALID_OPCODE,
762 INVALID_OPCODE,
763
764 /* 4 */
765 INVALID_OPCODE_BLOCK
766
767 /* 5 */
768 OP("movmskpd %Ed,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVMSKPD,OP_PARM_Ed, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
769 OP("sqrtpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_SQRTPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
770 INVALID_OPCODE,
771 INVALID_OPCODE,
772 OP("andpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ANDPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
773 OP("andnpd %Vps,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ANDNPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
774 OP("orpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ORPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
775 OP("xorpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_XORPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
776 OP("addpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADDPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
777 OP("mulpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MULPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
778 OP("cvtpd2ps %Vps,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPD2PS,OP_PARM_Vps, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
779 OP("cvtps2dq %Vdq,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPS2DQ,OP_PARM_Vdq, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
780 OP("subpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUBPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
781 OP("minpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MINPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
782 OP("divpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_DIVPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
783 OP("maxpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MAXPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
784
785 /* 6 */
786 OP("punpcklbw %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLBW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
787 OP("punpcklwd %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLWD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
788 OP("punpckldq %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLDQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
789 OP("packsswb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKSSWB,OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
790 OP("pcmpgtb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
791 OP("pcmpgtw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
792 OP("pcmpgtd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
793 OP("packuswb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKUSWB,OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
794 OP("punpckhbw %Pdq,%Qdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHBW, OP_PARM_Pdq, OP_PARM_Qdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
795 OP("punpckhwd %Pdq,%Qdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHWD, OP_PARM_Pdq, OP_PARM_Qdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
796 OP("punpckhdq %Pdq,%Qdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHDQ, OP_PARM_Pdq, OP_PARM_Qdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
797 OP("packssdw %Pdq,%Qdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKSSDW,OP_PARM_Pdq, OP_PARM_Qdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
798 OP("punpcklqdq %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLQDQ,OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
799 OP("punpckhqdq %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHQDQ,OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
800 OP("movd %Vdq,%Ed", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVD, OP_PARM_Vdq, OP_PARM_Ed, OP_PARM_NONE, DISOPTYPE_HARMLESS),
801 OP("movdqa %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQA, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
802
803 /* 7 */
804 OP("pshufd %Vdq,%Wdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PSHUFD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
805 INVALID_OPCODE,
806 INVALID_OPCODE,
807 INVALID_OPCODE,
808 OP("pcmpeqb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQB, OP_PARM_Vdq, OP_PARM_Vdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
809 OP("pcmpeqw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQW, OP_PARM_Vdq, OP_PARM_Vdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
810 OP("pcmpeqd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQD, OP_PARM_Vdq, OP_PARM_Vdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
811 INVALID_OPCODE,
812 INVALID_OPCODE,
813 INVALID_OPCODE,
814 INVALID_OPCODE,
815 INVALID_OPCODE,
816 INVALID_OPCODE,
817 INVALID_OPCODE,
818 OP("movd %Ed,%Vdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVD, OP_PARM_Ed, OP_PARM_Vdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
819 OP("movdqa %Qq,%Pq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQA, OP_PARM_Wdq, OP_PARM_Vdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
820
821 /* 8 */
822 INVALID_OPCODE_BLOCK
823
824 /* 9 */
825 INVALID_OPCODE_BLOCK
826
827 /* a */
828 INVALID_OPCODE_BLOCK
829
830 /* b */
831 INVALID_OPCODE_BLOCK
832
833 /* c */
834 INVALID_OPCODE,
835 INVALID_OPCODE,
836 OP("cmppd %Vpd,%Wpd,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_CMPPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_Ib, DISOPTYPE_HARMLESS),
837 INVALID_OPCODE,
838 OP("pinsrw %Vdq,%Ed,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PINSRW, OP_PARM_Vdq, OP_PARM_Ed, OP_PARM_Ib, DISOPTYPE_HARMLESS),
839 OP("pextrw %Gd,%Vdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PEXTRW, OP_PARM_Gd, OP_PARM_Vdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
840 OP("shufpd %Vpd,%Wpd,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_SHUFPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_Ib, DISOPTYPE_HARMLESS),
841 INVALID_OPCODE,
842 INVALID_OPCODE,
843 INVALID_OPCODE,
844 INVALID_OPCODE,
845 INVALID_OPCODE,
846 INVALID_OPCODE,
847 INVALID_OPCODE,
848 INVALID_OPCODE,
849 INVALID_OPCODE,
850
851 /* d */
852 INVALID_OPCODE,
853 OP("psrlw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
854 OP("psrld %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
855 OP("psrlq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
856 OP("paddq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
857 OP("pmullw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULLW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
858 OP("movq %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
859 OP("pmovmskb %Gd,%Ux", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVMSKB,OP_PARM_Gd, OP_PARM_Ux, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
860 OP("psubusb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBUSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
861 OP("psubusw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBUSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
862 OP("pminub %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINUB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
863 OP("pand %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAND, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
864 OP("paddusb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDUSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
865 OP("paddusw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDUSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
866 OP("pmaxub %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXUB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
867 OP("pandn %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PANDN, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
868
869 /* e */
870 OP("pavgb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
871 OP("psraw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRAW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
872 OP("psrad %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRAD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
873 OP("pavgw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
874 OP("pmulhuw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHUW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
875 OP("pmulhw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
876 OP("cvttpd2dq %Vdq,%Wpd",IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTPD2DQ,OP_PARM_Vdq, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
877 OP("movntdq %Wdq,%Vdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTDQ, OP_PARM_Wdq, OP_PARM_Vdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
878 OP("psubsb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
879 OP("psubsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
880 OP("pminsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
881 OP("por %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_POR, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
882 OP("paddsb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
883 OP("paddsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
884 OP("pmaxsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
885 OP("pxor %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PXOR, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
886
887 /* f */
888 INVALID_OPCODE,
889 OP("psllw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSLLW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
890 OP("pslld %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSLLD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
891 OP("psllq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSSQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
892 OP("pmuludq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULUDQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
893 OP("pmaddwd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMADDWD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
894 OP("psadbw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSADBW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
895 OP("maskmovdqu %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_MASKMOVDQU, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
896 OP("psubb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
897 OP("psubw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
898 OP("psubd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
899 OP("psubq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
900 OP("paddb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
901 OP("paddw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
902 OP("paddd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
903 INVALID_OPCODE,
904};
905
906/* Two byte opcode map with prefix 0xF2 */
907const DISOPCODE g_aTwoByteMapX86_PFF2[256] =
908{
909 /* 0 */
910 INVALID_OPCODE_BLOCK
911
912 /* 1 */
913 OP("movsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
914 OP("movsd %Wsd,%Vsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
915 OP("movddup %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDDUP, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
916 INVALID_OPCODE,
917 INVALID_OPCODE,
918 INVALID_OPCODE,
919 INVALID_OPCODE,
920 INVALID_OPCODE,
921 INVALID_OPCODE,
922 INVALID_OPCODE,
923 INVALID_OPCODE,
924 INVALID_OPCODE,
925 INVALID_OPCODE,
926 INVALID_OPCODE,
927 INVALID_OPCODE,
928 INVALID_OPCODE,
929
930 /* 2 */
931 INVALID_OPCODE,
932 INVALID_OPCODE,
933 INVALID_OPCODE,
934 INVALID_OPCODE,
935 INVALID_OPCODE,
936 INVALID_OPCODE,
937 INVALID_OPCODE,
938 INVALID_OPCODE,
939 INVALID_OPCODE,
940 INVALID_OPCODE,
941 OP("cvtsi2sd %Vsd,%Ed", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSI2SD,OP_PARM_Vsd, OP_PARM_Ed, OP_PARM_NONE, DISOPTYPE_HARMLESS),
942 INVALID_OPCODE,
943 OP("cvttsd2si %Gd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTSD2SI,OP_PARM_Gd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
944 OP("cvtsd2si %Gd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSD2SI,OP_PARM_Gd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
945 INVALID_OPCODE,
946 INVALID_OPCODE,
947
948 /* 3 */
949 INVALID_OPCODE,
950 INVALID_OPCODE,
951 INVALID_OPCODE,
952 INVALID_OPCODE,
953 INVALID_OPCODE,
954 INVALID_OPCODE,
955 INVALID_OPCODE,
956 INVALID_OPCODE,
957 OP("3 byte escape A4", IDX_ParseThreeByteEsc4, 0, 0, OP_3B_ESC4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
958 INVALID_OPCODE,
959 INVALID_OPCODE,
960 INVALID_OPCODE,
961 INVALID_OPCODE,
962 INVALID_OPCODE,
963 INVALID_OPCODE,
964 INVALID_OPCODE,
965
966 /* 4 */
967 INVALID_OPCODE_BLOCK
968
969 /* 5 */
970 INVALID_OPCODE,
971 OP("sqrtsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_SQRTSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
972 INVALID_OPCODE,
973 INVALID_OPCODE,
974 INVALID_OPCODE,
975 INVALID_OPCODE,
976 INVALID_OPCODE,
977 INVALID_OPCODE,
978 OP("addsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADDSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
979 OP("mulsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MULSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
980 OP("cvtsd2ss %Vss,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSD2SS,OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
981 INVALID_OPCODE,
982 OP("subsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUBSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
983 OP("minsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MINSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
984 OP("divsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_DIVSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
985 OP("maxsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MAXSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
986
987 /* 6 */
988 INVALID_OPCODE_BLOCK
989
990 /* 7 */
991 OP("pshuflw %Vdq,%Wdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PSHUFLW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
992 INVALID_OPCODE,
993 INVALID_OPCODE,
994 INVALID_OPCODE,
995 INVALID_OPCODE,
996 INVALID_OPCODE,
997 INVALID_OPCODE,
998 INVALID_OPCODE,
999 INVALID_OPCODE,
1000 INVALID_OPCODE,
1001 INVALID_OPCODE,
1002 INVALID_OPCODE,
1003 INVALID_OPCODE,
1004 INVALID_OPCODE,
1005 INVALID_OPCODE,
1006 INVALID_OPCODE,
1007
1008 /* 8 */
1009 INVALID_OPCODE_BLOCK
1010
1011 /* 9 */
1012 INVALID_OPCODE_BLOCK
1013
1014 /* a */
1015 INVALID_OPCODE_BLOCK
1016
1017 /* b */
1018 INVALID_OPCODE_BLOCK
1019
1020 /* c */
1021 INVALID_OPCODE,
1022 INVALID_OPCODE,
1023 OP("cmpsd %Vsd,%Wsd,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_CMPSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1024 INVALID_OPCODE,
1025 INVALID_OPCODE,
1026 INVALID_OPCODE,
1027 INVALID_OPCODE,
1028 INVALID_OPCODE,
1029 INVALID_OPCODE,
1030 INVALID_OPCODE,
1031 INVALID_OPCODE,
1032 INVALID_OPCODE,
1033 INVALID_OPCODE,
1034 INVALID_OPCODE,
1035 INVALID_OPCODE,
1036 INVALID_OPCODE,
1037
1038 /* d */
1039 INVALID_OPCODE,
1040 INVALID_OPCODE,
1041 INVALID_OPCODE,
1042 INVALID_OPCODE,
1043 INVALID_OPCODE,
1044 INVALID_OPCODE,
1045 OP("movdq2q %Pq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQ2Q, OP_PARM_Pq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1046 INVALID_OPCODE,
1047 INVALID_OPCODE,
1048 INVALID_OPCODE,
1049 INVALID_OPCODE,
1050 INVALID_OPCODE,
1051 INVALID_OPCODE,
1052 INVALID_OPCODE,
1053 INVALID_OPCODE,
1054 INVALID_OPCODE,
1055
1056 /* e */
1057 INVALID_OPCODE,
1058 INVALID_OPCODE,
1059 INVALID_OPCODE,
1060 INVALID_OPCODE,
1061 INVALID_OPCODE,
1062 INVALID_OPCODE,
1063 OP("cvtpd2dq %Vdq,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPD2DQ,OP_PARM_Vdq, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1064 INVALID_OPCODE,
1065 INVALID_OPCODE,
1066 INVALID_OPCODE,
1067 INVALID_OPCODE,
1068 INVALID_OPCODE,
1069 INVALID_OPCODE,
1070 INVALID_OPCODE,
1071 INVALID_OPCODE,
1072 INVALID_OPCODE,
1073
1074 /* f */
1075 OP("lddqu %Vdq,%Mdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_LDDQU, OP_PARM_Vdq, OP_PARM_Mdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1076 INVALID_OPCODE,
1077 INVALID_OPCODE,
1078 INVALID_OPCODE,
1079 INVALID_OPCODE,
1080 INVALID_OPCODE,
1081 INVALID_OPCODE,
1082 INVALID_OPCODE,
1083 INVALID_OPCODE,
1084 INVALID_OPCODE,
1085 INVALID_OPCODE,
1086 INVALID_OPCODE,
1087 INVALID_OPCODE,
1088 INVALID_OPCODE,
1089 INVALID_OPCODE,
1090 INVALID_OPCODE
1091};
1092
1093
1094/* Two byte opcode map with prefix 0xF3 */
1095const DISOPCODE g_aTwoByteMapX86_PFF3[256] =
1096{
1097 /* 0 */
1098 INVALID_OPCODE_BLOCK
1099
1100 /* 1 */
1101 OP("movss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1102 OP("movss %Wss,%Vss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSS, OP_PARM_Wss, OP_PARM_Vss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1103 OP("movsldup %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSLDUP,OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1104 INVALID_OPCODE,
1105 INVALID_OPCODE,
1106 INVALID_OPCODE,
1107 OP("movshdup %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSHDUP,OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1108 INVALID_OPCODE,
1109 INVALID_OPCODE,
1110 INVALID_OPCODE,
1111 INVALID_OPCODE,
1112 INVALID_OPCODE,
1113 INVALID_OPCODE,
1114 INVALID_OPCODE,
1115 INVALID_OPCODE,
1116 INVALID_OPCODE,
1117
1118 /* 2 */
1119 INVALID_OPCODE,
1120 INVALID_OPCODE,
1121 INVALID_OPCODE,
1122 INVALID_OPCODE,
1123 INVALID_OPCODE,
1124 INVALID_OPCODE,
1125 INVALID_OPCODE,
1126 INVALID_OPCODE,
1127 INVALID_OPCODE,
1128 INVALID_OPCODE,
1129 OP("cvtsi2ss %Vss,%Ed", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSI2SS,OP_PARM_Vss, OP_PARM_Ed, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1130 INVALID_OPCODE,
1131 OP("cvttss2si %Gd,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTSS2SI,OP_PARM_Gd, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1132 OP("cvtss2si %Gd,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSS2SI,OP_PARM_Gd, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1133 INVALID_OPCODE,
1134 INVALID_OPCODE,
1135
1136 /* 3 */
1137 INVALID_OPCODE_BLOCK
1138
1139 /* 4 */
1140 INVALID_OPCODE_BLOCK
1141
1142 /* 5 */
1143 INVALID_OPCODE,
1144 OP("sqrtss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_SQRTSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1145 OP("rsqrtss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_RSQRTSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1146 OP("rcpss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_RCPSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1147 INVALID_OPCODE,
1148 INVALID_OPCODE,
1149 INVALID_OPCODE,
1150 INVALID_OPCODE,
1151 OP("addss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADDSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1152 OP("mulss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MULSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1153 //??
1154 OP("cvtss2sd %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSD2SS,OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1155 OP("cvttps2dq %Vdq,%Wps",IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTPS2DQ,OP_PARM_Vdq, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1156 OP("subss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUBSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1157 OP("minss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MINSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1158 OP("divss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_DIVSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1159 OP("maxss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MAXSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1160
1161 /* 6 */
1162 INVALID_OPCODE,
1163 INVALID_OPCODE,
1164 INVALID_OPCODE,
1165 INVALID_OPCODE,
1166 INVALID_OPCODE,
1167 INVALID_OPCODE,
1168 INVALID_OPCODE,
1169 INVALID_OPCODE,
1170 INVALID_OPCODE,
1171 INVALID_OPCODE,
1172 INVALID_OPCODE,
1173 INVALID_OPCODE,
1174 INVALID_OPCODE,
1175 INVALID_OPCODE,
1176 INVALID_OPCODE,
1177 OP("movdqu %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQU, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1178
1179 /* 7 */
1180 OP("pshufhw %Vdq,%Wdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PSHUFHW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1181 INVALID_OPCODE,
1182 INVALID_OPCODE,
1183 INVALID_OPCODE,
1184 INVALID_OPCODE,
1185 INVALID_OPCODE,
1186 INVALID_OPCODE,
1187 INVALID_OPCODE,
1188 INVALID_OPCODE,
1189 INVALID_OPCODE,
1190 INVALID_OPCODE,
1191 INVALID_OPCODE,
1192 INVALID_OPCODE,
1193 INVALID_OPCODE,
1194 OP("movq %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1195 OP("movdqu %Wdq,%Vdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQU, OP_PARM_Wdq, OP_PARM_Vdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1196
1197 /* 8 */
1198 INVALID_OPCODE_BLOCK
1199
1200 /* 9 */
1201 INVALID_OPCODE_BLOCK
1202
1203 /* a */
1204 INVALID_OPCODE_BLOCK
1205
1206 /* b */
1207 INVALID_OPCODE,
1208 INVALID_OPCODE,
1209 INVALID_OPCODE,
1210 INVALID_OPCODE,
1211 INVALID_OPCODE,
1212 INVALID_OPCODE,
1213 INVALID_OPCODE,
1214 INVALID_OPCODE,
1215 OP("popcnt %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_POPCNT, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1216 INVALID_OPCODE,
1217 INVALID_OPCODE,
1218 INVALID_OPCODE,
1219 OP("tzcnt %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_TZCNT, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1220 OP("lzcnt %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_LZCNT, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1221 INVALID_OPCODE,
1222 INVALID_OPCODE,
1223
1224 /* c */
1225 INVALID_OPCODE,
1226 INVALID_OPCODE,
1227 OP("cmpss %Vss,%Wss,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_CMPSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1228 INVALID_OPCODE,
1229 INVALID_OPCODE,
1230 INVALID_OPCODE,
1231 INVALID_OPCODE,
1232 OP("Grp9", IDX_ParseGrp9, 0, 0, OP_GRP9, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1233 INVALID_OPCODE,
1234 INVALID_OPCODE,
1235 INVALID_OPCODE,
1236 INVALID_OPCODE,
1237 INVALID_OPCODE,
1238 INVALID_OPCODE,
1239 INVALID_OPCODE,
1240 INVALID_OPCODE,
1241
1242 /* d */
1243 INVALID_OPCODE,
1244 INVALID_OPCODE,
1245 INVALID_OPCODE,
1246 INVALID_OPCODE,
1247 INVALID_OPCODE,
1248 INVALID_OPCODE,
1249 OP("movq2dq %Vdq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ2DQ, OP_PARM_Vdq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1250 INVALID_OPCODE,
1251 INVALID_OPCODE,
1252 INVALID_OPCODE,
1253 INVALID_OPCODE,
1254 INVALID_OPCODE,
1255 INVALID_OPCODE,
1256 INVALID_OPCODE,
1257 INVALID_OPCODE,
1258 INVALID_OPCODE,
1259
1260 /* e */
1261 INVALID_OPCODE,
1262 INVALID_OPCODE,
1263 INVALID_OPCODE,
1264 INVALID_OPCODE,
1265 INVALID_OPCODE,
1266 INVALID_OPCODE,
1267 OP("cvtdq2pd %Vpd,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTDQ2PD,OP_PARM_Vpd, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1268 INVALID_OPCODE,
1269 INVALID_OPCODE,
1270 INVALID_OPCODE,
1271 INVALID_OPCODE,
1272 INVALID_OPCODE,
1273 INVALID_OPCODE,
1274 INVALID_OPCODE,
1275 INVALID_OPCODE,
1276 INVALID_OPCODE,
1277
1278 /* f */
1279 INVALID_OPCODE_BLOCK
1280};
1281
1282/** Three byte opcode map (0xF 0x38 0x0x) */
1283const DISOPCODE g_aThreeByteMapX86_0F38_0[16] =
1284{
1285 /* 0 */
1286 OP("pshufb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSHUFB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1287 OP("phaddw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1288 OP("phaddd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1289 OP("phaddsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1290 OP("pmaddubsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMADDUBSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1291 OP("phsubw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1292 OP("phsubd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1293 OP("phsubsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1294 OP("psignb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGNB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1295 OP("psignw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGNW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1296 OP("psignd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGND, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1297 OP("pmulhrsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHRSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1298 INVALID_OPCODE,
1299 INVALID_OPCODE,
1300 INVALID_OPCODE,
1301 INVALID_OPCODE,
1302};
1303
1304/** Three byte opcode map (0x0F 0x38 0x1x) */
1305const DISOPCODE g_aThreeByteMapX86_0F38_1[16] =
1306{
1307 /* 1 */
1308 INVALID_OPCODE,
1309 INVALID_OPCODE,
1310 INVALID_OPCODE,
1311 INVALID_OPCODE,
1312 INVALID_OPCODE,
1313 INVALID_OPCODE,
1314 INVALID_OPCODE,
1315 INVALID_OPCODE,
1316 INVALID_OPCODE,
1317 INVALID_OPCODE,
1318 INVALID_OPCODE,
1319 INVALID_OPCODE,
1320 OP("pabsb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1321 OP("pabsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1322 OP("pabsd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1323 INVALID_OPCODE,
1324};
1325
1326/** Three byte opcode map (0x66 0x0F 0x38 0xCx) */
1327const DISOPCODE g_aThreeByteMapX86_0F38_C[16] =
1328{
1329 /* D */
1330 INVALID_OPCODE,
1331 INVALID_OPCODE,
1332 INVALID_OPCODE,
1333 INVALID_OPCODE,
1334 INVALID_OPCODE,
1335 INVALID_OPCODE,
1336 INVALID_OPCODE,
1337 INVALID_OPCODE,
1338 OP("sha1nexte %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_SHA1NEXTE, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1339 OP("sha1msg1 %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_SHA1MSG1, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1340 OP("sha1msg2 %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_SHA1MSG2, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1341 OP("sha256rnds2 %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_SHA256RNDS2, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS), /** @todo xmm0 is implicit, anything to do to annotate it properly? */
1342 OP("sha256msg1 %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_SHA256MSG1, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1343 OP("sha256msg2 %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_SHA256MSG2, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1344 INVALID_OPCODE,
1345 INVALID_OPCODE
1346};
1347
1348/** Three byte opcode map (0x0F 0x38 0xFx) */
1349const DISOPCODE g_aThreeByteMapX86_0F38_F[16] =
1350{
1351 /* F */
1352 OP("movbe %Gy,%My", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVBEGM, OP_PARM_Gy, OP_PARM_My, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1353 OP("movbe %My,%Gy", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVBEMG, OP_PARM_My, OP_PARM_Gy, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1354 INVALID_OPCODE,
1355 INVALID_OPCODE,
1356 INVALID_OPCODE,
1357 INVALID_OPCODE,
1358 INVALID_OPCODE,
1359 INVALID_OPCODE,
1360 INVALID_OPCODE,
1361 INVALID_OPCODE,
1362 INVALID_OPCODE,
1363 INVALID_OPCODE,
1364 INVALID_OPCODE,
1365 INVALID_OPCODE,
1366 INVALID_OPCODE,
1367 INVALID_OPCODE,
1368};
1369
1370/** These tables are mostly sparse, so use another level of indirection to save space. */
1371PCDISOPCODE const g_apThreeByteMapX86_0F38[16] =
1372{
1373 /* 0 */
1374 &g_aThreeByteMapX86_0F38_0[0],
1375 /* 1 */
1376 &g_aThreeByteMapX86_0F38_1[0],
1377 /* 2 */
1378 NULL,
1379 /* 3 */
1380 NULL,
1381 /* 4 */
1382 NULL,
1383 /* 5 */
1384 NULL,
1385 /* 6 */
1386 NULL,
1387 /* 7 */
1388 NULL,
1389 /* 8 */
1390 NULL,
1391 /* 9 */
1392 NULL,
1393 /* a */
1394 NULL,
1395 /* b */
1396 NULL,
1397 /* c */
1398 &g_aThreeByteMapX86_0F38_C[0],
1399 /* d */
1400 NULL,
1401 /* e */
1402 NULL,
1403 /* f */
1404 &g_aThreeByteMapX86_0F38_F[0],
1405};
1406
1407/** Three byte opcode map (0x66 0x0F 0x38 0x0x) */
1408const DISOPCODE g_aThreeByteMapX86_660F38_0[16] =
1409{
1410 /* 0 */
1411 OP("pshufb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSHUFB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1412 OP("phaddw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1413 OP("phaddd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1414 OP("phaddsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1415 OP("pmaddubsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMADDUBSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1416 OP("phsubw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1417 OP("phsubd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1418 OP("phsubsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1419 OP("psignb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGNB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1420 OP("psignw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGNW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1421 OP("psignd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGND, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1422 OP("pmulhrsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHRSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1423 INVALID_OPCODE,
1424 INVALID_OPCODE,
1425 INVALID_OPCODE,
1426 INVALID_OPCODE,
1427};
1428
1429/** Three byte opcode map (0x66 0x0F 0x38 0x1x) */
1430const DISOPCODE g_aThreeByteMapX86_660F38_1[16] =
1431{
1432 /* 1 */
1433 OP("pblendvb %Vdq,%Wdq,xmm0", IDX_ParseModRM, IDX_UseModRM, IDX_ParseFixedReg, OP_PBLENDVB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_REG_XMM0, DISOPTYPE_HARMLESS),
1434 INVALID_OPCODE,
1435 INVALID_OPCODE,
1436 INVALID_OPCODE,
1437 OP("blendvps %Vdq,%Wdq,xmm0", IDX_ParseModRM, IDX_UseModRM, IDX_ParseFixedReg, OP_BLENDVPS, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_REG_XMM0, DISOPTYPE_HARMLESS),
1438 OP("blendvpd %Vdq,%Wdq,xmm0", IDX_ParseModRM, IDX_UseModRM, IDX_ParseFixedReg, OP_BLENDVPD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_REG_XMM0, DISOPTYPE_HARMLESS),
1439 INVALID_OPCODE,
1440 OP("ptest %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PTEST, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1441 INVALID_OPCODE,
1442 INVALID_OPCODE,
1443 INVALID_OPCODE,
1444 INVALID_OPCODE,
1445 OP("pabsb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1446 OP("pabsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1447 OP("pabsd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1448 INVALID_OPCODE,
1449};
1450
1451/** Three byte opcode map (0x66 0x0F 0x38 0x2x) */
1452const DISOPCODE g_aThreeByteMapX86_660F38_2[16] =
1453{
1454 /* 2 */
1455 OP("pmovsxbw %Vdq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVSXBW, OP_PARM_Vdq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1456 OP("pmovsxbd %Vdq,%Wd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVSXBD, OP_PARM_Vdq, OP_PARM_Wd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1457 OP("pmovsxbq %Vdq,%Ww", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVSXBQ, OP_PARM_Vdq, OP_PARM_Ww, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1458 OP("pmovsxwd %Vdq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVSXBW, OP_PARM_Vdq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1459 OP("pmovsxwq %Vdq,%Wd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVSXWQ, OP_PARM_Vdq, OP_PARM_Wd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1460 OP("pmovsxdq %Vdq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVSXDQ, OP_PARM_Vdq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1461 INVALID_OPCODE,
1462 INVALID_OPCODE,
1463 OP("pmuldq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULDQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1464 OP("pcmpeqq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1465 OP("movntdqa %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTDQA, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1466 OP("packusdw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKUSDW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1467 INVALID_OPCODE,
1468 INVALID_OPCODE,
1469 INVALID_OPCODE,
1470 INVALID_OPCODE,
1471};
1472
1473/** Three byte opcode map (0x66 0x0F 0x38 0x3x) */
1474const DISOPCODE g_aThreeByteMapX86_660F38_3[16] =
1475{
1476 /* 3 */
1477 OP("pmovzxbw %Vdq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVZXBW, OP_PARM_Vdq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1478 OP("pmovzxbd %Vdq,%Wd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVZXBD, OP_PARM_Vdq, OP_PARM_Wd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1479 OP("pmovzxbq %Vdq,%Ww", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVZXBQ, OP_PARM_Vdq, OP_PARM_Ww, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1480 OP("pmovzxwd %Vdq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVZXWD, OP_PARM_Vdq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1481 OP("pmovzxwq %Vdq,%Wd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVZXWQ, OP_PARM_Vdq, OP_PARM_Wd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1482 OP("pmovzxdq %Vdq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVZXDQ, OP_PARM_Vdq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1483 INVALID_OPCODE,
1484 OP("pcmpgtq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1485 OP("pminsb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1486 OP("pminsd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1487 OP("pminuw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINUW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1488 OP("pminud %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINUD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1489 OP("pmaxsb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1490 OP("pmaxsd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXSD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1491 OP("pmaxuw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXUW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1492 OP("pmaxud %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXUD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1493};
1494
1495/** Three byte opcode map (0x66 0x0F 0x38 0x4x) */
1496const DISOPCODE g_aThreeByteMapX86_660F38_4[16] =
1497{
1498 /* 4 */
1499 OP("pmulld %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULLD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1500 OP("phminposuw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHMINPOSUW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1501 INVALID_OPCODE,
1502 INVALID_OPCODE,
1503 INVALID_OPCODE,
1504 INVALID_OPCODE,
1505 INVALID_OPCODE,
1506 INVALID_OPCODE,
1507 INVALID_OPCODE,
1508 INVALID_OPCODE,
1509 INVALID_OPCODE,
1510 INVALID_OPCODE,
1511 INVALID_OPCODE,
1512 INVALID_OPCODE,
1513 INVALID_OPCODE,
1514 INVALID_OPCODE,
1515};
1516
1517/** Three byte opcode map (0x66 0x0F 0x38 0x8x) */
1518const DISOPCODE g_aThreeByteMapX86_660F38_8[16] =
1519{
1520 /* 8 */
1521 OP("invept %Gy,%Mdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_INVEPT, OP_PARM_Gy, OP_PARM_Mdq, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_FORCED_64_OP_SIZE),
1522 OP("invvpid %Gy,%Mdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_INVVPID, OP_PARM_Gy, OP_PARM_Mdq, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_FORCED_64_OP_SIZE),
1523 OP("invpcid %Gy,%Mdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_INVPCID, OP_PARM_Gy, OP_PARM_Mdq, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_FORCED_64_OP_SIZE),
1524 INVALID_OPCODE,
1525 INVALID_OPCODE,
1526 INVALID_OPCODE,
1527 INVALID_OPCODE,
1528 INVALID_OPCODE,
1529 INVALID_OPCODE,
1530 INVALID_OPCODE,
1531 INVALID_OPCODE,
1532 INVALID_OPCODE,
1533 INVALID_OPCODE,
1534 INVALID_OPCODE,
1535 INVALID_OPCODE,
1536 INVALID_OPCODE,
1537};
1538
1539/** Three byte opcode map (0x66 0x0F 0x38 0xDx) */
1540const DISOPCODE g_aThreeByteMapX86_660F38_D[16] =
1541{
1542 /* D */
1543 INVALID_OPCODE,
1544 INVALID_OPCODE,
1545 INVALID_OPCODE,
1546 INVALID_OPCODE,
1547 INVALID_OPCODE,
1548 INVALID_OPCODE,
1549 INVALID_OPCODE,
1550 INVALID_OPCODE,
1551 INVALID_OPCODE,
1552 INVALID_OPCODE,
1553 INVALID_OPCODE,
1554 OP("aesimc %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_AESIMC, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1555 OP("aesenc %Vdq,%Hdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_AESENC, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1556 OP("aesenclast %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_AESENCLAST, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1557 OP("aesdec %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_AESDEC, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1558 OP("aesdeclast %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_AESDECLAST, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1559};
1560
1561const DISOPCODE g_aThreeByteMapX86_660F38_F[16] =
1562{
1563 /* F */
1564 OP("movbe %Gw,%Mw", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVBEGM, OP_PARM_Gw, OP_PARM_Mw, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1565 OP("movbe %Mw,%Gw", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVBEMG, OP_PARM_Mw, OP_PARM_Gw, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1566 INVALID_OPCODE,
1567 INVALID_OPCODE,
1568 INVALID_OPCODE,
1569 INVALID_OPCODE,
1570 OP("adcx %Gy,%Ey", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADCX, OP_PARM_Gy, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1571 INVALID_OPCODE,
1572 INVALID_OPCODE,
1573 INVALID_OPCODE,
1574 INVALID_OPCODE,
1575 INVALID_OPCODE,
1576 INVALID_OPCODE,
1577 INVALID_OPCODE,
1578 INVALID_OPCODE,
1579 INVALID_OPCODE,
1580};
1581
1582/** Three byte opcode map with prefix 0x66 (0xF 0x38) */
1583PCDISOPCODE const g_apThreeByteMapX86_660F38[16] =
1584{
1585 /* 0 */
1586 &g_aThreeByteMapX86_660F38_0[0],
1587 /* 1 */
1588 &g_aThreeByteMapX86_660F38_1[0],
1589 /* 2 */
1590 &g_aThreeByteMapX86_660F38_2[0],
1591 /* 3 */
1592 &g_aThreeByteMapX86_660F38_3[0],
1593 /* 4 */
1594 &g_aThreeByteMapX86_660F38_4[0],
1595 /* 5 */
1596 NULL,
1597 /* 6 */
1598 NULL,
1599 /* 7 */
1600 NULL,
1601 /* 8 */
1602 &g_aThreeByteMapX86_660F38_8[0],
1603 /* 9 */
1604 NULL,
1605 /* a */
1606 NULL,
1607 /* b */
1608 NULL,
1609 /* c */
1610 NULL,
1611 /* d */
1612 &g_aThreeByteMapX86_660F38_D[0],
1613 /* e */
1614 NULL,
1615 /* f */
1616 &g_aThreeByteMapX86_660F38_F[0],
1617};
1618
1619const DISOPCODE g_aThreeByteMapX86_F20F38_F[16] =
1620{
1621 /* According to Intel opcodes map in Intel® 64 and IA-32 Architectures Software Developer’s Manual dated September 2014
1622 it should be %Gd (always dword regardless of operand-size attribute), but from the description of the command
1623 it is clear that REX.W prefix can change this size to 64 bit, therefore it is set to %Gy. Seems to be a mistake. */
1624 /** @todo r=bird: While the destination can be a 64-bit register, it is
1625 * always treated like a dword register given that the upper half is
1626 * always cleared. So, it is really just a convenience for a more
1627 * natural syntax when using a 64-bit source register. */
1628 OP("crc32 %Gy,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CRC32, OP_PARM_Gy, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1629 OP("crc32 %Gy,%Ey", IDX_ParseModRM, IDX_UseModRM, 0, OP_CRC32, OP_PARM_Gy, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1630 INVALID_OPCODE,
1631 INVALID_OPCODE,
1632 INVALID_OPCODE,
1633 INVALID_OPCODE,
1634 INVALID_OPCODE,
1635 INVALID_OPCODE,
1636 INVALID_OPCODE,
1637 INVALID_OPCODE,
1638 INVALID_OPCODE,
1639 INVALID_OPCODE,
1640 INVALID_OPCODE,
1641 INVALID_OPCODE,
1642 INVALID_OPCODE,
1643 INVALID_OPCODE,
1644};
1645
1646const DISOPCODE g_aThreeByteMapX86_66F20F38_F[16] =
1647{
1648 /* According to Intel opcodes map in Intel® 64 and IA-32 Architectures Software Developer’s Manual dated September 2014
1649 it should be %Gd (always dword regardless of operand-size attribute), but from the description of the command
1650 it is clear that REX.W prefix can change this size to 64 bit, therefore it is set to %Gy. Seems to be a mistake. */
1651 OP("crc32 %Gy,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CRC32, OP_PARM_Gy, OP_PARM_Eb, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1652 OP("crc32 %Gy,%Ew", IDX_ParseModRM, IDX_UseModRM, 0, OP_CRC32, OP_PARM_Gy, OP_PARM_Ew, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1653 INVALID_OPCODE,
1654 INVALID_OPCODE,
1655 INVALID_OPCODE,
1656 INVALID_OPCODE,
1657 INVALID_OPCODE,
1658 INVALID_OPCODE,
1659 INVALID_OPCODE,
1660 INVALID_OPCODE,
1661 INVALID_OPCODE,
1662 INVALID_OPCODE,
1663 INVALID_OPCODE,
1664 INVALID_OPCODE,
1665 INVALID_OPCODE,
1666 INVALID_OPCODE,
1667};
1668
1669/** Three byte opcode map with prefix 0xF2 (0xF 0x38) */
1670/** @todo remainder missing (too lazy now) */
1671PCDISOPCODE const g_apThreeByteMapX86_F20F38[16] =
1672{
1673 /* 0 */
1674 NULL,
1675 /* 1 */
1676 NULL,
1677 /* 2 */
1678 NULL,
1679 /* 3 */
1680 NULL,
1681 /* 4 */
1682 NULL,
1683 /* 5 */
1684 NULL,
1685 /* 6 */
1686 NULL,
1687 /* 7 */
1688 NULL,
1689 /* 8 */
1690 NULL,
1691 /* 9 */
1692 NULL,
1693 /* a */
1694 NULL,
1695 /* b */
1696 NULL,
1697 /* c */
1698 NULL,
1699 /* d */
1700 NULL,
1701 /* e */
1702 NULL,
1703 /* f */
1704 &g_aThreeByteMapX86_F20F38_F[0],
1705};
1706
1707/** Three byte opcode map with prefixes 0x66 0xF2 (0xF 0x38) */
1708PCDISOPCODE const g_apThreeByteMapX86_66F20F38[16] =
1709{
1710 /* 0 */
1711 NULL,
1712 /* 1 */
1713 NULL,
1714 /* 2 */
1715 NULL,
1716 /* 3 */
1717 NULL,
1718 /* 4 */
1719 NULL,
1720 /* 5 */
1721 NULL,
1722 /* 6 */
1723 NULL,
1724 /* 7 */
1725 NULL,
1726 /* 8 */
1727 NULL,
1728 /* 9 */
1729 NULL,
1730 /* a */
1731 NULL,
1732 /* b */
1733 NULL,
1734 /* c */
1735 NULL,
1736 /* d */
1737 NULL,
1738 /* e */
1739 NULL,
1740 /* f */
1741 &g_aThreeByteMapX86_66F20F38_F[0],
1742};
1743
1744const DISOPCODE g_aThreeByteMapX86_F30F38_F[16] =
1745{
1746 INVALID_OPCODE,
1747 INVALID_OPCODE,
1748 INVALID_OPCODE,
1749 INVALID_OPCODE,
1750 INVALID_OPCODE,
1751 INVALID_OPCODE,
1752 OP("adox %Gy,%Ey", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADOX, OP_PARM_Gy, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
1753 INVALID_OPCODE,
1754 INVALID_OPCODE,
1755 INVALID_OPCODE,
1756 INVALID_OPCODE,
1757 INVALID_OPCODE,
1758 INVALID_OPCODE,
1759 INVALID_OPCODE,
1760 INVALID_OPCODE,
1761 INVALID_OPCODE,
1762};
1763
1764/** Three byte opcode map with prefix 0xF3 (0xF 0x38) */
1765PCDISOPCODE const g_apThreeByteMapX86_F30F38[16] =
1766{
1767 /* 0 */
1768 NULL,
1769 /* 1 */
1770 NULL,
1771 /* 2 */
1772 NULL,
1773 /* 3 */
1774 NULL,
1775 /* 4 */
1776 NULL,
1777 /* 5 */
1778 NULL,
1779 /* 6 */
1780 NULL,
1781 /* 7 */
1782 NULL,
1783 /* 8 */
1784 NULL,
1785 /* 9 */
1786 NULL,
1787 /* a */
1788 NULL,
1789 /* b */
1790 NULL,
1791 /* c */
1792 NULL,
1793 /* d */
1794 NULL,
1795 /* e */
1796 NULL,
1797 /* f */
1798 &g_aThreeByteMapX86_F30F38_F[0],
1799};
1800
1801const DISOPCODE g_aThreeByteMapX86_0F3A_0[16] =
1802{
1803 INVALID_OPCODE,
1804 INVALID_OPCODE,
1805 INVALID_OPCODE,
1806 INVALID_OPCODE,
1807 INVALID_OPCODE,
1808 INVALID_OPCODE,
1809 INVALID_OPCODE,
1810 INVALID_OPCODE,
1811 INVALID_OPCODE,
1812 INVALID_OPCODE,
1813 INVALID_OPCODE,
1814 INVALID_OPCODE,
1815 INVALID_OPCODE,
1816 INVALID_OPCODE,
1817 INVALID_OPCODE,
1818 OP("palignr %Pq,%Qq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PALIGNR, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1819};
1820
1821const DISOPCODE g_aThreeByteMapX86_0F3A_C[16] =
1822{
1823 INVALID_OPCODE,
1824 INVALID_OPCODE,
1825 INVALID_OPCODE,
1826 INVALID_OPCODE,
1827 INVALID_OPCODE,
1828 INVALID_OPCODE,
1829 INVALID_OPCODE,
1830 INVALID_OPCODE,
1831 INVALID_OPCODE,
1832 INVALID_OPCODE,
1833 INVALID_OPCODE,
1834 INVALID_OPCODE,
1835 OP("sha1rnds4 %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_SHA1RNDS4, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1836 INVALID_OPCODE,
1837 INVALID_OPCODE,
1838 INVALID_OPCODE,
1839};
1840
1841PCDISOPCODE const g_apThreeByteMapX86_0F3A[16] =
1842{
1843 /* 0 */
1844 g_aThreeByteMapX86_0F3A_0,
1845 /* 1 */
1846 NULL,
1847 /* 2 */
1848 NULL,
1849 /* 3 */
1850 NULL,
1851 /* 4 */
1852 NULL,
1853 /* 5 */
1854 NULL,
1855 /* 6 */
1856 NULL,
1857 /* 7 */
1858 NULL,
1859 /* 8 */
1860 NULL,
1861 /* 9 */
1862 NULL,
1863 /* a */
1864 NULL,
1865 /* b */
1866 NULL,
1867 /* c */
1868 &g_aThreeByteMapX86_0F3A_C[0],
1869 /* d */
1870 NULL,
1871 /* e */
1872 NULL,
1873 /* f */
1874 NULL,
1875};
1876
1877const DISOPCODE g_aThreeByteMapX86_660F3A_0[16] =
1878{
1879 INVALID_OPCODE,
1880 INVALID_OPCODE,
1881 INVALID_OPCODE,
1882 INVALID_OPCODE,
1883 INVALID_OPCODE,
1884 INVALID_OPCODE,
1885 INVALID_OPCODE,
1886 INVALID_OPCODE,
1887 OP("roundps %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_ROUNDPS, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1888 OP("roundpd %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_ROUNDPD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1889 OP("roundss %Vss,%Wss,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_ROUNDSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1890 OP("roundsd %Vsd,%Wsd,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_ROUNDSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1891 OP("blendps %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_BLENDPS, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1892 OP("blendpd %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_BLENDPD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1893 OP("pblendw %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PBLENDW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1894 OP("palignr %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PALIGNR, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1895};
1896
1897const DISOPCODE g_aThreeByteMapX86_660F3A_10[16] =
1898{
1899 INVALID_OPCODE,
1900 INVALID_OPCODE,
1901 INVALID_OPCODE,
1902 INVALID_OPCODE,
1903 OP("pextrb %Eb,%Vdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PEXTRB, OP_PARM_Eb, OP_PARM_Vdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1904 OP("pextrw %Ew,%Vdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PEXTRW, OP_PARM_Ew, OP_PARM_Vdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1905 OP("pextrd %Ed,%Vdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PEXTRD, OP_PARM_Ed, OP_PARM_Vdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1906 OP("extractps %Ed,%Vdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_EXTRACTPS, OP_PARM_Ed, OP_PARM_Vdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1907 INVALID_OPCODE,
1908 INVALID_OPCODE,
1909 INVALID_OPCODE,
1910 INVALID_OPCODE,
1911 INVALID_OPCODE,
1912 INVALID_OPCODE,
1913 INVALID_OPCODE,
1914 INVALID_OPCODE,
1915};
1916
1917const DISOPCODE g_aThreeByteMapX86_660F3A_20[16] =
1918{
1919 // pinsrb %Vdq,%Ry/Mb,%Ib
1920 OP("pinsrb %Vdq,%Ey,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PINSRB, OP_PARM_Vdq, OP_PARM_Ey, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1921 // insertps %Vdq,%Udq/Md,%Ib
1922 OP("insertps %Vdq,%Wdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_INSERTPS, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1923 OP("pinsrd %Vdq,%Ey,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PINSRD, OP_PARM_Vdq, OP_PARM_Ey, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1924 INVALID_OPCODE,
1925 INVALID_OPCODE,
1926 INVALID_OPCODE,
1927 INVALID_OPCODE,
1928 INVALID_OPCODE,
1929 INVALID_OPCODE,
1930 INVALID_OPCODE,
1931 INVALID_OPCODE,
1932 INVALID_OPCODE,
1933 INVALID_OPCODE,
1934 INVALID_OPCODE,
1935 INVALID_OPCODE,
1936 INVALID_OPCODE,
1937};
1938
1939const DISOPCODE g_aThreeByteMapX86_660F3A_40[16] =
1940{
1941 OP("dpps %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_DPPS, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1942 OP("dppd %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_DPPD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1943 OP("mpsadbw %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_MPSADBW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1944 INVALID_OPCODE,
1945 OP("pclmulqdq %Vdq,%Wdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PCLMULQDQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1946 INVALID_OPCODE,
1947 INVALID_OPCODE,
1948 INVALID_OPCODE,
1949 INVALID_OPCODE,
1950 INVALID_OPCODE,
1951 INVALID_OPCODE,
1952 INVALID_OPCODE,
1953 INVALID_OPCODE,
1954 INVALID_OPCODE,
1955 INVALID_OPCODE,
1956 INVALID_OPCODE,
1957};
1958
1959const DISOPCODE g_aThreeByteMapX86_660F3A_60[16] =
1960{
1961 OP("pcmpestrm %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PCMPESTRM, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1962 OP("pcmpestri %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PCMPESTRI, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1963 OP("pcmpistrm %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PCMPISTRM, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1964 OP("pcmpistri %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PCMPISTRI, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1965 INVALID_OPCODE,
1966 INVALID_OPCODE,
1967 INVALID_OPCODE,
1968 INVALID_OPCODE,
1969 INVALID_OPCODE,
1970 INVALID_OPCODE,
1971 INVALID_OPCODE,
1972 INVALID_OPCODE,
1973 INVALID_OPCODE,
1974 INVALID_OPCODE,
1975 INVALID_OPCODE,
1976 INVALID_OPCODE,
1977};
1978
1979const DISOPCODE g_aThreeByteMapX86_660F3A_D0[16] =
1980{
1981 INVALID_OPCODE,
1982 INVALID_OPCODE,
1983 INVALID_OPCODE,
1984 INVALID_OPCODE,
1985 INVALID_OPCODE,
1986 INVALID_OPCODE,
1987 INVALID_OPCODE,
1988 INVALID_OPCODE,
1989 INVALID_OPCODE,
1990 INVALID_OPCODE,
1991 INVALID_OPCODE,
1992 INVALID_OPCODE,
1993 INVALID_OPCODE,
1994 INVALID_OPCODE,
1995 INVALID_OPCODE,
1996 OP("aeskeygen %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_AESKEYGEN, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
1997};
1998
1999/** Three byte opcode map with prefix 0x66 (0xF 0x3A) */
2000/** @todo remainder missing (too lazy now) */
2001PCDISOPCODE const g_apThreeByteMapX86_660F3A[16] =
2002{
2003 /* 0 */
2004 g_aThreeByteMapX86_660F3A_0,
2005 /* 1 */
2006 g_aThreeByteMapX86_660F3A_10,
2007 /* 2 */
2008 g_aThreeByteMapX86_660F3A_20,
2009 /* 3 */
2010 NULL,
2011 /* 4 */
2012 g_aThreeByteMapX86_660F3A_40,
2013 /* 5 */
2014 NULL,
2015 /* 6 */
2016 g_aThreeByteMapX86_660F3A_60,
2017 /* 7 */
2018 NULL,
2019 /* 8 */
2020 NULL,
2021 /* 9 */
2022 NULL,
2023 /* a */
2024 NULL,
2025 /* b */
2026 NULL,
2027 /* c */
2028 NULL,
2029 /* d */
2030 g_aThreeByteMapX86_660F3A_D0,
2031 /* e */
2032 NULL,
2033 /* f */
2034 NULL,
2035};
2036
2037/* 3DNow! map (0x0F 0x0F prefix) */
2038const DISOPCODE g_aTwoByteMapX86_3DNow[256] =
2039{
2040 /* 0 */
2041 INVALID_OPCODE_MOD_RM(0x00),
2042 INVALID_OPCODE_MOD_RM(0x01),
2043 INVALID_OPCODE_MOD_RM(0x02),
2044 INVALID_OPCODE_MOD_RM(0x03),
2045 INVALID_OPCODE_MOD_RM(0x04),
2046 INVALID_OPCODE_MOD_RM(0x05),
2047 INVALID_OPCODE_MOD_RM(0x06),
2048 INVALID_OPCODE_MOD_RM(0x07),
2049 INVALID_OPCODE_MOD_RM(0x08),
2050 INVALID_OPCODE_MOD_RM(0x09),
2051 INVALID_OPCODE_MOD_RM(0x0a),
2052 INVALID_OPCODE_MOD_RM(0x0c),
2053 OP("pi2fw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PI2FW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2054 OP("pi2fd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PI2FD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2055 INVALID_OPCODE_MOD_RM(0x0e),
2056 INVALID_OPCODE_MOD_RM(0x0f),
2057
2058 /* 1 */
2059 INVALID_OPCODE_MOD_RM(0x10),
2060 INVALID_OPCODE_MOD_RM(0x11),
2061 INVALID_OPCODE_MOD_RM(0x12),
2062 INVALID_OPCODE_MOD_RM(0x13),
2063 INVALID_OPCODE_MOD_RM(0x14),
2064 INVALID_OPCODE_MOD_RM(0x15),
2065 INVALID_OPCODE_MOD_RM(0x16),
2066 INVALID_OPCODE_MOD_RM(0x17),
2067 INVALID_OPCODE_MOD_RM(0x18),
2068 INVALID_OPCODE_MOD_RM(0x19),
2069 INVALID_OPCODE_MOD_RM(0x1a),
2070 INVALID_OPCODE_MOD_RM(0x1b),
2071 OP("pf2iw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PF2IW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2072 OP("pf2id %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PF2ID, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2073 INVALID_OPCODE_MOD_RM(0x1e),
2074 INVALID_OPCODE_MOD_RM(0x1f),
2075
2076 /* 2 */
2077 INVALID_OPCODE_BLOCK_MOD_RM(0x2)
2078
2079 /* 3 */
2080 INVALID_OPCODE_BLOCK_MOD_RM(0x3)
2081
2082 /* 4 */
2083 INVALID_OPCODE_BLOCK_MOD_RM(0x4)
2084
2085 /* 5 */
2086 INVALID_OPCODE_BLOCK_MOD_RM(0x5)
2087
2088 /* 6 */
2089 INVALID_OPCODE_BLOCK_MOD_RM(0x6)
2090
2091 /* 7 */
2092 INVALID_OPCODE_BLOCK_MOD_RM(0x7)
2093
2094 /* 8 */
2095 INVALID_OPCODE_MOD_RM(0x80),
2096 INVALID_OPCODE_MOD_RM(0x81),
2097 INVALID_OPCODE_MOD_RM(0x82),
2098 INVALID_OPCODE_MOD_RM(0x83),
2099 INVALID_OPCODE_MOD_RM(0x84),
2100 INVALID_OPCODE_MOD_RM(0x85),
2101 INVALID_OPCODE_MOD_RM(0x86),
2102 INVALID_OPCODE_MOD_RM(0x87),
2103 INVALID_OPCODE_MOD_RM(0x88),
2104 INVALID_OPCODE_MOD_RM(0x89),
2105 OP("pfnacc %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFNACC, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2106 INVALID_OPCODE_MOD_RM(0x8b),
2107 INVALID_OPCODE_MOD_RM(0x8c),
2108 INVALID_OPCODE_MOD_RM(0x8d),
2109 OP("pfpnacc %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFPNACC, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2110 INVALID_OPCODE_MOD_RM(0x8f),
2111
2112 /* 9 */
2113 OP("pfcmpge %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFCMPGE, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2114 INVALID_OPCODE_MOD_RM(0x91),
2115 INVALID_OPCODE_MOD_RM(0x92),
2116 INVALID_OPCODE_MOD_RM(0x93),
2117 OP("pfmin %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFMIN, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2118 INVALID_OPCODE_MOD_RM(0x95),
2119 OP("pfrcp %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRCP, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2120 OP("pfrsqrt %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRSQRT, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2121 INVALID_OPCODE_MOD_RM(0x98),
2122 INVALID_OPCODE_MOD_RM(0x99),
2123 OP("pfsub %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFSUB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2124 INVALID_OPCODE_MOD_RM(0x9b),
2125 INVALID_OPCODE_MOD_RM(0x9c),
2126 INVALID_OPCODE_MOD_RM(0x9d),
2127 OP("pfadd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFADD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2128 INVALID_OPCODE_MOD_RM(0x9f),
2129
2130 /* a */
2131 OP("pfcmpgt %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFCMPGT, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2132 INVALID_OPCODE_MOD_RM(0xa1),
2133 INVALID_OPCODE_MOD_RM(0xa2),
2134 INVALID_OPCODE_MOD_RM(0xa3),
2135 OP("pfmax %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFMAX, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2136 INVALID_OPCODE_MOD_RM(0xa5),
2137 OP("pfrcpit1 %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRCPIT1,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2138 OP("pfrsqit1 %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRSQRTIT1, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2139 INVALID_OPCODE_MOD_RM(0xa8),
2140 INVALID_OPCODE_MOD_RM(0xa9),
2141 OP("pfsubr %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFSUBR, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2142 INVALID_OPCODE_MOD_RM(0xab),
2143 INVALID_OPCODE_MOD_RM(0xac),
2144 INVALID_OPCODE_MOD_RM(0xad),
2145 OP("pfacc %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFACC, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2146 INVALID_OPCODE_MOD_RM(0xaf),
2147
2148 /* b */
2149 OP("pfcmpeq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFCMPEQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2150 INVALID_OPCODE_MOD_RM(0xb1),
2151 INVALID_OPCODE_MOD_RM(0xb2),
2152 INVALID_OPCODE_MOD_RM(0xb3),
2153 OP("pfmul %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFMUL, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2154 INVALID_OPCODE_MOD_RM(0xb5),
2155 OP("pfrcpit2 %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRCPIT2,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2156 OP("pmulhrw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFMULHRW,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2157 INVALID_OPCODE_MOD_RM(0xb8),
2158 INVALID_OPCODE_MOD_RM(0xb9),
2159 INVALID_OPCODE_MOD_RM(0xba),
2160 OP("pswapd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFSWAPD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2161 INVALID_OPCODE_MOD_RM(0xbc),
2162 INVALID_OPCODE_MOD_RM(0xbd),
2163 INVALID_OPCODE_MOD_RM(0xbe),
2164 OP("pavgusb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGUSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2165
2166 /* c */
2167 INVALID_OPCODE_BLOCK_MOD_RM(0xc)
2168
2169 /* d */
2170 INVALID_OPCODE_BLOCK_MOD_RM(0xd)
2171
2172 /* e */
2173 INVALID_OPCODE_BLOCK_MOD_RM(0xe)
2174
2175 /* f */
2176 INVALID_OPCODE_BLOCK_MOD_RM(0xf)
2177};
2178
2179
2180
2181/* Floating point opcode starting with escape byte 0xD8 (values 0-0xBF)*/
2182const DISOPCODE g_aMapX86_EscF0_Low[8] =
2183{
2184 /* 0 */
2185 OP("fadd %Md", IDX_ParseModRM, 0, 0, OP_FADD, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2186 OP("fmul %Md", IDX_ParseModRM, 0, 0, OP_FMUL, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2187 OP("fcom %Md", IDX_ParseModRM, 0, 0, OP_FCOM, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2188 OP("fcomp %Md", IDX_ParseModRM, 0, 0, OP_FCOMP, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2189 OP("fsub %Md", IDX_ParseModRM, 0, 0, OP_FSUB, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2190 OP("fsubr %Md", IDX_ParseModRM, 0, 0, OP_FSUBR, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2191 OP("fdiv %Md", IDX_ParseModRM, 0, 0, OP_FDIV, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2192 OP("fdivr %Md", IDX_ParseModRM, 0, 0, OP_FDIVR, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2193};
2194
2195/* Floating point opcode starting with escape byte 0xD8 (outside 0-0xBF)*/
2196const DISOPCODE g_aMapX86_EscF0_High[16*4] =
2197{
2198 /* c */
2199 OP("fadd ST(0),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2200 OP("fadd ST(0),ST(1)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2201 OP("fadd ST(0),ST(2)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2202 OP("fadd ST(0),ST(3)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2203 OP("fadd ST(0),ST(4)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2204 OP("fadd ST(0),ST(5)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2205 OP("fadd ST(0),ST(6)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2206 OP("fadd ST(0),ST(7)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2207 OP("fmul ST(0),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2208 OP("fmul ST(0),ST(1)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2209 OP("fmul ST(0),ST(2)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2210 OP("fmul ST(0),ST(3)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2211 OP("fmul ST(0),ST(4)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2212 OP("fmul ST(0),ST(5)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2213 OP("fmul ST(0),ST(6)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2214 OP("fmul ST(0),ST(7)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2215
2216 /* d */
2217 OP("fcom ST(0),ST(0)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2218 OP("fcom ST(0),ST(1)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2219 OP("fcom ST(0),ST(2)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2220 OP("fcom ST(0),ST(3)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2221 OP("fcom ST(0),ST(4)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2222 OP("fcom ST(0),ST(5)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2223 OP("fcom ST(0),ST(6)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2224 OP("fcom ST(0),ST(7)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2225 OP("fcomp ST(0),ST(0)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2226 OP("fcomp ST(0),ST(1)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2227 OP("fcomp ST(0),ST(2)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2228 OP("fcomp ST(0),ST(3)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2229 OP("fcomp ST(0),ST(4)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2230 OP("fcomp ST(0),ST(5)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2231 OP("fcomp ST(0),ST(6)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2232 OP("fcomp ST(0),ST(7)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2233
2234
2235 /* e */
2236 OP("fsub ST(0),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2237 OP("fsub ST(0),ST(1)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2238 OP("fsub ST(0),ST(2)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2239 OP("fsub ST(0),ST(3)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2240 OP("fsub ST(0),ST(4)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2241 OP("fsub ST(0),ST(5)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2242 OP("fsub ST(0),ST(6)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2243 OP("fsub ST(0),ST(7)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2244 OP("fsubr ST(0),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2245 OP("fsubr ST(0),ST(1)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2246 OP("fsubr ST(0),ST(2)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2247 OP("fsubr ST(0),ST(3)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2248 OP("fsubr ST(0),ST(4)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2249 OP("fsubr ST(0),ST(5)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2250 OP("fsubr ST(0),ST(6)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2251 OP("fsubr ST(0),ST(7)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2252
2253 /* f */
2254 OP("fdiv ST(0),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2255 OP("fdiv ST(0),ST(1)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2256 OP("fdiv ST(0),ST(2)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2257 OP("fdiv ST(0),ST(3)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2258 OP("fdiv ST(0),ST(4)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2259 OP("fdiv ST(0),ST(5)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2260 OP("fdiv ST(0),ST(6)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2261 OP("fdiv ST(0),ST(7)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2262 OP("fdivr ST(0),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2263 OP("fdivr ST(0),ST(1)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2264 OP("fdivr ST(0),ST(2)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2265 OP("fdivr ST(0),ST(3)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2266 OP("fdivr ST(0),ST(4)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2267 OP("fdivr ST(0),ST(5)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2268 OP("fdivr ST(0),ST(6)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2269 OP("fdivr ST(0),ST(7)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2270};
2271
2272/* Floating point opcode starting with escape byte 0xD9 (values 0-0xBF)*/
2273const DISOPCODE g_aMapX86_EscF1_Low[8] =
2274{
2275 /* 0 */
2276 OP("fld %Md", IDX_ParseModRM, 0, 0, OP_FLD, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2277 INVALID_OPCODE,
2278 OP("fst %Md", IDX_ParseModRM, 0, 0, OP_FST, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2279 OP("fstp %Md", IDX_ParseModRM, 0, 0, OP_FSTP, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2280 /// @todo ??
2281 OP("fldenv %M", IDX_ParseModRM, 0, 0, OP_FLDENV, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2282 OP("fldcw %Ew", IDX_ParseModRM, 0, 0, OP_FSUBR, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2283 /// @todo ??
2284 OP("fstenv %M", IDX_ParseModRM, 0, 0, OP_FSTENV, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2285 OP("fstcw %Ew", IDX_ParseModRM, 0, 0, OP_FSTCW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2286};
2287
2288
2289/* Floating point opcode starting with escape byte 0xD9 (outside 0-0xBF)*/
2290const DISOPCODE g_aMapX86_EscF1_High[16*4] =
2291{
2292 /* c */
2293 OP("fld ST(0),ST(0)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2294 OP("fld ST(0),ST(1)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2295 OP("fld ST(0),ST(2)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2296 OP("fld ST(0),ST(3)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2297 OP("fld ST(0),ST(4)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2298 OP("fld ST(0),ST(5)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2299 OP("fld ST(0),ST(6)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2300 OP("fld ST(0),ST(7)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2301 OP("fxch ST(0),ST(0)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2302 OP("fxch ST(0),ST(1)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2303 OP("fxch ST(0),ST(2)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2304 OP("fxch ST(0),ST(3)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2305 OP("fxch ST(0),ST(4)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2306 OP("fxch ST(0),ST(5)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2307 OP("fxch ST(0),ST(6)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2308 OP("fxch ST(0),ST(7)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2309
2310 /* d */
2311 OP("fnop", 0, 0, 0, OP_FNOP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2312 INVALID_OPCODE,
2313 INVALID_OPCODE,
2314 INVALID_OPCODE,
2315 INVALID_OPCODE,
2316 INVALID_OPCODE,
2317 INVALID_OPCODE,
2318 INVALID_OPCODE,
2319 INVALID_OPCODE,
2320 INVALID_OPCODE,
2321 INVALID_OPCODE,
2322 INVALID_OPCODE,
2323 INVALID_OPCODE,
2324 INVALID_OPCODE,
2325 INVALID_OPCODE,
2326 INVALID_OPCODE,
2327
2328
2329 /* e */
2330 OP("fchs", 0, 0, 0, OP_FCHS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2331 OP("fabs", 0, 0, 0, OP_FABS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2332 INVALID_OPCODE,
2333 INVALID_OPCODE,
2334 OP("ftst", 0, 0, 0, OP_FCHS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2335 OP("fxam", 0, 0, 0, OP_FCHS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2336 INVALID_OPCODE,
2337 INVALID_OPCODE,
2338 OP("fld1", 0, 0, 0, OP_FLD1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2339 OP("fldl2t", 0, 0, 0, OP_FLDL2T, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2340 OP("fldl2e", 0, 0, 0, OP_FLDL2E, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2341 OP("fldpi", 0, 0, 0, OP_FLDPI, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2342 OP("fldlg2", 0, 0, 0, OP_FLDLG2, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2343 OP("fldln2", 0, 0, 0, OP_FLDLN2, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2344 OP("fldz", 0, 0, 0, OP_FLDZ, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2345 INVALID_OPCODE,
2346
2347 /* f */
2348 OP("f2xm1", 0, 0, 0, OP_F2XM1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2349 OP("fyl2x", 0, 0, 0, OP_FYL2X, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2350 OP("fptan", 0, 0, 0, OP_FPTAN, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2351 OP("fpatan", 0, 0, 0, OP_FPATAN, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2352 OP("fxtract", 0, 0, 0, OP_FXTRACT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2353 OP("frem1", 0, 0, 0, OP_FREM1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2354 OP("fdecstp", 0, 0, 0, OP_FDECSTP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2355 OP("fincstp", 0, 0, 0, OP_FINCSTP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2356 OP("fprem", 0, 0, 0, OP_FPREM, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2357 OP("fyl2xp1", 0, 0, 0, OP_FYL2XP1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2358 OP("fsqrt", 0, 0, 0, OP_FSQRT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2359 OP("fsincos", 0, 0, 0, OP_FSINCOS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2360 OP("frndint", 0, 0, 0, OP_FRNDINT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2361 OP("fscale", 0, 0, 0, OP_FSCALE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2362 OP("fsin", 0, 0, 0, OP_FSIN, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2363 OP("fcos", 0, 0, 0, OP_FCOS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2364};
2365
2366
2367/* Floating point opcode starting with escape byte 0xDA (values 0-0xBF)*/
2368const DISOPCODE g_aMapX86_EscF2_Low[8] =
2369{
2370 /* 0 */
2371 OP("fiadd %Md", IDX_ParseModRM, 0, 0, OP_FIADD, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2372 OP("fimul %Md", IDX_ParseModRM, 0, 0, OP_FIMUL, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2373 OP("ficom %Md", IDX_ParseModRM, 0, 0, OP_FICOM, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2374 OP("ficomp %Md", IDX_ParseModRM, 0, 0, OP_FICOMP, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2375 OP("fisub %Md", IDX_ParseModRM, 0, 0, OP_FISUB, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2376 OP("fisubr %Md", IDX_ParseModRM, 0, 0, OP_FISUBR, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2377 OP("fidiv %Md", IDX_ParseModRM, 0, 0, OP_FIDIV, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2378 OP("fidivr %Md", IDX_ParseModRM, 0, 0, OP_FIDIVR, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2379};
2380
2381
2382/* Floating point opcode starting with escape byte 0xD9 (outside 0-0xBF)*/
2383const DISOPCODE g_aMapX86_EscF2_High[16*4] =
2384{
2385 /* c */
2386 OP("fcmovb ST(0),ST(0)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2387 OP("fcmovb ST(0),ST(1)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2388 OP("fcmovb ST(0),ST(2)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2389 OP("fcmovb ST(0),ST(3)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2390 OP("fcmovb ST(0),ST(4)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2391 OP("fcmovb ST(0),ST(5)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2392 OP("fcmovb ST(0),ST(6)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2393 OP("fcmovb ST(0),ST(7)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2394 OP("fcmove ST(0),ST(0)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2395 OP("fcmove ST(0),ST(1)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2396 OP("fcmove ST(0),ST(2)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2397 OP("fcmove ST(0),ST(3)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2398 OP("fcmove ST(0),ST(4)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2399 OP("fcmove ST(0),ST(5)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2400 OP("fcmove ST(0),ST(6)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2401 OP("fcmove ST(0),ST(7)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2402
2403 /* d */
2404 OP("fcmovbe ST(0),ST(0)", 0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2405 OP("fcmovbe ST(0),ST(1)", 0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2406 OP("fcmovbe ST(0),ST(2)", 0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2407 OP("fcmovbe ST(0),ST(3)", 0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2408 OP("fcmovbe ST(0),ST(4)", 0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2409 OP("fcmovbe ST(0),ST(5)", 0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2410 OP("fcmovbe ST(0),ST(6)", 0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2411 OP("fcmovbe ST(0),ST(7)", 0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2412 OP("fcmovu ST(0),ST(0)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2413 OP("fcmovu ST(0),ST(1)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2414 OP("fcmovu ST(0),ST(2)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2415 OP("fcmovu ST(0),ST(3)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2416 OP("fcmovu ST(0),ST(4)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2417 OP("fcmovu ST(0),ST(5)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2418 OP("fcmovu ST(0),ST(6)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2419 OP("fcmovu ST(0),ST(7)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2420
2421 /* e */
2422 INVALID_OPCODE,
2423 INVALID_OPCODE,
2424 INVALID_OPCODE,
2425 INVALID_OPCODE,
2426 INVALID_OPCODE,
2427 INVALID_OPCODE,
2428 INVALID_OPCODE,
2429 INVALID_OPCODE,
2430 INVALID_OPCODE,
2431 OP("fucompp", 0, 0, 0, OP_FUCOMPP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2432 INVALID_OPCODE,
2433 INVALID_OPCODE,
2434 INVALID_OPCODE,
2435 INVALID_OPCODE,
2436 INVALID_OPCODE,
2437 INVALID_OPCODE,
2438
2439 /* f */
2440 INVALID_OPCODE_BLOCK
2441};
2442
2443
2444/* Floating point opcode starting with escape byte 0xDB (values 0-0xBF)*/
2445const DISOPCODE g_aMapX86_EscF3_Low[8] =
2446{
2447 /* 0 */
2448 OP("fild %Md", IDX_ParseModRM, 0, 0, OP_FILD, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2449 INVALID_OPCODE,
2450 OP("fist %Md", IDX_ParseModRM, 0, 0, OP_FIST, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2451 OP("fistp %Md", IDX_ParseModRM, 0, 0, OP_FISTP, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2452 INVALID_OPCODE,
2453 OP("fld %Mq", IDX_ParseModRM, 0, 0, OP_FLD, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2454 INVALID_OPCODE,
2455 OP("fstp %Mq", IDX_ParseModRM, 0, 0, OP_FSTP, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2456};
2457
2458
2459/* Floating point opcode starting with escape byte 0xDB (outside 0-0xBF)*/
2460const DISOPCODE g_aMapX86_EscF3_High[16*4] =
2461{
2462 /* c */
2463 OP("fcmovnb ST(0),ST(0)", 0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2464 OP("fcmovnb ST(0),ST(1)", 0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2465 OP("fcmovnb ST(0),ST(2)", 0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2466 OP("fcmovnb ST(0),ST(3)", 0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2467 OP("fcmovnb ST(0),ST(4)", 0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2468 OP("fcmovnb ST(0),ST(5)", 0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2469 OP("fcmovnb ST(0),ST(6)", 0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2470 OP("fcmovnb ST(0),ST(7)", 0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2471 OP("fcmovne ST(0),ST(0)", 0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2472 OP("fcmovne ST(0),ST(1)", 0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2473 OP("fcmovne ST(0),ST(2)", 0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2474 OP("fcmovne ST(0),ST(3)", 0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2475 OP("fcmovne ST(0),ST(4)", 0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2476 OP("fcmovne ST(0),ST(5)", 0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2477 OP("fcmovne ST(0),ST(6)", 0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2478 OP("fcmovne ST(0),ST(7)", 0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2479
2480 /* d */
2481 OP("fcmovnbe ST(0),ST(0)", 0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2482 OP("fcmovnbe ST(0),ST(1)", 0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2483 OP("fcmovnbe ST(0),ST(2)", 0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2484 OP("fcmovnbe ST(0),ST(3)", 0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2485 OP("fcmovnbe ST(0),ST(4)", 0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2486 OP("fcmovnbe ST(0),ST(5)", 0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2487 OP("fcmovnbe ST(0),ST(6)", 0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2488 OP("fcmovnbe ST(0),ST(7)", 0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2489 OP("fcmovnu ST(0),ST(0)", 0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2490 OP("fcmovnu ST(0),ST(1)", 0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2491 OP("fcmovnu ST(0),ST(2)", 0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2492 OP("fcmovnu ST(0),ST(3)", 0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2493 OP("fcmovnu ST(0),ST(4)", 0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2494 OP("fcmovnu ST(0),ST(5)", 0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2495 OP("fcmovnu ST(0),ST(6)", 0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2496 OP("fcmovnu ST(0),ST(7)", 0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2497
2498 /* e */
2499 INVALID_OPCODE,
2500 INVALID_OPCODE,
2501 OP("fclex", 0, 0, 0, OP_FCLEX, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2502 OP("finit", 0, 0, 0, OP_FINIT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2503 INVALID_OPCODE,
2504 INVALID_OPCODE,
2505 INVALID_OPCODE,
2506 INVALID_OPCODE,
2507 OP("fucomi ST(0),ST(0)", 0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2508 OP("fucomi ST(0),ST(1)", 0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2509 OP("fucomi ST(0),ST(2)", 0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2510 OP("fucomi ST(0),ST(3)", 0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2511 OP("fucomi ST(0),ST(4)", 0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2512 OP("fucomi ST(0),ST(5)", 0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2513 OP("fucomi ST(0),ST(6)", 0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2514 OP("fucomi ST(0),ST(7)", 0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2515
2516
2517 /* e */
2518 OP("fcomi ST(0),ST(0)", 0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2519 OP("fcomi ST(0),ST(1)", 0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2520 OP("fcomi ST(0),ST(2)", 0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2521 OP("fcomi ST(0),ST(3)", 0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2522 OP("fcomi ST(0),ST(4)", 0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2523 OP("fcomi ST(0),ST(5)", 0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2524 OP("fcomi ST(0),ST(6)", 0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2525 OP("fcomi ST(0),ST(7)", 0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2526 INVALID_OPCODE,
2527 INVALID_OPCODE,
2528 INVALID_OPCODE,
2529 INVALID_OPCODE,
2530 INVALID_OPCODE,
2531 INVALID_OPCODE,
2532 INVALID_OPCODE,
2533 INVALID_OPCODE,
2534};
2535
2536
2537/* Floating point opcode starting with escape byte 0xDC (values 0-0xBF)*/
2538const DISOPCODE g_aMapX86_EscF4_Low[8] =
2539{
2540 /* 0 */
2541 OP("fadd %Mq", IDX_ParseModRM, 0, 0, OP_FADD, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2542 OP("fmul %Mq", IDX_ParseModRM, 0, 0, OP_FMUL, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2543 OP("fcom %Mq", IDX_ParseModRM, 0, 0, OP_FCOM, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2544 OP("fcomp %Mq", IDX_ParseModRM, 0, 0, OP_FCOMP, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2545 OP("fsub %Mq", IDX_ParseModRM, 0, 0, OP_FSUB, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2546 OP("fsubr %Mq", IDX_ParseModRM, 0, 0, OP_FSUBR, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2547 OP("fdiv %Mq", IDX_ParseModRM, 0, 0, OP_FDIV, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2548 OP("fdivr %Mq", IDX_ParseModRM, 0, 0, OP_FDIVR, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2549};
2550
2551
2552/* Floating point opcode starting with escape byte 0xDC (outside 0-0xBF)*/
2553const DISOPCODE g_aMapX86_EscF4_High[16*4] =
2554{
2555 /* c */
2556 OP("fadd ST(0),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2557 OP("fadd ST(1),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2558 OP("fadd ST(2),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2559 OP("fadd ST(3),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2560 OP("fadd ST(4),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2561 OP("fadd ST(5),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2562 OP("fadd ST(6),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2563 OP("fadd ST(7),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2564 OP("fmul ST(0),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2565 OP("fmul ST(1),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2566 OP("fmul ST(2),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2567 OP("fmul ST(3),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2568 OP("fmul ST(4),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2569 OP("fmul ST(5),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2570 OP("fmul ST(6),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2571 OP("fmul ST(7),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2572
2573 /* d */
2574 INVALID_OPCODE_BLOCK
2575
2576
2577 /* e */
2578 OP("fsubr ST(0),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2579 OP("fsubr ST(1),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2580 OP("fsubr ST(2),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2581 OP("fsubr ST(3),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2582 OP("fsubr ST(4),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2583 OP("fsubr ST(5),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2584 OP("fsubr ST(6),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2585 OP("fsubr ST(7),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2586 OP("fsub ST(0),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2587 OP("fsub ST(1),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2588 OP("fsub ST(2),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2589 OP("fsub ST(3),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2590 OP("fsub ST(4),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2591 OP("fsub ST(5),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2592 OP("fsub ST(6),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2593 OP("fsub ST(7),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2594
2595 /* f */
2596 OP("fdivr ST(0),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2597 OP("fdivr ST(1),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2598 OP("fdivr ST(2),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2599 OP("fdivr ST(3),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2600 OP("fdivr ST(4),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2601 OP("fdivr ST(5),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2602 OP("fdivr ST(6),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2603 OP("fdivr ST(7),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2604 OP("fdiv ST(0),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2605 OP("fdiv ST(1),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2606 OP("fdiv ST(2),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2607 OP("fdiv ST(3),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2608 OP("fdiv ST(4),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2609 OP("fdiv ST(5),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2610 OP("fdiv ST(6),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2611 OP("fdiv ST(7),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2612};
2613
2614
2615/* Floating point opcode starting with escape byte 0xDD (values 0-0xBF)*/
2616const DISOPCODE g_aMapX86_EscF5_Low[8] =
2617{
2618 /* 0 */
2619 OP("fld %Mq", IDX_ParseModRM, 0, 0, OP_FLD, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2620 INVALID_OPCODE,
2621 OP("fst %Mq", IDX_ParseModRM, 0, 0, OP_FST, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2622 OP("fstp %Mq", IDX_ParseModRM, 0, 0, OP_FSTP, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2623 OP("frstor %M", IDX_ParseModRM, 0, 0, OP_FRSTOR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2624 INVALID_OPCODE,
2625 OP("fnsave %M", IDX_ParseModRM, 0, 0, OP_FSAVE, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2626 OP("fnstsw %Mw", IDX_ParseModRM, 0, 0, OP_FNSTSW, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2627};
2628
2629
2630/* Floating point opcode starting with escape byte 0xDD (outside 0-0xBF)*/
2631const DISOPCODE g_aMapX86_EscF5_High[16*4] =
2632{
2633 /* c */
2634 OP("ffree ST(0)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2635 OP("ffree ST(1)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2636 OP("ffree ST(2)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2637 OP("ffree ST(3)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2638 OP("ffree ST(4)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2639 OP("ffree ST(5)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2640 OP("ffree ST(6)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2641 OP("ffree ST(7)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2642 INVALID_OPCODE,
2643 INVALID_OPCODE,
2644 INVALID_OPCODE,
2645 INVALID_OPCODE,
2646 INVALID_OPCODE,
2647 INVALID_OPCODE,
2648 INVALID_OPCODE,
2649 INVALID_OPCODE,
2650
2651 /* d */
2652 OP("fst ST(0)", 0, 0, 0, OP_FST, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2653 OP("fst ST(1)", 0, 0, 0, OP_FST, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2654 OP("fst ST(2)", 0, 0, 0, OP_FST, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2655 OP("fst ST(3)", 0, 0, 0, OP_FST, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2656 OP("fst ST(4)", 0, 0, 0, OP_FST, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2657 OP("fst ST(5)", 0, 0, 0, OP_FST, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2658 OP("fst ST(6)", 0, 0, 0, OP_FST, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2659 OP("fst ST(7)", 0, 0, 0, OP_FST, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2660 OP("fstp ST(0)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2661 OP("fstp ST(1)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2662 OP("fstp ST(2)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2663 OP("fstp ST(3)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2664 OP("fstp ST(4)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2665 OP("fstp ST(5)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2666 OP("fstp ST(6)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2667 OP("fstp ST(7)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2668
2669
2670 /* e */
2671 OP("fucom ST(0)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2672 OP("fucom ST(1)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2673 OP("fucom ST(2)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2674 OP("fucom ST(3)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2675 OP("fucom ST(4)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2676 OP("fucom ST(5)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2677 OP("fucom ST(6)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2678 OP("fucom ST(7)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2679 OP("fucomp ST(0)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2680 OP("fucomp ST(1)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2681 OP("fucomp ST(2)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2682 OP("fucomp ST(3)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2683 OP("fucomp ST(4)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2684 OP("fucomp ST(5)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2685 OP("fucomp ST(6)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2686 OP("fucomp ST(7)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2687
2688 /* f */
2689 INVALID_OPCODE_BLOCK
2690};
2691
2692
2693
2694/* Floating point opcode starting with escape byte 0xDE (values 0-0xBF)*/
2695const DISOPCODE g_aMapX86_EscF6_Low[8] =
2696{
2697 /* 0 */
2698 OP("fiadd %Mw", IDX_ParseModRM, 0, 0, OP_FIADD, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2699 OP("fimul %Mw", IDX_ParseModRM, 0, 0, OP_FIMUL, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2700 OP("ficom %Mw", IDX_ParseModRM, 0, 0, OP_FICOM, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2701 OP("ficomp %Mw", IDX_ParseModRM, 0, 0, OP_FICOMP, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2702 OP("fisub %Mw", IDX_ParseModRM, 0, 0, OP_FISUB, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2703 OP("fisubr %Mw", IDX_ParseModRM, 0, 0, OP_FISUBR, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2704 OP("fidiv %Mw", IDX_ParseModRM, 0, 0, OP_FIDIV, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2705 OP("fidivr %Mw", IDX_ParseModRM, 0, 0, OP_FIDIVR, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2706};
2707
2708
2709/* Floating point opcode starting with escape byte 0xDE (outside 0-0xBF)*/
2710const DISOPCODE g_aMapX86_EscF6_High[16*4] =
2711{
2712 /* c */
2713 OP("faddp ST(0),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2714 OP("faddp ST(1),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2715 OP("faddp ST(2),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2716 OP("faddp ST(3),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2717 OP("faddp ST(4),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2718 OP("faddp ST(5),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2719 OP("faddp ST(6),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2720 OP("faddp ST(7),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2721 OP("fmulp ST(0),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2722 OP("fmulp ST(1),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2723 OP("fmulp ST(2),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2724 OP("fmulp ST(3),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2725 OP("fmulp ST(4),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2726 OP("fmulp ST(5),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2727 OP("fmulp ST(6),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2728 OP("fmulp ST(7),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2729
2730 /* d */
2731 INVALID_OPCODE,
2732 OP("fcompp", 0, 0, 0, OP_FCOMPP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2733 INVALID_OPCODE,
2734 INVALID_OPCODE,
2735 INVALID_OPCODE,
2736 INVALID_OPCODE,
2737 INVALID_OPCODE,
2738 INVALID_OPCODE,
2739 INVALID_OPCODE,
2740 INVALID_OPCODE,
2741 INVALID_OPCODE,
2742 INVALID_OPCODE,
2743 INVALID_OPCODE,
2744 INVALID_OPCODE,
2745 INVALID_OPCODE,
2746 INVALID_OPCODE,
2747
2748
2749 /* e */
2750 OP("fsubrp ST(0),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2751 OP("fsubrp ST(1),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2752 OP("fsubrp ST(2),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2753 OP("fsubrp ST(3),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2754 OP("fsubrp ST(4),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2755 OP("fsubrp ST(5),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2756 OP("fsubrp ST(6),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2757 OP("fsubrp ST(7),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2758 OP("fsubp ST(0),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2759 OP("fsubp ST(1),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2760 OP("fsubp ST(2),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2761 OP("fsubp ST(3),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2762 OP("fsubp ST(4),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2763 OP("fsubp ST(5),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2764 OP("fsubp ST(6),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2765 OP("fsubp ST(7),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2766
2767 /* f */
2768 OP("fdivrp ST(0),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2769 OP("fdivrp ST(1),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2770 OP("fdivrp ST(2),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2771 OP("fdivrp ST(3),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2772 OP("fdivrp ST(4),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2773 OP("fdivrp ST(5),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2774 OP("fdivrp ST(6),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2775 OP("fdivrp ST(7),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2776 OP("fdivp ST(0),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2777 OP("fdivp ST(1),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2778 OP("fdivp ST(2),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2779 OP("fdivp ST(3),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2780 OP("fdivp ST(4),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2781 OP("fdivp ST(5),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2782 OP("fdivp ST(6),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2783 OP("fdivp ST(7),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2784};
2785
2786/* Floating point opcode starting with escape byte 0xDF (values 0-0xBF)*/
2787const DISOPCODE g_aMapX86_EscF7_Low[8] =
2788{
2789 /* 0 */
2790 OP("fild %Mw", IDX_ParseModRM, 0, 0, OP_FILD, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2791 INVALID_OPCODE,
2792 OP("fist %Mw", IDX_ParseModRM, 0, 0, OP_FIST, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2793 OP("fistp %Mw", IDX_ParseModRM, 0, 0, OP_FISTP, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2794 OP("fbld %M", IDX_ParseModRM, 0, 0, OP_FBLD, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2795 OP("fild %Mq", IDX_ParseModRM, 0, 0, OP_FILD, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2796 OP("fbstp %M", IDX_ParseModRM, 0, 0, OP_FBSTP, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2797 OP("fistp %Mq", IDX_ParseModRM, 0, 0, OP_FISTP, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2798};
2799
2800
2801/* Floating point opcode starting with escape byte 0xDF (outside 0-0xBF)*/
2802const DISOPCODE g_aMapX86_EscF7_High[16*4] =
2803{
2804 /* c */
2805 INVALID_OPCODE_BLOCK
2806
2807 /* d */
2808 INVALID_OPCODE_BLOCK
2809
2810 /* e */
2811 OP("fnstsw ax", IDX_ParseFixedReg, 0, 0, OP_FNSTSW, OP_PARM_REG_AX, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2812 INVALID_OPCODE,
2813 INVALID_OPCODE,
2814 INVALID_OPCODE,
2815 INVALID_OPCODE,
2816 INVALID_OPCODE,
2817 INVALID_OPCODE,
2818 INVALID_OPCODE,
2819 OP("fucomip ST(0),ST(0)", 0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2820 OP("fucomip ST(0),ST(1)", 0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2821 OP("fucomip ST(0),ST(2)", 0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2822 OP("fucomip ST(0),ST(3)", 0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2823 OP("fucomip ST(0),ST(4)", 0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2824 OP("fucomip ST(0),ST(5)", 0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2825 OP("fucomip ST(0),ST(6)", 0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2826 OP("fucomip ST(0),ST(7)", 0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2827
2828 /* f */
2829 OP("fcomip ST(0),ST(0)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2830 OP("fcomip ST(0),ST(1)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2831 OP("fcomip ST(0),ST(2)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2832 OP("fcomip ST(0),ST(3)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2833 OP("fcomip ST(0),ST(4)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2834 OP("fcomip ST(0),ST(5)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2835 OP("fcomip ST(0),ST(6)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2836 OP("fcomip ST(0),ST(7)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2837 INVALID_OPCODE,
2838 INVALID_OPCODE,
2839 INVALID_OPCODE,
2840 INVALID_OPCODE,
2841 INVALID_OPCODE,
2842 INVALID_OPCODE,
2843 INVALID_OPCODE,
2844 INVALID_OPCODE,
2845};
2846
2847
2848const PCDISOPCODE g_apMapX86_FP_Low[8] =
2849{
2850 g_aMapX86_EscF0_Low,
2851 g_aMapX86_EscF1_Low,
2852 g_aMapX86_EscF2_Low,
2853 g_aMapX86_EscF3_Low,
2854 g_aMapX86_EscF4_Low,
2855 g_aMapX86_EscF5_Low,
2856 g_aMapX86_EscF6_Low,
2857 g_aMapX86_EscF7_Low
2858};
2859
2860const PCDISOPCODE g_apMapX86_FP_High[8] =
2861{
2862 g_aMapX86_EscF0_High,
2863 g_aMapX86_EscF1_High,
2864 g_aMapX86_EscF2_High,
2865 g_aMapX86_EscF3_High,
2866 g_aMapX86_EscF4_High,
2867 g_aMapX86_EscF5_High,
2868 g_aMapX86_EscF6_High,
2869 g_aMapX86_EscF7_High
2870};
2871
2872/* Opcode extensions (Group tables) */
2873const DISOPCODE g_aMapX86_Group1[8*4] =
2874{
2875 /* 80 */
2876 OP("add %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_ADD, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2877 OP("or %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_OR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2878 OP("adc %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_ADC, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2879 OP("sbb %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SBB, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2880 OP("and %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_AND, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2881 OP("sub %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SUB, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2882 OP("xor %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_XOR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2883 OP("cmp %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_CMP, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2884
2885 /* 81 */
2886 OP("add %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_ADD, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2887 OP("or %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_OR, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2888 OP("adc %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_ADC, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2889 OP("sbb %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_SBB, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2890 OP("and %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_AND, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2891 OP("sub %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_SUB, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2892 OP("xor %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_XOR, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2893 OP("cmp %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_CMP, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2894
2895 /* 82 */
2896 OP("add %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_ADD, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2897 OP("or %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_OR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2898 OP("adc %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_ADC, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2899 OP("sbb %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SBB, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2900 OP("and %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_AND, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2901 OP("sub %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SUB, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2902 OP("xor %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_XOR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2903 OP("cmp %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_CMP, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2904
2905 /* 83 */
2906 OP("add %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX, 0, OP_ADD, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2907 OP("or %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX, 0, OP_OR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2908 OP("adc %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX, 0, OP_ADC, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2909 OP("sbb %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX, 0, OP_SBB, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2910 OP("and %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX, 0, OP_AND, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2911 OP("sub %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX, 0, OP_SUB, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2912 OP("xor %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX, 0, OP_XOR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2913 OP("cmp %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX, 0, OP_CMP, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2914};
2915
2916const DISOPCODE g_aMapX86_Group2[8*6] =
2917{
2918 /* C0 */
2919 OP("rol %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_ROL, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2920 OP("ror %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_ROR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2921 OP("rcl %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_RCL, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2922 OP("rcr %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_RCR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2923 OP("shl/sal %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SHL, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2924 OP("shr %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SHR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2925 OP("shl/sal %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SHL, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2926 OP("sar %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SAR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2927
2928 /* C1 */
2929 OP("rol %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_ROL, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2930 OP("ror %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_ROR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2931 OP("rcl %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_RCL, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2932 OP("rcr %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_RCR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2933 OP("shl/sal %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SHL, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2934 OP("shr %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SHR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2935 OP("shl/sal %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SHL, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2936 OP("sar %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_SAR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2937
2938 /* D0 */
2939 OP("rol %Eb,1", IDX_ParseModRM, 0, 0, OP_ROL, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2940 OP("ror %Eb,1", IDX_ParseModRM, 0, 0, OP_ROR, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2941 OP("rcl %Eb,1", IDX_ParseModRM, 0, 0, OP_RCL, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2942 OP("rcr %Eb,1", IDX_ParseModRM, 0, 0, OP_RCR, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2943 OP("shl/sal %Eb,1", IDX_ParseModRM, 0, 0, OP_SHL, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2944 OP("shr %Eb,1", IDX_ParseModRM, 0, 0, OP_SHR, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2945 OP("shl/sal %Eb,1", IDX_ParseModRM, 0, 0, OP_SHL, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2946 OP("sar %Eb,1", IDX_ParseModRM, 0, 0, OP_SAR, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2947
2948 /* D1 */
2949 OP("rol %Ev,1", IDX_ParseModRM, 0, 0, OP_ROL, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2950 OP("ror %Ev,1", IDX_ParseModRM, 0, 0, OP_ROR, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2951 OP("rcl %Ev,1", IDX_ParseModRM, 0, 0, OP_RCL, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2952 OP("rcr %Ev,1", IDX_ParseModRM, 0, 0, OP_RCR, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2953 OP("shl/sal %Ev,1", IDX_ParseModRM, 0, 0, OP_SHL, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2954 OP("shr %Ev,1", IDX_ParseModRM, 0, 0, OP_SHR, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2955 OP("shl/sal %Ev,1", IDX_ParseModRM, 0, 0, OP_SHL, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2956 OP("sar %Ev,1", IDX_ParseModRM, 0, 0, OP_SAR, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2957
2958 /* D2 */
2959 OP("rol %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_ROL, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2960 OP("ror %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_ROR, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2961 OP("rcl %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_RCL, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2962 OP("rcr %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_RCR, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2963 OP("shl/sal %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHL, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2964 OP("shr %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHR, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2965 OP("shl/sal %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHL, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2966 OP("sar %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SAR, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2967
2968 /* D3 */
2969 OP("rol %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_ROL, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2970 OP("ror %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_ROR, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2971 OP("rcl %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_RCL, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2972 OP("rcr %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_RCR, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2973 OP("shl/sal %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHL, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2974 OP("shr %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHR, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2975 OP("shl/sal %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHL, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2976 OP("sar %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SAR, OP_PARM_Ev, OP_PARM_REG_CL ,OP_PARM_NONE, DISOPTYPE_HARMLESS),
2977
2978};
2979
2980
2981const DISOPCODE g_aMapX86_Group3[8*2] =
2982{
2983 /* F6 */
2984 OP("test %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_TEST, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2985 //AMD manual claims test??
2986 INVALID_OPCODE_MOD_RM(0xf601),
2987 OP("not %Eb", IDX_ParseModRM, 0, 0, OP_NOT, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2988 OP("neg %Eb", IDX_ParseModRM, 0, 0, OP_NEG, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2989 OP("mul %Eb", IDX_ParseModRM, 0, 0, OP_MUL, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2990 OP("imul %Eb", IDX_ParseModRM, 0, 0, OP_IMUL, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2991 OP("div %Eb", IDX_ParseModRM, 0, 0, OP_DIV, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2992 OP("idiv %Eb", IDX_ParseModRM, 0, 0, OP_IDIV, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2993
2994 /* F7 */
2995 OP("test %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_TEST, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
2996 //AMD manual claims test??
2997 INVALID_OPCODE_MOD_RM(0xf701),
2998 OP("not %Ev", IDX_ParseModRM, 0, 0, OP_NOT, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
2999 OP("neg %Ev", IDX_ParseModRM, 0, 0, OP_NEG, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3000 OP("mul %Ev", IDX_ParseModRM, 0, 0, OP_MUL, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3001 OP("imul %Ev", IDX_ParseModRM, 0, 0, OP_IMUL, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3002 OP("div %Ev", IDX_ParseModRM, 0, 0, OP_DIV, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3003 OP("idiv %Ev", IDX_ParseModRM, 0, 0, OP_IDIV, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3004};
3005
3006const DISOPCODE g_aMapX86_Group4[8] =
3007{
3008 /* FE */
3009 OP("inc %Eb", IDX_ParseModRM, 0, 0, OP_INC, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3010 OP("dec %Eb", IDX_ParseModRM, 0, 0, OP_DEC, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3011 INVALID_OPCODE_MOD_RM(0xfe02),
3012 INVALID_OPCODE_MOD_RM(0xfe03),
3013 INVALID_OPCODE_MOD_RM(0xfe04),
3014 INVALID_OPCODE_MOD_RM(0xfe05),
3015 INVALID_OPCODE_MOD_RM(0xfe06),
3016 INVALID_OPCODE_MOD_RM(0xfe07),
3017};
3018
3019const DISOPCODE g_aMapX86_Group5[8] =
3020{
3021 /* FF */
3022 OP("inc %Ev", IDX_ParseModRM, 0, 0, OP_INC, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3023 OP("dec %Ev", IDX_ParseModRM, 0, 0, OP_DEC, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3024 OP("call %Ev", IDX_ParseModRM, 0, 0, OP_CALL, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE),
3025 OP("call %Ep", IDX_ParseModRM, 0, 0, OP_CALL, OP_PARM_Ep, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW),
3026 OP("jmp %Ev", IDX_ParseModRM, 0, 0, OP_JMP, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW | DISOPTYPE_X86_FORCED_64_OP_SIZE),
3027 OP("jmp %Ep", IDX_ParseModRM, 0, 0, OP_JMP, OP_PARM_Ep, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_CONTROLFLOW | DISOPTYPE_UNCOND_CONTROLFLOW),
3028 OP("push %Ev", IDX_ParseModRM, 0, 0, OP_PUSH, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
3029 INVALID_OPCODE_MOD_RM(0xff07),
3030};
3031
3032
3033const DISOPCODE g_aMapX86_Group6[8] =
3034{
3035 /* 0F 00 */
3036 OP("sldt %Ew", IDX_ParseModRM, 0, 0, OP_SLDT, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED_NOTRAP),
3037 OP("str %Ev", IDX_ParseModRM, 0, 0, OP_STR, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED_NOTRAP),
3038 OP("lldt %Ew", IDX_ParseModRM, 0, 0, OP_LLDT, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED),
3039 OP("ltr %Ew", IDX_ParseModRM, 0, 0, OP_LTR, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED),
3040 OP("verr %Ew", IDX_ParseModRM, 0, 0, OP_VERR, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED_NOTRAP),
3041 OP("verw %Ew", IDX_ParseModRM, 0, 0, OP_VERW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED_NOTRAP),
3042 INVALID_OPCODE_MOD_RM(0x0f0006),
3043 INVALID_OPCODE_MOD_RM(0x0f0007),
3044};
3045
3046/* Note!! Group 7 is NOT using the INVALID_OPCODE_MOD_RM because of monitor and vmcall. */
3047const DISOPCODE g_aMapX86_Group7_mem[8] =
3048{
3049 /* 0F 01 */
3050 OP("sgdt %Ms", IDX_ParseModRM, 0, 0, OP_SGDT, OP_PARM_Ms, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED_NOTRAP),
3051 OP("sidt %Ms", IDX_ParseModRM, 0, 0, OP_SIDT, OP_PARM_Ms, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED_NOTRAP),
3052 OP("lgdt %Ms", IDX_ParseModRM, 0, 0, OP_LGDT, OP_PARM_Ms, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED),
3053 OP("lidt %Ms", IDX_ParseModRM, 0, 0, OP_LIDT, OP_PARM_Ms, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED),
3054 OP("smsw %Ew", IDX_ParseModRM, 0, 0, OP_SMSW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED_NOTRAP),
3055 INVALID_OPCODE,
3056 OP("lmsw %Ew", IDX_ParseModRM, 0, 0, OP_LMSW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED),
3057 OP("invlpg %Mb", IDX_ParseModRM, 0, 0, OP_INVLPG, OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_DANGEROUS | DISOPTYPE_PRIVILEGED),
3058};
3059
3060const DISOPCODE g_aMapX86_Group7_mod11_reg000[8] =
3061{
3062 OP("enclv", 0, 0, 0, OP_ENCLV, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3063 OP("vmcall", 0, 0, 0, OP_VMCALL, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3064 OP("vmlaunch", 0, 0, 0, OP_VMLAUNCH, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3065 OP("vmresume", 0, 0, 0, OP_VMRESUME, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3066 OP("vmxoff", 0, 0, 0, OP_VMXOFF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3067 INVALID_OPCODE,
3068 INVALID_OPCODE,
3069 INVALID_OPCODE,
3070};
3071
3072const DISOPCODE g_aMapX86_Group7_mod11_reg001[8] =
3073{
3074 OP("monitor %eAX,%eCX,%eDX", IDX_ParseFixedReg, IDX_ParseFixedReg, IDX_ParseFixedReg, OP_MONITOR, OP_PARM_REG_EAX, OP_PARM_REG_ECX, OP_PARM_REG_EDX, DISOPTYPE_HARMLESS ),
3075 OP("mwait %eAX,%eCX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_MWAIT, OP_PARM_REG_EAX, OP_PARM_REG_ECX, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3076 OP("clac", 0, 0, 0, OP_CLAC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3077 OP("stac", 0, 0, 0, OP_STAC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3078 INVALID_OPCODE,
3079 INVALID_OPCODE,
3080 INVALID_OPCODE,
3081 OP("encls", 0, 0, 0, OP_ENCLS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3082};
3083
3084const DISOPCODE g_aMapX86_Group7_mod11_reg010[8] =
3085{
3086 OP("xgetbv", 0, 0, 0, OP_XGETBV, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ), /* fixed ops: ECX & EDX:EAX like wrmsr we don't details these */
3087 OP("xsetbv", 0, 0, 0, OP_XSETBV, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ), /* fixed ops: ECX & EDX:EAX like wrmsr we don't details these */
3088 INVALID_OPCODE,
3089 INVALID_OPCODE,
3090 OP("vmfunc", 0, 0, 0, OP_VMFUNC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3091 OP("xend", 0, 0, 0, OP_XEND, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3092 OP("xtest", 0, 0, 0, OP_XTEST, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3093 OP("enclu", 0, 0, 0, OP_ENCLU, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3094};
3095
3096const DISOPCODE g_aMapX86_Group7_mod11_reg111[8] =
3097{
3098 OP("swapgs", 0, 0, 0, OP_SWAPGS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS ),
3099 OP("rdtscp", 0, 0, 0, OP_RDTSCP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_POTENTIALLY_DANGEROUS ),
3100 INVALID_OPCODE,
3101 INVALID_OPCODE,
3102 INVALID_OPCODE,
3103 INVALID_OPCODE,
3104 INVALID_OPCODE,
3105 INVALID_OPCODE,
3106};
3107
3108const DISOPCODE g_aMapX86_Group8[8] =
3109{
3110 /* 0F BA */
3111 INVALID_OPCODE_MOD_RM(0x),
3112 INVALID_OPCODE_MOD_RM(0x),
3113 INVALID_OPCODE_MOD_RM(0x),
3114 INVALID_OPCODE_MOD_RM(0x),
3115 OP("bt %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_BT, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
3116 OP("bts %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_BTS, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
3117 OP("btr %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_BTR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
3118 OP("btc %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_BTC, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
3119};
3120
3121/* 0F C7 mode=mem index by /reg + REX.W*8 - w/o SSE prefix */
3122const DISOPCODE g_aMapX86_Group9_mem_none[8 * 2] =
3123{
3124 /* REX.W = 0 */
3125 INVALID_OPCODE_MOD_RM(0x0),
3126 OP("cmpxchg8b %Mq", IDX_ParseModRM, 0, 0, OP_CMPXCHG8B, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3127 INVALID_OPCODE_MOD_RM(0x2),
3128 INVALID_OPCODE_MOD_RM(0x3),
3129 INVALID_OPCODE_MOD_RM(0x4),
3130 INVALID_OPCODE_MOD_RM(0x5),
3131 OP("vmptrld %Mq", IDX_ParseModRM, 0, 0, OP_VMPTRLD, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3132 OP("vmptrst %Mq", IDX_ParseModRM, 0, 0, OP_VMPTRST, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3133 /* REX.W = 1 */
3134 INVALID_OPCODE_MOD_RM(0x0),
3135 OP("cmpxchg16b %Mdq", IDX_ParseModRM, 0, 0, OP_CMPXCHG16B, OP_PARM_Mdq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3136 INVALID_OPCODE_MOD_RM(0x2),
3137 INVALID_OPCODE_MOD_RM(0x3),
3138 INVALID_OPCODE_MOD_RM(0x4),
3139 INVALID_OPCODE_MOD_RM(0x5),
3140 INVALID_OPCODE_MOD_RM(0x6),
3141 INVALID_OPCODE_MOD_RM(0x7),
3142};
3143
3144/* 0F C7 mode=mem index by /reg - w/ 0x66 SSE prefix */
3145const DISOPCODE g_aMapX86_Group9_mem_66[8] =
3146{
3147 INVALID_OPCODE_MOD_RM(0x0),
3148 INVALID_OPCODE_MOD_RM(0x1),
3149 INVALID_OPCODE_MOD_RM(0x2),
3150 INVALID_OPCODE_MOD_RM(0x3),
3151 INVALID_OPCODE_MOD_RM(0x4),
3152 INVALID_OPCODE_MOD_RM(0x5),
3153 OP("vmclear %M", IDX_ParseModRM, 0, 0, OP_VMCLEAR, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3154 INVALID_OPCODE_MOD_RM(0x7),
3155};
3156
3157/* 0F C7 mode=mem index by /reg - w/ 0xf3 SSE prefix */
3158const DISOPCODE g_aMapX86_Group9_mem_f3[8] =
3159{
3160 INVALID_OPCODE_MOD_RM(0x0),
3161 INVALID_OPCODE_MOD_RM(0x1),
3162 INVALID_OPCODE_MOD_RM(0x2),
3163 INVALID_OPCODE_MOD_RM(0x3),
3164 INVALID_OPCODE_MOD_RM(0x4),
3165 INVALID_OPCODE_MOD_RM(0x5),
3166 OP("vmxon %M", IDX_ParseModRM, 0, 0, OP_VMXON, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3167 INVALID_OPCODE_MOD_RM(0x7),
3168};
3169
3170/* 0F C7 mode=reg index by /reg - w/o SSE prefix */
3171const DISOPCODE g_aMapX86_Group9_mod11_none[8] =
3172{
3173 INVALID_OPCODE_MOD_RM(0x0),
3174 INVALID_OPCODE_MOD_RM(0x1),
3175 INVALID_OPCODE_MOD_RM(0x2),
3176 INVALID_OPCODE_MOD_RM(0x3),
3177 INVALID_OPCODE_MOD_RM(0x4),
3178 INVALID_OPCODE_MOD_RM(0x5),
3179 OP("rdrand %Ev", IDX_ParseModRM, 0, 0, OP_RDRAND, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3180 OP("rdseed %Ev", IDX_ParseModRM, 0, 0, OP_RDSEED, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3181};
3182
3183/* 0F C7 mode=reg index by /reg - w/ 0xf3 SSE prefix */
3184const DISOPCODE g_aMapX86_Group9_mod11_f3[8] =
3185{
3186 INVALID_OPCODE_MOD_RM(0x0),
3187 INVALID_OPCODE_MOD_RM(0x1),
3188 INVALID_OPCODE_MOD_RM(0x2),
3189 INVALID_OPCODE_MOD_RM(0x3),
3190 INVALID_OPCODE_MOD_RM(0x4),
3191 INVALID_OPCODE_MOD_RM(0x5),
3192 INVALID_OPCODE_MOD_RM(0x6),
3193 OP("rdpid %Ev", IDX_ParseModRM, 0, 0, OP_RDPID, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3194};
3195
3196/* 0F B9 - UD1 */
3197const DISOPCODE g_aMapX86_Group10[8] =
3198{
3199 INVALID_OPCODE_MOD_RM(0x),
3200 INVALID_OPCODE_MOD_RM(0x),
3201 INVALID_OPCODE_MOD_RM(0x),
3202 INVALID_OPCODE_MOD_RM(0x),
3203 INVALID_OPCODE_MOD_RM(0x),
3204 INVALID_OPCODE_MOD_RM(0x),
3205 INVALID_OPCODE_MOD_RM(0x),
3206 INVALID_OPCODE_MOD_RM(0x),
3207};
3208
3209
3210const DISOPCODE g_aMapX86_Group11[8*2] =
3211{
3212 /* 0F C6 */
3213 OP("mov %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, DISOPTYPE_HARMLESS),
3214 INVALID_OPCODE,
3215 INVALID_OPCODE,
3216 INVALID_OPCODE,
3217 INVALID_OPCODE,
3218 INVALID_OPCODE,
3219 INVALID_OPCODE,
3220 INVALID_OPCODE,
3221 /* 0F C7 */
3222 OP("mov %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, DISOPTYPE_HARMLESS),
3223 INVALID_OPCODE,
3224 INVALID_OPCODE,
3225 INVALID_OPCODE,
3226 INVALID_OPCODE,
3227 INVALID_OPCODE,
3228 INVALID_OPCODE,
3229 INVALID_OPCODE,
3230};
3231
3232
3233/* 0xF 0x71 */
3234const DISOPCODE g_aMapX86_Group12[8*2] =
3235{
3236 INVALID_OPCODE_MOD_RM(0x0),
3237 INVALID_OPCODE_MOD_RM(0x1),
3238 OP("psrlw %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRLW, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3239 INVALID_OPCODE_MOD_RM(0x3),
3240 OP("psraw %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRAW, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3241 INVALID_OPCODE_MOD_RM(0x5),
3242 OP("psllw %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSLLW, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3243 INVALID_OPCODE_MOD_RM(0x7),
3244
3245 /* Group 12 with prefix 0x66 */
3246 INVALID_OPCODE_MOD_RM(0x8),
3247 INVALID_OPCODE_MOD_RM(0x9),
3248 OP("psrlw %Pdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRLW, OP_PARM_Pdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3249 INVALID_OPCODE_MOD_RM(0xb),
3250 OP("psraw %Pdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRAW, OP_PARM_Pdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3251 INVALID_OPCODE_MOD_RM(0xd),
3252 OP("psllw %Pdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSLLW, OP_PARM_Pdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3253 INVALID_OPCODE_MOD_RM(0xf),
3254};
3255
3256/* vex map1 0x72 w/ prefix 0x66 (VEX.pp=1) */
3257const DISOPCODE g_aMapX86_VGroup12[8] =
3258{
3259 /* 0 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3260 INVALID_OPCODE_MOD_RM(0x0),
3261 INVALID_OPCODE_MOD_RM(0x1),
3262 OPVEX("vpsrlw %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSRLW, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3263 INVALID_OPCODE_MOD_RM(0x4),
3264 OPVEX("vpsraw %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSRAW, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3265 INVALID_OPCODE_MOD_RM(0x5),
3266 OPVEX("vpsllw %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSLLW, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3267 INVALID_OPCODE_MOD_RM(0x7),
3268 /* format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3269};
3270
3271/* 0xF 0x72 */
3272const DISOPCODE g_aMapX86_Group13[8*2] =
3273{
3274 INVALID_OPCODE_MOD_RM(0x),
3275 INVALID_OPCODE_MOD_RM(0x),
3276 OP("psrld %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRLD, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3277 INVALID_OPCODE_MOD_RM(0x),
3278 OP("psrad %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRAD, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3279 INVALID_OPCODE_MOD_RM(0x),
3280 OP("pslld %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSLLD, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3281 INVALID_OPCODE_MOD_RM(0x),
3282
3283 /* Group 13 with prefix 0x66 */
3284 INVALID_OPCODE_MOD_RM(0x),
3285 INVALID_OPCODE_MOD_RM(0x),
3286 OP("psrld %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRLD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3287 INVALID_OPCODE_MOD_RM(0x),
3288 OP("psrad %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRAD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3289 INVALID_OPCODE_MOD_RM(0x),
3290 OP("pslld %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSLLD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3291 INVALID_OPCODE_MOD_RM(0x),
3292};
3293
3294/* vex map1 0x72 w/ prefix 0x66 (VEX.pp=1) */
3295const DISOPCODE g_aMapX86_VGroup13[8] =
3296{
3297 /* 0 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3298 INVALID_OPCODE_MOD_RM(0x0),
3299 INVALID_OPCODE_MOD_RM(0x1),
3300 OPVEX("vpsrld %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSRLD, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3301 INVALID_OPCODE_MOD_RM(0x3),
3302 OPVEX("vpsrad %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSRAD, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3303 INVALID_OPCODE_MOD_RM(0x5),
3304 OPVEX("vpslld %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSLLD, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3305 INVALID_OPCODE_MOD_RM(0x7),
3306 /* format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3307};
3308
3309/* 0xF 0x73 */
3310const DISOPCODE g_aMapX86_Group14[8*2] =
3311{
3312 INVALID_OPCODE_MOD_RM(0x),
3313 INVALID_OPCODE_MOD_RM(0x),
3314 OP("psrlq %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRLQ, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3315 INVALID_OPCODE_MOD_RM(0x),
3316 INVALID_OPCODE_MOD_RM(0x),
3317 INVALID_OPCODE_MOD_RM(0x),
3318 OP("psllq %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSLLQ, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3319 INVALID_OPCODE_MOD_RM(0x),
3320
3321 /* Group 14 with prefix 0x66 */
3322 INVALID_OPCODE_MOD_RM(0x),
3323 INVALID_OPCODE_MOD_RM(0x),
3324 OP("psrlq %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRLD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3325 OP("psrldq %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSRLDQ, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3326 INVALID_OPCODE_MOD_RM(0x),
3327 INVALID_OPCODE_MOD_RM(0x),
3328 OP("psllq %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSLLD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3329 OP("pslldq %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_PSLLDQ, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3330};
3331
3332/* vex map1 0x73 w/ prefix 0x66 (VEX.pp=1) */
3333const DISOPCODE g_aMapX86_VGroup14[8] =
3334{
3335 /* 0 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3336 INVALID_OPCODE_MOD_RM(0x0),
3337 INVALID_OPCODE_MOD_RM(0x1),
3338 OPVEX("vpsrlq %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSRLQ, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3339 OPVEX("vpsrldq %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSRLDQ, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3340 INVALID_OPCODE_MOD_RM(0x4),
3341 INVALID_OPCODE_MOD_RM(0x5),
3342 OPVEX("vpsllq %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSLLQ, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3343 OPVEX("vpslldq %Hx,%Ux,%Ib", IDX_ParseVexDest, IDX_ParseModRM, IDX_ParseImmByte, 0, OP_VPSLLDQ, OP_PARM_Hx, OP_PARM_Ux, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3344 /* format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3345};
3346
3347
3348/* 0xF 0xAE in memory mode */
3349const DISOPCODE g_aMapX86_Group15_mem[8] =
3350{
3351 OP("fxsave %M", IDX_ParseModRM, 0, 0, OP_FXSAVE, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3352 OP("fxrstor %M", IDX_ParseModRM, 0, 0, OP_FXRSTOR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3353 OP("ldmxcsr %M", IDX_ParseModRM, 0, 0, OP_LDMXCSR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3354 OP("stmxcsr %M", IDX_ParseModRM, 0, 0, OP_STMXCSR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3355 OP("xsave %M", IDX_ParseModRM, 0, 0, OP_XSAVE, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3356 OP("xrstor %M", IDX_ParseModRM, 0, 0, OP_XRSTOR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3357 OP("xsaveopt %M", IDX_ParseModRM, 0, 0, OP_XSAVEOPT, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3358 OP("clflush %Mb", IDX_ParseModRM, 0, 0, OP_CLFLUSH, OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3359};
3360
3361/* 0xF 0xAE in register mode. f3 used in indexing. */
3362const DISOPCODE g_aMapX86_Group15_mod11[8*2] =
3363{
3364 /* No prefix: */
3365 INVALID_OPCODE_MOD_RM(0x0),
3366 INVALID_OPCODE_MOD_RM(0x1),
3367 INVALID_OPCODE_MOD_RM(0x2),
3368 INVALID_OPCODE_MOD_RM(0x3),
3369 INVALID_OPCODE_MOD_RM(0x4),
3370 OP("lfence", IDX_ParseModFence, 0, 0, OP_LFENCE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3371 OP("mfence", IDX_ParseModFence, 0, 0, OP_MFENCE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3372 OP("sfence", IDX_ParseModFence, 0, 0, OP_SFENCE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3373 /* 0xf3 prefix: */
3374 OP("rdfsbase %Ev", IDX_ParseModRM, 0, 0, OP_RDFSBASE, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3375 OP("rdgsbase %Ev", IDX_ParseModRM, 0, 0, OP_RDGSBASE, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3376 OP("wrfsbase %Ev", IDX_ParseModRM, 0, 0, OP_WRFSBASE, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3377 OP("wrgsbase %Ev", IDX_ParseModRM, 0, 0, OP_WRGSBASE, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3378 INVALID_OPCODE_MOD_RM(0xc),
3379 INVALID_OPCODE_MOD_RM(0xd),
3380 INVALID_OPCODE_MOD_RM(0xe),
3381 INVALID_OPCODE_MOD_RM(0xf),
3382};
3383
3384/* vex map1 0xae w/o prefix (VEX.pp=0) */
3385const DISOPCODE g_aMapX86_VGroup15[8] =
3386{
3387 /* 0 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3388 INVALID_OPCODE_MOD_RM(0x0),
3389 INVALID_OPCODE_MOD_RM(0x1),
3390 OPVEX("vldmxcsr %M", IDX_ParseModRM, 0, 0, 0, OP_VLDMXCSR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3391 OPVEX("vstmxcsr %M", IDX_ParseModRM, 0, 0, 0, OP_VSTMXCSR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3392 INVALID_OPCODE_MOD_RM(0x4),
3393 INVALID_OPCODE_MOD_RM(0x5),
3394 INVALID_OPCODE_MOD_RM(0x6),
3395 INVALID_OPCODE_MOD_RM(0x7),
3396 /* format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3397};
3398
3399
3400
3401/* 0xF 0x18 */
3402const DISOPCODE g_aMapX86_Group16[8] =
3403{
3404 OP("prefetchnta %Mb", IDX_ParseModRM, 0, 0, OP_PREFETCH,OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3405 OP("prefetcht0 %Mb", IDX_ParseModRM, 0, 0, OP_PREFETCH,OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3406 OP("prefetcht1 %Mb", IDX_ParseModRM, 0, 0, OP_PREFETCH,OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3407 OP("prefetcht2 %Mb", IDX_ParseModRM, 0, 0, OP_PREFETCH,OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3408 INVALID_OPCODE_MOD_RM(0x),
3409 INVALID_OPCODE_MOD_RM(0x),
3410 INVALID_OPCODE_MOD_RM(0x),
3411 INVALID_OPCODE_MOD_RM(0x),
3412};
3413
3414/* 0x90 or 0xF3 0x90 */
3415const DISOPCODE g_aMapX86_NopPause[2] =
3416{
3417 OP("nop", 0, 0, 0, OP_NOP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3418 OP("pause", 0, 0, 0, OP_PAUSE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3419};
3420
3421
3422
3423/* VEX Map 1 - two bytes opcodes starting with 0Fh */
3424const DISOPCODE g_aDisasVexMap1[] =
3425{
3426 /* 1 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3427 OPVEX("vmovups %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVUPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3428 OPVEX("vmovups %Wps,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVUPS, OP_PARM_Wps, OP_PARM_Vps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3429 OPVEX("&vmovlps/vmovhlps %Vq,%Hq,%Wq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMOVLPS, OP_PARM_Vq, OP_PARM_Hq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3430 OPVEX("vmovlps %Mq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVLPS, OP_PARM_Mq, OP_PARM_Vq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3431 OPVEX("vunpcklps %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VUNPCKLPS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3432 OPVEX("vunpckhps %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VUNPCKHPS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3433 OPVEX("&vmovhps/vmovlhps %Vdq,%Hq,%Wq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMOVHPS, OP_PARM_Vdq, OP_PARM_Hq, OP_PARM_Wq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3434 OPVEX("vmovhps %Mq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVHPS, OP_PARM_Mq, OP_PARM_Vq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3435 INVALID_OPCODE,
3436 INVALID_OPCODE,
3437 INVALID_OPCODE,
3438 INVALID_OPCODE,
3439 INVALID_OPCODE,
3440 INVALID_OPCODE,
3441 INVALID_OPCODE,
3442 INVALID_OPCODE,
3443
3444 /* 2 */
3445 INVALID_OPCODE,
3446 INVALID_OPCODE,
3447 INVALID_OPCODE,
3448 INVALID_OPCODE,
3449 INVALID_OPCODE,
3450 INVALID_OPCODE,
3451 INVALID_OPCODE,
3452 INVALID_OPCODE,
3453 OPVEX("vmovaps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVAPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3454 OPVEX("vmovaps %Wps,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVAPS, OP_PARM_Wps, OP_PARM_Vps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3455 INVALID_OPCODE,
3456 OPVEX("vmovntps %Mps,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVNTPS, OP_PARM_Mps, OP_PARM_Vps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3457 INVALID_OPCODE,
3458 INVALID_OPCODE,
3459 OPVEX("vucomiss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VUCOMISS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3460 OPVEX("vcomiss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCOMISS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3461
3462 /* 3 */
3463 INVALID_OPCODE_BLOCK
3464
3465 /* 4 */
3466 INVALID_OPCODE_BLOCK
3467
3468 /* 5 */
3469 OPVEX("vmovmskps %Gy,%Ups", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVMSKPS, OP_PARM_Gy, OP_PARM_Ups, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3470 OPVEX("vsqrtps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VSQRTPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3471 OPVEX("vrsqrtps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VRSQRTPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3472 OPVEX("vrcpps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VRCPPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3473 OPVEX("vandps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VANDPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3474 OPVEX("vandnps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VANDNPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3475 OPVEX("vorps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VORPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3476 OPVEX("vxorps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VXORPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3477 OPVEX("vaddps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VADDPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3478 OPVEX("vmulps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMULPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3479 OPVEX("vcvtps2pd %Vpd,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTPS2PD, OP_PARM_Vpd, OP_PARM_Wps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3480 OPVEX("vcvtdq2ps %Vps,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTDQ2PS, OP_PARM_Vps, OP_PARM_Wdq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3481 OPVEX("vsubps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VSUBPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3482 OPVEX("vminps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMINPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3483 OPVEX("vdivps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VDIVPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3484 OPVEX("vmaxps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMAXPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3485
3486 /* 6 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3487 INVALID_OPCODE_BLOCK
3488
3489 /* 7 */
3490 INVALID_OPCODE,
3491 INVALID_OPCODE,
3492 INVALID_OPCODE,
3493 INVALID_OPCODE,
3494 INVALID_OPCODE,
3495 INVALID_OPCODE,
3496 INVALID_OPCODE,
3497 /* Next instruction has the following format:
3498 * @name1/name2,
3499 * where name2 is used when VEX.L bit is set,
3500 * name1 otherwise. */
3501 OPVEX("@vzeroupper/vzeroall", 0, 0, 0, 0, OP_VZEROALL, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3502 INVALID_OPCODE,
3503 INVALID_OPCODE,
3504 INVALID_OPCODE,
3505 INVALID_OPCODE,
3506 INVALID_OPCODE,
3507 INVALID_OPCODE,
3508 INVALID_OPCODE,
3509 INVALID_OPCODE,
3510
3511 /* 8 */
3512 INVALID_OPCODE_BLOCK
3513
3514 /* 9 */
3515 INVALID_OPCODE_BLOCK
3516
3517 /* a */
3518 INVALID_OPCODE_BLOCK
3519
3520 /* b */
3521 INVALID_OPCODE_BLOCK
3522
3523 /* c */
3524 INVALID_OPCODE,
3525 INVALID_OPCODE,
3526 OPVEX("vcmpps %Vps,%Hps,%Wps,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VCMPPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_Ib, DISOPTYPE_HARMLESS),
3527 INVALID_OPCODE,
3528 INVALID_OPCODE,
3529 INVALID_OPCODE,
3530 OPVEX("vshufps %Vps,%Hps,%Wps,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VSHUFPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_Ib, DISOPTYPE_HARMLESS),
3531 /* format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3532};
3533const DISOPMAPDESC g_DisasVexMap1Range = { &g_aDisasVexMap1[0], 0x10, RT_ELEMENTS(g_aDisasVexMap1) };
3534
3535/* Vex codes for two bytes opcodes starting with 0Fh with prefix 66H*/
3536static const DISOPCODE g_aDisasVexMap1_66[] =
3537{
3538 /* 1 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3539 OPVEX("vmovupd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVUPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3540 OPVEX("vmovupd %Wpd,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVUPD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3541 OPVEX("vmovlpd %Vq,%Hq,%Mq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMOVLPD, OP_PARM_Vq, OP_PARM_Hq, OP_PARM_Mq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3542 OPVEX("vmovlpd %Mq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVLPD, OP_PARM_Mq, OP_PARM_Vq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3543 OPVEX("vunpcklpd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VUNPCKLPD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3544 OPVEX("vunpckhpd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VUNPCKHPD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3545 OPVEX("vmovhpd %Vdq,%Hq,%Mq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMOVHPD, OP_PARM_Vdq, OP_PARM_Hq, OP_PARM_Mq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3546 OPVEX("vmovhpd %Mq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVHPD, OP_PARM_Mq, OP_PARM_Vq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3547 INVALID_OPCODE,
3548 INVALID_OPCODE,
3549 INVALID_OPCODE,
3550 INVALID_OPCODE,
3551 INVALID_OPCODE,
3552 INVALID_OPCODE,
3553 INVALID_OPCODE,
3554 INVALID_OPCODE,
3555
3556 /* 2 */
3557 INVALID_OPCODE,
3558 INVALID_OPCODE,
3559 INVALID_OPCODE,
3560 INVALID_OPCODE,
3561 INVALID_OPCODE,
3562 INVALID_OPCODE,
3563 INVALID_OPCODE,
3564 INVALID_OPCODE,
3565 OPVEX("vmovapd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVAPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3566 OPVEX("vmovapd %Wpd,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVAPD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3567 INVALID_OPCODE,
3568 OPVEX("vmovntpd %Mpd,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVNTPD, OP_PARM_Mpd, OP_PARM_Vpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3569 INVALID_OPCODE,
3570 INVALID_OPCODE,
3571 OPVEX("vucomisd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VUCOMISD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3572 OPVEX("vcomisd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCOMISD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3573
3574 /* 3 */
3575 INVALID_OPCODE_BLOCK
3576
3577 /* 4 */
3578 INVALID_OPCODE_BLOCK
3579
3580 /* 5 */
3581 OPVEX("vmovmskpd %Gy,%Upd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVMSKPD, OP_PARM_Gy, OP_PARM_Upd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3582 OPVEX("vsqrtpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VSQRTPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3583 INVALID_OPCODE,
3584 INVALID_OPCODE,
3585 OPVEX("vandpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VANDPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3586 OPVEX("vandnpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VANDNPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3587 OPVEX("vorpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VORPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3588 OPVEX("vxorpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VXORPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3589 OPVEX("vaddpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VADDPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3590 OPVEX("vmulpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMULPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3591 OPVEX("vcvtpd2ps %Vps,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTPD2PS, OP_PARM_Vps, OP_PARM_Wpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3592 OPVEX("vcvtps2dq %Vdq,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTPS2DQ, OP_PARM_Vdq, OP_PARM_Wps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3593 OPVEX("vsubpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VSUBPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3594 OPVEX("vminpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMINPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3595 OPVEX("vdivpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VDIVPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3596 OPVEX("vmaxpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMAXPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3597
3598
3599 /* 6 */
3600 OPVEX("vpunpcklbw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPUNPCKLBW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3601 OPVEX("vpunpcklwd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPUNPCKLWD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3602 OPVEX("vpunpckldq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPUNPCKLDQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3603 OPVEX("vpacksswb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPACKSSWB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3604 OPVEX("vpcmpgtb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPCMPGTB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3605 OPVEX("vpcmpgtw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPCMPGTW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3606 OPVEX("vpcmpgtd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPCMPGTD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3607 OPVEX("vpackuswb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPACKUSWB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3608 OPVEX("vpunpckhbw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPUNPCKHBW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3609 OPVEX("vpunpckhwd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPUNPCKHWD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3610 OPVEX("vpunpckhdq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPUNPCKHDQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3611 OPVEX("vpackssdw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPACKSSDW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3612 OPVEX("vpunpcklqdq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPUNPCKLQDQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3613 OPVEX("vpunpckhqdq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPUNPCKHQDQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3614 OPVEX("#vmovd/vmovq %Vy,%Ey", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVD, OP_PARM_Vy, OP_PARM_Ey, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3615 OPVEX("vmovdqa %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVDQA, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3616
3617 /* 7 */
3618 OPVEX("vpshufd %Vx,%Wx,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPSHUFD, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3619 OP("vgroup12", IDX_ParseVGrp12, 0, 0, OP_GRP12, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3620 OP("vgroup13", IDX_ParseVGrp13, 0, 0, OP_GRP13, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3621 OP("vgroup14", IDX_ParseVGrp14, 0, 0, OP_GRP14, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3622 OPVEX("vpcmpeqb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPCMPEQB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3623 OPVEX("vpcmpeqw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPCMPEQW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3624 OPVEX("vpcmpeqd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPCMPEQD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3625 INVALID_OPCODE,
3626 INVALID_OPCODE,
3627 INVALID_OPCODE,
3628 INVALID_OPCODE,
3629 INVALID_OPCODE,
3630 OPVEX("vhaddpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VHADDPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3631 OPVEX("vhsubpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VHSUBPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3632 OPVEX("vmovd/vmovq %Ey,%Vy", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVD, OP_PARM_Ey, OP_PARM_Vy, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3633 OPVEX("vmovdqa %Wx,%Vx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVDQA, OP_PARM_Wx, OP_PARM_Vx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3634
3635 /* 8 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3636 INVALID_OPCODE_BLOCK
3637
3638 /* 9 */
3639 INVALID_OPCODE_BLOCK
3640
3641 /* a */
3642 INVALID_OPCODE,
3643 INVALID_OPCODE,
3644 INVALID_OPCODE,
3645 INVALID_OPCODE,
3646 INVALID_OPCODE,
3647 INVALID_OPCODE,
3648 INVALID_OPCODE,
3649 INVALID_OPCODE,
3650 INVALID_OPCODE,
3651 INVALID_OPCODE,
3652 INVALID_OPCODE,
3653 INVALID_OPCODE,
3654 INVALID_OPCODE,
3655 INVALID_OPCODE,
3656 OP("vgroup15", IDX_ParseVGrp15, 0, 0, OP_GRP15, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3657 INVALID_OPCODE,
3658
3659 /* b */
3660 INVALID_OPCODE_BLOCK
3661
3662 /* c format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3663 INVALID_OPCODE,
3664 INVALID_OPCODE,
3665 OPVEX("vcmppd %Vpd,%Hpd,%Wpd,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VCMPPS, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_Ib, DISOPTYPE_HARMLESS),
3666 INVALID_OPCODE,
3667 // vpinsrw Vdq,Hdq,Ry/Mw,Ib
3668 OPVEX("vpinsrw %Vdq,%Hdq,%Ey,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPINSRW, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Ey, OP_PARM_Ib, DISOPTYPE_HARMLESS),
3669 OPVEX("vpextrw %Gd,%Udq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPEXTRW, OP_PARM_Gd, OP_PARM_Udq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3670 OPVEX("vshufpd %Vpd,%Hpd,%Wpd,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VSHUFPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_Ib, DISOPTYPE_HARMLESS),
3671 INVALID_OPCODE,
3672 INVALID_OPCODE,
3673 INVALID_OPCODE,
3674 INVALID_OPCODE,
3675 INVALID_OPCODE,
3676 INVALID_OPCODE,
3677 INVALID_OPCODE,
3678 INVALID_OPCODE,
3679 INVALID_OPCODE,
3680
3681 /* d */
3682 OPVEX("vaddsubpd %Vpd,%Hpd,%Wpd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VADDSUBPD, OP_PARM_Vpd, OP_PARM_Hpd, OP_PARM_Wpd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3683 OPVEX("vpsrlw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSRLW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3684 OPVEX("vpsrld %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSRLD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3685 OPVEX("vpsrlq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSRLQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3686 OPVEX("vpaddq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPADDQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3687 OPVEX("vpmullw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMULLW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3688 OPVEX("vmovq %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVQ, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3689 OPVEX("vpmovmskb %Gd,%Ux", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVMSKB, OP_PARM_Gd, OP_PARM_Ux, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS | DISOPTYPE_X86_DEFAULT_64_OP_SIZE),
3690 OPVEX("vpsubusb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSUBUSB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3691 OPVEX("vpsubusw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSUBUSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3692 OPVEX("vpminub %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMINUB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3693 OPVEX("vpand %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPAND, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3694 OPVEX("vpaddusb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPADDUSB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3695 OPVEX("vpaddusw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPADDUSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3696 OPVEX("vpmaxub %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMAXUB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3697 OPVEX("vpandn %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPANDN, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3698
3699 /* e */
3700 OPVEX("vpavgb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPAVGB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3701 OPVEX("vpsraw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSRAW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3702 OPVEX("vpsrad %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSRAD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3703 OPVEX("vpavgw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPAVGW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3704 OPVEX("vpmulhuw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMULHUW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3705 OPVEX("vpmulhw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMULHW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3706 OPVEX("vcvttpd2dq %Vx,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTTPD2DQ, OP_PARM_Vx, OP_PARM_Wpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3707 OPVEX("vmovntdq %Mx,%Vx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVNTDQ, OP_PARM_Mx, OP_PARM_Vx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3708 OPVEX("vpsubsb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSUBSB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3709 OPVEX("vpsubsw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSUBSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3710 OPVEX("vpminsw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMINSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3711 OPVEX("vpor %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPOR, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3712 OPVEX("vpaddsb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPADDSB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3713 OPVEX("vpaddsw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPADDSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3714 OPVEX("vpmaxsw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMAXSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3715 OPVEX("vpxor %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPXOR, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3716
3717 /* f */
3718 INVALID_OPCODE,
3719 OPVEX("vpsllw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSLLW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3720 OPVEX("vpslld %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSLLD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3721 OPVEX("vpsllq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSLLQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3722 OPVEX("vpmuludq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMULUDQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3723 OPVEX("vpmaddwd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMADDWD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3724 OPVEX("vpsadbw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSADBW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3725 OPVEX("vmaskmovdqu %Vdq,%Udq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMASKMOVDQU, OP_PARM_Vdq, OP_PARM_Udq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3726 OPVEX("vpsubb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSUBB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3727 OPVEX("vpsubw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSUBW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3728 OPVEX("vpsubd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSUBD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3729 OPVEX("vpsubq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSUBQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3730 OPVEX("vpaddb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPADDB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3731 OPVEX("vpaddw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPADDW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3732 OPVEX("vpaddd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPADDD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3733 /*INVALID_OPCODE,*/
3734 /* format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3735};
3736AssertCompile(RT_ELEMENTS(g_aDisasVexMap1_66) == 256-16-1);
3737const DISOPMAPDESC g_DisasVexMap1_66Range = { &g_aDisasVexMap1_66[0], 0x10, RT_ELEMENTS(g_aDisasVexMap1_66) };
3738
3739static const DISOPCODE g_aDisasVexMap1F2[] =
3740{
3741 /* 1 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3742 OPVEX("vmovsd %Vx,%Hx,%Wsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMOVSD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3743 OPVEX("vmovsd %Wsd,%Hx,%Vsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMOVSD, OP_PARM_Wsd, OP_PARM_Hx, OP_PARM_Vsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3744 OPVEX("vmovddup %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVDDUP, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3745 INVALID_OPCODE,
3746 INVALID_OPCODE,
3747 INVALID_OPCODE,
3748 INVALID_OPCODE,
3749 INVALID_OPCODE,
3750 INVALID_OPCODE,
3751 INVALID_OPCODE,
3752 INVALID_OPCODE,
3753 INVALID_OPCODE,
3754 INVALID_OPCODE,
3755 INVALID_OPCODE,
3756 INVALID_OPCODE,
3757 INVALID_OPCODE,
3758
3759 /* 2 */
3760 INVALID_OPCODE,
3761 INVALID_OPCODE,
3762 INVALID_OPCODE,
3763 INVALID_OPCODE,
3764 INVALID_OPCODE,
3765 INVALID_OPCODE,
3766 INVALID_OPCODE,
3767 INVALID_OPCODE,
3768 INVALID_OPCODE,
3769 INVALID_OPCODE,
3770 OPVEX("vcvtsi2sd %Vpd,%Hpd,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VCVTSI2SD, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3771 INVALID_OPCODE,
3772 OPVEX("vcvttsd2si %Gy,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTTSD2SI, OP_PARM_Gy, OP_PARM_Wss, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3773 OPVEX("vcvtsd2si %Gy,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTSD2SI, OP_PARM_Gy, OP_PARM_Wss, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3774 INVALID_OPCODE,
3775 INVALID_OPCODE,
3776
3777 /* 3 */
3778 INVALID_OPCODE_BLOCK
3779
3780 /* 4 */
3781 INVALID_OPCODE_BLOCK
3782
3783 /* 5 */
3784 INVALID_OPCODE,
3785 OPVEX("vsqrtsd %Vsd,%Hsd,%Wsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VSQRTSD, OP_PARM_Vsd, OP_PARM_Hsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3786 INVALID_OPCODE,
3787 INVALID_OPCODE,
3788 INVALID_OPCODE,
3789 INVALID_OPCODE,
3790 INVALID_OPCODE,
3791 INVALID_OPCODE,
3792 OPVEX("vaddsd %Vsd,%Hsd,%Wsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VADDSD, OP_PARM_Vsd, OP_PARM_Hsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3793 OPVEX("vmulsd %Vsd,%Hsd,%Wsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMULSD, OP_PARM_Vsd, OP_PARM_Hsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3794 OPVEX("vcvtsd2ss %Vss,%Hx,%Wsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VCVTSD2SS, OP_PARM_Vss, OP_PARM_Hx, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3795 INVALID_OPCODE,
3796 OPVEX("vsubsd %Vsd,%Hsd,%Wsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VSUBSD, OP_PARM_Vsd, OP_PARM_Hsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3797 OPVEX("vminsd %Vsd,%Hsd,%Wsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMINSD, OP_PARM_Vsd, OP_PARM_Hsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3798 OPVEX("vdivsd %Vsd,%Hsd,%Wsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VDIVSD, OP_PARM_Vsd, OP_PARM_Hsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3799 OPVEX("vmaxsd %Vsd,%Hsd,%Wsd", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMAXSD, OP_PARM_Vsd, OP_PARM_Hsd, OP_PARM_Wsd, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3800
3801 /* 6 */
3802 INVALID_OPCODE_BLOCK
3803
3804 /* 7 */
3805 OPVEX("vpshuflw %Vx,%Wx,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPSHUFLW, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3806 INVALID_OPCODE,
3807 INVALID_OPCODE,
3808 INVALID_OPCODE,
3809 INVALID_OPCODE,
3810 INVALID_OPCODE,
3811 INVALID_OPCODE,
3812 INVALID_OPCODE,
3813 INVALID_OPCODE,
3814 INVALID_OPCODE,
3815 INVALID_OPCODE,
3816 INVALID_OPCODE,
3817 OPVEX("vhaddps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VHADDPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3818 OPVEX("vhsubps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VHSUBPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3819 INVALID_OPCODE,
3820 INVALID_OPCODE,
3821
3822 /* 8 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3823 INVALID_OPCODE_BLOCK
3824
3825 /* 9 */
3826 INVALID_OPCODE_BLOCK
3827
3828 /* a */
3829 INVALID_OPCODE_BLOCK
3830
3831 /* b */
3832 INVALID_OPCODE_BLOCK
3833
3834 /* c */
3835 INVALID_OPCODE,
3836 INVALID_OPCODE,
3837 OPVEX("vcmpsd %Vsd,%Hsd,%Wsd,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VCMPSD, OP_PARM_Vsd, OP_PARM_Hsd, OP_PARM_Wsd, OP_PARM_Ib, DISOPTYPE_HARMLESS),
3838 INVALID_OPCODE,
3839 INVALID_OPCODE,
3840 INVALID_OPCODE,
3841 INVALID_OPCODE,
3842 INVALID_OPCODE,
3843 INVALID_OPCODE,
3844 INVALID_OPCODE,
3845 INVALID_OPCODE,
3846 INVALID_OPCODE,
3847 INVALID_OPCODE,
3848 INVALID_OPCODE,
3849 INVALID_OPCODE,
3850 INVALID_OPCODE,
3851
3852 /* d */
3853 OPVEX("vaddsubps %Vps,%Hps,%Wps", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VADDSUBPS, OP_PARM_Vps, OP_PARM_Hps, OP_PARM_Wps, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3854 INVALID_OPCODE,
3855 INVALID_OPCODE,
3856 INVALID_OPCODE,
3857 INVALID_OPCODE,
3858 INVALID_OPCODE,
3859 INVALID_OPCODE,
3860 INVALID_OPCODE,
3861 INVALID_OPCODE,
3862 INVALID_OPCODE,
3863 INVALID_OPCODE,
3864 INVALID_OPCODE,
3865 INVALID_OPCODE,
3866 INVALID_OPCODE,
3867 INVALID_OPCODE,
3868 INVALID_OPCODE,
3869
3870 /* e */
3871 INVALID_OPCODE,
3872 INVALID_OPCODE,
3873 INVALID_OPCODE,
3874 INVALID_OPCODE,
3875 INVALID_OPCODE,
3876 INVALID_OPCODE,
3877 OPVEX("vcvtpd2dq %Vx,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTPD2DQ, OP_PARM_Vx, OP_PARM_Wpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3878 INVALID_OPCODE,
3879 INVALID_OPCODE,
3880 INVALID_OPCODE,
3881 INVALID_OPCODE,
3882 INVALID_OPCODE,
3883 INVALID_OPCODE,
3884 INVALID_OPCODE,
3885 INVALID_OPCODE,
3886 INVALID_OPCODE,
3887
3888 /* f */
3889 OPVEX("vlddqu %Vx,%Mx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VLDDQU, OP_PARM_Vx, OP_PARM_Mx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3890 /* format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3891};
3892const DISOPMAPDESC g_DisasVexMap1F2Range = { &g_aDisasVexMap1F2[0], 0x10, RT_ELEMENTS(g_aDisasVexMap1F2) };
3893
3894/* Vex codes for two bytes opcodes starting with 0Fh with prefix F3H*/
3895static const DISOPCODE g_aDisasVexMap1F3[] =
3896{
3897 /* 1 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3898 OPVEX("vmovss %Vx,%Hx,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMOVSS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3899 OPVEX("vmovss %Wss,%Hx,%Vss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMOVSS, OP_PARM_Wss, OP_PARM_Hx, OP_PARM_Vss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3900 OPVEX("vmovsldup %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVSLDUP, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3901 INVALID_OPCODE,
3902 INVALID_OPCODE,
3903 INVALID_OPCODE,
3904 OPVEX("vmovshdup %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVSHDUP, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3905 INVALID_OPCODE,
3906 INVALID_OPCODE,
3907 INVALID_OPCODE,
3908 INVALID_OPCODE,
3909 INVALID_OPCODE,
3910 INVALID_OPCODE,
3911 INVALID_OPCODE,
3912 INVALID_OPCODE,
3913 INVALID_OPCODE,
3914
3915 /* 2 */
3916 INVALID_OPCODE,
3917 INVALID_OPCODE,
3918 INVALID_OPCODE,
3919 INVALID_OPCODE,
3920 INVALID_OPCODE,
3921 INVALID_OPCODE,
3922 INVALID_OPCODE,
3923 INVALID_OPCODE,
3924 INVALID_OPCODE,
3925 INVALID_OPCODE,
3926 OPVEX("vcvtsi2ss %Vss,%Hss,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VCVTSI2SS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3927 INVALID_OPCODE,
3928 OPVEX("vcvttss2si %Gy,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTTSS2SI, OP_PARM_Gy, OP_PARM_Wss, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3929 OPVEX("vcvtss2si %Gy,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTSS2SI, OP_PARM_Gy, OP_PARM_Wss, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3930 INVALID_OPCODE,
3931 INVALID_OPCODE,
3932
3933 /* 3 */
3934 INVALID_OPCODE_BLOCK
3935
3936 /* 4 */
3937 INVALID_OPCODE_BLOCK
3938
3939 /* 5 */
3940 INVALID_OPCODE,
3941 OPVEX("vsqrtss %Vss,%Hss,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VSQRTSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3942 OPVEX("vrsqrtss %Vss,%Hss,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VRSQRTSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3943 OPVEX("vrcpss %Vss,%Hss,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VRCPSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3944 INVALID_OPCODE,
3945 INVALID_OPCODE,
3946 INVALID_OPCODE,
3947 INVALID_OPCODE,
3948 OPVEX("vaddss %Vss,%Hss,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VADDSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3949 OPVEX("vmulss %Vss,%Hss,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMULSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3950 OPVEX("vcvtss2sd %Vsd,%Hx,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VCVTSS2SD, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3951 OPVEX("vcvttps2dq %Vdq,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTTPS2DQ, OP_PARM_Vdq, OP_PARM_Wps, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3952 OPVEX("vsubss %Vss,%Hss,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VSUBSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3953 OPVEX("vminss %Vss,%Hss,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMINSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3954 OPVEX("vdivss %Vss,%Hss,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VDIVSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3955 OPVEX("vmaxss %Vss,%Hss,%Wss", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMAXSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3956
3957 /* 6 */
3958 INVALID_OPCODE,
3959 INVALID_OPCODE,
3960 INVALID_OPCODE,
3961 INVALID_OPCODE,
3962 INVALID_OPCODE,
3963 INVALID_OPCODE,
3964 INVALID_OPCODE,
3965 INVALID_OPCODE,
3966 INVALID_OPCODE,
3967 INVALID_OPCODE,
3968 INVALID_OPCODE,
3969 INVALID_OPCODE,
3970 INVALID_OPCODE,
3971 INVALID_OPCODE,
3972 INVALID_OPCODE,
3973 OPVEX("vmovdqu %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVDQU, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3974
3975 /* 7 */
3976 OPVEX("vpshufhw %Vx,%Wx,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPSHUFHW, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3977 INVALID_OPCODE,
3978 INVALID_OPCODE,
3979 INVALID_OPCODE,
3980 INVALID_OPCODE,
3981 INVALID_OPCODE,
3982 INVALID_OPCODE,
3983 INVALID_OPCODE,
3984 INVALID_OPCODE,
3985 INVALID_OPCODE,
3986 INVALID_OPCODE,
3987 INVALID_OPCODE,
3988 INVALID_OPCODE,
3989 INVALID_OPCODE,
3990 OPVEX("vmovq %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVQ, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3991 OPVEX("vmovdqu %Wx,%Vx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVDQU, OP_PARM_Wx, OP_PARM_Vx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
3992
3993 /* 8 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
3994 INVALID_OPCODE_BLOCK
3995
3996 /* 9 */
3997 INVALID_OPCODE_BLOCK
3998
3999 /* a */
4000 INVALID_OPCODE_BLOCK
4001
4002 /* b */
4003 INVALID_OPCODE_BLOCK
4004
4005 /* c */
4006 INVALID_OPCODE,
4007 INVALID_OPCODE,
4008 OPVEX("vcmpss %Vss,%Hss,%Wss,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VCMPSS, OP_PARM_Vss, OP_PARM_Hss, OP_PARM_Wss, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4009 INVALID_OPCODE,
4010 INVALID_OPCODE,
4011 INVALID_OPCODE,
4012 INVALID_OPCODE,
4013 INVALID_OPCODE,
4014 INVALID_OPCODE,
4015 INVALID_OPCODE,
4016 INVALID_OPCODE,
4017 INVALID_OPCODE,
4018 INVALID_OPCODE,
4019 INVALID_OPCODE,
4020 INVALID_OPCODE,
4021 INVALID_OPCODE,
4022
4023 /* d */
4024 INVALID_OPCODE_BLOCK
4025
4026 /* e */
4027 INVALID_OPCODE,
4028 INVALID_OPCODE,
4029 INVALID_OPCODE,
4030 INVALID_OPCODE,
4031 INVALID_OPCODE,
4032 INVALID_OPCODE,
4033 OPVEX("vcvtdq2pd %Vx,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VCVTDQ2PD, OP_PARM_Vx, OP_PARM_Wpd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4034 /* format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
4035};
4036const DISOPMAPDESC g_DisasVexMap1F3Range = { &g_aDisasVexMap1F3[0], 0x10, RT_ELEMENTS(g_aDisasVexMap1F3) };
4037
4038/** Indexed by: (/r << 1) | VEX.L */
4039const DISOPCODE g_aMapX86_VGroup17[8*2] =
4040{
4041 /* 0 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
4042 INVALID_OPCODE_MOD_RM(0x00),
4043 INVALID_OPCODE_MOD_RM(0x01),
4044 OPVEX("blsr %By,%Ey", IDX_ParseVexDest, IDX_ParseModRM, 0, 0, OP_BLSR, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4045 INVALID_OPCODE_MOD_RM(0x03),
4046 OPVEX("blsmsk %By,%Ey", IDX_ParseVexDest, IDX_ParseModRM, 0, 0, OP_BLSMSK, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4047 INVALID_OPCODE_MOD_RM(0x05),
4048 OPVEX("blsi %By,%Ey", IDX_ParseVexDest, IDX_ParseModRM, 0, 0, OP_BLSI, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4049 INVALID_OPCODE_MOD_RM(0x07),
4050 INVALID_OPCODE_MOD_RM(0x08),
4051 INVALID_OPCODE_MOD_RM(0x09),
4052 INVALID_OPCODE_MOD_RM(0x0a),
4053 INVALID_OPCODE_MOD_RM(0x0b),
4054 INVALID_OPCODE_MOD_RM(0x0c),
4055 INVALID_OPCODE_MOD_RM(0x0d),
4056 INVALID_OPCODE_MOD_RM(0x0e),
4057 INVALID_OPCODE_MOD_RM(0x0f),
4058};
4059
4060static const DISOPCODE g_aDisasVexMap2[] =
4061{
4062 /** @todo vsha1nexte at 0xc8 + ? */
4063 /* 0xf2 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
4064 OPVEX("andn %Gy,%By,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_ANDN, OP_PARM_Gy, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4065 OPVEX("vgroup17", IDX_ParseVGrp17, 0, 0, 0, OP_GRP17, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4066 INVALID_OPCODE,
4067 OPVEX("bzhi %Gy,%By,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_BZHI, OP_PARM_Gy, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4068 INVALID_OPCODE,
4069 OPVEX("bextr %Gy,%By,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_BEXTR, OP_PARM_Gy, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4070};
4071const DISOPMAPDESC g_DisasVexMap2Range = { &g_aDisasVexMap2[0], 0xf2, RT_ELEMENTS(g_aDisasVexMap2) };
4072
4073static const DISOPCODE g_aDisasVexMap2F3[] =
4074{
4075 /* 0xf5 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
4076 OPVEX("pext %Gy,%By,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_PEXT, OP_PARM_Gy, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4077 INVALID_OPCODE,
4078 OPVEX("sarx %Gy,%By,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_SARX, OP_PARM_Gy, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4079};
4080const DISOPMAPDESC g_DisasVexMap2F3Range = { &g_aDisasVexMap2F3[0], 0xf5, RT_ELEMENTS(g_aDisasVexMap2F3) };
4081
4082static const DISOPCODE g_aDisasVexMap2F2[] =
4083{
4084 /* 0xf5 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
4085 OPVEX("pdep %Gy,%By,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_PDEP, OP_PARM_Gy, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4086 OPVEX("mulx %By,%Gy,%Ey", IDX_ParseVexDest, IDX_ParseModRM, IDX_UseModRM, 0, OP_MULX, OP_PARM_By, OP_PARM_Gy, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4087 OPVEX("shrx %Gy,%By,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_SHRX, OP_PARM_Gy, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4088};
4089const DISOPMAPDESC g_DisasVexMap2F2Range = { &g_aDisasVexMap2F2[0], 0xf5, RT_ELEMENTS(g_aDisasVexMap2F2) };
4090
4091static const DISOPCODE g_aDisasVexMap2_66[] =
4092{
4093 /* 0 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
4094 OPVEX("vpshufb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSHUFB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4095 OPVEX("vphaddw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPHADDW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4096 OPVEX("vphaddd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPHADDD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4097 OPVEX("vphaddsw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPHADDSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4098 OPVEX("vpmaddubsw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMADDUBSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4099 OPVEX("vphsubw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPHSUBW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4100 OPVEX("vphsubd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPHSUBD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4101 OPVEX("vphsubsw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPHSUBSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4102 OPVEX("vpsignb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSIGNB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4103 OPVEX("vpsignw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSIGNW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4104 OPVEX("vpsignd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSIGND, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4105 OPVEX("vpmulhrsw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMULHRSW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4106 OPVEX("vpermilps %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPERMILPS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4107 OPVEX("vpermilpd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPERMILPD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4108 OPVEX("vtestps %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VTESTPS, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4109 OPVEX("vtestpd %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VTESTPD, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4110
4111 /* 1 */
4112 INVALID_OPCODE,
4113 INVALID_OPCODE,
4114 INVALID_OPCODE,
4115 OPVEX("vcvtph2ps %Vx,%Wx,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VCVTPH2PS, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4116 INVALID_OPCODE,
4117 INVALID_OPCODE,
4118 OPVEX("vpermps %Vqq,%Hqq,%Wqq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPERMPS, OP_PARM_Vqq, OP_PARM_Hqq, OP_PARM_Wqq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4119 OPVEX("vptest %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPTEST, OP_PARM_Vx, OP_PARM_Wd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4120 OPVEX("vbroadcastss %Vx,%Wd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VBROADCASTSS, OP_PARM_Vx, OP_PARM_Wd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4121 OPVEX("vbroadcastsd %Vqq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VBROADCASTSD, OP_PARM_Vqq, OP_PARM_Wq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4122 OPVEX("vbroadcastf128 %Vqq,%Mdq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VBROADCASTF128, OP_PARM_Vqq, OP_PARM_Wdq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4123 INVALID_OPCODE,
4124 OPVEX("vpabsb %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPABSB, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4125 OPVEX("vpabsw %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPABSW, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4126 OPVEX("vpabsd %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPABSD, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4127 INVALID_OPCODE,
4128
4129 /* 2 */
4130 OPVEX("vpmovsxbw %Vx,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVSXBW, OP_PARM_Vx, OP_PARM_Wq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4131 OPVEX("vpmovsxbd %Vx,%Wd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVSXBD, OP_PARM_Vx, OP_PARM_Wd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4132 OPVEX("vpmovsxbq %Vx,%Ww", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVSXBQ, OP_PARM_Vx, OP_PARM_Ww, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4133 OPVEX("vpmovsxwd %Vx,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVSXWD, OP_PARM_Vx, OP_PARM_Wq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4134 OPVEX("vpmovsxwq %Vx,%Wd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVSXWQ, OP_PARM_Vx, OP_PARM_Wd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4135 OPVEX("vpmovsxdq %Vx,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVSXDQ, OP_PARM_Vx, OP_PARM_Wq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4136 INVALID_OPCODE,
4137 INVALID_OPCODE,
4138 OPVEX("vpmuldq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMULDQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4139 OPVEX("vpcmpeqq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPCMPEQQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4140 OPVEX("vmovntdqa %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VMOVNTDQA, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4141 OPVEX("vpackusdw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VVPACKUSDW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4142 OPVEX("vmaskmovps %Vx,%Hx,%Mx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMASKMOVPS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Mx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4143 OPVEX("vmaskmovpd %Vx,%Hx,%Mx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMASKMOVPD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Mx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4144 OPVEX("vmaskmovps %Mx,%Hx,%Vx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMASKMOVPS, OP_PARM_Mx, OP_PARM_Hx, OP_PARM_Vx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4145 OPVEX("vmaskmovpd %Mx,%Hx,%Vx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VMASKMOVPD, OP_PARM_Mx, OP_PARM_Hx, OP_PARM_Vx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4146
4147 /* 3 */
4148 OPVEX("vpmovzxbw %Vx,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVZXBW, OP_PARM_Vx, OP_PARM_Wq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4149 OPVEX("vpmovzxbd %Vx,%Wd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVZXBD, OP_PARM_Vx, OP_PARM_Wd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4150 OPVEX("vpmovzxbq %Vx,%Ww", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVZXBQ, OP_PARM_Vx, OP_PARM_Ww, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4151 OPVEX("vpmovzxwd %Vx,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVZXWD, OP_PARM_Vx, OP_PARM_Wq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4152 OPVEX("vpmovzxwq %Vx,%Wd", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVZXWQ, OP_PARM_Vx, OP_PARM_Wd, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4153 OPVEX("vpmovzxdq %Vx,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPMOVZXDQ, OP_PARM_Vx, OP_PARM_Wq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4154 OPVEX("vpermd %Vqq,%Hqq,%Wqq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPERMD, OP_PARM_Vqq, OP_PARM_Hqq, OP_PARM_Wqq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4155 OPVEX("vpcmpgtq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPCMPGTQ, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4156 OPVEX("vpminsb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMINSB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4157 OPVEX("vpminsd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMINSD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4158 OPVEX("vpminuw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMINUW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4159 OPVEX("vpminud %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMINUD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4160 OPVEX("vpmaxsb %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMAXSB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4161 OPVEX("vpmaxsd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMAXSD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4162 OPVEX("vpmaxuw %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMAXUW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4163 OPVEX("vpmaxud %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMAXUD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4164
4165 /* 4 */
4166 OPVEX("vpmulld %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMULLD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4167 OPVEX("vphminposuw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPHMINPOSUW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4168 INVALID_OPCODE,
4169 INVALID_OPCODE,
4170 INVALID_OPCODE,
4171 OPVEX("#vpsrlvd/vpsrlvq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSRLVD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4172 OPVEX("vpsravd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSRAVD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4173 OPVEX("#vpsllvd/vpsllvq %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPSLLVD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4174 INVALID_OPCODE,
4175 INVALID_OPCODE,
4176 INVALID_OPCODE,
4177 INVALID_OPCODE,
4178 INVALID_OPCODE,
4179 INVALID_OPCODE,
4180 INVALID_OPCODE,
4181 INVALID_OPCODE,
4182
4183 /* 5 */
4184 INVALID_OPCODE,
4185 INVALID_OPCODE,
4186 INVALID_OPCODE,
4187 INVALID_OPCODE,
4188 INVALID_OPCODE,
4189 INVALID_OPCODE,
4190 INVALID_OPCODE,
4191 INVALID_OPCODE,
4192 OPVEX("vpbroadcastd %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPBROADCASTD, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4193 OPVEX("vpbroadcastq %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPBROADCASTQ, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4194 OPVEX("vbroadcasti128 %Vqq,%Mdq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VBROADCASTI128, OP_PARM_Vqq, OP_PARM_Mdq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4195 INVALID_OPCODE,
4196 INVALID_OPCODE,
4197 INVALID_OPCODE,
4198 INVALID_OPCODE,
4199 INVALID_OPCODE,
4200
4201 /* 6 */
4202 INVALID_OPCODE_BLOCK
4203
4204 /* 7 */
4205 INVALID_OPCODE,
4206 INVALID_OPCODE,
4207 INVALID_OPCODE,
4208 INVALID_OPCODE,
4209 INVALID_OPCODE,
4210 INVALID_OPCODE,
4211 INVALID_OPCODE,
4212 INVALID_OPCODE,
4213 OPVEX("vpbroadcastb %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPBROADCASTB, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4214 OPVEX("vpbroadcastw %Vx,%Wx", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VPBROADCASTW, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4215 INVALID_OPCODE,
4216 INVALID_OPCODE,
4217 INVALID_OPCODE,
4218 INVALID_OPCODE,
4219 INVALID_OPCODE,
4220 INVALID_OPCODE,
4221
4222 /* 8 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
4223 INVALID_OPCODE,
4224 INVALID_OPCODE,
4225 INVALID_OPCODE,
4226 INVALID_OPCODE,
4227 INVALID_OPCODE,
4228 INVALID_OPCODE,
4229 INVALID_OPCODE,
4230 INVALID_OPCODE,
4231 INVALID_OPCODE,
4232 INVALID_OPCODE,
4233 INVALID_OPCODE,
4234 INVALID_OPCODE,
4235 OPVEX("#vpmaskmovd/vpmaskmovq %Vx,%Hx,%Mx",IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VPMASKMOVD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Mx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4236 INVALID_OPCODE,
4237 OPVEX("#vpmaskmovd/vpmaskmovq %Mx,%Vx,%Hx",IDX_ParseModRM, IDX_UseModRM, IDX_ParseVexDest, 0, OP_VPMASKMOVD, OP_PARM_Mx, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4238 INVALID_OPCODE,
4239
4240 /* 9 */
4241 /* Seems incorrect format is used in the Intel opcode tables.
4242 * Correct form according to Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B & 2C): Instruction Set Reference, A-Z
4243 * is the following:
4244 * v?gather?d/q %Vx, %Md/q, %Hx ,
4245 * where d/q is defined by VEX.W bit.
4246 *
4247 * The instruction are in the following format:
4248 * #name1/name2 format
4249 * if REX.W is set name2 is used,
4250 * otherwise name1.
4251 */
4252 OPVEX("#vpgatherdd/vpgatherdq %Vx,%My,%Hx", IDX_ParseModRM, IDX_UseModRM, IDX_ParseVexDest, 0, OP_VGATHER, OP_PARM_Vx, OP_PARM_My, OP_PARM_Hx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4253 OPVEX("#vpgatherqd/vpgatherqq %Vx,%My,%Hx", IDX_ParseModRM, IDX_UseModRM, IDX_ParseVexDest, 0, OP_VGATHER, OP_PARM_Vx, OP_PARM_My, OP_PARM_Hx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4254 OPVEX("#vgatherdps/vgatherdpd %Vx,%My,%Hx", IDX_ParseModRM, IDX_UseModRM, IDX_ParseVexDest, 0, OP_VGATHER, OP_PARM_Vx, OP_PARM_My, OP_PARM_Hx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4255 OPVEX("#vgatherqps/vgatherqpd %Vx,%My,%Hx", IDX_ParseModRM, IDX_UseModRM, IDX_ParseVexDest, 0, OP_VGATHER, OP_PARM_Vx, OP_PARM_My, OP_PARM_Hx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4256 INVALID_OPCODE,
4257 INVALID_OPCODE,
4258 OPVEX("#vfmaddsub132ps/vfmaddsub132pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMADDSUB132PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4259 OPVEX("#vfmsubadd132ps/vfmsubadd132pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMSUBADD132PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4260 OPVEX("#vfmadd132ps/vfmadd132pd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMADD132PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4261 OPVEX("#vfmadd132ss/vfmadd132sd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMADD132SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4262 OPVEX("#vfmsub132ps/vfmsub132pd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMSUB132PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4263 OPVEX("#vfmsub132ss/vfmsub132sd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMSUB132SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4264 OPVEX("#vfnmadd132ps/vfnmadd132pd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMADD132PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4265 OPVEX("#vfnmadd132ss/vfnmadd132sd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMADD132SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4266 OPVEX("#vfnmsub132ps/vfnmsub132pd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMSUB132PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4267 OPVEX("#vfnmsub132ss/vfnmsub132sd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMSUB132SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4268
4269 /* a */
4270 INVALID_OPCODE,
4271 INVALID_OPCODE,
4272 INVALID_OPCODE,
4273 INVALID_OPCODE,
4274 INVALID_OPCODE,
4275 INVALID_OPCODE,
4276 OPVEX("#vfmaddsub213ps/vfmaddsub213pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMADDSUB213PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4277 OPVEX("#vfmsubadd213ps/vfmsubadd213pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMSUBADD213PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4278 OPVEX("#vfmadd213ps/vfmadd213pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMADD213PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4279 OPVEX("#vfmadd213ss/vfmadd213sd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMADD213SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4280 OPVEX("#vfmsub213ps/vfmsub213pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMSUB213PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4281 OPVEX("#vfmsub213ss/vfmsub213sd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMSUB213SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4282 OPVEX("#vfnmadd213ps/vfnmadd213pd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMADD213PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4283 OPVEX("#vfnmadd213ss/vfnmadd213sd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMADD213SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4284 OPVEX("#vfnmsub213ps/vfnmsub213pd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMSUB213PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4285 OPVEX("#vfnmsub213ss/vfnmsub213sd %Vx,%Hx,%Wx",IDX_ParseModRM,IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMSUB213SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4286
4287 /* b */
4288 INVALID_OPCODE,
4289 INVALID_OPCODE,
4290 INVALID_OPCODE,
4291 INVALID_OPCODE,
4292 INVALID_OPCODE,
4293 INVALID_OPCODE,
4294 OPVEX("#vfmaddsub231ps/vfmaddsub231pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMADDSUB231PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4295 OPVEX("#vfmsubadd231ps/vfmsubadd231pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMSUBADD231PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4296 OPVEX("#vfmadd231ps/vfmadd231pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMADD231PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4297 OPVEX("#vfmadd231ss/vfmadd231sd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMADD231SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4298 OPVEX("#vfmsub231ps/vfmsub231pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMSUB231PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4299 OPVEX("#vfmsub231ss/vfmsub231sd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFMSUB231SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4300 OPVEX("#vfnmadd231ps/vfnmadd231pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMADD231PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4301 OPVEX("#vfnmadd231ss/vfnmadd231sd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMADD231SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4302 OPVEX("#vfnmsub231ps/vfnmsub231pd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMSUB231PS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4303 OPVEX("#vfnmsub231ss/vfnmsub231sd %Vx,%Hx,%Wx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VFNMSUB231SS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4304
4305 /* c */
4306 INVALID_OPCODE_BLOCK
4307
4308 /* d */
4309 INVALID_OPCODE,
4310 INVALID_OPCODE,
4311 INVALID_OPCODE,
4312 INVALID_OPCODE,
4313 INVALID_OPCODE,
4314 INVALID_OPCODE,
4315 INVALID_OPCODE,
4316 INVALID_OPCODE,
4317 INVALID_OPCODE,
4318 INVALID_OPCODE,
4319 INVALID_OPCODE,
4320 OPVEX("vaesimc %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, 0, OP_VAESIMC, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4321 OPVEX("vaesenc %Vdq,%Hdq,%Wdq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VAESENC, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4322 OPVEX("vaesenclast %Vdq,%Hdq,%Wdq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VAESENCLAST, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4323 OPVEX("vaesdec %Vdq,%Hdq,%Wdq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VAESDEC, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4324 OPVEX("vaesdeclast %Vdq,%Hdq,%Wdq", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_VAESDECLAST, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Wdq, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4325
4326 /* e */
4327 INVALID_OPCODE_BLOCK
4328
4329 /* f */
4330 INVALID_OPCODE,
4331 INVALID_OPCODE,
4332 INVALID_OPCODE,
4333 INVALID_OPCODE,
4334 INVALID_OPCODE,
4335 INVALID_OPCODE,
4336 INVALID_OPCODE,
4337 OPVEX("shlx %Gy,%By,%Ey", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, 0, OP_SHLX, OP_PARM_Gy, OP_PARM_By, OP_PARM_Ey, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4338 /* format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
4339};
4340const DISOPMAPDESC g_DisasVexMap2_66Range = { &g_aDisasVexMap2_66[0], 0x00, RT_ELEMENTS(g_aDisasVexMap2_66) };
4341
4342const DISOPCODE g_aDisasVexMap3[] =
4343{
4344 INVALID_OPCODE, /* dummy */
4345};
4346const DISOPMAPDESC g_DisasVexMap3Range = { &g_aDisasVexMap3[0], 0, RT_ELEMENTS(g_aDisasVexMap3) };
4347
4348static const DISOPCODE g_aDisasVexMap3_66[] =
4349{
4350 /* 0 format string, parse param #1, parse param #2, parse param #3, parse param #4, opcode, param #1, param #2, param #3, param #4, flags */
4351 OPVEX("vpermq %Vqq,%Wqq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPERMQ, OP_PARM_Vqq, OP_PARM_Wqq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4352 OPVEX("vpermpd %Vqq,%Wqq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPERMPD, OP_PARM_Vqq, OP_PARM_Wqq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4353 OPVEX("vpblendd %Vx,%Hx,%Wx,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPBLENDD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4354 INVALID_OPCODE,
4355 OPVEX("vpermilps %Vx,%Wx,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPERMILPS, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4356 OPVEX("vpermilpd %Vx,%Wx,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPERMILPD, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4357 OPVEX("vperm2f128 %Vqq,%Hqq,%Wqq,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPERM2F128, OP_PARM_Vqq, OP_PARM_Hqq, OP_PARM_Wqq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4358 INVALID_OPCODE,
4359 OPVEX("vroundps %Vx,%Wx,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VROUNDPS, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4360 OPVEX("vroundpd %Vx,%Wx,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VROUNDPD, OP_PARM_Vx, OP_PARM_Wx, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4361 OPVEX("vroundss %Vss,%Wss,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VROUNDSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4362 OPVEX("vroundsd %Vsd,%Wsd,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VROUNDSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4363 OPVEX("vblendps %Vx,%Hx,%Wx,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VBLENDPS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4364 OPVEX("vblendpd %Vx,%Hx,%Wx,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VBLENDPD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4365 OPVEX("vpblendw %Vx,%Hx,%Wx,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPBLENDW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4366 OPVEX("vpalignr %Vx,%Hx,%Wx,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPALIGNR, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4367
4368 /* 1 */
4369 INVALID_OPCODE,
4370 INVALID_OPCODE,
4371 INVALID_OPCODE,
4372 INVALID_OPCODE,
4373 // vpextrb %Rd/Mb,%Vdq,%Ib
4374 OPVEX("vpextrb %Eb,%Vdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPEXTRB, OP_PARM_Eb, OP_PARM_Vdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4375 // vpextrw %Rd/Mw,%Vdq,%Ib
4376 OPVEX("vpextrw %Ew,%Vdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPEXTRW, OP_PARM_Ew, OP_PARM_Vdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4377 OPVEX("#vpextrd/vpextrq %Ey,%Vdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPEXTRD, OP_PARM_Ey, OP_PARM_Vdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4378 OPVEX("vextractps %Ed,%Vdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VEXTRACTPS, OP_PARM_Ed, OP_PARM_Vdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4379 OPVEX("vinsertf128 %Vqq,%Hqq,%Wqq,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VINSERTF128, OP_PARM_Vqq, OP_PARM_Hqq, OP_PARM_Wqq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4380 OPVEX("vextractf128 %Wdq,%Vqq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VEXTRACTF128, OP_PARM_Eb, OP_PARM_Vdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4381 INVALID_OPCODE,
4382 INVALID_OPCODE,
4383 INVALID_OPCODE,
4384 OPVEX("vcvtps2ph %Wx,%Vx,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VCVTPS2PH, OP_PARM_Wx, OP_PARM_Vx, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4385 INVALID_OPCODE,
4386 INVALID_OPCODE,
4387
4388 /* 2 */
4389 // vpinsrb %Vdq,%Hdq,%Ry/Mb,%Ib
4390 OPVEX("vpinsrb %Vdq,%Hdq,%Eb,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPINSRB, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Eb, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4391 // vinsertps %Vdq,%Hdq,%Udq/Md,%Ib
4392 OPVEX("vinsertps %Vdq,%Hdq,%Wd,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VINSERTPS, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Wd, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4393 OPVEX("#vpinsrd/vpinsrq %Vdq,%Hdq,%Ey,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPINSRD, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Ey, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4394 INVALID_OPCODE,
4395 INVALID_OPCODE,
4396 INVALID_OPCODE,
4397 INVALID_OPCODE,
4398 INVALID_OPCODE,
4399 INVALID_OPCODE,
4400 INVALID_OPCODE,
4401 INVALID_OPCODE,
4402 INVALID_OPCODE,
4403 INVALID_OPCODE,
4404 INVALID_OPCODE,
4405 INVALID_OPCODE,
4406 INVALID_OPCODE,
4407
4408 /* 3 */
4409 INVALID_OPCODE,
4410 INVALID_OPCODE,
4411 INVALID_OPCODE,
4412 INVALID_OPCODE,
4413 INVALID_OPCODE,
4414 INVALID_OPCODE,
4415 INVALID_OPCODE,
4416 INVALID_OPCODE,
4417 OPVEX("vinserti128 %Vqq,%Hqq,%Wqq,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VINSERTI128, OP_PARM_Vqq, OP_PARM_Hqq, OP_PARM_Wqq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4418 OPVEX("vextracti128 %Wdq,%Vqq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VEXTRACTI128, OP_PARM_Wdq, OP_PARM_Vqq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4419 INVALID_OPCODE,
4420 INVALID_OPCODE,
4421 INVALID_OPCODE,
4422 INVALID_OPCODE,
4423 INVALID_OPCODE,
4424 INVALID_OPCODE,
4425
4426 /* 4 */
4427 OPVEX("vdpps %Vx,%Hx,%Wx,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VDPPS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4428 OPVEX("vdppd %Vdq,%Hdq,%Wdq,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VDPPD, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4429 OPVEX("vmpsadbw %Vx,%Hx,%Wx,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VMPSADBW, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4430 INVALID_OPCODE,
4431 OPVEX("vpclmulqdq %Vdq,%Hdq,%Wdq,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPCLMULQDQ, OP_PARM_Vdq, OP_PARM_Hdq, OP_PARM_Wdq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4432 INVALID_OPCODE,
4433 OPVEX("vperm2i128 %Vqq,%Hqq,%Wqq,%Ib", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPERM2I128, OP_PARM_Vqq, OP_PARM_Hqq, OP_PARM_Wqq, OP_PARM_Ib, DISOPTYPE_HARMLESS),
4434 INVALID_OPCODE,
4435 INVALID_OPCODE,
4436 INVALID_OPCODE,
4437 OPVEX("vblendvps %Vx,%Hx,%Wx,%Lx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VBLENDVPS, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Lx, DISOPTYPE_HARMLESS),
4438 OPVEX("vblendvpd %Vx,%Hx,%Wx,%Lx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VBLENDVPD, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Lx, DISOPTYPE_HARMLESS),
4439 OPVEX("vpblendvb %Vx,%Hx,%Wx,%Lx", IDX_ParseModRM, IDX_ParseVexDest, IDX_UseModRM, IDX_ParseImmByte, OP_VPBLENDVB, OP_PARM_Vx, OP_PARM_Hx, OP_PARM_Wx, OP_PARM_Lx, DISOPTYPE_HARMLESS),
4440 INVALID_OPCODE,
4441 INVALID_OPCODE,
4442 INVALID_OPCODE,
4443
4444 /* 5 */
4445 INVALID_OPCODE_BLOCK
4446
4447 /* 6 */
4448 OPVEX("vpcmpestrm %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPCMPESTRM, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4449 OPVEX("vpcmpestri %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPCMPESTRI, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4450 OPVEX("vpcmpistrm %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPCMPISTRM, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4451 OPVEX("vpcmpistri %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VPCMPISTRI, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4452 INVALID_OPCODE,
4453 INVALID_OPCODE,
4454 INVALID_OPCODE,
4455 INVALID_OPCODE,
4456 INVALID_OPCODE,
4457 INVALID_OPCODE,
4458 INVALID_OPCODE,
4459 INVALID_OPCODE,
4460 INVALID_OPCODE,
4461 INVALID_OPCODE,
4462 INVALID_OPCODE,
4463 INVALID_OPCODE,
4464
4465 /* 7 */
4466 INVALID_OPCODE_BLOCK
4467
4468 /* 8 */
4469 INVALID_OPCODE_BLOCK
4470
4471 /* 9 */
4472 INVALID_OPCODE_BLOCK
4473
4474 /* a */
4475 INVALID_OPCODE_BLOCK
4476
4477 /* b */
4478 INVALID_OPCODE_BLOCK
4479
4480 /* c */
4481 INVALID_OPCODE_BLOCK
4482
4483 /* d */
4484 INVALID_OPCODE,
4485 INVALID_OPCODE,
4486 INVALID_OPCODE,
4487 INVALID_OPCODE,
4488 INVALID_OPCODE,
4489 INVALID_OPCODE,
4490 INVALID_OPCODE,
4491 INVALID_OPCODE,
4492 INVALID_OPCODE,
4493 INVALID_OPCODE,
4494 INVALID_OPCODE,
4495 INVALID_OPCODE,
4496 INVALID_OPCODE,
4497 INVALID_OPCODE,
4498 INVALID_OPCODE,
4499 OPVEX("vaeskeygen %Vdq,%Wdq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_VAESKEYGEN, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4500};
4501const DISOPMAPDESC g_DisasVexMap3_66Range = { &g_aDisasVexMap3_66[0], 0x00, RT_ELEMENTS(g_aDisasVexMap3_66) };
4502
4503const DISOPCODE g_aDisasVexMap3F2[] =
4504{
4505 OPVEX("rorx %Gy,%Ey,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, 0, OP_RORX, OP_PARM_Gy, OP_PARM_Ey, OP_PARM_Ib, OP_PARM_NONE, DISOPTYPE_HARMLESS),
4506};
4507const DISOPMAPDESC g_DisasVexMap3F2Range = { &g_aDisasVexMap3F2[0], 0xf0, RT_ELEMENTS(g_aDisasVexMap3F2) };
4508
4509const DISOPCODE g_aDisasVexMap3F3[] =
4510{
4511 INVALID_OPCODE, /* dummy */
4512};
4513const DISOPMAPDESC g_DisasVexMap3F3Range = { &g_aDisasVexMap3F3[0], 0, RT_ELEMENTS(g_aDisasVexMap3F3) };
4514
4515
4516/** Invalid range for the g_aapVexOpcodesMapRanges table. */
4517const DISOPMAPDESC g_DisasVexMapInvalidRange = { &g_InvalidOpcode[0], 0, 1 };
4518
4519
4520PCDISOPMAPDESC const g_aapVexOpcodesMapRanges[4][4] =
4521{
4522 /* No prefix: */
4523 {
4524 &g_DisasVexMapInvalidRange,
4525 &g_DisasVexMap1Range, // 0fh 2-byte opcodes
4526 &g_DisasVexMap2Range, // 0f38h 3-byte opcodes
4527 &g_DisasVexMap3Range, // 0f3ah 3-byte opcodes
4528 },
4529 /* 66h prefix: */
4530 {
4531 &g_DisasVexMapInvalidRange,
4532 &g_DisasVexMap1_66Range, // 0fh 2-byte opcodes
4533 &g_DisasVexMap2_66Range, // 0f38h 3-byte opcodes
4534 &g_DisasVexMap3_66Range, // 0f3ah 3-byte opcodes
4535 },
4536 /* f3h prefix: */
4537 {
4538 &g_DisasVexMapInvalidRange,
4539 &g_DisasVexMap1F3Range, // 0fh 2-byte opcodes
4540 &g_DisasVexMap2F3Range, // 0f38h 3-byte opcodes
4541 &g_DisasVexMap3F3Range, // 0f3ah 3-byte opcodes
4542 },
4543 /* f2h prefix: */
4544 {
4545 &g_DisasVexMapInvalidRange,
4546 &g_DisasVexMap1F2Range, // 0fh 2-byte opcodes
4547 &g_DisasVexMap2F2Range, // 0f38h 3-byte opcodes2
4548 &g_DisasVexMap3F2Range, // 0f3ah 3-byte opcodes
4549 }
4550};
4551
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette