VirtualBox

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

Last change on this file since 30889 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

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