Properly disassemble movnti in Intel mode
[deliverable/binutils-gdb.git] / opcodes / i386-dis.c
CommitLineData
252b5132 1/* Print i386 instructions for GDB, the GNU debugger.
b90efa5b 2 Copyright (C) 1988-2015 Free Software Foundation, Inc.
252b5132 3
9b201bb5 4 This file is part of the GNU opcodes library.
20f0a1fc 5
9b201bb5 6 This library is free software; you can redistribute it and/or modify
20f0a1fc 7 it under the terms of the GNU General Public License as published by
9b201bb5
NC
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
20f0a1fc 10
9b201bb5
NC
11 It is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
20f0a1fc
NC
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
9b201bb5
NC
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
20
20f0a1fc
NC
21
22/* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
23 July 1988
24 modified by John Hassey (hassey@dg-rtp.dg.com)
25 x86-64 support added by Jan Hubicka (jh@suse.cz)
26 VIA PadLock support by Michal Ludvig (mludvig@suse.cz). */
27
28/* The main tables describing the instructions is essentially a copy
29 of the "Opcode Map" chapter (Appendix A) of the Intel 80386
30 Programmers Manual. Usually, there is a capital letter, followed
31 by a small letter. The capital letter tell the addressing mode,
32 and the small letter tells about the operand size. Refer to
33 the Intel manual for details. */
252b5132 34
252b5132 35#include "sysdep.h"
dabbade6 36#include "dis-asm.h"
252b5132 37#include "opintl.h"
0b1cf022 38#include "opcode/i386.h"
85f10a01 39#include "libiberty.h"
252b5132
RH
40
41#include <setjmp.h>
42
26ca5450
AJ
43static int print_insn (bfd_vma, disassemble_info *);
44static void dofloat (int);
45static void OP_ST (int, int);
46static void OP_STi (int, int);
47static int putop (const char *, int);
48static void oappend (const char *);
49static void append_seg (void);
50static void OP_indirE (int, int);
51static void print_operand_value (char *, int, bfd_vma);
c0f3af97 52static void OP_E_register (int, int);
c1e679ec 53static void OP_E_memory (int, int);
5d669648 54static void print_displacement (char *, bfd_vma);
26ca5450
AJ
55static void OP_E (int, int);
56static void OP_G (int, int);
57static bfd_vma get64 (void);
58static bfd_signed_vma get32 (void);
59static bfd_signed_vma get32s (void);
60static int get16 (void);
61static void set_op (bfd_vma, int);
b844680a 62static void OP_Skip_MODRM (int, int);
26ca5450
AJ
63static void OP_REG (int, int);
64static void OP_IMREG (int, int);
65static void OP_I (int, int);
66static void OP_I64 (int, int);
67static void OP_sI (int, int);
68static void OP_J (int, int);
69static void OP_SEG (int, int);
70static void OP_DIR (int, int);
71static void OP_OFF (int, int);
72static void OP_OFF64 (int, int);
73static void ptr_reg (int, int);
74static void OP_ESreg (int, int);
75static void OP_DSreg (int, int);
76static void OP_C (int, int);
77static void OP_D (int, int);
78static void OP_T (int, int);
6f74c397 79static void OP_R (int, int);
26ca5450
AJ
80static void OP_MMX (int, int);
81static void OP_XMM (int, int);
82static void OP_EM (int, int);
83static void OP_EX (int, int);
4d9567e0
MM
84static void OP_EMC (int,int);
85static void OP_MXC (int,int);
26ca5450
AJ
86static void OP_MS (int, int);
87static void OP_XS (int, int);
cc0ec051 88static void OP_M (int, int);
c0f3af97
L
89static void OP_VEX (int, int);
90static void OP_EX_Vex (int, int);
922d8de8 91static void OP_EX_VexW (int, int);
a683cc34 92static void OP_EX_VexImmW (int, int);
c0f3af97 93static void OP_XMM_Vex (int, int);
922d8de8 94static void OP_XMM_VexW (int, int);
43234a1e 95static void OP_Rounding (int, int);
c0f3af97
L
96static void OP_REG_VexI4 (int, int);
97static void PCLMUL_Fixup (int, int);
922d8de8 98static void VEXI4_Fixup (int, int);
c0f3af97
L
99static void VZERO_Fixup (int, int);
100static void VCMP_Fixup (int, int);
43234a1e 101static void VPCMP_Fixup (int, int);
cc0ec051 102static void OP_0f07 (int, int);
b844680a
L
103static void OP_Monitor (int, int);
104static void OP_Mwait (int, int);
9916071f 105static void OP_Mwaitx (int, int);
46e883c5
L
106static void NOP_Fixup1 (int, int);
107static void NOP_Fixup2 (int, int);
26ca5450 108static void OP_3DNowSuffix (int, int);
ad19981d 109static void CMP_Fixup (int, int);
26ca5450 110static void BadOp (void);
35c52694 111static void REP_Fixup (int, int);
7e8b059b 112static void BND_Fixup (int, int);
42164a71
L
113static void HLE_Fixup1 (int, int);
114static void HLE_Fixup2 (int, int);
115static void HLE_Fixup3 (int, int);
f5804c90 116static void CMPXCHG8B_Fixup (int, int);
42903f7f 117static void XMM_Fixup (int, int);
381d071f 118static void CRC32_Fixup (int, int);
eacc9c89 119static void FXSAVE_Fixup (int, int);
f88c9eb0
SP
120static void OP_LWPCB_E (int, int);
121static void OP_LWP_E (int, int);
5dd85c99
SP
122static void OP_Vex_2src_1 (int, int);
123static void OP_Vex_2src_2 (int, int);
c1e679ec 124
f1f8f695 125static void MOVBE_Fixup (int, int);
252b5132 126
43234a1e
L
127static void OP_Mask (int, int);
128
6608db57 129struct dis_private {
252b5132
RH
130 /* Points to first byte not fetched. */
131 bfd_byte *max_fetched;
0b1cf022 132 bfd_byte the_buffer[MAX_MNEM_SIZE];
252b5132 133 bfd_vma insn_start;
e396998b 134 int orig_sizeflag;
8df14d78 135 OPCODES_SIGJMP_BUF bailout;
252b5132
RH
136};
137
cb712a9e
L
138enum address_mode
139{
140 mode_16bit,
141 mode_32bit,
142 mode_64bit
143};
144
145enum address_mode address_mode;
52b15da3 146
5076851f
ILT
147/* Flags for the prefixes for the current instruction. See below. */
148static int prefixes;
149
52b15da3
JH
150/* REX prefix the current instruction. See below. */
151static int rex;
152/* Bits of REX we've already used. */
153static int rex_used;
d869730d 154/* REX bits in original REX prefix ignored. */
c0f3af97 155static int rex_ignored;
52b15da3
JH
156/* Mark parts used in the REX prefix. When we are testing for
157 empty prefix (for 8bit register REX extension), just mask it
158 out. Otherwise test for REX bit is excuse for existence of REX
159 only in case value is nonzero. */
160#define USED_REX(value) \
161 { \
162 if (value) \
161a04f6
L
163 { \
164 if ((rex & value)) \
165 rex_used |= (value) | REX_OPCODE; \
166 } \
52b15da3 167 else \
161a04f6 168 rex_used |= REX_OPCODE; \
52b15da3
JH
169 }
170
7d421014
ILT
171/* Flags for prefixes which we somehow handled when printing the
172 current instruction. */
173static int used_prefixes;
174
5076851f
ILT
175/* Flags stored in PREFIXES. */
176#define PREFIX_REPZ 1
177#define PREFIX_REPNZ 2
178#define PREFIX_LOCK 4
179#define PREFIX_CS 8
180#define PREFIX_SS 0x10
181#define PREFIX_DS 0x20
182#define PREFIX_ES 0x40
183#define PREFIX_FS 0x80
184#define PREFIX_GS 0x100
185#define PREFIX_DATA 0x200
186#define PREFIX_ADDR 0x400
187#define PREFIX_FWAIT 0x800
188
252b5132
RH
189/* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
190 to ADDR (exclusive) are valid. Returns 1 for success, longjmps
191 on error. */
192#define FETCH_DATA(info, addr) \
6608db57 193 ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
252b5132
RH
194 ? 1 : fetch_data ((info), (addr)))
195
196static int
26ca5450 197fetch_data (struct disassemble_info *info, bfd_byte *addr)
252b5132
RH
198{
199 int status;
6608db57 200 struct dis_private *priv = (struct dis_private *) info->private_data;
252b5132
RH
201 bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
202
0b1cf022 203 if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
272c9217
JB
204 status = (*info->read_memory_func) (start,
205 priv->max_fetched,
206 addr - priv->max_fetched,
207 info);
208 else
209 status = -1;
252b5132
RH
210 if (status != 0)
211 {
7d421014 212 /* If we did manage to read at least one byte, then
db6eb5be
AM
213 print_insn_i386 will do something sensible. Otherwise, print
214 an error. We do that here because this is where we know
215 STATUS. */
7d421014 216 if (priv->max_fetched == priv->the_buffer)
5076851f 217 (*info->memory_error_func) (status, start, info);
8df14d78 218 OPCODES_SIGLONGJMP (priv->bailout, 1);
252b5132
RH
219 }
220 else
221 priv->max_fetched = addr;
222 return 1;
223}
224
bf890a93 225/* Possible values for prefix requirement. */
507bd325
L
226#define PREFIX_IGNORED_SHIFT 16
227#define PREFIX_IGNORED_REPZ (PREFIX_REPZ << PREFIX_IGNORED_SHIFT)
228#define PREFIX_IGNORED_REPNZ (PREFIX_REPNZ << PREFIX_IGNORED_SHIFT)
229#define PREFIX_IGNORED_DATA (PREFIX_DATA << PREFIX_IGNORED_SHIFT)
230#define PREFIX_IGNORED_ADDR (PREFIX_ADDR << PREFIX_IGNORED_SHIFT)
231#define PREFIX_IGNORED_LOCK (PREFIX_LOCK << PREFIX_IGNORED_SHIFT)
232
233/* Opcode prefixes. */
234#define PREFIX_OPCODE (PREFIX_REPZ \
235 | PREFIX_REPNZ \
236 | PREFIX_DATA)
237
238/* Prefixes ignored. */
239#define PREFIX_IGNORED (PREFIX_IGNORED_REPZ \
240 | PREFIX_IGNORED_REPNZ \
241 | PREFIX_IGNORED_DATA)
bf890a93 242
ce518a5f 243#define XX { NULL, 0 }
507bd325 244#define Bad_Opcode NULL, { { NULL, 0 } }, 0
ce518a5f
L
245
246#define Eb { OP_E, b_mode }
7e8b059b 247#define Ebnd { OP_E, bnd_mode }
b6169b20 248#define EbS { OP_E, b_swap_mode }
ce518a5f 249#define Ev { OP_E, v_mode }
7e8b059b 250#define Ev_bnd { OP_E, v_bnd_mode }
b6169b20 251#define EvS { OP_E, v_swap_mode }
ce518a5f
L
252#define Ed { OP_E, d_mode }
253#define Edq { OP_E, dq_mode }
254#define Edqw { OP_E, dqw_mode }
1ba585e8 255#define EdqwS { OP_E, dqw_swap_mode }
42903f7f 256#define Edqb { OP_E, dqb_mode }
1ba585e8
IT
257#define Edb { OP_E, db_mode }
258#define Edw { OP_E, dw_mode }
42903f7f 259#define Edqd { OP_E, dqd_mode }
09335d05 260#define Eq { OP_E, q_mode }
ce518a5f
L
261#define indirEv { OP_indirE, stack_v_mode }
262#define indirEp { OP_indirE, f_mode }
263#define stackEv { OP_E, stack_v_mode }
264#define Em { OP_E, m_mode }
265#define Ew { OP_E, w_mode }
266#define M { OP_M, 0 } /* lea, lgdt, etc. */
34b772a6 267#define Ma { OP_M, a_mode }
b844680a 268#define Mb { OP_M, b_mode }
d9a5e5e5 269#define Md { OP_M, d_mode }
f1f8f695 270#define Mo { OP_M, o_mode }
ce518a5f
L
271#define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
272#define Mq { OP_M, q_mode }
4ee52178 273#define Mx { OP_M, x_mode }
c0f3af97 274#define Mxmm { OP_M, xmm_mode }
ce518a5f 275#define Gb { OP_G, b_mode }
7e8b059b 276#define Gbnd { OP_G, bnd_mode }
ce518a5f
L
277#define Gv { OP_G, v_mode }
278#define Gd { OP_G, d_mode }
279#define Gdq { OP_G, dq_mode }
280#define Gm { OP_G, m_mode }
281#define Gw { OP_G, w_mode }
6f74c397 282#define Rd { OP_R, d_mode }
43234a1e 283#define Rdq { OP_R, dq_mode }
6f74c397 284#define Rm { OP_R, m_mode }
ce518a5f
L
285#define Ib { OP_I, b_mode }
286#define sIb { OP_sI, b_mode } /* sign extened byte */
e3949f17 287#define sIbT { OP_sI, b_T_mode } /* sign extened byte like 'T' */
ce518a5f 288#define Iv { OP_I, v_mode }
7bb15c6f 289#define sIv { OP_sI, v_mode }
ce518a5f
L
290#define Iq { OP_I, q_mode }
291#define Iv64 { OP_I64, v_mode }
292#define Iw { OP_I, w_mode }
293#define I1 { OP_I, const_1_mode }
294#define Jb { OP_J, b_mode }
295#define Jv { OP_J, v_mode }
296#define Cm { OP_C, m_mode }
297#define Dm { OP_D, m_mode }
298#define Td { OP_T, d_mode }
b844680a 299#define Skip_MODRM { OP_Skip_MODRM, 0 }
ce518a5f
L
300
301#define RMeAX { OP_REG, eAX_reg }
302#define RMeBX { OP_REG, eBX_reg }
303#define RMeCX { OP_REG, eCX_reg }
304#define RMeDX { OP_REG, eDX_reg }
305#define RMeSP { OP_REG, eSP_reg }
306#define RMeBP { OP_REG, eBP_reg }
307#define RMeSI { OP_REG, eSI_reg }
308#define RMeDI { OP_REG, eDI_reg }
309#define RMrAX { OP_REG, rAX_reg }
310#define RMrBX { OP_REG, rBX_reg }
311#define RMrCX { OP_REG, rCX_reg }
312#define RMrDX { OP_REG, rDX_reg }
313#define RMrSP { OP_REG, rSP_reg }
314#define RMrBP { OP_REG, rBP_reg }
315#define RMrSI { OP_REG, rSI_reg }
316#define RMrDI { OP_REG, rDI_reg }
317#define RMAL { OP_REG, al_reg }
ce518a5f
L
318#define RMCL { OP_REG, cl_reg }
319#define RMDL { OP_REG, dl_reg }
320#define RMBL { OP_REG, bl_reg }
321#define RMAH { OP_REG, ah_reg }
322#define RMCH { OP_REG, ch_reg }
323#define RMDH { OP_REG, dh_reg }
324#define RMBH { OP_REG, bh_reg }
325#define RMAX { OP_REG, ax_reg }
326#define RMDX { OP_REG, dx_reg }
327
328#define eAX { OP_IMREG, eAX_reg }
329#define eBX { OP_IMREG, eBX_reg }
330#define eCX { OP_IMREG, eCX_reg }
331#define eDX { OP_IMREG, eDX_reg }
332#define eSP { OP_IMREG, eSP_reg }
333#define eBP { OP_IMREG, eBP_reg }
334#define eSI { OP_IMREG, eSI_reg }
335#define eDI { OP_IMREG, eDI_reg }
336#define AL { OP_IMREG, al_reg }
337#define CL { OP_IMREG, cl_reg }
338#define DL { OP_IMREG, dl_reg }
339#define BL { OP_IMREG, bl_reg }
340#define AH { OP_IMREG, ah_reg }
341#define CH { OP_IMREG, ch_reg }
342#define DH { OP_IMREG, dh_reg }
343#define BH { OP_IMREG, bh_reg }
344#define AX { OP_IMREG, ax_reg }
345#define DX { OP_IMREG, dx_reg }
346#define zAX { OP_IMREG, z_mode_ax_reg }
347#define indirDX { OP_IMREG, indir_dx_reg }
348
349#define Sw { OP_SEG, w_mode }
350#define Sv { OP_SEG, v_mode }
351#define Ap { OP_DIR, 0 }
352#define Ob { OP_OFF64, b_mode }
353#define Ov { OP_OFF64, v_mode }
354#define Xb { OP_DSreg, eSI_reg }
355#define Xv { OP_DSreg, eSI_reg }
356#define Xz { OP_DSreg, eSI_reg }
357#define Yb { OP_ESreg, eDI_reg }
358#define Yv { OP_ESreg, eDI_reg }
359#define DSBX { OP_DSreg, eBX_reg }
360
361#define es { OP_REG, es_reg }
362#define ss { OP_REG, ss_reg }
363#define cs { OP_REG, cs_reg }
364#define ds { OP_REG, ds_reg }
365#define fs { OP_REG, fs_reg }
366#define gs { OP_REG, gs_reg }
367
368#define MX { OP_MMX, 0 }
369#define XM { OP_XMM, 0 }
539f890d 370#define XMScalar { OP_XMM, scalar_mode }
6c30d220 371#define XMGatherQ { OP_XMM, vex_vsib_q_w_dq_mode }
c0f3af97 372#define XMM { OP_XMM, xmm_mode }
43234a1e 373#define XMxmmq { OP_XMM, xmmq_mode }
ce518a5f 374#define EM { OP_EM, v_mode }
b6169b20 375#define EMS { OP_EM, v_swap_mode }
09a2c6cf 376#define EMd { OP_EM, d_mode }
14051056 377#define EMx { OP_EM, x_mode }
8976381e 378#define EXw { OP_EX, w_mode }
09a2c6cf 379#define EXd { OP_EX, d_mode }
539f890d 380#define EXdScalar { OP_EX, d_scalar_mode }
fa99fab2 381#define EXdS { OP_EX, d_swap_mode }
43234a1e 382#define EXdScalarS { OP_EX, d_scalar_swap_mode }
09a2c6cf 383#define EXq { OP_EX, q_mode }
539f890d
L
384#define EXqScalar { OP_EX, q_scalar_mode }
385#define EXqScalarS { OP_EX, q_scalar_swap_mode }
b6169b20 386#define EXqS { OP_EX, q_swap_mode }
09a2c6cf 387#define EXx { OP_EX, x_mode }
b6169b20 388#define EXxS { OP_EX, x_swap_mode }
c0f3af97 389#define EXxmm { OP_EX, xmm_mode }
43234a1e 390#define EXymm { OP_EX, ymm_mode }
c0f3af97 391#define EXxmmq { OP_EX, xmmq_mode }
43234a1e 392#define EXEvexHalfBcstXmmq { OP_EX, evex_half_bcst_xmmq_mode }
6c30d220
L
393#define EXxmm_mb { OP_EX, xmm_mb_mode }
394#define EXxmm_mw { OP_EX, xmm_mw_mode }
395#define EXxmm_md { OP_EX, xmm_md_mode }
396#define EXxmm_mq { OP_EX, xmm_mq_mode }
43234a1e 397#define EXxmm_mdq { OP_EX, xmm_mdq_mode }
6c30d220
L
398#define EXxmmdw { OP_EX, xmmdw_mode }
399#define EXxmmqd { OP_EX, xmmqd_mode }
c0f3af97 400#define EXymmq { OP_EX, ymmq_mode }
0bfee649 401#define EXVexWdq { OP_EX, vex_w_dq_mode }
1c480963 402#define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
43234a1e
L
403#define EXEvexXGscat { OP_EX, evex_x_gscat_mode }
404#define EXEvexXNoBcst { OP_EX, evex_x_nobcst_mode }
ce518a5f
L
405#define MS { OP_MS, v_mode }
406#define XS { OP_XS, v_mode }
09335d05 407#define EMCq { OP_EMC, q_mode }
ce518a5f 408#define MXC { OP_MXC, 0 }
ce518a5f 409#define OPSUF { OP_3DNowSuffix, 0 }
ad19981d 410#define CMP { CMP_Fixup, 0 }
42903f7f 411#define XMM0 { XMM_Fixup, 0 }
eacc9c89 412#define FXSAVE { FXSAVE_Fixup, 0 }
5dd85c99
SP
413#define Vex_2src_1 { OP_Vex_2src_1, 0 }
414#define Vex_2src_2 { OP_Vex_2src_2, 0 }
252b5132 415
c0f3af97 416#define Vex { OP_VEX, vex_mode }
539f890d 417#define VexScalar { OP_VEX, vex_scalar_mode }
6c30d220 418#define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode }
c0f3af97
L
419#define Vex128 { OP_VEX, vex128_mode }
420#define Vex256 { OP_VEX, vex256_mode }
cb21baef 421#define VexGdq { OP_VEX, dq_mode }
922d8de8 422#define VexI4 { VEXI4_Fixup, 0}
c0f3af97 423#define EXdVex { OP_EX_Vex, d_mode }
fa99fab2 424#define EXdVexS { OP_EX_Vex, d_swap_mode }
539f890d 425#define EXdVexScalarS { OP_EX_Vex, d_scalar_swap_mode }
c0f3af97 426#define EXqVex { OP_EX_Vex, q_mode }
fa99fab2 427#define EXqVexS { OP_EX_Vex, q_swap_mode }
539f890d 428#define EXqVexScalarS { OP_EX_Vex, q_scalar_swap_mode }
922d8de8
DR
429#define EXVexW { OP_EX_VexW, x_mode }
430#define EXdVexW { OP_EX_VexW, d_mode }
431#define EXqVexW { OP_EX_VexW, q_mode }
a683cc34 432#define EXVexImmW { OP_EX_VexImmW, x_mode }
c0f3af97 433#define XMVex { OP_XMM_Vex, 0 }
539f890d 434#define XMVexScalar { OP_XMM_Vex, scalar_mode }
922d8de8 435#define XMVexW { OP_XMM_VexW, 0 }
c0f3af97
L
436#define XMVexI4 { OP_REG_VexI4, x_mode }
437#define PCLMUL { PCLMUL_Fixup, 0 }
438#define VZERO { VZERO_Fixup, 0 }
439#define VCMP { VCMP_Fixup, 0 }
43234a1e
L
440#define VPCMP { VPCMP_Fixup, 0 }
441
442#define EXxEVexR { OP_Rounding, evex_rounding_mode }
443#define EXxEVexS { OP_Rounding, evex_sae_mode }
444
445#define XMask { OP_Mask, mask_mode }
446#define MaskG { OP_G, mask_mode }
447#define MaskE { OP_E, mask_mode }
1ba585e8 448#define MaskBDE { OP_E, mask_bd_mode }
43234a1e
L
449#define MaskR { OP_R, mask_mode }
450#define MaskVex { OP_VEX, mask_mode }
c0f3af97 451
6c30d220 452#define MVexVSIBDWpX { OP_M, vex_vsib_d_w_dq_mode }
5fc35d96 453#define MVexVSIBDQWpX { OP_M, vex_vsib_d_w_d_mode }
6c30d220 454#define MVexVSIBQWpX { OP_M, vex_vsib_q_w_dq_mode }
5fc35d96 455#define MVexVSIBQDWpX { OP_M, vex_vsib_q_w_d_mode }
6c30d220 456
35c52694 457/* Used handle "rep" prefix for string instructions. */
ce518a5f
L
458#define Xbr { REP_Fixup, eSI_reg }
459#define Xvr { REP_Fixup, eSI_reg }
460#define Ybr { REP_Fixup, eDI_reg }
461#define Yvr { REP_Fixup, eDI_reg }
462#define Yzr { REP_Fixup, eDI_reg }
463#define indirDXr { REP_Fixup, indir_dx_reg }
464#define ALr { REP_Fixup, al_reg }
465#define eAXr { REP_Fixup, eAX_reg }
466
42164a71
L
467/* Used handle HLE prefix for lockable instructions. */
468#define Ebh1 { HLE_Fixup1, b_mode }
469#define Evh1 { HLE_Fixup1, v_mode }
470#define Ebh2 { HLE_Fixup2, b_mode }
471#define Evh2 { HLE_Fixup2, v_mode }
472#define Ebh3 { HLE_Fixup3, b_mode }
473#define Evh3 { HLE_Fixup3, v_mode }
474
7e8b059b
L
475#define BND { BND_Fixup, 0 }
476
ce518a5f
L
477#define cond_jump_flag { NULL, cond_jump_mode }
478#define loop_jcxz_flag { NULL, loop_jcxz_mode }
3ffd33cf 479
252b5132 480/* bits in sizeflag */
252b5132 481#define SUFFIX_ALWAYS 4
252b5132
RH
482#define AFLAG 2
483#define DFLAG 1
484
51e7da1b
L
485enum
486{
487 /* byte operand */
488 b_mode = 1,
489 /* byte operand with operand swapped */
3873ba12 490 b_swap_mode,
e3949f17
L
491 /* byte operand, sign extend like 'T' suffix */
492 b_T_mode,
51e7da1b 493 /* operand size depends on prefixes */
3873ba12 494 v_mode,
51e7da1b 495 /* operand size depends on prefixes with operand swapped */
3873ba12 496 v_swap_mode,
51e7da1b 497 /* word operand */
3873ba12 498 w_mode,
51e7da1b 499 /* double word operand */
3873ba12 500 d_mode,
51e7da1b 501 /* double word operand with operand swapped */
3873ba12 502 d_swap_mode,
51e7da1b 503 /* quad word operand */
3873ba12 504 q_mode,
51e7da1b 505 /* quad word operand with operand swapped */
3873ba12 506 q_swap_mode,
51e7da1b 507 /* ten-byte operand */
3873ba12 508 t_mode,
43234a1e
L
509 /* 16-byte XMM, 32-byte YMM or 64-byte ZMM operand. In EVEX with
510 broadcast enabled. */
3873ba12 511 x_mode,
43234a1e
L
512 /* Similar to x_mode, but with different EVEX mem shifts. */
513 evex_x_gscat_mode,
514 /* Similar to x_mode, but with disabled broadcast. */
515 evex_x_nobcst_mode,
516 /* Similar to x_mode, but with operands swapped and disabled broadcast
517 in EVEX. */
3873ba12 518 x_swap_mode,
51e7da1b 519 /* 16-byte XMM operand */
3873ba12 520 xmm_mode,
43234a1e
L
521 /* XMM, XMM or YMM register operand, or quad word, xmmword or ymmword
522 memory operand (depending on vector length). Broadcast isn't
523 allowed. */
3873ba12 524 xmmq_mode,
43234a1e
L
525 /* Same as xmmq_mode, but broadcast is allowed. */
526 evex_half_bcst_xmmq_mode,
6c30d220
L
527 /* XMM register or byte memory operand */
528 xmm_mb_mode,
529 /* XMM register or word memory operand */
530 xmm_mw_mode,
531 /* XMM register or double word memory operand */
532 xmm_md_mode,
533 /* XMM register or quad word memory operand */
534 xmm_mq_mode,
43234a1e
L
535 /* XMM register or double/quad word memory operand, depending on
536 VEX.W. */
537 xmm_mdq_mode,
538 /* 16-byte XMM, word, double word or quad word operand. */
6c30d220 539 xmmdw_mode,
43234a1e 540 /* 16-byte XMM, double word, quad word operand or xmm word operand. */
6c30d220 541 xmmqd_mode,
43234a1e
L
542 /* 32-byte YMM operand */
543 ymm_mode,
544 /* quad word, ymmword or zmmword memory operand. */
3873ba12 545 ymmq_mode,
6c30d220
L
546 /* 32-byte YMM or 16-byte word operand */
547 ymmxmm_mode,
51e7da1b 548 /* d_mode in 32bit, q_mode in 64bit mode. */
3873ba12 549 m_mode,
51e7da1b 550 /* pair of v_mode operands */
3873ba12
L
551 a_mode,
552 cond_jump_mode,
553 loop_jcxz_mode,
7e8b059b 554 v_bnd_mode,
51e7da1b 555 /* operand size depends on REX prefixes. */
3873ba12 556 dq_mode,
51e7da1b 557 /* registers like dq_mode, memory like w_mode. */
3873ba12 558 dqw_mode,
1ba585e8 559 dqw_swap_mode,
7e8b059b 560 bnd_mode,
51e7da1b 561 /* 4- or 6-byte pointer operand */
3873ba12
L
562 f_mode,
563 const_1_mode,
51e7da1b 564 /* v_mode for stack-related opcodes. */
3873ba12 565 stack_v_mode,
51e7da1b 566 /* non-quad operand size depends on prefixes */
3873ba12 567 z_mode,
51e7da1b 568 /* 16-byte operand */
3873ba12 569 o_mode,
51e7da1b 570 /* registers like dq_mode, memory like b_mode. */
3873ba12 571 dqb_mode,
1ba585e8
IT
572 /* registers like d_mode, memory like b_mode. */
573 db_mode,
574 /* registers like d_mode, memory like w_mode. */
575 dw_mode,
51e7da1b 576 /* registers like dq_mode, memory like d_mode. */
3873ba12 577 dqd_mode,
51e7da1b 578 /* normal vex mode */
3873ba12 579 vex_mode,
51e7da1b 580 /* 128bit vex mode */
3873ba12 581 vex128_mode,
51e7da1b 582 /* 256bit vex mode */
3873ba12 583 vex256_mode,
51e7da1b 584 /* operand size depends on the VEX.W bit. */
3873ba12 585 vex_w_dq_mode,
d55ee72f 586
6c30d220
L
587 /* Similar to vex_w_dq_mode, with VSIB dword indices. */
588 vex_vsib_d_w_dq_mode,
5fc35d96
IT
589 /* Similar to vex_vsib_d_w_dq_mode, with smaller memory. */
590 vex_vsib_d_w_d_mode,
6c30d220
L
591 /* Similar to vex_w_dq_mode, with VSIB qword indices. */
592 vex_vsib_q_w_dq_mode,
5fc35d96
IT
593 /* Similar to vex_vsib_q_w_dq_mode, with smaller memory. */
594 vex_vsib_q_w_d_mode,
6c30d220 595
539f890d
L
596 /* scalar, ignore vector length. */
597 scalar_mode,
598 /* like d_mode, ignore vector length. */
599 d_scalar_mode,
600 /* like d_swap_mode, ignore vector length. */
601 d_scalar_swap_mode,
602 /* like q_mode, ignore vector length. */
603 q_scalar_mode,
604 /* like q_swap_mode, ignore vector length. */
605 q_scalar_swap_mode,
606 /* like vex_mode, ignore vector length. */
607 vex_scalar_mode,
1c480963
L
608 /* like vex_w_dq_mode, ignore vector length. */
609 vex_scalar_w_dq_mode,
539f890d 610
43234a1e
L
611 /* Static rounding. */
612 evex_rounding_mode,
613 /* Supress all exceptions. */
614 evex_sae_mode,
615
616 /* Mask register operand. */
617 mask_mode,
1ba585e8
IT
618 /* Mask register operand. */
619 mask_bd_mode,
43234a1e 620
3873ba12
L
621 es_reg,
622 cs_reg,
623 ss_reg,
624 ds_reg,
625 fs_reg,
626 gs_reg,
d55ee72f 627
3873ba12
L
628 eAX_reg,
629 eCX_reg,
630 eDX_reg,
631 eBX_reg,
632 eSP_reg,
633 eBP_reg,
634 eSI_reg,
635 eDI_reg,
d55ee72f 636
3873ba12
L
637 al_reg,
638 cl_reg,
639 dl_reg,
640 bl_reg,
641 ah_reg,
642 ch_reg,
643 dh_reg,
644 bh_reg,
d55ee72f 645
3873ba12
L
646 ax_reg,
647 cx_reg,
648 dx_reg,
649 bx_reg,
650 sp_reg,
651 bp_reg,
652 si_reg,
653 di_reg,
d55ee72f 654
3873ba12
L
655 rAX_reg,
656 rCX_reg,
657 rDX_reg,
658 rBX_reg,
659 rSP_reg,
660 rBP_reg,
661 rSI_reg,
662 rDI_reg,
d55ee72f 663
3873ba12
L
664 z_mode_ax_reg,
665 indir_dx_reg
51e7da1b 666};
252b5132 667
51e7da1b
L
668enum
669{
670 FLOATCODE = 1,
3873ba12
L
671 USE_REG_TABLE,
672 USE_MOD_TABLE,
673 USE_RM_TABLE,
674 USE_PREFIX_TABLE,
675 USE_X86_64_TABLE,
676 USE_3BYTE_TABLE,
f88c9eb0 677 USE_XOP_8F_TABLE,
3873ba12
L
678 USE_VEX_C4_TABLE,
679 USE_VEX_C5_TABLE,
9e30b8e0 680 USE_VEX_LEN_TABLE,
43234a1e
L
681 USE_VEX_W_TABLE,
682 USE_EVEX_TABLE
51e7da1b 683};
6439fc28 684
bf890a93 685#define FLOAT NULL, { { NULL, FLOATCODE } }, 0
4efba78c 686
bf890a93
IT
687#define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }, 0
688#define DIS386_PREFIX(T, I, P) NULL, { { NULL, (T)}, { NULL, (I) } }, P
1ceb70f8
L
689#define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
690#define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
691#define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
692#define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
4e7d34a6
L
693#define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
694#define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
bf890a93 695#define THREE_BYTE_TABLE_PREFIX(I, P) DIS386_PREFIX (USE_3BYTE_TABLE, (I), P)
f88c9eb0 696#define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
c0f3af97
L
697#define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
698#define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
699#define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
9e30b8e0 700#define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
43234a1e 701#define EVEX_TABLE(I) DIS386 (USE_EVEX_TABLE, (I))
1ceb70f8 702
51e7da1b
L
703enum
704{
705 REG_80 = 0,
3873ba12
L
706 REG_81,
707 REG_82,
708 REG_8F,
709 REG_C0,
710 REG_C1,
711 REG_C6,
712 REG_C7,
713 REG_D0,
714 REG_D1,
715 REG_D2,
716 REG_D3,
717 REG_F6,
718 REG_F7,
719 REG_FE,
720 REG_FF,
721 REG_0F00,
722 REG_0F01,
723 REG_0F0D,
724 REG_0F18,
725 REG_0F71,
726 REG_0F72,
727 REG_0F73,
728 REG_0FA6,
729 REG_0FA7,
730 REG_0FAE,
731 REG_0FBA,
732 REG_0FC7,
592a252b
L
733 REG_VEX_0F71,
734 REG_VEX_0F72,
735 REG_VEX_0F73,
736 REG_VEX_0FAE,
f12dc422 737 REG_VEX_0F38F3,
f88c9eb0 738 REG_XOP_LWPCB,
2a2a0f38
QN
739 REG_XOP_LWP,
740 REG_XOP_TBM_01,
43234a1e
L
741 REG_XOP_TBM_02,
742
1ba585e8 743 REG_EVEX_0F71,
43234a1e
L
744 REG_EVEX_0F72,
745 REG_EVEX_0F73,
746 REG_EVEX_0F38C6,
747 REG_EVEX_0F38C7
51e7da1b 748};
1ceb70f8 749
51e7da1b
L
750enum
751{
752 MOD_8D = 0,
42164a71
L
753 MOD_C6_REG_7,
754 MOD_C7_REG_7,
4a357820
MZ
755 MOD_FF_REG_3,
756 MOD_FF_REG_5,
3873ba12
L
757 MOD_0F01_REG_0,
758 MOD_0F01_REG_1,
759 MOD_0F01_REG_2,
760 MOD_0F01_REG_3,
761 MOD_0F01_REG_7,
762 MOD_0F12_PREFIX_0,
763 MOD_0F13,
764 MOD_0F16_PREFIX_0,
765 MOD_0F17,
766 MOD_0F18_REG_0,
767 MOD_0F18_REG_1,
768 MOD_0F18_REG_2,
769 MOD_0F18_REG_3,
d7189fa5
RM
770 MOD_0F18_REG_4,
771 MOD_0F18_REG_5,
772 MOD_0F18_REG_6,
773 MOD_0F18_REG_7,
7e8b059b
L
774 MOD_0F1A_PREFIX_0,
775 MOD_0F1B_PREFIX_0,
776 MOD_0F1B_PREFIX_1,
3873ba12
L
777 MOD_0F24,
778 MOD_0F26,
779 MOD_0F2B_PREFIX_0,
780 MOD_0F2B_PREFIX_1,
781 MOD_0F2B_PREFIX_2,
782 MOD_0F2B_PREFIX_3,
783 MOD_0F51,
784 MOD_0F71_REG_2,
785 MOD_0F71_REG_4,
786 MOD_0F71_REG_6,
787 MOD_0F72_REG_2,
788 MOD_0F72_REG_4,
789 MOD_0F72_REG_6,
790 MOD_0F73_REG_2,
791 MOD_0F73_REG_3,
792 MOD_0F73_REG_6,
793 MOD_0F73_REG_7,
794 MOD_0FAE_REG_0,
795 MOD_0FAE_REG_1,
796 MOD_0FAE_REG_2,
797 MOD_0FAE_REG_3,
798 MOD_0FAE_REG_4,
799 MOD_0FAE_REG_5,
800 MOD_0FAE_REG_6,
801 MOD_0FAE_REG_7,
802 MOD_0FB2,
803 MOD_0FB4,
804 MOD_0FB5,
a8484f96 805 MOD_0FC3,
963f3586
IT
806 MOD_0FC7_REG_3,
807 MOD_0FC7_REG_4,
808 MOD_0FC7_REG_5,
3873ba12
L
809 MOD_0FC7_REG_6,
810 MOD_0FC7_REG_7,
811 MOD_0FD7,
812 MOD_0FE7_PREFIX_2,
813 MOD_0FF0_PREFIX_3,
814 MOD_0F382A_PREFIX_2,
815 MOD_62_32BIT,
816 MOD_C4_32BIT,
817 MOD_C5_32BIT,
592a252b
L
818 MOD_VEX_0F12_PREFIX_0,
819 MOD_VEX_0F13,
820 MOD_VEX_0F16_PREFIX_0,
821 MOD_VEX_0F17,
822 MOD_VEX_0F2B,
823 MOD_VEX_0F50,
824 MOD_VEX_0F71_REG_2,
825 MOD_VEX_0F71_REG_4,
826 MOD_VEX_0F71_REG_6,
827 MOD_VEX_0F72_REG_2,
828 MOD_VEX_0F72_REG_4,
829 MOD_VEX_0F72_REG_6,
830 MOD_VEX_0F73_REG_2,
831 MOD_VEX_0F73_REG_3,
832 MOD_VEX_0F73_REG_6,
833 MOD_VEX_0F73_REG_7,
834 MOD_VEX_0FAE_REG_2,
835 MOD_VEX_0FAE_REG_3,
836 MOD_VEX_0FD7_PREFIX_2,
837 MOD_VEX_0FE7_PREFIX_2,
838 MOD_VEX_0FF0_PREFIX_3,
592a252b
L
839 MOD_VEX_0F381A_PREFIX_2,
840 MOD_VEX_0F382A_PREFIX_2,
841 MOD_VEX_0F382C_PREFIX_2,
842 MOD_VEX_0F382D_PREFIX_2,
843 MOD_VEX_0F382E_PREFIX_2,
6c30d220
L
844 MOD_VEX_0F382F_PREFIX_2,
845 MOD_VEX_0F385A_PREFIX_2,
846 MOD_VEX_0F388C_PREFIX_2,
847 MOD_VEX_0F388E_PREFIX_2,
43234a1e
L
848
849 MOD_EVEX_0F10_PREFIX_1,
850 MOD_EVEX_0F10_PREFIX_3,
851 MOD_EVEX_0F11_PREFIX_1,
852 MOD_EVEX_0F11_PREFIX_3,
853 MOD_EVEX_0F12_PREFIX_0,
854 MOD_EVEX_0F16_PREFIX_0,
855 MOD_EVEX_0F38C6_REG_1,
856 MOD_EVEX_0F38C6_REG_2,
857 MOD_EVEX_0F38C6_REG_5,
858 MOD_EVEX_0F38C6_REG_6,
859 MOD_EVEX_0F38C7_REG_1,
860 MOD_EVEX_0F38C7_REG_2,
861 MOD_EVEX_0F38C7_REG_5,
862 MOD_EVEX_0F38C7_REG_6
51e7da1b 863};
1ceb70f8 864
51e7da1b
L
865enum
866{
42164a71
L
867 RM_C6_REG_7 = 0,
868 RM_C7_REG_7,
869 RM_0F01_REG_0,
3873ba12
L
870 RM_0F01_REG_1,
871 RM_0F01_REG_2,
872 RM_0F01_REG_3,
873 RM_0F01_REG_7,
874 RM_0FAE_REG_5,
875 RM_0FAE_REG_6,
876 RM_0FAE_REG_7
51e7da1b 877};
1ceb70f8 878
51e7da1b
L
879enum
880{
881 PREFIX_90 = 0,
3873ba12
L
882 PREFIX_0F10,
883 PREFIX_0F11,
884 PREFIX_0F12,
885 PREFIX_0F16,
7e8b059b
L
886 PREFIX_0F1A,
887 PREFIX_0F1B,
3873ba12
L
888 PREFIX_0F2A,
889 PREFIX_0F2B,
890 PREFIX_0F2C,
891 PREFIX_0F2D,
892 PREFIX_0F2E,
893 PREFIX_0F2F,
894 PREFIX_0F51,
895 PREFIX_0F52,
896 PREFIX_0F53,
897 PREFIX_0F58,
898 PREFIX_0F59,
899 PREFIX_0F5A,
900 PREFIX_0F5B,
901 PREFIX_0F5C,
902 PREFIX_0F5D,
903 PREFIX_0F5E,
904 PREFIX_0F5F,
905 PREFIX_0F60,
906 PREFIX_0F61,
907 PREFIX_0F62,
908 PREFIX_0F6C,
909 PREFIX_0F6D,
910 PREFIX_0F6F,
911 PREFIX_0F70,
912 PREFIX_0F73_REG_3,
913 PREFIX_0F73_REG_7,
914 PREFIX_0F78,
915 PREFIX_0F79,
916 PREFIX_0F7C,
917 PREFIX_0F7D,
918 PREFIX_0F7E,
919 PREFIX_0F7F,
c7b8aa3a
L
920 PREFIX_0FAE_REG_0,
921 PREFIX_0FAE_REG_1,
922 PREFIX_0FAE_REG_2,
923 PREFIX_0FAE_REG_3,
c5e7287a 924 PREFIX_0FAE_REG_6,
963f3586 925 PREFIX_0FAE_REG_7,
9d8596f0 926 PREFIX_RM_0_0FAE_REG_7,
3873ba12 927 PREFIX_0FB8,
f12dc422 928 PREFIX_0FBC,
3873ba12
L
929 PREFIX_0FBD,
930 PREFIX_0FC2,
a8484f96 931 PREFIX_MOD_0_0FC3,
f24bcbaa
L
932 PREFIX_MOD_0_0FC7_REG_6,
933 PREFIX_MOD_3_0FC7_REG_6,
934 PREFIX_MOD_3_0FC7_REG_7,
3873ba12
L
935 PREFIX_0FD0,
936 PREFIX_0FD6,
937 PREFIX_0FE6,
938 PREFIX_0FE7,
939 PREFIX_0FF0,
940 PREFIX_0FF7,
941 PREFIX_0F3810,
942 PREFIX_0F3814,
943 PREFIX_0F3815,
944 PREFIX_0F3817,
945 PREFIX_0F3820,
946 PREFIX_0F3821,
947 PREFIX_0F3822,
948 PREFIX_0F3823,
949 PREFIX_0F3824,
950 PREFIX_0F3825,
951 PREFIX_0F3828,
952 PREFIX_0F3829,
953 PREFIX_0F382A,
954 PREFIX_0F382B,
955 PREFIX_0F3830,
956 PREFIX_0F3831,
957 PREFIX_0F3832,
958 PREFIX_0F3833,
959 PREFIX_0F3834,
960 PREFIX_0F3835,
961 PREFIX_0F3837,
962 PREFIX_0F3838,
963 PREFIX_0F3839,
964 PREFIX_0F383A,
965 PREFIX_0F383B,
966 PREFIX_0F383C,
967 PREFIX_0F383D,
968 PREFIX_0F383E,
969 PREFIX_0F383F,
970 PREFIX_0F3840,
971 PREFIX_0F3841,
972 PREFIX_0F3880,
973 PREFIX_0F3881,
6c30d220 974 PREFIX_0F3882,
a0046408
L
975 PREFIX_0F38C8,
976 PREFIX_0F38C9,
977 PREFIX_0F38CA,
978 PREFIX_0F38CB,
979 PREFIX_0F38CC,
980 PREFIX_0F38CD,
3873ba12
L
981 PREFIX_0F38DB,
982 PREFIX_0F38DC,
983 PREFIX_0F38DD,
984 PREFIX_0F38DE,
985 PREFIX_0F38DF,
986 PREFIX_0F38F0,
987 PREFIX_0F38F1,
e2e1fcde 988 PREFIX_0F38F6,
3873ba12
L
989 PREFIX_0F3A08,
990 PREFIX_0F3A09,
991 PREFIX_0F3A0A,
992 PREFIX_0F3A0B,
993 PREFIX_0F3A0C,
994 PREFIX_0F3A0D,
995 PREFIX_0F3A0E,
996 PREFIX_0F3A14,
997 PREFIX_0F3A15,
998 PREFIX_0F3A16,
999 PREFIX_0F3A17,
1000 PREFIX_0F3A20,
1001 PREFIX_0F3A21,
1002 PREFIX_0F3A22,
1003 PREFIX_0F3A40,
1004 PREFIX_0F3A41,
1005 PREFIX_0F3A42,
1006 PREFIX_0F3A44,
1007 PREFIX_0F3A60,
1008 PREFIX_0F3A61,
1009 PREFIX_0F3A62,
1010 PREFIX_0F3A63,
a0046408 1011 PREFIX_0F3ACC,
3873ba12 1012 PREFIX_0F3ADF,
592a252b
L
1013 PREFIX_VEX_0F10,
1014 PREFIX_VEX_0F11,
1015 PREFIX_VEX_0F12,
1016 PREFIX_VEX_0F16,
1017 PREFIX_VEX_0F2A,
1018 PREFIX_VEX_0F2C,
1019 PREFIX_VEX_0F2D,
1020 PREFIX_VEX_0F2E,
1021 PREFIX_VEX_0F2F,
43234a1e
L
1022 PREFIX_VEX_0F41,
1023 PREFIX_VEX_0F42,
1024 PREFIX_VEX_0F44,
1025 PREFIX_VEX_0F45,
1026 PREFIX_VEX_0F46,
1027 PREFIX_VEX_0F47,
1ba585e8 1028 PREFIX_VEX_0F4A,
43234a1e 1029 PREFIX_VEX_0F4B,
592a252b
L
1030 PREFIX_VEX_0F51,
1031 PREFIX_VEX_0F52,
1032 PREFIX_VEX_0F53,
1033 PREFIX_VEX_0F58,
1034 PREFIX_VEX_0F59,
1035 PREFIX_VEX_0F5A,
1036 PREFIX_VEX_0F5B,
1037 PREFIX_VEX_0F5C,
1038 PREFIX_VEX_0F5D,
1039 PREFIX_VEX_0F5E,
1040 PREFIX_VEX_0F5F,
1041 PREFIX_VEX_0F60,
1042 PREFIX_VEX_0F61,
1043 PREFIX_VEX_0F62,
1044 PREFIX_VEX_0F63,
1045 PREFIX_VEX_0F64,
1046 PREFIX_VEX_0F65,
1047 PREFIX_VEX_0F66,
1048 PREFIX_VEX_0F67,
1049 PREFIX_VEX_0F68,
1050 PREFIX_VEX_0F69,
1051 PREFIX_VEX_0F6A,
1052 PREFIX_VEX_0F6B,
1053 PREFIX_VEX_0F6C,
1054 PREFIX_VEX_0F6D,
1055 PREFIX_VEX_0F6E,
1056 PREFIX_VEX_0F6F,
1057 PREFIX_VEX_0F70,
1058 PREFIX_VEX_0F71_REG_2,
1059 PREFIX_VEX_0F71_REG_4,
1060 PREFIX_VEX_0F71_REG_6,
1061 PREFIX_VEX_0F72_REG_2,
1062 PREFIX_VEX_0F72_REG_4,
1063 PREFIX_VEX_0F72_REG_6,
1064 PREFIX_VEX_0F73_REG_2,
1065 PREFIX_VEX_0F73_REG_3,
1066 PREFIX_VEX_0F73_REG_6,
1067 PREFIX_VEX_0F73_REG_7,
1068 PREFIX_VEX_0F74,
1069 PREFIX_VEX_0F75,
1070 PREFIX_VEX_0F76,
1071 PREFIX_VEX_0F77,
1072 PREFIX_VEX_0F7C,
1073 PREFIX_VEX_0F7D,
1074 PREFIX_VEX_0F7E,
1075 PREFIX_VEX_0F7F,
43234a1e
L
1076 PREFIX_VEX_0F90,
1077 PREFIX_VEX_0F91,
1078 PREFIX_VEX_0F92,
1079 PREFIX_VEX_0F93,
1080 PREFIX_VEX_0F98,
1ba585e8 1081 PREFIX_VEX_0F99,
592a252b
L
1082 PREFIX_VEX_0FC2,
1083 PREFIX_VEX_0FC4,
1084 PREFIX_VEX_0FC5,
1085 PREFIX_VEX_0FD0,
1086 PREFIX_VEX_0FD1,
1087 PREFIX_VEX_0FD2,
1088 PREFIX_VEX_0FD3,
1089 PREFIX_VEX_0FD4,
1090 PREFIX_VEX_0FD5,
1091 PREFIX_VEX_0FD6,
1092 PREFIX_VEX_0FD7,
1093 PREFIX_VEX_0FD8,
1094 PREFIX_VEX_0FD9,
1095 PREFIX_VEX_0FDA,
1096 PREFIX_VEX_0FDB,
1097 PREFIX_VEX_0FDC,
1098 PREFIX_VEX_0FDD,
1099 PREFIX_VEX_0FDE,
1100 PREFIX_VEX_0FDF,
1101 PREFIX_VEX_0FE0,
1102 PREFIX_VEX_0FE1,
1103 PREFIX_VEX_0FE2,
1104 PREFIX_VEX_0FE3,
1105 PREFIX_VEX_0FE4,
1106 PREFIX_VEX_0FE5,
1107 PREFIX_VEX_0FE6,
1108 PREFIX_VEX_0FE7,
1109 PREFIX_VEX_0FE8,
1110 PREFIX_VEX_0FE9,
1111 PREFIX_VEX_0FEA,
1112 PREFIX_VEX_0FEB,
1113 PREFIX_VEX_0FEC,
1114 PREFIX_VEX_0FED,
1115 PREFIX_VEX_0FEE,
1116 PREFIX_VEX_0FEF,
1117 PREFIX_VEX_0FF0,
1118 PREFIX_VEX_0FF1,
1119 PREFIX_VEX_0FF2,
1120 PREFIX_VEX_0FF3,
1121 PREFIX_VEX_0FF4,
1122 PREFIX_VEX_0FF5,
1123 PREFIX_VEX_0FF6,
1124 PREFIX_VEX_0FF7,
1125 PREFIX_VEX_0FF8,
1126 PREFIX_VEX_0FF9,
1127 PREFIX_VEX_0FFA,
1128 PREFIX_VEX_0FFB,
1129 PREFIX_VEX_0FFC,
1130 PREFIX_VEX_0FFD,
1131 PREFIX_VEX_0FFE,
1132 PREFIX_VEX_0F3800,
1133 PREFIX_VEX_0F3801,
1134 PREFIX_VEX_0F3802,
1135 PREFIX_VEX_0F3803,
1136 PREFIX_VEX_0F3804,
1137 PREFIX_VEX_0F3805,
1138 PREFIX_VEX_0F3806,
1139 PREFIX_VEX_0F3807,
1140 PREFIX_VEX_0F3808,
1141 PREFIX_VEX_0F3809,
1142 PREFIX_VEX_0F380A,
1143 PREFIX_VEX_0F380B,
1144 PREFIX_VEX_0F380C,
1145 PREFIX_VEX_0F380D,
1146 PREFIX_VEX_0F380E,
1147 PREFIX_VEX_0F380F,
1148 PREFIX_VEX_0F3813,
6c30d220 1149 PREFIX_VEX_0F3816,
592a252b
L
1150 PREFIX_VEX_0F3817,
1151 PREFIX_VEX_0F3818,
1152 PREFIX_VEX_0F3819,
1153 PREFIX_VEX_0F381A,
1154 PREFIX_VEX_0F381C,
1155 PREFIX_VEX_0F381D,
1156 PREFIX_VEX_0F381E,
1157 PREFIX_VEX_0F3820,
1158 PREFIX_VEX_0F3821,
1159 PREFIX_VEX_0F3822,
1160 PREFIX_VEX_0F3823,
1161 PREFIX_VEX_0F3824,
1162 PREFIX_VEX_0F3825,
1163 PREFIX_VEX_0F3828,
1164 PREFIX_VEX_0F3829,
1165 PREFIX_VEX_0F382A,
1166 PREFIX_VEX_0F382B,
1167 PREFIX_VEX_0F382C,
1168 PREFIX_VEX_0F382D,
1169 PREFIX_VEX_0F382E,
1170 PREFIX_VEX_0F382F,
1171 PREFIX_VEX_0F3830,
1172 PREFIX_VEX_0F3831,
1173 PREFIX_VEX_0F3832,
1174 PREFIX_VEX_0F3833,
1175 PREFIX_VEX_0F3834,
1176 PREFIX_VEX_0F3835,
6c30d220 1177 PREFIX_VEX_0F3836,
592a252b
L
1178 PREFIX_VEX_0F3837,
1179 PREFIX_VEX_0F3838,
1180 PREFIX_VEX_0F3839,
1181 PREFIX_VEX_0F383A,
1182 PREFIX_VEX_0F383B,
1183 PREFIX_VEX_0F383C,
1184 PREFIX_VEX_0F383D,
1185 PREFIX_VEX_0F383E,
1186 PREFIX_VEX_0F383F,
1187 PREFIX_VEX_0F3840,
1188 PREFIX_VEX_0F3841,
6c30d220
L
1189 PREFIX_VEX_0F3845,
1190 PREFIX_VEX_0F3846,
1191 PREFIX_VEX_0F3847,
1192 PREFIX_VEX_0F3858,
1193 PREFIX_VEX_0F3859,
1194 PREFIX_VEX_0F385A,
1195 PREFIX_VEX_0F3878,
1196 PREFIX_VEX_0F3879,
1197 PREFIX_VEX_0F388C,
1198 PREFIX_VEX_0F388E,
1199 PREFIX_VEX_0F3890,
1200 PREFIX_VEX_0F3891,
1201 PREFIX_VEX_0F3892,
1202 PREFIX_VEX_0F3893,
592a252b
L
1203 PREFIX_VEX_0F3896,
1204 PREFIX_VEX_0F3897,
1205 PREFIX_VEX_0F3898,
1206 PREFIX_VEX_0F3899,
1207 PREFIX_VEX_0F389A,
1208 PREFIX_VEX_0F389B,
1209 PREFIX_VEX_0F389C,
1210 PREFIX_VEX_0F389D,
1211 PREFIX_VEX_0F389E,
1212 PREFIX_VEX_0F389F,
1213 PREFIX_VEX_0F38A6,
1214 PREFIX_VEX_0F38A7,
1215 PREFIX_VEX_0F38A8,
1216 PREFIX_VEX_0F38A9,
1217 PREFIX_VEX_0F38AA,
1218 PREFIX_VEX_0F38AB,
1219 PREFIX_VEX_0F38AC,
1220 PREFIX_VEX_0F38AD,
1221 PREFIX_VEX_0F38AE,
1222 PREFIX_VEX_0F38AF,
1223 PREFIX_VEX_0F38B6,
1224 PREFIX_VEX_0F38B7,
1225 PREFIX_VEX_0F38B8,
1226 PREFIX_VEX_0F38B9,
1227 PREFIX_VEX_0F38BA,
1228 PREFIX_VEX_0F38BB,
1229 PREFIX_VEX_0F38BC,
1230 PREFIX_VEX_0F38BD,
1231 PREFIX_VEX_0F38BE,
1232 PREFIX_VEX_0F38BF,
1233 PREFIX_VEX_0F38DB,
1234 PREFIX_VEX_0F38DC,
1235 PREFIX_VEX_0F38DD,
1236 PREFIX_VEX_0F38DE,
1237 PREFIX_VEX_0F38DF,
f12dc422
L
1238 PREFIX_VEX_0F38F2,
1239 PREFIX_VEX_0F38F3_REG_1,
1240 PREFIX_VEX_0F38F3_REG_2,
1241 PREFIX_VEX_0F38F3_REG_3,
6c30d220
L
1242 PREFIX_VEX_0F38F5,
1243 PREFIX_VEX_0F38F6,
f12dc422 1244 PREFIX_VEX_0F38F7,
6c30d220
L
1245 PREFIX_VEX_0F3A00,
1246 PREFIX_VEX_0F3A01,
1247 PREFIX_VEX_0F3A02,
592a252b
L
1248 PREFIX_VEX_0F3A04,
1249 PREFIX_VEX_0F3A05,
1250 PREFIX_VEX_0F3A06,
1251 PREFIX_VEX_0F3A08,
1252 PREFIX_VEX_0F3A09,
1253 PREFIX_VEX_0F3A0A,
1254 PREFIX_VEX_0F3A0B,
1255 PREFIX_VEX_0F3A0C,
1256 PREFIX_VEX_0F3A0D,
1257 PREFIX_VEX_0F3A0E,
1258 PREFIX_VEX_0F3A0F,
1259 PREFIX_VEX_0F3A14,
1260 PREFIX_VEX_0F3A15,
1261 PREFIX_VEX_0F3A16,
1262 PREFIX_VEX_0F3A17,
1263 PREFIX_VEX_0F3A18,
1264 PREFIX_VEX_0F3A19,
1265 PREFIX_VEX_0F3A1D,
1266 PREFIX_VEX_0F3A20,
1267 PREFIX_VEX_0F3A21,
1268 PREFIX_VEX_0F3A22,
43234a1e 1269 PREFIX_VEX_0F3A30,
1ba585e8 1270 PREFIX_VEX_0F3A31,
43234a1e 1271 PREFIX_VEX_0F3A32,
1ba585e8 1272 PREFIX_VEX_0F3A33,
6c30d220
L
1273 PREFIX_VEX_0F3A38,
1274 PREFIX_VEX_0F3A39,
592a252b
L
1275 PREFIX_VEX_0F3A40,
1276 PREFIX_VEX_0F3A41,
1277 PREFIX_VEX_0F3A42,
1278 PREFIX_VEX_0F3A44,
6c30d220 1279 PREFIX_VEX_0F3A46,
592a252b
L
1280 PREFIX_VEX_0F3A48,
1281 PREFIX_VEX_0F3A49,
1282 PREFIX_VEX_0F3A4A,
1283 PREFIX_VEX_0F3A4B,
1284 PREFIX_VEX_0F3A4C,
1285 PREFIX_VEX_0F3A5C,
1286 PREFIX_VEX_0F3A5D,
1287 PREFIX_VEX_0F3A5E,
1288 PREFIX_VEX_0F3A5F,
1289 PREFIX_VEX_0F3A60,
1290 PREFIX_VEX_0F3A61,
1291 PREFIX_VEX_0F3A62,
1292 PREFIX_VEX_0F3A63,
1293 PREFIX_VEX_0F3A68,
1294 PREFIX_VEX_0F3A69,
1295 PREFIX_VEX_0F3A6A,
1296 PREFIX_VEX_0F3A6B,
1297 PREFIX_VEX_0F3A6C,
1298 PREFIX_VEX_0F3A6D,
1299 PREFIX_VEX_0F3A6E,
1300 PREFIX_VEX_0F3A6F,
1301 PREFIX_VEX_0F3A78,
1302 PREFIX_VEX_0F3A79,
1303 PREFIX_VEX_0F3A7A,
1304 PREFIX_VEX_0F3A7B,
1305 PREFIX_VEX_0F3A7C,
1306 PREFIX_VEX_0F3A7D,
1307 PREFIX_VEX_0F3A7E,
1308 PREFIX_VEX_0F3A7F,
6c30d220 1309 PREFIX_VEX_0F3ADF,
43234a1e
L
1310 PREFIX_VEX_0F3AF0,
1311
1312 PREFIX_EVEX_0F10,
1313 PREFIX_EVEX_0F11,
1314 PREFIX_EVEX_0F12,
1315 PREFIX_EVEX_0F13,
1316 PREFIX_EVEX_0F14,
1317 PREFIX_EVEX_0F15,
1318 PREFIX_EVEX_0F16,
1319 PREFIX_EVEX_0F17,
1320 PREFIX_EVEX_0F28,
1321 PREFIX_EVEX_0F29,
1322 PREFIX_EVEX_0F2A,
1323 PREFIX_EVEX_0F2B,
1324 PREFIX_EVEX_0F2C,
1325 PREFIX_EVEX_0F2D,
1326 PREFIX_EVEX_0F2E,
1327 PREFIX_EVEX_0F2F,
1328 PREFIX_EVEX_0F51,
90a915bf
IT
1329 PREFIX_EVEX_0F54,
1330 PREFIX_EVEX_0F55,
1331 PREFIX_EVEX_0F56,
1332 PREFIX_EVEX_0F57,
43234a1e
L
1333 PREFIX_EVEX_0F58,
1334 PREFIX_EVEX_0F59,
1335 PREFIX_EVEX_0F5A,
1336 PREFIX_EVEX_0F5B,
1337 PREFIX_EVEX_0F5C,
1338 PREFIX_EVEX_0F5D,
1339 PREFIX_EVEX_0F5E,
1340 PREFIX_EVEX_0F5F,
1ba585e8
IT
1341 PREFIX_EVEX_0F60,
1342 PREFIX_EVEX_0F61,
43234a1e 1343 PREFIX_EVEX_0F62,
1ba585e8
IT
1344 PREFIX_EVEX_0F63,
1345 PREFIX_EVEX_0F64,
1346 PREFIX_EVEX_0F65,
43234a1e 1347 PREFIX_EVEX_0F66,
1ba585e8
IT
1348 PREFIX_EVEX_0F67,
1349 PREFIX_EVEX_0F68,
1350 PREFIX_EVEX_0F69,
43234a1e 1351 PREFIX_EVEX_0F6A,
1ba585e8 1352 PREFIX_EVEX_0F6B,
43234a1e
L
1353 PREFIX_EVEX_0F6C,
1354 PREFIX_EVEX_0F6D,
1355 PREFIX_EVEX_0F6E,
1356 PREFIX_EVEX_0F6F,
1357 PREFIX_EVEX_0F70,
1ba585e8
IT
1358 PREFIX_EVEX_0F71_REG_2,
1359 PREFIX_EVEX_0F71_REG_4,
1360 PREFIX_EVEX_0F71_REG_6,
43234a1e
L
1361 PREFIX_EVEX_0F72_REG_0,
1362 PREFIX_EVEX_0F72_REG_1,
1363 PREFIX_EVEX_0F72_REG_2,
1364 PREFIX_EVEX_0F72_REG_4,
1365 PREFIX_EVEX_0F72_REG_6,
1366 PREFIX_EVEX_0F73_REG_2,
1ba585e8 1367 PREFIX_EVEX_0F73_REG_3,
43234a1e 1368 PREFIX_EVEX_0F73_REG_6,
1ba585e8
IT
1369 PREFIX_EVEX_0F73_REG_7,
1370 PREFIX_EVEX_0F74,
1371 PREFIX_EVEX_0F75,
43234a1e
L
1372 PREFIX_EVEX_0F76,
1373 PREFIX_EVEX_0F78,
1374 PREFIX_EVEX_0F79,
1375 PREFIX_EVEX_0F7A,
1376 PREFIX_EVEX_0F7B,
1377 PREFIX_EVEX_0F7E,
1378 PREFIX_EVEX_0F7F,
1379 PREFIX_EVEX_0FC2,
1ba585e8
IT
1380 PREFIX_EVEX_0FC4,
1381 PREFIX_EVEX_0FC5,
43234a1e 1382 PREFIX_EVEX_0FC6,
1ba585e8 1383 PREFIX_EVEX_0FD1,
43234a1e
L
1384 PREFIX_EVEX_0FD2,
1385 PREFIX_EVEX_0FD3,
1386 PREFIX_EVEX_0FD4,
1ba585e8 1387 PREFIX_EVEX_0FD5,
43234a1e 1388 PREFIX_EVEX_0FD6,
1ba585e8
IT
1389 PREFIX_EVEX_0FD8,
1390 PREFIX_EVEX_0FD9,
1391 PREFIX_EVEX_0FDA,
43234a1e 1392 PREFIX_EVEX_0FDB,
1ba585e8
IT
1393 PREFIX_EVEX_0FDC,
1394 PREFIX_EVEX_0FDD,
1395 PREFIX_EVEX_0FDE,
43234a1e 1396 PREFIX_EVEX_0FDF,
1ba585e8
IT
1397 PREFIX_EVEX_0FE0,
1398 PREFIX_EVEX_0FE1,
43234a1e 1399 PREFIX_EVEX_0FE2,
1ba585e8
IT
1400 PREFIX_EVEX_0FE3,
1401 PREFIX_EVEX_0FE4,
1402 PREFIX_EVEX_0FE5,
43234a1e
L
1403 PREFIX_EVEX_0FE6,
1404 PREFIX_EVEX_0FE7,
1ba585e8
IT
1405 PREFIX_EVEX_0FE8,
1406 PREFIX_EVEX_0FE9,
1407 PREFIX_EVEX_0FEA,
43234a1e 1408 PREFIX_EVEX_0FEB,
1ba585e8
IT
1409 PREFIX_EVEX_0FEC,
1410 PREFIX_EVEX_0FED,
1411 PREFIX_EVEX_0FEE,
43234a1e 1412 PREFIX_EVEX_0FEF,
1ba585e8 1413 PREFIX_EVEX_0FF1,
43234a1e
L
1414 PREFIX_EVEX_0FF2,
1415 PREFIX_EVEX_0FF3,
1416 PREFIX_EVEX_0FF4,
1ba585e8
IT
1417 PREFIX_EVEX_0FF5,
1418 PREFIX_EVEX_0FF6,
1419 PREFIX_EVEX_0FF8,
1420 PREFIX_EVEX_0FF9,
43234a1e
L
1421 PREFIX_EVEX_0FFA,
1422 PREFIX_EVEX_0FFB,
1ba585e8
IT
1423 PREFIX_EVEX_0FFC,
1424 PREFIX_EVEX_0FFD,
43234a1e 1425 PREFIX_EVEX_0FFE,
1ba585e8
IT
1426 PREFIX_EVEX_0F3800,
1427 PREFIX_EVEX_0F3804,
1428 PREFIX_EVEX_0F380B,
43234a1e
L
1429 PREFIX_EVEX_0F380C,
1430 PREFIX_EVEX_0F380D,
1ba585e8 1431 PREFIX_EVEX_0F3810,
43234a1e
L
1432 PREFIX_EVEX_0F3811,
1433 PREFIX_EVEX_0F3812,
1434 PREFIX_EVEX_0F3813,
1435 PREFIX_EVEX_0F3814,
1436 PREFIX_EVEX_0F3815,
1437 PREFIX_EVEX_0F3816,
1438 PREFIX_EVEX_0F3818,
1439 PREFIX_EVEX_0F3819,
1440 PREFIX_EVEX_0F381A,
1441 PREFIX_EVEX_0F381B,
1ba585e8
IT
1442 PREFIX_EVEX_0F381C,
1443 PREFIX_EVEX_0F381D,
43234a1e
L
1444 PREFIX_EVEX_0F381E,
1445 PREFIX_EVEX_0F381F,
1ba585e8 1446 PREFIX_EVEX_0F3820,
43234a1e
L
1447 PREFIX_EVEX_0F3821,
1448 PREFIX_EVEX_0F3822,
1449 PREFIX_EVEX_0F3823,
1450 PREFIX_EVEX_0F3824,
1451 PREFIX_EVEX_0F3825,
1ba585e8 1452 PREFIX_EVEX_0F3826,
43234a1e
L
1453 PREFIX_EVEX_0F3827,
1454 PREFIX_EVEX_0F3828,
1455 PREFIX_EVEX_0F3829,
1456 PREFIX_EVEX_0F382A,
1ba585e8 1457 PREFIX_EVEX_0F382B,
43234a1e
L
1458 PREFIX_EVEX_0F382C,
1459 PREFIX_EVEX_0F382D,
1ba585e8 1460 PREFIX_EVEX_0F3830,
43234a1e
L
1461 PREFIX_EVEX_0F3831,
1462 PREFIX_EVEX_0F3832,
1463 PREFIX_EVEX_0F3833,
1464 PREFIX_EVEX_0F3834,
1465 PREFIX_EVEX_0F3835,
1466 PREFIX_EVEX_0F3836,
1467 PREFIX_EVEX_0F3837,
1ba585e8 1468 PREFIX_EVEX_0F3838,
43234a1e
L
1469 PREFIX_EVEX_0F3839,
1470 PREFIX_EVEX_0F383A,
1471 PREFIX_EVEX_0F383B,
1ba585e8 1472 PREFIX_EVEX_0F383C,
43234a1e 1473 PREFIX_EVEX_0F383D,
1ba585e8 1474 PREFIX_EVEX_0F383E,
43234a1e
L
1475 PREFIX_EVEX_0F383F,
1476 PREFIX_EVEX_0F3840,
1477 PREFIX_EVEX_0F3842,
1478 PREFIX_EVEX_0F3843,
1479 PREFIX_EVEX_0F3844,
1480 PREFIX_EVEX_0F3845,
1481 PREFIX_EVEX_0F3846,
1482 PREFIX_EVEX_0F3847,
1483 PREFIX_EVEX_0F384C,
1484 PREFIX_EVEX_0F384D,
1485 PREFIX_EVEX_0F384E,
1486 PREFIX_EVEX_0F384F,
1487 PREFIX_EVEX_0F3858,
1488 PREFIX_EVEX_0F3859,
1489 PREFIX_EVEX_0F385A,
1490 PREFIX_EVEX_0F385B,
1491 PREFIX_EVEX_0F3864,
1492 PREFIX_EVEX_0F3865,
1ba585e8
IT
1493 PREFIX_EVEX_0F3866,
1494 PREFIX_EVEX_0F3875,
43234a1e
L
1495 PREFIX_EVEX_0F3876,
1496 PREFIX_EVEX_0F3877,
1ba585e8
IT
1497 PREFIX_EVEX_0F3878,
1498 PREFIX_EVEX_0F3879,
1499 PREFIX_EVEX_0F387A,
1500 PREFIX_EVEX_0F387B,
43234a1e 1501 PREFIX_EVEX_0F387C,
1ba585e8 1502 PREFIX_EVEX_0F387D,
43234a1e
L
1503 PREFIX_EVEX_0F387E,
1504 PREFIX_EVEX_0F387F,
14f195c9 1505 PREFIX_EVEX_0F3883,
43234a1e
L
1506 PREFIX_EVEX_0F3888,
1507 PREFIX_EVEX_0F3889,
1508 PREFIX_EVEX_0F388A,
1509 PREFIX_EVEX_0F388B,
1ba585e8 1510 PREFIX_EVEX_0F388D,
43234a1e
L
1511 PREFIX_EVEX_0F3890,
1512 PREFIX_EVEX_0F3891,
1513 PREFIX_EVEX_0F3892,
1514 PREFIX_EVEX_0F3893,
1515 PREFIX_EVEX_0F3896,
1516 PREFIX_EVEX_0F3897,
1517 PREFIX_EVEX_0F3898,
1518 PREFIX_EVEX_0F3899,
1519 PREFIX_EVEX_0F389A,
1520 PREFIX_EVEX_0F389B,
1521 PREFIX_EVEX_0F389C,
1522 PREFIX_EVEX_0F389D,
1523 PREFIX_EVEX_0F389E,
1524 PREFIX_EVEX_0F389F,
1525 PREFIX_EVEX_0F38A0,
1526 PREFIX_EVEX_0F38A1,
1527 PREFIX_EVEX_0F38A2,
1528 PREFIX_EVEX_0F38A3,
1529 PREFIX_EVEX_0F38A6,
1530 PREFIX_EVEX_0F38A7,
1531 PREFIX_EVEX_0F38A8,
1532 PREFIX_EVEX_0F38A9,
1533 PREFIX_EVEX_0F38AA,
1534 PREFIX_EVEX_0F38AB,
1535 PREFIX_EVEX_0F38AC,
1536 PREFIX_EVEX_0F38AD,
1537 PREFIX_EVEX_0F38AE,
1538 PREFIX_EVEX_0F38AF,
2cc1b5aa
IT
1539 PREFIX_EVEX_0F38B4,
1540 PREFIX_EVEX_0F38B5,
43234a1e
L
1541 PREFIX_EVEX_0F38B6,
1542 PREFIX_EVEX_0F38B7,
1543 PREFIX_EVEX_0F38B8,
1544 PREFIX_EVEX_0F38B9,
1545 PREFIX_EVEX_0F38BA,
1546 PREFIX_EVEX_0F38BB,
1547 PREFIX_EVEX_0F38BC,
1548 PREFIX_EVEX_0F38BD,
1549 PREFIX_EVEX_0F38BE,
1550 PREFIX_EVEX_0F38BF,
1551 PREFIX_EVEX_0F38C4,
1552 PREFIX_EVEX_0F38C6_REG_1,
1553 PREFIX_EVEX_0F38C6_REG_2,
1554 PREFIX_EVEX_0F38C6_REG_5,
1555 PREFIX_EVEX_0F38C6_REG_6,
1556 PREFIX_EVEX_0F38C7_REG_1,
1557 PREFIX_EVEX_0F38C7_REG_2,
1558 PREFIX_EVEX_0F38C7_REG_5,
1559 PREFIX_EVEX_0F38C7_REG_6,
1560 PREFIX_EVEX_0F38C8,
1561 PREFIX_EVEX_0F38CA,
1562 PREFIX_EVEX_0F38CB,
1563 PREFIX_EVEX_0F38CC,
1564 PREFIX_EVEX_0F38CD,
1565
1566 PREFIX_EVEX_0F3A00,
1567 PREFIX_EVEX_0F3A01,
1568 PREFIX_EVEX_0F3A03,
1569 PREFIX_EVEX_0F3A04,
1570 PREFIX_EVEX_0F3A05,
1571 PREFIX_EVEX_0F3A08,
1572 PREFIX_EVEX_0F3A09,
1573 PREFIX_EVEX_0F3A0A,
1574 PREFIX_EVEX_0F3A0B,
1ba585e8
IT
1575 PREFIX_EVEX_0F3A0F,
1576 PREFIX_EVEX_0F3A14,
1577 PREFIX_EVEX_0F3A15,
90a915bf 1578 PREFIX_EVEX_0F3A16,
43234a1e
L
1579 PREFIX_EVEX_0F3A17,
1580 PREFIX_EVEX_0F3A18,
1581 PREFIX_EVEX_0F3A19,
1582 PREFIX_EVEX_0F3A1A,
1583 PREFIX_EVEX_0F3A1B,
1584 PREFIX_EVEX_0F3A1D,
1585 PREFIX_EVEX_0F3A1E,
1586 PREFIX_EVEX_0F3A1F,
1ba585e8 1587 PREFIX_EVEX_0F3A20,
43234a1e 1588 PREFIX_EVEX_0F3A21,
90a915bf 1589 PREFIX_EVEX_0F3A22,
43234a1e
L
1590 PREFIX_EVEX_0F3A23,
1591 PREFIX_EVEX_0F3A25,
1592 PREFIX_EVEX_0F3A26,
1593 PREFIX_EVEX_0F3A27,
1594 PREFIX_EVEX_0F3A38,
1595 PREFIX_EVEX_0F3A39,
1596 PREFIX_EVEX_0F3A3A,
1597 PREFIX_EVEX_0F3A3B,
1ba585e8
IT
1598 PREFIX_EVEX_0F3A3E,
1599 PREFIX_EVEX_0F3A3F,
1600 PREFIX_EVEX_0F3A42,
43234a1e 1601 PREFIX_EVEX_0F3A43,
90a915bf
IT
1602 PREFIX_EVEX_0F3A50,
1603 PREFIX_EVEX_0F3A51,
43234a1e 1604 PREFIX_EVEX_0F3A54,
90a915bf
IT
1605 PREFIX_EVEX_0F3A55,
1606 PREFIX_EVEX_0F3A56,
1607 PREFIX_EVEX_0F3A57,
1608 PREFIX_EVEX_0F3A66,
1609 PREFIX_EVEX_0F3A67
51e7da1b 1610};
4e7d34a6 1611
51e7da1b
L
1612enum
1613{
1614 X86_64_06 = 0,
3873ba12
L
1615 X86_64_07,
1616 X86_64_0D,
1617 X86_64_16,
1618 X86_64_17,
1619 X86_64_1E,
1620 X86_64_1F,
1621 X86_64_27,
1622 X86_64_2F,
1623 X86_64_37,
1624 X86_64_3F,
1625 X86_64_60,
1626 X86_64_61,
1627 X86_64_62,
1628 X86_64_63,
1629 X86_64_6D,
1630 X86_64_6F,
1631 X86_64_9A,
1632 X86_64_C4,
1633 X86_64_C5,
1634 X86_64_CE,
1635 X86_64_D4,
1636 X86_64_D5,
a72d2af2
L
1637 X86_64_E8,
1638 X86_64_E9,
3873ba12
L
1639 X86_64_EA,
1640 X86_64_0F01_REG_0,
1641 X86_64_0F01_REG_1,
1642 X86_64_0F01_REG_2,
1643 X86_64_0F01_REG_3
51e7da1b 1644};
4e7d34a6 1645
51e7da1b
L
1646enum
1647{
1648 THREE_BYTE_0F38 = 0,
3873ba12
L
1649 THREE_BYTE_0F3A,
1650 THREE_BYTE_0F7A
51e7da1b 1651};
4e7d34a6 1652
f88c9eb0
SP
1653enum
1654{
5dd85c99
SP
1655 XOP_08 = 0,
1656 XOP_09,
f88c9eb0
SP
1657 XOP_0A
1658};
1659
51e7da1b
L
1660enum
1661{
1662 VEX_0F = 0,
3873ba12
L
1663 VEX_0F38,
1664 VEX_0F3A
51e7da1b 1665};
c0f3af97 1666
43234a1e
L
1667enum
1668{
1669 EVEX_0F = 0,
1670 EVEX_0F38,
1671 EVEX_0F3A
1672};
1673
51e7da1b
L
1674enum
1675{
592a252b
L
1676 VEX_LEN_0F10_P_1 = 0,
1677 VEX_LEN_0F10_P_3,
1678 VEX_LEN_0F11_P_1,
1679 VEX_LEN_0F11_P_3,
1680 VEX_LEN_0F12_P_0_M_0,
1681 VEX_LEN_0F12_P_0_M_1,
1682 VEX_LEN_0F12_P_2,
1683 VEX_LEN_0F13_M_0,
1684 VEX_LEN_0F16_P_0_M_0,
1685 VEX_LEN_0F16_P_0_M_1,
1686 VEX_LEN_0F16_P_2,
1687 VEX_LEN_0F17_M_0,
1688 VEX_LEN_0F2A_P_1,
1689 VEX_LEN_0F2A_P_3,
1690 VEX_LEN_0F2C_P_1,
1691 VEX_LEN_0F2C_P_3,
1692 VEX_LEN_0F2D_P_1,
1693 VEX_LEN_0F2D_P_3,
1694 VEX_LEN_0F2E_P_0,
1695 VEX_LEN_0F2E_P_2,
1696 VEX_LEN_0F2F_P_0,
1697 VEX_LEN_0F2F_P_2,
43234a1e 1698 VEX_LEN_0F41_P_0,
1ba585e8 1699 VEX_LEN_0F41_P_2,
43234a1e 1700 VEX_LEN_0F42_P_0,
1ba585e8 1701 VEX_LEN_0F42_P_2,
43234a1e 1702 VEX_LEN_0F44_P_0,
1ba585e8 1703 VEX_LEN_0F44_P_2,
43234a1e 1704 VEX_LEN_0F45_P_0,
1ba585e8 1705 VEX_LEN_0F45_P_2,
43234a1e 1706 VEX_LEN_0F46_P_0,
1ba585e8 1707 VEX_LEN_0F46_P_2,
43234a1e 1708 VEX_LEN_0F47_P_0,
1ba585e8
IT
1709 VEX_LEN_0F47_P_2,
1710 VEX_LEN_0F4A_P_0,
1711 VEX_LEN_0F4A_P_2,
1712 VEX_LEN_0F4B_P_0,
43234a1e 1713 VEX_LEN_0F4B_P_2,
592a252b
L
1714 VEX_LEN_0F51_P_1,
1715 VEX_LEN_0F51_P_3,
1716 VEX_LEN_0F52_P_1,
1717 VEX_LEN_0F53_P_1,
1718 VEX_LEN_0F58_P_1,
1719 VEX_LEN_0F58_P_3,
1720 VEX_LEN_0F59_P_1,
1721 VEX_LEN_0F59_P_3,
1722 VEX_LEN_0F5A_P_1,
1723 VEX_LEN_0F5A_P_3,
1724 VEX_LEN_0F5C_P_1,
1725 VEX_LEN_0F5C_P_3,
1726 VEX_LEN_0F5D_P_1,
1727 VEX_LEN_0F5D_P_3,
1728 VEX_LEN_0F5E_P_1,
1729 VEX_LEN_0F5E_P_3,
1730 VEX_LEN_0F5F_P_1,
1731 VEX_LEN_0F5F_P_3,
592a252b 1732 VEX_LEN_0F6E_P_2,
592a252b
L
1733 VEX_LEN_0F7E_P_1,
1734 VEX_LEN_0F7E_P_2,
43234a1e 1735 VEX_LEN_0F90_P_0,
1ba585e8 1736 VEX_LEN_0F90_P_2,
43234a1e 1737 VEX_LEN_0F91_P_0,
1ba585e8 1738 VEX_LEN_0F91_P_2,
43234a1e 1739 VEX_LEN_0F92_P_0,
90a915bf 1740 VEX_LEN_0F92_P_2,
1ba585e8 1741 VEX_LEN_0F92_P_3,
43234a1e 1742 VEX_LEN_0F93_P_0,
90a915bf 1743 VEX_LEN_0F93_P_2,
1ba585e8 1744 VEX_LEN_0F93_P_3,
43234a1e 1745 VEX_LEN_0F98_P_0,
1ba585e8
IT
1746 VEX_LEN_0F98_P_2,
1747 VEX_LEN_0F99_P_0,
1748 VEX_LEN_0F99_P_2,
592a252b
L
1749 VEX_LEN_0FAE_R_2_M_0,
1750 VEX_LEN_0FAE_R_3_M_0,
1751 VEX_LEN_0FC2_P_1,
1752 VEX_LEN_0FC2_P_3,
1753 VEX_LEN_0FC4_P_2,
1754 VEX_LEN_0FC5_P_2,
592a252b 1755 VEX_LEN_0FD6_P_2,
592a252b 1756 VEX_LEN_0FF7_P_2,
6c30d220
L
1757 VEX_LEN_0F3816_P_2,
1758 VEX_LEN_0F3819_P_2,
592a252b 1759 VEX_LEN_0F381A_P_2_M_0,
6c30d220 1760 VEX_LEN_0F3836_P_2,
592a252b 1761 VEX_LEN_0F3841_P_2,
6c30d220 1762 VEX_LEN_0F385A_P_2_M_0,
592a252b
L
1763 VEX_LEN_0F38DB_P_2,
1764 VEX_LEN_0F38DC_P_2,
1765 VEX_LEN_0F38DD_P_2,
1766 VEX_LEN_0F38DE_P_2,
1767 VEX_LEN_0F38DF_P_2,
f12dc422
L
1768 VEX_LEN_0F38F2_P_0,
1769 VEX_LEN_0F38F3_R_1_P_0,
1770 VEX_LEN_0F38F3_R_2_P_0,
1771 VEX_LEN_0F38F3_R_3_P_0,
6c30d220
L
1772 VEX_LEN_0F38F5_P_0,
1773 VEX_LEN_0F38F5_P_1,
1774 VEX_LEN_0F38F5_P_3,
1775 VEX_LEN_0F38F6_P_3,
f12dc422 1776 VEX_LEN_0F38F7_P_0,
6c30d220
L
1777 VEX_LEN_0F38F7_P_1,
1778 VEX_LEN_0F38F7_P_2,
1779 VEX_LEN_0F38F7_P_3,
1780 VEX_LEN_0F3A00_P_2,
1781 VEX_LEN_0F3A01_P_2,
592a252b
L
1782 VEX_LEN_0F3A06_P_2,
1783 VEX_LEN_0F3A0A_P_2,
1784 VEX_LEN_0F3A0B_P_2,
592a252b
L
1785 VEX_LEN_0F3A14_P_2,
1786 VEX_LEN_0F3A15_P_2,
1787 VEX_LEN_0F3A16_P_2,
1788 VEX_LEN_0F3A17_P_2,
1789 VEX_LEN_0F3A18_P_2,
1790 VEX_LEN_0F3A19_P_2,
1791 VEX_LEN_0F3A20_P_2,
1792 VEX_LEN_0F3A21_P_2,
1793 VEX_LEN_0F3A22_P_2,
43234a1e 1794 VEX_LEN_0F3A30_P_2,
1ba585e8 1795 VEX_LEN_0F3A31_P_2,
43234a1e 1796 VEX_LEN_0F3A32_P_2,
1ba585e8 1797 VEX_LEN_0F3A33_P_2,
6c30d220
L
1798 VEX_LEN_0F3A38_P_2,
1799 VEX_LEN_0F3A39_P_2,
592a252b 1800 VEX_LEN_0F3A41_P_2,
592a252b 1801 VEX_LEN_0F3A44_P_2,
6c30d220 1802 VEX_LEN_0F3A46_P_2,
592a252b
L
1803 VEX_LEN_0F3A60_P_2,
1804 VEX_LEN_0F3A61_P_2,
1805 VEX_LEN_0F3A62_P_2,
1806 VEX_LEN_0F3A63_P_2,
1807 VEX_LEN_0F3A6A_P_2,
1808 VEX_LEN_0F3A6B_P_2,
1809 VEX_LEN_0F3A6E_P_2,
1810 VEX_LEN_0F3A6F_P_2,
1811 VEX_LEN_0F3A7A_P_2,
1812 VEX_LEN_0F3A7B_P_2,
1813 VEX_LEN_0F3A7E_P_2,
1814 VEX_LEN_0F3A7F_P_2,
1815 VEX_LEN_0F3ADF_P_2,
6c30d220 1816 VEX_LEN_0F3AF0_P_3,
ff688e1f
L
1817 VEX_LEN_0FXOP_08_CC,
1818 VEX_LEN_0FXOP_08_CD,
1819 VEX_LEN_0FXOP_08_CE,
1820 VEX_LEN_0FXOP_08_CF,
1821 VEX_LEN_0FXOP_08_EC,
1822 VEX_LEN_0FXOP_08_ED,
1823 VEX_LEN_0FXOP_08_EE,
1824 VEX_LEN_0FXOP_08_EF,
592a252b
L
1825 VEX_LEN_0FXOP_09_80,
1826 VEX_LEN_0FXOP_09_81
51e7da1b 1827};
c0f3af97 1828
9e30b8e0
L
1829enum
1830{
592a252b
L
1831 VEX_W_0F10_P_0 = 0,
1832 VEX_W_0F10_P_1,
1833 VEX_W_0F10_P_2,
1834 VEX_W_0F10_P_3,
1835 VEX_W_0F11_P_0,
1836 VEX_W_0F11_P_1,
1837 VEX_W_0F11_P_2,
1838 VEX_W_0F11_P_3,
1839 VEX_W_0F12_P_0_M_0,
1840 VEX_W_0F12_P_0_M_1,
1841 VEX_W_0F12_P_1,
1842 VEX_W_0F12_P_2,
1843 VEX_W_0F12_P_3,
1844 VEX_W_0F13_M_0,
1845 VEX_W_0F14,
1846 VEX_W_0F15,
1847 VEX_W_0F16_P_0_M_0,
1848 VEX_W_0F16_P_0_M_1,
1849 VEX_W_0F16_P_1,
1850 VEX_W_0F16_P_2,
1851 VEX_W_0F17_M_0,
1852 VEX_W_0F28,
1853 VEX_W_0F29,
1854 VEX_W_0F2B_M_0,
1855 VEX_W_0F2E_P_0,
1856 VEX_W_0F2E_P_2,
1857 VEX_W_0F2F_P_0,
1858 VEX_W_0F2F_P_2,
43234a1e 1859 VEX_W_0F41_P_0_LEN_1,
1ba585e8 1860 VEX_W_0F41_P_2_LEN_1,
43234a1e 1861 VEX_W_0F42_P_0_LEN_1,
1ba585e8 1862 VEX_W_0F42_P_2_LEN_1,
43234a1e 1863 VEX_W_0F44_P_0_LEN_0,
1ba585e8 1864 VEX_W_0F44_P_2_LEN_0,
43234a1e 1865 VEX_W_0F45_P_0_LEN_1,
1ba585e8 1866 VEX_W_0F45_P_2_LEN_1,
43234a1e 1867 VEX_W_0F46_P_0_LEN_1,
1ba585e8 1868 VEX_W_0F46_P_2_LEN_1,
43234a1e 1869 VEX_W_0F47_P_0_LEN_1,
1ba585e8
IT
1870 VEX_W_0F47_P_2_LEN_1,
1871 VEX_W_0F4A_P_0_LEN_1,
1872 VEX_W_0F4A_P_2_LEN_1,
1873 VEX_W_0F4B_P_0_LEN_1,
43234a1e 1874 VEX_W_0F4B_P_2_LEN_1,
592a252b
L
1875 VEX_W_0F50_M_0,
1876 VEX_W_0F51_P_0,
1877 VEX_W_0F51_P_1,
1878 VEX_W_0F51_P_2,
1879 VEX_W_0F51_P_3,
1880 VEX_W_0F52_P_0,
1881 VEX_W_0F52_P_1,
1882 VEX_W_0F53_P_0,
1883 VEX_W_0F53_P_1,
1884 VEX_W_0F58_P_0,
1885 VEX_W_0F58_P_1,
1886 VEX_W_0F58_P_2,
1887 VEX_W_0F58_P_3,
1888 VEX_W_0F59_P_0,
1889 VEX_W_0F59_P_1,
1890 VEX_W_0F59_P_2,
1891 VEX_W_0F59_P_3,
1892 VEX_W_0F5A_P_0,
1893 VEX_W_0F5A_P_1,
1894 VEX_W_0F5A_P_3,
1895 VEX_W_0F5B_P_0,
1896 VEX_W_0F5B_P_1,
1897 VEX_W_0F5B_P_2,
1898 VEX_W_0F5C_P_0,
1899 VEX_W_0F5C_P_1,
1900 VEX_W_0F5C_P_2,
1901 VEX_W_0F5C_P_3,
1902 VEX_W_0F5D_P_0,
1903 VEX_W_0F5D_P_1,
1904 VEX_W_0F5D_P_2,
1905 VEX_W_0F5D_P_3,
1906 VEX_W_0F5E_P_0,
1907 VEX_W_0F5E_P_1,
1908 VEX_W_0F5E_P_2,
1909 VEX_W_0F5E_P_3,
1910 VEX_W_0F5F_P_0,
1911 VEX_W_0F5F_P_1,
1912 VEX_W_0F5F_P_2,
1913 VEX_W_0F5F_P_3,
1914 VEX_W_0F60_P_2,
1915 VEX_W_0F61_P_2,
1916 VEX_W_0F62_P_2,
1917 VEX_W_0F63_P_2,
1918 VEX_W_0F64_P_2,
1919 VEX_W_0F65_P_2,
1920 VEX_W_0F66_P_2,
1921 VEX_W_0F67_P_2,
1922 VEX_W_0F68_P_2,
1923 VEX_W_0F69_P_2,
1924 VEX_W_0F6A_P_2,
1925 VEX_W_0F6B_P_2,
1926 VEX_W_0F6C_P_2,
1927 VEX_W_0F6D_P_2,
1928 VEX_W_0F6F_P_1,
1929 VEX_W_0F6F_P_2,
1930 VEX_W_0F70_P_1,
1931 VEX_W_0F70_P_2,
1932 VEX_W_0F70_P_3,
1933 VEX_W_0F71_R_2_P_2,
1934 VEX_W_0F71_R_4_P_2,
1935 VEX_W_0F71_R_6_P_2,
1936 VEX_W_0F72_R_2_P_2,
1937 VEX_W_0F72_R_4_P_2,
1938 VEX_W_0F72_R_6_P_2,
1939 VEX_W_0F73_R_2_P_2,
1940 VEX_W_0F73_R_3_P_2,
1941 VEX_W_0F73_R_6_P_2,
1942 VEX_W_0F73_R_7_P_2,
1943 VEX_W_0F74_P_2,
1944 VEX_W_0F75_P_2,
1945 VEX_W_0F76_P_2,
1946 VEX_W_0F77_P_0,
1947 VEX_W_0F7C_P_2,
1948 VEX_W_0F7C_P_3,
1949 VEX_W_0F7D_P_2,
1950 VEX_W_0F7D_P_3,
1951 VEX_W_0F7E_P_1,
1952 VEX_W_0F7F_P_1,
1953 VEX_W_0F7F_P_2,
43234a1e 1954 VEX_W_0F90_P_0_LEN_0,
1ba585e8 1955 VEX_W_0F90_P_2_LEN_0,
43234a1e 1956 VEX_W_0F91_P_0_LEN_0,
1ba585e8 1957 VEX_W_0F91_P_2_LEN_0,
43234a1e 1958 VEX_W_0F92_P_0_LEN_0,
90a915bf 1959 VEX_W_0F92_P_2_LEN_0,
1ba585e8 1960 VEX_W_0F92_P_3_LEN_0,
43234a1e 1961 VEX_W_0F93_P_0_LEN_0,
90a915bf 1962 VEX_W_0F93_P_2_LEN_0,
1ba585e8 1963 VEX_W_0F93_P_3_LEN_0,
43234a1e 1964 VEX_W_0F98_P_0_LEN_0,
1ba585e8
IT
1965 VEX_W_0F98_P_2_LEN_0,
1966 VEX_W_0F99_P_0_LEN_0,
1967 VEX_W_0F99_P_2_LEN_0,
592a252b
L
1968 VEX_W_0FAE_R_2_M_0,
1969 VEX_W_0FAE_R_3_M_0,
1970 VEX_W_0FC2_P_0,
1971 VEX_W_0FC2_P_1,
1972 VEX_W_0FC2_P_2,
1973 VEX_W_0FC2_P_3,
1974 VEX_W_0FC4_P_2,
1975 VEX_W_0FC5_P_2,
1976 VEX_W_0FD0_P_2,
1977 VEX_W_0FD0_P_3,
1978 VEX_W_0FD1_P_2,
1979 VEX_W_0FD2_P_2,
1980 VEX_W_0FD3_P_2,
1981 VEX_W_0FD4_P_2,
1982 VEX_W_0FD5_P_2,
1983 VEX_W_0FD6_P_2,
1984 VEX_W_0FD7_P_2_M_1,
1985 VEX_W_0FD8_P_2,
1986 VEX_W_0FD9_P_2,
1987 VEX_W_0FDA_P_2,
1988 VEX_W_0FDB_P_2,
1989 VEX_W_0FDC_P_2,
1990 VEX_W_0FDD_P_2,
1991 VEX_W_0FDE_P_2,
1992 VEX_W_0FDF_P_2,
1993 VEX_W_0FE0_P_2,
1994 VEX_W_0FE1_P_2,
1995 VEX_W_0FE2_P_2,
1996 VEX_W_0FE3_P_2,
1997 VEX_W_0FE4_P_2,
1998 VEX_W_0FE5_P_2,
1999 VEX_W_0FE6_P_1,
2000 VEX_W_0FE6_P_2,
2001 VEX_W_0FE6_P_3,
2002 VEX_W_0FE7_P_2_M_0,
2003 VEX_W_0FE8_P_2,
2004 VEX_W_0FE9_P_2,
2005 VEX_W_0FEA_P_2,
2006 VEX_W_0FEB_P_2,
2007 VEX_W_0FEC_P_2,
2008 VEX_W_0FED_P_2,
2009 VEX_W_0FEE_P_2,
2010 VEX_W_0FEF_P_2,
2011 VEX_W_0FF0_P_3_M_0,
2012 VEX_W_0FF1_P_2,
2013 VEX_W_0FF2_P_2,
2014 VEX_W_0FF3_P_2,
2015 VEX_W_0FF4_P_2,
2016 VEX_W_0FF5_P_2,
2017 VEX_W_0FF6_P_2,
2018 VEX_W_0FF7_P_2,
2019 VEX_W_0FF8_P_2,
2020 VEX_W_0FF9_P_2,
2021 VEX_W_0FFA_P_2,
2022 VEX_W_0FFB_P_2,
2023 VEX_W_0FFC_P_2,
2024 VEX_W_0FFD_P_2,
2025 VEX_W_0FFE_P_2,
2026 VEX_W_0F3800_P_2,
2027 VEX_W_0F3801_P_2,
2028 VEX_W_0F3802_P_2,
2029 VEX_W_0F3803_P_2,
2030 VEX_W_0F3804_P_2,
2031 VEX_W_0F3805_P_2,
2032 VEX_W_0F3806_P_2,
2033 VEX_W_0F3807_P_2,
2034 VEX_W_0F3808_P_2,
2035 VEX_W_0F3809_P_2,
2036 VEX_W_0F380A_P_2,
2037 VEX_W_0F380B_P_2,
2038 VEX_W_0F380C_P_2,
2039 VEX_W_0F380D_P_2,
2040 VEX_W_0F380E_P_2,
2041 VEX_W_0F380F_P_2,
6c30d220 2042 VEX_W_0F3816_P_2,
592a252b 2043 VEX_W_0F3817_P_2,
6c30d220
L
2044 VEX_W_0F3818_P_2,
2045 VEX_W_0F3819_P_2,
592a252b
L
2046 VEX_W_0F381A_P_2_M_0,
2047 VEX_W_0F381C_P_2,
2048 VEX_W_0F381D_P_2,
2049 VEX_W_0F381E_P_2,
2050 VEX_W_0F3820_P_2,
2051 VEX_W_0F3821_P_2,
2052 VEX_W_0F3822_P_2,
2053 VEX_W_0F3823_P_2,
2054 VEX_W_0F3824_P_2,
2055 VEX_W_0F3825_P_2,
2056 VEX_W_0F3828_P_2,
2057 VEX_W_0F3829_P_2,
2058 VEX_W_0F382A_P_2_M_0,
2059 VEX_W_0F382B_P_2,
2060 VEX_W_0F382C_P_2_M_0,
2061 VEX_W_0F382D_P_2_M_0,
2062 VEX_W_0F382E_P_2_M_0,
2063 VEX_W_0F382F_P_2_M_0,
2064 VEX_W_0F3830_P_2,
2065 VEX_W_0F3831_P_2,
2066 VEX_W_0F3832_P_2,
2067 VEX_W_0F3833_P_2,
2068 VEX_W_0F3834_P_2,
2069 VEX_W_0F3835_P_2,
6c30d220 2070 VEX_W_0F3836_P_2,
592a252b
L
2071 VEX_W_0F3837_P_2,
2072 VEX_W_0F3838_P_2,
2073 VEX_W_0F3839_P_2,
2074 VEX_W_0F383A_P_2,
2075 VEX_W_0F383B_P_2,
2076 VEX_W_0F383C_P_2,
2077 VEX_W_0F383D_P_2,
2078 VEX_W_0F383E_P_2,
2079 VEX_W_0F383F_P_2,
2080 VEX_W_0F3840_P_2,
2081 VEX_W_0F3841_P_2,
6c30d220
L
2082 VEX_W_0F3846_P_2,
2083 VEX_W_0F3858_P_2,
2084 VEX_W_0F3859_P_2,
2085 VEX_W_0F385A_P_2_M_0,
2086 VEX_W_0F3878_P_2,
2087 VEX_W_0F3879_P_2,
592a252b
L
2088 VEX_W_0F38DB_P_2,
2089 VEX_W_0F38DC_P_2,
2090 VEX_W_0F38DD_P_2,
2091 VEX_W_0F38DE_P_2,
2092 VEX_W_0F38DF_P_2,
6c30d220
L
2093 VEX_W_0F3A00_P_2,
2094 VEX_W_0F3A01_P_2,
2095 VEX_W_0F3A02_P_2,
592a252b
L
2096 VEX_W_0F3A04_P_2,
2097 VEX_W_0F3A05_P_2,
2098 VEX_W_0F3A06_P_2,
2099 VEX_W_0F3A08_P_2,
2100 VEX_W_0F3A09_P_2,
2101 VEX_W_0F3A0A_P_2,
2102 VEX_W_0F3A0B_P_2,
2103 VEX_W_0F3A0C_P_2,
2104 VEX_W_0F3A0D_P_2,
2105 VEX_W_0F3A0E_P_2,
2106 VEX_W_0F3A0F_P_2,
2107 VEX_W_0F3A14_P_2,
2108 VEX_W_0F3A15_P_2,
2109 VEX_W_0F3A18_P_2,
2110 VEX_W_0F3A19_P_2,
2111 VEX_W_0F3A20_P_2,
2112 VEX_W_0F3A21_P_2,
43234a1e 2113 VEX_W_0F3A30_P_2_LEN_0,
1ba585e8 2114 VEX_W_0F3A31_P_2_LEN_0,
43234a1e 2115 VEX_W_0F3A32_P_2_LEN_0,
1ba585e8 2116 VEX_W_0F3A33_P_2_LEN_0,
6c30d220
L
2117 VEX_W_0F3A38_P_2,
2118 VEX_W_0F3A39_P_2,
592a252b
L
2119 VEX_W_0F3A40_P_2,
2120 VEX_W_0F3A41_P_2,
2121 VEX_W_0F3A42_P_2,
2122 VEX_W_0F3A44_P_2,
6c30d220 2123 VEX_W_0F3A46_P_2,
592a252b
L
2124 VEX_W_0F3A48_P_2,
2125 VEX_W_0F3A49_P_2,
2126 VEX_W_0F3A4A_P_2,
2127 VEX_W_0F3A4B_P_2,
2128 VEX_W_0F3A4C_P_2,
2129 VEX_W_0F3A60_P_2,
2130 VEX_W_0F3A61_P_2,
2131 VEX_W_0F3A62_P_2,
2132 VEX_W_0F3A63_P_2,
43234a1e
L
2133 VEX_W_0F3ADF_P_2,
2134
2135 EVEX_W_0F10_P_0,
2136 EVEX_W_0F10_P_1_M_0,
2137 EVEX_W_0F10_P_1_M_1,
2138 EVEX_W_0F10_P_2,
2139 EVEX_W_0F10_P_3_M_0,
2140 EVEX_W_0F10_P_3_M_1,
2141 EVEX_W_0F11_P_0,
2142 EVEX_W_0F11_P_1_M_0,
2143 EVEX_W_0F11_P_1_M_1,
2144 EVEX_W_0F11_P_2,
2145 EVEX_W_0F11_P_3_M_0,
2146 EVEX_W_0F11_P_3_M_1,
2147 EVEX_W_0F12_P_0_M_0,
2148 EVEX_W_0F12_P_0_M_1,
2149 EVEX_W_0F12_P_1,
2150 EVEX_W_0F12_P_2,
2151 EVEX_W_0F12_P_3,
2152 EVEX_W_0F13_P_0,
2153 EVEX_W_0F13_P_2,
2154 EVEX_W_0F14_P_0,
2155 EVEX_W_0F14_P_2,
2156 EVEX_W_0F15_P_0,
2157 EVEX_W_0F15_P_2,
2158 EVEX_W_0F16_P_0_M_0,
2159 EVEX_W_0F16_P_0_M_1,
2160 EVEX_W_0F16_P_1,
2161 EVEX_W_0F16_P_2,
2162 EVEX_W_0F17_P_0,
2163 EVEX_W_0F17_P_2,
2164 EVEX_W_0F28_P_0,
2165 EVEX_W_0F28_P_2,
2166 EVEX_W_0F29_P_0,
2167 EVEX_W_0F29_P_2,
2168 EVEX_W_0F2A_P_1,
2169 EVEX_W_0F2A_P_3,
2170 EVEX_W_0F2B_P_0,
2171 EVEX_W_0F2B_P_2,
2172 EVEX_W_0F2E_P_0,
2173 EVEX_W_0F2E_P_2,
2174 EVEX_W_0F2F_P_0,
2175 EVEX_W_0F2F_P_2,
2176 EVEX_W_0F51_P_0,
2177 EVEX_W_0F51_P_1,
2178 EVEX_W_0F51_P_2,
2179 EVEX_W_0F51_P_3,
90a915bf
IT
2180 EVEX_W_0F54_P_0,
2181 EVEX_W_0F54_P_2,
2182 EVEX_W_0F55_P_0,
2183 EVEX_W_0F55_P_2,
2184 EVEX_W_0F56_P_0,
2185 EVEX_W_0F56_P_2,
2186 EVEX_W_0F57_P_0,
2187 EVEX_W_0F57_P_2,
43234a1e
L
2188 EVEX_W_0F58_P_0,
2189 EVEX_W_0F58_P_1,
2190 EVEX_W_0F58_P_2,
2191 EVEX_W_0F58_P_3,
2192 EVEX_W_0F59_P_0,
2193 EVEX_W_0F59_P_1,
2194 EVEX_W_0F59_P_2,
2195 EVEX_W_0F59_P_3,
2196 EVEX_W_0F5A_P_0,
2197 EVEX_W_0F5A_P_1,
2198 EVEX_W_0F5A_P_2,
2199 EVEX_W_0F5A_P_3,
2200 EVEX_W_0F5B_P_0,
2201 EVEX_W_0F5B_P_1,
2202 EVEX_W_0F5B_P_2,
2203 EVEX_W_0F5C_P_0,
2204 EVEX_W_0F5C_P_1,
2205 EVEX_W_0F5C_P_2,
2206 EVEX_W_0F5C_P_3,
2207 EVEX_W_0F5D_P_0,
2208 EVEX_W_0F5D_P_1,
2209 EVEX_W_0F5D_P_2,
2210 EVEX_W_0F5D_P_3,
2211 EVEX_W_0F5E_P_0,
2212 EVEX_W_0F5E_P_1,
2213 EVEX_W_0F5E_P_2,
2214 EVEX_W_0F5E_P_3,
2215 EVEX_W_0F5F_P_0,
2216 EVEX_W_0F5F_P_1,
2217 EVEX_W_0F5F_P_2,
2218 EVEX_W_0F5F_P_3,
2219 EVEX_W_0F62_P_2,
2220 EVEX_W_0F66_P_2,
2221 EVEX_W_0F6A_P_2,
1ba585e8 2222 EVEX_W_0F6B_P_2,
43234a1e
L
2223 EVEX_W_0F6C_P_2,
2224 EVEX_W_0F6D_P_2,
2225 EVEX_W_0F6E_P_2,
2226 EVEX_W_0F6F_P_1,
2227 EVEX_W_0F6F_P_2,
1ba585e8 2228 EVEX_W_0F6F_P_3,
43234a1e
L
2229 EVEX_W_0F70_P_2,
2230 EVEX_W_0F72_R_2_P_2,
2231 EVEX_W_0F72_R_6_P_2,
2232 EVEX_W_0F73_R_2_P_2,
2233 EVEX_W_0F73_R_6_P_2,
2234 EVEX_W_0F76_P_2,
2235 EVEX_W_0F78_P_0,
90a915bf 2236 EVEX_W_0F78_P_2,
43234a1e 2237 EVEX_W_0F79_P_0,
90a915bf 2238 EVEX_W_0F79_P_2,
43234a1e 2239 EVEX_W_0F7A_P_1,
90a915bf 2240 EVEX_W_0F7A_P_2,
43234a1e
L
2241 EVEX_W_0F7A_P_3,
2242 EVEX_W_0F7B_P_1,
90a915bf 2243 EVEX_W_0F7B_P_2,
43234a1e
L
2244 EVEX_W_0F7B_P_3,
2245 EVEX_W_0F7E_P_1,
2246 EVEX_W_0F7E_P_2,
2247 EVEX_W_0F7F_P_1,
2248 EVEX_W_0F7F_P_2,
1ba585e8 2249 EVEX_W_0F7F_P_3,
43234a1e
L
2250 EVEX_W_0FC2_P_0,
2251 EVEX_W_0FC2_P_1,
2252 EVEX_W_0FC2_P_2,
2253 EVEX_W_0FC2_P_3,
2254 EVEX_W_0FC6_P_0,
2255 EVEX_W_0FC6_P_2,
2256 EVEX_W_0FD2_P_2,
2257 EVEX_W_0FD3_P_2,
2258 EVEX_W_0FD4_P_2,
2259 EVEX_W_0FD6_P_2,
2260 EVEX_W_0FE6_P_1,
2261 EVEX_W_0FE6_P_2,
2262 EVEX_W_0FE6_P_3,
2263 EVEX_W_0FE7_P_2,
2264 EVEX_W_0FF2_P_2,
2265 EVEX_W_0FF3_P_2,
2266 EVEX_W_0FF4_P_2,
2267 EVEX_W_0FFA_P_2,
2268 EVEX_W_0FFB_P_2,
2269 EVEX_W_0FFE_P_2,
2270 EVEX_W_0F380C_P_2,
2271 EVEX_W_0F380D_P_2,
1ba585e8
IT
2272 EVEX_W_0F3810_P_1,
2273 EVEX_W_0F3810_P_2,
43234a1e 2274 EVEX_W_0F3811_P_1,
1ba585e8 2275 EVEX_W_0F3811_P_2,
43234a1e 2276 EVEX_W_0F3812_P_1,
1ba585e8 2277 EVEX_W_0F3812_P_2,
43234a1e
L
2278 EVEX_W_0F3813_P_1,
2279 EVEX_W_0F3813_P_2,
2280 EVEX_W_0F3814_P_1,
2281 EVEX_W_0F3815_P_1,
2282 EVEX_W_0F3818_P_2,
2283 EVEX_W_0F3819_P_2,
2284 EVEX_W_0F381A_P_2,
2285 EVEX_W_0F381B_P_2,
2286 EVEX_W_0F381E_P_2,
2287 EVEX_W_0F381F_P_2,
1ba585e8 2288 EVEX_W_0F3820_P_1,
43234a1e
L
2289 EVEX_W_0F3821_P_1,
2290 EVEX_W_0F3822_P_1,
2291 EVEX_W_0F3823_P_1,
2292 EVEX_W_0F3824_P_1,
2293 EVEX_W_0F3825_P_1,
2294 EVEX_W_0F3825_P_2,
1ba585e8
IT
2295 EVEX_W_0F3826_P_1,
2296 EVEX_W_0F3826_P_2,
2297 EVEX_W_0F3828_P_1,
43234a1e 2298 EVEX_W_0F3828_P_2,
1ba585e8 2299 EVEX_W_0F3829_P_1,
43234a1e
L
2300 EVEX_W_0F3829_P_2,
2301 EVEX_W_0F382A_P_1,
2302 EVEX_W_0F382A_P_2,
1ba585e8
IT
2303 EVEX_W_0F382B_P_2,
2304 EVEX_W_0F3830_P_1,
43234a1e
L
2305 EVEX_W_0F3831_P_1,
2306 EVEX_W_0F3832_P_1,
2307 EVEX_W_0F3833_P_1,
2308 EVEX_W_0F3834_P_1,
2309 EVEX_W_0F3835_P_1,
2310 EVEX_W_0F3835_P_2,
2311 EVEX_W_0F3837_P_2,
90a915bf
IT
2312 EVEX_W_0F3838_P_1,
2313 EVEX_W_0F3839_P_1,
43234a1e
L
2314 EVEX_W_0F383A_P_1,
2315 EVEX_W_0F3840_P_2,
2316 EVEX_W_0F3858_P_2,
2317 EVEX_W_0F3859_P_2,
2318 EVEX_W_0F385A_P_2,
2319 EVEX_W_0F385B_P_2,
1ba585e8
IT
2320 EVEX_W_0F3866_P_2,
2321 EVEX_W_0F3875_P_2,
2322 EVEX_W_0F3878_P_2,
2323 EVEX_W_0F3879_P_2,
2324 EVEX_W_0F387A_P_2,
2325 EVEX_W_0F387B_P_2,
2326 EVEX_W_0F387D_P_2,
14f195c9 2327 EVEX_W_0F3883_P_2,
1ba585e8 2328 EVEX_W_0F388D_P_2,
43234a1e
L
2329 EVEX_W_0F3891_P_2,
2330 EVEX_W_0F3893_P_2,
2331 EVEX_W_0F38A1_P_2,
2332 EVEX_W_0F38A3_P_2,
2333 EVEX_W_0F38C7_R_1_P_2,
2334 EVEX_W_0F38C7_R_2_P_2,
2335 EVEX_W_0F38C7_R_5_P_2,
2336 EVEX_W_0F38C7_R_6_P_2,
2337
2338 EVEX_W_0F3A00_P_2,
2339 EVEX_W_0F3A01_P_2,
2340 EVEX_W_0F3A04_P_2,
2341 EVEX_W_0F3A05_P_2,
2342 EVEX_W_0F3A08_P_2,
2343 EVEX_W_0F3A09_P_2,
2344 EVEX_W_0F3A0A_P_2,
2345 EVEX_W_0F3A0B_P_2,
90a915bf 2346 EVEX_W_0F3A16_P_2,
43234a1e
L
2347 EVEX_W_0F3A18_P_2,
2348 EVEX_W_0F3A19_P_2,
2349 EVEX_W_0F3A1A_P_2,
2350 EVEX_W_0F3A1B_P_2,
2351 EVEX_W_0F3A1D_P_2,
2352 EVEX_W_0F3A21_P_2,
90a915bf 2353 EVEX_W_0F3A22_P_2,
43234a1e
L
2354 EVEX_W_0F3A23_P_2,
2355 EVEX_W_0F3A38_P_2,
2356 EVEX_W_0F3A39_P_2,
2357 EVEX_W_0F3A3A_P_2,
2358 EVEX_W_0F3A3B_P_2,
1ba585e8
IT
2359 EVEX_W_0F3A3E_P_2,
2360 EVEX_W_0F3A3F_P_2,
2361 EVEX_W_0F3A42_P_2,
90a915bf
IT
2362 EVEX_W_0F3A43_P_2,
2363 EVEX_W_0F3A50_P_2,
2364 EVEX_W_0F3A51_P_2,
2365 EVEX_W_0F3A56_P_2,
2366 EVEX_W_0F3A57_P_2,
2367 EVEX_W_0F3A66_P_2,
2368 EVEX_W_0F3A67_P_2
9e30b8e0
L
2369};
2370
26ca5450 2371typedef void (*op_rtn) (int bytemode, int sizeflag);
252b5132
RH
2372
2373struct dis386 {
2da11e11 2374 const char *name;
ce518a5f
L
2375 struct
2376 {
2377 op_rtn rtn;
2378 int bytemode;
2379 } op[MAX_OPERANDS];
bf890a93 2380 unsigned int prefix_requirement;
252b5132
RH
2381};
2382
2383/* Upper case letters in the instruction names here are macros.
2384 'A' => print 'b' if no register operands or suffix_always is true
2385 'B' => print 'b' if suffix_always is true
9306ca4a 2386 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
98b528ac 2387 size prefix
ed7841b3 2388 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
98b528ac 2389 suffix_always is true
252b5132 2390 'E' => print 'e' if 32-bit form of jcxz
3ffd33cf 2391 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
52fd6d94 2392 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
5dd0794d 2393 'H' => print ",pt" or ",pn" branch hint
9306ca4a 2394 'I' => honor following macro letter even in Intel mode (implemented only
98b528ac 2395 for some of the macro letters)
9306ca4a 2396 'J' => print 'l'
42903f7f 2397 'K' => print 'd' or 'q' if rex prefix is present.
252b5132 2398 'L' => print 'l' if suffix_always is true
9d141669 2399 'M' => print 'r' if intel_mnemonic is false.
252b5132 2400 'N' => print 'n' if instruction has no wait "prefix"
a35ca55a 2401 'O' => print 'd' or 'o' (or 'q' in Intel mode)
52b15da3 2402 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
98b528ac
L
2403 or suffix_always is true. print 'q' if rex prefix is present.
2404 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
2405 is true
a35ca55a 2406 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
52b15da3 2407 'S' => print 'w', 'l' or 'q' if suffix_always is true
a72d2af2
L
2408 'T' => print 'q' in 64bit mode if instruction has no operand size
2409 prefix and behave as 'P' otherwise
2410 'U' => print 'q' in 64bit mode if instruction has no operand size
2411 prefix and behave as 'Q' otherwise
2412 'V' => print 'q' in 64bit mode if instruction has no operand size
2413 prefix and behave as 'S' otherwise
a35ca55a 2414 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
9306ca4a 2415 'X' => print 's', 'd' depending on data16 prefix (for XMM)
8a72226a
L
2416 'Y' => 'q' if instruction has an REX 64bit overwrite prefix and
2417 suffix_always is true.
6dd5059a 2418 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
9d141669 2419 '!' => change condition from true to false or from false to true.
98b528ac 2420 '%' => add 1 upper case letter to the macro.
a72d2af2
L
2421 '^' => print 'w' or 'l' depending on operand size prefix or
2422 suffix_always is true (lcall/ljmp).
5db04b09
L
2423 '@' => print 'q' for Intel64 ISA, 'w' or 'q' for AMD64 ISA depending
2424 on operand size prefix.
98b528ac
L
2425
2426 2 upper case letter macros:
04d824a4
JB
2427 "XY" => print 'x' or 'y' if suffix_always is true or no register
2428 operands and no broadcast.
2429 "XZ" => print 'x', 'y', or 'z' if suffix_always is true or no
2430 register operands and no broadcast.
4b06377f
L
2431 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
2432 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
98b528ac 2433 or suffix_always is true
4b06377f
L
2434 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
2435 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
2436 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
6c30d220 2437 "LW" => print 'd', 'q' depending on the VEX.W bit
4b4c407a
L
2438 "LP" => print 'w' or 'l' ('d' in Intel mode) if instruction has
2439 an operand size prefix, or suffix_always is true. print
2440 'q' if rex prefix is present.
52b15da3 2441
6439fc28
AM
2442 Many of the above letters print nothing in Intel mode. See "putop"
2443 for the details.
52b15da3 2444
6439fc28 2445 Braces '{' and '}', and vertical bars '|', indicate alternative
7c52e0e8 2446 mnemonic strings for AT&T and Intel. */
252b5132 2447
6439fc28 2448static const struct dis386 dis386[] = {
252b5132 2449 /* 00 */
bf890a93
IT
2450 { "addB", { Ebh1, Gb }, 0 },
2451 { "addS", { Evh1, Gv }, 0 },
2452 { "addB", { Gb, EbS }, 0 },
2453 { "addS", { Gv, EvS }, 0 },
2454 { "addB", { AL, Ib }, 0 },
2455 { "addS", { eAX, Iv }, 0 },
4e7d34a6
L
2456 { X86_64_TABLE (X86_64_06) },
2457 { X86_64_TABLE (X86_64_07) },
252b5132 2458 /* 08 */
bf890a93
IT
2459 { "orB", { Ebh1, Gb }, 0 },
2460 { "orS", { Evh1, Gv }, 0 },
2461 { "orB", { Gb, EbS }, 0 },
2462 { "orS", { Gv, EvS }, 0 },
2463 { "orB", { AL, Ib }, 0 },
2464 { "orS", { eAX, Iv }, 0 },
4e7d34a6 2465 { X86_64_TABLE (X86_64_0D) },
592d1631 2466 { Bad_Opcode }, /* 0x0f extended opcode escape */
252b5132 2467 /* 10 */
bf890a93
IT
2468 { "adcB", { Ebh1, Gb }, 0 },
2469 { "adcS", { Evh1, Gv }, 0 },
2470 { "adcB", { Gb, EbS }, 0 },
2471 { "adcS", { Gv, EvS }, 0 },
2472 { "adcB", { AL, Ib }, 0 },
2473 { "adcS", { eAX, Iv }, 0 },
4e7d34a6
L
2474 { X86_64_TABLE (X86_64_16) },
2475 { X86_64_TABLE (X86_64_17) },
252b5132 2476 /* 18 */
bf890a93
IT
2477 { "sbbB", { Ebh1, Gb }, 0 },
2478 { "sbbS", { Evh1, Gv }, 0 },
2479 { "sbbB", { Gb, EbS }, 0 },
2480 { "sbbS", { Gv, EvS }, 0 },
2481 { "sbbB", { AL, Ib }, 0 },
2482 { "sbbS", { eAX, Iv }, 0 },
4e7d34a6
L
2483 { X86_64_TABLE (X86_64_1E) },
2484 { X86_64_TABLE (X86_64_1F) },
252b5132 2485 /* 20 */
bf890a93
IT
2486 { "andB", { Ebh1, Gb }, 0 },
2487 { "andS", { Evh1, Gv }, 0 },
2488 { "andB", { Gb, EbS }, 0 },
2489 { "andS", { Gv, EvS }, 0 },
2490 { "andB", { AL, Ib }, 0 },
2491 { "andS", { eAX, Iv }, 0 },
592d1631 2492 { Bad_Opcode }, /* SEG ES prefix */
4e7d34a6 2493 { X86_64_TABLE (X86_64_27) },
252b5132 2494 /* 28 */
bf890a93
IT
2495 { "subB", { Ebh1, Gb }, 0 },
2496 { "subS", { Evh1, Gv }, 0 },
2497 { "subB", { Gb, EbS }, 0 },
2498 { "subS", { Gv, EvS }, 0 },
2499 { "subB", { AL, Ib }, 0 },
2500 { "subS", { eAX, Iv }, 0 },
592d1631 2501 { Bad_Opcode }, /* SEG CS prefix */
4e7d34a6 2502 { X86_64_TABLE (X86_64_2F) },
252b5132 2503 /* 30 */
bf890a93
IT
2504 { "xorB", { Ebh1, Gb }, 0 },
2505 { "xorS", { Evh1, Gv }, 0 },
2506 { "xorB", { Gb, EbS }, 0 },
2507 { "xorS", { Gv, EvS }, 0 },
2508 { "xorB", { AL, Ib }, 0 },
2509 { "xorS", { eAX, Iv }, 0 },
592d1631 2510 { Bad_Opcode }, /* SEG SS prefix */
4e7d34a6 2511 { X86_64_TABLE (X86_64_37) },
252b5132 2512 /* 38 */
bf890a93
IT
2513 { "cmpB", { Eb, Gb }, 0 },
2514 { "cmpS", { Ev, Gv }, 0 },
2515 { "cmpB", { Gb, EbS }, 0 },
2516 { "cmpS", { Gv, EvS }, 0 },
2517 { "cmpB", { AL, Ib }, 0 },
2518 { "cmpS", { eAX, Iv }, 0 },
592d1631 2519 { Bad_Opcode }, /* SEG DS prefix */
4e7d34a6 2520 { X86_64_TABLE (X86_64_3F) },
252b5132 2521 /* 40 */
bf890a93
IT
2522 { "inc{S|}", { RMeAX }, 0 },
2523 { "inc{S|}", { RMeCX }, 0 },
2524 { "inc{S|}", { RMeDX }, 0 },
2525 { "inc{S|}", { RMeBX }, 0 },
2526 { "inc{S|}", { RMeSP }, 0 },
2527 { "inc{S|}", { RMeBP }, 0 },
2528 { "inc{S|}", { RMeSI }, 0 },
2529 { "inc{S|}", { RMeDI }, 0 },
252b5132 2530 /* 48 */
bf890a93
IT
2531 { "dec{S|}", { RMeAX }, 0 },
2532 { "dec{S|}", { RMeCX }, 0 },
2533 { "dec{S|}", { RMeDX }, 0 },
2534 { "dec{S|}", { RMeBX }, 0 },
2535 { "dec{S|}", { RMeSP }, 0 },
2536 { "dec{S|}", { RMeBP }, 0 },
2537 { "dec{S|}", { RMeSI }, 0 },
2538 { "dec{S|}", { RMeDI }, 0 },
252b5132 2539 /* 50 */
bf890a93
IT
2540 { "pushV", { RMrAX }, 0 },
2541 { "pushV", { RMrCX }, 0 },
2542 { "pushV", { RMrDX }, 0 },
2543 { "pushV", { RMrBX }, 0 },
2544 { "pushV", { RMrSP }, 0 },
2545 { "pushV", { RMrBP }, 0 },
2546 { "pushV", { RMrSI }, 0 },
2547 { "pushV", { RMrDI }, 0 },
252b5132 2548 /* 58 */
bf890a93
IT
2549 { "popV", { RMrAX }, 0 },
2550 { "popV", { RMrCX }, 0 },
2551 { "popV", { RMrDX }, 0 },
2552 { "popV", { RMrBX }, 0 },
2553 { "popV", { RMrSP }, 0 },
2554 { "popV", { RMrBP }, 0 },
2555 { "popV", { RMrSI }, 0 },
2556 { "popV", { RMrDI }, 0 },
252b5132 2557 /* 60 */
4e7d34a6
L
2558 { X86_64_TABLE (X86_64_60) },
2559 { X86_64_TABLE (X86_64_61) },
2560 { X86_64_TABLE (X86_64_62) },
2561 { X86_64_TABLE (X86_64_63) },
592d1631
L
2562 { Bad_Opcode }, /* seg fs */
2563 { Bad_Opcode }, /* seg gs */
2564 { Bad_Opcode }, /* op size prefix */
2565 { Bad_Opcode }, /* adr size prefix */
252b5132 2566 /* 68 */
bf890a93
IT
2567 { "pushT", { sIv }, 0 },
2568 { "imulS", { Gv, Ev, Iv }, 0 },
2569 { "pushT", { sIbT }, 0 },
2570 { "imulS", { Gv, Ev, sIb }, 0 },
2571 { "ins{b|}", { Ybr, indirDX }, 0 },
4e7d34a6 2572 { X86_64_TABLE (X86_64_6D) },
bf890a93 2573 { "outs{b|}", { indirDXr, Xb }, 0 },
4e7d34a6 2574 { X86_64_TABLE (X86_64_6F) },
252b5132 2575 /* 70 */
bf890a93
IT
2576 { "joH", { Jb, BND, cond_jump_flag }, 0 },
2577 { "jnoH", { Jb, BND, cond_jump_flag }, 0 },
2578 { "jbH", { Jb, BND, cond_jump_flag }, 0 },
2579 { "jaeH", { Jb, BND, cond_jump_flag }, 0 },
2580 { "jeH", { Jb, BND, cond_jump_flag }, 0 },
2581 { "jneH", { Jb, BND, cond_jump_flag }, 0 },
2582 { "jbeH", { Jb, BND, cond_jump_flag }, 0 },
2583 { "jaH", { Jb, BND, cond_jump_flag }, 0 },
252b5132 2584 /* 78 */
bf890a93
IT
2585 { "jsH", { Jb, BND, cond_jump_flag }, 0 },
2586 { "jnsH", { Jb, BND, cond_jump_flag }, 0 },
2587 { "jpH", { Jb, BND, cond_jump_flag }, 0 },
2588 { "jnpH", { Jb, BND, cond_jump_flag }, 0 },
2589 { "jlH", { Jb, BND, cond_jump_flag }, 0 },
2590 { "jgeH", { Jb, BND, cond_jump_flag }, 0 },
2591 { "jleH", { Jb, BND, cond_jump_flag }, 0 },
2592 { "jgH", { Jb, BND, cond_jump_flag }, 0 },
252b5132 2593 /* 80 */
1ceb70f8
L
2594 { REG_TABLE (REG_80) },
2595 { REG_TABLE (REG_81) },
592d1631 2596 { Bad_Opcode },
1ceb70f8 2597 { REG_TABLE (REG_82) },
bf890a93
IT
2598 { "testB", { Eb, Gb }, 0 },
2599 { "testS", { Ev, Gv }, 0 },
2600 { "xchgB", { Ebh2, Gb }, 0 },
2601 { "xchgS", { Evh2, Gv }, 0 },
252b5132 2602 /* 88 */
bf890a93
IT
2603 { "movB", { Ebh3, Gb }, 0 },
2604 { "movS", { Evh3, Gv }, 0 },
2605 { "movB", { Gb, EbS }, 0 },
2606 { "movS", { Gv, EvS }, 0 },
2607 { "movD", { Sv, Sw }, 0 },
1ceb70f8 2608 { MOD_TABLE (MOD_8D) },
bf890a93 2609 { "movD", { Sw, Sv }, 0 },
1ceb70f8 2610 { REG_TABLE (REG_8F) },
252b5132 2611 /* 90 */
1ceb70f8 2612 { PREFIX_TABLE (PREFIX_90) },
bf890a93
IT
2613 { "xchgS", { RMeCX, eAX }, 0 },
2614 { "xchgS", { RMeDX, eAX }, 0 },
2615 { "xchgS", { RMeBX, eAX }, 0 },
2616 { "xchgS", { RMeSP, eAX }, 0 },
2617 { "xchgS", { RMeBP, eAX }, 0 },
2618 { "xchgS", { RMeSI, eAX }, 0 },
2619 { "xchgS", { RMeDI, eAX }, 0 },
252b5132 2620 /* 98 */
bf890a93
IT
2621 { "cW{t|}R", { XX }, 0 },
2622 { "cR{t|}O", { XX }, 0 },
4e7d34a6 2623 { X86_64_TABLE (X86_64_9A) },
592d1631 2624 { Bad_Opcode }, /* fwait */
bf890a93
IT
2625 { "pushfT", { XX }, 0 },
2626 { "popfT", { XX }, 0 },
2627 { "sahf", { XX }, 0 },
2628 { "lahf", { XX }, 0 },
252b5132 2629 /* a0 */
bf890a93
IT
2630 { "mov%LB", { AL, Ob }, 0 },
2631 { "mov%LS", { eAX, Ov }, 0 },
2632 { "mov%LB", { Ob, AL }, 0 },
2633 { "mov%LS", { Ov, eAX }, 0 },
2634 { "movs{b|}", { Ybr, Xb }, 0 },
2635 { "movs{R|}", { Yvr, Xv }, 0 },
2636 { "cmps{b|}", { Xb, Yb }, 0 },
2637 { "cmps{R|}", { Xv, Yv }, 0 },
252b5132 2638 /* a8 */
bf890a93
IT
2639 { "testB", { AL, Ib }, 0 },
2640 { "testS", { eAX, Iv }, 0 },
2641 { "stosB", { Ybr, AL }, 0 },
2642 { "stosS", { Yvr, eAX }, 0 },
2643 { "lodsB", { ALr, Xb }, 0 },
2644 { "lodsS", { eAXr, Xv }, 0 },
2645 { "scasB", { AL, Yb }, 0 },
2646 { "scasS", { eAX, Yv }, 0 },
252b5132 2647 /* b0 */
bf890a93
IT
2648 { "movB", { RMAL, Ib }, 0 },
2649 { "movB", { RMCL, Ib }, 0 },
2650 { "movB", { RMDL, Ib }, 0 },
2651 { "movB", { RMBL, Ib }, 0 },
2652 { "movB", { RMAH, Ib }, 0 },
2653 { "movB", { RMCH, Ib }, 0 },
2654 { "movB", { RMDH, Ib }, 0 },
2655 { "movB", { RMBH, Ib }, 0 },
252b5132 2656 /* b8 */
bf890a93
IT
2657 { "mov%LV", { RMeAX, Iv64 }, 0 },
2658 { "mov%LV", { RMeCX, Iv64 }, 0 },
2659 { "mov%LV", { RMeDX, Iv64 }, 0 },
2660 { "mov%LV", { RMeBX, Iv64 }, 0 },
2661 { "mov%LV", { RMeSP, Iv64 }, 0 },
2662 { "mov%LV", { RMeBP, Iv64 }, 0 },
2663 { "mov%LV", { RMeSI, Iv64 }, 0 },
2664 { "mov%LV", { RMeDI, Iv64 }, 0 },
252b5132 2665 /* c0 */
1ceb70f8
L
2666 { REG_TABLE (REG_C0) },
2667 { REG_TABLE (REG_C1) },
bf890a93
IT
2668 { "retT", { Iw, BND }, 0 },
2669 { "retT", { BND }, 0 },
4e7d34a6
L
2670 { X86_64_TABLE (X86_64_C4) },
2671 { X86_64_TABLE (X86_64_C5) },
1ceb70f8
L
2672 { REG_TABLE (REG_C6) },
2673 { REG_TABLE (REG_C7) },
252b5132 2674 /* c8 */
bf890a93
IT
2675 { "enterT", { Iw, Ib }, 0 },
2676 { "leaveT", { XX }, 0 },
2677 { "Jret{|f}P", { Iw }, 0 },
2678 { "Jret{|f}P", { XX }, 0 },
2679 { "int3", { XX }, 0 },
2680 { "int", { Ib }, 0 },
4e7d34a6 2681 { X86_64_TABLE (X86_64_CE) },
bf890a93 2682 { "iret%LP", { XX }, 0 },
252b5132 2683 /* d0 */
1ceb70f8
L
2684 { REG_TABLE (REG_D0) },
2685 { REG_TABLE (REG_D1) },
2686 { REG_TABLE (REG_D2) },
2687 { REG_TABLE (REG_D3) },
4e7d34a6
L
2688 { X86_64_TABLE (X86_64_D4) },
2689 { X86_64_TABLE (X86_64_D5) },
592d1631 2690 { Bad_Opcode },
bf890a93 2691 { "xlat", { DSBX }, 0 },
252b5132
RH
2692 /* d8 */
2693 { FLOAT },
2694 { FLOAT },
2695 { FLOAT },
2696 { FLOAT },
2697 { FLOAT },
2698 { FLOAT },
2699 { FLOAT },
2700 { FLOAT },
2701 /* e0 */
bf890a93
IT
2702 { "loopneFH", { Jb, XX, loop_jcxz_flag }, 0 },
2703 { "loopeFH", { Jb, XX, loop_jcxz_flag }, 0 },
2704 { "loopFH", { Jb, XX, loop_jcxz_flag }, 0 },
2705 { "jEcxzH", { Jb, XX, loop_jcxz_flag }, 0 },
2706 { "inB", { AL, Ib }, 0 },
2707 { "inG", { zAX, Ib }, 0 },
2708 { "outB", { Ib, AL }, 0 },
2709 { "outG", { Ib, zAX }, 0 },
252b5132 2710 /* e8 */
a72d2af2
L
2711 { X86_64_TABLE (X86_64_E8) },
2712 { X86_64_TABLE (X86_64_E9) },
4e7d34a6 2713 { X86_64_TABLE (X86_64_EA) },
bf890a93
IT
2714 { "jmp", { Jb, BND }, 0 },
2715 { "inB", { AL, indirDX }, 0 },
2716 { "inG", { zAX, indirDX }, 0 },
2717 { "outB", { indirDX, AL }, 0 },
2718 { "outG", { indirDX, zAX }, 0 },
252b5132 2719 /* f0 */
592d1631 2720 { Bad_Opcode }, /* lock prefix */
bf890a93 2721 { "icebp", { XX }, 0 },
592d1631
L
2722 { Bad_Opcode }, /* repne */
2723 { Bad_Opcode }, /* repz */
bf890a93
IT
2724 { "hlt", { XX }, 0 },
2725 { "cmc", { XX }, 0 },
1ceb70f8
L
2726 { REG_TABLE (REG_F6) },
2727 { REG_TABLE (REG_F7) },
252b5132 2728 /* f8 */
bf890a93
IT
2729 { "clc", { XX }, 0 },
2730 { "stc", { XX }, 0 },
2731 { "cli", { XX }, 0 },
2732 { "sti", { XX }, 0 },
2733 { "cld", { XX }, 0 },
2734 { "std", { XX }, 0 },
1ceb70f8
L
2735 { REG_TABLE (REG_FE) },
2736 { REG_TABLE (REG_FF) },
252b5132
RH
2737};
2738
6439fc28 2739static const struct dis386 dis386_twobyte[] = {
252b5132 2740 /* 00 */
1ceb70f8
L
2741 { REG_TABLE (REG_0F00 ) },
2742 { REG_TABLE (REG_0F01 ) },
bf890a93
IT
2743 { "larS", { Gv, Ew }, 0 },
2744 { "lslS", { Gv, Ew }, 0 },
592d1631 2745 { Bad_Opcode },
bf890a93
IT
2746 { "syscall", { XX }, 0 },
2747 { "clts", { XX }, 0 },
2748 { "sysret%LP", { XX }, 0 },
252b5132 2749 /* 08 */
bf890a93
IT
2750 { "invd", { XX }, 0 },
2751 { "wbinvd", { XX }, 0 },
592d1631 2752 { Bad_Opcode },
bf890a93 2753 { "ud2", { XX }, 0 },
592d1631 2754 { Bad_Opcode },
b5b1fc4f 2755 { REG_TABLE (REG_0F0D) },
bf890a93
IT
2756 { "femms", { XX }, 0 },
2757 { "", { MX, EM, OPSUF }, 0 }, /* See OP_3DNowSuffix. */
252b5132 2758 /* 10 */
1ceb70f8
L
2759 { PREFIX_TABLE (PREFIX_0F10) },
2760 { PREFIX_TABLE (PREFIX_0F11) },
2761 { PREFIX_TABLE (PREFIX_0F12) },
2762 { MOD_TABLE (MOD_0F13) },
507bd325
L
2763 { "unpcklpX", { XM, EXx }, PREFIX_OPCODE },
2764 { "unpckhpX", { XM, EXx }, PREFIX_OPCODE },
1ceb70f8
L
2765 { PREFIX_TABLE (PREFIX_0F16) },
2766 { MOD_TABLE (MOD_0F17) },
252b5132 2767 /* 18 */
1ceb70f8 2768 { REG_TABLE (REG_0F18) },
bf890a93 2769 { "nopQ", { Ev }, 0 },
7e8b059b
L
2770 { PREFIX_TABLE (PREFIX_0F1A) },
2771 { PREFIX_TABLE (PREFIX_0F1B) },
bf890a93
IT
2772 { "nopQ", { Ev }, 0 },
2773 { "nopQ", { Ev }, 0 },
2774 { "nopQ", { Ev }, 0 },
2775 { "nopQ", { Ev }, 0 },
252b5132 2776 /* 20 */
bf890a93
IT
2777 { "movZ", { Rm, Cm }, 0 },
2778 { "movZ", { Rm, Dm }, 0 },
2779 { "movZ", { Cm, Rm }, 0 },
2780 { "movZ", { Dm, Rm }, 0 },
1ceb70f8 2781 { MOD_TABLE (MOD_0F24) },
592d1631 2782 { Bad_Opcode },
1ceb70f8 2783 { MOD_TABLE (MOD_0F26) },
592d1631 2784 { Bad_Opcode },
252b5132 2785 /* 28 */
507bd325
L
2786 { "movapX", { XM, EXx }, PREFIX_OPCODE },
2787 { "movapX", { EXxS, XM }, PREFIX_OPCODE },
1ceb70f8
L
2788 { PREFIX_TABLE (PREFIX_0F2A) },
2789 { PREFIX_TABLE (PREFIX_0F2B) },
2790 { PREFIX_TABLE (PREFIX_0F2C) },
2791 { PREFIX_TABLE (PREFIX_0F2D) },
2792 { PREFIX_TABLE (PREFIX_0F2E) },
2793 { PREFIX_TABLE (PREFIX_0F2F) },
252b5132 2794 /* 30 */
bf890a93
IT
2795 { "wrmsr", { XX }, 0 },
2796 { "rdtsc", { XX }, 0 },
2797 { "rdmsr", { XX }, 0 },
2798 { "rdpmc", { XX }, 0 },
2799 { "sysenter", { XX }, 0 },
2800 { "sysexit", { XX }, 0 },
592d1631 2801 { Bad_Opcode },
bf890a93 2802 { "getsec", { XX }, 0 },
252b5132 2803 /* 38 */
507bd325 2804 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F38, PREFIX_OPCODE) },
592d1631 2805 { Bad_Opcode },
507bd325 2806 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F3A, PREFIX_OPCODE) },
592d1631
L
2807 { Bad_Opcode },
2808 { Bad_Opcode },
2809 { Bad_Opcode },
2810 { Bad_Opcode },
2811 { Bad_Opcode },
252b5132 2812 /* 40 */
bf890a93
IT
2813 { "cmovoS", { Gv, Ev }, 0 },
2814 { "cmovnoS", { Gv, Ev }, 0 },
2815 { "cmovbS", { Gv, Ev }, 0 },
2816 { "cmovaeS", { Gv, Ev }, 0 },
2817 { "cmoveS", { Gv, Ev }, 0 },
2818 { "cmovneS", { Gv, Ev }, 0 },
2819 { "cmovbeS", { Gv, Ev }, 0 },
2820 { "cmovaS", { Gv, Ev }, 0 },
252b5132 2821 /* 48 */
bf890a93
IT
2822 { "cmovsS", { Gv, Ev }, 0 },
2823 { "cmovnsS", { Gv, Ev }, 0 },
2824 { "cmovpS", { Gv, Ev }, 0 },
2825 { "cmovnpS", { Gv, Ev }, 0 },
2826 { "cmovlS", { Gv, Ev }, 0 },
2827 { "cmovgeS", { Gv, Ev }, 0 },
2828 { "cmovleS", { Gv, Ev }, 0 },
2829 { "cmovgS", { Gv, Ev }, 0 },
252b5132 2830 /* 50 */
75c135a8 2831 { MOD_TABLE (MOD_0F51) },
1ceb70f8
L
2832 { PREFIX_TABLE (PREFIX_0F51) },
2833 { PREFIX_TABLE (PREFIX_0F52) },
2834 { PREFIX_TABLE (PREFIX_0F53) },
507bd325
L
2835 { "andpX", { XM, EXx }, PREFIX_OPCODE },
2836 { "andnpX", { XM, EXx }, PREFIX_OPCODE },
2837 { "orpX", { XM, EXx }, PREFIX_OPCODE },
2838 { "xorpX", { XM, EXx }, PREFIX_OPCODE },
252b5132 2839 /* 58 */
1ceb70f8
L
2840 { PREFIX_TABLE (PREFIX_0F58) },
2841 { PREFIX_TABLE (PREFIX_0F59) },
2842 { PREFIX_TABLE (PREFIX_0F5A) },
2843 { PREFIX_TABLE (PREFIX_0F5B) },
2844 { PREFIX_TABLE (PREFIX_0F5C) },
2845 { PREFIX_TABLE (PREFIX_0F5D) },
2846 { PREFIX_TABLE (PREFIX_0F5E) },
2847 { PREFIX_TABLE (PREFIX_0F5F) },
252b5132 2848 /* 60 */
1ceb70f8
L
2849 { PREFIX_TABLE (PREFIX_0F60) },
2850 { PREFIX_TABLE (PREFIX_0F61) },
2851 { PREFIX_TABLE (PREFIX_0F62) },
507bd325
L
2852 { "packsswb", { MX, EM }, PREFIX_OPCODE },
2853 { "pcmpgtb", { MX, EM }, PREFIX_OPCODE },
2854 { "pcmpgtw", { MX, EM }, PREFIX_OPCODE },
2855 { "pcmpgtd", { MX, EM }, PREFIX_OPCODE },
2856 { "packuswb", { MX, EM }, PREFIX_OPCODE },
252b5132 2857 /* 68 */
507bd325
L
2858 { "punpckhbw", { MX, EM }, PREFIX_OPCODE },
2859 { "punpckhwd", { MX, EM }, PREFIX_OPCODE },
2860 { "punpckhdq", { MX, EM }, PREFIX_OPCODE },
2861 { "packssdw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8
L
2862 { PREFIX_TABLE (PREFIX_0F6C) },
2863 { PREFIX_TABLE (PREFIX_0F6D) },
507bd325 2864 { "movK", { MX, Edq }, PREFIX_OPCODE },
1ceb70f8 2865 { PREFIX_TABLE (PREFIX_0F6F) },
252b5132 2866 /* 70 */
1ceb70f8
L
2867 { PREFIX_TABLE (PREFIX_0F70) },
2868 { REG_TABLE (REG_0F71) },
2869 { REG_TABLE (REG_0F72) },
2870 { REG_TABLE (REG_0F73) },
507bd325
L
2871 { "pcmpeqb", { MX, EM }, PREFIX_OPCODE },
2872 { "pcmpeqw", { MX, EM }, PREFIX_OPCODE },
2873 { "pcmpeqd", { MX, EM }, PREFIX_OPCODE },
2874 { "emms", { XX }, PREFIX_OPCODE },
252b5132 2875 /* 78 */
1ceb70f8
L
2876 { PREFIX_TABLE (PREFIX_0F78) },
2877 { PREFIX_TABLE (PREFIX_0F79) },
4e7d34a6 2878 { THREE_BYTE_TABLE (THREE_BYTE_0F7A) },
592d1631 2879 { Bad_Opcode },
1ceb70f8
L
2880 { PREFIX_TABLE (PREFIX_0F7C) },
2881 { PREFIX_TABLE (PREFIX_0F7D) },
2882 { PREFIX_TABLE (PREFIX_0F7E) },
2883 { PREFIX_TABLE (PREFIX_0F7F) },
252b5132 2884 /* 80 */
bf890a93
IT
2885 { "joH", { Jv, BND, cond_jump_flag }, 0 },
2886 { "jnoH", { Jv, BND, cond_jump_flag }, 0 },
2887 { "jbH", { Jv, BND, cond_jump_flag }, 0 },
2888 { "jaeH", { Jv, BND, cond_jump_flag }, 0 },
2889 { "jeH", { Jv, BND, cond_jump_flag }, 0 },
2890 { "jneH", { Jv, BND, cond_jump_flag }, 0 },
2891 { "jbeH", { Jv, BND, cond_jump_flag }, 0 },
2892 { "jaH", { Jv, BND, cond_jump_flag }, 0 },
252b5132 2893 /* 88 */
bf890a93
IT
2894 { "jsH", { Jv, BND, cond_jump_flag }, 0 },
2895 { "jnsH", { Jv, BND, cond_jump_flag }, 0 },
2896 { "jpH", { Jv, BND, cond_jump_flag }, 0 },
2897 { "jnpH", { Jv, BND, cond_jump_flag }, 0 },
2898 { "jlH", { Jv, BND, cond_jump_flag }, 0 },
2899 { "jgeH", { Jv, BND, cond_jump_flag }, 0 },
2900 { "jleH", { Jv, BND, cond_jump_flag }, 0 },
2901 { "jgH", { Jv, BND, cond_jump_flag }, 0 },
252b5132 2902 /* 90 */
bf890a93
IT
2903 { "seto", { Eb }, 0 },
2904 { "setno", { Eb }, 0 },
2905 { "setb", { Eb }, 0 },
2906 { "setae", { Eb }, 0 },
2907 { "sete", { Eb }, 0 },
2908 { "setne", { Eb }, 0 },
2909 { "setbe", { Eb }, 0 },
2910 { "seta", { Eb }, 0 },
252b5132 2911 /* 98 */
bf890a93
IT
2912 { "sets", { Eb }, 0 },
2913 { "setns", { Eb }, 0 },
2914 { "setp", { Eb }, 0 },
2915 { "setnp", { Eb }, 0 },
2916 { "setl", { Eb }, 0 },
2917 { "setge", { Eb }, 0 },
2918 { "setle", { Eb }, 0 },
2919 { "setg", { Eb }, 0 },
252b5132 2920 /* a0 */
bf890a93
IT
2921 { "pushT", { fs }, 0 },
2922 { "popT", { fs }, 0 },
2923 { "cpuid", { XX }, 0 },
2924 { "btS", { Ev, Gv }, 0 },
2925 { "shldS", { Ev, Gv, Ib }, 0 },
2926 { "shldS", { Ev, Gv, CL }, 0 },
1ceb70f8
L
2927 { REG_TABLE (REG_0FA6) },
2928 { REG_TABLE (REG_0FA7) },
252b5132 2929 /* a8 */
bf890a93
IT
2930 { "pushT", { gs }, 0 },
2931 { "popT", { gs }, 0 },
2932 { "rsm", { XX }, 0 },
2933 { "btsS", { Evh1, Gv }, 0 },
2934 { "shrdS", { Ev, Gv, Ib }, 0 },
2935 { "shrdS", { Ev, Gv, CL }, 0 },
1ceb70f8 2936 { REG_TABLE (REG_0FAE) },
bf890a93 2937 { "imulS", { Gv, Ev }, 0 },
252b5132 2938 /* b0 */
bf890a93
IT
2939 { "cmpxchgB", { Ebh1, Gb }, 0 },
2940 { "cmpxchgS", { Evh1, Gv }, 0 },
1ceb70f8 2941 { MOD_TABLE (MOD_0FB2) },
bf890a93 2942 { "btrS", { Evh1, Gv }, 0 },
1ceb70f8
L
2943 { MOD_TABLE (MOD_0FB4) },
2944 { MOD_TABLE (MOD_0FB5) },
bf890a93
IT
2945 { "movz{bR|x}", { Gv, Eb }, 0 },
2946 { "movz{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movzww ! */
252b5132 2947 /* b8 */
1ceb70f8 2948 { PREFIX_TABLE (PREFIX_0FB8) },
bf890a93 2949 { "ud1", { XX }, 0 },
1ceb70f8 2950 { REG_TABLE (REG_0FBA) },
bf890a93 2951 { "btcS", { Evh1, Gv }, 0 },
f12dc422 2952 { PREFIX_TABLE (PREFIX_0FBC) },
1ceb70f8 2953 { PREFIX_TABLE (PREFIX_0FBD) },
bf890a93
IT
2954 { "movs{bR|x}", { Gv, Eb }, 0 },
2955 { "movs{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movsww ! */
252b5132 2956 /* c0 */
bf890a93
IT
2957 { "xaddB", { Ebh1, Gb }, 0 },
2958 { "xaddS", { Evh1, Gv }, 0 },
1ceb70f8 2959 { PREFIX_TABLE (PREFIX_0FC2) },
a8484f96 2960 { MOD_TABLE (MOD_0FC3) },
507bd325
L
2961 { "pinsrw", { MX, Edqw, Ib }, PREFIX_OPCODE },
2962 { "pextrw", { Gdq, MS, Ib }, PREFIX_OPCODE },
2963 { "shufpX", { XM, EXx, Ib }, PREFIX_OPCODE },
1ceb70f8 2964 { REG_TABLE (REG_0FC7) },
252b5132 2965 /* c8 */
bf890a93
IT
2966 { "bswap", { RMeAX }, 0 },
2967 { "bswap", { RMeCX }, 0 },
2968 { "bswap", { RMeDX }, 0 },
2969 { "bswap", { RMeBX }, 0 },
2970 { "bswap", { RMeSP }, 0 },
2971 { "bswap", { RMeBP }, 0 },
2972 { "bswap", { RMeSI }, 0 },
2973 { "bswap", { RMeDI }, 0 },
252b5132 2974 /* d0 */
1ceb70f8 2975 { PREFIX_TABLE (PREFIX_0FD0) },
507bd325
L
2976 { "psrlw", { MX, EM }, PREFIX_OPCODE },
2977 { "psrld", { MX, EM }, PREFIX_OPCODE },
2978 { "psrlq", { MX, EM }, PREFIX_OPCODE },
2979 { "paddq", { MX, EM }, PREFIX_OPCODE },
2980 { "pmullw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8 2981 { PREFIX_TABLE (PREFIX_0FD6) },
75c135a8 2982 { MOD_TABLE (MOD_0FD7) },
252b5132 2983 /* d8 */
507bd325
L
2984 { "psubusb", { MX, EM }, PREFIX_OPCODE },
2985 { "psubusw", { MX, EM }, PREFIX_OPCODE },
2986 { "pminub", { MX, EM }, PREFIX_OPCODE },
2987 { "pand", { MX, EM }, PREFIX_OPCODE },
2988 { "paddusb", { MX, EM }, PREFIX_OPCODE },
2989 { "paddusw", { MX, EM }, PREFIX_OPCODE },
2990 { "pmaxub", { MX, EM }, PREFIX_OPCODE },
2991 { "pandn", { MX, EM }, PREFIX_OPCODE },
252b5132 2992 /* e0 */
507bd325
L
2993 { "pavgb", { MX, EM }, PREFIX_OPCODE },
2994 { "psraw", { MX, EM }, PREFIX_OPCODE },
2995 { "psrad", { MX, EM }, PREFIX_OPCODE },
2996 { "pavgw", { MX, EM }, PREFIX_OPCODE },
2997 { "pmulhuw", { MX, EM }, PREFIX_OPCODE },
2998 { "pmulhw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8
L
2999 { PREFIX_TABLE (PREFIX_0FE6) },
3000 { PREFIX_TABLE (PREFIX_0FE7) },
252b5132 3001 /* e8 */
507bd325
L
3002 { "psubsb", { MX, EM }, PREFIX_OPCODE },
3003 { "psubsw", { MX, EM }, PREFIX_OPCODE },
3004 { "pminsw", { MX, EM }, PREFIX_OPCODE },
3005 { "por", { MX, EM }, PREFIX_OPCODE },
3006 { "paddsb", { MX, EM }, PREFIX_OPCODE },
3007 { "paddsw", { MX, EM }, PREFIX_OPCODE },
3008 { "pmaxsw", { MX, EM }, PREFIX_OPCODE },
3009 { "pxor", { MX, EM }, PREFIX_OPCODE },
252b5132 3010 /* f0 */
1ceb70f8 3011 { PREFIX_TABLE (PREFIX_0FF0) },
507bd325
L
3012 { "psllw", { MX, EM }, PREFIX_OPCODE },
3013 { "pslld", { MX, EM }, PREFIX_OPCODE },
3014 { "psllq", { MX, EM }, PREFIX_OPCODE },
3015 { "pmuludq", { MX, EM }, PREFIX_OPCODE },
3016 { "pmaddwd", { MX, EM }, PREFIX_OPCODE },
3017 { "psadbw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8 3018 { PREFIX_TABLE (PREFIX_0FF7) },
252b5132 3019 /* f8 */
507bd325
L
3020 { "psubb", { MX, EM }, PREFIX_OPCODE },
3021 { "psubw", { MX, EM }, PREFIX_OPCODE },
3022 { "psubd", { MX, EM }, PREFIX_OPCODE },
3023 { "psubq", { MX, EM }, PREFIX_OPCODE },
3024 { "paddb", { MX, EM }, PREFIX_OPCODE },
3025 { "paddw", { MX, EM }, PREFIX_OPCODE },
3026 { "paddd", { MX, EM }, PREFIX_OPCODE },
592d1631 3027 { Bad_Opcode },
252b5132
RH
3028};
3029
3030static const unsigned char onebyte_has_modrm[256] = {
c608c12e
AM
3031 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3032 /* ------------------------------- */
3033 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
3034 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
3035 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
3036 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
3037 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
3038 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
3039 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
3040 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
3041 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
3042 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
3043 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
3044 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
3045 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
3046 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
3047 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
3048 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
3049 /* ------------------------------- */
3050 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
252b5132
RH
3051};
3052
3053static const unsigned char twobyte_has_modrm[256] = {
c608c12e
AM
3054 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3055 /* ------------------------------- */
252b5132 3056 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
b5b1fc4f 3057 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
85f10a01 3058 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
331d2d0d 3059 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
252b5132 3060 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
4bba6815
AM
3061 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
3062 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
85f10a01 3063 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
252b5132
RH
3064 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
3065 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
30d1c836 3066 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
050dfa73 3067 /* b0 */ 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, /* bf */
252b5132 3068 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
ca164297 3069 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
4bba6815 3070 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
ca164297 3071 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
c608c12e
AM
3072 /* ------------------------------- */
3073 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3074};
3075
252b5132
RH
3076static char obuf[100];
3077static char *obufp;
ea397f5b 3078static char *mnemonicendp;
252b5132
RH
3079static char scratchbuf[100];
3080static unsigned char *start_codep;
3081static unsigned char *insn_codep;
3082static unsigned char *codep;
285ca992 3083static unsigned char *end_codep;
f16cd0d5
L
3084static int last_lock_prefix;
3085static int last_repz_prefix;
3086static int last_repnz_prefix;
3087static int last_data_prefix;
3088static int last_addr_prefix;
3089static int last_rex_prefix;
3090static int last_seg_prefix;
d9949a36 3091static int fwait_prefix;
285ca992
L
3092/* The active segment register prefix. */
3093static int active_seg_prefix;
f16cd0d5
L
3094#define MAX_CODE_LENGTH 15
3095/* We can up to 14 prefixes since the maximum instruction length is
3096 15bytes. */
3097static int all_prefixes[MAX_CODE_LENGTH - 1];
252b5132 3098static disassemble_info *the_info;
7967e09e
L
3099static struct
3100 {
3101 int mod;
7967e09e 3102 int reg;
484c222e 3103 int rm;
7967e09e
L
3104 }
3105modrm;
4bba6815 3106static unsigned char need_modrm;
dfc8cf43
L
3107static struct
3108 {
3109 int scale;
3110 int index;
3111 int base;
3112 }
3113sib;
c0f3af97
L
3114static struct
3115 {
3116 int register_specifier;
3117 int length;
3118 int prefix;
3119 int w;
43234a1e
L
3120 int evex;
3121 int r;
3122 int v;
3123 int mask_register_specifier;
3124 int zeroing;
3125 int ll;
3126 int b;
c0f3af97
L
3127 }
3128vex;
3129static unsigned char need_vex;
3130static unsigned char need_vex_reg;
dae39acc 3131static unsigned char vex_w_done;
252b5132 3132
ea397f5b
L
3133struct op
3134 {
3135 const char *name;
3136 unsigned int len;
3137 };
3138
4bba6815
AM
3139/* If we are accessing mod/rm/reg without need_modrm set, then the
3140 values are stale. Hitting this abort likely indicates that you
3141 need to update onebyte_has_modrm or twobyte_has_modrm. */
3142#define MODRM_CHECK if (!need_modrm) abort ()
3143
d708bcba
AM
3144static const char **names64;
3145static const char **names32;
3146static const char **names16;
3147static const char **names8;
3148static const char **names8rex;
3149static const char **names_seg;
db51cc60
L
3150static const char *index64;
3151static const char *index32;
d708bcba 3152static const char **index16;
7e8b059b 3153static const char **names_bnd;
d708bcba
AM
3154
3155static const char *intel_names64[] = {
3156 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
3157 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
3158};
3159static const char *intel_names32[] = {
3160 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
3161 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
3162};
3163static const char *intel_names16[] = {
3164 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
3165 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
3166};
3167static const char *intel_names8[] = {
3168 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
3169};
3170static const char *intel_names8rex[] = {
3171 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
3172 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
3173};
3174static const char *intel_names_seg[] = {
3175 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
3176};
db51cc60
L
3177static const char *intel_index64 = "riz";
3178static const char *intel_index32 = "eiz";
d708bcba
AM
3179static const char *intel_index16[] = {
3180 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
3181};
3182
3183static const char *att_names64[] = {
3184 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
52b15da3
JH
3185 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
3186};
d708bcba
AM
3187static const char *att_names32[] = {
3188 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
52b15da3 3189 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
252b5132 3190};
d708bcba
AM
3191static const char *att_names16[] = {
3192 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
52b15da3 3193 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
252b5132 3194};
d708bcba
AM
3195static const char *att_names8[] = {
3196 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
252b5132 3197};
d708bcba
AM
3198static const char *att_names8rex[] = {
3199 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
52b15da3
JH
3200 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
3201};
d708bcba
AM
3202static const char *att_names_seg[] = {
3203 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
252b5132 3204};
db51cc60
L
3205static const char *att_index64 = "%riz";
3206static const char *att_index32 = "%eiz";
d708bcba
AM
3207static const char *att_index16[] = {
3208 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
252b5132
RH
3209};
3210
b9733481
L
3211static const char **names_mm;
3212static const char *intel_names_mm[] = {
3213 "mm0", "mm1", "mm2", "mm3",
3214 "mm4", "mm5", "mm6", "mm7"
3215};
3216static const char *att_names_mm[] = {
3217 "%mm0", "%mm1", "%mm2", "%mm3",
3218 "%mm4", "%mm5", "%mm6", "%mm7"
3219};
3220
7e8b059b
L
3221static const char *intel_names_bnd[] = {
3222 "bnd0", "bnd1", "bnd2", "bnd3"
3223};
3224
3225static const char *att_names_bnd[] = {
3226 "%bnd0", "%bnd1", "%bnd2", "%bnd3"
3227};
3228
b9733481
L
3229static const char **names_xmm;
3230static const char *intel_names_xmm[] = {
3231 "xmm0", "xmm1", "xmm2", "xmm3",
3232 "xmm4", "xmm5", "xmm6", "xmm7",
3233 "xmm8", "xmm9", "xmm10", "xmm11",
43234a1e
L
3234 "xmm12", "xmm13", "xmm14", "xmm15",
3235 "xmm16", "xmm17", "xmm18", "xmm19",
3236 "xmm20", "xmm21", "xmm22", "xmm23",
3237 "xmm24", "xmm25", "xmm26", "xmm27",
3238 "xmm28", "xmm29", "xmm30", "xmm31"
b9733481
L
3239};
3240static const char *att_names_xmm[] = {
3241 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
3242 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
3243 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
43234a1e
L
3244 "%xmm12", "%xmm13", "%xmm14", "%xmm15",
3245 "%xmm16", "%xmm17", "%xmm18", "%xmm19",
3246 "%xmm20", "%xmm21", "%xmm22", "%xmm23",
3247 "%xmm24", "%xmm25", "%xmm26", "%xmm27",
3248 "%xmm28", "%xmm29", "%xmm30", "%xmm31"
b9733481
L
3249};
3250
3251static const char **names_ymm;
3252static const char *intel_names_ymm[] = {
3253 "ymm0", "ymm1", "ymm2", "ymm3",
3254 "ymm4", "ymm5", "ymm6", "ymm7",
3255 "ymm8", "ymm9", "ymm10", "ymm11",
43234a1e
L
3256 "ymm12", "ymm13", "ymm14", "ymm15",
3257 "ymm16", "ymm17", "ymm18", "ymm19",
3258 "ymm20", "ymm21", "ymm22", "ymm23",
3259 "ymm24", "ymm25", "ymm26", "ymm27",
3260 "ymm28", "ymm29", "ymm30", "ymm31"
b9733481
L
3261};
3262static const char *att_names_ymm[] = {
3263 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
3264 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
3265 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
43234a1e
L
3266 "%ymm12", "%ymm13", "%ymm14", "%ymm15",
3267 "%ymm16", "%ymm17", "%ymm18", "%ymm19",
3268 "%ymm20", "%ymm21", "%ymm22", "%ymm23",
3269 "%ymm24", "%ymm25", "%ymm26", "%ymm27",
3270 "%ymm28", "%ymm29", "%ymm30", "%ymm31"
3271};
3272
3273static const char **names_zmm;
3274static const char *intel_names_zmm[] = {
3275 "zmm0", "zmm1", "zmm2", "zmm3",
3276 "zmm4", "zmm5", "zmm6", "zmm7",
3277 "zmm8", "zmm9", "zmm10", "zmm11",
3278 "zmm12", "zmm13", "zmm14", "zmm15",
3279 "zmm16", "zmm17", "zmm18", "zmm19",
3280 "zmm20", "zmm21", "zmm22", "zmm23",
3281 "zmm24", "zmm25", "zmm26", "zmm27",
3282 "zmm28", "zmm29", "zmm30", "zmm31"
3283};
3284static const char *att_names_zmm[] = {
3285 "%zmm0", "%zmm1", "%zmm2", "%zmm3",
3286 "%zmm4", "%zmm5", "%zmm6", "%zmm7",
3287 "%zmm8", "%zmm9", "%zmm10", "%zmm11",
3288 "%zmm12", "%zmm13", "%zmm14", "%zmm15",
3289 "%zmm16", "%zmm17", "%zmm18", "%zmm19",
3290 "%zmm20", "%zmm21", "%zmm22", "%zmm23",
3291 "%zmm24", "%zmm25", "%zmm26", "%zmm27",
3292 "%zmm28", "%zmm29", "%zmm30", "%zmm31"
3293};
3294
3295static const char **names_mask;
3296static const char *intel_names_mask[] = {
3297 "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"
3298};
3299static const char *att_names_mask[] = {
3300 "%k0", "%k1", "%k2", "%k3", "%k4", "%k5", "%k6", "%k7"
3301};
3302
3303static const char *names_rounding[] =
3304{
3305 "{rn-sae}",
3306 "{rd-sae}",
3307 "{ru-sae}",
3308 "{rz-sae}"
b9733481
L
3309};
3310
1ceb70f8
L
3311static const struct dis386 reg_table[][8] = {
3312 /* REG_80 */
252b5132 3313 {
bf890a93
IT
3314 { "addA", { Ebh1, Ib }, 0 },
3315 { "orA", { Ebh1, Ib }, 0 },
3316 { "adcA", { Ebh1, Ib }, 0 },
3317 { "sbbA", { Ebh1, Ib }, 0 },
3318 { "andA", { Ebh1, Ib }, 0 },
3319 { "subA", { Ebh1, Ib }, 0 },
3320 { "xorA", { Ebh1, Ib }, 0 },
3321 { "cmpA", { Eb, Ib }, 0 },
252b5132 3322 },
1ceb70f8 3323 /* REG_81 */
252b5132 3324 {
bf890a93
IT
3325 { "addQ", { Evh1, Iv }, 0 },
3326 { "orQ", { Evh1, Iv }, 0 },
3327 { "adcQ", { Evh1, Iv }, 0 },
3328 { "sbbQ", { Evh1, Iv }, 0 },
3329 { "andQ", { Evh1, Iv }, 0 },
3330 { "subQ", { Evh1, Iv }, 0 },
3331 { "xorQ", { Evh1, Iv }, 0 },
3332 { "cmpQ", { Ev, Iv }, 0 },
252b5132 3333 },
1ceb70f8 3334 /* REG_82 */
252b5132 3335 {
bf890a93
IT
3336 { "addQ", { Evh1, sIb }, 0 },
3337 { "orQ", { Evh1, sIb }, 0 },
3338 { "adcQ", { Evh1, sIb }, 0 },
3339 { "sbbQ", { Evh1, sIb }, 0 },
3340 { "andQ", { Evh1, sIb }, 0 },
3341 { "subQ", { Evh1, sIb }, 0 },
3342 { "xorQ", { Evh1, sIb }, 0 },
3343 { "cmpQ", { Ev, sIb }, 0 },
252b5132 3344 },
1ceb70f8 3345 /* REG_8F */
4e7d34a6 3346 {
bf890a93 3347 { "popU", { stackEv }, 0 },
c48244a5 3348 { XOP_8F_TABLE (XOP_09) },
592d1631
L
3349 { Bad_Opcode },
3350 { Bad_Opcode },
3351 { Bad_Opcode },
f88c9eb0 3352 { XOP_8F_TABLE (XOP_09) },
4e7d34a6 3353 },
1ceb70f8 3354 /* REG_C0 */
252b5132 3355 {
bf890a93
IT
3356 { "rolA", { Eb, Ib }, 0 },
3357 { "rorA", { Eb, Ib }, 0 },
3358 { "rclA", { Eb, Ib }, 0 },
3359 { "rcrA", { Eb, Ib }, 0 },
3360 { "shlA", { Eb, Ib }, 0 },
3361 { "shrA", { Eb, Ib }, 0 },
592d1631 3362 { Bad_Opcode },
bf890a93 3363 { "sarA", { Eb, Ib }, 0 },
252b5132 3364 },
1ceb70f8 3365 /* REG_C1 */
252b5132 3366 {
bf890a93
IT
3367 { "rolQ", { Ev, Ib }, 0 },
3368 { "rorQ", { Ev, Ib }, 0 },
3369 { "rclQ", { Ev, Ib }, 0 },
3370 { "rcrQ", { Ev, Ib }, 0 },
3371 { "shlQ", { Ev, Ib }, 0 },
3372 { "shrQ", { Ev, Ib }, 0 },
592d1631 3373 { Bad_Opcode },
bf890a93 3374 { "sarQ", { Ev, Ib }, 0 },
252b5132 3375 },
1ceb70f8 3376 /* REG_C6 */
4e7d34a6 3377 {
bf890a93 3378 { "movA", { Ebh3, Ib }, 0 },
42164a71
L
3379 { Bad_Opcode },
3380 { Bad_Opcode },
3381 { Bad_Opcode },
3382 { Bad_Opcode },
3383 { Bad_Opcode },
3384 { Bad_Opcode },
3385 { MOD_TABLE (MOD_C6_REG_7) },
4e7d34a6 3386 },
1ceb70f8 3387 /* REG_C7 */
4e7d34a6 3388 {
bf890a93 3389 { "movQ", { Evh3, Iv }, 0 },
42164a71
L
3390 { Bad_Opcode },
3391 { Bad_Opcode },
3392 { Bad_Opcode },
3393 { Bad_Opcode },
3394 { Bad_Opcode },
3395 { Bad_Opcode },
3396 { MOD_TABLE (MOD_C7_REG_7) },
4e7d34a6 3397 },
1ceb70f8 3398 /* REG_D0 */
252b5132 3399 {
bf890a93
IT
3400 { "rolA", { Eb, I1 }, 0 },
3401 { "rorA", { Eb, I1 }, 0 },
3402 { "rclA", { Eb, I1 }, 0 },
3403 { "rcrA", { Eb, I1 }, 0 },
3404 { "shlA", { Eb, I1 }, 0 },
3405 { "shrA", { Eb, I1 }, 0 },
592d1631 3406 { Bad_Opcode },
bf890a93 3407 { "sarA", { Eb, I1 }, 0 },
252b5132 3408 },
1ceb70f8 3409 /* REG_D1 */
252b5132 3410 {
bf890a93
IT
3411 { "rolQ", { Ev, I1 }, 0 },
3412 { "rorQ", { Ev, I1 }, 0 },
3413 { "rclQ", { Ev, I1 }, 0 },
3414 { "rcrQ", { Ev, I1 }, 0 },
3415 { "shlQ", { Ev, I1 }, 0 },
3416 { "shrQ", { Ev, I1 }, 0 },
592d1631 3417 { Bad_Opcode },
bf890a93 3418 { "sarQ", { Ev, I1 }, 0 },
252b5132 3419 },
1ceb70f8 3420 /* REG_D2 */
252b5132 3421 {
bf890a93
IT
3422 { "rolA", { Eb, CL }, 0 },
3423 { "rorA", { Eb, CL }, 0 },
3424 { "rclA", { Eb, CL }, 0 },
3425 { "rcrA", { Eb, CL }, 0 },
3426 { "shlA", { Eb, CL }, 0 },
3427 { "shrA", { Eb, CL }, 0 },
592d1631 3428 { Bad_Opcode },
bf890a93 3429 { "sarA", { Eb, CL }, 0 },
252b5132 3430 },
1ceb70f8 3431 /* REG_D3 */
252b5132 3432 {
bf890a93
IT
3433 { "rolQ", { Ev, CL }, 0 },
3434 { "rorQ", { Ev, CL }, 0 },
3435 { "rclQ", { Ev, CL }, 0 },
3436 { "rcrQ", { Ev, CL }, 0 },
3437 { "shlQ", { Ev, CL }, 0 },
3438 { "shrQ", { Ev, CL }, 0 },
592d1631 3439 { Bad_Opcode },
bf890a93 3440 { "sarQ", { Ev, CL }, 0 },
252b5132 3441 },
1ceb70f8 3442 /* REG_F6 */
252b5132 3443 {
bf890a93 3444 { "testA", { Eb, Ib }, 0 },
592d1631 3445 { Bad_Opcode },
bf890a93
IT
3446 { "notA", { Ebh1 }, 0 },
3447 { "negA", { Ebh1 }, 0 },
3448 { "mulA", { Eb }, 0 }, /* Don't print the implicit %al register, */
3449 { "imulA", { Eb }, 0 }, /* to distinguish these opcodes from other */
3450 { "divA", { Eb }, 0 }, /* mul/imul opcodes. Do the same for div */
3451 { "idivA", { Eb }, 0 }, /* and idiv for consistency. */
252b5132 3452 },
1ceb70f8 3453 /* REG_F7 */
252b5132 3454 {
bf890a93 3455 { "testQ", { Ev, Iv }, 0 },
592d1631 3456 { Bad_Opcode },
bf890a93
IT
3457 { "notQ", { Evh1 }, 0 },
3458 { "negQ", { Evh1 }, 0 },
3459 { "mulQ", { Ev }, 0 }, /* Don't print the implicit register. */
3460 { "imulQ", { Ev }, 0 },
3461 { "divQ", { Ev }, 0 },
3462 { "idivQ", { Ev }, 0 },
252b5132 3463 },
1ceb70f8 3464 /* REG_FE */
252b5132 3465 {
bf890a93
IT
3466 { "incA", { Ebh1 }, 0 },
3467 { "decA", { Ebh1 }, 0 },
252b5132 3468 },
1ceb70f8 3469 /* REG_FF */
252b5132 3470 {
bf890a93
IT
3471 { "incQ", { Evh1 }, 0 },
3472 { "decQ", { Evh1 }, 0 },
3473 { "call{T|}", { indirEv, BND }, 0 },
4a357820 3474 { MOD_TABLE (MOD_FF_REG_3) },
bf890a93 3475 { "jmp{T|}", { indirEv, BND }, 0 },
4a357820 3476 { MOD_TABLE (MOD_FF_REG_5) },
bf890a93 3477 { "pushU", { stackEv }, 0 },
592d1631 3478 { Bad_Opcode },
252b5132 3479 },
1ceb70f8 3480 /* REG_0F00 */
252b5132 3481 {
bf890a93
IT
3482 { "sldtD", { Sv }, 0 },
3483 { "strD", { Sv }, 0 },
3484 { "lldt", { Ew }, 0 },
3485 { "ltr", { Ew }, 0 },
3486 { "verr", { Ew }, 0 },
3487 { "verw", { Ew }, 0 },
592d1631
L
3488 { Bad_Opcode },
3489 { Bad_Opcode },
252b5132 3490 },
1ceb70f8 3491 /* REG_0F01 */
252b5132 3492 {
1ceb70f8
L
3493 { MOD_TABLE (MOD_0F01_REG_0) },
3494 { MOD_TABLE (MOD_0F01_REG_1) },
3495 { MOD_TABLE (MOD_0F01_REG_2) },
3496 { MOD_TABLE (MOD_0F01_REG_3) },
bf890a93 3497 { "smswD", { Sv }, 0 },
592d1631 3498 { Bad_Opcode },
bf890a93 3499 { "lmsw", { Ew }, 0 },
1ceb70f8 3500 { MOD_TABLE (MOD_0F01_REG_7) },
252b5132 3501 },
b5b1fc4f 3502 /* REG_0F0D */
252b5132 3503 {
bf890a93
IT
3504 { "prefetch", { Mb }, 0 },
3505 { "prefetchw", { Mb }, 0 },
3506 { "prefetchwt1", { Mb }, 0 },
3507 { "prefetch", { Mb }, 0 },
3508 { "prefetch", { Mb }, 0 },
3509 { "prefetch", { Mb }, 0 },
3510 { "prefetch", { Mb }, 0 },
3511 { "prefetch", { Mb }, 0 },
252b5132 3512 },
1ceb70f8 3513 /* REG_0F18 */
252b5132 3514 {
1ceb70f8
L
3515 { MOD_TABLE (MOD_0F18_REG_0) },
3516 { MOD_TABLE (MOD_0F18_REG_1) },
3517 { MOD_TABLE (MOD_0F18_REG_2) },
3518 { MOD_TABLE (MOD_0F18_REG_3) },
d7189fa5
RM
3519 { MOD_TABLE (MOD_0F18_REG_4) },
3520 { MOD_TABLE (MOD_0F18_REG_5) },
3521 { MOD_TABLE (MOD_0F18_REG_6) },
3522 { MOD_TABLE (MOD_0F18_REG_7) },
252b5132 3523 },
1ceb70f8 3524 /* REG_0F71 */
a6bd098c 3525 {
592d1631
L
3526 { Bad_Opcode },
3527 { Bad_Opcode },
1ceb70f8 3528 { MOD_TABLE (MOD_0F71_REG_2) },
592d1631 3529 { Bad_Opcode },
1ceb70f8 3530 { MOD_TABLE (MOD_0F71_REG_4) },
592d1631 3531 { Bad_Opcode },
1ceb70f8 3532 { MOD_TABLE (MOD_0F71_REG_6) },
a6bd098c 3533 },
1ceb70f8 3534 /* REG_0F72 */
a6bd098c 3535 {
592d1631
L
3536 { Bad_Opcode },
3537 { Bad_Opcode },
1ceb70f8 3538 { MOD_TABLE (MOD_0F72_REG_2) },
592d1631 3539 { Bad_Opcode },
1ceb70f8 3540 { MOD_TABLE (MOD_0F72_REG_4) },
592d1631 3541 { Bad_Opcode },
1ceb70f8 3542 { MOD_TABLE (MOD_0F72_REG_6) },
a6bd098c 3543 },
1ceb70f8 3544 /* REG_0F73 */
252b5132 3545 {
592d1631
L
3546 { Bad_Opcode },
3547 { Bad_Opcode },
1ceb70f8
L
3548 { MOD_TABLE (MOD_0F73_REG_2) },
3549 { MOD_TABLE (MOD_0F73_REG_3) },
592d1631
L
3550 { Bad_Opcode },
3551 { Bad_Opcode },
1ceb70f8
L
3552 { MOD_TABLE (MOD_0F73_REG_6) },
3553 { MOD_TABLE (MOD_0F73_REG_7) },
252b5132 3554 },
1ceb70f8 3555 /* REG_0FA6 */
252b5132 3556 {
bf890a93
IT
3557 { "montmul", { { OP_0f07, 0 } }, 0 },
3558 { "xsha1", { { OP_0f07, 0 } }, 0 },
3559 { "xsha256", { { OP_0f07, 0 } }, 0 },
4e7d34a6 3560 },
1ceb70f8 3561 /* REG_0FA7 */
4e7d34a6 3562 {
bf890a93
IT
3563 { "xstore-rng", { { OP_0f07, 0 } }, 0 },
3564 { "xcrypt-ecb", { { OP_0f07, 0 } }, 0 },
3565 { "xcrypt-cbc", { { OP_0f07, 0 } }, 0 },
3566 { "xcrypt-ctr", { { OP_0f07, 0 } }, 0 },
3567 { "xcrypt-cfb", { { OP_0f07, 0 } }, 0 },
3568 { "xcrypt-ofb", { { OP_0f07, 0 } }, 0 },
4e7d34a6 3569 },
1ceb70f8 3570 /* REG_0FAE */
4e7d34a6 3571 {
1ceb70f8
L
3572 { MOD_TABLE (MOD_0FAE_REG_0) },
3573 { MOD_TABLE (MOD_0FAE_REG_1) },
3574 { MOD_TABLE (MOD_0FAE_REG_2) },
3575 { MOD_TABLE (MOD_0FAE_REG_3) },
475a2301 3576 { MOD_TABLE (MOD_0FAE_REG_4) },
1ceb70f8
L
3577 { MOD_TABLE (MOD_0FAE_REG_5) },
3578 { MOD_TABLE (MOD_0FAE_REG_6) },
3579 { MOD_TABLE (MOD_0FAE_REG_7) },
252b5132 3580 },
1ceb70f8 3581 /* REG_0FBA */
252b5132 3582 {
592d1631
L
3583 { Bad_Opcode },
3584 { Bad_Opcode },
3585 { Bad_Opcode },
3586 { Bad_Opcode },
bf890a93
IT
3587 { "btQ", { Ev, Ib }, 0 },
3588 { "btsQ", { Evh1, Ib }, 0 },
3589 { "btrQ", { Evh1, Ib }, 0 },
3590 { "btcQ", { Evh1, Ib }, 0 },
c608c12e 3591 },
1ceb70f8 3592 /* REG_0FC7 */
c608c12e 3593 {
592d1631 3594 { Bad_Opcode },
bf890a93 3595 { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } }, 0 },
592d1631 3596 { Bad_Opcode },
963f3586
IT
3597 { MOD_TABLE (MOD_0FC7_REG_3) },
3598 { MOD_TABLE (MOD_0FC7_REG_4) },
3599 { MOD_TABLE (MOD_0FC7_REG_5) },
1ceb70f8
L
3600 { MOD_TABLE (MOD_0FC7_REG_6) },
3601 { MOD_TABLE (MOD_0FC7_REG_7) },
252b5132 3602 },
592a252b 3603 /* REG_VEX_0F71 */
c0f3af97 3604 {
592d1631
L
3605 { Bad_Opcode },
3606 { Bad_Opcode },
592a252b 3607 { MOD_TABLE (MOD_VEX_0F71_REG_2) },
592d1631 3608 { Bad_Opcode },
592a252b 3609 { MOD_TABLE (MOD_VEX_0F71_REG_4) },
592d1631 3610 { Bad_Opcode },
592a252b 3611 { MOD_TABLE (MOD_VEX_0F71_REG_6) },
c0f3af97 3612 },
592a252b 3613 /* REG_VEX_0F72 */
c0f3af97 3614 {
592d1631
L
3615 { Bad_Opcode },
3616 { Bad_Opcode },
592a252b 3617 { MOD_TABLE (MOD_VEX_0F72_REG_2) },
592d1631 3618 { Bad_Opcode },
592a252b 3619 { MOD_TABLE (MOD_VEX_0F72_REG_4) },
592d1631 3620 { Bad_Opcode },
592a252b 3621 { MOD_TABLE (MOD_VEX_0F72_REG_6) },
c0f3af97 3622 },
592a252b 3623 /* REG_VEX_0F73 */
c0f3af97 3624 {
592d1631
L
3625 { Bad_Opcode },
3626 { Bad_Opcode },
592a252b
L
3627 { MOD_TABLE (MOD_VEX_0F73_REG_2) },
3628 { MOD_TABLE (MOD_VEX_0F73_REG_3) },
592d1631
L
3629 { Bad_Opcode },
3630 { Bad_Opcode },
592a252b
L
3631 { MOD_TABLE (MOD_VEX_0F73_REG_6) },
3632 { MOD_TABLE (MOD_VEX_0F73_REG_7) },
c0f3af97 3633 },
592a252b 3634 /* REG_VEX_0FAE */
c0f3af97 3635 {
592d1631
L
3636 { Bad_Opcode },
3637 { Bad_Opcode },
592a252b
L
3638 { MOD_TABLE (MOD_VEX_0FAE_REG_2) },
3639 { MOD_TABLE (MOD_VEX_0FAE_REG_3) },
c0f3af97 3640 },
f12dc422
L
3641 /* REG_VEX_0F38F3 */
3642 {
3643 { Bad_Opcode },
3644 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1) },
3645 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2) },
3646 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3) },
3647 },
f88c9eb0
SP
3648 /* REG_XOP_LWPCB */
3649 {
bf890a93
IT
3650 { "llwpcb", { { OP_LWPCB_E, 0 } }, 0 },
3651 { "slwpcb", { { OP_LWPCB_E, 0 } }, 0 },
f88c9eb0
SP
3652 },
3653 /* REG_XOP_LWP */
3654 {
bf890a93
IT
3655 { "lwpins", { { OP_LWP_E, 0 }, Ed, Iq }, 0 },
3656 { "lwpval", { { OP_LWP_E, 0 }, Ed, Iq }, 0 },
f88c9eb0 3657 },
2a2a0f38
QN
3658 /* REG_XOP_TBM_01 */
3659 {
3660 { Bad_Opcode },
bf890a93
IT
3661 { "blcfill", { { OP_LWP_E, 0 }, Ev }, 0 },
3662 { "blsfill", { { OP_LWP_E, 0 }, Ev }, 0 },
3663 { "blcs", { { OP_LWP_E, 0 }, Ev }, 0 },
3664 { "tzmsk", { { OP_LWP_E, 0 }, Ev }, 0 },
3665 { "blcic", { { OP_LWP_E, 0 }, Ev }, 0 },
3666 { "blsic", { { OP_LWP_E, 0 }, Ev }, 0 },
3667 { "t1mskc", { { OP_LWP_E, 0 }, Ev }, 0 },
2a2a0f38
QN
3668 },
3669 /* REG_XOP_TBM_02 */
3670 {
3671 { Bad_Opcode },
bf890a93 3672 { "blcmsk", { { OP_LWP_E, 0 }, Ev }, 0 },
2a2a0f38
QN
3673 { Bad_Opcode },
3674 { Bad_Opcode },
3675 { Bad_Opcode },
3676 { Bad_Opcode },
bf890a93 3677 { "blci", { { OP_LWP_E, 0 }, Ev }, 0 },
2a2a0f38 3678 },
43234a1e
L
3679#define NEED_REG_TABLE
3680#include "i386-dis-evex.h"
3681#undef NEED_REG_TABLE
4e7d34a6
L
3682};
3683
1ceb70f8
L
3684static const struct dis386 prefix_table[][4] = {
3685 /* PREFIX_90 */
252b5132 3686 {
bf890a93
IT
3687 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
3688 { "pause", { XX }, 0 },
3689 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
507bd325 3690 { NULL, { { NULL, 0 } }, PREFIX_IGNORED }
0f10071e 3691 },
4e7d34a6 3692
1ceb70f8 3693 /* PREFIX_0F10 */
cc0ec051 3694 {
507bd325
L
3695 { "movups", { XM, EXx }, PREFIX_OPCODE },
3696 { "movss", { XM, EXd }, PREFIX_OPCODE },
3697 { "movupd", { XM, EXx }, PREFIX_OPCODE },
3698 { "movsd", { XM, EXq }, PREFIX_OPCODE },
30d1c836 3699 },
4e7d34a6 3700
1ceb70f8 3701 /* PREFIX_0F11 */
30d1c836 3702 {
507bd325
L
3703 { "movups", { EXxS, XM }, PREFIX_OPCODE },
3704 { "movss", { EXdS, XM }, PREFIX_OPCODE },
3705 { "movupd", { EXxS, XM }, PREFIX_OPCODE },
3706 { "movsd", { EXqS, XM }, PREFIX_OPCODE },
4e7d34a6 3707 },
252b5132 3708
1ceb70f8 3709 /* PREFIX_0F12 */
c608c12e 3710 {
1ceb70f8 3711 { MOD_TABLE (MOD_0F12_PREFIX_0) },
507bd325
L
3712 { "movsldup", { XM, EXx }, PREFIX_OPCODE },
3713 { "movlpd", { XM, EXq }, PREFIX_OPCODE },
3714 { "movddup", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3715 },
4e7d34a6 3716
1ceb70f8 3717 /* PREFIX_0F16 */
c608c12e 3718 {
1ceb70f8 3719 { MOD_TABLE (MOD_0F16_PREFIX_0) },
507bd325
L
3720 { "movshdup", { XM, EXx }, PREFIX_OPCODE },
3721 { "movhpd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3722 },
4e7d34a6 3723
7e8b059b
L
3724 /* PREFIX_0F1A */
3725 {
3726 { MOD_TABLE (MOD_0F1A_PREFIX_0) },
bf890a93
IT
3727 { "bndcl", { Gbnd, Ev_bnd }, 0 },
3728 { "bndmov", { Gbnd, Ebnd }, 0 },
3729 { "bndcu", { Gbnd, Ev_bnd }, 0 },
7e8b059b
L
3730 },
3731
3732 /* PREFIX_0F1B */
3733 {
3734 { MOD_TABLE (MOD_0F1B_PREFIX_0) },
3735 { MOD_TABLE (MOD_0F1B_PREFIX_1) },
bf890a93
IT
3736 { "bndmov", { Ebnd, Gbnd }, 0 },
3737 { "bndcn", { Gbnd, Ev_bnd }, 0 },
7e8b059b
L
3738 },
3739
1ceb70f8 3740 /* PREFIX_0F2A */
c608c12e 3741 {
507bd325
L
3742 { "cvtpi2ps", { XM, EMCq }, PREFIX_OPCODE },
3743 { "cvtsi2ss%LQ", { XM, Ev }, PREFIX_OPCODE },
3744 { "cvtpi2pd", { XM, EMCq }, PREFIX_OPCODE },
bf890a93 3745 { "cvtsi2sd%LQ", { XM, Ev }, 0 },
c608c12e 3746 },
4e7d34a6 3747
1ceb70f8 3748 /* PREFIX_0F2B */
c608c12e 3749 {
75c135a8
L
3750 { MOD_TABLE (MOD_0F2B_PREFIX_0) },
3751 { MOD_TABLE (MOD_0F2B_PREFIX_1) },
3752 { MOD_TABLE (MOD_0F2B_PREFIX_2) },
3753 { MOD_TABLE (MOD_0F2B_PREFIX_3) },
c608c12e 3754 },
4e7d34a6 3755
1ceb70f8 3756 /* PREFIX_0F2C */
c608c12e 3757 {
507bd325
L
3758 { "cvttps2pi", { MXC, EXq }, PREFIX_OPCODE },
3759 { "cvttss2siY", { Gv, EXd }, PREFIX_OPCODE },
3760 { "cvttpd2pi", { MXC, EXx }, PREFIX_OPCODE },
3761 { "cvttsd2siY", { Gv, EXq }, PREFIX_OPCODE },
c608c12e 3762 },
4e7d34a6 3763
1ceb70f8 3764 /* PREFIX_0F2D */
c608c12e 3765 {
507bd325
L
3766 { "cvtps2pi", { MXC, EXq }, PREFIX_OPCODE },
3767 { "cvtss2siY", { Gv, EXd }, PREFIX_OPCODE },
3768 { "cvtpd2pi", { MXC, EXx }, PREFIX_OPCODE },
3769 { "cvtsd2siY", { Gv, EXq }, PREFIX_OPCODE },
c608c12e 3770 },
4e7d34a6 3771
1ceb70f8 3772 /* PREFIX_0F2E */
c608c12e 3773 {
bf890a93 3774 { "ucomiss",{ XM, EXd }, 0 },
592d1631 3775 { Bad_Opcode },
bf890a93 3776 { "ucomisd",{ XM, EXq }, 0 },
c608c12e 3777 },
4e7d34a6 3778
1ceb70f8 3779 /* PREFIX_0F2F */
c608c12e 3780 {
bf890a93 3781 { "comiss", { XM, EXd }, 0 },
592d1631 3782 { Bad_Opcode },
bf890a93 3783 { "comisd", { XM, EXq }, 0 },
c608c12e 3784 },
4e7d34a6 3785
1ceb70f8 3786 /* PREFIX_0F51 */
c608c12e 3787 {
507bd325
L
3788 { "sqrtps", { XM, EXx }, PREFIX_OPCODE },
3789 { "sqrtss", { XM, EXd }, PREFIX_OPCODE },
3790 { "sqrtpd", { XM, EXx }, PREFIX_OPCODE },
3791 { "sqrtsd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3792 },
4e7d34a6 3793
1ceb70f8 3794 /* PREFIX_0F52 */
c608c12e 3795 {
507bd325
L
3796 { "rsqrtps",{ XM, EXx }, PREFIX_OPCODE },
3797 { "rsqrtss",{ XM, EXd }, PREFIX_OPCODE },
c608c12e 3798 },
4e7d34a6 3799
1ceb70f8 3800 /* PREFIX_0F53 */
c608c12e 3801 {
507bd325
L
3802 { "rcpps", { XM, EXx }, PREFIX_OPCODE },
3803 { "rcpss", { XM, EXd }, PREFIX_OPCODE },
c608c12e 3804 },
4e7d34a6 3805
1ceb70f8 3806 /* PREFIX_0F58 */
c608c12e 3807 {
507bd325
L
3808 { "addps", { XM, EXx }, PREFIX_OPCODE },
3809 { "addss", { XM, EXd }, PREFIX_OPCODE },
3810 { "addpd", { XM, EXx }, PREFIX_OPCODE },
3811 { "addsd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3812 },
4e7d34a6 3813
1ceb70f8 3814 /* PREFIX_0F59 */
c608c12e 3815 {
507bd325
L
3816 { "mulps", { XM, EXx }, PREFIX_OPCODE },
3817 { "mulss", { XM, EXd }, PREFIX_OPCODE },
3818 { "mulpd", { XM, EXx }, PREFIX_OPCODE },
3819 { "mulsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3820 },
4e7d34a6 3821
1ceb70f8 3822 /* PREFIX_0F5A */
041bd2e0 3823 {
507bd325
L
3824 { "cvtps2pd", { XM, EXq }, PREFIX_OPCODE },
3825 { "cvtss2sd", { XM, EXd }, PREFIX_OPCODE },
3826 { "cvtpd2ps", { XM, EXx }, PREFIX_OPCODE },
3827 { "cvtsd2ss", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3828 },
4e7d34a6 3829
1ceb70f8 3830 /* PREFIX_0F5B */
041bd2e0 3831 {
507bd325
L
3832 { "cvtdq2ps", { XM, EXx }, PREFIX_OPCODE },
3833 { "cvttps2dq", { XM, EXx }, PREFIX_OPCODE },
3834 { "cvtps2dq", { XM, EXx }, PREFIX_OPCODE },
041bd2e0 3835 },
4e7d34a6 3836
1ceb70f8 3837 /* PREFIX_0F5C */
041bd2e0 3838 {
507bd325
L
3839 { "subps", { XM, EXx }, PREFIX_OPCODE },
3840 { "subss", { XM, EXd }, PREFIX_OPCODE },
3841 { "subpd", { XM, EXx }, PREFIX_OPCODE },
3842 { "subsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3843 },
4e7d34a6 3844
1ceb70f8 3845 /* PREFIX_0F5D */
041bd2e0 3846 {
507bd325
L
3847 { "minps", { XM, EXx }, PREFIX_OPCODE },
3848 { "minss", { XM, EXd }, PREFIX_OPCODE },
3849 { "minpd", { XM, EXx }, PREFIX_OPCODE },
3850 { "minsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3851 },
4e7d34a6 3852
1ceb70f8 3853 /* PREFIX_0F5E */
041bd2e0 3854 {
507bd325
L
3855 { "divps", { XM, EXx }, PREFIX_OPCODE },
3856 { "divss", { XM, EXd }, PREFIX_OPCODE },
3857 { "divpd", { XM, EXx }, PREFIX_OPCODE },
3858 { "divsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3859 },
4e7d34a6 3860
1ceb70f8 3861 /* PREFIX_0F5F */
041bd2e0 3862 {
507bd325
L
3863 { "maxps", { XM, EXx }, PREFIX_OPCODE },
3864 { "maxss", { XM, EXd }, PREFIX_OPCODE },
3865 { "maxpd", { XM, EXx }, PREFIX_OPCODE },
3866 { "maxsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3867 },
4e7d34a6 3868
1ceb70f8 3869 /* PREFIX_0F60 */
041bd2e0 3870 {
507bd325 3871 { "punpcklbw",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3872 { Bad_Opcode },
507bd325 3873 { "punpcklbw",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3874 },
4e7d34a6 3875
1ceb70f8 3876 /* PREFIX_0F61 */
041bd2e0 3877 {
507bd325 3878 { "punpcklwd",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3879 { Bad_Opcode },
507bd325 3880 { "punpcklwd",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3881 },
4e7d34a6 3882
1ceb70f8 3883 /* PREFIX_0F62 */
041bd2e0 3884 {
507bd325 3885 { "punpckldq",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3886 { Bad_Opcode },
507bd325 3887 { "punpckldq",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3888 },
4e7d34a6 3889
1ceb70f8 3890 /* PREFIX_0F6C */
041bd2e0 3891 {
592d1631
L
3892 { Bad_Opcode },
3893 { Bad_Opcode },
507bd325 3894 { "punpcklqdq", { XM, EXx }, PREFIX_OPCODE },
0f17484f 3895 },
4e7d34a6 3896
1ceb70f8 3897 /* PREFIX_0F6D */
0f17484f 3898 {
592d1631
L
3899 { Bad_Opcode },
3900 { Bad_Opcode },
507bd325 3901 { "punpckhqdq", { XM, EXx }, PREFIX_OPCODE },
041bd2e0 3902 },
4e7d34a6 3903
1ceb70f8 3904 /* PREFIX_0F6F */
ca164297 3905 {
507bd325
L
3906 { "movq", { MX, EM }, PREFIX_OPCODE },
3907 { "movdqu", { XM, EXx }, PREFIX_OPCODE },
3908 { "movdqa", { XM, EXx }, PREFIX_OPCODE },
ca164297 3909 },
4e7d34a6 3910
1ceb70f8 3911 /* PREFIX_0F70 */
4e7d34a6 3912 {
507bd325
L
3913 { "pshufw", { MX, EM, Ib }, PREFIX_OPCODE },
3914 { "pshufhw",{ XM, EXx, Ib }, PREFIX_OPCODE },
3915 { "pshufd", { XM, EXx, Ib }, PREFIX_OPCODE },
3916 { "pshuflw",{ XM, EXx, Ib }, PREFIX_OPCODE },
4e7d34a6
L
3917 },
3918
92fddf8e
L
3919 /* PREFIX_0F73_REG_3 */
3920 {
592d1631
L
3921 { Bad_Opcode },
3922 { Bad_Opcode },
bf890a93 3923 { "psrldq", { XS, Ib }, 0 },
92fddf8e
L
3924 },
3925
3926 /* PREFIX_0F73_REG_7 */
3927 {
592d1631
L
3928 { Bad_Opcode },
3929 { Bad_Opcode },
bf890a93 3930 { "pslldq", { XS, Ib }, 0 },
92fddf8e
L
3931 },
3932
1ceb70f8 3933 /* PREFIX_0F78 */
4e7d34a6 3934 {
bf890a93 3935 {"vmread", { Em, Gm }, 0 },
592d1631 3936 { Bad_Opcode },
bf890a93
IT
3937 {"extrq", { XS, Ib, Ib }, 0 },
3938 {"insertq", { XM, XS, Ib, Ib }, 0 },
4e7d34a6
L
3939 },
3940
1ceb70f8 3941 /* PREFIX_0F79 */
4e7d34a6 3942 {
bf890a93 3943 {"vmwrite", { Gm, Em }, 0 },
592d1631 3944 { Bad_Opcode },
bf890a93
IT
3945 {"extrq", { XM, XS }, 0 },
3946 {"insertq", { XM, XS }, 0 },
4e7d34a6
L
3947 },
3948
1ceb70f8 3949 /* PREFIX_0F7C */
ca164297 3950 {
592d1631
L
3951 { Bad_Opcode },
3952 { Bad_Opcode },
507bd325
L
3953 { "haddpd", { XM, EXx }, PREFIX_OPCODE },
3954 { "haddps", { XM, EXx }, PREFIX_OPCODE },
ca164297 3955 },
4e7d34a6 3956
1ceb70f8 3957 /* PREFIX_0F7D */
ca164297 3958 {
592d1631
L
3959 { Bad_Opcode },
3960 { Bad_Opcode },
507bd325
L
3961 { "hsubpd", { XM, EXx }, PREFIX_OPCODE },
3962 { "hsubps", { XM, EXx }, PREFIX_OPCODE },
ca164297 3963 },
4e7d34a6 3964
1ceb70f8 3965 /* PREFIX_0F7E */
ca164297 3966 {
507bd325
L
3967 { "movK", { Edq, MX }, PREFIX_OPCODE },
3968 { "movq", { XM, EXq }, PREFIX_OPCODE },
3969 { "movK", { Edq, XM }, PREFIX_OPCODE },
ca164297 3970 },
4e7d34a6 3971
1ceb70f8 3972 /* PREFIX_0F7F */
ca164297 3973 {
507bd325
L
3974 { "movq", { EMS, MX }, PREFIX_OPCODE },
3975 { "movdqu", { EXxS, XM }, PREFIX_OPCODE },
3976 { "movdqa", { EXxS, XM }, PREFIX_OPCODE },
ca164297 3977 },
4e7d34a6 3978
c7b8aa3a
L
3979 /* PREFIX_0FAE_REG_0 */
3980 {
3981 { Bad_Opcode },
bf890a93 3982 { "rdfsbase", { Ev }, 0 },
c7b8aa3a
L
3983 },
3984
3985 /* PREFIX_0FAE_REG_1 */
3986 {
3987 { Bad_Opcode },
bf890a93 3988 { "rdgsbase", { Ev }, 0 },
c7b8aa3a
L
3989 },
3990
3991 /* PREFIX_0FAE_REG_2 */
3992 {
3993 { Bad_Opcode },
bf890a93 3994 { "wrfsbase", { Ev }, 0 },
c7b8aa3a
L
3995 },
3996
3997 /* PREFIX_0FAE_REG_3 */
3998 {
3999 { Bad_Opcode },
bf890a93 4000 { "wrgsbase", { Ev }, 0 },
c7b8aa3a
L
4001 },
4002
c5e7287a
IT
4003 /* PREFIX_0FAE_REG_6 */
4004 {
bf890a93 4005 { "xsaveopt", { FXSAVE }, 0 },
c5e7287a 4006 { Bad_Opcode },
bf890a93 4007 { "clwb", { Mb }, 0 },
c5e7287a
IT
4008 },
4009
963f3586
IT
4010 /* PREFIX_0FAE_REG_7 */
4011 {
bf890a93 4012 { "clflush", { Mb }, 0 },
963f3586 4013 { Bad_Opcode },
bf890a93 4014 { "clflushopt", { Mb }, 0 },
963f3586
IT
4015 },
4016
9d8596f0
IT
4017 /* PREFIX_RM_0_0FAE_REG_7 */
4018 {
bf890a93 4019 { "sfence", { Skip_MODRM }, 0 },
9d8596f0 4020 { Bad_Opcode },
bf890a93 4021 { "pcommit", { Skip_MODRM }, 0 },
9d8596f0
IT
4022 },
4023
1ceb70f8 4024 /* PREFIX_0FB8 */
ca164297 4025 {
592d1631 4026 { Bad_Opcode },
bf890a93 4027 { "popcntS", { Gv, Ev }, 0 },
ca164297 4028 },
4e7d34a6 4029
f12dc422
L
4030 /* PREFIX_0FBC */
4031 {
bf890a93
IT
4032 { "bsfS", { Gv, Ev }, 0 },
4033 { "tzcntS", { Gv, Ev }, 0 },
4034 { "bsfS", { Gv, Ev }, 0 },
f12dc422
L
4035 },
4036
1ceb70f8 4037 /* PREFIX_0FBD */
050dfa73 4038 {
bf890a93
IT
4039 { "bsrS", { Gv, Ev }, 0 },
4040 { "lzcntS", { Gv, Ev }, 0 },
4041 { "bsrS", { Gv, Ev }, 0 },
050dfa73
MM
4042 },
4043
1ceb70f8 4044 /* PREFIX_0FC2 */
050dfa73 4045 {
507bd325
L
4046 { "cmpps", { XM, EXx, CMP }, PREFIX_OPCODE },
4047 { "cmpss", { XM, EXd, CMP }, PREFIX_OPCODE },
4048 { "cmppd", { XM, EXx, CMP }, PREFIX_OPCODE },
4049 { "cmpsd", { XM, EXq, CMP }, PREFIX_OPCODE },
050dfa73 4050 },
246c51aa 4051
a8484f96 4052 /* PREFIX_MOD_0_0FC3 */
4ee52178 4053 {
a8484f96 4054 { "movntiS", { Ev, Gv }, PREFIX_OPCODE },
4ee52178
L
4055 },
4056
f24bcbaa 4057 /* PREFIX_MOD_0_0FC7_REG_6 */
92fddf8e 4058 {
bf890a93
IT
4059 { "vmptrld",{ Mq }, 0 },
4060 { "vmxon", { Mq }, 0 },
4061 { "vmclear",{ Mq }, 0 },
92fddf8e
L
4062 },
4063
f24bcbaa
L
4064 /* PREFIX_MOD_3_0FC7_REG_6 */
4065 {
4066 { "rdrand", { Ev }, 0 },
4067 { Bad_Opcode },
4068 { "rdrand", { Ev }, 0 }
4069 },
4070
4071 /* PREFIX_MOD_3_0FC7_REG_7 */
4072 {
4073 { "rdseed", { Ev }, 0 },
4074 { Bad_Opcode },
4075 { "rdseed", { Ev }, 0 },
4076 },
4077
1ceb70f8 4078 /* PREFIX_0FD0 */
050dfa73 4079 {
592d1631
L
4080 { Bad_Opcode },
4081 { Bad_Opcode },
bf890a93
IT
4082 { "addsubpd", { XM, EXx }, 0 },
4083 { "addsubps", { XM, EXx }, 0 },
246c51aa 4084 },
050dfa73 4085
1ceb70f8 4086 /* PREFIX_0FD6 */
050dfa73 4087 {
592d1631 4088 { Bad_Opcode },
bf890a93
IT
4089 { "movq2dq",{ XM, MS }, 0 },
4090 { "movq", { EXqS, XM }, 0 },
4091 { "movdq2q",{ MX, XS }, 0 },
050dfa73
MM
4092 },
4093
1ceb70f8 4094 /* PREFIX_0FE6 */
7918206c 4095 {
592d1631 4096 { Bad_Opcode },
507bd325
L
4097 { "cvtdq2pd", { XM, EXq }, PREFIX_OPCODE },
4098 { "cvttpd2dq", { XM, EXx }, PREFIX_OPCODE },
4099 { "cvtpd2dq", { XM, EXx }, PREFIX_OPCODE },
7918206c 4100 },
8b38ad71 4101
1ceb70f8 4102 /* PREFIX_0FE7 */
8b38ad71 4103 {
507bd325 4104 { "movntq", { Mq, MX }, PREFIX_OPCODE },
592d1631 4105 { Bad_Opcode },
75c135a8 4106 { MOD_TABLE (MOD_0FE7_PREFIX_2) },
4e7d34a6
L
4107 },
4108
1ceb70f8 4109 /* PREFIX_0FF0 */
4e7d34a6 4110 {
592d1631
L
4111 { Bad_Opcode },
4112 { Bad_Opcode },
4113 { Bad_Opcode },
1ceb70f8 4114 { MOD_TABLE (MOD_0FF0_PREFIX_3) },
4e7d34a6
L
4115 },
4116
1ceb70f8 4117 /* PREFIX_0FF7 */
4e7d34a6 4118 {
507bd325 4119 { "maskmovq", { MX, MS }, PREFIX_OPCODE },
592d1631 4120 { Bad_Opcode },
507bd325 4121 { "maskmovdqu", { XM, XS }, PREFIX_OPCODE },
8b38ad71 4122 },
42903f7f 4123
1ceb70f8 4124 /* PREFIX_0F3810 */
42903f7f 4125 {
592d1631
L
4126 { Bad_Opcode },
4127 { Bad_Opcode },
507bd325 4128 { "pblendvb", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4129 },
4130
1ceb70f8 4131 /* PREFIX_0F3814 */
42903f7f 4132 {
592d1631
L
4133 { Bad_Opcode },
4134 { Bad_Opcode },
507bd325 4135 { "blendvps", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4136 },
4137
1ceb70f8 4138 /* PREFIX_0F3815 */
42903f7f 4139 {
592d1631
L
4140 { Bad_Opcode },
4141 { Bad_Opcode },
507bd325 4142 { "blendvpd", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4143 },
4144
1ceb70f8 4145 /* PREFIX_0F3817 */
42903f7f 4146 {
592d1631
L
4147 { Bad_Opcode },
4148 { Bad_Opcode },
507bd325 4149 { "ptest", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4150 },
4151
1ceb70f8 4152 /* PREFIX_0F3820 */
42903f7f 4153 {
592d1631
L
4154 { Bad_Opcode },
4155 { Bad_Opcode },
507bd325 4156 { "pmovsxbw", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4157 },
4158
1ceb70f8 4159 /* PREFIX_0F3821 */
42903f7f 4160 {
592d1631
L
4161 { Bad_Opcode },
4162 { Bad_Opcode },
507bd325 4163 { "pmovsxbd", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4164 },
4165
1ceb70f8 4166 /* PREFIX_0F3822 */
42903f7f 4167 {
592d1631
L
4168 { Bad_Opcode },
4169 { Bad_Opcode },
507bd325 4170 { "pmovsxbq", { XM, EXw }, PREFIX_OPCODE },
42903f7f
L
4171 },
4172
1ceb70f8 4173 /* PREFIX_0F3823 */
42903f7f 4174 {
592d1631
L
4175 { Bad_Opcode },
4176 { Bad_Opcode },
507bd325 4177 { "pmovsxwd", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4178 },
4179
1ceb70f8 4180 /* PREFIX_0F3824 */
42903f7f 4181 {
592d1631
L
4182 { Bad_Opcode },
4183 { Bad_Opcode },
507bd325 4184 { "pmovsxwq", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4185 },
4186
1ceb70f8 4187 /* PREFIX_0F3825 */
42903f7f 4188 {
592d1631
L
4189 { Bad_Opcode },
4190 { Bad_Opcode },
507bd325 4191 { "pmovsxdq", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4192 },
4193
1ceb70f8 4194 /* PREFIX_0F3828 */
42903f7f 4195 {
592d1631
L
4196 { Bad_Opcode },
4197 { Bad_Opcode },
507bd325 4198 { "pmuldq", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4199 },
4200
1ceb70f8 4201 /* PREFIX_0F3829 */
42903f7f 4202 {
592d1631
L
4203 { Bad_Opcode },
4204 { Bad_Opcode },
507bd325 4205 { "pcmpeqq", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4206 },
4207
1ceb70f8 4208 /* PREFIX_0F382A */
42903f7f 4209 {
592d1631
L
4210 { Bad_Opcode },
4211 { Bad_Opcode },
75c135a8 4212 { MOD_TABLE (MOD_0F382A_PREFIX_2) },
42903f7f
L
4213 },
4214
1ceb70f8 4215 /* PREFIX_0F382B */
42903f7f 4216 {
592d1631
L
4217 { Bad_Opcode },
4218 { Bad_Opcode },
507bd325 4219 { "packusdw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4220 },
4221
1ceb70f8 4222 /* PREFIX_0F3830 */
42903f7f 4223 {
592d1631
L
4224 { Bad_Opcode },
4225 { Bad_Opcode },
507bd325 4226 { "pmovzxbw", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4227 },
4228
1ceb70f8 4229 /* PREFIX_0F3831 */
42903f7f 4230 {
592d1631
L
4231 { Bad_Opcode },
4232 { Bad_Opcode },
507bd325 4233 { "pmovzxbd", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4234 },
4235
1ceb70f8 4236 /* PREFIX_0F3832 */
42903f7f 4237 {
592d1631
L
4238 { Bad_Opcode },
4239 { Bad_Opcode },
507bd325 4240 { "pmovzxbq", { XM, EXw }, PREFIX_OPCODE },
42903f7f
L
4241 },
4242
1ceb70f8 4243 /* PREFIX_0F3833 */
42903f7f 4244 {
592d1631
L
4245 { Bad_Opcode },
4246 { Bad_Opcode },
507bd325 4247 { "pmovzxwd", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4248 },
4249
1ceb70f8 4250 /* PREFIX_0F3834 */
42903f7f 4251 {
592d1631
L
4252 { Bad_Opcode },
4253 { Bad_Opcode },
507bd325 4254 { "pmovzxwq", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4255 },
4256
1ceb70f8 4257 /* PREFIX_0F3835 */
42903f7f 4258 {
592d1631
L
4259 { Bad_Opcode },
4260 { Bad_Opcode },
507bd325 4261 { "pmovzxdq", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4262 },
4263
1ceb70f8 4264 /* PREFIX_0F3837 */
4e7d34a6 4265 {
592d1631
L
4266 { Bad_Opcode },
4267 { Bad_Opcode },
507bd325 4268 { "pcmpgtq", { XM, EXx }, PREFIX_OPCODE },
4e7d34a6
L
4269 },
4270
1ceb70f8 4271 /* PREFIX_0F3838 */
42903f7f 4272 {
592d1631
L
4273 { Bad_Opcode },
4274 { Bad_Opcode },
507bd325 4275 { "pminsb", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4276 },
4277
1ceb70f8 4278 /* PREFIX_0F3839 */
42903f7f 4279 {
592d1631
L
4280 { Bad_Opcode },
4281 { Bad_Opcode },
507bd325 4282 { "pminsd", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4283 },
4284
1ceb70f8 4285 /* PREFIX_0F383A */
42903f7f 4286 {
592d1631
L
4287 { Bad_Opcode },
4288 { Bad_Opcode },
507bd325 4289 { "pminuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4290 },
4291
1ceb70f8 4292 /* PREFIX_0F383B */
42903f7f 4293 {
592d1631
L
4294 { Bad_Opcode },
4295 { Bad_Opcode },
507bd325 4296 { "pminud", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4297 },
4298
1ceb70f8 4299 /* PREFIX_0F383C */
42903f7f 4300 {
592d1631
L
4301 { Bad_Opcode },
4302 { Bad_Opcode },
507bd325 4303 { "pmaxsb", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4304 },
4305
1ceb70f8 4306 /* PREFIX_0F383D */
42903f7f 4307 {
592d1631
L
4308 { Bad_Opcode },
4309 { Bad_Opcode },
507bd325 4310 { "pmaxsd", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4311 },
4312
1ceb70f8 4313 /* PREFIX_0F383E */
42903f7f 4314 {
592d1631
L
4315 { Bad_Opcode },
4316 { Bad_Opcode },
507bd325 4317 { "pmaxuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4318 },
4319
1ceb70f8 4320 /* PREFIX_0F383F */
42903f7f 4321 {
592d1631
L
4322 { Bad_Opcode },
4323 { Bad_Opcode },
507bd325 4324 { "pmaxud", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4325 },
4326
1ceb70f8 4327 /* PREFIX_0F3840 */
42903f7f 4328 {
592d1631
L
4329 { Bad_Opcode },
4330 { Bad_Opcode },
507bd325 4331 { "pmulld", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4332 },
4333
1ceb70f8 4334 /* PREFIX_0F3841 */
42903f7f 4335 {
592d1631
L
4336 { Bad_Opcode },
4337 { Bad_Opcode },
507bd325 4338 { "phminposuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4339 },
4340
f1f8f695
L
4341 /* PREFIX_0F3880 */
4342 {
592d1631
L
4343 { Bad_Opcode },
4344 { Bad_Opcode },
507bd325 4345 { "invept", { Gm, Mo }, PREFIX_OPCODE },
f1f8f695
L
4346 },
4347
4348 /* PREFIX_0F3881 */
4349 {
592d1631
L
4350 { Bad_Opcode },
4351 { Bad_Opcode },
507bd325 4352 { "invvpid", { Gm, Mo }, PREFIX_OPCODE },
f1f8f695
L
4353 },
4354
6c30d220
L
4355 /* PREFIX_0F3882 */
4356 {
4357 { Bad_Opcode },
4358 { Bad_Opcode },
507bd325 4359 { "invpcid", { Gm, M }, PREFIX_OPCODE },
6c30d220
L
4360 },
4361
a0046408
L
4362 /* PREFIX_0F38C8 */
4363 {
507bd325 4364 { "sha1nexte", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4365 },
4366
4367 /* PREFIX_0F38C9 */
4368 {
507bd325 4369 { "sha1msg1", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4370 },
4371
4372 /* PREFIX_0F38CA */
4373 {
507bd325 4374 { "sha1msg2", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4375 },
4376
4377 /* PREFIX_0F38CB */
4378 {
507bd325 4379 { "sha256rnds2", { XM, EXxmm, XMM0 }, PREFIX_OPCODE },
a0046408
L
4380 },
4381
4382 /* PREFIX_0F38CC */
4383 {
507bd325 4384 { "sha256msg1", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4385 },
4386
4387 /* PREFIX_0F38CD */
4388 {
507bd325 4389 { "sha256msg2", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4390 },
4391
c0f3af97
L
4392 /* PREFIX_0F38DB */
4393 {
592d1631
L
4394 { Bad_Opcode },
4395 { Bad_Opcode },
507bd325 4396 { "aesimc", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4397 },
4398
4399 /* PREFIX_0F38DC */
4400 {
592d1631
L
4401 { Bad_Opcode },
4402 { Bad_Opcode },
507bd325 4403 { "aesenc", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4404 },
4405
4406 /* PREFIX_0F38DD */
4407 {
592d1631
L
4408 { Bad_Opcode },
4409 { Bad_Opcode },
507bd325 4410 { "aesenclast", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4411 },
4412
4413 /* PREFIX_0F38DE */
4414 {
592d1631
L
4415 { Bad_Opcode },
4416 { Bad_Opcode },
507bd325 4417 { "aesdec", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4418 },
4419
4420 /* PREFIX_0F38DF */
4421 {
592d1631
L
4422 { Bad_Opcode },
4423 { Bad_Opcode },
507bd325 4424 { "aesdeclast", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4425 },
4426
1ceb70f8 4427 /* PREFIX_0F38F0 */
4e7d34a6 4428 {
507bd325 4429 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
592d1631 4430 { Bad_Opcode },
507bd325
L
4431 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
4432 { "crc32", { Gdq, { CRC32_Fixup, b_mode } }, PREFIX_OPCODE },
4e7d34a6
L
4433 },
4434
1ceb70f8 4435 /* PREFIX_0F38F1 */
4e7d34a6 4436 {
507bd325 4437 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
592d1631 4438 { Bad_Opcode },
507bd325
L
4439 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
4440 { "crc32", { Gdq, { CRC32_Fixup, v_mode } }, PREFIX_OPCODE },
4e7d34a6
L
4441 },
4442
e2e1fcde
L
4443 /* PREFIX_0F38F6 */
4444 {
4445 { Bad_Opcode },
507bd325
L
4446 { "adoxS", { Gdq, Edq}, PREFIX_OPCODE },
4447 { "adcxS", { Gdq, Edq}, PREFIX_OPCODE },
e2e1fcde
L
4448 { Bad_Opcode },
4449 },
4450
1ceb70f8 4451 /* PREFIX_0F3A08 */
42903f7f 4452 {
592d1631
L
4453 { Bad_Opcode },
4454 { Bad_Opcode },
507bd325 4455 { "roundps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4456 },
4457
1ceb70f8 4458 /* PREFIX_0F3A09 */
42903f7f 4459 {
592d1631
L
4460 { Bad_Opcode },
4461 { Bad_Opcode },
507bd325 4462 { "roundpd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4463 },
4464
1ceb70f8 4465 /* PREFIX_0F3A0A */
42903f7f 4466 {
592d1631
L
4467 { Bad_Opcode },
4468 { Bad_Opcode },
507bd325 4469 { "roundss", { XM, EXd, Ib }, PREFIX_OPCODE },
42903f7f
L
4470 },
4471
1ceb70f8 4472 /* PREFIX_0F3A0B */
42903f7f 4473 {
592d1631
L
4474 { Bad_Opcode },
4475 { Bad_Opcode },
507bd325 4476 { "roundsd", { XM, EXq, Ib }, PREFIX_OPCODE },
42903f7f
L
4477 },
4478
1ceb70f8 4479 /* PREFIX_0F3A0C */
42903f7f 4480 {
592d1631
L
4481 { Bad_Opcode },
4482 { Bad_Opcode },
507bd325 4483 { "blendps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4484 },
4485
1ceb70f8 4486 /* PREFIX_0F3A0D */
42903f7f 4487 {
592d1631
L
4488 { Bad_Opcode },
4489 { Bad_Opcode },
507bd325 4490 { "blendpd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4491 },
4492
1ceb70f8 4493 /* PREFIX_0F3A0E */
42903f7f 4494 {
592d1631
L
4495 { Bad_Opcode },
4496 { Bad_Opcode },
507bd325 4497 { "pblendw", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4498 },
4499
1ceb70f8 4500 /* PREFIX_0F3A14 */
42903f7f 4501 {
592d1631
L
4502 { Bad_Opcode },
4503 { Bad_Opcode },
507bd325 4504 { "pextrb", { Edqb, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4505 },
4506
1ceb70f8 4507 /* PREFIX_0F3A15 */
42903f7f 4508 {
592d1631
L
4509 { Bad_Opcode },
4510 { Bad_Opcode },
507bd325 4511 { "pextrw", { Edqw, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4512 },
4513
1ceb70f8 4514 /* PREFIX_0F3A16 */
42903f7f 4515 {
592d1631
L
4516 { Bad_Opcode },
4517 { Bad_Opcode },
507bd325 4518 { "pextrK", { Edq, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4519 },
4520
1ceb70f8 4521 /* PREFIX_0F3A17 */
42903f7f 4522 {
592d1631
L
4523 { Bad_Opcode },
4524 { Bad_Opcode },
507bd325 4525 { "extractps", { Edqd, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4526 },
4527
1ceb70f8 4528 /* PREFIX_0F3A20 */
42903f7f 4529 {
592d1631
L
4530 { Bad_Opcode },
4531 { Bad_Opcode },
507bd325 4532 { "pinsrb", { XM, Edqb, Ib }, PREFIX_OPCODE },
42903f7f
L
4533 },
4534
1ceb70f8 4535 /* PREFIX_0F3A21 */
42903f7f 4536 {
592d1631
L
4537 { Bad_Opcode },
4538 { Bad_Opcode },
507bd325 4539 { "insertps", { XM, EXd, Ib }, PREFIX_OPCODE },
42903f7f
L
4540 },
4541
1ceb70f8 4542 /* PREFIX_0F3A22 */
42903f7f 4543 {
592d1631
L
4544 { Bad_Opcode },
4545 { Bad_Opcode },
507bd325 4546 { "pinsrK", { XM, Edq, Ib }, PREFIX_OPCODE },
42903f7f
L
4547 },
4548
1ceb70f8 4549 /* PREFIX_0F3A40 */
42903f7f 4550 {
592d1631
L
4551 { Bad_Opcode },
4552 { Bad_Opcode },
507bd325 4553 { "dpps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4554 },
4555
1ceb70f8 4556 /* PREFIX_0F3A41 */
42903f7f 4557 {
592d1631
L
4558 { Bad_Opcode },
4559 { Bad_Opcode },
507bd325 4560 { "dppd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4561 },
4562
1ceb70f8 4563 /* PREFIX_0F3A42 */
42903f7f 4564 {
592d1631
L
4565 { Bad_Opcode },
4566 { Bad_Opcode },
507bd325 4567 { "mpsadbw", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f 4568 },
381d071f 4569
c0f3af97
L
4570 /* PREFIX_0F3A44 */
4571 {
592d1631
L
4572 { Bad_Opcode },
4573 { Bad_Opcode },
507bd325 4574 { "pclmulqdq", { XM, EXx, PCLMUL }, PREFIX_OPCODE },
c0f3af97
L
4575 },
4576
1ceb70f8 4577 /* PREFIX_0F3A60 */
381d071f 4578 {
592d1631
L
4579 { Bad_Opcode },
4580 { Bad_Opcode },
507bd325 4581 { "pcmpestrm", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f
L
4582 },
4583
1ceb70f8 4584 /* PREFIX_0F3A61 */
381d071f 4585 {
592d1631
L
4586 { Bad_Opcode },
4587 { Bad_Opcode },
507bd325 4588 { "pcmpestri", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f
L
4589 },
4590
1ceb70f8 4591 /* PREFIX_0F3A62 */
381d071f 4592 {
592d1631
L
4593 { Bad_Opcode },
4594 { Bad_Opcode },
507bd325 4595 { "pcmpistrm", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f
L
4596 },
4597
1ceb70f8 4598 /* PREFIX_0F3A63 */
381d071f 4599 {
592d1631
L
4600 { Bad_Opcode },
4601 { Bad_Opcode },
507bd325 4602 { "pcmpistri", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f 4603 },
09a2c6cf 4604
a0046408
L
4605 /* PREFIX_0F3ACC */
4606 {
507bd325 4607 { "sha1rnds4", { XM, EXxmm, Ib }, PREFIX_OPCODE },
a0046408
L
4608 },
4609
c0f3af97 4610 /* PREFIX_0F3ADF */
09a2c6cf 4611 {
592d1631
L
4612 { Bad_Opcode },
4613 { Bad_Opcode },
507bd325 4614 { "aeskeygenassist", { XM, EXx, Ib }, PREFIX_OPCODE },
09a2c6cf
L
4615 },
4616
592a252b 4617 /* PREFIX_VEX_0F10 */
09a2c6cf 4618 {
592a252b
L
4619 { VEX_W_TABLE (VEX_W_0F10_P_0) },
4620 { VEX_LEN_TABLE (VEX_LEN_0F10_P_1) },
4621 { VEX_W_TABLE (VEX_W_0F10_P_2) },
4622 { VEX_LEN_TABLE (VEX_LEN_0F10_P_3) },
09a2c6cf
L
4623 },
4624
592a252b 4625 /* PREFIX_VEX_0F11 */
09a2c6cf 4626 {
592a252b
L
4627 { VEX_W_TABLE (VEX_W_0F11_P_0) },
4628 { VEX_LEN_TABLE (VEX_LEN_0F11_P_1) },
4629 { VEX_W_TABLE (VEX_W_0F11_P_2) },
4630 { VEX_LEN_TABLE (VEX_LEN_0F11_P_3) },
09a2c6cf
L
4631 },
4632
592a252b 4633 /* PREFIX_VEX_0F12 */
09a2c6cf 4634 {
592a252b
L
4635 { MOD_TABLE (MOD_VEX_0F12_PREFIX_0) },
4636 { VEX_W_TABLE (VEX_W_0F12_P_1) },
4637 { VEX_LEN_TABLE (VEX_LEN_0F12_P_2) },
4638 { VEX_W_TABLE (VEX_W_0F12_P_3) },
09a2c6cf
L
4639 },
4640
592a252b 4641 /* PREFIX_VEX_0F16 */
09a2c6cf 4642 {
592a252b
L
4643 { MOD_TABLE (MOD_VEX_0F16_PREFIX_0) },
4644 { VEX_W_TABLE (VEX_W_0F16_P_1) },
4645 { VEX_LEN_TABLE (VEX_LEN_0F16_P_2) },
5f754f58 4646 },
7c52e0e8 4647
592a252b 4648 /* PREFIX_VEX_0F2A */
5f754f58 4649 {
592d1631 4650 { Bad_Opcode },
592a252b 4651 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_1) },
592d1631 4652 { Bad_Opcode },
592a252b 4653 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_3) },
5f754f58 4654 },
7c52e0e8 4655
592a252b 4656 /* PREFIX_VEX_0F2C */
5f754f58 4657 {
592d1631 4658 { Bad_Opcode },
592a252b 4659 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_1) },
592d1631 4660 { Bad_Opcode },
592a252b 4661 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_3) },
5f754f58 4662 },
7c52e0e8 4663
592a252b 4664 /* PREFIX_VEX_0F2D */
7c52e0e8 4665 {
592d1631 4666 { Bad_Opcode },
592a252b 4667 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_1) },
592d1631 4668 { Bad_Opcode },
592a252b 4669 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_3) },
7c52e0e8
L
4670 },
4671
592a252b 4672 /* PREFIX_VEX_0F2E */
7c52e0e8 4673 {
592a252b 4674 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_0) },
592d1631 4675 { Bad_Opcode },
592a252b 4676 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_2) },
7c52e0e8
L
4677 },
4678
592a252b 4679 /* PREFIX_VEX_0F2F */
7c52e0e8 4680 {
592a252b 4681 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_0) },
592d1631 4682 { Bad_Opcode },
592a252b 4683 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_2) },
7c52e0e8
L
4684 },
4685
43234a1e
L
4686 /* PREFIX_VEX_0F41 */
4687 {
4688 { VEX_LEN_TABLE (VEX_LEN_0F41_P_0) },
1ba585e8
IT
4689 { Bad_Opcode },
4690 { VEX_LEN_TABLE (VEX_LEN_0F41_P_2) },
43234a1e
L
4691 },
4692
4693 /* PREFIX_VEX_0F42 */
4694 {
4695 { VEX_LEN_TABLE (VEX_LEN_0F42_P_0) },
1ba585e8
IT
4696 { Bad_Opcode },
4697 { VEX_LEN_TABLE (VEX_LEN_0F42_P_2) },
43234a1e
L
4698 },
4699
4700 /* PREFIX_VEX_0F44 */
4701 {
4702 { VEX_LEN_TABLE (VEX_LEN_0F44_P_0) },
1ba585e8
IT
4703 { Bad_Opcode },
4704 { VEX_LEN_TABLE (VEX_LEN_0F44_P_2) },
43234a1e
L
4705 },
4706
4707 /* PREFIX_VEX_0F45 */
4708 {
4709 { VEX_LEN_TABLE (VEX_LEN_0F45_P_0) },
1ba585e8
IT
4710 { Bad_Opcode },
4711 { VEX_LEN_TABLE (VEX_LEN_0F45_P_2) },
43234a1e
L
4712 },
4713
4714 /* PREFIX_VEX_0F46 */
4715 {
4716 { VEX_LEN_TABLE (VEX_LEN_0F46_P_0) },
1ba585e8
IT
4717 { Bad_Opcode },
4718 { VEX_LEN_TABLE (VEX_LEN_0F46_P_2) },
43234a1e
L
4719 },
4720
4721 /* PREFIX_VEX_0F47 */
4722 {
4723 { VEX_LEN_TABLE (VEX_LEN_0F47_P_0) },
1ba585e8
IT
4724 { Bad_Opcode },
4725 { VEX_LEN_TABLE (VEX_LEN_0F47_P_2) },
43234a1e
L
4726 },
4727
1ba585e8 4728 /* PREFIX_VEX_0F4A */
43234a1e 4729 {
1ba585e8 4730 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_0) },
43234a1e 4731 { Bad_Opcode },
1ba585e8
IT
4732 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_2) },
4733 },
4734
4735 /* PREFIX_VEX_0F4B */
4736 {
4737 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_0) },
43234a1e
L
4738 { Bad_Opcode },
4739 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_2) },
4740 },
4741
592a252b 4742 /* PREFIX_VEX_0F51 */
7c52e0e8 4743 {
592a252b
L
4744 { VEX_W_TABLE (VEX_W_0F51_P_0) },
4745 { VEX_LEN_TABLE (VEX_LEN_0F51_P_1) },
4746 { VEX_W_TABLE (VEX_W_0F51_P_2) },
4747 { VEX_LEN_TABLE (VEX_LEN_0F51_P_3) },
7c52e0e8
L
4748 },
4749
592a252b 4750 /* PREFIX_VEX_0F52 */
7c52e0e8 4751 {
592a252b
L
4752 { VEX_W_TABLE (VEX_W_0F52_P_0) },
4753 { VEX_LEN_TABLE (VEX_LEN_0F52_P_1) },
7c52e0e8
L
4754 },
4755
592a252b 4756 /* PREFIX_VEX_0F53 */
7c52e0e8 4757 {
592a252b
L
4758 { VEX_W_TABLE (VEX_W_0F53_P_0) },
4759 { VEX_LEN_TABLE (VEX_LEN_0F53_P_1) },
7c52e0e8
L
4760 },
4761
592a252b 4762 /* PREFIX_VEX_0F58 */
7c52e0e8 4763 {
592a252b
L
4764 { VEX_W_TABLE (VEX_W_0F58_P_0) },
4765 { VEX_LEN_TABLE (VEX_LEN_0F58_P_1) },
4766 { VEX_W_TABLE (VEX_W_0F58_P_2) },
4767 { VEX_LEN_TABLE (VEX_LEN_0F58_P_3) },
7c52e0e8
L
4768 },
4769
592a252b 4770 /* PREFIX_VEX_0F59 */
7c52e0e8 4771 {
592a252b
L
4772 { VEX_W_TABLE (VEX_W_0F59_P_0) },
4773 { VEX_LEN_TABLE (VEX_LEN_0F59_P_1) },
4774 { VEX_W_TABLE (VEX_W_0F59_P_2) },
4775 { VEX_LEN_TABLE (VEX_LEN_0F59_P_3) },
7c52e0e8
L
4776 },
4777
592a252b 4778 /* PREFIX_VEX_0F5A */
7c52e0e8 4779 {
592a252b
L
4780 { VEX_W_TABLE (VEX_W_0F5A_P_0) },
4781 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_1) },
bf890a93 4782 { "vcvtpd2ps%XY", { XMM, EXx }, 0 },
592a252b 4783 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_3) },
7c52e0e8
L
4784 },
4785
592a252b 4786 /* PREFIX_VEX_0F5B */
7c52e0e8 4787 {
592a252b
L
4788 { VEX_W_TABLE (VEX_W_0F5B_P_0) },
4789 { VEX_W_TABLE (VEX_W_0F5B_P_1) },
4790 { VEX_W_TABLE (VEX_W_0F5B_P_2) },
7c52e0e8
L
4791 },
4792
592a252b 4793 /* PREFIX_VEX_0F5C */
7c52e0e8 4794 {
592a252b
L
4795 { VEX_W_TABLE (VEX_W_0F5C_P_0) },
4796 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_1) },
4797 { VEX_W_TABLE (VEX_W_0F5C_P_2) },
4798 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_3) },
7c52e0e8
L
4799 },
4800
592a252b 4801 /* PREFIX_VEX_0F5D */
7c52e0e8 4802 {
592a252b
L
4803 { VEX_W_TABLE (VEX_W_0F5D_P_0) },
4804 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_1) },
4805 { VEX_W_TABLE (VEX_W_0F5D_P_2) },
4806 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_3) },
7c52e0e8
L
4807 },
4808
592a252b 4809 /* PREFIX_VEX_0F5E */
7c52e0e8 4810 {
592a252b
L
4811 { VEX_W_TABLE (VEX_W_0F5E_P_0) },
4812 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_1) },
4813 { VEX_W_TABLE (VEX_W_0F5E_P_2) },
4814 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_3) },
7c52e0e8
L
4815 },
4816
592a252b 4817 /* PREFIX_VEX_0F5F */
7c52e0e8 4818 {
592a252b
L
4819 { VEX_W_TABLE (VEX_W_0F5F_P_0) },
4820 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_1) },
4821 { VEX_W_TABLE (VEX_W_0F5F_P_2) },
4822 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_3) },
7c52e0e8
L
4823 },
4824
592a252b 4825 /* PREFIX_VEX_0F60 */
7c52e0e8 4826 {
592d1631
L
4827 { Bad_Opcode },
4828 { Bad_Opcode },
6c30d220 4829 { VEX_W_TABLE (VEX_W_0F60_P_2) },
7c52e0e8
L
4830 },
4831
592a252b 4832 /* PREFIX_VEX_0F61 */
7c52e0e8 4833 {
592d1631
L
4834 { Bad_Opcode },
4835 { Bad_Opcode },
6c30d220 4836 { VEX_W_TABLE (VEX_W_0F61_P_2) },
7c52e0e8
L
4837 },
4838
592a252b 4839 /* PREFIX_VEX_0F62 */
7c52e0e8 4840 {
592d1631
L
4841 { Bad_Opcode },
4842 { Bad_Opcode },
6c30d220 4843 { VEX_W_TABLE (VEX_W_0F62_P_2) },
7c52e0e8
L
4844 },
4845
592a252b 4846 /* PREFIX_VEX_0F63 */
7c52e0e8 4847 {
592d1631
L
4848 { Bad_Opcode },
4849 { Bad_Opcode },
6c30d220 4850 { VEX_W_TABLE (VEX_W_0F63_P_2) },
7c52e0e8
L
4851 },
4852
592a252b 4853 /* PREFIX_VEX_0F64 */
7c52e0e8 4854 {
592d1631
L
4855 { Bad_Opcode },
4856 { Bad_Opcode },
6c30d220 4857 { VEX_W_TABLE (VEX_W_0F64_P_2) },
7c52e0e8
L
4858 },
4859
592a252b 4860 /* PREFIX_VEX_0F65 */
7c52e0e8 4861 {
592d1631
L
4862 { Bad_Opcode },
4863 { Bad_Opcode },
6c30d220 4864 { VEX_W_TABLE (VEX_W_0F65_P_2) },
7c52e0e8
L
4865 },
4866
592a252b 4867 /* PREFIX_VEX_0F66 */
7c52e0e8 4868 {
592d1631
L
4869 { Bad_Opcode },
4870 { Bad_Opcode },
6c30d220 4871 { VEX_W_TABLE (VEX_W_0F66_P_2) },
7c52e0e8 4872 },
6439fc28 4873
592a252b 4874 /* PREFIX_VEX_0F67 */
331d2d0d 4875 {
592d1631
L
4876 { Bad_Opcode },
4877 { Bad_Opcode },
6c30d220 4878 { VEX_W_TABLE (VEX_W_0F67_P_2) },
c0f3af97
L
4879 },
4880
592a252b 4881 /* PREFIX_VEX_0F68 */
c0f3af97 4882 {
592d1631
L
4883 { Bad_Opcode },
4884 { Bad_Opcode },
6c30d220 4885 { VEX_W_TABLE (VEX_W_0F68_P_2) },
c0f3af97
L
4886 },
4887
592a252b 4888 /* PREFIX_VEX_0F69 */
c0f3af97 4889 {
592d1631
L
4890 { Bad_Opcode },
4891 { Bad_Opcode },
6c30d220 4892 { VEX_W_TABLE (VEX_W_0F69_P_2) },
c0f3af97
L
4893 },
4894
592a252b 4895 /* PREFIX_VEX_0F6A */
c0f3af97 4896 {
592d1631
L
4897 { Bad_Opcode },
4898 { Bad_Opcode },
6c30d220 4899 { VEX_W_TABLE (VEX_W_0F6A_P_2) },
c0f3af97
L
4900 },
4901
592a252b 4902 /* PREFIX_VEX_0F6B */
c0f3af97 4903 {
592d1631
L
4904 { Bad_Opcode },
4905 { Bad_Opcode },
6c30d220 4906 { VEX_W_TABLE (VEX_W_0F6B_P_2) },
c0f3af97
L
4907 },
4908
592a252b 4909 /* PREFIX_VEX_0F6C */
c0f3af97 4910 {
592d1631
L
4911 { Bad_Opcode },
4912 { Bad_Opcode },
6c30d220 4913 { VEX_W_TABLE (VEX_W_0F6C_P_2) },
c0f3af97
L
4914 },
4915
592a252b 4916 /* PREFIX_VEX_0F6D */
c0f3af97 4917 {
592d1631
L
4918 { Bad_Opcode },
4919 { Bad_Opcode },
6c30d220 4920 { VEX_W_TABLE (VEX_W_0F6D_P_2) },
c0f3af97
L
4921 },
4922
592a252b 4923 /* PREFIX_VEX_0F6E */
c0f3af97 4924 {
592d1631
L
4925 { Bad_Opcode },
4926 { Bad_Opcode },
592a252b 4927 { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2) },
c0f3af97
L
4928 },
4929
592a252b 4930 /* PREFIX_VEX_0F6F */
c0f3af97 4931 {
592d1631 4932 { Bad_Opcode },
592a252b
L
4933 { VEX_W_TABLE (VEX_W_0F6F_P_1) },
4934 { VEX_W_TABLE (VEX_W_0F6F_P_2) },
c0f3af97
L
4935 },
4936
592a252b 4937 /* PREFIX_VEX_0F70 */
c0f3af97 4938 {
592d1631 4939 { Bad_Opcode },
6c30d220
L
4940 { VEX_W_TABLE (VEX_W_0F70_P_1) },
4941 { VEX_W_TABLE (VEX_W_0F70_P_2) },
4942 { VEX_W_TABLE (VEX_W_0F70_P_3) },
c0f3af97
L
4943 },
4944
592a252b 4945 /* PREFIX_VEX_0F71_REG_2 */
c0f3af97 4946 {
592d1631
L
4947 { Bad_Opcode },
4948 { Bad_Opcode },
6c30d220 4949 { VEX_W_TABLE (VEX_W_0F71_R_2_P_2) },
c0f3af97
L
4950 },
4951
592a252b 4952 /* PREFIX_VEX_0F71_REG_4 */
c0f3af97 4953 {
592d1631
L
4954 { Bad_Opcode },
4955 { Bad_Opcode },
6c30d220 4956 { VEX_W_TABLE (VEX_W_0F71_R_4_P_2) },
c0f3af97
L
4957 },
4958
592a252b 4959 /* PREFIX_VEX_0F71_REG_6 */
c0f3af97 4960 {
592d1631
L
4961 { Bad_Opcode },
4962 { Bad_Opcode },
6c30d220 4963 { VEX_W_TABLE (VEX_W_0F71_R_6_P_2) },
c0f3af97
L
4964 },
4965
592a252b 4966 /* PREFIX_VEX_0F72_REG_2 */
c0f3af97 4967 {
592d1631
L
4968 { Bad_Opcode },
4969 { Bad_Opcode },
6c30d220 4970 { VEX_W_TABLE (VEX_W_0F72_R_2_P_2) },
c0f3af97
L
4971 },
4972
592a252b 4973 /* PREFIX_VEX_0F72_REG_4 */
c0f3af97 4974 {
592d1631
L
4975 { Bad_Opcode },
4976 { Bad_Opcode },
6c30d220 4977 { VEX_W_TABLE (VEX_W_0F72_R_4_P_2) },
c0f3af97
L
4978 },
4979
592a252b 4980 /* PREFIX_VEX_0F72_REG_6 */
c0f3af97 4981 {
592d1631
L
4982 { Bad_Opcode },
4983 { Bad_Opcode },
6c30d220 4984 { VEX_W_TABLE (VEX_W_0F72_R_6_P_2) },
c0f3af97
L
4985 },
4986
592a252b 4987 /* PREFIX_VEX_0F73_REG_2 */
c0f3af97 4988 {
592d1631
L
4989 { Bad_Opcode },
4990 { Bad_Opcode },
6c30d220 4991 { VEX_W_TABLE (VEX_W_0F73_R_2_P_2) },
c0f3af97
L
4992 },
4993
592a252b 4994 /* PREFIX_VEX_0F73_REG_3 */
c0f3af97 4995 {
592d1631
L
4996 { Bad_Opcode },
4997 { Bad_Opcode },
6c30d220 4998 { VEX_W_TABLE (VEX_W_0F73_R_3_P_2) },
c0f3af97
L
4999 },
5000
592a252b 5001 /* PREFIX_VEX_0F73_REG_6 */
c0f3af97 5002 {
592d1631
L
5003 { Bad_Opcode },
5004 { Bad_Opcode },
6c30d220 5005 { VEX_W_TABLE (VEX_W_0F73_R_6_P_2) },
c0f3af97
L
5006 },
5007
592a252b 5008 /* PREFIX_VEX_0F73_REG_7 */
c0f3af97 5009 {
592d1631
L
5010 { Bad_Opcode },
5011 { Bad_Opcode },
6c30d220 5012 { VEX_W_TABLE (VEX_W_0F73_R_7_P_2) },
c0f3af97
L
5013 },
5014
592a252b 5015 /* PREFIX_VEX_0F74 */
c0f3af97 5016 {
592d1631
L
5017 { Bad_Opcode },
5018 { Bad_Opcode },
6c30d220 5019 { VEX_W_TABLE (VEX_W_0F74_P_2) },
c0f3af97
L
5020 },
5021
592a252b 5022 /* PREFIX_VEX_0F75 */
c0f3af97 5023 {
592d1631
L
5024 { Bad_Opcode },
5025 { Bad_Opcode },
6c30d220 5026 { VEX_W_TABLE (VEX_W_0F75_P_2) },
c0f3af97
L
5027 },
5028
592a252b 5029 /* PREFIX_VEX_0F76 */
c0f3af97 5030 {
592d1631
L
5031 { Bad_Opcode },
5032 { Bad_Opcode },
6c30d220 5033 { VEX_W_TABLE (VEX_W_0F76_P_2) },
c0f3af97
L
5034 },
5035
592a252b 5036 /* PREFIX_VEX_0F77 */
c0f3af97 5037 {
592a252b 5038 { VEX_W_TABLE (VEX_W_0F77_P_0) },
c0f3af97
L
5039 },
5040
592a252b 5041 /* PREFIX_VEX_0F7C */
c0f3af97 5042 {
592d1631
L
5043 { Bad_Opcode },
5044 { Bad_Opcode },
592a252b
L
5045 { VEX_W_TABLE (VEX_W_0F7C_P_2) },
5046 { VEX_W_TABLE (VEX_W_0F7C_P_3) },
c0f3af97
L
5047 },
5048
592a252b 5049 /* PREFIX_VEX_0F7D */
c0f3af97 5050 {
592d1631
L
5051 { Bad_Opcode },
5052 { Bad_Opcode },
592a252b
L
5053 { VEX_W_TABLE (VEX_W_0F7D_P_2) },
5054 { VEX_W_TABLE (VEX_W_0F7D_P_3) },
c0f3af97
L
5055 },
5056
592a252b 5057 /* PREFIX_VEX_0F7E */
c0f3af97 5058 {
592d1631 5059 { Bad_Opcode },
592a252b
L
5060 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1) },
5061 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2) },
c0f3af97
L
5062 },
5063
592a252b 5064 /* PREFIX_VEX_0F7F */
c0f3af97 5065 {
592d1631 5066 { Bad_Opcode },
592a252b
L
5067 { VEX_W_TABLE (VEX_W_0F7F_P_1) },
5068 { VEX_W_TABLE (VEX_W_0F7F_P_2) },
c0f3af97
L
5069 },
5070
43234a1e
L
5071 /* PREFIX_VEX_0F90 */
5072 {
5073 { VEX_LEN_TABLE (VEX_LEN_0F90_P_0) },
1ba585e8
IT
5074 { Bad_Opcode },
5075 { VEX_LEN_TABLE (VEX_LEN_0F90_P_2) },
43234a1e
L
5076 },
5077
5078 /* PREFIX_VEX_0F91 */
5079 {
5080 { VEX_LEN_TABLE (VEX_LEN_0F91_P_0) },
1ba585e8
IT
5081 { Bad_Opcode },
5082 { VEX_LEN_TABLE (VEX_LEN_0F91_P_2) },
43234a1e
L
5083 },
5084
5085 /* PREFIX_VEX_0F92 */
5086 {
5087 { VEX_LEN_TABLE (VEX_LEN_0F92_P_0) },
1ba585e8 5088 { Bad_Opcode },
90a915bf 5089 { VEX_LEN_TABLE (VEX_LEN_0F92_P_2) },
1ba585e8 5090 { VEX_LEN_TABLE (VEX_LEN_0F92_P_3) },
43234a1e
L
5091 },
5092
5093 /* PREFIX_VEX_0F93 */
5094 {
5095 { VEX_LEN_TABLE (VEX_LEN_0F93_P_0) },
1ba585e8 5096 { Bad_Opcode },
90a915bf 5097 { VEX_LEN_TABLE (VEX_LEN_0F93_P_2) },
1ba585e8 5098 { VEX_LEN_TABLE (VEX_LEN_0F93_P_3) },
43234a1e
L
5099 },
5100
5101 /* PREFIX_VEX_0F98 */
5102 {
5103 { VEX_LEN_TABLE (VEX_LEN_0F98_P_0) },
1ba585e8
IT
5104 { Bad_Opcode },
5105 { VEX_LEN_TABLE (VEX_LEN_0F98_P_2) },
5106 },
5107
5108 /* PREFIX_VEX_0F99 */
5109 {
5110 { VEX_LEN_TABLE (VEX_LEN_0F99_P_0) },
5111 { Bad_Opcode },
5112 { VEX_LEN_TABLE (VEX_LEN_0F99_P_2) },
43234a1e
L
5113 },
5114
592a252b 5115 /* PREFIX_VEX_0FC2 */
c0f3af97 5116 {
592a252b
L
5117 { VEX_W_TABLE (VEX_W_0FC2_P_0) },
5118 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_1) },
5119 { VEX_W_TABLE (VEX_W_0FC2_P_2) },
5120 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_3) },
c0f3af97
L
5121 },
5122
592a252b 5123 /* PREFIX_VEX_0FC4 */
c0f3af97 5124 {
592d1631
L
5125 { Bad_Opcode },
5126 { Bad_Opcode },
592a252b 5127 { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2) },
c0f3af97
L
5128 },
5129
592a252b 5130 /* PREFIX_VEX_0FC5 */
c0f3af97 5131 {
592d1631
L
5132 { Bad_Opcode },
5133 { Bad_Opcode },
592a252b 5134 { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2) },
c0f3af97
L
5135 },
5136
592a252b 5137 /* PREFIX_VEX_0FD0 */
c0f3af97 5138 {
592d1631
L
5139 { Bad_Opcode },
5140 { Bad_Opcode },
592a252b
L
5141 { VEX_W_TABLE (VEX_W_0FD0_P_2) },
5142 { VEX_W_TABLE (VEX_W_0FD0_P_3) },
c0f3af97
L
5143 },
5144
592a252b 5145 /* PREFIX_VEX_0FD1 */
c0f3af97 5146 {
592d1631
L
5147 { Bad_Opcode },
5148 { Bad_Opcode },
6c30d220 5149 { VEX_W_TABLE (VEX_W_0FD1_P_2) },
c0f3af97
L
5150 },
5151
592a252b 5152 /* PREFIX_VEX_0FD2 */
c0f3af97 5153 {
592d1631
L
5154 { Bad_Opcode },
5155 { Bad_Opcode },
6c30d220 5156 { VEX_W_TABLE (VEX_W_0FD2_P_2) },
c0f3af97
L
5157 },
5158
592a252b 5159 /* PREFIX_VEX_0FD3 */
c0f3af97 5160 {
592d1631
L
5161 { Bad_Opcode },
5162 { Bad_Opcode },
6c30d220 5163 { VEX_W_TABLE (VEX_W_0FD3_P_2) },
c0f3af97
L
5164 },
5165
592a252b 5166 /* PREFIX_VEX_0FD4 */
c0f3af97 5167 {
592d1631
L
5168 { Bad_Opcode },
5169 { Bad_Opcode },
6c30d220 5170 { VEX_W_TABLE (VEX_W_0FD4_P_2) },
c0f3af97
L
5171 },
5172
592a252b 5173 /* PREFIX_VEX_0FD5 */
c0f3af97 5174 {
592d1631
L
5175 { Bad_Opcode },
5176 { Bad_Opcode },
6c30d220 5177 { VEX_W_TABLE (VEX_W_0FD5_P_2) },
c0f3af97
L
5178 },
5179
592a252b 5180 /* PREFIX_VEX_0FD6 */
c0f3af97 5181 {
592d1631
L
5182 { Bad_Opcode },
5183 { Bad_Opcode },
592a252b 5184 { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2) },
c0f3af97
L
5185 },
5186
592a252b 5187 /* PREFIX_VEX_0FD7 */
c0f3af97 5188 {
592d1631
L
5189 { Bad_Opcode },
5190 { Bad_Opcode },
592a252b 5191 { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2) },
c0f3af97
L
5192 },
5193
592a252b 5194 /* PREFIX_VEX_0FD8 */
c0f3af97 5195 {
592d1631
L
5196 { Bad_Opcode },
5197 { Bad_Opcode },
6c30d220 5198 { VEX_W_TABLE (VEX_W_0FD8_P_2) },
c0f3af97
L
5199 },
5200
592a252b 5201 /* PREFIX_VEX_0FD9 */
c0f3af97 5202 {
592d1631
L
5203 { Bad_Opcode },
5204 { Bad_Opcode },
6c30d220 5205 { VEX_W_TABLE (VEX_W_0FD9_P_2) },
c0f3af97
L
5206 },
5207
592a252b 5208 /* PREFIX_VEX_0FDA */
c0f3af97 5209 {
592d1631
L
5210 { Bad_Opcode },
5211 { Bad_Opcode },
6c30d220 5212 { VEX_W_TABLE (VEX_W_0FDA_P_2) },
c0f3af97
L
5213 },
5214
592a252b 5215 /* PREFIX_VEX_0FDB */
c0f3af97 5216 {
592d1631
L
5217 { Bad_Opcode },
5218 { Bad_Opcode },
6c30d220 5219 { VEX_W_TABLE (VEX_W_0FDB_P_2) },
c0f3af97
L
5220 },
5221
592a252b 5222 /* PREFIX_VEX_0FDC */
c0f3af97 5223 {
592d1631
L
5224 { Bad_Opcode },
5225 { Bad_Opcode },
6c30d220 5226 { VEX_W_TABLE (VEX_W_0FDC_P_2) },
c0f3af97
L
5227 },
5228
592a252b 5229 /* PREFIX_VEX_0FDD */
c0f3af97 5230 {
592d1631
L
5231 { Bad_Opcode },
5232 { Bad_Opcode },
6c30d220 5233 { VEX_W_TABLE (VEX_W_0FDD_P_2) },
c0f3af97
L
5234 },
5235
592a252b 5236 /* PREFIX_VEX_0FDE */
c0f3af97 5237 {
592d1631
L
5238 { Bad_Opcode },
5239 { Bad_Opcode },
6c30d220 5240 { VEX_W_TABLE (VEX_W_0FDE_P_2) },
c0f3af97
L
5241 },
5242
592a252b 5243 /* PREFIX_VEX_0FDF */
c0f3af97 5244 {
592d1631
L
5245 { Bad_Opcode },
5246 { Bad_Opcode },
6c30d220 5247 { VEX_W_TABLE (VEX_W_0FDF_P_2) },
c0f3af97
L
5248 },
5249
592a252b 5250 /* PREFIX_VEX_0FE0 */
c0f3af97 5251 {
592d1631
L
5252 { Bad_Opcode },
5253 { Bad_Opcode },
6c30d220 5254 { VEX_W_TABLE (VEX_W_0FE0_P_2) },
c0f3af97
L
5255 },
5256
592a252b 5257 /* PREFIX_VEX_0FE1 */
c0f3af97 5258 {
592d1631
L
5259 { Bad_Opcode },
5260 { Bad_Opcode },
6c30d220 5261 { VEX_W_TABLE (VEX_W_0FE1_P_2) },
c0f3af97
L
5262 },
5263
592a252b 5264 /* PREFIX_VEX_0FE2 */
c0f3af97 5265 {
592d1631
L
5266 { Bad_Opcode },
5267 { Bad_Opcode },
6c30d220 5268 { VEX_W_TABLE (VEX_W_0FE2_P_2) },
c0f3af97
L
5269 },
5270
592a252b 5271 /* PREFIX_VEX_0FE3 */
c0f3af97 5272 {
592d1631
L
5273 { Bad_Opcode },
5274 { Bad_Opcode },
6c30d220 5275 { VEX_W_TABLE (VEX_W_0FE3_P_2) },
c0f3af97
L
5276 },
5277
592a252b 5278 /* PREFIX_VEX_0FE4 */
c0f3af97 5279 {
592d1631
L
5280 { Bad_Opcode },
5281 { Bad_Opcode },
6c30d220 5282 { VEX_W_TABLE (VEX_W_0FE4_P_2) },
c0f3af97
L
5283 },
5284
592a252b 5285 /* PREFIX_VEX_0FE5 */
c0f3af97 5286 {
592d1631
L
5287 { Bad_Opcode },
5288 { Bad_Opcode },
6c30d220 5289 { VEX_W_TABLE (VEX_W_0FE5_P_2) },
c0f3af97
L
5290 },
5291
592a252b 5292 /* PREFIX_VEX_0FE6 */
c0f3af97 5293 {
592d1631 5294 { Bad_Opcode },
592a252b
L
5295 { VEX_W_TABLE (VEX_W_0FE6_P_1) },
5296 { VEX_W_TABLE (VEX_W_0FE6_P_2) },
5297 { VEX_W_TABLE (VEX_W_0FE6_P_3) },
c0f3af97
L
5298 },
5299
592a252b 5300 /* PREFIX_VEX_0FE7 */
c0f3af97 5301 {
592d1631
L
5302 { Bad_Opcode },
5303 { Bad_Opcode },
592a252b 5304 { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2) },
c0f3af97
L
5305 },
5306
592a252b 5307 /* PREFIX_VEX_0FE8 */
c0f3af97 5308 {
592d1631
L
5309 { Bad_Opcode },
5310 { Bad_Opcode },
6c30d220 5311 { VEX_W_TABLE (VEX_W_0FE8_P_2) },
c0f3af97
L
5312 },
5313
592a252b 5314 /* PREFIX_VEX_0FE9 */
c0f3af97 5315 {
592d1631
L
5316 { Bad_Opcode },
5317 { Bad_Opcode },
6c30d220 5318 { VEX_W_TABLE (VEX_W_0FE9_P_2) },
c0f3af97
L
5319 },
5320
592a252b 5321 /* PREFIX_VEX_0FEA */
c0f3af97 5322 {
592d1631
L
5323 { Bad_Opcode },
5324 { Bad_Opcode },
6c30d220 5325 { VEX_W_TABLE (VEX_W_0FEA_P_2) },
c0f3af97
L
5326 },
5327
592a252b 5328 /* PREFIX_VEX_0FEB */
c0f3af97 5329 {
592d1631
L
5330 { Bad_Opcode },
5331 { Bad_Opcode },
6c30d220 5332 { VEX_W_TABLE (VEX_W_0FEB_P_2) },
c0f3af97
L
5333 },
5334
592a252b 5335 /* PREFIX_VEX_0FEC */
c0f3af97 5336 {
592d1631
L
5337 { Bad_Opcode },
5338 { Bad_Opcode },
6c30d220 5339 { VEX_W_TABLE (VEX_W_0FEC_P_2) },
c0f3af97
L
5340 },
5341
592a252b 5342 /* PREFIX_VEX_0FED */
c0f3af97 5343 {
592d1631
L
5344 { Bad_Opcode },
5345 { Bad_Opcode },
6c30d220 5346 { VEX_W_TABLE (VEX_W_0FED_P_2) },
c0f3af97
L
5347 },
5348
592a252b 5349 /* PREFIX_VEX_0FEE */
c0f3af97 5350 {
592d1631
L
5351 { Bad_Opcode },
5352 { Bad_Opcode },
6c30d220 5353 { VEX_W_TABLE (VEX_W_0FEE_P_2) },
c0f3af97
L
5354 },
5355
592a252b 5356 /* PREFIX_VEX_0FEF */
c0f3af97 5357 {
592d1631
L
5358 { Bad_Opcode },
5359 { Bad_Opcode },
6c30d220 5360 { VEX_W_TABLE (VEX_W_0FEF_P_2) },
c0f3af97
L
5361 },
5362
592a252b 5363 /* PREFIX_VEX_0FF0 */
c0f3af97 5364 {
592d1631
L
5365 { Bad_Opcode },
5366 { Bad_Opcode },
5367 { Bad_Opcode },
592a252b 5368 { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3) },
c0f3af97
L
5369 },
5370
592a252b 5371 /* PREFIX_VEX_0FF1 */
c0f3af97 5372 {
592d1631
L
5373 { Bad_Opcode },
5374 { Bad_Opcode },
6c30d220 5375 { VEX_W_TABLE (VEX_W_0FF1_P_2) },
c0f3af97
L
5376 },
5377
592a252b 5378 /* PREFIX_VEX_0FF2 */
c0f3af97 5379 {
592d1631
L
5380 { Bad_Opcode },
5381 { Bad_Opcode },
6c30d220 5382 { VEX_W_TABLE (VEX_W_0FF2_P_2) },
c0f3af97
L
5383 },
5384
592a252b 5385 /* PREFIX_VEX_0FF3 */
c0f3af97 5386 {
592d1631
L
5387 { Bad_Opcode },
5388 { Bad_Opcode },
6c30d220 5389 { VEX_W_TABLE (VEX_W_0FF3_P_2) },
c0f3af97
L
5390 },
5391
592a252b 5392 /* PREFIX_VEX_0FF4 */
c0f3af97 5393 {
592d1631
L
5394 { Bad_Opcode },
5395 { Bad_Opcode },
6c30d220 5396 { VEX_W_TABLE (VEX_W_0FF4_P_2) },
c0f3af97
L
5397 },
5398
592a252b 5399 /* PREFIX_VEX_0FF5 */
c0f3af97 5400 {
592d1631
L
5401 { Bad_Opcode },
5402 { Bad_Opcode },
6c30d220 5403 { VEX_W_TABLE (VEX_W_0FF5_P_2) },
c0f3af97
L
5404 },
5405
592a252b 5406 /* PREFIX_VEX_0FF6 */
c0f3af97 5407 {
592d1631
L
5408 { Bad_Opcode },
5409 { Bad_Opcode },
6c30d220 5410 { VEX_W_TABLE (VEX_W_0FF6_P_2) },
c0f3af97
L
5411 },
5412
592a252b 5413 /* PREFIX_VEX_0FF7 */
c0f3af97 5414 {
592d1631
L
5415 { Bad_Opcode },
5416 { Bad_Opcode },
592a252b 5417 { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2) },
c0f3af97
L
5418 },
5419
592a252b 5420 /* PREFIX_VEX_0FF8 */
c0f3af97 5421 {
592d1631
L
5422 { Bad_Opcode },
5423 { Bad_Opcode },
6c30d220 5424 { VEX_W_TABLE (VEX_W_0FF8_P_2) },
c0f3af97
L
5425 },
5426
592a252b 5427 /* PREFIX_VEX_0FF9 */
c0f3af97 5428 {
592d1631
L
5429 { Bad_Opcode },
5430 { Bad_Opcode },
6c30d220 5431 { VEX_W_TABLE (VEX_W_0FF9_P_2) },
c0f3af97
L
5432 },
5433
592a252b 5434 /* PREFIX_VEX_0FFA */
c0f3af97 5435 {
592d1631
L
5436 { Bad_Opcode },
5437 { Bad_Opcode },
6c30d220 5438 { VEX_W_TABLE (VEX_W_0FFA_P_2) },
c0f3af97
L
5439 },
5440
592a252b 5441 /* PREFIX_VEX_0FFB */
c0f3af97 5442 {
592d1631
L
5443 { Bad_Opcode },
5444 { Bad_Opcode },
6c30d220 5445 { VEX_W_TABLE (VEX_W_0FFB_P_2) },
c0f3af97
L
5446 },
5447
592a252b 5448 /* PREFIX_VEX_0FFC */
c0f3af97 5449 {
592d1631
L
5450 { Bad_Opcode },
5451 { Bad_Opcode },
6c30d220 5452 { VEX_W_TABLE (VEX_W_0FFC_P_2) },
c0f3af97
L
5453 },
5454
592a252b 5455 /* PREFIX_VEX_0FFD */
c0f3af97 5456 {
592d1631
L
5457 { Bad_Opcode },
5458 { Bad_Opcode },
6c30d220 5459 { VEX_W_TABLE (VEX_W_0FFD_P_2) },
c0f3af97
L
5460 },
5461
592a252b 5462 /* PREFIX_VEX_0FFE */
c0f3af97 5463 {
592d1631
L
5464 { Bad_Opcode },
5465 { Bad_Opcode },
6c30d220 5466 { VEX_W_TABLE (VEX_W_0FFE_P_2) },
c0f3af97
L
5467 },
5468
592a252b 5469 /* PREFIX_VEX_0F3800 */
c0f3af97 5470 {
592d1631
L
5471 { Bad_Opcode },
5472 { Bad_Opcode },
6c30d220 5473 { VEX_W_TABLE (VEX_W_0F3800_P_2) },
c0f3af97
L
5474 },
5475
592a252b 5476 /* PREFIX_VEX_0F3801 */
c0f3af97 5477 {
592d1631
L
5478 { Bad_Opcode },
5479 { Bad_Opcode },
6c30d220 5480 { VEX_W_TABLE (VEX_W_0F3801_P_2) },
c0f3af97
L
5481 },
5482
592a252b 5483 /* PREFIX_VEX_0F3802 */
c0f3af97 5484 {
592d1631
L
5485 { Bad_Opcode },
5486 { Bad_Opcode },
6c30d220 5487 { VEX_W_TABLE (VEX_W_0F3802_P_2) },
c0f3af97
L
5488 },
5489
592a252b 5490 /* PREFIX_VEX_0F3803 */
c0f3af97 5491 {
592d1631
L
5492 { Bad_Opcode },
5493 { Bad_Opcode },
6c30d220 5494 { VEX_W_TABLE (VEX_W_0F3803_P_2) },
c0f3af97
L
5495 },
5496
592a252b 5497 /* PREFIX_VEX_0F3804 */
c0f3af97 5498 {
592d1631
L
5499 { Bad_Opcode },
5500 { Bad_Opcode },
6c30d220 5501 { VEX_W_TABLE (VEX_W_0F3804_P_2) },
c0f3af97
L
5502 },
5503
592a252b 5504 /* PREFIX_VEX_0F3805 */
c0f3af97 5505 {
592d1631
L
5506 { Bad_Opcode },
5507 { Bad_Opcode },
6c30d220 5508 { VEX_W_TABLE (VEX_W_0F3805_P_2) },
c0f3af97
L
5509 },
5510
592a252b 5511 /* PREFIX_VEX_0F3806 */
c0f3af97 5512 {
592d1631
L
5513 { Bad_Opcode },
5514 { Bad_Opcode },
6c30d220 5515 { VEX_W_TABLE (VEX_W_0F3806_P_2) },
c0f3af97
L
5516 },
5517
592a252b 5518 /* PREFIX_VEX_0F3807 */
c0f3af97 5519 {
592d1631
L
5520 { Bad_Opcode },
5521 { Bad_Opcode },
6c30d220 5522 { VEX_W_TABLE (VEX_W_0F3807_P_2) },
c0f3af97
L
5523 },
5524
592a252b 5525 /* PREFIX_VEX_0F3808 */
c0f3af97 5526 {
592d1631
L
5527 { Bad_Opcode },
5528 { Bad_Opcode },
6c30d220 5529 { VEX_W_TABLE (VEX_W_0F3808_P_2) },
c0f3af97
L
5530 },
5531
592a252b 5532 /* PREFIX_VEX_0F3809 */
c0f3af97 5533 {
592d1631
L
5534 { Bad_Opcode },
5535 { Bad_Opcode },
6c30d220 5536 { VEX_W_TABLE (VEX_W_0F3809_P_2) },
c0f3af97
L
5537 },
5538
592a252b 5539 /* PREFIX_VEX_0F380A */
c0f3af97 5540 {
592d1631
L
5541 { Bad_Opcode },
5542 { Bad_Opcode },
6c30d220 5543 { VEX_W_TABLE (VEX_W_0F380A_P_2) },
c0f3af97
L
5544 },
5545
592a252b 5546 /* PREFIX_VEX_0F380B */
c0f3af97 5547 {
592d1631
L
5548 { Bad_Opcode },
5549 { Bad_Opcode },
6c30d220 5550 { VEX_W_TABLE (VEX_W_0F380B_P_2) },
c0f3af97
L
5551 },
5552
592a252b 5553 /* PREFIX_VEX_0F380C */
c0f3af97 5554 {
592d1631
L
5555 { Bad_Opcode },
5556 { Bad_Opcode },
592a252b 5557 { VEX_W_TABLE (VEX_W_0F380C_P_2) },
c0f3af97
L
5558 },
5559
592a252b 5560 /* PREFIX_VEX_0F380D */
c0f3af97 5561 {
592d1631
L
5562 { Bad_Opcode },
5563 { Bad_Opcode },
592a252b 5564 { VEX_W_TABLE (VEX_W_0F380D_P_2) },
c0f3af97
L
5565 },
5566
592a252b 5567 /* PREFIX_VEX_0F380E */
c0f3af97 5568 {
592d1631
L
5569 { Bad_Opcode },
5570 { Bad_Opcode },
592a252b 5571 { VEX_W_TABLE (VEX_W_0F380E_P_2) },
c0f3af97
L
5572 },
5573
592a252b 5574 /* PREFIX_VEX_0F380F */
c0f3af97 5575 {
592d1631
L
5576 { Bad_Opcode },
5577 { Bad_Opcode },
592a252b 5578 { VEX_W_TABLE (VEX_W_0F380F_P_2) },
c0f3af97
L
5579 },
5580
592a252b 5581 /* PREFIX_VEX_0F3813 */
c7b8aa3a
L
5582 {
5583 { Bad_Opcode },
5584 { Bad_Opcode },
bf890a93 5585 { "vcvtph2ps", { XM, EXxmmq }, 0 },
c7b8aa3a
L
5586 },
5587
6c30d220
L
5588 /* PREFIX_VEX_0F3816 */
5589 {
5590 { Bad_Opcode },
5591 { Bad_Opcode },
5592 { VEX_LEN_TABLE (VEX_LEN_0F3816_P_2) },
5593 },
5594
592a252b 5595 /* PREFIX_VEX_0F3817 */
c0f3af97 5596 {
592d1631
L
5597 { Bad_Opcode },
5598 { Bad_Opcode },
592a252b 5599 { VEX_W_TABLE (VEX_W_0F3817_P_2) },
c0f3af97
L
5600 },
5601
592a252b 5602 /* PREFIX_VEX_0F3818 */
c0f3af97 5603 {
592d1631
L
5604 { Bad_Opcode },
5605 { Bad_Opcode },
6c30d220 5606 { VEX_W_TABLE (VEX_W_0F3818_P_2) },
c0f3af97
L
5607 },
5608
592a252b 5609 /* PREFIX_VEX_0F3819 */
c0f3af97 5610 {
592d1631
L
5611 { Bad_Opcode },
5612 { Bad_Opcode },
6c30d220 5613 { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2) },
c0f3af97
L
5614 },
5615
592a252b 5616 /* PREFIX_VEX_0F381A */
c0f3af97 5617 {
592d1631
L
5618 { Bad_Opcode },
5619 { Bad_Opcode },
592a252b 5620 { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2) },
c0f3af97
L
5621 },
5622
592a252b 5623 /* PREFIX_VEX_0F381C */
c0f3af97 5624 {
592d1631
L
5625 { Bad_Opcode },
5626 { Bad_Opcode },
6c30d220 5627 { VEX_W_TABLE (VEX_W_0F381C_P_2) },
c0f3af97
L
5628 },
5629
592a252b 5630 /* PREFIX_VEX_0F381D */
c0f3af97 5631 {
592d1631
L
5632 { Bad_Opcode },
5633 { Bad_Opcode },
6c30d220 5634 { VEX_W_TABLE (VEX_W_0F381D_P_2) },
c0f3af97
L
5635 },
5636
592a252b 5637 /* PREFIX_VEX_0F381E */
c0f3af97 5638 {
592d1631
L
5639 { Bad_Opcode },
5640 { Bad_Opcode },
6c30d220 5641 { VEX_W_TABLE (VEX_W_0F381E_P_2) },
c0f3af97
L
5642 },
5643
592a252b 5644 /* PREFIX_VEX_0F3820 */
c0f3af97 5645 {
592d1631
L
5646 { Bad_Opcode },
5647 { Bad_Opcode },
6c30d220 5648 { VEX_W_TABLE (VEX_W_0F3820_P_2) },
c0f3af97
L
5649 },
5650
592a252b 5651 /* PREFIX_VEX_0F3821 */
c0f3af97 5652 {
592d1631
L
5653 { Bad_Opcode },
5654 { Bad_Opcode },
6c30d220 5655 { VEX_W_TABLE (VEX_W_0F3821_P_2) },
c0f3af97
L
5656 },
5657
592a252b 5658 /* PREFIX_VEX_0F3822 */
c0f3af97 5659 {
592d1631
L
5660 { Bad_Opcode },
5661 { Bad_Opcode },
6c30d220 5662 { VEX_W_TABLE (VEX_W_0F3822_P_2) },
c0f3af97
L
5663 },
5664
592a252b 5665 /* PREFIX_VEX_0F3823 */
c0f3af97 5666 {
592d1631
L
5667 { Bad_Opcode },
5668 { Bad_Opcode },
6c30d220 5669 { VEX_W_TABLE (VEX_W_0F3823_P_2) },
c0f3af97
L
5670 },
5671
592a252b 5672 /* PREFIX_VEX_0F3824 */
c0f3af97 5673 {
592d1631
L
5674 { Bad_Opcode },
5675 { Bad_Opcode },
6c30d220 5676 { VEX_W_TABLE (VEX_W_0F3824_P_2) },
c0f3af97
L
5677 },
5678
592a252b 5679 /* PREFIX_VEX_0F3825 */
c0f3af97 5680 {
592d1631
L
5681 { Bad_Opcode },
5682 { Bad_Opcode },
6c30d220 5683 { VEX_W_TABLE (VEX_W_0F3825_P_2) },
c0f3af97
L
5684 },
5685
592a252b 5686 /* PREFIX_VEX_0F3828 */
c0f3af97 5687 {
592d1631
L
5688 { Bad_Opcode },
5689 { Bad_Opcode },
6c30d220 5690 { VEX_W_TABLE (VEX_W_0F3828_P_2) },
c0f3af97
L
5691 },
5692
592a252b 5693 /* PREFIX_VEX_0F3829 */
c0f3af97 5694 {
592d1631
L
5695 { Bad_Opcode },
5696 { Bad_Opcode },
6c30d220 5697 { VEX_W_TABLE (VEX_W_0F3829_P_2) },
c0f3af97
L
5698 },
5699
592a252b 5700 /* PREFIX_VEX_0F382A */
c0f3af97 5701 {
592d1631
L
5702 { Bad_Opcode },
5703 { Bad_Opcode },
592a252b 5704 { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2) },
c0f3af97
L
5705 },
5706
592a252b 5707 /* PREFIX_VEX_0F382B */
c0f3af97 5708 {
592d1631
L
5709 { Bad_Opcode },
5710 { Bad_Opcode },
6c30d220 5711 { VEX_W_TABLE (VEX_W_0F382B_P_2) },
c0f3af97
L
5712 },
5713
592a252b 5714 /* PREFIX_VEX_0F382C */
c0f3af97 5715 {
592d1631
L
5716 { Bad_Opcode },
5717 { Bad_Opcode },
592a252b 5718 { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2) },
c0f3af97
L
5719 },
5720
592a252b 5721 /* PREFIX_VEX_0F382D */
c0f3af97 5722 {
592d1631
L
5723 { Bad_Opcode },
5724 { Bad_Opcode },
592a252b 5725 { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2) },
c0f3af97
L
5726 },
5727
592a252b 5728 /* PREFIX_VEX_0F382E */
c0f3af97 5729 {
592d1631
L
5730 { Bad_Opcode },
5731 { Bad_Opcode },
592a252b 5732 { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2) },
c0f3af97
L
5733 },
5734
592a252b 5735 /* PREFIX_VEX_0F382F */
c0f3af97 5736 {
592d1631
L
5737 { Bad_Opcode },
5738 { Bad_Opcode },
592a252b 5739 { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2) },
c0f3af97
L
5740 },
5741
592a252b 5742 /* PREFIX_VEX_0F3830 */
c0f3af97 5743 {
592d1631
L
5744 { Bad_Opcode },
5745 { Bad_Opcode },
6c30d220 5746 { VEX_W_TABLE (VEX_W_0F3830_P_2) },
c0f3af97
L
5747 },
5748
592a252b 5749 /* PREFIX_VEX_0F3831 */
c0f3af97 5750 {
592d1631
L
5751 { Bad_Opcode },
5752 { Bad_Opcode },
6c30d220 5753 { VEX_W_TABLE (VEX_W_0F3831_P_2) },
c0f3af97
L
5754 },
5755
592a252b 5756 /* PREFIX_VEX_0F3832 */
c0f3af97 5757 {
592d1631
L
5758 { Bad_Opcode },
5759 { Bad_Opcode },
6c30d220 5760 { VEX_W_TABLE (VEX_W_0F3832_P_2) },
c0f3af97
L
5761 },
5762
592a252b 5763 /* PREFIX_VEX_0F3833 */
c0f3af97 5764 {
592d1631
L
5765 { Bad_Opcode },
5766 { Bad_Opcode },
6c30d220 5767 { VEX_W_TABLE (VEX_W_0F3833_P_2) },
c0f3af97
L
5768 },
5769
592a252b 5770 /* PREFIX_VEX_0F3834 */
c0f3af97 5771 {
592d1631
L
5772 { Bad_Opcode },
5773 { Bad_Opcode },
6c30d220 5774 { VEX_W_TABLE (VEX_W_0F3834_P_2) },
c0f3af97
L
5775 },
5776
592a252b 5777 /* PREFIX_VEX_0F3835 */
c0f3af97 5778 {
592d1631
L
5779 { Bad_Opcode },
5780 { Bad_Opcode },
6c30d220
L
5781 { VEX_W_TABLE (VEX_W_0F3835_P_2) },
5782 },
5783
5784 /* PREFIX_VEX_0F3836 */
5785 {
5786 { Bad_Opcode },
5787 { Bad_Opcode },
5788 { VEX_LEN_TABLE (VEX_LEN_0F3836_P_2) },
c0f3af97
L
5789 },
5790
592a252b 5791 /* PREFIX_VEX_0F3837 */
c0f3af97 5792 {
592d1631
L
5793 { Bad_Opcode },
5794 { Bad_Opcode },
6c30d220 5795 { VEX_W_TABLE (VEX_W_0F3837_P_2) },
c0f3af97
L
5796 },
5797
592a252b 5798 /* PREFIX_VEX_0F3838 */
c0f3af97 5799 {
592d1631
L
5800 { Bad_Opcode },
5801 { Bad_Opcode },
6c30d220 5802 { VEX_W_TABLE (VEX_W_0F3838_P_2) },
c0f3af97
L
5803 },
5804
592a252b 5805 /* PREFIX_VEX_0F3839 */
c0f3af97 5806 {
592d1631
L
5807 { Bad_Opcode },
5808 { Bad_Opcode },
6c30d220 5809 { VEX_W_TABLE (VEX_W_0F3839_P_2) },
c0f3af97
L
5810 },
5811
592a252b 5812 /* PREFIX_VEX_0F383A */
c0f3af97 5813 {
592d1631
L
5814 { Bad_Opcode },
5815 { Bad_Opcode },
6c30d220 5816 { VEX_W_TABLE (VEX_W_0F383A_P_2) },
c0f3af97
L
5817 },
5818
592a252b 5819 /* PREFIX_VEX_0F383B */
c0f3af97 5820 {
592d1631
L
5821 { Bad_Opcode },
5822 { Bad_Opcode },
6c30d220 5823 { VEX_W_TABLE (VEX_W_0F383B_P_2) },
c0f3af97
L
5824 },
5825
592a252b 5826 /* PREFIX_VEX_0F383C */
c0f3af97 5827 {
592d1631
L
5828 { Bad_Opcode },
5829 { Bad_Opcode },
6c30d220 5830 { VEX_W_TABLE (VEX_W_0F383C_P_2) },
c0f3af97
L
5831 },
5832
592a252b 5833 /* PREFIX_VEX_0F383D */
c0f3af97 5834 {
592d1631
L
5835 { Bad_Opcode },
5836 { Bad_Opcode },
6c30d220 5837 { VEX_W_TABLE (VEX_W_0F383D_P_2) },
c0f3af97
L
5838 },
5839
592a252b 5840 /* PREFIX_VEX_0F383E */
c0f3af97 5841 {
592d1631
L
5842 { Bad_Opcode },
5843 { Bad_Opcode },
6c30d220 5844 { VEX_W_TABLE (VEX_W_0F383E_P_2) },
c0f3af97
L
5845 },
5846
592a252b 5847 /* PREFIX_VEX_0F383F */
c0f3af97 5848 {
592d1631
L
5849 { Bad_Opcode },
5850 { Bad_Opcode },
6c30d220 5851 { VEX_W_TABLE (VEX_W_0F383F_P_2) },
c0f3af97
L
5852 },
5853
592a252b 5854 /* PREFIX_VEX_0F3840 */
c0f3af97 5855 {
592d1631
L
5856 { Bad_Opcode },
5857 { Bad_Opcode },
6c30d220 5858 { VEX_W_TABLE (VEX_W_0F3840_P_2) },
c0f3af97
L
5859 },
5860
592a252b 5861 /* PREFIX_VEX_0F3841 */
c0f3af97 5862 {
592d1631
L
5863 { Bad_Opcode },
5864 { Bad_Opcode },
592a252b 5865 { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2) },
c0f3af97
L
5866 },
5867
6c30d220
L
5868 /* PREFIX_VEX_0F3845 */
5869 {
5870 { Bad_Opcode },
5871 { Bad_Opcode },
bf890a93 5872 { "vpsrlv%LW", { XM, Vex, EXx }, 0 },
6c30d220
L
5873 },
5874
5875 /* PREFIX_VEX_0F3846 */
5876 {
5877 { Bad_Opcode },
5878 { Bad_Opcode },
5879 { VEX_W_TABLE (VEX_W_0F3846_P_2) },
5880 },
5881
5882 /* PREFIX_VEX_0F3847 */
5883 {
5884 { Bad_Opcode },
5885 { Bad_Opcode },
bf890a93 5886 { "vpsllv%LW", { XM, Vex, EXx }, 0 },
6c30d220
L
5887 },
5888
5889 /* PREFIX_VEX_0F3858 */
5890 {
5891 { Bad_Opcode },
5892 { Bad_Opcode },
5893 { VEX_W_TABLE (VEX_W_0F3858_P_2) },
5894 },
5895
5896 /* PREFIX_VEX_0F3859 */
5897 {
5898 { Bad_Opcode },
5899 { Bad_Opcode },
5900 { VEX_W_TABLE (VEX_W_0F3859_P_2) },
5901 },
5902
5903 /* PREFIX_VEX_0F385A */
5904 {
5905 { Bad_Opcode },
5906 { Bad_Opcode },
5907 { MOD_TABLE (MOD_VEX_0F385A_PREFIX_2) },
5908 },
5909
5910 /* PREFIX_VEX_0F3878 */
5911 {
5912 { Bad_Opcode },
5913 { Bad_Opcode },
5914 { VEX_W_TABLE (VEX_W_0F3878_P_2) },
5915 },
5916
5917 /* PREFIX_VEX_0F3879 */
5918 {
5919 { Bad_Opcode },
5920 { Bad_Opcode },
5921 { VEX_W_TABLE (VEX_W_0F3879_P_2) },
5922 },
5923
5924 /* PREFIX_VEX_0F388C */
5925 {
5926 { Bad_Opcode },
5927 { Bad_Opcode },
f7002f42 5928 { MOD_TABLE (MOD_VEX_0F388C_PREFIX_2) },
6c30d220
L
5929 },
5930
5931 /* PREFIX_VEX_0F388E */
5932 {
5933 { Bad_Opcode },
5934 { Bad_Opcode },
f7002f42 5935 { MOD_TABLE (MOD_VEX_0F388E_PREFIX_2) },
6c30d220
L
5936 },
5937
5938 /* PREFIX_VEX_0F3890 */
5939 {
5940 { Bad_Opcode },
5941 { Bad_Opcode },
bf890a93 5942 { "vpgatherd%LW", { XM, MVexVSIBDWpX, Vex }, 0 },
6c30d220
L
5943 },
5944
5945 /* PREFIX_VEX_0F3891 */
5946 {
5947 { Bad_Opcode },
5948 { Bad_Opcode },
bf890a93 5949 { "vpgatherq%LW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6c30d220
L
5950 },
5951
5952 /* PREFIX_VEX_0F3892 */
5953 {
5954 { Bad_Opcode },
5955 { Bad_Opcode },
bf890a93 5956 { "vgatherdp%XW", { XM, MVexVSIBDWpX, Vex }, 0 },
6c30d220
L
5957 },
5958
5959 /* PREFIX_VEX_0F3893 */
5960 {
5961 { Bad_Opcode },
5962 { Bad_Opcode },
bf890a93 5963 { "vgatherqp%XW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6c30d220
L
5964 },
5965
592a252b 5966 /* PREFIX_VEX_0F3896 */
a5ff0eb2 5967 {
592d1631
L
5968 { Bad_Opcode },
5969 { Bad_Opcode },
bf890a93 5970 { "vfmaddsub132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
5971 },
5972
592a252b 5973 /* PREFIX_VEX_0F3897 */
a5ff0eb2 5974 {
592d1631
L
5975 { Bad_Opcode },
5976 { Bad_Opcode },
bf890a93 5977 { "vfmsubadd132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
5978 },
5979
592a252b 5980 /* PREFIX_VEX_0F3898 */
a5ff0eb2 5981 {
592d1631
L
5982 { Bad_Opcode },
5983 { Bad_Opcode },
bf890a93 5984 { "vfmadd132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
5985 },
5986
592a252b 5987 /* PREFIX_VEX_0F3899 */
a5ff0eb2 5988 {
592d1631
L
5989 { Bad_Opcode },
5990 { Bad_Opcode },
bf890a93 5991 { "vfmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
a5ff0eb2
L
5992 },
5993
592a252b 5994 /* PREFIX_VEX_0F389A */
a5ff0eb2 5995 {
592d1631
L
5996 { Bad_Opcode },
5997 { Bad_Opcode },
bf890a93 5998 { "vfmsub132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
5999 },
6000
592a252b 6001 /* PREFIX_VEX_0F389B */
c0f3af97 6002 {
592d1631
L
6003 { Bad_Opcode },
6004 { Bad_Opcode },
bf890a93 6005 { "vfmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6006 },
6007
592a252b 6008 /* PREFIX_VEX_0F389C */
c0f3af97 6009 {
592d1631
L
6010 { Bad_Opcode },
6011 { Bad_Opcode },
bf890a93 6012 { "vfnmadd132p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6013 },
6014
592a252b 6015 /* PREFIX_VEX_0F389D */
c0f3af97 6016 {
592d1631
L
6017 { Bad_Opcode },
6018 { Bad_Opcode },
bf890a93 6019 { "vfnmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6020 },
6021
592a252b 6022 /* PREFIX_VEX_0F389E */
c0f3af97 6023 {
592d1631
L
6024 { Bad_Opcode },
6025 { Bad_Opcode },
bf890a93 6026 { "vfnmsub132p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6027 },
6028
592a252b 6029 /* PREFIX_VEX_0F389F */
c0f3af97 6030 {
592d1631
L
6031 { Bad_Opcode },
6032 { Bad_Opcode },
bf890a93 6033 { "vfnmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6034 },
6035
592a252b 6036 /* PREFIX_VEX_0F38A6 */
c0f3af97 6037 {
592d1631
L
6038 { Bad_Opcode },
6039 { Bad_Opcode },
bf890a93 6040 { "vfmaddsub213p%XW", { XM, Vex, EXx }, 0 },
592d1631 6041 { Bad_Opcode },
c0f3af97
L
6042 },
6043
592a252b 6044 /* PREFIX_VEX_0F38A7 */
c0f3af97 6045 {
592d1631
L
6046 { Bad_Opcode },
6047 { Bad_Opcode },
bf890a93 6048 { "vfmsubadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6049 },
6050
592a252b 6051 /* PREFIX_VEX_0F38A8 */
c0f3af97 6052 {
592d1631
L
6053 { Bad_Opcode },
6054 { Bad_Opcode },
bf890a93 6055 { "vfmadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6056 },
6057
592a252b 6058 /* PREFIX_VEX_0F38A9 */
c0f3af97 6059 {
592d1631
L
6060 { Bad_Opcode },
6061 { Bad_Opcode },
bf890a93 6062 { "vfmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6063 },
6064
592a252b 6065 /* PREFIX_VEX_0F38AA */
c0f3af97 6066 {
592d1631
L
6067 { Bad_Opcode },
6068 { Bad_Opcode },
bf890a93 6069 { "vfmsub213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6070 },
6071
592a252b 6072 /* PREFIX_VEX_0F38AB */
c0f3af97 6073 {
592d1631
L
6074 { Bad_Opcode },
6075 { Bad_Opcode },
bf890a93 6076 { "vfmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6077 },
6078
592a252b 6079 /* PREFIX_VEX_0F38AC */
c0f3af97 6080 {
592d1631
L
6081 { Bad_Opcode },
6082 { Bad_Opcode },
bf890a93 6083 { "vfnmadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6084 },
6085
592a252b 6086 /* PREFIX_VEX_0F38AD */
c0f3af97 6087 {
592d1631
L
6088 { Bad_Opcode },
6089 { Bad_Opcode },
bf890a93 6090 { "vfnmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6091 },
6092
592a252b 6093 /* PREFIX_VEX_0F38AE */
c0f3af97 6094 {
592d1631
L
6095 { Bad_Opcode },
6096 { Bad_Opcode },
bf890a93 6097 { "vfnmsub213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6098 },
6099
592a252b 6100 /* PREFIX_VEX_0F38AF */
c0f3af97 6101 {
592d1631
L
6102 { Bad_Opcode },
6103 { Bad_Opcode },
bf890a93 6104 { "vfnmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6105 },
6106
592a252b 6107 /* PREFIX_VEX_0F38B6 */
c0f3af97 6108 {
592d1631
L
6109 { Bad_Opcode },
6110 { Bad_Opcode },
bf890a93 6111 { "vfmaddsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6112 },
6113
592a252b 6114 /* PREFIX_VEX_0F38B7 */
c0f3af97 6115 {
592d1631
L
6116 { Bad_Opcode },
6117 { Bad_Opcode },
bf890a93 6118 { "vfmsubadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6119 },
6120
592a252b 6121 /* PREFIX_VEX_0F38B8 */
c0f3af97 6122 {
592d1631
L
6123 { Bad_Opcode },
6124 { Bad_Opcode },
bf890a93 6125 { "vfmadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6126 },
6127
592a252b 6128 /* PREFIX_VEX_0F38B9 */
c0f3af97 6129 {
592d1631
L
6130 { Bad_Opcode },
6131 { Bad_Opcode },
bf890a93 6132 { "vfmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6133 },
6134
592a252b 6135 /* PREFIX_VEX_0F38BA */
c0f3af97 6136 {
592d1631
L
6137 { Bad_Opcode },
6138 { Bad_Opcode },
bf890a93 6139 { "vfmsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6140 },
6141
592a252b 6142 /* PREFIX_VEX_0F38BB */
c0f3af97 6143 {
592d1631
L
6144 { Bad_Opcode },
6145 { Bad_Opcode },
bf890a93 6146 { "vfmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6147 },
6148
592a252b 6149 /* PREFIX_VEX_0F38BC */
c0f3af97 6150 {
592d1631
L
6151 { Bad_Opcode },
6152 { Bad_Opcode },
bf890a93 6153 { "vfnmadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6154 },
6155
592a252b 6156 /* PREFIX_VEX_0F38BD */
c0f3af97 6157 {
592d1631
L
6158 { Bad_Opcode },
6159 { Bad_Opcode },
bf890a93 6160 { "vfnmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6161 },
6162
592a252b 6163 /* PREFIX_VEX_0F38BE */
c0f3af97 6164 {
592d1631
L
6165 { Bad_Opcode },
6166 { Bad_Opcode },
bf890a93 6167 { "vfnmsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6168 },
6169
592a252b 6170 /* PREFIX_VEX_0F38BF */
c0f3af97 6171 {
592d1631
L
6172 { Bad_Opcode },
6173 { Bad_Opcode },
bf890a93 6174 { "vfnmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6175 },
6176
592a252b 6177 /* PREFIX_VEX_0F38DB */
c0f3af97 6178 {
592d1631
L
6179 { Bad_Opcode },
6180 { Bad_Opcode },
592a252b 6181 { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2) },
c0f3af97
L
6182 },
6183
592a252b 6184 /* PREFIX_VEX_0F38DC */
c0f3af97 6185 {
592d1631
L
6186 { Bad_Opcode },
6187 { Bad_Opcode },
592a252b 6188 { VEX_LEN_TABLE (VEX_LEN_0F38DC_P_2) },
c0f3af97
L
6189 },
6190
592a252b 6191 /* PREFIX_VEX_0F38DD */
c0f3af97 6192 {
592d1631
L
6193 { Bad_Opcode },
6194 { Bad_Opcode },
592a252b 6195 { VEX_LEN_TABLE (VEX_LEN_0F38DD_P_2) },
c0f3af97
L
6196 },
6197
592a252b 6198 /* PREFIX_VEX_0F38DE */
c0f3af97 6199 {
592d1631
L
6200 { Bad_Opcode },
6201 { Bad_Opcode },
592a252b 6202 { VEX_LEN_TABLE (VEX_LEN_0F38DE_P_2) },
c0f3af97
L
6203 },
6204
592a252b 6205 /* PREFIX_VEX_0F38DF */
c0f3af97 6206 {
592d1631
L
6207 { Bad_Opcode },
6208 { Bad_Opcode },
592a252b 6209 { VEX_LEN_TABLE (VEX_LEN_0F38DF_P_2) },
c0f3af97
L
6210 },
6211
f12dc422
L
6212 /* PREFIX_VEX_0F38F2 */
6213 {
6214 { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0) },
6215 },
6216
6217 /* PREFIX_VEX_0F38F3_REG_1 */
6218 {
6219 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0) },
6220 },
6221
6222 /* PREFIX_VEX_0F38F3_REG_2 */
6223 {
6224 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0) },
6225 },
6226
6227 /* PREFIX_VEX_0F38F3_REG_3 */
6228 {
6229 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0) },
6230 },
6231
6c30d220
L
6232 /* PREFIX_VEX_0F38F5 */
6233 {
6234 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_0) },
6235 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_1) },
6236 { Bad_Opcode },
6237 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_3) },
6238 },
6239
6240 /* PREFIX_VEX_0F38F6 */
6241 {
6242 { Bad_Opcode },
6243 { Bad_Opcode },
6244 { Bad_Opcode },
6245 { VEX_LEN_TABLE (VEX_LEN_0F38F6_P_3) },
6246 },
6247
f12dc422
L
6248 /* PREFIX_VEX_0F38F7 */
6249 {
6250 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0) },
6c30d220
L
6251 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_1) },
6252 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_2) },
6253 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_3) },
6254 },
6255
6256 /* PREFIX_VEX_0F3A00 */
6257 {
6258 { Bad_Opcode },
6259 { Bad_Opcode },
6260 { VEX_LEN_TABLE (VEX_LEN_0F3A00_P_2) },
6261 },
6262
6263 /* PREFIX_VEX_0F3A01 */
6264 {
6265 { Bad_Opcode },
6266 { Bad_Opcode },
6267 { VEX_LEN_TABLE (VEX_LEN_0F3A01_P_2) },
6268 },
6269
6270 /* PREFIX_VEX_0F3A02 */
6271 {
6272 { Bad_Opcode },
6273 { Bad_Opcode },
6274 { VEX_W_TABLE (VEX_W_0F3A02_P_2) },
f12dc422
L
6275 },
6276
592a252b 6277 /* PREFIX_VEX_0F3A04 */
c0f3af97 6278 {
592d1631
L
6279 { Bad_Opcode },
6280 { Bad_Opcode },
592a252b 6281 { VEX_W_TABLE (VEX_W_0F3A04_P_2) },
c0f3af97
L
6282 },
6283
592a252b 6284 /* PREFIX_VEX_0F3A05 */
c0f3af97 6285 {
592d1631
L
6286 { Bad_Opcode },
6287 { Bad_Opcode },
592a252b 6288 { VEX_W_TABLE (VEX_W_0F3A05_P_2) },
c0f3af97
L
6289 },
6290
592a252b 6291 /* PREFIX_VEX_0F3A06 */
c0f3af97 6292 {
592d1631
L
6293 { Bad_Opcode },
6294 { Bad_Opcode },
592a252b 6295 { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2) },
c0f3af97
L
6296 },
6297
592a252b 6298 /* PREFIX_VEX_0F3A08 */
c0f3af97 6299 {
592d1631
L
6300 { Bad_Opcode },
6301 { Bad_Opcode },
592a252b 6302 { VEX_W_TABLE (VEX_W_0F3A08_P_2) },
c0f3af97
L
6303 },
6304
592a252b 6305 /* PREFIX_VEX_0F3A09 */
c0f3af97 6306 {
592d1631
L
6307 { Bad_Opcode },
6308 { Bad_Opcode },
592a252b 6309 { VEX_W_TABLE (VEX_W_0F3A09_P_2) },
c0f3af97
L
6310 },
6311
592a252b 6312 /* PREFIX_VEX_0F3A0A */
c0f3af97 6313 {
592d1631
L
6314 { Bad_Opcode },
6315 { Bad_Opcode },
592a252b 6316 { VEX_LEN_TABLE (VEX_LEN_0F3A0A_P_2) },
0bfee649
L
6317 },
6318
592a252b 6319 /* PREFIX_VEX_0F3A0B */
0bfee649 6320 {
592d1631
L
6321 { Bad_Opcode },
6322 { Bad_Opcode },
592a252b 6323 { VEX_LEN_TABLE (VEX_LEN_0F3A0B_P_2) },
0bfee649
L
6324 },
6325
592a252b 6326 /* PREFIX_VEX_0F3A0C */
0bfee649 6327 {
592d1631
L
6328 { Bad_Opcode },
6329 { Bad_Opcode },
592a252b 6330 { VEX_W_TABLE (VEX_W_0F3A0C_P_2) },
0bfee649
L
6331 },
6332
592a252b 6333 /* PREFIX_VEX_0F3A0D */
0bfee649 6334 {
592d1631
L
6335 { Bad_Opcode },
6336 { Bad_Opcode },
592a252b 6337 { VEX_W_TABLE (VEX_W_0F3A0D_P_2) },
c0f3af97
L
6338 },
6339
592a252b 6340 /* PREFIX_VEX_0F3A0E */
0bfee649 6341 {
592d1631
L
6342 { Bad_Opcode },
6343 { Bad_Opcode },
6c30d220 6344 { VEX_W_TABLE (VEX_W_0F3A0E_P_2) },
0bfee649
L
6345 },
6346
592a252b 6347 /* PREFIX_VEX_0F3A0F */
0bfee649 6348 {
592d1631
L
6349 { Bad_Opcode },
6350 { Bad_Opcode },
6c30d220 6351 { VEX_W_TABLE (VEX_W_0F3A0F_P_2) },
0bfee649
L
6352 },
6353
592a252b 6354 /* PREFIX_VEX_0F3A14 */
0bfee649 6355 {
592d1631
L
6356 { Bad_Opcode },
6357 { Bad_Opcode },
592a252b 6358 { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2) },
0bfee649
L
6359 },
6360
592a252b 6361 /* PREFIX_VEX_0F3A15 */
0bfee649 6362 {
592d1631
L
6363 { Bad_Opcode },
6364 { Bad_Opcode },
592a252b 6365 { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2) },
0bfee649
L
6366 },
6367
592a252b 6368 /* PREFIX_VEX_0F3A16 */
c0f3af97 6369 {
592d1631
L
6370 { Bad_Opcode },
6371 { Bad_Opcode },
592a252b 6372 { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2) },
c0f3af97
L
6373 },
6374
592a252b 6375 /* PREFIX_VEX_0F3A17 */
c0f3af97 6376 {
592d1631
L
6377 { Bad_Opcode },
6378 { Bad_Opcode },
592a252b 6379 { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2) },
c0f3af97
L
6380 },
6381
592a252b 6382 /* PREFIX_VEX_0F3A18 */
c0f3af97 6383 {
592d1631
L
6384 { Bad_Opcode },
6385 { Bad_Opcode },
592a252b 6386 { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2) },
c0f3af97
L
6387 },
6388
592a252b 6389 /* PREFIX_VEX_0F3A19 */
c0f3af97 6390 {
592d1631
L
6391 { Bad_Opcode },
6392 { Bad_Opcode },
592a252b 6393 { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2) },
c0f3af97
L
6394 },
6395
592a252b 6396 /* PREFIX_VEX_0F3A1D */
c7b8aa3a
L
6397 {
6398 { Bad_Opcode },
6399 { Bad_Opcode },
bf890a93 6400 { "vcvtps2ph", { EXxmmq, XM, Ib }, 0 },
c7b8aa3a
L
6401 },
6402
592a252b 6403 /* PREFIX_VEX_0F3A20 */
c0f3af97 6404 {
592d1631
L
6405 { Bad_Opcode },
6406 { Bad_Opcode },
592a252b 6407 { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2) },
c0f3af97
L
6408 },
6409
592a252b 6410 /* PREFIX_VEX_0F3A21 */
c0f3af97 6411 {
592d1631
L
6412 { Bad_Opcode },
6413 { Bad_Opcode },
592a252b 6414 { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2) },
c0f3af97
L
6415 },
6416
592a252b 6417 /* PREFIX_VEX_0F3A22 */
0bfee649 6418 {
592d1631
L
6419 { Bad_Opcode },
6420 { Bad_Opcode },
592a252b 6421 { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2) },
0bfee649
L
6422 },
6423
43234a1e
L
6424 /* PREFIX_VEX_0F3A30 */
6425 {
6426 { Bad_Opcode },
6427 { Bad_Opcode },
6428 { VEX_LEN_TABLE (VEX_LEN_0F3A30_P_2) },
6429 },
6430
1ba585e8
IT
6431 /* PREFIX_VEX_0F3A31 */
6432 {
6433 { Bad_Opcode },
6434 { Bad_Opcode },
6435 { VEX_LEN_TABLE (VEX_LEN_0F3A31_P_2) },
6436 },
6437
43234a1e
L
6438 /* PREFIX_VEX_0F3A32 */
6439 {
6440 { Bad_Opcode },
6441 { Bad_Opcode },
6442 { VEX_LEN_TABLE (VEX_LEN_0F3A32_P_2) },
6443 },
6444
1ba585e8
IT
6445 /* PREFIX_VEX_0F3A33 */
6446 {
6447 { Bad_Opcode },
6448 { Bad_Opcode },
6449 { VEX_LEN_TABLE (VEX_LEN_0F3A33_P_2) },
6450 },
6451
6c30d220
L
6452 /* PREFIX_VEX_0F3A38 */
6453 {
6454 { Bad_Opcode },
6455 { Bad_Opcode },
6456 { VEX_LEN_TABLE (VEX_LEN_0F3A38_P_2) },
6457 },
6458
6459 /* PREFIX_VEX_0F3A39 */
6460 {
6461 { Bad_Opcode },
6462 { Bad_Opcode },
6463 { VEX_LEN_TABLE (VEX_LEN_0F3A39_P_2) },
6464 },
6465
592a252b 6466 /* PREFIX_VEX_0F3A40 */
c0f3af97 6467 {
592d1631
L
6468 { Bad_Opcode },
6469 { Bad_Opcode },
592a252b 6470 { VEX_W_TABLE (VEX_W_0F3A40_P_2) },
c0f3af97
L
6471 },
6472
592a252b 6473 /* PREFIX_VEX_0F3A41 */
c0f3af97 6474 {
592d1631
L
6475 { Bad_Opcode },
6476 { Bad_Opcode },
592a252b 6477 { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2) },
c0f3af97
L
6478 },
6479
592a252b 6480 /* PREFIX_VEX_0F3A42 */
c0f3af97 6481 {
592d1631
L
6482 { Bad_Opcode },
6483 { Bad_Opcode },
6c30d220 6484 { VEX_W_TABLE (VEX_W_0F3A42_P_2) },
c0f3af97
L
6485 },
6486
592a252b 6487 /* PREFIX_VEX_0F3A44 */
ce2f5b3c 6488 {
592d1631
L
6489 { Bad_Opcode },
6490 { Bad_Opcode },
592a252b 6491 { VEX_LEN_TABLE (VEX_LEN_0F3A44_P_2) },
ce2f5b3c
L
6492 },
6493
6c30d220
L
6494 /* PREFIX_VEX_0F3A46 */
6495 {
6496 { Bad_Opcode },
6497 { Bad_Opcode },
6498 { VEX_LEN_TABLE (VEX_LEN_0F3A46_P_2) },
6499 },
6500
592a252b 6501 /* PREFIX_VEX_0F3A48 */
a683cc34
SP
6502 {
6503 { Bad_Opcode },
6504 { Bad_Opcode },
592a252b 6505 { VEX_W_TABLE (VEX_W_0F3A48_P_2) },
a683cc34
SP
6506 },
6507
592a252b 6508 /* PREFIX_VEX_0F3A49 */
a683cc34
SP
6509 {
6510 { Bad_Opcode },
6511 { Bad_Opcode },
592a252b 6512 { VEX_W_TABLE (VEX_W_0F3A49_P_2) },
a683cc34
SP
6513 },
6514
592a252b 6515 /* PREFIX_VEX_0F3A4A */
c0f3af97 6516 {
592d1631
L
6517 { Bad_Opcode },
6518 { Bad_Opcode },
592a252b 6519 { VEX_W_TABLE (VEX_W_0F3A4A_P_2) },
c0f3af97
L
6520 },
6521
592a252b 6522 /* PREFIX_VEX_0F3A4B */
c0f3af97 6523 {
592d1631
L
6524 { Bad_Opcode },
6525 { Bad_Opcode },
592a252b 6526 { VEX_W_TABLE (VEX_W_0F3A4B_P_2) },
c0f3af97
L
6527 },
6528
592a252b 6529 /* PREFIX_VEX_0F3A4C */
c0f3af97 6530 {
592d1631
L
6531 { Bad_Opcode },
6532 { Bad_Opcode },
6c30d220 6533 { VEX_W_TABLE (VEX_W_0F3A4C_P_2) },
c0f3af97
L
6534 },
6535
592a252b 6536 /* PREFIX_VEX_0F3A5C */
922d8de8 6537 {
592d1631
L
6538 { Bad_Opcode },
6539 { Bad_Opcode },
bf890a93 6540 { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6541 },
6542
592a252b 6543 /* PREFIX_VEX_0F3A5D */
922d8de8 6544 {
592d1631
L
6545 { Bad_Opcode },
6546 { Bad_Opcode },
bf890a93 6547 { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6548 },
6549
592a252b 6550 /* PREFIX_VEX_0F3A5E */
922d8de8 6551 {
592d1631
L
6552 { Bad_Opcode },
6553 { Bad_Opcode },
bf890a93 6554 { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6555 },
6556
592a252b 6557 /* PREFIX_VEX_0F3A5F */
922d8de8 6558 {
592d1631
L
6559 { Bad_Opcode },
6560 { Bad_Opcode },
bf890a93 6561 { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6562 },
6563
592a252b 6564 /* PREFIX_VEX_0F3A60 */
c0f3af97 6565 {
592d1631
L
6566 { Bad_Opcode },
6567 { Bad_Opcode },
592a252b 6568 { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2) },
592d1631 6569 { Bad_Opcode },
c0f3af97
L
6570 },
6571
592a252b 6572 /* PREFIX_VEX_0F3A61 */
c0f3af97 6573 {
592d1631
L
6574 { Bad_Opcode },
6575 { Bad_Opcode },
592a252b 6576 { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2) },
c0f3af97
L
6577 },
6578
592a252b 6579 /* PREFIX_VEX_0F3A62 */
c0f3af97 6580 {
592d1631
L
6581 { Bad_Opcode },
6582 { Bad_Opcode },
592a252b 6583 { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2) },
c0f3af97
L
6584 },
6585
592a252b 6586 /* PREFIX_VEX_0F3A63 */
c0f3af97 6587 {
592d1631
L
6588 { Bad_Opcode },
6589 { Bad_Opcode },
592a252b 6590 { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2) },
c0f3af97 6591 },
a5ff0eb2 6592
592a252b 6593 /* PREFIX_VEX_0F3A68 */
922d8de8 6594 {
592d1631
L
6595 { Bad_Opcode },
6596 { Bad_Opcode },
bf890a93 6597 { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6598 },
6599
592a252b 6600 /* PREFIX_VEX_0F3A69 */
922d8de8 6601 {
592d1631
L
6602 { Bad_Opcode },
6603 { Bad_Opcode },
bf890a93 6604 { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6605 },
6606
592a252b 6607 /* PREFIX_VEX_0F3A6A */
922d8de8 6608 {
592d1631
L
6609 { Bad_Opcode },
6610 { Bad_Opcode },
592a252b 6611 { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2) },
922d8de8
DR
6612 },
6613
592a252b 6614 /* PREFIX_VEX_0F3A6B */
922d8de8 6615 {
592d1631
L
6616 { Bad_Opcode },
6617 { Bad_Opcode },
592a252b 6618 { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2) },
922d8de8
DR
6619 },
6620
592a252b 6621 /* PREFIX_VEX_0F3A6C */
922d8de8 6622 {
592d1631
L
6623 { Bad_Opcode },
6624 { Bad_Opcode },
bf890a93 6625 { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6626 },
6627
592a252b 6628 /* PREFIX_VEX_0F3A6D */
922d8de8 6629 {
592d1631
L
6630 { Bad_Opcode },
6631 { Bad_Opcode },
bf890a93 6632 { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6633 },
6634
592a252b 6635 /* PREFIX_VEX_0F3A6E */
922d8de8 6636 {
592d1631
L
6637 { Bad_Opcode },
6638 { Bad_Opcode },
592a252b 6639 { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2) },
922d8de8
DR
6640 },
6641
592a252b 6642 /* PREFIX_VEX_0F3A6F */
922d8de8 6643 {
592d1631
L
6644 { Bad_Opcode },
6645 { Bad_Opcode },
592a252b 6646 { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2) },
922d8de8
DR
6647 },
6648
592a252b 6649 /* PREFIX_VEX_0F3A78 */
922d8de8 6650 {
592d1631
L
6651 { Bad_Opcode },
6652 { Bad_Opcode },
bf890a93 6653 { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6654 },
6655
592a252b 6656 /* PREFIX_VEX_0F3A79 */
922d8de8 6657 {
592d1631
L
6658 { Bad_Opcode },
6659 { Bad_Opcode },
bf890a93 6660 { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6661 },
6662
592a252b 6663 /* PREFIX_VEX_0F3A7A */
922d8de8 6664 {
592d1631
L
6665 { Bad_Opcode },
6666 { Bad_Opcode },
592a252b 6667 { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2) },
922d8de8
DR
6668 },
6669
592a252b 6670 /* PREFIX_VEX_0F3A7B */
922d8de8 6671 {
592d1631
L
6672 { Bad_Opcode },
6673 { Bad_Opcode },
592a252b 6674 { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2) },
922d8de8
DR
6675 },
6676
592a252b 6677 /* PREFIX_VEX_0F3A7C */
922d8de8 6678 {
592d1631
L
6679 { Bad_Opcode },
6680 { Bad_Opcode },
bf890a93 6681 { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
592d1631 6682 { Bad_Opcode },
922d8de8
DR
6683 },
6684
592a252b 6685 /* PREFIX_VEX_0F3A7D */
922d8de8 6686 {
592d1631
L
6687 { Bad_Opcode },
6688 { Bad_Opcode },
bf890a93 6689 { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6690 },
6691
592a252b 6692 /* PREFIX_VEX_0F3A7E */
922d8de8 6693 {
592d1631
L
6694 { Bad_Opcode },
6695 { Bad_Opcode },
592a252b 6696 { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2) },
922d8de8
DR
6697 },
6698
592a252b 6699 /* PREFIX_VEX_0F3A7F */
922d8de8 6700 {
592d1631
L
6701 { Bad_Opcode },
6702 { Bad_Opcode },
592a252b 6703 { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2) },
922d8de8
DR
6704 },
6705
592a252b 6706 /* PREFIX_VEX_0F3ADF */
a5ff0eb2 6707 {
592d1631
L
6708 { Bad_Opcode },
6709 { Bad_Opcode },
592a252b 6710 { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2) },
a5ff0eb2 6711 },
6c30d220
L
6712
6713 /* PREFIX_VEX_0F3AF0 */
6714 {
6715 { Bad_Opcode },
6716 { Bad_Opcode },
6717 { Bad_Opcode },
6718 { VEX_LEN_TABLE (VEX_LEN_0F3AF0_P_3) },
6719 },
43234a1e
L
6720
6721#define NEED_PREFIX_TABLE
6722#include "i386-dis-evex.h"
6723#undef NEED_PREFIX_TABLE
c0f3af97
L
6724};
6725
6726static const struct dis386 x86_64_table[][2] = {
6727 /* X86_64_06 */
6728 {
bf890a93 6729 { "pushP", { es }, 0 },
c0f3af97
L
6730 },
6731
6732 /* X86_64_07 */
6733 {
bf890a93 6734 { "popP", { es }, 0 },
c0f3af97
L
6735 },
6736
6737 /* X86_64_0D */
6738 {
bf890a93 6739 { "pushP", { cs }, 0 },
c0f3af97
L
6740 },
6741
6742 /* X86_64_16 */
6743 {
bf890a93 6744 { "pushP", { ss }, 0 },
c0f3af97
L
6745 },
6746
6747 /* X86_64_17 */
6748 {
bf890a93 6749 { "popP", { ss }, 0 },
c0f3af97
L
6750 },
6751
6752 /* X86_64_1E */
6753 {
bf890a93 6754 { "pushP", { ds }, 0 },
c0f3af97
L
6755 },
6756
6757 /* X86_64_1F */
6758 {
bf890a93 6759 { "popP", { ds }, 0 },
c0f3af97
L
6760 },
6761
6762 /* X86_64_27 */
6763 {
bf890a93 6764 { "daa", { XX }, 0 },
c0f3af97
L
6765 },
6766
6767 /* X86_64_2F */
6768 {
bf890a93 6769 { "das", { XX }, 0 },
c0f3af97
L
6770 },
6771
6772 /* X86_64_37 */
6773 {
bf890a93 6774 { "aaa", { XX }, 0 },
c0f3af97
L
6775 },
6776
6777 /* X86_64_3F */
6778 {
bf890a93 6779 { "aas", { XX }, 0 },
c0f3af97
L
6780 },
6781
6782 /* X86_64_60 */
6783 {
bf890a93 6784 { "pushaP", { XX }, 0 },
c0f3af97
L
6785 },
6786
6787 /* X86_64_61 */
6788 {
bf890a93 6789 { "popaP", { XX }, 0 },
c0f3af97
L
6790 },
6791
6792 /* X86_64_62 */
6793 {
6794 { MOD_TABLE (MOD_62_32BIT) },
43234a1e 6795 { EVEX_TABLE (EVEX_0F) },
c0f3af97
L
6796 },
6797
6798 /* X86_64_63 */
6799 {
bf890a93
IT
6800 { "arpl", { Ew, Gw }, 0 },
6801 { "movs{lq|xd}", { Gv, Ed }, 0 },
c0f3af97
L
6802 },
6803
6804 /* X86_64_6D */
6805 {
bf890a93
IT
6806 { "ins{R|}", { Yzr, indirDX }, 0 },
6807 { "ins{G|}", { Yzr, indirDX }, 0 },
c0f3af97
L
6808 },
6809
6810 /* X86_64_6F */
6811 {
bf890a93
IT
6812 { "outs{R|}", { indirDXr, Xz }, 0 },
6813 { "outs{G|}", { indirDXr, Xz }, 0 },
c0f3af97
L
6814 },
6815
6816 /* X86_64_9A */
6817 {
bf890a93 6818 { "Jcall{T|}", { Ap }, 0 },
c0f3af97
L
6819 },
6820
6821 /* X86_64_C4 */
6822 {
6823 { MOD_TABLE (MOD_C4_32BIT) },
6824 { VEX_C4_TABLE (VEX_0F) },
6825 },
6826
6827 /* X86_64_C5 */
6828 {
6829 { MOD_TABLE (MOD_C5_32BIT) },
6830 { VEX_C5_TABLE (VEX_0F) },
6831 },
6832
6833 /* X86_64_CE */
6834 {
bf890a93 6835 { "into", { XX }, 0 },
c0f3af97
L
6836 },
6837
6838 /* X86_64_D4 */
6839 {
bf890a93 6840 { "aam", { Ib }, 0 },
c0f3af97
L
6841 },
6842
6843 /* X86_64_D5 */
6844 {
bf890a93 6845 { "aad", { Ib }, 0 },
c0f3af97
L
6846 },
6847
a72d2af2
L
6848 /* X86_64_E8 */
6849 {
6850 { "callP", { Jv, BND }, 0 },
5db04b09 6851 { "call@", { Jv, BND }, 0 }
a72d2af2
L
6852 },
6853
6854 /* X86_64_E9 */
6855 {
6856 { "jmpP", { Jv, BND }, 0 },
5db04b09 6857 { "jmp@", { Jv, BND }, 0 }
a72d2af2
L
6858 },
6859
c0f3af97
L
6860 /* X86_64_EA */
6861 {
bf890a93 6862 { "Jjmp{T|}", { Ap }, 0 },
c0f3af97
L
6863 },
6864
6865 /* X86_64_0F01_REG_0 */
6866 {
bf890a93
IT
6867 { "sgdt{Q|IQ}", { M }, 0 },
6868 { "sgdt", { M }, 0 },
c0f3af97
L
6869 },
6870
6871 /* X86_64_0F01_REG_1 */
6872 {
bf890a93
IT
6873 { "sidt{Q|IQ}", { M }, 0 },
6874 { "sidt", { M }, 0 },
c0f3af97
L
6875 },
6876
6877 /* X86_64_0F01_REG_2 */
6878 {
bf890a93
IT
6879 { "lgdt{Q|Q}", { M }, 0 },
6880 { "lgdt", { M }, 0 },
c0f3af97
L
6881 },
6882
6883 /* X86_64_0F01_REG_3 */
6884 {
bf890a93
IT
6885 { "lidt{Q|Q}", { M }, 0 },
6886 { "lidt", { M }, 0 },
c0f3af97
L
6887 },
6888};
6889
6890static const struct dis386 three_byte_table[][256] = {
c1e679ec
DR
6891
6892 /* THREE_BYTE_0F38 */
c0f3af97
L
6893 {
6894 /* 00 */
507bd325
L
6895 { "pshufb", { MX, EM }, PREFIX_OPCODE },
6896 { "phaddw", { MX, EM }, PREFIX_OPCODE },
6897 { "phaddd", { MX, EM }, PREFIX_OPCODE },
6898 { "phaddsw", { MX, EM }, PREFIX_OPCODE },
6899 { "pmaddubsw", { MX, EM }, PREFIX_OPCODE },
6900 { "phsubw", { MX, EM }, PREFIX_OPCODE },
6901 { "phsubd", { MX, EM }, PREFIX_OPCODE },
6902 { "phsubsw", { MX, EM }, PREFIX_OPCODE },
c0f3af97 6903 /* 08 */
507bd325
L
6904 { "psignb", { MX, EM }, PREFIX_OPCODE },
6905 { "psignw", { MX, EM }, PREFIX_OPCODE },
6906 { "psignd", { MX, EM }, PREFIX_OPCODE },
6907 { "pmulhrsw", { MX, EM }, PREFIX_OPCODE },
592d1631
L
6908 { Bad_Opcode },
6909 { Bad_Opcode },
6910 { Bad_Opcode },
6911 { Bad_Opcode },
f88c9eb0
SP
6912 /* 10 */
6913 { PREFIX_TABLE (PREFIX_0F3810) },
592d1631
L
6914 { Bad_Opcode },
6915 { Bad_Opcode },
6916 { Bad_Opcode },
f88c9eb0
SP
6917 { PREFIX_TABLE (PREFIX_0F3814) },
6918 { PREFIX_TABLE (PREFIX_0F3815) },
592d1631 6919 { Bad_Opcode },
f88c9eb0
SP
6920 { PREFIX_TABLE (PREFIX_0F3817) },
6921 /* 18 */
592d1631
L
6922 { Bad_Opcode },
6923 { Bad_Opcode },
6924 { Bad_Opcode },
6925 { Bad_Opcode },
507bd325
L
6926 { "pabsb", { MX, EM }, PREFIX_OPCODE },
6927 { "pabsw", { MX, EM }, PREFIX_OPCODE },
6928 { "pabsd", { MX, EM }, PREFIX_OPCODE },
592d1631 6929 { Bad_Opcode },
f88c9eb0
SP
6930 /* 20 */
6931 { PREFIX_TABLE (PREFIX_0F3820) },
6932 { PREFIX_TABLE (PREFIX_0F3821) },
6933 { PREFIX_TABLE (PREFIX_0F3822) },
6934 { PREFIX_TABLE (PREFIX_0F3823) },
6935 { PREFIX_TABLE (PREFIX_0F3824) },
6936 { PREFIX_TABLE (PREFIX_0F3825) },
592d1631
L
6937 { Bad_Opcode },
6938 { Bad_Opcode },
f88c9eb0
SP
6939 /* 28 */
6940 { PREFIX_TABLE (PREFIX_0F3828) },
6941 { PREFIX_TABLE (PREFIX_0F3829) },
6942 { PREFIX_TABLE (PREFIX_0F382A) },
6943 { PREFIX_TABLE (PREFIX_0F382B) },
592d1631
L
6944 { Bad_Opcode },
6945 { Bad_Opcode },
6946 { Bad_Opcode },
6947 { Bad_Opcode },
f88c9eb0
SP
6948 /* 30 */
6949 { PREFIX_TABLE (PREFIX_0F3830) },
6950 { PREFIX_TABLE (PREFIX_0F3831) },
6951 { PREFIX_TABLE (PREFIX_0F3832) },
6952 { PREFIX_TABLE (PREFIX_0F3833) },
6953 { PREFIX_TABLE (PREFIX_0F3834) },
6954 { PREFIX_TABLE (PREFIX_0F3835) },
592d1631 6955 { Bad_Opcode },
f88c9eb0
SP
6956 { PREFIX_TABLE (PREFIX_0F3837) },
6957 /* 38 */
6958 { PREFIX_TABLE (PREFIX_0F3838) },
6959 { PREFIX_TABLE (PREFIX_0F3839) },
6960 { PREFIX_TABLE (PREFIX_0F383A) },
6961 { PREFIX_TABLE (PREFIX_0F383B) },
6962 { PREFIX_TABLE (PREFIX_0F383C) },
6963 { PREFIX_TABLE (PREFIX_0F383D) },
6964 { PREFIX_TABLE (PREFIX_0F383E) },
6965 { PREFIX_TABLE (PREFIX_0F383F) },
6966 /* 40 */
6967 { PREFIX_TABLE (PREFIX_0F3840) },
6968 { PREFIX_TABLE (PREFIX_0F3841) },
592d1631
L
6969 { Bad_Opcode },
6970 { Bad_Opcode },
6971 { Bad_Opcode },
6972 { Bad_Opcode },
6973 { Bad_Opcode },
6974 { Bad_Opcode },
f88c9eb0 6975 /* 48 */
592d1631
L
6976 { Bad_Opcode },
6977 { Bad_Opcode },
6978 { Bad_Opcode },
6979 { Bad_Opcode },
6980 { Bad_Opcode },
6981 { Bad_Opcode },
6982 { Bad_Opcode },
6983 { Bad_Opcode },
f88c9eb0 6984 /* 50 */
592d1631
L
6985 { Bad_Opcode },
6986 { Bad_Opcode },
6987 { Bad_Opcode },
6988 { Bad_Opcode },
6989 { Bad_Opcode },
6990 { Bad_Opcode },
6991 { Bad_Opcode },
6992 { Bad_Opcode },
f88c9eb0 6993 /* 58 */
592d1631
L
6994 { Bad_Opcode },
6995 { Bad_Opcode },
6996 { Bad_Opcode },
6997 { Bad_Opcode },
6998 { Bad_Opcode },
6999 { Bad_Opcode },
7000 { Bad_Opcode },
7001 { Bad_Opcode },
f88c9eb0 7002 /* 60 */
592d1631
L
7003 { Bad_Opcode },
7004 { Bad_Opcode },
7005 { Bad_Opcode },
7006 { Bad_Opcode },
7007 { Bad_Opcode },
7008 { Bad_Opcode },
7009 { Bad_Opcode },
7010 { Bad_Opcode },
f88c9eb0 7011 /* 68 */
592d1631
L
7012 { Bad_Opcode },
7013 { Bad_Opcode },
7014 { Bad_Opcode },
7015 { Bad_Opcode },
7016 { Bad_Opcode },
7017 { Bad_Opcode },
7018 { Bad_Opcode },
7019 { Bad_Opcode },
f88c9eb0 7020 /* 70 */
592d1631
L
7021 { Bad_Opcode },
7022 { Bad_Opcode },
7023 { Bad_Opcode },
7024 { Bad_Opcode },
7025 { Bad_Opcode },
7026 { Bad_Opcode },
7027 { Bad_Opcode },
7028 { Bad_Opcode },
f88c9eb0 7029 /* 78 */
592d1631
L
7030 { Bad_Opcode },
7031 { Bad_Opcode },
7032 { Bad_Opcode },
7033 { Bad_Opcode },
7034 { Bad_Opcode },
7035 { Bad_Opcode },
7036 { Bad_Opcode },
7037 { Bad_Opcode },
f88c9eb0
SP
7038 /* 80 */
7039 { PREFIX_TABLE (PREFIX_0F3880) },
7040 { PREFIX_TABLE (PREFIX_0F3881) },
6c30d220 7041 { PREFIX_TABLE (PREFIX_0F3882) },
592d1631
L
7042 { Bad_Opcode },
7043 { Bad_Opcode },
7044 { Bad_Opcode },
7045 { Bad_Opcode },
7046 { Bad_Opcode },
f88c9eb0 7047 /* 88 */
592d1631
L
7048 { Bad_Opcode },
7049 { Bad_Opcode },
7050 { Bad_Opcode },
7051 { Bad_Opcode },
7052 { Bad_Opcode },
7053 { Bad_Opcode },
7054 { Bad_Opcode },
7055 { Bad_Opcode },
f88c9eb0 7056 /* 90 */
592d1631
L
7057 { Bad_Opcode },
7058 { Bad_Opcode },
7059 { Bad_Opcode },
7060 { Bad_Opcode },
7061 { Bad_Opcode },
7062 { Bad_Opcode },
7063 { Bad_Opcode },
7064 { Bad_Opcode },
f88c9eb0 7065 /* 98 */
592d1631
L
7066 { Bad_Opcode },
7067 { Bad_Opcode },
7068 { Bad_Opcode },
7069 { Bad_Opcode },
7070 { Bad_Opcode },
7071 { Bad_Opcode },
7072 { Bad_Opcode },
7073 { Bad_Opcode },
f88c9eb0 7074 /* a0 */
592d1631
L
7075 { Bad_Opcode },
7076 { Bad_Opcode },
7077 { Bad_Opcode },
7078 { Bad_Opcode },
7079 { Bad_Opcode },
7080 { Bad_Opcode },
7081 { Bad_Opcode },
7082 { Bad_Opcode },
f88c9eb0 7083 /* a8 */
592d1631
L
7084 { Bad_Opcode },
7085 { Bad_Opcode },
7086 { Bad_Opcode },
7087 { Bad_Opcode },
7088 { Bad_Opcode },
7089 { Bad_Opcode },
7090 { Bad_Opcode },
7091 { Bad_Opcode },
f88c9eb0 7092 /* b0 */
592d1631
L
7093 { Bad_Opcode },
7094 { Bad_Opcode },
7095 { Bad_Opcode },
7096 { Bad_Opcode },
7097 { Bad_Opcode },
7098 { Bad_Opcode },
7099 { Bad_Opcode },
7100 { Bad_Opcode },
f88c9eb0 7101 /* b8 */
592d1631
L
7102 { Bad_Opcode },
7103 { Bad_Opcode },
7104 { Bad_Opcode },
7105 { Bad_Opcode },
7106 { Bad_Opcode },
7107 { Bad_Opcode },
7108 { Bad_Opcode },
7109 { Bad_Opcode },
f88c9eb0 7110 /* c0 */
592d1631
L
7111 { Bad_Opcode },
7112 { Bad_Opcode },
7113 { Bad_Opcode },
7114 { Bad_Opcode },
7115 { Bad_Opcode },
7116 { Bad_Opcode },
7117 { Bad_Opcode },
7118 { Bad_Opcode },
f88c9eb0 7119 /* c8 */
a0046408
L
7120 { PREFIX_TABLE (PREFIX_0F38C8) },
7121 { PREFIX_TABLE (PREFIX_0F38C9) },
7122 { PREFIX_TABLE (PREFIX_0F38CA) },
7123 { PREFIX_TABLE (PREFIX_0F38CB) },
7124 { PREFIX_TABLE (PREFIX_0F38CC) },
7125 { PREFIX_TABLE (PREFIX_0F38CD) },
592d1631
L
7126 { Bad_Opcode },
7127 { Bad_Opcode },
f88c9eb0 7128 /* d0 */
592d1631
L
7129 { Bad_Opcode },
7130 { Bad_Opcode },
7131 { Bad_Opcode },
7132 { Bad_Opcode },
7133 { Bad_Opcode },
7134 { Bad_Opcode },
7135 { Bad_Opcode },
7136 { Bad_Opcode },
f88c9eb0 7137 /* d8 */
592d1631
L
7138 { Bad_Opcode },
7139 { Bad_Opcode },
7140 { Bad_Opcode },
f88c9eb0
SP
7141 { PREFIX_TABLE (PREFIX_0F38DB) },
7142 { PREFIX_TABLE (PREFIX_0F38DC) },
7143 { PREFIX_TABLE (PREFIX_0F38DD) },
7144 { PREFIX_TABLE (PREFIX_0F38DE) },
7145 { PREFIX_TABLE (PREFIX_0F38DF) },
7146 /* e0 */
592d1631
L
7147 { Bad_Opcode },
7148 { Bad_Opcode },
7149 { Bad_Opcode },
7150 { Bad_Opcode },
7151 { Bad_Opcode },
7152 { Bad_Opcode },
7153 { Bad_Opcode },
7154 { Bad_Opcode },
f88c9eb0 7155 /* e8 */
592d1631
L
7156 { Bad_Opcode },
7157 { Bad_Opcode },
7158 { Bad_Opcode },
7159 { Bad_Opcode },
7160 { Bad_Opcode },
7161 { Bad_Opcode },
7162 { Bad_Opcode },
7163 { Bad_Opcode },
f88c9eb0
SP
7164 /* f0 */
7165 { PREFIX_TABLE (PREFIX_0F38F0) },
7166 { PREFIX_TABLE (PREFIX_0F38F1) },
592d1631
L
7167 { Bad_Opcode },
7168 { Bad_Opcode },
7169 { Bad_Opcode },
7170 { Bad_Opcode },
e2e1fcde 7171 { PREFIX_TABLE (PREFIX_0F38F6) },
592d1631 7172 { Bad_Opcode },
f88c9eb0 7173 /* f8 */
592d1631
L
7174 { Bad_Opcode },
7175 { Bad_Opcode },
7176 { Bad_Opcode },
7177 { Bad_Opcode },
7178 { Bad_Opcode },
7179 { Bad_Opcode },
7180 { Bad_Opcode },
7181 { Bad_Opcode },
f88c9eb0
SP
7182 },
7183 /* THREE_BYTE_0F3A */
7184 {
7185 /* 00 */
592d1631
L
7186 { Bad_Opcode },
7187 { Bad_Opcode },
7188 { Bad_Opcode },
7189 { Bad_Opcode },
7190 { Bad_Opcode },
7191 { Bad_Opcode },
7192 { Bad_Opcode },
7193 { Bad_Opcode },
f88c9eb0
SP
7194 /* 08 */
7195 { PREFIX_TABLE (PREFIX_0F3A08) },
7196 { PREFIX_TABLE (PREFIX_0F3A09) },
7197 { PREFIX_TABLE (PREFIX_0F3A0A) },
7198 { PREFIX_TABLE (PREFIX_0F3A0B) },
7199 { PREFIX_TABLE (PREFIX_0F3A0C) },
7200 { PREFIX_TABLE (PREFIX_0F3A0D) },
7201 { PREFIX_TABLE (PREFIX_0F3A0E) },
507bd325 7202 { "palignr", { MX, EM, Ib }, PREFIX_OPCODE },
f88c9eb0 7203 /* 10 */
592d1631
L
7204 { Bad_Opcode },
7205 { Bad_Opcode },
7206 { Bad_Opcode },
7207 { Bad_Opcode },
f88c9eb0
SP
7208 { PREFIX_TABLE (PREFIX_0F3A14) },
7209 { PREFIX_TABLE (PREFIX_0F3A15) },
7210 { PREFIX_TABLE (PREFIX_0F3A16) },
7211 { PREFIX_TABLE (PREFIX_0F3A17) },
7212 /* 18 */
592d1631
L
7213 { Bad_Opcode },
7214 { Bad_Opcode },
7215 { Bad_Opcode },
7216 { Bad_Opcode },
7217 { Bad_Opcode },
7218 { Bad_Opcode },
7219 { Bad_Opcode },
7220 { Bad_Opcode },
f88c9eb0
SP
7221 /* 20 */
7222 { PREFIX_TABLE (PREFIX_0F3A20) },
7223 { PREFIX_TABLE (PREFIX_0F3A21) },
7224 { PREFIX_TABLE (PREFIX_0F3A22) },
592d1631
L
7225 { Bad_Opcode },
7226 { Bad_Opcode },
7227 { Bad_Opcode },
7228 { Bad_Opcode },
7229 { Bad_Opcode },
f88c9eb0 7230 /* 28 */
592d1631
L
7231 { Bad_Opcode },
7232 { Bad_Opcode },
7233 { Bad_Opcode },
7234 { Bad_Opcode },
7235 { Bad_Opcode },
7236 { Bad_Opcode },
7237 { Bad_Opcode },
7238 { Bad_Opcode },
f88c9eb0 7239 /* 30 */
592d1631
L
7240 { Bad_Opcode },
7241 { Bad_Opcode },
7242 { Bad_Opcode },
7243 { Bad_Opcode },
7244 { Bad_Opcode },
7245 { Bad_Opcode },
7246 { Bad_Opcode },
7247 { Bad_Opcode },
f88c9eb0 7248 /* 38 */
592d1631
L
7249 { Bad_Opcode },
7250 { Bad_Opcode },
7251 { Bad_Opcode },
7252 { Bad_Opcode },
7253 { Bad_Opcode },
7254 { Bad_Opcode },
7255 { Bad_Opcode },
7256 { Bad_Opcode },
f88c9eb0
SP
7257 /* 40 */
7258 { PREFIX_TABLE (PREFIX_0F3A40) },
7259 { PREFIX_TABLE (PREFIX_0F3A41) },
7260 { PREFIX_TABLE (PREFIX_0F3A42) },
592d1631 7261 { Bad_Opcode },
f88c9eb0 7262 { PREFIX_TABLE (PREFIX_0F3A44) },
592d1631
L
7263 { Bad_Opcode },
7264 { Bad_Opcode },
7265 { Bad_Opcode },
f88c9eb0 7266 /* 48 */
592d1631
L
7267 { Bad_Opcode },
7268 { Bad_Opcode },
7269 { Bad_Opcode },
7270 { Bad_Opcode },
7271 { Bad_Opcode },
7272 { Bad_Opcode },
7273 { Bad_Opcode },
7274 { Bad_Opcode },
f88c9eb0 7275 /* 50 */
592d1631
L
7276 { Bad_Opcode },
7277 { Bad_Opcode },
7278 { Bad_Opcode },
7279 { Bad_Opcode },
7280 { Bad_Opcode },
7281 { Bad_Opcode },
7282 { Bad_Opcode },
7283 { Bad_Opcode },
f88c9eb0 7284 /* 58 */
592d1631
L
7285 { Bad_Opcode },
7286 { Bad_Opcode },
7287 { Bad_Opcode },
7288 { Bad_Opcode },
7289 { Bad_Opcode },
7290 { Bad_Opcode },
7291 { Bad_Opcode },
7292 { Bad_Opcode },
f88c9eb0
SP
7293 /* 60 */
7294 { PREFIX_TABLE (PREFIX_0F3A60) },
7295 { PREFIX_TABLE (PREFIX_0F3A61) },
7296 { PREFIX_TABLE (PREFIX_0F3A62) },
7297 { PREFIX_TABLE (PREFIX_0F3A63) },
592d1631
L
7298 { Bad_Opcode },
7299 { Bad_Opcode },
7300 { Bad_Opcode },
7301 { Bad_Opcode },
f88c9eb0 7302 /* 68 */
592d1631
L
7303 { Bad_Opcode },
7304 { Bad_Opcode },
7305 { Bad_Opcode },
7306 { Bad_Opcode },
7307 { Bad_Opcode },
7308 { Bad_Opcode },
7309 { Bad_Opcode },
7310 { Bad_Opcode },
f88c9eb0 7311 /* 70 */
592d1631
L
7312 { Bad_Opcode },
7313 { Bad_Opcode },
7314 { Bad_Opcode },
7315 { Bad_Opcode },
7316 { Bad_Opcode },
7317 { Bad_Opcode },
7318 { Bad_Opcode },
7319 { Bad_Opcode },
f88c9eb0 7320 /* 78 */
592d1631
L
7321 { Bad_Opcode },
7322 { Bad_Opcode },
7323 { Bad_Opcode },
7324 { Bad_Opcode },
7325 { Bad_Opcode },
7326 { Bad_Opcode },
7327 { Bad_Opcode },
7328 { Bad_Opcode },
f88c9eb0 7329 /* 80 */
592d1631
L
7330 { Bad_Opcode },
7331 { Bad_Opcode },
7332 { Bad_Opcode },
7333 { Bad_Opcode },
7334 { Bad_Opcode },
7335 { Bad_Opcode },
7336 { Bad_Opcode },
7337 { Bad_Opcode },
f88c9eb0 7338 /* 88 */
592d1631
L
7339 { Bad_Opcode },
7340 { Bad_Opcode },
7341 { Bad_Opcode },
7342 { Bad_Opcode },
7343 { Bad_Opcode },
7344 { Bad_Opcode },
7345 { Bad_Opcode },
7346 { Bad_Opcode },
f88c9eb0 7347 /* 90 */
592d1631
L
7348 { Bad_Opcode },
7349 { Bad_Opcode },
7350 { Bad_Opcode },
7351 { Bad_Opcode },
7352 { Bad_Opcode },
7353 { Bad_Opcode },
7354 { Bad_Opcode },
7355 { Bad_Opcode },
f88c9eb0 7356 /* 98 */
592d1631
L
7357 { Bad_Opcode },
7358 { Bad_Opcode },
7359 { Bad_Opcode },
7360 { Bad_Opcode },
7361 { Bad_Opcode },
7362 { Bad_Opcode },
7363 { Bad_Opcode },
7364 { Bad_Opcode },
f88c9eb0 7365 /* a0 */
592d1631
L
7366 { Bad_Opcode },
7367 { Bad_Opcode },
7368 { Bad_Opcode },
7369 { Bad_Opcode },
7370 { Bad_Opcode },
7371 { Bad_Opcode },
7372 { Bad_Opcode },
7373 { Bad_Opcode },
f88c9eb0 7374 /* a8 */
592d1631
L
7375 { Bad_Opcode },
7376 { Bad_Opcode },
7377 { Bad_Opcode },
7378 { Bad_Opcode },
7379 { Bad_Opcode },
7380 { Bad_Opcode },
7381 { Bad_Opcode },
7382 { Bad_Opcode },
f88c9eb0 7383 /* b0 */
592d1631
L
7384 { Bad_Opcode },
7385 { Bad_Opcode },
7386 { Bad_Opcode },
7387 { Bad_Opcode },
7388 { Bad_Opcode },
7389 { Bad_Opcode },
7390 { Bad_Opcode },
7391 { Bad_Opcode },
f88c9eb0 7392 /* b8 */
592d1631
L
7393 { Bad_Opcode },
7394 { Bad_Opcode },
7395 { Bad_Opcode },
7396 { Bad_Opcode },
7397 { Bad_Opcode },
7398 { Bad_Opcode },
7399 { Bad_Opcode },
7400 { Bad_Opcode },
f88c9eb0 7401 /* c0 */
592d1631
L
7402 { Bad_Opcode },
7403 { Bad_Opcode },
7404 { Bad_Opcode },
7405 { Bad_Opcode },
7406 { Bad_Opcode },
7407 { Bad_Opcode },
7408 { Bad_Opcode },
7409 { Bad_Opcode },
f88c9eb0 7410 /* c8 */
592d1631
L
7411 { Bad_Opcode },
7412 { Bad_Opcode },
7413 { Bad_Opcode },
7414 { Bad_Opcode },
a0046408 7415 { PREFIX_TABLE (PREFIX_0F3ACC) },
592d1631
L
7416 { Bad_Opcode },
7417 { Bad_Opcode },
7418 { Bad_Opcode },
f88c9eb0 7419 /* d0 */
592d1631
L
7420 { Bad_Opcode },
7421 { Bad_Opcode },
7422 { Bad_Opcode },
7423 { Bad_Opcode },
7424 { Bad_Opcode },
7425 { Bad_Opcode },
7426 { Bad_Opcode },
7427 { Bad_Opcode },
f88c9eb0 7428 /* d8 */
592d1631
L
7429 { Bad_Opcode },
7430 { Bad_Opcode },
7431 { Bad_Opcode },
7432 { Bad_Opcode },
7433 { Bad_Opcode },
7434 { Bad_Opcode },
7435 { Bad_Opcode },
f88c9eb0
SP
7436 { PREFIX_TABLE (PREFIX_0F3ADF) },
7437 /* e0 */
592d1631
L
7438 { Bad_Opcode },
7439 { Bad_Opcode },
7440 { Bad_Opcode },
7441 { Bad_Opcode },
7442 { Bad_Opcode },
7443 { Bad_Opcode },
7444 { Bad_Opcode },
7445 { Bad_Opcode },
f88c9eb0 7446 /* e8 */
592d1631
L
7447 { Bad_Opcode },
7448 { Bad_Opcode },
7449 { Bad_Opcode },
7450 { Bad_Opcode },
7451 { Bad_Opcode },
7452 { Bad_Opcode },
7453 { Bad_Opcode },
7454 { Bad_Opcode },
f88c9eb0 7455 /* f0 */
592d1631
L
7456 { Bad_Opcode },
7457 { Bad_Opcode },
7458 { Bad_Opcode },
7459 { Bad_Opcode },
7460 { Bad_Opcode },
7461 { Bad_Opcode },
7462 { Bad_Opcode },
7463 { Bad_Opcode },
f88c9eb0 7464 /* f8 */
592d1631
L
7465 { Bad_Opcode },
7466 { Bad_Opcode },
7467 { Bad_Opcode },
7468 { Bad_Opcode },
7469 { Bad_Opcode },
7470 { Bad_Opcode },
7471 { Bad_Opcode },
7472 { Bad_Opcode },
f88c9eb0
SP
7473 },
7474
7475 /* THREE_BYTE_0F7A */
7476 {
7477 /* 00 */
592d1631
L
7478 { Bad_Opcode },
7479 { Bad_Opcode },
7480 { Bad_Opcode },
7481 { Bad_Opcode },
7482 { Bad_Opcode },
7483 { Bad_Opcode },
7484 { Bad_Opcode },
7485 { Bad_Opcode },
f88c9eb0 7486 /* 08 */
592d1631
L
7487 { Bad_Opcode },
7488 { Bad_Opcode },
7489 { Bad_Opcode },
7490 { Bad_Opcode },
7491 { Bad_Opcode },
7492 { Bad_Opcode },
7493 { Bad_Opcode },
7494 { Bad_Opcode },
f88c9eb0 7495 /* 10 */
592d1631
L
7496 { Bad_Opcode },
7497 { Bad_Opcode },
7498 { Bad_Opcode },
7499 { Bad_Opcode },
7500 { Bad_Opcode },
7501 { Bad_Opcode },
7502 { Bad_Opcode },
7503 { Bad_Opcode },
f88c9eb0 7504 /* 18 */
592d1631
L
7505 { Bad_Opcode },
7506 { Bad_Opcode },
7507 { Bad_Opcode },
7508 { Bad_Opcode },
7509 { Bad_Opcode },
7510 { Bad_Opcode },
7511 { Bad_Opcode },
7512 { Bad_Opcode },
f88c9eb0 7513 /* 20 */
507bd325 7514 { "ptest", { XX }, PREFIX_OPCODE },
592d1631
L
7515 { Bad_Opcode },
7516 { Bad_Opcode },
7517 { Bad_Opcode },
7518 { Bad_Opcode },
7519 { Bad_Opcode },
7520 { Bad_Opcode },
7521 { Bad_Opcode },
f88c9eb0 7522 /* 28 */
592d1631
L
7523 { Bad_Opcode },
7524 { Bad_Opcode },
7525 { Bad_Opcode },
7526 { Bad_Opcode },
7527 { Bad_Opcode },
7528 { Bad_Opcode },
7529 { Bad_Opcode },
7530 { Bad_Opcode },
f88c9eb0 7531 /* 30 */
592d1631
L
7532 { Bad_Opcode },
7533 { Bad_Opcode },
7534 { Bad_Opcode },
7535 { Bad_Opcode },
7536 { Bad_Opcode },
7537 { Bad_Opcode },
7538 { Bad_Opcode },
7539 { Bad_Opcode },
f88c9eb0 7540 /* 38 */
592d1631
L
7541 { Bad_Opcode },
7542 { Bad_Opcode },
7543 { Bad_Opcode },
7544 { Bad_Opcode },
7545 { Bad_Opcode },
7546 { Bad_Opcode },
7547 { Bad_Opcode },
7548 { Bad_Opcode },
f88c9eb0 7549 /* 40 */
592d1631 7550 { Bad_Opcode },
507bd325
L
7551 { "phaddbw", { XM, EXq }, PREFIX_OPCODE },
7552 { "phaddbd", { XM, EXq }, PREFIX_OPCODE },
7553 { "phaddbq", { XM, EXq }, PREFIX_OPCODE },
592d1631
L
7554 { Bad_Opcode },
7555 { Bad_Opcode },
507bd325
L
7556 { "phaddwd", { XM, EXq }, PREFIX_OPCODE },
7557 { "phaddwq", { XM, EXq }, PREFIX_OPCODE },
f88c9eb0 7558 /* 48 */
592d1631
L
7559 { Bad_Opcode },
7560 { Bad_Opcode },
7561 { Bad_Opcode },
507bd325 7562 { "phadddq", { XM, EXq }, PREFIX_OPCODE },
592d1631
L
7563 { Bad_Opcode },
7564 { Bad_Opcode },
7565 { Bad_Opcode },
7566 { Bad_Opcode },
f88c9eb0 7567 /* 50 */
592d1631 7568 { Bad_Opcode },
507bd325
L
7569 { "phaddubw", { XM, EXq }, PREFIX_OPCODE },
7570 { "phaddubd", { XM, EXq }, PREFIX_OPCODE },
7571 { "phaddubq", { XM, EXq }, PREFIX_OPCODE },
592d1631
L
7572 { Bad_Opcode },
7573 { Bad_Opcode },
507bd325
L
7574 { "phadduwd", { XM, EXq }, PREFIX_OPCODE },
7575 { "phadduwq", { XM, EXq }, PREFIX_OPCODE },
f88c9eb0 7576 /* 58 */
592d1631
L
7577 { Bad_Opcode },
7578 { Bad_Opcode },
7579 { Bad_Opcode },
507bd325 7580 { "phaddudq", { XM, EXq }, PREFIX_OPCODE },
592d1631
L
7581 { Bad_Opcode },
7582 { Bad_Opcode },
7583 { Bad_Opcode },
7584 { Bad_Opcode },
f88c9eb0 7585 /* 60 */
592d1631 7586 { Bad_Opcode },
507bd325
L
7587 { "phsubbw", { XM, EXq }, PREFIX_OPCODE },
7588 { "phsubbd", { XM, EXq }, PREFIX_OPCODE },
7589 { "phsubbq", { XM, EXq }, PREFIX_OPCODE },
592d1631
L
7590 { Bad_Opcode },
7591 { Bad_Opcode },
7592 { Bad_Opcode },
7593 { Bad_Opcode },
4e7d34a6 7594 /* 68 */
592d1631
L
7595 { Bad_Opcode },
7596 { Bad_Opcode },
7597 { Bad_Opcode },
7598 { Bad_Opcode },
7599 { Bad_Opcode },
7600 { Bad_Opcode },
7601 { Bad_Opcode },
7602 { Bad_Opcode },
85f10a01 7603 /* 70 */
592d1631
L
7604 { Bad_Opcode },
7605 { Bad_Opcode },
7606 { Bad_Opcode },
7607 { Bad_Opcode },
7608 { Bad_Opcode },
7609 { Bad_Opcode },
7610 { Bad_Opcode },
7611 { Bad_Opcode },
85f10a01 7612 /* 78 */
592d1631
L
7613 { Bad_Opcode },
7614 { Bad_Opcode },
7615 { Bad_Opcode },
7616 { Bad_Opcode },
7617 { Bad_Opcode },
7618 { Bad_Opcode },
7619 { Bad_Opcode },
7620 { Bad_Opcode },
85f10a01 7621 /* 80 */
592d1631
L
7622 { Bad_Opcode },
7623 { Bad_Opcode },
7624 { Bad_Opcode },
7625 { Bad_Opcode },
7626 { Bad_Opcode },
7627 { Bad_Opcode },
7628 { Bad_Opcode },
7629 { Bad_Opcode },
85f10a01 7630 /* 88 */
592d1631
L
7631 { Bad_Opcode },
7632 { Bad_Opcode },
7633 { Bad_Opcode },
7634 { Bad_Opcode },
7635 { Bad_Opcode },
7636 { Bad_Opcode },
7637 { Bad_Opcode },
7638 { Bad_Opcode },
85f10a01 7639 /* 90 */
592d1631
L
7640 { Bad_Opcode },
7641 { Bad_Opcode },
7642 { Bad_Opcode },
7643 { Bad_Opcode },
7644 { Bad_Opcode },
7645 { Bad_Opcode },
7646 { Bad_Opcode },
7647 { Bad_Opcode },
85f10a01 7648 /* 98 */
592d1631
L
7649 { Bad_Opcode },
7650 { Bad_Opcode },
7651 { Bad_Opcode },
7652 { Bad_Opcode },
7653 { Bad_Opcode },
7654 { Bad_Opcode },
7655 { Bad_Opcode },
7656 { Bad_Opcode },
85f10a01 7657 /* a0 */
592d1631
L
7658 { Bad_Opcode },
7659 { Bad_Opcode },
7660 { Bad_Opcode },
7661 { Bad_Opcode },
7662 { Bad_Opcode },
7663 { Bad_Opcode },
7664 { Bad_Opcode },
7665 { Bad_Opcode },
85f10a01 7666 /* a8 */
592d1631
L
7667 { Bad_Opcode },
7668 { Bad_Opcode },
7669 { Bad_Opcode },
7670 { Bad_Opcode },
7671 { Bad_Opcode },
7672 { Bad_Opcode },
7673 { Bad_Opcode },
7674 { Bad_Opcode },
85f10a01 7675 /* b0 */
592d1631
L
7676 { Bad_Opcode },
7677 { Bad_Opcode },
7678 { Bad_Opcode },
7679 { Bad_Opcode },
7680 { Bad_Opcode },
7681 { Bad_Opcode },
7682 { Bad_Opcode },
7683 { Bad_Opcode },
85f10a01 7684 /* b8 */
592d1631
L
7685 { Bad_Opcode },
7686 { Bad_Opcode },
7687 { Bad_Opcode },
7688 { Bad_Opcode },
7689 { Bad_Opcode },
7690 { Bad_Opcode },
7691 { Bad_Opcode },
7692 { Bad_Opcode },
85f10a01 7693 /* c0 */
592d1631
L
7694 { Bad_Opcode },
7695 { Bad_Opcode },
7696 { Bad_Opcode },
7697 { Bad_Opcode },
7698 { Bad_Opcode },
7699 { Bad_Opcode },
7700 { Bad_Opcode },
7701 { Bad_Opcode },
85f10a01 7702 /* c8 */
592d1631
L
7703 { Bad_Opcode },
7704 { Bad_Opcode },
7705 { Bad_Opcode },
7706 { Bad_Opcode },
7707 { Bad_Opcode },
7708 { Bad_Opcode },
7709 { Bad_Opcode },
7710 { Bad_Opcode },
85f10a01 7711 /* d0 */
592d1631
L
7712 { Bad_Opcode },
7713 { Bad_Opcode },
7714 { Bad_Opcode },
7715 { Bad_Opcode },
7716 { Bad_Opcode },
7717 { Bad_Opcode },
7718 { Bad_Opcode },
7719 { Bad_Opcode },
85f10a01 7720 /* d8 */
592d1631
L
7721 { Bad_Opcode },
7722 { Bad_Opcode },
7723 { Bad_Opcode },
7724 { Bad_Opcode },
7725 { Bad_Opcode },
7726 { Bad_Opcode },
7727 { Bad_Opcode },
7728 { Bad_Opcode },
85f10a01 7729 /* e0 */
592d1631
L
7730 { Bad_Opcode },
7731 { Bad_Opcode },
7732 { Bad_Opcode },
7733 { Bad_Opcode },
7734 { Bad_Opcode },
7735 { Bad_Opcode },
7736 { Bad_Opcode },
7737 { Bad_Opcode },
85f10a01 7738 /* e8 */
592d1631
L
7739 { Bad_Opcode },
7740 { Bad_Opcode },
7741 { Bad_Opcode },
7742 { Bad_Opcode },
7743 { Bad_Opcode },
7744 { Bad_Opcode },
7745 { Bad_Opcode },
7746 { Bad_Opcode },
85f10a01 7747 /* f0 */
592d1631
L
7748 { Bad_Opcode },
7749 { Bad_Opcode },
7750 { Bad_Opcode },
7751 { Bad_Opcode },
7752 { Bad_Opcode },
7753 { Bad_Opcode },
7754 { Bad_Opcode },
7755 { Bad_Opcode },
85f10a01 7756 /* f8 */
592d1631
L
7757 { Bad_Opcode },
7758 { Bad_Opcode },
7759 { Bad_Opcode },
7760 { Bad_Opcode },
7761 { Bad_Opcode },
7762 { Bad_Opcode },
7763 { Bad_Opcode },
7764 { Bad_Opcode },
85f10a01 7765 },
f88c9eb0
SP
7766};
7767
7768static const struct dis386 xop_table[][256] = {
5dd85c99 7769 /* XOP_08 */
85f10a01
MM
7770 {
7771 /* 00 */
592d1631
L
7772 { Bad_Opcode },
7773 { Bad_Opcode },
7774 { Bad_Opcode },
7775 { Bad_Opcode },
7776 { Bad_Opcode },
7777 { Bad_Opcode },
7778 { Bad_Opcode },
7779 { Bad_Opcode },
85f10a01 7780 /* 08 */
592d1631
L
7781 { Bad_Opcode },
7782 { Bad_Opcode },
7783 { Bad_Opcode },
7784 { Bad_Opcode },
7785 { Bad_Opcode },
7786 { Bad_Opcode },
7787 { Bad_Opcode },
7788 { Bad_Opcode },
85f10a01 7789 /* 10 */
3929df09 7790 { Bad_Opcode },
592d1631
L
7791 { Bad_Opcode },
7792 { Bad_Opcode },
7793 { Bad_Opcode },
7794 { Bad_Opcode },
7795 { Bad_Opcode },
7796 { Bad_Opcode },
7797 { Bad_Opcode },
85f10a01 7798 /* 18 */
592d1631
L
7799 { Bad_Opcode },
7800 { Bad_Opcode },
7801 { Bad_Opcode },
7802 { Bad_Opcode },
7803 { Bad_Opcode },
7804 { Bad_Opcode },
7805 { Bad_Opcode },
7806 { Bad_Opcode },
85f10a01 7807 /* 20 */
592d1631
L
7808 { Bad_Opcode },
7809 { Bad_Opcode },
7810 { Bad_Opcode },
7811 { Bad_Opcode },
7812 { Bad_Opcode },
7813 { Bad_Opcode },
7814 { Bad_Opcode },
7815 { Bad_Opcode },
85f10a01 7816 /* 28 */
592d1631
L
7817 { Bad_Opcode },
7818 { Bad_Opcode },
7819 { Bad_Opcode },
7820 { Bad_Opcode },
7821 { Bad_Opcode },
7822 { Bad_Opcode },
7823 { Bad_Opcode },
7824 { Bad_Opcode },
c0f3af97 7825 /* 30 */
592d1631
L
7826 { Bad_Opcode },
7827 { Bad_Opcode },
7828 { Bad_Opcode },
7829 { Bad_Opcode },
7830 { Bad_Opcode },
7831 { Bad_Opcode },
7832 { Bad_Opcode },
7833 { Bad_Opcode },
c0f3af97 7834 /* 38 */
592d1631
L
7835 { Bad_Opcode },
7836 { Bad_Opcode },
7837 { Bad_Opcode },
7838 { Bad_Opcode },
7839 { Bad_Opcode },
7840 { Bad_Opcode },
7841 { Bad_Opcode },
7842 { Bad_Opcode },
c0f3af97 7843 /* 40 */
592d1631
L
7844 { Bad_Opcode },
7845 { Bad_Opcode },
7846 { Bad_Opcode },
7847 { Bad_Opcode },
7848 { Bad_Opcode },
7849 { Bad_Opcode },
7850 { Bad_Opcode },
7851 { Bad_Opcode },
85f10a01 7852 /* 48 */
592d1631
L
7853 { Bad_Opcode },
7854 { Bad_Opcode },
7855 { Bad_Opcode },
7856 { Bad_Opcode },
7857 { Bad_Opcode },
7858 { Bad_Opcode },
7859 { Bad_Opcode },
7860 { Bad_Opcode },
c0f3af97 7861 /* 50 */
592d1631
L
7862 { Bad_Opcode },
7863 { Bad_Opcode },
7864 { Bad_Opcode },
7865 { Bad_Opcode },
7866 { Bad_Opcode },
7867 { Bad_Opcode },
7868 { Bad_Opcode },
7869 { Bad_Opcode },
85f10a01 7870 /* 58 */
592d1631
L
7871 { Bad_Opcode },
7872 { Bad_Opcode },
7873 { Bad_Opcode },
7874 { Bad_Opcode },
7875 { Bad_Opcode },
7876 { Bad_Opcode },
7877 { Bad_Opcode },
7878 { Bad_Opcode },
c1e679ec 7879 /* 60 */
592d1631
L
7880 { Bad_Opcode },
7881 { Bad_Opcode },
7882 { Bad_Opcode },
7883 { Bad_Opcode },
7884 { Bad_Opcode },
7885 { Bad_Opcode },
7886 { Bad_Opcode },
7887 { Bad_Opcode },
c0f3af97 7888 /* 68 */
592d1631
L
7889 { Bad_Opcode },
7890 { Bad_Opcode },
7891 { Bad_Opcode },
7892 { Bad_Opcode },
7893 { Bad_Opcode },
7894 { Bad_Opcode },
7895 { Bad_Opcode },
7896 { Bad_Opcode },
85f10a01 7897 /* 70 */
592d1631
L
7898 { Bad_Opcode },
7899 { Bad_Opcode },
7900 { Bad_Opcode },
7901 { Bad_Opcode },
7902 { Bad_Opcode },
7903 { Bad_Opcode },
7904 { Bad_Opcode },
7905 { Bad_Opcode },
85f10a01 7906 /* 78 */
592d1631
L
7907 { Bad_Opcode },
7908 { Bad_Opcode },
7909 { Bad_Opcode },
7910 { Bad_Opcode },
7911 { Bad_Opcode },
7912 { Bad_Opcode },
7913 { Bad_Opcode },
7914 { Bad_Opcode },
85f10a01 7915 /* 80 */
592d1631
L
7916 { Bad_Opcode },
7917 { Bad_Opcode },
7918 { Bad_Opcode },
7919 { Bad_Opcode },
7920 { Bad_Opcode },
bf890a93
IT
7921 { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7922 { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7923 { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
5dd85c99 7924 /* 88 */
592d1631
L
7925 { Bad_Opcode },
7926 { Bad_Opcode },
7927 { Bad_Opcode },
7928 { Bad_Opcode },
7929 { Bad_Opcode },
7930 { Bad_Opcode },
bf890a93
IT
7931 { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7932 { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
5dd85c99 7933 /* 90 */
592d1631
L
7934 { Bad_Opcode },
7935 { Bad_Opcode },
7936 { Bad_Opcode },
7937 { Bad_Opcode },
7938 { Bad_Opcode },
bf890a93
IT
7939 { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7940 { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7941 { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
5dd85c99 7942 /* 98 */
592d1631
L
7943 { Bad_Opcode },
7944 { Bad_Opcode },
7945 { Bad_Opcode },
7946 { Bad_Opcode },
7947 { Bad_Opcode },
7948 { Bad_Opcode },
bf890a93
IT
7949 { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7950 { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
5dd85c99 7951 /* a0 */
592d1631
L
7952 { Bad_Opcode },
7953 { Bad_Opcode },
bf890a93
IT
7954 { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7955 { "vpperm", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
592d1631
L
7956 { Bad_Opcode },
7957 { Bad_Opcode },
bf890a93 7958 { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
592d1631 7959 { Bad_Opcode },
5dd85c99 7960 /* a8 */
592d1631
L
7961 { Bad_Opcode },
7962 { Bad_Opcode },
7963 { Bad_Opcode },
7964 { Bad_Opcode },
7965 { Bad_Opcode },
7966 { Bad_Opcode },
7967 { Bad_Opcode },
7968 { Bad_Opcode },
5dd85c99 7969 /* b0 */
592d1631
L
7970 { Bad_Opcode },
7971 { Bad_Opcode },
7972 { Bad_Opcode },
7973 { Bad_Opcode },
7974 { Bad_Opcode },
7975 { Bad_Opcode },
bf890a93 7976 { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
592d1631 7977 { Bad_Opcode },
5dd85c99 7978 /* b8 */
592d1631
L
7979 { Bad_Opcode },
7980 { Bad_Opcode },
7981 { Bad_Opcode },
7982 { Bad_Opcode },
7983 { Bad_Opcode },
7984 { Bad_Opcode },
7985 { Bad_Opcode },
7986 { Bad_Opcode },
5dd85c99 7987 /* c0 */
bf890a93
IT
7988 { "vprotb", { XM, Vex_2src_1, Ib }, 0 },
7989 { "vprotw", { XM, Vex_2src_1, Ib }, 0 },
7990 { "vprotd", { XM, Vex_2src_1, Ib }, 0 },
7991 { "vprotq", { XM, Vex_2src_1, Ib }, 0 },
592d1631
L
7992 { Bad_Opcode },
7993 { Bad_Opcode },
7994 { Bad_Opcode },
7995 { Bad_Opcode },
5dd85c99 7996 /* c8 */
592d1631
L
7997 { Bad_Opcode },
7998 { Bad_Opcode },
7999 { Bad_Opcode },
8000 { Bad_Opcode },
ff688e1f
L
8001 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CC) },
8002 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CD) },
8003 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CE) },
8004 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CF) },
5dd85c99 8005 /* d0 */
592d1631
L
8006 { Bad_Opcode },
8007 { Bad_Opcode },
8008 { Bad_Opcode },
8009 { Bad_Opcode },
8010 { Bad_Opcode },
8011 { Bad_Opcode },
8012 { Bad_Opcode },
8013 { Bad_Opcode },
5dd85c99 8014 /* d8 */
592d1631
L
8015 { Bad_Opcode },
8016 { Bad_Opcode },
8017 { Bad_Opcode },
8018 { Bad_Opcode },
8019 { Bad_Opcode },
8020 { Bad_Opcode },
8021 { Bad_Opcode },
8022 { Bad_Opcode },
5dd85c99 8023 /* e0 */
592d1631
L
8024 { Bad_Opcode },
8025 { Bad_Opcode },
8026 { Bad_Opcode },
8027 { Bad_Opcode },
8028 { Bad_Opcode },
8029 { Bad_Opcode },
8030 { Bad_Opcode },
8031 { Bad_Opcode },
5dd85c99 8032 /* e8 */
592d1631
L
8033 { Bad_Opcode },
8034 { Bad_Opcode },
8035 { Bad_Opcode },
8036 { Bad_Opcode },
ff688e1f
L
8037 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EC) },
8038 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_ED) },
8039 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EE) },
8040 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EF) },
5dd85c99 8041 /* f0 */
592d1631
L
8042 { Bad_Opcode },
8043 { Bad_Opcode },
8044 { Bad_Opcode },
8045 { Bad_Opcode },
8046 { Bad_Opcode },
8047 { Bad_Opcode },
8048 { Bad_Opcode },
8049 { Bad_Opcode },
5dd85c99 8050 /* f8 */
592d1631
L
8051 { Bad_Opcode },
8052 { Bad_Opcode },
8053 { Bad_Opcode },
8054 { Bad_Opcode },
8055 { Bad_Opcode },
8056 { Bad_Opcode },
8057 { Bad_Opcode },
8058 { Bad_Opcode },
5dd85c99
SP
8059 },
8060 /* XOP_09 */
8061 {
8062 /* 00 */
592d1631 8063 { Bad_Opcode },
2a2a0f38
QN
8064 { REG_TABLE (REG_XOP_TBM_01) },
8065 { REG_TABLE (REG_XOP_TBM_02) },
592d1631
L
8066 { Bad_Opcode },
8067 { Bad_Opcode },
8068 { Bad_Opcode },
8069 { Bad_Opcode },
8070 { Bad_Opcode },
5dd85c99 8071 /* 08 */
592d1631
L
8072 { Bad_Opcode },
8073 { Bad_Opcode },
8074 { Bad_Opcode },
8075 { Bad_Opcode },
8076 { Bad_Opcode },
8077 { Bad_Opcode },
8078 { Bad_Opcode },
8079 { Bad_Opcode },
5dd85c99 8080 /* 10 */
592d1631
L
8081 { Bad_Opcode },
8082 { Bad_Opcode },
5dd85c99 8083 { REG_TABLE (REG_XOP_LWPCB) },
592d1631
L
8084 { Bad_Opcode },
8085 { Bad_Opcode },
8086 { Bad_Opcode },
8087 { Bad_Opcode },
8088 { Bad_Opcode },
5dd85c99 8089 /* 18 */
592d1631
L
8090 { Bad_Opcode },
8091 { Bad_Opcode },
8092 { Bad_Opcode },
8093 { Bad_Opcode },
8094 { Bad_Opcode },
8095 { Bad_Opcode },
8096 { Bad_Opcode },
8097 { Bad_Opcode },
5dd85c99 8098 /* 20 */
592d1631
L
8099 { Bad_Opcode },
8100 { Bad_Opcode },
8101 { Bad_Opcode },
8102 { Bad_Opcode },
8103 { Bad_Opcode },
8104 { Bad_Opcode },
8105 { Bad_Opcode },
8106 { Bad_Opcode },
5dd85c99 8107 /* 28 */
592d1631
L
8108 { Bad_Opcode },
8109 { Bad_Opcode },
8110 { Bad_Opcode },
8111 { Bad_Opcode },
8112 { Bad_Opcode },
8113 { Bad_Opcode },
8114 { Bad_Opcode },
8115 { Bad_Opcode },
5dd85c99 8116 /* 30 */
592d1631
L
8117 { Bad_Opcode },
8118 { Bad_Opcode },
8119 { Bad_Opcode },
8120 { Bad_Opcode },
8121 { Bad_Opcode },
8122 { Bad_Opcode },
8123 { Bad_Opcode },
8124 { Bad_Opcode },
5dd85c99 8125 /* 38 */
592d1631
L
8126 { Bad_Opcode },
8127 { Bad_Opcode },
8128 { Bad_Opcode },
8129 { Bad_Opcode },
8130 { Bad_Opcode },
8131 { Bad_Opcode },
8132 { Bad_Opcode },
8133 { Bad_Opcode },
5dd85c99 8134 /* 40 */
592d1631
L
8135 { Bad_Opcode },
8136 { Bad_Opcode },
8137 { Bad_Opcode },
8138 { Bad_Opcode },
8139 { Bad_Opcode },
8140 { Bad_Opcode },
8141 { Bad_Opcode },
8142 { Bad_Opcode },
5dd85c99 8143 /* 48 */
592d1631
L
8144 { Bad_Opcode },
8145 { Bad_Opcode },
8146 { Bad_Opcode },
8147 { Bad_Opcode },
8148 { Bad_Opcode },
8149 { Bad_Opcode },
8150 { Bad_Opcode },
8151 { Bad_Opcode },
5dd85c99 8152 /* 50 */
592d1631
L
8153 { Bad_Opcode },
8154 { Bad_Opcode },
8155 { Bad_Opcode },
8156 { Bad_Opcode },
8157 { Bad_Opcode },
8158 { Bad_Opcode },
8159 { Bad_Opcode },
8160 { Bad_Opcode },
5dd85c99 8161 /* 58 */
592d1631
L
8162 { Bad_Opcode },
8163 { Bad_Opcode },
8164 { Bad_Opcode },
8165 { Bad_Opcode },
8166 { Bad_Opcode },
8167 { Bad_Opcode },
8168 { Bad_Opcode },
8169 { Bad_Opcode },
5dd85c99 8170 /* 60 */
592d1631
L
8171 { Bad_Opcode },
8172 { Bad_Opcode },
8173 { Bad_Opcode },
8174 { Bad_Opcode },
8175 { Bad_Opcode },
8176 { Bad_Opcode },
8177 { Bad_Opcode },
8178 { Bad_Opcode },
5dd85c99 8179 /* 68 */
592d1631
L
8180 { Bad_Opcode },
8181 { Bad_Opcode },
8182 { Bad_Opcode },
8183 { Bad_Opcode },
8184 { Bad_Opcode },
8185 { Bad_Opcode },
8186 { Bad_Opcode },
8187 { Bad_Opcode },
5dd85c99 8188 /* 70 */
592d1631
L
8189 { Bad_Opcode },
8190 { Bad_Opcode },
8191 { Bad_Opcode },
8192 { Bad_Opcode },
8193 { Bad_Opcode },
8194 { Bad_Opcode },
8195 { Bad_Opcode },
8196 { Bad_Opcode },
5dd85c99 8197 /* 78 */
592d1631
L
8198 { Bad_Opcode },
8199 { Bad_Opcode },
8200 { Bad_Opcode },
8201 { Bad_Opcode },
8202 { Bad_Opcode },
8203 { Bad_Opcode },
8204 { Bad_Opcode },
8205 { Bad_Opcode },
5dd85c99 8206 /* 80 */
592a252b
L
8207 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80) },
8208 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81) },
bf890a93
IT
8209 { "vfrczss", { XM, EXd }, 0 },
8210 { "vfrczsd", { XM, EXq }, 0 },
592d1631
L
8211 { Bad_Opcode },
8212 { Bad_Opcode },
8213 { Bad_Opcode },
8214 { Bad_Opcode },
5dd85c99 8215 /* 88 */
592d1631
L
8216 { Bad_Opcode },
8217 { Bad_Opcode },
8218 { Bad_Opcode },
8219 { Bad_Opcode },
8220 { Bad_Opcode },
8221 { Bad_Opcode },
8222 { Bad_Opcode },
8223 { Bad_Opcode },
5dd85c99 8224 /* 90 */
bf890a93
IT
8225 { "vprotb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8226 { "vprotw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8227 { "vprotd", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8228 { "vprotq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8229 { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8230 { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8231 { "vpshld", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8232 { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
5dd85c99 8233 /* 98 */
bf890a93
IT
8234 { "vpshab", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8235 { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8236 { "vpshad", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8237 { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
592d1631
L
8238 { Bad_Opcode },
8239 { Bad_Opcode },
8240 { Bad_Opcode },
8241 { Bad_Opcode },
5dd85c99 8242 /* a0 */
592d1631
L
8243 { Bad_Opcode },
8244 { Bad_Opcode },
8245 { Bad_Opcode },
8246 { Bad_Opcode },
8247 { Bad_Opcode },
8248 { Bad_Opcode },
8249 { Bad_Opcode },
8250 { Bad_Opcode },
5dd85c99 8251 /* a8 */
592d1631
L
8252 { Bad_Opcode },
8253 { Bad_Opcode },
8254 { Bad_Opcode },
8255 { Bad_Opcode },
8256 { Bad_Opcode },
8257 { Bad_Opcode },
8258 { Bad_Opcode },
8259 { Bad_Opcode },
5dd85c99 8260 /* b0 */
592d1631
L
8261 { Bad_Opcode },
8262 { Bad_Opcode },
8263 { Bad_Opcode },
8264 { Bad_Opcode },
8265 { Bad_Opcode },
8266 { Bad_Opcode },
8267 { Bad_Opcode },
8268 { Bad_Opcode },
5dd85c99 8269 /* b8 */
592d1631
L
8270 { Bad_Opcode },
8271 { Bad_Opcode },
8272 { Bad_Opcode },
8273 { Bad_Opcode },
8274 { Bad_Opcode },
8275 { Bad_Opcode },
8276 { Bad_Opcode },
8277 { Bad_Opcode },
5dd85c99 8278 /* c0 */
592d1631 8279 { Bad_Opcode },
bf890a93
IT
8280 { "vphaddbw", { XM, EXxmm }, 0 },
8281 { "vphaddbd", { XM, EXxmm }, 0 },
8282 { "vphaddbq", { XM, EXxmm }, 0 },
592d1631
L
8283 { Bad_Opcode },
8284 { Bad_Opcode },
bf890a93
IT
8285 { "vphaddwd", { XM, EXxmm }, 0 },
8286 { "vphaddwq", { XM, EXxmm }, 0 },
5dd85c99 8287 /* c8 */
592d1631
L
8288 { Bad_Opcode },
8289 { Bad_Opcode },
8290 { Bad_Opcode },
bf890a93 8291 { "vphadddq", { XM, EXxmm }, 0 },
592d1631
L
8292 { Bad_Opcode },
8293 { Bad_Opcode },
8294 { Bad_Opcode },
8295 { Bad_Opcode },
5dd85c99 8296 /* d0 */
592d1631 8297 { Bad_Opcode },
bf890a93
IT
8298 { "vphaddubw", { XM, EXxmm }, 0 },
8299 { "vphaddubd", { XM, EXxmm }, 0 },
8300 { "vphaddubq", { XM, EXxmm }, 0 },
592d1631
L
8301 { Bad_Opcode },
8302 { Bad_Opcode },
bf890a93
IT
8303 { "vphadduwd", { XM, EXxmm }, 0 },
8304 { "vphadduwq", { XM, EXxmm }, 0 },
5dd85c99 8305 /* d8 */
592d1631
L
8306 { Bad_Opcode },
8307 { Bad_Opcode },
8308 { Bad_Opcode },
bf890a93 8309 { "vphaddudq", { XM, EXxmm }, 0 },
592d1631
L
8310 { Bad_Opcode },
8311 { Bad_Opcode },
8312 { Bad_Opcode },
8313 { Bad_Opcode },
5dd85c99 8314 /* e0 */
592d1631 8315 { Bad_Opcode },
bf890a93
IT
8316 { "vphsubbw", { XM, EXxmm }, 0 },
8317 { "vphsubwd", { XM, EXxmm }, 0 },
8318 { "vphsubdq", { XM, EXxmm }, 0 },
592d1631
L
8319 { Bad_Opcode },
8320 { Bad_Opcode },
8321 { Bad_Opcode },
8322 { Bad_Opcode },
4e7d34a6 8323 /* e8 */
592d1631
L
8324 { Bad_Opcode },
8325 { Bad_Opcode },
8326 { Bad_Opcode },
8327 { Bad_Opcode },
8328 { Bad_Opcode },
8329 { Bad_Opcode },
8330 { Bad_Opcode },
8331 { Bad_Opcode },
4e7d34a6 8332 /* f0 */
592d1631
L
8333 { Bad_Opcode },
8334 { Bad_Opcode },
8335 { Bad_Opcode },
8336 { Bad_Opcode },
8337 { Bad_Opcode },
8338 { Bad_Opcode },
8339 { Bad_Opcode },
8340 { Bad_Opcode },
4e7d34a6 8341 /* f8 */
592d1631
L
8342 { Bad_Opcode },
8343 { Bad_Opcode },
8344 { Bad_Opcode },
8345 { Bad_Opcode },
8346 { Bad_Opcode },
8347 { Bad_Opcode },
8348 { Bad_Opcode },
8349 { Bad_Opcode },
4e7d34a6 8350 },
f88c9eb0 8351 /* XOP_0A */
4e7d34a6
L
8352 {
8353 /* 00 */
592d1631
L
8354 { Bad_Opcode },
8355 { Bad_Opcode },
8356 { Bad_Opcode },
8357 { Bad_Opcode },
8358 { Bad_Opcode },
8359 { Bad_Opcode },
8360 { Bad_Opcode },
8361 { Bad_Opcode },
4e7d34a6 8362 /* 08 */
592d1631
L
8363 { Bad_Opcode },
8364 { Bad_Opcode },
8365 { Bad_Opcode },
8366 { Bad_Opcode },
8367 { Bad_Opcode },
8368 { Bad_Opcode },
8369 { Bad_Opcode },
8370 { Bad_Opcode },
4e7d34a6 8371 /* 10 */
bf890a93 8372 { "bextr", { Gv, Ev, Iq }, 0 },
592d1631 8373 { Bad_Opcode },
f88c9eb0 8374 { REG_TABLE (REG_XOP_LWP) },
592d1631
L
8375 { Bad_Opcode },
8376 { Bad_Opcode },
8377 { Bad_Opcode },
8378 { Bad_Opcode },
8379 { Bad_Opcode },
4e7d34a6 8380 /* 18 */
592d1631
L
8381 { Bad_Opcode },
8382 { Bad_Opcode },
8383 { Bad_Opcode },
8384 { Bad_Opcode },
8385 { Bad_Opcode },
8386 { Bad_Opcode },
8387 { Bad_Opcode },
8388 { Bad_Opcode },
4e7d34a6 8389 /* 20 */
592d1631
L
8390 { Bad_Opcode },
8391 { Bad_Opcode },
8392 { Bad_Opcode },
8393 { Bad_Opcode },
8394 { Bad_Opcode },
8395 { Bad_Opcode },
8396 { Bad_Opcode },
8397 { Bad_Opcode },
4e7d34a6 8398 /* 28 */
592d1631
L
8399 { Bad_Opcode },
8400 { Bad_Opcode },
8401 { Bad_Opcode },
8402 { Bad_Opcode },
8403 { Bad_Opcode },
8404 { Bad_Opcode },
8405 { Bad_Opcode },
8406 { Bad_Opcode },
4e7d34a6 8407 /* 30 */
592d1631
L
8408 { Bad_Opcode },
8409 { Bad_Opcode },
8410 { Bad_Opcode },
8411 { Bad_Opcode },
8412 { Bad_Opcode },
8413 { Bad_Opcode },
8414 { Bad_Opcode },
8415 { Bad_Opcode },
c0f3af97 8416 /* 38 */
592d1631
L
8417 { Bad_Opcode },
8418 { Bad_Opcode },
8419 { Bad_Opcode },
8420 { Bad_Opcode },
8421 { Bad_Opcode },
8422 { Bad_Opcode },
8423 { Bad_Opcode },
8424 { Bad_Opcode },
c0f3af97 8425 /* 40 */
592d1631
L
8426 { Bad_Opcode },
8427 { Bad_Opcode },
8428 { Bad_Opcode },
8429 { Bad_Opcode },
8430 { Bad_Opcode },
8431 { Bad_Opcode },
8432 { Bad_Opcode },
8433 { Bad_Opcode },
c1e679ec 8434 /* 48 */
592d1631
L
8435 { Bad_Opcode },
8436 { Bad_Opcode },
8437 { Bad_Opcode },
8438 { Bad_Opcode },
8439 { Bad_Opcode },
8440 { Bad_Opcode },
8441 { Bad_Opcode },
8442 { Bad_Opcode },
c1e679ec 8443 /* 50 */
592d1631
L
8444 { Bad_Opcode },
8445 { Bad_Opcode },
8446 { Bad_Opcode },
8447 { Bad_Opcode },
8448 { Bad_Opcode },
8449 { Bad_Opcode },
8450 { Bad_Opcode },
8451 { Bad_Opcode },
4e7d34a6 8452 /* 58 */
592d1631
L
8453 { Bad_Opcode },
8454 { Bad_Opcode },
8455 { Bad_Opcode },
8456 { Bad_Opcode },
8457 { Bad_Opcode },
8458 { Bad_Opcode },
8459 { Bad_Opcode },
8460 { Bad_Opcode },
4e7d34a6 8461 /* 60 */
592d1631
L
8462 { Bad_Opcode },
8463 { Bad_Opcode },
8464 { Bad_Opcode },
8465 { Bad_Opcode },
8466 { Bad_Opcode },
8467 { Bad_Opcode },
8468 { Bad_Opcode },
8469 { Bad_Opcode },
4e7d34a6 8470 /* 68 */
592d1631
L
8471 { Bad_Opcode },
8472 { Bad_Opcode },
8473 { Bad_Opcode },
8474 { Bad_Opcode },
8475 { Bad_Opcode },
8476 { Bad_Opcode },
8477 { Bad_Opcode },
8478 { Bad_Opcode },
4e7d34a6 8479 /* 70 */
592d1631
L
8480 { Bad_Opcode },
8481 { Bad_Opcode },
8482 { Bad_Opcode },
8483 { Bad_Opcode },
8484 { Bad_Opcode },
8485 { Bad_Opcode },
8486 { Bad_Opcode },
8487 { Bad_Opcode },
4e7d34a6 8488 /* 78 */
592d1631
L
8489 { Bad_Opcode },
8490 { Bad_Opcode },
8491 { Bad_Opcode },
8492 { Bad_Opcode },
8493 { Bad_Opcode },
8494 { Bad_Opcode },
8495 { Bad_Opcode },
8496 { Bad_Opcode },
4e7d34a6 8497 /* 80 */
592d1631
L
8498 { Bad_Opcode },
8499 { Bad_Opcode },
8500 { Bad_Opcode },
8501 { Bad_Opcode },
8502 { Bad_Opcode },
8503 { Bad_Opcode },
8504 { Bad_Opcode },
8505 { Bad_Opcode },
4e7d34a6 8506 /* 88 */
592d1631
L
8507 { Bad_Opcode },
8508 { Bad_Opcode },
8509 { Bad_Opcode },
8510 { Bad_Opcode },
8511 { Bad_Opcode },
8512 { Bad_Opcode },
8513 { Bad_Opcode },
8514 { Bad_Opcode },
4e7d34a6 8515 /* 90 */
592d1631
L
8516 { Bad_Opcode },
8517 { Bad_Opcode },
8518 { Bad_Opcode },
8519 { Bad_Opcode },
8520 { Bad_Opcode },
8521 { Bad_Opcode },
8522 { Bad_Opcode },
8523 { Bad_Opcode },
4e7d34a6 8524 /* 98 */
592d1631
L
8525 { Bad_Opcode },
8526 { Bad_Opcode },
8527 { Bad_Opcode },
8528 { Bad_Opcode },
8529 { Bad_Opcode },
8530 { Bad_Opcode },
8531 { Bad_Opcode },
8532 { Bad_Opcode },
4e7d34a6 8533 /* a0 */
592d1631
L
8534 { Bad_Opcode },
8535 { Bad_Opcode },
8536 { Bad_Opcode },
8537 { Bad_Opcode },
8538 { Bad_Opcode },
8539 { Bad_Opcode },
8540 { Bad_Opcode },
8541 { Bad_Opcode },
4e7d34a6 8542 /* a8 */
592d1631
L
8543 { Bad_Opcode },
8544 { Bad_Opcode },
8545 { Bad_Opcode },
8546 { Bad_Opcode },
8547 { Bad_Opcode },
8548 { Bad_Opcode },
8549 { Bad_Opcode },
8550 { Bad_Opcode },
d5d7db8e 8551 /* b0 */
592d1631
L
8552 { Bad_Opcode },
8553 { Bad_Opcode },
8554 { Bad_Opcode },
8555 { Bad_Opcode },
8556 { Bad_Opcode },
8557 { Bad_Opcode },
8558 { Bad_Opcode },
8559 { Bad_Opcode },
85f10a01 8560 /* b8 */
592d1631
L
8561 { Bad_Opcode },
8562 { Bad_Opcode },
8563 { Bad_Opcode },
8564 { Bad_Opcode },
8565 { Bad_Opcode },
8566 { Bad_Opcode },
8567 { Bad_Opcode },
8568 { Bad_Opcode },
85f10a01 8569 /* c0 */
592d1631
L
8570 { Bad_Opcode },
8571 { Bad_Opcode },
8572 { Bad_Opcode },
8573 { Bad_Opcode },
8574 { Bad_Opcode },
8575 { Bad_Opcode },
8576 { Bad_Opcode },
8577 { Bad_Opcode },
85f10a01 8578 /* c8 */
592d1631
L
8579 { Bad_Opcode },
8580 { Bad_Opcode },
8581 { Bad_Opcode },
8582 { Bad_Opcode },
8583 { Bad_Opcode },
8584 { Bad_Opcode },
8585 { Bad_Opcode },
8586 { Bad_Opcode },
85f10a01 8587 /* d0 */
592d1631
L
8588 { Bad_Opcode },
8589 { Bad_Opcode },
8590 { Bad_Opcode },
8591 { Bad_Opcode },
8592 { Bad_Opcode },
8593 { Bad_Opcode },
8594 { Bad_Opcode },
8595 { Bad_Opcode },
85f10a01 8596 /* d8 */
592d1631
L
8597 { Bad_Opcode },
8598 { Bad_Opcode },
8599 { Bad_Opcode },
8600 { Bad_Opcode },
8601 { Bad_Opcode },
8602 { Bad_Opcode },
8603 { Bad_Opcode },
8604 { Bad_Opcode },
85f10a01 8605 /* e0 */
592d1631
L
8606 { Bad_Opcode },
8607 { Bad_Opcode },
8608 { Bad_Opcode },
8609 { Bad_Opcode },
8610 { Bad_Opcode },
8611 { Bad_Opcode },
8612 { Bad_Opcode },
8613 { Bad_Opcode },
85f10a01 8614 /* e8 */
592d1631
L
8615 { Bad_Opcode },
8616 { Bad_Opcode },
8617 { Bad_Opcode },
8618 { Bad_Opcode },
8619 { Bad_Opcode },
8620 { Bad_Opcode },
8621 { Bad_Opcode },
8622 { Bad_Opcode },
85f10a01 8623 /* f0 */
592d1631
L
8624 { Bad_Opcode },
8625 { Bad_Opcode },
8626 { Bad_Opcode },
8627 { Bad_Opcode },
8628 { Bad_Opcode },
8629 { Bad_Opcode },
8630 { Bad_Opcode },
8631 { Bad_Opcode },
85f10a01 8632 /* f8 */
592d1631
L
8633 { Bad_Opcode },
8634 { Bad_Opcode },
8635 { Bad_Opcode },
8636 { Bad_Opcode },
8637 { Bad_Opcode },
8638 { Bad_Opcode },
8639 { Bad_Opcode },
8640 { Bad_Opcode },
85f10a01 8641 },
c0f3af97
L
8642};
8643
8644static const struct dis386 vex_table[][256] = {
8645 /* VEX_0F */
85f10a01
MM
8646 {
8647 /* 00 */
592d1631
L
8648 { Bad_Opcode },
8649 { Bad_Opcode },
8650 { Bad_Opcode },
8651 { Bad_Opcode },
8652 { Bad_Opcode },
8653 { Bad_Opcode },
8654 { Bad_Opcode },
8655 { Bad_Opcode },
85f10a01 8656 /* 08 */
592d1631
L
8657 { Bad_Opcode },
8658 { Bad_Opcode },
8659 { Bad_Opcode },
8660 { Bad_Opcode },
8661 { Bad_Opcode },
8662 { Bad_Opcode },
8663 { Bad_Opcode },
8664 { Bad_Opcode },
c0f3af97 8665 /* 10 */
592a252b
L
8666 { PREFIX_TABLE (PREFIX_VEX_0F10) },
8667 { PREFIX_TABLE (PREFIX_VEX_0F11) },
8668 { PREFIX_TABLE (PREFIX_VEX_0F12) },
8669 { MOD_TABLE (MOD_VEX_0F13) },
8670 { VEX_W_TABLE (VEX_W_0F14) },
8671 { VEX_W_TABLE (VEX_W_0F15) },
8672 { PREFIX_TABLE (PREFIX_VEX_0F16) },
8673 { MOD_TABLE (MOD_VEX_0F17) },
c0f3af97 8674 /* 18 */
592d1631
L
8675 { Bad_Opcode },
8676 { Bad_Opcode },
8677 { Bad_Opcode },
8678 { Bad_Opcode },
8679 { Bad_Opcode },
8680 { Bad_Opcode },
8681 { Bad_Opcode },
8682 { Bad_Opcode },
c0f3af97 8683 /* 20 */
592d1631
L
8684 { Bad_Opcode },
8685 { Bad_Opcode },
8686 { Bad_Opcode },
8687 { Bad_Opcode },
8688 { Bad_Opcode },
8689 { Bad_Opcode },
8690 { Bad_Opcode },
8691 { Bad_Opcode },
c0f3af97 8692 /* 28 */
592a252b
L
8693 { VEX_W_TABLE (VEX_W_0F28) },
8694 { VEX_W_TABLE (VEX_W_0F29) },
8695 { PREFIX_TABLE (PREFIX_VEX_0F2A) },
8696 { MOD_TABLE (MOD_VEX_0F2B) },
8697 { PREFIX_TABLE (PREFIX_VEX_0F2C) },
8698 { PREFIX_TABLE (PREFIX_VEX_0F2D) },
8699 { PREFIX_TABLE (PREFIX_VEX_0F2E) },
8700 { PREFIX_TABLE (PREFIX_VEX_0F2F) },
85f10a01 8701 /* 30 */
592d1631
L
8702 { Bad_Opcode },
8703 { Bad_Opcode },
8704 { Bad_Opcode },
8705 { Bad_Opcode },
8706 { Bad_Opcode },
8707 { Bad_Opcode },
8708 { Bad_Opcode },
8709 { Bad_Opcode },
4e7d34a6 8710 /* 38 */
592d1631
L
8711 { Bad_Opcode },
8712 { Bad_Opcode },
8713 { Bad_Opcode },
8714 { Bad_Opcode },
8715 { Bad_Opcode },
8716 { Bad_Opcode },
8717 { Bad_Opcode },
8718 { Bad_Opcode },
d5d7db8e 8719 /* 40 */
592d1631 8720 { Bad_Opcode },
43234a1e
L
8721 { PREFIX_TABLE (PREFIX_VEX_0F41) },
8722 { PREFIX_TABLE (PREFIX_VEX_0F42) },
592d1631 8723 { Bad_Opcode },
43234a1e
L
8724 { PREFIX_TABLE (PREFIX_VEX_0F44) },
8725 { PREFIX_TABLE (PREFIX_VEX_0F45) },
8726 { PREFIX_TABLE (PREFIX_VEX_0F46) },
8727 { PREFIX_TABLE (PREFIX_VEX_0F47) },
85f10a01 8728 /* 48 */
592d1631
L
8729 { Bad_Opcode },
8730 { Bad_Opcode },
1ba585e8 8731 { PREFIX_TABLE (PREFIX_VEX_0F4A) },
43234a1e 8732 { PREFIX_TABLE (PREFIX_VEX_0F4B) },
592d1631
L
8733 { Bad_Opcode },
8734 { Bad_Opcode },
8735 { Bad_Opcode },
8736 { Bad_Opcode },
d5d7db8e 8737 /* 50 */
592a252b
L
8738 { MOD_TABLE (MOD_VEX_0F50) },
8739 { PREFIX_TABLE (PREFIX_VEX_0F51) },
8740 { PREFIX_TABLE (PREFIX_VEX_0F52) },
8741 { PREFIX_TABLE (PREFIX_VEX_0F53) },
bf890a93
IT
8742 { "vandpX", { XM, Vex, EXx }, 0 },
8743 { "vandnpX", { XM, Vex, EXx }, 0 },
8744 { "vorpX", { XM, Vex, EXx }, 0 },
8745 { "vxorpX", { XM, Vex, EXx }, 0 },
c0f3af97 8746 /* 58 */
592a252b
L
8747 { PREFIX_TABLE (PREFIX_VEX_0F58) },
8748 { PREFIX_TABLE (PREFIX_VEX_0F59) },
8749 { PREFIX_TABLE (PREFIX_VEX_0F5A) },
8750 { PREFIX_TABLE (PREFIX_VEX_0F5B) },
8751 { PREFIX_TABLE (PREFIX_VEX_0F5C) },
8752 { PREFIX_TABLE (PREFIX_VEX_0F5D) },
8753 { PREFIX_TABLE (PREFIX_VEX_0F5E) },
8754 { PREFIX_TABLE (PREFIX_VEX_0F5F) },
c0f3af97 8755 /* 60 */
592a252b
L
8756 { PREFIX_TABLE (PREFIX_VEX_0F60) },
8757 { PREFIX_TABLE (PREFIX_VEX_0F61) },
8758 { PREFIX_TABLE (PREFIX_VEX_0F62) },
8759 { PREFIX_TABLE (PREFIX_VEX_0F63) },
8760 { PREFIX_TABLE (PREFIX_VEX_0F64) },
8761 { PREFIX_TABLE (PREFIX_VEX_0F65) },
8762 { PREFIX_TABLE (PREFIX_VEX_0F66) },
8763 { PREFIX_TABLE (PREFIX_VEX_0F67) },
c0f3af97 8764 /* 68 */
592a252b
L
8765 { PREFIX_TABLE (PREFIX_VEX_0F68) },
8766 { PREFIX_TABLE (PREFIX_VEX_0F69) },
8767 { PREFIX_TABLE (PREFIX_VEX_0F6A) },
8768 { PREFIX_TABLE (PREFIX_VEX_0F6B) },
8769 { PREFIX_TABLE (PREFIX_VEX_0F6C) },
8770 { PREFIX_TABLE (PREFIX_VEX_0F6D) },
8771 { PREFIX_TABLE (PREFIX_VEX_0F6E) },
8772 { PREFIX_TABLE (PREFIX_VEX_0F6F) },
c0f3af97 8773 /* 70 */
592a252b
L
8774 { PREFIX_TABLE (PREFIX_VEX_0F70) },
8775 { REG_TABLE (REG_VEX_0F71) },
8776 { REG_TABLE (REG_VEX_0F72) },
8777 { REG_TABLE (REG_VEX_0F73) },
8778 { PREFIX_TABLE (PREFIX_VEX_0F74) },
8779 { PREFIX_TABLE (PREFIX_VEX_0F75) },
8780 { PREFIX_TABLE (PREFIX_VEX_0F76) },
8781 { PREFIX_TABLE (PREFIX_VEX_0F77) },
c0f3af97 8782 /* 78 */
592d1631
L
8783 { Bad_Opcode },
8784 { Bad_Opcode },
8785 { Bad_Opcode },
8786 { Bad_Opcode },
592a252b
L
8787 { PREFIX_TABLE (PREFIX_VEX_0F7C) },
8788 { PREFIX_TABLE (PREFIX_VEX_0F7D) },
8789 { PREFIX_TABLE (PREFIX_VEX_0F7E) },
8790 { PREFIX_TABLE (PREFIX_VEX_0F7F) },
c0f3af97 8791 /* 80 */
592d1631
L
8792 { Bad_Opcode },
8793 { Bad_Opcode },
8794 { Bad_Opcode },
8795 { Bad_Opcode },
8796 { Bad_Opcode },
8797 { Bad_Opcode },
8798 { Bad_Opcode },
8799 { Bad_Opcode },
c0f3af97 8800 /* 88 */
592d1631
L
8801 { Bad_Opcode },
8802 { Bad_Opcode },
8803 { Bad_Opcode },
8804 { Bad_Opcode },
8805 { Bad_Opcode },
8806 { Bad_Opcode },
8807 { Bad_Opcode },
8808 { Bad_Opcode },
c0f3af97 8809 /* 90 */
43234a1e
L
8810 { PREFIX_TABLE (PREFIX_VEX_0F90) },
8811 { PREFIX_TABLE (PREFIX_VEX_0F91) },
8812 { PREFIX_TABLE (PREFIX_VEX_0F92) },
8813 { PREFIX_TABLE (PREFIX_VEX_0F93) },
592d1631
L
8814 { Bad_Opcode },
8815 { Bad_Opcode },
8816 { Bad_Opcode },
8817 { Bad_Opcode },
c0f3af97 8818 /* 98 */
43234a1e 8819 { PREFIX_TABLE (PREFIX_VEX_0F98) },
1ba585e8 8820 { PREFIX_TABLE (PREFIX_VEX_0F99) },
592d1631
L
8821 { Bad_Opcode },
8822 { Bad_Opcode },
8823 { Bad_Opcode },
8824 { Bad_Opcode },
8825 { Bad_Opcode },
8826 { Bad_Opcode },
c0f3af97 8827 /* a0 */
592d1631
L
8828 { Bad_Opcode },
8829 { Bad_Opcode },
8830 { Bad_Opcode },
8831 { Bad_Opcode },
8832 { Bad_Opcode },
8833 { Bad_Opcode },
8834 { Bad_Opcode },
8835 { Bad_Opcode },
c0f3af97 8836 /* a8 */
592d1631
L
8837 { Bad_Opcode },
8838 { Bad_Opcode },
8839 { Bad_Opcode },
8840 { Bad_Opcode },
8841 { Bad_Opcode },
8842 { Bad_Opcode },
592a252b 8843 { REG_TABLE (REG_VEX_0FAE) },
592d1631 8844 { Bad_Opcode },
c0f3af97 8845 /* b0 */
592d1631
L
8846 { Bad_Opcode },
8847 { Bad_Opcode },
8848 { Bad_Opcode },
8849 { Bad_Opcode },
8850 { Bad_Opcode },
8851 { Bad_Opcode },
8852 { Bad_Opcode },
8853 { Bad_Opcode },
c0f3af97 8854 /* b8 */
592d1631
L
8855 { Bad_Opcode },
8856 { Bad_Opcode },
8857 { Bad_Opcode },
8858 { Bad_Opcode },
8859 { Bad_Opcode },
8860 { Bad_Opcode },
8861 { Bad_Opcode },
8862 { Bad_Opcode },
c0f3af97 8863 /* c0 */
592d1631
L
8864 { Bad_Opcode },
8865 { Bad_Opcode },
592a252b 8866 { PREFIX_TABLE (PREFIX_VEX_0FC2) },
592d1631 8867 { Bad_Opcode },
592a252b
L
8868 { PREFIX_TABLE (PREFIX_VEX_0FC4) },
8869 { PREFIX_TABLE (PREFIX_VEX_0FC5) },
bf890a93 8870 { "vshufpX", { XM, Vex, EXx, Ib }, 0 },
592d1631 8871 { Bad_Opcode },
c0f3af97 8872 /* c8 */
592d1631
L
8873 { Bad_Opcode },
8874 { Bad_Opcode },
8875 { Bad_Opcode },
8876 { Bad_Opcode },
8877 { Bad_Opcode },
8878 { Bad_Opcode },
8879 { Bad_Opcode },
8880 { Bad_Opcode },
c0f3af97 8881 /* d0 */
592a252b
L
8882 { PREFIX_TABLE (PREFIX_VEX_0FD0) },
8883 { PREFIX_TABLE (PREFIX_VEX_0FD1) },
8884 { PREFIX_TABLE (PREFIX_VEX_0FD2) },
8885 { PREFIX_TABLE (PREFIX_VEX_0FD3) },
8886 { PREFIX_TABLE (PREFIX_VEX_0FD4) },
8887 { PREFIX_TABLE (PREFIX_VEX_0FD5) },
8888 { PREFIX_TABLE (PREFIX_VEX_0FD6) },
8889 { PREFIX_TABLE (PREFIX_VEX_0FD7) },
c0f3af97 8890 /* d8 */
592a252b
L
8891 { PREFIX_TABLE (PREFIX_VEX_0FD8) },
8892 { PREFIX_TABLE (PREFIX_VEX_0FD9) },
8893 { PREFIX_TABLE (PREFIX_VEX_0FDA) },
8894 { PREFIX_TABLE (PREFIX_VEX_0FDB) },
8895 { PREFIX_TABLE (PREFIX_VEX_0FDC) },
8896 { PREFIX_TABLE (PREFIX_VEX_0FDD) },
8897 { PREFIX_TABLE (PREFIX_VEX_0FDE) },
8898 { PREFIX_TABLE (PREFIX_VEX_0FDF) },
c0f3af97 8899 /* e0 */
592a252b
L
8900 { PREFIX_TABLE (PREFIX_VEX_0FE0) },
8901 { PREFIX_TABLE (PREFIX_VEX_0FE1) },
8902 { PREFIX_TABLE (PREFIX_VEX_0FE2) },
8903 { PREFIX_TABLE (PREFIX_VEX_0FE3) },
8904 { PREFIX_TABLE (PREFIX_VEX_0FE4) },
8905 { PREFIX_TABLE (PREFIX_VEX_0FE5) },
8906 { PREFIX_TABLE (PREFIX_VEX_0FE6) },
8907 { PREFIX_TABLE (PREFIX_VEX_0FE7) },
c0f3af97 8908 /* e8 */
592a252b
L
8909 { PREFIX_TABLE (PREFIX_VEX_0FE8) },
8910 { PREFIX_TABLE (PREFIX_VEX_0FE9) },
8911 { PREFIX_TABLE (PREFIX_VEX_0FEA) },
8912 { PREFIX_TABLE (PREFIX_VEX_0FEB) },
8913 { PREFIX_TABLE (PREFIX_VEX_0FEC) },
8914 { PREFIX_TABLE (PREFIX_VEX_0FED) },
8915 { PREFIX_TABLE (PREFIX_VEX_0FEE) },
8916 { PREFIX_TABLE (PREFIX_VEX_0FEF) },
c0f3af97 8917 /* f0 */
592a252b
L
8918 { PREFIX_TABLE (PREFIX_VEX_0FF0) },
8919 { PREFIX_TABLE (PREFIX_VEX_0FF1) },
8920 { PREFIX_TABLE (PREFIX_VEX_0FF2) },
8921 { PREFIX_TABLE (PREFIX_VEX_0FF3) },
8922 { PREFIX_TABLE (PREFIX_VEX_0FF4) },
8923 { PREFIX_TABLE (PREFIX_VEX_0FF5) },
8924 { PREFIX_TABLE (PREFIX_VEX_0FF6) },
8925 { PREFIX_TABLE (PREFIX_VEX_0FF7) },
c0f3af97 8926 /* f8 */
592a252b
L
8927 { PREFIX_TABLE (PREFIX_VEX_0FF8) },
8928 { PREFIX_TABLE (PREFIX_VEX_0FF9) },
8929 { PREFIX_TABLE (PREFIX_VEX_0FFA) },
8930 { PREFIX_TABLE (PREFIX_VEX_0FFB) },
8931 { PREFIX_TABLE (PREFIX_VEX_0FFC) },
8932 { PREFIX_TABLE (PREFIX_VEX_0FFD) },
8933 { PREFIX_TABLE (PREFIX_VEX_0FFE) },
592d1631 8934 { Bad_Opcode },
c0f3af97
L
8935 },
8936 /* VEX_0F38 */
8937 {
8938 /* 00 */
592a252b
L
8939 { PREFIX_TABLE (PREFIX_VEX_0F3800) },
8940 { PREFIX_TABLE (PREFIX_VEX_0F3801) },
8941 { PREFIX_TABLE (PREFIX_VEX_0F3802) },
8942 { PREFIX_TABLE (PREFIX_VEX_0F3803) },
8943 { PREFIX_TABLE (PREFIX_VEX_0F3804) },
8944 { PREFIX_TABLE (PREFIX_VEX_0F3805) },
8945 { PREFIX_TABLE (PREFIX_VEX_0F3806) },
8946 { PREFIX_TABLE (PREFIX_VEX_0F3807) },
c0f3af97 8947 /* 08 */
592a252b
L
8948 { PREFIX_TABLE (PREFIX_VEX_0F3808) },
8949 { PREFIX_TABLE (PREFIX_VEX_0F3809) },
8950 { PREFIX_TABLE (PREFIX_VEX_0F380A) },
8951 { PREFIX_TABLE (PREFIX_VEX_0F380B) },
8952 { PREFIX_TABLE (PREFIX_VEX_0F380C) },
8953 { PREFIX_TABLE (PREFIX_VEX_0F380D) },
8954 { PREFIX_TABLE (PREFIX_VEX_0F380E) },
8955 { PREFIX_TABLE (PREFIX_VEX_0F380F) },
c0f3af97 8956 /* 10 */
592d1631
L
8957 { Bad_Opcode },
8958 { Bad_Opcode },
8959 { Bad_Opcode },
592a252b 8960 { PREFIX_TABLE (PREFIX_VEX_0F3813) },
592d1631
L
8961 { Bad_Opcode },
8962 { Bad_Opcode },
6c30d220 8963 { PREFIX_TABLE (PREFIX_VEX_0F3816) },
592a252b 8964 { PREFIX_TABLE (PREFIX_VEX_0F3817) },
c0f3af97 8965 /* 18 */
592a252b
L
8966 { PREFIX_TABLE (PREFIX_VEX_0F3818) },
8967 { PREFIX_TABLE (PREFIX_VEX_0F3819) },
8968 { PREFIX_TABLE (PREFIX_VEX_0F381A) },
592d1631 8969 { Bad_Opcode },
592a252b
L
8970 { PREFIX_TABLE (PREFIX_VEX_0F381C) },
8971 { PREFIX_TABLE (PREFIX_VEX_0F381D) },
8972 { PREFIX_TABLE (PREFIX_VEX_0F381E) },
592d1631 8973 { Bad_Opcode },
c0f3af97 8974 /* 20 */
592a252b
L
8975 { PREFIX_TABLE (PREFIX_VEX_0F3820) },
8976 { PREFIX_TABLE (PREFIX_VEX_0F3821) },
8977 { PREFIX_TABLE (PREFIX_VEX_0F3822) },
8978 { PREFIX_TABLE (PREFIX_VEX_0F3823) },
8979 { PREFIX_TABLE (PREFIX_VEX_0F3824) },
8980 { PREFIX_TABLE (PREFIX_VEX_0F3825) },
592d1631
L
8981 { Bad_Opcode },
8982 { Bad_Opcode },
c0f3af97 8983 /* 28 */
592a252b
L
8984 { PREFIX_TABLE (PREFIX_VEX_0F3828) },
8985 { PREFIX_TABLE (PREFIX_VEX_0F3829) },
8986 { PREFIX_TABLE (PREFIX_VEX_0F382A) },
8987 { PREFIX_TABLE (PREFIX_VEX_0F382B) },
8988 { PREFIX_TABLE (PREFIX_VEX_0F382C) },
8989 { PREFIX_TABLE (PREFIX_VEX_0F382D) },
8990 { PREFIX_TABLE (PREFIX_VEX_0F382E) },
8991 { PREFIX_TABLE (PREFIX_VEX_0F382F) },
c0f3af97 8992 /* 30 */
592a252b
L
8993 { PREFIX_TABLE (PREFIX_VEX_0F3830) },
8994 { PREFIX_TABLE (PREFIX_VEX_0F3831) },
8995 { PREFIX_TABLE (PREFIX_VEX_0F3832) },
8996 { PREFIX_TABLE (PREFIX_VEX_0F3833) },
8997 { PREFIX_TABLE (PREFIX_VEX_0F3834) },
8998 { PREFIX_TABLE (PREFIX_VEX_0F3835) },
6c30d220 8999 { PREFIX_TABLE (PREFIX_VEX_0F3836) },
592a252b 9000 { PREFIX_TABLE (PREFIX_VEX_0F3837) },
c0f3af97 9001 /* 38 */
592a252b
L
9002 { PREFIX_TABLE (PREFIX_VEX_0F3838) },
9003 { PREFIX_TABLE (PREFIX_VEX_0F3839) },
9004 { PREFIX_TABLE (PREFIX_VEX_0F383A) },
9005 { PREFIX_TABLE (PREFIX_VEX_0F383B) },
9006 { PREFIX_TABLE (PREFIX_VEX_0F383C) },
9007 { PREFIX_TABLE (PREFIX_VEX_0F383D) },
9008 { PREFIX_TABLE (PREFIX_VEX_0F383E) },
9009 { PREFIX_TABLE (PREFIX_VEX_0F383F) },
c0f3af97 9010 /* 40 */
592a252b
L
9011 { PREFIX_TABLE (PREFIX_VEX_0F3840) },
9012 { PREFIX_TABLE (PREFIX_VEX_0F3841) },
592d1631
L
9013 { Bad_Opcode },
9014 { Bad_Opcode },
9015 { Bad_Opcode },
6c30d220
L
9016 { PREFIX_TABLE (PREFIX_VEX_0F3845) },
9017 { PREFIX_TABLE (PREFIX_VEX_0F3846) },
9018 { PREFIX_TABLE (PREFIX_VEX_0F3847) },
c0f3af97 9019 /* 48 */
592d1631
L
9020 { Bad_Opcode },
9021 { Bad_Opcode },
9022 { Bad_Opcode },
9023 { Bad_Opcode },
9024 { Bad_Opcode },
9025 { Bad_Opcode },
9026 { Bad_Opcode },
9027 { Bad_Opcode },
c0f3af97 9028 /* 50 */
592d1631
L
9029 { Bad_Opcode },
9030 { Bad_Opcode },
9031 { Bad_Opcode },
9032 { Bad_Opcode },
9033 { Bad_Opcode },
9034 { Bad_Opcode },
9035 { Bad_Opcode },
9036 { Bad_Opcode },
c0f3af97 9037 /* 58 */
6c30d220
L
9038 { PREFIX_TABLE (PREFIX_VEX_0F3858) },
9039 { PREFIX_TABLE (PREFIX_VEX_0F3859) },
9040 { PREFIX_TABLE (PREFIX_VEX_0F385A) },
592d1631
L
9041 { Bad_Opcode },
9042 { Bad_Opcode },
9043 { Bad_Opcode },
9044 { Bad_Opcode },
9045 { Bad_Opcode },
c0f3af97 9046 /* 60 */
592d1631
L
9047 { Bad_Opcode },
9048 { Bad_Opcode },
9049 { Bad_Opcode },
9050 { Bad_Opcode },
9051 { Bad_Opcode },
9052 { Bad_Opcode },
9053 { Bad_Opcode },
9054 { Bad_Opcode },
c0f3af97 9055 /* 68 */
592d1631
L
9056 { Bad_Opcode },
9057 { Bad_Opcode },
9058 { Bad_Opcode },
9059 { Bad_Opcode },
9060 { Bad_Opcode },
9061 { Bad_Opcode },
9062 { Bad_Opcode },
9063 { Bad_Opcode },
c0f3af97 9064 /* 70 */
592d1631
L
9065 { Bad_Opcode },
9066 { Bad_Opcode },
9067 { Bad_Opcode },
9068 { Bad_Opcode },
9069 { Bad_Opcode },
9070 { Bad_Opcode },
9071 { Bad_Opcode },
9072 { Bad_Opcode },
c0f3af97 9073 /* 78 */
6c30d220
L
9074 { PREFIX_TABLE (PREFIX_VEX_0F3878) },
9075 { PREFIX_TABLE (PREFIX_VEX_0F3879) },
592d1631
L
9076 { Bad_Opcode },
9077 { Bad_Opcode },
9078 { Bad_Opcode },
9079 { Bad_Opcode },
9080 { Bad_Opcode },
9081 { Bad_Opcode },
c0f3af97 9082 /* 80 */
592d1631
L
9083 { Bad_Opcode },
9084 { Bad_Opcode },
9085 { Bad_Opcode },
9086 { Bad_Opcode },
9087 { Bad_Opcode },
9088 { Bad_Opcode },
9089 { Bad_Opcode },
9090 { Bad_Opcode },
c0f3af97 9091 /* 88 */
592d1631
L
9092 { Bad_Opcode },
9093 { Bad_Opcode },
9094 { Bad_Opcode },
9095 { Bad_Opcode },
6c30d220 9096 { PREFIX_TABLE (PREFIX_VEX_0F388C) },
592d1631 9097 { Bad_Opcode },
6c30d220 9098 { PREFIX_TABLE (PREFIX_VEX_0F388E) },
592d1631 9099 { Bad_Opcode },
c0f3af97 9100 /* 90 */
6c30d220
L
9101 { PREFIX_TABLE (PREFIX_VEX_0F3890) },
9102 { PREFIX_TABLE (PREFIX_VEX_0F3891) },
9103 { PREFIX_TABLE (PREFIX_VEX_0F3892) },
9104 { PREFIX_TABLE (PREFIX_VEX_0F3893) },
592d1631
L
9105 { Bad_Opcode },
9106 { Bad_Opcode },
592a252b
L
9107 { PREFIX_TABLE (PREFIX_VEX_0F3896) },
9108 { PREFIX_TABLE (PREFIX_VEX_0F3897) },
c0f3af97 9109 /* 98 */
592a252b
L
9110 { PREFIX_TABLE (PREFIX_VEX_0F3898) },
9111 { PREFIX_TABLE (PREFIX_VEX_0F3899) },
9112 { PREFIX_TABLE (PREFIX_VEX_0F389A) },
9113 { PREFIX_TABLE (PREFIX_VEX_0F389B) },
9114 { PREFIX_TABLE (PREFIX_VEX_0F389C) },
9115 { PREFIX_TABLE (PREFIX_VEX_0F389D) },
9116 { PREFIX_TABLE (PREFIX_VEX_0F389E) },
9117 { PREFIX_TABLE (PREFIX_VEX_0F389F) },
c0f3af97 9118 /* a0 */
592d1631
L
9119 { Bad_Opcode },
9120 { Bad_Opcode },
9121 { Bad_Opcode },
9122 { Bad_Opcode },
9123 { Bad_Opcode },
9124 { Bad_Opcode },
592a252b
L
9125 { PREFIX_TABLE (PREFIX_VEX_0F38A6) },
9126 { PREFIX_TABLE (PREFIX_VEX_0F38A7) },
c0f3af97 9127 /* a8 */
592a252b
L
9128 { PREFIX_TABLE (PREFIX_VEX_0F38A8) },
9129 { PREFIX_TABLE (PREFIX_VEX_0F38A9) },
9130 { PREFIX_TABLE (PREFIX_VEX_0F38AA) },
9131 { PREFIX_TABLE (PREFIX_VEX_0F38AB) },
9132 { PREFIX_TABLE (PREFIX_VEX_0F38AC) },
9133 { PREFIX_TABLE (PREFIX_VEX_0F38AD) },
9134 { PREFIX_TABLE (PREFIX_VEX_0F38AE) },
9135 { PREFIX_TABLE (PREFIX_VEX_0F38AF) },
c0f3af97 9136 /* b0 */
592d1631
L
9137 { Bad_Opcode },
9138 { Bad_Opcode },
9139 { Bad_Opcode },
9140 { Bad_Opcode },
9141 { Bad_Opcode },
9142 { Bad_Opcode },
592a252b
L
9143 { PREFIX_TABLE (PREFIX_VEX_0F38B6) },
9144 { PREFIX_TABLE (PREFIX_VEX_0F38B7) },
c0f3af97 9145 /* b8 */
592a252b
L
9146 { PREFIX_TABLE (PREFIX_VEX_0F38B8) },
9147 { PREFIX_TABLE (PREFIX_VEX_0F38B9) },
9148 { PREFIX_TABLE (PREFIX_VEX_0F38BA) },
9149 { PREFIX_TABLE (PREFIX_VEX_0F38BB) },
9150 { PREFIX_TABLE (PREFIX_VEX_0F38BC) },
9151 { PREFIX_TABLE (PREFIX_VEX_0F38BD) },
9152 { PREFIX_TABLE (PREFIX_VEX_0F38BE) },
9153 { PREFIX_TABLE (PREFIX_VEX_0F38BF) },
c0f3af97 9154 /* c0 */
592d1631
L
9155 { Bad_Opcode },
9156 { Bad_Opcode },
9157 { Bad_Opcode },
9158 { Bad_Opcode },
9159 { Bad_Opcode },
9160 { Bad_Opcode },
9161 { Bad_Opcode },
9162 { Bad_Opcode },
c0f3af97 9163 /* c8 */
592d1631
L
9164 { Bad_Opcode },
9165 { Bad_Opcode },
9166 { Bad_Opcode },
9167 { Bad_Opcode },
9168 { Bad_Opcode },
9169 { Bad_Opcode },
9170 { Bad_Opcode },
9171 { Bad_Opcode },
c0f3af97 9172 /* d0 */
592d1631
L
9173 { Bad_Opcode },
9174 { Bad_Opcode },
9175 { Bad_Opcode },
9176 { Bad_Opcode },
9177 { Bad_Opcode },
9178 { Bad_Opcode },
9179 { Bad_Opcode },
9180 { Bad_Opcode },
c0f3af97 9181 /* d8 */
592d1631
L
9182 { Bad_Opcode },
9183 { Bad_Opcode },
9184 { Bad_Opcode },
592a252b
L
9185 { PREFIX_TABLE (PREFIX_VEX_0F38DB) },
9186 { PREFIX_TABLE (PREFIX_VEX_0F38DC) },
9187 { PREFIX_TABLE (PREFIX_VEX_0F38DD) },
9188 { PREFIX_TABLE (PREFIX_VEX_0F38DE) },
9189 { PREFIX_TABLE (PREFIX_VEX_0F38DF) },
c0f3af97 9190 /* e0 */
592d1631
L
9191 { Bad_Opcode },
9192 { Bad_Opcode },
9193 { Bad_Opcode },
9194 { Bad_Opcode },
9195 { Bad_Opcode },
9196 { Bad_Opcode },
9197 { Bad_Opcode },
9198 { Bad_Opcode },
c0f3af97 9199 /* e8 */
592d1631
L
9200 { Bad_Opcode },
9201 { Bad_Opcode },
9202 { Bad_Opcode },
9203 { Bad_Opcode },
9204 { Bad_Opcode },
9205 { Bad_Opcode },
9206 { Bad_Opcode },
9207 { Bad_Opcode },
c0f3af97 9208 /* f0 */
592d1631
L
9209 { Bad_Opcode },
9210 { Bad_Opcode },
f12dc422
L
9211 { PREFIX_TABLE (PREFIX_VEX_0F38F2) },
9212 { REG_TABLE (REG_VEX_0F38F3) },
592d1631 9213 { Bad_Opcode },
6c30d220
L
9214 { PREFIX_TABLE (PREFIX_VEX_0F38F5) },
9215 { PREFIX_TABLE (PREFIX_VEX_0F38F6) },
f12dc422 9216 { PREFIX_TABLE (PREFIX_VEX_0F38F7) },
c0f3af97 9217 /* f8 */
592d1631
L
9218 { Bad_Opcode },
9219 { Bad_Opcode },
9220 { Bad_Opcode },
9221 { Bad_Opcode },
9222 { Bad_Opcode },
9223 { Bad_Opcode },
9224 { Bad_Opcode },
9225 { Bad_Opcode },
c0f3af97
L
9226 },
9227 /* VEX_0F3A */
9228 {
9229 /* 00 */
6c30d220
L
9230 { PREFIX_TABLE (PREFIX_VEX_0F3A00) },
9231 { PREFIX_TABLE (PREFIX_VEX_0F3A01) },
9232 { PREFIX_TABLE (PREFIX_VEX_0F3A02) },
592d1631 9233 { Bad_Opcode },
592a252b
L
9234 { PREFIX_TABLE (PREFIX_VEX_0F3A04) },
9235 { PREFIX_TABLE (PREFIX_VEX_0F3A05) },
9236 { PREFIX_TABLE (PREFIX_VEX_0F3A06) },
592d1631 9237 { Bad_Opcode },
c0f3af97 9238 /* 08 */
592a252b
L
9239 { PREFIX_TABLE (PREFIX_VEX_0F3A08) },
9240 { PREFIX_TABLE (PREFIX_VEX_0F3A09) },
9241 { PREFIX_TABLE (PREFIX_VEX_0F3A0A) },
9242 { PREFIX_TABLE (PREFIX_VEX_0F3A0B) },
9243 { PREFIX_TABLE (PREFIX_VEX_0F3A0C) },
9244 { PREFIX_TABLE (PREFIX_VEX_0F3A0D) },
9245 { PREFIX_TABLE (PREFIX_VEX_0F3A0E) },
9246 { PREFIX_TABLE (PREFIX_VEX_0F3A0F) },
c0f3af97 9247 /* 10 */
592d1631
L
9248 { Bad_Opcode },
9249 { Bad_Opcode },
9250 { Bad_Opcode },
9251 { Bad_Opcode },
592a252b
L
9252 { PREFIX_TABLE (PREFIX_VEX_0F3A14) },
9253 { PREFIX_TABLE (PREFIX_VEX_0F3A15) },
9254 { PREFIX_TABLE (PREFIX_VEX_0F3A16) },
9255 { PREFIX_TABLE (PREFIX_VEX_0F3A17) },
c0f3af97 9256 /* 18 */
592a252b
L
9257 { PREFIX_TABLE (PREFIX_VEX_0F3A18) },
9258 { PREFIX_TABLE (PREFIX_VEX_0F3A19) },
592d1631
L
9259 { Bad_Opcode },
9260 { Bad_Opcode },
9261 { Bad_Opcode },
592a252b 9262 { PREFIX_TABLE (PREFIX_VEX_0F3A1D) },
592d1631
L
9263 { Bad_Opcode },
9264 { Bad_Opcode },
c0f3af97 9265 /* 20 */
592a252b
L
9266 { PREFIX_TABLE (PREFIX_VEX_0F3A20) },
9267 { PREFIX_TABLE (PREFIX_VEX_0F3A21) },
9268 { PREFIX_TABLE (PREFIX_VEX_0F3A22) },
592d1631
L
9269 { Bad_Opcode },
9270 { Bad_Opcode },
9271 { Bad_Opcode },
9272 { Bad_Opcode },
9273 { Bad_Opcode },
c0f3af97 9274 /* 28 */
592d1631
L
9275 { Bad_Opcode },
9276 { Bad_Opcode },
9277 { Bad_Opcode },
9278 { Bad_Opcode },
9279 { Bad_Opcode },
9280 { Bad_Opcode },
9281 { Bad_Opcode },
9282 { Bad_Opcode },
c0f3af97 9283 /* 30 */
43234a1e 9284 { PREFIX_TABLE (PREFIX_VEX_0F3A30) },
1ba585e8 9285 { PREFIX_TABLE (PREFIX_VEX_0F3A31) },
43234a1e 9286 { PREFIX_TABLE (PREFIX_VEX_0F3A32) },
1ba585e8 9287 { PREFIX_TABLE (PREFIX_VEX_0F3A33) },
592d1631
L
9288 { Bad_Opcode },
9289 { Bad_Opcode },
9290 { Bad_Opcode },
9291 { Bad_Opcode },
c0f3af97 9292 /* 38 */
6c30d220
L
9293 { PREFIX_TABLE (PREFIX_VEX_0F3A38) },
9294 { PREFIX_TABLE (PREFIX_VEX_0F3A39) },
592d1631
L
9295 { Bad_Opcode },
9296 { Bad_Opcode },
9297 { Bad_Opcode },
9298 { Bad_Opcode },
9299 { Bad_Opcode },
9300 { Bad_Opcode },
c0f3af97 9301 /* 40 */
592a252b
L
9302 { PREFIX_TABLE (PREFIX_VEX_0F3A40) },
9303 { PREFIX_TABLE (PREFIX_VEX_0F3A41) },
9304 { PREFIX_TABLE (PREFIX_VEX_0F3A42) },
592d1631 9305 { Bad_Opcode },
592a252b 9306 { PREFIX_TABLE (PREFIX_VEX_0F3A44) },
592d1631 9307 { Bad_Opcode },
6c30d220 9308 { PREFIX_TABLE (PREFIX_VEX_0F3A46) },
592d1631 9309 { Bad_Opcode },
c0f3af97 9310 /* 48 */
592a252b
L
9311 { PREFIX_TABLE (PREFIX_VEX_0F3A48) },
9312 { PREFIX_TABLE (PREFIX_VEX_0F3A49) },
9313 { PREFIX_TABLE (PREFIX_VEX_0F3A4A) },
9314 { PREFIX_TABLE (PREFIX_VEX_0F3A4B) },
9315 { PREFIX_TABLE (PREFIX_VEX_0F3A4C) },
592d1631
L
9316 { Bad_Opcode },
9317 { Bad_Opcode },
9318 { Bad_Opcode },
c0f3af97 9319 /* 50 */
592d1631
L
9320 { Bad_Opcode },
9321 { Bad_Opcode },
9322 { Bad_Opcode },
9323 { Bad_Opcode },
9324 { Bad_Opcode },
9325 { Bad_Opcode },
9326 { Bad_Opcode },
9327 { Bad_Opcode },
c0f3af97 9328 /* 58 */
592d1631
L
9329 { Bad_Opcode },
9330 { Bad_Opcode },
9331 { Bad_Opcode },
9332 { Bad_Opcode },
592a252b
L
9333 { PREFIX_TABLE (PREFIX_VEX_0F3A5C) },
9334 { PREFIX_TABLE (PREFIX_VEX_0F3A5D) },
9335 { PREFIX_TABLE (PREFIX_VEX_0F3A5E) },
9336 { PREFIX_TABLE (PREFIX_VEX_0F3A5F) },
c0f3af97 9337 /* 60 */
592a252b
L
9338 { PREFIX_TABLE (PREFIX_VEX_0F3A60) },
9339 { PREFIX_TABLE (PREFIX_VEX_0F3A61) },
9340 { PREFIX_TABLE (PREFIX_VEX_0F3A62) },
9341 { PREFIX_TABLE (PREFIX_VEX_0F3A63) },
592d1631
L
9342 { Bad_Opcode },
9343 { Bad_Opcode },
9344 { Bad_Opcode },
9345 { Bad_Opcode },
c0f3af97 9346 /* 68 */
592a252b
L
9347 { PREFIX_TABLE (PREFIX_VEX_0F3A68) },
9348 { PREFIX_TABLE (PREFIX_VEX_0F3A69) },
9349 { PREFIX_TABLE (PREFIX_VEX_0F3A6A) },
9350 { PREFIX_TABLE (PREFIX_VEX_0F3A6B) },
9351 { PREFIX_TABLE (PREFIX_VEX_0F3A6C) },
9352 { PREFIX_TABLE (PREFIX_VEX_0F3A6D) },
9353 { PREFIX_TABLE (PREFIX_VEX_0F3A6E) },
9354 { PREFIX_TABLE (PREFIX_VEX_0F3A6F) },
c0f3af97 9355 /* 70 */
592d1631
L
9356 { Bad_Opcode },
9357 { Bad_Opcode },
9358 { Bad_Opcode },
9359 { Bad_Opcode },
9360 { Bad_Opcode },
9361 { Bad_Opcode },
9362 { Bad_Opcode },
9363 { Bad_Opcode },
c0f3af97 9364 /* 78 */
592a252b
L
9365 { PREFIX_TABLE (PREFIX_VEX_0F3A78) },
9366 { PREFIX_TABLE (PREFIX_VEX_0F3A79) },
9367 { PREFIX_TABLE (PREFIX_VEX_0F3A7A) },
9368 { PREFIX_TABLE (PREFIX_VEX_0F3A7B) },
9369 { PREFIX_TABLE (PREFIX_VEX_0F3A7C) },
9370 { PREFIX_TABLE (PREFIX_VEX_0F3A7D) },
9371 { PREFIX_TABLE (PREFIX_VEX_0F3A7E) },
9372 { PREFIX_TABLE (PREFIX_VEX_0F3A7F) },
c0f3af97 9373 /* 80 */
592d1631
L
9374 { Bad_Opcode },
9375 { Bad_Opcode },
9376 { Bad_Opcode },
9377 { Bad_Opcode },
9378 { Bad_Opcode },
9379 { Bad_Opcode },
9380 { Bad_Opcode },
9381 { Bad_Opcode },
c0f3af97 9382 /* 88 */
592d1631
L
9383 { Bad_Opcode },
9384 { Bad_Opcode },
9385 { Bad_Opcode },
9386 { Bad_Opcode },
9387 { Bad_Opcode },
9388 { Bad_Opcode },
9389 { Bad_Opcode },
9390 { Bad_Opcode },
c0f3af97 9391 /* 90 */
592d1631
L
9392 { Bad_Opcode },
9393 { Bad_Opcode },
9394 { Bad_Opcode },
9395 { Bad_Opcode },
9396 { Bad_Opcode },
9397 { Bad_Opcode },
9398 { Bad_Opcode },
9399 { Bad_Opcode },
c0f3af97 9400 /* 98 */
592d1631
L
9401 { Bad_Opcode },
9402 { Bad_Opcode },
9403 { Bad_Opcode },
9404 { Bad_Opcode },
9405 { Bad_Opcode },
9406 { Bad_Opcode },
9407 { Bad_Opcode },
9408 { Bad_Opcode },
c0f3af97 9409 /* a0 */
592d1631
L
9410 { Bad_Opcode },
9411 { Bad_Opcode },
9412 { Bad_Opcode },
9413 { Bad_Opcode },
9414 { Bad_Opcode },
9415 { Bad_Opcode },
9416 { Bad_Opcode },
9417 { Bad_Opcode },
c0f3af97 9418 /* a8 */
592d1631
L
9419 { Bad_Opcode },
9420 { Bad_Opcode },
9421 { Bad_Opcode },
9422 { Bad_Opcode },
9423 { Bad_Opcode },
9424 { Bad_Opcode },
9425 { Bad_Opcode },
9426 { Bad_Opcode },
c0f3af97 9427 /* b0 */
592d1631
L
9428 { Bad_Opcode },
9429 { Bad_Opcode },
9430 { Bad_Opcode },
9431 { Bad_Opcode },
9432 { Bad_Opcode },
9433 { Bad_Opcode },
9434 { Bad_Opcode },
9435 { Bad_Opcode },
c0f3af97 9436 /* b8 */
592d1631
L
9437 { Bad_Opcode },
9438 { Bad_Opcode },
9439 { Bad_Opcode },
9440 { Bad_Opcode },
9441 { Bad_Opcode },
9442 { Bad_Opcode },
9443 { Bad_Opcode },
9444 { Bad_Opcode },
c0f3af97 9445 /* c0 */
592d1631
L
9446 { Bad_Opcode },
9447 { Bad_Opcode },
9448 { Bad_Opcode },
9449 { Bad_Opcode },
9450 { Bad_Opcode },
9451 { Bad_Opcode },
9452 { Bad_Opcode },
9453 { Bad_Opcode },
c0f3af97 9454 /* c8 */
592d1631
L
9455 { Bad_Opcode },
9456 { Bad_Opcode },
9457 { Bad_Opcode },
9458 { Bad_Opcode },
9459 { Bad_Opcode },
9460 { Bad_Opcode },
9461 { Bad_Opcode },
9462 { Bad_Opcode },
c0f3af97 9463 /* d0 */
592d1631
L
9464 { Bad_Opcode },
9465 { Bad_Opcode },
9466 { Bad_Opcode },
9467 { Bad_Opcode },
9468 { Bad_Opcode },
9469 { Bad_Opcode },
9470 { Bad_Opcode },
9471 { Bad_Opcode },
c0f3af97 9472 /* d8 */
592d1631
L
9473 { Bad_Opcode },
9474 { Bad_Opcode },
9475 { Bad_Opcode },
9476 { Bad_Opcode },
9477 { Bad_Opcode },
9478 { Bad_Opcode },
9479 { Bad_Opcode },
592a252b 9480 { PREFIX_TABLE (PREFIX_VEX_0F3ADF) },
c0f3af97 9481 /* e0 */
592d1631
L
9482 { Bad_Opcode },
9483 { Bad_Opcode },
9484 { Bad_Opcode },
9485 { Bad_Opcode },
9486 { Bad_Opcode },
9487 { Bad_Opcode },
9488 { Bad_Opcode },
9489 { Bad_Opcode },
c0f3af97 9490 /* e8 */
592d1631
L
9491 { Bad_Opcode },
9492 { Bad_Opcode },
9493 { Bad_Opcode },
9494 { Bad_Opcode },
9495 { Bad_Opcode },
9496 { Bad_Opcode },
9497 { Bad_Opcode },
9498 { Bad_Opcode },
c0f3af97 9499 /* f0 */
6c30d220 9500 { PREFIX_TABLE (PREFIX_VEX_0F3AF0) },
592d1631
L
9501 { Bad_Opcode },
9502 { Bad_Opcode },
9503 { Bad_Opcode },
9504 { Bad_Opcode },
9505 { Bad_Opcode },
9506 { Bad_Opcode },
9507 { Bad_Opcode },
c0f3af97 9508 /* f8 */
592d1631
L
9509 { Bad_Opcode },
9510 { Bad_Opcode },
9511 { Bad_Opcode },
9512 { Bad_Opcode },
9513 { Bad_Opcode },
9514 { Bad_Opcode },
9515 { Bad_Opcode },
9516 { Bad_Opcode },
c0f3af97
L
9517 },
9518};
9519
43234a1e
L
9520#define NEED_OPCODE_TABLE
9521#include "i386-dis-evex.h"
9522#undef NEED_OPCODE_TABLE
c0f3af97 9523static const struct dis386 vex_len_table[][2] = {
592a252b 9524 /* VEX_LEN_0F10_P_1 */
c0f3af97 9525 {
592a252b
L
9526 { VEX_W_TABLE (VEX_W_0F10_P_1) },
9527 { VEX_W_TABLE (VEX_W_0F10_P_1) },
c0f3af97
L
9528 },
9529
592a252b 9530 /* VEX_LEN_0F10_P_3 */
c0f3af97 9531 {
592a252b
L
9532 { VEX_W_TABLE (VEX_W_0F10_P_3) },
9533 { VEX_W_TABLE (VEX_W_0F10_P_3) },
c0f3af97
L
9534 },
9535
592a252b 9536 /* VEX_LEN_0F11_P_1 */
c0f3af97 9537 {
592a252b
L
9538 { VEX_W_TABLE (VEX_W_0F11_P_1) },
9539 { VEX_W_TABLE (VEX_W_0F11_P_1) },
c0f3af97
L
9540 },
9541
592a252b 9542 /* VEX_LEN_0F11_P_3 */
c0f3af97 9543 {
592a252b
L
9544 { VEX_W_TABLE (VEX_W_0F11_P_3) },
9545 { VEX_W_TABLE (VEX_W_0F11_P_3) },
c0f3af97
L
9546 },
9547
592a252b 9548 /* VEX_LEN_0F12_P_0_M_0 */
c0f3af97 9549 {
592a252b 9550 { VEX_W_TABLE (VEX_W_0F12_P_0_M_0) },
c0f3af97
L
9551 },
9552
592a252b 9553 /* VEX_LEN_0F12_P_0_M_1 */
c0f3af97 9554 {
592a252b 9555 { VEX_W_TABLE (VEX_W_0F12_P_0_M_1) },
c0f3af97
L
9556 },
9557
592a252b 9558 /* VEX_LEN_0F12_P_2 */
c0f3af97 9559 {
592a252b 9560 { VEX_W_TABLE (VEX_W_0F12_P_2) },
c0f3af97
L
9561 },
9562
592a252b 9563 /* VEX_LEN_0F13_M_0 */
c0f3af97 9564 {
592a252b 9565 { VEX_W_TABLE (VEX_W_0F13_M_0) },
c0f3af97
L
9566 },
9567
592a252b 9568 /* VEX_LEN_0F16_P_0_M_0 */
c0f3af97 9569 {
592a252b 9570 { VEX_W_TABLE (VEX_W_0F16_P_0_M_0) },
c0f3af97
L
9571 },
9572
592a252b 9573 /* VEX_LEN_0F16_P_0_M_1 */
c0f3af97 9574 {
592a252b 9575 { VEX_W_TABLE (VEX_W_0F16_P_0_M_1) },
c0f3af97
L
9576 },
9577
592a252b 9578 /* VEX_LEN_0F16_P_2 */
c0f3af97 9579 {
592a252b 9580 { VEX_W_TABLE (VEX_W_0F16_P_2) },
c0f3af97
L
9581 },
9582
592a252b 9583 /* VEX_LEN_0F17_M_0 */
c0f3af97 9584 {
592a252b 9585 { VEX_W_TABLE (VEX_W_0F17_M_0) },
c0f3af97
L
9586 },
9587
592a252b 9588 /* VEX_LEN_0F2A_P_1 */
c0f3af97 9589 {
bf890a93
IT
9590 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev }, 0 },
9591 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev }, 0 },
c0f3af97
L
9592 },
9593
592a252b 9594 /* VEX_LEN_0F2A_P_3 */
c0f3af97 9595 {
bf890a93
IT
9596 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev }, 0 },
9597 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev }, 0 },
c0f3af97
L
9598 },
9599
592a252b 9600 /* VEX_LEN_0F2C_P_1 */
c0f3af97 9601 {
bf890a93
IT
9602 { "vcvttss2siY", { Gv, EXdScalar }, 0 },
9603 { "vcvttss2siY", { Gv, EXdScalar }, 0 },
c0f3af97
L
9604 },
9605
592a252b 9606 /* VEX_LEN_0F2C_P_3 */
c0f3af97 9607 {
bf890a93
IT
9608 { "vcvttsd2siY", { Gv, EXqScalar }, 0 },
9609 { "vcvttsd2siY", { Gv, EXqScalar }, 0 },
c0f3af97
L
9610 },
9611
592a252b 9612 /* VEX_LEN_0F2D_P_1 */
c0f3af97 9613 {
bf890a93
IT
9614 { "vcvtss2siY", { Gv, EXdScalar }, 0 },
9615 { "vcvtss2siY", { Gv, EXdScalar }, 0 },
c0f3af97
L
9616 },
9617
592a252b 9618 /* VEX_LEN_0F2D_P_3 */
c0f3af97 9619 {
bf890a93
IT
9620 { "vcvtsd2siY", { Gv, EXqScalar }, 0 },
9621 { "vcvtsd2siY", { Gv, EXqScalar }, 0 },
c0f3af97
L
9622 },
9623
592a252b 9624 /* VEX_LEN_0F2E_P_0 */
c0f3af97 9625 {
592a252b
L
9626 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
9627 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
c0f3af97
L
9628 },
9629
592a252b 9630 /* VEX_LEN_0F2E_P_2 */
c0f3af97 9631 {
592a252b
L
9632 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
9633 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
c0f3af97
L
9634 },
9635
592a252b 9636 /* VEX_LEN_0F2F_P_0 */
c0f3af97 9637 {
592a252b
L
9638 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
9639 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
c0f3af97
L
9640 },
9641
592a252b 9642 /* VEX_LEN_0F2F_P_2 */
c0f3af97 9643 {
592a252b
L
9644 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
9645 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
c0f3af97
L
9646 },
9647
43234a1e
L
9648 /* VEX_LEN_0F41_P_0 */
9649 {
9650 { Bad_Opcode },
9651 { VEX_W_TABLE (VEX_W_0F41_P_0_LEN_1) },
9652 },
1ba585e8
IT
9653 /* VEX_LEN_0F41_P_2 */
9654 {
9655 { Bad_Opcode },
9656 { VEX_W_TABLE (VEX_W_0F41_P_2_LEN_1) },
9657 },
43234a1e
L
9658 /* VEX_LEN_0F42_P_0 */
9659 {
9660 { Bad_Opcode },
9661 { VEX_W_TABLE (VEX_W_0F42_P_0_LEN_1) },
9662 },
1ba585e8
IT
9663 /* VEX_LEN_0F42_P_2 */
9664 {
9665 { Bad_Opcode },
9666 { VEX_W_TABLE (VEX_W_0F42_P_2_LEN_1) },
9667 },
43234a1e
L
9668 /* VEX_LEN_0F44_P_0 */
9669 {
9670 { VEX_W_TABLE (VEX_W_0F44_P_0_LEN_0) },
9671 },
1ba585e8
IT
9672 /* VEX_LEN_0F44_P_2 */
9673 {
9674 { VEX_W_TABLE (VEX_W_0F44_P_2_LEN_0) },
9675 },
43234a1e
L
9676 /* VEX_LEN_0F45_P_0 */
9677 {
9678 { Bad_Opcode },
9679 { VEX_W_TABLE (VEX_W_0F45_P_0_LEN_1) },
9680 },
1ba585e8
IT
9681 /* VEX_LEN_0F45_P_2 */
9682 {
9683 { Bad_Opcode },
9684 { VEX_W_TABLE (VEX_W_0F45_P_2_LEN_1) },
9685 },
43234a1e
L
9686 /* VEX_LEN_0F46_P_0 */
9687 {
9688 { Bad_Opcode },
9689 { VEX_W_TABLE (VEX_W_0F46_P_0_LEN_1) },
9690 },
1ba585e8
IT
9691 /* VEX_LEN_0F46_P_2 */
9692 {
9693 { Bad_Opcode },
9694 { VEX_W_TABLE (VEX_W_0F46_P_2_LEN_1) },
9695 },
43234a1e
L
9696 /* VEX_LEN_0F47_P_0 */
9697 {
9698 { Bad_Opcode },
9699 { VEX_W_TABLE (VEX_W_0F47_P_0_LEN_1) },
9700 },
1ba585e8
IT
9701 /* VEX_LEN_0F47_P_2 */
9702 {
9703 { Bad_Opcode },
9704 { VEX_W_TABLE (VEX_W_0F47_P_2_LEN_1) },
9705 },
9706 /* VEX_LEN_0F4A_P_0 */
9707 {
9708 { Bad_Opcode },
9709 { VEX_W_TABLE (VEX_W_0F4A_P_0_LEN_1) },
9710 },
9711 /* VEX_LEN_0F4A_P_2 */
9712 {
9713 { Bad_Opcode },
9714 { VEX_W_TABLE (VEX_W_0F4A_P_2_LEN_1) },
9715 },
9716 /* VEX_LEN_0F4B_P_0 */
9717 {
9718 { Bad_Opcode },
9719 { VEX_W_TABLE (VEX_W_0F4B_P_0_LEN_1) },
9720 },
43234a1e
L
9721 /* VEX_LEN_0F4B_P_2 */
9722 {
9723 { Bad_Opcode },
9724 { VEX_W_TABLE (VEX_W_0F4B_P_2_LEN_1) },
9725 },
9726
592a252b 9727 /* VEX_LEN_0F51_P_1 */
c0f3af97 9728 {
592a252b
L
9729 { VEX_W_TABLE (VEX_W_0F51_P_1) },
9730 { VEX_W_TABLE (VEX_W_0F51_P_1) },
c0f3af97
L
9731 },
9732
592a252b 9733 /* VEX_LEN_0F51_P_3 */
c0f3af97 9734 {
592a252b
L
9735 { VEX_W_TABLE (VEX_W_0F51_P_3) },
9736 { VEX_W_TABLE (VEX_W_0F51_P_3) },
c0f3af97
L
9737 },
9738
592a252b 9739 /* VEX_LEN_0F52_P_1 */
c0f3af97 9740 {
592a252b
L
9741 { VEX_W_TABLE (VEX_W_0F52_P_1) },
9742 { VEX_W_TABLE (VEX_W_0F52_P_1) },
c0f3af97
L
9743 },
9744
592a252b 9745 /* VEX_LEN_0F53_P_1 */
c0f3af97 9746 {
592a252b
L
9747 { VEX_W_TABLE (VEX_W_0F53_P_1) },
9748 { VEX_W_TABLE (VEX_W_0F53_P_1) },
c0f3af97
L
9749 },
9750
592a252b 9751 /* VEX_LEN_0F58_P_1 */
c0f3af97 9752 {
592a252b
L
9753 { VEX_W_TABLE (VEX_W_0F58_P_1) },
9754 { VEX_W_TABLE (VEX_W_0F58_P_1) },
c0f3af97
L
9755 },
9756
592a252b 9757 /* VEX_LEN_0F58_P_3 */
c0f3af97 9758 {
592a252b
L
9759 { VEX_W_TABLE (VEX_W_0F58_P_3) },
9760 { VEX_W_TABLE (VEX_W_0F58_P_3) },
c0f3af97
L
9761 },
9762
592a252b 9763 /* VEX_LEN_0F59_P_1 */
c0f3af97 9764 {
592a252b
L
9765 { VEX_W_TABLE (VEX_W_0F59_P_1) },
9766 { VEX_W_TABLE (VEX_W_0F59_P_1) },
c0f3af97
L
9767 },
9768
592a252b 9769 /* VEX_LEN_0F59_P_3 */
c0f3af97 9770 {
592a252b
L
9771 { VEX_W_TABLE (VEX_W_0F59_P_3) },
9772 { VEX_W_TABLE (VEX_W_0F59_P_3) },
c0f3af97
L
9773 },
9774
592a252b 9775 /* VEX_LEN_0F5A_P_1 */
c0f3af97 9776 {
592a252b
L
9777 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
9778 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
c0f3af97
L
9779 },
9780
592a252b 9781 /* VEX_LEN_0F5A_P_3 */
c0f3af97 9782 {
592a252b
L
9783 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
9784 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
c0f3af97
L
9785 },
9786
592a252b 9787 /* VEX_LEN_0F5C_P_1 */
c0f3af97 9788 {
592a252b
L
9789 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
9790 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
c0f3af97
L
9791 },
9792
592a252b 9793 /* VEX_LEN_0F5C_P_3 */
c0f3af97 9794 {
592a252b
L
9795 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
9796 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
c0f3af97
L
9797 },
9798
592a252b 9799 /* VEX_LEN_0F5D_P_1 */
c0f3af97 9800 {
592a252b
L
9801 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
9802 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
c0f3af97
L
9803 },
9804
592a252b 9805 /* VEX_LEN_0F5D_P_3 */
c0f3af97 9806 {
592a252b
L
9807 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
9808 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
c0f3af97
L
9809 },
9810
592a252b 9811 /* VEX_LEN_0F5E_P_1 */
c0f3af97 9812 {
592a252b
L
9813 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
9814 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
c0f3af97
L
9815 },
9816
592a252b 9817 /* VEX_LEN_0F5E_P_3 */
c0f3af97 9818 {
592a252b
L
9819 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
9820 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
c0f3af97
L
9821 },
9822
592a252b 9823 /* VEX_LEN_0F5F_P_1 */
c0f3af97 9824 {
592a252b
L
9825 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
9826 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
c0f3af97
L
9827 },
9828
592a252b 9829 /* VEX_LEN_0F5F_P_3 */
c0f3af97 9830 {
592a252b
L
9831 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
9832 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
c0f3af97
L
9833 },
9834
592a252b 9835 /* VEX_LEN_0F6E_P_2 */
c0f3af97 9836 {
bf890a93
IT
9837 { "vmovK", { XMScalar, Edq }, 0 },
9838 { "vmovK", { XMScalar, Edq }, 0 },
c0f3af97
L
9839 },
9840
592a252b 9841 /* VEX_LEN_0F7E_P_1 */
c0f3af97 9842 {
592a252b
L
9843 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
9844 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
c0f3af97
L
9845 },
9846
592a252b 9847 /* VEX_LEN_0F7E_P_2 */
c0f3af97 9848 {
bf890a93
IT
9849 { "vmovK", { Edq, XMScalar }, 0 },
9850 { "vmovK", { Edq, XMScalar }, 0 },
c0f3af97
L
9851 },
9852
43234a1e
L
9853 /* VEX_LEN_0F90_P_0 */
9854 {
9855 { VEX_W_TABLE (VEX_W_0F90_P_0_LEN_0) },
9856 },
9857
1ba585e8
IT
9858 /* VEX_LEN_0F90_P_2 */
9859 {
9860 { VEX_W_TABLE (VEX_W_0F90_P_2_LEN_0) },
9861 },
9862
43234a1e
L
9863 /* VEX_LEN_0F91_P_0 */
9864 {
9865 { VEX_W_TABLE (VEX_W_0F91_P_0_LEN_0) },
9866 },
9867
1ba585e8
IT
9868 /* VEX_LEN_0F91_P_2 */
9869 {
9870 { VEX_W_TABLE (VEX_W_0F91_P_2_LEN_0) },
9871 },
9872
43234a1e
L
9873 /* VEX_LEN_0F92_P_0 */
9874 {
9875 { VEX_W_TABLE (VEX_W_0F92_P_0_LEN_0) },
9876 },
9877
90a915bf
IT
9878 /* VEX_LEN_0F92_P_2 */
9879 {
9880 { VEX_W_TABLE (VEX_W_0F92_P_2_LEN_0) },
9881 },
9882
1ba585e8
IT
9883 /* VEX_LEN_0F92_P_3 */
9884 {
9885 { VEX_W_TABLE (VEX_W_0F92_P_3_LEN_0) },
9886 },
9887
43234a1e
L
9888 /* VEX_LEN_0F93_P_0 */
9889 {
9890 { VEX_W_TABLE (VEX_W_0F93_P_0_LEN_0) },
9891 },
9892
90a915bf
IT
9893 /* VEX_LEN_0F93_P_2 */
9894 {
9895 { VEX_W_TABLE (VEX_W_0F93_P_2_LEN_0) },
9896 },
9897
1ba585e8
IT
9898 /* VEX_LEN_0F93_P_3 */
9899 {
9900 { VEX_W_TABLE (VEX_W_0F93_P_3_LEN_0) },
9901 },
9902
43234a1e
L
9903 /* VEX_LEN_0F98_P_0 */
9904 {
9905 { VEX_W_TABLE (VEX_W_0F98_P_0_LEN_0) },
9906 },
9907
1ba585e8
IT
9908 /* VEX_LEN_0F98_P_2 */
9909 {
9910 { VEX_W_TABLE (VEX_W_0F98_P_2_LEN_0) },
9911 },
9912
9913 /* VEX_LEN_0F99_P_0 */
9914 {
9915 { VEX_W_TABLE (VEX_W_0F99_P_0_LEN_0) },
9916 },
9917
9918 /* VEX_LEN_0F99_P_2 */
9919 {
9920 { VEX_W_TABLE (VEX_W_0F99_P_2_LEN_0) },
9921 },
9922
6c30d220 9923 /* VEX_LEN_0FAE_R_2_M_0 */
c0f3af97 9924 {
6c30d220 9925 { VEX_W_TABLE (VEX_W_0FAE_R_2_M_0) },
c0f3af97
L
9926 },
9927
6c30d220 9928 /* VEX_LEN_0FAE_R_3_M_0 */
c0f3af97 9929 {
6c30d220 9930 { VEX_W_TABLE (VEX_W_0FAE_R_3_M_0) },
c0f3af97
L
9931 },
9932
6c30d220 9933 /* VEX_LEN_0FC2_P_1 */
c0f3af97 9934 {
6c30d220
L
9935 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
9936 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
c0f3af97
L
9937 },
9938
6c30d220 9939 /* VEX_LEN_0FC2_P_3 */
c0f3af97 9940 {
6c30d220
L
9941 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
9942 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
c0f3af97
L
9943 },
9944
6c30d220 9945 /* VEX_LEN_0FC4_P_2 */
c0f3af97 9946 {
6c30d220 9947 { VEX_W_TABLE (VEX_W_0FC4_P_2) },
c0f3af97
L
9948 },
9949
6c30d220 9950 /* VEX_LEN_0FC5_P_2 */
c0f3af97 9951 {
6c30d220 9952 { VEX_W_TABLE (VEX_W_0FC5_P_2) },
c0f3af97
L
9953 },
9954
6c30d220 9955 /* VEX_LEN_0FD6_P_2 */
c0f3af97 9956 {
6c30d220
L
9957 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
9958 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
c0f3af97
L
9959 },
9960
6c30d220 9961 /* VEX_LEN_0FF7_P_2 */
c0f3af97 9962 {
6c30d220 9963 { VEX_W_TABLE (VEX_W_0FF7_P_2) },
c0f3af97
L
9964 },
9965
6c30d220 9966 /* VEX_LEN_0F3816_P_2 */
c0f3af97 9967 {
6c30d220
L
9968 { Bad_Opcode },
9969 { VEX_W_TABLE (VEX_W_0F3816_P_2) },
c0f3af97
L
9970 },
9971
6c30d220 9972 /* VEX_LEN_0F3819_P_2 */
c0f3af97 9973 {
6c30d220
L
9974 { Bad_Opcode },
9975 { VEX_W_TABLE (VEX_W_0F3819_P_2) },
c0f3af97
L
9976 },
9977
6c30d220 9978 /* VEX_LEN_0F381A_P_2_M_0 */
c0f3af97 9979 {
6c30d220
L
9980 { Bad_Opcode },
9981 { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0) },
c0f3af97
L
9982 },
9983
6c30d220 9984 /* VEX_LEN_0F3836_P_2 */
c0f3af97 9985 {
6c30d220
L
9986 { Bad_Opcode },
9987 { VEX_W_TABLE (VEX_W_0F3836_P_2) },
c0f3af97
L
9988 },
9989
592a252b 9990 /* VEX_LEN_0F3841_P_2 */
c0f3af97 9991 {
592a252b 9992 { VEX_W_TABLE (VEX_W_0F3841_P_2) },
c0f3af97
L
9993 },
9994
6c30d220
L
9995 /* VEX_LEN_0F385A_P_2_M_0 */
9996 {
9997 { Bad_Opcode },
9998 { VEX_W_TABLE (VEX_W_0F385A_P_2_M_0) },
9999 },
10000
592a252b 10001 /* VEX_LEN_0F38DB_P_2 */
a5ff0eb2 10002 {
592a252b 10003 { VEX_W_TABLE (VEX_W_0F38DB_P_2) },
a5ff0eb2
L
10004 },
10005
592a252b 10006 /* VEX_LEN_0F38DC_P_2 */
a5ff0eb2 10007 {
592a252b 10008 { VEX_W_TABLE (VEX_W_0F38DC_P_2) },
a5ff0eb2
L
10009 },
10010
592a252b 10011 /* VEX_LEN_0F38DD_P_2 */
a5ff0eb2 10012 {
592a252b 10013 { VEX_W_TABLE (VEX_W_0F38DD_P_2) },
a5ff0eb2
L
10014 },
10015
592a252b 10016 /* VEX_LEN_0F38DE_P_2 */
a5ff0eb2 10017 {
592a252b 10018 { VEX_W_TABLE (VEX_W_0F38DE_P_2) },
a5ff0eb2
L
10019 },
10020
592a252b 10021 /* VEX_LEN_0F38DF_P_2 */
a5ff0eb2 10022 {
592a252b 10023 { VEX_W_TABLE (VEX_W_0F38DF_P_2) },
a5ff0eb2
L
10024 },
10025
f12dc422
L
10026 /* VEX_LEN_0F38F2_P_0 */
10027 {
bf890a93 10028 { "andnS", { Gdq, VexGdq, Edq }, 0 },
f12dc422
L
10029 },
10030
10031 /* VEX_LEN_0F38F3_R_1_P_0 */
10032 {
bf890a93 10033 { "blsrS", { VexGdq, Edq }, 0 },
f12dc422
L
10034 },
10035
10036 /* VEX_LEN_0F38F3_R_2_P_0 */
10037 {
bf890a93 10038 { "blsmskS", { VexGdq, Edq }, 0 },
f12dc422
L
10039 },
10040
10041 /* VEX_LEN_0F38F3_R_3_P_0 */
10042 {
bf890a93 10043 { "blsiS", { VexGdq, Edq }, 0 },
f12dc422
L
10044 },
10045
6c30d220
L
10046 /* VEX_LEN_0F38F5_P_0 */
10047 {
bf890a93 10048 { "bzhiS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
10049 },
10050
10051 /* VEX_LEN_0F38F5_P_1 */
10052 {
bf890a93 10053 { "pextS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
10054 },
10055
10056 /* VEX_LEN_0F38F5_P_3 */
10057 {
bf890a93 10058 { "pdepS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
10059 },
10060
10061 /* VEX_LEN_0F38F6_P_3 */
10062 {
bf890a93 10063 { "mulxS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
10064 },
10065
f12dc422
L
10066 /* VEX_LEN_0F38F7_P_0 */
10067 {
bf890a93 10068 { "bextrS", { Gdq, Edq, VexGdq }, 0 },
f12dc422
L
10069 },
10070
6c30d220
L
10071 /* VEX_LEN_0F38F7_P_1 */
10072 {
bf890a93 10073 { "sarxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
10074 },
10075
10076 /* VEX_LEN_0F38F7_P_2 */
10077 {
bf890a93 10078 { "shlxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
10079 },
10080
10081 /* VEX_LEN_0F38F7_P_3 */
10082 {
bf890a93 10083 { "shrxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
10084 },
10085
10086 /* VEX_LEN_0F3A00_P_2 */
10087 {
10088 { Bad_Opcode },
10089 { VEX_W_TABLE (VEX_W_0F3A00_P_2) },
10090 },
10091
10092 /* VEX_LEN_0F3A01_P_2 */
10093 {
10094 { Bad_Opcode },
10095 { VEX_W_TABLE (VEX_W_0F3A01_P_2) },
10096 },
10097
592a252b 10098 /* VEX_LEN_0F3A06_P_2 */
c0f3af97 10099 {
592d1631 10100 { Bad_Opcode },
592a252b 10101 { VEX_W_TABLE (VEX_W_0F3A06_P_2) },
c0f3af97
L
10102 },
10103
592a252b 10104 /* VEX_LEN_0F3A0A_P_2 */
c0f3af97 10105 {
592a252b
L
10106 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
10107 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
c0f3af97
L
10108 },
10109
592a252b 10110 /* VEX_LEN_0F3A0B_P_2 */
c0f3af97 10111 {
592a252b
L
10112 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
10113 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
c0f3af97
L
10114 },
10115
592a252b 10116 /* VEX_LEN_0F3A14_P_2 */
c0f3af97 10117 {
592a252b 10118 { VEX_W_TABLE (VEX_W_0F3A14_P_2) },
c0f3af97
L
10119 },
10120
592a252b 10121 /* VEX_LEN_0F3A15_P_2 */
c0f3af97 10122 {
592a252b 10123 { VEX_W_TABLE (VEX_W_0F3A15_P_2) },
c0f3af97
L
10124 },
10125
592a252b 10126 /* VEX_LEN_0F3A16_P_2 */
c0f3af97 10127 {
bf890a93 10128 { "vpextrK", { Edq, XM, Ib }, 0 },
c0f3af97
L
10129 },
10130
592a252b 10131 /* VEX_LEN_0F3A17_P_2 */
c0f3af97 10132 {
bf890a93 10133 { "vextractps", { Edqd, XM, Ib }, 0 },
c0f3af97
L
10134 },
10135
592a252b 10136 /* VEX_LEN_0F3A18_P_2 */
c0f3af97 10137 {
592d1631 10138 { Bad_Opcode },
592a252b 10139 { VEX_W_TABLE (VEX_W_0F3A18_P_2) },
c0f3af97
L
10140 },
10141
592a252b 10142 /* VEX_LEN_0F3A19_P_2 */
c0f3af97 10143 {
592d1631 10144 { Bad_Opcode },
592a252b 10145 { VEX_W_TABLE (VEX_W_0F3A19_P_2) },
c0f3af97
L
10146 },
10147
592a252b 10148 /* VEX_LEN_0F3A20_P_2 */
c0f3af97 10149 {
592a252b 10150 { VEX_W_TABLE (VEX_W_0F3A20_P_2) },
c0f3af97
L
10151 },
10152
592a252b 10153 /* VEX_LEN_0F3A21_P_2 */
c0f3af97 10154 {
592a252b 10155 { VEX_W_TABLE (VEX_W_0F3A21_P_2) },
c0f3af97
L
10156 },
10157
592a252b 10158 /* VEX_LEN_0F3A22_P_2 */
c0f3af97 10159 {
bf890a93 10160 { "vpinsrK", { XM, Vex128, Edq, Ib }, 0 },
c0f3af97
L
10161 },
10162
43234a1e
L
10163 /* VEX_LEN_0F3A30_P_2 */
10164 {
10165 { VEX_W_TABLE (VEX_W_0F3A30_P_2_LEN_0) },
10166 },
10167
1ba585e8
IT
10168 /* VEX_LEN_0F3A31_P_2 */
10169 {
10170 { VEX_W_TABLE (VEX_W_0F3A31_P_2_LEN_0) },
10171 },
10172
43234a1e
L
10173 /* VEX_LEN_0F3A32_P_2 */
10174 {
10175 { VEX_W_TABLE (VEX_W_0F3A32_P_2_LEN_0) },
10176 },
10177
1ba585e8
IT
10178 /* VEX_LEN_0F3A33_P_2 */
10179 {
10180 { VEX_W_TABLE (VEX_W_0F3A33_P_2_LEN_0) },
10181 },
10182
6c30d220 10183 /* VEX_LEN_0F3A38_P_2 */
c0f3af97 10184 {
6c30d220
L
10185 { Bad_Opcode },
10186 { VEX_W_TABLE (VEX_W_0F3A38_P_2) },
c0f3af97
L
10187 },
10188
6c30d220 10189 /* VEX_LEN_0F3A39_P_2 */
c0f3af97 10190 {
6c30d220
L
10191 { Bad_Opcode },
10192 { VEX_W_TABLE (VEX_W_0F3A39_P_2) },
10193 },
10194
10195 /* VEX_LEN_0F3A41_P_2 */
10196 {
10197 { VEX_W_TABLE (VEX_W_0F3A41_P_2) },
c0f3af97
L
10198 },
10199
592a252b 10200 /* VEX_LEN_0F3A44_P_2 */
ce2f5b3c 10201 {
592a252b 10202 { VEX_W_TABLE (VEX_W_0F3A44_P_2) },
ce2f5b3c
L
10203 },
10204
6c30d220 10205 /* VEX_LEN_0F3A46_P_2 */
c0f3af97 10206 {
6c30d220
L
10207 { Bad_Opcode },
10208 { VEX_W_TABLE (VEX_W_0F3A46_P_2) },
c0f3af97
L
10209 },
10210
592a252b 10211 /* VEX_LEN_0F3A60_P_2 */
c0f3af97 10212 {
592a252b 10213 { VEX_W_TABLE (VEX_W_0F3A60_P_2) },
c0f3af97
L
10214 },
10215
592a252b 10216 /* VEX_LEN_0F3A61_P_2 */
c0f3af97 10217 {
592a252b 10218 { VEX_W_TABLE (VEX_W_0F3A61_P_2) },
c0f3af97
L
10219 },
10220
592a252b 10221 /* VEX_LEN_0F3A62_P_2 */
c0f3af97 10222 {
592a252b 10223 { VEX_W_TABLE (VEX_W_0F3A62_P_2) },
c0f3af97
L
10224 },
10225
592a252b 10226 /* VEX_LEN_0F3A63_P_2 */
c0f3af97 10227 {
592a252b 10228 { VEX_W_TABLE (VEX_W_0F3A63_P_2) },
c0f3af97
L
10229 },
10230
592a252b 10231 /* VEX_LEN_0F3A6A_P_2 */
922d8de8 10232 {
bf890a93 10233 { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 }, 0 },
922d8de8
DR
10234 },
10235
592a252b 10236 /* VEX_LEN_0F3A6B_P_2 */
922d8de8 10237 {
bf890a93 10238 { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 }, 0 },
922d8de8
DR
10239 },
10240
592a252b 10241 /* VEX_LEN_0F3A6E_P_2 */
922d8de8 10242 {
bf890a93 10243 { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 }, 0 },
922d8de8
DR
10244 },
10245
592a252b 10246 /* VEX_LEN_0F3A6F_P_2 */
922d8de8 10247 {
bf890a93 10248 { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 }, 0 },
922d8de8
DR
10249 },
10250
592a252b 10251 /* VEX_LEN_0F3A7A_P_2 */
922d8de8 10252 {
bf890a93 10253 { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 }, 0 },
922d8de8
DR
10254 },
10255
592a252b 10256 /* VEX_LEN_0F3A7B_P_2 */
922d8de8 10257 {
bf890a93 10258 { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 }, 0 },
922d8de8
DR
10259 },
10260
592a252b 10261 /* VEX_LEN_0F3A7E_P_2 */
922d8de8 10262 {
bf890a93 10263 { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 }, 0 },
922d8de8
DR
10264 },
10265
592a252b 10266 /* VEX_LEN_0F3A7F_P_2 */
922d8de8 10267 {
bf890a93 10268 { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 }, 0 },
922d8de8
DR
10269 },
10270
592a252b 10271 /* VEX_LEN_0F3ADF_P_2 */
a5ff0eb2 10272 {
592a252b 10273 { VEX_W_TABLE (VEX_W_0F3ADF_P_2) },
a5ff0eb2 10274 },
4c807e72 10275
6c30d220
L
10276 /* VEX_LEN_0F3AF0_P_3 */
10277 {
bf890a93 10278 { "rorxS", { Gdq, Edq, Ib }, 0 },
6c30d220
L
10279 },
10280
ff688e1f
L
10281 /* VEX_LEN_0FXOP_08_CC */
10282 {
bf890a93 10283 { "vpcomb", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10284 },
10285
10286 /* VEX_LEN_0FXOP_08_CD */
10287 {
bf890a93 10288 { "vpcomw", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10289 },
10290
10291 /* VEX_LEN_0FXOP_08_CE */
10292 {
bf890a93 10293 { "vpcomd", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10294 },
10295
10296 /* VEX_LEN_0FXOP_08_CF */
10297 {
bf890a93 10298 { "vpcomq", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10299 },
10300
10301 /* VEX_LEN_0FXOP_08_EC */
10302 {
bf890a93 10303 { "vpcomub", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10304 },
10305
10306 /* VEX_LEN_0FXOP_08_ED */
10307 {
bf890a93 10308 { "vpcomuw", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10309 },
10310
10311 /* VEX_LEN_0FXOP_08_EE */
10312 {
bf890a93 10313 { "vpcomud", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10314 },
10315
10316 /* VEX_LEN_0FXOP_08_EF */
10317 {
bf890a93 10318 { "vpcomuq", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10319 },
10320
592a252b 10321 /* VEX_LEN_0FXOP_09_80 */
5dd85c99 10322 {
bf890a93
IT
10323 { "vfrczps", { XM, EXxmm }, 0 },
10324 { "vfrczps", { XM, EXymmq }, 0 },
5dd85c99 10325 },
4c807e72 10326
592a252b 10327 /* VEX_LEN_0FXOP_09_81 */
5dd85c99 10328 {
bf890a93
IT
10329 { "vfrczpd", { XM, EXxmm }, 0 },
10330 { "vfrczpd", { XM, EXymmq }, 0 },
5dd85c99 10331 },
331d2d0d
L
10332};
10333
9e30b8e0 10334static const struct dis386 vex_w_table[][2] = {
b844680a 10335 {
592a252b 10336 /* VEX_W_0F10_P_0 */
bf890a93 10337 { "vmovups", { XM, EXx }, 0 },
d8faab4e
L
10338 },
10339 {
592a252b 10340 /* VEX_W_0F10_P_1 */
bf890a93 10341 { "vmovss", { XMVexScalar, VexScalar, EXdScalar }, 0 },
d8faab4e
L
10342 },
10343 {
592a252b 10344 /* VEX_W_0F10_P_2 */
bf890a93 10345 { "vmovupd", { XM, EXx }, 0 },
d8faab4e
L
10346 },
10347 {
592a252b 10348 /* VEX_W_0F10_P_3 */
bf890a93 10349 { "vmovsd", { XMVexScalar, VexScalar, EXqScalar }, 0 },
d8faab4e
L
10350 },
10351 {
592a252b 10352 /* VEX_W_0F11_P_0 */
bf890a93 10353 { "vmovups", { EXxS, XM }, 0 },
d8faab4e
L
10354 },
10355 {
592a252b 10356 /* VEX_W_0F11_P_1 */
bf890a93 10357 { "vmovss", { EXdVexScalarS, VexScalar, XMScalar }, 0 },
b844680a
L
10358 },
10359 {
592a252b 10360 /* VEX_W_0F11_P_2 */
bf890a93 10361 { "vmovupd", { EXxS, XM }, 0 },
b844680a
L
10362 },
10363 {
592a252b 10364 /* VEX_W_0F11_P_3 */
bf890a93 10365 { "vmovsd", { EXqVexScalarS, VexScalar, XMScalar }, 0 },
d8faab4e
L
10366 },
10367 {
592a252b 10368 /* VEX_W_0F12_P_0_M_0 */
bf890a93 10369 { "vmovlps", { XM, Vex128, EXq }, 0 },
b844680a
L
10370 },
10371 {
592a252b 10372 /* VEX_W_0F12_P_0_M_1 */
bf890a93 10373 { "vmovhlps", { XM, Vex128, EXq }, 0 },
b844680a
L
10374 },
10375 {
592a252b 10376 /* VEX_W_0F12_P_1 */
bf890a93 10377 { "vmovsldup", { XM, EXx }, 0 },
b844680a
L
10378 },
10379 {
592a252b 10380 /* VEX_W_0F12_P_2 */
bf890a93 10381 { "vmovlpd", { XM, Vex128, EXq }, 0 },
b844680a
L
10382 },
10383 {
592a252b 10384 /* VEX_W_0F12_P_3 */
bf890a93 10385 { "vmovddup", { XM, EXymmq }, 0 },
b844680a
L
10386 },
10387 {
592a252b 10388 /* VEX_W_0F13_M_0 */
bf890a93 10389 { "vmovlpX", { EXq, XM }, 0 },
b844680a
L
10390 },
10391 {
592a252b 10392 /* VEX_W_0F14 */
bf890a93 10393 { "vunpcklpX", { XM, Vex, EXx }, 0 },
b844680a
L
10394 },
10395 {
592a252b 10396 /* VEX_W_0F15 */
bf890a93 10397 { "vunpckhpX", { XM, Vex, EXx }, 0 },
b844680a
L
10398 },
10399 {
592a252b 10400 /* VEX_W_0F16_P_0_M_0 */
bf890a93 10401 { "vmovhps", { XM, Vex128, EXq }, 0 },
9e30b8e0
L
10402 },
10403 {
592a252b 10404 /* VEX_W_0F16_P_0_M_1 */
bf890a93 10405 { "vmovlhps", { XM, Vex128, EXq }, 0 },
9e30b8e0
L
10406 },
10407 {
592a252b 10408 /* VEX_W_0F16_P_1 */
bf890a93 10409 { "vmovshdup", { XM, EXx }, 0 },
9e30b8e0
L
10410 },
10411 {
592a252b 10412 /* VEX_W_0F16_P_2 */
bf890a93 10413 { "vmovhpd", { XM, Vex128, EXq }, 0 },
9e30b8e0
L
10414 },
10415 {
592a252b 10416 /* VEX_W_0F17_M_0 */
bf890a93 10417 { "vmovhpX", { EXq, XM }, 0 },
9e30b8e0
L
10418 },
10419 {
592a252b 10420 /* VEX_W_0F28 */
bf890a93 10421 { "vmovapX", { XM, EXx }, 0 },
9e30b8e0
L
10422 },
10423 {
592a252b 10424 /* VEX_W_0F29 */
bf890a93 10425 { "vmovapX", { EXxS, XM }, 0 },
9e30b8e0
L
10426 },
10427 {
592a252b 10428 /* VEX_W_0F2B_M_0 */
bf890a93 10429 { "vmovntpX", { Mx, XM }, 0 },
9e30b8e0
L
10430 },
10431 {
592a252b 10432 /* VEX_W_0F2E_P_0 */
bf890a93 10433 { "vucomiss", { XMScalar, EXdScalar }, 0 },
9e30b8e0
L
10434 },
10435 {
592a252b 10436 /* VEX_W_0F2E_P_2 */
bf890a93 10437 { "vucomisd", { XMScalar, EXqScalar }, 0 },
9e30b8e0
L
10438 },
10439 {
592a252b 10440 /* VEX_W_0F2F_P_0 */
bf890a93 10441 { "vcomiss", { XMScalar, EXdScalar }, 0 },
9e30b8e0
L
10442 },
10443 {
592a252b 10444 /* VEX_W_0F2F_P_2 */
bf890a93 10445 { "vcomisd", { XMScalar, EXqScalar }, 0 },
9e30b8e0 10446 },
43234a1e
L
10447 {
10448 /* VEX_W_0F41_P_0_LEN_1 */
bf890a93
IT
10449 { "kandw", { MaskG, MaskVex, MaskR }, 0 },
10450 { "kandq", { MaskG, MaskVex, MaskR }, 0 },
1ba585e8
IT
10451 },
10452 {
10453 /* VEX_W_0F41_P_2_LEN_1 */
bf890a93
IT
10454 { "kandb", { MaskG, MaskVex, MaskR }, 0 },
10455 { "kandd", { MaskG, MaskVex, MaskR }, 0 },
43234a1e
L
10456 },
10457 {
10458 /* VEX_W_0F42_P_0_LEN_1 */
bf890a93
IT
10459 { "kandnw", { MaskG, MaskVex, MaskR }, 0 },
10460 { "kandnq", { MaskG, MaskVex, MaskR }, 0 },
1ba585e8
IT
10461 },
10462 {
10463 /* VEX_W_0F42_P_2_LEN_1 */
bf890a93
IT
10464 { "kandnb", { MaskG, MaskVex, MaskR }, 0 },
10465 { "kandnd", { MaskG, MaskVex, MaskR }, 0 },
43234a1e
L
10466 },
10467 {
10468 /* VEX_W_0F44_P_0_LEN_0 */
bf890a93
IT
10469 { "knotw", { MaskG, MaskR }, 0 },
10470 { "knotq", { MaskG, MaskR }, 0 },
1ba585e8
IT
10471 },
10472 {
10473 /* VEX_W_0F44_P_2_LEN_0 */
bf890a93
IT
10474 { "knotb", { MaskG, MaskR }, 0 },
10475 { "knotd", { MaskG, MaskR }, 0 },
43234a1e
L
10476 },
10477 {
10478 /* VEX_W_0F45_P_0_LEN_1 */
bf890a93
IT
10479 { "korw", { MaskG, MaskVex, MaskR }, 0 },
10480 { "korq", { MaskG, MaskVex, MaskR }, 0 },
1ba585e8
IT
10481 },
10482 {
10483 /* VEX_W_0F45_P_2_LEN_1 */
bf890a93
IT
10484 { "korb", { MaskG, MaskVex, MaskR }, 0 },
10485 { "kord", { MaskG, MaskVex, MaskR }, 0 },
43234a1e
L
10486 },
10487 {
10488 /* VEX_W_0F46_P_0_LEN_1 */
bf890a93
IT
10489 { "kxnorw", { MaskG, MaskVex, MaskR }, 0 },
10490 { "kxnorq", { MaskG, MaskVex, MaskR }, 0 },
1ba585e8
IT
10491 },
10492 {
10493 /* VEX_W_0F46_P_2_LEN_1 */
bf890a93
IT
10494 { "kxnorb", { MaskG, MaskVex, MaskR }, 0 },
10495 { "kxnord", { MaskG, MaskVex, MaskR }, 0 },
43234a1e
L
10496 },
10497 {
10498 /* VEX_W_0F47_P_0_LEN_1 */
bf890a93
IT
10499 { "kxorw", { MaskG, MaskVex, MaskR }, 0 },
10500 { "kxorq", { MaskG, MaskVex, MaskR }, 0 },
1ba585e8
IT
10501 },
10502 {
10503 /* VEX_W_0F47_P_2_LEN_1 */
bf890a93
IT
10504 { "kxorb", { MaskG, MaskVex, MaskR }, 0 },
10505 { "kxord", { MaskG, MaskVex, MaskR }, 0 },
1ba585e8
IT
10506 },
10507 {
10508 /* VEX_W_0F4A_P_0_LEN_1 */
bf890a93
IT
10509 { "kaddw", { MaskG, MaskVex, MaskR }, 0 },
10510 { "kaddq", { MaskG, MaskVex, MaskR }, 0 },
1ba585e8
IT
10511 },
10512 {
10513 /* VEX_W_0F4A_P_2_LEN_1 */
bf890a93
IT
10514 { "kaddb", { MaskG, MaskVex, MaskR }, 0 },
10515 { "kaddd", { MaskG, MaskVex, MaskR }, 0 },
1ba585e8
IT
10516 },
10517 {
10518 /* VEX_W_0F4B_P_0_LEN_1 */
bf890a93
IT
10519 { "kunpckwd", { MaskG, MaskVex, MaskR }, 0 },
10520 { "kunpckdq", { MaskG, MaskVex, MaskR }, 0 },
43234a1e
L
10521 },
10522 {
10523 /* VEX_W_0F4B_P_2_LEN_1 */
bf890a93 10524 { "kunpckbw", { MaskG, MaskVex, MaskR }, 0 },
43234a1e 10525 },
9e30b8e0 10526 {
592a252b 10527 /* VEX_W_0F50_M_0 */
bf890a93 10528 { "vmovmskpX", { Gdq, XS }, 0 },
9e30b8e0
L
10529 },
10530 {
592a252b 10531 /* VEX_W_0F51_P_0 */
bf890a93 10532 { "vsqrtps", { XM, EXx }, 0 },
9e30b8e0
L
10533 },
10534 {
592a252b 10535 /* VEX_W_0F51_P_1 */
bf890a93 10536 { "vsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10537 },
10538 {
592a252b 10539 /* VEX_W_0F51_P_2 */
bf890a93 10540 { "vsqrtpd", { XM, EXx }, 0 },
9e30b8e0
L
10541 },
10542 {
592a252b 10543 /* VEX_W_0F51_P_3 */
bf890a93 10544 { "vsqrtsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10545 },
10546 {
592a252b 10547 /* VEX_W_0F52_P_0 */
bf890a93 10548 { "vrsqrtps", { XM, EXx }, 0 },
9e30b8e0
L
10549 },
10550 {
592a252b 10551 /* VEX_W_0F52_P_1 */
bf890a93 10552 { "vrsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10553 },
10554 {
592a252b 10555 /* VEX_W_0F53_P_0 */
bf890a93 10556 { "vrcpps", { XM, EXx }, 0 },
9e30b8e0
L
10557 },
10558 {
592a252b 10559 /* VEX_W_0F53_P_1 */
bf890a93 10560 { "vrcpss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10561 },
10562 {
592a252b 10563 /* VEX_W_0F58_P_0 */
bf890a93 10564 { "vaddps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10565 },
10566 {
592a252b 10567 /* VEX_W_0F58_P_1 */
bf890a93 10568 { "vaddss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10569 },
10570 {
592a252b 10571 /* VEX_W_0F58_P_2 */
bf890a93 10572 { "vaddpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10573 },
10574 {
592a252b 10575 /* VEX_W_0F58_P_3 */
bf890a93 10576 { "vaddsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10577 },
10578 {
592a252b 10579 /* VEX_W_0F59_P_0 */
bf890a93 10580 { "vmulps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10581 },
10582 {
592a252b 10583 /* VEX_W_0F59_P_1 */
bf890a93 10584 { "vmulss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10585 },
10586 {
592a252b 10587 /* VEX_W_0F59_P_2 */
bf890a93 10588 { "vmulpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10589 },
10590 {
592a252b 10591 /* VEX_W_0F59_P_3 */
bf890a93 10592 { "vmulsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10593 },
10594 {
592a252b 10595 /* VEX_W_0F5A_P_0 */
bf890a93 10596 { "vcvtps2pd", { XM, EXxmmq }, 0 },
9e30b8e0
L
10597 },
10598 {
592a252b 10599 /* VEX_W_0F5A_P_1 */
bf890a93 10600 { "vcvtss2sd", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10601 },
10602 {
592a252b 10603 /* VEX_W_0F5A_P_3 */
bf890a93 10604 { "vcvtsd2ss", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10605 },
10606 {
592a252b 10607 /* VEX_W_0F5B_P_0 */
bf890a93 10608 { "vcvtdq2ps", { XM, EXx }, 0 },
9e30b8e0
L
10609 },
10610 {
592a252b 10611 /* VEX_W_0F5B_P_1 */
bf890a93 10612 { "vcvttps2dq", { XM, EXx }, 0 },
9e30b8e0
L
10613 },
10614 {
592a252b 10615 /* VEX_W_0F5B_P_2 */
bf890a93 10616 { "vcvtps2dq", { XM, EXx }, 0 },
9e30b8e0
L
10617 },
10618 {
592a252b 10619 /* VEX_W_0F5C_P_0 */
bf890a93 10620 { "vsubps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10621 },
10622 {
592a252b 10623 /* VEX_W_0F5C_P_1 */
bf890a93 10624 { "vsubss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10625 },
10626 {
592a252b 10627 /* VEX_W_0F5C_P_2 */
bf890a93 10628 { "vsubpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10629 },
10630 {
592a252b 10631 /* VEX_W_0F5C_P_3 */
bf890a93 10632 { "vsubsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10633 },
10634 {
592a252b 10635 /* VEX_W_0F5D_P_0 */
bf890a93 10636 { "vminps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10637 },
10638 {
592a252b 10639 /* VEX_W_0F5D_P_1 */
bf890a93 10640 { "vminss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10641 },
10642 {
592a252b 10643 /* VEX_W_0F5D_P_2 */
bf890a93 10644 { "vminpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10645 },
10646 {
592a252b 10647 /* VEX_W_0F5D_P_3 */
bf890a93 10648 { "vminsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10649 },
10650 {
592a252b 10651 /* VEX_W_0F5E_P_0 */
bf890a93 10652 { "vdivps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10653 },
10654 {
592a252b 10655 /* VEX_W_0F5E_P_1 */
bf890a93 10656 { "vdivss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10657 },
10658 {
592a252b 10659 /* VEX_W_0F5E_P_2 */
bf890a93 10660 { "vdivpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10661 },
10662 {
592a252b 10663 /* VEX_W_0F5E_P_3 */
bf890a93 10664 { "vdivsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10665 },
10666 {
592a252b 10667 /* VEX_W_0F5F_P_0 */
bf890a93 10668 { "vmaxps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10669 },
10670 {
592a252b 10671 /* VEX_W_0F5F_P_1 */
bf890a93 10672 { "vmaxss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10673 },
10674 {
592a252b 10675 /* VEX_W_0F5F_P_2 */
bf890a93 10676 { "vmaxpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10677 },
10678 {
592a252b 10679 /* VEX_W_0F5F_P_3 */
bf890a93 10680 { "vmaxsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10681 },
10682 {
592a252b 10683 /* VEX_W_0F60_P_2 */
bf890a93 10684 { "vpunpcklbw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10685 },
10686 {
592a252b 10687 /* VEX_W_0F61_P_2 */
bf890a93 10688 { "vpunpcklwd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10689 },
10690 {
592a252b 10691 /* VEX_W_0F62_P_2 */
bf890a93 10692 { "vpunpckldq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10693 },
10694 {
592a252b 10695 /* VEX_W_0F63_P_2 */
bf890a93 10696 { "vpacksswb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10697 },
10698 {
592a252b 10699 /* VEX_W_0F64_P_2 */
bf890a93 10700 { "vpcmpgtb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10701 },
10702 {
592a252b 10703 /* VEX_W_0F65_P_2 */
bf890a93 10704 { "vpcmpgtw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10705 },
10706 {
592a252b 10707 /* VEX_W_0F66_P_2 */
bf890a93 10708 { "vpcmpgtd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10709 },
10710 {
592a252b 10711 /* VEX_W_0F67_P_2 */
bf890a93 10712 { "vpackuswb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10713 },
10714 {
592a252b 10715 /* VEX_W_0F68_P_2 */
bf890a93 10716 { "vpunpckhbw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10717 },
10718 {
592a252b 10719 /* VEX_W_0F69_P_2 */
bf890a93 10720 { "vpunpckhwd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10721 },
10722 {
592a252b 10723 /* VEX_W_0F6A_P_2 */
bf890a93 10724 { "vpunpckhdq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10725 },
10726 {
592a252b 10727 /* VEX_W_0F6B_P_2 */
bf890a93 10728 { "vpackssdw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10729 },
10730 {
592a252b 10731 /* VEX_W_0F6C_P_2 */
bf890a93 10732 { "vpunpcklqdq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10733 },
10734 {
592a252b 10735 /* VEX_W_0F6D_P_2 */
bf890a93 10736 { "vpunpckhqdq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10737 },
10738 {
592a252b 10739 /* VEX_W_0F6F_P_1 */
bf890a93 10740 { "vmovdqu", { XM, EXx }, 0 },
9e30b8e0
L
10741 },
10742 {
592a252b 10743 /* VEX_W_0F6F_P_2 */
bf890a93 10744 { "vmovdqa", { XM, EXx }, 0 },
9e30b8e0
L
10745 },
10746 {
592a252b 10747 /* VEX_W_0F70_P_1 */
bf890a93 10748 { "vpshufhw", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10749 },
10750 {
592a252b 10751 /* VEX_W_0F70_P_2 */
bf890a93 10752 { "vpshufd", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10753 },
10754 {
592a252b 10755 /* VEX_W_0F70_P_3 */
bf890a93 10756 { "vpshuflw", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10757 },
10758 {
592a252b 10759 /* VEX_W_0F71_R_2_P_2 */
bf890a93 10760 { "vpsrlw", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10761 },
10762 {
592a252b 10763 /* VEX_W_0F71_R_4_P_2 */
bf890a93 10764 { "vpsraw", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10765 },
10766 {
592a252b 10767 /* VEX_W_0F71_R_6_P_2 */
bf890a93 10768 { "vpsllw", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10769 },
10770 {
592a252b 10771 /* VEX_W_0F72_R_2_P_2 */
bf890a93 10772 { "vpsrld", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10773 },
10774 {
592a252b 10775 /* VEX_W_0F72_R_4_P_2 */
bf890a93 10776 { "vpsrad", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10777 },
10778 {
592a252b 10779 /* VEX_W_0F72_R_6_P_2 */
bf890a93 10780 { "vpslld", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10781 },
10782 {
592a252b 10783 /* VEX_W_0F73_R_2_P_2 */
bf890a93 10784 { "vpsrlq", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10785 },
10786 {
592a252b 10787 /* VEX_W_0F73_R_3_P_2 */
bf890a93 10788 { "vpsrldq", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10789 },
10790 {
592a252b 10791 /* VEX_W_0F73_R_6_P_2 */
bf890a93 10792 { "vpsllq", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10793 },
10794 {
592a252b 10795 /* VEX_W_0F73_R_7_P_2 */
bf890a93 10796 { "vpslldq", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10797 },
10798 {
592a252b 10799 /* VEX_W_0F74_P_2 */
bf890a93 10800 { "vpcmpeqb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10801 },
10802 {
592a252b 10803 /* VEX_W_0F75_P_2 */
bf890a93 10804 { "vpcmpeqw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10805 },
10806 {
592a252b 10807 /* VEX_W_0F76_P_2 */
bf890a93 10808 { "vpcmpeqd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10809 },
10810 {
592a252b 10811 /* VEX_W_0F77_P_0 */
bf890a93 10812 { "", { VZERO }, 0 },
9e30b8e0
L
10813 },
10814 {
592a252b 10815 /* VEX_W_0F7C_P_2 */
bf890a93 10816 { "vhaddpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10817 },
10818 {
592a252b 10819 /* VEX_W_0F7C_P_3 */
bf890a93 10820 { "vhaddps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10821 },
10822 {
592a252b 10823 /* VEX_W_0F7D_P_2 */
bf890a93 10824 { "vhsubpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10825 },
10826 {
592a252b 10827 /* VEX_W_0F7D_P_3 */
bf890a93 10828 { "vhsubps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10829 },
10830 {
592a252b 10831 /* VEX_W_0F7E_P_1 */
bf890a93 10832 { "vmovq", { XMScalar, EXqScalar }, 0 },
9e30b8e0
L
10833 },
10834 {
592a252b 10835 /* VEX_W_0F7F_P_1 */
bf890a93 10836 { "vmovdqu", { EXxS, XM }, 0 },
9e30b8e0
L
10837 },
10838 {
592a252b 10839 /* VEX_W_0F7F_P_2 */
bf890a93 10840 { "vmovdqa", { EXxS, XM }, 0 },
9e30b8e0 10841 },
43234a1e
L
10842 {
10843 /* VEX_W_0F90_P_0_LEN_0 */
bf890a93
IT
10844 { "kmovw", { MaskG, MaskE }, 0 },
10845 { "kmovq", { MaskG, MaskE }, 0 },
1ba585e8
IT
10846 },
10847 {
10848 /* VEX_W_0F90_P_2_LEN_0 */
bf890a93
IT
10849 { "kmovb", { MaskG, MaskBDE }, 0 },
10850 { "kmovd", { MaskG, MaskBDE }, 0 },
43234a1e
L
10851 },
10852 {
10853 /* VEX_W_0F91_P_0_LEN_0 */
bf890a93
IT
10854 { "kmovw", { Ew, MaskG }, 0 },
10855 { "kmovq", { Eq, MaskG }, 0 },
1ba585e8
IT
10856 },
10857 {
10858 /* VEX_W_0F91_P_2_LEN_0 */
bf890a93
IT
10859 { "kmovb", { Eb, MaskG }, 0 },
10860 { "kmovd", { Ed, MaskG }, 0 },
43234a1e
L
10861 },
10862 {
10863 /* VEX_W_0F92_P_0_LEN_0 */
bf890a93 10864 { "kmovw", { MaskG, Rdq }, 0 },
43234a1e 10865 },
90a915bf
IT
10866 {
10867 /* VEX_W_0F92_P_2_LEN_0 */
bf890a93 10868 { "kmovb", { MaskG, Rdq }, 0 },
90a915bf 10869 },
1ba585e8
IT
10870 {
10871 /* VEX_W_0F92_P_3_LEN_0 */
bf890a93
IT
10872 { "kmovd", { MaskG, Rdq }, 0 },
10873 { "kmovq", { MaskG, Rdq }, 0 },
1ba585e8 10874 },
43234a1e
L
10875 {
10876 /* VEX_W_0F93_P_0_LEN_0 */
bf890a93 10877 { "kmovw", { Gdq, MaskR }, 0 },
43234a1e 10878 },
90a915bf
IT
10879 {
10880 /* VEX_W_0F93_P_2_LEN_0 */
bf890a93 10881 { "kmovb", { Gdq, MaskR }, 0 },
90a915bf 10882 },
1ba585e8
IT
10883 {
10884 /* VEX_W_0F93_P_3_LEN_0 */
bf890a93
IT
10885 { "kmovd", { Gdq, MaskR }, 0 },
10886 { "kmovq", { Gdq, MaskR }, 0 },
1ba585e8 10887 },
43234a1e
L
10888 {
10889 /* VEX_W_0F98_P_0_LEN_0 */
bf890a93
IT
10890 { "kortestw", { MaskG, MaskR }, 0 },
10891 { "kortestq", { MaskG, MaskR }, 0 },
1ba585e8
IT
10892 },
10893 {
10894 /* VEX_W_0F98_P_2_LEN_0 */
bf890a93
IT
10895 { "kortestb", { MaskG, MaskR }, 0 },
10896 { "kortestd", { MaskG, MaskR }, 0 },
1ba585e8
IT
10897 },
10898 {
10899 /* VEX_W_0F99_P_0_LEN_0 */
bf890a93
IT
10900 { "ktestw", { MaskG, MaskR }, 0 },
10901 { "ktestq", { MaskG, MaskR }, 0 },
1ba585e8
IT
10902 },
10903 {
10904 /* VEX_W_0F99_P_2_LEN_0 */
bf890a93
IT
10905 { "ktestb", { MaskG, MaskR }, 0 },
10906 { "ktestd", { MaskG, MaskR }, 0 },
43234a1e 10907 },
9e30b8e0 10908 {
592a252b 10909 /* VEX_W_0FAE_R_2_M_0 */
bf890a93 10910 { "vldmxcsr", { Md }, 0 },
9e30b8e0
L
10911 },
10912 {
592a252b 10913 /* VEX_W_0FAE_R_3_M_0 */
bf890a93 10914 { "vstmxcsr", { Md }, 0 },
9e30b8e0
L
10915 },
10916 {
592a252b 10917 /* VEX_W_0FC2_P_0 */
bf890a93 10918 { "vcmpps", { XM, Vex, EXx, VCMP }, 0 },
9e30b8e0
L
10919 },
10920 {
592a252b 10921 /* VEX_W_0FC2_P_1 */
bf890a93 10922 { "vcmpss", { XMScalar, VexScalar, EXdScalar, VCMP }, 0 },
9e30b8e0
L
10923 },
10924 {
592a252b 10925 /* VEX_W_0FC2_P_2 */
bf890a93 10926 { "vcmppd", { XM, Vex, EXx, VCMP }, 0 },
9e30b8e0
L
10927 },
10928 {
592a252b 10929 /* VEX_W_0FC2_P_3 */
bf890a93 10930 { "vcmpsd", { XMScalar, VexScalar, EXqScalar, VCMP }, 0 },
9e30b8e0
L
10931 },
10932 {
592a252b 10933 /* VEX_W_0FC4_P_2 */
bf890a93 10934 { "vpinsrw", { XM, Vex128, Edqw, Ib }, 0 },
9e30b8e0
L
10935 },
10936 {
592a252b 10937 /* VEX_W_0FC5_P_2 */
bf890a93 10938 { "vpextrw", { Gdq, XS, Ib }, 0 },
9e30b8e0
L
10939 },
10940 {
592a252b 10941 /* VEX_W_0FD0_P_2 */
bf890a93 10942 { "vaddsubpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10943 },
10944 {
592a252b 10945 /* VEX_W_0FD0_P_3 */
bf890a93 10946 { "vaddsubps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10947 },
10948 {
592a252b 10949 /* VEX_W_0FD1_P_2 */
bf890a93 10950 { "vpsrlw", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10951 },
10952 {
592a252b 10953 /* VEX_W_0FD2_P_2 */
bf890a93 10954 { "vpsrld", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10955 },
10956 {
592a252b 10957 /* VEX_W_0FD3_P_2 */
bf890a93 10958 { "vpsrlq", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10959 },
10960 {
592a252b 10961 /* VEX_W_0FD4_P_2 */
bf890a93 10962 { "vpaddq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10963 },
10964 {
592a252b 10965 /* VEX_W_0FD5_P_2 */
bf890a93 10966 { "vpmullw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10967 },
10968 {
592a252b 10969 /* VEX_W_0FD6_P_2 */
bf890a93 10970 { "vmovq", { EXqScalarS, XMScalar }, 0 },
9e30b8e0
L
10971 },
10972 {
592a252b 10973 /* VEX_W_0FD7_P_2_M_1 */
bf890a93 10974 { "vpmovmskb", { Gdq, XS }, 0 },
9e30b8e0
L
10975 },
10976 {
592a252b 10977 /* VEX_W_0FD8_P_2 */
bf890a93 10978 { "vpsubusb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10979 },
10980 {
592a252b 10981 /* VEX_W_0FD9_P_2 */
bf890a93 10982 { "vpsubusw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10983 },
10984 {
592a252b 10985 /* VEX_W_0FDA_P_2 */
bf890a93 10986 { "vpminub", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10987 },
10988 {
592a252b 10989 /* VEX_W_0FDB_P_2 */
bf890a93 10990 { "vpand", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10991 },
10992 {
592a252b 10993 /* VEX_W_0FDC_P_2 */
bf890a93 10994 { "vpaddusb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10995 },
10996 {
592a252b 10997 /* VEX_W_0FDD_P_2 */
bf890a93 10998 { "vpaddusw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10999 },
11000 {
592a252b 11001 /* VEX_W_0FDE_P_2 */
bf890a93 11002 { "vpmaxub", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11003 },
11004 {
592a252b 11005 /* VEX_W_0FDF_P_2 */
bf890a93 11006 { "vpandn", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11007 },
11008 {
592a252b 11009 /* VEX_W_0FE0_P_2 */
bf890a93 11010 { "vpavgb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11011 },
11012 {
592a252b 11013 /* VEX_W_0FE1_P_2 */
bf890a93 11014 { "vpsraw", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
11015 },
11016 {
592a252b 11017 /* VEX_W_0FE2_P_2 */
bf890a93 11018 { "vpsrad", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
11019 },
11020 {
592a252b 11021 /* VEX_W_0FE3_P_2 */
bf890a93 11022 { "vpavgw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11023 },
11024 {
592a252b 11025 /* VEX_W_0FE4_P_2 */
bf890a93 11026 { "vpmulhuw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11027 },
11028 {
592a252b 11029 /* VEX_W_0FE5_P_2 */
bf890a93 11030 { "vpmulhw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11031 },
11032 {
592a252b 11033 /* VEX_W_0FE6_P_1 */
bf890a93 11034 { "vcvtdq2pd", { XM, EXxmmq }, 0 },
9e30b8e0
L
11035 },
11036 {
592a252b 11037 /* VEX_W_0FE6_P_2 */
bf890a93 11038 { "vcvttpd2dq%XY", { XMM, EXx }, 0 },
9e30b8e0
L
11039 },
11040 {
592a252b 11041 /* VEX_W_0FE6_P_3 */
bf890a93 11042 { "vcvtpd2dq%XY", { XMM, EXx }, 0 },
9e30b8e0
L
11043 },
11044 {
592a252b 11045 /* VEX_W_0FE7_P_2_M_0 */
bf890a93 11046 { "vmovntdq", { Mx, XM }, 0 },
9e30b8e0
L
11047 },
11048 {
592a252b 11049 /* VEX_W_0FE8_P_2 */
bf890a93 11050 { "vpsubsb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11051 },
11052 {
592a252b 11053 /* VEX_W_0FE9_P_2 */
bf890a93 11054 { "vpsubsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11055 },
11056 {
592a252b 11057 /* VEX_W_0FEA_P_2 */
bf890a93 11058 { "vpminsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11059 },
11060 {
592a252b 11061 /* VEX_W_0FEB_P_2 */
bf890a93 11062 { "vpor", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11063 },
11064 {
592a252b 11065 /* VEX_W_0FEC_P_2 */
bf890a93 11066 { "vpaddsb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11067 },
11068 {
592a252b 11069 /* VEX_W_0FED_P_2 */
bf890a93 11070 { "vpaddsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11071 },
11072 {
592a252b 11073 /* VEX_W_0FEE_P_2 */
bf890a93 11074 { "vpmaxsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11075 },
11076 {
592a252b 11077 /* VEX_W_0FEF_P_2 */
bf890a93 11078 { "vpxor", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11079 },
11080 {
592a252b 11081 /* VEX_W_0FF0_P_3_M_0 */
bf890a93 11082 { "vlddqu", { XM, M }, 0 },
9e30b8e0
L
11083 },
11084 {
592a252b 11085 /* VEX_W_0FF1_P_2 */
bf890a93 11086 { "vpsllw", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
11087 },
11088 {
592a252b 11089 /* VEX_W_0FF2_P_2 */
bf890a93 11090 { "vpslld", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
11091 },
11092 {
592a252b 11093 /* VEX_W_0FF3_P_2 */
bf890a93 11094 { "vpsllq", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
11095 },
11096 {
592a252b 11097 /* VEX_W_0FF4_P_2 */
bf890a93 11098 { "vpmuludq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11099 },
11100 {
592a252b 11101 /* VEX_W_0FF5_P_2 */
bf890a93 11102 { "vpmaddwd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11103 },
11104 {
592a252b 11105 /* VEX_W_0FF6_P_2 */
bf890a93 11106 { "vpsadbw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11107 },
11108 {
592a252b 11109 /* VEX_W_0FF7_P_2 */
bf890a93 11110 { "vmaskmovdqu", { XM, XS }, 0 },
9e30b8e0
L
11111 },
11112 {
592a252b 11113 /* VEX_W_0FF8_P_2 */
bf890a93 11114 { "vpsubb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11115 },
11116 {
592a252b 11117 /* VEX_W_0FF9_P_2 */
bf890a93 11118 { "vpsubw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11119 },
11120 {
592a252b 11121 /* VEX_W_0FFA_P_2 */
bf890a93 11122 { "vpsubd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11123 },
11124 {
592a252b 11125 /* VEX_W_0FFB_P_2 */
bf890a93 11126 { "vpsubq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11127 },
11128 {
592a252b 11129 /* VEX_W_0FFC_P_2 */
bf890a93 11130 { "vpaddb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11131 },
11132 {
592a252b 11133 /* VEX_W_0FFD_P_2 */
bf890a93 11134 { "vpaddw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11135 },
11136 {
592a252b 11137 /* VEX_W_0FFE_P_2 */
bf890a93 11138 { "vpaddd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11139 },
11140 {
592a252b 11141 /* VEX_W_0F3800_P_2 */
bf890a93 11142 { "vpshufb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11143 },
11144 {
592a252b 11145 /* VEX_W_0F3801_P_2 */
bf890a93 11146 { "vphaddw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11147 },
11148 {
592a252b 11149 /* VEX_W_0F3802_P_2 */
bf890a93 11150 { "vphaddd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11151 },
11152 {
592a252b 11153 /* VEX_W_0F3803_P_2 */
bf890a93 11154 { "vphaddsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11155 },
11156 {
592a252b 11157 /* VEX_W_0F3804_P_2 */
bf890a93 11158 { "vpmaddubsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11159 },
11160 {
592a252b 11161 /* VEX_W_0F3805_P_2 */
bf890a93 11162 { "vphsubw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11163 },
11164 {
592a252b 11165 /* VEX_W_0F3806_P_2 */
bf890a93 11166 { "vphsubd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11167 },
11168 {
592a252b 11169 /* VEX_W_0F3807_P_2 */
bf890a93 11170 { "vphsubsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11171 },
11172 {
592a252b 11173 /* VEX_W_0F3808_P_2 */
bf890a93 11174 { "vpsignb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11175 },
11176 {
592a252b 11177 /* VEX_W_0F3809_P_2 */
bf890a93 11178 { "vpsignw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11179 },
11180 {
592a252b 11181 /* VEX_W_0F380A_P_2 */
bf890a93 11182 { "vpsignd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11183 },
11184 {
592a252b 11185 /* VEX_W_0F380B_P_2 */
bf890a93 11186 { "vpmulhrsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11187 },
11188 {
592a252b 11189 /* VEX_W_0F380C_P_2 */
bf890a93 11190 { "vpermilps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11191 },
11192 {
592a252b 11193 /* VEX_W_0F380D_P_2 */
bf890a93 11194 { "vpermilpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11195 },
11196 {
592a252b 11197 /* VEX_W_0F380E_P_2 */
bf890a93 11198 { "vtestps", { XM, EXx }, 0 },
9e30b8e0
L
11199 },
11200 {
592a252b 11201 /* VEX_W_0F380F_P_2 */
bf890a93 11202 { "vtestpd", { XM, EXx }, 0 },
9e30b8e0 11203 },
6c30d220
L
11204 {
11205 /* VEX_W_0F3816_P_2 */
bf890a93 11206 { "vpermps", { XM, Vex, EXx }, 0 },
6c30d220 11207 },
9e30b8e0 11208 {
592a252b 11209 /* VEX_W_0F3817_P_2 */
bf890a93 11210 { "vptest", { XM, EXx }, 0 },
9e30b8e0 11211 },
bcf2684f 11212 {
6c30d220 11213 /* VEX_W_0F3818_P_2 */
bf890a93 11214 { "vbroadcastss", { XM, EXxmm_md }, 0 },
bcf2684f 11215 },
9e30b8e0 11216 {
6c30d220 11217 /* VEX_W_0F3819_P_2 */
bf890a93 11218 { "vbroadcastsd", { XM, EXxmm_mq }, 0 },
9e30b8e0
L
11219 },
11220 {
592a252b 11221 /* VEX_W_0F381A_P_2_M_0 */
bf890a93 11222 { "vbroadcastf128", { XM, Mxmm }, 0 },
9e30b8e0
L
11223 },
11224 {
592a252b 11225 /* VEX_W_0F381C_P_2 */
bf890a93 11226 { "vpabsb", { XM, EXx }, 0 },
9e30b8e0
L
11227 },
11228 {
592a252b 11229 /* VEX_W_0F381D_P_2 */
bf890a93 11230 { "vpabsw", { XM, EXx }, 0 },
9e30b8e0
L
11231 },
11232 {
592a252b 11233 /* VEX_W_0F381E_P_2 */
bf890a93 11234 { "vpabsd", { XM, EXx }, 0 },
9e30b8e0
L
11235 },
11236 {
592a252b 11237 /* VEX_W_0F3820_P_2 */
bf890a93 11238 { "vpmovsxbw", { XM, EXxmmq }, 0 },
9e30b8e0
L
11239 },
11240 {
592a252b 11241 /* VEX_W_0F3821_P_2 */
bf890a93 11242 { "vpmovsxbd", { XM, EXxmmqd }, 0 },
9e30b8e0
L
11243 },
11244 {
592a252b 11245 /* VEX_W_0F3822_P_2 */
bf890a93 11246 { "vpmovsxbq", { XM, EXxmmdw }, 0 },
9e30b8e0
L
11247 },
11248 {
592a252b 11249 /* VEX_W_0F3823_P_2 */
bf890a93 11250 { "vpmovsxwd", { XM, EXxmmq }, 0 },
9e30b8e0
L
11251 },
11252 {
592a252b 11253 /* VEX_W_0F3824_P_2 */
bf890a93 11254 { "vpmovsxwq", { XM, EXxmmqd }, 0 },
9e30b8e0
L
11255 },
11256 {
592a252b 11257 /* VEX_W_0F3825_P_2 */
bf890a93 11258 { "vpmovsxdq", { XM, EXxmmq }, 0 },
9e30b8e0
L
11259 },
11260 {
592a252b 11261 /* VEX_W_0F3828_P_2 */
bf890a93 11262 { "vpmuldq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11263 },
11264 {
592a252b 11265 /* VEX_W_0F3829_P_2 */
bf890a93 11266 { "vpcmpeqq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11267 },
11268 {
592a252b 11269 /* VEX_W_0F382A_P_2_M_0 */
bf890a93 11270 { "vmovntdqa", { XM, Mx }, 0 },
9e30b8e0
L
11271 },
11272 {
592a252b 11273 /* VEX_W_0F382B_P_2 */
bf890a93 11274 { "vpackusdw", { XM, Vex, EXx }, 0 },
9e30b8e0 11275 },
53aa04a0 11276 {
592a252b 11277 /* VEX_W_0F382C_P_2_M_0 */
bf890a93 11278 { "vmaskmovps", { XM, Vex, Mx }, 0 },
53aa04a0
L
11279 },
11280 {
592a252b 11281 /* VEX_W_0F382D_P_2_M_0 */
bf890a93 11282 { "vmaskmovpd", { XM, Vex, Mx }, 0 },
53aa04a0
L
11283 },
11284 {
592a252b 11285 /* VEX_W_0F382E_P_2_M_0 */
bf890a93 11286 { "vmaskmovps", { Mx, Vex, XM }, 0 },
53aa04a0
L
11287 },
11288 {
592a252b 11289 /* VEX_W_0F382F_P_2_M_0 */
bf890a93 11290 { "vmaskmovpd", { Mx, Vex, XM }, 0 },
53aa04a0 11291 },
9e30b8e0 11292 {
592a252b 11293 /* VEX_W_0F3830_P_2 */
bf890a93 11294 { "vpmovzxbw", { XM, EXxmmq }, 0 },
9e30b8e0
L
11295 },
11296 {
592a252b 11297 /* VEX_W_0F3831_P_2 */
bf890a93 11298 { "vpmovzxbd", { XM, EXxmmqd }, 0 },
9e30b8e0
L
11299 },
11300 {
592a252b 11301 /* VEX_W_0F3832_P_2 */
bf890a93 11302 { "vpmovzxbq", { XM, EXxmmdw }, 0 },
9e30b8e0
L
11303 },
11304 {
592a252b 11305 /* VEX_W_0F3833_P_2 */
bf890a93 11306 { "vpmovzxwd", { XM, EXxmmq }, 0 },
9e30b8e0
L
11307 },
11308 {
592a252b 11309 /* VEX_W_0F3834_P_2 */
bf890a93 11310 { "vpmovzxwq", { XM, EXxmmqd }, 0 },
9e30b8e0
L
11311 },
11312 {
592a252b 11313 /* VEX_W_0F3835_P_2 */
bf890a93 11314 { "vpmovzxdq", { XM, EXxmmq }, 0 },
6c30d220
L
11315 },
11316 {
11317 /* VEX_W_0F3836_P_2 */
bf890a93 11318 { "vpermd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11319 },
11320 {
592a252b 11321 /* VEX_W_0F3837_P_2 */
bf890a93 11322 { "vpcmpgtq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11323 },
11324 {
592a252b 11325 /* VEX_W_0F3838_P_2 */
bf890a93 11326 { "vpminsb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11327 },
11328 {
592a252b 11329 /* VEX_W_0F3839_P_2 */
bf890a93 11330 { "vpminsd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11331 },
11332 {
592a252b 11333 /* VEX_W_0F383A_P_2 */
bf890a93 11334 { "vpminuw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11335 },
11336 {
592a252b 11337 /* VEX_W_0F383B_P_2 */
bf890a93 11338 { "vpminud", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11339 },
11340 {
592a252b 11341 /* VEX_W_0F383C_P_2 */
bf890a93 11342 { "vpmaxsb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11343 },
11344 {
592a252b 11345 /* VEX_W_0F383D_P_2 */
bf890a93 11346 { "vpmaxsd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11347 },
11348 {
592a252b 11349 /* VEX_W_0F383E_P_2 */
bf890a93 11350 { "vpmaxuw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11351 },
11352 {
592a252b 11353 /* VEX_W_0F383F_P_2 */
bf890a93 11354 { "vpmaxud", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11355 },
11356 {
592a252b 11357 /* VEX_W_0F3840_P_2 */
bf890a93 11358 { "vpmulld", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11359 },
11360 {
592a252b 11361 /* VEX_W_0F3841_P_2 */
bf890a93 11362 { "vphminposuw", { XM, EXx }, 0 },
9e30b8e0 11363 },
6c30d220
L
11364 {
11365 /* VEX_W_0F3846_P_2 */
bf890a93 11366 { "vpsravd", { XM, Vex, EXx }, 0 },
6c30d220
L
11367 },
11368 {
11369 /* VEX_W_0F3858_P_2 */
bf890a93 11370 { "vpbroadcastd", { XM, EXxmm_md }, 0 },
6c30d220
L
11371 },
11372 {
11373 /* VEX_W_0F3859_P_2 */
bf890a93 11374 { "vpbroadcastq", { XM, EXxmm_mq }, 0 },
6c30d220
L
11375 },
11376 {
11377 /* VEX_W_0F385A_P_2_M_0 */
bf890a93 11378 { "vbroadcasti128", { XM, Mxmm }, 0 },
6c30d220
L
11379 },
11380 {
11381 /* VEX_W_0F3878_P_2 */
bf890a93 11382 { "vpbroadcastb", { XM, EXxmm_mb }, 0 },
6c30d220
L
11383 },
11384 {
11385 /* VEX_W_0F3879_P_2 */
bf890a93 11386 { "vpbroadcastw", { XM, EXxmm_mw }, 0 },
6c30d220 11387 },
9e30b8e0 11388 {
592a252b 11389 /* VEX_W_0F38DB_P_2 */
bf890a93 11390 { "vaesimc", { XM, EXx }, 0 },
9e30b8e0
L
11391 },
11392 {
592a252b 11393 /* VEX_W_0F38DC_P_2 */
bf890a93 11394 { "vaesenc", { XM, Vex128, EXx }, 0 },
9e30b8e0
L
11395 },
11396 {
592a252b 11397 /* VEX_W_0F38DD_P_2 */
bf890a93 11398 { "vaesenclast", { XM, Vex128, EXx }, 0 },
9e30b8e0
L
11399 },
11400 {
592a252b 11401 /* VEX_W_0F38DE_P_2 */
bf890a93 11402 { "vaesdec", { XM, Vex128, EXx }, 0 },
9e30b8e0
L
11403 },
11404 {
592a252b 11405 /* VEX_W_0F38DF_P_2 */
bf890a93 11406 { "vaesdeclast", { XM, Vex128, EXx }, 0 },
9e30b8e0 11407 },
6c30d220
L
11408 {
11409 /* VEX_W_0F3A00_P_2 */
11410 { Bad_Opcode },
bf890a93 11411 { "vpermq", { XM, EXx, Ib }, 0 },
6c30d220
L
11412 },
11413 {
11414 /* VEX_W_0F3A01_P_2 */
11415 { Bad_Opcode },
bf890a93 11416 { "vpermpd", { XM, EXx, Ib }, 0 },
6c30d220
L
11417 },
11418 {
11419 /* VEX_W_0F3A02_P_2 */
bf890a93 11420 { "vpblendd", { XM, Vex, EXx, Ib }, 0 },
6c30d220 11421 },
9e30b8e0 11422 {
592a252b 11423 /* VEX_W_0F3A04_P_2 */
bf890a93 11424 { "vpermilps", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11425 },
11426 {
592a252b 11427 /* VEX_W_0F3A05_P_2 */
bf890a93 11428 { "vpermilpd", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11429 },
11430 {
592a252b 11431 /* VEX_W_0F3A06_P_2 */
bf890a93 11432 { "vperm2f128", { XM, Vex256, EXx, Ib }, 0 },
9e30b8e0
L
11433 },
11434 {
592a252b 11435 /* VEX_W_0F3A08_P_2 */
bf890a93 11436 { "vroundps", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11437 },
11438 {
592a252b 11439 /* VEX_W_0F3A09_P_2 */
bf890a93 11440 { "vroundpd", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11441 },
11442 {
592a252b 11443 /* VEX_W_0F3A0A_P_2 */
bf890a93 11444 { "vroundss", { XMScalar, VexScalar, EXdScalar, Ib }, 0 },
9e30b8e0
L
11445 },
11446 {
592a252b 11447 /* VEX_W_0F3A0B_P_2 */
bf890a93 11448 { "vroundsd", { XMScalar, VexScalar, EXqScalar, Ib }, 0 },
9e30b8e0
L
11449 },
11450 {
592a252b 11451 /* VEX_W_0F3A0C_P_2 */
bf890a93 11452 { "vblendps", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11453 },
11454 {
592a252b 11455 /* VEX_W_0F3A0D_P_2 */
bf890a93 11456 { "vblendpd", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11457 },
11458 {
592a252b 11459 /* VEX_W_0F3A0E_P_2 */
bf890a93 11460 { "vpblendw", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11461 },
11462 {
592a252b 11463 /* VEX_W_0F3A0F_P_2 */
bf890a93 11464 { "vpalignr", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11465 },
11466 {
592a252b 11467 /* VEX_W_0F3A14_P_2 */
bf890a93 11468 { "vpextrb", { Edqb, XM, Ib }, 0 },
9e30b8e0
L
11469 },
11470 {
592a252b 11471 /* VEX_W_0F3A15_P_2 */
bf890a93 11472 { "vpextrw", { Edqw, XM, Ib }, 0 },
9e30b8e0
L
11473 },
11474 {
592a252b 11475 /* VEX_W_0F3A18_P_2 */
bf890a93 11476 { "vinsertf128", { XM, Vex256, EXxmm, Ib }, 0 },
9e30b8e0
L
11477 },
11478 {
592a252b 11479 /* VEX_W_0F3A19_P_2 */
bf890a93 11480 { "vextractf128", { EXxmm, XM, Ib }, 0 },
9e30b8e0
L
11481 },
11482 {
592a252b 11483 /* VEX_W_0F3A20_P_2 */
bf890a93 11484 { "vpinsrb", { XM, Vex128, Edqb, Ib }, 0 },
9e30b8e0
L
11485 },
11486 {
592a252b 11487 /* VEX_W_0F3A21_P_2 */
bf890a93 11488 { "vinsertps", { XM, Vex128, EXd, Ib }, 0 },
9e30b8e0 11489 },
43234a1e 11490 {
1ba585e8 11491 /* VEX_W_0F3A30_P_2_LEN_0 */
bf890a93
IT
11492 { "kshiftrb", { MaskG, MaskR, Ib }, 0 },
11493 { "kshiftrw", { MaskG, MaskR, Ib }, 0 },
43234a1e
L
11494 },
11495 {
1ba585e8 11496 /* VEX_W_0F3A31_P_2_LEN_0 */
bf890a93
IT
11497 { "kshiftrd", { MaskG, MaskR, Ib }, 0 },
11498 { "kshiftrq", { MaskG, MaskR, Ib }, 0 },
1ba585e8
IT
11499 },
11500 {
11501 /* VEX_W_0F3A32_P_2_LEN_0 */
bf890a93
IT
11502 { "kshiftlb", { MaskG, MaskR, Ib }, 0 },
11503 { "kshiftlw", { MaskG, MaskR, Ib }, 0 },
43234a1e 11504 },
1ba585e8
IT
11505 {
11506 /* VEX_W_0F3A33_P_2_LEN_0 */
bf890a93
IT
11507 { "kshiftld", { MaskG, MaskR, Ib }, 0 },
11508 { "kshiftlq", { MaskG, MaskR, Ib }, 0 },
1ba585e8 11509 },
6c30d220
L
11510 {
11511 /* VEX_W_0F3A38_P_2 */
bf890a93 11512 { "vinserti128", { XM, Vex256, EXxmm, Ib }, 0 },
6c30d220
L
11513 },
11514 {
11515 /* VEX_W_0F3A39_P_2 */
bf890a93 11516 { "vextracti128", { EXxmm, XM, Ib }, 0 },
6c30d220 11517 },
9e30b8e0 11518 {
592a252b 11519 /* VEX_W_0F3A40_P_2 */
bf890a93 11520 { "vdpps", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11521 },
11522 {
592a252b 11523 /* VEX_W_0F3A41_P_2 */
bf890a93 11524 { "vdppd", { XM, Vex128, EXx, Ib }, 0 },
9e30b8e0
L
11525 },
11526 {
592a252b 11527 /* VEX_W_0F3A42_P_2 */
bf890a93 11528 { "vmpsadbw", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11529 },
11530 {
592a252b 11531 /* VEX_W_0F3A44_P_2 */
bf890a93 11532 { "vpclmulqdq", { XM, Vex128, EXx, PCLMUL }, 0 },
9e30b8e0 11533 },
6c30d220
L
11534 {
11535 /* VEX_W_0F3A46_P_2 */
bf890a93 11536 { "vperm2i128", { XM, Vex256, EXx, Ib }, 0 },
6c30d220 11537 },
a683cc34 11538 {
592a252b 11539 /* VEX_W_0F3A48_P_2 */
bf890a93
IT
11540 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
11541 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
a683cc34
SP
11542 },
11543 {
592a252b 11544 /* VEX_W_0F3A49_P_2 */
bf890a93
IT
11545 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
11546 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
a683cc34 11547 },
9e30b8e0 11548 {
592a252b 11549 /* VEX_W_0F3A4A_P_2 */
bf890a93 11550 { "vblendvps", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0
L
11551 },
11552 {
592a252b 11553 /* VEX_W_0F3A4B_P_2 */
bf890a93 11554 { "vblendvpd", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0
L
11555 },
11556 {
592a252b 11557 /* VEX_W_0F3A4C_P_2 */
bf890a93 11558 { "vpblendvb", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0
L
11559 },
11560 {
592a252b 11561 /* VEX_W_0F3A60_P_2 */
bf890a93 11562 { "vpcmpestrm", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11563 },
11564 {
592a252b 11565 /* VEX_W_0F3A61_P_2 */
bf890a93 11566 { "vpcmpestri", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11567 },
11568 {
592a252b 11569 /* VEX_W_0F3A62_P_2 */
bf890a93 11570 { "vpcmpistrm", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11571 },
11572 {
592a252b 11573 /* VEX_W_0F3A63_P_2 */
bf890a93 11574 { "vpcmpistri", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11575 },
11576 {
592a252b 11577 /* VEX_W_0F3ADF_P_2 */
bf890a93 11578 { "vaeskeygenassist", { XM, EXx, Ib }, 0 },
9e30b8e0 11579 },
43234a1e
L
11580#define NEED_VEX_W_TABLE
11581#include "i386-dis-evex.h"
11582#undef NEED_VEX_W_TABLE
9e30b8e0
L
11583};
11584
11585static const struct dis386 mod_table[][2] = {
11586 {
11587 /* MOD_8D */
bf890a93 11588 { "leaS", { Gv, M }, 0 },
9e30b8e0 11589 },
42164a71
L
11590 {
11591 /* MOD_C6_REG_7 */
11592 { Bad_Opcode },
11593 { RM_TABLE (RM_C6_REG_7) },
11594 },
11595 {
11596 /* MOD_C7_REG_7 */
11597 { Bad_Opcode },
11598 { RM_TABLE (RM_C7_REG_7) },
11599 },
4a357820
MZ
11600 {
11601 /* MOD_FF_REG_3 */
a72d2af2 11602 { "Jcall^", { indirEp }, 0 },
4a357820
MZ
11603 },
11604 {
11605 /* MOD_FF_REG_5 */
a72d2af2 11606 { "Jjmp^", { indirEp }, 0 },
4a357820 11607 },
9e30b8e0
L
11608 {
11609 /* MOD_0F01_REG_0 */
11610 { X86_64_TABLE (X86_64_0F01_REG_0) },
11611 { RM_TABLE (RM_0F01_REG_0) },
11612 },
11613 {
11614 /* MOD_0F01_REG_1 */
11615 { X86_64_TABLE (X86_64_0F01_REG_1) },
11616 { RM_TABLE (RM_0F01_REG_1) },
11617 },
11618 {
11619 /* MOD_0F01_REG_2 */
11620 { X86_64_TABLE (X86_64_0F01_REG_2) },
11621 { RM_TABLE (RM_0F01_REG_2) },
11622 },
11623 {
11624 /* MOD_0F01_REG_3 */
11625 { X86_64_TABLE (X86_64_0F01_REG_3) },
11626 { RM_TABLE (RM_0F01_REG_3) },
11627 },
11628 {
11629 /* MOD_0F01_REG_7 */
bf890a93 11630 { "invlpg", { Mb }, 0 },
9e30b8e0
L
11631 { RM_TABLE (RM_0F01_REG_7) },
11632 },
11633 {
11634 /* MOD_0F12_PREFIX_0 */
507bd325
L
11635 { "movlps", { XM, EXq }, PREFIX_OPCODE },
11636 { "movhlps", { XM, EXq }, PREFIX_OPCODE },
9e30b8e0
L
11637 },
11638 {
11639 /* MOD_0F13 */
507bd325 11640 { "movlpX", { EXq, XM }, PREFIX_OPCODE },
9e30b8e0
L
11641 },
11642 {
11643 /* MOD_0F16_PREFIX_0 */
bf890a93
IT
11644 { "movhps", { XM, EXq }, 0 },
11645 { "movlhps", { XM, EXq }, 0 },
9e30b8e0
L
11646 },
11647 {
11648 /* MOD_0F17 */
507bd325 11649 { "movhpX", { EXq, XM }, PREFIX_OPCODE },
9e30b8e0
L
11650 },
11651 {
11652 /* MOD_0F18_REG_0 */
bf890a93 11653 { "prefetchnta", { Mb }, 0 },
9e30b8e0
L
11654 },
11655 {
11656 /* MOD_0F18_REG_1 */
bf890a93 11657 { "prefetcht0", { Mb }, 0 },
9e30b8e0
L
11658 },
11659 {
11660 /* MOD_0F18_REG_2 */
bf890a93 11661 { "prefetcht1", { Mb }, 0 },
9e30b8e0
L
11662 },
11663 {
11664 /* MOD_0F18_REG_3 */
bf890a93 11665 { "prefetcht2", { Mb }, 0 },
9e30b8e0 11666 },
d7189fa5
RM
11667 {
11668 /* MOD_0F18_REG_4 */
bf890a93 11669 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
11670 },
11671 {
11672 /* MOD_0F18_REG_5 */
bf890a93 11673 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
11674 },
11675 {
11676 /* MOD_0F18_REG_6 */
bf890a93 11677 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
11678 },
11679 {
11680 /* MOD_0F18_REG_7 */
bf890a93 11681 { "nop/reserved", { Mb }, 0 },
d7189fa5 11682 },
7e8b059b
L
11683 {
11684 /* MOD_0F1A_PREFIX_0 */
bf890a93
IT
11685 { "bndldx", { Gbnd, Ev_bnd }, 0 },
11686 { "nopQ", { Ev }, 0 },
7e8b059b
L
11687 },
11688 {
11689 /* MOD_0F1B_PREFIX_0 */
bf890a93
IT
11690 { "bndstx", { Ev_bnd, Gbnd }, 0 },
11691 { "nopQ", { Ev }, 0 },
7e8b059b
L
11692 },
11693 {
11694 /* MOD_0F1B_PREFIX_1 */
bf890a93
IT
11695 { "bndmk", { Gbnd, Ev_bnd }, 0 },
11696 { "nopQ", { Ev }, 0 },
7e8b059b 11697 },
b844680a 11698 {
92fddf8e 11699 /* MOD_0F24 */
7bb15c6f 11700 { Bad_Opcode },
bf890a93 11701 { "movL", { Rd, Td }, 0 },
b844680a
L
11702 },
11703 {
92fddf8e 11704 /* MOD_0F26 */
592d1631 11705 { Bad_Opcode },
bf890a93 11706 { "movL", { Td, Rd }, 0 },
b844680a 11707 },
75c135a8
L
11708 {
11709 /* MOD_0F2B_PREFIX_0 */
507bd325 11710 {"movntps", { Mx, XM }, PREFIX_OPCODE },
75c135a8
L
11711 },
11712 {
11713 /* MOD_0F2B_PREFIX_1 */
507bd325 11714 {"movntss", { Md, XM }, PREFIX_OPCODE },
75c135a8
L
11715 },
11716 {
11717 /* MOD_0F2B_PREFIX_2 */
507bd325 11718 {"movntpd", { Mx, XM }, PREFIX_OPCODE },
75c135a8
L
11719 },
11720 {
11721 /* MOD_0F2B_PREFIX_3 */
507bd325 11722 {"movntsd", { Mq, XM }, PREFIX_OPCODE },
75c135a8
L
11723 },
11724 {
11725 /* MOD_0F51 */
592d1631 11726 { Bad_Opcode },
507bd325 11727 { "movmskpX", { Gdq, XS }, PREFIX_OPCODE },
75c135a8 11728 },
b844680a 11729 {
1ceb70f8 11730 /* MOD_0F71_REG_2 */
592d1631 11731 { Bad_Opcode },
bf890a93 11732 { "psrlw", { MS, Ib }, 0 },
b844680a
L
11733 },
11734 {
1ceb70f8 11735 /* MOD_0F71_REG_4 */
592d1631 11736 { Bad_Opcode },
bf890a93 11737 { "psraw", { MS, Ib }, 0 },
b844680a
L
11738 },
11739 {
1ceb70f8 11740 /* MOD_0F71_REG_6 */
592d1631 11741 { Bad_Opcode },
bf890a93 11742 { "psllw", { MS, Ib }, 0 },
b844680a
L
11743 },
11744 {
1ceb70f8 11745 /* MOD_0F72_REG_2 */
592d1631 11746 { Bad_Opcode },
bf890a93 11747 { "psrld", { MS, Ib }, 0 },
b844680a
L
11748 },
11749 {
1ceb70f8 11750 /* MOD_0F72_REG_4 */
592d1631 11751 { Bad_Opcode },
bf890a93 11752 { "psrad", { MS, Ib }, 0 },
b844680a
L
11753 },
11754 {
1ceb70f8 11755 /* MOD_0F72_REG_6 */
592d1631 11756 { Bad_Opcode },
bf890a93 11757 { "pslld", { MS, Ib }, 0 },
b844680a
L
11758 },
11759 {
1ceb70f8 11760 /* MOD_0F73_REG_2 */
592d1631 11761 { Bad_Opcode },
bf890a93 11762 { "psrlq", { MS, Ib }, 0 },
b844680a
L
11763 },
11764 {
1ceb70f8 11765 /* MOD_0F73_REG_3 */
592d1631 11766 { Bad_Opcode },
c0f3af97
L
11767 { PREFIX_TABLE (PREFIX_0F73_REG_3) },
11768 },
11769 {
11770 /* MOD_0F73_REG_6 */
592d1631 11771 { Bad_Opcode },
bf890a93 11772 { "psllq", { MS, Ib }, 0 },
c0f3af97
L
11773 },
11774 {
11775 /* MOD_0F73_REG_7 */
592d1631 11776 { Bad_Opcode },
c0f3af97
L
11777 { PREFIX_TABLE (PREFIX_0F73_REG_7) },
11778 },
11779 {
11780 /* MOD_0FAE_REG_0 */
bf890a93 11781 { "fxsave", { FXSAVE }, 0 },
c7b8aa3a 11782 { PREFIX_TABLE (PREFIX_0FAE_REG_0) },
c0f3af97
L
11783 },
11784 {
11785 /* MOD_0FAE_REG_1 */
bf890a93 11786 { "fxrstor", { FXSAVE }, 0 },
c7b8aa3a 11787 { PREFIX_TABLE (PREFIX_0FAE_REG_1) },
c0f3af97
L
11788 },
11789 {
11790 /* MOD_0FAE_REG_2 */
bf890a93 11791 { "ldmxcsr", { Md }, 0 },
c7b8aa3a 11792 { PREFIX_TABLE (PREFIX_0FAE_REG_2) },
c0f3af97
L
11793 },
11794 {
11795 /* MOD_0FAE_REG_3 */
bf890a93 11796 { "stmxcsr", { Md }, 0 },
c7b8aa3a 11797 { PREFIX_TABLE (PREFIX_0FAE_REG_3) },
c0f3af97
L
11798 },
11799 {
11800 /* MOD_0FAE_REG_4 */
bf890a93 11801 { "xsave", { FXSAVE }, 0 },
c0f3af97
L
11802 },
11803 {
11804 /* MOD_0FAE_REG_5 */
bf890a93 11805 { "xrstor", { FXSAVE }, 0 },
c0f3af97
L
11806 { RM_TABLE (RM_0FAE_REG_5) },
11807 },
11808 {
11809 /* MOD_0FAE_REG_6 */
c5e7287a 11810 { PREFIX_TABLE (PREFIX_0FAE_REG_6) },
c0f3af97
L
11811 { RM_TABLE (RM_0FAE_REG_6) },
11812 },
11813 {
11814 /* MOD_0FAE_REG_7 */
963f3586 11815 { PREFIX_TABLE (PREFIX_0FAE_REG_7) },
c0f3af97
L
11816 { RM_TABLE (RM_0FAE_REG_7) },
11817 },
11818 {
11819 /* MOD_0FB2 */
bf890a93 11820 { "lssS", { Gv, Mp }, 0 },
c0f3af97
L
11821 },
11822 {
11823 /* MOD_0FB4 */
bf890a93 11824 { "lfsS", { Gv, Mp }, 0 },
c0f3af97
L
11825 },
11826 {
11827 /* MOD_0FB5 */
bf890a93 11828 { "lgsS", { Gv, Mp }, 0 },
c0f3af97 11829 },
a8484f96
L
11830 {
11831 /* MOD_0FC3 */
11832 { PREFIX_TABLE (PREFIX_MOD_0_0FC3) },
11833 },
963f3586
IT
11834 {
11835 /* MOD_0FC7_REG_3 */
a8484f96 11836 { "xrstors", { FXSAVE }, 0 },
963f3586
IT
11837 },
11838 {
11839 /* MOD_0FC7_REG_4 */
bf890a93 11840 { "xsavec", { FXSAVE }, 0 },
963f3586
IT
11841 },
11842 {
11843 /* MOD_0FC7_REG_5 */
bf890a93 11844 { "xsaves", { FXSAVE }, 0 },
963f3586 11845 },
c0f3af97
L
11846 {
11847 /* MOD_0FC7_REG_6 */
f24bcbaa
L
11848 { PREFIX_TABLE (PREFIX_MOD_0_0FC7_REG_6) },
11849 { PREFIX_TABLE (PREFIX_MOD_3_0FC7_REG_6) }
c0f3af97
L
11850 },
11851 {
11852 /* MOD_0FC7_REG_7 */
bf890a93 11853 { "vmptrst", { Mq }, 0 },
f24bcbaa 11854 { PREFIX_TABLE (PREFIX_MOD_3_0FC7_REG_7) }
c0f3af97
L
11855 },
11856 {
11857 /* MOD_0FD7 */
592d1631 11858 { Bad_Opcode },
bf890a93 11859 { "pmovmskb", { Gdq, MS }, 0 },
c0f3af97
L
11860 },
11861 {
11862 /* MOD_0FE7_PREFIX_2 */
bf890a93 11863 { "movntdq", { Mx, XM }, 0 },
c0f3af97
L
11864 },
11865 {
11866 /* MOD_0FF0_PREFIX_3 */
bf890a93 11867 { "lddqu", { XM, M }, 0 },
c0f3af97
L
11868 },
11869 {
11870 /* MOD_0F382A_PREFIX_2 */
bf890a93 11871 { "movntdqa", { XM, Mx }, 0 },
c0f3af97
L
11872 },
11873 {
11874 /* MOD_62_32BIT */
bf890a93 11875 { "bound{S|}", { Gv, Ma }, 0 },
43234a1e 11876 { EVEX_TABLE (EVEX_0F) },
c0f3af97
L
11877 },
11878 {
11879 /* MOD_C4_32BIT */
bf890a93 11880 { "lesS", { Gv, Mp }, 0 },
c0f3af97
L
11881 { VEX_C4_TABLE (VEX_0F) },
11882 },
11883 {
11884 /* MOD_C5_32BIT */
bf890a93 11885 { "ldsS", { Gv, Mp }, 0 },
c0f3af97
L
11886 { VEX_C5_TABLE (VEX_0F) },
11887 },
11888 {
592a252b
L
11889 /* MOD_VEX_0F12_PREFIX_0 */
11890 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0) },
11891 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1) },
c0f3af97
L
11892 },
11893 {
592a252b
L
11894 /* MOD_VEX_0F13 */
11895 { VEX_LEN_TABLE (VEX_LEN_0F13_M_0) },
c0f3af97
L
11896 },
11897 {
592a252b
L
11898 /* MOD_VEX_0F16_PREFIX_0 */
11899 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0) },
11900 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1) },
c0f3af97
L
11901 },
11902 {
592a252b
L
11903 /* MOD_VEX_0F17 */
11904 { VEX_LEN_TABLE (VEX_LEN_0F17_M_0) },
c0f3af97
L
11905 },
11906 {
592a252b
L
11907 /* MOD_VEX_0F2B */
11908 { VEX_W_TABLE (VEX_W_0F2B_M_0) },
c0f3af97
L
11909 },
11910 {
592a252b 11911 /* MOD_VEX_0F50 */
592d1631 11912 { Bad_Opcode },
592a252b 11913 { VEX_W_TABLE (VEX_W_0F50_M_0) },
c0f3af97
L
11914 },
11915 {
592a252b 11916 /* MOD_VEX_0F71_REG_2 */
592d1631 11917 { Bad_Opcode },
592a252b 11918 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2) },
b844680a
L
11919 },
11920 {
592a252b 11921 /* MOD_VEX_0F71_REG_4 */
592d1631 11922 { Bad_Opcode },
592a252b 11923 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4) },
b844680a
L
11924 },
11925 {
592a252b 11926 /* MOD_VEX_0F71_REG_6 */
592d1631 11927 { Bad_Opcode },
592a252b 11928 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6) },
b844680a
L
11929 },
11930 {
592a252b 11931 /* MOD_VEX_0F72_REG_2 */
592d1631 11932 { Bad_Opcode },
592a252b 11933 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2) },
b844680a 11934 },
d8faab4e 11935 {
592a252b 11936 /* MOD_VEX_0F72_REG_4 */
592d1631 11937 { Bad_Opcode },
592a252b 11938 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4) },
d8faab4e
L
11939 },
11940 {
592a252b 11941 /* MOD_VEX_0F72_REG_6 */
592d1631 11942 { Bad_Opcode },
592a252b 11943 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6) },
d8faab4e 11944 },
876d4bfa 11945 {
592a252b 11946 /* MOD_VEX_0F73_REG_2 */
592d1631 11947 { Bad_Opcode },
592a252b 11948 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2) },
876d4bfa
L
11949 },
11950 {
592a252b 11951 /* MOD_VEX_0F73_REG_3 */
592d1631 11952 { Bad_Opcode },
592a252b 11953 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3) },
475a2301
L
11954 },
11955 {
592a252b 11956 /* MOD_VEX_0F73_REG_6 */
592d1631 11957 { Bad_Opcode },
592a252b 11958 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6) },
876d4bfa
L
11959 },
11960 {
592a252b 11961 /* MOD_VEX_0F73_REG_7 */
592d1631 11962 { Bad_Opcode },
592a252b 11963 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7) },
876d4bfa
L
11964 },
11965 {
592a252b
L
11966 /* MOD_VEX_0FAE_REG_2 */
11967 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0) },
876d4bfa 11968 },
bbedc832 11969 {
592a252b
L
11970 /* MOD_VEX_0FAE_REG_3 */
11971 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0) },
bbedc832 11972 },
144c41d9 11973 {
592a252b 11974 /* MOD_VEX_0FD7_PREFIX_2 */
592d1631 11975 { Bad_Opcode },
6c30d220 11976 { VEX_W_TABLE (VEX_W_0FD7_P_2_M_1) },
144c41d9 11977 },
1afd85e3 11978 {
592a252b
L
11979 /* MOD_VEX_0FE7_PREFIX_2 */
11980 { VEX_W_TABLE (VEX_W_0FE7_P_2_M_0) },
1afd85e3
L
11981 },
11982 {
592a252b
L
11983 /* MOD_VEX_0FF0_PREFIX_3 */
11984 { VEX_W_TABLE (VEX_W_0FF0_P_3_M_0) },
92fddf8e 11985 },
75c135a8 11986 {
592a252b
L
11987 /* MOD_VEX_0F381A_PREFIX_2 */
11988 { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0) },
75c135a8 11989 },
1afd85e3 11990 {
592a252b 11991 /* MOD_VEX_0F382A_PREFIX_2 */
6c30d220 11992 { VEX_W_TABLE (VEX_W_0F382A_P_2_M_0) },
1afd85e3 11993 },
75c135a8 11994 {
592a252b
L
11995 /* MOD_VEX_0F382C_PREFIX_2 */
11996 { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0) },
75c135a8 11997 },
1afd85e3 11998 {
592a252b
L
11999 /* MOD_VEX_0F382D_PREFIX_2 */
12000 { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0) },
1afd85e3
L
12001 },
12002 {
592a252b
L
12003 /* MOD_VEX_0F382E_PREFIX_2 */
12004 { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0) },
1afd85e3
L
12005 },
12006 {
592a252b
L
12007 /* MOD_VEX_0F382F_PREFIX_2 */
12008 { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0) },
1afd85e3 12009 },
6c30d220
L
12010 {
12011 /* MOD_VEX_0F385A_PREFIX_2 */
12012 { VEX_LEN_TABLE (VEX_LEN_0F385A_P_2_M_0) },
12013 },
12014 {
12015 /* MOD_VEX_0F388C_PREFIX_2 */
bf890a93 12016 { "vpmaskmov%LW", { XM, Vex, Mx }, 0 },
6c30d220
L
12017 },
12018 {
12019 /* MOD_VEX_0F388E_PREFIX_2 */
bf890a93 12020 { "vpmaskmov%LW", { Mx, Vex, XM }, 0 },
6c30d220 12021 },
43234a1e
L
12022#define NEED_MOD_TABLE
12023#include "i386-dis-evex.h"
12024#undef NEED_MOD_TABLE
b844680a
L
12025};
12026
1ceb70f8 12027static const struct dis386 rm_table[][8] = {
42164a71
L
12028 {
12029 /* RM_C6_REG_7 */
bf890a93 12030 { "xabort", { Skip_MODRM, Ib }, 0 },
42164a71
L
12031 },
12032 {
12033 /* RM_C7_REG_7 */
bf890a93 12034 { "xbeginT", { Skip_MODRM, Jv }, 0 },
42164a71 12035 },
b844680a 12036 {
1ceb70f8 12037 /* RM_0F01_REG_0 */
592d1631 12038 { Bad_Opcode },
bf890a93
IT
12039 { "vmcall", { Skip_MODRM }, 0 },
12040 { "vmlaunch", { Skip_MODRM }, 0 },
12041 { "vmresume", { Skip_MODRM }, 0 },
12042 { "vmxoff", { Skip_MODRM }, 0 },
b844680a
L
12043 },
12044 {
1ceb70f8 12045 /* RM_0F01_REG_1 */
bf890a93
IT
12046 { "monitor", { { OP_Monitor, 0 } }, 0 },
12047 { "mwait", { { OP_Mwait, 0 } }, 0 },
12048 { "clac", { Skip_MODRM }, 0 },
12049 { "stac", { Skip_MODRM }, 0 },
2cf200a4
IT
12050 { Bad_Opcode },
12051 { Bad_Opcode },
12052 { Bad_Opcode },
bf890a93 12053 { "encls", { Skip_MODRM }, 0 },
b844680a 12054 },
475a2301
L
12055 {
12056 /* RM_0F01_REG_2 */
bf890a93
IT
12057 { "xgetbv", { Skip_MODRM }, 0 },
12058 { "xsetbv", { Skip_MODRM }, 0 },
8729a6f6
L
12059 { Bad_Opcode },
12060 { Bad_Opcode },
bf890a93
IT
12061 { "vmfunc", { Skip_MODRM }, 0 },
12062 { "xend", { Skip_MODRM }, 0 },
12063 { "xtest", { Skip_MODRM }, 0 },
12064 { "enclu", { Skip_MODRM }, 0 },
475a2301 12065 },
b844680a 12066 {
1ceb70f8 12067 /* RM_0F01_REG_3 */
bf890a93
IT
12068 { "vmrun", { Skip_MODRM }, 0 },
12069 { "vmmcall", { Skip_MODRM }, 0 },
12070 { "vmload", { Skip_MODRM }, 0 },
12071 { "vmsave", { Skip_MODRM }, 0 },
12072 { "stgi", { Skip_MODRM }, 0 },
12073 { "clgi", { Skip_MODRM }, 0 },
12074 { "skinit", { Skip_MODRM }, 0 },
12075 { "invlpga", { Skip_MODRM }, 0 },
4e7d34a6
L
12076 },
12077 {
1ceb70f8 12078 /* RM_0F01_REG_7 */
bf890a93
IT
12079 { "swapgs", { Skip_MODRM }, 0 },
12080 { "rdtscp", { Skip_MODRM }, 0 },
9916071f
AP
12081 { "monitorx", { { OP_Monitor, 0 } }, 0 },
12082 { "mwaitx", { { OP_Mwaitx, 0 } }, 0 },
bf890a93 12083 { "clzero", { Skip_MODRM }, 0 },
b844680a
L
12084 },
12085 {
1ceb70f8 12086 /* RM_0FAE_REG_5 */
bf890a93 12087 { "lfence", { Skip_MODRM }, 0 },
b844680a
L
12088 },
12089 {
1ceb70f8 12090 /* RM_0FAE_REG_6 */
bf890a93 12091 { "mfence", { Skip_MODRM }, 0 },
b844680a 12092 },
bbedc832 12093 {
1ceb70f8 12094 /* RM_0FAE_REG_7 */
9d8596f0 12095 { PREFIX_TABLE (PREFIX_RM_0_0FAE_REG_7) },
144c41d9 12096 },
b844680a
L
12097};
12098
c608c12e
AM
12099#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
12100
f16cd0d5
L
12101/* We use the high bit to indicate different name for the same
12102 prefix. */
f16cd0d5 12103#define REP_PREFIX (0xf3 | 0x100)
42164a71
L
12104#define XACQUIRE_PREFIX (0xf2 | 0x200)
12105#define XRELEASE_PREFIX (0xf3 | 0x400)
7e8b059b 12106#define BND_PREFIX (0xf2 | 0x400)
f16cd0d5
L
12107
12108static int
26ca5450 12109ckprefix (void)
252b5132 12110{
f16cd0d5 12111 int newrex, i, length;
52b15da3 12112 rex = 0;
c0f3af97 12113 rex_ignored = 0;
252b5132 12114 prefixes = 0;
7d421014 12115 used_prefixes = 0;
52b15da3 12116 rex_used = 0;
f16cd0d5
L
12117 last_lock_prefix = -1;
12118 last_repz_prefix = -1;
12119 last_repnz_prefix = -1;
12120 last_data_prefix = -1;
12121 last_addr_prefix = -1;
12122 last_rex_prefix = -1;
12123 last_seg_prefix = -1;
d9949a36 12124 fwait_prefix = -1;
285ca992 12125 active_seg_prefix = 0;
f310f33d
L
12126 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
12127 all_prefixes[i] = 0;
12128 i = 0;
f16cd0d5
L
12129 length = 0;
12130 /* The maximum instruction length is 15bytes. */
12131 while (length < MAX_CODE_LENGTH - 1)
252b5132
RH
12132 {
12133 FETCH_DATA (the_info, codep + 1);
52b15da3 12134 newrex = 0;
252b5132
RH
12135 switch (*codep)
12136 {
52b15da3
JH
12137 /* REX prefixes family. */
12138 case 0x40:
12139 case 0x41:
12140 case 0x42:
12141 case 0x43:
12142 case 0x44:
12143 case 0x45:
12144 case 0x46:
12145 case 0x47:
12146 case 0x48:
12147 case 0x49:
12148 case 0x4a:
12149 case 0x4b:
12150 case 0x4c:
12151 case 0x4d:
12152 case 0x4e:
12153 case 0x4f:
f16cd0d5
L
12154 if (address_mode == mode_64bit)
12155 newrex = *codep;
12156 else
12157 return 1;
12158 last_rex_prefix = i;
52b15da3 12159 break;
252b5132
RH
12160 case 0xf3:
12161 prefixes |= PREFIX_REPZ;
f16cd0d5 12162 last_repz_prefix = i;
252b5132
RH
12163 break;
12164 case 0xf2:
12165 prefixes |= PREFIX_REPNZ;
f16cd0d5 12166 last_repnz_prefix = i;
252b5132
RH
12167 break;
12168 case 0xf0:
12169 prefixes |= PREFIX_LOCK;
f16cd0d5 12170 last_lock_prefix = i;
252b5132
RH
12171 break;
12172 case 0x2e:
12173 prefixes |= PREFIX_CS;
f16cd0d5 12174 last_seg_prefix = i;
285ca992 12175 active_seg_prefix = PREFIX_CS;
252b5132
RH
12176 break;
12177 case 0x36:
12178 prefixes |= PREFIX_SS;
f16cd0d5 12179 last_seg_prefix = i;
285ca992 12180 active_seg_prefix = PREFIX_SS;
252b5132
RH
12181 break;
12182 case 0x3e:
12183 prefixes |= PREFIX_DS;
f16cd0d5 12184 last_seg_prefix = i;
285ca992 12185 active_seg_prefix = PREFIX_DS;
252b5132
RH
12186 break;
12187 case 0x26:
12188 prefixes |= PREFIX_ES;
f16cd0d5 12189 last_seg_prefix = i;
285ca992 12190 active_seg_prefix = PREFIX_ES;
252b5132
RH
12191 break;
12192 case 0x64:
12193 prefixes |= PREFIX_FS;
f16cd0d5 12194 last_seg_prefix = i;
285ca992 12195 active_seg_prefix = PREFIX_FS;
252b5132
RH
12196 break;
12197 case 0x65:
12198 prefixes |= PREFIX_GS;
f16cd0d5 12199 last_seg_prefix = i;
285ca992 12200 active_seg_prefix = PREFIX_GS;
252b5132
RH
12201 break;
12202 case 0x66:
12203 prefixes |= PREFIX_DATA;
f16cd0d5 12204 last_data_prefix = i;
252b5132
RH
12205 break;
12206 case 0x67:
12207 prefixes |= PREFIX_ADDR;
f16cd0d5 12208 last_addr_prefix = i;
252b5132 12209 break;
5076851f 12210 case FWAIT_OPCODE:
252b5132
RH
12211 /* fwait is really an instruction. If there are prefixes
12212 before the fwait, they belong to the fwait, *not* to the
12213 following instruction. */
d9949a36 12214 fwait_prefix = i;
3e7d61b2 12215 if (prefixes || rex)
252b5132
RH
12216 {
12217 prefixes |= PREFIX_FWAIT;
12218 codep++;
6c067bbb
RM
12219 /* This ensures that the previous REX prefixes are noticed
12220 as unused prefixes, as in the return case below. */
12221 rex_used = rex;
f16cd0d5 12222 return 1;
252b5132
RH
12223 }
12224 prefixes = PREFIX_FWAIT;
12225 break;
12226 default:
f16cd0d5 12227 return 1;
252b5132 12228 }
52b15da3
JH
12229 /* Rex is ignored when followed by another prefix. */
12230 if (rex)
12231 {
3e7d61b2 12232 rex_used = rex;
f16cd0d5 12233 return 1;
52b15da3 12234 }
f16cd0d5
L
12235 if (*codep != FWAIT_OPCODE)
12236 all_prefixes[i++] = *codep;
52b15da3 12237 rex = newrex;
252b5132 12238 codep++;
f16cd0d5
L
12239 length++;
12240 }
12241 return 0;
12242}
12243
7d421014
ILT
12244/* Return the name of the prefix byte PREF, or NULL if PREF is not a
12245 prefix byte. */
12246
12247static const char *
26ca5450 12248prefix_name (int pref, int sizeflag)
7d421014 12249{
0003779b
L
12250 static const char *rexes [16] =
12251 {
12252 "rex", /* 0x40 */
12253 "rex.B", /* 0x41 */
12254 "rex.X", /* 0x42 */
12255 "rex.XB", /* 0x43 */
12256 "rex.R", /* 0x44 */
12257 "rex.RB", /* 0x45 */
12258 "rex.RX", /* 0x46 */
12259 "rex.RXB", /* 0x47 */
12260 "rex.W", /* 0x48 */
12261 "rex.WB", /* 0x49 */
12262 "rex.WX", /* 0x4a */
12263 "rex.WXB", /* 0x4b */
12264 "rex.WR", /* 0x4c */
12265 "rex.WRB", /* 0x4d */
12266 "rex.WRX", /* 0x4e */
12267 "rex.WRXB", /* 0x4f */
12268 };
12269
7d421014
ILT
12270 switch (pref)
12271 {
52b15da3
JH
12272 /* REX prefixes family. */
12273 case 0x40:
52b15da3 12274 case 0x41:
52b15da3 12275 case 0x42:
52b15da3 12276 case 0x43:
52b15da3 12277 case 0x44:
52b15da3 12278 case 0x45:
52b15da3 12279 case 0x46:
52b15da3 12280 case 0x47:
52b15da3 12281 case 0x48:
52b15da3 12282 case 0x49:
52b15da3 12283 case 0x4a:
52b15da3 12284 case 0x4b:
52b15da3 12285 case 0x4c:
52b15da3 12286 case 0x4d:
52b15da3 12287 case 0x4e:
52b15da3 12288 case 0x4f:
0003779b 12289 return rexes [pref - 0x40];
7d421014
ILT
12290 case 0xf3:
12291 return "repz";
12292 case 0xf2:
12293 return "repnz";
12294 case 0xf0:
12295 return "lock";
12296 case 0x2e:
12297 return "cs";
12298 case 0x36:
12299 return "ss";
12300 case 0x3e:
12301 return "ds";
12302 case 0x26:
12303 return "es";
12304 case 0x64:
12305 return "fs";
12306 case 0x65:
12307 return "gs";
12308 case 0x66:
12309 return (sizeflag & DFLAG) ? "data16" : "data32";
12310 case 0x67:
cb712a9e 12311 if (address_mode == mode_64bit)
db6eb5be 12312 return (sizeflag & AFLAG) ? "addr32" : "addr64";
c1a64871 12313 else
2888cb7a 12314 return (sizeflag & AFLAG) ? "addr16" : "addr32";
7d421014
ILT
12315 case FWAIT_OPCODE:
12316 return "fwait";
f16cd0d5
L
12317 case REP_PREFIX:
12318 return "rep";
42164a71
L
12319 case XACQUIRE_PREFIX:
12320 return "xacquire";
12321 case XRELEASE_PREFIX:
12322 return "xrelease";
7e8b059b
L
12323 case BND_PREFIX:
12324 return "bnd";
7d421014
ILT
12325 default:
12326 return NULL;
12327 }
12328}
12329
ce518a5f
L
12330static char op_out[MAX_OPERANDS][100];
12331static int op_ad, op_index[MAX_OPERANDS];
1d9f512f 12332static int two_source_ops;
ce518a5f
L
12333static bfd_vma op_address[MAX_OPERANDS];
12334static bfd_vma op_riprel[MAX_OPERANDS];
52b15da3 12335static bfd_vma start_pc;
ce518a5f 12336
252b5132
RH
12337/*
12338 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
12339 * (see topic "Redundant prefixes" in the "Differences from 8086"
12340 * section of the "Virtual 8086 Mode" chapter.)
12341 * 'pc' should be the address of this instruction, it will
12342 * be used to print the target address if this is a relative jump or call
12343 * The function returns the length of this instruction in bytes.
12344 */
12345
252b5132 12346static char intel_syntax;
9d141669 12347static char intel_mnemonic = !SYSV386_COMPAT;
252b5132
RH
12348static char open_char;
12349static char close_char;
12350static char separator_char;
12351static char scale_char;
12352
5db04b09
L
12353enum x86_64_isa
12354{
12355 amd64 = 0,
12356 intel64
12357};
12358
12359static enum x86_64_isa isa64;
12360
e396998b
AM
12361/* Here for backwards compatibility. When gdb stops using
12362 print_insn_i386_att and print_insn_i386_intel these functions can
12363 disappear, and print_insn_i386 be merged into print_insn. */
252b5132 12364int
26ca5450 12365print_insn_i386_att (bfd_vma pc, disassemble_info *info)
252b5132
RH
12366{
12367 intel_syntax = 0;
e396998b
AM
12368
12369 return print_insn (pc, info);
252b5132
RH
12370}
12371
12372int
26ca5450 12373print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
252b5132
RH
12374{
12375 intel_syntax = 1;
e396998b
AM
12376
12377 return print_insn (pc, info);
252b5132
RH
12378}
12379
e396998b 12380int
26ca5450 12381print_insn_i386 (bfd_vma pc, disassemble_info *info)
e396998b
AM
12382{
12383 intel_syntax = -1;
12384
12385 return print_insn (pc, info);
12386}
12387
f59a29b9
L
12388void
12389print_i386_disassembler_options (FILE *stream)
12390{
12391 fprintf (stream, _("\n\
12392The following i386/x86-64 specific disassembler options are supported for use\n\
12393with the -M switch (multiple options should be separated by commas):\n"));
12394
12395 fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
12396 fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
12397 fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
12398 fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
12399 fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
9d141669
L
12400 fprintf (stream, _(" att-mnemonic\n"
12401 " Display instruction in AT&T mnemonic\n"));
12402 fprintf (stream, _(" intel-mnemonic\n"
12403 " Display instruction in Intel mnemonic\n"));
f59a29b9
L
12404 fprintf (stream, _(" addr64 Assume 64bit address size\n"));
12405 fprintf (stream, _(" addr32 Assume 32bit address size\n"));
12406 fprintf (stream, _(" addr16 Assume 16bit address size\n"));
12407 fprintf (stream, _(" data32 Assume 32bit data size\n"));
12408 fprintf (stream, _(" data16 Assume 16bit data size\n"));
12409 fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
5db04b09
L
12410 fprintf (stream, _(" amd64 Display instruction in AMD64 ISA\n"));
12411 fprintf (stream, _(" intel64 Display instruction in Intel64 ISA\n"));
f59a29b9
L
12412}
12413
592d1631 12414/* Bad opcode. */
bf890a93 12415static const struct dis386 bad_opcode = { "(bad)", { XX }, 0 };
592d1631 12416
b844680a
L
12417/* Get a pointer to struct dis386 with a valid name. */
12418
12419static const struct dis386 *
8bb15339 12420get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
b844680a 12421{
91d6fa6a 12422 int vindex, vex_table_index;
b844680a
L
12423
12424 if (dp->name != NULL)
12425 return dp;
12426
12427 switch (dp->op[0].bytemode)
12428 {
1ceb70f8
L
12429 case USE_REG_TABLE:
12430 dp = &reg_table[dp->op[1].bytemode][modrm.reg];
12431 break;
12432
12433 case USE_MOD_TABLE:
91d6fa6a
NC
12434 vindex = modrm.mod == 0x3 ? 1 : 0;
12435 dp = &mod_table[dp->op[1].bytemode][vindex];
1ceb70f8
L
12436 break;
12437
12438 case USE_RM_TABLE:
12439 dp = &rm_table[dp->op[1].bytemode][modrm.rm];
b844680a
L
12440 break;
12441
4e7d34a6 12442 case USE_PREFIX_TABLE:
c0f3af97 12443 if (need_vex)
b844680a 12444 {
c0f3af97
L
12445 /* The prefix in VEX is implicit. */
12446 switch (vex.prefix)
12447 {
12448 case 0:
91d6fa6a 12449 vindex = 0;
c0f3af97
L
12450 break;
12451 case REPE_PREFIX_OPCODE:
91d6fa6a 12452 vindex = 1;
c0f3af97
L
12453 break;
12454 case DATA_PREFIX_OPCODE:
91d6fa6a 12455 vindex = 2;
c0f3af97
L
12456 break;
12457 case REPNE_PREFIX_OPCODE:
91d6fa6a 12458 vindex = 3;
c0f3af97
L
12459 break;
12460 default:
12461 abort ();
12462 break;
12463 }
b844680a 12464 }
7bb15c6f 12465 else
b844680a 12466 {
285ca992
L
12467 int last_prefix = -1;
12468 int prefix = 0;
91d6fa6a 12469 vindex = 0;
285ca992
L
12470 /* We check PREFIX_REPNZ and PREFIX_REPZ before PREFIX_DATA.
12471 When there are multiple PREFIX_REPNZ and PREFIX_REPZ, the
12472 last one wins. */
12473 if ((prefixes & (PREFIX_REPZ | PREFIX_REPNZ)) != 0)
b844680a 12474 {
285ca992 12475 if (last_repz_prefix > last_repnz_prefix)
c0f3af97 12476 {
285ca992
L
12477 vindex = 1;
12478 prefix = PREFIX_REPZ;
12479 last_prefix = last_repz_prefix;
c0f3af97
L
12480 }
12481 else
b844680a 12482 {
285ca992
L
12483 vindex = 3;
12484 prefix = PREFIX_REPNZ;
12485 last_prefix = last_repnz_prefix;
b844680a 12486 }
285ca992 12487
507bd325
L
12488 /* Check if prefix should be ignored. */
12489 if ((((prefix_table[dp->op[1].bytemode][vindex].prefix_requirement
12490 & PREFIX_IGNORED) >> PREFIX_IGNORED_SHIFT)
12491 & prefix) != 0)
285ca992
L
12492 vindex = 0;
12493 }
12494
12495 if (vindex == 0 && (prefixes & PREFIX_DATA) != 0)
12496 {
12497 vindex = 2;
12498 prefix = PREFIX_DATA;
12499 last_prefix = last_data_prefix;
12500 }
12501
12502 if (vindex != 0)
12503 {
12504 used_prefixes |= prefix;
12505 all_prefixes[last_prefix] = 0;
b844680a
L
12506 }
12507 }
91d6fa6a 12508 dp = &prefix_table[dp->op[1].bytemode][vindex];
b844680a
L
12509 break;
12510
4e7d34a6 12511 case USE_X86_64_TABLE:
91d6fa6a
NC
12512 vindex = address_mode == mode_64bit ? 1 : 0;
12513 dp = &x86_64_table[dp->op[1].bytemode][vindex];
b844680a
L
12514 break;
12515
4e7d34a6 12516 case USE_3BYTE_TABLE:
8bb15339 12517 FETCH_DATA (info, codep + 2);
91d6fa6a
NC
12518 vindex = *codep++;
12519 dp = &three_byte_table[dp->op[1].bytemode][vindex];
285ca992 12520 end_codep = codep;
8bb15339
L
12521 modrm.mod = (*codep >> 6) & 3;
12522 modrm.reg = (*codep >> 3) & 7;
12523 modrm.rm = *codep & 7;
12524 break;
12525
c0f3af97
L
12526 case USE_VEX_LEN_TABLE:
12527 if (!need_vex)
12528 abort ();
12529
12530 switch (vex.length)
12531 {
12532 case 128:
91d6fa6a 12533 vindex = 0;
c0f3af97
L
12534 break;
12535 case 256:
91d6fa6a 12536 vindex = 1;
c0f3af97
L
12537 break;
12538 default:
12539 abort ();
12540 break;
12541 }
12542
91d6fa6a 12543 dp = &vex_len_table[dp->op[1].bytemode][vindex];
c0f3af97
L
12544 break;
12545
f88c9eb0
SP
12546 case USE_XOP_8F_TABLE:
12547 FETCH_DATA (info, codep + 3);
12548 /* All bits in the REX prefix are ignored. */
12549 rex_ignored = rex;
12550 rex = ~(*codep >> 5) & 0x7;
12551
12552 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
12553 switch ((*codep & 0x1f))
12554 {
12555 default:
f07af43e
L
12556 dp = &bad_opcode;
12557 return dp;
5dd85c99
SP
12558 case 0x8:
12559 vex_table_index = XOP_08;
12560 break;
f88c9eb0
SP
12561 case 0x9:
12562 vex_table_index = XOP_09;
12563 break;
12564 case 0xa:
12565 vex_table_index = XOP_0A;
12566 break;
12567 }
12568 codep++;
12569 vex.w = *codep & 0x80;
12570 if (vex.w && address_mode == mode_64bit)
12571 rex |= REX_W;
12572
12573 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12574 if (address_mode != mode_64bit
12575 && vex.register_specifier > 0x7)
f07af43e
L
12576 {
12577 dp = &bad_opcode;
12578 return dp;
12579 }
f88c9eb0
SP
12580
12581 vex.length = (*codep & 0x4) ? 256 : 128;
12582 switch ((*codep & 0x3))
12583 {
12584 case 0:
12585 vex.prefix = 0;
12586 break;
12587 case 1:
12588 vex.prefix = DATA_PREFIX_OPCODE;
12589 break;
12590 case 2:
12591 vex.prefix = REPE_PREFIX_OPCODE;
12592 break;
12593 case 3:
12594 vex.prefix = REPNE_PREFIX_OPCODE;
12595 break;
12596 }
12597 need_vex = 1;
12598 need_vex_reg = 1;
12599 codep++;
91d6fa6a
NC
12600 vindex = *codep++;
12601 dp = &xop_table[vex_table_index][vindex];
c48244a5 12602
285ca992 12603 end_codep = codep;
c48244a5
SP
12604 FETCH_DATA (info, codep + 1);
12605 modrm.mod = (*codep >> 6) & 3;
12606 modrm.reg = (*codep >> 3) & 7;
12607 modrm.rm = *codep & 7;
f88c9eb0
SP
12608 break;
12609
c0f3af97 12610 case USE_VEX_C4_TABLE:
43234a1e 12611 /* VEX prefix. */
c0f3af97
L
12612 FETCH_DATA (info, codep + 3);
12613 /* All bits in the REX prefix are ignored. */
12614 rex_ignored = rex;
12615 rex = ~(*codep >> 5) & 0x7;
12616 switch ((*codep & 0x1f))
12617 {
12618 default:
f07af43e
L
12619 dp = &bad_opcode;
12620 return dp;
c0f3af97 12621 case 0x1:
f88c9eb0 12622 vex_table_index = VEX_0F;
c0f3af97
L
12623 break;
12624 case 0x2:
f88c9eb0 12625 vex_table_index = VEX_0F38;
c0f3af97
L
12626 break;
12627 case 0x3:
f88c9eb0 12628 vex_table_index = VEX_0F3A;
c0f3af97
L
12629 break;
12630 }
12631 codep++;
12632 vex.w = *codep & 0x80;
12633 if (vex.w && address_mode == mode_64bit)
12634 rex |= REX_W;
12635
12636 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12637 if (address_mode != mode_64bit
12638 && vex.register_specifier > 0x7)
f07af43e
L
12639 {
12640 dp = &bad_opcode;
12641 return dp;
12642 }
c0f3af97
L
12643
12644 vex.length = (*codep & 0x4) ? 256 : 128;
12645 switch ((*codep & 0x3))
12646 {
12647 case 0:
12648 vex.prefix = 0;
12649 break;
12650 case 1:
12651 vex.prefix = DATA_PREFIX_OPCODE;
12652 break;
12653 case 2:
12654 vex.prefix = REPE_PREFIX_OPCODE;
12655 break;
12656 case 3:
12657 vex.prefix = REPNE_PREFIX_OPCODE;
12658 break;
12659 }
12660 need_vex = 1;
12661 need_vex_reg = 1;
12662 codep++;
91d6fa6a
NC
12663 vindex = *codep++;
12664 dp = &vex_table[vex_table_index][vindex];
285ca992 12665 end_codep = codep;
c0f3af97 12666 /* There is no MODRM byte for VEX [82|77]. */
91d6fa6a 12667 if (vindex != 0x77 && vindex != 0x82)
c0f3af97
L
12668 {
12669 FETCH_DATA (info, codep + 1);
12670 modrm.mod = (*codep >> 6) & 3;
12671 modrm.reg = (*codep >> 3) & 7;
12672 modrm.rm = *codep & 7;
12673 }
12674 break;
12675
12676 case USE_VEX_C5_TABLE:
43234a1e 12677 /* VEX prefix. */
c0f3af97
L
12678 FETCH_DATA (info, codep + 2);
12679 /* All bits in the REX prefix are ignored. */
12680 rex_ignored = rex;
12681 rex = (*codep & 0x80) ? 0 : REX_R;
12682
12683 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12684 if (address_mode != mode_64bit
12685 && vex.register_specifier > 0x7)
f07af43e
L
12686 {
12687 dp = &bad_opcode;
12688 return dp;
12689 }
c0f3af97 12690
759a05ce
L
12691 vex.w = 0;
12692
c0f3af97
L
12693 vex.length = (*codep & 0x4) ? 256 : 128;
12694 switch ((*codep & 0x3))
12695 {
12696 case 0:
12697 vex.prefix = 0;
12698 break;
12699 case 1:
12700 vex.prefix = DATA_PREFIX_OPCODE;
12701 break;
12702 case 2:
12703 vex.prefix = REPE_PREFIX_OPCODE;
12704 break;
12705 case 3:
12706 vex.prefix = REPNE_PREFIX_OPCODE;
12707 break;
12708 }
12709 need_vex = 1;
12710 need_vex_reg = 1;
12711 codep++;
91d6fa6a
NC
12712 vindex = *codep++;
12713 dp = &vex_table[dp->op[1].bytemode][vindex];
285ca992 12714 end_codep = codep;
c0f3af97 12715 /* There is no MODRM byte for VEX [82|77]. */
91d6fa6a 12716 if (vindex != 0x77 && vindex != 0x82)
c0f3af97
L
12717 {
12718 FETCH_DATA (info, codep + 1);
12719 modrm.mod = (*codep >> 6) & 3;
12720 modrm.reg = (*codep >> 3) & 7;
12721 modrm.rm = *codep & 7;
12722 }
12723 break;
12724
9e30b8e0
L
12725 case USE_VEX_W_TABLE:
12726 if (!need_vex)
12727 abort ();
12728
12729 dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
12730 break;
12731
43234a1e
L
12732 case USE_EVEX_TABLE:
12733 two_source_ops = 0;
12734 /* EVEX prefix. */
12735 vex.evex = 1;
12736 FETCH_DATA (info, codep + 4);
12737 /* All bits in the REX prefix are ignored. */
12738 rex_ignored = rex;
12739 /* The first byte after 0x62. */
12740 rex = ~(*codep >> 5) & 0x7;
12741 vex.r = *codep & 0x10;
12742 switch ((*codep & 0xf))
12743 {
12744 default:
12745 return &bad_opcode;
12746 case 0x1:
12747 vex_table_index = EVEX_0F;
12748 break;
12749 case 0x2:
12750 vex_table_index = EVEX_0F38;
12751 break;
12752 case 0x3:
12753 vex_table_index = EVEX_0F3A;
12754 break;
12755 }
12756
12757 /* The second byte after 0x62. */
12758 codep++;
12759 vex.w = *codep & 0x80;
12760 if (vex.w && address_mode == mode_64bit)
12761 rex |= REX_W;
12762
12763 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12764 if (address_mode != mode_64bit)
12765 {
12766 /* In 16/32-bit mode silently ignore following bits. */
12767 rex &= ~REX_B;
12768 vex.r = 1;
12769 vex.v = 1;
12770 vex.register_specifier &= 0x7;
12771 }
12772
12773 /* The U bit. */
12774 if (!(*codep & 0x4))
12775 return &bad_opcode;
12776
12777 switch ((*codep & 0x3))
12778 {
12779 case 0:
12780 vex.prefix = 0;
12781 break;
12782 case 1:
12783 vex.prefix = DATA_PREFIX_OPCODE;
12784 break;
12785 case 2:
12786 vex.prefix = REPE_PREFIX_OPCODE;
12787 break;
12788 case 3:
12789 vex.prefix = REPNE_PREFIX_OPCODE;
12790 break;
12791 }
12792
12793 /* The third byte after 0x62. */
12794 codep++;
12795
12796 /* Remember the static rounding bits. */
12797 vex.ll = (*codep >> 5) & 3;
12798 vex.b = (*codep & 0x10) != 0;
12799
12800 vex.v = *codep & 0x8;
12801 vex.mask_register_specifier = *codep & 0x7;
12802 vex.zeroing = *codep & 0x80;
12803
12804 need_vex = 1;
12805 need_vex_reg = 1;
12806 codep++;
12807 vindex = *codep++;
12808 dp = &evex_table[vex_table_index][vindex];
285ca992 12809 end_codep = codep;
43234a1e
L
12810 FETCH_DATA (info, codep + 1);
12811 modrm.mod = (*codep >> 6) & 3;
12812 modrm.reg = (*codep >> 3) & 7;
12813 modrm.rm = *codep & 7;
12814
12815 /* Set vector length. */
12816 if (modrm.mod == 3 && vex.b)
12817 vex.length = 512;
12818 else
12819 {
12820 switch (vex.ll)
12821 {
12822 case 0x0:
12823 vex.length = 128;
12824 break;
12825 case 0x1:
12826 vex.length = 256;
12827 break;
12828 case 0x2:
12829 vex.length = 512;
12830 break;
12831 default:
12832 return &bad_opcode;
12833 }
12834 }
12835 break;
12836
592d1631
L
12837 case 0:
12838 dp = &bad_opcode;
12839 break;
12840
b844680a 12841 default:
d34b5006 12842 abort ();
b844680a
L
12843 }
12844
12845 if (dp->name != NULL)
12846 return dp;
12847 else
8bb15339 12848 return get_valid_dis386 (dp, info);
b844680a
L
12849}
12850
dfc8cf43 12851static void
55cf16e1 12852get_sib (disassemble_info *info, int sizeflag)
dfc8cf43
L
12853{
12854 /* If modrm.mod == 3, operand must be register. */
12855 if (need_modrm
55cf16e1 12856 && ((sizeflag & AFLAG) || address_mode == mode_64bit)
dfc8cf43
L
12857 && modrm.mod != 3
12858 && modrm.rm == 4)
12859 {
12860 FETCH_DATA (info, codep + 2);
12861 sib.index = (codep [1] >> 3) & 7;
12862 sib.scale = (codep [1] >> 6) & 3;
12863 sib.base = codep [1] & 7;
12864 }
12865}
12866
e396998b 12867static int
26ca5450 12868print_insn (bfd_vma pc, disassemble_info *info)
252b5132 12869{
2da11e11 12870 const struct dis386 *dp;
252b5132 12871 int i;
ce518a5f 12872 char *op_txt[MAX_OPERANDS];
252b5132 12873 int needcomma;
df18fdba 12874 int sizeflag, orig_sizeflag;
e396998b 12875 const char *p;
252b5132 12876 struct dis_private priv;
f16cd0d5 12877 int prefix_length;
252b5132 12878
d7921315
L
12879 priv.orig_sizeflag = AFLAG | DFLAG;
12880 if ((info->mach & bfd_mach_i386_i386) != 0)
cb712a9e 12881 address_mode = mode_32bit;
2da11e11 12882 else if (info->mach == bfd_mach_i386_i8086)
d7921315
L
12883 {
12884 address_mode = mode_16bit;
12885 priv.orig_sizeflag = 0;
12886 }
2da11e11 12887 else
d7921315
L
12888 address_mode = mode_64bit;
12889
12890 if (intel_syntax == (char) -1)
12891 intel_syntax = (info->mach & bfd_mach_i386_intel_syntax) != 0;
e396998b
AM
12892
12893 for (p = info->disassembler_options; p != NULL; )
12894 {
5db04b09
L
12895 if (CONST_STRNEQ (p, "amd64"))
12896 isa64 = amd64;
12897 else if (CONST_STRNEQ (p, "intel64"))
12898 isa64 = intel64;
12899 else if (CONST_STRNEQ (p, "x86-64"))
e396998b 12900 {
cb712a9e 12901 address_mode = mode_64bit;
e396998b
AM
12902 priv.orig_sizeflag = AFLAG | DFLAG;
12903 }
0112cd26 12904 else if (CONST_STRNEQ (p, "i386"))
e396998b 12905 {
cb712a9e 12906 address_mode = mode_32bit;
e396998b
AM
12907 priv.orig_sizeflag = AFLAG | DFLAG;
12908 }
0112cd26 12909 else if (CONST_STRNEQ (p, "i8086"))
e396998b 12910 {
cb712a9e 12911 address_mode = mode_16bit;
e396998b
AM
12912 priv.orig_sizeflag = 0;
12913 }
0112cd26 12914 else if (CONST_STRNEQ (p, "intel"))
e396998b
AM
12915 {
12916 intel_syntax = 1;
9d141669
L
12917 if (CONST_STRNEQ (p + 5, "-mnemonic"))
12918 intel_mnemonic = 1;
e396998b 12919 }
0112cd26 12920 else if (CONST_STRNEQ (p, "att"))
e396998b
AM
12921 {
12922 intel_syntax = 0;
9d141669
L
12923 if (CONST_STRNEQ (p + 3, "-mnemonic"))
12924 intel_mnemonic = 0;
e396998b 12925 }
0112cd26 12926 else if (CONST_STRNEQ (p, "addr"))
e396998b 12927 {
f59a29b9
L
12928 if (address_mode == mode_64bit)
12929 {
12930 if (p[4] == '3' && p[5] == '2')
12931 priv.orig_sizeflag &= ~AFLAG;
12932 else if (p[4] == '6' && p[5] == '4')
12933 priv.orig_sizeflag |= AFLAG;
12934 }
12935 else
12936 {
12937 if (p[4] == '1' && p[5] == '6')
12938 priv.orig_sizeflag &= ~AFLAG;
12939 else if (p[4] == '3' && p[5] == '2')
12940 priv.orig_sizeflag |= AFLAG;
12941 }
e396998b 12942 }
0112cd26 12943 else if (CONST_STRNEQ (p, "data"))
e396998b
AM
12944 {
12945 if (p[4] == '1' && p[5] == '6')
12946 priv.orig_sizeflag &= ~DFLAG;
12947 else if (p[4] == '3' && p[5] == '2')
12948 priv.orig_sizeflag |= DFLAG;
12949 }
0112cd26 12950 else if (CONST_STRNEQ (p, "suffix"))
e396998b
AM
12951 priv.orig_sizeflag |= SUFFIX_ALWAYS;
12952
12953 p = strchr (p, ',');
12954 if (p != NULL)
12955 p++;
12956 }
12957
12958 if (intel_syntax)
12959 {
12960 names64 = intel_names64;
12961 names32 = intel_names32;
12962 names16 = intel_names16;
12963 names8 = intel_names8;
12964 names8rex = intel_names8rex;
12965 names_seg = intel_names_seg;
b9733481 12966 names_mm = intel_names_mm;
7e8b059b 12967 names_bnd = intel_names_bnd;
b9733481
L
12968 names_xmm = intel_names_xmm;
12969 names_ymm = intel_names_ymm;
43234a1e 12970 names_zmm = intel_names_zmm;
db51cc60
L
12971 index64 = intel_index64;
12972 index32 = intel_index32;
43234a1e 12973 names_mask = intel_names_mask;
e396998b
AM
12974 index16 = intel_index16;
12975 open_char = '[';
12976 close_char = ']';
12977 separator_char = '+';
12978 scale_char = '*';
12979 }
12980 else
12981 {
12982 names64 = att_names64;
12983 names32 = att_names32;
12984 names16 = att_names16;
12985 names8 = att_names8;
12986 names8rex = att_names8rex;
12987 names_seg = att_names_seg;
b9733481 12988 names_mm = att_names_mm;
7e8b059b 12989 names_bnd = att_names_bnd;
b9733481
L
12990 names_xmm = att_names_xmm;
12991 names_ymm = att_names_ymm;
43234a1e 12992 names_zmm = att_names_zmm;
db51cc60
L
12993 index64 = att_index64;
12994 index32 = att_index32;
43234a1e 12995 names_mask = att_names_mask;
e396998b
AM
12996 index16 = att_index16;
12997 open_char = '(';
12998 close_char = ')';
12999 separator_char = ',';
13000 scale_char = ',';
13001 }
2da11e11 13002
4fe53c98 13003 /* The output looks better if we put 7 bytes on a line, since that
8a9036a4
L
13004 puts most long word instructions on a single line. Use 8 bytes
13005 for Intel L1OM. */
d7921315 13006 if ((info->mach & bfd_mach_l1om) != 0)
8a9036a4
L
13007 info->bytes_per_line = 8;
13008 else
13009 info->bytes_per_line = 7;
252b5132 13010
26ca5450 13011 info->private_data = &priv;
252b5132
RH
13012 priv.max_fetched = priv.the_buffer;
13013 priv.insn_start = pc;
252b5132
RH
13014
13015 obuf[0] = 0;
ce518a5f
L
13016 for (i = 0; i < MAX_OPERANDS; ++i)
13017 {
13018 op_out[i][0] = 0;
13019 op_index[i] = -1;
13020 }
252b5132
RH
13021
13022 the_info = info;
13023 start_pc = pc;
e396998b
AM
13024 start_codep = priv.the_buffer;
13025 codep = priv.the_buffer;
252b5132 13026
8df14d78 13027 if (OPCODES_SIGSETJMP (priv.bailout) != 0)
5076851f 13028 {
7d421014
ILT
13029 const char *name;
13030
5076851f 13031 /* Getting here means we tried for data but didn't get it. That
e396998b
AM
13032 means we have an incomplete instruction of some sort. Just
13033 print the first byte as a prefix or a .byte pseudo-op. */
13034 if (codep > priv.the_buffer)
5076851f 13035 {
e396998b 13036 name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
7d421014
ILT
13037 if (name != NULL)
13038 (*info->fprintf_func) (info->stream, "%s", name);
13039 else
5076851f 13040 {
7d421014
ILT
13041 /* Just print the first byte as a .byte instruction. */
13042 (*info->fprintf_func) (info->stream, ".byte 0x%x",
e396998b 13043 (unsigned int) priv.the_buffer[0]);
5076851f 13044 }
5076851f 13045
7d421014 13046 return 1;
5076851f
ILT
13047 }
13048
13049 return -1;
13050 }
13051
52b15da3 13052 obufp = obuf;
f16cd0d5
L
13053 sizeflag = priv.orig_sizeflag;
13054
13055 if (!ckprefix () || rex_used)
13056 {
13057 /* Too many prefixes or unused REX prefixes. */
13058 for (i = 0;
f6dd4781 13059 i < (int) ARRAY_SIZE (all_prefixes) && all_prefixes[i];
f16cd0d5 13060 i++)
de882298 13061 (*info->fprintf_func) (info->stream, "%s%s",
6c067bbb 13062 i == 0 ? "" : " ",
f16cd0d5 13063 prefix_name (all_prefixes[i], sizeflag));
de882298 13064 return i;
f16cd0d5 13065 }
252b5132
RH
13066
13067 insn_codep = codep;
13068
13069 FETCH_DATA (info, codep + 1);
13070 two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
13071
3e7d61b2 13072 if (((prefixes & PREFIX_FWAIT)
f16cd0d5 13073 && ((*codep < 0xd8) || (*codep > 0xdf))))
252b5132 13074 {
86a80a50 13075 /* Handle prefixes before fwait. */
d9949a36 13076 for (i = 0; i < fwait_prefix && all_prefixes[i];
86a80a50
L
13077 i++)
13078 (*info->fprintf_func) (info->stream, "%s ",
13079 prefix_name (all_prefixes[i], sizeflag));
f16cd0d5 13080 (*info->fprintf_func) (info->stream, "fwait");
86a80a50 13081 return i + 1;
252b5132
RH
13082 }
13083
252b5132
RH
13084 if (*codep == 0x0f)
13085 {
eec0f4ca 13086 unsigned char threebyte;
252b5132 13087 FETCH_DATA (info, codep + 2);
eec0f4ca
L
13088 threebyte = *++codep;
13089 dp = &dis386_twobyte[threebyte];
252b5132 13090 need_modrm = twobyte_has_modrm[*codep];
eec0f4ca 13091 codep++;
252b5132
RH
13092 }
13093 else
13094 {
6439fc28 13095 dp = &dis386[*codep];
252b5132 13096 need_modrm = onebyte_has_modrm[*codep];
eec0f4ca 13097 codep++;
252b5132 13098 }
246c51aa 13099
df18fdba
L
13100 /* Save sizeflag for printing the extra prefixes later before updating
13101 it for mnemonic and operand processing. The prefix names depend
13102 only on the address mode. */
13103 orig_sizeflag = sizeflag;
c608c12e 13104 if (prefixes & PREFIX_ADDR)
df18fdba 13105 sizeflag ^= AFLAG;
b844680a 13106 if ((prefixes & PREFIX_DATA))
df18fdba 13107 sizeflag ^= DFLAG;
3ffd33cf 13108
285ca992 13109 end_codep = codep;
8bb15339 13110 if (need_modrm)
252b5132
RH
13111 {
13112 FETCH_DATA (info, codep + 1);
7967e09e
L
13113 modrm.mod = (*codep >> 6) & 3;
13114 modrm.reg = (*codep >> 3) & 7;
13115 modrm.rm = *codep & 7;
252b5132
RH
13116 }
13117
42d5f9c6
MS
13118 need_vex = 0;
13119 need_vex_reg = 0;
13120 vex_w_done = 0;
43234a1e 13121 vex.evex = 0;
55b126d4 13122
ce518a5f 13123 if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
252b5132 13124 {
55cf16e1 13125 get_sib (info, sizeflag);
252b5132
RH
13126 dofloat (sizeflag);
13127 }
13128 else
13129 {
8bb15339 13130 dp = get_valid_dis386 (dp, info);
b844680a 13131 if (dp != NULL && putop (dp->name, sizeflag) == 0)
6c067bbb 13132 {
55cf16e1 13133 get_sib (info, sizeflag);
ce518a5f
L
13134 for (i = 0; i < MAX_OPERANDS; ++i)
13135 {
246c51aa 13136 obufp = op_out[i];
ce518a5f
L
13137 op_ad = MAX_OPERANDS - 1 - i;
13138 if (dp->op[i].rtn)
13139 (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
43234a1e
L
13140 /* For EVEX instruction after the last operand masking
13141 should be printed. */
13142 if (i == 0 && vex.evex)
13143 {
13144 /* Don't print {%k0}. */
13145 if (vex.mask_register_specifier)
13146 {
13147 oappend ("{");
13148 oappend (names_mask[vex.mask_register_specifier]);
13149 oappend ("}");
13150 }
13151 if (vex.zeroing)
13152 oappend ("{z}");
13153 }
ce518a5f 13154 }
6439fc28 13155 }
252b5132
RH
13156 }
13157
d869730d 13158 /* Check if the REX prefix is used. */
e2e6193d 13159 if (rex_ignored == 0 && (rex ^ rex_used) == 0 && last_rex_prefix >= 0)
f16cd0d5
L
13160 all_prefixes[last_rex_prefix] = 0;
13161
5e6718e4 13162 /* Check if the SEG prefix is used. */
f16cd0d5
L
13163 if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
13164 | PREFIX_FS | PREFIX_GS)) != 0
285ca992 13165 && (used_prefixes & active_seg_prefix) != 0)
f16cd0d5
L
13166 all_prefixes[last_seg_prefix] = 0;
13167
5e6718e4 13168 /* Check if the ADDR prefix is used. */
f16cd0d5
L
13169 if ((prefixes & PREFIX_ADDR) != 0
13170 && (used_prefixes & PREFIX_ADDR) != 0)
13171 all_prefixes[last_addr_prefix] = 0;
13172
df18fdba
L
13173 /* Check if the DATA prefix is used. */
13174 if ((prefixes & PREFIX_DATA) != 0
13175 && (used_prefixes & PREFIX_DATA) != 0)
13176 all_prefixes[last_data_prefix] = 0;
f16cd0d5 13177
df18fdba 13178 /* Print the extra prefixes. */
f16cd0d5 13179 prefix_length = 0;
f310f33d 13180 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
f16cd0d5
L
13181 if (all_prefixes[i])
13182 {
13183 const char *name;
df18fdba 13184 name = prefix_name (all_prefixes[i], orig_sizeflag);
f16cd0d5
L
13185 if (name == NULL)
13186 abort ();
13187 prefix_length += strlen (name) + 1;
13188 (*info->fprintf_func) (info->stream, "%s ", name);
13189 }
b844680a 13190
285ca992
L
13191 /* If the mandatory PREFIX_REPZ/PREFIX_REPNZ/PREFIX_DATA prefix is
13192 unused, opcode is invalid. Since the PREFIX_DATA prefix may be
13193 used by putop and MMX/SSE operand and may be overriden by the
13194 PREFIX_REPZ/PREFIX_REPNZ fix, we check the PREFIX_DATA prefix
13195 separately. */
3888916d 13196 if (dp->prefix_requirement == PREFIX_OPCODE
285ca992
L
13197 && dp != &bad_opcode
13198 && (((prefixes
13199 & (PREFIX_REPZ | PREFIX_REPNZ)) != 0
13200 && (used_prefixes
13201 & (PREFIX_REPZ | PREFIX_REPNZ)) == 0)
13202 || ((((prefixes
13203 & (PREFIX_REPZ | PREFIX_REPNZ | PREFIX_DATA))
13204 == PREFIX_DATA)
13205 && (used_prefixes & PREFIX_DATA) == 0))))
13206 {
13207 (*info->fprintf_func) (info->stream, "(bad)");
13208 return end_codep - priv.the_buffer;
13209 }
13210
f16cd0d5
L
13211 /* Check maximum code length. */
13212 if ((codep - start_codep) > MAX_CODE_LENGTH)
13213 {
13214 (*info->fprintf_func) (info->stream, "(bad)");
13215 return MAX_CODE_LENGTH;
13216 }
b844680a 13217
ea397f5b 13218 obufp = mnemonicendp;
f16cd0d5 13219 for (i = strlen (obuf) + prefix_length; i < 6; i++)
252b5132
RH
13220 oappend (" ");
13221 oappend (" ");
13222 (*info->fprintf_func) (info->stream, "%s", obuf);
13223
13224 /* The enter and bound instructions are printed with operands in the same
13225 order as the intel book; everything else is printed in reverse order. */
2da11e11 13226 if (intel_syntax || two_source_ops)
252b5132 13227 {
185b1163
L
13228 bfd_vma riprel;
13229
ce518a5f 13230 for (i = 0; i < MAX_OPERANDS; ++i)
6c067bbb 13231 op_txt[i] = op_out[i];
246c51aa 13232
3a8547d2
JB
13233 if (intel_syntax && dp && dp->op[2].rtn == OP_Rounding
13234 && dp->op[3].rtn == OP_E && dp->op[4].rtn == NULL)
13235 {
13236 op_txt[2] = op_out[3];
13237 op_txt[3] = op_out[2];
13238 }
13239
ce518a5f
L
13240 for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
13241 {
6c067bbb
RM
13242 op_ad = op_index[i];
13243 op_index[i] = op_index[MAX_OPERANDS - 1 - i];
13244 op_index[MAX_OPERANDS - 1 - i] = op_ad;
185b1163
L
13245 riprel = op_riprel[i];
13246 op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
13247 op_riprel[MAX_OPERANDS - 1 - i] = riprel;
ce518a5f 13248 }
252b5132
RH
13249 }
13250 else
13251 {
ce518a5f 13252 for (i = 0; i < MAX_OPERANDS; ++i)
6c067bbb 13253 op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
050dfa73
MM
13254 }
13255
ce518a5f
L
13256 needcomma = 0;
13257 for (i = 0; i < MAX_OPERANDS; ++i)
13258 if (*op_txt[i])
13259 {
13260 if (needcomma)
13261 (*info->fprintf_func) (info->stream, ",");
13262 if (op_index[i] != -1 && !op_riprel[i])
13263 (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
13264 else
13265 (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
13266 needcomma = 1;
13267 }
050dfa73 13268
ce518a5f 13269 for (i = 0; i < MAX_OPERANDS; i++)
52b15da3
JH
13270 if (op_index[i] != -1 && op_riprel[i])
13271 {
13272 (*info->fprintf_func) (info->stream, " # ");
13273 (*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
13274 + op_address[op_index[i]]), info);
185b1163 13275 break;
52b15da3 13276 }
e396998b 13277 return codep - priv.the_buffer;
252b5132
RH
13278}
13279
6439fc28 13280static const char *float_mem[] = {
252b5132 13281 /* d8 */
7c52e0e8
L
13282 "fadd{s|}",
13283 "fmul{s|}",
13284 "fcom{s|}",
13285 "fcomp{s|}",
13286 "fsub{s|}",
13287 "fsubr{s|}",
13288 "fdiv{s|}",
13289 "fdivr{s|}",
db6eb5be 13290 /* d9 */
7c52e0e8 13291 "fld{s|}",
252b5132 13292 "(bad)",
7c52e0e8
L
13293 "fst{s|}",
13294 "fstp{s|}",
9306ca4a 13295 "fldenvIC",
252b5132 13296 "fldcw",
9306ca4a 13297 "fNstenvIC",
252b5132
RH
13298 "fNstcw",
13299 /* da */
7c52e0e8
L
13300 "fiadd{l|}",
13301 "fimul{l|}",
13302 "ficom{l|}",
13303 "ficomp{l|}",
13304 "fisub{l|}",
13305 "fisubr{l|}",
13306 "fidiv{l|}",
13307 "fidivr{l|}",
252b5132 13308 /* db */
7c52e0e8
L
13309 "fild{l|}",
13310 "fisttp{l|}",
13311 "fist{l|}",
13312 "fistp{l|}",
252b5132 13313 "(bad)",
6439fc28 13314 "fld{t||t|}",
252b5132 13315 "(bad)",
6439fc28 13316 "fstp{t||t|}",
252b5132 13317 /* dc */
7c52e0e8
L
13318 "fadd{l|}",
13319 "fmul{l|}",
13320 "fcom{l|}",
13321 "fcomp{l|}",
13322 "fsub{l|}",
13323 "fsubr{l|}",
13324 "fdiv{l|}",
13325 "fdivr{l|}",
252b5132 13326 /* dd */
7c52e0e8
L
13327 "fld{l|}",
13328 "fisttp{ll|}",
13329 "fst{l||}",
13330 "fstp{l|}",
9306ca4a 13331 "frstorIC",
252b5132 13332 "(bad)",
9306ca4a 13333 "fNsaveIC",
252b5132
RH
13334 "fNstsw",
13335 /* de */
13336 "fiadd",
13337 "fimul",
13338 "ficom",
13339 "ficomp",
13340 "fisub",
13341 "fisubr",
13342 "fidiv",
13343 "fidivr",
13344 /* df */
13345 "fild",
ca164297 13346 "fisttp",
252b5132
RH
13347 "fist",
13348 "fistp",
13349 "fbld",
7c52e0e8 13350 "fild{ll|}",
252b5132 13351 "fbstp",
7c52e0e8 13352 "fistp{ll|}",
1d9f512f
AM
13353};
13354
13355static const unsigned char float_mem_mode[] = {
13356 /* d8 */
13357 d_mode,
13358 d_mode,
13359 d_mode,
13360 d_mode,
13361 d_mode,
13362 d_mode,
13363 d_mode,
13364 d_mode,
13365 /* d9 */
13366 d_mode,
13367 0,
13368 d_mode,
13369 d_mode,
13370 0,
13371 w_mode,
13372 0,
13373 w_mode,
13374 /* da */
13375 d_mode,
13376 d_mode,
13377 d_mode,
13378 d_mode,
13379 d_mode,
13380 d_mode,
13381 d_mode,
13382 d_mode,
13383 /* db */
13384 d_mode,
13385 d_mode,
13386 d_mode,
13387 d_mode,
13388 0,
9306ca4a 13389 t_mode,
1d9f512f 13390 0,
9306ca4a 13391 t_mode,
1d9f512f
AM
13392 /* dc */
13393 q_mode,
13394 q_mode,
13395 q_mode,
13396 q_mode,
13397 q_mode,
13398 q_mode,
13399 q_mode,
13400 q_mode,
13401 /* dd */
13402 q_mode,
13403 q_mode,
13404 q_mode,
13405 q_mode,
13406 0,
13407 0,
13408 0,
13409 w_mode,
13410 /* de */
13411 w_mode,
13412 w_mode,
13413 w_mode,
13414 w_mode,
13415 w_mode,
13416 w_mode,
13417 w_mode,
13418 w_mode,
13419 /* df */
13420 w_mode,
13421 w_mode,
13422 w_mode,
13423 w_mode,
9306ca4a 13424 t_mode,
1d9f512f 13425 q_mode,
9306ca4a 13426 t_mode,
1d9f512f 13427 q_mode
252b5132
RH
13428};
13429
ce518a5f
L
13430#define ST { OP_ST, 0 }
13431#define STi { OP_STi, 0 }
252b5132 13432
bf890a93
IT
13433#define FGRPd9_2 NULL, { { NULL, 0 } }, 0
13434#define FGRPd9_4 NULL, { { NULL, 1 } }, 0
13435#define FGRPd9_5 NULL, { { NULL, 2 } }, 0
13436#define FGRPd9_6 NULL, { { NULL, 3 } }, 0
13437#define FGRPd9_7 NULL, { { NULL, 4 } }, 0
13438#define FGRPda_5 NULL, { { NULL, 5 } }, 0
13439#define FGRPdb_4 NULL, { { NULL, 6 } }, 0
13440#define FGRPde_3 NULL, { { NULL, 7 } }, 0
13441#define FGRPdf_4 NULL, { { NULL, 8 } }, 0
252b5132 13442
2da11e11 13443static const struct dis386 float_reg[][8] = {
252b5132
RH
13444 /* d8 */
13445 {
bf890a93
IT
13446 { "fadd", { ST, STi }, 0 },
13447 { "fmul", { ST, STi }, 0 },
13448 { "fcom", { STi }, 0 },
13449 { "fcomp", { STi }, 0 },
13450 { "fsub", { ST, STi }, 0 },
13451 { "fsubr", { ST, STi }, 0 },
13452 { "fdiv", { ST, STi }, 0 },
13453 { "fdivr", { ST, STi }, 0 },
252b5132
RH
13454 },
13455 /* d9 */
13456 {
bf890a93
IT
13457 { "fld", { STi }, 0 },
13458 { "fxch", { STi }, 0 },
252b5132 13459 { FGRPd9_2 },
592d1631 13460 { Bad_Opcode },
252b5132
RH
13461 { FGRPd9_4 },
13462 { FGRPd9_5 },
13463 { FGRPd9_6 },
13464 { FGRPd9_7 },
13465 },
13466 /* da */
13467 {
bf890a93
IT
13468 { "fcmovb", { ST, STi }, 0 },
13469 { "fcmove", { ST, STi }, 0 },
13470 { "fcmovbe",{ ST, STi }, 0 },
13471 { "fcmovu", { ST, STi }, 0 },
592d1631 13472 { Bad_Opcode },
252b5132 13473 { FGRPda_5 },
592d1631
L
13474 { Bad_Opcode },
13475 { Bad_Opcode },
252b5132
RH
13476 },
13477 /* db */
13478 {
bf890a93
IT
13479 { "fcmovnb",{ ST, STi }, 0 },
13480 { "fcmovne",{ ST, STi }, 0 },
13481 { "fcmovnbe",{ ST, STi }, 0 },
13482 { "fcmovnu",{ ST, STi }, 0 },
252b5132 13483 { FGRPdb_4 },
bf890a93
IT
13484 { "fucomi", { ST, STi }, 0 },
13485 { "fcomi", { ST, STi }, 0 },
592d1631 13486 { Bad_Opcode },
252b5132
RH
13487 },
13488 /* dc */
13489 {
bf890a93
IT
13490 { "fadd", { STi, ST }, 0 },
13491 { "fmul", { STi, ST }, 0 },
592d1631
L
13492 { Bad_Opcode },
13493 { Bad_Opcode },
bf890a93
IT
13494 { "fsub!M", { STi, ST }, 0 },
13495 { "fsubM", { STi, ST }, 0 },
13496 { "fdiv!M", { STi, ST }, 0 },
13497 { "fdivM", { STi, ST }, 0 },
252b5132
RH
13498 },
13499 /* dd */
13500 {
bf890a93 13501 { "ffree", { STi }, 0 },
592d1631 13502 { Bad_Opcode },
bf890a93
IT
13503 { "fst", { STi }, 0 },
13504 { "fstp", { STi }, 0 },
13505 { "fucom", { STi }, 0 },
13506 { "fucomp", { STi }, 0 },
592d1631
L
13507 { Bad_Opcode },
13508 { Bad_Opcode },
252b5132
RH
13509 },
13510 /* de */
13511 {
bf890a93
IT
13512 { "faddp", { STi, ST }, 0 },
13513 { "fmulp", { STi, ST }, 0 },
592d1631 13514 { Bad_Opcode },
252b5132 13515 { FGRPde_3 },
bf890a93
IT
13516 { "fsub!Mp", { STi, ST }, 0 },
13517 { "fsubMp", { STi, ST }, 0 },
13518 { "fdiv!Mp", { STi, ST }, 0 },
13519 { "fdivMp", { STi, ST }, 0 },
252b5132
RH
13520 },
13521 /* df */
13522 {
bf890a93 13523 { "ffreep", { STi }, 0 },
592d1631
L
13524 { Bad_Opcode },
13525 { Bad_Opcode },
13526 { Bad_Opcode },
252b5132 13527 { FGRPdf_4 },
bf890a93
IT
13528 { "fucomip", { ST, STi }, 0 },
13529 { "fcomip", { ST, STi }, 0 },
592d1631 13530 { Bad_Opcode },
252b5132
RH
13531 },
13532};
13533
252b5132
RH
13534static char *fgrps[][8] = {
13535 /* d9_2 0 */
13536 {
13537 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13538 },
13539
13540 /* d9_4 1 */
13541 {
13542 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
13543 },
13544
13545 /* d9_5 2 */
13546 {
13547 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
13548 },
13549
13550 /* d9_6 3 */
13551 {
13552 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
13553 },
13554
13555 /* d9_7 4 */
13556 {
13557 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
13558 },
13559
13560 /* da_5 5 */
13561 {
13562 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13563 },
13564
13565 /* db_4 6 */
13566 {
309d3373
JB
13567 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
13568 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
252b5132
RH
13569 },
13570
13571 /* de_3 7 */
13572 {
13573 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13574 },
13575
13576 /* df_4 8 */
13577 {
13578 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13579 },
13580};
13581
b6169b20
L
13582static void
13583swap_operand (void)
13584{
13585 mnemonicendp[0] = '.';
13586 mnemonicendp[1] = 's';
13587 mnemonicendp += 2;
13588}
13589
b844680a
L
13590static void
13591OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
13592 int sizeflag ATTRIBUTE_UNUSED)
13593{
13594 /* Skip mod/rm byte. */
13595 MODRM_CHECK;
13596 codep++;
13597}
13598
252b5132 13599static void
26ca5450 13600dofloat (int sizeflag)
252b5132 13601{
2da11e11 13602 const struct dis386 *dp;
252b5132
RH
13603 unsigned char floatop;
13604
13605 floatop = codep[-1];
13606
7967e09e 13607 if (modrm.mod != 3)
252b5132 13608 {
7967e09e 13609 int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
1d9f512f
AM
13610
13611 putop (float_mem[fp_indx], sizeflag);
ce518a5f 13612 obufp = op_out[0];
6e50d963 13613 op_ad = 2;
1d9f512f 13614 OP_E (float_mem_mode[fp_indx], sizeflag);
252b5132
RH
13615 return;
13616 }
6608db57 13617 /* Skip mod/rm byte. */
4bba6815 13618 MODRM_CHECK;
252b5132
RH
13619 codep++;
13620
7967e09e 13621 dp = &float_reg[floatop - 0xd8][modrm.reg];
252b5132
RH
13622 if (dp->name == NULL)
13623 {
7967e09e 13624 putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
252b5132 13625
6608db57 13626 /* Instruction fnstsw is only one with strange arg. */
252b5132 13627 if (floatop == 0xdf && codep[-1] == 0xe0)
ce518a5f 13628 strcpy (op_out[0], names16[0]);
252b5132
RH
13629 }
13630 else
13631 {
13632 putop (dp->name, sizeflag);
13633
ce518a5f 13634 obufp = op_out[0];
6e50d963 13635 op_ad = 2;
ce518a5f
L
13636 if (dp->op[0].rtn)
13637 (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
6e50d963 13638
ce518a5f 13639 obufp = op_out[1];
6e50d963 13640 op_ad = 1;
ce518a5f
L
13641 if (dp->op[1].rtn)
13642 (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
252b5132
RH
13643 }
13644}
13645
9ce09ba2
RM
13646/* Like oappend (below), but S is a string starting with '%'.
13647 In Intel syntax, the '%' is elided. */
13648static void
13649oappend_maybe_intel (const char *s)
13650{
13651 oappend (s + intel_syntax);
13652}
13653
252b5132 13654static void
26ca5450 13655OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 13656{
9ce09ba2 13657 oappend_maybe_intel ("%st");
252b5132
RH
13658}
13659
252b5132 13660static void
26ca5450 13661OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 13662{
7967e09e 13663 sprintf (scratchbuf, "%%st(%d)", modrm.rm);
9ce09ba2 13664 oappend_maybe_intel (scratchbuf);
252b5132
RH
13665}
13666
6608db57 13667/* Capital letters in template are macros. */
6439fc28 13668static int
d3ce72d0 13669putop (const char *in_template, int sizeflag)
252b5132 13670{
2da11e11 13671 const char *p;
9306ca4a 13672 int alt = 0;
9d141669 13673 int cond = 1;
98b528ac
L
13674 unsigned int l = 0, len = 1;
13675 char last[4];
13676
13677#define SAVE_LAST(c) \
13678 if (l < len && l < sizeof (last)) \
13679 last[l++] = c; \
13680 else \
13681 abort ();
252b5132 13682
d3ce72d0 13683 for (p = in_template; *p; p++)
252b5132
RH
13684 {
13685 switch (*p)
13686 {
13687 default:
13688 *obufp++ = *p;
13689 break;
98b528ac
L
13690 case '%':
13691 len++;
13692 break;
9d141669
L
13693 case '!':
13694 cond = 0;
13695 break;
6439fc28
AM
13696 case '{':
13697 alt = 0;
13698 if (intel_syntax)
6439fc28
AM
13699 {
13700 while (*++p != '|')
7c52e0e8
L
13701 if (*p == '}' || *p == '\0')
13702 abort ();
6439fc28 13703 }
9306ca4a
JB
13704 /* Fall through. */
13705 case 'I':
13706 alt = 1;
13707 continue;
6439fc28
AM
13708 case '|':
13709 while (*++p != '}')
13710 {
13711 if (*p == '\0')
13712 abort ();
13713 }
13714 break;
13715 case '}':
13716 break;
252b5132 13717 case 'A':
db6eb5be
AM
13718 if (intel_syntax)
13719 break;
7967e09e 13720 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
252b5132
RH
13721 *obufp++ = 'b';
13722 break;
13723 case 'B':
4b06377f
L
13724 if (l == 0 && len == 1)
13725 {
13726case_B:
13727 if (intel_syntax)
13728 break;
13729 if (sizeflag & SUFFIX_ALWAYS)
13730 *obufp++ = 'b';
13731 }
13732 else
13733 {
13734 if (l != 1
13735 || len != 2
13736 || last[0] != 'L')
13737 {
13738 SAVE_LAST (*p);
13739 break;
13740 }
13741
13742 if (address_mode == mode_64bit
13743 && !(prefixes & PREFIX_ADDR))
13744 {
13745 *obufp++ = 'a';
13746 *obufp++ = 'b';
13747 *obufp++ = 's';
13748 }
13749
13750 goto case_B;
13751 }
252b5132 13752 break;
9306ca4a
JB
13753 case 'C':
13754 if (intel_syntax && !alt)
13755 break;
13756 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
13757 {
13758 if (sizeflag & DFLAG)
13759 *obufp++ = intel_syntax ? 'd' : 'l';
13760 else
13761 *obufp++ = intel_syntax ? 'w' : 's';
13762 used_prefixes |= (prefixes & PREFIX_DATA);
13763 }
13764 break;
ed7841b3
JB
13765 case 'D':
13766 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
13767 break;
161a04f6 13768 USED_REX (REX_W);
7967e09e 13769 if (modrm.mod == 3)
ed7841b3 13770 {
161a04f6 13771 if (rex & REX_W)
ed7841b3 13772 *obufp++ = 'q';
ed7841b3 13773 else
f16cd0d5
L
13774 {
13775 if (sizeflag & DFLAG)
13776 *obufp++ = intel_syntax ? 'd' : 'l';
13777 else
13778 *obufp++ = 'w';
13779 used_prefixes |= (prefixes & PREFIX_DATA);
13780 }
ed7841b3
JB
13781 }
13782 else
13783 *obufp++ = 'w';
13784 break;
252b5132 13785 case 'E': /* For jcxz/jecxz */
cb712a9e 13786 if (address_mode == mode_64bit)
c1a64871
JH
13787 {
13788 if (sizeflag & AFLAG)
13789 *obufp++ = 'r';
13790 else
13791 *obufp++ = 'e';
13792 }
13793 else
13794 if (sizeflag & AFLAG)
13795 *obufp++ = 'e';
3ffd33cf
AM
13796 used_prefixes |= (prefixes & PREFIX_ADDR);
13797 break;
13798 case 'F':
db6eb5be
AM
13799 if (intel_syntax)
13800 break;
e396998b 13801 if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
3ffd33cf
AM
13802 {
13803 if (sizeflag & AFLAG)
cb712a9e 13804 *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
3ffd33cf 13805 else
cb712a9e 13806 *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
3ffd33cf
AM
13807 used_prefixes |= (prefixes & PREFIX_ADDR);
13808 }
252b5132 13809 break;
52fd6d94
JB
13810 case 'G':
13811 if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
13812 break;
161a04f6 13813 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
13814 *obufp++ = 'l';
13815 else
13816 *obufp++ = 'w';
161a04f6 13817 if (!(rex & REX_W))
52fd6d94
JB
13818 used_prefixes |= (prefixes & PREFIX_DATA);
13819 break;
5dd0794d 13820 case 'H':
db6eb5be
AM
13821 if (intel_syntax)
13822 break;
5dd0794d
AM
13823 if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
13824 || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
13825 {
13826 used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
13827 *obufp++ = ',';
13828 *obufp++ = 'p';
13829 if (prefixes & PREFIX_DS)
13830 *obufp++ = 't';
13831 else
13832 *obufp++ = 'n';
13833 }
13834 break;
9306ca4a
JB
13835 case 'J':
13836 if (intel_syntax)
13837 break;
13838 *obufp++ = 'l';
13839 break;
42903f7f
L
13840 case 'K':
13841 USED_REX (REX_W);
13842 if (rex & REX_W)
13843 *obufp++ = 'q';
13844 else
13845 *obufp++ = 'd';
13846 break;
6dd5059a 13847 case 'Z':
04d824a4
JB
13848 if (l != 0 || len != 1)
13849 {
13850 if (l != 1 || len != 2 || last[0] != 'X')
13851 {
13852 SAVE_LAST (*p);
13853 break;
13854 }
13855 if (!need_vex || !vex.evex)
13856 abort ();
13857 if (intel_syntax
13858 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
13859 break;
13860 switch (vex.length)
13861 {
13862 case 128:
13863 *obufp++ = 'x';
13864 break;
13865 case 256:
13866 *obufp++ = 'y';
13867 break;
13868 case 512:
13869 *obufp++ = 'z';
13870 break;
13871 default:
13872 abort ();
13873 }
13874 break;
13875 }
6dd5059a
L
13876 if (intel_syntax)
13877 break;
13878 if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
13879 {
13880 *obufp++ = 'q';
13881 break;
13882 }
13883 /* Fall through. */
98b528ac 13884 goto case_L;
252b5132 13885 case 'L':
98b528ac
L
13886 if (l != 0 || len != 1)
13887 {
13888 SAVE_LAST (*p);
13889 break;
13890 }
13891case_L:
db6eb5be
AM
13892 if (intel_syntax)
13893 break;
252b5132
RH
13894 if (sizeflag & SUFFIX_ALWAYS)
13895 *obufp++ = 'l';
252b5132 13896 break;
9d141669
L
13897 case 'M':
13898 if (intel_mnemonic != cond)
13899 *obufp++ = 'r';
13900 break;
252b5132
RH
13901 case 'N':
13902 if ((prefixes & PREFIX_FWAIT) == 0)
13903 *obufp++ = 'n';
7d421014
ILT
13904 else
13905 used_prefixes |= PREFIX_FWAIT;
252b5132 13906 break;
52b15da3 13907 case 'O':
161a04f6
L
13908 USED_REX (REX_W);
13909 if (rex & REX_W)
6439fc28 13910 *obufp++ = 'o';
a35ca55a
JB
13911 else if (intel_syntax && (sizeflag & DFLAG))
13912 *obufp++ = 'q';
52b15da3
JH
13913 else
13914 *obufp++ = 'd';
161a04f6 13915 if (!(rex & REX_W))
a35ca55a 13916 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 13917 break;
6439fc28 13918 case 'T':
d9e3625e
L
13919 if (!intel_syntax
13920 && address_mode == mode_64bit
7bb15c6f 13921 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28
AM
13922 {
13923 *obufp++ = 'q';
13924 break;
13925 }
6608db57 13926 /* Fall through. */
4b4c407a 13927 goto case_P;
252b5132 13928 case 'P':
4b4c407a 13929 if (l == 0 && len == 1)
d9e3625e 13930 {
4b4c407a
L
13931case_P:
13932 if (intel_syntax)
d9e3625e 13933 {
4b4c407a
L
13934 if ((rex & REX_W) == 0
13935 && (prefixes & PREFIX_DATA))
13936 {
13937 if ((sizeflag & DFLAG) == 0)
13938 *obufp++ = 'w';
13939 used_prefixes |= (prefixes & PREFIX_DATA);
13940 }
13941 break;
13942 }
13943 if ((prefixes & PREFIX_DATA)
13944 || (rex & REX_W)
13945 || (sizeflag & SUFFIX_ALWAYS))
13946 {
13947 USED_REX (REX_W);
13948 if (rex & REX_W)
13949 *obufp++ = 'q';
13950 else
13951 {
13952 if (sizeflag & DFLAG)
13953 *obufp++ = 'l';
13954 else
13955 *obufp++ = 'w';
13956 used_prefixes |= (prefixes & PREFIX_DATA);
13957 }
d9e3625e 13958 }
d9e3625e 13959 }
4b4c407a 13960 else
252b5132 13961 {
4b4c407a
L
13962 if (l != 1 || len != 2 || last[0] != 'L')
13963 {
13964 SAVE_LAST (*p);
13965 break;
13966 }
13967
13968 if ((prefixes & PREFIX_DATA)
13969 || (rex & REX_W)
13970 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 13971 {
4b4c407a
L
13972 USED_REX (REX_W);
13973 if (rex & REX_W)
13974 *obufp++ = 'q';
13975 else
13976 {
13977 if (sizeflag & DFLAG)
13978 *obufp++ = intel_syntax ? 'd' : 'l';
13979 else
13980 *obufp++ = 'w';
13981 used_prefixes |= (prefixes & PREFIX_DATA);
13982 }
52b15da3 13983 }
252b5132
RH
13984 }
13985 break;
6439fc28 13986 case 'U':
db6eb5be
AM
13987 if (intel_syntax)
13988 break;
7bb15c6f 13989 if (address_mode == mode_64bit
6c067bbb 13990 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28 13991 {
7967e09e 13992 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
1a114b12 13993 *obufp++ = 'q';
6439fc28
AM
13994 break;
13995 }
6608db57 13996 /* Fall through. */
98b528ac 13997 goto case_Q;
252b5132 13998 case 'Q':
98b528ac 13999 if (l == 0 && len == 1)
252b5132 14000 {
98b528ac
L
14001case_Q:
14002 if (intel_syntax && !alt)
14003 break;
14004 USED_REX (REX_W);
14005 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 14006 {
98b528ac
L
14007 if (rex & REX_W)
14008 *obufp++ = 'q';
52b15da3 14009 else
98b528ac
L
14010 {
14011 if (sizeflag & DFLAG)
14012 *obufp++ = intel_syntax ? 'd' : 'l';
14013 else
14014 *obufp++ = 'w';
f16cd0d5 14015 used_prefixes |= (prefixes & PREFIX_DATA);
98b528ac 14016 }
52b15da3 14017 }
98b528ac
L
14018 }
14019 else
14020 {
14021 if (l != 1 || len != 2 || last[0] != 'L')
14022 {
14023 SAVE_LAST (*p);
14024 break;
14025 }
14026 if (intel_syntax
14027 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
14028 break;
14029 if ((rex & REX_W))
14030 {
14031 USED_REX (REX_W);
14032 *obufp++ = 'q';
14033 }
14034 else
14035 *obufp++ = 'l';
252b5132
RH
14036 }
14037 break;
14038 case 'R':
161a04f6
L
14039 USED_REX (REX_W);
14040 if (rex & REX_W)
a35ca55a
JB
14041 *obufp++ = 'q';
14042 else if (sizeflag & DFLAG)
c608c12e 14043 {
a35ca55a 14044 if (intel_syntax)
c608c12e 14045 *obufp++ = 'd';
c608c12e 14046 else
a35ca55a 14047 *obufp++ = 'l';
c608c12e 14048 }
252b5132 14049 else
a35ca55a
JB
14050 *obufp++ = 'w';
14051 if (intel_syntax && !p[1]
161a04f6 14052 && ((rex & REX_W) || (sizeflag & DFLAG)))
a35ca55a 14053 *obufp++ = 'e';
161a04f6 14054 if (!(rex & REX_W))
52b15da3 14055 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132 14056 break;
1a114b12 14057 case 'V':
4b06377f 14058 if (l == 0 && len == 1)
1a114b12 14059 {
4b06377f
L
14060 if (intel_syntax)
14061 break;
7bb15c6f 14062 if (address_mode == mode_64bit
6c067bbb 14063 && ((sizeflag & DFLAG) || (rex & REX_W)))
4b06377f
L
14064 {
14065 if (sizeflag & SUFFIX_ALWAYS)
14066 *obufp++ = 'q';
14067 break;
14068 }
14069 }
14070 else
14071 {
14072 if (l != 1
14073 || len != 2
14074 || last[0] != 'L')
14075 {
14076 SAVE_LAST (*p);
14077 break;
14078 }
14079
14080 if (rex & REX_W)
14081 {
14082 *obufp++ = 'a';
14083 *obufp++ = 'b';
14084 *obufp++ = 's';
14085 }
1a114b12
JB
14086 }
14087 /* Fall through. */
4b06377f 14088 goto case_S;
252b5132 14089 case 'S':
4b06377f 14090 if (l == 0 && len == 1)
252b5132 14091 {
4b06377f
L
14092case_S:
14093 if (intel_syntax)
14094 break;
14095 if (sizeflag & SUFFIX_ALWAYS)
52b15da3 14096 {
4b06377f
L
14097 if (rex & REX_W)
14098 *obufp++ = 'q';
52b15da3 14099 else
4b06377f
L
14100 {
14101 if (sizeflag & DFLAG)
14102 *obufp++ = 'l';
14103 else
14104 *obufp++ = 'w';
14105 used_prefixes |= (prefixes & PREFIX_DATA);
14106 }
14107 }
14108 }
14109 else
14110 {
14111 if (l != 1
14112 || len != 2
14113 || last[0] != 'L')
14114 {
14115 SAVE_LAST (*p);
14116 break;
52b15da3 14117 }
4b06377f
L
14118
14119 if (address_mode == mode_64bit
14120 && !(prefixes & PREFIX_ADDR))
14121 {
14122 *obufp++ = 'a';
14123 *obufp++ = 'b';
14124 *obufp++ = 's';
14125 }
14126
14127 goto case_S;
252b5132 14128 }
252b5132 14129 break;
041bd2e0 14130 case 'X':
c0f3af97
L
14131 if (l != 0 || len != 1)
14132 {
14133 SAVE_LAST (*p);
14134 break;
14135 }
14136 if (need_vex && vex.prefix)
14137 {
14138 if (vex.prefix == DATA_PREFIX_OPCODE)
14139 *obufp++ = 'd';
14140 else
14141 *obufp++ = 's';
14142 }
041bd2e0 14143 else
f16cd0d5
L
14144 {
14145 if (prefixes & PREFIX_DATA)
14146 *obufp++ = 'd';
14147 else
14148 *obufp++ = 's';
14149 used_prefixes |= (prefixes & PREFIX_DATA);
14150 }
041bd2e0 14151 break;
76f227a5 14152 case 'Y':
c0f3af97 14153 if (l == 0 && len == 1)
76f227a5 14154 {
c0f3af97
L
14155 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
14156 break;
14157 if (rex & REX_W)
14158 {
14159 USED_REX (REX_W);
14160 *obufp++ = 'q';
14161 }
14162 break;
14163 }
14164 else
14165 {
14166 if (l != 1 || len != 2 || last[0] != 'X')
14167 {
14168 SAVE_LAST (*p);
14169 break;
14170 }
14171 if (!need_vex)
14172 abort ();
14173 if (intel_syntax
04d824a4 14174 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
c0f3af97
L
14175 break;
14176 switch (vex.length)
14177 {
14178 case 128:
14179 *obufp++ = 'x';
14180 break;
14181 case 256:
14182 *obufp++ = 'y';
14183 break;
04d824a4
JB
14184 case 512:
14185 if (!vex.evex)
c0f3af97 14186 default:
04d824a4 14187 abort ();
c0f3af97 14188 }
76f227a5
JH
14189 }
14190 break;
252b5132 14191 case 'W':
0bfee649 14192 if (l == 0 && len == 1)
a35ca55a 14193 {
0bfee649
L
14194 /* operand size flag for cwtl, cbtw */
14195 USED_REX (REX_W);
14196 if (rex & REX_W)
14197 {
14198 if (intel_syntax)
14199 *obufp++ = 'd';
14200 else
14201 *obufp++ = 'l';
14202 }
14203 else if (sizeflag & DFLAG)
14204 *obufp++ = 'w';
a35ca55a 14205 else
0bfee649
L
14206 *obufp++ = 'b';
14207 if (!(rex & REX_W))
14208 used_prefixes |= (prefixes & PREFIX_DATA);
a35ca55a 14209 }
252b5132 14210 else
0bfee649 14211 {
6c30d220
L
14212 if (l != 1
14213 || len != 2
14214 || (last[0] != 'X'
14215 && last[0] != 'L'))
0bfee649
L
14216 {
14217 SAVE_LAST (*p);
14218 break;
14219 }
14220 if (!need_vex)
14221 abort ();
6c30d220
L
14222 if (last[0] == 'X')
14223 *obufp++ = vex.w ? 'd': 's';
14224 else
14225 *obufp++ = vex.w ? 'q': 'd';
0bfee649 14226 }
252b5132 14227 break;
a72d2af2
L
14228 case '^':
14229 if (intel_syntax)
14230 break;
14231 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
14232 {
14233 if (sizeflag & DFLAG)
14234 *obufp++ = 'l';
14235 else
14236 *obufp++ = 'w';
14237 used_prefixes |= (prefixes & PREFIX_DATA);
14238 }
14239 break;
5db04b09
L
14240 case '@':
14241 if (intel_syntax)
14242 break;
14243 if (address_mode == mode_64bit
14244 && (isa64 == intel64
14245 || ((sizeflag & DFLAG) || (rex & REX_W))))
14246 *obufp++ = 'q';
14247 else if ((prefixes & PREFIX_DATA))
14248 {
14249 if (!(sizeflag & DFLAG))
14250 *obufp++ = 'w';
14251 used_prefixes |= (prefixes & PREFIX_DATA);
14252 }
14253 break;
252b5132 14254 }
9306ca4a 14255 alt = 0;
252b5132
RH
14256 }
14257 *obufp = 0;
ea397f5b 14258 mnemonicendp = obufp;
6439fc28 14259 return 0;
252b5132
RH
14260}
14261
14262static void
26ca5450 14263oappend (const char *s)
252b5132 14264{
ea397f5b 14265 obufp = stpcpy (obufp, s);
252b5132
RH
14266}
14267
14268static void
26ca5450 14269append_seg (void)
252b5132 14270{
285ca992
L
14271 /* Only print the active segment register. */
14272 if (!active_seg_prefix)
14273 return;
14274
14275 used_prefixes |= active_seg_prefix;
14276 switch (active_seg_prefix)
7d421014 14277 {
285ca992 14278 case PREFIX_CS:
9ce09ba2 14279 oappend_maybe_intel ("%cs:");
285ca992
L
14280 break;
14281 case PREFIX_DS:
9ce09ba2 14282 oappend_maybe_intel ("%ds:");
285ca992
L
14283 break;
14284 case PREFIX_SS:
9ce09ba2 14285 oappend_maybe_intel ("%ss:");
285ca992
L
14286 break;
14287 case PREFIX_ES:
9ce09ba2 14288 oappend_maybe_intel ("%es:");
285ca992
L
14289 break;
14290 case PREFIX_FS:
9ce09ba2 14291 oappend_maybe_intel ("%fs:");
285ca992
L
14292 break;
14293 case PREFIX_GS:
9ce09ba2 14294 oappend_maybe_intel ("%gs:");
285ca992
L
14295 break;
14296 default:
14297 break;
7d421014 14298 }
252b5132
RH
14299}
14300
14301static void
26ca5450 14302OP_indirE (int bytemode, int sizeflag)
252b5132
RH
14303{
14304 if (!intel_syntax)
14305 oappend ("*");
14306 OP_E (bytemode, sizeflag);
14307}
14308
52b15da3 14309static void
26ca5450 14310print_operand_value (char *buf, int hex, bfd_vma disp)
52b15da3 14311{
cb712a9e 14312 if (address_mode == mode_64bit)
52b15da3
JH
14313 {
14314 if (hex)
14315 {
14316 char tmp[30];
14317 int i;
14318 buf[0] = '0';
14319 buf[1] = 'x';
14320 sprintf_vma (tmp, disp);
6608db57 14321 for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
52b15da3
JH
14322 strcpy (buf + 2, tmp + i);
14323 }
14324 else
14325 {
14326 bfd_signed_vma v = disp;
14327 char tmp[30];
14328 int i;
14329 if (v < 0)
14330 {
14331 *(buf++) = '-';
14332 v = -disp;
6608db57 14333 /* Check for possible overflow on 0x8000000000000000. */
52b15da3
JH
14334 if (v < 0)
14335 {
14336 strcpy (buf, "9223372036854775808");
14337 return;
14338 }
14339 }
14340 if (!v)
14341 {
14342 strcpy (buf, "0");
14343 return;
14344 }
14345
14346 i = 0;
14347 tmp[29] = 0;
14348 while (v)
14349 {
6608db57 14350 tmp[28 - i] = (v % 10) + '0';
52b15da3
JH
14351 v /= 10;
14352 i++;
14353 }
14354 strcpy (buf, tmp + 29 - i);
14355 }
14356 }
14357 else
14358 {
14359 if (hex)
14360 sprintf (buf, "0x%x", (unsigned int) disp);
14361 else
14362 sprintf (buf, "%d", (int) disp);
14363 }
14364}
14365
5d669648
L
14366/* Put DISP in BUF as signed hex number. */
14367
14368static void
14369print_displacement (char *buf, bfd_vma disp)
14370{
14371 bfd_signed_vma val = disp;
14372 char tmp[30];
14373 int i, j = 0;
14374
14375 if (val < 0)
14376 {
14377 buf[j++] = '-';
14378 val = -disp;
14379
14380 /* Check for possible overflow. */
14381 if (val < 0)
14382 {
14383 switch (address_mode)
14384 {
14385 case mode_64bit:
14386 strcpy (buf + j, "0x8000000000000000");
14387 break;
14388 case mode_32bit:
14389 strcpy (buf + j, "0x80000000");
14390 break;
14391 case mode_16bit:
14392 strcpy (buf + j, "0x8000");
14393 break;
14394 }
14395 return;
14396 }
14397 }
14398
14399 buf[j++] = '0';
14400 buf[j++] = 'x';
14401
0af1713e 14402 sprintf_vma (tmp, (bfd_vma) val);
5d669648
L
14403 for (i = 0; tmp[i] == '0'; i++)
14404 continue;
14405 if (tmp[i] == '\0')
14406 i--;
14407 strcpy (buf + j, tmp + i);
14408}
14409
3f31e633
JB
14410static void
14411intel_operand_size (int bytemode, int sizeflag)
14412{
43234a1e
L
14413 if (vex.evex
14414 && vex.b
14415 && (bytemode == x_mode
14416 || bytemode == evex_half_bcst_xmmq_mode))
14417 {
14418 if (vex.w)
14419 oappend ("QWORD PTR ");
14420 else
14421 oappend ("DWORD PTR ");
14422 return;
14423 }
3f31e633
JB
14424 switch (bytemode)
14425 {
14426 case b_mode:
b6169b20 14427 case b_swap_mode:
42903f7f 14428 case dqb_mode:
1ba585e8 14429 case db_mode:
3f31e633
JB
14430 oappend ("BYTE PTR ");
14431 break;
14432 case w_mode:
1ba585e8 14433 case dw_mode:
3f31e633 14434 case dqw_mode:
1ba585e8 14435 case dqw_swap_mode:
3f31e633
JB
14436 oappend ("WORD PTR ");
14437 break;
1a114b12 14438 case stack_v_mode:
7bb15c6f 14439 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
3f31e633
JB
14440 {
14441 oappend ("QWORD PTR ");
3f31e633
JB
14442 break;
14443 }
14444 /* FALLTHRU */
14445 case v_mode:
b6169b20 14446 case v_swap_mode:
3f31e633 14447 case dq_mode:
161a04f6
L
14448 USED_REX (REX_W);
14449 if (rex & REX_W)
3f31e633 14450 oappend ("QWORD PTR ");
3f31e633 14451 else
f16cd0d5
L
14452 {
14453 if ((sizeflag & DFLAG) || bytemode == dq_mode)
14454 oappend ("DWORD PTR ");
14455 else
14456 oappend ("WORD PTR ");
14457 used_prefixes |= (prefixes & PREFIX_DATA);
14458 }
3f31e633 14459 break;
52fd6d94 14460 case z_mode:
161a04f6 14461 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
14462 *obufp++ = 'D';
14463 oappend ("WORD PTR ");
161a04f6 14464 if (!(rex & REX_W))
52fd6d94
JB
14465 used_prefixes |= (prefixes & PREFIX_DATA);
14466 break;
34b772a6
JB
14467 case a_mode:
14468 if (sizeflag & DFLAG)
14469 oappend ("QWORD PTR ");
14470 else
14471 oappend ("DWORD PTR ");
14472 used_prefixes |= (prefixes & PREFIX_DATA);
14473 break;
3f31e633 14474 case d_mode:
539f890d
L
14475 case d_scalar_mode:
14476 case d_scalar_swap_mode:
fa99fab2 14477 case d_swap_mode:
42903f7f 14478 case dqd_mode:
3f31e633
JB
14479 oappend ("DWORD PTR ");
14480 break;
14481 case q_mode:
539f890d
L
14482 case q_scalar_mode:
14483 case q_scalar_swap_mode:
b6169b20 14484 case q_swap_mode:
3f31e633
JB
14485 oappend ("QWORD PTR ");
14486 break;
14487 case m_mode:
cb712a9e 14488 if (address_mode == mode_64bit)
3f31e633
JB
14489 oappend ("QWORD PTR ");
14490 else
14491 oappend ("DWORD PTR ");
14492 break;
14493 case f_mode:
14494 if (sizeflag & DFLAG)
14495 oappend ("FWORD PTR ");
14496 else
14497 oappend ("DWORD PTR ");
14498 used_prefixes |= (prefixes & PREFIX_DATA);
14499 break;
14500 case t_mode:
14501 oappend ("TBYTE PTR ");
14502 break;
14503 case x_mode:
b6169b20 14504 case x_swap_mode:
43234a1e
L
14505 case evex_x_gscat_mode:
14506 case evex_x_nobcst_mode:
c0f3af97
L
14507 if (need_vex)
14508 {
14509 switch (vex.length)
14510 {
14511 case 128:
14512 oappend ("XMMWORD PTR ");
14513 break;
14514 case 256:
14515 oappend ("YMMWORD PTR ");
14516 break;
43234a1e
L
14517 case 512:
14518 oappend ("ZMMWORD PTR ");
14519 break;
c0f3af97
L
14520 default:
14521 abort ();
14522 }
14523 }
14524 else
14525 oappend ("XMMWORD PTR ");
14526 break;
14527 case xmm_mode:
3f31e633
JB
14528 oappend ("XMMWORD PTR ");
14529 break;
43234a1e
L
14530 case ymm_mode:
14531 oappend ("YMMWORD PTR ");
14532 break;
c0f3af97 14533 case xmmq_mode:
43234a1e 14534 case evex_half_bcst_xmmq_mode:
c0f3af97
L
14535 if (!need_vex)
14536 abort ();
14537
14538 switch (vex.length)
14539 {
14540 case 128:
14541 oappend ("QWORD PTR ");
14542 break;
14543 case 256:
14544 oappend ("XMMWORD PTR ");
14545 break;
43234a1e
L
14546 case 512:
14547 oappend ("YMMWORD PTR ");
14548 break;
c0f3af97
L
14549 default:
14550 abort ();
14551 }
14552 break;
6c30d220
L
14553 case xmm_mb_mode:
14554 if (!need_vex)
14555 abort ();
14556
14557 switch (vex.length)
14558 {
14559 case 128:
14560 case 256:
43234a1e 14561 case 512:
6c30d220
L
14562 oappend ("BYTE PTR ");
14563 break;
14564 default:
14565 abort ();
14566 }
14567 break;
14568 case xmm_mw_mode:
14569 if (!need_vex)
14570 abort ();
14571
14572 switch (vex.length)
14573 {
14574 case 128:
14575 case 256:
43234a1e 14576 case 512:
6c30d220
L
14577 oappend ("WORD PTR ");
14578 break;
14579 default:
14580 abort ();
14581 }
14582 break;
14583 case xmm_md_mode:
14584 if (!need_vex)
14585 abort ();
14586
14587 switch (vex.length)
14588 {
14589 case 128:
14590 case 256:
43234a1e 14591 case 512:
6c30d220
L
14592 oappend ("DWORD PTR ");
14593 break;
14594 default:
14595 abort ();
14596 }
14597 break;
14598 case xmm_mq_mode:
14599 if (!need_vex)
14600 abort ();
14601
14602 switch (vex.length)
14603 {
14604 case 128:
14605 case 256:
43234a1e 14606 case 512:
6c30d220
L
14607 oappend ("QWORD PTR ");
14608 break;
14609 default:
14610 abort ();
14611 }
14612 break;
14613 case xmmdw_mode:
14614 if (!need_vex)
14615 abort ();
14616
14617 switch (vex.length)
14618 {
14619 case 128:
14620 oappend ("WORD PTR ");
14621 break;
14622 case 256:
14623 oappend ("DWORD PTR ");
14624 break;
43234a1e
L
14625 case 512:
14626 oappend ("QWORD PTR ");
14627 break;
6c30d220
L
14628 default:
14629 abort ();
14630 }
14631 break;
14632 case xmmqd_mode:
14633 if (!need_vex)
14634 abort ();
14635
14636 switch (vex.length)
14637 {
14638 case 128:
14639 oappend ("DWORD PTR ");
14640 break;
14641 case 256:
14642 oappend ("QWORD PTR ");
14643 break;
43234a1e
L
14644 case 512:
14645 oappend ("XMMWORD PTR ");
14646 break;
6c30d220
L
14647 default:
14648 abort ();
14649 }
14650 break;
c0f3af97
L
14651 case ymmq_mode:
14652 if (!need_vex)
14653 abort ();
14654
14655 switch (vex.length)
14656 {
14657 case 128:
14658 oappend ("QWORD PTR ");
14659 break;
14660 case 256:
14661 oappend ("YMMWORD PTR ");
14662 break;
43234a1e
L
14663 case 512:
14664 oappend ("ZMMWORD PTR ");
14665 break;
c0f3af97
L
14666 default:
14667 abort ();
14668 }
14669 break;
6c30d220
L
14670 case ymmxmm_mode:
14671 if (!need_vex)
14672 abort ();
14673
14674 switch (vex.length)
14675 {
14676 case 128:
14677 case 256:
14678 oappend ("XMMWORD PTR ");
14679 break;
14680 default:
14681 abort ();
14682 }
14683 break;
fb9c77c7
L
14684 case o_mode:
14685 oappend ("OWORD PTR ");
14686 break;
43234a1e 14687 case xmm_mdq_mode:
0bfee649 14688 case vex_w_dq_mode:
1c480963 14689 case vex_scalar_w_dq_mode:
0bfee649
L
14690 if (!need_vex)
14691 abort ();
14692
14693 if (vex.w)
14694 oappend ("QWORD PTR ");
14695 else
14696 oappend ("DWORD PTR ");
14697 break;
43234a1e
L
14698 case vex_vsib_d_w_dq_mode:
14699 case vex_vsib_q_w_dq_mode:
14700 if (!need_vex)
14701 abort ();
14702
14703 if (!vex.evex)
14704 {
14705 if (vex.w)
14706 oappend ("QWORD PTR ");
14707 else
14708 oappend ("DWORD PTR ");
14709 }
14710 else
14711 {
b28d1bda
IT
14712 switch (vex.length)
14713 {
14714 case 128:
14715 oappend ("XMMWORD PTR ");
14716 break;
14717 case 256:
14718 oappend ("YMMWORD PTR ");
14719 break;
14720 case 512:
14721 oappend ("ZMMWORD PTR ");
14722 break;
14723 default:
14724 abort ();
14725 }
43234a1e
L
14726 }
14727 break;
5fc35d96
IT
14728 case vex_vsib_q_w_d_mode:
14729 case vex_vsib_d_w_d_mode:
b28d1bda 14730 if (!need_vex || !vex.evex)
5fc35d96
IT
14731 abort ();
14732
b28d1bda
IT
14733 switch (vex.length)
14734 {
14735 case 128:
14736 oappend ("QWORD PTR ");
14737 break;
14738 case 256:
14739 oappend ("XMMWORD PTR ");
14740 break;
14741 case 512:
14742 oappend ("YMMWORD PTR ");
14743 break;
14744 default:
14745 abort ();
14746 }
5fc35d96
IT
14747
14748 break;
1ba585e8
IT
14749 case mask_bd_mode:
14750 if (!need_vex || vex.length != 128)
14751 abort ();
14752 if (vex.w)
14753 oappend ("DWORD PTR ");
14754 else
14755 oappend ("BYTE PTR ");
14756 break;
43234a1e
L
14757 case mask_mode:
14758 if (!need_vex)
14759 abort ();
1ba585e8
IT
14760 if (vex.w)
14761 oappend ("QWORD PTR ");
14762 else
14763 oappend ("WORD PTR ");
43234a1e 14764 break;
6c75cc62 14765 case v_bnd_mode:
3f31e633
JB
14766 default:
14767 break;
14768 }
14769}
14770
252b5132 14771static void
c0f3af97 14772OP_E_register (int bytemode, int sizeflag)
252b5132 14773{
c0f3af97
L
14774 int reg = modrm.rm;
14775 const char **names;
252b5132 14776
c0f3af97
L
14777 USED_REX (REX_B);
14778 if ((rex & REX_B))
14779 reg += 8;
252b5132 14780
b6169b20 14781 if ((sizeflag & SUFFIX_ALWAYS)
1ba585e8
IT
14782 && (bytemode == b_swap_mode
14783 || bytemode == v_swap_mode
14784 || bytemode == dqw_swap_mode))
b6169b20
L
14785 swap_operand ();
14786
c0f3af97 14787 switch (bytemode)
252b5132 14788 {
c0f3af97 14789 case b_mode:
b6169b20 14790 case b_swap_mode:
c0f3af97
L
14791 USED_REX (0);
14792 if (rex)
14793 names = names8rex;
14794 else
14795 names = names8;
14796 break;
14797 case w_mode:
14798 names = names16;
14799 break;
14800 case d_mode:
1ba585e8
IT
14801 case dw_mode:
14802 case db_mode:
c0f3af97
L
14803 names = names32;
14804 break;
14805 case q_mode:
14806 names = names64;
14807 break;
14808 case m_mode:
6c75cc62 14809 case v_bnd_mode:
c0f3af97
L
14810 names = address_mode == mode_64bit ? names64 : names32;
14811 break;
7e8b059b
L
14812 case bnd_mode:
14813 names = names_bnd;
14814 break;
c0f3af97 14815 case stack_v_mode:
7bb15c6f 14816 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
252b5132 14817 {
c0f3af97 14818 names = names64;
252b5132 14819 break;
252b5132 14820 }
c0f3af97
L
14821 bytemode = v_mode;
14822 /* FALLTHRU */
14823 case v_mode:
b6169b20 14824 case v_swap_mode:
c0f3af97
L
14825 case dq_mode:
14826 case dqb_mode:
14827 case dqd_mode:
14828 case dqw_mode:
1ba585e8 14829 case dqw_swap_mode:
c0f3af97
L
14830 USED_REX (REX_W);
14831 if (rex & REX_W)
14832 names = names64;
c0f3af97 14833 else
f16cd0d5 14834 {
7bb15c6f 14835 if ((sizeflag & DFLAG)
f16cd0d5
L
14836 || (bytemode != v_mode
14837 && bytemode != v_swap_mode))
14838 names = names32;
14839 else
14840 names = names16;
14841 used_prefixes |= (prefixes & PREFIX_DATA);
14842 }
c0f3af97 14843 break;
1ba585e8 14844 case mask_bd_mode:
43234a1e
L
14845 case mask_mode:
14846 names = names_mask;
14847 break;
c0f3af97
L
14848 case 0:
14849 return;
14850 default:
14851 oappend (INTERNAL_DISASSEMBLER_ERROR);
252b5132
RH
14852 return;
14853 }
c0f3af97
L
14854 oappend (names[reg]);
14855}
14856
14857static void
c1e679ec 14858OP_E_memory (int bytemode, int sizeflag)
c0f3af97
L
14859{
14860 bfd_vma disp = 0;
14861 int add = (rex & REX_B) ? 8 : 0;
14862 int riprel = 0;
43234a1e
L
14863 int shift;
14864
14865 if (vex.evex)
14866 {
14867 /* In EVEX, if operand doesn't allow broadcast, vex.b should be 0. */
14868 if (vex.b
14869 && bytemode != x_mode
90a915bf 14870 && bytemode != xmmq_mode
43234a1e
L
14871 && bytemode != evex_half_bcst_xmmq_mode)
14872 {
14873 BadOp ();
14874 return;
14875 }
14876 switch (bytemode)
14877 {
1ba585e8
IT
14878 case dqw_mode:
14879 case dw_mode:
14880 case dqw_swap_mode:
14881 shift = 1;
14882 break;
14883 case dqb_mode:
14884 case db_mode:
14885 shift = 0;
14886 break;
43234a1e 14887 case vex_vsib_d_w_dq_mode:
5fc35d96 14888 case vex_vsib_d_w_d_mode:
eaa9d1ad 14889 case vex_vsib_q_w_dq_mode:
5fc35d96 14890 case vex_vsib_q_w_d_mode:
43234a1e
L
14891 case evex_x_gscat_mode:
14892 case xmm_mdq_mode:
14893 shift = vex.w ? 3 : 2;
14894 break;
43234a1e
L
14895 case x_mode:
14896 case evex_half_bcst_xmmq_mode:
90a915bf 14897 case xmmq_mode:
43234a1e
L
14898 if (vex.b)
14899 {
14900 shift = vex.w ? 3 : 2;
14901 break;
14902 }
14903 /* Fall through if vex.b == 0. */
14904 case xmmqd_mode:
14905 case xmmdw_mode:
43234a1e
L
14906 case ymmq_mode:
14907 case evex_x_nobcst_mode:
14908 case x_swap_mode:
14909 switch (vex.length)
14910 {
14911 case 128:
14912 shift = 4;
14913 break;
14914 case 256:
14915 shift = 5;
14916 break;
14917 case 512:
14918 shift = 6;
14919 break;
14920 default:
14921 abort ();
14922 }
14923 break;
14924 case ymm_mode:
14925 shift = 5;
14926 break;
14927 case xmm_mode:
14928 shift = 4;
14929 break;
14930 case xmm_mq_mode:
14931 case q_mode:
14932 case q_scalar_mode:
14933 case q_swap_mode:
14934 case q_scalar_swap_mode:
14935 shift = 3;
14936 break;
14937 case dqd_mode:
14938 case xmm_md_mode:
14939 case d_mode:
14940 case d_scalar_mode:
14941 case d_swap_mode:
14942 case d_scalar_swap_mode:
14943 shift = 2;
14944 break;
14945 case xmm_mw_mode:
14946 shift = 1;
14947 break;
14948 case xmm_mb_mode:
14949 shift = 0;
14950 break;
14951 default:
14952 abort ();
14953 }
14954 /* Make necessary corrections to shift for modes that need it.
14955 For these modes we currently have shift 4, 5 or 6 depending on
14956 vex.length (it corresponds to xmmword, ymmword or zmmword
14957 operand). We might want to make it 3, 4 or 5 (e.g. for
14958 xmmq_mode). In case of broadcast enabled the corrections
14959 aren't needed, as element size is always 32 or 64 bits. */
90a915bf
IT
14960 if (!vex.b
14961 && (bytemode == xmmq_mode
14962 || bytemode == evex_half_bcst_xmmq_mode))
43234a1e
L
14963 shift -= 1;
14964 else if (bytemode == xmmqd_mode)
14965 shift -= 2;
14966 else if (bytemode == xmmdw_mode)
14967 shift -= 3;
b28d1bda
IT
14968 else if (bytemode == ymmq_mode && vex.length == 128)
14969 shift -= 1;
43234a1e
L
14970 }
14971 else
14972 shift = 0;
252b5132 14973
c0f3af97 14974 USED_REX (REX_B);
3f31e633
JB
14975 if (intel_syntax)
14976 intel_operand_size (bytemode, sizeflag);
252b5132
RH
14977 append_seg ();
14978
5d669648 14979 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132 14980 {
5d669648
L
14981 /* 32/64 bit address mode */
14982 int havedisp;
252b5132
RH
14983 int havesib;
14984 int havebase;
0f7da397 14985 int haveindex;
20afcfb7 14986 int needindex;
82c18208 14987 int base, rbase;
91d6fa6a 14988 int vindex = 0;
252b5132 14989 int scale = 0;
7e8b059b
L
14990 int addr32flag = !((sizeflag & AFLAG)
14991 || bytemode == v_bnd_mode
14992 || bytemode == bnd_mode);
6c30d220
L
14993 const char **indexes64 = names64;
14994 const char **indexes32 = names32;
252b5132
RH
14995
14996 havesib = 0;
14997 havebase = 1;
0f7da397 14998 haveindex = 0;
7967e09e 14999 base = modrm.rm;
252b5132
RH
15000
15001 if (base == 4)
15002 {
15003 havesib = 1;
dfc8cf43 15004 vindex = sib.index;
161a04f6
L
15005 USED_REX (REX_X);
15006 if (rex & REX_X)
91d6fa6a 15007 vindex += 8;
6c30d220
L
15008 switch (bytemode)
15009 {
15010 case vex_vsib_d_w_dq_mode:
5fc35d96 15011 case vex_vsib_d_w_d_mode:
6c30d220 15012 case vex_vsib_q_w_dq_mode:
5fc35d96 15013 case vex_vsib_q_w_d_mode:
6c30d220
L
15014 if (!need_vex)
15015 abort ();
43234a1e
L
15016 if (vex.evex)
15017 {
15018 if (!vex.v)
15019 vindex += 16;
15020 }
6c30d220
L
15021
15022 haveindex = 1;
15023 switch (vex.length)
15024 {
15025 case 128:
7bb15c6f 15026 indexes64 = indexes32 = names_xmm;
6c30d220
L
15027 break;
15028 case 256:
5fc35d96
IT
15029 if (!vex.w
15030 || bytemode == vex_vsib_q_w_dq_mode
15031 || bytemode == vex_vsib_q_w_d_mode)
7bb15c6f 15032 indexes64 = indexes32 = names_ymm;
6c30d220 15033 else
7bb15c6f 15034 indexes64 = indexes32 = names_xmm;
6c30d220 15035 break;
43234a1e 15036 case 512:
5fc35d96
IT
15037 if (!vex.w
15038 || bytemode == vex_vsib_q_w_dq_mode
15039 || bytemode == vex_vsib_q_w_d_mode)
43234a1e
L
15040 indexes64 = indexes32 = names_zmm;
15041 else
15042 indexes64 = indexes32 = names_ymm;
15043 break;
6c30d220
L
15044 default:
15045 abort ();
15046 }
15047 break;
15048 default:
15049 haveindex = vindex != 4;
15050 break;
15051 }
15052 scale = sib.scale;
15053 base = sib.base;
252b5132
RH
15054 codep++;
15055 }
82c18208 15056 rbase = base + add;
252b5132 15057
7967e09e 15058 switch (modrm.mod)
252b5132
RH
15059 {
15060 case 0:
82c18208 15061 if (base == 5)
252b5132
RH
15062 {
15063 havebase = 0;
cb712a9e 15064 if (address_mode == mode_64bit && !havesib)
52b15da3
JH
15065 riprel = 1;
15066 disp = get32s ();
252b5132
RH
15067 }
15068 break;
15069 case 1:
15070 FETCH_DATA (the_info, codep + 1);
15071 disp = *codep++;
15072 if ((disp & 0x80) != 0)
15073 disp -= 0x100;
43234a1e
L
15074 if (vex.evex && shift > 0)
15075 disp <<= shift;
252b5132
RH
15076 break;
15077 case 2:
52b15da3 15078 disp = get32s ();
252b5132
RH
15079 break;
15080 }
15081
20afcfb7
L
15082 /* In 32bit mode, we need index register to tell [offset] from
15083 [eiz*1 + offset]. */
15084 needindex = (havesib
15085 && !havebase
15086 && !haveindex
15087 && address_mode == mode_32bit);
15088 havedisp = (havebase
15089 || needindex
15090 || (havesib && (haveindex || scale != 0)));
5d669648 15091
252b5132 15092 if (!intel_syntax)
82c18208 15093 if (modrm.mod != 0 || base == 5)
db6eb5be 15094 {
5d669648
L
15095 if (havedisp || riprel)
15096 print_displacement (scratchbuf, disp);
15097 else
15098 print_operand_value (scratchbuf, 1, disp);
db6eb5be 15099 oappend (scratchbuf);
52b15da3
JH
15100 if (riprel)
15101 {
15102 set_op (disp, 1);
87767711 15103 oappend (sizeflag & AFLAG ? "(%rip)" : "(%eip)");
52b15da3 15104 }
db6eb5be 15105 }
2da11e11 15106
7e8b059b
L
15107 if ((havebase || haveindex || riprel)
15108 && (bytemode != v_bnd_mode)
15109 && (bytemode != bnd_mode))
87767711
JB
15110 used_prefixes |= PREFIX_ADDR;
15111
5d669648 15112 if (havedisp || (intel_syntax && riprel))
252b5132 15113 {
252b5132 15114 *obufp++ = open_char;
52b15da3 15115 if (intel_syntax && riprel)
185b1163
L
15116 {
15117 set_op (disp, 1);
87767711 15118 oappend (sizeflag & AFLAG ? "rip" : "eip");
185b1163 15119 }
db6eb5be 15120 *obufp = '\0';
252b5132 15121 if (havebase)
7e8b059b 15122 oappend (address_mode == mode_64bit && !addr32flag
82c18208 15123 ? names64[rbase] : names32[rbase]);
252b5132
RH
15124 if (havesib)
15125 {
db51cc60
L
15126 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
15127 print index to tell base + index from base. */
15128 if (scale != 0
20afcfb7 15129 || needindex
db51cc60
L
15130 || haveindex
15131 || (havebase && base != ESP_REG_NUM))
252b5132 15132 {
9306ca4a 15133 if (!intel_syntax || havebase)
db6eb5be 15134 {
9306ca4a
JB
15135 *obufp++ = separator_char;
15136 *obufp = '\0';
db6eb5be 15137 }
db51cc60 15138 if (haveindex)
7e8b059b 15139 oappend (address_mode == mode_64bit && !addr32flag
6c30d220 15140 ? indexes64[vindex] : indexes32[vindex]);
db51cc60 15141 else
7e8b059b 15142 oappend (address_mode == mode_64bit && !addr32flag
db51cc60
L
15143 ? index64 : index32);
15144
db6eb5be
AM
15145 *obufp++ = scale_char;
15146 *obufp = '\0';
15147 sprintf (scratchbuf, "%d", 1 << scale);
15148 oappend (scratchbuf);
15149 }
252b5132 15150 }
185b1163 15151 if (intel_syntax
82c18208 15152 && (disp || modrm.mod != 0 || base == 5))
3d456fa1 15153 {
db51cc60 15154 if (!havedisp || (bfd_signed_vma) disp >= 0)
3d456fa1
JB
15155 {
15156 *obufp++ = '+';
15157 *obufp = '\0';
15158 }
05203043 15159 else if (modrm.mod != 1 && disp != -disp)
3d456fa1
JB
15160 {
15161 *obufp++ = '-';
15162 *obufp = '\0';
15163 disp = - (bfd_signed_vma) disp;
15164 }
15165
db51cc60
L
15166 if (havedisp)
15167 print_displacement (scratchbuf, disp);
15168 else
15169 print_operand_value (scratchbuf, 1, disp);
3d456fa1
JB
15170 oappend (scratchbuf);
15171 }
252b5132
RH
15172
15173 *obufp++ = close_char;
db6eb5be 15174 *obufp = '\0';
252b5132
RH
15175 }
15176 else if (intel_syntax)
db6eb5be 15177 {
82c18208 15178 if (modrm.mod != 0 || base == 5)
db6eb5be 15179 {
285ca992 15180 if (!active_seg_prefix)
252b5132 15181 {
d708bcba 15182 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
15183 oappend (":");
15184 }
52b15da3 15185 print_operand_value (scratchbuf, 1, disp);
db6eb5be
AM
15186 oappend (scratchbuf);
15187 }
15188 }
252b5132
RH
15189 }
15190 else
f16cd0d5
L
15191 {
15192 /* 16 bit address mode */
15193 used_prefixes |= prefixes & PREFIX_ADDR;
7967e09e 15194 switch (modrm.mod)
252b5132
RH
15195 {
15196 case 0:
7967e09e 15197 if (modrm.rm == 6)
252b5132
RH
15198 {
15199 disp = get16 ();
15200 if ((disp & 0x8000) != 0)
15201 disp -= 0x10000;
15202 }
15203 break;
15204 case 1:
15205 FETCH_DATA (the_info, codep + 1);
15206 disp = *codep++;
15207 if ((disp & 0x80) != 0)
15208 disp -= 0x100;
15209 break;
15210 case 2:
15211 disp = get16 ();
15212 if ((disp & 0x8000) != 0)
15213 disp -= 0x10000;
15214 break;
15215 }
15216
15217 if (!intel_syntax)
7967e09e 15218 if (modrm.mod != 0 || modrm.rm == 6)
db6eb5be 15219 {
5d669648 15220 print_displacement (scratchbuf, disp);
db6eb5be
AM
15221 oappend (scratchbuf);
15222 }
252b5132 15223
7967e09e 15224 if (modrm.mod != 0 || modrm.rm != 6)
252b5132
RH
15225 {
15226 *obufp++ = open_char;
db6eb5be 15227 *obufp = '\0';
7967e09e 15228 oappend (index16[modrm.rm]);
5d669648
L
15229 if (intel_syntax
15230 && (disp || modrm.mod != 0 || modrm.rm == 6))
3d456fa1 15231 {
5d669648 15232 if ((bfd_signed_vma) disp >= 0)
3d456fa1
JB
15233 {
15234 *obufp++ = '+';
15235 *obufp = '\0';
15236 }
7967e09e 15237 else if (modrm.mod != 1)
3d456fa1
JB
15238 {
15239 *obufp++ = '-';
15240 *obufp = '\0';
15241 disp = - (bfd_signed_vma) disp;
15242 }
15243
5d669648 15244 print_displacement (scratchbuf, disp);
3d456fa1
JB
15245 oappend (scratchbuf);
15246 }
15247
db6eb5be
AM
15248 *obufp++ = close_char;
15249 *obufp = '\0';
252b5132 15250 }
3d456fa1
JB
15251 else if (intel_syntax)
15252 {
285ca992 15253 if (!active_seg_prefix)
3d456fa1
JB
15254 {
15255 oappend (names_seg[ds_reg - es_reg]);
15256 oappend (":");
15257 }
15258 print_operand_value (scratchbuf, 1, disp & 0xffff);
15259 oappend (scratchbuf);
15260 }
252b5132 15261 }
43234a1e
L
15262 if (vex.evex && vex.b
15263 && (bytemode == x_mode
90a915bf 15264 || bytemode == xmmq_mode
43234a1e
L
15265 || bytemode == evex_half_bcst_xmmq_mode))
15266 {
90a915bf
IT
15267 if (vex.w
15268 || bytemode == xmmq_mode
15269 || bytemode == evex_half_bcst_xmmq_mode)
b28d1bda
IT
15270 {
15271 switch (vex.length)
15272 {
15273 case 128:
15274 oappend ("{1to2}");
15275 break;
15276 case 256:
15277 oappend ("{1to4}");
15278 break;
15279 case 512:
15280 oappend ("{1to8}");
15281 break;
15282 default:
15283 abort ();
15284 }
15285 }
43234a1e 15286 else
b28d1bda
IT
15287 {
15288 switch (vex.length)
15289 {
15290 case 128:
15291 oappend ("{1to4}");
15292 break;
15293 case 256:
15294 oappend ("{1to8}");
15295 break;
15296 case 512:
15297 oappend ("{1to16}");
15298 break;
15299 default:
15300 abort ();
15301 }
15302 }
43234a1e 15303 }
252b5132
RH
15304}
15305
c0f3af97 15306static void
8b3f93e7 15307OP_E (int bytemode, int sizeflag)
c0f3af97
L
15308{
15309 /* Skip mod/rm byte. */
15310 MODRM_CHECK;
15311 codep++;
15312
15313 if (modrm.mod == 3)
15314 OP_E_register (bytemode, sizeflag);
15315 else
c1e679ec 15316 OP_E_memory (bytemode, sizeflag);
c0f3af97
L
15317}
15318
252b5132 15319static void
26ca5450 15320OP_G (int bytemode, int sizeflag)
252b5132 15321{
52b15da3 15322 int add = 0;
161a04f6
L
15323 USED_REX (REX_R);
15324 if (rex & REX_R)
52b15da3 15325 add += 8;
252b5132
RH
15326 switch (bytemode)
15327 {
15328 case b_mode:
52b15da3
JH
15329 USED_REX (0);
15330 if (rex)
7967e09e 15331 oappend (names8rex[modrm.reg + add]);
52b15da3 15332 else
7967e09e 15333 oappend (names8[modrm.reg + add]);
252b5132
RH
15334 break;
15335 case w_mode:
7967e09e 15336 oappend (names16[modrm.reg + add]);
252b5132
RH
15337 break;
15338 case d_mode:
1ba585e8
IT
15339 case db_mode:
15340 case dw_mode:
7967e09e 15341 oappend (names32[modrm.reg + add]);
52b15da3
JH
15342 break;
15343 case q_mode:
7967e09e 15344 oappend (names64[modrm.reg + add]);
252b5132 15345 break;
7e8b059b
L
15346 case bnd_mode:
15347 oappend (names_bnd[modrm.reg]);
15348 break;
252b5132 15349 case v_mode:
9306ca4a 15350 case dq_mode:
42903f7f
L
15351 case dqb_mode:
15352 case dqd_mode:
9306ca4a 15353 case dqw_mode:
1ba585e8 15354 case dqw_swap_mode:
161a04f6
L
15355 USED_REX (REX_W);
15356 if (rex & REX_W)
7967e09e 15357 oappend (names64[modrm.reg + add]);
252b5132 15358 else
f16cd0d5
L
15359 {
15360 if ((sizeflag & DFLAG) || bytemode != v_mode)
15361 oappend (names32[modrm.reg + add]);
15362 else
15363 oappend (names16[modrm.reg + add]);
15364 used_prefixes |= (prefixes & PREFIX_DATA);
15365 }
252b5132 15366 break;
90700ea2 15367 case m_mode:
cb712a9e 15368 if (address_mode == mode_64bit)
7967e09e 15369 oappend (names64[modrm.reg + add]);
90700ea2 15370 else
7967e09e 15371 oappend (names32[modrm.reg + add]);
90700ea2 15372 break;
1ba585e8 15373 case mask_bd_mode:
43234a1e
L
15374 case mask_mode:
15375 oappend (names_mask[modrm.reg + add]);
15376 break;
252b5132
RH
15377 default:
15378 oappend (INTERNAL_DISASSEMBLER_ERROR);
15379 break;
15380 }
15381}
15382
52b15da3 15383static bfd_vma
26ca5450 15384get64 (void)
52b15da3 15385{
5dd0794d 15386 bfd_vma x;
52b15da3 15387#ifdef BFD64
5dd0794d
AM
15388 unsigned int a;
15389 unsigned int b;
15390
52b15da3
JH
15391 FETCH_DATA (the_info, codep + 8);
15392 a = *codep++ & 0xff;
15393 a |= (*codep++ & 0xff) << 8;
15394 a |= (*codep++ & 0xff) << 16;
070fe95d 15395 a |= (*codep++ & 0xffu) << 24;
5dd0794d 15396 b = *codep++ & 0xff;
52b15da3
JH
15397 b |= (*codep++ & 0xff) << 8;
15398 b |= (*codep++ & 0xff) << 16;
070fe95d 15399 b |= (*codep++ & 0xffu) << 24;
52b15da3
JH
15400 x = a + ((bfd_vma) b << 32);
15401#else
6608db57 15402 abort ();
5dd0794d 15403 x = 0;
52b15da3
JH
15404#endif
15405 return x;
15406}
15407
15408static bfd_signed_vma
26ca5450 15409get32 (void)
252b5132 15410{
52b15da3 15411 bfd_signed_vma x = 0;
252b5132
RH
15412
15413 FETCH_DATA (the_info, codep + 4);
52b15da3
JH
15414 x = *codep++ & (bfd_signed_vma) 0xff;
15415 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
15416 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
15417 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
15418 return x;
15419}
15420
15421static bfd_signed_vma
26ca5450 15422get32s (void)
52b15da3
JH
15423{
15424 bfd_signed_vma x = 0;
15425
15426 FETCH_DATA (the_info, codep + 4);
15427 x = *codep++ & (bfd_signed_vma) 0xff;
15428 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
15429 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
15430 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
15431
15432 x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
15433
252b5132
RH
15434 return x;
15435}
15436
15437static int
26ca5450 15438get16 (void)
252b5132
RH
15439{
15440 int x = 0;
15441
15442 FETCH_DATA (the_info, codep + 2);
15443 x = *codep++ & 0xff;
15444 x |= (*codep++ & 0xff) << 8;
15445 return x;
15446}
15447
15448static void
26ca5450 15449set_op (bfd_vma op, int riprel)
252b5132
RH
15450{
15451 op_index[op_ad] = op_ad;
cb712a9e 15452 if (address_mode == mode_64bit)
7081ff04
AJ
15453 {
15454 op_address[op_ad] = op;
15455 op_riprel[op_ad] = riprel;
15456 }
15457 else
15458 {
15459 /* Mask to get a 32-bit address. */
15460 op_address[op_ad] = op & 0xffffffff;
15461 op_riprel[op_ad] = riprel & 0xffffffff;
15462 }
252b5132
RH
15463}
15464
15465static void
26ca5450 15466OP_REG (int code, int sizeflag)
252b5132 15467{
2da11e11 15468 const char *s;
9b60702d 15469 int add;
de882298
RM
15470
15471 switch (code)
15472 {
15473 case es_reg: case ss_reg: case cs_reg:
15474 case ds_reg: case fs_reg: case gs_reg:
15475 oappend (names_seg[code - es_reg]);
15476 return;
15477 }
15478
161a04f6
L
15479 USED_REX (REX_B);
15480 if (rex & REX_B)
52b15da3 15481 add = 8;
9b60702d
L
15482 else
15483 add = 0;
52b15da3
JH
15484
15485 switch (code)
15486 {
52b15da3
JH
15487 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
15488 case sp_reg: case bp_reg: case si_reg: case di_reg:
15489 s = names16[code - ax_reg + add];
15490 break;
52b15da3
JH
15491 case al_reg: case ah_reg: case cl_reg: case ch_reg:
15492 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
15493 USED_REX (0);
15494 if (rex)
15495 s = names8rex[code - al_reg + add];
15496 else
15497 s = names8[code - al_reg];
15498 break;
6439fc28
AM
15499 case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
15500 case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
7bb15c6f 15501 if (address_mode == mode_64bit
6c067bbb 15502 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28
AM
15503 {
15504 s = names64[code - rAX_reg + add];
15505 break;
15506 }
15507 code += eAX_reg - rAX_reg;
6608db57 15508 /* Fall through. */
52b15da3
JH
15509 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
15510 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
15511 USED_REX (REX_W);
15512 if (rex & REX_W)
52b15da3 15513 s = names64[code - eAX_reg + add];
52b15da3 15514 else
f16cd0d5
L
15515 {
15516 if (sizeflag & DFLAG)
15517 s = names32[code - eAX_reg + add];
15518 else
15519 s = names16[code - eAX_reg + add];
15520 used_prefixes |= (prefixes & PREFIX_DATA);
15521 }
52b15da3 15522 break;
52b15da3
JH
15523 default:
15524 s = INTERNAL_DISASSEMBLER_ERROR;
15525 break;
15526 }
15527 oappend (s);
15528}
15529
15530static void
26ca5450 15531OP_IMREG (int code, int sizeflag)
52b15da3
JH
15532{
15533 const char *s;
252b5132
RH
15534
15535 switch (code)
15536 {
15537 case indir_dx_reg:
d708bcba 15538 if (intel_syntax)
52fd6d94 15539 s = "dx";
d708bcba 15540 else
db6eb5be 15541 s = "(%dx)";
252b5132
RH
15542 break;
15543 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
15544 case sp_reg: case bp_reg: case si_reg: case di_reg:
15545 s = names16[code - ax_reg];
15546 break;
15547 case es_reg: case ss_reg: case cs_reg:
15548 case ds_reg: case fs_reg: case gs_reg:
15549 s = names_seg[code - es_reg];
15550 break;
15551 case al_reg: case ah_reg: case cl_reg: case ch_reg:
15552 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
52b15da3
JH
15553 USED_REX (0);
15554 if (rex)
15555 s = names8rex[code - al_reg];
15556 else
15557 s = names8[code - al_reg];
252b5132
RH
15558 break;
15559 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
15560 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
15561 USED_REX (REX_W);
15562 if (rex & REX_W)
52b15da3 15563 s = names64[code - eAX_reg];
252b5132 15564 else
f16cd0d5
L
15565 {
15566 if (sizeflag & DFLAG)
15567 s = names32[code - eAX_reg];
15568 else
15569 s = names16[code - eAX_reg];
15570 used_prefixes |= (prefixes & PREFIX_DATA);
15571 }
252b5132 15572 break;
52fd6d94 15573 case z_mode_ax_reg:
161a04f6 15574 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
15575 s = *names32;
15576 else
15577 s = *names16;
161a04f6 15578 if (!(rex & REX_W))
52fd6d94
JB
15579 used_prefixes |= (prefixes & PREFIX_DATA);
15580 break;
252b5132
RH
15581 default:
15582 s = INTERNAL_DISASSEMBLER_ERROR;
15583 break;
15584 }
15585 oappend (s);
15586}
15587
15588static void
26ca5450 15589OP_I (int bytemode, int sizeflag)
252b5132 15590{
52b15da3
JH
15591 bfd_signed_vma op;
15592 bfd_signed_vma mask = -1;
252b5132
RH
15593
15594 switch (bytemode)
15595 {
15596 case b_mode:
15597 FETCH_DATA (the_info, codep + 1);
52b15da3
JH
15598 op = *codep++;
15599 mask = 0xff;
15600 break;
15601 case q_mode:
cb712a9e 15602 if (address_mode == mode_64bit)
6439fc28
AM
15603 {
15604 op = get32s ();
15605 break;
15606 }
6608db57 15607 /* Fall through. */
252b5132 15608 case v_mode:
161a04f6
L
15609 USED_REX (REX_W);
15610 if (rex & REX_W)
52b15da3 15611 op = get32s ();
252b5132 15612 else
52b15da3 15613 {
f16cd0d5
L
15614 if (sizeflag & DFLAG)
15615 {
15616 op = get32 ();
15617 mask = 0xffffffff;
15618 }
15619 else
15620 {
15621 op = get16 ();
15622 mask = 0xfffff;
15623 }
15624 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 15625 }
252b5132
RH
15626 break;
15627 case w_mode:
52b15da3 15628 mask = 0xfffff;
252b5132
RH
15629 op = get16 ();
15630 break;
9306ca4a
JB
15631 case const_1_mode:
15632 if (intel_syntax)
6c067bbb 15633 oappend ("1");
9306ca4a 15634 return;
252b5132
RH
15635 default:
15636 oappend (INTERNAL_DISASSEMBLER_ERROR);
15637 return;
15638 }
15639
52b15da3
JH
15640 op &= mask;
15641 scratchbuf[0] = '$';
d708bcba 15642 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 15643 oappend_maybe_intel (scratchbuf);
52b15da3
JH
15644 scratchbuf[0] = '\0';
15645}
15646
15647static void
26ca5450 15648OP_I64 (int bytemode, int sizeflag)
52b15da3
JH
15649{
15650 bfd_signed_vma op;
15651 bfd_signed_vma mask = -1;
15652
cb712a9e 15653 if (address_mode != mode_64bit)
6439fc28
AM
15654 {
15655 OP_I (bytemode, sizeflag);
15656 return;
15657 }
15658
52b15da3
JH
15659 switch (bytemode)
15660 {
15661 case b_mode:
15662 FETCH_DATA (the_info, codep + 1);
15663 op = *codep++;
15664 mask = 0xff;
15665 break;
15666 case v_mode:
161a04f6
L
15667 USED_REX (REX_W);
15668 if (rex & REX_W)
52b15da3 15669 op = get64 ();
52b15da3
JH
15670 else
15671 {
f16cd0d5
L
15672 if (sizeflag & DFLAG)
15673 {
15674 op = get32 ();
15675 mask = 0xffffffff;
15676 }
15677 else
15678 {
15679 op = get16 ();
15680 mask = 0xfffff;
15681 }
15682 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 15683 }
52b15da3
JH
15684 break;
15685 case w_mode:
15686 mask = 0xfffff;
15687 op = get16 ();
15688 break;
15689 default:
15690 oappend (INTERNAL_DISASSEMBLER_ERROR);
15691 return;
15692 }
15693
15694 op &= mask;
15695 scratchbuf[0] = '$';
d708bcba 15696 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 15697 oappend_maybe_intel (scratchbuf);
252b5132
RH
15698 scratchbuf[0] = '\0';
15699}
15700
15701static void
26ca5450 15702OP_sI (int bytemode, int sizeflag)
252b5132 15703{
52b15da3 15704 bfd_signed_vma op;
252b5132
RH
15705
15706 switch (bytemode)
15707 {
15708 case b_mode:
e3949f17 15709 case b_T_mode:
252b5132
RH
15710 FETCH_DATA (the_info, codep + 1);
15711 op = *codep++;
15712 if ((op & 0x80) != 0)
15713 op -= 0x100;
e3949f17
L
15714 if (bytemode == b_T_mode)
15715 {
15716 if (address_mode != mode_64bit
7bb15c6f 15717 || !((sizeflag & DFLAG) || (rex & REX_W)))
e3949f17 15718 {
6c067bbb
RM
15719 /* The operand-size prefix is overridden by a REX prefix. */
15720 if ((sizeflag & DFLAG) || (rex & REX_W))
e3949f17
L
15721 op &= 0xffffffff;
15722 else
15723 op &= 0xffff;
15724 }
15725 }
15726 else
15727 {
15728 if (!(rex & REX_W))
15729 {
15730 if (sizeflag & DFLAG)
15731 op &= 0xffffffff;
15732 else
15733 op &= 0xffff;
15734 }
15735 }
252b5132
RH
15736 break;
15737 case v_mode:
7bb15c6f
RM
15738 /* The operand-size prefix is overridden by a REX prefix. */
15739 if ((sizeflag & DFLAG) || (rex & REX_W))
52b15da3 15740 op = get32s ();
252b5132 15741 else
d9e3625e 15742 op = get16 ();
252b5132
RH
15743 break;
15744 default:
15745 oappend (INTERNAL_DISASSEMBLER_ERROR);
15746 return;
15747 }
52b15da3
JH
15748
15749 scratchbuf[0] = '$';
15750 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 15751 oappend_maybe_intel (scratchbuf);
252b5132
RH
15752}
15753
15754static void
26ca5450 15755OP_J (int bytemode, int sizeflag)
252b5132 15756{
52b15da3 15757 bfd_vma disp;
7081ff04 15758 bfd_vma mask = -1;
65ca155d 15759 bfd_vma segment = 0;
252b5132
RH
15760
15761 switch (bytemode)
15762 {
15763 case b_mode:
15764 FETCH_DATA (the_info, codep + 1);
15765 disp = *codep++;
15766 if ((disp & 0x80) != 0)
15767 disp -= 0x100;
15768 break;
15769 case v_mode:
5db04b09
L
15770 if (isa64 == amd64)
15771 USED_REX (REX_W);
15772 if ((sizeflag & DFLAG)
15773 || (address_mode == mode_64bit
15774 && (isa64 != amd64 || (rex & REX_W))))
52b15da3 15775 disp = get32s ();
252b5132
RH
15776 else
15777 {
15778 disp = get16 ();
206717e8
L
15779 if ((disp & 0x8000) != 0)
15780 disp -= 0x10000;
65ca155d
L
15781 /* In 16bit mode, address is wrapped around at 64k within
15782 the same segment. Otherwise, a data16 prefix on a jump
15783 instruction means that the pc is masked to 16 bits after
15784 the displacement is added! */
15785 mask = 0xffff;
15786 if ((prefixes & PREFIX_DATA) == 0)
15787 segment = ((start_pc + codep - start_codep)
15788 & ~((bfd_vma) 0xffff));
252b5132 15789 }
5db04b09
L
15790 if (address_mode != mode_64bit
15791 || (isa64 == amd64 && !(rex & REX_W)))
f16cd0d5 15792 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132
RH
15793 break;
15794 default:
15795 oappend (INTERNAL_DISASSEMBLER_ERROR);
15796 return;
15797 }
42d5f9c6 15798 disp = ((start_pc + (codep - start_codep) + disp) & mask) | segment;
52b15da3
JH
15799 set_op (disp, 0);
15800 print_operand_value (scratchbuf, 1, disp);
252b5132
RH
15801 oappend (scratchbuf);
15802}
15803
252b5132 15804static void
ed7841b3 15805OP_SEG (int bytemode, int sizeflag)
252b5132 15806{
ed7841b3 15807 if (bytemode == w_mode)
7967e09e 15808 oappend (names_seg[modrm.reg]);
ed7841b3 15809 else
7967e09e 15810 OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
252b5132
RH
15811}
15812
15813static void
26ca5450 15814OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
252b5132
RH
15815{
15816 int seg, offset;
15817
c608c12e 15818 if (sizeflag & DFLAG)
252b5132 15819 {
c608c12e
AM
15820 offset = get32 ();
15821 seg = get16 ();
252b5132 15822 }
c608c12e
AM
15823 else
15824 {
15825 offset = get16 ();
15826 seg = get16 ();
15827 }
7d421014 15828 used_prefixes |= (prefixes & PREFIX_DATA);
d708bcba 15829 if (intel_syntax)
3f31e633 15830 sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
d708bcba
AM
15831 else
15832 sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
c608c12e 15833 oappend (scratchbuf);
252b5132
RH
15834}
15835
252b5132 15836static void
3f31e633 15837OP_OFF (int bytemode, int sizeflag)
252b5132 15838{
52b15da3 15839 bfd_vma off;
252b5132 15840
3f31e633
JB
15841 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
15842 intel_operand_size (bytemode, sizeflag);
252b5132
RH
15843 append_seg ();
15844
cb712a9e 15845 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132
RH
15846 off = get32 ();
15847 else
15848 off = get16 ();
15849
15850 if (intel_syntax)
15851 {
285ca992 15852 if (!active_seg_prefix)
252b5132 15853 {
d708bcba 15854 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
15855 oappend (":");
15856 }
15857 }
52b15da3
JH
15858 print_operand_value (scratchbuf, 1, off);
15859 oappend (scratchbuf);
15860}
6439fc28 15861
52b15da3 15862static void
3f31e633 15863OP_OFF64 (int bytemode, int sizeflag)
52b15da3
JH
15864{
15865 bfd_vma off;
15866
539e75ad
L
15867 if (address_mode != mode_64bit
15868 || (prefixes & PREFIX_ADDR))
6439fc28
AM
15869 {
15870 OP_OFF (bytemode, sizeflag);
15871 return;
15872 }
15873
3f31e633
JB
15874 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
15875 intel_operand_size (bytemode, sizeflag);
52b15da3
JH
15876 append_seg ();
15877
6608db57 15878 off = get64 ();
52b15da3
JH
15879
15880 if (intel_syntax)
15881 {
285ca992 15882 if (!active_seg_prefix)
52b15da3 15883 {
d708bcba 15884 oappend (names_seg[ds_reg - es_reg]);
52b15da3
JH
15885 oappend (":");
15886 }
15887 }
15888 print_operand_value (scratchbuf, 1, off);
252b5132
RH
15889 oappend (scratchbuf);
15890}
15891
15892static void
26ca5450 15893ptr_reg (int code, int sizeflag)
252b5132 15894{
2da11e11 15895 const char *s;
d708bcba 15896
1d9f512f 15897 *obufp++ = open_char;
20f0a1fc 15898 used_prefixes |= (prefixes & PREFIX_ADDR);
cb712a9e 15899 if (address_mode == mode_64bit)
c1a64871
JH
15900 {
15901 if (!(sizeflag & AFLAG))
db6eb5be 15902 s = names32[code - eAX_reg];
c1a64871 15903 else
db6eb5be 15904 s = names64[code - eAX_reg];
c1a64871 15905 }
52b15da3 15906 else if (sizeflag & AFLAG)
252b5132
RH
15907 s = names32[code - eAX_reg];
15908 else
15909 s = names16[code - eAX_reg];
15910 oappend (s);
1d9f512f
AM
15911 *obufp++ = close_char;
15912 *obufp = 0;
252b5132
RH
15913}
15914
15915static void
26ca5450 15916OP_ESreg (int code, int sizeflag)
252b5132 15917{
9306ca4a 15918 if (intel_syntax)
52fd6d94
JB
15919 {
15920 switch (codep[-1])
15921 {
15922 case 0x6d: /* insw/insl */
15923 intel_operand_size (z_mode, sizeflag);
15924 break;
15925 case 0xa5: /* movsw/movsl/movsq */
15926 case 0xa7: /* cmpsw/cmpsl/cmpsq */
15927 case 0xab: /* stosw/stosl */
15928 case 0xaf: /* scasw/scasl */
15929 intel_operand_size (v_mode, sizeflag);
15930 break;
15931 default:
15932 intel_operand_size (b_mode, sizeflag);
15933 }
15934 }
9ce09ba2 15935 oappend_maybe_intel ("%es:");
252b5132
RH
15936 ptr_reg (code, sizeflag);
15937}
15938
15939static void
26ca5450 15940OP_DSreg (int code, int sizeflag)
252b5132 15941{
9306ca4a 15942 if (intel_syntax)
52fd6d94
JB
15943 {
15944 switch (codep[-1])
15945 {
15946 case 0x6f: /* outsw/outsl */
15947 intel_operand_size (z_mode, sizeflag);
15948 break;
15949 case 0xa5: /* movsw/movsl/movsq */
15950 case 0xa7: /* cmpsw/cmpsl/cmpsq */
15951 case 0xad: /* lodsw/lodsl/lodsq */
15952 intel_operand_size (v_mode, sizeflag);
15953 break;
15954 default:
15955 intel_operand_size (b_mode, sizeflag);
15956 }
15957 }
285ca992
L
15958 /* Set active_seg_prefix to PREFIX_DS if it is unset so that the
15959 default segment register DS is printed. */
15960 if (!active_seg_prefix)
15961 active_seg_prefix = PREFIX_DS;
6608db57 15962 append_seg ();
252b5132
RH
15963 ptr_reg (code, sizeflag);
15964}
15965
252b5132 15966static void
26ca5450 15967OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15968{
9b60702d 15969 int add;
161a04f6 15970 if (rex & REX_R)
c4a530c5 15971 {
161a04f6 15972 USED_REX (REX_R);
c4a530c5
JB
15973 add = 8;
15974 }
cb712a9e 15975 else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
c4a530c5 15976 {
f16cd0d5 15977 all_prefixes[last_lock_prefix] = 0;
c4a530c5
JB
15978 used_prefixes |= PREFIX_LOCK;
15979 add = 8;
15980 }
9b60702d
L
15981 else
15982 add = 0;
7967e09e 15983 sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
9ce09ba2 15984 oappend_maybe_intel (scratchbuf);
252b5132
RH
15985}
15986
252b5132 15987static void
26ca5450 15988OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15989{
9b60702d 15990 int add;
161a04f6
L
15991 USED_REX (REX_R);
15992 if (rex & REX_R)
52b15da3 15993 add = 8;
9b60702d
L
15994 else
15995 add = 0;
d708bcba 15996 if (intel_syntax)
7967e09e 15997 sprintf (scratchbuf, "db%d", modrm.reg + add);
d708bcba 15998 else
7967e09e 15999 sprintf (scratchbuf, "%%db%d", modrm.reg + add);
252b5132
RH
16000 oappend (scratchbuf);
16001}
16002
252b5132 16003static void
26ca5450 16004OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 16005{
7967e09e 16006 sprintf (scratchbuf, "%%tr%d", modrm.reg);
9ce09ba2 16007 oappend_maybe_intel (scratchbuf);
252b5132
RH
16008}
16009
16010static void
6f74c397 16011OP_R (int bytemode, int sizeflag)
252b5132 16012{
68f34464
L
16013 /* Skip mod/rm byte. */
16014 MODRM_CHECK;
16015 codep++;
16016 OP_E_register (bytemode, sizeflag);
252b5132
RH
16017}
16018
16019static void
26ca5450 16020OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 16021{
b9733481
L
16022 int reg = modrm.reg;
16023 const char **names;
16024
041bd2e0
JH
16025 used_prefixes |= (prefixes & PREFIX_DATA);
16026 if (prefixes & PREFIX_DATA)
20f0a1fc 16027 {
b9733481 16028 names = names_xmm;
161a04f6
L
16029 USED_REX (REX_R);
16030 if (rex & REX_R)
b9733481 16031 reg += 8;
20f0a1fc 16032 }
041bd2e0 16033 else
b9733481
L
16034 names = names_mm;
16035 oappend (names[reg]);
252b5132
RH
16036}
16037
c608c12e 16038static void
c0f3af97 16039OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
c608c12e 16040{
b9733481
L
16041 int reg = modrm.reg;
16042 const char **names;
16043
161a04f6
L
16044 USED_REX (REX_R);
16045 if (rex & REX_R)
b9733481 16046 reg += 8;
43234a1e
L
16047 if (vex.evex)
16048 {
16049 if (!vex.r)
16050 reg += 16;
16051 }
16052
539f890d
L
16053 if (need_vex
16054 && bytemode != xmm_mode
43234a1e
L
16055 && bytemode != xmmq_mode
16056 && bytemode != evex_half_bcst_xmmq_mode
16057 && bytemode != ymm_mode
539f890d 16058 && bytemode != scalar_mode)
c0f3af97
L
16059 {
16060 switch (vex.length)
16061 {
16062 case 128:
b9733481 16063 names = names_xmm;
c0f3af97
L
16064 break;
16065 case 256:
5fc35d96
IT
16066 if (vex.w
16067 || (bytemode != vex_vsib_q_w_dq_mode
16068 && bytemode != vex_vsib_q_w_d_mode))
6c30d220
L
16069 names = names_ymm;
16070 else
16071 names = names_xmm;
c0f3af97 16072 break;
43234a1e
L
16073 case 512:
16074 names = names_zmm;
16075 break;
c0f3af97
L
16076 default:
16077 abort ();
16078 }
16079 }
43234a1e
L
16080 else if (bytemode == xmmq_mode
16081 || bytemode == evex_half_bcst_xmmq_mode)
16082 {
16083 switch (vex.length)
16084 {
16085 case 128:
16086 case 256:
16087 names = names_xmm;
16088 break;
16089 case 512:
16090 names = names_ymm;
16091 break;
16092 default:
16093 abort ();
16094 }
16095 }
16096 else if (bytemode == ymm_mode)
16097 names = names_ymm;
c0f3af97 16098 else
b9733481
L
16099 names = names_xmm;
16100 oappend (names[reg]);
c608c12e
AM
16101}
16102
252b5132 16103static void
26ca5450 16104OP_EM (int bytemode, int sizeflag)
252b5132 16105{
b9733481
L
16106 int reg;
16107 const char **names;
16108
7967e09e 16109 if (modrm.mod != 3)
252b5132 16110 {
b6169b20
L
16111 if (intel_syntax
16112 && (bytemode == v_mode || bytemode == v_swap_mode))
9306ca4a
JB
16113 {
16114 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
16115 used_prefixes |= (prefixes & PREFIX_DATA);
6c067bbb 16116 }
252b5132
RH
16117 OP_E (bytemode, sizeflag);
16118 return;
16119 }
16120
b6169b20
L
16121 if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
16122 swap_operand ();
16123
6608db57 16124 /* Skip mod/rm byte. */
4bba6815 16125 MODRM_CHECK;
252b5132 16126 codep++;
041bd2e0 16127 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 16128 reg = modrm.rm;
041bd2e0 16129 if (prefixes & PREFIX_DATA)
20f0a1fc 16130 {
b9733481 16131 names = names_xmm;
161a04f6
L
16132 USED_REX (REX_B);
16133 if (rex & REX_B)
b9733481 16134 reg += 8;
20f0a1fc 16135 }
041bd2e0 16136 else
b9733481
L
16137 names = names_mm;
16138 oappend (names[reg]);
252b5132
RH
16139}
16140
246c51aa
L
16141/* cvt* are the only instructions in sse2 which have
16142 both SSE and MMX operands and also have 0x66 prefix
16143 in their opcode. 0x66 was originally used to differentiate
16144 between SSE and MMX instruction(operands). So we have to handle the
4d9567e0
MM
16145 cvt* separately using OP_EMC and OP_MXC */
16146static void
16147OP_EMC (int bytemode, int sizeflag)
16148{
7967e09e 16149 if (modrm.mod != 3)
4d9567e0
MM
16150 {
16151 if (intel_syntax && bytemode == v_mode)
16152 {
16153 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
16154 used_prefixes |= (prefixes & PREFIX_DATA);
6c067bbb 16155 }
4d9567e0
MM
16156 OP_E (bytemode, sizeflag);
16157 return;
16158 }
246c51aa 16159
4d9567e0
MM
16160 /* Skip mod/rm byte. */
16161 MODRM_CHECK;
16162 codep++;
16163 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 16164 oappend (names_mm[modrm.rm]);
4d9567e0
MM
16165}
16166
16167static void
16168OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16169{
16170 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 16171 oappend (names_mm[modrm.reg]);
4d9567e0
MM
16172}
16173
c608c12e 16174static void
26ca5450 16175OP_EX (int bytemode, int sizeflag)
c608c12e 16176{
b9733481
L
16177 int reg;
16178 const char **names;
d6f574e0
L
16179
16180 /* Skip mod/rm byte. */
16181 MODRM_CHECK;
16182 codep++;
16183
7967e09e 16184 if (modrm.mod != 3)
c608c12e 16185 {
c1e679ec 16186 OP_E_memory (bytemode, sizeflag);
c608c12e
AM
16187 return;
16188 }
d6f574e0 16189
b9733481 16190 reg = modrm.rm;
161a04f6
L
16191 USED_REX (REX_B);
16192 if (rex & REX_B)
b9733481 16193 reg += 8;
43234a1e
L
16194 if (vex.evex)
16195 {
16196 USED_REX (REX_X);
16197 if ((rex & REX_X))
16198 reg += 16;
16199 }
c608c12e 16200
b6169b20 16201 if ((sizeflag & SUFFIX_ALWAYS)
fa99fab2
L
16202 && (bytemode == x_swap_mode
16203 || bytemode == d_swap_mode
1ba585e8 16204 || bytemode == dqw_swap_mode
7bb15c6f 16205 || bytemode == d_scalar_swap_mode
539f890d
L
16206 || bytemode == q_swap_mode
16207 || bytemode == q_scalar_swap_mode))
b6169b20
L
16208 swap_operand ();
16209
c0f3af97
L
16210 if (need_vex
16211 && bytemode != xmm_mode
6c30d220
L
16212 && bytemode != xmmdw_mode
16213 && bytemode != xmmqd_mode
16214 && bytemode != xmm_mb_mode
16215 && bytemode != xmm_mw_mode
16216 && bytemode != xmm_md_mode
16217 && bytemode != xmm_mq_mode
43234a1e 16218 && bytemode != xmm_mdq_mode
539f890d 16219 && bytemode != xmmq_mode
43234a1e
L
16220 && bytemode != evex_half_bcst_xmmq_mode
16221 && bytemode != ymm_mode
539f890d 16222 && bytemode != d_scalar_mode
7bb15c6f 16223 && bytemode != d_scalar_swap_mode
539f890d 16224 && bytemode != q_scalar_mode
1c480963
L
16225 && bytemode != q_scalar_swap_mode
16226 && bytemode != vex_scalar_w_dq_mode)
c0f3af97
L
16227 {
16228 switch (vex.length)
16229 {
16230 case 128:
b9733481 16231 names = names_xmm;
c0f3af97
L
16232 break;
16233 case 256:
b9733481 16234 names = names_ymm;
c0f3af97 16235 break;
43234a1e
L
16236 case 512:
16237 names = names_zmm;
16238 break;
c0f3af97
L
16239 default:
16240 abort ();
16241 }
16242 }
43234a1e
L
16243 else if (bytemode == xmmq_mode
16244 || bytemode == evex_half_bcst_xmmq_mode)
16245 {
16246 switch (vex.length)
16247 {
16248 case 128:
16249 case 256:
16250 names = names_xmm;
16251 break;
16252 case 512:
16253 names = names_ymm;
16254 break;
16255 default:
16256 abort ();
16257 }
16258 }
16259 else if (bytemode == ymm_mode)
16260 names = names_ymm;
c0f3af97 16261 else
b9733481
L
16262 names = names_xmm;
16263 oappend (names[reg]);
c608c12e
AM
16264}
16265
252b5132 16266static void
26ca5450 16267OP_MS (int bytemode, int sizeflag)
252b5132 16268{
7967e09e 16269 if (modrm.mod == 3)
2da11e11
AM
16270 OP_EM (bytemode, sizeflag);
16271 else
6608db57 16272 BadOp ();
252b5132
RH
16273}
16274
992aaec9 16275static void
26ca5450 16276OP_XS (int bytemode, int sizeflag)
992aaec9 16277{
7967e09e 16278 if (modrm.mod == 3)
992aaec9
AM
16279 OP_EX (bytemode, sizeflag);
16280 else
6608db57 16281 BadOp ();
992aaec9
AM
16282}
16283
cc0ec051
AM
16284static void
16285OP_M (int bytemode, int sizeflag)
16286{
7967e09e 16287 if (modrm.mod == 3)
75413a22
L
16288 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
16289 BadOp ();
cc0ec051
AM
16290 else
16291 OP_E (bytemode, sizeflag);
16292}
16293
16294static void
16295OP_0f07 (int bytemode, int sizeflag)
16296{
7967e09e 16297 if (modrm.mod != 3 || modrm.rm != 0)
cc0ec051
AM
16298 BadOp ();
16299 else
16300 OP_E (bytemode, sizeflag);
16301}
16302
46e883c5 16303/* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
246c51aa 16304 32bit mode and "xchg %rax,%rax" in 64bit mode. */
46e883c5 16305
cc0ec051 16306static void
46e883c5 16307NOP_Fixup1 (int bytemode, int sizeflag)
cc0ec051 16308{
8b38ad71
L
16309 if ((prefixes & PREFIX_DATA) != 0
16310 || (rex != 0
16311 && rex != 0x48
16312 && address_mode == mode_64bit))
46e883c5
L
16313 OP_REG (bytemode, sizeflag);
16314 else
16315 strcpy (obuf, "nop");
16316}
16317
16318static void
16319NOP_Fixup2 (int bytemode, int sizeflag)
16320{
8b38ad71
L
16321 if ((prefixes & PREFIX_DATA) != 0
16322 || (rex != 0
16323 && rex != 0x48
16324 && address_mode == mode_64bit))
46e883c5 16325 OP_IMREG (bytemode, sizeflag);
cc0ec051
AM
16326}
16327
84037f8c 16328static const char *const Suffix3DNow[] = {
252b5132
RH
16329/* 00 */ NULL, NULL, NULL, NULL,
16330/* 04 */ NULL, NULL, NULL, NULL,
16331/* 08 */ NULL, NULL, NULL, NULL,
9e525108 16332/* 0C */ "pi2fw", "pi2fd", NULL, NULL,
252b5132
RH
16333/* 10 */ NULL, NULL, NULL, NULL,
16334/* 14 */ NULL, NULL, NULL, NULL,
16335/* 18 */ NULL, NULL, NULL, NULL,
9e525108 16336/* 1C */ "pf2iw", "pf2id", NULL, NULL,
252b5132
RH
16337/* 20 */ NULL, NULL, NULL, NULL,
16338/* 24 */ NULL, NULL, NULL, NULL,
16339/* 28 */ NULL, NULL, NULL, NULL,
16340/* 2C */ NULL, NULL, NULL, NULL,
16341/* 30 */ NULL, NULL, NULL, NULL,
16342/* 34 */ NULL, NULL, NULL, NULL,
16343/* 38 */ NULL, NULL, NULL, NULL,
16344/* 3C */ NULL, NULL, NULL, NULL,
16345/* 40 */ NULL, NULL, NULL, NULL,
16346/* 44 */ NULL, NULL, NULL, NULL,
16347/* 48 */ NULL, NULL, NULL, NULL,
16348/* 4C */ NULL, NULL, NULL, NULL,
16349/* 50 */ NULL, NULL, NULL, NULL,
16350/* 54 */ NULL, NULL, NULL, NULL,
16351/* 58 */ NULL, NULL, NULL, NULL,
16352/* 5C */ NULL, NULL, NULL, NULL,
16353/* 60 */ NULL, NULL, NULL, NULL,
16354/* 64 */ NULL, NULL, NULL, NULL,
16355/* 68 */ NULL, NULL, NULL, NULL,
16356/* 6C */ NULL, NULL, NULL, NULL,
16357/* 70 */ NULL, NULL, NULL, NULL,
16358/* 74 */ NULL, NULL, NULL, NULL,
16359/* 78 */ NULL, NULL, NULL, NULL,
16360/* 7C */ NULL, NULL, NULL, NULL,
16361/* 80 */ NULL, NULL, NULL, NULL,
16362/* 84 */ NULL, NULL, NULL, NULL,
9e525108
AM
16363/* 88 */ NULL, NULL, "pfnacc", NULL,
16364/* 8C */ NULL, NULL, "pfpnacc", NULL,
252b5132
RH
16365/* 90 */ "pfcmpge", NULL, NULL, NULL,
16366/* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
16367/* 98 */ NULL, NULL, "pfsub", NULL,
16368/* 9C */ NULL, NULL, "pfadd", NULL,
16369/* A0 */ "pfcmpgt", NULL, NULL, NULL,
16370/* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
16371/* A8 */ NULL, NULL, "pfsubr", NULL,
16372/* AC */ NULL, NULL, "pfacc", NULL,
16373/* B0 */ "pfcmpeq", NULL, NULL, NULL,
9beff690 16374/* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
9e525108 16375/* B8 */ NULL, NULL, NULL, "pswapd",
252b5132
RH
16376/* BC */ NULL, NULL, NULL, "pavgusb",
16377/* C0 */ NULL, NULL, NULL, NULL,
16378/* C4 */ NULL, NULL, NULL, NULL,
16379/* C8 */ NULL, NULL, NULL, NULL,
16380/* CC */ NULL, NULL, NULL, NULL,
16381/* D0 */ NULL, NULL, NULL, NULL,
16382/* D4 */ NULL, NULL, NULL, NULL,
16383/* D8 */ NULL, NULL, NULL, NULL,
16384/* DC */ NULL, NULL, NULL, NULL,
16385/* E0 */ NULL, NULL, NULL, NULL,
16386/* E4 */ NULL, NULL, NULL, NULL,
16387/* E8 */ NULL, NULL, NULL, NULL,
16388/* EC */ NULL, NULL, NULL, NULL,
16389/* F0 */ NULL, NULL, NULL, NULL,
16390/* F4 */ NULL, NULL, NULL, NULL,
16391/* F8 */ NULL, NULL, NULL, NULL,
16392/* FC */ NULL, NULL, NULL, NULL,
16393};
16394
16395static void
26ca5450 16396OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132
RH
16397{
16398 const char *mnemonic;
16399
16400 FETCH_DATA (the_info, codep + 1);
16401 /* AMD 3DNow! instructions are specified by an opcode suffix in the
16402 place where an 8-bit immediate would normally go. ie. the last
16403 byte of the instruction. */
ea397f5b 16404 obufp = mnemonicendp;
c608c12e 16405 mnemonic = Suffix3DNow[*codep++ & 0xff];
252b5132 16406 if (mnemonic)
2da11e11 16407 oappend (mnemonic);
252b5132
RH
16408 else
16409 {
16410 /* Since a variable sized modrm/sib chunk is between the start
16411 of the opcode (0x0f0f) and the opcode suffix, we need to do
16412 all the modrm processing first, and don't know until now that
16413 we have a bad opcode. This necessitates some cleaning up. */
ce518a5f
L
16414 op_out[0][0] = '\0';
16415 op_out[1][0] = '\0';
6608db57 16416 BadOp ();
252b5132 16417 }
ea397f5b 16418 mnemonicendp = obufp;
252b5132 16419}
c608c12e 16420
ea397f5b
L
16421static struct op simd_cmp_op[] =
16422{
16423 { STRING_COMMA_LEN ("eq") },
16424 { STRING_COMMA_LEN ("lt") },
16425 { STRING_COMMA_LEN ("le") },
16426 { STRING_COMMA_LEN ("unord") },
16427 { STRING_COMMA_LEN ("neq") },
16428 { STRING_COMMA_LEN ("nlt") },
16429 { STRING_COMMA_LEN ("nle") },
16430 { STRING_COMMA_LEN ("ord") }
c608c12e
AM
16431};
16432
16433static void
ad19981d 16434CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
c608c12e
AM
16435{
16436 unsigned int cmp_type;
16437
16438 FETCH_DATA (the_info, codep + 1);
16439 cmp_type = *codep++ & 0xff;
c0f3af97 16440 if (cmp_type < ARRAY_SIZE (simd_cmp_op))
c608c12e 16441 {
ad19981d 16442 char suffix [3];
ea397f5b 16443 char *p = mnemonicendp - 2;
ad19981d
L
16444 suffix[0] = p[0];
16445 suffix[1] = p[1];
16446 suffix[2] = '\0';
ea397f5b
L
16447 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
16448 mnemonicendp += simd_cmp_op[cmp_type].len;
c608c12e
AM
16449 }
16450 else
16451 {
ad19981d
L
16452 /* We have a reserved extension byte. Output it directly. */
16453 scratchbuf[0] = '$';
16454 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 16455 oappend_maybe_intel (scratchbuf);
ad19981d 16456 scratchbuf[0] = '\0';
c608c12e
AM
16457 }
16458}
16459
9916071f
AP
16460static void
16461OP_Mwaitx (int bytemode ATTRIBUTE_UNUSED,
16462 int sizeflag ATTRIBUTE_UNUSED)
16463{
16464 /* mwaitx %eax,%ecx,%ebx */
16465 if (!intel_syntax)
16466 {
16467 const char **names = (address_mode == mode_64bit
16468 ? names64 : names32);
16469 strcpy (op_out[0], names[0]);
16470 strcpy (op_out[1], names[1]);
16471 strcpy (op_out[2], names[3]);
16472 two_source_ops = 1;
16473 }
16474 /* Skip mod/rm byte. */
16475 MODRM_CHECK;
16476 codep++;
16477}
16478
ca164297 16479static void
b844680a
L
16480OP_Mwait (int bytemode ATTRIBUTE_UNUSED,
16481 int sizeflag ATTRIBUTE_UNUSED)
16482{
16483 /* mwait %eax,%ecx */
16484 if (!intel_syntax)
16485 {
16486 const char **names = (address_mode == mode_64bit
16487 ? names64 : names32);
16488 strcpy (op_out[0], names[0]);
16489 strcpy (op_out[1], names[1]);
16490 two_source_ops = 1;
16491 }
16492 /* Skip mod/rm byte. */
16493 MODRM_CHECK;
16494 codep++;
16495}
16496
16497static void
16498OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
16499 int sizeflag ATTRIBUTE_UNUSED)
ca164297 16500{
b844680a
L
16501 /* monitor %eax,%ecx,%edx" */
16502 if (!intel_syntax)
ca164297 16503 {
b844680a 16504 const char **op1_names;
cb712a9e
L
16505 const char **names = (address_mode == mode_64bit
16506 ? names64 : names32);
1d9f512f 16507
b844680a
L
16508 if (!(prefixes & PREFIX_ADDR))
16509 op1_names = (address_mode == mode_16bit
16510 ? names16 : names);
ca164297
L
16511 else
16512 {
b844680a 16513 /* Remove "addr16/addr32". */
f16cd0d5 16514 all_prefixes[last_addr_prefix] = 0;
b844680a
L
16515 op1_names = (address_mode != mode_32bit
16516 ? names32 : names16);
16517 used_prefixes |= PREFIX_ADDR;
ca164297 16518 }
b844680a
L
16519 strcpy (op_out[0], op1_names[0]);
16520 strcpy (op_out[1], names[1]);
16521 strcpy (op_out[2], names[2]);
16522 two_source_ops = 1;
ca164297 16523 }
b844680a
L
16524 /* Skip mod/rm byte. */
16525 MODRM_CHECK;
16526 codep++;
30123838
JB
16527}
16528
6608db57
KH
16529static void
16530BadOp (void)
2da11e11 16531{
6608db57
KH
16532 /* Throw away prefixes and 1st. opcode byte. */
16533 codep = insn_codep + 1;
2da11e11
AM
16534 oappend ("(bad)");
16535}
4cc91dba 16536
35c52694
L
16537static void
16538REP_Fixup (int bytemode, int sizeflag)
16539{
16540 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
16541 lods and stos. */
35c52694 16542 if (prefixes & PREFIX_REPZ)
f16cd0d5 16543 all_prefixes[last_repz_prefix] = REP_PREFIX;
35c52694
L
16544
16545 switch (bytemode)
16546 {
16547 case al_reg:
16548 case eAX_reg:
16549 case indir_dx_reg:
16550 OP_IMREG (bytemode, sizeflag);
16551 break;
16552 case eDI_reg:
16553 OP_ESreg (bytemode, sizeflag);
16554 break;
16555 case eSI_reg:
16556 OP_DSreg (bytemode, sizeflag);
16557 break;
16558 default:
16559 abort ();
16560 break;
16561 }
16562}
f5804c90 16563
7e8b059b
L
16564/* For BND-prefixed instructions 0xF2 prefix should be displayed as
16565 "bnd". */
16566
16567static void
16568BND_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16569{
16570 if (prefixes & PREFIX_REPNZ)
16571 all_prefixes[last_repnz_prefix] = BND_PREFIX;
16572}
16573
42164a71
L
16574/* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
16575 "xacquire"/"xrelease" for memory operand if there is a LOCK prefix.
16576 */
16577
16578static void
16579HLE_Fixup1 (int bytemode, int sizeflag)
16580{
16581 if (modrm.mod != 3
16582 && (prefixes & PREFIX_LOCK) != 0)
16583 {
16584 if (prefixes & PREFIX_REPZ)
16585 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
16586 if (prefixes & PREFIX_REPNZ)
16587 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
16588 }
16589
16590 OP_E (bytemode, sizeflag);
16591}
16592
16593/* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
16594 "xacquire"/"xrelease" for memory operand. No check for LOCK prefix.
16595 */
16596
16597static void
16598HLE_Fixup2 (int bytemode, int sizeflag)
16599{
16600 if (modrm.mod != 3)
16601 {
16602 if (prefixes & PREFIX_REPZ)
16603 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
16604 if (prefixes & PREFIX_REPNZ)
16605 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
16606 }
16607
16608 OP_E (bytemode, sizeflag);
16609}
16610
16611/* Similar to OP_E. But the 0xf3 prefixes should be displayed as
16612 "xrelease" for memory operand. No check for LOCK prefix. */
16613
16614static void
16615HLE_Fixup3 (int bytemode, int sizeflag)
16616{
16617 if (modrm.mod != 3
16618 && last_repz_prefix > last_repnz_prefix
16619 && (prefixes & PREFIX_REPZ) != 0)
16620 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
16621
16622 OP_E (bytemode, sizeflag);
16623}
16624
f5804c90
L
16625static void
16626CMPXCHG8B_Fixup (int bytemode, int sizeflag)
16627{
161a04f6
L
16628 USED_REX (REX_W);
16629 if (rex & REX_W)
f5804c90
L
16630 {
16631 /* Change cmpxchg8b to cmpxchg16b. */
ea397f5b
L
16632 char *p = mnemonicendp - 2;
16633 mnemonicendp = stpcpy (p, "16b");
fb9c77c7 16634 bytemode = o_mode;
f5804c90 16635 }
42164a71
L
16636 else if ((prefixes & PREFIX_LOCK) != 0)
16637 {
16638 if (prefixes & PREFIX_REPZ)
16639 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
16640 if (prefixes & PREFIX_REPNZ)
16641 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
16642 }
16643
f5804c90
L
16644 OP_M (bytemode, sizeflag);
16645}
42903f7f
L
16646
16647static void
16648XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
16649{
b9733481
L
16650 const char **names;
16651
c0f3af97
L
16652 if (need_vex)
16653 {
16654 switch (vex.length)
16655 {
16656 case 128:
b9733481 16657 names = names_xmm;
c0f3af97
L
16658 break;
16659 case 256:
b9733481 16660 names = names_ymm;
c0f3af97
L
16661 break;
16662 default:
16663 abort ();
16664 }
16665 }
16666 else
b9733481
L
16667 names = names_xmm;
16668 oappend (names[reg]);
42903f7f 16669}
381d071f
L
16670
16671static void
16672CRC32_Fixup (int bytemode, int sizeflag)
16673{
16674 /* Add proper suffix to "crc32". */
ea397f5b 16675 char *p = mnemonicendp;
381d071f
L
16676
16677 switch (bytemode)
16678 {
16679 case b_mode:
20592a94 16680 if (intel_syntax)
ea397f5b 16681 goto skip;
20592a94 16682
381d071f
L
16683 *p++ = 'b';
16684 break;
16685 case v_mode:
20592a94 16686 if (intel_syntax)
ea397f5b 16687 goto skip;
20592a94 16688
381d071f
L
16689 USED_REX (REX_W);
16690 if (rex & REX_W)
16691 *p++ = 'q';
7bb15c6f 16692 else
f16cd0d5
L
16693 {
16694 if (sizeflag & DFLAG)
16695 *p++ = 'l';
16696 else
16697 *p++ = 'w';
16698 used_prefixes |= (prefixes & PREFIX_DATA);
16699 }
381d071f
L
16700 break;
16701 default:
16702 oappend (INTERNAL_DISASSEMBLER_ERROR);
16703 break;
16704 }
ea397f5b 16705 mnemonicendp = p;
381d071f
L
16706 *p = '\0';
16707
ea397f5b 16708skip:
381d071f
L
16709 if (modrm.mod == 3)
16710 {
16711 int add;
16712
16713 /* Skip mod/rm byte. */
16714 MODRM_CHECK;
16715 codep++;
16716
16717 USED_REX (REX_B);
16718 add = (rex & REX_B) ? 8 : 0;
16719 if (bytemode == b_mode)
16720 {
16721 USED_REX (0);
16722 if (rex)
16723 oappend (names8rex[modrm.rm + add]);
16724 else
16725 oappend (names8[modrm.rm + add]);
16726 }
16727 else
16728 {
16729 USED_REX (REX_W);
16730 if (rex & REX_W)
16731 oappend (names64[modrm.rm + add]);
16732 else if ((prefixes & PREFIX_DATA))
16733 oappend (names16[modrm.rm + add]);
16734 else
16735 oappend (names32[modrm.rm + add]);
16736 }
16737 }
16738 else
9344ff29 16739 OP_E (bytemode, sizeflag);
381d071f 16740}
85f10a01 16741
eacc9c89
L
16742static void
16743FXSAVE_Fixup (int bytemode, int sizeflag)
16744{
16745 /* Add proper suffix to "fxsave" and "fxrstor". */
16746 USED_REX (REX_W);
16747 if (rex & REX_W)
16748 {
16749 char *p = mnemonicendp;
16750 *p++ = '6';
16751 *p++ = '4';
16752 *p = '\0';
16753 mnemonicendp = p;
16754 }
16755 OP_M (bytemode, sizeflag);
16756}
16757
c0f3af97
L
16758/* Display the destination register operand for instructions with
16759 VEX. */
16760
16761static void
16762OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16763{
539f890d 16764 int reg;
b9733481
L
16765 const char **names;
16766
c0f3af97
L
16767 if (!need_vex)
16768 abort ();
16769
16770 if (!need_vex_reg)
16771 return;
16772
539f890d 16773 reg = vex.register_specifier;
43234a1e
L
16774 if (vex.evex)
16775 {
16776 if (!vex.v)
16777 reg += 16;
16778 }
16779
539f890d
L
16780 if (bytemode == vex_scalar_mode)
16781 {
16782 oappend (names_xmm[reg]);
16783 return;
16784 }
16785
c0f3af97
L
16786 switch (vex.length)
16787 {
16788 case 128:
16789 switch (bytemode)
16790 {
16791 case vex_mode:
16792 case vex128_mode:
6c30d220 16793 case vex_vsib_q_w_dq_mode:
5fc35d96 16794 case vex_vsib_q_w_d_mode:
cb21baef
L
16795 names = names_xmm;
16796 break;
16797 case dq_mode:
16798 if (vex.w)
16799 names = names64;
16800 else
16801 names = names32;
c0f3af97 16802 break;
1ba585e8 16803 case mask_bd_mode:
43234a1e
L
16804 case mask_mode:
16805 names = names_mask;
16806 break;
c0f3af97
L
16807 default:
16808 abort ();
16809 return;
16810 }
c0f3af97
L
16811 break;
16812 case 256:
16813 switch (bytemode)
16814 {
16815 case vex_mode:
16816 case vex256_mode:
6c30d220
L
16817 names = names_ymm;
16818 break;
16819 case vex_vsib_q_w_dq_mode:
5fc35d96 16820 case vex_vsib_q_w_d_mode:
6c30d220 16821 names = vex.w ? names_ymm : names_xmm;
c0f3af97 16822 break;
1ba585e8 16823 case mask_bd_mode:
43234a1e
L
16824 case mask_mode:
16825 names = names_mask;
16826 break;
c0f3af97
L
16827 default:
16828 abort ();
16829 return;
16830 }
c0f3af97 16831 break;
43234a1e
L
16832 case 512:
16833 names = names_zmm;
16834 break;
c0f3af97
L
16835 default:
16836 abort ();
16837 break;
16838 }
539f890d 16839 oappend (names[reg]);
c0f3af97
L
16840}
16841
922d8de8
DR
16842/* Get the VEX immediate byte without moving codep. */
16843
16844static unsigned char
ccc5981b 16845get_vex_imm8 (int sizeflag, int opnum)
922d8de8
DR
16846{
16847 int bytes_before_imm = 0;
16848
922d8de8
DR
16849 if (modrm.mod != 3)
16850 {
16851 /* There are SIB/displacement bytes. */
16852 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
6c067bbb 16853 {
922d8de8 16854 /* 32/64 bit address mode */
6c067bbb 16855 int base = modrm.rm;
922d8de8
DR
16856
16857 /* Check SIB byte. */
6c067bbb
RM
16858 if (base == 4)
16859 {
16860 FETCH_DATA (the_info, codep + 1);
16861 base = *codep & 7;
16862 /* When decoding the third source, don't increase
16863 bytes_before_imm as this has already been incremented
16864 by one in OP_E_memory while decoding the second
16865 source operand. */
16866 if (opnum == 0)
16867 bytes_before_imm++;
16868 }
16869
16870 /* Don't increase bytes_before_imm when decoding the third source,
16871 it has already been incremented by OP_E_memory while decoding
16872 the second source operand. */
16873 if (opnum == 0)
16874 {
16875 switch (modrm.mod)
16876 {
16877 case 0:
16878 /* When modrm.rm == 5 or modrm.rm == 4 and base in
16879 SIB == 5, there is a 4 byte displacement. */
16880 if (base != 5)
16881 /* No displacement. */
16882 break;
16883 case 2:
16884 /* 4 byte displacement. */
16885 bytes_before_imm += 4;
16886 break;
16887 case 1:
16888 /* 1 byte displacement. */
16889 bytes_before_imm++;
16890 break;
16891 }
16892 }
16893 }
922d8de8 16894 else
02e647f9
SP
16895 {
16896 /* 16 bit address mode */
6c067bbb
RM
16897 /* Don't increase bytes_before_imm when decoding the third source,
16898 it has already been incremented by OP_E_memory while decoding
16899 the second source operand. */
16900 if (opnum == 0)
16901 {
02e647f9
SP
16902 switch (modrm.mod)
16903 {
16904 case 0:
16905 /* When modrm.rm == 6, there is a 2 byte displacement. */
16906 if (modrm.rm != 6)
16907 /* No displacement. */
16908 break;
16909 case 2:
16910 /* 2 byte displacement. */
16911 bytes_before_imm += 2;
16912 break;
16913 case 1:
16914 /* 1 byte displacement: when decoding the third source,
16915 don't increase bytes_before_imm as this has already
16916 been incremented by one in OP_E_memory while decoding
16917 the second source operand. */
16918 if (opnum == 0)
16919 bytes_before_imm++;
ccc5981b 16920
02e647f9
SP
16921 break;
16922 }
922d8de8
DR
16923 }
16924 }
16925 }
16926
16927 FETCH_DATA (the_info, codep + bytes_before_imm + 1);
16928 return codep [bytes_before_imm];
16929}
16930
16931static void
16932OP_EX_VexReg (int bytemode, int sizeflag, int reg)
16933{
b9733481
L
16934 const char **names;
16935
922d8de8
DR
16936 if (reg == -1 && modrm.mod != 3)
16937 {
16938 OP_E_memory (bytemode, sizeflag);
16939 return;
16940 }
16941 else
16942 {
16943 if (reg == -1)
16944 {
16945 reg = modrm.rm;
16946 USED_REX (REX_B);
16947 if (rex & REX_B)
16948 reg += 8;
16949 }
16950 else if (reg > 7 && address_mode != mode_64bit)
16951 BadOp ();
16952 }
16953
16954 switch (vex.length)
16955 {
16956 case 128:
b9733481 16957 names = names_xmm;
922d8de8
DR
16958 break;
16959 case 256:
b9733481 16960 names = names_ymm;
922d8de8
DR
16961 break;
16962 default:
16963 abort ();
16964 }
b9733481 16965 oappend (names[reg]);
922d8de8
DR
16966}
16967
a683cc34
SP
16968static void
16969OP_EX_VexImmW (int bytemode, int sizeflag)
16970{
16971 int reg = -1;
16972 static unsigned char vex_imm8;
16973
16974 if (vex_w_done == 0)
16975 {
16976 vex_w_done = 1;
16977
16978 /* Skip mod/rm byte. */
16979 MODRM_CHECK;
16980 codep++;
16981
16982 vex_imm8 = get_vex_imm8 (sizeflag, 0);
16983
16984 if (vex.w)
16985 reg = vex_imm8 >> 4;
16986
16987 OP_EX_VexReg (bytemode, sizeflag, reg);
16988 }
16989 else if (vex_w_done == 1)
16990 {
16991 vex_w_done = 2;
16992
16993 if (!vex.w)
16994 reg = vex_imm8 >> 4;
16995
16996 OP_EX_VexReg (bytemode, sizeflag, reg);
16997 }
16998 else
16999 {
17000 /* Output the imm8 directly. */
17001 scratchbuf[0] = '$';
17002 print_operand_value (scratchbuf + 1, 1, vex_imm8 & 0xf);
9ce09ba2 17003 oappend_maybe_intel (scratchbuf);
a683cc34
SP
17004 scratchbuf[0] = '\0';
17005 codep++;
17006 }
17007}
17008
5dd85c99
SP
17009static void
17010OP_Vex_2src (int bytemode, int sizeflag)
17011{
17012 if (modrm.mod == 3)
17013 {
b9733481 17014 int reg = modrm.rm;
5dd85c99 17015 USED_REX (REX_B);
b9733481
L
17016 if (rex & REX_B)
17017 reg += 8;
17018 oappend (names_xmm[reg]);
5dd85c99
SP
17019 }
17020 else
17021 {
17022 if (intel_syntax
17023 && (bytemode == v_mode || bytemode == v_swap_mode))
17024 {
17025 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
17026 used_prefixes |= (prefixes & PREFIX_DATA);
17027 }
17028 OP_E (bytemode, sizeflag);
17029 }
17030}
17031
17032static void
17033OP_Vex_2src_1 (int bytemode, int sizeflag)
17034{
17035 if (modrm.mod == 3)
17036 {
17037 /* Skip mod/rm byte. */
17038 MODRM_CHECK;
17039 codep++;
17040 }
17041
17042 if (vex.w)
b9733481 17043 oappend (names_xmm[vex.register_specifier]);
5dd85c99
SP
17044 else
17045 OP_Vex_2src (bytemode, sizeflag);
17046}
17047
17048static void
17049OP_Vex_2src_2 (int bytemode, int sizeflag)
17050{
17051 if (vex.w)
17052 OP_Vex_2src (bytemode, sizeflag);
17053 else
b9733481 17054 oappend (names_xmm[vex.register_specifier]);
5dd85c99
SP
17055}
17056
922d8de8
DR
17057static void
17058OP_EX_VexW (int bytemode, int sizeflag)
17059{
17060 int reg = -1;
17061
17062 if (!vex_w_done)
17063 {
17064 vex_w_done = 1;
41effecb
SP
17065
17066 /* Skip mod/rm byte. */
17067 MODRM_CHECK;
17068 codep++;
17069
922d8de8 17070 if (vex.w)
ccc5981b 17071 reg = get_vex_imm8 (sizeflag, 0) >> 4;
922d8de8
DR
17072 }
17073 else
17074 {
17075 if (!vex.w)
ccc5981b 17076 reg = get_vex_imm8 (sizeflag, 1) >> 4;
922d8de8
DR
17077 }
17078
17079 OP_EX_VexReg (bytemode, sizeflag, reg);
17080}
17081
922d8de8
DR
17082static void
17083VEXI4_Fixup (int bytemode ATTRIBUTE_UNUSED,
17084 int sizeflag ATTRIBUTE_UNUSED)
17085{
17086 /* Skip the immediate byte and check for invalid bits. */
17087 FETCH_DATA (the_info, codep + 1);
17088 if (*codep++ & 0xf)
17089 BadOp ();
17090}
17091
c0f3af97
L
17092static void
17093OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17094{
17095 int reg;
b9733481
L
17096 const char **names;
17097
c0f3af97
L
17098 FETCH_DATA (the_info, codep + 1);
17099 reg = *codep++;
17100
17101 if (bytemode != x_mode)
17102 abort ();
17103
17104 if (reg & 0xf)
17105 BadOp ();
17106
17107 reg >>= 4;
dae39acc
L
17108 if (reg > 7 && address_mode != mode_64bit)
17109 BadOp ();
17110
c0f3af97
L
17111 switch (vex.length)
17112 {
17113 case 128:
b9733481 17114 names = names_xmm;
c0f3af97
L
17115 break;
17116 case 256:
b9733481 17117 names = names_ymm;
c0f3af97
L
17118 break;
17119 default:
17120 abort ();
17121 }
b9733481 17122 oappend (names[reg]);
c0f3af97
L
17123}
17124
922d8de8
DR
17125static void
17126OP_XMM_VexW (int bytemode, int sizeflag)
17127{
17128 /* Turn off the REX.W bit since it is used for swapping operands
17129 now. */
17130 rex &= ~REX_W;
17131 OP_XMM (bytemode, sizeflag);
17132}
17133
c0f3af97
L
17134static void
17135OP_EX_Vex (int bytemode, int sizeflag)
17136{
17137 if (modrm.mod != 3)
17138 {
17139 if (vex.register_specifier != 0)
17140 BadOp ();
17141 need_vex_reg = 0;
17142 }
17143 OP_EX (bytemode, sizeflag);
17144}
17145
17146static void
17147OP_XMM_Vex (int bytemode, int sizeflag)
17148{
17149 if (modrm.mod != 3)
17150 {
17151 if (vex.register_specifier != 0)
17152 BadOp ();
17153 need_vex_reg = 0;
17154 }
17155 OP_XMM (bytemode, sizeflag);
17156}
17157
17158static void
17159VZERO_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17160{
17161 switch (vex.length)
17162 {
17163 case 128:
ea397f5b 17164 mnemonicendp = stpcpy (obuf, "vzeroupper");
c0f3af97
L
17165 break;
17166 case 256:
ea397f5b 17167 mnemonicendp = stpcpy (obuf, "vzeroall");
c0f3af97
L
17168 break;
17169 default:
17170 abort ();
17171 }
17172}
17173
ea397f5b
L
17174static struct op vex_cmp_op[] =
17175{
17176 { STRING_COMMA_LEN ("eq") },
17177 { STRING_COMMA_LEN ("lt") },
17178 { STRING_COMMA_LEN ("le") },
17179 { STRING_COMMA_LEN ("unord") },
17180 { STRING_COMMA_LEN ("neq") },
17181 { STRING_COMMA_LEN ("nlt") },
17182 { STRING_COMMA_LEN ("nle") },
17183 { STRING_COMMA_LEN ("ord") },
17184 { STRING_COMMA_LEN ("eq_uq") },
17185 { STRING_COMMA_LEN ("nge") },
17186 { STRING_COMMA_LEN ("ngt") },
17187 { STRING_COMMA_LEN ("false") },
17188 { STRING_COMMA_LEN ("neq_oq") },
17189 { STRING_COMMA_LEN ("ge") },
17190 { STRING_COMMA_LEN ("gt") },
17191 { STRING_COMMA_LEN ("true") },
17192 { STRING_COMMA_LEN ("eq_os") },
17193 { STRING_COMMA_LEN ("lt_oq") },
17194 { STRING_COMMA_LEN ("le_oq") },
17195 { STRING_COMMA_LEN ("unord_s") },
17196 { STRING_COMMA_LEN ("neq_us") },
17197 { STRING_COMMA_LEN ("nlt_uq") },
17198 { STRING_COMMA_LEN ("nle_uq") },
17199 { STRING_COMMA_LEN ("ord_s") },
17200 { STRING_COMMA_LEN ("eq_us") },
17201 { STRING_COMMA_LEN ("nge_uq") },
17202 { STRING_COMMA_LEN ("ngt_uq") },
17203 { STRING_COMMA_LEN ("false_os") },
17204 { STRING_COMMA_LEN ("neq_os") },
17205 { STRING_COMMA_LEN ("ge_oq") },
17206 { STRING_COMMA_LEN ("gt_oq") },
17207 { STRING_COMMA_LEN ("true_us") },
c0f3af97
L
17208};
17209
17210static void
17211VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17212{
17213 unsigned int cmp_type;
17214
17215 FETCH_DATA (the_info, codep + 1);
17216 cmp_type = *codep++ & 0xff;
17217 if (cmp_type < ARRAY_SIZE (vex_cmp_op))
17218 {
17219 char suffix [3];
ea397f5b 17220 char *p = mnemonicendp - 2;
c0f3af97
L
17221 suffix[0] = p[0];
17222 suffix[1] = p[1];
17223 suffix[2] = '\0';
ea397f5b
L
17224 sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
17225 mnemonicendp += vex_cmp_op[cmp_type].len;
c0f3af97
L
17226 }
17227 else
17228 {
17229 /* We have a reserved extension byte. Output it directly. */
17230 scratchbuf[0] = '$';
17231 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 17232 oappend_maybe_intel (scratchbuf);
c0f3af97
L
17233 scratchbuf[0] = '\0';
17234 }
17235}
17236
43234a1e
L
17237static void
17238VPCMP_Fixup (int bytemode ATTRIBUTE_UNUSED,
17239 int sizeflag ATTRIBUTE_UNUSED)
17240{
17241 unsigned int cmp_type;
17242
17243 if (!vex.evex)
17244 abort ();
17245
17246 FETCH_DATA (the_info, codep + 1);
17247 cmp_type = *codep++ & 0xff;
17248 /* There are aliases for immediates 0, 1, 2, 4, 5, 6.
17249 If it's the case, print suffix, otherwise - print the immediate. */
17250 if (cmp_type < ARRAY_SIZE (simd_cmp_op)
17251 && cmp_type != 3
17252 && cmp_type != 7)
17253 {
17254 char suffix [3];
17255 char *p = mnemonicendp - 2;
17256
17257 /* vpcmp* can have both one- and two-lettered suffix. */
17258 if (p[0] == 'p')
17259 {
17260 p++;
17261 suffix[0] = p[0];
17262 suffix[1] = '\0';
17263 }
17264 else
17265 {
17266 suffix[0] = p[0];
17267 suffix[1] = p[1];
17268 suffix[2] = '\0';
17269 }
17270
17271 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
17272 mnemonicendp += simd_cmp_op[cmp_type].len;
17273 }
17274 else
17275 {
17276 /* We have a reserved extension byte. Output it directly. */
17277 scratchbuf[0] = '$';
17278 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 17279 oappend_maybe_intel (scratchbuf);
43234a1e
L
17280 scratchbuf[0] = '\0';
17281 }
17282}
17283
ea397f5b
L
17284static const struct op pclmul_op[] =
17285{
17286 { STRING_COMMA_LEN ("lql") },
17287 { STRING_COMMA_LEN ("hql") },
17288 { STRING_COMMA_LEN ("lqh") },
17289 { STRING_COMMA_LEN ("hqh") }
c0f3af97
L
17290};
17291
17292static void
17293PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
17294 int sizeflag ATTRIBUTE_UNUSED)
17295{
17296 unsigned int pclmul_type;
17297
17298 FETCH_DATA (the_info, codep + 1);
17299 pclmul_type = *codep++ & 0xff;
17300 switch (pclmul_type)
17301 {
17302 case 0x10:
17303 pclmul_type = 2;
17304 break;
17305 case 0x11:
17306 pclmul_type = 3;
17307 break;
17308 default:
17309 break;
7bb15c6f 17310 }
c0f3af97
L
17311 if (pclmul_type < ARRAY_SIZE (pclmul_op))
17312 {
17313 char suffix [4];
ea397f5b 17314 char *p = mnemonicendp - 3;
c0f3af97
L
17315 suffix[0] = p[0];
17316 suffix[1] = p[1];
17317 suffix[2] = p[2];
17318 suffix[3] = '\0';
ea397f5b
L
17319 sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
17320 mnemonicendp += pclmul_op[pclmul_type].len;
c0f3af97
L
17321 }
17322 else
17323 {
17324 /* We have a reserved extension byte. Output it directly. */
17325 scratchbuf[0] = '$';
17326 print_operand_value (scratchbuf + 1, 1, pclmul_type);
9ce09ba2 17327 oappend_maybe_intel (scratchbuf);
c0f3af97
L
17328 scratchbuf[0] = '\0';
17329 }
17330}
17331
f1f8f695
L
17332static void
17333MOVBE_Fixup (int bytemode, int sizeflag)
17334{
17335 /* Add proper suffix to "movbe". */
ea397f5b 17336 char *p = mnemonicendp;
f1f8f695
L
17337
17338 switch (bytemode)
17339 {
17340 case v_mode:
17341 if (intel_syntax)
ea397f5b 17342 goto skip;
f1f8f695
L
17343
17344 USED_REX (REX_W);
17345 if (sizeflag & SUFFIX_ALWAYS)
17346 {
17347 if (rex & REX_W)
17348 *p++ = 'q';
f1f8f695 17349 else
f16cd0d5
L
17350 {
17351 if (sizeflag & DFLAG)
17352 *p++ = 'l';
17353 else
17354 *p++ = 'w';
17355 used_prefixes |= (prefixes & PREFIX_DATA);
17356 }
f1f8f695 17357 }
f1f8f695
L
17358 break;
17359 default:
17360 oappend (INTERNAL_DISASSEMBLER_ERROR);
17361 break;
17362 }
ea397f5b 17363 mnemonicendp = p;
f1f8f695
L
17364 *p = '\0';
17365
ea397f5b 17366skip:
f1f8f695
L
17367 OP_M (bytemode, sizeflag);
17368}
f88c9eb0
SP
17369
17370static void
17371OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17372{
17373 int reg;
17374 const char **names;
17375
17376 /* Skip mod/rm byte. */
17377 MODRM_CHECK;
17378 codep++;
17379
17380 if (vex.w)
17381 names = names64;
f88c9eb0 17382 else
ce7d077e 17383 names = names32;
f88c9eb0
SP
17384
17385 reg = modrm.rm;
17386 USED_REX (REX_B);
17387 if (rex & REX_B)
17388 reg += 8;
17389
17390 oappend (names[reg]);
17391}
17392
17393static void
17394OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17395{
17396 const char **names;
17397
17398 if (vex.w)
17399 names = names64;
f88c9eb0 17400 else
ce7d077e 17401 names = names32;
f88c9eb0
SP
17402
17403 oappend (names[vex.register_specifier]);
17404}
43234a1e
L
17405
17406static void
17407OP_Mask (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17408{
17409 if (!vex.evex
1ba585e8 17410 || (bytemode != mask_mode && bytemode != mask_bd_mode))
43234a1e
L
17411 abort ();
17412
17413 USED_REX (REX_R);
17414 if ((rex & REX_R) != 0 || !vex.r)
17415 {
17416 BadOp ();
17417 return;
17418 }
17419
17420 oappend (names_mask [modrm.reg]);
17421}
17422
17423static void
17424OP_Rounding (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17425{
17426 if (!vex.evex
17427 || (bytemode != evex_rounding_mode
17428 && bytemode != evex_sae_mode))
17429 abort ();
17430 if (modrm.mod == 3 && vex.b)
17431 switch (bytemode)
17432 {
17433 case evex_rounding_mode:
17434 oappend (names_rounding[vex.ll]);
17435 break;
17436 case evex_sae_mode:
17437 oappend ("{sae}");
17438 break;
17439 default:
17440 break;
17441 }
17442}
This page took 2.149255 seconds and 4 git commands to generate.