VirtualBox

source: vbox/trunk/src/VBox/Disassembler/DisasmTables.cpp@ 40246

Last change on this file since 40246 was 38733, checked in by vboxsync, 13 years ago

%S -> %s and some other minor cleanups.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 224.6 KB
Line 
1/** @file
2 * VBox disassembler - Tables.
3 */
4
5/*
6 * Copyright (C) 2006-2011 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17
18/*******************************************************************************
19* Header Files *
20*******************************************************************************/
21#ifdef USING_VISUAL_STUDIO
22# include <stdafx.h>
23#endif
24#include <VBox/dis.h>
25#include <VBox/disopcode.h>
26#include "DisasmTables.h"
27#include "DisasmInternal.h"
28
29
30/** @def O
31 * Wrapper which initializes an OPCODE.
32 * We must use this so that we can exclude unused fields in order
33 * to save precious bytes in the GC version.
34 *
35 * @internal
36 */
37#ifndef DIS_CORE_ONLY
38# define OP(pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype) \
39 { pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype }
40#else
41# define OP(pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype) \
42 { idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype }
43#endif
44
45//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
46//TODO: Verify tables for correctness
47//TODO: opcode type (harmless, potentially dangerous, dangerous)
48//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
49
50#ifndef DIS_CORE_ONLY
51static char SZINVALID_OPCODE[] = "Invalid Opcode";
52#endif
53
54#define INVALID_OPCODE \
55 OP(SZINVALID_OPCODE, 0, 0, 0, OP_INVALID, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_INVALID)
56
57#define INVALID_OPCODE_BLOCK \
58 INVALID_OPCODE,\
59 INVALID_OPCODE,\
60 INVALID_OPCODE,\
61 INVALID_OPCODE,\
62 INVALID_OPCODE,\
63 INVALID_OPCODE,\
64 INVALID_OPCODE,\
65 INVALID_OPCODE,\
66 INVALID_OPCODE,\
67 INVALID_OPCODE,\
68 INVALID_OPCODE,\
69 INVALID_OPCODE,\
70 INVALID_OPCODE,\
71 INVALID_OPCODE,\
72 INVALID_OPCODE,\
73 INVALID_OPCODE,
74
75/* Invalid opcode */
76const OPCODE g_InvalidOpcode[1] =
77{
78 INVALID_OPCODE
79};
80
81/* Tables for the elegant Intel X86 instruction set */
82const OPCODE g_aOneByteMapX86[256] =
83{
84 /* 0 */
85 OP("add %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
86 OP("add %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
87 OP("add %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
88 OP("add %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADD, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
89 OP("add AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_ADD, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
90 OP("add %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_ADD, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
91 OP("push ES", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ES, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
92 OP("pop ES", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ES, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
93 OP("or %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
94 OP("or %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
95 OP("or %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
96 OP("or %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_OR, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
97 OP("or AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_OR, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
98 OP("or %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_OR, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
99 OP("push CS", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_CS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_POTENTIALLY_DANGEROUS | OPTYPE_INVALID_64),
100 OP("2-BYTE ESCAPE", IDX_ParseTwoByteEsc,0, 0, OP_2B_ESC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
101
102 /* 1 */
103 OP("adc %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
104 OP("adc %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
105 OP("adc %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
106 OP("adc %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADC, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
107 OP("adc AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_ADC, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
108 OP("adc %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_ADC, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
109 OP("push SS", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_SS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_RRM_DANGEROUS | OPTYPE_INVALID_64),
110 OP("pop SS", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_SS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_RRM_DANGEROUS | OPTYPE_INHIBIT_IRQS | OPTYPE_INVALID_64),
111 OP("sbb %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
112 OP("sbb %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
113 OP("sbb %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
114 OP("sbb %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_SBB, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
115 OP("sbb AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_SBB, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
116 OP("sbb %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_SBB, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
117 OP("push DS", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_DS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
118 OP("pop DS", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_DS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_RRM_DANGEROUS | OPTYPE_INVALID_64),
119
120 /* 2 */
121 OP("and %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
122 OP("and %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
123 OP("and %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
124 OP("and %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_AND, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
125 OP("and AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_AND, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
126 OP("and %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_AND, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
127 OP("SEG ES", 0, 0, 0, OP_SEG, OP_PARM_REG_ES, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
128 OP("daa", 0, 0, 0, OP_DAA, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
129 OP("sub %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Eb, OP_PARM_Gb , OP_PARM_NONE, OPTYPE_HARMLESS),
130 OP("sub %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Ev, OP_PARM_Gv , OP_PARM_NONE, OPTYPE_HARMLESS),
131 OP("sub %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Gb, OP_PARM_Eb , OP_PARM_NONE, OPTYPE_HARMLESS),
132 OP("sub %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUB, OP_PARM_Gv, OP_PARM_Ev , OP_PARM_NONE, OPTYPE_HARMLESS),
133 OP("sub AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_SUB, OP_PARM_REG_AL, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
134 OP("sub %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_SUB, OP_PARM_REG_EAX, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
135 /* Branch not taken hint prefix for branches on a Pentium 4 or Xeon CPU (or higher)! */
136 OP("SEG CS", 0, 0, 0, OP_SEG, OP_PARM_REG_CS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
137 OP("das", 0, 0, 0, OP_DAS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
138
139 /* 3 */
140 OP("xor %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
141 OP("xor %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
142 OP("xor %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, OPTYPE_HARMLESS),
143 OP("xor %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_XOR, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
144 OP("xor AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_XOR, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
145 OP("xor %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_XOR, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
146 OP("SEG SS", 0, 0, 0, OP_SEG, OP_PARM_REG_SS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
147 OP("aaa", 0, 0, 0, OP_AAA, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
148 OP("cmp %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
149 OP("cmp %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
150 OP("cmp %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, OPTYPE_HARMLESS),
151 OP("cmp %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMP, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
152 OP("cmp AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte,0, OP_CMP, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
153 OP("cmp %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_CMP, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
154 /* Branch not taken hint prefix for branches on a Pentium 4 or Xeon CPU (or higher)! */
155 OP("SEG DS", 0, 0, 0, OP_SEG, OP_PARM_REG_DS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
156 OP("aas", 0, 0, 0, OP_AAS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
157
158 /* 4 */
159 OP("inc %eAX", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
160 OP("inc %eCX", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
161 OP("inc %eDX", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
162 OP("inc %eBX", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
163 OP("inc %eSP", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
164 OP("inc %eBP", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
165 OP("inc %eSI", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
166 OP("inc %eDI", IDX_ParseFixedReg, 0, 0, OP_INC, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
167 OP("dec %eAX", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
168 OP("dec %eCX", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
169 OP("dec %eDX", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
170 OP("dec %eBX", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
171 OP("dec %eSP", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
172 OP("dec %eBP", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
173 OP("dec %eSI", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
174 OP("dec %eDI", IDX_ParseFixedReg, 0, 0, OP_DEC, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
175
176 /* 5 */
177 OP("push %eAX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
178 OP("push %eCX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
179 OP("push %eDX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
180 OP("push %eBX", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
181 OP("push %eSP", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
182 OP("push %eBP", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
183 OP("push %eSI", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
184 OP("push %eDI", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
185 OP("pop %eAX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
186 OP("pop %eCX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
187 OP("pop %eDX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
188 OP("pop %eBX", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
189 OP("pop %eSP", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
190 OP("pop %eBP", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
191 OP("pop %eSI", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
192 OP("pop %eDI", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE | OPTYPE_REXB_EXTENDS_OPREG),
193
194 /* 6 */
195 OP("pusha", 0, 0, 0, OP_PUSHA, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
196 OP("popa", 0, 0, 0, OP_POPA, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
197 OP("bound %Gv,%Ma", IDX_ParseModRM, IDX_UseModRM, 0, OP_BOUND, OP_PARM_Gv, OP_PARM_Ma, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
198 OP("arpl %Ew,%Gw", IDX_ParseModRM, IDX_UseModRM, 0, OP_ARPL, OP_PARM_Ew, OP_PARM_Gw, OP_PARM_NONE, OPTYPE_HARMLESS),
199 OP("SEG FS", 0, 0, 0, OP_SEG, OP_PARM_REG_FS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
200 OP("SEG GS", 0, 0, 0, OP_SEG, OP_PARM_REG_GS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
201 OP("OP SIZE", 0, 0, 0, OP_OPSIZE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
202 OP("ADR SIZE", 0, 0, 0, OP_ADDRSIZE,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
203 OP("push %Iz", IDX_ParseImmZ, 0, 0, OP_PUSH, OP_PARM_Iz, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
204 OP("imul %Gv,%Ev,%Iz", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmZ, OP_IMUL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_Iz, OPTYPE_HARMLESS),
205 OP("push %Ib", IDX_ParseImmByteSX, 0, 0, OP_PUSH, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
206 OP("imul %Gv,%Ev,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByteSX, OP_IMUL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_Ib, OPTYPE_HARMLESS),
207 OP("insb %Yb,DX", IDX_ParseYb, IDX_ParseFixedReg, 0, OP_INSB, OP_PARM_Yb, OP_PARM_REG_DX, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
208 OP("insw/d %Yv,DX", IDX_ParseYv, IDX_ParseFixedReg, 0, OP_INSWD, OP_PARM_Yv, OP_PARM_REG_DX, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
209 OP("outsb DX,%Xb", IDX_ParseFixedReg, IDX_ParseXb, 0, OP_OUTSB, OP_PARM_REG_DX, OP_PARM_Yb, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
210 OP("outsw/d DX,%Xv", IDX_ParseFixedReg, IDX_ParseXv, 0, OP_OUTSWD, OP_PARM_REG_DX, OP_PARM_Yv, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
211
212
213 /* 7 */
214 OP("jo %Jb", IDX_ParseImmBRel, 0, 0, OP_JO, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
215 OP("jno %Jb", IDX_ParseImmBRel, 0, 0, OP_JNO, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
216 OP("jc %Jb", IDX_ParseImmBRel, 0, 0, OP_JC, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
217 OP("jnc %Jb", IDX_ParseImmBRel, 0, 0, OP_JNC, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
218 OP("je %Jb", IDX_ParseImmBRel, 0, 0, OP_JE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
219 OP("jne %Jb", IDX_ParseImmBRel, 0, 0, OP_JNE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
220 OP("jbe %Jb", IDX_ParseImmBRel, 0, 0, OP_JBE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
221 OP("jnbe %Jb", IDX_ParseImmBRel, 0, 0, OP_JNBE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
222 OP("js %Jb", IDX_ParseImmBRel, 0, 0, OP_JS, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
223 OP("jns %Jb", IDX_ParseImmBRel, 0, 0, OP_JNS, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
224 OP("jp %Jb", IDX_ParseImmBRel, 0, 0, OP_JP, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
225 OP("jnp %Jb", IDX_ParseImmBRel, 0, 0, OP_JNP, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
226 OP("jl %Jb", IDX_ParseImmBRel, 0, 0, OP_JL, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
227 OP("jnl %Jb", IDX_ParseImmBRel, 0, 0, OP_JNL, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
228 OP("jle %Jb", IDX_ParseImmBRel, 0, 0, OP_JLE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
229 OP("jnle %Jb", IDX_ParseImmBRel, 0, 0, OP_JNLE, OP_PARM_Jb , OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
230
231 /* 8 */
232 OP("Imm Grp1 %Eb,%Ib", IDX_ParseImmGrpl, 0, 0, OP_IMM_GRP1,OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
233 OP("Imm Grp1 %Ev,%Iz", IDX_ParseImmGrpl, 0, 0, OP_IMM_GRP1,OP_PARM_Ev, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
234 OP("Imm Grp1 %Eb,%Ib", IDX_ParseImmGrpl, 0, 0, OP_IMM_GRP1,OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
235 OP("Imm Grp1 %Ev,%Ib", IDX_ParseImmGrpl, 0, 0, OP_IMM_GRP1,OP_PARM_Ev, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
236 OP("test %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_TEST, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
237 OP("test %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_TEST, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
238 OP("xchg %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XCHG, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
239 OP("xchg %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_XCHG, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
240 OP("mov %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
241 OP("mov %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
242 OP("mov %Gb,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Gb, OP_PARM_Eb, OP_PARM_NONE, OPTYPE_HARMLESS),
243 OP("mov %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
244 OP("mov %Ev,%Sw", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Sw, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS),
245 OP("lea %Gv,%M", IDX_ParseModRM, IDX_UseModRM, 0, OP_LEA, OP_PARM_Gv, OP_PARM_M, OP_PARM_NONE, OPTYPE_HARMLESS),
246 OP("mov %Sw,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV, OP_PARM_Sw, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS | OPTYPE_INHIBIT_IRQS),
247 OP("pop %Ev", IDX_ParseModRM, 0, 0, OP_POP, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
248
249 /* 9 */
250 OP("nop/pause/xchg %eAX,%eAX", IDX_ParseNopPause, 0, 0, OP_NOP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
251 OP("xchg %eCX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_ECX, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
252 OP("xchg %eDX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EDX, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
253 OP("xchg %eBX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EBX, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
254 OP("xchg %eSP,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_ESP, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
255 OP("xchg %eBP,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EBP, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
256 OP("xchg %eSI,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_ESI, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
257 OP("xchg %eDI,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_XCHG, OP_PARM_REG_EDI, OP_PARM_REG_EAX, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
258 OP("cbw", 0, 0, 0, OP_CBW, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
259 OP("cwd", 0, 0, 0, OP_CWD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
260 OP("call %Ap", IDX_ParseImmAddr, 0, 0, OP_CALL, OP_PARM_Ap, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_INVALID_64),
261 OP("wait", 0, 0, 0, OP_WAIT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
262 OP("pushf %Fv", 0, 0, 0, OP_PUSHF, OP_PARM_Fv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS | OPTYPE_DEFAULT_64_OP_SIZE),
263 OP("popf %Fv", 0, 0, 0, OP_POPF, OP_PARM_Fv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS | OPTYPE_DEFAULT_64_OP_SIZE),
264 OP("sahf", 0, 0, 0, OP_SAHF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
265 OP("lahf", 0, 0, 0, OP_LAHF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
266
267
268 /* A */
269 OP("mov AL,%Ob", IDX_ParseFixedReg, IDX_ParseImmAddr, 0, OP_MOV, OP_PARM_REG_AL, OP_PARM_Ob, OP_PARM_NONE, OPTYPE_HARMLESS),
270 OP("mov %eAX,%Ov", IDX_ParseFixedReg, IDX_ParseImmAddr, 0, OP_MOV, OP_PARM_REG_EAX, OP_PARM_Ov, OP_PARM_NONE, OPTYPE_HARMLESS),
271 OP("mov %Ob,AL", IDX_ParseImmAddr, IDX_ParseFixedReg, 0, OP_MOV, OP_PARM_Ob, OP_PARM_REG_AL, OP_PARM_NONE, OPTYPE_HARMLESS),
272 OP("mov %Ov,%eAX", IDX_ParseImmAddr, IDX_ParseFixedReg, 0, OP_MOV, OP_PARM_Ov, OP_PARM_REG_EAX,OP_PARM_NONE, OPTYPE_HARMLESS),
273 OP("movsb %Xb,%Yb", IDX_ParseXb, IDX_ParseYb, 0, OP_MOVSB, OP_PARM_Xb, OP_PARM_Yb, OP_PARM_NONE, OPTYPE_HARMLESS),
274 OP("movsw/d %Xv,%Yv", IDX_ParseXv, IDX_ParseYv, 0, OP_MOVSWD, OP_PARM_Xv, OP_PARM_Yv, OP_PARM_NONE, OPTYPE_HARMLESS),
275 OP("cmpsb %Xb,%Yb", IDX_ParseXb, IDX_ParseYb, 0, OP_CMPSB, OP_PARM_Xb, OP_PARM_Yb, OP_PARM_NONE, OPTYPE_HARMLESS),
276 OP("cmpsw/d %Xv,%Yv", IDX_ParseXv, IDX_ParseYv, 0, OP_CMPWD, OP_PARM_Xv, OP_PARM_Yv, OP_PARM_NONE, OPTYPE_HARMLESS),
277 OP("test AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_TEST, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
278 OP("test %eAX,%Iz", IDX_ParseFixedReg, IDX_ParseImmZ, 0, OP_TEST, OP_PARM_REG_EAX, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
279 OP("stosb %Yb,AL", IDX_ParseYb, IDX_ParseFixedReg, 0, OP_STOSB, OP_PARM_Yb, OP_PARM_REG_AL, OP_PARM_NONE, OPTYPE_HARMLESS),
280 OP("stosw/d %Yv,%eAX", IDX_ParseYv, IDX_ParseFixedReg, 0, OP_STOSWD, OP_PARM_Yv, OP_PARM_REG_EAX,OP_PARM_NONE, OPTYPE_HARMLESS),
281 OP("lodsb AL,%Xb", IDX_ParseFixedReg, IDX_ParseXb, 0, OP_LODSB, OP_PARM_REG_AL, OP_PARM_Xb, OP_PARM_NONE, OPTYPE_HARMLESS),
282 OP("lodsw/d %eAX,%Xv", IDX_ParseFixedReg, IDX_ParseXv, 0, OP_LODSWD, OP_PARM_REG_EAX, OP_PARM_Xv, OP_PARM_NONE, OPTYPE_HARMLESS),
283 OP("scasb AL,%Xb", IDX_ParseFixedReg, IDX_ParseXb, 0, OP_SCASB, OP_PARM_REG_AL, OP_PARM_Xb, OP_PARM_NONE, OPTYPE_HARMLESS),
284 OP("scasw/d %eAX,%Xv", IDX_ParseFixedReg, IDX_ParseXv, 0, OP_SCASWD, OP_PARM_REG_EAX, OP_PARM_Xv, OP_PARM_NONE, OPTYPE_HARMLESS),
285
286
287 /* B */
288 OP("mov AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
289 OP("mov CL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_CL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
290 OP("mov DL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_DL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
291 OP("mov BL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_BL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
292 OP("mov AH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_AH, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
293 OP("mov CH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_CH, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
294 OP("mov DH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_DH, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
295 OP("mov BH,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_REG_BH, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
296 OP("mov %eAX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EAX, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
297 OP("mov %eCX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_ECX, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
298 OP("mov %eDX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EDX, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
299 OP("mov %eBX,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EBX, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
300 OP("mov %eSP,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_ESP, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
301 OP("mov %eBP,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EBP, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
302 OP("mov %eSI,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_ESI, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
303 OP("mov %eDI,%Iv", IDX_ParseFixedReg, IDX_ParseImmV, 0, OP_MOV, OP_PARM_REG_EDI, OP_PARM_Iv, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
304
305 /* C */
306 OP("Shift Grp2 %Eb,%Ib", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
307 OP("Shift Grp2 %Ev,%Ib", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Ev, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
308 OP("retn %Iw", IDX_ParseImmUshort, 0, 0, OP_RETN, OP_PARM_Iw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
309 OP("retn", 0, 0, 0, OP_RETN, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
310 OP("les %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LES, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
311 OP("lds %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LDS, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_RRM_DANGEROUS | OPTYPE_INVALID_64),
312 /* @todo these two are actually group11 */
313 OP("mov %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_Eb, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
314 OP("mov %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Iz, OP_PARM_NONE, OPTYPE_HARMLESS),
315 OP("enter %Iw,%Ib", IDX_ParseImmUshort, IDX_ParseImmByte, 0, OP_ENTER, OP_PARM_Iw, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
316 OP("leave", 0, 0, 0, OP_LEAVE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
317 OP("retf %Iw", IDX_ParseImmUshort, 0, 0, OP_RETF, OP_PARM_Iw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW),
318 OP("retf", 0, 0, 0, OP_RETF, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW),
319 OP("int 3", 0, 0, 0, OP_INT3, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_INTERRUPT),
320 OP("int %Ib", IDX_ParseImmByte, 0, 0, OP_INT, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_INTERRUPT),
321 OP("into", 0, 0, 0, OP_INTO, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_INTERRUPT | OPTYPE_INVALID_64),
322 OP("iret", 0, 0, 0, OP_IRET, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW),
323
324 /* D */
325 OP("Shift Grp2 %Eb,1", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Eb, OP_PARM_1, OP_PARM_NONE, OPTYPE_HARMLESS),
326 OP("Shift Grp2 %Ev,1", IDX_ParseShiftGrp2, 0, 0, OP_SHIFT_GRP2, OP_PARM_Ev, OP_PARM_1, OP_PARM_NONE, OPTYPE_HARMLESS),
327 OP("Shift Grp2 %Eb,CL", IDX_ParseShiftGrp2, IDX_ParseFixedReg, 0, OP_SHIFT_GRP2, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
328 OP("Shift Grp2 %Ev,CL", IDX_ParseShiftGrp2, IDX_ParseFixedReg, 0, OP_SHIFT_GRP2, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
329 OP("aam %Ib", IDX_ParseImmByte, 0, 0, OP_AAM, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
330 OP("aad %Ib", IDX_ParseImmByte, 0, 0, OP_AAD, OP_PARM_Ib, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_INVALID_64),
331 /* setalc?? */
332 INVALID_OPCODE,
333 OP("xlat", 0, 0, 0, OP_XLAT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
334 OP("esc 0xf0", IDX_ParseEscFP, 0, 0, OP_ESCF0, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
335 OP("esc 0xf1", IDX_ParseEscFP, 0, 0, OP_ESCF1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
336 OP("esc 0xf2", IDX_ParseEscFP, 0, 0, OP_ESCF2, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
337 OP("esc 0xf3", IDX_ParseEscFP, 0, 0, OP_ESCF3, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
338 OP("esc 0xf4", IDX_ParseEscFP, 0, 0, OP_ESCF4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
339 OP("esc 0xf5", IDX_ParseEscFP, 0, 0, OP_ESCF5, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
340 OP("esc 0xf6", IDX_ParseEscFP, 0, 0, OP_ESCF6, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
341 OP("esc 0xf7", IDX_ParseEscFP, 0, 0, OP_ESCF7, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
342
343
344 /* E */
345 OP("loopne %Jb", IDX_ParseImmBRel, 0, 0, OP_LOOPNE, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
346 OP("loope %Jb", IDX_ParseImmBRel, 0, 0, OP_LOOPE, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
347 OP("loop %Jb", IDX_ParseImmBRel, 0, 0, OP_LOOP, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
348 OP("j(e)cxz %Jb", IDX_ParseImmBRel, 0, 0, OP_JECXZ, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
349 OP("in AL,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_IN, OP_PARM_REG_AL, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
350 OP("in %eAX,%Ib", IDX_ParseFixedReg, IDX_ParseImmByte, 0, OP_IN, OP_PARM_REG_EAX, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
351 OP("out %Ib,AL", IDX_ParseImmByte, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_Ib, OP_PARM_REG_AL, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
352 OP("out %Ib,%eAX", IDX_ParseImmByte, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_Ib, OP_PARM_REG_EAX,OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
353 OP("call %Jv", IDX_ParseImmVRel, 0, 0, OP_CALL, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
354 OP("jmp %Jv", IDX_ParseImmVRel, 0, 0, OP_JMP, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
355 OP("jmp %Ap", IDX_ParseImmAddr, 0, 0, OP_JMP, OP_PARM_Ap, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_INVALID_64),
356 OP("jmp %Jb", IDX_ParseImmBRel, 0, 0, OP_JMP, OP_PARM_Jb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_RELATIVE_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
357 OP("in AL,DX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_IN, OP_PARM_REG_AL, OP_PARM_REG_DX, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
358 OP("in %eAX,DX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_IN, OP_PARM_REG_EAX, OP_PARM_REG_DX, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_READ),
359 OP("out DX,AL", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_REG_DX, OP_PARM_REG_AL, OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
360 OP("out DX,%eAX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_OUT, OP_PARM_REG_DX, OP_PARM_REG_EAX,OP_PARM_NONE, OPTYPE_PORTIO | OPTYPE_PRIVILEGED | OPTYPE_PORTIO_WRITE),
361
362
363 /* F */
364 OP("lock", 0, 0, 0, OP_LOCK, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
365 /* softice bp */
366 INVALID_OPCODE,
367 OP("repne", 0, 0, 0, OP_REPNE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
368 OP("rep(e)", 0, 0, 0, OP_REPE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
369 OP("hlt", 0, 0, 0, OP_HLT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_PRIVILEGED),
370 OP("cmc", 0, 0, 0, OP_CMC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
371 OP("Unary Grp3 %Eb", IDX_ParseGrp3, 0, 0, OP_UNARY_GRP3, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
372 OP("Unary Grp3 %Ev", IDX_ParseGrp3, 0, 0, OP_UNARY_GRP3, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
373 OP("clc", 0, 0, 0, OP_CLC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
374 OP("stc", 0, 0, 0, OP_STC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
375 OP("cli", 0, 0, 0, OP_CLI, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
376 OP("sti", 0, 0, 0, OP_STI, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED | OPTYPE_INHIBIT_IRQS),
377 OP("cld", 0, 0, 0, OP_CLD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
378 OP("std", 0, 0, 0, OP_STD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
379 OP("inc/dec Grp4", IDX_ParseGrp4, 0, 0, OP_INC_GRP4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
380 OP("Indirect Grp5", IDX_ParseGrp5, 0, 0, OP_IND_GRP5, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
381};
382
383
384const OPCODE g_aTwoByteMapX86[256] =
385{
386 /* 0 */
387 OP("Grp6", IDX_ParseGrp6, 0, 0, OP_GRP6, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
388 OP("Grp7", IDX_ParseGrp7, 0, 0, OP_GRP7, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
389 OP("lar %Gv,%Ew", IDX_ParseModRM, IDX_UseModRM, 0, OP_LAR, OP_PARM_Gv, OP_PARM_Ew, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
390 OP("lsl %Gv,%Ew", IDX_ParseModRM, IDX_UseModRM, 0, OP_LSL, OP_PARM_Gv, OP_PARM_Ew, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
391 INVALID_OPCODE,
392 OP("syscall", 0, 0, 0, OP_SYSCALL, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_ONLY_64),
393 OP("clts", 0, 0, 0, OP_CLTS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_PRIVILEGED),
394 OP("sysret", 0, 0, 0, OP_SYSRET, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_ONLY_64),
395 OP("invd", 0, 0, 0, OP_INVD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_PRIVILEGED),
396 OP("wbinvd", 0, 0, 0, OP_WBINVD, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_PRIVILEGED),
397 INVALID_OPCODE,
398 OP("Two Byte Illegal Opcodes UD2", 0, 0, 0, OP_ILLUD2, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_ILLEGAL),
399 INVALID_OPCODE,
400 /* NOP Ev or prefetch (Intel vs AMD) */
401 OP("nop %Ev/prefetch", IDX_ParseModRM, 0, 0, OP_NOP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
402 OP("femms", 0, 0, 0, OP_FEMMS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
403 OP("3DNow! Esc", IDX_Parse3DNow, 0, 0, OP_3DNOW, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
404
405 /* 1 */
406 OP("movups %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVUPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
407 OP("movups %Wps,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVUPS, OP_PARM_Wps, OP_PARM_Vps, OP_PARM_NONE, OPTYPE_HARMLESS),
408 /* can also be movhlps when reg->reg */
409 OP("movlps %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVLPS, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, OPTYPE_HARMLESS),
410 OP("movlps %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVLPS, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
411 OP("unpcklps %Vps,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_UNPCKLPS, OP_PARM_Vps, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
412 OP("unpckhps %Vps,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_UNPCKHPS, OP_PARM_Vps, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
413 /* can also be movlhps when reg->reg */
414 OP("movhps %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVHPS, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, OPTYPE_HARMLESS),
415 OP("movhps %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVHPS, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
416 OP("prefetch Grp16", IDX_ParseGrp16, 0, 0, OP_PREFETCH_GRP16, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
417 INVALID_OPCODE,
418 INVALID_OPCODE,
419 INVALID_OPCODE,
420 INVALID_OPCODE,
421 INVALID_OPCODE,
422 INVALID_OPCODE,
423 OP("nop %Ev", IDX_ParseModRM, 0, 0, OP_NOP, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
424
425 /* 2 */
426 OP("mov %Rd,%Cd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_CR, OP_PARM_Rd, OP_PARM_Cd, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED | OPTYPE_MOD_FIXED_11 | OPTYPE_FORCED_32_OP_SIZE_X86),
427 OP("mov %Rd,%Dd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_DR, OP_PARM_Rd, OP_PARM_Dd, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED | OPTYPE_MOD_FIXED_11 | OPTYPE_FORCED_32_OP_SIZE_X86),
428 OP("mov %Cd,%Rd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_CR, OP_PARM_Cd, OP_PARM_Rd, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED | OPTYPE_MOD_FIXED_11 | OPTYPE_FORCED_32_OP_SIZE_X86),
429 OP("mov %Dd,%Rd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_DR, OP_PARM_Dd, OP_PARM_Rd, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED | OPTYPE_MOD_FIXED_11 | OPTYPE_FORCED_32_OP_SIZE_X86),
430 /* only valid for Pentium Pro & Pentium II */
431 OP("mov %Rd,%Td", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_TR, OP_PARM_Rd, OP_PARM_Td, OP_PARM_NONE, OPTYPE_PRIVILEGED),
432 INVALID_OPCODE,
433 /* only valid for Pentium Pro & Pentium II */
434 OP("mov %Td,%Rd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOV_TR, OP_PARM_Td, OP_PARM_Rd, OP_PARM_NONE, OPTYPE_PRIVILEGED),
435 INVALID_OPCODE,
436
437 OP("movaps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVAPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
438 OP("movaps %Wps,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVAPS, OP_PARM_Wps, OP_PARM_Vps, OP_PARM_NONE, OPTYPE_HARMLESS),
439 OP("cvtpi2ps %Vps,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPI2PS,OP_PARM_Vps, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
440 OP("movntps %Wps,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTPS, OP_PARM_Wps, OP_PARM_Vps, OP_PARM_NONE, OPTYPE_HARMLESS),
441 OP("cvttps2pi %Qq,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTPS2PI,OP_PARM_Qq, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
442 OP("cvtps2pi %Qq,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPS2PI,OP_PARM_Qq, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
443 OP("ucomiss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_UCOMISS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
444 OP("comiss %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_COMISS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
445
446 /* 3 */
447 OP("wrmsr", 0, 0, 0, OP_WRMSR, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
448 OP("rdtsc", 0, 0, 0, OP_RDTSC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS),
449 OP("rdmsr", 0, 0, 0, OP_RDMSR, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_PRIVILEGED),
450 OP("rdpmc", 0, 0, 0, OP_RDPMC, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_PRIVILEGED),
451 OP("sysenter", 0, 0, 0, OP_SYSENTER,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW),
452 OP("sysexit", 0, 0, 0, OP_SYSEXIT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW),
453 INVALID_OPCODE,
454 INVALID_OPCODE, /** 0x37 - GETSEC */
455 OP("3 byte escape A4", IDX_ParseThreeByteEsc4,0, 0, OP_3B_ESC4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
456 INVALID_OPCODE,
457 INVALID_OPCODE, /** 0x3A - 3-byte escape table A-5 */
458 INVALID_OPCODE,
459 /* SSE2 */
460 OP("movnti %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTI, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
461 INVALID_OPCODE,
462 INVALID_OPCODE,
463 INVALID_OPCODE,
464
465 /* 4 */
466 OP("cmovo %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVO, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
467 OP("cmovno %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNO, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
468 OP("cmovc %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVC, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
469 OP("cmovnc %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNC, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
470 OP("cmovz %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVZ, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
471 OP("cmovnz %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNZ, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
472 OP("cmovbe %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVBE, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
473 OP("cmovnbe %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNBE, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
474 OP("cmovs %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVS, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
475 OP("cmovns %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNS, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
476 OP("cmovp %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVP, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
477 OP("cmovnp %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNP, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
478 OP("cmovl %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
479 OP("cmovnl %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
480 OP("cmovle %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVLE, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
481 OP("cmovnle %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMOVNLE, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
482
483 /* 5 */
484 OP("movmskps %Ed,%Vps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVMSKPS,OP_PARM_Ed, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
485 OP("sqrtps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_SQRTPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
486 OP("rsqrtps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_RSQRTPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
487 OP("rcpps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_RCPPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
488 OP("andps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_ANDPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
489 OP("andnps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_ANDNPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
490 OP("orps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_ORPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
491 OP("xorps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_XORPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
492 OP("addps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADDPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
493 OP("mulps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MULPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
494 OP("cvtps2pd %Vpd,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPS2PD,OP_PARM_Vpd, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
495 OP("cvtdq2ps %Vps,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTDQ2PS,OP_PARM_Vps, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
496 OP("subps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUBPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
497 OP("minps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MINPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
498 OP("divps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_DIVPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
499 OP("maxps %Vps,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_MAXPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
500
501 /* 6 */
502 OP("punpcklbw %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLBW, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, OPTYPE_HARMLESS),
503 OP("punpcklwd %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLWD, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, OPTYPE_HARMLESS),
504 OP("punpckldq %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLDQ, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, OPTYPE_HARMLESS),
505 OP("packsswb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKSSWB,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
506 OP("pcmpgtb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
507 OP("pcmpgtw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
508 OP("pcmpgtd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
509 OP("packuswb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKUSWB,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
510 OP("punpckhbw %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHBW, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, OPTYPE_HARMLESS),
511 OP("punpckhwd %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHWD, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, OPTYPE_HARMLESS),
512 OP("punpckhdq %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHDQ, OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, OPTYPE_HARMLESS),
513 OP("packssdw %Pq,%Qd", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKSSDW,OP_PARM_Pq, OP_PARM_Qd, OP_PARM_NONE, OPTYPE_HARMLESS),
514 INVALID_OPCODE, /** @todo 0x0f 0x6c punpcklqdq Vdq,Wdq */
515 INVALID_OPCODE, /** @todo 0x0f 0x6d punpckhqdq Vdq,Wdq */
516 OP("movd %Pd,%Ed", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVD, OP_PARM_Pd, OP_PARM_Ed, OP_PARM_NONE, OPTYPE_HARMLESS),
517 OP("movq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
518
519 /* 7 */
520 OP("pshufw %Pq,%Qq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_PSHUFW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_Ib, OPTYPE_HARMLESS),
521 OP("Grp12", IDX_ParseGrp12, 0, 0, OP_GRP12, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
522 OP("Grp13", IDX_ParseGrp13, 0, 0, OP_GRP13, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
523 OP("Grp14", IDX_ParseGrp14, 0, 0, OP_GRP14, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
524 OP("pcmpeqb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
525 OP("pcmpeqw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
526 OP("pcmpeqd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
527 OP("emms", 0, 0, 0, OP_EMMS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
528 OP("MMX UD 0x78", 0, 0, 0, OP_MMX_UD78,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS), /** @todo 0x0f 0x78 VMREAD */
529 OP("MMX UD 0x79", 0, 0, 0, OP_MMX_UD79,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS), /** @todo 0x0f 0x79 VMWRITE */
530 OP("MMX UD 0x7A", 0, 0, 0, OP_MMX_UD7A,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
531 OP("MMX UD 0x7B", 0, 0, 0, OP_MMX_UD7B,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
532 OP("MMX UD 0x7C", 0, 0, 0, OP_MMX_UD7C,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS), /** @todo 0x0f 0x7c haddpd/haddps */
533 OP("MMX UD 0x7D", 0, 0, 0, OP_MMX_UD7D,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS), /** @todo 0x0f 0x7d hsubpd/hsubps */
534 OP("movd %Ed,%Pd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVD, OP_PARM_Ed, OP_PARM_Pd, OP_PARM_NONE, OPTYPE_HARMLESS),
535 OP("movq %Qq,%Pq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ, OP_PARM_Qq, OP_PARM_Pq, OP_PARM_NONE, OPTYPE_HARMLESS),
536
537 /* 8 */
538 OP("jo %Jv", IDX_ParseImmVRel, 0, 0, OP_JO, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
539 OP("jno %Jv", IDX_ParseImmVRel, 0, 0, OP_JNO, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
540 OP("jc %Jv", IDX_ParseImmVRel, 0, 0, OP_JC, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
541 OP("jnc %Jv", IDX_ParseImmVRel, 0, 0, OP_JNC, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
542 OP("je %Jv", IDX_ParseImmVRel, 0, 0, OP_JE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
543 OP("jne %Jv", IDX_ParseImmVRel, 0, 0, OP_JNE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
544 OP("jbe %Jv", IDX_ParseImmVRel, 0, 0, OP_JBE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
545 OP("jnbe %Jv", IDX_ParseImmVRel, 0, 0, OP_JNBE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
546 OP("js %Jv", IDX_ParseImmVRel, 0, 0, OP_JS, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
547 OP("jns %Jv", IDX_ParseImmVRel, 0, 0, OP_JNS, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
548 OP("jp %Jv", IDX_ParseImmVRel, 0, 0, OP_JP, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
549 OP("jnp %Jv", IDX_ParseImmVRel, 0, 0, OP_JNP, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
550 OP("jl %Jv", IDX_ParseImmVRel, 0, 0, OP_JL, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
551 OP("jnl %Jv", IDX_ParseImmVRel, 0, 0, OP_JNL, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
552 OP("jle %Jv", IDX_ParseImmVRel, 0, 0, OP_JLE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
553 OP("jnle %Jv", IDX_ParseImmVRel, 0, 0, OP_JNLE, OP_PARM_Jv, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW|OPTYPE_RELATIVE_CONTROLFLOW|OPTYPE_COND_CONTROLFLOW|OPTYPE_FORCED_64_OP_SIZE),
554
555 /* 9 */
556 OP("seto %Eb", IDX_ParseModRM, 0, 0, OP_SETO, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
557 OP("setno %Eb", IDX_ParseModRM, 0, 0, OP_SETNO, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
558 OP("setc %Eb", IDX_ParseModRM, 0, 0, OP_SETC, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
559 OP("setnc %Eb", IDX_ParseModRM, 0, 0, OP_SETNC, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
560 OP("sete %Eb", IDX_ParseModRM, 0, 0, OP_SETE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
561 OP("setne %Eb", IDX_ParseModRM, 0, 0, OP_SETNE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
562 OP("setbe %Eb", IDX_ParseModRM, 0, 0, OP_SETBE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
563 OP("setnbe %Eb", IDX_ParseModRM, 0, 0, OP_SETNBE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
564 OP("sets %Eb", IDX_ParseModRM, 0, 0, OP_SETS, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
565 OP("setns %Eb", IDX_ParseModRM, 0, 0, OP_SETNS, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
566 OP("setp %Eb", IDX_ParseModRM, 0, 0, OP_SETP, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
567 OP("setnp %Eb", IDX_ParseModRM, 0, 0, OP_SETNP, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
568 OP("setl %Eb", IDX_ParseModRM, 0, 0, OP_SETL, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
569 OP("setnl %Eb", IDX_ParseModRM, 0, 0, OP_SETNL, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
570 OP("setle %Eb", IDX_ParseModRM, 0, 0, OP_SETLE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
571 OP("setnle %Eb", IDX_ParseModRM, 0, 0, OP_SETNLE, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
572
573 /* a */
574 OP("push fs", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_FS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
575 OP("pop fs", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_FS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
576 OP("cpuid", 0, 0, 0, OP_CPUID, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_POTENTIALLY_DANGEROUS),
577 OP("bt %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BT, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
578 OP("shld %Ev,%Gv,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_SHLD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_Ib, OPTYPE_HARMLESS),
579 OP("shld %Ev,%Gv,CL", IDX_ParseModRM, IDX_UseModRM, 0, OP_SHLD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_Ib, OPTYPE_HARMLESS),
580 INVALID_OPCODE,
581 INVALID_OPCODE,
582 OP("push gs", IDX_ParseFixedReg, 0, 0, OP_PUSH, OP_PARM_REG_GS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
583 OP("pop gs", IDX_ParseFixedReg, 0, 0, OP_POP, OP_PARM_REG_GS, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
584 OP("rsm", 0, 0, 0, OP_RSM, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
585 OP("bts %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BTS, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
586 OP("shrd %Ev,%Gv,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_SHRD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_Ib, OPTYPE_HARMLESS),
587 OP("shrd %Ev,%Gv,CL", IDX_ParseModRM, IDX_UseModRM, IDX_ParseFixedReg,OP_SHRD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_REG_CL, OPTYPE_HARMLESS),
588 OP("Grp15", IDX_ParseGrp15, 0, 0, OP_GRP15, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
589 OP("imul %Gv,%Ev", IDX_ParseModRM, IDX_UseModRM, 0, OP_IMUL, OP_PARM_Gv, OP_PARM_Ev, OP_PARM_NONE, OPTYPE_HARMLESS),
590
591 /* b */
592 OP("cmpxchg %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMPXCHG, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
593 OP("cmpxchg %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_CMPXCHG, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
594 OP("lss %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LSS, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_RRM_DANGEROUS),
595 OP("btr %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BTR, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
596 OP("lfs %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LFS, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, OPTYPE_HARMLESS),
597 OP("lgs %Gv,%Mp", IDX_ParseModRM, IDX_UseModRM, 0, OP_LGS, OP_PARM_Gv, OP_PARM_Mp, OP_PARM_NONE, OPTYPE_HARMLESS),
598 OP("movzx %Gv,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVZX, OP_PARM_Gv, OP_PARM_Eb, OP_PARM_NONE, OPTYPE_HARMLESS),
599 OP("movzx %Gv,%Ew", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVZX, OP_PARM_Gv, OP_PARM_Ew, OP_PARM_NONE, OPTYPE_HARMLESS),
600 INVALID_OPCODE, /** @todo 0x0f 0xb8 popcnt Gv,Ev / jmpe */
601 OP("Grp10 Invalid Op", IDX_ParseGrp10, 0, 0, OP_GRP10_INV,OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
602 OP("Grp8", IDX_ParseGrp8, 0, 0, OP_GRP8, OP_PARM_Ev, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
603 OP("btc %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BTC, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
604 OP("bsf %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BSF, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
605 OP("bsr %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_BSR, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
606 OP("movsx %Gv,%Eb", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSX, OP_PARM_Gv, OP_PARM_Eb, OP_PARM_NONE, OPTYPE_HARMLESS),
607 OP("movsx %Gv,%Ew", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSX, OP_PARM_Gv, OP_PARM_Ew, OP_PARM_NONE, OPTYPE_HARMLESS),
608
609 /* c */
610 OP("xadd %Eb,%Gb", IDX_ParseModRM, IDX_UseModRM, 0, OP_XADD, OP_PARM_Eb, OP_PARM_Gb, OP_PARM_NONE, OPTYPE_HARMLESS),
611 OP("xadd %Ev,%Gv", IDX_ParseModRM, IDX_UseModRM, 0, OP_XADD, OP_PARM_Ev, OP_PARM_Gv, OP_PARM_NONE, OPTYPE_HARMLESS),
612 OP("cmpps %Vps,%Wps,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_CMPPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_Ib, OPTYPE_HARMLESS),
613 /* SSE2 */
614 OP("movnti %Ed,%Gd", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_MOVNTI, OP_PARM_Ed, OP_PARM_Gd, OP_PARM_NONE, OPTYPE_HARMLESS),
615 OP("pinsrw %Pq,%Ed,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PINSRW, OP_PARM_Pq, OP_PARM_Ed, OP_PARM_Ib, OPTYPE_HARMLESS),
616 OP("pextrw %Gd,%Pq,%Ib", IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PEXTRW, OP_PARM_Gd, OP_PARM_Pq, OP_PARM_Ib, OPTYPE_HARMLESS),
617 OP("shufps %Vps,%Wps,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_SHUFPS, OP_PARM_Vps, OP_PARM_Wps, OP_PARM_Ib, OPTYPE_HARMLESS),
618 OP("Grp9", IDX_ParseGrp9, 0, 0, OP_GRP9, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
619 OP("bswap EAX", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EAX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
620 OP("bswap ECX", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_ECX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
621 OP("bswap EDX", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EDX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
622 OP("bswap EBX", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EBX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
623 OP("bswap ESP", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_ESP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
624 OP("bswap EBP", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EBP, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
625 OP("bswap ESI", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_ESI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
626 OP("bswap EDI", IDX_ParseFixedReg, 0, 0, OP_BSWAP, OP_PARM_REG_EDI, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_REXB_EXTENDS_OPREG),
627
628 /* d */
629 INVALID_OPCODE, /** @todo 0x0f 0xd0 addsubpd/addsubps */
630 OP("psrlw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
631 OP("psrld %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
632 OP("psrlq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
633 OP("paddq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
634 OP("pmullw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULLW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
635 INVALID_OPCODE, /** @todo 0x0f 0xd7 pmovmskb/pmovmskb */
636 OP("pmovskb %Gd,%Pq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVSKB, OP_PARM_Gd, OP_PARM_Pq, OP_PARM_NONE, OPTYPE_HARMLESS),
637 OP("psubusb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBUSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
638 OP("psubusw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBUSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
639 OP("pminub %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINUB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
640 OP("pand %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAND, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
641 OP("paddusb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDUSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
642 OP("paddusw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDUSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
643 OP("pmaxub %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXUB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
644 OP("pandn %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PANDN, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
645
646 /* e */
647 OP("pavgn %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGN, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
648 OP("psraw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRAW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
649 OP("psrad %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRAD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
650 OP("pavgw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
651 OP("pmulhuw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHUW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
652 OP("pmulhw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
653 INVALID_OPCODE, /** @todo 0x0f 0xe6 cvtpd2dq// */
654 OP("movntq %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTQ, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, OPTYPE_HARMLESS),
655 OP("psubsb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
656 OP("psubsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
657 OP("pminsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
658 OP("por %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_POR, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
659 OP("paddsb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
660 OP("paddsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
661 OP("pmaxsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
662 OP("pxor %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PXOR, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
663
664 /* f */
665 INVALID_OPCODE, /** @todo 0x0f 0xf0 lddqu */
666 OP("psllw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSLLW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
667 OP("pslld %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSLLD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
668 OP("psllq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSSQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
669 OP("pmuludq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULUDQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
670 OP("paddwd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDWD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
671 OP("psadbw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADBW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
672 OP("maskmovq %Ppi,%Qpi", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMASKMOVQ, OP_PARM_Ppi, OP_PARM_Qpi, OP_PARM_NONE, OPTYPE_HARMLESS),
673 OP("psubb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
674 OP("psubw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
675 OP("psubd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
676 OP("psubq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
677 OP("paddb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
678 OP("paddw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
679 OP("paddd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
680 INVALID_OPCODE,
681};
682
683/* Two byte opcode map with prefix 0x66 */
684const OPCODE g_aTwoByteMapX86_PF66[256] =
685{
686 /* 0 */
687 INVALID_OPCODE_BLOCK
688
689 /* 1 */
690 OP("movupd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVUPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
691 OP("movupd %Wpd,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVUPD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, OPTYPE_HARMLESS),
692 OP("movlpd %Vq,%Ws", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVLPD, OP_PARM_Vq, OP_PARM_Ws, OP_PARM_NONE, OPTYPE_HARMLESS),
693 OP("movlpd %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVLPD, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
694 OP("unpcklpd %Vpd,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_UNPCKLPD,OP_PARM_Vpd, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
695 OP("unpckhpd %Vpd,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_UNPCKHPD,OP_PARM_Vpd, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
696 OP("movhpd %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVHPD, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
697 OP("movhpd %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVHPD, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, OPTYPE_HARMLESS),
698 INVALID_OPCODE,
699 INVALID_OPCODE,
700 INVALID_OPCODE,
701 INVALID_OPCODE,
702 INVALID_OPCODE,
703 INVALID_OPCODE,
704 INVALID_OPCODE,
705 INVALID_OPCODE,
706
707 /* 2 */
708 INVALID_OPCODE,
709 INVALID_OPCODE,
710 INVALID_OPCODE,
711 INVALID_OPCODE,
712 INVALID_OPCODE,
713 INVALID_OPCODE,
714 INVALID_OPCODE,
715 INVALID_OPCODE,
716 OP("movapd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVAPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
717 OP("movapd %Wpd,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVAPD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, OPTYPE_HARMLESS),
718 OP("cvtpi2pd %Vpd,%Qdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPI2PD,OP_PARM_Vpd, OP_PARM_Qdq, OP_PARM_NONE, OPTYPE_HARMLESS),
719 OP("movntpd %Wpd,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTPD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, OPTYPE_HARMLESS),
720 OP("cvttpd2pi %Qdq,%Wpd",IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTPD2PI,OP_PARM_Qdq, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
721 OP("cvtpd2pi %Qdq,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPD2PI,OP_PARM_Qdq, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
722 OP("ucomisd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_UCOMISD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
723 OP("comisd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_COMISD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
724
725 /* 3 */
726 INVALID_OPCODE,
727 INVALID_OPCODE,
728 INVALID_OPCODE,
729 INVALID_OPCODE,
730 INVALID_OPCODE,
731 INVALID_OPCODE,
732 INVALID_OPCODE,
733 INVALID_OPCODE,
734 OP("3 byte escape A4", IDX_ParseThreeByteEsc4,0, 0, OP_3B_ESC4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
735 INVALID_OPCODE,
736 OP("3 byte escape A5", IDX_ParseThreeByteEsc5,0, 0, OP_3B_ESC5, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
737 INVALID_OPCODE,
738 INVALID_OPCODE,
739 INVALID_OPCODE,
740 INVALID_OPCODE,
741 INVALID_OPCODE,
742
743 /* 4 */
744 INVALID_OPCODE_BLOCK
745
746 /* 5 */
747 OP("movmskpd %Ed,%Vpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVMSKPD,OP_PARM_Ed, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
748 OP("sqrtpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_SQRTPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
749 INVALID_OPCODE,
750 INVALID_OPCODE,
751 OP("andpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ANDPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
752 OP("andnpd %Vps,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ANDNPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
753 OP("orpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ORPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
754 OP("xorpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_XORPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
755 OP("addpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADDPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
756 OP("mulpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MULPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
757 OP("cvtpd2ps %Vps,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPD2PS,OP_PARM_Vps, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
758 OP("cvtps2dq %Vpq,%Wps", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPS2DQ,OP_PARM_Vpq, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
759 OP("subpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUBPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
760 OP("minpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MINPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
761 OP("divpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_DIVPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
762 OP("maxpd %Vpd,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MAXPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
763
764 /* 6 */
765 OP("punpcklbw %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLBW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
766 OP("punpcklwd %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLWD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
767 OP("punpckldq %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLDQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
768 OP("packsswb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKSSWB,OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
769 OP("pcmpgtb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
770 OP("pcmpgtw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
771 OP("pcmpgtd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPGTD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
772 OP("packuswb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKUSWB,OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
773 OP("punpckhbw %Pdq,%Qdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHBW, OP_PARM_Pdq, OP_PARM_Qdq, OP_PARM_NONE, OPTYPE_HARMLESS),
774 OP("punpckhwd %Pdq,%Qdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHWD, OP_PARM_Pdq, OP_PARM_Qdq, OP_PARM_NONE, OPTYPE_HARMLESS),
775 OP("punpckhdq %Pdq,%Qdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHDQ, OP_PARM_Pdq, OP_PARM_Qdq, OP_PARM_NONE, OPTYPE_HARMLESS),
776 OP("packssdw %Pdq,%Qdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PACKSSDW,OP_PARM_Pdq, OP_PARM_Qdq, OP_PARM_NONE, OPTYPE_HARMLESS),
777 OP("punpcklqdq %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKLQDQ,OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
778 OP("punpckhqd %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PUNPCKHQD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
779 OP("movd %Vdq,%Ed", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVD, OP_PARM_Vdq, OP_PARM_Ed, OP_PARM_NONE, OPTYPE_HARMLESS),
780 OP("movdqa %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQA, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
781
782 /* 7 */
783 OP("pshufd %Vdq,%Wdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PSHUFD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, OPTYPE_HARMLESS),
784 INVALID_OPCODE,
785 INVALID_OPCODE,
786 INVALID_OPCODE,
787 OP("pcmpeqb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQB, OP_PARM_Vdq, OP_PARM_Vdq, OP_PARM_NONE, OPTYPE_HARMLESS),
788 OP("pcmpeqw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQW, OP_PARM_Vdq, OP_PARM_Vdq, OP_PARM_NONE, OPTYPE_HARMLESS),
789 OP("pcmpeqd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PCMPEQD, OP_PARM_Vdq, OP_PARM_Vdq, OP_PARM_NONE, OPTYPE_HARMLESS),
790 INVALID_OPCODE,
791 OP("vmread %Ed,%Gd", IDX_ParseModRM, IDX_UseModRM, 0, OP_VMREAD, OP_PARM_Ed, OP_PARM_Gd, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
792 OP("vmwrite %Gd,%Ed", IDX_ParseModRM, IDX_UseModRM, 0, OP_VMWRITE, OP_PARM_Gd, OP_PARM_Ed, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
793 INVALID_OPCODE,
794 INVALID_OPCODE,
795 INVALID_OPCODE,
796 INVALID_OPCODE,
797 OP("movd %Ed,%Vdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVD, OP_PARM_Ed, OP_PARM_Vdq, OP_PARM_NONE, OPTYPE_HARMLESS),
798 OP("movdqa %Qq,%Pq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQA, OP_PARM_Wdq, OP_PARM_Vdq, OP_PARM_NONE, OPTYPE_HARMLESS),
799
800 /* 8 */
801 INVALID_OPCODE_BLOCK
802
803 /* 9 */
804 INVALID_OPCODE_BLOCK
805
806 /* a */
807 INVALID_OPCODE_BLOCK
808
809 /* b */
810 INVALID_OPCODE_BLOCK
811
812 /* c */
813 INVALID_OPCODE,
814 INVALID_OPCODE,
815 OP("cmppd %Vpd,%Wpd,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_CMPPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_Ib, OPTYPE_HARMLESS),
816 INVALID_OPCODE,
817 OP("pinsrw %Vdq,%Ed,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PINSRW, OP_PARM_Vdq, OP_PARM_Ed, OP_PARM_Ib, OPTYPE_HARMLESS),
818 OP("pextrw %Gd,%Vdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PEXTRW, OP_PARM_Gd, OP_PARM_Vdq, OP_PARM_Ib, OPTYPE_HARMLESS),
819 OP("shufpd %Vpd,%Wpd,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_SHUFPD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_Ib, OPTYPE_HARMLESS),
820 INVALID_OPCODE,
821 INVALID_OPCODE,
822 INVALID_OPCODE,
823 INVALID_OPCODE,
824 INVALID_OPCODE,
825 INVALID_OPCODE,
826 INVALID_OPCODE,
827 INVALID_OPCODE,
828 INVALID_OPCODE,
829
830 /* d */
831 INVALID_OPCODE,
832 OP("psrlw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
833 OP("psrld %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
834 OP("psrlq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRLQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
835 OP("paddq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
836 OP("pmullw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULLW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
837 OP("movq %Wq,%Vq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ, OP_PARM_Wq, OP_PARM_Vq, OP_PARM_NONE, OPTYPE_HARMLESS),
838 OP("pmovskb %Gd,%Vdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMOVSKB, OP_PARM_Gd, OP_PARM_Vdq, OP_PARM_NONE, OPTYPE_HARMLESS),
839 OP("psubusb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBUSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
840 OP("psubusw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBUSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
841 OP("pminub %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINUB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
842 OP("pand %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAND, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
843 OP("paddusb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDUSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
844 OP("paddusw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDUSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
845 OP("pmaxub %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXUB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
846 OP("pandn %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PANDN, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
847
848 /* e */
849 OP("pavgn %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGN, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
850 OP("psraw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRAW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
851 OP("psrad %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSRAD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
852 OP("pavgw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
853 OP("pmulhuw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHUW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
854 OP("pmulhw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
855 OP("cvttpd2dq %Vdq,%Wpd",IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTPD2DQ,OP_PARM_Vdq, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
856 OP("movntdq %Wdq,%Vdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVNTDQ, OP_PARM_Wdq, OP_PARM_Vdq, OP_PARM_NONE, OPTYPE_HARMLESS),
857 OP("psubsb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
858 OP("psubsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
859 OP("pminsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMINSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
860 OP("por %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_POR, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
861 OP("paddsb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
862 OP("paddsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
863 OP("pmaxsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMAXSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
864 OP("pxor %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PXOR, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
865
866 /* f */
867 INVALID_OPCODE,
868 OP("psllw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSLLW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
869 OP("pslld %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSLLD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
870 OP("psllq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSSQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
871 OP("pmuludq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULUDQ, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
872 OP("paddwd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDWD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
873 OP("psadbw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADBW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
874 OP("maskmovdqu %Vdq,%Wdq",IDX_ParseModRM, IDX_UseModRM, 0, OP_PMASKMOVDQU, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
875 OP("psubb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
876 OP("psubw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
877 OP("psubd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
878 OP("psubq %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSUBD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
879 OP("paddb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
880 OP("paddw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
881 OP("paddd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PADDD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
882 INVALID_OPCODE,
883};
884
885/* Two byte opcode map with prefix 0xF2 */
886const OPCODE g_aTwoByteMapX86_PFF2[256] =
887{
888 /* 0 */
889 INVALID_OPCODE_BLOCK
890
891 /* 1 */
892 OP("movsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSD, OP_PARM_Vpd, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
893 OP("movsd %Wsd,%Vsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSD, OP_PARM_Wpd, OP_PARM_Vpd, OP_PARM_NONE, OPTYPE_HARMLESS),
894 INVALID_OPCODE,
895 INVALID_OPCODE,
896 INVALID_OPCODE,
897 INVALID_OPCODE,
898 INVALID_OPCODE,
899 INVALID_OPCODE,
900 INVALID_OPCODE,
901 INVALID_OPCODE,
902 INVALID_OPCODE,
903 INVALID_OPCODE,
904 INVALID_OPCODE,
905 INVALID_OPCODE,
906 INVALID_OPCODE,
907 INVALID_OPCODE,
908
909 /* 2 */
910 INVALID_OPCODE,
911 INVALID_OPCODE,
912 INVALID_OPCODE,
913 INVALID_OPCODE,
914 INVALID_OPCODE,
915 INVALID_OPCODE,
916 INVALID_OPCODE,
917 INVALID_OPCODE,
918 INVALID_OPCODE,
919 INVALID_OPCODE,
920 OP("cvtsi2sd %Vsd,%Ed", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSI2SD,OP_PARM_Vsd, OP_PARM_Ed, OP_PARM_NONE, OPTYPE_HARMLESS),
921 INVALID_OPCODE,
922 OP("cvttsd2si %Gd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTSD2SI,OP_PARM_Gd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
923 OP("cvtsd2si %Gd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSD2SI,OP_PARM_Gd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
924 INVALID_OPCODE,
925 INVALID_OPCODE,
926
927 /* 3 */
928 INVALID_OPCODE,
929 INVALID_OPCODE,
930 INVALID_OPCODE,
931 INVALID_OPCODE,
932 INVALID_OPCODE,
933 INVALID_OPCODE,
934 INVALID_OPCODE,
935 INVALID_OPCODE,
936 OP("3 byte escape A4", IDX_ParseThreeByteEsc4,0, 0, OP_3B_ESC4, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
937 INVALID_OPCODE,
938 INVALID_OPCODE,
939 INVALID_OPCODE,
940 INVALID_OPCODE,
941 INVALID_OPCODE,
942 INVALID_OPCODE,
943 INVALID_OPCODE,
944
945 /* 4 */
946 INVALID_OPCODE_BLOCK
947
948 /* 5 */
949 INVALID_OPCODE,
950 OP("sqrtsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_SQRTSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
951 INVALID_OPCODE,
952 INVALID_OPCODE,
953 INVALID_OPCODE,
954 INVALID_OPCODE,
955 INVALID_OPCODE,
956 INVALID_OPCODE,
957 OP("addsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADDSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
958 OP("mulsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MULSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
959 OP("cvtsd2ss %Vss,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSD2SS,OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
960 INVALID_OPCODE,
961 OP("subsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUBSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
962 OP("minsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MINSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
963 OP("divsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_DIVSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
964 OP("maxsd %Vsd,%Wsd", IDX_ParseModRM, IDX_UseModRM, 0, OP_MAXSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_NONE, OPTYPE_HARMLESS),
965
966 /* 6 */
967 INVALID_OPCODE_BLOCK
968
969 /* 7 */
970 OP("pshuflw %Vdq,%Wdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PSHUFLW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, OPTYPE_HARMLESS),
971 INVALID_OPCODE,
972 INVALID_OPCODE,
973 INVALID_OPCODE,
974 INVALID_OPCODE,
975 INVALID_OPCODE,
976 INVALID_OPCODE,
977 INVALID_OPCODE,
978 INVALID_OPCODE,
979 INVALID_OPCODE,
980 INVALID_OPCODE,
981 INVALID_OPCODE,
982 INVALID_OPCODE,
983 INVALID_OPCODE,
984 INVALID_OPCODE,
985 INVALID_OPCODE,
986
987 /* 8 */
988 INVALID_OPCODE_BLOCK
989
990 /* 9 */
991 INVALID_OPCODE_BLOCK
992
993 /* a */
994 INVALID_OPCODE_BLOCK
995
996 /* b */
997 INVALID_OPCODE_BLOCK
998
999 /* c */
1000 INVALID_OPCODE,
1001 INVALID_OPCODE,
1002 OP("cmpsd %Vsd,%Wsd,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte, OP_CMPSD, OP_PARM_Vsd, OP_PARM_Wsd, OP_PARM_Ib, OPTYPE_HARMLESS),
1003 INVALID_OPCODE,
1004 INVALID_OPCODE,
1005 INVALID_OPCODE,
1006 INVALID_OPCODE,
1007 INVALID_OPCODE,
1008 INVALID_OPCODE,
1009 INVALID_OPCODE,
1010 INVALID_OPCODE,
1011 INVALID_OPCODE,
1012 INVALID_OPCODE,
1013 INVALID_OPCODE,
1014 INVALID_OPCODE,
1015 INVALID_OPCODE,
1016
1017 /* d */
1018 INVALID_OPCODE,
1019 INVALID_OPCODE,
1020 INVALID_OPCODE,
1021 INVALID_OPCODE,
1022 INVALID_OPCODE,
1023 INVALID_OPCODE,
1024 OP("movdq2q %Pq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQ2Q, OP_PARM_Pq, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
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
1035 /* e */
1036 INVALID_OPCODE,
1037 INVALID_OPCODE,
1038 INVALID_OPCODE,
1039 INVALID_OPCODE,
1040 INVALID_OPCODE,
1041 INVALID_OPCODE,
1042 OP("cvtpd2dq %Vdq,%Wpd", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTPD2DQ,OP_PARM_Vdq, OP_PARM_Wpd, OP_PARM_NONE, OPTYPE_HARMLESS),
1043 INVALID_OPCODE,
1044 INVALID_OPCODE,
1045 INVALID_OPCODE,
1046 INVALID_OPCODE,
1047 INVALID_OPCODE,
1048 INVALID_OPCODE,
1049 INVALID_OPCODE,
1050 INVALID_OPCODE,
1051 INVALID_OPCODE,
1052
1053 /* f */
1054 INVALID_OPCODE_BLOCK
1055};
1056
1057
1058/* Two byte opcode map with prefix 0xF3 */
1059const OPCODE g_aTwoByteMapX86_PFF3[256] =
1060{
1061 /* 0 */
1062 INVALID_OPCODE_BLOCK
1063
1064 /* 1 */
1065 OP("movss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1066 OP("movss %Wss,%Vss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVSS, OP_PARM_Wss, OP_PARM_Vss, OP_PARM_NONE, OPTYPE_HARMLESS),
1067 INVALID_OPCODE,
1068 INVALID_OPCODE,
1069 INVALID_OPCODE,
1070 INVALID_OPCODE,
1071 INVALID_OPCODE,
1072 INVALID_OPCODE,
1073 INVALID_OPCODE,
1074 INVALID_OPCODE,
1075 INVALID_OPCODE,
1076 INVALID_OPCODE,
1077 INVALID_OPCODE,
1078 INVALID_OPCODE,
1079 INVALID_OPCODE,
1080 INVALID_OPCODE,
1081
1082 /* 2 */
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 INVALID_OPCODE,
1092 INVALID_OPCODE,
1093 OP("cvtsi2ss %Vss,%Ed", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSI2SS,OP_PARM_Vss, OP_PARM_Ed, OP_PARM_NONE, OPTYPE_HARMLESS),
1094 INVALID_OPCODE,
1095 OP("cvttss2si %Gd,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTSS2SI,OP_PARM_Gd, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1096 OP("cvtss2si %Gd,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSS2SI,OP_PARM_Gd, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1097 INVALID_OPCODE,
1098 INVALID_OPCODE,
1099
1100 /* 3 */
1101 INVALID_OPCODE_BLOCK
1102
1103 /* 4 */
1104 INVALID_OPCODE_BLOCK
1105
1106 /* 5 */
1107 INVALID_OPCODE,
1108 OP("sqrtss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_SQRTSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1109 OP("rsqrtss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_RSQRTSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1110 INVALID_OPCODE,
1111 INVALID_OPCODE,
1112 INVALID_OPCODE,
1113 INVALID_OPCODE,
1114 INVALID_OPCODE,
1115 OP("addss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_ADDSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1116 OP("mulss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MULSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1117 //??
1118 OP("cvtss2sd %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTSD2SS,OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1119 OP("cvttps2dq %Vdq,%Wps",IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTTPS2DQ,OP_PARM_Vdq, OP_PARM_Wps, OP_PARM_NONE, OPTYPE_HARMLESS),
1120 OP("subss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_SUBSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1121 OP("minss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MINSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1122 OP("divss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_DIVSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1123 OP("maxss %Vss,%Wss", IDX_ParseModRM, IDX_UseModRM, 0, OP_MAXSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_NONE, OPTYPE_HARMLESS),
1124
1125 /* 6 */
1126 INVALID_OPCODE,
1127 INVALID_OPCODE,
1128 INVALID_OPCODE,
1129 INVALID_OPCODE,
1130 INVALID_OPCODE,
1131 INVALID_OPCODE,
1132 INVALID_OPCODE,
1133 INVALID_OPCODE,
1134 INVALID_OPCODE,
1135 INVALID_OPCODE,
1136 INVALID_OPCODE,
1137 INVALID_OPCODE,
1138 INVALID_OPCODE,
1139 INVALID_OPCODE,
1140 INVALID_OPCODE,
1141 OP("movdqu %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQU, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1142
1143 /* 7 */
1144 OP("pshufhw %Vdq,%Wdq,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_PSHUFHW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_Ib, OPTYPE_HARMLESS),
1145 INVALID_OPCODE,
1146 INVALID_OPCODE,
1147 INVALID_OPCODE,
1148 INVALID_OPCODE,
1149 INVALID_OPCODE,
1150 INVALID_OPCODE,
1151 INVALID_OPCODE,
1152 INVALID_OPCODE,
1153 INVALID_OPCODE,
1154 INVALID_OPCODE,
1155 INVALID_OPCODE,
1156 INVALID_OPCODE,
1157 INVALID_OPCODE,
1158 OP("movq %Vq,%Wq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ, OP_PARM_Vq, OP_PARM_Wq, OP_PARM_NONE, OPTYPE_HARMLESS),
1159 OP("movdqu %Wdq,%Vdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVDQU, OP_PARM_Wdq, OP_PARM_Vdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1160
1161 /* 8 */
1162 INVALID_OPCODE_BLOCK
1163
1164 /* 9 */
1165 INVALID_OPCODE_BLOCK
1166
1167 /* a */
1168 INVALID_OPCODE_BLOCK
1169
1170 /* b */
1171 INVALID_OPCODE_BLOCK
1172
1173 /* c */
1174 INVALID_OPCODE,
1175 INVALID_OPCODE,
1176 OP("cmpss %Vss,%Wss,%Ib",IDX_ParseModRM, IDX_UseModRM, IDX_ParseImmByte,OP_CMPSS, OP_PARM_Vss, OP_PARM_Wss, OP_PARM_Ib, OPTYPE_HARMLESS),
1177 INVALID_OPCODE,
1178 INVALID_OPCODE,
1179 INVALID_OPCODE,
1180 INVALID_OPCODE,
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
1191 /* d */
1192 INVALID_OPCODE,
1193 INVALID_OPCODE,
1194 INVALID_OPCODE,
1195 INVALID_OPCODE,
1196 INVALID_OPCODE,
1197 INVALID_OPCODE,
1198 OP("movq2dq %Vdq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_MOVQ2DQ, OP_PARM_Vdq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1199 INVALID_OPCODE,
1200 INVALID_OPCODE,
1201 INVALID_OPCODE,
1202 INVALID_OPCODE,
1203 INVALID_OPCODE,
1204 INVALID_OPCODE,
1205 INVALID_OPCODE,
1206 INVALID_OPCODE,
1207 INVALID_OPCODE,
1208
1209 /* e */
1210 INVALID_OPCODE,
1211 INVALID_OPCODE,
1212 INVALID_OPCODE,
1213 INVALID_OPCODE,
1214 INVALID_OPCODE,
1215 INVALID_OPCODE,
1216 OP("cvtdq2pd %Vpd,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_CVTDQ2PD,OP_PARM_Vpd, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1217 INVALID_OPCODE,
1218 INVALID_OPCODE,
1219 INVALID_OPCODE,
1220 INVALID_OPCODE,
1221 INVALID_OPCODE,
1222 INVALID_OPCODE,
1223 INVALID_OPCODE,
1224 INVALID_OPCODE,
1225 INVALID_OPCODE,
1226
1227 /* f */
1228 INVALID_OPCODE_BLOCK
1229};
1230
1231/** Three byte opcode map (0xF 0x38 0x0x) */
1232const OPCODE g_aThreeByteMapX86_0F38_0[16] =
1233{
1234 /* 0 */
1235 OP("pshufb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSHUFB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1236 OP("phaddw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1237 OP("phaddd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1238 OP("phaddsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1239 OP("pmaddubsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMADDUBSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1240 OP("phsubw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1241 OP("phsubd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1242 OP("phsubsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1243 OP("psignb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGNB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1244 OP("psignw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGNW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1245 OP("psignd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGND, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1246 OP("pmulhrsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHRSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1247 INVALID_OPCODE,
1248 INVALID_OPCODE,
1249 INVALID_OPCODE,
1250 INVALID_OPCODE,
1251};
1252
1253/** Three byte opcode map (0x0F 0x38 0x1x) */
1254const OPCODE g_aThreeByteMapX86_0F38_1[16] =
1255{
1256 /* 1 */
1257 INVALID_OPCODE,
1258 INVALID_OPCODE,
1259 INVALID_OPCODE,
1260 INVALID_OPCODE,
1261 INVALID_OPCODE,
1262 INVALID_OPCODE,
1263 INVALID_OPCODE,
1264 INVALID_OPCODE,
1265 INVALID_OPCODE,
1266 INVALID_OPCODE,
1267 INVALID_OPCODE,
1268 INVALID_OPCODE,
1269 OP("pabsb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1270 OP("pabsw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1271 OP("pabsd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1272 INVALID_OPCODE,
1273};
1274
1275/* These tables are mostly sparse, so use another level of indirection to save space. */
1276const OPCODE *g_apThreeByteMapX86_0F38[16] =
1277{
1278 /* 0 */
1279 &g_aThreeByteMapX86_0F38_0[0],
1280
1281 /* 1 */
1282 &g_aThreeByteMapX86_0F38_1[0],
1283
1284 /* 2 */
1285 NULL,
1286
1287 /* 3 */
1288 NULL,
1289
1290 /* 4 */
1291 NULL,
1292
1293 /* 5 */
1294 NULL,
1295
1296 /* 6 */
1297 NULL,
1298
1299 /* 7 */
1300 NULL,
1301
1302 /* 8 */
1303 NULL,
1304
1305 /* 9 */
1306 NULL,
1307
1308 /* a */
1309 NULL,
1310
1311 /* b */
1312 NULL,
1313
1314 /* c */
1315 NULL,
1316
1317 /* d */
1318 NULL,
1319
1320 /* e */
1321 NULL,
1322
1323 /* f */
1324 NULL,
1325};
1326
1327/** Three byte opcode map (0x66 0x0F 0x38 0x0x) */
1328const OPCODE g_aThreeByteMapX86_660F38_0[16] =
1329{
1330 /* 0 */
1331 OP("pshufb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSHUFB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1332 OP("phaddw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1333 OP("phaddd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1334 OP("phaddsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHADDSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1335 OP("pmaddubsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMADDUBSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1336 OP("phsubw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1337 OP("phsubd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1338 OP("phsubsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PHSUBSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1339 OP("psignb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGNB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1340 OP("psignw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGNW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1341 OP("psignd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PSIGND, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1342 OP("pmulhrsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PMULHRSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1343 INVALID_OPCODE,
1344 INVALID_OPCODE,
1345 INVALID_OPCODE,
1346 INVALID_OPCODE,
1347};
1348
1349/** Three byte opcode map (0x66 0x0F 0x38 0x1x) */
1350const OPCODE g_aThreeByteMapX86_660F38_1[16] =
1351{
1352 /* 1 */
1353 OP("pblendvb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PBLENDVB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1354 INVALID_OPCODE,
1355 INVALID_OPCODE,
1356 INVALID_OPCODE,
1357 OP("blendvps %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_BLENDVPS, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1358 OP("blendvpd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_BLENDVPD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1359 INVALID_OPCODE,
1360 OP("ptest %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PTEST, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1361 INVALID_OPCODE,
1362 INVALID_OPCODE,
1363 INVALID_OPCODE,
1364 INVALID_OPCODE,
1365 OP("pabsb %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSB, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1366 OP("pabsw %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSW, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1367 OP("pabsd %Vdq,%Wdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PABSD, OP_PARM_Vdq, OP_PARM_Wdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1368 INVALID_OPCODE,
1369};
1370
1371/** @todo remainder missing (too lazy now) */
1372
1373/** Three byte opcode map (0x66 0x0F 0x38 0x8x) */
1374const OPCODE g_aThreeByteMapX86_660F38_8[16] =
1375{
1376 /* 8 */
1377 OP("invept %Gd,%Mdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_INVEPT, OP_PARM_Gd, OP_PARM_Mdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1378 OP("invvpid %Gd,%Mdq", IDX_ParseModRM, IDX_UseModRM, 0, OP_INVEPT, OP_PARM_Gd, OP_PARM_Mdq, OP_PARM_NONE, OPTYPE_HARMLESS),
1379 INVALID_OPCODE,
1380 INVALID_OPCODE,
1381 INVALID_OPCODE,
1382 INVALID_OPCODE,
1383 INVALID_OPCODE,
1384 INVALID_OPCODE,
1385 INVALID_OPCODE,
1386 INVALID_OPCODE,
1387 INVALID_OPCODE,
1388 INVALID_OPCODE,
1389 INVALID_OPCODE,
1390 INVALID_OPCODE,
1391 INVALID_OPCODE,
1392 INVALID_OPCODE,
1393};
1394
1395/** Three byte opcode map with prefix 0x66 (0xF 0x38) */
1396const OPCODE *g_apThreeByteMapX86_660F38[16] =
1397{
1398 /* 0 */
1399 &g_aThreeByteMapX86_660F38_0[0],
1400
1401 /* 1 */
1402 &g_aThreeByteMapX86_660F38_1[0],
1403
1404 /* 2 */
1405 NULL,
1406
1407 /* 3 */
1408 NULL,
1409
1410 /* 4 */
1411 NULL,
1412
1413 /* 5 */
1414 NULL,
1415
1416 /* 6 */
1417 NULL,
1418
1419 /* 7 */
1420 NULL,
1421
1422 /* 8 */
1423 &g_aThreeByteMapX86_660F38_8[0],
1424
1425 /* 9 */
1426 NULL,
1427
1428 /* a */
1429 NULL,
1430
1431 /* b */
1432 NULL,
1433
1434 /* c */
1435 NULL,
1436
1437 /* d */
1438 NULL,
1439
1440 /* e */
1441 NULL,
1442
1443 /* f */
1444 NULL,
1445};
1446
1447/** Three byte opcode map with prefix 0xF2 (0xF 0x38) */
1448/** @todo remainder missing (too lazy now) */
1449const OPCODE *g_apThreeByteMapX86_F20F38[16] =
1450{
1451 /* 0 */
1452 NULL,
1453
1454 /* 1 */
1455 NULL,
1456
1457 /* 2 */
1458 NULL,
1459
1460 /* 3 */
1461 NULL,
1462
1463 /* 4 */
1464 NULL,
1465
1466 /* 5 */
1467 NULL,
1468
1469 /* 6 */
1470 NULL,
1471
1472 /* 7 */
1473 NULL,
1474
1475 /* 8 */
1476 NULL,
1477
1478 /* 9 */
1479 NULL,
1480
1481 /* a */
1482 NULL,
1483
1484 /* b */
1485 NULL,
1486
1487 /* c */
1488 NULL,
1489
1490 /* d */
1491 NULL,
1492
1493 /* e */
1494 NULL,
1495
1496 /* f */
1497 NULL,
1498};
1499
1500/** Three byte opcode map with prefix 0x66 (0xF 0x3A) */
1501/** @todo remainder missing (too lazy now) */
1502const OPCODE *g_apThreeByteMapX86_660F3A[16] =
1503{
1504 /* 0 */
1505 NULL,
1506
1507 /* 1 */
1508 NULL,
1509
1510 /* 2 */
1511 NULL,
1512
1513 /* 3 */
1514 NULL,
1515
1516 /* 4 */
1517 NULL,
1518
1519 /* 5 */
1520 NULL,
1521
1522 /* 6 */
1523 NULL,
1524
1525 /* 7 */
1526 NULL,
1527
1528 /* 8 */
1529 NULL,
1530
1531 /* 9 */
1532 NULL,
1533
1534 /* a */
1535 NULL,
1536
1537 /* b */
1538 NULL,
1539
1540 /* c */
1541 NULL,
1542
1543 /* d */
1544 NULL,
1545
1546 /* e */
1547 NULL,
1548
1549 /* f */
1550 NULL,
1551};
1552
1553/* 3DNow! map (0x0F 0x0F prefix) */
1554const OPCODE g_aTwoByteMapX86_3DNow[256] =
1555{
1556 /* 0 */
1557 INVALID_OPCODE,
1558 INVALID_OPCODE,
1559 INVALID_OPCODE,
1560 INVALID_OPCODE,
1561 INVALID_OPCODE,
1562 INVALID_OPCODE,
1563 INVALID_OPCODE,
1564 INVALID_OPCODE,
1565 INVALID_OPCODE,
1566 INVALID_OPCODE,
1567 INVALID_OPCODE,
1568 OP("pi2fw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PI2FW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1569 OP("pi2fd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PI2FD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1570 INVALID_OPCODE,
1571 INVALID_OPCODE,
1572
1573 /* 1 */
1574 INVALID_OPCODE,
1575 INVALID_OPCODE,
1576 INVALID_OPCODE,
1577 INVALID_OPCODE,
1578 INVALID_OPCODE,
1579 INVALID_OPCODE,
1580 INVALID_OPCODE,
1581 INVALID_OPCODE,
1582 INVALID_OPCODE,
1583 INVALID_OPCODE,
1584 INVALID_OPCODE,
1585 OP("pf2iw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PF2IW, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1586 OP("pf2id %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PF2ID, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1587 INVALID_OPCODE,
1588 INVALID_OPCODE,
1589
1590 /* 2 */
1591 INVALID_OPCODE_BLOCK
1592
1593 /* 3 */
1594 INVALID_OPCODE_BLOCK
1595
1596 /* 4 */
1597 INVALID_OPCODE_BLOCK
1598
1599 /* 5 */
1600 INVALID_OPCODE_BLOCK
1601
1602 /* 6 */
1603 INVALID_OPCODE_BLOCK
1604
1605 /* 7 */
1606 INVALID_OPCODE_BLOCK
1607
1608 /* 8 */
1609 INVALID_OPCODE,
1610 INVALID_OPCODE,
1611 INVALID_OPCODE,
1612 INVALID_OPCODE,
1613 INVALID_OPCODE,
1614 INVALID_OPCODE,
1615 INVALID_OPCODE,
1616 INVALID_OPCODE,
1617 INVALID_OPCODE,
1618 INVALID_OPCODE,
1619 OP("pfnacc %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFNACC, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1620 INVALID_OPCODE,
1621 INVALID_OPCODE,
1622 INVALID_OPCODE,
1623 OP("pfpnacc %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFPNACC, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1624 INVALID_OPCODE,
1625
1626 /* 9 */
1627 OP("pfcmpge %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFCMPGE, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1628 INVALID_OPCODE,
1629 INVALID_OPCODE,
1630 INVALID_OPCODE,
1631 OP("pfmin %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFMIN, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1632 INVALID_OPCODE,
1633 OP("pfrcp %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRCP, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1634 OP("pfrsqrt %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRSQRT, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1635 INVALID_OPCODE,
1636 INVALID_OPCODE,
1637 OP("pfsub %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFSUB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1638 INVALID_OPCODE,
1639 INVALID_OPCODE,
1640 INVALID_OPCODE,
1641 OP("pfadd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFADD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1642 INVALID_OPCODE,
1643
1644 /* a */
1645 OP("pfcmpgt %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFCMPGT, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1646 INVALID_OPCODE,
1647 INVALID_OPCODE,
1648 INVALID_OPCODE,
1649 OP("pfmax %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFMAX, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1650 INVALID_OPCODE,
1651 OP("pfrcpit1 %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRCPIT1,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1652 OP("pfrsqrtit1 %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRSQRTIT1, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1653 INVALID_OPCODE,
1654 INVALID_OPCODE,
1655 OP("pfsubr %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFSUBR, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1656 INVALID_OPCODE,
1657 INVALID_OPCODE,
1658 INVALID_OPCODE,
1659 OP("pfacc %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFACC, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1660 INVALID_OPCODE,
1661
1662 /* b */
1663 OP("pfcmpeq %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFCMPEQ, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1664 INVALID_OPCODE,
1665 INVALID_OPCODE,
1666 INVALID_OPCODE,
1667 OP("pfmul %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFMUL, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1668 INVALID_OPCODE,
1669 OP("pfrcpit2 %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFRCPIT2,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1670 OP("pfmulhrw %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFMULHRW,OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1671 INVALID_OPCODE,
1672 INVALID_OPCODE,
1673 INVALID_OPCODE,
1674 OP("pswapd %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PFSWAPD, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1675 INVALID_OPCODE,
1676 INVALID_OPCODE,
1677 INVALID_OPCODE,
1678 OP("pavgusb %Pq,%Qq", IDX_ParseModRM, IDX_UseModRM, 0, OP_PAVGUSB, OP_PARM_Pq, OP_PARM_Qq, OP_PARM_NONE, OPTYPE_HARMLESS),
1679
1680 /* c */
1681 INVALID_OPCODE_BLOCK
1682
1683 /* d */
1684 INVALID_OPCODE_BLOCK
1685
1686 /* e */
1687 INVALID_OPCODE_BLOCK
1688
1689 /* f */
1690 INVALID_OPCODE_BLOCK
1691};
1692
1693
1694
1695/* Floating point opcode starting with escape byte 0xD8 (values 0-0xBF)*/
1696const OPCODE g_aMapX86_EscF0_Low[8] =
1697{
1698 /* 0 */
1699 OP("fadd %Md", IDX_ParseModRM, 0, 0, OP_FADD, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1700 OP("fmul %Md", IDX_ParseModRM, 0, 0, OP_FMUL, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1701 OP("fcom %Md", IDX_ParseModRM, 0, 0, OP_FCOM, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1702 OP("fcomp %Md", IDX_ParseModRM, 0, 0, OP_FCOMP, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1703 OP("fsub %Md", IDX_ParseModRM, 0, 0, OP_FSUB, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1704 OP("fsubr %Md", IDX_ParseModRM, 0, 0, OP_FSUBR, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1705 OP("fdiv %Md", IDX_ParseModRM, 0, 0, OP_FDIV, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1706 OP("fdivr %Md", IDX_ParseModRM, 0, 0, OP_FDIVR, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1707};
1708
1709/* Floating point opcode starting with escape byte 0xD8 (outside 0-0xBF)*/
1710const OPCODE g_aMapX86_EscF0_High[16*4] =
1711{
1712 /* c */
1713 OP("fadd ST(0),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1714 OP("fadd ST(0),ST(1)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1715 OP("fadd ST(0),ST(2)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1716 OP("fadd ST(0),ST(3)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1717 OP("fadd ST(0),ST(4)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1718 OP("fadd ST(0),ST(5)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1719 OP("fadd ST(0),ST(6)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1720 OP("fadd ST(0),ST(7)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1721 OP("fmul ST(0),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1722 OP("fmul ST(0),ST(1)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1723 OP("fmul ST(0),ST(2)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1724 OP("fmul ST(0),ST(3)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1725 OP("fmul ST(0),ST(4)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1726 OP("fmul ST(0),ST(5)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1727 OP("fmul ST(0),ST(6)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1728 OP("fmul ST(0),ST(7)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1729
1730 /* d */
1731 OP("fcom ST(0),ST(0)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1732 OP("fcom ST(0),ST(1)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1733 OP("fcom ST(0),ST(2)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1734 OP("fcom ST(0),ST(3)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1735 OP("fcom ST(0),ST(4)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1736 OP("fcom ST(0),ST(5)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1737 OP("fcom ST(0),ST(6)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1738 OP("fcom ST(0),ST(7)", 0, 0, 0, OP_FCOM, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1739 OP("fcomp ST(0),ST(0)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1740 OP("fcomp ST(0),ST(1)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1741 OP("fcomp ST(0),ST(2)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1742 OP("fcomp ST(0),ST(3)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1743 OP("fcomp ST(0),ST(4)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1744 OP("fcomp ST(0),ST(5)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1745 OP("fcomp ST(0),ST(6)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1746 OP("fcomp ST(0),ST(7)", 0, 0, 0, OP_FCOMP, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1747
1748
1749 /* e */
1750 OP("fsub ST(0),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1751 OP("fsub ST(0),ST(1)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1752 OP("fsub ST(0),ST(2)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1753 OP("fsub ST(0),ST(3)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1754 OP("fsub ST(0),ST(4)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1755 OP("fsub ST(0),ST(5)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1756 OP("fsub ST(0),ST(6)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1757 OP("fsub ST(0),ST(7)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1758 OP("fsubr ST(0),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1759 OP("fsubr ST(0),ST(1)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1760 OP("fsubr ST(0),ST(2)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1761 OP("fsubr ST(0),ST(3)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1762 OP("fsubr ST(0),ST(4)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1763 OP("fsubr ST(0),ST(5)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1764 OP("fsubr ST(0),ST(6)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1765 OP("fsubr ST(0),ST(7)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1766
1767 /* f */
1768 OP("fdiv ST(0),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1769 OP("fdiv ST(0),ST(1)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1770 OP("fdiv ST(0),ST(2)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1771 OP("fdiv ST(0),ST(3)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1772 OP("fdiv ST(0),ST(4)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1773 OP("fdiv ST(0),ST(5)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1774 OP("fdiv ST(0),ST(6)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1775 OP("fdiv ST(0),ST(7)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1776 OP("fdivr ST(0),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1777 OP("fdivr ST(0),ST(1)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1778 OP("fdivr ST(0),ST(2)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1779 OP("fdivr ST(0),ST(3)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1780 OP("fdivr ST(0),ST(4)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1781 OP("fdivr ST(0),ST(5)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1782 OP("fdivr ST(0),ST(6)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1783 OP("fdivr ST(0),ST(7)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1784};
1785
1786/* Floating point opcode starting with escape byte 0xD9 (values 0-0xBF)*/
1787const OPCODE g_aMapX86_EscF1_Low[8] =
1788{
1789 /* 0 */
1790 OP("fld %Md", IDX_ParseModRM, 0, 0, OP_FLD, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1791 INVALID_OPCODE,
1792 OP("fst %Md", IDX_ParseModRM, 0, 0, OP_FST, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1793 OP("fstp %Md", IDX_ParseModRM, 0, 0, OP_FSTP, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1794 //TODO:??
1795 OP("fldenv %M", IDX_ParseModRM, 0, 0, OP_FLDENV, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1796 OP("fldcw %Ew", IDX_ParseModRM, 0, 0, OP_FSUBR, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1797 //TODO:??
1798 OP("fstenv %M", IDX_ParseModRM, 0, 0, OP_FSTENV, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1799 OP("fstcw %Ew", IDX_ParseModRM, 0, 0, OP_FSTCW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1800};
1801
1802
1803/* Floating point opcode starting with escape byte 0xD9 (outside 0-0xBF)*/
1804const OPCODE g_aMapX86_EscF1_High[16*4] =
1805{
1806 /* c */
1807 OP("fld ST(0),ST(0)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1808 OP("fld ST(0),ST(1)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1809 OP("fld ST(0),ST(2)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1810 OP("fld ST(0),ST(3)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1811 OP("fld ST(0),ST(4)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1812 OP("fld ST(0),ST(5)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1813 OP("fld ST(0),ST(6)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1814 OP("fld ST(0),ST(7)", 0, 0, 0, OP_FLD, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1815 OP("fxch ST(0),ST(0)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1816 OP("fxch ST(0),ST(1)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1817 OP("fxch ST(0),ST(2)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1818 OP("fxch ST(0),ST(3)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1819 OP("fxch ST(0),ST(4)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1820 OP("fxch ST(0),ST(5)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1821 OP("fxch ST(0),ST(6)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1822 OP("fxch ST(0),ST(7)", 0, 0, 0, OP_FXCH, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1823
1824 /* d */
1825 OP("fnop", 0, 0, 0, OP_FNOP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
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 INVALID_OPCODE,
1836 INVALID_OPCODE,
1837 INVALID_OPCODE,
1838 INVALID_OPCODE,
1839 INVALID_OPCODE,
1840 INVALID_OPCODE,
1841
1842
1843 /* e */
1844 OP("fchs", 0, 0, 0, OP_FCHS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1845 OP("fabs", 0, 0, 0, OP_FABS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1846 INVALID_OPCODE,
1847 INVALID_OPCODE,
1848 OP("ftst", 0, 0, 0, OP_FCHS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1849 OP("fxam", 0, 0, 0, OP_FCHS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1850 INVALID_OPCODE,
1851 INVALID_OPCODE,
1852 OP("fld1", 0, 0, 0, OP_FLD1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1853 OP("fldl2t", 0, 0, 0, OP_FLDL2T, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1854 OP("fldl2e", 0, 0, 0, OP_FLDL2E, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1855 OP("fldpi", 0, 0, 0, OP_FLDPI, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1856 OP("fldlg2", 0, 0, 0, OP_FLDLG2, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1857 OP("fldln2", 0, 0, 0, OP_FLDLN2, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1858 OP("fldz", 0, 0, 0, OP_FLDZ, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1859 INVALID_OPCODE,
1860
1861 /* f */
1862 OP("f2xm1", 0, 0, 0, OP_F2XM1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1863 OP("fyl2x", 0, 0, 0, OP_FYL2X, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1864 OP("fptan", 0, 0, 0, OP_FPTAN, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1865 OP("fpatan", 0, 0, 0, OP_FPATAN, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1866 OP("fxtract", 0, 0, 0, OP_FXTRACT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1867 OP("frem1", 0, 0, 0, OP_FREM1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1868 OP("fdecstp", 0, 0, 0, OP_FDECSTP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1869 OP("fincstp", 0, 0, 0, OP_FINCSTP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1870 OP("fprem", 0, 0, 0, OP_FPREM, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1871 OP("fyl2xp1", 0, 0, 0, OP_FYL2XP1, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1872 OP("fsqrt", 0, 0, 0, OP_FSQRT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1873 OP("fsincos", 0, 0, 0, OP_FSINCOS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1874 OP("frndint", 0, 0, 0, OP_FRNDINT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1875 OP("fscale", 0, 0, 0, OP_FSCALE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1876 OP("fsin", 0, 0, 0, OP_FSIN, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1877 OP("fcos", 0, 0, 0, OP_FCOS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1878};
1879
1880
1881/* Floating point opcode starting with escape byte 0xDA (values 0-0xBF)*/
1882const OPCODE g_aMapX86_EscF2_Low[8] =
1883{
1884 /* 0 */
1885 OP("fiadd %Md", IDX_ParseModRM, 0, 0, OP_FIADD, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1886 OP("fimul %Md", IDX_ParseModRM, 0, 0, OP_FIMUL, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1887 OP("ficom %Md", IDX_ParseModRM, 0, 0, OP_FICOM, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1888 OP("ficomp %Md", IDX_ParseModRM, 0, 0, OP_FICOMP, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1889 OP("fisub %Md", IDX_ParseModRM, 0, 0, OP_FISUB, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1890 OP("fisubr %Md", IDX_ParseModRM, 0, 0, OP_FISUBR, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1891 OP("fidiv %Md", IDX_ParseModRM, 0, 0, OP_FIDIV, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1892 OP("fidivr %Md", IDX_ParseModRM, 0, 0, OP_FIDIVR, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1893};
1894
1895
1896/* Floating point opcode starting with escape byte 0xD9 (outside 0-0xBF)*/
1897const OPCODE g_aMapX86_EscF2_High[16*4] =
1898{
1899 /* c */
1900 OP("fcmovb ST(0),ST(0)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1901 OP("fcmovb ST(0),ST(1)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1902 OP("fcmovb ST(0),ST(2)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1903 OP("fcmovb ST(0),ST(3)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1904 OP("fcmovb ST(0),ST(4)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1905 OP("fcmovb ST(0),ST(5)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1906 OP("fcmovb ST(0),ST(6)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1907 OP("fcmovb ST(0),ST(7)", 0, 0, 0, OP_FCMOVB, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1908 OP("fcmove ST(0),ST(0)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1909 OP("fcmove ST(0),ST(1)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1910 OP("fcmove ST(0),ST(2)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1911 OP("fcmove ST(0),ST(3)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1912 OP("fcmove ST(0),ST(4)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1913 OP("fcmove ST(0),ST(5)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1914 OP("fcmove ST(0),ST(6)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1915 OP("fcmove ST(0),ST(7)", 0, 0, 0, OP_FCMOVE, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1916
1917 /* d */
1918 OP("fcmovbe ST(0),ST(0)",0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1919 OP("fcmovbe ST(0),ST(1)",0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1920 OP("fcmovbe ST(0),ST(2)",0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1921 OP("fcmovbe ST(0),ST(3)",0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1922 OP("fcmovbe ST(0),ST(4)",0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1923 OP("fcmovbe ST(0),ST(5)",0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1924 OP("fcmovbe ST(0),ST(6)",0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1925 OP("fcmovbe ST(0),ST(7)",0, 0, 0, OP_FCMOVBE, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1926 OP("fcmovu ST(0),ST(0)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1927 OP("fcmovu ST(0),ST(1)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1928 OP("fcmovu ST(0),ST(2)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1929 OP("fcmovu ST(0),ST(3)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1930 OP("fcmovu ST(0),ST(4)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1931 OP("fcmovu ST(0),ST(5)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1932 OP("fcmovu ST(0),ST(6)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1933 OP("fcmovu ST(0),ST(7)", 0, 0, 0, OP_FCMOVU, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1934
1935 /* e */
1936 INVALID_OPCODE,
1937 INVALID_OPCODE,
1938 INVALID_OPCODE,
1939 INVALID_OPCODE,
1940 INVALID_OPCODE,
1941 INVALID_OPCODE,
1942 INVALID_OPCODE,
1943 INVALID_OPCODE,
1944 INVALID_OPCODE,
1945 OP("fucompp", 0, 0, 0, OP_FUCOMPP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1946 INVALID_OPCODE,
1947 INVALID_OPCODE,
1948 INVALID_OPCODE,
1949 INVALID_OPCODE,
1950 INVALID_OPCODE,
1951 INVALID_OPCODE,
1952
1953 /* f */
1954 INVALID_OPCODE_BLOCK
1955};
1956
1957
1958/* Floating point opcode starting with escape byte 0xDB (values 0-0xBF)*/
1959const OPCODE g_aMapX86_EscF3_Low[8] =
1960{
1961 /* 0 */
1962 OP("fild %Md", IDX_ParseModRM, 0, 0, OP_FILD, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1963 INVALID_OPCODE,
1964 OP("fist %Md", IDX_ParseModRM, 0, 0, OP_FIST, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1965 OP("fistp %Md", IDX_ParseModRM, 0, 0, OP_FISTP, OP_PARM_Md, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1966 INVALID_OPCODE,
1967 OP("fld %Mq", IDX_ParseModRM, 0, 0, OP_FLD, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1968 INVALID_OPCODE,
1969 OP("fstp %Mq", IDX_ParseModRM, 0, 0, OP_FSTP, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
1970};
1971
1972
1973/* Floating point opcode starting with escape byte 0xDB (outside 0-0xBF)*/
1974const OPCODE g_aMapX86_EscF3_High[16*4] =
1975{
1976 /* c */
1977 OP("fcmovnb ST(0),ST(0)",0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1978 OP("fcmovnb ST(0),ST(1)",0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1979 OP("fcmovnb ST(0),ST(2)",0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1980 OP("fcmovnb ST(0),ST(3)",0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1981 OP("fcmovnb ST(0),ST(4)",0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1982 OP("fcmovnb ST(0),ST(5)",0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1983 OP("fcmovnb ST(0),ST(6)",0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1984 OP("fcmovnb ST(0),ST(7)",0, 0, 0, OP_FCMOVNB, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1985 OP("fcmovne ST(0),ST(0)",0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1986 OP("fcmovne ST(0),ST(1)",0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1987 OP("fcmovne ST(0),ST(2)",0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1988 OP("fcmovne ST(0),ST(3)",0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1989 OP("fcmovne ST(0),ST(4)",0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
1990 OP("fcmovne ST(0),ST(5)",0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
1991 OP("fcmovne ST(0),ST(6)",0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
1992 OP("fcmovne ST(0),ST(7)",0, 0, 0, OP_FCMOVNE, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
1993
1994 /* d */
1995 OP("fcmovnbe ST(0),ST(0)",0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
1996 OP("fcmovnbe ST(0),ST(1)",0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
1997 OP("fcmovnbe ST(0),ST(2)",0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
1998 OP("fcmovnbe ST(0),ST(3)",0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
1999 OP("fcmovnbe ST(0),ST(4)",0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
2000 OP("fcmovnbe ST(0),ST(5)",0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
2001 OP("fcmovnbe ST(0),ST(6)",0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
2002 OP("fcmovnbe ST(0),ST(7)",0, 0, 0, OP_FCMOVNBE,OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
2003 OP("fcmovnu ST(0),ST(0)",0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2004 OP("fcmovnu ST(0),ST(1)",0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
2005 OP("fcmovnu ST(0),ST(2)",0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
2006 OP("fcmovnu ST(0),ST(3)",0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
2007 OP("fcmovnu ST(0),ST(4)",0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
2008 OP("fcmovnu ST(0),ST(5)",0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
2009 OP("fcmovnu ST(0),ST(6)",0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
2010 OP("fcmovnu ST(0),ST(7)",0, 0, 0, OP_FCMOVNU, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
2011
2012 /* e */
2013 INVALID_OPCODE,
2014 INVALID_OPCODE,
2015 OP("fclex", 0, 0, 0, OP_FCLEX, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2016 OP("finit", 0, 0, 0, OP_FINIT, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2017 INVALID_OPCODE,
2018 INVALID_OPCODE,
2019 INVALID_OPCODE,
2020 INVALID_OPCODE,
2021 OP("fucomi ST(0),ST(0)",0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2022 OP("fucomi ST(0),ST(1)",0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
2023 OP("fucomi ST(0),ST(2)",0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
2024 OP("fucomi ST(0),ST(3)",0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
2025 OP("fucomi ST(0),ST(4)",0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
2026 OP("fucomi ST(0),ST(5)",0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
2027 OP("fucomi ST(0),ST(6)",0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
2028 OP("fucomi ST(0),ST(7)",0, 0, 0, OP_FUCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
2029
2030
2031 /* e */
2032 OP("fcomi ST(0),ST(0)",0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2033 OP("fcomi ST(0),ST(1)",0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
2034 OP("fcomi ST(0),ST(2)",0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
2035 OP("fcomi ST(0),ST(3)",0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
2036 OP("fcomi ST(0),ST(4)",0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
2037 OP("fcomi ST(0),ST(5)",0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
2038 OP("fcomi ST(0),ST(6)",0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
2039 OP("fcomi ST(0),ST(7)",0, 0, 0, OP_FCOMI, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
2040 INVALID_OPCODE,
2041 INVALID_OPCODE,
2042 INVALID_OPCODE,
2043 INVALID_OPCODE,
2044 INVALID_OPCODE,
2045 INVALID_OPCODE,
2046 INVALID_OPCODE,
2047 INVALID_OPCODE,
2048};
2049
2050
2051/* Floating point opcode starting with escape byte 0xDC (values 0-0xBF)*/
2052const OPCODE g_aMapX86_EscF4_Low[8] =
2053{
2054 /* 0 */
2055 OP("fadd %Mq", IDX_ParseModRM, 0, 0, OP_FADD, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2056 OP("fmul %Mq", IDX_ParseModRM, 0, 0, OP_FMUL, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2057 OP("fcom %Mq", IDX_ParseModRM, 0, 0, OP_FCOM, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2058 OP("fcomp %Mq", IDX_ParseModRM, 0, 0, OP_FCOMP, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2059 OP("fsub %Mq", IDX_ParseModRM, 0, 0, OP_FSUB, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2060 OP("fsubr %Mq", IDX_ParseModRM, 0, 0, OP_FSUBR, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2061 OP("fdiv %Mq", IDX_ParseModRM, 0, 0, OP_FDIV, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2062 OP("fdivr %Mq", IDX_ParseModRM, 0, 0, OP_FDIVR, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2063};
2064
2065
2066/* Floating point opcode starting with escape byte 0xDC (outside 0-0xBF)*/
2067const OPCODE g_aMapX86_EscF4_High[16*4] =
2068{
2069 /* c */
2070 OP("fadd ST(0),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2071 OP("fadd ST(1),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2072 OP("fadd ST(2),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2073 OP("fadd ST(3),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2074 OP("fadd ST(4),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2075 OP("fadd ST(5),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2076 OP("fadd ST(6),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2077 OP("fadd ST(7),ST(0)", 0, 0, 0, OP_FADD, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2078 OP("fmul ST(0),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2079 OP("fmul ST(1),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2080 OP("fmul ST(2),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2081 OP("fmul ST(3),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2082 OP("fmul ST(4),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2083 OP("fmul ST(5),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2084 OP("fmul ST(6),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2085 OP("fmul ST(7),ST(0)", 0, 0, 0, OP_FMUL, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2086
2087 /* d */
2088 INVALID_OPCODE_BLOCK
2089
2090
2091 /* e */
2092 OP("fsubr ST(0),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2093 OP("fsubr ST(1),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2094 OP("fsubr ST(2),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2095 OP("fsubr ST(3),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2096 OP("fsubr ST(4),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2097 OP("fsubr ST(5),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2098 OP("fsubr ST(6),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2099 OP("fsubr ST(7),ST(0)", 0, 0, 0, OP_FSUBR, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2100 OP("fsub ST(0),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2101 OP("fsub ST(1),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2102 OP("fsub ST(2),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2103 OP("fsub ST(3),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2104 OP("fsub ST(4),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2105 OP("fsub ST(5),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2106 OP("fsub ST(6),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2107 OP("fsub ST(7),ST(0)", 0, 0, 0, OP_FSUB, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2108
2109 /* f */
2110 OP("fdivr ST(0),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2111 OP("fdivr ST(1),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2112 OP("fdivr ST(2),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2113 OP("fdivr ST(3),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2114 OP("fdivr ST(4),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2115 OP("fdivr ST(5),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2116 OP("fdivr ST(6),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2117 OP("fdivr ST(7),ST(0)", 0, 0, 0, OP_FDIVR, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2118 OP("fdiv ST(0),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2119 OP("fdiv ST(1),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2120 OP("fdiv ST(2),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2121 OP("fdiv ST(3),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2122 OP("fdiv ST(4),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2123 OP("fdiv ST(5),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2124 OP("fdiv ST(6),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2125 OP("fdiv ST(7),ST(0)", 0, 0, 0, OP_FDIV, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2126};
2127
2128
2129/* Floating point opcode starting with escape byte 0xDD (values 0-0xBF)*/
2130const OPCODE g_aMapX86_EscF5_Low[8] =
2131{
2132 /* 0 */
2133 OP("fld %Mq", IDX_ParseModRM, 0, 0, OP_FLD, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2134 INVALID_OPCODE,
2135 OP("fst %Mq", IDX_ParseModRM, 0, 0, OP_FST, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2136 OP("fstp %Mq", IDX_ParseModRM, 0, 0, OP_FSTP, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2137 OP("frstor %M", IDX_ParseModRM, 0, 0, OP_FRSTOR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2138 INVALID_OPCODE,
2139 OP("fsave %M", IDX_ParseModRM, 0, 0, OP_FSAVE, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2140 OP("fnstsw %Mw", IDX_ParseModRM, 0, 0, OP_FNSTSW, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS /* fixme: wasn't initialized! */),
2141};
2142
2143
2144/* Floating point opcode starting with escape byte 0xDD (outside 0-0xBF)*/
2145const OPCODE g_aMapX86_EscF5_High[16*4] =
2146{
2147 /* c */
2148 OP("ffree ST(0)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2149 OP("ffree ST(1)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2150 OP("ffree ST(2)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2151 OP("ffree ST(3)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2152 OP("ffree ST(4)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2153 OP("ffree ST(5)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2154 OP("ffree ST(6)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2155 OP("ffree ST(7)", 0, 0, 0, OP_FFREE, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2156 INVALID_OPCODE,
2157 INVALID_OPCODE,
2158 INVALID_OPCODE,
2159 INVALID_OPCODE,
2160 INVALID_OPCODE,
2161 INVALID_OPCODE,
2162 INVALID_OPCODE,
2163 INVALID_OPCODE,
2164
2165 /* d */
2166 OP("fst ST(0)", 0, 0, 0, OP_FST, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2167 OP("fst ST(1)", 0, 0, 0, OP_FST, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2168 OP("fst ST(2)", 0, 0, 0, OP_FST, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2169 OP("fst ST(3)", 0, 0, 0, OP_FST, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2170 OP("fst ST(4)", 0, 0, 0, OP_FST, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2171 OP("fst ST(5)", 0, 0, 0, OP_FST, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2172 OP("fst ST(6)", 0, 0, 0, OP_FST, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2173 OP("fst ST(7)", 0, 0, 0, OP_FST, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2174 OP("fstp ST(0)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2175 OP("fstp ST(1)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2176 OP("fstp ST(2)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2177 OP("fstp ST(3)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2178 OP("fstp ST(4)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2179 OP("fstp ST(5)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2180 OP("fstp ST(6)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2181 OP("fstp ST(7)", 0, 0, 0, OP_FSTP, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2182
2183
2184 /* e */
2185 OP("fucom ST(0)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2186 OP("fucom ST(1)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2187 OP("fucom ST(2)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2188 OP("fucom ST(3)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2189 OP("fucom ST(4)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2190 OP("fucom ST(5)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2191 OP("fucom ST(6)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2192 OP("fucom ST(7)", 0, 0, 0, OP_FUCOM, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2193 OP("fucomp ST(0)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_0, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2194 OP("fucomp ST(1)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_1, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2195 OP("fucomp ST(2)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_2, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2196 OP("fucomp ST(3)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_3, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2197 OP("fucomp ST(4)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_4, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2198 OP("fucomp ST(5)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_5, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2199 OP("fucomp ST(6)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_6, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2200 OP("fucomp ST(7)", 0, 0, 0, OP_FUCOMP, OP_PARM_REGFP_7, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2201
2202 /* f */
2203 INVALID_OPCODE_BLOCK
2204};
2205
2206
2207
2208/* Floating point opcode starting with escape byte 0xDE (values 0-0xBF)*/
2209const OPCODE g_aMapX86_EscF6_Low[8] =
2210{
2211 /* 0 */
2212 OP("fiadd %Mw", IDX_ParseModRM, 0, 0, OP_FIADD, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2213 OP("fimul %Mw", IDX_ParseModRM, 0, 0, OP_FIMUL, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2214 OP("ficom %Mw", IDX_ParseModRM, 0, 0, OP_FICOM, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2215 OP("ficomp %Mw", IDX_ParseModRM, 0, 0, OP_FICOMP, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2216 OP("fisub %Mw", IDX_ParseModRM, 0, 0, OP_FISUB, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2217 OP("fisubr %Mw", IDX_ParseModRM, 0, 0, OP_FISUBR, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2218 OP("fidiv %Mw", IDX_ParseModRM, 0, 0, OP_FIDIV, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2219 OP("fidivr %Mw", IDX_ParseModRM, 0, 0, OP_FIDIVR, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2220};
2221
2222
2223/* Floating point opcode starting with escape byte 0xDE (outside 0-0xBF)*/
2224const OPCODE g_aMapX86_EscF6_High[16*4] =
2225{
2226 /* c */
2227 OP("faddp ST(0),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2228 OP("faddp ST(1),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2229 OP("faddp ST(2),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2230 OP("faddp ST(3),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2231 OP("faddp ST(4),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2232 OP("faddp ST(5),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2233 OP("faddp ST(6),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2234 OP("faddp ST(7),ST(0)", 0, 0, 0, OP_FADDP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2235 OP("fmulp ST(0),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2236 OP("fmulp ST(1),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2237 OP("fmulp ST(2),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2238 OP("fmulp ST(3),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2239 OP("fmulp ST(4),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2240 OP("fmulp ST(5),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2241 OP("fmulp ST(6),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2242 OP("fmulp ST(7),ST(0)", 0, 0, 0, OP_FMULP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2243
2244 /* d */
2245 INVALID_OPCODE,
2246 OP("fcompp", 0, 0, 0, OP_FCOMPP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2247 INVALID_OPCODE,
2248 INVALID_OPCODE,
2249 INVALID_OPCODE,
2250 INVALID_OPCODE,
2251 INVALID_OPCODE,
2252 INVALID_OPCODE,
2253 INVALID_OPCODE,
2254 INVALID_OPCODE,
2255 INVALID_OPCODE,
2256 INVALID_OPCODE,
2257 INVALID_OPCODE,
2258 INVALID_OPCODE,
2259 INVALID_OPCODE,
2260 INVALID_OPCODE,
2261
2262
2263 /* e */
2264 OP("fsubrp ST(0),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2265 OP("fsubrp ST(1),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2266 OP("fsubrp ST(2),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2267 OP("fsubrp ST(3),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2268 OP("fsubrp ST(4),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2269 OP("fsubrp ST(5),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2270 OP("fsubrp ST(6),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2271 OP("fsubrp ST(7),ST(0)", 0, 0, 0, OP_FSUBRP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2272 OP("fsubp ST(0),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2273 OP("fsubp ST(1),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2274 OP("fsubp ST(2),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2275 OP("fsubp ST(3),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2276 OP("fsubp ST(4),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2277 OP("fsubp ST(5),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2278 OP("fsubp ST(6),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2279 OP("fsubp ST(7),ST(0)", 0, 0, 0, OP_FSUBP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2280
2281 /* f */
2282 OP("fdivrp ST(0),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2283 OP("fdivrp ST(1),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2284 OP("fdivrp ST(2),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2285 OP("fdivrp ST(3),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2286 OP("fdivrp ST(4),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2287 OP("fdivrp ST(5),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2288 OP("fdivrp ST(6),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2289 OP("fdivrp ST(7),ST(0)", 0, 0, 0, OP_FDIVRP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2290 OP("fdivp ST(0),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2291 OP("fdivp ST(1),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_1, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2292 OP("fdivp ST(2),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_2, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2293 OP("fdivp ST(3),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_3, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2294 OP("fdivp ST(4),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_4, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2295 OP("fdivp ST(5),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_5, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2296 OP("fdivp ST(6),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_6, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2297 OP("fdivp ST(7),ST(0)", 0, 0, 0, OP_FDIVP, OP_PARM_REGFP_7, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2298};
2299
2300/* Floating point opcode starting with escape byte 0xDF (values 0-0xBF)*/
2301const OPCODE g_aMapX86_EscF7_Low[8] =
2302{
2303 /* 0 */
2304 OP("fild %Mw", IDX_ParseModRM, 0, 0, OP_FILD, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2305 INVALID_OPCODE,
2306 OP("fist %Mw", IDX_ParseModRM, 0, 0, OP_FIST, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2307 OP("fistp %Mw", IDX_ParseModRM, 0, 0, OP_FISTP, OP_PARM_Mw, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2308 OP("fbld %M", IDX_ParseModRM, 0, 0, OP_FBLD, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2309 OP("fild %Mq", IDX_ParseModRM, 0, 0, OP_FILD, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2310 OP("fbstp %M", IDX_ParseModRM, 0, 0, OP_FBSTP, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2311 OP("fistp %Mq", IDX_ParseModRM, 0, 0, OP_FISTP, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2312};
2313
2314
2315/* Floating point opcode starting with escape byte 0xDF (outside 0-0xBF)*/
2316const OPCODE g_aMapX86_EscF7_High[16*4] =
2317{
2318 /* c */
2319 INVALID_OPCODE_BLOCK
2320
2321 /* d */
2322 INVALID_OPCODE_BLOCK
2323
2324 /* e */
2325 OP("fnstsw ax", IDX_ParseFixedReg, 0, 0, OP_FNSTSW, OP_PARM_REG_AX, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2326 INVALID_OPCODE,
2327 INVALID_OPCODE,
2328 INVALID_OPCODE,
2329 INVALID_OPCODE,
2330 INVALID_OPCODE,
2331 INVALID_OPCODE,
2332 INVALID_OPCODE,
2333 OP("fucomip ST(0),ST(0)",0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2334 OP("fucomip ST(0),ST(1)",0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
2335 OP("fucomip ST(0),ST(2)",0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
2336 OP("fucomip ST(0),ST(3)",0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
2337 OP("fucomip ST(0),ST(4)",0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
2338 OP("fucomip ST(0),ST(5)",0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
2339 OP("fucomip ST(0),ST(6)",0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
2340 OP("fucomip ST(0),ST(7)",0, 0, 0, OP_FUCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
2341
2342 /* f */
2343 OP("fcomip ST(0),ST(0)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_0,OP_PARM_NONE, OPTYPE_HARMLESS),
2344 OP("fcomip ST(0),ST(1)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_1,OP_PARM_NONE, OPTYPE_HARMLESS),
2345 OP("fcomip ST(0),ST(2)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_2,OP_PARM_NONE, OPTYPE_HARMLESS),
2346 OP("fcomip ST(0),ST(3)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_3,OP_PARM_NONE, OPTYPE_HARMLESS),
2347 OP("fcomip ST(0),ST(4)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_4,OP_PARM_NONE, OPTYPE_HARMLESS),
2348 OP("fcomip ST(0),ST(5)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_5,OP_PARM_NONE, OPTYPE_HARMLESS),
2349 OP("fcomip ST(0),ST(6)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_6,OP_PARM_NONE, OPTYPE_HARMLESS),
2350 OP("fcomip ST(0),ST(7)", 0, 0, 0, OP_FCOMIP, OP_PARM_REGFP_0, OP_PARM_REGFP_7,OP_PARM_NONE, OPTYPE_HARMLESS),
2351 INVALID_OPCODE,
2352 INVALID_OPCODE,
2353 INVALID_OPCODE,
2354 INVALID_OPCODE,
2355 INVALID_OPCODE,
2356 INVALID_OPCODE,
2357 INVALID_OPCODE,
2358 INVALID_OPCODE,
2359};
2360
2361
2362PCOPCODE g_paMapX86_FP_Low[8] =
2363{
2364 g_aMapX86_EscF0_Low,
2365 g_aMapX86_EscF1_Low,
2366 g_aMapX86_EscF2_Low,
2367 g_aMapX86_EscF3_Low,
2368 g_aMapX86_EscF4_Low,
2369 g_aMapX86_EscF5_Low,
2370 g_aMapX86_EscF6_Low,
2371 g_aMapX86_EscF7_Low
2372};
2373
2374PCOPCODE g_paMapX86_FP_High[8] =
2375{
2376 g_aMapX86_EscF0_High,
2377 g_aMapX86_EscF1_High,
2378 g_aMapX86_EscF2_High,
2379 g_aMapX86_EscF3_High,
2380 g_aMapX86_EscF4_High,
2381 g_aMapX86_EscF5_High,
2382 g_aMapX86_EscF6_High,
2383 g_aMapX86_EscF7_High
2384};
2385
2386/* Opcode extensions (Group tables) */
2387const OPCODE g_aMapX86_Group1[8*4] =
2388{
2389 /* 80 */
2390 OP("add %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_ADD, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2391 OP("or %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_OR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2392 OP("adc %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_ADC, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2393 OP("sbb %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SBB, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2394 OP("and %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_AND, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2395 OP("sub %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SUB, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2396 OP("xor %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_XOR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2397 OP("cmp %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_CMP, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2398
2399 /* 81 */
2400 OP("add %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_ADD, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2401 OP("or %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_OR, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2402 OP("adc %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_ADC, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2403 OP("sbb %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_SBB, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2404 OP("and %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_AND, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2405 OP("sub %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_SUB, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2406 OP("xor %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_XOR, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2407 OP("cmp %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_CMP, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2408
2409 /* 82 */
2410 OP("add %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_ADD, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2411 OP("or %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_OR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2412 OP("adc %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_ADC, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2413 OP("sbb %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SBB, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2414 OP("and %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_AND, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2415 OP("sub %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SUB, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2416 OP("xor %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_XOR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2417 OP("cmp %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_CMP, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2418
2419 /* 83 */
2420 OP("add %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX,0, OP_ADD, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2421 OP("or %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX,0, OP_OR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2422 OP("adc %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX,0, OP_ADC, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2423 OP("sbb %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX,0, OP_SBB, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2424 OP("and %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX,0, OP_AND, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2425 OP("sub %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX,0, OP_SUB, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2426 OP("xor %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX,0, OP_XOR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2427 OP("cmp %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByteSX,0, OP_CMP, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2428};
2429
2430const OPCODE g_aMapX86_Group2[8*6] =
2431{
2432 /* C0 */
2433 OP("rol %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_ROL, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2434 OP("ror %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_ROR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2435 OP("rcl %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_RCL, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2436 OP("rcr %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_RCR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2437 OP("shl/sal %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SHL, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2438 OP("shr %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SHR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2439 OP("shl/sal %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SHL, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2440 OP("sar %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SAR, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2441
2442 /* C1 */
2443 OP("rol %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_ROL, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2444 OP("ror %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_ROR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2445 OP("rcl %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_RCL, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2446 OP("rcr %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_RCR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2447 OP("shl/sal %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SHL, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2448 OP("shr %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SHR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2449 OP("shl/sal %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SHL, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2450 OP("sar %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_SAR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2451
2452 /* D0 */
2453 OP("rol %Eb,1", IDX_ParseModRM, 0, 0, OP_ROL, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2454 OP("ror %Eb,1", IDX_ParseModRM, 0, 0, OP_ROR, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2455 OP("rcl %Eb,1", IDX_ParseModRM, 0, 0, OP_RCL, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2456 OP("rcr %Eb,1", IDX_ParseModRM, 0, 0, OP_RCR, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2457 OP("shl/sal %Eb,1", IDX_ParseModRM, 0, 0, OP_SHL, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2458 OP("shr %Eb,1", IDX_ParseModRM, 0, 0, OP_SHR, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2459 OP("shl/sal %Eb,1", IDX_ParseModRM, 0, 0, OP_SHL, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2460 OP("sar %Eb,1", IDX_ParseModRM, 0, 0, OP_SAR, OP_PARM_Eb, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2461
2462 /* D1 */
2463 OP("rol %Ev,1", IDX_ParseModRM, 0, 0, OP_ROL, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2464 OP("ror %Ev,1", IDX_ParseModRM, 0, 0, OP_ROR, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2465 OP("rcl %Ev,1", IDX_ParseModRM, 0, 0, OP_RCL, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2466 OP("rcr %Ev,1", IDX_ParseModRM, 0, 0, OP_RCR, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2467 OP("shl/sal %Ev,1", IDX_ParseModRM, 0, 0, OP_SHL, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2468 OP("shr %Ev,1", IDX_ParseModRM, 0, 0, OP_SHR, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2469 OP("shl/sal %Ev,1", IDX_ParseModRM, 0, 0, OP_SHL, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2470 OP("sar %Ev,1", IDX_ParseModRM, 0, 0, OP_SAR, OP_PARM_Ev, OP_PARM_1 , OP_PARM_NONE, OPTYPE_HARMLESS),
2471
2472 /* D2 */
2473 OP("rol %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_ROL, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2474 OP("ror %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_ROR, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2475 OP("rcl %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_RCL, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2476 OP("rcr %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_RCR, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2477 OP("shl/sal %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHL, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2478 OP("shr %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHR, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2479 OP("shl/sal %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHL, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2480 OP("sar %Eb,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SAR, OP_PARM_Eb, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2481
2482 /* D3 */
2483 OP("rol %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_ROL, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2484 OP("ror %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_ROR, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2485 OP("rcl %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_RCL, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2486 OP("rcr %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_RCR, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2487 OP("shl/sal %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHL, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2488 OP("shr %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHR, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2489 OP("shl/sal %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SHL, OP_PARM_Ev, OP_PARM_REG_CL, OP_PARM_NONE, OPTYPE_HARMLESS),
2490 OP("sar %Ev,CL", IDX_ParseModRM, IDX_ParseFixedReg, 0, OP_SAR, OP_PARM_Ev, OP_PARM_REG_CL ,OP_PARM_NONE, OPTYPE_HARMLESS),
2491
2492};
2493
2494
2495const OPCODE g_aMapX86_Group3[8*2] =
2496{
2497 /* F6 */
2498 OP("test %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_TEST, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2499 //AMD manual claims test??
2500 INVALID_OPCODE,
2501 OP("not %Eb", IDX_ParseModRM, 0, 0, OP_NOT, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2502 OP("neg %Eb", IDX_ParseModRM, 0, 0, OP_NEG, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2503 OP("mul %Eb", IDX_ParseModRM, 0, 0, OP_MUL, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2504 OP("imul %Eb", IDX_ParseModRM, 0, 0, OP_IMUL, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2505 OP("div %Eb", IDX_ParseModRM, 0, 0, OP_DIV, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2506 OP("idiv %Eb", IDX_ParseModRM, 0, 0, OP_IDIV, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2507
2508 /* F7 */
2509 OP("test %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_TEST, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2510 //AMD manual claims test??
2511 INVALID_OPCODE,
2512 OP("not %Ev", IDX_ParseModRM, 0, 0, OP_NOT, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2513 OP("neg %Ev", IDX_ParseModRM, 0, 0, OP_NEG, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2514 OP("mul %Ev", IDX_ParseModRM, 0, 0, OP_MUL, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2515 OP("imul %Ev", IDX_ParseModRM, 0, 0, OP_IMUL, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2516 OP("div %Ev", IDX_ParseModRM, 0, 0, OP_DIV, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2517 OP("idiv %Ev", IDX_ParseModRM, 0, 0, OP_IDIV, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2518};
2519
2520const OPCODE g_aMapX86_Group4[8] =
2521{
2522 /* FE */
2523 OP("inc %Eb", IDX_ParseModRM, 0, 0, OP_INC, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2524 OP("dec %Eb", IDX_ParseModRM, 0, 0, OP_DEC, OP_PARM_Eb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2525 INVALID_OPCODE,
2526 INVALID_OPCODE,
2527 INVALID_OPCODE,
2528 INVALID_OPCODE,
2529 INVALID_OPCODE,
2530 INVALID_OPCODE,
2531};
2532
2533const OPCODE g_aMapX86_Group5[8] =
2534{
2535 /* FF */
2536 OP("inc %Ev", IDX_ParseModRM, 0, 0, OP_INC, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2537 OP("dec %Ev", IDX_ParseModRM, 0, 0, OP_DEC, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2538 OP("call %Ev", IDX_ParseModRM, 0, 0, OP_CALL, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
2539 OP("call %Ep", IDX_ParseModRM, 0, 0, OP_CALL, OP_PARM_Ep, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW),
2540 OP("jmp %Ev", IDX_ParseModRM, 0, 0, OP_JMP, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW | OPTYPE_FORCED_64_OP_SIZE),
2541 OP("jmp %Ep", IDX_ParseModRM, 0, 0, OP_JMP, OP_PARM_Ep, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_CONTROLFLOW | OPTYPE_UNCOND_CONTROLFLOW),
2542 OP("push %Ev", IDX_ParseModRM, 0, 0, OP_PUSH, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS | OPTYPE_DEFAULT_64_OP_SIZE),
2543 INVALID_OPCODE,
2544};
2545
2546
2547const OPCODE g_aMapX86_Group6[8] =
2548{
2549 /* 0F 00 */
2550 OP("sldt %Ew", IDX_ParseModRM, 0, 0, OP_SLDT, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
2551 OP("str %Ev", IDX_ParseModRM, 0, 0, OP_STR, OP_PARM_Ev, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
2552 OP("lldt %Ew", IDX_ParseModRM, 0, 0, OP_LLDT, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
2553 OP("ltr %Ew", IDX_ParseModRM, 0, 0, OP_LTR, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
2554 OP("verr %Ew", IDX_ParseModRM, 0, 0, OP_VERR, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
2555 OP("verw %Ew", IDX_ParseModRM, 0, 0, OP_VERW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
2556 INVALID_OPCODE,
2557 INVALID_OPCODE,
2558};
2559
2560const OPCODE g_aMapX86_Group7_mem[8] =
2561{
2562 /* 0F 01 */
2563 OP("sgdt %Ms", IDX_ParseModRM, 0, 0, OP_SGDT, OP_PARM_Ms, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
2564 OP("sidt %Ms", IDX_ParseModRM, 0, 0, OP_SIDT, OP_PARM_Ms, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
2565 OP("lgdt %Ms", IDX_ParseModRM, 0, 0, OP_LGDT, OP_PARM_Ms, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
2566 OP("lidt %Ms", IDX_ParseModRM, 0, 0, OP_LIDT, OP_PARM_Ms, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
2567 OP("smsw %Ew", IDX_ParseModRM, 0, 0, OP_SMSW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
2568 INVALID_OPCODE,
2569 OP("lmsw %Ew", IDX_ParseModRM, 0, 0, OP_LMSW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
2570 OP("invlpg %Mb", IDX_ParseModRM, 0, 0, OP_INVLPG, OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
2571};
2572
2573const OPCODE g_aMapX86_Group7_mod11_rm000[8] =
2574{
2575 /* 0F 01 MOD=11b */
2576 INVALID_OPCODE,
2577 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, OPTYPE_HARMLESS ),
2578 INVALID_OPCODE,
2579 INVALID_OPCODE,
2580 OP("smsw %Ew", IDX_ParseModRM, 0, 0, OP_SMSW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
2581 INVALID_OPCODE,
2582 OP("lmsw %Ew", IDX_ParseModRM, 0, 0, OP_LMSW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
2583 OP("swapgs", 0, 0, 0, OP_SWAPGS, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS )
2584};
2585
2586const OPCODE g_aMapX86_Group7_mod11_rm001[8] =
2587{
2588 /* 0F 01 MOD=11b */
2589 OP("vmcall", 0, 0, 0, OP_VMCALL, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS ),
2590 OP("mwait %eAX,%eCX", IDX_ParseFixedReg, IDX_ParseFixedReg, 0, OP_MWAIT, OP_PARM_REG_EAX, OP_PARM_REG_ECX,OP_PARM_NONE, OPTYPE_HARMLESS ),
2591 INVALID_OPCODE,
2592 INVALID_OPCODE,
2593 OP("smsw %Ew", IDX_ParseModRM, 0, 0, OP_SMSW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED_NOTRAP),
2594 INVALID_OPCODE,
2595 OP("lmsw %Ew", IDX_ParseModRM, 0, 0, OP_LMSW, OP_PARM_Ew, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_DANGEROUS | OPTYPE_PRIVILEGED),
2596 INVALID_OPCODE,
2597};
2598
2599const OPCODE g_aMapX86_Group8[8] =
2600{
2601 /* 0F BA */
2602 INVALID_OPCODE,
2603 INVALID_OPCODE,
2604 INVALID_OPCODE,
2605 INVALID_OPCODE,
2606 OP("bt %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_BT, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2607 OP("bts %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_BTS, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2608 OP("btr %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_BTR, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2609 OP("btc %Ev,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_BTC, OP_PARM_Ev, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2610};
2611
2612const OPCODE g_aMapX86_Group9[8] =
2613{
2614 /* 0F C7 */
2615 INVALID_OPCODE,
2616 OP("cmpxchg8b %Mq", IDX_ParseModRM, 0, 0, OP_CMPXCHG8B, OP_PARM_Mq, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2617 INVALID_OPCODE,
2618 INVALID_OPCODE,
2619 INVALID_OPCODE,
2620 INVALID_OPCODE,
2621 INVALID_OPCODE,
2622 INVALID_OPCODE,
2623};
2624
2625const OPCODE g_aMapX86_Group10[8] =
2626{
2627 /* 0F B9 */
2628 INVALID_OPCODE,
2629 INVALID_OPCODE,
2630 INVALID_OPCODE,
2631 INVALID_OPCODE,
2632 INVALID_OPCODE,
2633 INVALID_OPCODE,
2634 INVALID_OPCODE,
2635 INVALID_OPCODE,
2636};
2637
2638
2639const OPCODE g_aMapX86_Group11[8*2] =
2640{
2641 /* 0F C6 */
2642 OP("mov %Eb,%Ib", IDX_ParseModRM, IDX_ParseImmByte, 0, OP_MOV, OP_PARM_Eb, OP_PARM_Ib , OP_PARM_NONE, OPTYPE_HARMLESS),
2643 INVALID_OPCODE,
2644 INVALID_OPCODE,
2645 INVALID_OPCODE,
2646 INVALID_OPCODE,
2647 INVALID_OPCODE,
2648 INVALID_OPCODE,
2649 INVALID_OPCODE,
2650 /* 0F C7 */
2651 OP("mov %Ev,%Iz", IDX_ParseModRM, IDX_ParseImmZ, 0, OP_MOV, OP_PARM_Ev, OP_PARM_Iz , OP_PARM_NONE, OPTYPE_HARMLESS),
2652 INVALID_OPCODE,
2653 INVALID_OPCODE,
2654 INVALID_OPCODE,
2655 INVALID_OPCODE,
2656 INVALID_OPCODE,
2657 INVALID_OPCODE,
2658 INVALID_OPCODE,
2659};
2660
2661
2662/* 0xF 0x71 */
2663const OPCODE g_aMapX86_Group12[8*2] =
2664{
2665 INVALID_OPCODE,
2666 INVALID_OPCODE,
2667 OP("psrlw %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRLW, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2668 INVALID_OPCODE,
2669 OP("psraw %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRAW, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2670 INVALID_OPCODE,
2671 OP("psllw %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSLLW, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2672 INVALID_OPCODE,
2673
2674 /* Group 12 with prefix 0x66 */
2675 INVALID_OPCODE,
2676 INVALID_OPCODE,
2677 OP("psrlw %Pdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRLW, OP_PARM_Pdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2678 INVALID_OPCODE,
2679 OP("psraw %Pdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRAW, OP_PARM_Pdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2680 INVALID_OPCODE,
2681 OP("psllw %Pdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSLLW, OP_PARM_Pdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2682 INVALID_OPCODE,
2683};
2684
2685/* 0xF 0x72 */
2686const OPCODE g_aMapX86_Group13[8*2] =
2687{
2688 INVALID_OPCODE,
2689 INVALID_OPCODE,
2690 OP("psrld %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRLD, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2691 INVALID_OPCODE,
2692 OP("psrad %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRAD, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2693 INVALID_OPCODE,
2694 OP("pslld %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSLLD, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2695 INVALID_OPCODE,
2696
2697 /* Group 13 with prefix 0x66 */
2698 INVALID_OPCODE,
2699 INVALID_OPCODE,
2700 OP("psrld %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRLD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2701 INVALID_OPCODE,
2702 OP("psrad %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRAD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2703 INVALID_OPCODE,
2704 OP("pslld %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSLLD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2705 INVALID_OPCODE,
2706};
2707
2708/* 0xF 0x73 */
2709const OPCODE g_aMapX86_Group14[8*2] =
2710{
2711 INVALID_OPCODE,
2712 INVALID_OPCODE,
2713 OP("psrlq %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRLQ, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2714 INVALID_OPCODE,
2715 INVALID_OPCODE,
2716 INVALID_OPCODE,
2717 OP("psllq %Pq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSLLQ, OP_PARM_Pq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2718 INVALID_OPCODE,
2719
2720 /* Group 14 with prefix 0x66 */
2721 INVALID_OPCODE,
2722 INVALID_OPCODE,
2723 OP("psrlq %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRLD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2724 OP("psrldq %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSRLDQ, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2725 INVALID_OPCODE,
2726 INVALID_OPCODE,
2727 OP("psllq %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSLLD, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2728 OP("pslldq %Wdq,%Ib", IDX_ParseModRM, IDX_ParseImmByte,0, OP_PSLLDQ, OP_PARM_Wdq, OP_PARM_Ib, OP_PARM_NONE, OPTYPE_HARMLESS),
2729};
2730
2731
2732/* 0xF 0xAE */
2733const OPCODE g_aMapX86_Group15_mem[8] =
2734{
2735 OP("fxsave %M", IDX_ParseModRM, 0, 0, OP_FXSAVE, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2736 OP("fxrstor %M", IDX_ParseModRM, 0, 0, OP_FXRSTOR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2737 OP("ldmxcsr %M", IDX_ParseModRM, 0, 0, OP_LDMXCSR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2738 OP("stmxcsr %M", IDX_ParseModRM, 0, 0, OP_STMXCSR, OP_PARM_M, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2739 INVALID_OPCODE,
2740 INVALID_OPCODE,
2741 INVALID_OPCODE,
2742 OP("clflush %Mb", IDX_ParseModRM, 0, 0, OP_CLFLUSH, OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2743};
2744
2745/* 0xF 0xAE */
2746const OPCODE g_aMapX86_Group15_mod11_rm000[8] =
2747{
2748 INVALID_OPCODE,
2749 INVALID_OPCODE,
2750 INVALID_OPCODE,
2751 INVALID_OPCODE,
2752 INVALID_OPCODE,
2753 OP("lfence", IDX_ParseModFence, 0, 0, OP_LFENCE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2754 OP("mfence", IDX_ParseModFence, 0, 0, OP_MFENCE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2755 OP("sfence", IDX_ParseModFence, 0, 0, OP_SFENCE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2756};
2757
2758/* 0xF 0x18 */
2759const OPCODE g_aMapX86_Group16[8] =
2760{
2761 OP("prefetchnta %Mb", IDX_ParseModRM, 0, 0, OP_PREFETCH,OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2762 OP("prefetcht0 %Mb", IDX_ParseModRM, 0, 0, OP_PREFETCH,OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2763 OP("prefetcht1 %Mb", IDX_ParseModRM, 0, 0, OP_PREFETCH,OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2764 OP("prefetcht2 %Mb", IDX_ParseModRM, 0, 0, OP_PREFETCH,OP_PARM_Mb, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2765 INVALID_OPCODE,
2766 INVALID_OPCODE,
2767 INVALID_OPCODE,
2768 INVALID_OPCODE,
2769};
2770
2771/* 0x90 or 0xF3 0x90 */
2772const OPCODE g_aMapX86_NopPause[2] =
2773{
2774 OP("nop", 0, 0, 0, OP_NOP, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2775 OP("pause", 0, 0, 0, OP_PAUSE, OP_PARM_NONE, OP_PARM_NONE, OP_PARM_NONE, OPTYPE_HARMLESS),
2776};
2777
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