ubsan: m32r: left shift of negative value
[deliverable/binutils-gdb.git] / opcodes / i386-dis.c
CommitLineData
252b5132 1/* Print i386 instructions for GDB, the GNU debugger.
b3adc24a 2 Copyright (C) 1988-2020 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"
88c1242d 36#include "disassemble.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);
c0f3af97 98static void VCMP_Fixup (int, int);
43234a1e 99static void VPCMP_Fixup (int, int);
be92cb14 100static void VPCOM_Fixup (int, int);
cc0ec051 101static void OP_0f07 (int, int);
b844680a
L
102static void OP_Monitor (int, int);
103static void OP_Mwait (int, int);
46e883c5
L
104static void NOP_Fixup1 (int, int);
105static void NOP_Fixup2 (int, int);
26ca5450 106static void OP_3DNowSuffix (int, int);
ad19981d 107static void CMP_Fixup (int, int);
26ca5450 108static void BadOp (void);
35c52694 109static void REP_Fixup (int, int);
7e8b059b 110static void BND_Fixup (int, int);
04ef582a 111static void NOTRACK_Fixup (int, int);
42164a71
L
112static void HLE_Fixup1 (int, int);
113static void HLE_Fixup2 (int, int);
114static void HLE_Fixup3 (int, int);
f5804c90 115static void CMPXCHG8B_Fixup (int, int);
42903f7f 116static void XMM_Fixup (int, int);
381d071f 117static void CRC32_Fixup (int, int);
eacc9c89 118static void FXSAVE_Fixup (int, int);
15c7c1d8 119static void PCMPESTR_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 }
9f79e886 249#define EbndS { OP_E, bnd_swap_mode }
ce518a5f 250#define Ev { OP_E, v_mode }
de89d0a3 251#define Eva { OP_E, va_mode }
7e8b059b 252#define Ev_bnd { OP_E, v_bnd_mode }
b6169b20 253#define EvS { OP_E, v_swap_mode }
ce518a5f
L
254#define Ed { OP_E, d_mode }
255#define Edq { OP_E, dq_mode }
256#define Edqw { OP_E, dqw_mode }
42903f7f 257#define Edqb { OP_E, dqb_mode }
1ba585e8
IT
258#define Edb { OP_E, db_mode }
259#define Edw { OP_E, dw_mode }
42903f7f 260#define Edqd { OP_E, dqd_mode }
09335d05 261#define Eq { OP_E, q_mode }
07f5af7d 262#define indirEv { OP_indirE, indir_v_mode }
ce518a5f
L
263#define indirEp { OP_indirE, f_mode }
264#define stackEv { OP_E, stack_v_mode }
265#define Em { OP_E, m_mode }
266#define Ew { OP_E, w_mode }
267#define M { OP_M, 0 } /* lea, lgdt, etc. */
34b772a6 268#define Ma { OP_M, a_mode }
b844680a 269#define Mb { OP_M, b_mode }
d9a5e5e5 270#define Md { OP_M, d_mode }
f1f8f695 271#define Mo { OP_M, o_mode }
ce518a5f
L
272#define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
273#define Mq { OP_M, q_mode }
d276ec69 274#define Mv_bnd { OP_M, v_bndmk_mode }
4ee52178 275#define Mx { OP_M, x_mode }
c0f3af97 276#define Mxmm { OP_M, xmm_mode }
ce518a5f 277#define Gb { OP_G, b_mode }
7e8b059b 278#define Gbnd { OP_G, bnd_mode }
ce518a5f
L
279#define Gv { OP_G, v_mode }
280#define Gd { OP_G, d_mode }
281#define Gdq { OP_G, dq_mode }
282#define Gm { OP_G, m_mode }
c0a30a9f 283#define Gva { OP_G, va_mode }
ce518a5f 284#define Gw { OP_G, w_mode }
6f74c397 285#define Rd { OP_R, d_mode }
43234a1e 286#define Rdq { OP_R, dq_mode }
6f74c397 287#define Rm { OP_R, m_mode }
ce518a5f
L
288#define Ib { OP_I, b_mode }
289#define sIb { OP_sI, b_mode } /* sign extened byte */
e3949f17 290#define sIbT { OP_sI, b_T_mode } /* sign extened byte like 'T' */
ce518a5f 291#define Iv { OP_I, v_mode }
7bb15c6f 292#define sIv { OP_sI, v_mode }
ce518a5f 293#define Iv64 { OP_I64, v_mode }
c1dc7af5 294#define Id { OP_I, d_mode }
ce518a5f
L
295#define Iw { OP_I, w_mode }
296#define I1 { OP_I, const_1_mode }
297#define Jb { OP_J, b_mode }
298#define Jv { OP_J, v_mode }
376cd056 299#define Jdqw { OP_J, dqw_mode }
ce518a5f
L
300#define Cm { OP_C, m_mode }
301#define Dm { OP_D, m_mode }
302#define Td { OP_T, d_mode }
b844680a 303#define Skip_MODRM { OP_Skip_MODRM, 0 }
ce518a5f
L
304
305#define RMeAX { OP_REG, eAX_reg }
306#define RMeBX { OP_REG, eBX_reg }
307#define RMeCX { OP_REG, eCX_reg }
308#define RMeDX { OP_REG, eDX_reg }
309#define RMeSP { OP_REG, eSP_reg }
310#define RMeBP { OP_REG, eBP_reg }
311#define RMeSI { OP_REG, eSI_reg }
312#define RMeDI { OP_REG, eDI_reg }
313#define RMrAX { OP_REG, rAX_reg }
314#define RMrBX { OP_REG, rBX_reg }
315#define RMrCX { OP_REG, rCX_reg }
316#define RMrDX { OP_REG, rDX_reg }
317#define RMrSP { OP_REG, rSP_reg }
318#define RMrBP { OP_REG, rBP_reg }
319#define RMrSI { OP_REG, rSI_reg }
320#define RMrDI { OP_REG, rDI_reg }
321#define RMAL { OP_REG, al_reg }
ce518a5f
L
322#define RMCL { OP_REG, cl_reg }
323#define RMDL { OP_REG, dl_reg }
324#define RMBL { OP_REG, bl_reg }
325#define RMAH { OP_REG, ah_reg }
326#define RMCH { OP_REG, ch_reg }
327#define RMDH { OP_REG, dh_reg }
328#define RMBH { OP_REG, bh_reg }
329#define RMAX { OP_REG, ax_reg }
330#define RMDX { OP_REG, dx_reg }
331
332#define eAX { OP_IMREG, eAX_reg }
333#define eBX { OP_IMREG, eBX_reg }
334#define eCX { OP_IMREG, eCX_reg }
335#define eDX { OP_IMREG, eDX_reg }
336#define eSP { OP_IMREG, eSP_reg }
337#define eBP { OP_IMREG, eBP_reg }
338#define eSI { OP_IMREG, eSI_reg }
339#define eDI { OP_IMREG, eDI_reg }
340#define AL { OP_IMREG, al_reg }
341#define CL { OP_IMREG, cl_reg }
342#define DL { OP_IMREG, dl_reg }
343#define BL { OP_IMREG, bl_reg }
344#define AH { OP_IMREG, ah_reg }
345#define CH { OP_IMREG, ch_reg }
346#define DH { OP_IMREG, dh_reg }
347#define BH { OP_IMREG, bh_reg }
348#define AX { OP_IMREG, ax_reg }
349#define DX { OP_IMREG, dx_reg }
350#define zAX { OP_IMREG, z_mode_ax_reg }
351#define indirDX { OP_IMREG, indir_dx_reg }
352
353#define Sw { OP_SEG, w_mode }
354#define Sv { OP_SEG, v_mode }
355#define Ap { OP_DIR, 0 }
356#define Ob { OP_OFF64, b_mode }
357#define Ov { OP_OFF64, v_mode }
358#define Xb { OP_DSreg, eSI_reg }
359#define Xv { OP_DSreg, eSI_reg }
360#define Xz { OP_DSreg, eSI_reg }
361#define Yb { OP_ESreg, eDI_reg }
362#define Yv { OP_ESreg, eDI_reg }
363#define DSBX { OP_DSreg, eBX_reg }
364
365#define es { OP_REG, es_reg }
366#define ss { OP_REG, ss_reg }
367#define cs { OP_REG, cs_reg }
368#define ds { OP_REG, ds_reg }
369#define fs { OP_REG, fs_reg }
370#define gs { OP_REG, gs_reg }
371
372#define MX { OP_MMX, 0 }
373#define XM { OP_XMM, 0 }
539f890d 374#define XMScalar { OP_XMM, scalar_mode }
6c30d220 375#define XMGatherQ { OP_XMM, vex_vsib_q_w_dq_mode }
c0f3af97 376#define XMM { OP_XMM, xmm_mode }
43234a1e 377#define XMxmmq { OP_XMM, xmmq_mode }
ce518a5f 378#define EM { OP_EM, v_mode }
b6169b20 379#define EMS { OP_EM, v_swap_mode }
09a2c6cf 380#define EMd { OP_EM, d_mode }
14051056 381#define EMx { OP_EM, x_mode }
53467f57 382#define EXbScalar { OP_EX, b_scalar_mode }
8976381e 383#define EXw { OP_EX, w_mode }
53467f57 384#define EXwScalar { OP_EX, w_scalar_mode }
09a2c6cf 385#define EXd { OP_EX, d_mode }
539f890d 386#define EXdScalar { OP_EX, d_scalar_mode }
fa99fab2 387#define EXdS { OP_EX, d_swap_mode }
09a2c6cf 388#define EXq { OP_EX, q_mode }
539f890d
L
389#define EXqScalar { OP_EX, q_scalar_mode }
390#define EXqScalarS { OP_EX, q_scalar_swap_mode }
b6169b20 391#define EXqS { OP_EX, q_swap_mode }
09a2c6cf 392#define EXx { OP_EX, x_mode }
b6169b20 393#define EXxS { OP_EX, x_swap_mode }
c0f3af97 394#define EXxmm { OP_EX, xmm_mode }
43234a1e 395#define EXymm { OP_EX, ymm_mode }
c0f3af97 396#define EXxmmq { OP_EX, xmmq_mode }
43234a1e 397#define EXEvexHalfBcstXmmq { OP_EX, evex_half_bcst_xmmq_mode }
6c30d220
L
398#define EXxmm_mb { OP_EX, xmm_mb_mode }
399#define EXxmm_mw { OP_EX, xmm_mw_mode }
400#define EXxmm_md { OP_EX, xmm_md_mode }
401#define EXxmm_mq { OP_EX, xmm_mq_mode }
43234a1e 402#define EXxmm_mdq { OP_EX, xmm_mdq_mode }
6c30d220
L
403#define EXxmmdw { OP_EX, xmmdw_mode }
404#define EXxmmqd { OP_EX, xmmqd_mode }
c0f3af97 405#define EXymmq { OP_EX, ymmq_mode }
0bfee649 406#define EXVexWdq { OP_EX, vex_w_dq_mode }
1c480963 407#define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
43234a1e
L
408#define EXEvexXGscat { OP_EX, evex_x_gscat_mode }
409#define EXEvexXNoBcst { OP_EX, evex_x_nobcst_mode }
ce518a5f
L
410#define MS { OP_MS, v_mode }
411#define XS { OP_XS, v_mode }
09335d05 412#define EMCq { OP_EMC, q_mode }
ce518a5f 413#define MXC { OP_MXC, 0 }
ce518a5f 414#define OPSUF { OP_3DNowSuffix, 0 }
ad19981d 415#define CMP { CMP_Fixup, 0 }
42903f7f 416#define XMM0 { XMM_Fixup, 0 }
eacc9c89 417#define FXSAVE { FXSAVE_Fixup, 0 }
5dd85c99
SP
418#define Vex_2src_1 { OP_Vex_2src_1, 0 }
419#define Vex_2src_2 { OP_Vex_2src_2, 0 }
252b5132 420
c0f3af97 421#define Vex { OP_VEX, vex_mode }
539f890d 422#define VexScalar { OP_VEX, vex_scalar_mode }
6c30d220 423#define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode }
c0f3af97
L
424#define Vex128 { OP_VEX, vex128_mode }
425#define Vex256 { OP_VEX, vex256_mode }
cb21baef 426#define VexGdq { OP_VEX, dq_mode }
539f890d 427#define EXdVexScalarS { OP_EX_Vex, d_scalar_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 }
539f890d 433#define XMVexScalar { OP_XMM_Vex, scalar_mode }
922d8de8 434#define XMVexW { OP_XMM_VexW, 0 }
c0f3af97
L
435#define XMVexI4 { OP_REG_VexI4, x_mode }
436#define PCLMUL { PCLMUL_Fixup, 0 }
c0f3af97 437#define VCMP { VCMP_Fixup, 0 }
43234a1e 438#define VPCMP { VPCMP_Fixup, 0 }
be92cb14 439#define VPCOM { VPCOM_Fixup, 0 }
43234a1e
L
440
441#define EXxEVexR { OP_Rounding, evex_rounding_mode }
70df6fc9 442#define EXxEVexR64 { OP_Rounding, evex_rounding_64_mode }
43234a1e
L
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 475#define BND { BND_Fixup, 0 }
04ef582a 476#define NOTRACK { NOTRACK_Fixup, 0 }
7e8b059b 477
ce518a5f
L
478#define cond_jump_flag { NULL, cond_jump_mode }
479#define loop_jcxz_flag { NULL, loop_jcxz_mode }
3ffd33cf 480
252b5132 481/* bits in sizeflag */
252b5132 482#define SUFFIX_ALWAYS 4
252b5132
RH
483#define AFLAG 2
484#define DFLAG 1
485
51e7da1b
L
486enum
487{
488 /* byte operand */
489 b_mode = 1,
490 /* byte operand with operand swapped */
3873ba12 491 b_swap_mode,
e3949f17
L
492 /* byte operand, sign extend like 'T' suffix */
493 b_T_mode,
51e7da1b 494 /* operand size depends on prefixes */
3873ba12 495 v_mode,
51e7da1b 496 /* operand size depends on prefixes with operand swapped */
3873ba12 497 v_swap_mode,
de89d0a3
IT
498 /* operand size depends on address prefix */
499 va_mode,
51e7da1b 500 /* word operand */
3873ba12 501 w_mode,
51e7da1b 502 /* double word operand */
3873ba12 503 d_mode,
51e7da1b 504 /* double word operand with operand swapped */
3873ba12 505 d_swap_mode,
51e7da1b 506 /* quad word operand */
3873ba12 507 q_mode,
51e7da1b 508 /* quad word operand with operand swapped */
3873ba12 509 q_swap_mode,
51e7da1b 510 /* ten-byte operand */
3873ba12 511 t_mode,
43234a1e
L
512 /* 16-byte XMM, 32-byte YMM or 64-byte ZMM operand. In EVEX with
513 broadcast enabled. */
3873ba12 514 x_mode,
43234a1e
L
515 /* Similar to x_mode, but with different EVEX mem shifts. */
516 evex_x_gscat_mode,
517 /* Similar to x_mode, but with disabled broadcast. */
518 evex_x_nobcst_mode,
519 /* Similar to x_mode, but with operands swapped and disabled broadcast
520 in EVEX. */
3873ba12 521 x_swap_mode,
51e7da1b 522 /* 16-byte XMM operand */
3873ba12 523 xmm_mode,
43234a1e
L
524 /* XMM, XMM or YMM register operand, or quad word, xmmword or ymmword
525 memory operand (depending on vector length). Broadcast isn't
526 allowed. */
3873ba12 527 xmmq_mode,
43234a1e
L
528 /* Same as xmmq_mode, but broadcast is allowed. */
529 evex_half_bcst_xmmq_mode,
6c30d220
L
530 /* XMM register or byte memory operand */
531 xmm_mb_mode,
532 /* XMM register or word memory operand */
533 xmm_mw_mode,
534 /* XMM register or double word memory operand */
535 xmm_md_mode,
536 /* XMM register or quad word memory operand */
537 xmm_mq_mode,
43234a1e
L
538 /* XMM register or double/quad word memory operand, depending on
539 VEX.W. */
540 xmm_mdq_mode,
541 /* 16-byte XMM, word, double word or quad word operand. */
6c30d220 542 xmmdw_mode,
43234a1e 543 /* 16-byte XMM, double word, quad word operand or xmm word operand. */
6c30d220 544 xmmqd_mode,
43234a1e
L
545 /* 32-byte YMM operand */
546 ymm_mode,
547 /* quad word, ymmword or zmmword memory operand. */
3873ba12 548 ymmq_mode,
6c30d220
L
549 /* 32-byte YMM or 16-byte word operand */
550 ymmxmm_mode,
51e7da1b 551 /* d_mode in 32bit, q_mode in 64bit mode. */
3873ba12 552 m_mode,
51e7da1b 553 /* pair of v_mode operands */
3873ba12
L
554 a_mode,
555 cond_jump_mode,
556 loop_jcxz_mode,
7e8b059b 557 v_bnd_mode,
d276ec69
JB
558 /* like v_bnd_mode in 32bit, no RIP-rel in 64bit mode. */
559 v_bndmk_mode,
51e7da1b 560 /* operand size depends on REX prefixes. */
3873ba12 561 dq_mode,
376cd056
JB
562 /* registers like dq_mode, memory like w_mode, displacements like
563 v_mode without considering Intel64 ISA. */
3873ba12 564 dqw_mode,
9f79e886 565 /* bounds operand */
7e8b059b 566 bnd_mode,
9f79e886
JB
567 /* bounds operand with operand swapped */
568 bnd_swap_mode,
51e7da1b 569 /* 4- or 6-byte pointer operand */
3873ba12
L
570 f_mode,
571 const_1_mode,
07f5af7d
L
572 /* v_mode for indirect branch opcodes. */
573 indir_v_mode,
51e7da1b 574 /* v_mode for stack-related opcodes. */
3873ba12 575 stack_v_mode,
51e7da1b 576 /* non-quad operand size depends on prefixes */
3873ba12 577 z_mode,
51e7da1b 578 /* 16-byte operand */
3873ba12 579 o_mode,
51e7da1b 580 /* registers like dq_mode, memory like b_mode. */
3873ba12 581 dqb_mode,
1ba585e8
IT
582 /* registers like d_mode, memory like b_mode. */
583 db_mode,
584 /* registers like d_mode, memory like w_mode. */
585 dw_mode,
51e7da1b 586 /* registers like dq_mode, memory like d_mode. */
3873ba12 587 dqd_mode,
51e7da1b 588 /* normal vex mode */
3873ba12 589 vex_mode,
51e7da1b 590 /* 128bit vex mode */
3873ba12 591 vex128_mode,
51e7da1b 592 /* 256bit vex mode */
3873ba12 593 vex256_mode,
51e7da1b 594 /* operand size depends on the VEX.W bit. */
3873ba12 595 vex_w_dq_mode,
d55ee72f 596
6c30d220
L
597 /* Similar to vex_w_dq_mode, with VSIB dword indices. */
598 vex_vsib_d_w_dq_mode,
5fc35d96
IT
599 /* Similar to vex_vsib_d_w_dq_mode, with smaller memory. */
600 vex_vsib_d_w_d_mode,
6c30d220
L
601 /* Similar to vex_w_dq_mode, with VSIB qword indices. */
602 vex_vsib_q_w_dq_mode,
5fc35d96
IT
603 /* Similar to vex_vsib_q_w_dq_mode, with smaller memory. */
604 vex_vsib_q_w_d_mode,
6c30d220 605
539f890d
L
606 /* scalar, ignore vector length. */
607 scalar_mode,
53467f57
IT
608 /* like b_mode, ignore vector length. */
609 b_scalar_mode,
610 /* like w_mode, ignore vector length. */
611 w_scalar_mode,
539f890d
L
612 /* like d_mode, ignore vector length. */
613 d_scalar_mode,
614 /* like d_swap_mode, ignore vector length. */
615 d_scalar_swap_mode,
616 /* like q_mode, ignore vector length. */
617 q_scalar_mode,
618 /* like q_swap_mode, ignore vector length. */
619 q_scalar_swap_mode,
620 /* like vex_mode, ignore vector length. */
621 vex_scalar_mode,
1c480963
L
622 /* like vex_w_dq_mode, ignore vector length. */
623 vex_scalar_w_dq_mode,
539f890d 624
43234a1e
L
625 /* Static rounding. */
626 evex_rounding_mode,
70df6fc9
L
627 /* Static rounding, 64-bit mode only. */
628 evex_rounding_64_mode,
43234a1e
L
629 /* Supress all exceptions. */
630 evex_sae_mode,
631
632 /* Mask register operand. */
633 mask_mode,
1ba585e8
IT
634 /* Mask register operand. */
635 mask_bd_mode,
43234a1e 636
3873ba12
L
637 es_reg,
638 cs_reg,
639 ss_reg,
640 ds_reg,
641 fs_reg,
642 gs_reg,
d55ee72f 643
3873ba12
L
644 eAX_reg,
645 eCX_reg,
646 eDX_reg,
647 eBX_reg,
648 eSP_reg,
649 eBP_reg,
650 eSI_reg,
651 eDI_reg,
d55ee72f 652
3873ba12
L
653 al_reg,
654 cl_reg,
655 dl_reg,
656 bl_reg,
657 ah_reg,
658 ch_reg,
659 dh_reg,
660 bh_reg,
d55ee72f 661
3873ba12
L
662 ax_reg,
663 cx_reg,
664 dx_reg,
665 bx_reg,
666 sp_reg,
667 bp_reg,
668 si_reg,
669 di_reg,
d55ee72f 670
3873ba12
L
671 rAX_reg,
672 rCX_reg,
673 rDX_reg,
674 rBX_reg,
675 rSP_reg,
676 rBP_reg,
677 rSI_reg,
678 rDI_reg,
d55ee72f 679
3873ba12
L
680 z_mode_ax_reg,
681 indir_dx_reg
51e7da1b 682};
252b5132 683
51e7da1b
L
684enum
685{
686 FLOATCODE = 1,
3873ba12
L
687 USE_REG_TABLE,
688 USE_MOD_TABLE,
689 USE_RM_TABLE,
690 USE_PREFIX_TABLE,
691 USE_X86_64_TABLE,
692 USE_3BYTE_TABLE,
f88c9eb0 693 USE_XOP_8F_TABLE,
3873ba12
L
694 USE_VEX_C4_TABLE,
695 USE_VEX_C5_TABLE,
9e30b8e0 696 USE_VEX_LEN_TABLE,
43234a1e 697 USE_VEX_W_TABLE,
04e2a182
L
698 USE_EVEX_TABLE,
699 USE_EVEX_LEN_TABLE
51e7da1b 700};
6439fc28 701
bf890a93 702#define FLOAT NULL, { { NULL, FLOATCODE } }, 0
4efba78c 703
bf890a93
IT
704#define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }, 0
705#define DIS386_PREFIX(T, I, P) NULL, { { NULL, (T)}, { NULL, (I) } }, P
1ceb70f8
L
706#define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
707#define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
708#define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
709#define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
4e7d34a6
L
710#define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
711#define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
bf890a93 712#define THREE_BYTE_TABLE_PREFIX(I, P) DIS386_PREFIX (USE_3BYTE_TABLE, (I), P)
f88c9eb0 713#define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
c0f3af97
L
714#define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
715#define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
716#define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
9e30b8e0 717#define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
43234a1e 718#define EVEX_TABLE(I) DIS386 (USE_EVEX_TABLE, (I))
04e2a182 719#define EVEX_LEN_TABLE(I) DIS386 (USE_EVEX_LEN_TABLE, (I))
1ceb70f8 720
51e7da1b
L
721enum
722{
723 REG_80 = 0,
3873ba12 724 REG_81,
7148c369 725 REG_83,
3873ba12
L
726 REG_8F,
727 REG_C0,
728 REG_C1,
729 REG_C6,
730 REG_C7,
731 REG_D0,
732 REG_D1,
733 REG_D2,
734 REG_D3,
735 REG_F6,
736 REG_F7,
737 REG_FE,
738 REG_FF,
739 REG_0F00,
740 REG_0F01,
741 REG_0F0D,
742 REG_0F18,
f8687e93
JB
743 REG_0F1C_P_0_MOD_0,
744 REG_0F1E_P_1_MOD_3,
3873ba12
L
745 REG_0F71,
746 REG_0F72,
747 REG_0F73,
748 REG_0FA6,
749 REG_0FA7,
750 REG_0FAE,
751 REG_0FBA,
752 REG_0FC7,
592a252b
L
753 REG_VEX_0F71,
754 REG_VEX_0F72,
755 REG_VEX_0F73,
756 REG_VEX_0FAE,
f12dc422 757 REG_VEX_0F38F3,
f88c9eb0 758 REG_XOP_LWPCB,
2a2a0f38
QN
759 REG_XOP_LWP,
760 REG_XOP_TBM_01,
43234a1e
L
761 REG_XOP_TBM_02,
762
1ba585e8 763 REG_EVEX_0F71,
43234a1e
L
764 REG_EVEX_0F72,
765 REG_EVEX_0F73,
766 REG_EVEX_0F38C6,
767 REG_EVEX_0F38C7
51e7da1b 768};
1ceb70f8 769
51e7da1b
L
770enum
771{
772 MOD_8D = 0,
42164a71
L
773 MOD_C6_REG_7,
774 MOD_C7_REG_7,
4a357820
MZ
775 MOD_FF_REG_3,
776 MOD_FF_REG_5,
3873ba12
L
777 MOD_0F01_REG_0,
778 MOD_0F01_REG_1,
779 MOD_0F01_REG_2,
780 MOD_0F01_REG_3,
8eab4136 781 MOD_0F01_REG_5,
3873ba12
L
782 MOD_0F01_REG_7,
783 MOD_0F12_PREFIX_0,
784 MOD_0F13,
785 MOD_0F16_PREFIX_0,
786 MOD_0F17,
787 MOD_0F18_REG_0,
788 MOD_0F18_REG_1,
789 MOD_0F18_REG_2,
790 MOD_0F18_REG_3,
d7189fa5
RM
791 MOD_0F18_REG_4,
792 MOD_0F18_REG_5,
793 MOD_0F18_REG_6,
794 MOD_0F18_REG_7,
7e8b059b
L
795 MOD_0F1A_PREFIX_0,
796 MOD_0F1B_PREFIX_0,
797 MOD_0F1B_PREFIX_1,
c48935d7 798 MOD_0F1C_PREFIX_0,
603555e5 799 MOD_0F1E_PREFIX_1,
3873ba12
L
800 MOD_0F24,
801 MOD_0F26,
802 MOD_0F2B_PREFIX_0,
803 MOD_0F2B_PREFIX_1,
804 MOD_0F2B_PREFIX_2,
805 MOD_0F2B_PREFIX_3,
806 MOD_0F51,
807 MOD_0F71_REG_2,
808 MOD_0F71_REG_4,
809 MOD_0F71_REG_6,
810 MOD_0F72_REG_2,
811 MOD_0F72_REG_4,
812 MOD_0F72_REG_6,
813 MOD_0F73_REG_2,
814 MOD_0F73_REG_3,
815 MOD_0F73_REG_6,
816 MOD_0F73_REG_7,
817 MOD_0FAE_REG_0,
818 MOD_0FAE_REG_1,
819 MOD_0FAE_REG_2,
820 MOD_0FAE_REG_3,
821 MOD_0FAE_REG_4,
822 MOD_0FAE_REG_5,
823 MOD_0FAE_REG_6,
824 MOD_0FAE_REG_7,
825 MOD_0FB2,
826 MOD_0FB4,
827 MOD_0FB5,
a8484f96 828 MOD_0FC3,
963f3586
IT
829 MOD_0FC7_REG_3,
830 MOD_0FC7_REG_4,
831 MOD_0FC7_REG_5,
3873ba12
L
832 MOD_0FC7_REG_6,
833 MOD_0FC7_REG_7,
834 MOD_0FD7,
835 MOD_0FE7_PREFIX_2,
836 MOD_0FF0_PREFIX_3,
837 MOD_0F382A_PREFIX_2,
603555e5
L
838 MOD_0F38F5_PREFIX_2,
839 MOD_0F38F6_PREFIX_0,
5d79adc4 840 MOD_0F38F8_PREFIX_1,
c0a30a9f 841 MOD_0F38F8_PREFIX_2,
5d79adc4 842 MOD_0F38F8_PREFIX_3,
c0a30a9f 843 MOD_0F38F9_PREFIX_0,
3873ba12
L
844 MOD_62_32BIT,
845 MOD_C4_32BIT,
846 MOD_C5_32BIT,
592a252b
L
847 MOD_VEX_0F12_PREFIX_0,
848 MOD_VEX_0F13,
849 MOD_VEX_0F16_PREFIX_0,
850 MOD_VEX_0F17,
851 MOD_VEX_0F2B,
ab4e4ed5
AF
852 MOD_VEX_W_0_0F41_P_0_LEN_1,
853 MOD_VEX_W_1_0F41_P_0_LEN_1,
854 MOD_VEX_W_0_0F41_P_2_LEN_1,
855 MOD_VEX_W_1_0F41_P_2_LEN_1,
856 MOD_VEX_W_0_0F42_P_0_LEN_1,
857 MOD_VEX_W_1_0F42_P_0_LEN_1,
858 MOD_VEX_W_0_0F42_P_2_LEN_1,
859 MOD_VEX_W_1_0F42_P_2_LEN_1,
860 MOD_VEX_W_0_0F44_P_0_LEN_1,
861 MOD_VEX_W_1_0F44_P_0_LEN_1,
862 MOD_VEX_W_0_0F44_P_2_LEN_1,
863 MOD_VEX_W_1_0F44_P_2_LEN_1,
864 MOD_VEX_W_0_0F45_P_0_LEN_1,
865 MOD_VEX_W_1_0F45_P_0_LEN_1,
866 MOD_VEX_W_0_0F45_P_2_LEN_1,
867 MOD_VEX_W_1_0F45_P_2_LEN_1,
868 MOD_VEX_W_0_0F46_P_0_LEN_1,
869 MOD_VEX_W_1_0F46_P_0_LEN_1,
870 MOD_VEX_W_0_0F46_P_2_LEN_1,
871 MOD_VEX_W_1_0F46_P_2_LEN_1,
872 MOD_VEX_W_0_0F47_P_0_LEN_1,
873 MOD_VEX_W_1_0F47_P_0_LEN_1,
874 MOD_VEX_W_0_0F47_P_2_LEN_1,
875 MOD_VEX_W_1_0F47_P_2_LEN_1,
876 MOD_VEX_W_0_0F4A_P_0_LEN_1,
877 MOD_VEX_W_1_0F4A_P_0_LEN_1,
878 MOD_VEX_W_0_0F4A_P_2_LEN_1,
879 MOD_VEX_W_1_0F4A_P_2_LEN_1,
880 MOD_VEX_W_0_0F4B_P_0_LEN_1,
881 MOD_VEX_W_1_0F4B_P_0_LEN_1,
882 MOD_VEX_W_0_0F4B_P_2_LEN_1,
592a252b
L
883 MOD_VEX_0F50,
884 MOD_VEX_0F71_REG_2,
885 MOD_VEX_0F71_REG_4,
886 MOD_VEX_0F71_REG_6,
887 MOD_VEX_0F72_REG_2,
888 MOD_VEX_0F72_REG_4,
889 MOD_VEX_0F72_REG_6,
890 MOD_VEX_0F73_REG_2,
891 MOD_VEX_0F73_REG_3,
892 MOD_VEX_0F73_REG_6,
893 MOD_VEX_0F73_REG_7,
ab4e4ed5
AF
894 MOD_VEX_W_0_0F91_P_0_LEN_0,
895 MOD_VEX_W_1_0F91_P_0_LEN_0,
896 MOD_VEX_W_0_0F91_P_2_LEN_0,
897 MOD_VEX_W_1_0F91_P_2_LEN_0,
898 MOD_VEX_W_0_0F92_P_0_LEN_0,
899 MOD_VEX_W_0_0F92_P_2_LEN_0,
58a211d2 900 MOD_VEX_0F92_P_3_LEN_0,
ab4e4ed5
AF
901 MOD_VEX_W_0_0F93_P_0_LEN_0,
902 MOD_VEX_W_0_0F93_P_2_LEN_0,
58a211d2 903 MOD_VEX_0F93_P_3_LEN_0,
ab4e4ed5
AF
904 MOD_VEX_W_0_0F98_P_0_LEN_0,
905 MOD_VEX_W_1_0F98_P_0_LEN_0,
906 MOD_VEX_W_0_0F98_P_2_LEN_0,
907 MOD_VEX_W_1_0F98_P_2_LEN_0,
908 MOD_VEX_W_0_0F99_P_0_LEN_0,
909 MOD_VEX_W_1_0F99_P_0_LEN_0,
910 MOD_VEX_W_0_0F99_P_2_LEN_0,
911 MOD_VEX_W_1_0F99_P_2_LEN_0,
592a252b
L
912 MOD_VEX_0FAE_REG_2,
913 MOD_VEX_0FAE_REG_3,
914 MOD_VEX_0FD7_PREFIX_2,
915 MOD_VEX_0FE7_PREFIX_2,
916 MOD_VEX_0FF0_PREFIX_3,
592a252b
L
917 MOD_VEX_0F381A_PREFIX_2,
918 MOD_VEX_0F382A_PREFIX_2,
919 MOD_VEX_0F382C_PREFIX_2,
920 MOD_VEX_0F382D_PREFIX_2,
921 MOD_VEX_0F382E_PREFIX_2,
6c30d220
L
922 MOD_VEX_0F382F_PREFIX_2,
923 MOD_VEX_0F385A_PREFIX_2,
924 MOD_VEX_0F388C_PREFIX_2,
925 MOD_VEX_0F388E_PREFIX_2,
ab4e4ed5
AF
926 MOD_VEX_W_0_0F3A30_P_2_LEN_0,
927 MOD_VEX_W_1_0F3A30_P_2_LEN_0,
928 MOD_VEX_W_0_0F3A31_P_2_LEN_0,
929 MOD_VEX_W_1_0F3A31_P_2_LEN_0,
930 MOD_VEX_W_0_0F3A32_P_2_LEN_0,
931 MOD_VEX_W_1_0F3A32_P_2_LEN_0,
932 MOD_VEX_W_0_0F3A33_P_2_LEN_0,
933 MOD_VEX_W_1_0F3A33_P_2_LEN_0,
43234a1e 934
43234a1e
L
935 MOD_EVEX_0F12_PREFIX_0,
936 MOD_EVEX_0F16_PREFIX_0,
937 MOD_EVEX_0F38C6_REG_1,
938 MOD_EVEX_0F38C6_REG_2,
939 MOD_EVEX_0F38C6_REG_5,
940 MOD_EVEX_0F38C6_REG_6,
941 MOD_EVEX_0F38C7_REG_1,
942 MOD_EVEX_0F38C7_REG_2,
943 MOD_EVEX_0F38C7_REG_5,
944 MOD_EVEX_0F38C7_REG_6
51e7da1b 945};
1ceb70f8 946
51e7da1b
L
947enum
948{
42164a71
L
949 RM_C6_REG_7 = 0,
950 RM_C7_REG_7,
951 RM_0F01_REG_0,
3873ba12
L
952 RM_0F01_REG_1,
953 RM_0F01_REG_2,
954 RM_0F01_REG_3,
f8687e93
JB
955 RM_0F01_REG_5_MOD_3,
956 RM_0F01_REG_7_MOD_3,
957 RM_0F1E_P_1_MOD_3_REG_7,
958 RM_0FAE_REG_6_MOD_3_P_0,
959 RM_0FAE_REG_7_MOD_3,
51e7da1b 960};
1ceb70f8 961
51e7da1b
L
962enum
963{
964 PREFIX_90 = 0,
f8687e93
JB
965 PREFIX_0F01_REG_5_MOD_0,
966 PREFIX_0F01_REG_5_MOD_3_RM_0,
967 PREFIX_0F01_REG_5_MOD_3_RM_2,
267b8516
JB
968 PREFIX_0F01_REG_7_MOD_3_RM_2,
969 PREFIX_0F01_REG_7_MOD_3_RM_3,
3233d7d0 970 PREFIX_0F09,
3873ba12
L
971 PREFIX_0F10,
972 PREFIX_0F11,
973 PREFIX_0F12,
974 PREFIX_0F16,
7e8b059b
L
975 PREFIX_0F1A,
976 PREFIX_0F1B,
c48935d7 977 PREFIX_0F1C,
603555e5 978 PREFIX_0F1E,
3873ba12
L
979 PREFIX_0F2A,
980 PREFIX_0F2B,
981 PREFIX_0F2C,
982 PREFIX_0F2D,
983 PREFIX_0F2E,
984 PREFIX_0F2F,
985 PREFIX_0F51,
986 PREFIX_0F52,
987 PREFIX_0F53,
988 PREFIX_0F58,
989 PREFIX_0F59,
990 PREFIX_0F5A,
991 PREFIX_0F5B,
992 PREFIX_0F5C,
993 PREFIX_0F5D,
994 PREFIX_0F5E,
995 PREFIX_0F5F,
996 PREFIX_0F60,
997 PREFIX_0F61,
998 PREFIX_0F62,
999 PREFIX_0F6C,
1000 PREFIX_0F6D,
1001 PREFIX_0F6F,
1002 PREFIX_0F70,
1003 PREFIX_0F73_REG_3,
1004 PREFIX_0F73_REG_7,
1005 PREFIX_0F78,
1006 PREFIX_0F79,
1007 PREFIX_0F7C,
1008 PREFIX_0F7D,
1009 PREFIX_0F7E,
1010 PREFIX_0F7F,
f8687e93
JB
1011 PREFIX_0FAE_REG_0_MOD_3,
1012 PREFIX_0FAE_REG_1_MOD_3,
1013 PREFIX_0FAE_REG_2_MOD_3,
1014 PREFIX_0FAE_REG_3_MOD_3,
1015 PREFIX_0FAE_REG_4_MOD_0,
1016 PREFIX_0FAE_REG_4_MOD_3,
1017 PREFIX_0FAE_REG_5_MOD_0,
1018 PREFIX_0FAE_REG_5_MOD_3,
1019 PREFIX_0FAE_REG_6_MOD_0,
1020 PREFIX_0FAE_REG_6_MOD_3,
1021 PREFIX_0FAE_REG_7_MOD_0,
3873ba12 1022 PREFIX_0FB8,
f12dc422 1023 PREFIX_0FBC,
3873ba12
L
1024 PREFIX_0FBD,
1025 PREFIX_0FC2,
f8687e93
JB
1026 PREFIX_0FC3_MOD_0,
1027 PREFIX_0FC7_REG_6_MOD_0,
1028 PREFIX_0FC7_REG_6_MOD_3,
1029 PREFIX_0FC7_REG_7_MOD_3,
3873ba12
L
1030 PREFIX_0FD0,
1031 PREFIX_0FD6,
1032 PREFIX_0FE6,
1033 PREFIX_0FE7,
1034 PREFIX_0FF0,
1035 PREFIX_0FF7,
1036 PREFIX_0F3810,
1037 PREFIX_0F3814,
1038 PREFIX_0F3815,
1039 PREFIX_0F3817,
1040 PREFIX_0F3820,
1041 PREFIX_0F3821,
1042 PREFIX_0F3822,
1043 PREFIX_0F3823,
1044 PREFIX_0F3824,
1045 PREFIX_0F3825,
1046 PREFIX_0F3828,
1047 PREFIX_0F3829,
1048 PREFIX_0F382A,
1049 PREFIX_0F382B,
1050 PREFIX_0F3830,
1051 PREFIX_0F3831,
1052 PREFIX_0F3832,
1053 PREFIX_0F3833,
1054 PREFIX_0F3834,
1055 PREFIX_0F3835,
1056 PREFIX_0F3837,
1057 PREFIX_0F3838,
1058 PREFIX_0F3839,
1059 PREFIX_0F383A,
1060 PREFIX_0F383B,
1061 PREFIX_0F383C,
1062 PREFIX_0F383D,
1063 PREFIX_0F383E,
1064 PREFIX_0F383F,
1065 PREFIX_0F3840,
1066 PREFIX_0F3841,
1067 PREFIX_0F3880,
1068 PREFIX_0F3881,
6c30d220 1069 PREFIX_0F3882,
a0046408
L
1070 PREFIX_0F38C8,
1071 PREFIX_0F38C9,
1072 PREFIX_0F38CA,
1073 PREFIX_0F38CB,
1074 PREFIX_0F38CC,
1075 PREFIX_0F38CD,
48521003 1076 PREFIX_0F38CF,
3873ba12
L
1077 PREFIX_0F38DB,
1078 PREFIX_0F38DC,
1079 PREFIX_0F38DD,
1080 PREFIX_0F38DE,
1081 PREFIX_0F38DF,
1082 PREFIX_0F38F0,
1083 PREFIX_0F38F1,
603555e5 1084 PREFIX_0F38F5,
e2e1fcde 1085 PREFIX_0F38F6,
c0a30a9f
L
1086 PREFIX_0F38F8,
1087 PREFIX_0F38F9,
3873ba12
L
1088 PREFIX_0F3A08,
1089 PREFIX_0F3A09,
1090 PREFIX_0F3A0A,
1091 PREFIX_0F3A0B,
1092 PREFIX_0F3A0C,
1093 PREFIX_0F3A0D,
1094 PREFIX_0F3A0E,
1095 PREFIX_0F3A14,
1096 PREFIX_0F3A15,
1097 PREFIX_0F3A16,
1098 PREFIX_0F3A17,
1099 PREFIX_0F3A20,
1100 PREFIX_0F3A21,
1101 PREFIX_0F3A22,
1102 PREFIX_0F3A40,
1103 PREFIX_0F3A41,
1104 PREFIX_0F3A42,
1105 PREFIX_0F3A44,
1106 PREFIX_0F3A60,
1107 PREFIX_0F3A61,
1108 PREFIX_0F3A62,
1109 PREFIX_0F3A63,
a0046408 1110 PREFIX_0F3ACC,
48521003
IT
1111 PREFIX_0F3ACE,
1112 PREFIX_0F3ACF,
3873ba12 1113 PREFIX_0F3ADF,
592a252b
L
1114 PREFIX_VEX_0F10,
1115 PREFIX_VEX_0F11,
1116 PREFIX_VEX_0F12,
1117 PREFIX_VEX_0F16,
1118 PREFIX_VEX_0F2A,
1119 PREFIX_VEX_0F2C,
1120 PREFIX_VEX_0F2D,
1121 PREFIX_VEX_0F2E,
1122 PREFIX_VEX_0F2F,
43234a1e
L
1123 PREFIX_VEX_0F41,
1124 PREFIX_VEX_0F42,
1125 PREFIX_VEX_0F44,
1126 PREFIX_VEX_0F45,
1127 PREFIX_VEX_0F46,
1128 PREFIX_VEX_0F47,
1ba585e8 1129 PREFIX_VEX_0F4A,
43234a1e 1130 PREFIX_VEX_0F4B,
592a252b
L
1131 PREFIX_VEX_0F51,
1132 PREFIX_VEX_0F52,
1133 PREFIX_VEX_0F53,
1134 PREFIX_VEX_0F58,
1135 PREFIX_VEX_0F59,
1136 PREFIX_VEX_0F5A,
1137 PREFIX_VEX_0F5B,
1138 PREFIX_VEX_0F5C,
1139 PREFIX_VEX_0F5D,
1140 PREFIX_VEX_0F5E,
1141 PREFIX_VEX_0F5F,
1142 PREFIX_VEX_0F60,
1143 PREFIX_VEX_0F61,
1144 PREFIX_VEX_0F62,
1145 PREFIX_VEX_0F63,
1146 PREFIX_VEX_0F64,
1147 PREFIX_VEX_0F65,
1148 PREFIX_VEX_0F66,
1149 PREFIX_VEX_0F67,
1150 PREFIX_VEX_0F68,
1151 PREFIX_VEX_0F69,
1152 PREFIX_VEX_0F6A,
1153 PREFIX_VEX_0F6B,
1154 PREFIX_VEX_0F6C,
1155 PREFIX_VEX_0F6D,
1156 PREFIX_VEX_0F6E,
1157 PREFIX_VEX_0F6F,
1158 PREFIX_VEX_0F70,
1159 PREFIX_VEX_0F71_REG_2,
1160 PREFIX_VEX_0F71_REG_4,
1161 PREFIX_VEX_0F71_REG_6,
1162 PREFIX_VEX_0F72_REG_2,
1163 PREFIX_VEX_0F72_REG_4,
1164 PREFIX_VEX_0F72_REG_6,
1165 PREFIX_VEX_0F73_REG_2,
1166 PREFIX_VEX_0F73_REG_3,
1167 PREFIX_VEX_0F73_REG_6,
1168 PREFIX_VEX_0F73_REG_7,
1169 PREFIX_VEX_0F74,
1170 PREFIX_VEX_0F75,
1171 PREFIX_VEX_0F76,
1172 PREFIX_VEX_0F77,
1173 PREFIX_VEX_0F7C,
1174 PREFIX_VEX_0F7D,
1175 PREFIX_VEX_0F7E,
1176 PREFIX_VEX_0F7F,
43234a1e
L
1177 PREFIX_VEX_0F90,
1178 PREFIX_VEX_0F91,
1179 PREFIX_VEX_0F92,
1180 PREFIX_VEX_0F93,
1181 PREFIX_VEX_0F98,
1ba585e8 1182 PREFIX_VEX_0F99,
592a252b
L
1183 PREFIX_VEX_0FC2,
1184 PREFIX_VEX_0FC4,
1185 PREFIX_VEX_0FC5,
1186 PREFIX_VEX_0FD0,
1187 PREFIX_VEX_0FD1,
1188 PREFIX_VEX_0FD2,
1189 PREFIX_VEX_0FD3,
1190 PREFIX_VEX_0FD4,
1191 PREFIX_VEX_0FD5,
1192 PREFIX_VEX_0FD6,
1193 PREFIX_VEX_0FD7,
1194 PREFIX_VEX_0FD8,
1195 PREFIX_VEX_0FD9,
1196 PREFIX_VEX_0FDA,
1197 PREFIX_VEX_0FDB,
1198 PREFIX_VEX_0FDC,
1199 PREFIX_VEX_0FDD,
1200 PREFIX_VEX_0FDE,
1201 PREFIX_VEX_0FDF,
1202 PREFIX_VEX_0FE0,
1203 PREFIX_VEX_0FE1,
1204 PREFIX_VEX_0FE2,
1205 PREFIX_VEX_0FE3,
1206 PREFIX_VEX_0FE4,
1207 PREFIX_VEX_0FE5,
1208 PREFIX_VEX_0FE6,
1209 PREFIX_VEX_0FE7,
1210 PREFIX_VEX_0FE8,
1211 PREFIX_VEX_0FE9,
1212 PREFIX_VEX_0FEA,
1213 PREFIX_VEX_0FEB,
1214 PREFIX_VEX_0FEC,
1215 PREFIX_VEX_0FED,
1216 PREFIX_VEX_0FEE,
1217 PREFIX_VEX_0FEF,
1218 PREFIX_VEX_0FF0,
1219 PREFIX_VEX_0FF1,
1220 PREFIX_VEX_0FF2,
1221 PREFIX_VEX_0FF3,
1222 PREFIX_VEX_0FF4,
1223 PREFIX_VEX_0FF5,
1224 PREFIX_VEX_0FF6,
1225 PREFIX_VEX_0FF7,
1226 PREFIX_VEX_0FF8,
1227 PREFIX_VEX_0FF9,
1228 PREFIX_VEX_0FFA,
1229 PREFIX_VEX_0FFB,
1230 PREFIX_VEX_0FFC,
1231 PREFIX_VEX_0FFD,
1232 PREFIX_VEX_0FFE,
1233 PREFIX_VEX_0F3800,
1234 PREFIX_VEX_0F3801,
1235 PREFIX_VEX_0F3802,
1236 PREFIX_VEX_0F3803,
1237 PREFIX_VEX_0F3804,
1238 PREFIX_VEX_0F3805,
1239 PREFIX_VEX_0F3806,
1240 PREFIX_VEX_0F3807,
1241 PREFIX_VEX_0F3808,
1242 PREFIX_VEX_0F3809,
1243 PREFIX_VEX_0F380A,
1244 PREFIX_VEX_0F380B,
1245 PREFIX_VEX_0F380C,
1246 PREFIX_VEX_0F380D,
1247 PREFIX_VEX_0F380E,
1248 PREFIX_VEX_0F380F,
1249 PREFIX_VEX_0F3813,
6c30d220 1250 PREFIX_VEX_0F3816,
592a252b
L
1251 PREFIX_VEX_0F3817,
1252 PREFIX_VEX_0F3818,
1253 PREFIX_VEX_0F3819,
1254 PREFIX_VEX_0F381A,
1255 PREFIX_VEX_0F381C,
1256 PREFIX_VEX_0F381D,
1257 PREFIX_VEX_0F381E,
1258 PREFIX_VEX_0F3820,
1259 PREFIX_VEX_0F3821,
1260 PREFIX_VEX_0F3822,
1261 PREFIX_VEX_0F3823,
1262 PREFIX_VEX_0F3824,
1263 PREFIX_VEX_0F3825,
1264 PREFIX_VEX_0F3828,
1265 PREFIX_VEX_0F3829,
1266 PREFIX_VEX_0F382A,
1267 PREFIX_VEX_0F382B,
1268 PREFIX_VEX_0F382C,
1269 PREFIX_VEX_0F382D,
1270 PREFIX_VEX_0F382E,
1271 PREFIX_VEX_0F382F,
1272 PREFIX_VEX_0F3830,
1273 PREFIX_VEX_0F3831,
1274 PREFIX_VEX_0F3832,
1275 PREFIX_VEX_0F3833,
1276 PREFIX_VEX_0F3834,
1277 PREFIX_VEX_0F3835,
6c30d220 1278 PREFIX_VEX_0F3836,
592a252b
L
1279 PREFIX_VEX_0F3837,
1280 PREFIX_VEX_0F3838,
1281 PREFIX_VEX_0F3839,
1282 PREFIX_VEX_0F383A,
1283 PREFIX_VEX_0F383B,
1284 PREFIX_VEX_0F383C,
1285 PREFIX_VEX_0F383D,
1286 PREFIX_VEX_0F383E,
1287 PREFIX_VEX_0F383F,
1288 PREFIX_VEX_0F3840,
1289 PREFIX_VEX_0F3841,
6c30d220
L
1290 PREFIX_VEX_0F3845,
1291 PREFIX_VEX_0F3846,
1292 PREFIX_VEX_0F3847,
1293 PREFIX_VEX_0F3858,
1294 PREFIX_VEX_0F3859,
1295 PREFIX_VEX_0F385A,
1296 PREFIX_VEX_0F3878,
1297 PREFIX_VEX_0F3879,
1298 PREFIX_VEX_0F388C,
1299 PREFIX_VEX_0F388E,
1300 PREFIX_VEX_0F3890,
1301 PREFIX_VEX_0F3891,
1302 PREFIX_VEX_0F3892,
1303 PREFIX_VEX_0F3893,
592a252b
L
1304 PREFIX_VEX_0F3896,
1305 PREFIX_VEX_0F3897,
1306 PREFIX_VEX_0F3898,
1307 PREFIX_VEX_0F3899,
1308 PREFIX_VEX_0F389A,
1309 PREFIX_VEX_0F389B,
1310 PREFIX_VEX_0F389C,
1311 PREFIX_VEX_0F389D,
1312 PREFIX_VEX_0F389E,
1313 PREFIX_VEX_0F389F,
1314 PREFIX_VEX_0F38A6,
1315 PREFIX_VEX_0F38A7,
1316 PREFIX_VEX_0F38A8,
1317 PREFIX_VEX_0F38A9,
1318 PREFIX_VEX_0F38AA,
1319 PREFIX_VEX_0F38AB,
1320 PREFIX_VEX_0F38AC,
1321 PREFIX_VEX_0F38AD,
1322 PREFIX_VEX_0F38AE,
1323 PREFIX_VEX_0F38AF,
1324 PREFIX_VEX_0F38B6,
1325 PREFIX_VEX_0F38B7,
1326 PREFIX_VEX_0F38B8,
1327 PREFIX_VEX_0F38B9,
1328 PREFIX_VEX_0F38BA,
1329 PREFIX_VEX_0F38BB,
1330 PREFIX_VEX_0F38BC,
1331 PREFIX_VEX_0F38BD,
1332 PREFIX_VEX_0F38BE,
1333 PREFIX_VEX_0F38BF,
48521003 1334 PREFIX_VEX_0F38CF,
592a252b
L
1335 PREFIX_VEX_0F38DB,
1336 PREFIX_VEX_0F38DC,
1337 PREFIX_VEX_0F38DD,
1338 PREFIX_VEX_0F38DE,
1339 PREFIX_VEX_0F38DF,
f12dc422
L
1340 PREFIX_VEX_0F38F2,
1341 PREFIX_VEX_0F38F3_REG_1,
1342 PREFIX_VEX_0F38F3_REG_2,
1343 PREFIX_VEX_0F38F3_REG_3,
6c30d220
L
1344 PREFIX_VEX_0F38F5,
1345 PREFIX_VEX_0F38F6,
f12dc422 1346 PREFIX_VEX_0F38F7,
6c30d220
L
1347 PREFIX_VEX_0F3A00,
1348 PREFIX_VEX_0F3A01,
1349 PREFIX_VEX_0F3A02,
592a252b
L
1350 PREFIX_VEX_0F3A04,
1351 PREFIX_VEX_0F3A05,
1352 PREFIX_VEX_0F3A06,
1353 PREFIX_VEX_0F3A08,
1354 PREFIX_VEX_0F3A09,
1355 PREFIX_VEX_0F3A0A,
1356 PREFIX_VEX_0F3A0B,
1357 PREFIX_VEX_0F3A0C,
1358 PREFIX_VEX_0F3A0D,
1359 PREFIX_VEX_0F3A0E,
1360 PREFIX_VEX_0F3A0F,
1361 PREFIX_VEX_0F3A14,
1362 PREFIX_VEX_0F3A15,
1363 PREFIX_VEX_0F3A16,
1364 PREFIX_VEX_0F3A17,
1365 PREFIX_VEX_0F3A18,
1366 PREFIX_VEX_0F3A19,
1367 PREFIX_VEX_0F3A1D,
1368 PREFIX_VEX_0F3A20,
1369 PREFIX_VEX_0F3A21,
1370 PREFIX_VEX_0F3A22,
43234a1e 1371 PREFIX_VEX_0F3A30,
1ba585e8 1372 PREFIX_VEX_0F3A31,
43234a1e 1373 PREFIX_VEX_0F3A32,
1ba585e8 1374 PREFIX_VEX_0F3A33,
6c30d220
L
1375 PREFIX_VEX_0F3A38,
1376 PREFIX_VEX_0F3A39,
592a252b
L
1377 PREFIX_VEX_0F3A40,
1378 PREFIX_VEX_0F3A41,
1379 PREFIX_VEX_0F3A42,
1380 PREFIX_VEX_0F3A44,
6c30d220 1381 PREFIX_VEX_0F3A46,
592a252b
L
1382 PREFIX_VEX_0F3A48,
1383 PREFIX_VEX_0F3A49,
1384 PREFIX_VEX_0F3A4A,
1385 PREFIX_VEX_0F3A4B,
1386 PREFIX_VEX_0F3A4C,
1387 PREFIX_VEX_0F3A5C,
1388 PREFIX_VEX_0F3A5D,
1389 PREFIX_VEX_0F3A5E,
1390 PREFIX_VEX_0F3A5F,
1391 PREFIX_VEX_0F3A60,
1392 PREFIX_VEX_0F3A61,
1393 PREFIX_VEX_0F3A62,
1394 PREFIX_VEX_0F3A63,
1395 PREFIX_VEX_0F3A68,
1396 PREFIX_VEX_0F3A69,
1397 PREFIX_VEX_0F3A6A,
1398 PREFIX_VEX_0F3A6B,
1399 PREFIX_VEX_0F3A6C,
1400 PREFIX_VEX_0F3A6D,
1401 PREFIX_VEX_0F3A6E,
1402 PREFIX_VEX_0F3A6F,
1403 PREFIX_VEX_0F3A78,
1404 PREFIX_VEX_0F3A79,
1405 PREFIX_VEX_0F3A7A,
1406 PREFIX_VEX_0F3A7B,
1407 PREFIX_VEX_0F3A7C,
1408 PREFIX_VEX_0F3A7D,
1409 PREFIX_VEX_0F3A7E,
1410 PREFIX_VEX_0F3A7F,
48521003
IT
1411 PREFIX_VEX_0F3ACE,
1412 PREFIX_VEX_0F3ACF,
6c30d220 1413 PREFIX_VEX_0F3ADF,
43234a1e
L
1414 PREFIX_VEX_0F3AF0,
1415
1416 PREFIX_EVEX_0F10,
1417 PREFIX_EVEX_0F11,
1418 PREFIX_EVEX_0F12,
1419 PREFIX_EVEX_0F13,
1420 PREFIX_EVEX_0F14,
1421 PREFIX_EVEX_0F15,
1422 PREFIX_EVEX_0F16,
1423 PREFIX_EVEX_0F17,
1424 PREFIX_EVEX_0F28,
1425 PREFIX_EVEX_0F29,
1426 PREFIX_EVEX_0F2A,
1427 PREFIX_EVEX_0F2B,
1428 PREFIX_EVEX_0F2C,
1429 PREFIX_EVEX_0F2D,
1430 PREFIX_EVEX_0F2E,
1431 PREFIX_EVEX_0F2F,
1432 PREFIX_EVEX_0F51,
90a915bf
IT
1433 PREFIX_EVEX_0F54,
1434 PREFIX_EVEX_0F55,
1435 PREFIX_EVEX_0F56,
1436 PREFIX_EVEX_0F57,
43234a1e
L
1437 PREFIX_EVEX_0F58,
1438 PREFIX_EVEX_0F59,
1439 PREFIX_EVEX_0F5A,
1440 PREFIX_EVEX_0F5B,
1441 PREFIX_EVEX_0F5C,
1442 PREFIX_EVEX_0F5D,
1443 PREFIX_EVEX_0F5E,
1444 PREFIX_EVEX_0F5F,
1ba585e8
IT
1445 PREFIX_EVEX_0F60,
1446 PREFIX_EVEX_0F61,
43234a1e 1447 PREFIX_EVEX_0F62,
1ba585e8
IT
1448 PREFIX_EVEX_0F63,
1449 PREFIX_EVEX_0F64,
1450 PREFIX_EVEX_0F65,
43234a1e 1451 PREFIX_EVEX_0F66,
1ba585e8
IT
1452 PREFIX_EVEX_0F67,
1453 PREFIX_EVEX_0F68,
1454 PREFIX_EVEX_0F69,
43234a1e 1455 PREFIX_EVEX_0F6A,
1ba585e8 1456 PREFIX_EVEX_0F6B,
43234a1e
L
1457 PREFIX_EVEX_0F6C,
1458 PREFIX_EVEX_0F6D,
1459 PREFIX_EVEX_0F6E,
1460 PREFIX_EVEX_0F6F,
1461 PREFIX_EVEX_0F70,
1ba585e8
IT
1462 PREFIX_EVEX_0F71_REG_2,
1463 PREFIX_EVEX_0F71_REG_4,
1464 PREFIX_EVEX_0F71_REG_6,
43234a1e
L
1465 PREFIX_EVEX_0F72_REG_0,
1466 PREFIX_EVEX_0F72_REG_1,
1467 PREFIX_EVEX_0F72_REG_2,
1468 PREFIX_EVEX_0F72_REG_4,
1469 PREFIX_EVEX_0F72_REG_6,
1470 PREFIX_EVEX_0F73_REG_2,
1ba585e8 1471 PREFIX_EVEX_0F73_REG_3,
43234a1e 1472 PREFIX_EVEX_0F73_REG_6,
1ba585e8
IT
1473 PREFIX_EVEX_0F73_REG_7,
1474 PREFIX_EVEX_0F74,
1475 PREFIX_EVEX_0F75,
43234a1e
L
1476 PREFIX_EVEX_0F76,
1477 PREFIX_EVEX_0F78,
1478 PREFIX_EVEX_0F79,
1479 PREFIX_EVEX_0F7A,
1480 PREFIX_EVEX_0F7B,
1481 PREFIX_EVEX_0F7E,
1482 PREFIX_EVEX_0F7F,
1483 PREFIX_EVEX_0FC2,
1ba585e8
IT
1484 PREFIX_EVEX_0FC4,
1485 PREFIX_EVEX_0FC5,
43234a1e 1486 PREFIX_EVEX_0FC6,
1ba585e8 1487 PREFIX_EVEX_0FD1,
43234a1e
L
1488 PREFIX_EVEX_0FD2,
1489 PREFIX_EVEX_0FD3,
1490 PREFIX_EVEX_0FD4,
1ba585e8 1491 PREFIX_EVEX_0FD5,
43234a1e 1492 PREFIX_EVEX_0FD6,
1ba585e8
IT
1493 PREFIX_EVEX_0FD8,
1494 PREFIX_EVEX_0FD9,
1495 PREFIX_EVEX_0FDA,
43234a1e 1496 PREFIX_EVEX_0FDB,
1ba585e8
IT
1497 PREFIX_EVEX_0FDC,
1498 PREFIX_EVEX_0FDD,
1499 PREFIX_EVEX_0FDE,
43234a1e 1500 PREFIX_EVEX_0FDF,
1ba585e8
IT
1501 PREFIX_EVEX_0FE0,
1502 PREFIX_EVEX_0FE1,
43234a1e 1503 PREFIX_EVEX_0FE2,
1ba585e8
IT
1504 PREFIX_EVEX_0FE3,
1505 PREFIX_EVEX_0FE4,
1506 PREFIX_EVEX_0FE5,
43234a1e
L
1507 PREFIX_EVEX_0FE6,
1508 PREFIX_EVEX_0FE7,
1ba585e8
IT
1509 PREFIX_EVEX_0FE8,
1510 PREFIX_EVEX_0FE9,
1511 PREFIX_EVEX_0FEA,
43234a1e 1512 PREFIX_EVEX_0FEB,
1ba585e8
IT
1513 PREFIX_EVEX_0FEC,
1514 PREFIX_EVEX_0FED,
1515 PREFIX_EVEX_0FEE,
43234a1e 1516 PREFIX_EVEX_0FEF,
1ba585e8 1517 PREFIX_EVEX_0FF1,
43234a1e
L
1518 PREFIX_EVEX_0FF2,
1519 PREFIX_EVEX_0FF3,
1520 PREFIX_EVEX_0FF4,
1ba585e8
IT
1521 PREFIX_EVEX_0FF5,
1522 PREFIX_EVEX_0FF6,
1523 PREFIX_EVEX_0FF8,
1524 PREFIX_EVEX_0FF9,
43234a1e
L
1525 PREFIX_EVEX_0FFA,
1526 PREFIX_EVEX_0FFB,
1ba585e8
IT
1527 PREFIX_EVEX_0FFC,
1528 PREFIX_EVEX_0FFD,
43234a1e 1529 PREFIX_EVEX_0FFE,
1ba585e8
IT
1530 PREFIX_EVEX_0F3800,
1531 PREFIX_EVEX_0F3804,
1532 PREFIX_EVEX_0F380B,
43234a1e
L
1533 PREFIX_EVEX_0F380C,
1534 PREFIX_EVEX_0F380D,
1ba585e8 1535 PREFIX_EVEX_0F3810,
43234a1e
L
1536 PREFIX_EVEX_0F3811,
1537 PREFIX_EVEX_0F3812,
1538 PREFIX_EVEX_0F3813,
1539 PREFIX_EVEX_0F3814,
1540 PREFIX_EVEX_0F3815,
1541 PREFIX_EVEX_0F3816,
1542 PREFIX_EVEX_0F3818,
1543 PREFIX_EVEX_0F3819,
1544 PREFIX_EVEX_0F381A,
1545 PREFIX_EVEX_0F381B,
1ba585e8
IT
1546 PREFIX_EVEX_0F381C,
1547 PREFIX_EVEX_0F381D,
43234a1e
L
1548 PREFIX_EVEX_0F381E,
1549 PREFIX_EVEX_0F381F,
1ba585e8 1550 PREFIX_EVEX_0F3820,
43234a1e
L
1551 PREFIX_EVEX_0F3821,
1552 PREFIX_EVEX_0F3822,
1553 PREFIX_EVEX_0F3823,
1554 PREFIX_EVEX_0F3824,
1555 PREFIX_EVEX_0F3825,
1ba585e8 1556 PREFIX_EVEX_0F3826,
43234a1e
L
1557 PREFIX_EVEX_0F3827,
1558 PREFIX_EVEX_0F3828,
1559 PREFIX_EVEX_0F3829,
1560 PREFIX_EVEX_0F382A,
1ba585e8 1561 PREFIX_EVEX_0F382B,
43234a1e
L
1562 PREFIX_EVEX_0F382C,
1563 PREFIX_EVEX_0F382D,
1ba585e8 1564 PREFIX_EVEX_0F3830,
43234a1e
L
1565 PREFIX_EVEX_0F3831,
1566 PREFIX_EVEX_0F3832,
1567 PREFIX_EVEX_0F3833,
1568 PREFIX_EVEX_0F3834,
1569 PREFIX_EVEX_0F3835,
1570 PREFIX_EVEX_0F3836,
1571 PREFIX_EVEX_0F3837,
1ba585e8 1572 PREFIX_EVEX_0F3838,
43234a1e
L
1573 PREFIX_EVEX_0F3839,
1574 PREFIX_EVEX_0F383A,
1575 PREFIX_EVEX_0F383B,
1ba585e8 1576 PREFIX_EVEX_0F383C,
43234a1e 1577 PREFIX_EVEX_0F383D,
1ba585e8 1578 PREFIX_EVEX_0F383E,
43234a1e
L
1579 PREFIX_EVEX_0F383F,
1580 PREFIX_EVEX_0F3840,
1581 PREFIX_EVEX_0F3842,
1582 PREFIX_EVEX_0F3843,
1583 PREFIX_EVEX_0F3844,
1584 PREFIX_EVEX_0F3845,
1585 PREFIX_EVEX_0F3846,
1586 PREFIX_EVEX_0F3847,
1587 PREFIX_EVEX_0F384C,
1588 PREFIX_EVEX_0F384D,
1589 PREFIX_EVEX_0F384E,
1590 PREFIX_EVEX_0F384F,
8cfcb765
IT
1591 PREFIX_EVEX_0F3850,
1592 PREFIX_EVEX_0F3851,
47acf0bd
IT
1593 PREFIX_EVEX_0F3852,
1594 PREFIX_EVEX_0F3853,
ee6872be 1595 PREFIX_EVEX_0F3854,
620214f7 1596 PREFIX_EVEX_0F3855,
43234a1e
L
1597 PREFIX_EVEX_0F3858,
1598 PREFIX_EVEX_0F3859,
1599 PREFIX_EVEX_0F385A,
1600 PREFIX_EVEX_0F385B,
53467f57
IT
1601 PREFIX_EVEX_0F3862,
1602 PREFIX_EVEX_0F3863,
43234a1e
L
1603 PREFIX_EVEX_0F3864,
1604 PREFIX_EVEX_0F3865,
1ba585e8 1605 PREFIX_EVEX_0F3866,
9186c494 1606 PREFIX_EVEX_0F3868,
53467f57
IT
1607 PREFIX_EVEX_0F3870,
1608 PREFIX_EVEX_0F3871,
1609 PREFIX_EVEX_0F3872,
1610 PREFIX_EVEX_0F3873,
1ba585e8 1611 PREFIX_EVEX_0F3875,
43234a1e
L
1612 PREFIX_EVEX_0F3876,
1613 PREFIX_EVEX_0F3877,
1ba585e8
IT
1614 PREFIX_EVEX_0F3878,
1615 PREFIX_EVEX_0F3879,
1616 PREFIX_EVEX_0F387A,
1617 PREFIX_EVEX_0F387B,
43234a1e 1618 PREFIX_EVEX_0F387C,
1ba585e8 1619 PREFIX_EVEX_0F387D,
43234a1e
L
1620 PREFIX_EVEX_0F387E,
1621 PREFIX_EVEX_0F387F,
14f195c9 1622 PREFIX_EVEX_0F3883,
43234a1e
L
1623 PREFIX_EVEX_0F3888,
1624 PREFIX_EVEX_0F3889,
1625 PREFIX_EVEX_0F388A,
1626 PREFIX_EVEX_0F388B,
1ba585e8 1627 PREFIX_EVEX_0F388D,
ee6872be 1628 PREFIX_EVEX_0F388F,
43234a1e
L
1629 PREFIX_EVEX_0F3890,
1630 PREFIX_EVEX_0F3891,
1631 PREFIX_EVEX_0F3892,
1632 PREFIX_EVEX_0F3893,
1633 PREFIX_EVEX_0F3896,
1634 PREFIX_EVEX_0F3897,
1635 PREFIX_EVEX_0F3898,
1636 PREFIX_EVEX_0F3899,
1637 PREFIX_EVEX_0F389A,
1638 PREFIX_EVEX_0F389B,
1639 PREFIX_EVEX_0F389C,
1640 PREFIX_EVEX_0F389D,
1641 PREFIX_EVEX_0F389E,
1642 PREFIX_EVEX_0F389F,
1643 PREFIX_EVEX_0F38A0,
1644 PREFIX_EVEX_0F38A1,
1645 PREFIX_EVEX_0F38A2,
1646 PREFIX_EVEX_0F38A3,
1647 PREFIX_EVEX_0F38A6,
1648 PREFIX_EVEX_0F38A7,
1649 PREFIX_EVEX_0F38A8,
1650 PREFIX_EVEX_0F38A9,
1651 PREFIX_EVEX_0F38AA,
1652 PREFIX_EVEX_0F38AB,
1653 PREFIX_EVEX_0F38AC,
1654 PREFIX_EVEX_0F38AD,
1655 PREFIX_EVEX_0F38AE,
1656 PREFIX_EVEX_0F38AF,
2cc1b5aa
IT
1657 PREFIX_EVEX_0F38B4,
1658 PREFIX_EVEX_0F38B5,
43234a1e
L
1659 PREFIX_EVEX_0F38B6,
1660 PREFIX_EVEX_0F38B7,
1661 PREFIX_EVEX_0F38B8,
1662 PREFIX_EVEX_0F38B9,
1663 PREFIX_EVEX_0F38BA,
1664 PREFIX_EVEX_0F38BB,
1665 PREFIX_EVEX_0F38BC,
1666 PREFIX_EVEX_0F38BD,
1667 PREFIX_EVEX_0F38BE,
1668 PREFIX_EVEX_0F38BF,
1669 PREFIX_EVEX_0F38C4,
1670 PREFIX_EVEX_0F38C6_REG_1,
1671 PREFIX_EVEX_0F38C6_REG_2,
1672 PREFIX_EVEX_0F38C6_REG_5,
1673 PREFIX_EVEX_0F38C6_REG_6,
1674 PREFIX_EVEX_0F38C7_REG_1,
1675 PREFIX_EVEX_0F38C7_REG_2,
1676 PREFIX_EVEX_0F38C7_REG_5,
1677 PREFIX_EVEX_0F38C7_REG_6,
1678 PREFIX_EVEX_0F38C8,
1679 PREFIX_EVEX_0F38CA,
1680 PREFIX_EVEX_0F38CB,
1681 PREFIX_EVEX_0F38CC,
1682 PREFIX_EVEX_0F38CD,
48521003 1683 PREFIX_EVEX_0F38CF,
8dcf1fad
IT
1684 PREFIX_EVEX_0F38DC,
1685 PREFIX_EVEX_0F38DD,
1686 PREFIX_EVEX_0F38DE,
1687 PREFIX_EVEX_0F38DF,
43234a1e
L
1688
1689 PREFIX_EVEX_0F3A00,
1690 PREFIX_EVEX_0F3A01,
1691 PREFIX_EVEX_0F3A03,
1692 PREFIX_EVEX_0F3A04,
1693 PREFIX_EVEX_0F3A05,
1694 PREFIX_EVEX_0F3A08,
1695 PREFIX_EVEX_0F3A09,
1696 PREFIX_EVEX_0F3A0A,
1697 PREFIX_EVEX_0F3A0B,
1ba585e8
IT
1698 PREFIX_EVEX_0F3A0F,
1699 PREFIX_EVEX_0F3A14,
1700 PREFIX_EVEX_0F3A15,
90a915bf 1701 PREFIX_EVEX_0F3A16,
43234a1e
L
1702 PREFIX_EVEX_0F3A17,
1703 PREFIX_EVEX_0F3A18,
1704 PREFIX_EVEX_0F3A19,
1705 PREFIX_EVEX_0F3A1A,
1706 PREFIX_EVEX_0F3A1B,
1707 PREFIX_EVEX_0F3A1D,
1708 PREFIX_EVEX_0F3A1E,
1709 PREFIX_EVEX_0F3A1F,
1ba585e8 1710 PREFIX_EVEX_0F3A20,
43234a1e 1711 PREFIX_EVEX_0F3A21,
90a915bf 1712 PREFIX_EVEX_0F3A22,
43234a1e
L
1713 PREFIX_EVEX_0F3A23,
1714 PREFIX_EVEX_0F3A25,
1715 PREFIX_EVEX_0F3A26,
1716 PREFIX_EVEX_0F3A27,
1717 PREFIX_EVEX_0F3A38,
1718 PREFIX_EVEX_0F3A39,
1719 PREFIX_EVEX_0F3A3A,
1720 PREFIX_EVEX_0F3A3B,
1ba585e8
IT
1721 PREFIX_EVEX_0F3A3E,
1722 PREFIX_EVEX_0F3A3F,
1723 PREFIX_EVEX_0F3A42,
43234a1e 1724 PREFIX_EVEX_0F3A43,
ff1982d5 1725 PREFIX_EVEX_0F3A44,
90a915bf
IT
1726 PREFIX_EVEX_0F3A50,
1727 PREFIX_EVEX_0F3A51,
43234a1e 1728 PREFIX_EVEX_0F3A54,
90a915bf
IT
1729 PREFIX_EVEX_0F3A55,
1730 PREFIX_EVEX_0F3A56,
1731 PREFIX_EVEX_0F3A57,
1732 PREFIX_EVEX_0F3A66,
53467f57
IT
1733 PREFIX_EVEX_0F3A67,
1734 PREFIX_EVEX_0F3A70,
1735 PREFIX_EVEX_0F3A71,
1736 PREFIX_EVEX_0F3A72,
48521003
IT
1737 PREFIX_EVEX_0F3A73,
1738 PREFIX_EVEX_0F3ACE,
1739 PREFIX_EVEX_0F3ACF
51e7da1b 1740};
4e7d34a6 1741
51e7da1b
L
1742enum
1743{
1744 X86_64_06 = 0,
3873ba12
L
1745 X86_64_07,
1746 X86_64_0D,
1747 X86_64_16,
1748 X86_64_17,
1749 X86_64_1E,
1750 X86_64_1F,
1751 X86_64_27,
1752 X86_64_2F,
1753 X86_64_37,
1754 X86_64_3F,
1755 X86_64_60,
1756 X86_64_61,
1757 X86_64_62,
1758 X86_64_63,
1759 X86_64_6D,
1760 X86_64_6F,
d039fef3 1761 X86_64_82,
3873ba12
L
1762 X86_64_9A,
1763 X86_64_C4,
1764 X86_64_C5,
1765 X86_64_CE,
1766 X86_64_D4,
1767 X86_64_D5,
a72d2af2
L
1768 X86_64_E8,
1769 X86_64_E9,
3873ba12
L
1770 X86_64_EA,
1771 X86_64_0F01_REG_0,
1772 X86_64_0F01_REG_1,
1773 X86_64_0F01_REG_2,
1774 X86_64_0F01_REG_3
51e7da1b 1775};
4e7d34a6 1776
51e7da1b
L
1777enum
1778{
1779 THREE_BYTE_0F38 = 0,
1f334aeb 1780 THREE_BYTE_0F3A
51e7da1b 1781};
4e7d34a6 1782
f88c9eb0
SP
1783enum
1784{
5dd85c99
SP
1785 XOP_08 = 0,
1786 XOP_09,
f88c9eb0
SP
1787 XOP_0A
1788};
1789
51e7da1b
L
1790enum
1791{
1792 VEX_0F = 0,
3873ba12
L
1793 VEX_0F38,
1794 VEX_0F3A
51e7da1b 1795};
c0f3af97 1796
43234a1e
L
1797enum
1798{
1799 EVEX_0F = 0,
1800 EVEX_0F38,
1801 EVEX_0F3A
1802};
1803
51e7da1b
L
1804enum
1805{
ec6f095a 1806 VEX_LEN_0F12_P_0_M_0 = 0,
592a252b
L
1807 VEX_LEN_0F12_P_0_M_1,
1808 VEX_LEN_0F12_P_2,
1809 VEX_LEN_0F13_M_0,
1810 VEX_LEN_0F16_P_0_M_0,
1811 VEX_LEN_0F16_P_0_M_1,
1812 VEX_LEN_0F16_P_2,
1813 VEX_LEN_0F17_M_0,
43234a1e 1814 VEX_LEN_0F41_P_0,
1ba585e8 1815 VEX_LEN_0F41_P_2,
43234a1e 1816 VEX_LEN_0F42_P_0,
1ba585e8 1817 VEX_LEN_0F42_P_2,
43234a1e 1818 VEX_LEN_0F44_P_0,
1ba585e8 1819 VEX_LEN_0F44_P_2,
43234a1e 1820 VEX_LEN_0F45_P_0,
1ba585e8 1821 VEX_LEN_0F45_P_2,
43234a1e 1822 VEX_LEN_0F46_P_0,
1ba585e8 1823 VEX_LEN_0F46_P_2,
43234a1e 1824 VEX_LEN_0F47_P_0,
1ba585e8
IT
1825 VEX_LEN_0F47_P_2,
1826 VEX_LEN_0F4A_P_0,
1827 VEX_LEN_0F4A_P_2,
1828 VEX_LEN_0F4B_P_0,
43234a1e 1829 VEX_LEN_0F4B_P_2,
592a252b 1830 VEX_LEN_0F6E_P_2,
ec6f095a 1831 VEX_LEN_0F77_P_0,
592a252b
L
1832 VEX_LEN_0F7E_P_1,
1833 VEX_LEN_0F7E_P_2,
43234a1e 1834 VEX_LEN_0F90_P_0,
1ba585e8 1835 VEX_LEN_0F90_P_2,
43234a1e 1836 VEX_LEN_0F91_P_0,
1ba585e8 1837 VEX_LEN_0F91_P_2,
43234a1e 1838 VEX_LEN_0F92_P_0,
90a915bf 1839 VEX_LEN_0F92_P_2,
1ba585e8 1840 VEX_LEN_0F92_P_3,
43234a1e 1841 VEX_LEN_0F93_P_0,
90a915bf 1842 VEX_LEN_0F93_P_2,
1ba585e8 1843 VEX_LEN_0F93_P_3,
43234a1e 1844 VEX_LEN_0F98_P_0,
1ba585e8
IT
1845 VEX_LEN_0F98_P_2,
1846 VEX_LEN_0F99_P_0,
1847 VEX_LEN_0F99_P_2,
592a252b
L
1848 VEX_LEN_0FAE_R_2_M_0,
1849 VEX_LEN_0FAE_R_3_M_0,
592a252b
L
1850 VEX_LEN_0FC4_P_2,
1851 VEX_LEN_0FC5_P_2,
592a252b 1852 VEX_LEN_0FD6_P_2,
592a252b 1853 VEX_LEN_0FF7_P_2,
6c30d220
L
1854 VEX_LEN_0F3816_P_2,
1855 VEX_LEN_0F3819_P_2,
592a252b 1856 VEX_LEN_0F381A_P_2_M_0,
6c30d220 1857 VEX_LEN_0F3836_P_2,
592a252b 1858 VEX_LEN_0F3841_P_2,
6c30d220 1859 VEX_LEN_0F385A_P_2_M_0,
592a252b 1860 VEX_LEN_0F38DB_P_2,
f12dc422
L
1861 VEX_LEN_0F38F2_P_0,
1862 VEX_LEN_0F38F3_R_1_P_0,
1863 VEX_LEN_0F38F3_R_2_P_0,
1864 VEX_LEN_0F38F3_R_3_P_0,
6c30d220
L
1865 VEX_LEN_0F38F5_P_0,
1866 VEX_LEN_0F38F5_P_1,
1867 VEX_LEN_0F38F5_P_3,
1868 VEX_LEN_0F38F6_P_3,
f12dc422 1869 VEX_LEN_0F38F7_P_0,
6c30d220
L
1870 VEX_LEN_0F38F7_P_1,
1871 VEX_LEN_0F38F7_P_2,
1872 VEX_LEN_0F38F7_P_3,
1873 VEX_LEN_0F3A00_P_2,
1874 VEX_LEN_0F3A01_P_2,
592a252b 1875 VEX_LEN_0F3A06_P_2,
592a252b
L
1876 VEX_LEN_0F3A14_P_2,
1877 VEX_LEN_0F3A15_P_2,
1878 VEX_LEN_0F3A16_P_2,
1879 VEX_LEN_0F3A17_P_2,
1880 VEX_LEN_0F3A18_P_2,
1881 VEX_LEN_0F3A19_P_2,
1882 VEX_LEN_0F3A20_P_2,
1883 VEX_LEN_0F3A21_P_2,
1884 VEX_LEN_0F3A22_P_2,
43234a1e 1885 VEX_LEN_0F3A30_P_2,
1ba585e8 1886 VEX_LEN_0F3A31_P_2,
43234a1e 1887 VEX_LEN_0F3A32_P_2,
1ba585e8 1888 VEX_LEN_0F3A33_P_2,
6c30d220
L
1889 VEX_LEN_0F3A38_P_2,
1890 VEX_LEN_0F3A39_P_2,
592a252b 1891 VEX_LEN_0F3A41_P_2,
6c30d220 1892 VEX_LEN_0F3A46_P_2,
592a252b
L
1893 VEX_LEN_0F3A60_P_2,
1894 VEX_LEN_0F3A61_P_2,
1895 VEX_LEN_0F3A62_P_2,
1896 VEX_LEN_0F3A63_P_2,
1897 VEX_LEN_0F3A6A_P_2,
1898 VEX_LEN_0F3A6B_P_2,
1899 VEX_LEN_0F3A6E_P_2,
1900 VEX_LEN_0F3A6F_P_2,
1901 VEX_LEN_0F3A7A_P_2,
1902 VEX_LEN_0F3A7B_P_2,
1903 VEX_LEN_0F3A7E_P_2,
1904 VEX_LEN_0F3A7F_P_2,
1905 VEX_LEN_0F3ADF_P_2,
6c30d220 1906 VEX_LEN_0F3AF0_P_3,
ff688e1f
L
1907 VEX_LEN_0FXOP_08_CC,
1908 VEX_LEN_0FXOP_08_CD,
1909 VEX_LEN_0FXOP_08_CE,
1910 VEX_LEN_0FXOP_08_CF,
1911 VEX_LEN_0FXOP_08_EC,
1912 VEX_LEN_0FXOP_08_ED,
1913 VEX_LEN_0FXOP_08_EE,
1914 VEX_LEN_0FXOP_08_EF,
592a252b
L
1915 VEX_LEN_0FXOP_09_80,
1916 VEX_LEN_0FXOP_09_81
51e7da1b 1917};
c0f3af97 1918
04e2a182
L
1919enum
1920{
1921 EVEX_LEN_0F6E_P_2 = 0,
1922 EVEX_LEN_0F7E_P_1,
1923 EVEX_LEN_0F7E_P_2,
12efd68d 1924 EVEX_LEN_0FD6_P_2,
f0a6222e
L
1925 EVEX_LEN_0F3819_P_2_W_0,
1926 EVEX_LEN_0F3819_P_2_W_1,
1927 EVEX_LEN_0F381A_P_2_W_0,
1928 EVEX_LEN_0F381A_P_2_W_1,
1929 EVEX_LEN_0F381B_P_2_W_0,
1930 EVEX_LEN_0F381B_P_2_W_1,
1931 EVEX_LEN_0F385A_P_2_W_0,
1932 EVEX_LEN_0F385A_P_2_W_1,
1933 EVEX_LEN_0F385B_P_2_W_0,
1934 EVEX_LEN_0F385B_P_2_W_1,
e395f487
L
1935 EVEX_LEN_0F38C6_REG_1_PREFIX_2,
1936 EVEX_LEN_0F38C6_REG_2_PREFIX_2,
1937 EVEX_LEN_0F38C6_REG_5_PREFIX_2,
1938 EVEX_LEN_0F38C6_REG_6_PREFIX_2,
1939 EVEX_LEN_0F38C7_R_1_P_2_W_0,
1940 EVEX_LEN_0F38C7_R_1_P_2_W_1,
1941 EVEX_LEN_0F38C7_R_2_P_2_W_0,
1942 EVEX_LEN_0F38C7_R_2_P_2_W_1,
1943 EVEX_LEN_0F38C7_R_5_P_2_W_0,
1944 EVEX_LEN_0F38C7_R_5_P_2_W_1,
1945 EVEX_LEN_0F38C7_R_6_P_2_W_0,
1946 EVEX_LEN_0F38C7_R_6_P_2_W_1,
12efd68d
L
1947 EVEX_LEN_0F3A18_P_2_W_0,
1948 EVEX_LEN_0F3A18_P_2_W_1,
1949 EVEX_LEN_0F3A19_P_2_W_0,
1950 EVEX_LEN_0F3A19_P_2_W_1,
1951 EVEX_LEN_0F3A1A_P_2_W_0,
1952 EVEX_LEN_0F3A1A_P_2_W_1,
1953 EVEX_LEN_0F3A1B_P_2_W_0,
6e1c90b7
L
1954 EVEX_LEN_0F3A1B_P_2_W_1,
1955 EVEX_LEN_0F3A23_P_2_W_0,
1956 EVEX_LEN_0F3A23_P_2_W_1,
1957 EVEX_LEN_0F3A38_P_2_W_0,
1958 EVEX_LEN_0F3A38_P_2_W_1,
1959 EVEX_LEN_0F3A39_P_2_W_0,
1960 EVEX_LEN_0F3A39_P_2_W_1,
1961 EVEX_LEN_0F3A3A_P_2_W_0,
1962 EVEX_LEN_0F3A3A_P_2_W_1,
1963 EVEX_LEN_0F3A3B_P_2_W_0,
1964 EVEX_LEN_0F3A3B_P_2_W_1,
1965 EVEX_LEN_0F3A43_P_2_W_0,
1966 EVEX_LEN_0F3A43_P_2_W_1
04e2a182
L
1967};
1968
9e30b8e0
L
1969enum
1970{
ec6f095a 1971 VEX_W_0F41_P_0_LEN_1 = 0,
1ba585e8 1972 VEX_W_0F41_P_2_LEN_1,
43234a1e 1973 VEX_W_0F42_P_0_LEN_1,
1ba585e8 1974 VEX_W_0F42_P_2_LEN_1,
43234a1e 1975 VEX_W_0F44_P_0_LEN_0,
1ba585e8 1976 VEX_W_0F44_P_2_LEN_0,
43234a1e 1977 VEX_W_0F45_P_0_LEN_1,
1ba585e8 1978 VEX_W_0F45_P_2_LEN_1,
43234a1e 1979 VEX_W_0F46_P_0_LEN_1,
1ba585e8 1980 VEX_W_0F46_P_2_LEN_1,
43234a1e 1981 VEX_W_0F47_P_0_LEN_1,
1ba585e8
IT
1982 VEX_W_0F47_P_2_LEN_1,
1983 VEX_W_0F4A_P_0_LEN_1,
1984 VEX_W_0F4A_P_2_LEN_1,
1985 VEX_W_0F4B_P_0_LEN_1,
43234a1e 1986 VEX_W_0F4B_P_2_LEN_1,
43234a1e 1987 VEX_W_0F90_P_0_LEN_0,
1ba585e8 1988 VEX_W_0F90_P_2_LEN_0,
43234a1e 1989 VEX_W_0F91_P_0_LEN_0,
1ba585e8 1990 VEX_W_0F91_P_2_LEN_0,
43234a1e 1991 VEX_W_0F92_P_0_LEN_0,
90a915bf 1992 VEX_W_0F92_P_2_LEN_0,
43234a1e 1993 VEX_W_0F93_P_0_LEN_0,
90a915bf 1994 VEX_W_0F93_P_2_LEN_0,
43234a1e 1995 VEX_W_0F98_P_0_LEN_0,
1ba585e8
IT
1996 VEX_W_0F98_P_2_LEN_0,
1997 VEX_W_0F99_P_0_LEN_0,
1998 VEX_W_0F99_P_2_LEN_0,
592a252b
L
1999 VEX_W_0F380C_P_2,
2000 VEX_W_0F380D_P_2,
2001 VEX_W_0F380E_P_2,
2002 VEX_W_0F380F_P_2,
6c30d220 2003 VEX_W_0F3816_P_2,
6c30d220
L
2004 VEX_W_0F3818_P_2,
2005 VEX_W_0F3819_P_2,
592a252b 2006 VEX_W_0F381A_P_2_M_0,
592a252b
L
2007 VEX_W_0F382C_P_2_M_0,
2008 VEX_W_0F382D_P_2_M_0,
2009 VEX_W_0F382E_P_2_M_0,
2010 VEX_W_0F382F_P_2_M_0,
6c30d220 2011 VEX_W_0F3836_P_2,
6c30d220
L
2012 VEX_W_0F3846_P_2,
2013 VEX_W_0F3858_P_2,
2014 VEX_W_0F3859_P_2,
2015 VEX_W_0F385A_P_2_M_0,
2016 VEX_W_0F3878_P_2,
2017 VEX_W_0F3879_P_2,
48521003 2018 VEX_W_0F38CF_P_2,
6c30d220
L
2019 VEX_W_0F3A00_P_2,
2020 VEX_W_0F3A01_P_2,
2021 VEX_W_0F3A02_P_2,
592a252b
L
2022 VEX_W_0F3A04_P_2,
2023 VEX_W_0F3A05_P_2,
2024 VEX_W_0F3A06_P_2,
592a252b
L
2025 VEX_W_0F3A18_P_2,
2026 VEX_W_0F3A19_P_2,
43234a1e 2027 VEX_W_0F3A30_P_2_LEN_0,
1ba585e8 2028 VEX_W_0F3A31_P_2_LEN_0,
43234a1e 2029 VEX_W_0F3A32_P_2_LEN_0,
1ba585e8 2030 VEX_W_0F3A33_P_2_LEN_0,
6c30d220
L
2031 VEX_W_0F3A38_P_2,
2032 VEX_W_0F3A39_P_2,
6c30d220 2033 VEX_W_0F3A46_P_2,
592a252b
L
2034 VEX_W_0F3A48_P_2,
2035 VEX_W_0F3A49_P_2,
2036 VEX_W_0F3A4A_P_2,
2037 VEX_W_0F3A4B_P_2,
2038 VEX_W_0F3A4C_P_2,
48521003
IT
2039 VEX_W_0F3ACE_P_2,
2040 VEX_W_0F3ACF_P_2,
43234a1e
L
2041
2042 EVEX_W_0F10_P_0,
36cc073e 2043 EVEX_W_0F10_P_1,
43234a1e 2044 EVEX_W_0F10_P_2,
36cc073e 2045 EVEX_W_0F10_P_3,
43234a1e 2046 EVEX_W_0F11_P_0,
36cc073e 2047 EVEX_W_0F11_P_1,
43234a1e 2048 EVEX_W_0F11_P_2,
36cc073e 2049 EVEX_W_0F11_P_3,
43234a1e
L
2050 EVEX_W_0F12_P_0_M_0,
2051 EVEX_W_0F12_P_0_M_1,
2052 EVEX_W_0F12_P_1,
2053 EVEX_W_0F12_P_2,
2054 EVEX_W_0F12_P_3,
2055 EVEX_W_0F13_P_0,
2056 EVEX_W_0F13_P_2,
2057 EVEX_W_0F14_P_0,
2058 EVEX_W_0F14_P_2,
2059 EVEX_W_0F15_P_0,
2060 EVEX_W_0F15_P_2,
2061 EVEX_W_0F16_P_0_M_0,
2062 EVEX_W_0F16_P_0_M_1,
2063 EVEX_W_0F16_P_1,
2064 EVEX_W_0F16_P_2,
2065 EVEX_W_0F17_P_0,
2066 EVEX_W_0F17_P_2,
2067 EVEX_W_0F28_P_0,
2068 EVEX_W_0F28_P_2,
2069 EVEX_W_0F29_P_0,
2070 EVEX_W_0F29_P_2,
43234a1e
L
2071 EVEX_W_0F2A_P_3,
2072 EVEX_W_0F2B_P_0,
2073 EVEX_W_0F2B_P_2,
2074 EVEX_W_0F2E_P_0,
2075 EVEX_W_0F2E_P_2,
2076 EVEX_W_0F2F_P_0,
2077 EVEX_W_0F2F_P_2,
2078 EVEX_W_0F51_P_0,
2079 EVEX_W_0F51_P_1,
2080 EVEX_W_0F51_P_2,
2081 EVEX_W_0F51_P_3,
90a915bf
IT
2082 EVEX_W_0F54_P_0,
2083 EVEX_W_0F54_P_2,
2084 EVEX_W_0F55_P_0,
2085 EVEX_W_0F55_P_2,
2086 EVEX_W_0F56_P_0,
2087 EVEX_W_0F56_P_2,
2088 EVEX_W_0F57_P_0,
2089 EVEX_W_0F57_P_2,
43234a1e
L
2090 EVEX_W_0F58_P_0,
2091 EVEX_W_0F58_P_1,
2092 EVEX_W_0F58_P_2,
2093 EVEX_W_0F58_P_3,
2094 EVEX_W_0F59_P_0,
2095 EVEX_W_0F59_P_1,
2096 EVEX_W_0F59_P_2,
2097 EVEX_W_0F59_P_3,
2098 EVEX_W_0F5A_P_0,
2099 EVEX_W_0F5A_P_1,
2100 EVEX_W_0F5A_P_2,
2101 EVEX_W_0F5A_P_3,
2102 EVEX_W_0F5B_P_0,
2103 EVEX_W_0F5B_P_1,
2104 EVEX_W_0F5B_P_2,
2105 EVEX_W_0F5C_P_0,
2106 EVEX_W_0F5C_P_1,
2107 EVEX_W_0F5C_P_2,
2108 EVEX_W_0F5C_P_3,
2109 EVEX_W_0F5D_P_0,
2110 EVEX_W_0F5D_P_1,
2111 EVEX_W_0F5D_P_2,
2112 EVEX_W_0F5D_P_3,
2113 EVEX_W_0F5E_P_0,
2114 EVEX_W_0F5E_P_1,
2115 EVEX_W_0F5E_P_2,
2116 EVEX_W_0F5E_P_3,
2117 EVEX_W_0F5F_P_0,
2118 EVEX_W_0F5F_P_1,
2119 EVEX_W_0F5F_P_2,
2120 EVEX_W_0F5F_P_3,
2121 EVEX_W_0F62_P_2,
2122 EVEX_W_0F66_P_2,
2123 EVEX_W_0F6A_P_2,
1ba585e8 2124 EVEX_W_0F6B_P_2,
43234a1e
L
2125 EVEX_W_0F6C_P_2,
2126 EVEX_W_0F6D_P_2,
43234a1e
L
2127 EVEX_W_0F6F_P_1,
2128 EVEX_W_0F6F_P_2,
1ba585e8 2129 EVEX_W_0F6F_P_3,
43234a1e
L
2130 EVEX_W_0F70_P_2,
2131 EVEX_W_0F72_R_2_P_2,
2132 EVEX_W_0F72_R_6_P_2,
2133 EVEX_W_0F73_R_2_P_2,
2134 EVEX_W_0F73_R_6_P_2,
2135 EVEX_W_0F76_P_2,
2136 EVEX_W_0F78_P_0,
90a915bf 2137 EVEX_W_0F78_P_2,
43234a1e 2138 EVEX_W_0F79_P_0,
90a915bf 2139 EVEX_W_0F79_P_2,
43234a1e 2140 EVEX_W_0F7A_P_1,
90a915bf 2141 EVEX_W_0F7A_P_2,
43234a1e 2142 EVEX_W_0F7A_P_3,
90a915bf 2143 EVEX_W_0F7B_P_2,
43234a1e
L
2144 EVEX_W_0F7B_P_3,
2145 EVEX_W_0F7E_P_1,
43234a1e
L
2146 EVEX_W_0F7F_P_1,
2147 EVEX_W_0F7F_P_2,
1ba585e8 2148 EVEX_W_0F7F_P_3,
43234a1e
L
2149 EVEX_W_0FC2_P_0,
2150 EVEX_W_0FC2_P_1,
2151 EVEX_W_0FC2_P_2,
2152 EVEX_W_0FC2_P_3,
2153 EVEX_W_0FC6_P_0,
2154 EVEX_W_0FC6_P_2,
2155 EVEX_W_0FD2_P_2,
2156 EVEX_W_0FD3_P_2,
2157 EVEX_W_0FD4_P_2,
2158 EVEX_W_0FD6_P_2,
2159 EVEX_W_0FE6_P_1,
2160 EVEX_W_0FE6_P_2,
2161 EVEX_W_0FE6_P_3,
2162 EVEX_W_0FE7_P_2,
2163 EVEX_W_0FF2_P_2,
2164 EVEX_W_0FF3_P_2,
2165 EVEX_W_0FF4_P_2,
2166 EVEX_W_0FFA_P_2,
2167 EVEX_W_0FFB_P_2,
2168 EVEX_W_0FFE_P_2,
2169 EVEX_W_0F380C_P_2,
2170 EVEX_W_0F380D_P_2,
1ba585e8
IT
2171 EVEX_W_0F3810_P_1,
2172 EVEX_W_0F3810_P_2,
43234a1e 2173 EVEX_W_0F3811_P_1,
1ba585e8 2174 EVEX_W_0F3811_P_2,
43234a1e 2175 EVEX_W_0F3812_P_1,
1ba585e8 2176 EVEX_W_0F3812_P_2,
43234a1e
L
2177 EVEX_W_0F3813_P_1,
2178 EVEX_W_0F3813_P_2,
2179 EVEX_W_0F3814_P_1,
2180 EVEX_W_0F3815_P_1,
2181 EVEX_W_0F3818_P_2,
2182 EVEX_W_0F3819_P_2,
2183 EVEX_W_0F381A_P_2,
2184 EVEX_W_0F381B_P_2,
2185 EVEX_W_0F381E_P_2,
2186 EVEX_W_0F381F_P_2,
1ba585e8 2187 EVEX_W_0F3820_P_1,
43234a1e
L
2188 EVEX_W_0F3821_P_1,
2189 EVEX_W_0F3822_P_1,
2190 EVEX_W_0F3823_P_1,
2191 EVEX_W_0F3824_P_1,
2192 EVEX_W_0F3825_P_1,
2193 EVEX_W_0F3825_P_2,
1ba585e8
IT
2194 EVEX_W_0F3826_P_1,
2195 EVEX_W_0F3826_P_2,
2196 EVEX_W_0F3828_P_1,
43234a1e 2197 EVEX_W_0F3828_P_2,
1ba585e8 2198 EVEX_W_0F3829_P_1,
43234a1e
L
2199 EVEX_W_0F3829_P_2,
2200 EVEX_W_0F382A_P_1,
2201 EVEX_W_0F382A_P_2,
1ba585e8
IT
2202 EVEX_W_0F382B_P_2,
2203 EVEX_W_0F3830_P_1,
43234a1e
L
2204 EVEX_W_0F3831_P_1,
2205 EVEX_W_0F3832_P_1,
2206 EVEX_W_0F3833_P_1,
2207 EVEX_W_0F3834_P_1,
2208 EVEX_W_0F3835_P_1,
2209 EVEX_W_0F3835_P_2,
2210 EVEX_W_0F3837_P_2,
90a915bf
IT
2211 EVEX_W_0F3838_P_1,
2212 EVEX_W_0F3839_P_1,
43234a1e
L
2213 EVEX_W_0F383A_P_1,
2214 EVEX_W_0F3840_P_2,
d6aab7a1 2215 EVEX_W_0F3852_P_1,
ee6872be 2216 EVEX_W_0F3854_P_2,
620214f7 2217 EVEX_W_0F3855_P_2,
43234a1e
L
2218 EVEX_W_0F3858_P_2,
2219 EVEX_W_0F3859_P_2,
2220 EVEX_W_0F385A_P_2,
2221 EVEX_W_0F385B_P_2,
53467f57
IT
2222 EVEX_W_0F3862_P_2,
2223 EVEX_W_0F3863_P_2,
1ba585e8 2224 EVEX_W_0F3866_P_2,
9186c494 2225 EVEX_W_0F3868_P_3,
53467f57
IT
2226 EVEX_W_0F3870_P_2,
2227 EVEX_W_0F3871_P_2,
d6aab7a1 2228 EVEX_W_0F3872_P_1,
53467f57 2229 EVEX_W_0F3872_P_2,
d6aab7a1 2230 EVEX_W_0F3872_P_3,
53467f57 2231 EVEX_W_0F3873_P_2,
1ba585e8
IT
2232 EVEX_W_0F3875_P_2,
2233 EVEX_W_0F3878_P_2,
2234 EVEX_W_0F3879_P_2,
2235 EVEX_W_0F387A_P_2,
2236 EVEX_W_0F387B_P_2,
2237 EVEX_W_0F387D_P_2,
14f195c9 2238 EVEX_W_0F3883_P_2,
1ba585e8 2239 EVEX_W_0F388D_P_2,
43234a1e
L
2240 EVEX_W_0F3891_P_2,
2241 EVEX_W_0F3893_P_2,
2242 EVEX_W_0F38A1_P_2,
2243 EVEX_W_0F38A3_P_2,
2244 EVEX_W_0F38C7_R_1_P_2,
2245 EVEX_W_0F38C7_R_2_P_2,
2246 EVEX_W_0F38C7_R_5_P_2,
2247 EVEX_W_0F38C7_R_6_P_2,
2248
2249 EVEX_W_0F3A00_P_2,
2250 EVEX_W_0F3A01_P_2,
2251 EVEX_W_0F3A04_P_2,
2252 EVEX_W_0F3A05_P_2,
2253 EVEX_W_0F3A08_P_2,
2254 EVEX_W_0F3A09_P_2,
2255 EVEX_W_0F3A0A_P_2,
2256 EVEX_W_0F3A0B_P_2,
2257 EVEX_W_0F3A18_P_2,
2258 EVEX_W_0F3A19_P_2,
2259 EVEX_W_0F3A1A_P_2,
2260 EVEX_W_0F3A1B_P_2,
2261 EVEX_W_0F3A1D_P_2,
2262 EVEX_W_0F3A21_P_2,
2263 EVEX_W_0F3A23_P_2,
2264 EVEX_W_0F3A38_P_2,
2265 EVEX_W_0F3A39_P_2,
2266 EVEX_W_0F3A3A_P_2,
2267 EVEX_W_0F3A3B_P_2,
1ba585e8
IT
2268 EVEX_W_0F3A3E_P_2,
2269 EVEX_W_0F3A3F_P_2,
2270 EVEX_W_0F3A42_P_2,
90a915bf
IT
2271 EVEX_W_0F3A43_P_2,
2272 EVEX_W_0F3A50_P_2,
2273 EVEX_W_0F3A51_P_2,
2274 EVEX_W_0F3A56_P_2,
2275 EVEX_W_0F3A57_P_2,
2276 EVEX_W_0F3A66_P_2,
53467f57
IT
2277 EVEX_W_0F3A67_P_2,
2278 EVEX_W_0F3A70_P_2,
2279 EVEX_W_0F3A71_P_2,
2280 EVEX_W_0F3A72_P_2,
48521003
IT
2281 EVEX_W_0F3A73_P_2,
2282 EVEX_W_0F3ACE_P_2,
2283 EVEX_W_0F3ACF_P_2
9e30b8e0
L
2284};
2285
26ca5450 2286typedef void (*op_rtn) (int bytemode, int sizeflag);
252b5132
RH
2287
2288struct dis386 {
2da11e11 2289 const char *name;
ce518a5f
L
2290 struct
2291 {
2292 op_rtn rtn;
2293 int bytemode;
2294 } op[MAX_OPERANDS];
bf890a93 2295 unsigned int prefix_requirement;
252b5132
RH
2296};
2297
2298/* Upper case letters in the instruction names here are macros.
2299 'A' => print 'b' if no register operands or suffix_always is true
2300 'B' => print 'b' if suffix_always is true
9306ca4a 2301 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
98b528ac 2302 size prefix
ed7841b3 2303 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
98b528ac 2304 suffix_always is true
252b5132 2305 'E' => print 'e' if 32-bit form of jcxz
3ffd33cf 2306 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
52fd6d94 2307 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
5dd0794d 2308 'H' => print ",pt" or ",pn" branch hint
9306ca4a 2309 'I' => honor following macro letter even in Intel mode (implemented only
98b528ac 2310 for some of the macro letters)
9306ca4a 2311 'J' => print 'l'
42903f7f 2312 'K' => print 'd' or 'q' if rex prefix is present.
252b5132 2313 'L' => print 'l' if suffix_always is true
9d141669 2314 'M' => print 'r' if intel_mnemonic is false.
252b5132 2315 'N' => print 'n' if instruction has no wait "prefix"
a35ca55a 2316 'O' => print 'd' or 'o' (or 'q' in Intel mode)
52b15da3 2317 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
98b528ac
L
2318 or suffix_always is true. print 'q' if rex prefix is present.
2319 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
2320 is true
a35ca55a 2321 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
52b15da3 2322 'S' => print 'w', 'l' or 'q' if suffix_always is true
a72d2af2
L
2323 'T' => print 'q' in 64bit mode if instruction has no operand size
2324 prefix and behave as 'P' otherwise
2325 'U' => print 'q' in 64bit mode if instruction has no operand size
2326 prefix and behave as 'Q' otherwise
2327 'V' => print 'q' in 64bit mode if instruction has no operand size
2328 prefix and behave as 'S' otherwise
a35ca55a 2329 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
9306ca4a 2330 'X' => print 's', 'd' depending on data16 prefix (for XMM)
9646c87b 2331 'Y' unused.
6dd5059a 2332 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
9d141669 2333 '!' => change condition from true to false or from false to true.
98b528ac 2334 '%' => add 1 upper case letter to the macro.
a72d2af2
L
2335 '^' => print 'w' or 'l' depending on operand size prefix or
2336 suffix_always is true (lcall/ljmp).
5db04b09
L
2337 '@' => print 'q' for Intel64 ISA, 'w' or 'q' for AMD64 ISA depending
2338 on operand size prefix.
07f5af7d
L
2339 '&' => print 'q' in 64bit mode for Intel64 ISA or if instruction
2340 has no operand size prefix for AMD64 ISA, behave as 'P'
2341 otherwise
98b528ac
L
2342
2343 2 upper case letter macros:
04d824a4
JB
2344 "XY" => print 'x' or 'y' if suffix_always is true or no register
2345 operands and no broadcast.
2346 "XZ" => print 'x', 'y', or 'z' if suffix_always is true or no
2347 register operands and no broadcast.
4b06377f
L
2348 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
2349 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
98b528ac 2350 or suffix_always is true
4b06377f
L
2351 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
2352 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
2353 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
6c30d220 2354 "LW" => print 'd', 'q' depending on the VEX.W bit
4b4c407a
L
2355 "LP" => print 'w' or 'l' ('d' in Intel mode) if instruction has
2356 an operand size prefix, or suffix_always is true. print
2357 'q' if rex prefix is present.
52b15da3 2358
6439fc28
AM
2359 Many of the above letters print nothing in Intel mode. See "putop"
2360 for the details.
52b15da3 2361
6439fc28 2362 Braces '{' and '}', and vertical bars '|', indicate alternative
7c52e0e8 2363 mnemonic strings for AT&T and Intel. */
252b5132 2364
6439fc28 2365static const struct dis386 dis386[] = {
252b5132 2366 /* 00 */
bf890a93
IT
2367 { "addB", { Ebh1, Gb }, 0 },
2368 { "addS", { Evh1, Gv }, 0 },
2369 { "addB", { Gb, EbS }, 0 },
2370 { "addS", { Gv, EvS }, 0 },
2371 { "addB", { AL, Ib }, 0 },
2372 { "addS", { eAX, Iv }, 0 },
4e7d34a6
L
2373 { X86_64_TABLE (X86_64_06) },
2374 { X86_64_TABLE (X86_64_07) },
252b5132 2375 /* 08 */
bf890a93
IT
2376 { "orB", { Ebh1, Gb }, 0 },
2377 { "orS", { Evh1, Gv }, 0 },
2378 { "orB", { Gb, EbS }, 0 },
2379 { "orS", { Gv, EvS }, 0 },
2380 { "orB", { AL, Ib }, 0 },
2381 { "orS", { eAX, Iv }, 0 },
4e7d34a6 2382 { X86_64_TABLE (X86_64_0D) },
592d1631 2383 { Bad_Opcode }, /* 0x0f extended opcode escape */
252b5132 2384 /* 10 */
bf890a93
IT
2385 { "adcB", { Ebh1, Gb }, 0 },
2386 { "adcS", { Evh1, Gv }, 0 },
2387 { "adcB", { Gb, EbS }, 0 },
2388 { "adcS", { Gv, EvS }, 0 },
2389 { "adcB", { AL, Ib }, 0 },
2390 { "adcS", { eAX, Iv }, 0 },
4e7d34a6
L
2391 { X86_64_TABLE (X86_64_16) },
2392 { X86_64_TABLE (X86_64_17) },
252b5132 2393 /* 18 */
bf890a93
IT
2394 { "sbbB", { Ebh1, Gb }, 0 },
2395 { "sbbS", { Evh1, Gv }, 0 },
2396 { "sbbB", { Gb, EbS }, 0 },
2397 { "sbbS", { Gv, EvS }, 0 },
2398 { "sbbB", { AL, Ib }, 0 },
2399 { "sbbS", { eAX, Iv }, 0 },
4e7d34a6
L
2400 { X86_64_TABLE (X86_64_1E) },
2401 { X86_64_TABLE (X86_64_1F) },
252b5132 2402 /* 20 */
bf890a93
IT
2403 { "andB", { Ebh1, Gb }, 0 },
2404 { "andS", { Evh1, Gv }, 0 },
2405 { "andB", { Gb, EbS }, 0 },
2406 { "andS", { Gv, EvS }, 0 },
2407 { "andB", { AL, Ib }, 0 },
2408 { "andS", { eAX, Iv }, 0 },
592d1631 2409 { Bad_Opcode }, /* SEG ES prefix */
4e7d34a6 2410 { X86_64_TABLE (X86_64_27) },
252b5132 2411 /* 28 */
bf890a93
IT
2412 { "subB", { Ebh1, Gb }, 0 },
2413 { "subS", { Evh1, Gv }, 0 },
2414 { "subB", { Gb, EbS }, 0 },
2415 { "subS", { Gv, EvS }, 0 },
2416 { "subB", { AL, Ib }, 0 },
2417 { "subS", { eAX, Iv }, 0 },
592d1631 2418 { Bad_Opcode }, /* SEG CS prefix */
4e7d34a6 2419 { X86_64_TABLE (X86_64_2F) },
252b5132 2420 /* 30 */
bf890a93
IT
2421 { "xorB", { Ebh1, Gb }, 0 },
2422 { "xorS", { Evh1, Gv }, 0 },
2423 { "xorB", { Gb, EbS }, 0 },
2424 { "xorS", { Gv, EvS }, 0 },
2425 { "xorB", { AL, Ib }, 0 },
2426 { "xorS", { eAX, Iv }, 0 },
592d1631 2427 { Bad_Opcode }, /* SEG SS prefix */
4e7d34a6 2428 { X86_64_TABLE (X86_64_37) },
252b5132 2429 /* 38 */
bf890a93
IT
2430 { "cmpB", { Eb, Gb }, 0 },
2431 { "cmpS", { Ev, Gv }, 0 },
2432 { "cmpB", { Gb, EbS }, 0 },
2433 { "cmpS", { Gv, EvS }, 0 },
2434 { "cmpB", { AL, Ib }, 0 },
2435 { "cmpS", { eAX, Iv }, 0 },
592d1631 2436 { Bad_Opcode }, /* SEG DS prefix */
4e7d34a6 2437 { X86_64_TABLE (X86_64_3F) },
252b5132 2438 /* 40 */
bf890a93
IT
2439 { "inc{S|}", { RMeAX }, 0 },
2440 { "inc{S|}", { RMeCX }, 0 },
2441 { "inc{S|}", { RMeDX }, 0 },
2442 { "inc{S|}", { RMeBX }, 0 },
2443 { "inc{S|}", { RMeSP }, 0 },
2444 { "inc{S|}", { RMeBP }, 0 },
2445 { "inc{S|}", { RMeSI }, 0 },
2446 { "inc{S|}", { RMeDI }, 0 },
252b5132 2447 /* 48 */
bf890a93
IT
2448 { "dec{S|}", { RMeAX }, 0 },
2449 { "dec{S|}", { RMeCX }, 0 },
2450 { "dec{S|}", { RMeDX }, 0 },
2451 { "dec{S|}", { RMeBX }, 0 },
2452 { "dec{S|}", { RMeSP }, 0 },
2453 { "dec{S|}", { RMeBP }, 0 },
2454 { "dec{S|}", { RMeSI }, 0 },
2455 { "dec{S|}", { RMeDI }, 0 },
252b5132 2456 /* 50 */
bf890a93
IT
2457 { "pushV", { RMrAX }, 0 },
2458 { "pushV", { RMrCX }, 0 },
2459 { "pushV", { RMrDX }, 0 },
2460 { "pushV", { RMrBX }, 0 },
2461 { "pushV", { RMrSP }, 0 },
2462 { "pushV", { RMrBP }, 0 },
2463 { "pushV", { RMrSI }, 0 },
2464 { "pushV", { RMrDI }, 0 },
252b5132 2465 /* 58 */
bf890a93
IT
2466 { "popV", { RMrAX }, 0 },
2467 { "popV", { RMrCX }, 0 },
2468 { "popV", { RMrDX }, 0 },
2469 { "popV", { RMrBX }, 0 },
2470 { "popV", { RMrSP }, 0 },
2471 { "popV", { RMrBP }, 0 },
2472 { "popV", { RMrSI }, 0 },
2473 { "popV", { RMrDI }, 0 },
252b5132 2474 /* 60 */
4e7d34a6
L
2475 { X86_64_TABLE (X86_64_60) },
2476 { X86_64_TABLE (X86_64_61) },
2477 { X86_64_TABLE (X86_64_62) },
2478 { X86_64_TABLE (X86_64_63) },
592d1631
L
2479 { Bad_Opcode }, /* seg fs */
2480 { Bad_Opcode }, /* seg gs */
2481 { Bad_Opcode }, /* op size prefix */
2482 { Bad_Opcode }, /* adr size prefix */
252b5132 2483 /* 68 */
bf890a93
IT
2484 { "pushT", { sIv }, 0 },
2485 { "imulS", { Gv, Ev, Iv }, 0 },
2486 { "pushT", { sIbT }, 0 },
2487 { "imulS", { Gv, Ev, sIb }, 0 },
2488 { "ins{b|}", { Ybr, indirDX }, 0 },
4e7d34a6 2489 { X86_64_TABLE (X86_64_6D) },
bf890a93 2490 { "outs{b|}", { indirDXr, Xb }, 0 },
4e7d34a6 2491 { X86_64_TABLE (X86_64_6F) },
252b5132 2492 /* 70 */
bf890a93
IT
2493 { "joH", { Jb, BND, cond_jump_flag }, 0 },
2494 { "jnoH", { Jb, BND, cond_jump_flag }, 0 },
2495 { "jbH", { Jb, BND, cond_jump_flag }, 0 },
2496 { "jaeH", { Jb, BND, cond_jump_flag }, 0 },
2497 { "jeH", { Jb, BND, cond_jump_flag }, 0 },
2498 { "jneH", { Jb, BND, cond_jump_flag }, 0 },
2499 { "jbeH", { Jb, BND, cond_jump_flag }, 0 },
2500 { "jaH", { Jb, BND, cond_jump_flag }, 0 },
252b5132 2501 /* 78 */
bf890a93
IT
2502 { "jsH", { Jb, BND, cond_jump_flag }, 0 },
2503 { "jnsH", { Jb, BND, cond_jump_flag }, 0 },
2504 { "jpH", { Jb, BND, cond_jump_flag }, 0 },
2505 { "jnpH", { Jb, BND, cond_jump_flag }, 0 },
2506 { "jlH", { Jb, BND, cond_jump_flag }, 0 },
2507 { "jgeH", { Jb, BND, cond_jump_flag }, 0 },
2508 { "jleH", { Jb, BND, cond_jump_flag }, 0 },
2509 { "jgH", { Jb, BND, cond_jump_flag }, 0 },
252b5132 2510 /* 80 */
1ceb70f8
L
2511 { REG_TABLE (REG_80) },
2512 { REG_TABLE (REG_81) },
d039fef3 2513 { X86_64_TABLE (X86_64_82) },
7148c369 2514 { REG_TABLE (REG_83) },
bf890a93
IT
2515 { "testB", { Eb, Gb }, 0 },
2516 { "testS", { Ev, Gv }, 0 },
2517 { "xchgB", { Ebh2, Gb }, 0 },
2518 { "xchgS", { Evh2, Gv }, 0 },
252b5132 2519 /* 88 */
bf890a93
IT
2520 { "movB", { Ebh3, Gb }, 0 },
2521 { "movS", { Evh3, Gv }, 0 },
2522 { "movB", { Gb, EbS }, 0 },
2523 { "movS", { Gv, EvS }, 0 },
2524 { "movD", { Sv, Sw }, 0 },
1ceb70f8 2525 { MOD_TABLE (MOD_8D) },
bf890a93 2526 { "movD", { Sw, Sv }, 0 },
1ceb70f8 2527 { REG_TABLE (REG_8F) },
252b5132 2528 /* 90 */
1ceb70f8 2529 { PREFIX_TABLE (PREFIX_90) },
bf890a93
IT
2530 { "xchgS", { RMeCX, eAX }, 0 },
2531 { "xchgS", { RMeDX, eAX }, 0 },
2532 { "xchgS", { RMeBX, eAX }, 0 },
2533 { "xchgS", { RMeSP, eAX }, 0 },
2534 { "xchgS", { RMeBP, eAX }, 0 },
2535 { "xchgS", { RMeSI, eAX }, 0 },
2536 { "xchgS", { RMeDI, eAX }, 0 },
252b5132 2537 /* 98 */
bf890a93
IT
2538 { "cW{t|}R", { XX }, 0 },
2539 { "cR{t|}O", { XX }, 0 },
4e7d34a6 2540 { X86_64_TABLE (X86_64_9A) },
592d1631 2541 { Bad_Opcode }, /* fwait */
bf890a93
IT
2542 { "pushfT", { XX }, 0 },
2543 { "popfT", { XX }, 0 },
2544 { "sahf", { XX }, 0 },
2545 { "lahf", { XX }, 0 },
252b5132 2546 /* a0 */
bf890a93
IT
2547 { "mov%LB", { AL, Ob }, 0 },
2548 { "mov%LS", { eAX, Ov }, 0 },
2549 { "mov%LB", { Ob, AL }, 0 },
2550 { "mov%LS", { Ov, eAX }, 0 },
2551 { "movs{b|}", { Ybr, Xb }, 0 },
2552 { "movs{R|}", { Yvr, Xv }, 0 },
2553 { "cmps{b|}", { Xb, Yb }, 0 },
2554 { "cmps{R|}", { Xv, Yv }, 0 },
252b5132 2555 /* a8 */
bf890a93
IT
2556 { "testB", { AL, Ib }, 0 },
2557 { "testS", { eAX, Iv }, 0 },
2558 { "stosB", { Ybr, AL }, 0 },
2559 { "stosS", { Yvr, eAX }, 0 },
2560 { "lodsB", { ALr, Xb }, 0 },
2561 { "lodsS", { eAXr, Xv }, 0 },
2562 { "scasB", { AL, Yb }, 0 },
2563 { "scasS", { eAX, Yv }, 0 },
252b5132 2564 /* b0 */
bf890a93
IT
2565 { "movB", { RMAL, Ib }, 0 },
2566 { "movB", { RMCL, Ib }, 0 },
2567 { "movB", { RMDL, Ib }, 0 },
2568 { "movB", { RMBL, Ib }, 0 },
2569 { "movB", { RMAH, Ib }, 0 },
2570 { "movB", { RMCH, Ib }, 0 },
2571 { "movB", { RMDH, Ib }, 0 },
2572 { "movB", { RMBH, Ib }, 0 },
252b5132 2573 /* b8 */
bf890a93
IT
2574 { "mov%LV", { RMeAX, Iv64 }, 0 },
2575 { "mov%LV", { RMeCX, Iv64 }, 0 },
2576 { "mov%LV", { RMeDX, Iv64 }, 0 },
2577 { "mov%LV", { RMeBX, Iv64 }, 0 },
2578 { "mov%LV", { RMeSP, Iv64 }, 0 },
2579 { "mov%LV", { RMeBP, Iv64 }, 0 },
2580 { "mov%LV", { RMeSI, Iv64 }, 0 },
2581 { "mov%LV", { RMeDI, Iv64 }, 0 },
252b5132 2582 /* c0 */
1ceb70f8
L
2583 { REG_TABLE (REG_C0) },
2584 { REG_TABLE (REG_C1) },
bf890a93
IT
2585 { "retT", { Iw, BND }, 0 },
2586 { "retT", { BND }, 0 },
4e7d34a6
L
2587 { X86_64_TABLE (X86_64_C4) },
2588 { X86_64_TABLE (X86_64_C5) },
1ceb70f8
L
2589 { REG_TABLE (REG_C6) },
2590 { REG_TABLE (REG_C7) },
252b5132 2591 /* c8 */
bf890a93
IT
2592 { "enterT", { Iw, Ib }, 0 },
2593 { "leaveT", { XX }, 0 },
2594 { "Jret{|f}P", { Iw }, 0 },
2595 { "Jret{|f}P", { XX }, 0 },
2596 { "int3", { XX }, 0 },
2597 { "int", { Ib }, 0 },
4e7d34a6 2598 { X86_64_TABLE (X86_64_CE) },
bf890a93 2599 { "iret%LP", { XX }, 0 },
252b5132 2600 /* d0 */
1ceb70f8
L
2601 { REG_TABLE (REG_D0) },
2602 { REG_TABLE (REG_D1) },
2603 { REG_TABLE (REG_D2) },
2604 { REG_TABLE (REG_D3) },
4e7d34a6
L
2605 { X86_64_TABLE (X86_64_D4) },
2606 { X86_64_TABLE (X86_64_D5) },
592d1631 2607 { Bad_Opcode },
bf890a93 2608 { "xlat", { DSBX }, 0 },
252b5132
RH
2609 /* d8 */
2610 { FLOAT },
2611 { FLOAT },
2612 { FLOAT },
2613 { FLOAT },
2614 { FLOAT },
2615 { FLOAT },
2616 { FLOAT },
2617 { FLOAT },
2618 /* e0 */
bf890a93
IT
2619 { "loopneFH", { Jb, XX, loop_jcxz_flag }, 0 },
2620 { "loopeFH", { Jb, XX, loop_jcxz_flag }, 0 },
2621 { "loopFH", { Jb, XX, loop_jcxz_flag }, 0 },
2622 { "jEcxzH", { Jb, XX, loop_jcxz_flag }, 0 },
2623 { "inB", { AL, Ib }, 0 },
2624 { "inG", { zAX, Ib }, 0 },
2625 { "outB", { Ib, AL }, 0 },
2626 { "outG", { Ib, zAX }, 0 },
252b5132 2627 /* e8 */
a72d2af2
L
2628 { X86_64_TABLE (X86_64_E8) },
2629 { X86_64_TABLE (X86_64_E9) },
4e7d34a6 2630 { X86_64_TABLE (X86_64_EA) },
bf890a93
IT
2631 { "jmp", { Jb, BND }, 0 },
2632 { "inB", { AL, indirDX }, 0 },
2633 { "inG", { zAX, indirDX }, 0 },
2634 { "outB", { indirDX, AL }, 0 },
2635 { "outG", { indirDX, zAX }, 0 },
252b5132 2636 /* f0 */
592d1631 2637 { Bad_Opcode }, /* lock prefix */
bf890a93 2638 { "icebp", { XX }, 0 },
592d1631
L
2639 { Bad_Opcode }, /* repne */
2640 { Bad_Opcode }, /* repz */
bf890a93
IT
2641 { "hlt", { XX }, 0 },
2642 { "cmc", { XX }, 0 },
1ceb70f8
L
2643 { REG_TABLE (REG_F6) },
2644 { REG_TABLE (REG_F7) },
252b5132 2645 /* f8 */
bf890a93
IT
2646 { "clc", { XX }, 0 },
2647 { "stc", { XX }, 0 },
2648 { "cli", { XX }, 0 },
2649 { "sti", { XX }, 0 },
2650 { "cld", { XX }, 0 },
2651 { "std", { XX }, 0 },
1ceb70f8
L
2652 { REG_TABLE (REG_FE) },
2653 { REG_TABLE (REG_FF) },
252b5132
RH
2654};
2655
6439fc28 2656static const struct dis386 dis386_twobyte[] = {
252b5132 2657 /* 00 */
1ceb70f8
L
2658 { REG_TABLE (REG_0F00 ) },
2659 { REG_TABLE (REG_0F01 ) },
bf890a93
IT
2660 { "larS", { Gv, Ew }, 0 },
2661 { "lslS", { Gv, Ew }, 0 },
592d1631 2662 { Bad_Opcode },
bf890a93
IT
2663 { "syscall", { XX }, 0 },
2664 { "clts", { XX }, 0 },
2665 { "sysret%LP", { XX }, 0 },
252b5132 2666 /* 08 */
bf890a93 2667 { "invd", { XX }, 0 },
3233d7d0 2668 { PREFIX_TABLE (PREFIX_0F09) },
592d1631 2669 { Bad_Opcode },
bf890a93 2670 { "ud2", { XX }, 0 },
592d1631 2671 { Bad_Opcode },
b5b1fc4f 2672 { REG_TABLE (REG_0F0D) },
bf890a93
IT
2673 { "femms", { XX }, 0 },
2674 { "", { MX, EM, OPSUF }, 0 }, /* See OP_3DNowSuffix. */
252b5132 2675 /* 10 */
1ceb70f8
L
2676 { PREFIX_TABLE (PREFIX_0F10) },
2677 { PREFIX_TABLE (PREFIX_0F11) },
2678 { PREFIX_TABLE (PREFIX_0F12) },
2679 { MOD_TABLE (MOD_0F13) },
507bd325
L
2680 { "unpcklpX", { XM, EXx }, PREFIX_OPCODE },
2681 { "unpckhpX", { XM, EXx }, PREFIX_OPCODE },
1ceb70f8
L
2682 { PREFIX_TABLE (PREFIX_0F16) },
2683 { MOD_TABLE (MOD_0F17) },
252b5132 2684 /* 18 */
1ceb70f8 2685 { REG_TABLE (REG_0F18) },
bf890a93 2686 { "nopQ", { Ev }, 0 },
7e8b059b
L
2687 { PREFIX_TABLE (PREFIX_0F1A) },
2688 { PREFIX_TABLE (PREFIX_0F1B) },
c48935d7 2689 { PREFIX_TABLE (PREFIX_0F1C) },
bf890a93 2690 { "nopQ", { Ev }, 0 },
603555e5 2691 { PREFIX_TABLE (PREFIX_0F1E) },
bf890a93 2692 { "nopQ", { Ev }, 0 },
252b5132 2693 /* 20 */
bf890a93
IT
2694 { "movZ", { Rm, Cm }, 0 },
2695 { "movZ", { Rm, Dm }, 0 },
2696 { "movZ", { Cm, Rm }, 0 },
2697 { "movZ", { Dm, Rm }, 0 },
1ceb70f8 2698 { MOD_TABLE (MOD_0F24) },
592d1631 2699 { Bad_Opcode },
1ceb70f8 2700 { MOD_TABLE (MOD_0F26) },
592d1631 2701 { Bad_Opcode },
252b5132 2702 /* 28 */
507bd325
L
2703 { "movapX", { XM, EXx }, PREFIX_OPCODE },
2704 { "movapX", { EXxS, XM }, PREFIX_OPCODE },
1ceb70f8
L
2705 { PREFIX_TABLE (PREFIX_0F2A) },
2706 { PREFIX_TABLE (PREFIX_0F2B) },
2707 { PREFIX_TABLE (PREFIX_0F2C) },
2708 { PREFIX_TABLE (PREFIX_0F2D) },
2709 { PREFIX_TABLE (PREFIX_0F2E) },
2710 { PREFIX_TABLE (PREFIX_0F2F) },
252b5132 2711 /* 30 */
bf890a93
IT
2712 { "wrmsr", { XX }, 0 },
2713 { "rdtsc", { XX }, 0 },
2714 { "rdmsr", { XX }, 0 },
2715 { "rdpmc", { XX }, 0 },
2716 { "sysenter", { XX }, 0 },
2717 { "sysexit", { XX }, 0 },
592d1631 2718 { Bad_Opcode },
bf890a93 2719 { "getsec", { XX }, 0 },
252b5132 2720 /* 38 */
507bd325 2721 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F38, PREFIX_OPCODE) },
592d1631 2722 { Bad_Opcode },
507bd325 2723 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F3A, PREFIX_OPCODE) },
592d1631
L
2724 { Bad_Opcode },
2725 { Bad_Opcode },
2726 { Bad_Opcode },
2727 { Bad_Opcode },
2728 { Bad_Opcode },
252b5132 2729 /* 40 */
bf890a93
IT
2730 { "cmovoS", { Gv, Ev }, 0 },
2731 { "cmovnoS", { Gv, Ev }, 0 },
2732 { "cmovbS", { Gv, Ev }, 0 },
2733 { "cmovaeS", { Gv, Ev }, 0 },
2734 { "cmoveS", { Gv, Ev }, 0 },
2735 { "cmovneS", { Gv, Ev }, 0 },
2736 { "cmovbeS", { Gv, Ev }, 0 },
2737 { "cmovaS", { Gv, Ev }, 0 },
252b5132 2738 /* 48 */
bf890a93
IT
2739 { "cmovsS", { Gv, Ev }, 0 },
2740 { "cmovnsS", { Gv, Ev }, 0 },
2741 { "cmovpS", { Gv, Ev }, 0 },
2742 { "cmovnpS", { Gv, Ev }, 0 },
2743 { "cmovlS", { Gv, Ev }, 0 },
2744 { "cmovgeS", { Gv, Ev }, 0 },
2745 { "cmovleS", { Gv, Ev }, 0 },
2746 { "cmovgS", { Gv, Ev }, 0 },
252b5132 2747 /* 50 */
75c135a8 2748 { MOD_TABLE (MOD_0F51) },
1ceb70f8
L
2749 { PREFIX_TABLE (PREFIX_0F51) },
2750 { PREFIX_TABLE (PREFIX_0F52) },
2751 { PREFIX_TABLE (PREFIX_0F53) },
507bd325
L
2752 { "andpX", { XM, EXx }, PREFIX_OPCODE },
2753 { "andnpX", { XM, EXx }, PREFIX_OPCODE },
2754 { "orpX", { XM, EXx }, PREFIX_OPCODE },
2755 { "xorpX", { XM, EXx }, PREFIX_OPCODE },
252b5132 2756 /* 58 */
1ceb70f8
L
2757 { PREFIX_TABLE (PREFIX_0F58) },
2758 { PREFIX_TABLE (PREFIX_0F59) },
2759 { PREFIX_TABLE (PREFIX_0F5A) },
2760 { PREFIX_TABLE (PREFIX_0F5B) },
2761 { PREFIX_TABLE (PREFIX_0F5C) },
2762 { PREFIX_TABLE (PREFIX_0F5D) },
2763 { PREFIX_TABLE (PREFIX_0F5E) },
2764 { PREFIX_TABLE (PREFIX_0F5F) },
252b5132 2765 /* 60 */
1ceb70f8
L
2766 { PREFIX_TABLE (PREFIX_0F60) },
2767 { PREFIX_TABLE (PREFIX_0F61) },
2768 { PREFIX_TABLE (PREFIX_0F62) },
507bd325
L
2769 { "packsswb", { MX, EM }, PREFIX_OPCODE },
2770 { "pcmpgtb", { MX, EM }, PREFIX_OPCODE },
2771 { "pcmpgtw", { MX, EM }, PREFIX_OPCODE },
2772 { "pcmpgtd", { MX, EM }, PREFIX_OPCODE },
2773 { "packuswb", { MX, EM }, PREFIX_OPCODE },
252b5132 2774 /* 68 */
507bd325
L
2775 { "punpckhbw", { MX, EM }, PREFIX_OPCODE },
2776 { "punpckhwd", { MX, EM }, PREFIX_OPCODE },
2777 { "punpckhdq", { MX, EM }, PREFIX_OPCODE },
2778 { "packssdw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8
L
2779 { PREFIX_TABLE (PREFIX_0F6C) },
2780 { PREFIX_TABLE (PREFIX_0F6D) },
507bd325 2781 { "movK", { MX, Edq }, PREFIX_OPCODE },
1ceb70f8 2782 { PREFIX_TABLE (PREFIX_0F6F) },
252b5132 2783 /* 70 */
1ceb70f8
L
2784 { PREFIX_TABLE (PREFIX_0F70) },
2785 { REG_TABLE (REG_0F71) },
2786 { REG_TABLE (REG_0F72) },
2787 { REG_TABLE (REG_0F73) },
507bd325
L
2788 { "pcmpeqb", { MX, EM }, PREFIX_OPCODE },
2789 { "pcmpeqw", { MX, EM }, PREFIX_OPCODE },
2790 { "pcmpeqd", { MX, EM }, PREFIX_OPCODE },
2791 { "emms", { XX }, PREFIX_OPCODE },
252b5132 2792 /* 78 */
1ceb70f8
L
2793 { PREFIX_TABLE (PREFIX_0F78) },
2794 { PREFIX_TABLE (PREFIX_0F79) },
1f334aeb 2795 { Bad_Opcode },
592d1631 2796 { Bad_Opcode },
1ceb70f8
L
2797 { PREFIX_TABLE (PREFIX_0F7C) },
2798 { PREFIX_TABLE (PREFIX_0F7D) },
2799 { PREFIX_TABLE (PREFIX_0F7E) },
2800 { PREFIX_TABLE (PREFIX_0F7F) },
252b5132 2801 /* 80 */
bf890a93
IT
2802 { "joH", { Jv, BND, cond_jump_flag }, 0 },
2803 { "jnoH", { Jv, BND, cond_jump_flag }, 0 },
2804 { "jbH", { Jv, BND, cond_jump_flag }, 0 },
2805 { "jaeH", { Jv, BND, cond_jump_flag }, 0 },
2806 { "jeH", { Jv, BND, cond_jump_flag }, 0 },
2807 { "jneH", { Jv, BND, cond_jump_flag }, 0 },
2808 { "jbeH", { Jv, BND, cond_jump_flag }, 0 },
2809 { "jaH", { Jv, BND, cond_jump_flag }, 0 },
252b5132 2810 /* 88 */
bf890a93
IT
2811 { "jsH", { Jv, BND, cond_jump_flag }, 0 },
2812 { "jnsH", { Jv, BND, cond_jump_flag }, 0 },
2813 { "jpH", { Jv, BND, cond_jump_flag }, 0 },
2814 { "jnpH", { Jv, BND, cond_jump_flag }, 0 },
2815 { "jlH", { Jv, BND, cond_jump_flag }, 0 },
2816 { "jgeH", { Jv, BND, cond_jump_flag }, 0 },
2817 { "jleH", { Jv, BND, cond_jump_flag }, 0 },
2818 { "jgH", { Jv, BND, cond_jump_flag }, 0 },
252b5132 2819 /* 90 */
bf890a93
IT
2820 { "seto", { Eb }, 0 },
2821 { "setno", { Eb }, 0 },
2822 { "setb", { Eb }, 0 },
2823 { "setae", { Eb }, 0 },
2824 { "sete", { Eb }, 0 },
2825 { "setne", { Eb }, 0 },
2826 { "setbe", { Eb }, 0 },
2827 { "seta", { Eb }, 0 },
252b5132 2828 /* 98 */
bf890a93
IT
2829 { "sets", { Eb }, 0 },
2830 { "setns", { Eb }, 0 },
2831 { "setp", { Eb }, 0 },
2832 { "setnp", { Eb }, 0 },
2833 { "setl", { Eb }, 0 },
2834 { "setge", { Eb }, 0 },
2835 { "setle", { Eb }, 0 },
2836 { "setg", { Eb }, 0 },
252b5132 2837 /* a0 */
bf890a93
IT
2838 { "pushT", { fs }, 0 },
2839 { "popT", { fs }, 0 },
2840 { "cpuid", { XX }, 0 },
2841 { "btS", { Ev, Gv }, 0 },
2842 { "shldS", { Ev, Gv, Ib }, 0 },
2843 { "shldS", { Ev, Gv, CL }, 0 },
1ceb70f8
L
2844 { REG_TABLE (REG_0FA6) },
2845 { REG_TABLE (REG_0FA7) },
252b5132 2846 /* a8 */
bf890a93
IT
2847 { "pushT", { gs }, 0 },
2848 { "popT", { gs }, 0 },
2849 { "rsm", { XX }, 0 },
2850 { "btsS", { Evh1, Gv }, 0 },
2851 { "shrdS", { Ev, Gv, Ib }, 0 },
2852 { "shrdS", { Ev, Gv, CL }, 0 },
1ceb70f8 2853 { REG_TABLE (REG_0FAE) },
bf890a93 2854 { "imulS", { Gv, Ev }, 0 },
252b5132 2855 /* b0 */
bf890a93
IT
2856 { "cmpxchgB", { Ebh1, Gb }, 0 },
2857 { "cmpxchgS", { Evh1, Gv }, 0 },
1ceb70f8 2858 { MOD_TABLE (MOD_0FB2) },
bf890a93 2859 { "btrS", { Evh1, Gv }, 0 },
1ceb70f8
L
2860 { MOD_TABLE (MOD_0FB4) },
2861 { MOD_TABLE (MOD_0FB5) },
bf890a93
IT
2862 { "movz{bR|x}", { Gv, Eb }, 0 },
2863 { "movz{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movzww ! */
252b5132 2864 /* b8 */
1ceb70f8 2865 { PREFIX_TABLE (PREFIX_0FB8) },
66f1eba0 2866 { "ud1S", { Gv, Ev }, 0 },
1ceb70f8 2867 { REG_TABLE (REG_0FBA) },
bf890a93 2868 { "btcS", { Evh1, Gv }, 0 },
f12dc422 2869 { PREFIX_TABLE (PREFIX_0FBC) },
1ceb70f8 2870 { PREFIX_TABLE (PREFIX_0FBD) },
bf890a93
IT
2871 { "movs{bR|x}", { Gv, Eb }, 0 },
2872 { "movs{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movsww ! */
252b5132 2873 /* c0 */
bf890a93
IT
2874 { "xaddB", { Ebh1, Gb }, 0 },
2875 { "xaddS", { Evh1, Gv }, 0 },
1ceb70f8 2876 { PREFIX_TABLE (PREFIX_0FC2) },
a8484f96 2877 { MOD_TABLE (MOD_0FC3) },
507bd325
L
2878 { "pinsrw", { MX, Edqw, Ib }, PREFIX_OPCODE },
2879 { "pextrw", { Gdq, MS, Ib }, PREFIX_OPCODE },
2880 { "shufpX", { XM, EXx, Ib }, PREFIX_OPCODE },
1ceb70f8 2881 { REG_TABLE (REG_0FC7) },
252b5132 2882 /* c8 */
bf890a93
IT
2883 { "bswap", { RMeAX }, 0 },
2884 { "bswap", { RMeCX }, 0 },
2885 { "bswap", { RMeDX }, 0 },
2886 { "bswap", { RMeBX }, 0 },
2887 { "bswap", { RMeSP }, 0 },
2888 { "bswap", { RMeBP }, 0 },
2889 { "bswap", { RMeSI }, 0 },
2890 { "bswap", { RMeDI }, 0 },
252b5132 2891 /* d0 */
1ceb70f8 2892 { PREFIX_TABLE (PREFIX_0FD0) },
507bd325
L
2893 { "psrlw", { MX, EM }, PREFIX_OPCODE },
2894 { "psrld", { MX, EM }, PREFIX_OPCODE },
2895 { "psrlq", { MX, EM }, PREFIX_OPCODE },
2896 { "paddq", { MX, EM }, PREFIX_OPCODE },
2897 { "pmullw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8 2898 { PREFIX_TABLE (PREFIX_0FD6) },
75c135a8 2899 { MOD_TABLE (MOD_0FD7) },
252b5132 2900 /* d8 */
507bd325
L
2901 { "psubusb", { MX, EM }, PREFIX_OPCODE },
2902 { "psubusw", { MX, EM }, PREFIX_OPCODE },
2903 { "pminub", { MX, EM }, PREFIX_OPCODE },
2904 { "pand", { MX, EM }, PREFIX_OPCODE },
2905 { "paddusb", { MX, EM }, PREFIX_OPCODE },
2906 { "paddusw", { MX, EM }, PREFIX_OPCODE },
2907 { "pmaxub", { MX, EM }, PREFIX_OPCODE },
2908 { "pandn", { MX, EM }, PREFIX_OPCODE },
252b5132 2909 /* e0 */
507bd325
L
2910 { "pavgb", { MX, EM }, PREFIX_OPCODE },
2911 { "psraw", { MX, EM }, PREFIX_OPCODE },
2912 { "psrad", { MX, EM }, PREFIX_OPCODE },
2913 { "pavgw", { MX, EM }, PREFIX_OPCODE },
2914 { "pmulhuw", { MX, EM }, PREFIX_OPCODE },
2915 { "pmulhw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8
L
2916 { PREFIX_TABLE (PREFIX_0FE6) },
2917 { PREFIX_TABLE (PREFIX_0FE7) },
252b5132 2918 /* e8 */
507bd325
L
2919 { "psubsb", { MX, EM }, PREFIX_OPCODE },
2920 { "psubsw", { MX, EM }, PREFIX_OPCODE },
2921 { "pminsw", { MX, EM }, PREFIX_OPCODE },
2922 { "por", { MX, EM }, PREFIX_OPCODE },
2923 { "paddsb", { MX, EM }, PREFIX_OPCODE },
2924 { "paddsw", { MX, EM }, PREFIX_OPCODE },
2925 { "pmaxsw", { MX, EM }, PREFIX_OPCODE },
2926 { "pxor", { MX, EM }, PREFIX_OPCODE },
252b5132 2927 /* f0 */
1ceb70f8 2928 { PREFIX_TABLE (PREFIX_0FF0) },
507bd325
L
2929 { "psllw", { MX, EM }, PREFIX_OPCODE },
2930 { "pslld", { MX, EM }, PREFIX_OPCODE },
2931 { "psllq", { MX, EM }, PREFIX_OPCODE },
2932 { "pmuludq", { MX, EM }, PREFIX_OPCODE },
2933 { "pmaddwd", { MX, EM }, PREFIX_OPCODE },
2934 { "psadbw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8 2935 { PREFIX_TABLE (PREFIX_0FF7) },
252b5132 2936 /* f8 */
507bd325
L
2937 { "psubb", { MX, EM }, PREFIX_OPCODE },
2938 { "psubw", { MX, EM }, PREFIX_OPCODE },
2939 { "psubd", { MX, EM }, PREFIX_OPCODE },
2940 { "psubq", { MX, EM }, PREFIX_OPCODE },
2941 { "paddb", { MX, EM }, PREFIX_OPCODE },
2942 { "paddw", { MX, EM }, PREFIX_OPCODE },
2943 { "paddd", { MX, EM }, PREFIX_OPCODE },
66f1eba0 2944 { "ud0S", { Gv, Ev }, 0 },
252b5132
RH
2945};
2946
2947static const unsigned char onebyte_has_modrm[256] = {
c608c12e
AM
2948 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2949 /* ------------------------------- */
2950 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
2951 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
2952 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
2953 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
2954 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
2955 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
2956 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
2957 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
2958 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
2959 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
2960 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
2961 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
2962 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
2963 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
2964 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
2965 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
2966 /* ------------------------------- */
2967 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
252b5132
RH
2968};
2969
2970static const unsigned char twobyte_has_modrm[256] = {
c608c12e
AM
2971 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2972 /* ------------------------------- */
252b5132 2973 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
b5b1fc4f 2974 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
85f10a01 2975 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
331d2d0d 2976 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
252b5132 2977 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
4bba6815
AM
2978 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
2979 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
85f10a01 2980 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
252b5132
RH
2981 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
2982 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
30d1c836 2983 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
66f1eba0 2984 /* b0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* bf */
252b5132 2985 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
ca164297 2986 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
4bba6815 2987 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
66f1eba0 2988 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 /* ff */
c608c12e
AM
2989 /* ------------------------------- */
2990 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2991};
2992
252b5132
RH
2993static char obuf[100];
2994static char *obufp;
ea397f5b 2995static char *mnemonicendp;
252b5132
RH
2996static char scratchbuf[100];
2997static unsigned char *start_codep;
2998static unsigned char *insn_codep;
2999static unsigned char *codep;
285ca992 3000static unsigned char *end_codep;
f16cd0d5
L
3001static int last_lock_prefix;
3002static int last_repz_prefix;
3003static int last_repnz_prefix;
3004static int last_data_prefix;
3005static int last_addr_prefix;
3006static int last_rex_prefix;
3007static int last_seg_prefix;
d9949a36 3008static int fwait_prefix;
285ca992
L
3009/* The active segment register prefix. */
3010static int active_seg_prefix;
f16cd0d5
L
3011#define MAX_CODE_LENGTH 15
3012/* We can up to 14 prefixes since the maximum instruction length is
3013 15bytes. */
3014static int all_prefixes[MAX_CODE_LENGTH - 1];
252b5132 3015static disassemble_info *the_info;
7967e09e
L
3016static struct
3017 {
3018 int mod;
7967e09e 3019 int reg;
484c222e 3020 int rm;
7967e09e
L
3021 }
3022modrm;
4bba6815 3023static unsigned char need_modrm;
dfc8cf43
L
3024static struct
3025 {
3026 int scale;
3027 int index;
3028 int base;
3029 }
3030sib;
c0f3af97
L
3031static struct
3032 {
3033 int register_specifier;
3034 int length;
3035 int prefix;
3036 int w;
43234a1e
L
3037 int evex;
3038 int r;
3039 int v;
3040 int mask_register_specifier;
3041 int zeroing;
3042 int ll;
3043 int b;
c0f3af97
L
3044 }
3045vex;
3046static unsigned char need_vex;
3047static unsigned char need_vex_reg;
dae39acc 3048static unsigned char vex_w_done;
252b5132 3049
ea397f5b
L
3050struct op
3051 {
3052 const char *name;
3053 unsigned int len;
3054 };
3055
4bba6815
AM
3056/* If we are accessing mod/rm/reg without need_modrm set, then the
3057 values are stale. Hitting this abort likely indicates that you
3058 need to update onebyte_has_modrm or twobyte_has_modrm. */
3059#define MODRM_CHECK if (!need_modrm) abort ()
3060
d708bcba
AM
3061static const char **names64;
3062static const char **names32;
3063static const char **names16;
3064static const char **names8;
3065static const char **names8rex;
3066static const char **names_seg;
db51cc60
L
3067static const char *index64;
3068static const char *index32;
d708bcba 3069static const char **index16;
7e8b059b 3070static const char **names_bnd;
d708bcba
AM
3071
3072static const char *intel_names64[] = {
3073 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
3074 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
3075};
3076static const char *intel_names32[] = {
3077 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
3078 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
3079};
3080static const char *intel_names16[] = {
3081 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
3082 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
3083};
3084static const char *intel_names8[] = {
3085 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
3086};
3087static const char *intel_names8rex[] = {
3088 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
3089 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
3090};
3091static const char *intel_names_seg[] = {
3092 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
3093};
db51cc60
L
3094static const char *intel_index64 = "riz";
3095static const char *intel_index32 = "eiz";
d708bcba
AM
3096static const char *intel_index16[] = {
3097 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
3098};
3099
3100static const char *att_names64[] = {
3101 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
52b15da3
JH
3102 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
3103};
d708bcba
AM
3104static const char *att_names32[] = {
3105 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
52b15da3 3106 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
252b5132 3107};
d708bcba
AM
3108static const char *att_names16[] = {
3109 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
52b15da3 3110 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
252b5132 3111};
d708bcba
AM
3112static const char *att_names8[] = {
3113 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
252b5132 3114};
d708bcba
AM
3115static const char *att_names8rex[] = {
3116 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
52b15da3
JH
3117 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
3118};
d708bcba
AM
3119static const char *att_names_seg[] = {
3120 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
252b5132 3121};
db51cc60
L
3122static const char *att_index64 = "%riz";
3123static const char *att_index32 = "%eiz";
d708bcba
AM
3124static const char *att_index16[] = {
3125 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
252b5132
RH
3126};
3127
b9733481
L
3128static const char **names_mm;
3129static const char *intel_names_mm[] = {
3130 "mm0", "mm1", "mm2", "mm3",
3131 "mm4", "mm5", "mm6", "mm7"
3132};
3133static const char *att_names_mm[] = {
3134 "%mm0", "%mm1", "%mm2", "%mm3",
3135 "%mm4", "%mm5", "%mm6", "%mm7"
3136};
3137
7e8b059b
L
3138static const char *intel_names_bnd[] = {
3139 "bnd0", "bnd1", "bnd2", "bnd3"
3140};
3141
3142static const char *att_names_bnd[] = {
3143 "%bnd0", "%bnd1", "%bnd2", "%bnd3"
3144};
3145
b9733481
L
3146static const char **names_xmm;
3147static const char *intel_names_xmm[] = {
3148 "xmm0", "xmm1", "xmm2", "xmm3",
3149 "xmm4", "xmm5", "xmm6", "xmm7",
3150 "xmm8", "xmm9", "xmm10", "xmm11",
43234a1e
L
3151 "xmm12", "xmm13", "xmm14", "xmm15",
3152 "xmm16", "xmm17", "xmm18", "xmm19",
3153 "xmm20", "xmm21", "xmm22", "xmm23",
3154 "xmm24", "xmm25", "xmm26", "xmm27",
3155 "xmm28", "xmm29", "xmm30", "xmm31"
b9733481
L
3156};
3157static const char *att_names_xmm[] = {
3158 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
3159 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
3160 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
43234a1e
L
3161 "%xmm12", "%xmm13", "%xmm14", "%xmm15",
3162 "%xmm16", "%xmm17", "%xmm18", "%xmm19",
3163 "%xmm20", "%xmm21", "%xmm22", "%xmm23",
3164 "%xmm24", "%xmm25", "%xmm26", "%xmm27",
3165 "%xmm28", "%xmm29", "%xmm30", "%xmm31"
b9733481
L
3166};
3167
3168static const char **names_ymm;
3169static const char *intel_names_ymm[] = {
3170 "ymm0", "ymm1", "ymm2", "ymm3",
3171 "ymm4", "ymm5", "ymm6", "ymm7",
3172 "ymm8", "ymm9", "ymm10", "ymm11",
43234a1e
L
3173 "ymm12", "ymm13", "ymm14", "ymm15",
3174 "ymm16", "ymm17", "ymm18", "ymm19",
3175 "ymm20", "ymm21", "ymm22", "ymm23",
3176 "ymm24", "ymm25", "ymm26", "ymm27",
3177 "ymm28", "ymm29", "ymm30", "ymm31"
b9733481
L
3178};
3179static const char *att_names_ymm[] = {
3180 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
3181 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
3182 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
43234a1e
L
3183 "%ymm12", "%ymm13", "%ymm14", "%ymm15",
3184 "%ymm16", "%ymm17", "%ymm18", "%ymm19",
3185 "%ymm20", "%ymm21", "%ymm22", "%ymm23",
3186 "%ymm24", "%ymm25", "%ymm26", "%ymm27",
3187 "%ymm28", "%ymm29", "%ymm30", "%ymm31"
3188};
3189
3190static const char **names_zmm;
3191static const char *intel_names_zmm[] = {
3192 "zmm0", "zmm1", "zmm2", "zmm3",
3193 "zmm4", "zmm5", "zmm6", "zmm7",
3194 "zmm8", "zmm9", "zmm10", "zmm11",
3195 "zmm12", "zmm13", "zmm14", "zmm15",
3196 "zmm16", "zmm17", "zmm18", "zmm19",
3197 "zmm20", "zmm21", "zmm22", "zmm23",
3198 "zmm24", "zmm25", "zmm26", "zmm27",
3199 "zmm28", "zmm29", "zmm30", "zmm31"
3200};
3201static const char *att_names_zmm[] = {
3202 "%zmm0", "%zmm1", "%zmm2", "%zmm3",
3203 "%zmm4", "%zmm5", "%zmm6", "%zmm7",
3204 "%zmm8", "%zmm9", "%zmm10", "%zmm11",
3205 "%zmm12", "%zmm13", "%zmm14", "%zmm15",
3206 "%zmm16", "%zmm17", "%zmm18", "%zmm19",
3207 "%zmm20", "%zmm21", "%zmm22", "%zmm23",
3208 "%zmm24", "%zmm25", "%zmm26", "%zmm27",
3209 "%zmm28", "%zmm29", "%zmm30", "%zmm31"
3210};
3211
3212static const char **names_mask;
3213static const char *intel_names_mask[] = {
3214 "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"
3215};
3216static const char *att_names_mask[] = {
3217 "%k0", "%k1", "%k2", "%k3", "%k4", "%k5", "%k6", "%k7"
3218};
3219
3220static const char *names_rounding[] =
3221{
3222 "{rn-sae}",
3223 "{rd-sae}",
3224 "{ru-sae}",
3225 "{rz-sae}"
b9733481
L
3226};
3227
1ceb70f8
L
3228static const struct dis386 reg_table[][8] = {
3229 /* REG_80 */
252b5132 3230 {
bf890a93
IT
3231 { "addA", { Ebh1, Ib }, 0 },
3232 { "orA", { Ebh1, Ib }, 0 },
3233 { "adcA", { Ebh1, Ib }, 0 },
3234 { "sbbA", { Ebh1, Ib }, 0 },
3235 { "andA", { Ebh1, Ib }, 0 },
3236 { "subA", { Ebh1, Ib }, 0 },
3237 { "xorA", { Ebh1, Ib }, 0 },
3238 { "cmpA", { Eb, Ib }, 0 },
252b5132 3239 },
1ceb70f8 3240 /* REG_81 */
252b5132 3241 {
bf890a93
IT
3242 { "addQ", { Evh1, Iv }, 0 },
3243 { "orQ", { Evh1, Iv }, 0 },
3244 { "adcQ", { Evh1, Iv }, 0 },
3245 { "sbbQ", { Evh1, Iv }, 0 },
3246 { "andQ", { Evh1, Iv }, 0 },
3247 { "subQ", { Evh1, Iv }, 0 },
3248 { "xorQ", { Evh1, Iv }, 0 },
3249 { "cmpQ", { Ev, Iv }, 0 },
252b5132 3250 },
7148c369 3251 /* REG_83 */
252b5132 3252 {
bf890a93
IT
3253 { "addQ", { Evh1, sIb }, 0 },
3254 { "orQ", { Evh1, sIb }, 0 },
3255 { "adcQ", { Evh1, sIb }, 0 },
3256 { "sbbQ", { Evh1, sIb }, 0 },
3257 { "andQ", { Evh1, sIb }, 0 },
3258 { "subQ", { Evh1, sIb }, 0 },
3259 { "xorQ", { Evh1, sIb }, 0 },
3260 { "cmpQ", { Ev, sIb }, 0 },
252b5132 3261 },
1ceb70f8 3262 /* REG_8F */
4e7d34a6 3263 {
bf890a93 3264 { "popU", { stackEv }, 0 },
c48244a5 3265 { XOP_8F_TABLE (XOP_09) },
592d1631
L
3266 { Bad_Opcode },
3267 { Bad_Opcode },
3268 { Bad_Opcode },
f88c9eb0 3269 { XOP_8F_TABLE (XOP_09) },
4e7d34a6 3270 },
1ceb70f8 3271 /* REG_C0 */
252b5132 3272 {
bf890a93
IT
3273 { "rolA", { Eb, Ib }, 0 },
3274 { "rorA", { Eb, Ib }, 0 },
3275 { "rclA", { Eb, Ib }, 0 },
3276 { "rcrA", { Eb, Ib }, 0 },
3277 { "shlA", { Eb, Ib }, 0 },
3278 { "shrA", { Eb, Ib }, 0 },
e4bdd679 3279 { "shlA", { Eb, Ib }, 0 },
bf890a93 3280 { "sarA", { Eb, Ib }, 0 },
252b5132 3281 },
1ceb70f8 3282 /* REG_C1 */
252b5132 3283 {
bf890a93
IT
3284 { "rolQ", { Ev, Ib }, 0 },
3285 { "rorQ", { Ev, Ib }, 0 },
3286 { "rclQ", { Ev, Ib }, 0 },
3287 { "rcrQ", { Ev, Ib }, 0 },
3288 { "shlQ", { Ev, Ib }, 0 },
3289 { "shrQ", { Ev, Ib }, 0 },
e4bdd679 3290 { "shlQ", { Ev, Ib }, 0 },
bf890a93 3291 { "sarQ", { Ev, Ib }, 0 },
252b5132 3292 },
1ceb70f8 3293 /* REG_C6 */
4e7d34a6 3294 {
bf890a93 3295 { "movA", { Ebh3, Ib }, 0 },
42164a71
L
3296 { Bad_Opcode },
3297 { Bad_Opcode },
3298 { Bad_Opcode },
3299 { Bad_Opcode },
3300 { Bad_Opcode },
3301 { Bad_Opcode },
3302 { MOD_TABLE (MOD_C6_REG_7) },
4e7d34a6 3303 },
1ceb70f8 3304 /* REG_C7 */
4e7d34a6 3305 {
bf890a93 3306 { "movQ", { Evh3, Iv }, 0 },
42164a71
L
3307 { Bad_Opcode },
3308 { Bad_Opcode },
3309 { Bad_Opcode },
3310 { Bad_Opcode },
3311 { Bad_Opcode },
3312 { Bad_Opcode },
3313 { MOD_TABLE (MOD_C7_REG_7) },
4e7d34a6 3314 },
1ceb70f8 3315 /* REG_D0 */
252b5132 3316 {
bf890a93
IT
3317 { "rolA", { Eb, I1 }, 0 },
3318 { "rorA", { Eb, I1 }, 0 },
3319 { "rclA", { Eb, I1 }, 0 },
3320 { "rcrA", { Eb, I1 }, 0 },
3321 { "shlA", { Eb, I1 }, 0 },
3322 { "shrA", { Eb, I1 }, 0 },
e4bdd679 3323 { "shlA", { Eb, I1 }, 0 },
bf890a93 3324 { "sarA", { Eb, I1 }, 0 },
252b5132 3325 },
1ceb70f8 3326 /* REG_D1 */
252b5132 3327 {
bf890a93
IT
3328 { "rolQ", { Ev, I1 }, 0 },
3329 { "rorQ", { Ev, I1 }, 0 },
3330 { "rclQ", { Ev, I1 }, 0 },
3331 { "rcrQ", { Ev, I1 }, 0 },
3332 { "shlQ", { Ev, I1 }, 0 },
3333 { "shrQ", { Ev, I1 }, 0 },
e4bdd679 3334 { "shlQ", { Ev, I1 }, 0 },
bf890a93 3335 { "sarQ", { Ev, I1 }, 0 },
252b5132 3336 },
1ceb70f8 3337 /* REG_D2 */
252b5132 3338 {
bf890a93
IT
3339 { "rolA", { Eb, CL }, 0 },
3340 { "rorA", { Eb, CL }, 0 },
3341 { "rclA", { Eb, CL }, 0 },
3342 { "rcrA", { Eb, CL }, 0 },
3343 { "shlA", { Eb, CL }, 0 },
3344 { "shrA", { Eb, CL }, 0 },
e4bdd679 3345 { "shlA", { Eb, CL }, 0 },
bf890a93 3346 { "sarA", { Eb, CL }, 0 },
252b5132 3347 },
1ceb70f8 3348 /* REG_D3 */
252b5132 3349 {
bf890a93
IT
3350 { "rolQ", { Ev, CL }, 0 },
3351 { "rorQ", { Ev, CL }, 0 },
3352 { "rclQ", { Ev, CL }, 0 },
3353 { "rcrQ", { Ev, CL }, 0 },
3354 { "shlQ", { Ev, CL }, 0 },
3355 { "shrQ", { Ev, CL }, 0 },
e4bdd679 3356 { "shlQ", { Ev, CL }, 0 },
bf890a93 3357 { "sarQ", { Ev, CL }, 0 },
252b5132 3358 },
1ceb70f8 3359 /* REG_F6 */
252b5132 3360 {
bf890a93 3361 { "testA", { Eb, Ib }, 0 },
7db2c588 3362 { "testA", { Eb, Ib }, 0 },
bf890a93
IT
3363 { "notA", { Ebh1 }, 0 },
3364 { "negA", { Ebh1 }, 0 },
3365 { "mulA", { Eb }, 0 }, /* Don't print the implicit %al register, */
3366 { "imulA", { Eb }, 0 }, /* to distinguish these opcodes from other */
3367 { "divA", { Eb }, 0 }, /* mul/imul opcodes. Do the same for div */
3368 { "idivA", { Eb }, 0 }, /* and idiv for consistency. */
252b5132 3369 },
1ceb70f8 3370 /* REG_F7 */
252b5132 3371 {
bf890a93 3372 { "testQ", { Ev, Iv }, 0 },
7db2c588 3373 { "testQ", { Ev, Iv }, 0 },
bf890a93
IT
3374 { "notQ", { Evh1 }, 0 },
3375 { "negQ", { Evh1 }, 0 },
3376 { "mulQ", { Ev }, 0 }, /* Don't print the implicit register. */
3377 { "imulQ", { Ev }, 0 },
3378 { "divQ", { Ev }, 0 },
3379 { "idivQ", { Ev }, 0 },
252b5132 3380 },
1ceb70f8 3381 /* REG_FE */
252b5132 3382 {
bf890a93
IT
3383 { "incA", { Ebh1 }, 0 },
3384 { "decA", { Ebh1 }, 0 },
252b5132 3385 },
1ceb70f8 3386 /* REG_FF */
252b5132 3387 {
bf890a93
IT
3388 { "incQ", { Evh1 }, 0 },
3389 { "decQ", { Evh1 }, 0 },
9fef80d6 3390 { "call{&|}", { NOTRACK, indirEv, BND }, 0 },
4a357820 3391 { MOD_TABLE (MOD_FF_REG_3) },
9fef80d6 3392 { "jmp{&|}", { NOTRACK, indirEv, BND }, 0 },
4a357820 3393 { MOD_TABLE (MOD_FF_REG_5) },
bf890a93 3394 { "pushU", { stackEv }, 0 },
592d1631 3395 { Bad_Opcode },
252b5132 3396 },
1ceb70f8 3397 /* REG_0F00 */
252b5132 3398 {
bf890a93
IT
3399 { "sldtD", { Sv }, 0 },
3400 { "strD", { Sv }, 0 },
3401 { "lldt", { Ew }, 0 },
3402 { "ltr", { Ew }, 0 },
3403 { "verr", { Ew }, 0 },
3404 { "verw", { Ew }, 0 },
592d1631
L
3405 { Bad_Opcode },
3406 { Bad_Opcode },
252b5132 3407 },
1ceb70f8 3408 /* REG_0F01 */
252b5132 3409 {
1ceb70f8
L
3410 { MOD_TABLE (MOD_0F01_REG_0) },
3411 { MOD_TABLE (MOD_0F01_REG_1) },
3412 { MOD_TABLE (MOD_0F01_REG_2) },
3413 { MOD_TABLE (MOD_0F01_REG_3) },
bf890a93 3414 { "smswD", { Sv }, 0 },
8eab4136 3415 { MOD_TABLE (MOD_0F01_REG_5) },
bf890a93 3416 { "lmsw", { Ew }, 0 },
1ceb70f8 3417 { MOD_TABLE (MOD_0F01_REG_7) },
252b5132 3418 },
b5b1fc4f 3419 /* REG_0F0D */
252b5132 3420 {
bf890a93
IT
3421 { "prefetch", { Mb }, 0 },
3422 { "prefetchw", { Mb }, 0 },
3423 { "prefetchwt1", { Mb }, 0 },
3424 { "prefetch", { Mb }, 0 },
3425 { "prefetch", { Mb }, 0 },
3426 { "prefetch", { Mb }, 0 },
3427 { "prefetch", { Mb }, 0 },
3428 { "prefetch", { Mb }, 0 },
252b5132 3429 },
1ceb70f8 3430 /* REG_0F18 */
252b5132 3431 {
1ceb70f8
L
3432 { MOD_TABLE (MOD_0F18_REG_0) },
3433 { MOD_TABLE (MOD_0F18_REG_1) },
3434 { MOD_TABLE (MOD_0F18_REG_2) },
3435 { MOD_TABLE (MOD_0F18_REG_3) },
d7189fa5
RM
3436 { MOD_TABLE (MOD_0F18_REG_4) },
3437 { MOD_TABLE (MOD_0F18_REG_5) },
3438 { MOD_TABLE (MOD_0F18_REG_6) },
3439 { MOD_TABLE (MOD_0F18_REG_7) },
252b5132 3440 },
f8687e93 3441 /* REG_0F1C_P_0_MOD_0 */
c48935d7
IT
3442 {
3443 { "cldemote", { Mb }, 0 },
3444 { "nopQ", { Ev }, 0 },
3445 { "nopQ", { Ev }, 0 },
3446 { "nopQ", { Ev }, 0 },
3447 { "nopQ", { Ev }, 0 },
3448 { "nopQ", { Ev }, 0 },
3449 { "nopQ", { Ev }, 0 },
3450 { "nopQ", { Ev }, 0 },
3451 },
f8687e93 3452 /* REG_0F1E_P_1_MOD_3 */
603555e5
L
3453 {
3454 { "nopQ", { Ev }, 0 },
3455 { "rdsspK", { Rdq }, PREFIX_OPCODE },
3456 { "nopQ", { Ev }, 0 },
3457 { "nopQ", { Ev }, 0 },
3458 { "nopQ", { Ev }, 0 },
3459 { "nopQ", { Ev }, 0 },
3460 { "nopQ", { Ev }, 0 },
f8687e93 3461 { RM_TABLE (RM_0F1E_P_1_MOD_3_REG_7) },
603555e5 3462 },
1ceb70f8 3463 /* REG_0F71 */
a6bd098c 3464 {
592d1631
L
3465 { Bad_Opcode },
3466 { Bad_Opcode },
1ceb70f8 3467 { MOD_TABLE (MOD_0F71_REG_2) },
592d1631 3468 { Bad_Opcode },
1ceb70f8 3469 { MOD_TABLE (MOD_0F71_REG_4) },
592d1631 3470 { Bad_Opcode },
1ceb70f8 3471 { MOD_TABLE (MOD_0F71_REG_6) },
a6bd098c 3472 },
1ceb70f8 3473 /* REG_0F72 */
a6bd098c 3474 {
592d1631
L
3475 { Bad_Opcode },
3476 { Bad_Opcode },
1ceb70f8 3477 { MOD_TABLE (MOD_0F72_REG_2) },
592d1631 3478 { Bad_Opcode },
1ceb70f8 3479 { MOD_TABLE (MOD_0F72_REG_4) },
592d1631 3480 { Bad_Opcode },
1ceb70f8 3481 { MOD_TABLE (MOD_0F72_REG_6) },
a6bd098c 3482 },
1ceb70f8 3483 /* REG_0F73 */
252b5132 3484 {
592d1631
L
3485 { Bad_Opcode },
3486 { Bad_Opcode },
1ceb70f8
L
3487 { MOD_TABLE (MOD_0F73_REG_2) },
3488 { MOD_TABLE (MOD_0F73_REG_3) },
592d1631
L
3489 { Bad_Opcode },
3490 { Bad_Opcode },
1ceb70f8
L
3491 { MOD_TABLE (MOD_0F73_REG_6) },
3492 { MOD_TABLE (MOD_0F73_REG_7) },
252b5132 3493 },
1ceb70f8 3494 /* REG_0FA6 */
252b5132 3495 {
bf890a93
IT
3496 { "montmul", { { OP_0f07, 0 } }, 0 },
3497 { "xsha1", { { OP_0f07, 0 } }, 0 },
3498 { "xsha256", { { OP_0f07, 0 } }, 0 },
4e7d34a6 3499 },
1ceb70f8 3500 /* REG_0FA7 */
4e7d34a6 3501 {
bf890a93
IT
3502 { "xstore-rng", { { OP_0f07, 0 } }, 0 },
3503 { "xcrypt-ecb", { { OP_0f07, 0 } }, 0 },
3504 { "xcrypt-cbc", { { OP_0f07, 0 } }, 0 },
3505 { "xcrypt-ctr", { { OP_0f07, 0 } }, 0 },
3506 { "xcrypt-cfb", { { OP_0f07, 0 } }, 0 },
3507 { "xcrypt-ofb", { { OP_0f07, 0 } }, 0 },
4e7d34a6 3508 },
1ceb70f8 3509 /* REG_0FAE */
4e7d34a6 3510 {
1ceb70f8
L
3511 { MOD_TABLE (MOD_0FAE_REG_0) },
3512 { MOD_TABLE (MOD_0FAE_REG_1) },
3513 { MOD_TABLE (MOD_0FAE_REG_2) },
3514 { MOD_TABLE (MOD_0FAE_REG_3) },
475a2301 3515 { MOD_TABLE (MOD_0FAE_REG_4) },
1ceb70f8
L
3516 { MOD_TABLE (MOD_0FAE_REG_5) },
3517 { MOD_TABLE (MOD_0FAE_REG_6) },
3518 { MOD_TABLE (MOD_0FAE_REG_7) },
252b5132 3519 },
1ceb70f8 3520 /* REG_0FBA */
252b5132 3521 {
592d1631
L
3522 { Bad_Opcode },
3523 { Bad_Opcode },
3524 { Bad_Opcode },
3525 { Bad_Opcode },
bf890a93
IT
3526 { "btQ", { Ev, Ib }, 0 },
3527 { "btsQ", { Evh1, Ib }, 0 },
3528 { "btrQ", { Evh1, Ib }, 0 },
3529 { "btcQ", { Evh1, Ib }, 0 },
c608c12e 3530 },
1ceb70f8 3531 /* REG_0FC7 */
c608c12e 3532 {
592d1631 3533 { Bad_Opcode },
bf890a93 3534 { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } }, 0 },
592d1631 3535 { Bad_Opcode },
963f3586
IT
3536 { MOD_TABLE (MOD_0FC7_REG_3) },
3537 { MOD_TABLE (MOD_0FC7_REG_4) },
3538 { MOD_TABLE (MOD_0FC7_REG_5) },
1ceb70f8
L
3539 { MOD_TABLE (MOD_0FC7_REG_6) },
3540 { MOD_TABLE (MOD_0FC7_REG_7) },
252b5132 3541 },
592a252b 3542 /* REG_VEX_0F71 */
c0f3af97 3543 {
592d1631
L
3544 { Bad_Opcode },
3545 { Bad_Opcode },
592a252b 3546 { MOD_TABLE (MOD_VEX_0F71_REG_2) },
592d1631 3547 { Bad_Opcode },
592a252b 3548 { MOD_TABLE (MOD_VEX_0F71_REG_4) },
592d1631 3549 { Bad_Opcode },
592a252b 3550 { MOD_TABLE (MOD_VEX_0F71_REG_6) },
c0f3af97 3551 },
592a252b 3552 /* REG_VEX_0F72 */
c0f3af97 3553 {
592d1631
L
3554 { Bad_Opcode },
3555 { Bad_Opcode },
592a252b 3556 { MOD_TABLE (MOD_VEX_0F72_REG_2) },
592d1631 3557 { Bad_Opcode },
592a252b 3558 { MOD_TABLE (MOD_VEX_0F72_REG_4) },
592d1631 3559 { Bad_Opcode },
592a252b 3560 { MOD_TABLE (MOD_VEX_0F72_REG_6) },
c0f3af97 3561 },
592a252b 3562 /* REG_VEX_0F73 */
c0f3af97 3563 {
592d1631
L
3564 { Bad_Opcode },
3565 { Bad_Opcode },
592a252b
L
3566 { MOD_TABLE (MOD_VEX_0F73_REG_2) },
3567 { MOD_TABLE (MOD_VEX_0F73_REG_3) },
592d1631
L
3568 { Bad_Opcode },
3569 { Bad_Opcode },
592a252b
L
3570 { MOD_TABLE (MOD_VEX_0F73_REG_6) },
3571 { MOD_TABLE (MOD_VEX_0F73_REG_7) },
c0f3af97 3572 },
592a252b 3573 /* REG_VEX_0FAE */
c0f3af97 3574 {
592d1631
L
3575 { Bad_Opcode },
3576 { Bad_Opcode },
592a252b
L
3577 { MOD_TABLE (MOD_VEX_0FAE_REG_2) },
3578 { MOD_TABLE (MOD_VEX_0FAE_REG_3) },
c0f3af97 3579 },
f12dc422
L
3580 /* REG_VEX_0F38F3 */
3581 {
3582 { Bad_Opcode },
3583 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1) },
3584 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2) },
3585 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3) },
3586 },
f88c9eb0
SP
3587 /* REG_XOP_LWPCB */
3588 {
bf890a93
IT
3589 { "llwpcb", { { OP_LWPCB_E, 0 } }, 0 },
3590 { "slwpcb", { { OP_LWPCB_E, 0 } }, 0 },
f88c9eb0
SP
3591 },
3592 /* REG_XOP_LWP */
3593 {
c1dc7af5
JB
3594 { "lwpins", { { OP_LWP_E, 0 }, Ed, Id }, 0 },
3595 { "lwpval", { { OP_LWP_E, 0 }, Ed, Id }, 0 },
f88c9eb0 3596 },
2a2a0f38
QN
3597 /* REG_XOP_TBM_01 */
3598 {
3599 { Bad_Opcode },
c1dc7af5
JB
3600 { "blcfill", { { OP_LWP_E, 0 }, Edq }, 0 },
3601 { "blsfill", { { OP_LWP_E, 0 }, Edq }, 0 },
3602 { "blcs", { { OP_LWP_E, 0 }, Edq }, 0 },
3603 { "tzmsk", { { OP_LWP_E, 0 }, Edq }, 0 },
3604 { "blcic", { { OP_LWP_E, 0 }, Edq }, 0 },
3605 { "blsic", { { OP_LWP_E, 0 }, Edq }, 0 },
3606 { "t1mskc", { { OP_LWP_E, 0 }, Edq }, 0 },
2a2a0f38
QN
3607 },
3608 /* REG_XOP_TBM_02 */
3609 {
3610 { Bad_Opcode },
c1dc7af5 3611 { "blcmsk", { { OP_LWP_E, 0 }, Edq }, 0 },
2a2a0f38
QN
3612 { Bad_Opcode },
3613 { Bad_Opcode },
3614 { Bad_Opcode },
3615 { Bad_Opcode },
c1dc7af5 3616 { "blci", { { OP_LWP_E, 0 }, Edq }, 0 },
2a2a0f38 3617 },
ad692897
L
3618
3619#include "i386-dis-evex-reg.h"
4e7d34a6
L
3620};
3621
1ceb70f8
L
3622static const struct dis386 prefix_table[][4] = {
3623 /* PREFIX_90 */
252b5132 3624 {
bf890a93
IT
3625 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
3626 { "pause", { XX }, 0 },
3627 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
507bd325 3628 { NULL, { { NULL, 0 } }, PREFIX_IGNORED }
0f10071e 3629 },
4e7d34a6 3630
f8687e93 3631 /* PREFIX_0F01_REG_5_MOD_0 */
603555e5
L
3632 {
3633 { Bad_Opcode },
3634 { "rstorssp", { Mq }, PREFIX_OPCODE },
3635 },
3636
f8687e93 3637 /* PREFIX_0F01_REG_5_MOD_3_RM_0 */
603555e5
L
3638 {
3639 { Bad_Opcode },
2234eee6 3640 { "setssbsy", { Skip_MODRM }, PREFIX_OPCODE },
603555e5
L
3641 },
3642
f8687e93 3643 /* PREFIX_0F01_REG_5_MOD_3_RM_2 */
603555e5
L
3644 {
3645 { Bad_Opcode },
c2f76402 3646 { "saveprevssp", { Skip_MODRM }, PREFIX_OPCODE },
603555e5
L
3647 },
3648
267b8516
JB
3649 /* PREFIX_0F01_REG_7_MOD_3_RM_2 */
3650 {
3651 { "monitorx", { { OP_Monitor, 0 } }, 0 },
142861df 3652 { "mcommit", { Skip_MODRM }, 0 },
267b8516
JB
3653 },
3654
3655 /* PREFIX_0F01_REG_7_MOD_3_RM_3 */
3656 {
7abb8d81 3657 { "mwaitx", { { OP_Mwait, eBX_reg } }, 0 },
267b8516
JB
3658 },
3659
3233d7d0
IT
3660 /* PREFIX_0F09 */
3661 {
3662 { "wbinvd", { XX }, 0 },
3663 { "wbnoinvd", { XX }, 0 },
3664 },
3665
1ceb70f8 3666 /* PREFIX_0F10 */
cc0ec051 3667 {
507bd325
L
3668 { "movups", { XM, EXx }, PREFIX_OPCODE },
3669 { "movss", { XM, EXd }, PREFIX_OPCODE },
3670 { "movupd", { XM, EXx }, PREFIX_OPCODE },
3671 { "movsd", { XM, EXq }, PREFIX_OPCODE },
30d1c836 3672 },
4e7d34a6 3673
1ceb70f8 3674 /* PREFIX_0F11 */
30d1c836 3675 {
507bd325
L
3676 { "movups", { EXxS, XM }, PREFIX_OPCODE },
3677 { "movss", { EXdS, XM }, PREFIX_OPCODE },
3678 { "movupd", { EXxS, XM }, PREFIX_OPCODE },
3679 { "movsd", { EXqS, XM }, PREFIX_OPCODE },
4e7d34a6 3680 },
252b5132 3681
1ceb70f8 3682 /* PREFIX_0F12 */
c608c12e 3683 {
1ceb70f8 3684 { MOD_TABLE (MOD_0F12_PREFIX_0) },
507bd325
L
3685 { "movsldup", { XM, EXx }, PREFIX_OPCODE },
3686 { "movlpd", { XM, EXq }, PREFIX_OPCODE },
3687 { "movddup", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3688 },
4e7d34a6 3689
1ceb70f8 3690 /* PREFIX_0F16 */
c608c12e 3691 {
1ceb70f8 3692 { MOD_TABLE (MOD_0F16_PREFIX_0) },
507bd325
L
3693 { "movshdup", { XM, EXx }, PREFIX_OPCODE },
3694 { "movhpd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3695 },
4e7d34a6 3696
7e8b059b
L
3697 /* PREFIX_0F1A */
3698 {
3699 { MOD_TABLE (MOD_0F1A_PREFIX_0) },
bf890a93
IT
3700 { "bndcl", { Gbnd, Ev_bnd }, 0 },
3701 { "bndmov", { Gbnd, Ebnd }, 0 },
3702 { "bndcu", { Gbnd, Ev_bnd }, 0 },
7e8b059b
L
3703 },
3704
3705 /* PREFIX_0F1B */
3706 {
3707 { MOD_TABLE (MOD_0F1B_PREFIX_0) },
3708 { MOD_TABLE (MOD_0F1B_PREFIX_1) },
9f79e886 3709 { "bndmov", { EbndS, Gbnd }, 0 },
bf890a93 3710 { "bndcn", { Gbnd, Ev_bnd }, 0 },
7e8b059b
L
3711 },
3712
c48935d7
IT
3713 /* PREFIX_0F1C */
3714 {
3715 { MOD_TABLE (MOD_0F1C_PREFIX_0) },
3716 { "nopQ", { Ev }, PREFIX_OPCODE },
3717 { "nopQ", { Ev }, PREFIX_OPCODE },
3718 { "nopQ", { Ev }, PREFIX_OPCODE },
3719 },
3720
603555e5
L
3721 /* PREFIX_0F1E */
3722 {
3723 { "nopQ", { Ev }, PREFIX_OPCODE },
3724 { MOD_TABLE (MOD_0F1E_PREFIX_1) },
3725 { "nopQ", { Ev }, PREFIX_OPCODE },
3726 { "nopQ", { Ev }, PREFIX_OPCODE },
3727 },
3728
1ceb70f8 3729 /* PREFIX_0F2A */
c608c12e 3730 {
507bd325 3731 { "cvtpi2ps", { XM, EMCq }, PREFIX_OPCODE },
e1a1babd 3732 { "cvtsi2ss%LQ", { XM, Edq }, PREFIX_OPCODE },
507bd325 3733 { "cvtpi2pd", { XM, EMCq }, PREFIX_OPCODE },
e1a1babd 3734 { "cvtsi2sd%LQ", { XM, Edq }, 0 },
c608c12e 3735 },
4e7d34a6 3736
1ceb70f8 3737 /* PREFIX_0F2B */
c608c12e 3738 {
75c135a8
L
3739 { MOD_TABLE (MOD_0F2B_PREFIX_0) },
3740 { MOD_TABLE (MOD_0F2B_PREFIX_1) },
3741 { MOD_TABLE (MOD_0F2B_PREFIX_2) },
3742 { MOD_TABLE (MOD_0F2B_PREFIX_3) },
c608c12e 3743 },
4e7d34a6 3744
1ceb70f8 3745 /* PREFIX_0F2C */
c608c12e 3746 {
507bd325 3747 { "cvttps2pi", { MXC, EXq }, PREFIX_OPCODE },
e1a1babd 3748 { "cvttss2si", { Gdq, EXd }, PREFIX_OPCODE },
507bd325 3749 { "cvttpd2pi", { MXC, EXx }, PREFIX_OPCODE },
e1a1babd 3750 { "cvttsd2si", { Gdq, EXq }, PREFIX_OPCODE },
c608c12e 3751 },
4e7d34a6 3752
1ceb70f8 3753 /* PREFIX_0F2D */
c608c12e 3754 {
507bd325 3755 { "cvtps2pi", { MXC, EXq }, PREFIX_OPCODE },
e1a1babd 3756 { "cvtss2si", { Gdq, EXd }, PREFIX_OPCODE },
507bd325 3757 { "cvtpd2pi", { MXC, EXx }, PREFIX_OPCODE },
e1a1babd 3758 { "cvtsd2si", { Gdq, EXq }, PREFIX_OPCODE },
c608c12e 3759 },
4e7d34a6 3760
1ceb70f8 3761 /* PREFIX_0F2E */
c608c12e 3762 {
bf890a93 3763 { "ucomiss",{ XM, EXd }, 0 },
592d1631 3764 { Bad_Opcode },
bf890a93 3765 { "ucomisd",{ XM, EXq }, 0 },
c608c12e 3766 },
4e7d34a6 3767
1ceb70f8 3768 /* PREFIX_0F2F */
c608c12e 3769 {
bf890a93 3770 { "comiss", { XM, EXd }, 0 },
592d1631 3771 { Bad_Opcode },
bf890a93 3772 { "comisd", { XM, EXq }, 0 },
c608c12e 3773 },
4e7d34a6 3774
1ceb70f8 3775 /* PREFIX_0F51 */
c608c12e 3776 {
507bd325
L
3777 { "sqrtps", { XM, EXx }, PREFIX_OPCODE },
3778 { "sqrtss", { XM, EXd }, PREFIX_OPCODE },
3779 { "sqrtpd", { XM, EXx }, PREFIX_OPCODE },
3780 { "sqrtsd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3781 },
4e7d34a6 3782
1ceb70f8 3783 /* PREFIX_0F52 */
c608c12e 3784 {
507bd325
L
3785 { "rsqrtps",{ XM, EXx }, PREFIX_OPCODE },
3786 { "rsqrtss",{ XM, EXd }, PREFIX_OPCODE },
c608c12e 3787 },
4e7d34a6 3788
1ceb70f8 3789 /* PREFIX_0F53 */
c608c12e 3790 {
507bd325
L
3791 { "rcpps", { XM, EXx }, PREFIX_OPCODE },
3792 { "rcpss", { XM, EXd }, PREFIX_OPCODE },
c608c12e 3793 },
4e7d34a6 3794
1ceb70f8 3795 /* PREFIX_0F58 */
c608c12e 3796 {
507bd325
L
3797 { "addps", { XM, EXx }, PREFIX_OPCODE },
3798 { "addss", { XM, EXd }, PREFIX_OPCODE },
3799 { "addpd", { XM, EXx }, PREFIX_OPCODE },
3800 { "addsd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3801 },
4e7d34a6 3802
1ceb70f8 3803 /* PREFIX_0F59 */
c608c12e 3804 {
507bd325
L
3805 { "mulps", { XM, EXx }, PREFIX_OPCODE },
3806 { "mulss", { XM, EXd }, PREFIX_OPCODE },
3807 { "mulpd", { XM, EXx }, PREFIX_OPCODE },
3808 { "mulsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3809 },
4e7d34a6 3810
1ceb70f8 3811 /* PREFIX_0F5A */
041bd2e0 3812 {
507bd325
L
3813 { "cvtps2pd", { XM, EXq }, PREFIX_OPCODE },
3814 { "cvtss2sd", { XM, EXd }, PREFIX_OPCODE },
3815 { "cvtpd2ps", { XM, EXx }, PREFIX_OPCODE },
3816 { "cvtsd2ss", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3817 },
4e7d34a6 3818
1ceb70f8 3819 /* PREFIX_0F5B */
041bd2e0 3820 {
507bd325
L
3821 { "cvtdq2ps", { XM, EXx }, PREFIX_OPCODE },
3822 { "cvttps2dq", { XM, EXx }, PREFIX_OPCODE },
3823 { "cvtps2dq", { XM, EXx }, PREFIX_OPCODE },
041bd2e0 3824 },
4e7d34a6 3825
1ceb70f8 3826 /* PREFIX_0F5C */
041bd2e0 3827 {
507bd325
L
3828 { "subps", { XM, EXx }, PREFIX_OPCODE },
3829 { "subss", { XM, EXd }, PREFIX_OPCODE },
3830 { "subpd", { XM, EXx }, PREFIX_OPCODE },
3831 { "subsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3832 },
4e7d34a6 3833
1ceb70f8 3834 /* PREFIX_0F5D */
041bd2e0 3835 {
507bd325
L
3836 { "minps", { XM, EXx }, PREFIX_OPCODE },
3837 { "minss", { XM, EXd }, PREFIX_OPCODE },
3838 { "minpd", { XM, EXx }, PREFIX_OPCODE },
3839 { "minsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3840 },
4e7d34a6 3841
1ceb70f8 3842 /* PREFIX_0F5E */
041bd2e0 3843 {
507bd325
L
3844 { "divps", { XM, EXx }, PREFIX_OPCODE },
3845 { "divss", { XM, EXd }, PREFIX_OPCODE },
3846 { "divpd", { XM, EXx }, PREFIX_OPCODE },
3847 { "divsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3848 },
4e7d34a6 3849
1ceb70f8 3850 /* PREFIX_0F5F */
041bd2e0 3851 {
507bd325
L
3852 { "maxps", { XM, EXx }, PREFIX_OPCODE },
3853 { "maxss", { XM, EXd }, PREFIX_OPCODE },
3854 { "maxpd", { XM, EXx }, PREFIX_OPCODE },
3855 { "maxsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3856 },
4e7d34a6 3857
1ceb70f8 3858 /* PREFIX_0F60 */
041bd2e0 3859 {
507bd325 3860 { "punpcklbw",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3861 { Bad_Opcode },
507bd325 3862 { "punpcklbw",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3863 },
4e7d34a6 3864
1ceb70f8 3865 /* PREFIX_0F61 */
041bd2e0 3866 {
507bd325 3867 { "punpcklwd",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3868 { Bad_Opcode },
507bd325 3869 { "punpcklwd",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3870 },
4e7d34a6 3871
1ceb70f8 3872 /* PREFIX_0F62 */
041bd2e0 3873 {
507bd325 3874 { "punpckldq",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3875 { Bad_Opcode },
507bd325 3876 { "punpckldq",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3877 },
4e7d34a6 3878
1ceb70f8 3879 /* PREFIX_0F6C */
041bd2e0 3880 {
592d1631
L
3881 { Bad_Opcode },
3882 { Bad_Opcode },
507bd325 3883 { "punpcklqdq", { XM, EXx }, PREFIX_OPCODE },
0f17484f 3884 },
4e7d34a6 3885
1ceb70f8 3886 /* PREFIX_0F6D */
0f17484f 3887 {
592d1631
L
3888 { Bad_Opcode },
3889 { Bad_Opcode },
507bd325 3890 { "punpckhqdq", { XM, EXx }, PREFIX_OPCODE },
041bd2e0 3891 },
4e7d34a6 3892
1ceb70f8 3893 /* PREFIX_0F6F */
ca164297 3894 {
507bd325
L
3895 { "movq", { MX, EM }, PREFIX_OPCODE },
3896 { "movdqu", { XM, EXx }, PREFIX_OPCODE },
3897 { "movdqa", { XM, EXx }, PREFIX_OPCODE },
ca164297 3898 },
4e7d34a6 3899
1ceb70f8 3900 /* PREFIX_0F70 */
4e7d34a6 3901 {
507bd325
L
3902 { "pshufw", { MX, EM, Ib }, PREFIX_OPCODE },
3903 { "pshufhw",{ XM, EXx, Ib }, PREFIX_OPCODE },
3904 { "pshufd", { XM, EXx, Ib }, PREFIX_OPCODE },
3905 { "pshuflw",{ XM, EXx, Ib }, PREFIX_OPCODE },
4e7d34a6
L
3906 },
3907
92fddf8e
L
3908 /* PREFIX_0F73_REG_3 */
3909 {
592d1631
L
3910 { Bad_Opcode },
3911 { Bad_Opcode },
bf890a93 3912 { "psrldq", { XS, Ib }, 0 },
92fddf8e
L
3913 },
3914
3915 /* PREFIX_0F73_REG_7 */
3916 {
592d1631
L
3917 { Bad_Opcode },
3918 { Bad_Opcode },
bf890a93 3919 { "pslldq", { XS, Ib }, 0 },
92fddf8e
L
3920 },
3921
1ceb70f8 3922 /* PREFIX_0F78 */
4e7d34a6 3923 {
bf890a93 3924 {"vmread", { Em, Gm }, 0 },
592d1631 3925 { Bad_Opcode },
bf890a93
IT
3926 {"extrq", { XS, Ib, Ib }, 0 },
3927 {"insertq", { XM, XS, Ib, Ib }, 0 },
4e7d34a6
L
3928 },
3929
1ceb70f8 3930 /* PREFIX_0F79 */
4e7d34a6 3931 {
bf890a93 3932 {"vmwrite", { Gm, Em }, 0 },
592d1631 3933 { Bad_Opcode },
bf890a93
IT
3934 {"extrq", { XM, XS }, 0 },
3935 {"insertq", { XM, XS }, 0 },
4e7d34a6
L
3936 },
3937
1ceb70f8 3938 /* PREFIX_0F7C */
ca164297 3939 {
592d1631
L
3940 { Bad_Opcode },
3941 { Bad_Opcode },
507bd325
L
3942 { "haddpd", { XM, EXx }, PREFIX_OPCODE },
3943 { "haddps", { XM, EXx }, PREFIX_OPCODE },
ca164297 3944 },
4e7d34a6 3945
1ceb70f8 3946 /* PREFIX_0F7D */
ca164297 3947 {
592d1631
L
3948 { Bad_Opcode },
3949 { Bad_Opcode },
507bd325
L
3950 { "hsubpd", { XM, EXx }, PREFIX_OPCODE },
3951 { "hsubps", { XM, EXx }, PREFIX_OPCODE },
ca164297 3952 },
4e7d34a6 3953
1ceb70f8 3954 /* PREFIX_0F7E */
ca164297 3955 {
507bd325
L
3956 { "movK", { Edq, MX }, PREFIX_OPCODE },
3957 { "movq", { XM, EXq }, PREFIX_OPCODE },
3958 { "movK", { Edq, XM }, PREFIX_OPCODE },
ca164297 3959 },
4e7d34a6 3960
1ceb70f8 3961 /* PREFIX_0F7F */
ca164297 3962 {
507bd325
L
3963 { "movq", { EMS, MX }, PREFIX_OPCODE },
3964 { "movdqu", { EXxS, XM }, PREFIX_OPCODE },
3965 { "movdqa", { EXxS, XM }, PREFIX_OPCODE },
ca164297 3966 },
4e7d34a6 3967
f8687e93 3968 /* PREFIX_0FAE_REG_0_MOD_3 */
c7b8aa3a
L
3969 {
3970 { Bad_Opcode },
bf890a93 3971 { "rdfsbase", { Ev }, 0 },
c7b8aa3a
L
3972 },
3973
f8687e93 3974 /* PREFIX_0FAE_REG_1_MOD_3 */
c7b8aa3a
L
3975 {
3976 { Bad_Opcode },
bf890a93 3977 { "rdgsbase", { Ev }, 0 },
c7b8aa3a
L
3978 },
3979
f8687e93 3980 /* PREFIX_0FAE_REG_2_MOD_3 */
c7b8aa3a
L
3981 {
3982 { Bad_Opcode },
bf890a93 3983 { "wrfsbase", { Ev }, 0 },
c7b8aa3a
L
3984 },
3985
f8687e93 3986 /* PREFIX_0FAE_REG_3_MOD_3 */
c7b8aa3a
L
3987 {
3988 { Bad_Opcode },
bf890a93 3989 { "wrgsbase", { Ev }, 0 },
c7b8aa3a
L
3990 },
3991
f8687e93 3992 /* PREFIX_0FAE_REG_4_MOD_0 */
6b40c462
L
3993 {
3994 { "xsave", { FXSAVE }, 0 },
3995 { "ptwrite%LQ", { Edq }, 0 },
3996 },
3997
f8687e93 3998 /* PREFIX_0FAE_REG_4_MOD_3 */
6b40c462
L
3999 {
4000 { Bad_Opcode },
4001 { "ptwrite%LQ", { Edq }, 0 },
4002 },
4003
f8687e93 4004 /* PREFIX_0FAE_REG_5_MOD_0 */
603555e5
L
4005 {
4006 { "xrstor", { FXSAVE }, PREFIX_OPCODE },
2234eee6
L
4007 },
4008
f8687e93 4009 /* PREFIX_0FAE_REG_5_MOD_3 */
2234eee6
L
4010 {
4011 { "lfence", { Skip_MODRM }, 0 },
4012 { "incsspK", { Rdq }, PREFIX_OPCODE },
603555e5
L
4013 },
4014
f8687e93 4015 /* PREFIX_0FAE_REG_6_MOD_0 */
c5e7287a 4016 {
603555e5
L
4017 { "xsaveopt", { FXSAVE }, PREFIX_OPCODE },
4018 { "clrssbsy", { Mq }, PREFIX_OPCODE },
4019 { "clwb", { Mb }, PREFIX_OPCODE },
c5e7287a
IT
4020 },
4021
f8687e93 4022 /* PREFIX_0FAE_REG_6_MOD_3 */
de89d0a3 4023 {
f8687e93 4024 { RM_TABLE (RM_0FAE_REG_6_MOD_3_P_0) },
de89d0a3 4025 { "umonitor", { Eva }, PREFIX_OPCODE },
ae1d3843
L
4026 { "tpause", { Edq }, PREFIX_OPCODE },
4027 { "umwait", { Edq }, PREFIX_OPCODE },
de89d0a3
IT
4028 },
4029
f8687e93 4030 /* PREFIX_0FAE_REG_7_MOD_0 */
963f3586 4031 {
bf890a93 4032 { "clflush", { Mb }, 0 },
963f3586 4033 { Bad_Opcode },
bf890a93 4034 { "clflushopt", { Mb }, 0 },
963f3586
IT
4035 },
4036
1ceb70f8 4037 /* PREFIX_0FB8 */
ca164297 4038 {
592d1631 4039 { Bad_Opcode },
bf890a93 4040 { "popcntS", { Gv, Ev }, 0 },
ca164297 4041 },
4e7d34a6 4042
f12dc422
L
4043 /* PREFIX_0FBC */
4044 {
bf890a93
IT
4045 { "bsfS", { Gv, Ev }, 0 },
4046 { "tzcntS", { Gv, Ev }, 0 },
4047 { "bsfS", { Gv, Ev }, 0 },
f12dc422
L
4048 },
4049
1ceb70f8 4050 /* PREFIX_0FBD */
050dfa73 4051 {
bf890a93
IT
4052 { "bsrS", { Gv, Ev }, 0 },
4053 { "lzcntS", { Gv, Ev }, 0 },
4054 { "bsrS", { Gv, Ev }, 0 },
050dfa73
MM
4055 },
4056
1ceb70f8 4057 /* PREFIX_0FC2 */
050dfa73 4058 {
507bd325
L
4059 { "cmpps", { XM, EXx, CMP }, PREFIX_OPCODE },
4060 { "cmpss", { XM, EXd, CMP }, PREFIX_OPCODE },
4061 { "cmppd", { XM, EXx, CMP }, PREFIX_OPCODE },
4062 { "cmpsd", { XM, EXq, CMP }, PREFIX_OPCODE },
050dfa73 4063 },
246c51aa 4064
f8687e93 4065 /* PREFIX_0FC3_MOD_0 */
4ee52178 4066 {
e1a1babd 4067 { "movntiS", { Edq, Gdq }, PREFIX_OPCODE },
4ee52178
L
4068 },
4069
f8687e93 4070 /* PREFIX_0FC7_REG_6_MOD_0 */
92fddf8e 4071 {
bf890a93
IT
4072 { "vmptrld",{ Mq }, 0 },
4073 { "vmxon", { Mq }, 0 },
4074 { "vmclear",{ Mq }, 0 },
92fddf8e
L
4075 },
4076
f8687e93 4077 /* PREFIX_0FC7_REG_6_MOD_3 */
f24bcbaa
L
4078 {
4079 { "rdrand", { Ev }, 0 },
4080 { Bad_Opcode },
4081 { "rdrand", { Ev }, 0 }
4082 },
4083
f8687e93 4084 /* PREFIX_0FC7_REG_7_MOD_3 */
f24bcbaa
L
4085 {
4086 { "rdseed", { Ev }, 0 },
8bc52696 4087 { "rdpid", { Em }, 0 },
f24bcbaa
L
4088 { "rdseed", { Ev }, 0 },
4089 },
4090
1ceb70f8 4091 /* PREFIX_0FD0 */
050dfa73 4092 {
592d1631
L
4093 { Bad_Opcode },
4094 { Bad_Opcode },
bf890a93
IT
4095 { "addsubpd", { XM, EXx }, 0 },
4096 { "addsubps", { XM, EXx }, 0 },
246c51aa 4097 },
050dfa73 4098
1ceb70f8 4099 /* PREFIX_0FD6 */
050dfa73 4100 {
592d1631 4101 { Bad_Opcode },
bf890a93
IT
4102 { "movq2dq",{ XM, MS }, 0 },
4103 { "movq", { EXqS, XM }, 0 },
4104 { "movdq2q",{ MX, XS }, 0 },
050dfa73
MM
4105 },
4106
1ceb70f8 4107 /* PREFIX_0FE6 */
7918206c 4108 {
592d1631 4109 { Bad_Opcode },
507bd325
L
4110 { "cvtdq2pd", { XM, EXq }, PREFIX_OPCODE },
4111 { "cvttpd2dq", { XM, EXx }, PREFIX_OPCODE },
4112 { "cvtpd2dq", { XM, EXx }, PREFIX_OPCODE },
7918206c 4113 },
8b38ad71 4114
1ceb70f8 4115 /* PREFIX_0FE7 */
8b38ad71 4116 {
507bd325 4117 { "movntq", { Mq, MX }, PREFIX_OPCODE },
592d1631 4118 { Bad_Opcode },
75c135a8 4119 { MOD_TABLE (MOD_0FE7_PREFIX_2) },
4e7d34a6
L
4120 },
4121
1ceb70f8 4122 /* PREFIX_0FF0 */
4e7d34a6 4123 {
592d1631
L
4124 { Bad_Opcode },
4125 { Bad_Opcode },
4126 { Bad_Opcode },
1ceb70f8 4127 { MOD_TABLE (MOD_0FF0_PREFIX_3) },
4e7d34a6
L
4128 },
4129
1ceb70f8 4130 /* PREFIX_0FF7 */
4e7d34a6 4131 {
507bd325 4132 { "maskmovq", { MX, MS }, PREFIX_OPCODE },
592d1631 4133 { Bad_Opcode },
507bd325 4134 { "maskmovdqu", { XM, XS }, PREFIX_OPCODE },
8b38ad71 4135 },
42903f7f 4136
1ceb70f8 4137 /* PREFIX_0F3810 */
42903f7f 4138 {
592d1631
L
4139 { Bad_Opcode },
4140 { Bad_Opcode },
507bd325 4141 { "pblendvb", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4142 },
4143
1ceb70f8 4144 /* PREFIX_0F3814 */
42903f7f 4145 {
592d1631
L
4146 { Bad_Opcode },
4147 { Bad_Opcode },
507bd325 4148 { "blendvps", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4149 },
4150
1ceb70f8 4151 /* PREFIX_0F3815 */
42903f7f 4152 {
592d1631
L
4153 { Bad_Opcode },
4154 { Bad_Opcode },
507bd325 4155 { "blendvpd", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4156 },
4157
1ceb70f8 4158 /* PREFIX_0F3817 */
42903f7f 4159 {
592d1631
L
4160 { Bad_Opcode },
4161 { Bad_Opcode },
507bd325 4162 { "ptest", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4163 },
4164
1ceb70f8 4165 /* PREFIX_0F3820 */
42903f7f 4166 {
592d1631
L
4167 { Bad_Opcode },
4168 { Bad_Opcode },
507bd325 4169 { "pmovsxbw", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4170 },
4171
1ceb70f8 4172 /* PREFIX_0F3821 */
42903f7f 4173 {
592d1631
L
4174 { Bad_Opcode },
4175 { Bad_Opcode },
507bd325 4176 { "pmovsxbd", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4177 },
4178
1ceb70f8 4179 /* PREFIX_0F3822 */
42903f7f 4180 {
592d1631
L
4181 { Bad_Opcode },
4182 { Bad_Opcode },
507bd325 4183 { "pmovsxbq", { XM, EXw }, PREFIX_OPCODE },
42903f7f
L
4184 },
4185
1ceb70f8 4186 /* PREFIX_0F3823 */
42903f7f 4187 {
592d1631
L
4188 { Bad_Opcode },
4189 { Bad_Opcode },
507bd325 4190 { "pmovsxwd", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4191 },
4192
1ceb70f8 4193 /* PREFIX_0F3824 */
42903f7f 4194 {
592d1631
L
4195 { Bad_Opcode },
4196 { Bad_Opcode },
507bd325 4197 { "pmovsxwq", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4198 },
4199
1ceb70f8 4200 /* PREFIX_0F3825 */
42903f7f 4201 {
592d1631
L
4202 { Bad_Opcode },
4203 { Bad_Opcode },
507bd325 4204 { "pmovsxdq", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4205 },
4206
1ceb70f8 4207 /* PREFIX_0F3828 */
42903f7f 4208 {
592d1631
L
4209 { Bad_Opcode },
4210 { Bad_Opcode },
507bd325 4211 { "pmuldq", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4212 },
4213
1ceb70f8 4214 /* PREFIX_0F3829 */
42903f7f 4215 {
592d1631
L
4216 { Bad_Opcode },
4217 { Bad_Opcode },
507bd325 4218 { "pcmpeqq", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4219 },
4220
1ceb70f8 4221 /* PREFIX_0F382A */
42903f7f 4222 {
592d1631
L
4223 { Bad_Opcode },
4224 { Bad_Opcode },
75c135a8 4225 { MOD_TABLE (MOD_0F382A_PREFIX_2) },
42903f7f
L
4226 },
4227
1ceb70f8 4228 /* PREFIX_0F382B */
42903f7f 4229 {
592d1631
L
4230 { Bad_Opcode },
4231 { Bad_Opcode },
507bd325 4232 { "packusdw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4233 },
4234
1ceb70f8 4235 /* PREFIX_0F3830 */
42903f7f 4236 {
592d1631
L
4237 { Bad_Opcode },
4238 { Bad_Opcode },
507bd325 4239 { "pmovzxbw", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4240 },
4241
1ceb70f8 4242 /* PREFIX_0F3831 */
42903f7f 4243 {
592d1631
L
4244 { Bad_Opcode },
4245 { Bad_Opcode },
507bd325 4246 { "pmovzxbd", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4247 },
4248
1ceb70f8 4249 /* PREFIX_0F3832 */
42903f7f 4250 {
592d1631
L
4251 { Bad_Opcode },
4252 { Bad_Opcode },
507bd325 4253 { "pmovzxbq", { XM, EXw }, PREFIX_OPCODE },
42903f7f
L
4254 },
4255
1ceb70f8 4256 /* PREFIX_0F3833 */
42903f7f 4257 {
592d1631
L
4258 { Bad_Opcode },
4259 { Bad_Opcode },
507bd325 4260 { "pmovzxwd", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4261 },
4262
1ceb70f8 4263 /* PREFIX_0F3834 */
42903f7f 4264 {
592d1631
L
4265 { Bad_Opcode },
4266 { Bad_Opcode },
507bd325 4267 { "pmovzxwq", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4268 },
4269
1ceb70f8 4270 /* PREFIX_0F3835 */
42903f7f 4271 {
592d1631
L
4272 { Bad_Opcode },
4273 { Bad_Opcode },
507bd325 4274 { "pmovzxdq", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4275 },
4276
1ceb70f8 4277 /* PREFIX_0F3837 */
4e7d34a6 4278 {
592d1631
L
4279 { Bad_Opcode },
4280 { Bad_Opcode },
507bd325 4281 { "pcmpgtq", { XM, EXx }, PREFIX_OPCODE },
4e7d34a6
L
4282 },
4283
1ceb70f8 4284 /* PREFIX_0F3838 */
42903f7f 4285 {
592d1631
L
4286 { Bad_Opcode },
4287 { Bad_Opcode },
507bd325 4288 { "pminsb", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4289 },
4290
1ceb70f8 4291 /* PREFIX_0F3839 */
42903f7f 4292 {
592d1631
L
4293 { Bad_Opcode },
4294 { Bad_Opcode },
507bd325 4295 { "pminsd", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4296 },
4297
1ceb70f8 4298 /* PREFIX_0F383A */
42903f7f 4299 {
592d1631
L
4300 { Bad_Opcode },
4301 { Bad_Opcode },
507bd325 4302 { "pminuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4303 },
4304
1ceb70f8 4305 /* PREFIX_0F383B */
42903f7f 4306 {
592d1631
L
4307 { Bad_Opcode },
4308 { Bad_Opcode },
507bd325 4309 { "pminud", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4310 },
4311
1ceb70f8 4312 /* PREFIX_0F383C */
42903f7f 4313 {
592d1631
L
4314 { Bad_Opcode },
4315 { Bad_Opcode },
507bd325 4316 { "pmaxsb", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4317 },
4318
1ceb70f8 4319 /* PREFIX_0F383D */
42903f7f 4320 {
592d1631
L
4321 { Bad_Opcode },
4322 { Bad_Opcode },
507bd325 4323 { "pmaxsd", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4324 },
4325
1ceb70f8 4326 /* PREFIX_0F383E */
42903f7f 4327 {
592d1631
L
4328 { Bad_Opcode },
4329 { Bad_Opcode },
507bd325 4330 { "pmaxuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4331 },
4332
1ceb70f8 4333 /* PREFIX_0F383F */
42903f7f 4334 {
592d1631
L
4335 { Bad_Opcode },
4336 { Bad_Opcode },
507bd325 4337 { "pmaxud", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4338 },
4339
1ceb70f8 4340 /* PREFIX_0F3840 */
42903f7f 4341 {
592d1631
L
4342 { Bad_Opcode },
4343 { Bad_Opcode },
507bd325 4344 { "pmulld", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4345 },
4346
1ceb70f8 4347 /* PREFIX_0F3841 */
42903f7f 4348 {
592d1631
L
4349 { Bad_Opcode },
4350 { Bad_Opcode },
507bd325 4351 { "phminposuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4352 },
4353
f1f8f695
L
4354 /* PREFIX_0F3880 */
4355 {
592d1631
L
4356 { Bad_Opcode },
4357 { Bad_Opcode },
507bd325 4358 { "invept", { Gm, Mo }, PREFIX_OPCODE },
f1f8f695
L
4359 },
4360
4361 /* PREFIX_0F3881 */
4362 {
592d1631
L
4363 { Bad_Opcode },
4364 { Bad_Opcode },
507bd325 4365 { "invvpid", { Gm, Mo }, PREFIX_OPCODE },
f1f8f695
L
4366 },
4367
6c30d220
L
4368 /* PREFIX_0F3882 */
4369 {
4370 { Bad_Opcode },
4371 { Bad_Opcode },
507bd325 4372 { "invpcid", { Gm, M }, PREFIX_OPCODE },
6c30d220
L
4373 },
4374
a0046408
L
4375 /* PREFIX_0F38C8 */
4376 {
507bd325 4377 { "sha1nexte", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4378 },
4379
4380 /* PREFIX_0F38C9 */
4381 {
507bd325 4382 { "sha1msg1", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4383 },
4384
4385 /* PREFIX_0F38CA */
4386 {
507bd325 4387 { "sha1msg2", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4388 },
4389
4390 /* PREFIX_0F38CB */
4391 {
507bd325 4392 { "sha256rnds2", { XM, EXxmm, XMM0 }, PREFIX_OPCODE },
a0046408
L
4393 },
4394
4395 /* PREFIX_0F38CC */
4396 {
507bd325 4397 { "sha256msg1", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4398 },
4399
4400 /* PREFIX_0F38CD */
4401 {
507bd325 4402 { "sha256msg2", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4403 },
4404
48521003
IT
4405 /* PREFIX_0F38CF */
4406 {
4407 { Bad_Opcode },
4408 { Bad_Opcode },
4409 { "gf2p8mulb", { XM, EXxmm }, PREFIX_OPCODE },
4410 },
4411
c0f3af97
L
4412 /* PREFIX_0F38DB */
4413 {
592d1631
L
4414 { Bad_Opcode },
4415 { Bad_Opcode },
507bd325 4416 { "aesimc", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4417 },
4418
4419 /* PREFIX_0F38DC */
4420 {
592d1631
L
4421 { Bad_Opcode },
4422 { Bad_Opcode },
507bd325 4423 { "aesenc", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4424 },
4425
4426 /* PREFIX_0F38DD */
4427 {
592d1631
L
4428 { Bad_Opcode },
4429 { Bad_Opcode },
507bd325 4430 { "aesenclast", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4431 },
4432
4433 /* PREFIX_0F38DE */
4434 {
592d1631
L
4435 { Bad_Opcode },
4436 { Bad_Opcode },
507bd325 4437 { "aesdec", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4438 },
4439
4440 /* PREFIX_0F38DF */
4441 {
592d1631
L
4442 { Bad_Opcode },
4443 { Bad_Opcode },
507bd325 4444 { "aesdeclast", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4445 },
4446
1ceb70f8 4447 /* PREFIX_0F38F0 */
4e7d34a6 4448 {
507bd325 4449 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
592d1631 4450 { Bad_Opcode },
507bd325
L
4451 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
4452 { "crc32", { Gdq, { CRC32_Fixup, b_mode } }, PREFIX_OPCODE },
4e7d34a6
L
4453 },
4454
1ceb70f8 4455 /* PREFIX_0F38F1 */
4e7d34a6 4456 {
507bd325 4457 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
592d1631 4458 { Bad_Opcode },
507bd325
L
4459 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
4460 { "crc32", { Gdq, { CRC32_Fixup, v_mode } }, PREFIX_OPCODE },
4e7d34a6
L
4461 },
4462
603555e5 4463 /* PREFIX_0F38F5 */
e2e1fcde
L
4464 {
4465 { Bad_Opcode },
603555e5
L
4466 { Bad_Opcode },
4467 { MOD_TABLE (MOD_0F38F5_PREFIX_2) },
4468 },
4469
4470 /* PREFIX_0F38F6 */
4471 {
4472 { MOD_TABLE (MOD_0F38F6_PREFIX_0) },
507bd325
L
4473 { "adoxS", { Gdq, Edq}, PREFIX_OPCODE },
4474 { "adcxS", { Gdq, Edq}, PREFIX_OPCODE },
e2e1fcde
L
4475 { Bad_Opcode },
4476 },
4477
c0a30a9f
L
4478 /* PREFIX_0F38F8 */
4479 {
4480 { Bad_Opcode },
5d79adc4 4481 { MOD_TABLE (MOD_0F38F8_PREFIX_1) },
c0a30a9f 4482 { MOD_TABLE (MOD_0F38F8_PREFIX_2) },
5d79adc4 4483 { MOD_TABLE (MOD_0F38F8_PREFIX_3) },
c0a30a9f
L
4484 },
4485
4486 /* PREFIX_0F38F9 */
4487 {
4488 { MOD_TABLE (MOD_0F38F9_PREFIX_0) },
4489 },
4490
1ceb70f8 4491 /* PREFIX_0F3A08 */
42903f7f 4492 {
592d1631
L
4493 { Bad_Opcode },
4494 { Bad_Opcode },
507bd325 4495 { "roundps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4496 },
4497
1ceb70f8 4498 /* PREFIX_0F3A09 */
42903f7f 4499 {
592d1631
L
4500 { Bad_Opcode },
4501 { Bad_Opcode },
507bd325 4502 { "roundpd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4503 },
4504
1ceb70f8 4505 /* PREFIX_0F3A0A */
42903f7f 4506 {
592d1631
L
4507 { Bad_Opcode },
4508 { Bad_Opcode },
507bd325 4509 { "roundss", { XM, EXd, Ib }, PREFIX_OPCODE },
42903f7f
L
4510 },
4511
1ceb70f8 4512 /* PREFIX_0F3A0B */
42903f7f 4513 {
592d1631
L
4514 { Bad_Opcode },
4515 { Bad_Opcode },
507bd325 4516 { "roundsd", { XM, EXq, Ib }, PREFIX_OPCODE },
42903f7f
L
4517 },
4518
1ceb70f8 4519 /* PREFIX_0F3A0C */
42903f7f 4520 {
592d1631
L
4521 { Bad_Opcode },
4522 { Bad_Opcode },
507bd325 4523 { "blendps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4524 },
4525
1ceb70f8 4526 /* PREFIX_0F3A0D */
42903f7f 4527 {
592d1631
L
4528 { Bad_Opcode },
4529 { Bad_Opcode },
507bd325 4530 { "blendpd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4531 },
4532
1ceb70f8 4533 /* PREFIX_0F3A0E */
42903f7f 4534 {
592d1631
L
4535 { Bad_Opcode },
4536 { Bad_Opcode },
507bd325 4537 { "pblendw", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4538 },
4539
1ceb70f8 4540 /* PREFIX_0F3A14 */
42903f7f 4541 {
592d1631
L
4542 { Bad_Opcode },
4543 { Bad_Opcode },
507bd325 4544 { "pextrb", { Edqb, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4545 },
4546
1ceb70f8 4547 /* PREFIX_0F3A15 */
42903f7f 4548 {
592d1631
L
4549 { Bad_Opcode },
4550 { Bad_Opcode },
507bd325 4551 { "pextrw", { Edqw, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4552 },
4553
1ceb70f8 4554 /* PREFIX_0F3A16 */
42903f7f 4555 {
592d1631
L
4556 { Bad_Opcode },
4557 { Bad_Opcode },
507bd325 4558 { "pextrK", { Edq, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4559 },
4560
1ceb70f8 4561 /* PREFIX_0F3A17 */
42903f7f 4562 {
592d1631
L
4563 { Bad_Opcode },
4564 { Bad_Opcode },
507bd325 4565 { "extractps", { Edqd, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4566 },
4567
1ceb70f8 4568 /* PREFIX_0F3A20 */
42903f7f 4569 {
592d1631
L
4570 { Bad_Opcode },
4571 { Bad_Opcode },
507bd325 4572 { "pinsrb", { XM, Edqb, Ib }, PREFIX_OPCODE },
42903f7f
L
4573 },
4574
1ceb70f8 4575 /* PREFIX_0F3A21 */
42903f7f 4576 {
592d1631
L
4577 { Bad_Opcode },
4578 { Bad_Opcode },
507bd325 4579 { "insertps", { XM, EXd, Ib }, PREFIX_OPCODE },
42903f7f
L
4580 },
4581
1ceb70f8 4582 /* PREFIX_0F3A22 */
42903f7f 4583 {
592d1631
L
4584 { Bad_Opcode },
4585 { Bad_Opcode },
507bd325 4586 { "pinsrK", { XM, Edq, Ib }, PREFIX_OPCODE },
42903f7f
L
4587 },
4588
1ceb70f8 4589 /* PREFIX_0F3A40 */
42903f7f 4590 {
592d1631
L
4591 { Bad_Opcode },
4592 { Bad_Opcode },
507bd325 4593 { "dpps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4594 },
4595
1ceb70f8 4596 /* PREFIX_0F3A41 */
42903f7f 4597 {
592d1631
L
4598 { Bad_Opcode },
4599 { Bad_Opcode },
507bd325 4600 { "dppd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4601 },
4602
1ceb70f8 4603 /* PREFIX_0F3A42 */
42903f7f 4604 {
592d1631
L
4605 { Bad_Opcode },
4606 { Bad_Opcode },
507bd325 4607 { "mpsadbw", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f 4608 },
381d071f 4609
c0f3af97
L
4610 /* PREFIX_0F3A44 */
4611 {
592d1631
L
4612 { Bad_Opcode },
4613 { Bad_Opcode },
507bd325 4614 { "pclmulqdq", { XM, EXx, PCLMUL }, PREFIX_OPCODE },
c0f3af97
L
4615 },
4616
1ceb70f8 4617 /* PREFIX_0F3A60 */
381d071f 4618 {
592d1631
L
4619 { Bad_Opcode },
4620 { Bad_Opcode },
15c7c1d8 4621 { "pcmpestrm", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, PREFIX_OPCODE },
381d071f
L
4622 },
4623
1ceb70f8 4624 /* PREFIX_0F3A61 */
381d071f 4625 {
592d1631
L
4626 { Bad_Opcode },
4627 { Bad_Opcode },
15c7c1d8 4628 { "pcmpestri", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, PREFIX_OPCODE },
381d071f
L
4629 },
4630
1ceb70f8 4631 /* PREFIX_0F3A62 */
381d071f 4632 {
592d1631
L
4633 { Bad_Opcode },
4634 { Bad_Opcode },
507bd325 4635 { "pcmpistrm", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f
L
4636 },
4637
1ceb70f8 4638 /* PREFIX_0F3A63 */
381d071f 4639 {
592d1631
L
4640 { Bad_Opcode },
4641 { Bad_Opcode },
507bd325 4642 { "pcmpistri", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f 4643 },
09a2c6cf 4644
a0046408
L
4645 /* PREFIX_0F3ACC */
4646 {
507bd325 4647 { "sha1rnds4", { XM, EXxmm, Ib }, PREFIX_OPCODE },
a0046408
L
4648 },
4649
48521003
IT
4650 /* PREFIX_0F3ACE */
4651 {
4652 { Bad_Opcode },
4653 { Bad_Opcode },
4654 { "gf2p8affineqb", { XM, EXxmm, Ib }, PREFIX_OPCODE },
4655 },
4656
4657 /* PREFIX_0F3ACF */
4658 {
4659 { Bad_Opcode },
4660 { Bad_Opcode },
4661 { "gf2p8affineinvqb", { XM, EXxmm, Ib }, PREFIX_OPCODE },
4662 },
4663
c0f3af97 4664 /* PREFIX_0F3ADF */
09a2c6cf 4665 {
592d1631
L
4666 { Bad_Opcode },
4667 { Bad_Opcode },
507bd325 4668 { "aeskeygenassist", { XM, EXx, Ib }, PREFIX_OPCODE },
09a2c6cf
L
4669 },
4670
592a252b 4671 /* PREFIX_VEX_0F10 */
09a2c6cf 4672 {
ec6f095a
L
4673 { "vmovups", { XM, EXx }, 0 },
4674 { "vmovss", { XMVexScalar, VexScalar, EXdScalar }, 0 },
4675 { "vmovupd", { XM, EXx }, 0 },
4676 { "vmovsd", { XMVexScalar, VexScalar, EXqScalar }, 0 },
09a2c6cf
L
4677 },
4678
592a252b 4679 /* PREFIX_VEX_0F11 */
09a2c6cf 4680 {
ec6f095a
L
4681 { "vmovups", { EXxS, XM }, 0 },
4682 { "vmovss", { EXdVexScalarS, VexScalar, XMScalar }, 0 },
4683 { "vmovupd", { EXxS, XM }, 0 },
4684 { "vmovsd", { EXqVexScalarS, VexScalar, XMScalar }, 0 },
09a2c6cf
L
4685 },
4686
592a252b 4687 /* PREFIX_VEX_0F12 */
09a2c6cf 4688 {
592a252b 4689 { MOD_TABLE (MOD_VEX_0F12_PREFIX_0) },
ec6f095a 4690 { "vmovsldup", { XM, EXx }, 0 },
592a252b 4691 { VEX_LEN_TABLE (VEX_LEN_0F12_P_2) },
ec6f095a 4692 { "vmovddup", { XM, EXymmq }, 0 },
09a2c6cf
L
4693 },
4694
592a252b 4695 /* PREFIX_VEX_0F16 */
09a2c6cf 4696 {
592a252b 4697 { MOD_TABLE (MOD_VEX_0F16_PREFIX_0) },
ec6f095a 4698 { "vmovshdup", { XM, EXx }, 0 },
592a252b 4699 { VEX_LEN_TABLE (VEX_LEN_0F16_P_2) },
5f754f58 4700 },
7c52e0e8 4701
592a252b 4702 /* PREFIX_VEX_0F2A */
5f754f58 4703 {
592d1631 4704 { Bad_Opcode },
2b7bcc87 4705 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Edq }, 0 },
592d1631 4706 { Bad_Opcode },
2b7bcc87 4707 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Edq }, 0 },
5f754f58 4708 },
7c52e0e8 4709
592a252b 4710 /* PREFIX_VEX_0F2C */
5f754f58 4711 {
592d1631 4712 { Bad_Opcode },
2b7bcc87 4713 { "vcvttss2si", { Gdq, EXdScalar }, 0 },
592d1631 4714 { Bad_Opcode },
2b7bcc87 4715 { "vcvttsd2si", { Gdq, EXqScalar }, 0 },
5f754f58 4716 },
7c52e0e8 4717
592a252b 4718 /* PREFIX_VEX_0F2D */
7c52e0e8 4719 {
592d1631 4720 { Bad_Opcode },
2b7bcc87 4721 { "vcvtss2si", { Gdq, EXdScalar }, 0 },
592d1631 4722 { Bad_Opcode },
2b7bcc87 4723 { "vcvtsd2si", { Gdq, EXqScalar }, 0 },
7c52e0e8
L
4724 },
4725
592a252b 4726 /* PREFIX_VEX_0F2E */
7c52e0e8 4727 {
ec6f095a 4728 { "vucomiss", { XMScalar, EXdScalar }, 0 },
592d1631 4729 { Bad_Opcode },
ec6f095a 4730 { "vucomisd", { XMScalar, EXqScalar }, 0 },
7c52e0e8
L
4731 },
4732
592a252b 4733 /* PREFIX_VEX_0F2F */
7c52e0e8 4734 {
ec6f095a 4735 { "vcomiss", { XMScalar, EXdScalar }, 0 },
592d1631 4736 { Bad_Opcode },
ec6f095a 4737 { "vcomisd", { XMScalar, EXqScalar }, 0 },
7c52e0e8
L
4738 },
4739
43234a1e
L
4740 /* PREFIX_VEX_0F41 */
4741 {
4742 { VEX_LEN_TABLE (VEX_LEN_0F41_P_0) },
1ba585e8
IT
4743 { Bad_Opcode },
4744 { VEX_LEN_TABLE (VEX_LEN_0F41_P_2) },
43234a1e
L
4745 },
4746
4747 /* PREFIX_VEX_0F42 */
4748 {
4749 { VEX_LEN_TABLE (VEX_LEN_0F42_P_0) },
1ba585e8
IT
4750 { Bad_Opcode },
4751 { VEX_LEN_TABLE (VEX_LEN_0F42_P_2) },
43234a1e
L
4752 },
4753
4754 /* PREFIX_VEX_0F44 */
4755 {
4756 { VEX_LEN_TABLE (VEX_LEN_0F44_P_0) },
1ba585e8
IT
4757 { Bad_Opcode },
4758 { VEX_LEN_TABLE (VEX_LEN_0F44_P_2) },
43234a1e
L
4759 },
4760
4761 /* PREFIX_VEX_0F45 */
4762 {
4763 { VEX_LEN_TABLE (VEX_LEN_0F45_P_0) },
1ba585e8
IT
4764 { Bad_Opcode },
4765 { VEX_LEN_TABLE (VEX_LEN_0F45_P_2) },
43234a1e
L
4766 },
4767
4768 /* PREFIX_VEX_0F46 */
4769 {
4770 { VEX_LEN_TABLE (VEX_LEN_0F46_P_0) },
1ba585e8
IT
4771 { Bad_Opcode },
4772 { VEX_LEN_TABLE (VEX_LEN_0F46_P_2) },
43234a1e
L
4773 },
4774
4775 /* PREFIX_VEX_0F47 */
4776 {
4777 { VEX_LEN_TABLE (VEX_LEN_0F47_P_0) },
1ba585e8
IT
4778 { Bad_Opcode },
4779 { VEX_LEN_TABLE (VEX_LEN_0F47_P_2) },
43234a1e
L
4780 },
4781
1ba585e8 4782 /* PREFIX_VEX_0F4A */
43234a1e 4783 {
1ba585e8 4784 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_0) },
43234a1e 4785 { Bad_Opcode },
1ba585e8
IT
4786 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_2) },
4787 },
4788
4789 /* PREFIX_VEX_0F4B */
4790 {
4791 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_0) },
43234a1e
L
4792 { Bad_Opcode },
4793 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_2) },
4794 },
4795
592a252b 4796 /* PREFIX_VEX_0F51 */
7c52e0e8 4797 {
ec6f095a
L
4798 { "vsqrtps", { XM, EXx }, 0 },
4799 { "vsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
4800 { "vsqrtpd", { XM, EXx }, 0 },
4801 { "vsqrtsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4802 },
4803
592a252b 4804 /* PREFIX_VEX_0F52 */
7c52e0e8 4805 {
ec6f095a
L
4806 { "vrsqrtps", { XM, EXx }, 0 },
4807 { "vrsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
7c52e0e8
L
4808 },
4809
592a252b 4810 /* PREFIX_VEX_0F53 */
7c52e0e8 4811 {
ec6f095a
L
4812 { "vrcpps", { XM, EXx }, 0 },
4813 { "vrcpss", { XMScalar, VexScalar, EXdScalar }, 0 },
7c52e0e8
L
4814 },
4815
592a252b 4816 /* PREFIX_VEX_0F58 */
7c52e0e8 4817 {
ec6f095a
L
4818 { "vaddps", { XM, Vex, EXx }, 0 },
4819 { "vaddss", { XMScalar, VexScalar, EXdScalar }, 0 },
4820 { "vaddpd", { XM, Vex, EXx }, 0 },
4821 { "vaddsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4822 },
4823
592a252b 4824 /* PREFIX_VEX_0F59 */
7c52e0e8 4825 {
ec6f095a
L
4826 { "vmulps", { XM, Vex, EXx }, 0 },
4827 { "vmulss", { XMScalar, VexScalar, EXdScalar }, 0 },
4828 { "vmulpd", { XM, Vex, EXx }, 0 },
4829 { "vmulsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4830 },
4831
592a252b 4832 /* PREFIX_VEX_0F5A */
7c52e0e8 4833 {
ec6f095a
L
4834 { "vcvtps2pd", { XM, EXxmmq }, 0 },
4835 { "vcvtss2sd", { XMScalar, VexScalar, EXdScalar }, 0 },
4836 { "vcvtpd2ps%XY",{ XMM, EXx }, 0 },
4837 { "vcvtsd2ss", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4838 },
4839
592a252b 4840 /* PREFIX_VEX_0F5B */
7c52e0e8 4841 {
ec6f095a
L
4842 { "vcvtdq2ps", { XM, EXx }, 0 },
4843 { "vcvttps2dq", { XM, EXx }, 0 },
4844 { "vcvtps2dq", { XM, EXx }, 0 },
7c52e0e8
L
4845 },
4846
592a252b 4847 /* PREFIX_VEX_0F5C */
7c52e0e8 4848 {
ec6f095a
L
4849 { "vsubps", { XM, Vex, EXx }, 0 },
4850 { "vsubss", { XMScalar, VexScalar, EXdScalar }, 0 },
4851 { "vsubpd", { XM, Vex, EXx }, 0 },
4852 { "vsubsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4853 },
4854
592a252b 4855 /* PREFIX_VEX_0F5D */
7c52e0e8 4856 {
ec6f095a
L
4857 { "vminps", { XM, Vex, EXx }, 0 },
4858 { "vminss", { XMScalar, VexScalar, EXdScalar }, 0 },
4859 { "vminpd", { XM, Vex, EXx }, 0 },
4860 { "vminsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4861 },
4862
592a252b 4863 /* PREFIX_VEX_0F5E */
7c52e0e8 4864 {
ec6f095a
L
4865 { "vdivps", { XM, Vex, EXx }, 0 },
4866 { "vdivss", { XMScalar, VexScalar, EXdScalar }, 0 },
4867 { "vdivpd", { XM, Vex, EXx }, 0 },
4868 { "vdivsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4869 },
4870
592a252b 4871 /* PREFIX_VEX_0F5F */
7c52e0e8 4872 {
ec6f095a
L
4873 { "vmaxps", { XM, Vex, EXx }, 0 },
4874 { "vmaxss", { XMScalar, VexScalar, EXdScalar }, 0 },
4875 { "vmaxpd", { XM, Vex, EXx }, 0 },
4876 { "vmaxsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4877 },
4878
592a252b 4879 /* PREFIX_VEX_0F60 */
7c52e0e8 4880 {
592d1631
L
4881 { Bad_Opcode },
4882 { Bad_Opcode },
ec6f095a 4883 { "vpunpcklbw", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4884 },
4885
592a252b 4886 /* PREFIX_VEX_0F61 */
7c52e0e8 4887 {
592d1631
L
4888 { Bad_Opcode },
4889 { Bad_Opcode },
ec6f095a 4890 { "vpunpcklwd", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4891 },
4892
592a252b 4893 /* PREFIX_VEX_0F62 */
7c52e0e8 4894 {
592d1631
L
4895 { Bad_Opcode },
4896 { Bad_Opcode },
ec6f095a 4897 { "vpunpckldq", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4898 },
4899
592a252b 4900 /* PREFIX_VEX_0F63 */
7c52e0e8 4901 {
592d1631
L
4902 { Bad_Opcode },
4903 { Bad_Opcode },
ec6f095a 4904 { "vpacksswb", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4905 },
4906
592a252b 4907 /* PREFIX_VEX_0F64 */
7c52e0e8 4908 {
592d1631
L
4909 { Bad_Opcode },
4910 { Bad_Opcode },
ec6f095a 4911 { "vpcmpgtb", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4912 },
4913
592a252b 4914 /* PREFIX_VEX_0F65 */
7c52e0e8 4915 {
592d1631
L
4916 { Bad_Opcode },
4917 { Bad_Opcode },
ec6f095a 4918 { "vpcmpgtw", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4919 },
4920
592a252b 4921 /* PREFIX_VEX_0F66 */
7c52e0e8 4922 {
592d1631
L
4923 { Bad_Opcode },
4924 { Bad_Opcode },
ec6f095a 4925 { "vpcmpgtd", { XM, Vex, EXx }, 0 },
7c52e0e8 4926 },
6439fc28 4927
592a252b 4928 /* PREFIX_VEX_0F67 */
331d2d0d 4929 {
592d1631
L
4930 { Bad_Opcode },
4931 { Bad_Opcode },
ec6f095a 4932 { "vpackuswb", { XM, Vex, EXx }, 0 },
c0f3af97
L
4933 },
4934
592a252b 4935 /* PREFIX_VEX_0F68 */
c0f3af97 4936 {
592d1631
L
4937 { Bad_Opcode },
4938 { Bad_Opcode },
ec6f095a 4939 { "vpunpckhbw", { XM, Vex, EXx }, 0 },
c0f3af97
L
4940 },
4941
592a252b 4942 /* PREFIX_VEX_0F69 */
c0f3af97 4943 {
592d1631
L
4944 { Bad_Opcode },
4945 { Bad_Opcode },
ec6f095a 4946 { "vpunpckhwd", { XM, Vex, EXx }, 0 },
c0f3af97
L
4947 },
4948
592a252b 4949 /* PREFIX_VEX_0F6A */
c0f3af97 4950 {
592d1631
L
4951 { Bad_Opcode },
4952 { Bad_Opcode },
ec6f095a 4953 { "vpunpckhdq", { XM, Vex, EXx }, 0 },
c0f3af97
L
4954 },
4955
592a252b 4956 /* PREFIX_VEX_0F6B */
c0f3af97 4957 {
592d1631
L
4958 { Bad_Opcode },
4959 { Bad_Opcode },
ec6f095a 4960 { "vpackssdw", { XM, Vex, EXx }, 0 },
c0f3af97
L
4961 },
4962
592a252b 4963 /* PREFIX_VEX_0F6C */
c0f3af97 4964 {
592d1631
L
4965 { Bad_Opcode },
4966 { Bad_Opcode },
ec6f095a 4967 { "vpunpcklqdq", { XM, Vex, EXx }, 0 },
c0f3af97
L
4968 },
4969
592a252b 4970 /* PREFIX_VEX_0F6D */
c0f3af97 4971 {
592d1631
L
4972 { Bad_Opcode },
4973 { Bad_Opcode },
ec6f095a 4974 { "vpunpckhqdq", { XM, Vex, EXx }, 0 },
c0f3af97
L
4975 },
4976
592a252b 4977 /* PREFIX_VEX_0F6E */
c0f3af97 4978 {
592d1631
L
4979 { Bad_Opcode },
4980 { Bad_Opcode },
592a252b 4981 { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2) },
c0f3af97
L
4982 },
4983
592a252b 4984 /* PREFIX_VEX_0F6F */
c0f3af97 4985 {
592d1631 4986 { Bad_Opcode },
ec6f095a
L
4987 { "vmovdqu", { XM, EXx }, 0 },
4988 { "vmovdqa", { XM, EXx }, 0 },
c0f3af97
L
4989 },
4990
592a252b 4991 /* PREFIX_VEX_0F70 */
c0f3af97 4992 {
592d1631 4993 { Bad_Opcode },
ec6f095a
L
4994 { "vpshufhw", { XM, EXx, Ib }, 0 },
4995 { "vpshufd", { XM, EXx, Ib }, 0 },
4996 { "vpshuflw", { XM, EXx, Ib }, 0 },
c0f3af97
L
4997 },
4998
592a252b 4999 /* PREFIX_VEX_0F71_REG_2 */
c0f3af97 5000 {
592d1631
L
5001 { Bad_Opcode },
5002 { Bad_Opcode },
ec6f095a 5003 { "vpsrlw", { Vex, XS, Ib }, 0 },
c0f3af97
L
5004 },
5005
592a252b 5006 /* PREFIX_VEX_0F71_REG_4 */
c0f3af97 5007 {
592d1631
L
5008 { Bad_Opcode },
5009 { Bad_Opcode },
ec6f095a 5010 { "vpsraw", { Vex, XS, Ib }, 0 },
c0f3af97
L
5011 },
5012
592a252b 5013 /* PREFIX_VEX_0F71_REG_6 */
c0f3af97 5014 {
592d1631
L
5015 { Bad_Opcode },
5016 { Bad_Opcode },
ec6f095a 5017 { "vpsllw", { Vex, XS, Ib }, 0 },
c0f3af97
L
5018 },
5019
592a252b 5020 /* PREFIX_VEX_0F72_REG_2 */
c0f3af97 5021 {
592d1631
L
5022 { Bad_Opcode },
5023 { Bad_Opcode },
ec6f095a 5024 { "vpsrld", { Vex, XS, Ib }, 0 },
c0f3af97
L
5025 },
5026
592a252b 5027 /* PREFIX_VEX_0F72_REG_4 */
c0f3af97 5028 {
592d1631
L
5029 { Bad_Opcode },
5030 { Bad_Opcode },
ec6f095a 5031 { "vpsrad", { Vex, XS, Ib }, 0 },
c0f3af97
L
5032 },
5033
592a252b 5034 /* PREFIX_VEX_0F72_REG_6 */
c0f3af97 5035 {
592d1631
L
5036 { Bad_Opcode },
5037 { Bad_Opcode },
ec6f095a 5038 { "vpslld", { Vex, XS, Ib }, 0 },
c0f3af97
L
5039 },
5040
592a252b 5041 /* PREFIX_VEX_0F73_REG_2 */
c0f3af97 5042 {
592d1631
L
5043 { Bad_Opcode },
5044 { Bad_Opcode },
ec6f095a 5045 { "vpsrlq", { Vex, XS, Ib }, 0 },
c0f3af97
L
5046 },
5047
592a252b 5048 /* PREFIX_VEX_0F73_REG_3 */
c0f3af97 5049 {
592d1631
L
5050 { Bad_Opcode },
5051 { Bad_Opcode },
ec6f095a 5052 { "vpsrldq", { Vex, XS, Ib }, 0 },
c0f3af97
L
5053 },
5054
592a252b 5055 /* PREFIX_VEX_0F73_REG_6 */
c0f3af97 5056 {
592d1631
L
5057 { Bad_Opcode },
5058 { Bad_Opcode },
ec6f095a 5059 { "vpsllq", { Vex, XS, Ib }, 0 },
c0f3af97
L
5060 },
5061
592a252b 5062 /* PREFIX_VEX_0F73_REG_7 */
c0f3af97 5063 {
592d1631
L
5064 { Bad_Opcode },
5065 { Bad_Opcode },
ec6f095a 5066 { "vpslldq", { Vex, XS, Ib }, 0 },
c0f3af97
L
5067 },
5068
592a252b 5069 /* PREFIX_VEX_0F74 */
c0f3af97 5070 {
592d1631
L
5071 { Bad_Opcode },
5072 { Bad_Opcode },
ec6f095a 5073 { "vpcmpeqb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5074 },
5075
592a252b 5076 /* PREFIX_VEX_0F75 */
c0f3af97 5077 {
592d1631
L
5078 { Bad_Opcode },
5079 { Bad_Opcode },
ec6f095a 5080 { "vpcmpeqw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5081 },
5082
592a252b 5083 /* PREFIX_VEX_0F76 */
c0f3af97 5084 {
592d1631
L
5085 { Bad_Opcode },
5086 { Bad_Opcode },
ec6f095a 5087 { "vpcmpeqd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5088 },
5089
592a252b 5090 /* PREFIX_VEX_0F77 */
c0f3af97 5091 {
ec6f095a 5092 { VEX_LEN_TABLE (VEX_LEN_0F77_P_0) },
c0f3af97
L
5093 },
5094
592a252b 5095 /* PREFIX_VEX_0F7C */
c0f3af97 5096 {
592d1631
L
5097 { Bad_Opcode },
5098 { Bad_Opcode },
ec6f095a
L
5099 { "vhaddpd", { XM, Vex, EXx }, 0 },
5100 { "vhaddps", { XM, Vex, EXx }, 0 },
c0f3af97
L
5101 },
5102
592a252b 5103 /* PREFIX_VEX_0F7D */
c0f3af97 5104 {
592d1631
L
5105 { Bad_Opcode },
5106 { Bad_Opcode },
ec6f095a
L
5107 { "vhsubpd", { XM, Vex, EXx }, 0 },
5108 { "vhsubps", { XM, Vex, EXx }, 0 },
c0f3af97
L
5109 },
5110
592a252b 5111 /* PREFIX_VEX_0F7E */
c0f3af97 5112 {
592d1631 5113 { Bad_Opcode },
592a252b
L
5114 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1) },
5115 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2) },
c0f3af97
L
5116 },
5117
592a252b 5118 /* PREFIX_VEX_0F7F */
c0f3af97 5119 {
592d1631 5120 { Bad_Opcode },
ec6f095a
L
5121 { "vmovdqu", { EXxS, XM }, 0 },
5122 { "vmovdqa", { EXxS, XM }, 0 },
c0f3af97
L
5123 },
5124
43234a1e
L
5125 /* PREFIX_VEX_0F90 */
5126 {
5127 { VEX_LEN_TABLE (VEX_LEN_0F90_P_0) },
1ba585e8
IT
5128 { Bad_Opcode },
5129 { VEX_LEN_TABLE (VEX_LEN_0F90_P_2) },
43234a1e
L
5130 },
5131
5132 /* PREFIX_VEX_0F91 */
5133 {
5134 { VEX_LEN_TABLE (VEX_LEN_0F91_P_0) },
1ba585e8
IT
5135 { Bad_Opcode },
5136 { VEX_LEN_TABLE (VEX_LEN_0F91_P_2) },
43234a1e
L
5137 },
5138
5139 /* PREFIX_VEX_0F92 */
5140 {
5141 { VEX_LEN_TABLE (VEX_LEN_0F92_P_0) },
1ba585e8 5142 { Bad_Opcode },
90a915bf 5143 { VEX_LEN_TABLE (VEX_LEN_0F92_P_2) },
1ba585e8 5144 { VEX_LEN_TABLE (VEX_LEN_0F92_P_3) },
43234a1e
L
5145 },
5146
5147 /* PREFIX_VEX_0F93 */
5148 {
5149 { VEX_LEN_TABLE (VEX_LEN_0F93_P_0) },
1ba585e8 5150 { Bad_Opcode },
90a915bf 5151 { VEX_LEN_TABLE (VEX_LEN_0F93_P_2) },
1ba585e8 5152 { VEX_LEN_TABLE (VEX_LEN_0F93_P_3) },
43234a1e
L
5153 },
5154
5155 /* PREFIX_VEX_0F98 */
5156 {
5157 { VEX_LEN_TABLE (VEX_LEN_0F98_P_0) },
1ba585e8
IT
5158 { Bad_Opcode },
5159 { VEX_LEN_TABLE (VEX_LEN_0F98_P_2) },
5160 },
5161
5162 /* PREFIX_VEX_0F99 */
5163 {
5164 { VEX_LEN_TABLE (VEX_LEN_0F99_P_0) },
5165 { Bad_Opcode },
5166 { VEX_LEN_TABLE (VEX_LEN_0F99_P_2) },
43234a1e
L
5167 },
5168
592a252b 5169 /* PREFIX_VEX_0FC2 */
c0f3af97 5170 {
ec6f095a
L
5171 { "vcmpps", { XM, Vex, EXx, VCMP }, 0 },
5172 { "vcmpss", { XMScalar, VexScalar, EXdScalar, VCMP }, 0 },
5173 { "vcmppd", { XM, Vex, EXx, VCMP }, 0 },
5174 { "vcmpsd", { XMScalar, VexScalar, EXqScalar, VCMP }, 0 },
c0f3af97
L
5175 },
5176
592a252b 5177 /* PREFIX_VEX_0FC4 */
c0f3af97 5178 {
592d1631
L
5179 { Bad_Opcode },
5180 { Bad_Opcode },
592a252b 5181 { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2) },
c0f3af97
L
5182 },
5183
592a252b 5184 /* PREFIX_VEX_0FC5 */
c0f3af97 5185 {
592d1631
L
5186 { Bad_Opcode },
5187 { Bad_Opcode },
592a252b 5188 { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2) },
c0f3af97
L
5189 },
5190
592a252b 5191 /* PREFIX_VEX_0FD0 */
c0f3af97 5192 {
592d1631
L
5193 { Bad_Opcode },
5194 { Bad_Opcode },
ec6f095a
L
5195 { "vaddsubpd", { XM, Vex, EXx }, 0 },
5196 { "vaddsubps", { XM, Vex, EXx }, 0 },
c0f3af97
L
5197 },
5198
592a252b 5199 /* PREFIX_VEX_0FD1 */
c0f3af97 5200 {
592d1631
L
5201 { Bad_Opcode },
5202 { Bad_Opcode },
ec6f095a 5203 { "vpsrlw", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5204 },
5205
592a252b 5206 /* PREFIX_VEX_0FD2 */
c0f3af97 5207 {
592d1631
L
5208 { Bad_Opcode },
5209 { Bad_Opcode },
ec6f095a 5210 { "vpsrld", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5211 },
5212
592a252b 5213 /* PREFIX_VEX_0FD3 */
c0f3af97 5214 {
592d1631
L
5215 { Bad_Opcode },
5216 { Bad_Opcode },
ec6f095a 5217 { "vpsrlq", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5218 },
5219
592a252b 5220 /* PREFIX_VEX_0FD4 */
c0f3af97 5221 {
592d1631
L
5222 { Bad_Opcode },
5223 { Bad_Opcode },
ec6f095a 5224 { "vpaddq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5225 },
5226
592a252b 5227 /* PREFIX_VEX_0FD5 */
c0f3af97 5228 {
592d1631
L
5229 { Bad_Opcode },
5230 { Bad_Opcode },
ec6f095a 5231 { "vpmullw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5232 },
5233
592a252b 5234 /* PREFIX_VEX_0FD6 */
c0f3af97 5235 {
592d1631
L
5236 { Bad_Opcode },
5237 { Bad_Opcode },
592a252b 5238 { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2) },
c0f3af97
L
5239 },
5240
592a252b 5241 /* PREFIX_VEX_0FD7 */
c0f3af97 5242 {
592d1631
L
5243 { Bad_Opcode },
5244 { Bad_Opcode },
592a252b 5245 { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2) },
c0f3af97
L
5246 },
5247
592a252b 5248 /* PREFIX_VEX_0FD8 */
c0f3af97 5249 {
592d1631
L
5250 { Bad_Opcode },
5251 { Bad_Opcode },
ec6f095a 5252 { "vpsubusb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5253 },
5254
592a252b 5255 /* PREFIX_VEX_0FD9 */
c0f3af97 5256 {
592d1631
L
5257 { Bad_Opcode },
5258 { Bad_Opcode },
ec6f095a 5259 { "vpsubusw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5260 },
5261
592a252b 5262 /* PREFIX_VEX_0FDA */
c0f3af97 5263 {
592d1631
L
5264 { Bad_Opcode },
5265 { Bad_Opcode },
ec6f095a 5266 { "vpminub", { XM, Vex, EXx }, 0 },
c0f3af97
L
5267 },
5268
592a252b 5269 /* PREFIX_VEX_0FDB */
c0f3af97 5270 {
592d1631
L
5271 { Bad_Opcode },
5272 { Bad_Opcode },
ec6f095a 5273 { "vpand", { XM, Vex, EXx }, 0 },
c0f3af97
L
5274 },
5275
592a252b 5276 /* PREFIX_VEX_0FDC */
c0f3af97 5277 {
592d1631
L
5278 { Bad_Opcode },
5279 { Bad_Opcode },
ec6f095a 5280 { "vpaddusb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5281 },
5282
592a252b 5283 /* PREFIX_VEX_0FDD */
c0f3af97 5284 {
592d1631
L
5285 { Bad_Opcode },
5286 { Bad_Opcode },
ec6f095a 5287 { "vpaddusw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5288 },
5289
592a252b 5290 /* PREFIX_VEX_0FDE */
c0f3af97 5291 {
592d1631
L
5292 { Bad_Opcode },
5293 { Bad_Opcode },
ec6f095a 5294 { "vpmaxub", { XM, Vex, EXx }, 0 },
c0f3af97
L
5295 },
5296
592a252b 5297 /* PREFIX_VEX_0FDF */
c0f3af97 5298 {
592d1631
L
5299 { Bad_Opcode },
5300 { Bad_Opcode },
ec6f095a 5301 { "vpandn", { XM, Vex, EXx }, 0 },
c0f3af97
L
5302 },
5303
592a252b 5304 /* PREFIX_VEX_0FE0 */
c0f3af97 5305 {
592d1631
L
5306 { Bad_Opcode },
5307 { Bad_Opcode },
ec6f095a 5308 { "vpavgb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5309 },
5310
592a252b 5311 /* PREFIX_VEX_0FE1 */
c0f3af97 5312 {
592d1631
L
5313 { Bad_Opcode },
5314 { Bad_Opcode },
ec6f095a 5315 { "vpsraw", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5316 },
5317
592a252b 5318 /* PREFIX_VEX_0FE2 */
c0f3af97 5319 {
592d1631
L
5320 { Bad_Opcode },
5321 { Bad_Opcode },
ec6f095a 5322 { "vpsrad", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5323 },
5324
592a252b 5325 /* PREFIX_VEX_0FE3 */
c0f3af97 5326 {
592d1631
L
5327 { Bad_Opcode },
5328 { Bad_Opcode },
ec6f095a 5329 { "vpavgw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5330 },
5331
592a252b 5332 /* PREFIX_VEX_0FE4 */
c0f3af97 5333 {
592d1631
L
5334 { Bad_Opcode },
5335 { Bad_Opcode },
ec6f095a 5336 { "vpmulhuw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5337 },
5338
592a252b 5339 /* PREFIX_VEX_0FE5 */
c0f3af97 5340 {
592d1631
L
5341 { Bad_Opcode },
5342 { Bad_Opcode },
ec6f095a 5343 { "vpmulhw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5344 },
5345
592a252b 5346 /* PREFIX_VEX_0FE6 */
c0f3af97 5347 {
592d1631 5348 { Bad_Opcode },
ec6f095a
L
5349 { "vcvtdq2pd", { XM, EXxmmq }, 0 },
5350 { "vcvttpd2dq%XY", { XMM, EXx }, 0 },
5351 { "vcvtpd2dq%XY", { XMM, EXx }, 0 },
c0f3af97
L
5352 },
5353
592a252b 5354 /* PREFIX_VEX_0FE7 */
c0f3af97 5355 {
592d1631
L
5356 { Bad_Opcode },
5357 { Bad_Opcode },
592a252b 5358 { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2) },
c0f3af97
L
5359 },
5360
592a252b 5361 /* PREFIX_VEX_0FE8 */
c0f3af97 5362 {
592d1631
L
5363 { Bad_Opcode },
5364 { Bad_Opcode },
ec6f095a 5365 { "vpsubsb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5366 },
5367
592a252b 5368 /* PREFIX_VEX_0FE9 */
c0f3af97 5369 {
592d1631
L
5370 { Bad_Opcode },
5371 { Bad_Opcode },
ec6f095a 5372 { "vpsubsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5373 },
5374
592a252b 5375 /* PREFIX_VEX_0FEA */
c0f3af97 5376 {
592d1631
L
5377 { Bad_Opcode },
5378 { Bad_Opcode },
ec6f095a 5379 { "vpminsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5380 },
5381
592a252b 5382 /* PREFIX_VEX_0FEB */
c0f3af97 5383 {
592d1631
L
5384 { Bad_Opcode },
5385 { Bad_Opcode },
ec6f095a 5386 { "vpor", { XM, Vex, EXx }, 0 },
c0f3af97
L
5387 },
5388
592a252b 5389 /* PREFIX_VEX_0FEC */
c0f3af97 5390 {
592d1631
L
5391 { Bad_Opcode },
5392 { Bad_Opcode },
ec6f095a 5393 { "vpaddsb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5394 },
5395
592a252b 5396 /* PREFIX_VEX_0FED */
c0f3af97 5397 {
592d1631
L
5398 { Bad_Opcode },
5399 { Bad_Opcode },
ec6f095a 5400 { "vpaddsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5401 },
5402
592a252b 5403 /* PREFIX_VEX_0FEE */
c0f3af97 5404 {
592d1631
L
5405 { Bad_Opcode },
5406 { Bad_Opcode },
ec6f095a 5407 { "vpmaxsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5408 },
5409
592a252b 5410 /* PREFIX_VEX_0FEF */
c0f3af97 5411 {
592d1631
L
5412 { Bad_Opcode },
5413 { Bad_Opcode },
ec6f095a 5414 { "vpxor", { XM, Vex, EXx }, 0 },
c0f3af97
L
5415 },
5416
592a252b 5417 /* PREFIX_VEX_0FF0 */
c0f3af97 5418 {
592d1631
L
5419 { Bad_Opcode },
5420 { Bad_Opcode },
5421 { Bad_Opcode },
592a252b 5422 { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3) },
c0f3af97
L
5423 },
5424
592a252b 5425 /* PREFIX_VEX_0FF1 */
c0f3af97 5426 {
592d1631
L
5427 { Bad_Opcode },
5428 { Bad_Opcode },
ec6f095a 5429 { "vpsllw", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5430 },
5431
592a252b 5432 /* PREFIX_VEX_0FF2 */
c0f3af97 5433 {
592d1631
L
5434 { Bad_Opcode },
5435 { Bad_Opcode },
ec6f095a 5436 { "vpslld", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5437 },
5438
592a252b 5439 /* PREFIX_VEX_0FF3 */
c0f3af97 5440 {
592d1631
L
5441 { Bad_Opcode },
5442 { Bad_Opcode },
ec6f095a 5443 { "vpsllq", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5444 },
5445
592a252b 5446 /* PREFIX_VEX_0FF4 */
c0f3af97 5447 {
592d1631
L
5448 { Bad_Opcode },
5449 { Bad_Opcode },
ec6f095a 5450 { "vpmuludq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5451 },
5452
592a252b 5453 /* PREFIX_VEX_0FF5 */
c0f3af97 5454 {
592d1631
L
5455 { Bad_Opcode },
5456 { Bad_Opcode },
ec6f095a 5457 { "vpmaddwd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5458 },
5459
592a252b 5460 /* PREFIX_VEX_0FF6 */
c0f3af97 5461 {
592d1631
L
5462 { Bad_Opcode },
5463 { Bad_Opcode },
ec6f095a 5464 { "vpsadbw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5465 },
5466
592a252b 5467 /* PREFIX_VEX_0FF7 */
c0f3af97 5468 {
592d1631
L
5469 { Bad_Opcode },
5470 { Bad_Opcode },
592a252b 5471 { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2) },
c0f3af97
L
5472 },
5473
592a252b 5474 /* PREFIX_VEX_0FF8 */
c0f3af97 5475 {
592d1631
L
5476 { Bad_Opcode },
5477 { Bad_Opcode },
ec6f095a 5478 { "vpsubb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5479 },
5480
592a252b 5481 /* PREFIX_VEX_0FF9 */
c0f3af97 5482 {
592d1631
L
5483 { Bad_Opcode },
5484 { Bad_Opcode },
ec6f095a 5485 { "vpsubw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5486 },
5487
592a252b 5488 /* PREFIX_VEX_0FFA */
c0f3af97 5489 {
592d1631
L
5490 { Bad_Opcode },
5491 { Bad_Opcode },
ec6f095a 5492 { "vpsubd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5493 },
5494
592a252b 5495 /* PREFIX_VEX_0FFB */
c0f3af97 5496 {
592d1631
L
5497 { Bad_Opcode },
5498 { Bad_Opcode },
ec6f095a 5499 { "vpsubq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5500 },
5501
592a252b 5502 /* PREFIX_VEX_0FFC */
c0f3af97 5503 {
592d1631
L
5504 { Bad_Opcode },
5505 { Bad_Opcode },
ec6f095a 5506 { "vpaddb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5507 },
5508
592a252b 5509 /* PREFIX_VEX_0FFD */
c0f3af97 5510 {
592d1631
L
5511 { Bad_Opcode },
5512 { Bad_Opcode },
ec6f095a 5513 { "vpaddw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5514 },
5515
592a252b 5516 /* PREFIX_VEX_0FFE */
c0f3af97 5517 {
592d1631
L
5518 { Bad_Opcode },
5519 { Bad_Opcode },
ec6f095a 5520 { "vpaddd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5521 },
5522
592a252b 5523 /* PREFIX_VEX_0F3800 */
c0f3af97 5524 {
592d1631
L
5525 { Bad_Opcode },
5526 { Bad_Opcode },
ec6f095a 5527 { "vpshufb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5528 },
5529
592a252b 5530 /* PREFIX_VEX_0F3801 */
c0f3af97 5531 {
592d1631
L
5532 { Bad_Opcode },
5533 { Bad_Opcode },
ec6f095a 5534 { "vphaddw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5535 },
5536
592a252b 5537 /* PREFIX_VEX_0F3802 */
c0f3af97 5538 {
592d1631
L
5539 { Bad_Opcode },
5540 { Bad_Opcode },
ec6f095a 5541 { "vphaddd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5542 },
5543
592a252b 5544 /* PREFIX_VEX_0F3803 */
c0f3af97 5545 {
592d1631
L
5546 { Bad_Opcode },
5547 { Bad_Opcode },
ec6f095a 5548 { "vphaddsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5549 },
5550
592a252b 5551 /* PREFIX_VEX_0F3804 */
c0f3af97 5552 {
592d1631
L
5553 { Bad_Opcode },
5554 { Bad_Opcode },
ec6f095a 5555 { "vpmaddubsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5556 },
5557
592a252b 5558 /* PREFIX_VEX_0F3805 */
c0f3af97 5559 {
592d1631
L
5560 { Bad_Opcode },
5561 { Bad_Opcode },
ec6f095a 5562 { "vphsubw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5563 },
5564
592a252b 5565 /* PREFIX_VEX_0F3806 */
c0f3af97 5566 {
592d1631
L
5567 { Bad_Opcode },
5568 { Bad_Opcode },
ec6f095a 5569 { "vphsubd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5570 },
5571
592a252b 5572 /* PREFIX_VEX_0F3807 */
c0f3af97 5573 {
592d1631
L
5574 { Bad_Opcode },
5575 { Bad_Opcode },
ec6f095a 5576 { "vphsubsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5577 },
5578
592a252b 5579 /* PREFIX_VEX_0F3808 */
c0f3af97 5580 {
592d1631
L
5581 { Bad_Opcode },
5582 { Bad_Opcode },
ec6f095a 5583 { "vpsignb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5584 },
5585
592a252b 5586 /* PREFIX_VEX_0F3809 */
c0f3af97 5587 {
592d1631
L
5588 { Bad_Opcode },
5589 { Bad_Opcode },
ec6f095a 5590 { "vpsignw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5591 },
5592
592a252b 5593 /* PREFIX_VEX_0F380A */
c0f3af97 5594 {
592d1631
L
5595 { Bad_Opcode },
5596 { Bad_Opcode },
ec6f095a 5597 { "vpsignd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5598 },
5599
592a252b 5600 /* PREFIX_VEX_0F380B */
c0f3af97 5601 {
592d1631
L
5602 { Bad_Opcode },
5603 { Bad_Opcode },
ec6f095a 5604 { "vpmulhrsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5605 },
5606
592a252b 5607 /* PREFIX_VEX_0F380C */
c0f3af97 5608 {
592d1631
L
5609 { Bad_Opcode },
5610 { Bad_Opcode },
592a252b 5611 { VEX_W_TABLE (VEX_W_0F380C_P_2) },
c0f3af97
L
5612 },
5613
592a252b 5614 /* PREFIX_VEX_0F380D */
c0f3af97 5615 {
592d1631
L
5616 { Bad_Opcode },
5617 { Bad_Opcode },
592a252b 5618 { VEX_W_TABLE (VEX_W_0F380D_P_2) },
c0f3af97
L
5619 },
5620
592a252b 5621 /* PREFIX_VEX_0F380E */
c0f3af97 5622 {
592d1631
L
5623 { Bad_Opcode },
5624 { Bad_Opcode },
592a252b 5625 { VEX_W_TABLE (VEX_W_0F380E_P_2) },
c0f3af97
L
5626 },
5627
592a252b 5628 /* PREFIX_VEX_0F380F */
c0f3af97 5629 {
592d1631
L
5630 { Bad_Opcode },
5631 { Bad_Opcode },
592a252b 5632 { VEX_W_TABLE (VEX_W_0F380F_P_2) },
c0f3af97
L
5633 },
5634
592a252b 5635 /* PREFIX_VEX_0F3813 */
c7b8aa3a
L
5636 {
5637 { Bad_Opcode },
5638 { Bad_Opcode },
bf890a93 5639 { "vcvtph2ps", { XM, EXxmmq }, 0 },
c7b8aa3a
L
5640 },
5641
6c30d220
L
5642 /* PREFIX_VEX_0F3816 */
5643 {
5644 { Bad_Opcode },
5645 { Bad_Opcode },
5646 { VEX_LEN_TABLE (VEX_LEN_0F3816_P_2) },
5647 },
5648
592a252b 5649 /* PREFIX_VEX_0F3817 */
c0f3af97 5650 {
592d1631
L
5651 { Bad_Opcode },
5652 { Bad_Opcode },
ec6f095a 5653 { "vptest", { XM, EXx }, 0 },
c0f3af97
L
5654 },
5655
592a252b 5656 /* PREFIX_VEX_0F3818 */
c0f3af97 5657 {
592d1631
L
5658 { Bad_Opcode },
5659 { Bad_Opcode },
6c30d220 5660 { VEX_W_TABLE (VEX_W_0F3818_P_2) },
c0f3af97
L
5661 },
5662
592a252b 5663 /* PREFIX_VEX_0F3819 */
c0f3af97 5664 {
592d1631
L
5665 { Bad_Opcode },
5666 { Bad_Opcode },
6c30d220 5667 { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2) },
c0f3af97
L
5668 },
5669
592a252b 5670 /* PREFIX_VEX_0F381A */
c0f3af97 5671 {
592d1631
L
5672 { Bad_Opcode },
5673 { Bad_Opcode },
592a252b 5674 { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2) },
c0f3af97
L
5675 },
5676
592a252b 5677 /* PREFIX_VEX_0F381C */
c0f3af97 5678 {
592d1631
L
5679 { Bad_Opcode },
5680 { Bad_Opcode },
ec6f095a 5681 { "vpabsb", { XM, EXx }, 0 },
c0f3af97
L
5682 },
5683
592a252b 5684 /* PREFIX_VEX_0F381D */
c0f3af97 5685 {
592d1631
L
5686 { Bad_Opcode },
5687 { Bad_Opcode },
ec6f095a 5688 { "vpabsw", { XM, EXx }, 0 },
c0f3af97
L
5689 },
5690
592a252b 5691 /* PREFIX_VEX_0F381E */
c0f3af97 5692 {
592d1631
L
5693 { Bad_Opcode },
5694 { Bad_Opcode },
ec6f095a 5695 { "vpabsd", { XM, EXx }, 0 },
c0f3af97
L
5696 },
5697
592a252b 5698 /* PREFIX_VEX_0F3820 */
c0f3af97 5699 {
592d1631
L
5700 { Bad_Opcode },
5701 { Bad_Opcode },
ec6f095a 5702 { "vpmovsxbw", { XM, EXxmmq }, 0 },
c0f3af97
L
5703 },
5704
592a252b 5705 /* PREFIX_VEX_0F3821 */
c0f3af97 5706 {
592d1631
L
5707 { Bad_Opcode },
5708 { Bad_Opcode },
ec6f095a 5709 { "vpmovsxbd", { XM, EXxmmqd }, 0 },
c0f3af97
L
5710 },
5711
592a252b 5712 /* PREFIX_VEX_0F3822 */
c0f3af97 5713 {
592d1631
L
5714 { Bad_Opcode },
5715 { Bad_Opcode },
ec6f095a 5716 { "vpmovsxbq", { XM, EXxmmdw }, 0 },
c0f3af97
L
5717 },
5718
592a252b 5719 /* PREFIX_VEX_0F3823 */
c0f3af97 5720 {
592d1631
L
5721 { Bad_Opcode },
5722 { Bad_Opcode },
ec6f095a 5723 { "vpmovsxwd", { XM, EXxmmq }, 0 },
c0f3af97
L
5724 },
5725
592a252b 5726 /* PREFIX_VEX_0F3824 */
c0f3af97 5727 {
592d1631
L
5728 { Bad_Opcode },
5729 { Bad_Opcode },
ec6f095a 5730 { "vpmovsxwq", { XM, EXxmmqd }, 0 },
c0f3af97
L
5731 },
5732
592a252b 5733 /* PREFIX_VEX_0F3825 */
c0f3af97 5734 {
592d1631
L
5735 { Bad_Opcode },
5736 { Bad_Opcode },
ec6f095a 5737 { "vpmovsxdq", { XM, EXxmmq }, 0 },
c0f3af97
L
5738 },
5739
592a252b 5740 /* PREFIX_VEX_0F3828 */
c0f3af97 5741 {
592d1631
L
5742 { Bad_Opcode },
5743 { Bad_Opcode },
ec6f095a 5744 { "vpmuldq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5745 },
5746
592a252b 5747 /* PREFIX_VEX_0F3829 */
c0f3af97 5748 {
592d1631
L
5749 { Bad_Opcode },
5750 { Bad_Opcode },
ec6f095a 5751 { "vpcmpeqq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5752 },
5753
592a252b 5754 /* PREFIX_VEX_0F382A */
c0f3af97 5755 {
592d1631
L
5756 { Bad_Opcode },
5757 { Bad_Opcode },
592a252b 5758 { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2) },
c0f3af97
L
5759 },
5760
592a252b 5761 /* PREFIX_VEX_0F382B */
c0f3af97 5762 {
592d1631
L
5763 { Bad_Opcode },
5764 { Bad_Opcode },
ec6f095a 5765 { "vpackusdw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5766 },
5767
592a252b 5768 /* PREFIX_VEX_0F382C */
c0f3af97 5769 {
592d1631
L
5770 { Bad_Opcode },
5771 { Bad_Opcode },
592a252b 5772 { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2) },
c0f3af97
L
5773 },
5774
592a252b 5775 /* PREFIX_VEX_0F382D */
c0f3af97 5776 {
592d1631
L
5777 { Bad_Opcode },
5778 { Bad_Opcode },
592a252b 5779 { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2) },
c0f3af97
L
5780 },
5781
592a252b 5782 /* PREFIX_VEX_0F382E */
c0f3af97 5783 {
592d1631
L
5784 { Bad_Opcode },
5785 { Bad_Opcode },
592a252b 5786 { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2) },
c0f3af97
L
5787 },
5788
592a252b 5789 /* PREFIX_VEX_0F382F */
c0f3af97 5790 {
592d1631
L
5791 { Bad_Opcode },
5792 { Bad_Opcode },
592a252b 5793 { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2) },
c0f3af97
L
5794 },
5795
592a252b 5796 /* PREFIX_VEX_0F3830 */
c0f3af97 5797 {
592d1631
L
5798 { Bad_Opcode },
5799 { Bad_Opcode },
ec6f095a 5800 { "vpmovzxbw", { XM, EXxmmq }, 0 },
c0f3af97
L
5801 },
5802
592a252b 5803 /* PREFIX_VEX_0F3831 */
c0f3af97 5804 {
592d1631
L
5805 { Bad_Opcode },
5806 { Bad_Opcode },
ec6f095a 5807 { "vpmovzxbd", { XM, EXxmmqd }, 0 },
c0f3af97
L
5808 },
5809
592a252b 5810 /* PREFIX_VEX_0F3832 */
c0f3af97 5811 {
592d1631
L
5812 { Bad_Opcode },
5813 { Bad_Opcode },
ec6f095a 5814 { "vpmovzxbq", { XM, EXxmmdw }, 0 },
c0f3af97
L
5815 },
5816
592a252b 5817 /* PREFIX_VEX_0F3833 */
c0f3af97 5818 {
592d1631
L
5819 { Bad_Opcode },
5820 { Bad_Opcode },
ec6f095a 5821 { "vpmovzxwd", { XM, EXxmmq }, 0 },
c0f3af97
L
5822 },
5823
592a252b 5824 /* PREFIX_VEX_0F3834 */
c0f3af97 5825 {
592d1631
L
5826 { Bad_Opcode },
5827 { Bad_Opcode },
ec6f095a 5828 { "vpmovzxwq", { XM, EXxmmqd }, 0 },
c0f3af97
L
5829 },
5830
592a252b 5831 /* PREFIX_VEX_0F3835 */
c0f3af97 5832 {
592d1631
L
5833 { Bad_Opcode },
5834 { Bad_Opcode },
ec6f095a 5835 { "vpmovzxdq", { XM, EXxmmq }, 0 },
6c30d220
L
5836 },
5837
5838 /* PREFIX_VEX_0F3836 */
5839 {
5840 { Bad_Opcode },
5841 { Bad_Opcode },
5842 { VEX_LEN_TABLE (VEX_LEN_0F3836_P_2) },
c0f3af97
L
5843 },
5844
592a252b 5845 /* PREFIX_VEX_0F3837 */
c0f3af97 5846 {
592d1631
L
5847 { Bad_Opcode },
5848 { Bad_Opcode },
ec6f095a 5849 { "vpcmpgtq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5850 },
5851
592a252b 5852 /* PREFIX_VEX_0F3838 */
c0f3af97 5853 {
592d1631
L
5854 { Bad_Opcode },
5855 { Bad_Opcode },
ec6f095a 5856 { "vpminsb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5857 },
5858
592a252b 5859 /* PREFIX_VEX_0F3839 */
c0f3af97 5860 {
592d1631
L
5861 { Bad_Opcode },
5862 { Bad_Opcode },
ec6f095a 5863 { "vpminsd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5864 },
5865
592a252b 5866 /* PREFIX_VEX_0F383A */
c0f3af97 5867 {
592d1631
L
5868 { Bad_Opcode },
5869 { Bad_Opcode },
ec6f095a 5870 { "vpminuw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5871 },
5872
592a252b 5873 /* PREFIX_VEX_0F383B */
c0f3af97 5874 {
592d1631
L
5875 { Bad_Opcode },
5876 { Bad_Opcode },
ec6f095a 5877 { "vpminud", { XM, Vex, EXx }, 0 },
c0f3af97
L
5878 },
5879
592a252b 5880 /* PREFIX_VEX_0F383C */
c0f3af97 5881 {
592d1631
L
5882 { Bad_Opcode },
5883 { Bad_Opcode },
ec6f095a 5884 { "vpmaxsb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5885 },
5886
592a252b 5887 /* PREFIX_VEX_0F383D */
c0f3af97 5888 {
592d1631
L
5889 { Bad_Opcode },
5890 { Bad_Opcode },
ec6f095a 5891 { "vpmaxsd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5892 },
5893
592a252b 5894 /* PREFIX_VEX_0F383E */
c0f3af97 5895 {
592d1631
L
5896 { Bad_Opcode },
5897 { Bad_Opcode },
ec6f095a 5898 { "vpmaxuw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5899 },
5900
592a252b 5901 /* PREFIX_VEX_0F383F */
c0f3af97 5902 {
592d1631
L
5903 { Bad_Opcode },
5904 { Bad_Opcode },
ec6f095a 5905 { "vpmaxud", { XM, Vex, EXx }, 0 },
c0f3af97
L
5906 },
5907
592a252b 5908 /* PREFIX_VEX_0F3840 */
c0f3af97 5909 {
592d1631
L
5910 { Bad_Opcode },
5911 { Bad_Opcode },
ec6f095a 5912 { "vpmulld", { XM, Vex, EXx }, 0 },
c0f3af97
L
5913 },
5914
592a252b 5915 /* PREFIX_VEX_0F3841 */
c0f3af97 5916 {
592d1631
L
5917 { Bad_Opcode },
5918 { Bad_Opcode },
592a252b 5919 { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2) },
c0f3af97
L
5920 },
5921
6c30d220
L
5922 /* PREFIX_VEX_0F3845 */
5923 {
5924 { Bad_Opcode },
5925 { Bad_Opcode },
bf890a93 5926 { "vpsrlv%LW", { XM, Vex, EXx }, 0 },
6c30d220
L
5927 },
5928
5929 /* PREFIX_VEX_0F3846 */
5930 {
5931 { Bad_Opcode },
5932 { Bad_Opcode },
5933 { VEX_W_TABLE (VEX_W_0F3846_P_2) },
5934 },
5935
5936 /* PREFIX_VEX_0F3847 */
5937 {
5938 { Bad_Opcode },
5939 { Bad_Opcode },
bf890a93 5940 { "vpsllv%LW", { XM, Vex, EXx }, 0 },
6c30d220
L
5941 },
5942
5943 /* PREFIX_VEX_0F3858 */
5944 {
5945 { Bad_Opcode },
5946 { Bad_Opcode },
5947 { VEX_W_TABLE (VEX_W_0F3858_P_2) },
5948 },
5949
5950 /* PREFIX_VEX_0F3859 */
5951 {
5952 { Bad_Opcode },
5953 { Bad_Opcode },
5954 { VEX_W_TABLE (VEX_W_0F3859_P_2) },
5955 },
5956
5957 /* PREFIX_VEX_0F385A */
5958 {
5959 { Bad_Opcode },
5960 { Bad_Opcode },
5961 { MOD_TABLE (MOD_VEX_0F385A_PREFIX_2) },
5962 },
5963
5964 /* PREFIX_VEX_0F3878 */
5965 {
5966 { Bad_Opcode },
5967 { Bad_Opcode },
5968 { VEX_W_TABLE (VEX_W_0F3878_P_2) },
5969 },
5970
5971 /* PREFIX_VEX_0F3879 */
5972 {
5973 { Bad_Opcode },
5974 { Bad_Opcode },
5975 { VEX_W_TABLE (VEX_W_0F3879_P_2) },
5976 },
5977
5978 /* PREFIX_VEX_0F388C */
5979 {
5980 { Bad_Opcode },
5981 { Bad_Opcode },
f7002f42 5982 { MOD_TABLE (MOD_VEX_0F388C_PREFIX_2) },
6c30d220
L
5983 },
5984
5985 /* PREFIX_VEX_0F388E */
5986 {
5987 { Bad_Opcode },
5988 { Bad_Opcode },
f7002f42 5989 { MOD_TABLE (MOD_VEX_0F388E_PREFIX_2) },
6c30d220
L
5990 },
5991
5992 /* PREFIX_VEX_0F3890 */
5993 {
5994 { Bad_Opcode },
5995 { Bad_Opcode },
bf890a93 5996 { "vpgatherd%LW", { XM, MVexVSIBDWpX, Vex }, 0 },
6c30d220
L
5997 },
5998
5999 /* PREFIX_VEX_0F3891 */
6000 {
6001 { Bad_Opcode },
6002 { Bad_Opcode },
bf890a93 6003 { "vpgatherq%LW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6c30d220
L
6004 },
6005
6006 /* PREFIX_VEX_0F3892 */
6007 {
6008 { Bad_Opcode },
6009 { Bad_Opcode },
bf890a93 6010 { "vgatherdp%XW", { XM, MVexVSIBDWpX, Vex }, 0 },
6c30d220
L
6011 },
6012
6013 /* PREFIX_VEX_0F3893 */
6014 {
6015 { Bad_Opcode },
6016 { Bad_Opcode },
bf890a93 6017 { "vgatherqp%XW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6c30d220
L
6018 },
6019
592a252b 6020 /* PREFIX_VEX_0F3896 */
a5ff0eb2 6021 {
592d1631
L
6022 { Bad_Opcode },
6023 { Bad_Opcode },
bf890a93 6024 { "vfmaddsub132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6025 },
6026
592a252b 6027 /* PREFIX_VEX_0F3897 */
a5ff0eb2 6028 {
592d1631
L
6029 { Bad_Opcode },
6030 { Bad_Opcode },
bf890a93 6031 { "vfmsubadd132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6032 },
6033
592a252b 6034 /* PREFIX_VEX_0F3898 */
a5ff0eb2 6035 {
592d1631
L
6036 { Bad_Opcode },
6037 { Bad_Opcode },
bf890a93 6038 { "vfmadd132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6039 },
6040
592a252b 6041 /* PREFIX_VEX_0F3899 */
a5ff0eb2 6042 {
592d1631
L
6043 { Bad_Opcode },
6044 { Bad_Opcode },
bf890a93 6045 { "vfmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
a5ff0eb2
L
6046 },
6047
592a252b 6048 /* PREFIX_VEX_0F389A */
a5ff0eb2 6049 {
592d1631
L
6050 { Bad_Opcode },
6051 { Bad_Opcode },
bf890a93 6052 { "vfmsub132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6053 },
6054
592a252b 6055 /* PREFIX_VEX_0F389B */
c0f3af97 6056 {
592d1631
L
6057 { Bad_Opcode },
6058 { Bad_Opcode },
bf890a93 6059 { "vfmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6060 },
6061
592a252b 6062 /* PREFIX_VEX_0F389C */
c0f3af97 6063 {
592d1631
L
6064 { Bad_Opcode },
6065 { Bad_Opcode },
bf890a93 6066 { "vfnmadd132p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6067 },
6068
592a252b 6069 /* PREFIX_VEX_0F389D */
c0f3af97 6070 {
592d1631
L
6071 { Bad_Opcode },
6072 { Bad_Opcode },
bf890a93 6073 { "vfnmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6074 },
6075
592a252b 6076 /* PREFIX_VEX_0F389E */
c0f3af97 6077 {
592d1631
L
6078 { Bad_Opcode },
6079 { Bad_Opcode },
bf890a93 6080 { "vfnmsub132p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6081 },
6082
592a252b 6083 /* PREFIX_VEX_0F389F */
c0f3af97 6084 {
592d1631
L
6085 { Bad_Opcode },
6086 { Bad_Opcode },
bf890a93 6087 { "vfnmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6088 },
6089
592a252b 6090 /* PREFIX_VEX_0F38A6 */
c0f3af97 6091 {
592d1631
L
6092 { Bad_Opcode },
6093 { Bad_Opcode },
bf890a93 6094 { "vfmaddsub213p%XW", { XM, Vex, EXx }, 0 },
592d1631 6095 { Bad_Opcode },
c0f3af97
L
6096 },
6097
592a252b 6098 /* PREFIX_VEX_0F38A7 */
c0f3af97 6099 {
592d1631
L
6100 { Bad_Opcode },
6101 { Bad_Opcode },
bf890a93 6102 { "vfmsubadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6103 },
6104
592a252b 6105 /* PREFIX_VEX_0F38A8 */
c0f3af97 6106 {
592d1631
L
6107 { Bad_Opcode },
6108 { Bad_Opcode },
bf890a93 6109 { "vfmadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6110 },
6111
592a252b 6112 /* PREFIX_VEX_0F38A9 */
c0f3af97 6113 {
592d1631
L
6114 { Bad_Opcode },
6115 { Bad_Opcode },
bf890a93 6116 { "vfmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6117 },
6118
592a252b 6119 /* PREFIX_VEX_0F38AA */
c0f3af97 6120 {
592d1631
L
6121 { Bad_Opcode },
6122 { Bad_Opcode },
bf890a93 6123 { "vfmsub213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6124 },
6125
592a252b 6126 /* PREFIX_VEX_0F38AB */
c0f3af97 6127 {
592d1631
L
6128 { Bad_Opcode },
6129 { Bad_Opcode },
bf890a93 6130 { "vfmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6131 },
6132
592a252b 6133 /* PREFIX_VEX_0F38AC */
c0f3af97 6134 {
592d1631
L
6135 { Bad_Opcode },
6136 { Bad_Opcode },
bf890a93 6137 { "vfnmadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6138 },
6139
592a252b 6140 /* PREFIX_VEX_0F38AD */
c0f3af97 6141 {
592d1631
L
6142 { Bad_Opcode },
6143 { Bad_Opcode },
bf890a93 6144 { "vfnmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6145 },
6146
592a252b 6147 /* PREFIX_VEX_0F38AE */
c0f3af97 6148 {
592d1631
L
6149 { Bad_Opcode },
6150 { Bad_Opcode },
bf890a93 6151 { "vfnmsub213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6152 },
6153
592a252b 6154 /* PREFIX_VEX_0F38AF */
c0f3af97 6155 {
592d1631
L
6156 { Bad_Opcode },
6157 { Bad_Opcode },
bf890a93 6158 { "vfnmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6159 },
6160
592a252b 6161 /* PREFIX_VEX_0F38B6 */
c0f3af97 6162 {
592d1631
L
6163 { Bad_Opcode },
6164 { Bad_Opcode },
bf890a93 6165 { "vfmaddsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6166 },
6167
592a252b 6168 /* PREFIX_VEX_0F38B7 */
c0f3af97 6169 {
592d1631
L
6170 { Bad_Opcode },
6171 { Bad_Opcode },
bf890a93 6172 { "vfmsubadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6173 },
6174
592a252b 6175 /* PREFIX_VEX_0F38B8 */
c0f3af97 6176 {
592d1631
L
6177 { Bad_Opcode },
6178 { Bad_Opcode },
bf890a93 6179 { "vfmadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6180 },
6181
592a252b 6182 /* PREFIX_VEX_0F38B9 */
c0f3af97 6183 {
592d1631
L
6184 { Bad_Opcode },
6185 { Bad_Opcode },
bf890a93 6186 { "vfmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6187 },
6188
592a252b 6189 /* PREFIX_VEX_0F38BA */
c0f3af97 6190 {
592d1631
L
6191 { Bad_Opcode },
6192 { Bad_Opcode },
bf890a93 6193 { "vfmsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6194 },
6195
592a252b 6196 /* PREFIX_VEX_0F38BB */
c0f3af97 6197 {
592d1631
L
6198 { Bad_Opcode },
6199 { Bad_Opcode },
bf890a93 6200 { "vfmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6201 },
6202
592a252b 6203 /* PREFIX_VEX_0F38BC */
c0f3af97 6204 {
592d1631
L
6205 { Bad_Opcode },
6206 { Bad_Opcode },
bf890a93 6207 { "vfnmadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6208 },
6209
592a252b 6210 /* PREFIX_VEX_0F38BD */
c0f3af97 6211 {
592d1631
L
6212 { Bad_Opcode },
6213 { Bad_Opcode },
bf890a93 6214 { "vfnmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6215 },
6216
592a252b 6217 /* PREFIX_VEX_0F38BE */
c0f3af97 6218 {
592d1631
L
6219 { Bad_Opcode },
6220 { Bad_Opcode },
bf890a93 6221 { "vfnmsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6222 },
6223
592a252b 6224 /* PREFIX_VEX_0F38BF */
c0f3af97 6225 {
592d1631
L
6226 { Bad_Opcode },
6227 { Bad_Opcode },
bf890a93 6228 { "vfnmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6229 },
6230
48521003
IT
6231 /* PREFIX_VEX_0F38CF */
6232 {
6233 { Bad_Opcode },
6234 { Bad_Opcode },
6235 { VEX_W_TABLE (VEX_W_0F38CF_P_2) },
6236 },
6237
592a252b 6238 /* PREFIX_VEX_0F38DB */
c0f3af97 6239 {
592d1631
L
6240 { Bad_Opcode },
6241 { Bad_Opcode },
592a252b 6242 { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2) },
c0f3af97
L
6243 },
6244
592a252b 6245 /* PREFIX_VEX_0F38DC */
c0f3af97 6246 {
592d1631
L
6247 { Bad_Opcode },
6248 { Bad_Opcode },
8dcf1fad 6249 { "vaesenc", { XM, Vex, EXx }, 0 },
c0f3af97
L
6250 },
6251
592a252b 6252 /* PREFIX_VEX_0F38DD */
c0f3af97 6253 {
592d1631
L
6254 { Bad_Opcode },
6255 { Bad_Opcode },
8dcf1fad 6256 { "vaesenclast", { XM, Vex, EXx }, 0 },
c0f3af97
L
6257 },
6258
592a252b 6259 /* PREFIX_VEX_0F38DE */
c0f3af97 6260 {
592d1631
L
6261 { Bad_Opcode },
6262 { Bad_Opcode },
8dcf1fad 6263 { "vaesdec", { XM, Vex, EXx }, 0 },
c0f3af97
L
6264 },
6265
592a252b 6266 /* PREFIX_VEX_0F38DF */
c0f3af97 6267 {
592d1631
L
6268 { Bad_Opcode },
6269 { Bad_Opcode },
8dcf1fad 6270 { "vaesdeclast", { XM, Vex, EXx }, 0 },
c0f3af97
L
6271 },
6272
f12dc422
L
6273 /* PREFIX_VEX_0F38F2 */
6274 {
6275 { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0) },
6276 },
6277
6278 /* PREFIX_VEX_0F38F3_REG_1 */
6279 {
6280 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0) },
6281 },
6282
6283 /* PREFIX_VEX_0F38F3_REG_2 */
6284 {
6285 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0) },
6286 },
6287
6288 /* PREFIX_VEX_0F38F3_REG_3 */
6289 {
6290 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0) },
6291 },
6292
6c30d220
L
6293 /* PREFIX_VEX_0F38F5 */
6294 {
6295 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_0) },
6296 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_1) },
6297 { Bad_Opcode },
6298 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_3) },
6299 },
6300
6301 /* PREFIX_VEX_0F38F6 */
6302 {
6303 { Bad_Opcode },
6304 { Bad_Opcode },
6305 { Bad_Opcode },
6306 { VEX_LEN_TABLE (VEX_LEN_0F38F6_P_3) },
6307 },
6308
f12dc422
L
6309 /* PREFIX_VEX_0F38F7 */
6310 {
6311 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0) },
6c30d220
L
6312 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_1) },
6313 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_2) },
6314 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_3) },
6315 },
6316
6317 /* PREFIX_VEX_0F3A00 */
6318 {
6319 { Bad_Opcode },
6320 { Bad_Opcode },
6321 { VEX_LEN_TABLE (VEX_LEN_0F3A00_P_2) },
6322 },
6323
6324 /* PREFIX_VEX_0F3A01 */
6325 {
6326 { Bad_Opcode },
6327 { Bad_Opcode },
6328 { VEX_LEN_TABLE (VEX_LEN_0F3A01_P_2) },
6329 },
6330
6331 /* PREFIX_VEX_0F3A02 */
6332 {
6333 { Bad_Opcode },
6334 { Bad_Opcode },
6335 { VEX_W_TABLE (VEX_W_0F3A02_P_2) },
f12dc422
L
6336 },
6337
592a252b 6338 /* PREFIX_VEX_0F3A04 */
c0f3af97 6339 {
592d1631
L
6340 { Bad_Opcode },
6341 { Bad_Opcode },
592a252b 6342 { VEX_W_TABLE (VEX_W_0F3A04_P_2) },
c0f3af97
L
6343 },
6344
592a252b 6345 /* PREFIX_VEX_0F3A05 */
c0f3af97 6346 {
592d1631
L
6347 { Bad_Opcode },
6348 { Bad_Opcode },
592a252b 6349 { VEX_W_TABLE (VEX_W_0F3A05_P_2) },
c0f3af97
L
6350 },
6351
592a252b 6352 /* PREFIX_VEX_0F3A06 */
c0f3af97 6353 {
592d1631
L
6354 { Bad_Opcode },
6355 { Bad_Opcode },
592a252b 6356 { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2) },
c0f3af97
L
6357 },
6358
592a252b 6359 /* PREFIX_VEX_0F3A08 */
c0f3af97 6360 {
592d1631
L
6361 { Bad_Opcode },
6362 { Bad_Opcode },
ec6f095a 6363 { "vroundps", { XM, EXx, Ib }, 0 },
c0f3af97
L
6364 },
6365
592a252b 6366 /* PREFIX_VEX_0F3A09 */
c0f3af97 6367 {
592d1631
L
6368 { Bad_Opcode },
6369 { Bad_Opcode },
ec6f095a 6370 { "vroundpd", { XM, EXx, Ib }, 0 },
c0f3af97
L
6371 },
6372
592a252b 6373 /* PREFIX_VEX_0F3A0A */
c0f3af97 6374 {
592d1631
L
6375 { Bad_Opcode },
6376 { Bad_Opcode },
ec6f095a 6377 { "vroundss", { XMScalar, VexScalar, EXdScalar, Ib }, 0 },
0bfee649
L
6378 },
6379
592a252b 6380 /* PREFIX_VEX_0F3A0B */
0bfee649 6381 {
592d1631
L
6382 { Bad_Opcode },
6383 { Bad_Opcode },
ec6f095a 6384 { "vroundsd", { XMScalar, VexScalar, EXqScalar, Ib }, 0 },
0bfee649
L
6385 },
6386
592a252b 6387 /* PREFIX_VEX_0F3A0C */
0bfee649 6388 {
592d1631
L
6389 { Bad_Opcode },
6390 { Bad_Opcode },
ec6f095a 6391 { "vblendps", { XM, Vex, EXx, Ib }, 0 },
0bfee649
L
6392 },
6393
592a252b 6394 /* PREFIX_VEX_0F3A0D */
0bfee649 6395 {
592d1631
L
6396 { Bad_Opcode },
6397 { Bad_Opcode },
ec6f095a 6398 { "vblendpd", { XM, Vex, EXx, Ib }, 0 },
c0f3af97
L
6399 },
6400
592a252b 6401 /* PREFIX_VEX_0F3A0E */
0bfee649 6402 {
592d1631
L
6403 { Bad_Opcode },
6404 { Bad_Opcode },
ec6f095a 6405 { "vpblendw", { XM, Vex, EXx, Ib }, 0 },
0bfee649
L
6406 },
6407
592a252b 6408 /* PREFIX_VEX_0F3A0F */
0bfee649 6409 {
592d1631
L
6410 { Bad_Opcode },
6411 { Bad_Opcode },
ec6f095a 6412 { "vpalignr", { XM, Vex, EXx, Ib }, 0 },
0bfee649
L
6413 },
6414
592a252b 6415 /* PREFIX_VEX_0F3A14 */
0bfee649 6416 {
592d1631
L
6417 { Bad_Opcode },
6418 { Bad_Opcode },
592a252b 6419 { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2) },
0bfee649
L
6420 },
6421
592a252b 6422 /* PREFIX_VEX_0F3A15 */
0bfee649 6423 {
592d1631
L
6424 { Bad_Opcode },
6425 { Bad_Opcode },
592a252b 6426 { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2) },
0bfee649
L
6427 },
6428
592a252b 6429 /* PREFIX_VEX_0F3A16 */
c0f3af97 6430 {
592d1631
L
6431 { Bad_Opcode },
6432 { Bad_Opcode },
592a252b 6433 { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2) },
c0f3af97
L
6434 },
6435
592a252b 6436 /* PREFIX_VEX_0F3A17 */
c0f3af97 6437 {
592d1631
L
6438 { Bad_Opcode },
6439 { Bad_Opcode },
592a252b 6440 { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2) },
c0f3af97
L
6441 },
6442
592a252b 6443 /* PREFIX_VEX_0F3A18 */
c0f3af97 6444 {
592d1631
L
6445 { Bad_Opcode },
6446 { Bad_Opcode },
592a252b 6447 { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2) },
c0f3af97
L
6448 },
6449
592a252b 6450 /* PREFIX_VEX_0F3A19 */
c0f3af97 6451 {
592d1631
L
6452 { Bad_Opcode },
6453 { Bad_Opcode },
592a252b 6454 { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2) },
c0f3af97
L
6455 },
6456
592a252b 6457 /* PREFIX_VEX_0F3A1D */
c7b8aa3a
L
6458 {
6459 { Bad_Opcode },
6460 { Bad_Opcode },
bf890a93 6461 { "vcvtps2ph", { EXxmmq, XM, Ib }, 0 },
c7b8aa3a
L
6462 },
6463
592a252b 6464 /* PREFIX_VEX_0F3A20 */
c0f3af97 6465 {
592d1631
L
6466 { Bad_Opcode },
6467 { Bad_Opcode },
592a252b 6468 { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2) },
c0f3af97
L
6469 },
6470
592a252b 6471 /* PREFIX_VEX_0F3A21 */
c0f3af97 6472 {
592d1631
L
6473 { Bad_Opcode },
6474 { Bad_Opcode },
592a252b 6475 { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2) },
c0f3af97
L
6476 },
6477
592a252b 6478 /* PREFIX_VEX_0F3A22 */
0bfee649 6479 {
592d1631
L
6480 { Bad_Opcode },
6481 { Bad_Opcode },
592a252b 6482 { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2) },
0bfee649
L
6483 },
6484
43234a1e
L
6485 /* PREFIX_VEX_0F3A30 */
6486 {
6487 { Bad_Opcode },
6488 { Bad_Opcode },
6489 { VEX_LEN_TABLE (VEX_LEN_0F3A30_P_2) },
6490 },
6491
1ba585e8
IT
6492 /* PREFIX_VEX_0F3A31 */
6493 {
6494 { Bad_Opcode },
6495 { Bad_Opcode },
6496 { VEX_LEN_TABLE (VEX_LEN_0F3A31_P_2) },
6497 },
6498
43234a1e
L
6499 /* PREFIX_VEX_0F3A32 */
6500 {
6501 { Bad_Opcode },
6502 { Bad_Opcode },
6503 { VEX_LEN_TABLE (VEX_LEN_0F3A32_P_2) },
6504 },
6505
1ba585e8
IT
6506 /* PREFIX_VEX_0F3A33 */
6507 {
6508 { Bad_Opcode },
6509 { Bad_Opcode },
6510 { VEX_LEN_TABLE (VEX_LEN_0F3A33_P_2) },
6511 },
6512
6c30d220
L
6513 /* PREFIX_VEX_0F3A38 */
6514 {
6515 { Bad_Opcode },
6516 { Bad_Opcode },
6517 { VEX_LEN_TABLE (VEX_LEN_0F3A38_P_2) },
6518 },
6519
6520 /* PREFIX_VEX_0F3A39 */
6521 {
6522 { Bad_Opcode },
6523 { Bad_Opcode },
6524 { VEX_LEN_TABLE (VEX_LEN_0F3A39_P_2) },
6525 },
6526
592a252b 6527 /* PREFIX_VEX_0F3A40 */
c0f3af97 6528 {
592d1631
L
6529 { Bad_Opcode },
6530 { Bad_Opcode },
ec6f095a 6531 { "vdpps", { XM, Vex, EXx, Ib }, 0 },
c0f3af97
L
6532 },
6533
592a252b 6534 /* PREFIX_VEX_0F3A41 */
c0f3af97 6535 {
592d1631
L
6536 { Bad_Opcode },
6537 { Bad_Opcode },
592a252b 6538 { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2) },
c0f3af97
L
6539 },
6540
592a252b 6541 /* PREFIX_VEX_0F3A42 */
c0f3af97 6542 {
592d1631
L
6543 { Bad_Opcode },
6544 { Bad_Opcode },
ec6f095a 6545 { "vmpsadbw", { XM, Vex, EXx, Ib }, 0 },
c0f3af97
L
6546 },
6547
592a252b 6548 /* PREFIX_VEX_0F3A44 */
ce2f5b3c 6549 {
592d1631
L
6550 { Bad_Opcode },
6551 { Bad_Opcode },
ff1982d5 6552 { "vpclmulqdq", { XM, Vex, EXx, PCLMUL }, 0 },
ce2f5b3c
L
6553 },
6554
6c30d220
L
6555 /* PREFIX_VEX_0F3A46 */
6556 {
6557 { Bad_Opcode },
6558 { Bad_Opcode },
6559 { VEX_LEN_TABLE (VEX_LEN_0F3A46_P_2) },
6560 },
6561
592a252b 6562 /* PREFIX_VEX_0F3A48 */
a683cc34
SP
6563 {
6564 { Bad_Opcode },
6565 { Bad_Opcode },
592a252b 6566 { VEX_W_TABLE (VEX_W_0F3A48_P_2) },
a683cc34
SP
6567 },
6568
592a252b 6569 /* PREFIX_VEX_0F3A49 */
a683cc34
SP
6570 {
6571 { Bad_Opcode },
6572 { Bad_Opcode },
592a252b 6573 { VEX_W_TABLE (VEX_W_0F3A49_P_2) },
a683cc34
SP
6574 },
6575
592a252b 6576 /* PREFIX_VEX_0F3A4A */
c0f3af97 6577 {
592d1631
L
6578 { Bad_Opcode },
6579 { Bad_Opcode },
592a252b 6580 { VEX_W_TABLE (VEX_W_0F3A4A_P_2) },
c0f3af97
L
6581 },
6582
592a252b 6583 /* PREFIX_VEX_0F3A4B */
c0f3af97 6584 {
592d1631
L
6585 { Bad_Opcode },
6586 { Bad_Opcode },
592a252b 6587 { VEX_W_TABLE (VEX_W_0F3A4B_P_2) },
c0f3af97
L
6588 },
6589
592a252b 6590 /* PREFIX_VEX_0F3A4C */
c0f3af97 6591 {
592d1631
L
6592 { Bad_Opcode },
6593 { Bad_Opcode },
6c30d220 6594 { VEX_W_TABLE (VEX_W_0F3A4C_P_2) },
c0f3af97
L
6595 },
6596
592a252b 6597 /* PREFIX_VEX_0F3A5C */
922d8de8 6598 {
592d1631
L
6599 { Bad_Opcode },
6600 { Bad_Opcode },
3a2430e0 6601 { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6602 },
6603
592a252b 6604 /* PREFIX_VEX_0F3A5D */
922d8de8 6605 {
592d1631
L
6606 { Bad_Opcode },
6607 { Bad_Opcode },
3a2430e0 6608 { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6609 },
6610
592a252b 6611 /* PREFIX_VEX_0F3A5E */
922d8de8 6612 {
592d1631
L
6613 { Bad_Opcode },
6614 { Bad_Opcode },
3a2430e0 6615 { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6616 },
6617
592a252b 6618 /* PREFIX_VEX_0F3A5F */
922d8de8 6619 {
592d1631
L
6620 { Bad_Opcode },
6621 { Bad_Opcode },
3a2430e0 6622 { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6623 },
6624
592a252b 6625 /* PREFIX_VEX_0F3A60 */
c0f3af97 6626 {
592d1631
L
6627 { Bad_Opcode },
6628 { Bad_Opcode },
592a252b 6629 { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2) },
592d1631 6630 { Bad_Opcode },
c0f3af97
L
6631 },
6632
592a252b 6633 /* PREFIX_VEX_0F3A61 */
c0f3af97 6634 {
592d1631
L
6635 { Bad_Opcode },
6636 { Bad_Opcode },
592a252b 6637 { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2) },
c0f3af97
L
6638 },
6639
592a252b 6640 /* PREFIX_VEX_0F3A62 */
c0f3af97 6641 {
592d1631
L
6642 { Bad_Opcode },
6643 { Bad_Opcode },
592a252b 6644 { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2) },
c0f3af97
L
6645 },
6646
592a252b 6647 /* PREFIX_VEX_0F3A63 */
c0f3af97 6648 {
592d1631
L
6649 { Bad_Opcode },
6650 { Bad_Opcode },
592a252b 6651 { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2) },
c0f3af97 6652 },
a5ff0eb2 6653
592a252b 6654 /* PREFIX_VEX_0F3A68 */
922d8de8 6655 {
592d1631
L
6656 { Bad_Opcode },
6657 { Bad_Opcode },
3a2430e0 6658 { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6659 },
6660
592a252b 6661 /* PREFIX_VEX_0F3A69 */
922d8de8 6662 {
592d1631
L
6663 { Bad_Opcode },
6664 { Bad_Opcode },
3a2430e0 6665 { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6666 },
6667
592a252b 6668 /* PREFIX_VEX_0F3A6A */
922d8de8 6669 {
592d1631
L
6670 { Bad_Opcode },
6671 { Bad_Opcode },
592a252b 6672 { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2) },
922d8de8
DR
6673 },
6674
592a252b 6675 /* PREFIX_VEX_0F3A6B */
922d8de8 6676 {
592d1631
L
6677 { Bad_Opcode },
6678 { Bad_Opcode },
592a252b 6679 { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2) },
922d8de8
DR
6680 },
6681
592a252b 6682 /* PREFIX_VEX_0F3A6C */
922d8de8 6683 {
592d1631
L
6684 { Bad_Opcode },
6685 { Bad_Opcode },
3a2430e0 6686 { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6687 },
6688
592a252b 6689 /* PREFIX_VEX_0F3A6D */
922d8de8 6690 {
592d1631
L
6691 { Bad_Opcode },
6692 { Bad_Opcode },
3a2430e0 6693 { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6694 },
6695
592a252b 6696 /* PREFIX_VEX_0F3A6E */
922d8de8 6697 {
592d1631
L
6698 { Bad_Opcode },
6699 { Bad_Opcode },
592a252b 6700 { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2) },
922d8de8
DR
6701 },
6702
592a252b 6703 /* PREFIX_VEX_0F3A6F */
922d8de8 6704 {
592d1631
L
6705 { Bad_Opcode },
6706 { Bad_Opcode },
592a252b 6707 { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2) },
922d8de8
DR
6708 },
6709
592a252b 6710 /* PREFIX_VEX_0F3A78 */
922d8de8 6711 {
592d1631
L
6712 { Bad_Opcode },
6713 { Bad_Opcode },
3a2430e0 6714 { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6715 },
6716
592a252b 6717 /* PREFIX_VEX_0F3A79 */
922d8de8 6718 {
592d1631
L
6719 { Bad_Opcode },
6720 { Bad_Opcode },
3a2430e0 6721 { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6722 },
6723
592a252b 6724 /* PREFIX_VEX_0F3A7A */
922d8de8 6725 {
592d1631
L
6726 { Bad_Opcode },
6727 { Bad_Opcode },
592a252b 6728 { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2) },
922d8de8
DR
6729 },
6730
592a252b 6731 /* PREFIX_VEX_0F3A7B */
922d8de8 6732 {
592d1631
L
6733 { Bad_Opcode },
6734 { Bad_Opcode },
592a252b 6735 { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2) },
922d8de8
DR
6736 },
6737
592a252b 6738 /* PREFIX_VEX_0F3A7C */
922d8de8 6739 {
592d1631
L
6740 { Bad_Opcode },
6741 { Bad_Opcode },
3a2430e0 6742 { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
592d1631 6743 { Bad_Opcode },
922d8de8
DR
6744 },
6745
592a252b 6746 /* PREFIX_VEX_0F3A7D */
922d8de8 6747 {
592d1631
L
6748 { Bad_Opcode },
6749 { Bad_Opcode },
3a2430e0 6750 { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6751 },
6752
592a252b 6753 /* PREFIX_VEX_0F3A7E */
922d8de8 6754 {
592d1631
L
6755 { Bad_Opcode },
6756 { Bad_Opcode },
592a252b 6757 { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2) },
922d8de8
DR
6758 },
6759
592a252b 6760 /* PREFIX_VEX_0F3A7F */
922d8de8 6761 {
592d1631
L
6762 { Bad_Opcode },
6763 { Bad_Opcode },
592a252b 6764 { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2) },
922d8de8
DR
6765 },
6766
48521003
IT
6767 /* PREFIX_VEX_0F3ACE */
6768 {
6769 { Bad_Opcode },
6770 { Bad_Opcode },
6771 { VEX_W_TABLE (VEX_W_0F3ACE_P_2) },
6772 },
6773
6774 /* PREFIX_VEX_0F3ACF */
6775 {
6776 { Bad_Opcode },
6777 { Bad_Opcode },
6778 { VEX_W_TABLE (VEX_W_0F3ACF_P_2) },
6779 },
6780
592a252b 6781 /* PREFIX_VEX_0F3ADF */
a5ff0eb2 6782 {
592d1631
L
6783 { Bad_Opcode },
6784 { Bad_Opcode },
592a252b 6785 { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2) },
a5ff0eb2 6786 },
6c30d220
L
6787
6788 /* PREFIX_VEX_0F3AF0 */
6789 {
6790 { Bad_Opcode },
6791 { Bad_Opcode },
6792 { Bad_Opcode },
6793 { VEX_LEN_TABLE (VEX_LEN_0F3AF0_P_3) },
6794 },
43234a1e 6795
ad692897 6796#include "i386-dis-evex-prefix.h"
c0f3af97
L
6797};
6798
6799static const struct dis386 x86_64_table[][2] = {
6800 /* X86_64_06 */
6801 {
bf890a93 6802 { "pushP", { es }, 0 },
c0f3af97
L
6803 },
6804
6805 /* X86_64_07 */
6806 {
bf890a93 6807 { "popP", { es }, 0 },
c0f3af97
L
6808 },
6809
6810 /* X86_64_0D */
6811 {
bf890a93 6812 { "pushP", { cs }, 0 },
c0f3af97
L
6813 },
6814
6815 /* X86_64_16 */
6816 {
bf890a93 6817 { "pushP", { ss }, 0 },
c0f3af97
L
6818 },
6819
6820 /* X86_64_17 */
6821 {
bf890a93 6822 { "popP", { ss }, 0 },
c0f3af97
L
6823 },
6824
6825 /* X86_64_1E */
6826 {
bf890a93 6827 { "pushP", { ds }, 0 },
c0f3af97
L
6828 },
6829
6830 /* X86_64_1F */
6831 {
bf890a93 6832 { "popP", { ds }, 0 },
c0f3af97
L
6833 },
6834
6835 /* X86_64_27 */
6836 {
bf890a93 6837 { "daa", { XX }, 0 },
c0f3af97
L
6838 },
6839
6840 /* X86_64_2F */
6841 {
bf890a93 6842 { "das", { XX }, 0 },
c0f3af97
L
6843 },
6844
6845 /* X86_64_37 */
6846 {
bf890a93 6847 { "aaa", { XX }, 0 },
c0f3af97
L
6848 },
6849
6850 /* X86_64_3F */
6851 {
bf890a93 6852 { "aas", { XX }, 0 },
c0f3af97
L
6853 },
6854
6855 /* X86_64_60 */
6856 {
bf890a93 6857 { "pushaP", { XX }, 0 },
c0f3af97
L
6858 },
6859
6860 /* X86_64_61 */
6861 {
bf890a93 6862 { "popaP", { XX }, 0 },
c0f3af97
L
6863 },
6864
6865 /* X86_64_62 */
6866 {
6867 { MOD_TABLE (MOD_62_32BIT) },
43234a1e 6868 { EVEX_TABLE (EVEX_0F) },
c0f3af97
L
6869 },
6870
6871 /* X86_64_63 */
6872 {
bf890a93
IT
6873 { "arpl", { Ew, Gw }, 0 },
6874 { "movs{lq|xd}", { Gv, Ed }, 0 },
c0f3af97
L
6875 },
6876
6877 /* X86_64_6D */
6878 {
bf890a93
IT
6879 { "ins{R|}", { Yzr, indirDX }, 0 },
6880 { "ins{G|}", { Yzr, indirDX }, 0 },
c0f3af97
L
6881 },
6882
6883 /* X86_64_6F */
6884 {
bf890a93
IT
6885 { "outs{R|}", { indirDXr, Xz }, 0 },
6886 { "outs{G|}", { indirDXr, Xz }, 0 },
c0f3af97
L
6887 },
6888
d039fef3 6889 /* X86_64_82 */
8b89fe14 6890 {
de194d85 6891 /* Opcode 0x82 is an alias of opcode 0x80 in 32-bit mode. */
d039fef3 6892 { REG_TABLE (REG_80) },
8b89fe14
L
6893 },
6894
c0f3af97
L
6895 /* X86_64_9A */
6896 {
bf890a93 6897 { "Jcall{T|}", { Ap }, 0 },
c0f3af97
L
6898 },
6899
6900 /* X86_64_C4 */
6901 {
6902 { MOD_TABLE (MOD_C4_32BIT) },
6903 { VEX_C4_TABLE (VEX_0F) },
6904 },
6905
6906 /* X86_64_C5 */
6907 {
6908 { MOD_TABLE (MOD_C5_32BIT) },
6909 { VEX_C5_TABLE (VEX_0F) },
6910 },
6911
6912 /* X86_64_CE */
6913 {
bf890a93 6914 { "into", { XX }, 0 },
c0f3af97
L
6915 },
6916
6917 /* X86_64_D4 */
6918 {
bf890a93 6919 { "aam", { Ib }, 0 },
c0f3af97
L
6920 },
6921
6922 /* X86_64_D5 */
6923 {
bf890a93 6924 { "aad", { Ib }, 0 },
c0f3af97
L
6925 },
6926
a72d2af2
L
6927 /* X86_64_E8 */
6928 {
6929 { "callP", { Jv, BND }, 0 },
5db04b09 6930 { "call@", { Jv, BND }, 0 }
a72d2af2
L
6931 },
6932
6933 /* X86_64_E9 */
6934 {
6935 { "jmpP", { Jv, BND }, 0 },
5db04b09 6936 { "jmp@", { Jv, BND }, 0 }
a72d2af2
L
6937 },
6938
c0f3af97
L
6939 /* X86_64_EA */
6940 {
bf890a93 6941 { "Jjmp{T|}", { Ap }, 0 },
c0f3af97
L
6942 },
6943
6944 /* X86_64_0F01_REG_0 */
6945 {
bf890a93
IT
6946 { "sgdt{Q|IQ}", { M }, 0 },
6947 { "sgdt", { M }, 0 },
c0f3af97
L
6948 },
6949
6950 /* X86_64_0F01_REG_1 */
6951 {
bf890a93
IT
6952 { "sidt{Q|IQ}", { M }, 0 },
6953 { "sidt", { M }, 0 },
c0f3af97
L
6954 },
6955
6956 /* X86_64_0F01_REG_2 */
6957 {
bf890a93
IT
6958 { "lgdt{Q|Q}", { M }, 0 },
6959 { "lgdt", { M }, 0 },
c0f3af97
L
6960 },
6961
6962 /* X86_64_0F01_REG_3 */
6963 {
bf890a93
IT
6964 { "lidt{Q|Q}", { M }, 0 },
6965 { "lidt", { M }, 0 },
c0f3af97
L
6966 },
6967};
6968
6969static const struct dis386 three_byte_table[][256] = {
c1e679ec
DR
6970
6971 /* THREE_BYTE_0F38 */
c0f3af97
L
6972 {
6973 /* 00 */
507bd325
L
6974 { "pshufb", { MX, EM }, PREFIX_OPCODE },
6975 { "phaddw", { MX, EM }, PREFIX_OPCODE },
6976 { "phaddd", { MX, EM }, PREFIX_OPCODE },
6977 { "phaddsw", { MX, EM }, PREFIX_OPCODE },
6978 { "pmaddubsw", { MX, EM }, PREFIX_OPCODE },
6979 { "phsubw", { MX, EM }, PREFIX_OPCODE },
6980 { "phsubd", { MX, EM }, PREFIX_OPCODE },
6981 { "phsubsw", { MX, EM }, PREFIX_OPCODE },
c0f3af97 6982 /* 08 */
507bd325
L
6983 { "psignb", { MX, EM }, PREFIX_OPCODE },
6984 { "psignw", { MX, EM }, PREFIX_OPCODE },
6985 { "psignd", { MX, EM }, PREFIX_OPCODE },
6986 { "pmulhrsw", { MX, EM }, PREFIX_OPCODE },
592d1631
L
6987 { Bad_Opcode },
6988 { Bad_Opcode },
6989 { Bad_Opcode },
6990 { Bad_Opcode },
f88c9eb0
SP
6991 /* 10 */
6992 { PREFIX_TABLE (PREFIX_0F3810) },
592d1631
L
6993 { Bad_Opcode },
6994 { Bad_Opcode },
6995 { Bad_Opcode },
f88c9eb0
SP
6996 { PREFIX_TABLE (PREFIX_0F3814) },
6997 { PREFIX_TABLE (PREFIX_0F3815) },
592d1631 6998 { Bad_Opcode },
f88c9eb0
SP
6999 { PREFIX_TABLE (PREFIX_0F3817) },
7000 /* 18 */
592d1631
L
7001 { Bad_Opcode },
7002 { Bad_Opcode },
7003 { Bad_Opcode },
7004 { Bad_Opcode },
507bd325
L
7005 { "pabsb", { MX, EM }, PREFIX_OPCODE },
7006 { "pabsw", { MX, EM }, PREFIX_OPCODE },
7007 { "pabsd", { MX, EM }, PREFIX_OPCODE },
592d1631 7008 { Bad_Opcode },
f88c9eb0
SP
7009 /* 20 */
7010 { PREFIX_TABLE (PREFIX_0F3820) },
7011 { PREFIX_TABLE (PREFIX_0F3821) },
7012 { PREFIX_TABLE (PREFIX_0F3822) },
7013 { PREFIX_TABLE (PREFIX_0F3823) },
7014 { PREFIX_TABLE (PREFIX_0F3824) },
7015 { PREFIX_TABLE (PREFIX_0F3825) },
592d1631
L
7016 { Bad_Opcode },
7017 { Bad_Opcode },
f88c9eb0
SP
7018 /* 28 */
7019 { PREFIX_TABLE (PREFIX_0F3828) },
7020 { PREFIX_TABLE (PREFIX_0F3829) },
7021 { PREFIX_TABLE (PREFIX_0F382A) },
7022 { PREFIX_TABLE (PREFIX_0F382B) },
592d1631
L
7023 { Bad_Opcode },
7024 { Bad_Opcode },
7025 { Bad_Opcode },
7026 { Bad_Opcode },
f88c9eb0
SP
7027 /* 30 */
7028 { PREFIX_TABLE (PREFIX_0F3830) },
7029 { PREFIX_TABLE (PREFIX_0F3831) },
7030 { PREFIX_TABLE (PREFIX_0F3832) },
7031 { PREFIX_TABLE (PREFIX_0F3833) },
7032 { PREFIX_TABLE (PREFIX_0F3834) },
7033 { PREFIX_TABLE (PREFIX_0F3835) },
592d1631 7034 { Bad_Opcode },
f88c9eb0
SP
7035 { PREFIX_TABLE (PREFIX_0F3837) },
7036 /* 38 */
7037 { PREFIX_TABLE (PREFIX_0F3838) },
7038 { PREFIX_TABLE (PREFIX_0F3839) },
7039 { PREFIX_TABLE (PREFIX_0F383A) },
7040 { PREFIX_TABLE (PREFIX_0F383B) },
7041 { PREFIX_TABLE (PREFIX_0F383C) },
7042 { PREFIX_TABLE (PREFIX_0F383D) },
7043 { PREFIX_TABLE (PREFIX_0F383E) },
7044 { PREFIX_TABLE (PREFIX_0F383F) },
7045 /* 40 */
7046 { PREFIX_TABLE (PREFIX_0F3840) },
7047 { PREFIX_TABLE (PREFIX_0F3841) },
592d1631
L
7048 { Bad_Opcode },
7049 { Bad_Opcode },
7050 { Bad_Opcode },
7051 { Bad_Opcode },
7052 { Bad_Opcode },
7053 { Bad_Opcode },
f88c9eb0 7054 /* 48 */
592d1631
L
7055 { Bad_Opcode },
7056 { Bad_Opcode },
7057 { Bad_Opcode },
7058 { Bad_Opcode },
7059 { Bad_Opcode },
7060 { Bad_Opcode },
7061 { Bad_Opcode },
7062 { Bad_Opcode },
f88c9eb0 7063 /* 50 */
592d1631
L
7064 { Bad_Opcode },
7065 { Bad_Opcode },
7066 { Bad_Opcode },
7067 { Bad_Opcode },
7068 { Bad_Opcode },
7069 { Bad_Opcode },
7070 { Bad_Opcode },
7071 { Bad_Opcode },
f88c9eb0 7072 /* 58 */
592d1631
L
7073 { Bad_Opcode },
7074 { Bad_Opcode },
7075 { Bad_Opcode },
7076 { Bad_Opcode },
7077 { Bad_Opcode },
7078 { Bad_Opcode },
7079 { Bad_Opcode },
7080 { Bad_Opcode },
f88c9eb0 7081 /* 60 */
592d1631
L
7082 { Bad_Opcode },
7083 { Bad_Opcode },
7084 { Bad_Opcode },
7085 { Bad_Opcode },
7086 { Bad_Opcode },
7087 { Bad_Opcode },
7088 { Bad_Opcode },
7089 { Bad_Opcode },
f88c9eb0 7090 /* 68 */
592d1631
L
7091 { Bad_Opcode },
7092 { Bad_Opcode },
7093 { Bad_Opcode },
7094 { Bad_Opcode },
7095 { Bad_Opcode },
7096 { Bad_Opcode },
7097 { Bad_Opcode },
7098 { Bad_Opcode },
f88c9eb0 7099 /* 70 */
592d1631
L
7100 { Bad_Opcode },
7101 { Bad_Opcode },
7102 { Bad_Opcode },
7103 { Bad_Opcode },
7104 { Bad_Opcode },
7105 { Bad_Opcode },
7106 { Bad_Opcode },
7107 { Bad_Opcode },
f88c9eb0 7108 /* 78 */
592d1631
L
7109 { Bad_Opcode },
7110 { Bad_Opcode },
7111 { Bad_Opcode },
7112 { Bad_Opcode },
7113 { Bad_Opcode },
7114 { Bad_Opcode },
7115 { Bad_Opcode },
7116 { Bad_Opcode },
f88c9eb0
SP
7117 /* 80 */
7118 { PREFIX_TABLE (PREFIX_0F3880) },
7119 { PREFIX_TABLE (PREFIX_0F3881) },
6c30d220 7120 { PREFIX_TABLE (PREFIX_0F3882) },
592d1631
L
7121 { Bad_Opcode },
7122 { Bad_Opcode },
7123 { Bad_Opcode },
7124 { Bad_Opcode },
7125 { Bad_Opcode },
f88c9eb0 7126 /* 88 */
592d1631
L
7127 { Bad_Opcode },
7128 { Bad_Opcode },
7129 { Bad_Opcode },
7130 { Bad_Opcode },
7131 { Bad_Opcode },
7132 { Bad_Opcode },
7133 { Bad_Opcode },
7134 { Bad_Opcode },
f88c9eb0 7135 /* 90 */
592d1631
L
7136 { Bad_Opcode },
7137 { Bad_Opcode },
7138 { Bad_Opcode },
7139 { Bad_Opcode },
7140 { Bad_Opcode },
7141 { Bad_Opcode },
7142 { Bad_Opcode },
7143 { Bad_Opcode },
f88c9eb0 7144 /* 98 */
592d1631
L
7145 { Bad_Opcode },
7146 { Bad_Opcode },
7147 { Bad_Opcode },
7148 { Bad_Opcode },
7149 { Bad_Opcode },
7150 { Bad_Opcode },
7151 { Bad_Opcode },
7152 { Bad_Opcode },
f88c9eb0 7153 /* a0 */
592d1631
L
7154 { Bad_Opcode },
7155 { Bad_Opcode },
7156 { Bad_Opcode },
7157 { Bad_Opcode },
7158 { Bad_Opcode },
7159 { Bad_Opcode },
7160 { Bad_Opcode },
7161 { Bad_Opcode },
f88c9eb0 7162 /* a8 */
592d1631
L
7163 { Bad_Opcode },
7164 { Bad_Opcode },
7165 { Bad_Opcode },
7166 { Bad_Opcode },
7167 { Bad_Opcode },
7168 { Bad_Opcode },
7169 { Bad_Opcode },
7170 { Bad_Opcode },
f88c9eb0 7171 /* b0 */
592d1631
L
7172 { Bad_Opcode },
7173 { Bad_Opcode },
7174 { Bad_Opcode },
7175 { Bad_Opcode },
7176 { Bad_Opcode },
7177 { Bad_Opcode },
7178 { Bad_Opcode },
7179 { Bad_Opcode },
f88c9eb0 7180 /* b8 */
592d1631
L
7181 { Bad_Opcode },
7182 { Bad_Opcode },
7183 { Bad_Opcode },
7184 { Bad_Opcode },
7185 { Bad_Opcode },
7186 { Bad_Opcode },
7187 { Bad_Opcode },
7188 { Bad_Opcode },
f88c9eb0 7189 /* c0 */
592d1631
L
7190 { Bad_Opcode },
7191 { Bad_Opcode },
7192 { Bad_Opcode },
7193 { Bad_Opcode },
7194 { Bad_Opcode },
7195 { Bad_Opcode },
7196 { Bad_Opcode },
7197 { Bad_Opcode },
f88c9eb0 7198 /* c8 */
a0046408
L
7199 { PREFIX_TABLE (PREFIX_0F38C8) },
7200 { PREFIX_TABLE (PREFIX_0F38C9) },
7201 { PREFIX_TABLE (PREFIX_0F38CA) },
7202 { PREFIX_TABLE (PREFIX_0F38CB) },
7203 { PREFIX_TABLE (PREFIX_0F38CC) },
7204 { PREFIX_TABLE (PREFIX_0F38CD) },
592d1631 7205 { Bad_Opcode },
48521003 7206 { PREFIX_TABLE (PREFIX_0F38CF) },
f88c9eb0 7207 /* d0 */
592d1631
L
7208 { Bad_Opcode },
7209 { Bad_Opcode },
7210 { Bad_Opcode },
7211 { Bad_Opcode },
7212 { Bad_Opcode },
7213 { Bad_Opcode },
7214 { Bad_Opcode },
7215 { Bad_Opcode },
f88c9eb0 7216 /* d8 */
592d1631
L
7217 { Bad_Opcode },
7218 { Bad_Opcode },
7219 { Bad_Opcode },
f88c9eb0
SP
7220 { PREFIX_TABLE (PREFIX_0F38DB) },
7221 { PREFIX_TABLE (PREFIX_0F38DC) },
7222 { PREFIX_TABLE (PREFIX_0F38DD) },
7223 { PREFIX_TABLE (PREFIX_0F38DE) },
7224 { PREFIX_TABLE (PREFIX_0F38DF) },
7225 /* e0 */
592d1631
L
7226 { Bad_Opcode },
7227 { Bad_Opcode },
7228 { Bad_Opcode },
7229 { Bad_Opcode },
7230 { Bad_Opcode },
7231 { Bad_Opcode },
7232 { Bad_Opcode },
7233 { Bad_Opcode },
f88c9eb0 7234 /* e8 */
592d1631
L
7235 { Bad_Opcode },
7236 { Bad_Opcode },
7237 { Bad_Opcode },
7238 { Bad_Opcode },
7239 { Bad_Opcode },
7240 { Bad_Opcode },
7241 { Bad_Opcode },
7242 { Bad_Opcode },
f88c9eb0
SP
7243 /* f0 */
7244 { PREFIX_TABLE (PREFIX_0F38F0) },
7245 { PREFIX_TABLE (PREFIX_0F38F1) },
592d1631
L
7246 { Bad_Opcode },
7247 { Bad_Opcode },
7248 { Bad_Opcode },
603555e5 7249 { PREFIX_TABLE (PREFIX_0F38F5) },
e2e1fcde 7250 { PREFIX_TABLE (PREFIX_0F38F6) },
592d1631 7251 { Bad_Opcode },
f88c9eb0 7252 /* f8 */
c0a30a9f
L
7253 { PREFIX_TABLE (PREFIX_0F38F8) },
7254 { PREFIX_TABLE (PREFIX_0F38F9) },
592d1631
L
7255 { Bad_Opcode },
7256 { Bad_Opcode },
7257 { Bad_Opcode },
7258 { Bad_Opcode },
7259 { Bad_Opcode },
7260 { Bad_Opcode },
f88c9eb0
SP
7261 },
7262 /* THREE_BYTE_0F3A */
7263 {
7264 /* 00 */
592d1631
L
7265 { Bad_Opcode },
7266 { Bad_Opcode },
7267 { Bad_Opcode },
7268 { Bad_Opcode },
7269 { Bad_Opcode },
7270 { Bad_Opcode },
7271 { Bad_Opcode },
7272 { Bad_Opcode },
f88c9eb0
SP
7273 /* 08 */
7274 { PREFIX_TABLE (PREFIX_0F3A08) },
7275 { PREFIX_TABLE (PREFIX_0F3A09) },
7276 { PREFIX_TABLE (PREFIX_0F3A0A) },
7277 { PREFIX_TABLE (PREFIX_0F3A0B) },
7278 { PREFIX_TABLE (PREFIX_0F3A0C) },
7279 { PREFIX_TABLE (PREFIX_0F3A0D) },
7280 { PREFIX_TABLE (PREFIX_0F3A0E) },
507bd325 7281 { "palignr", { MX, EM, Ib }, PREFIX_OPCODE },
f88c9eb0 7282 /* 10 */
592d1631
L
7283 { Bad_Opcode },
7284 { Bad_Opcode },
7285 { Bad_Opcode },
7286 { Bad_Opcode },
f88c9eb0
SP
7287 { PREFIX_TABLE (PREFIX_0F3A14) },
7288 { PREFIX_TABLE (PREFIX_0F3A15) },
7289 { PREFIX_TABLE (PREFIX_0F3A16) },
7290 { PREFIX_TABLE (PREFIX_0F3A17) },
7291 /* 18 */
592d1631
L
7292 { Bad_Opcode },
7293 { Bad_Opcode },
7294 { Bad_Opcode },
7295 { Bad_Opcode },
7296 { Bad_Opcode },
7297 { Bad_Opcode },
7298 { Bad_Opcode },
7299 { Bad_Opcode },
f88c9eb0
SP
7300 /* 20 */
7301 { PREFIX_TABLE (PREFIX_0F3A20) },
7302 { PREFIX_TABLE (PREFIX_0F3A21) },
7303 { PREFIX_TABLE (PREFIX_0F3A22) },
592d1631
L
7304 { Bad_Opcode },
7305 { Bad_Opcode },
7306 { Bad_Opcode },
7307 { Bad_Opcode },
7308 { Bad_Opcode },
f88c9eb0 7309 /* 28 */
592d1631
L
7310 { Bad_Opcode },
7311 { Bad_Opcode },
7312 { Bad_Opcode },
7313 { Bad_Opcode },
7314 { Bad_Opcode },
7315 { Bad_Opcode },
7316 { Bad_Opcode },
7317 { Bad_Opcode },
f88c9eb0 7318 /* 30 */
592d1631
L
7319 { Bad_Opcode },
7320 { Bad_Opcode },
7321 { Bad_Opcode },
7322 { Bad_Opcode },
7323 { Bad_Opcode },
7324 { Bad_Opcode },
7325 { Bad_Opcode },
7326 { Bad_Opcode },
f88c9eb0 7327 /* 38 */
592d1631
L
7328 { Bad_Opcode },
7329 { Bad_Opcode },
7330 { Bad_Opcode },
7331 { Bad_Opcode },
7332 { Bad_Opcode },
7333 { Bad_Opcode },
7334 { Bad_Opcode },
7335 { Bad_Opcode },
f88c9eb0
SP
7336 /* 40 */
7337 { PREFIX_TABLE (PREFIX_0F3A40) },
7338 { PREFIX_TABLE (PREFIX_0F3A41) },
7339 { PREFIX_TABLE (PREFIX_0F3A42) },
592d1631 7340 { Bad_Opcode },
f88c9eb0 7341 { PREFIX_TABLE (PREFIX_0F3A44) },
592d1631
L
7342 { Bad_Opcode },
7343 { Bad_Opcode },
7344 { Bad_Opcode },
f88c9eb0 7345 /* 48 */
592d1631
L
7346 { Bad_Opcode },
7347 { Bad_Opcode },
7348 { Bad_Opcode },
7349 { Bad_Opcode },
7350 { Bad_Opcode },
7351 { Bad_Opcode },
7352 { Bad_Opcode },
7353 { Bad_Opcode },
f88c9eb0 7354 /* 50 */
592d1631
L
7355 { Bad_Opcode },
7356 { Bad_Opcode },
7357 { Bad_Opcode },
7358 { Bad_Opcode },
7359 { Bad_Opcode },
7360 { Bad_Opcode },
7361 { Bad_Opcode },
7362 { Bad_Opcode },
f88c9eb0 7363 /* 58 */
592d1631
L
7364 { Bad_Opcode },
7365 { Bad_Opcode },
7366 { Bad_Opcode },
7367 { Bad_Opcode },
7368 { Bad_Opcode },
7369 { Bad_Opcode },
7370 { Bad_Opcode },
7371 { Bad_Opcode },
f88c9eb0
SP
7372 /* 60 */
7373 { PREFIX_TABLE (PREFIX_0F3A60) },
7374 { PREFIX_TABLE (PREFIX_0F3A61) },
7375 { PREFIX_TABLE (PREFIX_0F3A62) },
7376 { PREFIX_TABLE (PREFIX_0F3A63) },
592d1631
L
7377 { Bad_Opcode },
7378 { Bad_Opcode },
7379 { Bad_Opcode },
7380 { Bad_Opcode },
f88c9eb0 7381 /* 68 */
592d1631
L
7382 { Bad_Opcode },
7383 { Bad_Opcode },
7384 { Bad_Opcode },
7385 { Bad_Opcode },
7386 { Bad_Opcode },
7387 { Bad_Opcode },
7388 { Bad_Opcode },
7389 { Bad_Opcode },
f88c9eb0 7390 /* 70 */
592d1631
L
7391 { Bad_Opcode },
7392 { Bad_Opcode },
7393 { Bad_Opcode },
7394 { Bad_Opcode },
7395 { Bad_Opcode },
7396 { Bad_Opcode },
7397 { Bad_Opcode },
7398 { Bad_Opcode },
f88c9eb0 7399 /* 78 */
592d1631
L
7400 { Bad_Opcode },
7401 { Bad_Opcode },
7402 { Bad_Opcode },
7403 { Bad_Opcode },
7404 { Bad_Opcode },
7405 { Bad_Opcode },
7406 { Bad_Opcode },
7407 { Bad_Opcode },
f88c9eb0 7408 /* 80 */
592d1631
L
7409 { Bad_Opcode },
7410 { Bad_Opcode },
7411 { Bad_Opcode },
7412 { Bad_Opcode },
7413 { Bad_Opcode },
7414 { Bad_Opcode },
7415 { Bad_Opcode },
7416 { Bad_Opcode },
f88c9eb0 7417 /* 88 */
592d1631
L
7418 { Bad_Opcode },
7419 { Bad_Opcode },
7420 { Bad_Opcode },
7421 { Bad_Opcode },
7422 { Bad_Opcode },
7423 { Bad_Opcode },
7424 { Bad_Opcode },
7425 { Bad_Opcode },
f88c9eb0 7426 /* 90 */
592d1631
L
7427 { Bad_Opcode },
7428 { Bad_Opcode },
7429 { Bad_Opcode },
7430 { Bad_Opcode },
7431 { Bad_Opcode },
7432 { Bad_Opcode },
7433 { Bad_Opcode },
7434 { Bad_Opcode },
f88c9eb0 7435 /* 98 */
592d1631
L
7436 { Bad_Opcode },
7437 { Bad_Opcode },
7438 { Bad_Opcode },
7439 { Bad_Opcode },
7440 { Bad_Opcode },
7441 { Bad_Opcode },
7442 { Bad_Opcode },
7443 { Bad_Opcode },
f88c9eb0 7444 /* a0 */
592d1631
L
7445 { Bad_Opcode },
7446 { Bad_Opcode },
7447 { Bad_Opcode },
7448 { Bad_Opcode },
7449 { Bad_Opcode },
7450 { Bad_Opcode },
7451 { Bad_Opcode },
7452 { Bad_Opcode },
f88c9eb0 7453 /* a8 */
592d1631
L
7454 { Bad_Opcode },
7455 { Bad_Opcode },
7456 { Bad_Opcode },
7457 { Bad_Opcode },
7458 { Bad_Opcode },
7459 { Bad_Opcode },
7460 { Bad_Opcode },
7461 { Bad_Opcode },
f88c9eb0 7462 /* b0 */
592d1631
L
7463 { Bad_Opcode },
7464 { Bad_Opcode },
7465 { Bad_Opcode },
7466 { Bad_Opcode },
7467 { Bad_Opcode },
7468 { Bad_Opcode },
7469 { Bad_Opcode },
7470 { Bad_Opcode },
f88c9eb0 7471 /* b8 */
592d1631
L
7472 { Bad_Opcode },
7473 { Bad_Opcode },
7474 { Bad_Opcode },
7475 { Bad_Opcode },
7476 { Bad_Opcode },
7477 { Bad_Opcode },
7478 { Bad_Opcode },
7479 { Bad_Opcode },
f88c9eb0 7480 /* c0 */
592d1631
L
7481 { Bad_Opcode },
7482 { Bad_Opcode },
7483 { Bad_Opcode },
7484 { Bad_Opcode },
7485 { Bad_Opcode },
7486 { Bad_Opcode },
7487 { Bad_Opcode },
7488 { Bad_Opcode },
f88c9eb0 7489 /* c8 */
592d1631
L
7490 { Bad_Opcode },
7491 { Bad_Opcode },
7492 { Bad_Opcode },
7493 { Bad_Opcode },
a0046408 7494 { PREFIX_TABLE (PREFIX_0F3ACC) },
592d1631 7495 { Bad_Opcode },
48521003
IT
7496 { PREFIX_TABLE (PREFIX_0F3ACE) },
7497 { PREFIX_TABLE (PREFIX_0F3ACF) },
f88c9eb0 7498 /* d0 */
592d1631
L
7499 { Bad_Opcode },
7500 { Bad_Opcode },
7501 { Bad_Opcode },
7502 { Bad_Opcode },
7503 { Bad_Opcode },
7504 { Bad_Opcode },
7505 { Bad_Opcode },
7506 { Bad_Opcode },
f88c9eb0 7507 /* d8 */
592d1631
L
7508 { Bad_Opcode },
7509 { Bad_Opcode },
7510 { Bad_Opcode },
7511 { Bad_Opcode },
7512 { Bad_Opcode },
7513 { Bad_Opcode },
7514 { Bad_Opcode },
f88c9eb0
SP
7515 { PREFIX_TABLE (PREFIX_0F3ADF) },
7516 /* e0 */
592d1631
L
7517 { Bad_Opcode },
7518 { Bad_Opcode },
7519 { Bad_Opcode },
7520 { Bad_Opcode },
7521 { Bad_Opcode },
592d1631
L
7522 { Bad_Opcode },
7523 { Bad_Opcode },
7524 { Bad_Opcode },
85f10a01 7525 /* e8 */
592d1631
L
7526 { Bad_Opcode },
7527 { Bad_Opcode },
7528 { Bad_Opcode },
7529 { Bad_Opcode },
7530 { Bad_Opcode },
7531 { Bad_Opcode },
7532 { Bad_Opcode },
7533 { Bad_Opcode },
85f10a01 7534 /* f0 */
592d1631
L
7535 { Bad_Opcode },
7536 { Bad_Opcode },
7537 { Bad_Opcode },
7538 { Bad_Opcode },
7539 { Bad_Opcode },
7540 { Bad_Opcode },
7541 { Bad_Opcode },
7542 { Bad_Opcode },
85f10a01 7543 /* f8 */
592d1631
L
7544 { Bad_Opcode },
7545 { Bad_Opcode },
7546 { Bad_Opcode },
7547 { Bad_Opcode },
7548 { Bad_Opcode },
7549 { Bad_Opcode },
7550 { Bad_Opcode },
7551 { Bad_Opcode },
85f10a01 7552 },
f88c9eb0
SP
7553};
7554
7555static const struct dis386 xop_table[][256] = {
5dd85c99 7556 /* XOP_08 */
85f10a01
MM
7557 {
7558 /* 00 */
592d1631
L
7559 { Bad_Opcode },
7560 { Bad_Opcode },
7561 { Bad_Opcode },
7562 { Bad_Opcode },
7563 { Bad_Opcode },
7564 { Bad_Opcode },
7565 { Bad_Opcode },
7566 { Bad_Opcode },
85f10a01 7567 /* 08 */
592d1631
L
7568 { Bad_Opcode },
7569 { Bad_Opcode },
7570 { Bad_Opcode },
7571 { Bad_Opcode },
7572 { Bad_Opcode },
7573 { Bad_Opcode },
7574 { Bad_Opcode },
7575 { Bad_Opcode },
85f10a01 7576 /* 10 */
3929df09 7577 { Bad_Opcode },
592d1631
L
7578 { Bad_Opcode },
7579 { Bad_Opcode },
7580 { Bad_Opcode },
7581 { Bad_Opcode },
7582 { Bad_Opcode },
7583 { Bad_Opcode },
7584 { Bad_Opcode },
85f10a01 7585 /* 18 */
592d1631
L
7586 { Bad_Opcode },
7587 { Bad_Opcode },
7588 { Bad_Opcode },
7589 { Bad_Opcode },
7590 { Bad_Opcode },
7591 { Bad_Opcode },
7592 { Bad_Opcode },
7593 { Bad_Opcode },
85f10a01 7594 /* 20 */
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 /* 28 */
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 },
c0f3af97 7612 /* 30 */
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 },
c0f3af97 7621 /* 38 */
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 },
c0f3af97 7630 /* 40 */
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 /* 48 */
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 },
c0f3af97 7648 /* 50 */
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 /* 58 */
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 },
c1e679ec 7666 /* 60 */
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 },
c0f3af97 7675 /* 68 */
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 /* 70 */
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 /* 78 */
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 /* 80 */
592d1631
L
7703 { Bad_Opcode },
7704 { Bad_Opcode },
7705 { Bad_Opcode },
7706 { Bad_Opcode },
7707 { Bad_Opcode },
3a2430e0
JB
7708 { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7709 { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7710 { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
5dd85c99 7711 /* 88 */
592d1631
L
7712 { Bad_Opcode },
7713 { Bad_Opcode },
7714 { Bad_Opcode },
7715 { Bad_Opcode },
7716 { Bad_Opcode },
7717 { Bad_Opcode },
3a2430e0
JB
7718 { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7719 { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
5dd85c99 7720 /* 90 */
592d1631
L
7721 { Bad_Opcode },
7722 { Bad_Opcode },
7723 { Bad_Opcode },
7724 { Bad_Opcode },
7725 { Bad_Opcode },
3a2430e0
JB
7726 { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7727 { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7728 { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
5dd85c99 7729 /* 98 */
592d1631
L
7730 { Bad_Opcode },
7731 { Bad_Opcode },
7732 { Bad_Opcode },
7733 { Bad_Opcode },
7734 { Bad_Opcode },
7735 { Bad_Opcode },
3a2430e0
JB
7736 { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7737 { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
5dd85c99 7738 /* a0 */
592d1631
L
7739 { Bad_Opcode },
7740 { Bad_Opcode },
3a2430e0
JB
7741 { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7742 { "vpperm", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
592d1631
L
7743 { Bad_Opcode },
7744 { Bad_Opcode },
3a2430e0 7745 { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
592d1631 7746 { Bad_Opcode },
5dd85c99 7747 /* a8 */
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 },
5dd85c99 7756 /* b0 */
592d1631
L
7757 { Bad_Opcode },
7758 { Bad_Opcode },
7759 { Bad_Opcode },
7760 { Bad_Opcode },
7761 { Bad_Opcode },
7762 { Bad_Opcode },
3a2430e0 7763 { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
592d1631 7764 { Bad_Opcode },
5dd85c99 7765 /* b8 */
592d1631
L
7766 { Bad_Opcode },
7767 { Bad_Opcode },
7768 { Bad_Opcode },
7769 { Bad_Opcode },
7770 { Bad_Opcode },
7771 { Bad_Opcode },
7772 { Bad_Opcode },
7773 { Bad_Opcode },
5dd85c99 7774 /* c0 */
bf890a93
IT
7775 { "vprotb", { XM, Vex_2src_1, Ib }, 0 },
7776 { "vprotw", { XM, Vex_2src_1, Ib }, 0 },
7777 { "vprotd", { XM, Vex_2src_1, Ib }, 0 },
7778 { "vprotq", { XM, Vex_2src_1, Ib }, 0 },
592d1631
L
7779 { Bad_Opcode },
7780 { Bad_Opcode },
7781 { Bad_Opcode },
7782 { Bad_Opcode },
5dd85c99 7783 /* c8 */
592d1631
L
7784 { Bad_Opcode },
7785 { Bad_Opcode },
7786 { Bad_Opcode },
7787 { Bad_Opcode },
ff688e1f
L
7788 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CC) },
7789 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CD) },
7790 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CE) },
7791 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CF) },
5dd85c99 7792 /* d0 */
592d1631
L
7793 { Bad_Opcode },
7794 { Bad_Opcode },
7795 { Bad_Opcode },
7796 { Bad_Opcode },
7797 { Bad_Opcode },
7798 { Bad_Opcode },
7799 { Bad_Opcode },
7800 { Bad_Opcode },
5dd85c99 7801 /* d8 */
592d1631
L
7802 { Bad_Opcode },
7803 { Bad_Opcode },
7804 { Bad_Opcode },
7805 { Bad_Opcode },
7806 { Bad_Opcode },
7807 { Bad_Opcode },
7808 { Bad_Opcode },
7809 { Bad_Opcode },
5dd85c99 7810 /* e0 */
592d1631
L
7811 { Bad_Opcode },
7812 { Bad_Opcode },
7813 { Bad_Opcode },
7814 { Bad_Opcode },
7815 { Bad_Opcode },
7816 { Bad_Opcode },
7817 { Bad_Opcode },
7818 { Bad_Opcode },
5dd85c99 7819 /* e8 */
592d1631
L
7820 { Bad_Opcode },
7821 { Bad_Opcode },
7822 { Bad_Opcode },
7823 { Bad_Opcode },
ff688e1f
L
7824 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EC) },
7825 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_ED) },
7826 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EE) },
7827 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EF) },
5dd85c99 7828 /* f0 */
592d1631
L
7829 { Bad_Opcode },
7830 { Bad_Opcode },
7831 { Bad_Opcode },
7832 { Bad_Opcode },
7833 { Bad_Opcode },
7834 { Bad_Opcode },
7835 { Bad_Opcode },
7836 { Bad_Opcode },
5dd85c99 7837 /* f8 */
592d1631
L
7838 { Bad_Opcode },
7839 { Bad_Opcode },
7840 { Bad_Opcode },
7841 { Bad_Opcode },
7842 { Bad_Opcode },
7843 { Bad_Opcode },
7844 { Bad_Opcode },
7845 { Bad_Opcode },
5dd85c99
SP
7846 },
7847 /* XOP_09 */
7848 {
7849 /* 00 */
592d1631 7850 { Bad_Opcode },
2a2a0f38
QN
7851 { REG_TABLE (REG_XOP_TBM_01) },
7852 { REG_TABLE (REG_XOP_TBM_02) },
592d1631
L
7853 { Bad_Opcode },
7854 { Bad_Opcode },
7855 { Bad_Opcode },
7856 { Bad_Opcode },
7857 { Bad_Opcode },
5dd85c99 7858 /* 08 */
592d1631
L
7859 { Bad_Opcode },
7860 { Bad_Opcode },
7861 { Bad_Opcode },
7862 { Bad_Opcode },
7863 { Bad_Opcode },
7864 { Bad_Opcode },
7865 { Bad_Opcode },
7866 { Bad_Opcode },
5dd85c99 7867 /* 10 */
592d1631
L
7868 { Bad_Opcode },
7869 { Bad_Opcode },
5dd85c99 7870 { REG_TABLE (REG_XOP_LWPCB) },
592d1631
L
7871 { Bad_Opcode },
7872 { Bad_Opcode },
7873 { Bad_Opcode },
7874 { Bad_Opcode },
7875 { Bad_Opcode },
5dd85c99 7876 /* 18 */
592d1631
L
7877 { Bad_Opcode },
7878 { Bad_Opcode },
7879 { Bad_Opcode },
7880 { Bad_Opcode },
7881 { Bad_Opcode },
7882 { Bad_Opcode },
7883 { Bad_Opcode },
7884 { Bad_Opcode },
5dd85c99 7885 /* 20 */
592d1631
L
7886 { Bad_Opcode },
7887 { Bad_Opcode },
7888 { Bad_Opcode },
7889 { Bad_Opcode },
7890 { Bad_Opcode },
7891 { Bad_Opcode },
7892 { Bad_Opcode },
7893 { Bad_Opcode },
5dd85c99 7894 /* 28 */
592d1631
L
7895 { Bad_Opcode },
7896 { Bad_Opcode },
7897 { Bad_Opcode },
7898 { Bad_Opcode },
7899 { Bad_Opcode },
7900 { Bad_Opcode },
7901 { Bad_Opcode },
7902 { Bad_Opcode },
5dd85c99 7903 /* 30 */
592d1631
L
7904 { Bad_Opcode },
7905 { Bad_Opcode },
7906 { Bad_Opcode },
7907 { Bad_Opcode },
7908 { Bad_Opcode },
7909 { Bad_Opcode },
7910 { Bad_Opcode },
7911 { Bad_Opcode },
5dd85c99 7912 /* 38 */
592d1631
L
7913 { Bad_Opcode },
7914 { Bad_Opcode },
7915 { Bad_Opcode },
7916 { Bad_Opcode },
7917 { Bad_Opcode },
7918 { Bad_Opcode },
7919 { Bad_Opcode },
7920 { Bad_Opcode },
5dd85c99 7921 /* 40 */
592d1631
L
7922 { Bad_Opcode },
7923 { Bad_Opcode },
7924 { Bad_Opcode },
7925 { Bad_Opcode },
7926 { Bad_Opcode },
7927 { Bad_Opcode },
7928 { Bad_Opcode },
7929 { Bad_Opcode },
5dd85c99 7930 /* 48 */
592d1631
L
7931 { Bad_Opcode },
7932 { Bad_Opcode },
7933 { Bad_Opcode },
7934 { Bad_Opcode },
7935 { Bad_Opcode },
7936 { Bad_Opcode },
7937 { Bad_Opcode },
7938 { Bad_Opcode },
5dd85c99 7939 /* 50 */
592d1631
L
7940 { Bad_Opcode },
7941 { Bad_Opcode },
7942 { Bad_Opcode },
7943 { Bad_Opcode },
7944 { Bad_Opcode },
7945 { Bad_Opcode },
7946 { Bad_Opcode },
7947 { Bad_Opcode },
5dd85c99 7948 /* 58 */
592d1631
L
7949 { Bad_Opcode },
7950 { Bad_Opcode },
7951 { Bad_Opcode },
7952 { Bad_Opcode },
7953 { Bad_Opcode },
7954 { Bad_Opcode },
7955 { Bad_Opcode },
7956 { Bad_Opcode },
5dd85c99 7957 /* 60 */
592d1631
L
7958 { Bad_Opcode },
7959 { Bad_Opcode },
7960 { Bad_Opcode },
7961 { Bad_Opcode },
7962 { Bad_Opcode },
7963 { Bad_Opcode },
7964 { Bad_Opcode },
7965 { Bad_Opcode },
5dd85c99 7966 /* 68 */
592d1631
L
7967 { Bad_Opcode },
7968 { Bad_Opcode },
7969 { Bad_Opcode },
7970 { Bad_Opcode },
7971 { Bad_Opcode },
7972 { Bad_Opcode },
7973 { Bad_Opcode },
7974 { Bad_Opcode },
5dd85c99 7975 /* 70 */
592d1631
L
7976 { Bad_Opcode },
7977 { Bad_Opcode },
7978 { Bad_Opcode },
7979 { Bad_Opcode },
7980 { Bad_Opcode },
7981 { Bad_Opcode },
7982 { Bad_Opcode },
7983 { Bad_Opcode },
5dd85c99 7984 /* 78 */
592d1631
L
7985 { Bad_Opcode },
7986 { Bad_Opcode },
7987 { Bad_Opcode },
7988 { Bad_Opcode },
7989 { Bad_Opcode },
7990 { Bad_Opcode },
7991 { Bad_Opcode },
7992 { Bad_Opcode },
5dd85c99 7993 /* 80 */
592a252b
L
7994 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80) },
7995 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81) },
bf890a93
IT
7996 { "vfrczss", { XM, EXd }, 0 },
7997 { "vfrczsd", { XM, EXq }, 0 },
592d1631
L
7998 { Bad_Opcode },
7999 { Bad_Opcode },
8000 { Bad_Opcode },
8001 { Bad_Opcode },
5dd85c99 8002 /* 88 */
592d1631
L
8003 { Bad_Opcode },
8004 { Bad_Opcode },
8005 { Bad_Opcode },
8006 { Bad_Opcode },
8007 { Bad_Opcode },
8008 { Bad_Opcode },
8009 { Bad_Opcode },
8010 { Bad_Opcode },
5dd85c99 8011 /* 90 */
bf890a93
IT
8012 { "vprotb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8013 { "vprotw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8014 { "vprotd", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8015 { "vprotq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8016 { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8017 { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8018 { "vpshld", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8019 { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
5dd85c99 8020 /* 98 */
bf890a93
IT
8021 { "vpshab", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8022 { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8023 { "vpshad", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8024 { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
592d1631
L
8025 { Bad_Opcode },
8026 { Bad_Opcode },
8027 { Bad_Opcode },
8028 { Bad_Opcode },
5dd85c99 8029 /* a0 */
592d1631
L
8030 { Bad_Opcode },
8031 { Bad_Opcode },
8032 { Bad_Opcode },
8033 { Bad_Opcode },
8034 { Bad_Opcode },
8035 { Bad_Opcode },
8036 { Bad_Opcode },
8037 { Bad_Opcode },
5dd85c99 8038 /* a8 */
592d1631
L
8039 { Bad_Opcode },
8040 { Bad_Opcode },
8041 { Bad_Opcode },
8042 { Bad_Opcode },
8043 { Bad_Opcode },
8044 { Bad_Opcode },
8045 { Bad_Opcode },
8046 { Bad_Opcode },
5dd85c99 8047 /* b0 */
592d1631
L
8048 { Bad_Opcode },
8049 { Bad_Opcode },
8050 { Bad_Opcode },
8051 { Bad_Opcode },
8052 { Bad_Opcode },
8053 { Bad_Opcode },
8054 { Bad_Opcode },
8055 { Bad_Opcode },
5dd85c99 8056 /* b8 */
592d1631
L
8057 { Bad_Opcode },
8058 { Bad_Opcode },
8059 { Bad_Opcode },
8060 { Bad_Opcode },
8061 { Bad_Opcode },
8062 { Bad_Opcode },
8063 { Bad_Opcode },
8064 { Bad_Opcode },
5dd85c99 8065 /* c0 */
592d1631 8066 { Bad_Opcode },
bf890a93
IT
8067 { "vphaddbw", { XM, EXxmm }, 0 },
8068 { "vphaddbd", { XM, EXxmm }, 0 },
8069 { "vphaddbq", { XM, EXxmm }, 0 },
592d1631
L
8070 { Bad_Opcode },
8071 { Bad_Opcode },
bf890a93
IT
8072 { "vphaddwd", { XM, EXxmm }, 0 },
8073 { "vphaddwq", { XM, EXxmm }, 0 },
5dd85c99 8074 /* c8 */
592d1631
L
8075 { Bad_Opcode },
8076 { Bad_Opcode },
8077 { Bad_Opcode },
bf890a93 8078 { "vphadddq", { XM, EXxmm }, 0 },
592d1631
L
8079 { Bad_Opcode },
8080 { Bad_Opcode },
8081 { Bad_Opcode },
8082 { Bad_Opcode },
5dd85c99 8083 /* d0 */
592d1631 8084 { Bad_Opcode },
bf890a93
IT
8085 { "vphaddubw", { XM, EXxmm }, 0 },
8086 { "vphaddubd", { XM, EXxmm }, 0 },
8087 { "vphaddubq", { XM, EXxmm }, 0 },
592d1631
L
8088 { Bad_Opcode },
8089 { Bad_Opcode },
bf890a93
IT
8090 { "vphadduwd", { XM, EXxmm }, 0 },
8091 { "vphadduwq", { XM, EXxmm }, 0 },
5dd85c99 8092 /* d8 */
592d1631
L
8093 { Bad_Opcode },
8094 { Bad_Opcode },
8095 { Bad_Opcode },
bf890a93 8096 { "vphaddudq", { XM, EXxmm }, 0 },
592d1631
L
8097 { Bad_Opcode },
8098 { Bad_Opcode },
8099 { Bad_Opcode },
8100 { Bad_Opcode },
5dd85c99 8101 /* e0 */
592d1631 8102 { Bad_Opcode },
bf890a93
IT
8103 { "vphsubbw", { XM, EXxmm }, 0 },
8104 { "vphsubwd", { XM, EXxmm }, 0 },
8105 { "vphsubdq", { XM, EXxmm }, 0 },
592d1631
L
8106 { Bad_Opcode },
8107 { Bad_Opcode },
8108 { Bad_Opcode },
8109 { Bad_Opcode },
4e7d34a6 8110 /* e8 */
592d1631
L
8111 { Bad_Opcode },
8112 { Bad_Opcode },
8113 { Bad_Opcode },
8114 { Bad_Opcode },
8115 { Bad_Opcode },
8116 { Bad_Opcode },
8117 { Bad_Opcode },
8118 { Bad_Opcode },
4e7d34a6 8119 /* f0 */
592d1631
L
8120 { Bad_Opcode },
8121 { Bad_Opcode },
8122 { Bad_Opcode },
8123 { Bad_Opcode },
8124 { Bad_Opcode },
8125 { Bad_Opcode },
8126 { Bad_Opcode },
8127 { Bad_Opcode },
4e7d34a6 8128 /* f8 */
592d1631
L
8129 { Bad_Opcode },
8130 { Bad_Opcode },
8131 { Bad_Opcode },
8132 { Bad_Opcode },
8133 { Bad_Opcode },
8134 { Bad_Opcode },
8135 { Bad_Opcode },
8136 { Bad_Opcode },
4e7d34a6 8137 },
f88c9eb0 8138 /* XOP_0A */
4e7d34a6
L
8139 {
8140 /* 00 */
592d1631
L
8141 { Bad_Opcode },
8142 { Bad_Opcode },
8143 { Bad_Opcode },
8144 { Bad_Opcode },
8145 { Bad_Opcode },
8146 { Bad_Opcode },
8147 { Bad_Opcode },
8148 { Bad_Opcode },
4e7d34a6 8149 /* 08 */
592d1631
L
8150 { Bad_Opcode },
8151 { Bad_Opcode },
8152 { Bad_Opcode },
8153 { Bad_Opcode },
8154 { Bad_Opcode },
8155 { Bad_Opcode },
8156 { Bad_Opcode },
8157 { Bad_Opcode },
4e7d34a6 8158 /* 10 */
c1dc7af5 8159 { "bextrS", { Gdq, Edq, Id }, 0 },
592d1631 8160 { Bad_Opcode },
f88c9eb0 8161 { REG_TABLE (REG_XOP_LWP) },
592d1631
L
8162 { Bad_Opcode },
8163 { Bad_Opcode },
8164 { Bad_Opcode },
8165 { Bad_Opcode },
8166 { Bad_Opcode },
4e7d34a6 8167 /* 18 */
592d1631
L
8168 { Bad_Opcode },
8169 { Bad_Opcode },
8170 { Bad_Opcode },
8171 { Bad_Opcode },
8172 { Bad_Opcode },
8173 { Bad_Opcode },
8174 { Bad_Opcode },
8175 { Bad_Opcode },
4e7d34a6 8176 /* 20 */
592d1631
L
8177 { Bad_Opcode },
8178 { Bad_Opcode },
8179 { Bad_Opcode },
8180 { Bad_Opcode },
8181 { Bad_Opcode },
8182 { Bad_Opcode },
8183 { Bad_Opcode },
8184 { Bad_Opcode },
4e7d34a6 8185 /* 28 */
592d1631
L
8186 { Bad_Opcode },
8187 { Bad_Opcode },
8188 { Bad_Opcode },
8189 { Bad_Opcode },
8190 { Bad_Opcode },
8191 { Bad_Opcode },
8192 { Bad_Opcode },
8193 { Bad_Opcode },
4e7d34a6 8194 /* 30 */
592d1631
L
8195 { Bad_Opcode },
8196 { Bad_Opcode },
8197 { Bad_Opcode },
8198 { Bad_Opcode },
8199 { Bad_Opcode },
8200 { Bad_Opcode },
8201 { Bad_Opcode },
8202 { Bad_Opcode },
c0f3af97 8203 /* 38 */
592d1631
L
8204 { Bad_Opcode },
8205 { Bad_Opcode },
8206 { Bad_Opcode },
8207 { Bad_Opcode },
8208 { Bad_Opcode },
8209 { Bad_Opcode },
8210 { Bad_Opcode },
8211 { Bad_Opcode },
c0f3af97 8212 /* 40 */
592d1631
L
8213 { Bad_Opcode },
8214 { Bad_Opcode },
8215 { Bad_Opcode },
8216 { Bad_Opcode },
8217 { Bad_Opcode },
8218 { Bad_Opcode },
8219 { Bad_Opcode },
8220 { Bad_Opcode },
c1e679ec 8221 /* 48 */
592d1631
L
8222 { Bad_Opcode },
8223 { Bad_Opcode },
8224 { Bad_Opcode },
8225 { Bad_Opcode },
8226 { Bad_Opcode },
8227 { Bad_Opcode },
8228 { Bad_Opcode },
8229 { Bad_Opcode },
c1e679ec 8230 /* 50 */
592d1631
L
8231 { Bad_Opcode },
8232 { Bad_Opcode },
8233 { Bad_Opcode },
8234 { Bad_Opcode },
8235 { Bad_Opcode },
8236 { Bad_Opcode },
8237 { Bad_Opcode },
8238 { Bad_Opcode },
4e7d34a6 8239 /* 58 */
592d1631
L
8240 { Bad_Opcode },
8241 { Bad_Opcode },
8242 { Bad_Opcode },
8243 { Bad_Opcode },
8244 { Bad_Opcode },
8245 { Bad_Opcode },
8246 { Bad_Opcode },
8247 { Bad_Opcode },
4e7d34a6 8248 /* 60 */
592d1631
L
8249 { Bad_Opcode },
8250 { Bad_Opcode },
8251 { Bad_Opcode },
8252 { Bad_Opcode },
8253 { Bad_Opcode },
8254 { Bad_Opcode },
8255 { Bad_Opcode },
8256 { Bad_Opcode },
4e7d34a6 8257 /* 68 */
592d1631
L
8258 { Bad_Opcode },
8259 { Bad_Opcode },
8260 { Bad_Opcode },
8261 { Bad_Opcode },
8262 { Bad_Opcode },
8263 { Bad_Opcode },
8264 { Bad_Opcode },
8265 { Bad_Opcode },
4e7d34a6 8266 /* 70 */
592d1631
L
8267 { Bad_Opcode },
8268 { Bad_Opcode },
8269 { Bad_Opcode },
8270 { Bad_Opcode },
8271 { Bad_Opcode },
8272 { Bad_Opcode },
8273 { Bad_Opcode },
8274 { Bad_Opcode },
4e7d34a6 8275 /* 78 */
592d1631
L
8276 { Bad_Opcode },
8277 { Bad_Opcode },
8278 { Bad_Opcode },
8279 { Bad_Opcode },
8280 { Bad_Opcode },
8281 { Bad_Opcode },
8282 { Bad_Opcode },
8283 { Bad_Opcode },
4e7d34a6 8284 /* 80 */
592d1631
L
8285 { Bad_Opcode },
8286 { Bad_Opcode },
8287 { Bad_Opcode },
8288 { Bad_Opcode },
8289 { Bad_Opcode },
8290 { Bad_Opcode },
8291 { Bad_Opcode },
8292 { Bad_Opcode },
4e7d34a6 8293 /* 88 */
592d1631
L
8294 { Bad_Opcode },
8295 { Bad_Opcode },
8296 { Bad_Opcode },
8297 { Bad_Opcode },
8298 { Bad_Opcode },
8299 { Bad_Opcode },
8300 { Bad_Opcode },
8301 { Bad_Opcode },
4e7d34a6 8302 /* 90 */
592d1631
L
8303 { Bad_Opcode },
8304 { Bad_Opcode },
8305 { Bad_Opcode },
8306 { Bad_Opcode },
8307 { Bad_Opcode },
8308 { Bad_Opcode },
8309 { Bad_Opcode },
8310 { Bad_Opcode },
4e7d34a6 8311 /* 98 */
592d1631
L
8312 { Bad_Opcode },
8313 { Bad_Opcode },
8314 { Bad_Opcode },
8315 { Bad_Opcode },
8316 { Bad_Opcode },
8317 { Bad_Opcode },
8318 { Bad_Opcode },
8319 { Bad_Opcode },
4e7d34a6 8320 /* a0 */
592d1631
L
8321 { Bad_Opcode },
8322 { Bad_Opcode },
8323 { Bad_Opcode },
8324 { Bad_Opcode },
8325 { Bad_Opcode },
8326 { Bad_Opcode },
8327 { Bad_Opcode },
8328 { Bad_Opcode },
4e7d34a6 8329 /* a8 */
592d1631
L
8330 { Bad_Opcode },
8331 { Bad_Opcode },
8332 { Bad_Opcode },
8333 { Bad_Opcode },
8334 { Bad_Opcode },
8335 { Bad_Opcode },
8336 { Bad_Opcode },
8337 { Bad_Opcode },
d5d7db8e 8338 /* b0 */
592d1631
L
8339 { Bad_Opcode },
8340 { Bad_Opcode },
8341 { Bad_Opcode },
8342 { Bad_Opcode },
8343 { Bad_Opcode },
8344 { Bad_Opcode },
8345 { Bad_Opcode },
8346 { Bad_Opcode },
85f10a01 8347 /* b8 */
592d1631
L
8348 { Bad_Opcode },
8349 { Bad_Opcode },
8350 { Bad_Opcode },
8351 { Bad_Opcode },
8352 { Bad_Opcode },
8353 { Bad_Opcode },
8354 { Bad_Opcode },
8355 { Bad_Opcode },
85f10a01 8356 /* c0 */
592d1631
L
8357 { Bad_Opcode },
8358 { Bad_Opcode },
8359 { Bad_Opcode },
8360 { Bad_Opcode },
8361 { Bad_Opcode },
8362 { Bad_Opcode },
8363 { Bad_Opcode },
8364 { Bad_Opcode },
85f10a01 8365 /* c8 */
592d1631
L
8366 { Bad_Opcode },
8367 { Bad_Opcode },
8368 { Bad_Opcode },
8369 { Bad_Opcode },
8370 { Bad_Opcode },
8371 { Bad_Opcode },
8372 { Bad_Opcode },
8373 { Bad_Opcode },
85f10a01 8374 /* d0 */
592d1631
L
8375 { Bad_Opcode },
8376 { Bad_Opcode },
8377 { Bad_Opcode },
8378 { Bad_Opcode },
8379 { Bad_Opcode },
8380 { Bad_Opcode },
8381 { Bad_Opcode },
8382 { Bad_Opcode },
85f10a01 8383 /* d8 */
592d1631
L
8384 { Bad_Opcode },
8385 { Bad_Opcode },
8386 { Bad_Opcode },
8387 { Bad_Opcode },
8388 { Bad_Opcode },
8389 { Bad_Opcode },
8390 { Bad_Opcode },
8391 { Bad_Opcode },
85f10a01 8392 /* e0 */
592d1631
L
8393 { Bad_Opcode },
8394 { Bad_Opcode },
8395 { Bad_Opcode },
8396 { Bad_Opcode },
8397 { Bad_Opcode },
8398 { Bad_Opcode },
8399 { Bad_Opcode },
8400 { Bad_Opcode },
85f10a01 8401 /* e8 */
592d1631
L
8402 { Bad_Opcode },
8403 { Bad_Opcode },
8404 { Bad_Opcode },
8405 { Bad_Opcode },
8406 { Bad_Opcode },
8407 { Bad_Opcode },
8408 { Bad_Opcode },
8409 { Bad_Opcode },
85f10a01 8410 /* f0 */
592d1631
L
8411 { Bad_Opcode },
8412 { Bad_Opcode },
8413 { Bad_Opcode },
8414 { Bad_Opcode },
8415 { Bad_Opcode },
8416 { Bad_Opcode },
8417 { Bad_Opcode },
8418 { Bad_Opcode },
85f10a01 8419 /* f8 */
592d1631
L
8420 { Bad_Opcode },
8421 { Bad_Opcode },
8422 { Bad_Opcode },
8423 { Bad_Opcode },
8424 { Bad_Opcode },
8425 { Bad_Opcode },
8426 { Bad_Opcode },
8427 { Bad_Opcode },
85f10a01 8428 },
c0f3af97
L
8429};
8430
8431static const struct dis386 vex_table[][256] = {
8432 /* VEX_0F */
85f10a01
MM
8433 {
8434 /* 00 */
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 },
85f10a01 8443 /* 08 */
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 },
c0f3af97 8452 /* 10 */
592a252b
L
8453 { PREFIX_TABLE (PREFIX_VEX_0F10) },
8454 { PREFIX_TABLE (PREFIX_VEX_0F11) },
8455 { PREFIX_TABLE (PREFIX_VEX_0F12) },
8456 { MOD_TABLE (MOD_VEX_0F13) },
ec6f095a
L
8457 { "vunpcklpX", { XM, Vex, EXx }, 0 },
8458 { "vunpckhpX", { XM, Vex, EXx }, 0 },
592a252b
L
8459 { PREFIX_TABLE (PREFIX_VEX_0F16) },
8460 { MOD_TABLE (MOD_VEX_0F17) },
c0f3af97 8461 /* 18 */
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 },
c0f3af97 8470 /* 20 */
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 },
c0f3af97 8479 /* 28 */
ec6f095a
L
8480 { "vmovapX", { XM, EXx }, 0 },
8481 { "vmovapX", { EXxS, XM }, 0 },
592a252b
L
8482 { PREFIX_TABLE (PREFIX_VEX_0F2A) },
8483 { MOD_TABLE (MOD_VEX_0F2B) },
8484 { PREFIX_TABLE (PREFIX_VEX_0F2C) },
8485 { PREFIX_TABLE (PREFIX_VEX_0F2D) },
8486 { PREFIX_TABLE (PREFIX_VEX_0F2E) },
8487 { PREFIX_TABLE (PREFIX_VEX_0F2F) },
85f10a01 8488 /* 30 */
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 /* 38 */
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 },
d5d7db8e 8506 /* 40 */
592d1631 8507 { Bad_Opcode },
43234a1e
L
8508 { PREFIX_TABLE (PREFIX_VEX_0F41) },
8509 { PREFIX_TABLE (PREFIX_VEX_0F42) },
592d1631 8510 { Bad_Opcode },
43234a1e
L
8511 { PREFIX_TABLE (PREFIX_VEX_0F44) },
8512 { PREFIX_TABLE (PREFIX_VEX_0F45) },
8513 { PREFIX_TABLE (PREFIX_VEX_0F46) },
8514 { PREFIX_TABLE (PREFIX_VEX_0F47) },
85f10a01 8515 /* 48 */
592d1631
L
8516 { Bad_Opcode },
8517 { Bad_Opcode },
1ba585e8 8518 { PREFIX_TABLE (PREFIX_VEX_0F4A) },
43234a1e 8519 { PREFIX_TABLE (PREFIX_VEX_0F4B) },
592d1631
L
8520 { Bad_Opcode },
8521 { Bad_Opcode },
8522 { Bad_Opcode },
8523 { Bad_Opcode },
d5d7db8e 8524 /* 50 */
592a252b
L
8525 { MOD_TABLE (MOD_VEX_0F50) },
8526 { PREFIX_TABLE (PREFIX_VEX_0F51) },
8527 { PREFIX_TABLE (PREFIX_VEX_0F52) },
8528 { PREFIX_TABLE (PREFIX_VEX_0F53) },
bf890a93
IT
8529 { "vandpX", { XM, Vex, EXx }, 0 },
8530 { "vandnpX", { XM, Vex, EXx }, 0 },
8531 { "vorpX", { XM, Vex, EXx }, 0 },
8532 { "vxorpX", { XM, Vex, EXx }, 0 },
c0f3af97 8533 /* 58 */
592a252b
L
8534 { PREFIX_TABLE (PREFIX_VEX_0F58) },
8535 { PREFIX_TABLE (PREFIX_VEX_0F59) },
8536 { PREFIX_TABLE (PREFIX_VEX_0F5A) },
8537 { PREFIX_TABLE (PREFIX_VEX_0F5B) },
8538 { PREFIX_TABLE (PREFIX_VEX_0F5C) },
8539 { PREFIX_TABLE (PREFIX_VEX_0F5D) },
8540 { PREFIX_TABLE (PREFIX_VEX_0F5E) },
8541 { PREFIX_TABLE (PREFIX_VEX_0F5F) },
c0f3af97 8542 /* 60 */
592a252b
L
8543 { PREFIX_TABLE (PREFIX_VEX_0F60) },
8544 { PREFIX_TABLE (PREFIX_VEX_0F61) },
8545 { PREFIX_TABLE (PREFIX_VEX_0F62) },
8546 { PREFIX_TABLE (PREFIX_VEX_0F63) },
8547 { PREFIX_TABLE (PREFIX_VEX_0F64) },
8548 { PREFIX_TABLE (PREFIX_VEX_0F65) },
8549 { PREFIX_TABLE (PREFIX_VEX_0F66) },
8550 { PREFIX_TABLE (PREFIX_VEX_0F67) },
c0f3af97 8551 /* 68 */
592a252b
L
8552 { PREFIX_TABLE (PREFIX_VEX_0F68) },
8553 { PREFIX_TABLE (PREFIX_VEX_0F69) },
8554 { PREFIX_TABLE (PREFIX_VEX_0F6A) },
8555 { PREFIX_TABLE (PREFIX_VEX_0F6B) },
8556 { PREFIX_TABLE (PREFIX_VEX_0F6C) },
8557 { PREFIX_TABLE (PREFIX_VEX_0F6D) },
8558 { PREFIX_TABLE (PREFIX_VEX_0F6E) },
8559 { PREFIX_TABLE (PREFIX_VEX_0F6F) },
c0f3af97 8560 /* 70 */
592a252b
L
8561 { PREFIX_TABLE (PREFIX_VEX_0F70) },
8562 { REG_TABLE (REG_VEX_0F71) },
8563 { REG_TABLE (REG_VEX_0F72) },
8564 { REG_TABLE (REG_VEX_0F73) },
8565 { PREFIX_TABLE (PREFIX_VEX_0F74) },
8566 { PREFIX_TABLE (PREFIX_VEX_0F75) },
8567 { PREFIX_TABLE (PREFIX_VEX_0F76) },
8568 { PREFIX_TABLE (PREFIX_VEX_0F77) },
c0f3af97 8569 /* 78 */
592d1631
L
8570 { Bad_Opcode },
8571 { Bad_Opcode },
8572 { Bad_Opcode },
8573 { Bad_Opcode },
592a252b
L
8574 { PREFIX_TABLE (PREFIX_VEX_0F7C) },
8575 { PREFIX_TABLE (PREFIX_VEX_0F7D) },
8576 { PREFIX_TABLE (PREFIX_VEX_0F7E) },
8577 { PREFIX_TABLE (PREFIX_VEX_0F7F) },
c0f3af97 8578 /* 80 */
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 },
c0f3af97 8587 /* 88 */
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 },
c0f3af97 8596 /* 90 */
43234a1e
L
8597 { PREFIX_TABLE (PREFIX_VEX_0F90) },
8598 { PREFIX_TABLE (PREFIX_VEX_0F91) },
8599 { PREFIX_TABLE (PREFIX_VEX_0F92) },
8600 { PREFIX_TABLE (PREFIX_VEX_0F93) },
592d1631
L
8601 { Bad_Opcode },
8602 { Bad_Opcode },
8603 { Bad_Opcode },
8604 { Bad_Opcode },
c0f3af97 8605 /* 98 */
43234a1e 8606 { PREFIX_TABLE (PREFIX_VEX_0F98) },
1ba585e8 8607 { PREFIX_TABLE (PREFIX_VEX_0F99) },
592d1631
L
8608 { Bad_Opcode },
8609 { Bad_Opcode },
8610 { Bad_Opcode },
8611 { Bad_Opcode },
8612 { Bad_Opcode },
8613 { Bad_Opcode },
c0f3af97 8614 /* a0 */
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 },
c0f3af97 8623 /* a8 */
592d1631
L
8624 { Bad_Opcode },
8625 { Bad_Opcode },
8626 { Bad_Opcode },
8627 { Bad_Opcode },
8628 { Bad_Opcode },
8629 { Bad_Opcode },
592a252b 8630 { REG_TABLE (REG_VEX_0FAE) },
592d1631 8631 { Bad_Opcode },
c0f3af97 8632 /* b0 */
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 },
c0f3af97 8641 /* b8 */
592d1631
L
8642 { Bad_Opcode },
8643 { Bad_Opcode },
8644 { Bad_Opcode },
8645 { Bad_Opcode },
8646 { Bad_Opcode },
8647 { Bad_Opcode },
8648 { Bad_Opcode },
8649 { Bad_Opcode },
c0f3af97 8650 /* c0 */
592d1631
L
8651 { Bad_Opcode },
8652 { Bad_Opcode },
592a252b 8653 { PREFIX_TABLE (PREFIX_VEX_0FC2) },
592d1631 8654 { Bad_Opcode },
592a252b
L
8655 { PREFIX_TABLE (PREFIX_VEX_0FC4) },
8656 { PREFIX_TABLE (PREFIX_VEX_0FC5) },
bf890a93 8657 { "vshufpX", { XM, Vex, EXx, Ib }, 0 },
592d1631 8658 { Bad_Opcode },
c0f3af97 8659 /* c8 */
592d1631
L
8660 { Bad_Opcode },
8661 { Bad_Opcode },
8662 { Bad_Opcode },
8663 { Bad_Opcode },
8664 { Bad_Opcode },
8665 { Bad_Opcode },
8666 { Bad_Opcode },
8667 { Bad_Opcode },
c0f3af97 8668 /* d0 */
592a252b
L
8669 { PREFIX_TABLE (PREFIX_VEX_0FD0) },
8670 { PREFIX_TABLE (PREFIX_VEX_0FD1) },
8671 { PREFIX_TABLE (PREFIX_VEX_0FD2) },
8672 { PREFIX_TABLE (PREFIX_VEX_0FD3) },
8673 { PREFIX_TABLE (PREFIX_VEX_0FD4) },
8674 { PREFIX_TABLE (PREFIX_VEX_0FD5) },
8675 { PREFIX_TABLE (PREFIX_VEX_0FD6) },
8676 { PREFIX_TABLE (PREFIX_VEX_0FD7) },
c0f3af97 8677 /* d8 */
592a252b
L
8678 { PREFIX_TABLE (PREFIX_VEX_0FD8) },
8679 { PREFIX_TABLE (PREFIX_VEX_0FD9) },
8680 { PREFIX_TABLE (PREFIX_VEX_0FDA) },
8681 { PREFIX_TABLE (PREFIX_VEX_0FDB) },
8682 { PREFIX_TABLE (PREFIX_VEX_0FDC) },
8683 { PREFIX_TABLE (PREFIX_VEX_0FDD) },
8684 { PREFIX_TABLE (PREFIX_VEX_0FDE) },
8685 { PREFIX_TABLE (PREFIX_VEX_0FDF) },
c0f3af97 8686 /* e0 */
592a252b
L
8687 { PREFIX_TABLE (PREFIX_VEX_0FE0) },
8688 { PREFIX_TABLE (PREFIX_VEX_0FE1) },
8689 { PREFIX_TABLE (PREFIX_VEX_0FE2) },
8690 { PREFIX_TABLE (PREFIX_VEX_0FE3) },
8691 { PREFIX_TABLE (PREFIX_VEX_0FE4) },
8692 { PREFIX_TABLE (PREFIX_VEX_0FE5) },
8693 { PREFIX_TABLE (PREFIX_VEX_0FE6) },
8694 { PREFIX_TABLE (PREFIX_VEX_0FE7) },
c0f3af97 8695 /* e8 */
592a252b
L
8696 { PREFIX_TABLE (PREFIX_VEX_0FE8) },
8697 { PREFIX_TABLE (PREFIX_VEX_0FE9) },
8698 { PREFIX_TABLE (PREFIX_VEX_0FEA) },
8699 { PREFIX_TABLE (PREFIX_VEX_0FEB) },
8700 { PREFIX_TABLE (PREFIX_VEX_0FEC) },
8701 { PREFIX_TABLE (PREFIX_VEX_0FED) },
8702 { PREFIX_TABLE (PREFIX_VEX_0FEE) },
8703 { PREFIX_TABLE (PREFIX_VEX_0FEF) },
c0f3af97 8704 /* f0 */
592a252b
L
8705 { PREFIX_TABLE (PREFIX_VEX_0FF0) },
8706 { PREFIX_TABLE (PREFIX_VEX_0FF1) },
8707 { PREFIX_TABLE (PREFIX_VEX_0FF2) },
8708 { PREFIX_TABLE (PREFIX_VEX_0FF3) },
8709 { PREFIX_TABLE (PREFIX_VEX_0FF4) },
8710 { PREFIX_TABLE (PREFIX_VEX_0FF5) },
8711 { PREFIX_TABLE (PREFIX_VEX_0FF6) },
8712 { PREFIX_TABLE (PREFIX_VEX_0FF7) },
c0f3af97 8713 /* f8 */
592a252b
L
8714 { PREFIX_TABLE (PREFIX_VEX_0FF8) },
8715 { PREFIX_TABLE (PREFIX_VEX_0FF9) },
8716 { PREFIX_TABLE (PREFIX_VEX_0FFA) },
8717 { PREFIX_TABLE (PREFIX_VEX_0FFB) },
8718 { PREFIX_TABLE (PREFIX_VEX_0FFC) },
8719 { PREFIX_TABLE (PREFIX_VEX_0FFD) },
8720 { PREFIX_TABLE (PREFIX_VEX_0FFE) },
592d1631 8721 { Bad_Opcode },
c0f3af97
L
8722 },
8723 /* VEX_0F38 */
8724 {
8725 /* 00 */
592a252b
L
8726 { PREFIX_TABLE (PREFIX_VEX_0F3800) },
8727 { PREFIX_TABLE (PREFIX_VEX_0F3801) },
8728 { PREFIX_TABLE (PREFIX_VEX_0F3802) },
8729 { PREFIX_TABLE (PREFIX_VEX_0F3803) },
8730 { PREFIX_TABLE (PREFIX_VEX_0F3804) },
8731 { PREFIX_TABLE (PREFIX_VEX_0F3805) },
8732 { PREFIX_TABLE (PREFIX_VEX_0F3806) },
8733 { PREFIX_TABLE (PREFIX_VEX_0F3807) },
c0f3af97 8734 /* 08 */
592a252b
L
8735 { PREFIX_TABLE (PREFIX_VEX_0F3808) },
8736 { PREFIX_TABLE (PREFIX_VEX_0F3809) },
8737 { PREFIX_TABLE (PREFIX_VEX_0F380A) },
8738 { PREFIX_TABLE (PREFIX_VEX_0F380B) },
8739 { PREFIX_TABLE (PREFIX_VEX_0F380C) },
8740 { PREFIX_TABLE (PREFIX_VEX_0F380D) },
8741 { PREFIX_TABLE (PREFIX_VEX_0F380E) },
8742 { PREFIX_TABLE (PREFIX_VEX_0F380F) },
c0f3af97 8743 /* 10 */
592d1631
L
8744 { Bad_Opcode },
8745 { Bad_Opcode },
8746 { Bad_Opcode },
592a252b 8747 { PREFIX_TABLE (PREFIX_VEX_0F3813) },
592d1631
L
8748 { Bad_Opcode },
8749 { Bad_Opcode },
6c30d220 8750 { PREFIX_TABLE (PREFIX_VEX_0F3816) },
592a252b 8751 { PREFIX_TABLE (PREFIX_VEX_0F3817) },
c0f3af97 8752 /* 18 */
592a252b
L
8753 { PREFIX_TABLE (PREFIX_VEX_0F3818) },
8754 { PREFIX_TABLE (PREFIX_VEX_0F3819) },
8755 { PREFIX_TABLE (PREFIX_VEX_0F381A) },
592d1631 8756 { Bad_Opcode },
592a252b
L
8757 { PREFIX_TABLE (PREFIX_VEX_0F381C) },
8758 { PREFIX_TABLE (PREFIX_VEX_0F381D) },
8759 { PREFIX_TABLE (PREFIX_VEX_0F381E) },
592d1631 8760 { Bad_Opcode },
c0f3af97 8761 /* 20 */
592a252b
L
8762 { PREFIX_TABLE (PREFIX_VEX_0F3820) },
8763 { PREFIX_TABLE (PREFIX_VEX_0F3821) },
8764 { PREFIX_TABLE (PREFIX_VEX_0F3822) },
8765 { PREFIX_TABLE (PREFIX_VEX_0F3823) },
8766 { PREFIX_TABLE (PREFIX_VEX_0F3824) },
8767 { PREFIX_TABLE (PREFIX_VEX_0F3825) },
592d1631
L
8768 { Bad_Opcode },
8769 { Bad_Opcode },
c0f3af97 8770 /* 28 */
592a252b
L
8771 { PREFIX_TABLE (PREFIX_VEX_0F3828) },
8772 { PREFIX_TABLE (PREFIX_VEX_0F3829) },
8773 { PREFIX_TABLE (PREFIX_VEX_0F382A) },
8774 { PREFIX_TABLE (PREFIX_VEX_0F382B) },
8775 { PREFIX_TABLE (PREFIX_VEX_0F382C) },
8776 { PREFIX_TABLE (PREFIX_VEX_0F382D) },
8777 { PREFIX_TABLE (PREFIX_VEX_0F382E) },
8778 { PREFIX_TABLE (PREFIX_VEX_0F382F) },
c0f3af97 8779 /* 30 */
592a252b
L
8780 { PREFIX_TABLE (PREFIX_VEX_0F3830) },
8781 { PREFIX_TABLE (PREFIX_VEX_0F3831) },
8782 { PREFIX_TABLE (PREFIX_VEX_0F3832) },
8783 { PREFIX_TABLE (PREFIX_VEX_0F3833) },
8784 { PREFIX_TABLE (PREFIX_VEX_0F3834) },
8785 { PREFIX_TABLE (PREFIX_VEX_0F3835) },
6c30d220 8786 { PREFIX_TABLE (PREFIX_VEX_0F3836) },
592a252b 8787 { PREFIX_TABLE (PREFIX_VEX_0F3837) },
c0f3af97 8788 /* 38 */
592a252b
L
8789 { PREFIX_TABLE (PREFIX_VEX_0F3838) },
8790 { PREFIX_TABLE (PREFIX_VEX_0F3839) },
8791 { PREFIX_TABLE (PREFIX_VEX_0F383A) },
8792 { PREFIX_TABLE (PREFIX_VEX_0F383B) },
8793 { PREFIX_TABLE (PREFIX_VEX_0F383C) },
8794 { PREFIX_TABLE (PREFIX_VEX_0F383D) },
8795 { PREFIX_TABLE (PREFIX_VEX_0F383E) },
8796 { PREFIX_TABLE (PREFIX_VEX_0F383F) },
c0f3af97 8797 /* 40 */
592a252b
L
8798 { PREFIX_TABLE (PREFIX_VEX_0F3840) },
8799 { PREFIX_TABLE (PREFIX_VEX_0F3841) },
592d1631
L
8800 { Bad_Opcode },
8801 { Bad_Opcode },
8802 { Bad_Opcode },
6c30d220
L
8803 { PREFIX_TABLE (PREFIX_VEX_0F3845) },
8804 { PREFIX_TABLE (PREFIX_VEX_0F3846) },
8805 { PREFIX_TABLE (PREFIX_VEX_0F3847) },
c0f3af97 8806 /* 48 */
592d1631
L
8807 { Bad_Opcode },
8808 { Bad_Opcode },
8809 { Bad_Opcode },
8810 { Bad_Opcode },
8811 { Bad_Opcode },
8812 { Bad_Opcode },
8813 { Bad_Opcode },
8814 { Bad_Opcode },
c0f3af97 8815 /* 50 */
592d1631
L
8816 { Bad_Opcode },
8817 { Bad_Opcode },
8818 { Bad_Opcode },
8819 { Bad_Opcode },
8820 { Bad_Opcode },
8821 { Bad_Opcode },
8822 { Bad_Opcode },
8823 { Bad_Opcode },
c0f3af97 8824 /* 58 */
6c30d220
L
8825 { PREFIX_TABLE (PREFIX_VEX_0F3858) },
8826 { PREFIX_TABLE (PREFIX_VEX_0F3859) },
8827 { PREFIX_TABLE (PREFIX_VEX_0F385A) },
592d1631
L
8828 { Bad_Opcode },
8829 { Bad_Opcode },
8830 { Bad_Opcode },
8831 { Bad_Opcode },
8832 { Bad_Opcode },
c0f3af97 8833 /* 60 */
592d1631
L
8834 { Bad_Opcode },
8835 { Bad_Opcode },
8836 { Bad_Opcode },
8837 { Bad_Opcode },
8838 { Bad_Opcode },
8839 { Bad_Opcode },
8840 { Bad_Opcode },
8841 { Bad_Opcode },
c0f3af97 8842 /* 68 */
592d1631
L
8843 { Bad_Opcode },
8844 { Bad_Opcode },
8845 { Bad_Opcode },
8846 { Bad_Opcode },
8847 { Bad_Opcode },
8848 { Bad_Opcode },
8849 { Bad_Opcode },
8850 { Bad_Opcode },
c0f3af97 8851 /* 70 */
592d1631
L
8852 { Bad_Opcode },
8853 { Bad_Opcode },
8854 { Bad_Opcode },
8855 { Bad_Opcode },
8856 { Bad_Opcode },
8857 { Bad_Opcode },
8858 { Bad_Opcode },
8859 { Bad_Opcode },
c0f3af97 8860 /* 78 */
6c30d220
L
8861 { PREFIX_TABLE (PREFIX_VEX_0F3878) },
8862 { PREFIX_TABLE (PREFIX_VEX_0F3879) },
592d1631
L
8863 { Bad_Opcode },
8864 { Bad_Opcode },
8865 { Bad_Opcode },
8866 { Bad_Opcode },
8867 { Bad_Opcode },
8868 { Bad_Opcode },
c0f3af97 8869 /* 80 */
592d1631
L
8870 { Bad_Opcode },
8871 { Bad_Opcode },
8872 { Bad_Opcode },
8873 { Bad_Opcode },
8874 { Bad_Opcode },
8875 { Bad_Opcode },
8876 { Bad_Opcode },
8877 { Bad_Opcode },
c0f3af97 8878 /* 88 */
592d1631
L
8879 { Bad_Opcode },
8880 { Bad_Opcode },
8881 { Bad_Opcode },
8882 { Bad_Opcode },
6c30d220 8883 { PREFIX_TABLE (PREFIX_VEX_0F388C) },
592d1631 8884 { Bad_Opcode },
6c30d220 8885 { PREFIX_TABLE (PREFIX_VEX_0F388E) },
592d1631 8886 { Bad_Opcode },
c0f3af97 8887 /* 90 */
6c30d220
L
8888 { PREFIX_TABLE (PREFIX_VEX_0F3890) },
8889 { PREFIX_TABLE (PREFIX_VEX_0F3891) },
8890 { PREFIX_TABLE (PREFIX_VEX_0F3892) },
8891 { PREFIX_TABLE (PREFIX_VEX_0F3893) },
592d1631
L
8892 { Bad_Opcode },
8893 { Bad_Opcode },
592a252b
L
8894 { PREFIX_TABLE (PREFIX_VEX_0F3896) },
8895 { PREFIX_TABLE (PREFIX_VEX_0F3897) },
c0f3af97 8896 /* 98 */
592a252b
L
8897 { PREFIX_TABLE (PREFIX_VEX_0F3898) },
8898 { PREFIX_TABLE (PREFIX_VEX_0F3899) },
8899 { PREFIX_TABLE (PREFIX_VEX_0F389A) },
8900 { PREFIX_TABLE (PREFIX_VEX_0F389B) },
8901 { PREFIX_TABLE (PREFIX_VEX_0F389C) },
8902 { PREFIX_TABLE (PREFIX_VEX_0F389D) },
8903 { PREFIX_TABLE (PREFIX_VEX_0F389E) },
8904 { PREFIX_TABLE (PREFIX_VEX_0F389F) },
c0f3af97 8905 /* a0 */
592d1631
L
8906 { Bad_Opcode },
8907 { Bad_Opcode },
8908 { Bad_Opcode },
8909 { Bad_Opcode },
8910 { Bad_Opcode },
8911 { Bad_Opcode },
592a252b
L
8912 { PREFIX_TABLE (PREFIX_VEX_0F38A6) },
8913 { PREFIX_TABLE (PREFIX_VEX_0F38A7) },
c0f3af97 8914 /* a8 */
592a252b
L
8915 { PREFIX_TABLE (PREFIX_VEX_0F38A8) },
8916 { PREFIX_TABLE (PREFIX_VEX_0F38A9) },
8917 { PREFIX_TABLE (PREFIX_VEX_0F38AA) },
8918 { PREFIX_TABLE (PREFIX_VEX_0F38AB) },
8919 { PREFIX_TABLE (PREFIX_VEX_0F38AC) },
8920 { PREFIX_TABLE (PREFIX_VEX_0F38AD) },
8921 { PREFIX_TABLE (PREFIX_VEX_0F38AE) },
8922 { PREFIX_TABLE (PREFIX_VEX_0F38AF) },
c0f3af97 8923 /* b0 */
592d1631
L
8924 { Bad_Opcode },
8925 { Bad_Opcode },
8926 { Bad_Opcode },
8927 { Bad_Opcode },
8928 { Bad_Opcode },
8929 { Bad_Opcode },
592a252b
L
8930 { PREFIX_TABLE (PREFIX_VEX_0F38B6) },
8931 { PREFIX_TABLE (PREFIX_VEX_0F38B7) },
c0f3af97 8932 /* b8 */
592a252b
L
8933 { PREFIX_TABLE (PREFIX_VEX_0F38B8) },
8934 { PREFIX_TABLE (PREFIX_VEX_0F38B9) },
8935 { PREFIX_TABLE (PREFIX_VEX_0F38BA) },
8936 { PREFIX_TABLE (PREFIX_VEX_0F38BB) },
8937 { PREFIX_TABLE (PREFIX_VEX_0F38BC) },
8938 { PREFIX_TABLE (PREFIX_VEX_0F38BD) },
8939 { PREFIX_TABLE (PREFIX_VEX_0F38BE) },
8940 { PREFIX_TABLE (PREFIX_VEX_0F38BF) },
c0f3af97 8941 /* c0 */
592d1631
L
8942 { Bad_Opcode },
8943 { Bad_Opcode },
8944 { Bad_Opcode },
8945 { Bad_Opcode },
8946 { Bad_Opcode },
8947 { Bad_Opcode },
8948 { Bad_Opcode },
8949 { Bad_Opcode },
c0f3af97 8950 /* c8 */
592d1631
L
8951 { Bad_Opcode },
8952 { Bad_Opcode },
8953 { Bad_Opcode },
8954 { Bad_Opcode },
8955 { Bad_Opcode },
8956 { Bad_Opcode },
8957 { Bad_Opcode },
48521003 8958 { PREFIX_TABLE (PREFIX_VEX_0F38CF) },
c0f3af97 8959 /* d0 */
592d1631
L
8960 { Bad_Opcode },
8961 { Bad_Opcode },
8962 { Bad_Opcode },
8963 { Bad_Opcode },
8964 { Bad_Opcode },
8965 { Bad_Opcode },
8966 { Bad_Opcode },
8967 { Bad_Opcode },
c0f3af97 8968 /* d8 */
592d1631
L
8969 { Bad_Opcode },
8970 { Bad_Opcode },
8971 { Bad_Opcode },
592a252b
L
8972 { PREFIX_TABLE (PREFIX_VEX_0F38DB) },
8973 { PREFIX_TABLE (PREFIX_VEX_0F38DC) },
8974 { PREFIX_TABLE (PREFIX_VEX_0F38DD) },
8975 { PREFIX_TABLE (PREFIX_VEX_0F38DE) },
8976 { PREFIX_TABLE (PREFIX_VEX_0F38DF) },
c0f3af97 8977 /* e0 */
592d1631
L
8978 { Bad_Opcode },
8979 { Bad_Opcode },
8980 { Bad_Opcode },
8981 { Bad_Opcode },
8982 { Bad_Opcode },
8983 { Bad_Opcode },
8984 { Bad_Opcode },
8985 { Bad_Opcode },
c0f3af97 8986 /* e8 */
592d1631
L
8987 { Bad_Opcode },
8988 { Bad_Opcode },
8989 { Bad_Opcode },
8990 { Bad_Opcode },
8991 { Bad_Opcode },
8992 { Bad_Opcode },
8993 { Bad_Opcode },
8994 { Bad_Opcode },
c0f3af97 8995 /* f0 */
592d1631
L
8996 { Bad_Opcode },
8997 { Bad_Opcode },
f12dc422
L
8998 { PREFIX_TABLE (PREFIX_VEX_0F38F2) },
8999 { REG_TABLE (REG_VEX_0F38F3) },
592d1631 9000 { Bad_Opcode },
6c30d220
L
9001 { PREFIX_TABLE (PREFIX_VEX_0F38F5) },
9002 { PREFIX_TABLE (PREFIX_VEX_0F38F6) },
f12dc422 9003 { PREFIX_TABLE (PREFIX_VEX_0F38F7) },
c0f3af97 9004 /* f8 */
592d1631
L
9005 { Bad_Opcode },
9006 { Bad_Opcode },
9007 { Bad_Opcode },
9008 { Bad_Opcode },
9009 { Bad_Opcode },
9010 { Bad_Opcode },
9011 { Bad_Opcode },
9012 { Bad_Opcode },
c0f3af97
L
9013 },
9014 /* VEX_0F3A */
9015 {
9016 /* 00 */
6c30d220
L
9017 { PREFIX_TABLE (PREFIX_VEX_0F3A00) },
9018 { PREFIX_TABLE (PREFIX_VEX_0F3A01) },
9019 { PREFIX_TABLE (PREFIX_VEX_0F3A02) },
592d1631 9020 { Bad_Opcode },
592a252b
L
9021 { PREFIX_TABLE (PREFIX_VEX_0F3A04) },
9022 { PREFIX_TABLE (PREFIX_VEX_0F3A05) },
9023 { PREFIX_TABLE (PREFIX_VEX_0F3A06) },
592d1631 9024 { Bad_Opcode },
c0f3af97 9025 /* 08 */
592a252b
L
9026 { PREFIX_TABLE (PREFIX_VEX_0F3A08) },
9027 { PREFIX_TABLE (PREFIX_VEX_0F3A09) },
9028 { PREFIX_TABLE (PREFIX_VEX_0F3A0A) },
9029 { PREFIX_TABLE (PREFIX_VEX_0F3A0B) },
9030 { PREFIX_TABLE (PREFIX_VEX_0F3A0C) },
9031 { PREFIX_TABLE (PREFIX_VEX_0F3A0D) },
9032 { PREFIX_TABLE (PREFIX_VEX_0F3A0E) },
9033 { PREFIX_TABLE (PREFIX_VEX_0F3A0F) },
c0f3af97 9034 /* 10 */
592d1631
L
9035 { Bad_Opcode },
9036 { Bad_Opcode },
9037 { Bad_Opcode },
9038 { Bad_Opcode },
592a252b
L
9039 { PREFIX_TABLE (PREFIX_VEX_0F3A14) },
9040 { PREFIX_TABLE (PREFIX_VEX_0F3A15) },
9041 { PREFIX_TABLE (PREFIX_VEX_0F3A16) },
9042 { PREFIX_TABLE (PREFIX_VEX_0F3A17) },
c0f3af97 9043 /* 18 */
592a252b
L
9044 { PREFIX_TABLE (PREFIX_VEX_0F3A18) },
9045 { PREFIX_TABLE (PREFIX_VEX_0F3A19) },
592d1631
L
9046 { Bad_Opcode },
9047 { Bad_Opcode },
9048 { Bad_Opcode },
592a252b 9049 { PREFIX_TABLE (PREFIX_VEX_0F3A1D) },
592d1631
L
9050 { Bad_Opcode },
9051 { Bad_Opcode },
c0f3af97 9052 /* 20 */
592a252b
L
9053 { PREFIX_TABLE (PREFIX_VEX_0F3A20) },
9054 { PREFIX_TABLE (PREFIX_VEX_0F3A21) },
9055 { PREFIX_TABLE (PREFIX_VEX_0F3A22) },
592d1631
L
9056 { Bad_Opcode },
9057 { Bad_Opcode },
9058 { Bad_Opcode },
9059 { Bad_Opcode },
9060 { Bad_Opcode },
c0f3af97 9061 /* 28 */
592d1631
L
9062 { Bad_Opcode },
9063 { Bad_Opcode },
9064 { Bad_Opcode },
9065 { Bad_Opcode },
9066 { Bad_Opcode },
9067 { Bad_Opcode },
9068 { Bad_Opcode },
9069 { Bad_Opcode },
c0f3af97 9070 /* 30 */
43234a1e 9071 { PREFIX_TABLE (PREFIX_VEX_0F3A30) },
1ba585e8 9072 { PREFIX_TABLE (PREFIX_VEX_0F3A31) },
43234a1e 9073 { PREFIX_TABLE (PREFIX_VEX_0F3A32) },
1ba585e8 9074 { PREFIX_TABLE (PREFIX_VEX_0F3A33) },
592d1631
L
9075 { Bad_Opcode },
9076 { Bad_Opcode },
9077 { Bad_Opcode },
9078 { Bad_Opcode },
c0f3af97 9079 /* 38 */
6c30d220
L
9080 { PREFIX_TABLE (PREFIX_VEX_0F3A38) },
9081 { PREFIX_TABLE (PREFIX_VEX_0F3A39) },
592d1631
L
9082 { Bad_Opcode },
9083 { Bad_Opcode },
9084 { Bad_Opcode },
9085 { Bad_Opcode },
9086 { Bad_Opcode },
9087 { Bad_Opcode },
c0f3af97 9088 /* 40 */
592a252b
L
9089 { PREFIX_TABLE (PREFIX_VEX_0F3A40) },
9090 { PREFIX_TABLE (PREFIX_VEX_0F3A41) },
9091 { PREFIX_TABLE (PREFIX_VEX_0F3A42) },
592d1631 9092 { Bad_Opcode },
592a252b 9093 { PREFIX_TABLE (PREFIX_VEX_0F3A44) },
592d1631 9094 { Bad_Opcode },
6c30d220 9095 { PREFIX_TABLE (PREFIX_VEX_0F3A46) },
592d1631 9096 { Bad_Opcode },
c0f3af97 9097 /* 48 */
592a252b
L
9098 { PREFIX_TABLE (PREFIX_VEX_0F3A48) },
9099 { PREFIX_TABLE (PREFIX_VEX_0F3A49) },
9100 { PREFIX_TABLE (PREFIX_VEX_0F3A4A) },
9101 { PREFIX_TABLE (PREFIX_VEX_0F3A4B) },
9102 { PREFIX_TABLE (PREFIX_VEX_0F3A4C) },
592d1631
L
9103 { Bad_Opcode },
9104 { Bad_Opcode },
9105 { Bad_Opcode },
c0f3af97 9106 /* 50 */
592d1631
L
9107 { Bad_Opcode },
9108 { Bad_Opcode },
9109 { Bad_Opcode },
9110 { Bad_Opcode },
9111 { Bad_Opcode },
9112 { Bad_Opcode },
9113 { Bad_Opcode },
9114 { Bad_Opcode },
c0f3af97 9115 /* 58 */
592d1631
L
9116 { Bad_Opcode },
9117 { Bad_Opcode },
9118 { Bad_Opcode },
9119 { Bad_Opcode },
592a252b
L
9120 { PREFIX_TABLE (PREFIX_VEX_0F3A5C) },
9121 { PREFIX_TABLE (PREFIX_VEX_0F3A5D) },
9122 { PREFIX_TABLE (PREFIX_VEX_0F3A5E) },
9123 { PREFIX_TABLE (PREFIX_VEX_0F3A5F) },
c0f3af97 9124 /* 60 */
592a252b
L
9125 { PREFIX_TABLE (PREFIX_VEX_0F3A60) },
9126 { PREFIX_TABLE (PREFIX_VEX_0F3A61) },
9127 { PREFIX_TABLE (PREFIX_VEX_0F3A62) },
9128 { PREFIX_TABLE (PREFIX_VEX_0F3A63) },
592d1631
L
9129 { Bad_Opcode },
9130 { Bad_Opcode },
9131 { Bad_Opcode },
9132 { Bad_Opcode },
c0f3af97 9133 /* 68 */
592a252b
L
9134 { PREFIX_TABLE (PREFIX_VEX_0F3A68) },
9135 { PREFIX_TABLE (PREFIX_VEX_0F3A69) },
9136 { PREFIX_TABLE (PREFIX_VEX_0F3A6A) },
9137 { PREFIX_TABLE (PREFIX_VEX_0F3A6B) },
9138 { PREFIX_TABLE (PREFIX_VEX_0F3A6C) },
9139 { PREFIX_TABLE (PREFIX_VEX_0F3A6D) },
9140 { PREFIX_TABLE (PREFIX_VEX_0F3A6E) },
9141 { PREFIX_TABLE (PREFIX_VEX_0F3A6F) },
c0f3af97 9142 /* 70 */
592d1631
L
9143 { Bad_Opcode },
9144 { Bad_Opcode },
9145 { Bad_Opcode },
9146 { Bad_Opcode },
9147 { Bad_Opcode },
9148 { Bad_Opcode },
9149 { Bad_Opcode },
9150 { Bad_Opcode },
c0f3af97 9151 /* 78 */
592a252b
L
9152 { PREFIX_TABLE (PREFIX_VEX_0F3A78) },
9153 { PREFIX_TABLE (PREFIX_VEX_0F3A79) },
9154 { PREFIX_TABLE (PREFIX_VEX_0F3A7A) },
9155 { PREFIX_TABLE (PREFIX_VEX_0F3A7B) },
9156 { PREFIX_TABLE (PREFIX_VEX_0F3A7C) },
9157 { PREFIX_TABLE (PREFIX_VEX_0F3A7D) },
9158 { PREFIX_TABLE (PREFIX_VEX_0F3A7E) },
9159 { PREFIX_TABLE (PREFIX_VEX_0F3A7F) },
c0f3af97 9160 /* 80 */
592d1631
L
9161 { Bad_Opcode },
9162 { Bad_Opcode },
9163 { Bad_Opcode },
9164 { Bad_Opcode },
9165 { Bad_Opcode },
9166 { Bad_Opcode },
9167 { Bad_Opcode },
9168 { Bad_Opcode },
c0f3af97 9169 /* 88 */
592d1631
L
9170 { Bad_Opcode },
9171 { Bad_Opcode },
9172 { Bad_Opcode },
9173 { Bad_Opcode },
9174 { Bad_Opcode },
9175 { Bad_Opcode },
9176 { Bad_Opcode },
9177 { Bad_Opcode },
c0f3af97 9178 /* 90 */
592d1631
L
9179 { Bad_Opcode },
9180 { Bad_Opcode },
9181 { Bad_Opcode },
9182 { Bad_Opcode },
9183 { Bad_Opcode },
9184 { Bad_Opcode },
9185 { Bad_Opcode },
9186 { Bad_Opcode },
c0f3af97 9187 /* 98 */
592d1631
L
9188 { Bad_Opcode },
9189 { Bad_Opcode },
9190 { Bad_Opcode },
9191 { Bad_Opcode },
9192 { Bad_Opcode },
9193 { Bad_Opcode },
9194 { Bad_Opcode },
9195 { Bad_Opcode },
c0f3af97 9196 /* a0 */
592d1631
L
9197 { Bad_Opcode },
9198 { Bad_Opcode },
9199 { Bad_Opcode },
9200 { Bad_Opcode },
9201 { Bad_Opcode },
9202 { Bad_Opcode },
9203 { Bad_Opcode },
9204 { Bad_Opcode },
c0f3af97 9205 /* a8 */
592d1631
L
9206 { Bad_Opcode },
9207 { Bad_Opcode },
9208 { Bad_Opcode },
9209 { Bad_Opcode },
9210 { Bad_Opcode },
9211 { Bad_Opcode },
9212 { Bad_Opcode },
9213 { Bad_Opcode },
c0f3af97 9214 /* b0 */
592d1631
L
9215 { Bad_Opcode },
9216 { Bad_Opcode },
9217 { Bad_Opcode },
9218 { Bad_Opcode },
9219 { Bad_Opcode },
9220 { Bad_Opcode },
9221 { Bad_Opcode },
9222 { Bad_Opcode },
c0f3af97 9223 /* b8 */
592d1631
L
9224 { Bad_Opcode },
9225 { Bad_Opcode },
9226 { Bad_Opcode },
9227 { Bad_Opcode },
9228 { Bad_Opcode },
9229 { Bad_Opcode },
9230 { Bad_Opcode },
9231 { Bad_Opcode },
c0f3af97 9232 /* c0 */
592d1631
L
9233 { Bad_Opcode },
9234 { Bad_Opcode },
9235 { Bad_Opcode },
9236 { Bad_Opcode },
9237 { Bad_Opcode },
9238 { Bad_Opcode },
9239 { Bad_Opcode },
9240 { Bad_Opcode },
c0f3af97 9241 /* c8 */
592d1631
L
9242 { Bad_Opcode },
9243 { Bad_Opcode },
9244 { Bad_Opcode },
9245 { Bad_Opcode },
9246 { Bad_Opcode },
9247 { Bad_Opcode },
48521003
IT
9248 { PREFIX_TABLE(PREFIX_VEX_0F3ACE) },
9249 { PREFIX_TABLE(PREFIX_VEX_0F3ACF) },
c0f3af97 9250 /* d0 */
592d1631
L
9251 { Bad_Opcode },
9252 { Bad_Opcode },
9253 { Bad_Opcode },
9254 { Bad_Opcode },
9255 { Bad_Opcode },
9256 { Bad_Opcode },
9257 { Bad_Opcode },
9258 { Bad_Opcode },
c0f3af97 9259 /* d8 */
592d1631
L
9260 { Bad_Opcode },
9261 { Bad_Opcode },
9262 { Bad_Opcode },
9263 { Bad_Opcode },
9264 { Bad_Opcode },
9265 { Bad_Opcode },
9266 { Bad_Opcode },
592a252b 9267 { PREFIX_TABLE (PREFIX_VEX_0F3ADF) },
c0f3af97 9268 /* e0 */
592d1631
L
9269 { Bad_Opcode },
9270 { Bad_Opcode },
9271 { Bad_Opcode },
9272 { Bad_Opcode },
9273 { Bad_Opcode },
9274 { Bad_Opcode },
9275 { Bad_Opcode },
9276 { Bad_Opcode },
c0f3af97 9277 /* e8 */
592d1631
L
9278 { Bad_Opcode },
9279 { Bad_Opcode },
9280 { Bad_Opcode },
9281 { Bad_Opcode },
9282 { Bad_Opcode },
9283 { Bad_Opcode },
9284 { Bad_Opcode },
9285 { Bad_Opcode },
c0f3af97 9286 /* f0 */
6c30d220 9287 { PREFIX_TABLE (PREFIX_VEX_0F3AF0) },
592d1631
L
9288 { Bad_Opcode },
9289 { Bad_Opcode },
9290 { Bad_Opcode },
9291 { Bad_Opcode },
9292 { Bad_Opcode },
9293 { Bad_Opcode },
9294 { Bad_Opcode },
c0f3af97 9295 /* f8 */
592d1631
L
9296 { Bad_Opcode },
9297 { Bad_Opcode },
9298 { Bad_Opcode },
9299 { Bad_Opcode },
9300 { Bad_Opcode },
9301 { Bad_Opcode },
9302 { Bad_Opcode },
9303 { Bad_Opcode },
c0f3af97
L
9304 },
9305};
9306
43234a1e 9307#include "i386-dis-evex.h"
ad692897 9308
c0f3af97 9309static const struct dis386 vex_len_table[][2] = {
592a252b 9310 /* VEX_LEN_0F12_P_0_M_0 */
c0f3af97 9311 {
ec6f095a 9312 { "vmovlps", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9313 },
9314
592a252b 9315 /* VEX_LEN_0F12_P_0_M_1 */
c0f3af97 9316 {
ec6f095a 9317 { "vmovhlps", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9318 },
9319
592a252b 9320 /* VEX_LEN_0F12_P_2 */
c0f3af97 9321 {
ec6f095a 9322 { "vmovlpd", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9323 },
9324
592a252b 9325 /* VEX_LEN_0F13_M_0 */
c0f3af97 9326 {
ec6f095a 9327 { "vmovlpX", { EXq, XM }, 0 },
c0f3af97
L
9328 },
9329
592a252b 9330 /* VEX_LEN_0F16_P_0_M_0 */
c0f3af97 9331 {
ec6f095a 9332 { "vmovhps", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9333 },
9334
592a252b 9335 /* VEX_LEN_0F16_P_0_M_1 */
c0f3af97 9336 {
ec6f095a 9337 { "vmovlhps", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9338 },
9339
592a252b 9340 /* VEX_LEN_0F16_P_2 */
c0f3af97 9341 {
ec6f095a 9342 { "vmovhpd", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9343 },
9344
592a252b 9345 /* VEX_LEN_0F17_M_0 */
c0f3af97 9346 {
ec6f095a 9347 { "vmovhpX", { EXq, XM }, 0 },
c0f3af97
L
9348 },
9349
43234a1e
L
9350 /* VEX_LEN_0F41_P_0 */
9351 {
9352 { Bad_Opcode },
9353 { VEX_W_TABLE (VEX_W_0F41_P_0_LEN_1) },
9354 },
1ba585e8
IT
9355 /* VEX_LEN_0F41_P_2 */
9356 {
9357 { Bad_Opcode },
9358 { VEX_W_TABLE (VEX_W_0F41_P_2_LEN_1) },
9359 },
43234a1e
L
9360 /* VEX_LEN_0F42_P_0 */
9361 {
9362 { Bad_Opcode },
9363 { VEX_W_TABLE (VEX_W_0F42_P_0_LEN_1) },
9364 },
1ba585e8
IT
9365 /* VEX_LEN_0F42_P_2 */
9366 {
9367 { Bad_Opcode },
9368 { VEX_W_TABLE (VEX_W_0F42_P_2_LEN_1) },
9369 },
43234a1e
L
9370 /* VEX_LEN_0F44_P_0 */
9371 {
9372 { VEX_W_TABLE (VEX_W_0F44_P_0_LEN_0) },
9373 },
1ba585e8
IT
9374 /* VEX_LEN_0F44_P_2 */
9375 {
9376 { VEX_W_TABLE (VEX_W_0F44_P_2_LEN_0) },
9377 },
43234a1e
L
9378 /* VEX_LEN_0F45_P_0 */
9379 {
9380 { Bad_Opcode },
9381 { VEX_W_TABLE (VEX_W_0F45_P_0_LEN_1) },
9382 },
1ba585e8
IT
9383 /* VEX_LEN_0F45_P_2 */
9384 {
9385 { Bad_Opcode },
9386 { VEX_W_TABLE (VEX_W_0F45_P_2_LEN_1) },
9387 },
43234a1e
L
9388 /* VEX_LEN_0F46_P_0 */
9389 {
9390 { Bad_Opcode },
9391 { VEX_W_TABLE (VEX_W_0F46_P_0_LEN_1) },
9392 },
1ba585e8
IT
9393 /* VEX_LEN_0F46_P_2 */
9394 {
9395 { Bad_Opcode },
9396 { VEX_W_TABLE (VEX_W_0F46_P_2_LEN_1) },
9397 },
43234a1e
L
9398 /* VEX_LEN_0F47_P_0 */
9399 {
9400 { Bad_Opcode },
9401 { VEX_W_TABLE (VEX_W_0F47_P_0_LEN_1) },
9402 },
1ba585e8
IT
9403 /* VEX_LEN_0F47_P_2 */
9404 {
9405 { Bad_Opcode },
9406 { VEX_W_TABLE (VEX_W_0F47_P_2_LEN_1) },
9407 },
9408 /* VEX_LEN_0F4A_P_0 */
9409 {
9410 { Bad_Opcode },
9411 { VEX_W_TABLE (VEX_W_0F4A_P_0_LEN_1) },
9412 },
9413 /* VEX_LEN_0F4A_P_2 */
9414 {
9415 { Bad_Opcode },
9416 { VEX_W_TABLE (VEX_W_0F4A_P_2_LEN_1) },
9417 },
9418 /* VEX_LEN_0F4B_P_0 */
9419 {
9420 { Bad_Opcode },
9421 { VEX_W_TABLE (VEX_W_0F4B_P_0_LEN_1) },
9422 },
43234a1e
L
9423 /* VEX_LEN_0F4B_P_2 */
9424 {
9425 { Bad_Opcode },
9426 { VEX_W_TABLE (VEX_W_0F4B_P_2_LEN_1) },
9427 },
9428
ec6f095a 9429 /* VEX_LEN_0F6E_P_2 */
c0f3af97 9430 {
ec6f095a 9431 { "vmovK", { XMScalar, Edq }, 0 },
c0f3af97
L
9432 },
9433
ec6f095a 9434 /* VEX_LEN_0F77_P_1 */
c0f3af97 9435 {
ec6f095a
L
9436 { "vzeroupper", { XX }, 0 },
9437 { "vzeroall", { XX }, 0 },
c0f3af97
L
9438 },
9439
ec6f095a 9440 /* VEX_LEN_0F7E_P_1 */
c0f3af97 9441 {
ec6f095a 9442 { "vmovq", { XMScalar, EXqScalar }, 0 },
c0f3af97
L
9443 },
9444
ec6f095a 9445 /* VEX_LEN_0F7E_P_2 */
c0f3af97 9446 {
ec6f095a 9447 { "vmovK", { Edq, XMScalar }, 0 },
c0f3af97
L
9448 },
9449
ec6f095a 9450 /* VEX_LEN_0F90_P_0 */
c0f3af97 9451 {
ec6f095a 9452 { VEX_W_TABLE (VEX_W_0F90_P_0_LEN_0) },
c0f3af97
L
9453 },
9454
ec6f095a 9455 /* VEX_LEN_0F90_P_2 */
c0f3af97 9456 {
ec6f095a 9457 { VEX_W_TABLE (VEX_W_0F90_P_2_LEN_0) },
c0f3af97
L
9458 },
9459
ec6f095a 9460 /* VEX_LEN_0F91_P_0 */
c0f3af97 9461 {
ec6f095a 9462 { VEX_W_TABLE (VEX_W_0F91_P_0_LEN_0) },
c0f3af97
L
9463 },
9464
ec6f095a 9465 /* VEX_LEN_0F91_P_2 */
c0f3af97 9466 {
ec6f095a 9467 { VEX_W_TABLE (VEX_W_0F91_P_2_LEN_0) },
c0f3af97
L
9468 },
9469
ec6f095a 9470 /* VEX_LEN_0F92_P_0 */
c0f3af97 9471 {
ec6f095a 9472 { VEX_W_TABLE (VEX_W_0F92_P_0_LEN_0) },
c0f3af97
L
9473 },
9474
ec6f095a 9475 /* VEX_LEN_0F92_P_2 */
c0f3af97 9476 {
ec6f095a 9477 { VEX_W_TABLE (VEX_W_0F92_P_2_LEN_0) },
c0f3af97
L
9478 },
9479
ec6f095a 9480 /* VEX_LEN_0F92_P_3 */
c0f3af97 9481 {
58a211d2 9482 { MOD_TABLE (MOD_VEX_0F92_P_3_LEN_0) },
c0f3af97
L
9483 },
9484
ec6f095a 9485 /* VEX_LEN_0F93_P_0 */
c0f3af97 9486 {
ec6f095a 9487 { VEX_W_TABLE (VEX_W_0F93_P_0_LEN_0) },
c0f3af97
L
9488 },
9489
ec6f095a 9490 /* VEX_LEN_0F93_P_2 */
c0f3af97 9491 {
ec6f095a 9492 { VEX_W_TABLE (VEX_W_0F93_P_2_LEN_0) },
c0f3af97
L
9493 },
9494
ec6f095a 9495 /* VEX_LEN_0F93_P_3 */
c0f3af97 9496 {
58a211d2 9497 { MOD_TABLE (MOD_VEX_0F93_P_3_LEN_0) },
c0f3af97
L
9498 },
9499
ec6f095a 9500 /* VEX_LEN_0F98_P_0 */
43234a1e
L
9501 {
9502 { VEX_W_TABLE (VEX_W_0F98_P_0_LEN_0) },
9503 },
9504
1ba585e8
IT
9505 /* VEX_LEN_0F98_P_2 */
9506 {
9507 { VEX_W_TABLE (VEX_W_0F98_P_2_LEN_0) },
9508 },
9509
9510 /* VEX_LEN_0F99_P_0 */
9511 {
9512 { VEX_W_TABLE (VEX_W_0F99_P_0_LEN_0) },
9513 },
9514
9515 /* VEX_LEN_0F99_P_2 */
9516 {
9517 { VEX_W_TABLE (VEX_W_0F99_P_2_LEN_0) },
9518 },
9519
6c30d220 9520 /* VEX_LEN_0FAE_R_2_M_0 */
c0f3af97 9521 {
ec6f095a 9522 { "vldmxcsr", { Md }, 0 },
c0f3af97
L
9523 },
9524
6c30d220 9525 /* VEX_LEN_0FAE_R_3_M_0 */
c0f3af97 9526 {
ec6f095a 9527 { "vstmxcsr", { Md }, 0 },
c0f3af97
L
9528 },
9529
6c30d220 9530 /* VEX_LEN_0FC4_P_2 */
c0f3af97 9531 {
b50c9f31 9532 { "vpinsrw", { XM, Vex128, Edqw, Ib }, 0 },
c0f3af97
L
9533 },
9534
6c30d220 9535 /* VEX_LEN_0FC5_P_2 */
c0f3af97 9536 {
b50c9f31 9537 { "vpextrw", { Gdq, XS, Ib }, 0 },
c0f3af97
L
9538 },
9539
6c30d220 9540 /* VEX_LEN_0FD6_P_2 */
c0f3af97 9541 {
ec6f095a 9542 { "vmovq", { EXqScalarS, XMScalar }, 0 },
c0f3af97
L
9543 },
9544
6c30d220 9545 /* VEX_LEN_0FF7_P_2 */
c0f3af97 9546 {
ec6f095a 9547 { "vmaskmovdqu", { XM, XS }, 0 },
c0f3af97
L
9548 },
9549
6c30d220 9550 /* VEX_LEN_0F3816_P_2 */
c0f3af97 9551 {
6c30d220
L
9552 { Bad_Opcode },
9553 { VEX_W_TABLE (VEX_W_0F3816_P_2) },
c0f3af97
L
9554 },
9555
6c30d220 9556 /* VEX_LEN_0F3819_P_2 */
c0f3af97 9557 {
6c30d220
L
9558 { Bad_Opcode },
9559 { VEX_W_TABLE (VEX_W_0F3819_P_2) },
c0f3af97
L
9560 },
9561
6c30d220 9562 /* VEX_LEN_0F381A_P_2_M_0 */
c0f3af97 9563 {
6c30d220
L
9564 { Bad_Opcode },
9565 { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0) },
c0f3af97
L
9566 },
9567
6c30d220 9568 /* VEX_LEN_0F3836_P_2 */
c0f3af97 9569 {
6c30d220
L
9570 { Bad_Opcode },
9571 { VEX_W_TABLE (VEX_W_0F3836_P_2) },
c0f3af97
L
9572 },
9573
592a252b 9574 /* VEX_LEN_0F3841_P_2 */
c0f3af97 9575 {
ec6f095a 9576 { "vphminposuw", { XM, EXx }, 0 },
c0f3af97
L
9577 },
9578
6c30d220
L
9579 /* VEX_LEN_0F385A_P_2_M_0 */
9580 {
9581 { Bad_Opcode },
9582 { VEX_W_TABLE (VEX_W_0F385A_P_2_M_0) },
9583 },
9584
592a252b 9585 /* VEX_LEN_0F38DB_P_2 */
a5ff0eb2 9586 {
ec6f095a 9587 { "vaesimc", { XM, EXx }, 0 },
a5ff0eb2
L
9588 },
9589
f12dc422
L
9590 /* VEX_LEN_0F38F2_P_0 */
9591 {
bf890a93 9592 { "andnS", { Gdq, VexGdq, Edq }, 0 },
f12dc422
L
9593 },
9594
9595 /* VEX_LEN_0F38F3_R_1_P_0 */
9596 {
bf890a93 9597 { "blsrS", { VexGdq, Edq }, 0 },
f12dc422
L
9598 },
9599
9600 /* VEX_LEN_0F38F3_R_2_P_0 */
9601 {
bf890a93 9602 { "blsmskS", { VexGdq, Edq }, 0 },
f12dc422
L
9603 },
9604
9605 /* VEX_LEN_0F38F3_R_3_P_0 */
9606 {
bf890a93 9607 { "blsiS", { VexGdq, Edq }, 0 },
f12dc422
L
9608 },
9609
6c30d220
L
9610 /* VEX_LEN_0F38F5_P_0 */
9611 {
bf890a93 9612 { "bzhiS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9613 },
9614
9615 /* VEX_LEN_0F38F5_P_1 */
9616 {
bf890a93 9617 { "pextS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
9618 },
9619
9620 /* VEX_LEN_0F38F5_P_3 */
9621 {
bf890a93 9622 { "pdepS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
9623 },
9624
9625 /* VEX_LEN_0F38F6_P_3 */
9626 {
bf890a93 9627 { "mulxS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
9628 },
9629
f12dc422
L
9630 /* VEX_LEN_0F38F7_P_0 */
9631 {
bf890a93 9632 { "bextrS", { Gdq, Edq, VexGdq }, 0 },
f12dc422
L
9633 },
9634
6c30d220
L
9635 /* VEX_LEN_0F38F7_P_1 */
9636 {
bf890a93 9637 { "sarxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9638 },
9639
9640 /* VEX_LEN_0F38F7_P_2 */
9641 {
bf890a93 9642 { "shlxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9643 },
9644
9645 /* VEX_LEN_0F38F7_P_3 */
9646 {
bf890a93 9647 { "shrxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9648 },
9649
9650 /* VEX_LEN_0F3A00_P_2 */
9651 {
9652 { Bad_Opcode },
9653 { VEX_W_TABLE (VEX_W_0F3A00_P_2) },
9654 },
9655
9656 /* VEX_LEN_0F3A01_P_2 */
9657 {
9658 { Bad_Opcode },
9659 { VEX_W_TABLE (VEX_W_0F3A01_P_2) },
9660 },
9661
592a252b 9662 /* VEX_LEN_0F3A06_P_2 */
c0f3af97 9663 {
592d1631 9664 { Bad_Opcode },
592a252b 9665 { VEX_W_TABLE (VEX_W_0F3A06_P_2) },
c0f3af97
L
9666 },
9667
592a252b 9668 /* VEX_LEN_0F3A14_P_2 */
c0f3af97 9669 {
b50c9f31 9670 { "vpextrb", { Edqb, XM, Ib }, 0 },
c0f3af97
L
9671 },
9672
592a252b 9673 /* VEX_LEN_0F3A15_P_2 */
c0f3af97 9674 {
b50c9f31 9675 { "vpextrw", { Edqw, XM, Ib }, 0 },
c0f3af97
L
9676 },
9677
592a252b 9678 /* VEX_LEN_0F3A16_P_2 */
c0f3af97 9679 {
bf890a93 9680 { "vpextrK", { Edq, XM, Ib }, 0 },
c0f3af97
L
9681 },
9682
592a252b 9683 /* VEX_LEN_0F3A17_P_2 */
c0f3af97 9684 {
bf890a93 9685 { "vextractps", { Edqd, XM, Ib }, 0 },
c0f3af97
L
9686 },
9687
592a252b 9688 /* VEX_LEN_0F3A18_P_2 */
c0f3af97 9689 {
592d1631 9690 { Bad_Opcode },
592a252b 9691 { VEX_W_TABLE (VEX_W_0F3A18_P_2) },
c0f3af97
L
9692 },
9693
592a252b 9694 /* VEX_LEN_0F3A19_P_2 */
c0f3af97 9695 {
592d1631 9696 { Bad_Opcode },
592a252b 9697 { VEX_W_TABLE (VEX_W_0F3A19_P_2) },
c0f3af97
L
9698 },
9699
592a252b 9700 /* VEX_LEN_0F3A20_P_2 */
c0f3af97 9701 {
b50c9f31 9702 { "vpinsrb", { XM, Vex128, Edqb, Ib }, 0 },
c0f3af97
L
9703 },
9704
592a252b 9705 /* VEX_LEN_0F3A21_P_2 */
c0f3af97 9706 {
ec6f095a 9707 { "vinsertps", { XM, Vex128, EXd, Ib }, 0 },
c0f3af97
L
9708 },
9709
592a252b 9710 /* VEX_LEN_0F3A22_P_2 */
c0f3af97 9711 {
bf890a93 9712 { "vpinsrK", { XM, Vex128, Edq, Ib }, 0 },
c0f3af97
L
9713 },
9714
43234a1e
L
9715 /* VEX_LEN_0F3A30_P_2 */
9716 {
9717 { VEX_W_TABLE (VEX_W_0F3A30_P_2_LEN_0) },
9718 },
9719
1ba585e8
IT
9720 /* VEX_LEN_0F3A31_P_2 */
9721 {
9722 { VEX_W_TABLE (VEX_W_0F3A31_P_2_LEN_0) },
9723 },
9724
43234a1e
L
9725 /* VEX_LEN_0F3A32_P_2 */
9726 {
9727 { VEX_W_TABLE (VEX_W_0F3A32_P_2_LEN_0) },
9728 },
9729
1ba585e8
IT
9730 /* VEX_LEN_0F3A33_P_2 */
9731 {
9732 { VEX_W_TABLE (VEX_W_0F3A33_P_2_LEN_0) },
9733 },
9734
6c30d220 9735 /* VEX_LEN_0F3A38_P_2 */
c0f3af97 9736 {
6c30d220
L
9737 { Bad_Opcode },
9738 { VEX_W_TABLE (VEX_W_0F3A38_P_2) },
c0f3af97
L
9739 },
9740
6c30d220 9741 /* VEX_LEN_0F3A39_P_2 */
c0f3af97 9742 {
6c30d220
L
9743 { Bad_Opcode },
9744 { VEX_W_TABLE (VEX_W_0F3A39_P_2) },
9745 },
9746
9747 /* VEX_LEN_0F3A41_P_2 */
9748 {
ec6f095a 9749 { "vdppd", { XM, Vex128, EXx, Ib }, 0 },
c0f3af97
L
9750 },
9751
6c30d220 9752 /* VEX_LEN_0F3A46_P_2 */
c0f3af97 9753 {
6c30d220
L
9754 { Bad_Opcode },
9755 { VEX_W_TABLE (VEX_W_0F3A46_P_2) },
c0f3af97
L
9756 },
9757
592a252b 9758 /* VEX_LEN_0F3A60_P_2 */
c0f3af97 9759 {
15c7c1d8 9760 { "vpcmpestrm", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, 0 },
c0f3af97
L
9761 },
9762
592a252b 9763 /* VEX_LEN_0F3A61_P_2 */
c0f3af97 9764 {
15c7c1d8 9765 { "vpcmpestri", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, 0 },
c0f3af97
L
9766 },
9767
592a252b 9768 /* VEX_LEN_0F3A62_P_2 */
c0f3af97 9769 {
ec6f095a 9770 { "vpcmpistrm", { XM, EXx, Ib }, 0 },
c0f3af97
L
9771 },
9772
592a252b 9773 /* VEX_LEN_0F3A63_P_2 */
c0f3af97 9774 {
ec6f095a 9775 { "vpcmpistri", { XM, EXx, Ib }, 0 },
c0f3af97
L
9776 },
9777
592a252b 9778 /* VEX_LEN_0F3A6A_P_2 */
922d8de8 9779 {
3a2430e0 9780 { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
922d8de8
DR
9781 },
9782
592a252b 9783 /* VEX_LEN_0F3A6B_P_2 */
922d8de8 9784 {
3a2430e0 9785 { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
922d8de8
DR
9786 },
9787
592a252b 9788 /* VEX_LEN_0F3A6E_P_2 */
922d8de8 9789 {
3a2430e0 9790 { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
922d8de8
DR
9791 },
9792
592a252b 9793 /* VEX_LEN_0F3A6F_P_2 */
922d8de8 9794 {
3a2430e0 9795 { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
922d8de8
DR
9796 },
9797
592a252b 9798 /* VEX_LEN_0F3A7A_P_2 */
922d8de8 9799 {
3a2430e0 9800 { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
922d8de8
DR
9801 },
9802
592a252b 9803 /* VEX_LEN_0F3A7B_P_2 */
922d8de8 9804 {
3a2430e0 9805 { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
922d8de8
DR
9806 },
9807
592a252b 9808 /* VEX_LEN_0F3A7E_P_2 */
922d8de8 9809 {
3a2430e0 9810 { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
922d8de8
DR
9811 },
9812
592a252b 9813 /* VEX_LEN_0F3A7F_P_2 */
922d8de8 9814 {
3a2430e0 9815 { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
922d8de8
DR
9816 },
9817
592a252b 9818 /* VEX_LEN_0F3ADF_P_2 */
a5ff0eb2 9819 {
ec6f095a 9820 { "vaeskeygenassist", { XM, EXx, Ib }, 0 },
a5ff0eb2 9821 },
4c807e72 9822
6c30d220
L
9823 /* VEX_LEN_0F3AF0_P_3 */
9824 {
bf890a93 9825 { "rorxS", { Gdq, Edq, Ib }, 0 },
6c30d220
L
9826 },
9827
ff688e1f
L
9828 /* VEX_LEN_0FXOP_08_CC */
9829 {
be92cb14 9830 { "vpcomb", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9831 },
9832
9833 /* VEX_LEN_0FXOP_08_CD */
9834 {
be92cb14 9835 { "vpcomw", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9836 },
9837
9838 /* VEX_LEN_0FXOP_08_CE */
9839 {
be92cb14 9840 { "vpcomd", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9841 },
9842
9843 /* VEX_LEN_0FXOP_08_CF */
9844 {
be92cb14 9845 { "vpcomq", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9846 },
9847
9848 /* VEX_LEN_0FXOP_08_EC */
9849 {
be92cb14 9850 { "vpcomub", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9851 },
9852
9853 /* VEX_LEN_0FXOP_08_ED */
9854 {
be92cb14 9855 { "vpcomuw", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9856 },
9857
9858 /* VEX_LEN_0FXOP_08_EE */
9859 {
be92cb14 9860 { "vpcomud", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9861 },
9862
9863 /* VEX_LEN_0FXOP_08_EF */
9864 {
be92cb14 9865 { "vpcomuq", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9866 },
9867
592a252b 9868 /* VEX_LEN_0FXOP_09_80 */
5dd85c99 9869 {
bf890a93
IT
9870 { "vfrczps", { XM, EXxmm }, 0 },
9871 { "vfrczps", { XM, EXymmq }, 0 },
5dd85c99 9872 },
4c807e72 9873
592a252b 9874 /* VEX_LEN_0FXOP_09_81 */
5dd85c99 9875 {
bf890a93
IT
9876 { "vfrczpd", { XM, EXxmm }, 0 },
9877 { "vfrczpd", { XM, EXymmq }, 0 },
5dd85c99 9878 },
331d2d0d
L
9879};
9880
ad692897 9881#include "i386-dis-evex-len.h"
04e2a182 9882
9e30b8e0 9883static const struct dis386 vex_w_table[][2] = {
43234a1e
L
9884 {
9885 /* VEX_W_0F41_P_0_LEN_1 */
ab4e4ed5
AF
9886 { MOD_TABLE (MOD_VEX_W_0_0F41_P_0_LEN_1) },
9887 { MOD_TABLE (MOD_VEX_W_1_0F41_P_0_LEN_1) },
1ba585e8
IT
9888 },
9889 {
9890 /* VEX_W_0F41_P_2_LEN_1 */
ab4e4ed5
AF
9891 { MOD_TABLE (MOD_VEX_W_0_0F41_P_2_LEN_1) },
9892 { MOD_TABLE (MOD_VEX_W_1_0F41_P_2_LEN_1) }
43234a1e
L
9893 },
9894 {
9895 /* VEX_W_0F42_P_0_LEN_1 */
ab4e4ed5
AF
9896 { MOD_TABLE (MOD_VEX_W_0_0F42_P_0_LEN_1) },
9897 { MOD_TABLE (MOD_VEX_W_1_0F42_P_0_LEN_1) },
1ba585e8
IT
9898 },
9899 {
9900 /* VEX_W_0F42_P_2_LEN_1 */
ab4e4ed5
AF
9901 { MOD_TABLE (MOD_VEX_W_0_0F42_P_2_LEN_1) },
9902 { MOD_TABLE (MOD_VEX_W_1_0F42_P_2_LEN_1) },
43234a1e
L
9903 },
9904 {
9905 /* VEX_W_0F44_P_0_LEN_0 */
ab4e4ed5
AF
9906 { MOD_TABLE (MOD_VEX_W_0_0F44_P_0_LEN_1) },
9907 { MOD_TABLE (MOD_VEX_W_1_0F44_P_0_LEN_1) },
1ba585e8
IT
9908 },
9909 {
9910 /* VEX_W_0F44_P_2_LEN_0 */
ab4e4ed5
AF
9911 { MOD_TABLE (MOD_VEX_W_0_0F44_P_2_LEN_1) },
9912 { MOD_TABLE (MOD_VEX_W_1_0F44_P_2_LEN_1) },
43234a1e
L
9913 },
9914 {
ec6f095a
L
9915 /* VEX_W_0F45_P_0_LEN_1 */
9916 { MOD_TABLE (MOD_VEX_W_0_0F45_P_0_LEN_1) },
9917 { MOD_TABLE (MOD_VEX_W_1_0F45_P_0_LEN_1) },
9e30b8e0
L
9918 },
9919 {
ec6f095a
L
9920 /* VEX_W_0F45_P_2_LEN_1 */
9921 { MOD_TABLE (MOD_VEX_W_0_0F45_P_2_LEN_1) },
9922 { MOD_TABLE (MOD_VEX_W_1_0F45_P_2_LEN_1) },
9e30b8e0
L
9923 },
9924 {
ec6f095a
L
9925 /* VEX_W_0F46_P_0_LEN_1 */
9926 { MOD_TABLE (MOD_VEX_W_0_0F46_P_0_LEN_1) },
9927 { MOD_TABLE (MOD_VEX_W_1_0F46_P_0_LEN_1) },
9e30b8e0
L
9928 },
9929 {
ec6f095a
L
9930 /* VEX_W_0F46_P_2_LEN_1 */
9931 { MOD_TABLE (MOD_VEX_W_0_0F46_P_2_LEN_1) },
9932 { MOD_TABLE (MOD_VEX_W_1_0F46_P_2_LEN_1) },
9e30b8e0
L
9933 },
9934 {
ec6f095a
L
9935 /* VEX_W_0F47_P_0_LEN_1 */
9936 { MOD_TABLE (MOD_VEX_W_0_0F47_P_0_LEN_1) },
9937 { MOD_TABLE (MOD_VEX_W_1_0F47_P_0_LEN_1) },
9e30b8e0
L
9938 },
9939 {
ec6f095a
L
9940 /* VEX_W_0F47_P_2_LEN_1 */
9941 { MOD_TABLE (MOD_VEX_W_0_0F47_P_2_LEN_1) },
9942 { MOD_TABLE (MOD_VEX_W_1_0F47_P_2_LEN_1) },
9e30b8e0
L
9943 },
9944 {
ec6f095a
L
9945 /* VEX_W_0F4A_P_0_LEN_1 */
9946 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_0_LEN_1) },
9947 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_0_LEN_1) },
9e30b8e0
L
9948 },
9949 {
ec6f095a
L
9950 /* VEX_W_0F4A_P_2_LEN_1 */
9951 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_2_LEN_1) },
9952 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_2_LEN_1) },
9e30b8e0
L
9953 },
9954 {
ec6f095a
L
9955 /* VEX_W_0F4B_P_0_LEN_1 */
9956 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_0_LEN_1) },
9957 { MOD_TABLE (MOD_VEX_W_1_0F4B_P_0_LEN_1) },
9e30b8e0
L
9958 },
9959 {
ec6f095a
L
9960 /* VEX_W_0F4B_P_2_LEN_1 */
9961 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_2_LEN_1) },
9e30b8e0
L
9962 },
9963 {
ec6f095a
L
9964 /* VEX_W_0F90_P_0_LEN_0 */
9965 { "kmovw", { MaskG, MaskE }, 0 },
9966 { "kmovq", { MaskG, MaskE }, 0 },
9e30b8e0
L
9967 },
9968 {
ec6f095a
L
9969 /* VEX_W_0F90_P_2_LEN_0 */
9970 { "kmovb", { MaskG, MaskBDE }, 0 },
9971 { "kmovd", { MaskG, MaskBDE }, 0 },
9e30b8e0
L
9972 },
9973 {
ec6f095a
L
9974 /* VEX_W_0F91_P_0_LEN_0 */
9975 { MOD_TABLE (MOD_VEX_W_0_0F91_P_0_LEN_0) },
9976 { MOD_TABLE (MOD_VEX_W_1_0F91_P_0_LEN_0) },
9e30b8e0
L
9977 },
9978 {
ec6f095a
L
9979 /* VEX_W_0F91_P_2_LEN_0 */
9980 { MOD_TABLE (MOD_VEX_W_0_0F91_P_2_LEN_0) },
9981 { MOD_TABLE (MOD_VEX_W_1_0F91_P_2_LEN_0) },
9e30b8e0
L
9982 },
9983 {
ec6f095a
L
9984 /* VEX_W_0F92_P_0_LEN_0 */
9985 { MOD_TABLE (MOD_VEX_W_0_0F92_P_0_LEN_0) },
9e30b8e0
L
9986 },
9987 {
ec6f095a
L
9988 /* VEX_W_0F92_P_2_LEN_0 */
9989 { MOD_TABLE (MOD_VEX_W_0_0F92_P_2_LEN_0) },
9e30b8e0 9990 },
9e30b8e0 9991 {
ec6f095a
L
9992 /* VEX_W_0F93_P_0_LEN_0 */
9993 { MOD_TABLE (MOD_VEX_W_0_0F93_P_0_LEN_0) },
9e30b8e0
L
9994 },
9995 {
ec6f095a
L
9996 /* VEX_W_0F93_P_2_LEN_0 */
9997 { MOD_TABLE (MOD_VEX_W_0_0F93_P_2_LEN_0) },
9e30b8e0 9998 },
9e30b8e0 9999 {
ec6f095a
L
10000 /* VEX_W_0F98_P_0_LEN_0 */
10001 { MOD_TABLE (MOD_VEX_W_0_0F98_P_0_LEN_0) },
10002 { MOD_TABLE (MOD_VEX_W_1_0F98_P_0_LEN_0) },
9e30b8e0
L
10003 },
10004 {
ec6f095a
L
10005 /* VEX_W_0F98_P_2_LEN_0 */
10006 { MOD_TABLE (MOD_VEX_W_0_0F98_P_2_LEN_0) },
10007 { MOD_TABLE (MOD_VEX_W_1_0F98_P_2_LEN_0) },
9e30b8e0
L
10008 },
10009 {
ec6f095a
L
10010 /* VEX_W_0F99_P_0_LEN_0 */
10011 { MOD_TABLE (MOD_VEX_W_0_0F99_P_0_LEN_0) },
10012 { MOD_TABLE (MOD_VEX_W_1_0F99_P_0_LEN_0) },
9e30b8e0
L
10013 },
10014 {
ec6f095a
L
10015 /* VEX_W_0F99_P_2_LEN_0 */
10016 { MOD_TABLE (MOD_VEX_W_0_0F99_P_2_LEN_0) },
10017 { MOD_TABLE (MOD_VEX_W_1_0F99_P_2_LEN_0) },
9e30b8e0 10018 },
9e30b8e0 10019 {
592a252b 10020 /* VEX_W_0F380C_P_2 */
bf890a93 10021 { "vpermilps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10022 },
10023 {
592a252b 10024 /* VEX_W_0F380D_P_2 */
bf890a93 10025 { "vpermilpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10026 },
10027 {
592a252b 10028 /* VEX_W_0F380E_P_2 */
bf890a93 10029 { "vtestps", { XM, EXx }, 0 },
9e30b8e0
L
10030 },
10031 {
592a252b 10032 /* VEX_W_0F380F_P_2 */
bf890a93 10033 { "vtestpd", { XM, EXx }, 0 },
9e30b8e0 10034 },
6c30d220
L
10035 {
10036 /* VEX_W_0F3816_P_2 */
bf890a93 10037 { "vpermps", { XM, Vex, EXx }, 0 },
6c30d220 10038 },
bcf2684f 10039 {
6c30d220 10040 /* VEX_W_0F3818_P_2 */
bf890a93 10041 { "vbroadcastss", { XM, EXxmm_md }, 0 },
bcf2684f 10042 },
9e30b8e0 10043 {
6c30d220 10044 /* VEX_W_0F3819_P_2 */
bf890a93 10045 { "vbroadcastsd", { XM, EXxmm_mq }, 0 },
9e30b8e0
L
10046 },
10047 {
592a252b 10048 /* VEX_W_0F381A_P_2_M_0 */
bf890a93 10049 { "vbroadcastf128", { XM, Mxmm }, 0 },
9e30b8e0 10050 },
53aa04a0 10051 {
592a252b 10052 /* VEX_W_0F382C_P_2_M_0 */
bf890a93 10053 { "vmaskmovps", { XM, Vex, Mx }, 0 },
53aa04a0
L
10054 },
10055 {
592a252b 10056 /* VEX_W_0F382D_P_2_M_0 */
bf890a93 10057 { "vmaskmovpd", { XM, Vex, Mx }, 0 },
53aa04a0
L
10058 },
10059 {
592a252b 10060 /* VEX_W_0F382E_P_2_M_0 */
bf890a93 10061 { "vmaskmovps", { Mx, Vex, XM }, 0 },
53aa04a0
L
10062 },
10063 {
592a252b 10064 /* VEX_W_0F382F_P_2_M_0 */
bf890a93 10065 { "vmaskmovpd", { Mx, Vex, XM }, 0 },
53aa04a0 10066 },
6c30d220
L
10067 {
10068 /* VEX_W_0F3836_P_2 */
bf890a93 10069 { "vpermd", { XM, Vex, EXx }, 0 },
9e30b8e0 10070 },
6c30d220
L
10071 {
10072 /* VEX_W_0F3846_P_2 */
bf890a93 10073 { "vpsravd", { XM, Vex, EXx }, 0 },
6c30d220
L
10074 },
10075 {
10076 /* VEX_W_0F3858_P_2 */
bf890a93 10077 { "vpbroadcastd", { XM, EXxmm_md }, 0 },
6c30d220
L
10078 },
10079 {
10080 /* VEX_W_0F3859_P_2 */
bf890a93 10081 { "vpbroadcastq", { XM, EXxmm_mq }, 0 },
6c30d220
L
10082 },
10083 {
10084 /* VEX_W_0F385A_P_2_M_0 */
bf890a93 10085 { "vbroadcasti128", { XM, Mxmm }, 0 },
6c30d220
L
10086 },
10087 {
10088 /* VEX_W_0F3878_P_2 */
bf890a93 10089 { "vpbroadcastb", { XM, EXxmm_mb }, 0 },
6c30d220
L
10090 },
10091 {
10092 /* VEX_W_0F3879_P_2 */
bf890a93 10093 { "vpbroadcastw", { XM, EXxmm_mw }, 0 },
6c30d220 10094 },
48521003
IT
10095 {
10096 /* VEX_W_0F38CF_P_2 */
10097 { "vgf2p8mulb", { XM, Vex, EXx }, 0 },
10098 },
6c30d220
L
10099 {
10100 /* VEX_W_0F3A00_P_2 */
10101 { Bad_Opcode },
bf890a93 10102 { "vpermq", { XM, EXx, Ib }, 0 },
6c30d220
L
10103 },
10104 {
10105 /* VEX_W_0F3A01_P_2 */
10106 { Bad_Opcode },
bf890a93 10107 { "vpermpd", { XM, EXx, Ib }, 0 },
6c30d220
L
10108 },
10109 {
10110 /* VEX_W_0F3A02_P_2 */
bf890a93 10111 { "vpblendd", { XM, Vex, EXx, Ib }, 0 },
6c30d220 10112 },
9e30b8e0 10113 {
592a252b 10114 /* VEX_W_0F3A04_P_2 */
bf890a93 10115 { "vpermilps", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10116 },
10117 {
592a252b 10118 /* VEX_W_0F3A05_P_2 */
bf890a93 10119 { "vpermilpd", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10120 },
10121 {
592a252b 10122 /* VEX_W_0F3A06_P_2 */
bf890a93 10123 { "vperm2f128", { XM, Vex256, EXx, Ib }, 0 },
9e30b8e0 10124 },
9e30b8e0 10125 {
592a252b 10126 /* VEX_W_0F3A18_P_2 */
bf890a93 10127 { "vinsertf128", { XM, Vex256, EXxmm, Ib }, 0 },
9e30b8e0
L
10128 },
10129 {
592a252b 10130 /* VEX_W_0F3A19_P_2 */
bf890a93 10131 { "vextractf128", { EXxmm, XM, Ib }, 0 },
9e30b8e0 10132 },
43234a1e 10133 {
1ba585e8 10134 /* VEX_W_0F3A30_P_2_LEN_0 */
ab4e4ed5
AF
10135 { MOD_TABLE (MOD_VEX_W_0_0F3A30_P_2_LEN_0) },
10136 { MOD_TABLE (MOD_VEX_W_1_0F3A30_P_2_LEN_0) },
43234a1e
L
10137 },
10138 {
1ba585e8 10139 /* VEX_W_0F3A31_P_2_LEN_0 */
ab4e4ed5
AF
10140 { MOD_TABLE (MOD_VEX_W_0_0F3A31_P_2_LEN_0) },
10141 { MOD_TABLE (MOD_VEX_W_1_0F3A31_P_2_LEN_0) },
1ba585e8
IT
10142 },
10143 {
10144 /* VEX_W_0F3A32_P_2_LEN_0 */
ab4e4ed5
AF
10145 { MOD_TABLE (MOD_VEX_W_0_0F3A32_P_2_LEN_0) },
10146 { MOD_TABLE (MOD_VEX_W_1_0F3A32_P_2_LEN_0) },
43234a1e 10147 },
1ba585e8
IT
10148 {
10149 /* VEX_W_0F3A33_P_2_LEN_0 */
ab4e4ed5
AF
10150 { MOD_TABLE (MOD_VEX_W_0_0F3A33_P_2_LEN_0) },
10151 { MOD_TABLE (MOD_VEX_W_1_0F3A33_P_2_LEN_0) },
1ba585e8 10152 },
6c30d220
L
10153 {
10154 /* VEX_W_0F3A38_P_2 */
bf890a93 10155 { "vinserti128", { XM, Vex256, EXxmm, Ib }, 0 },
6c30d220
L
10156 },
10157 {
10158 /* VEX_W_0F3A39_P_2 */
bf890a93 10159 { "vextracti128", { EXxmm, XM, Ib }, 0 },
6c30d220 10160 },
6c30d220
L
10161 {
10162 /* VEX_W_0F3A46_P_2 */
bf890a93 10163 { "vperm2i128", { XM, Vex256, EXx, Ib }, 0 },
6c30d220 10164 },
a683cc34 10165 {
592a252b 10166 /* VEX_W_0F3A48_P_2 */
bf890a93
IT
10167 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
10168 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
a683cc34
SP
10169 },
10170 {
592a252b 10171 /* VEX_W_0F3A49_P_2 */
bf890a93
IT
10172 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
10173 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
a683cc34 10174 },
9e30b8e0 10175 {
592a252b 10176 /* VEX_W_0F3A4A_P_2 */
bf890a93 10177 { "vblendvps", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0
L
10178 },
10179 {
592a252b 10180 /* VEX_W_0F3A4B_P_2 */
bf890a93 10181 { "vblendvpd", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0
L
10182 },
10183 {
592a252b 10184 /* VEX_W_0F3A4C_P_2 */
bf890a93 10185 { "vpblendvb", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0 10186 },
48521003
IT
10187 {
10188 /* VEX_W_0F3ACE_P_2 */
10189 { Bad_Opcode },
10190 { "vgf2p8affineqb", { XM, Vex, EXx, Ib }, 0 },
10191 },
10192 {
10193 /* VEX_W_0F3ACF_P_2 */
10194 { Bad_Opcode },
10195 { "vgf2p8affineinvqb", { XM, Vex, EXx, Ib }, 0 },
10196 },
ad692897
L
10197
10198#include "i386-dis-evex-w.h"
9e30b8e0
L
10199};
10200
10201static const struct dis386 mod_table[][2] = {
10202 {
10203 /* MOD_8D */
bf890a93 10204 { "leaS", { Gv, M }, 0 },
9e30b8e0 10205 },
42164a71
L
10206 {
10207 /* MOD_C6_REG_7 */
10208 { Bad_Opcode },
10209 { RM_TABLE (RM_C6_REG_7) },
10210 },
10211 {
10212 /* MOD_C7_REG_7 */
10213 { Bad_Opcode },
10214 { RM_TABLE (RM_C7_REG_7) },
10215 },
4a357820
MZ
10216 {
10217 /* MOD_FF_REG_3 */
a72d2af2 10218 { "Jcall^", { indirEp }, 0 },
4a357820
MZ
10219 },
10220 {
10221 /* MOD_FF_REG_5 */
a72d2af2 10222 { "Jjmp^", { indirEp }, 0 },
4a357820 10223 },
9e30b8e0
L
10224 {
10225 /* MOD_0F01_REG_0 */
10226 { X86_64_TABLE (X86_64_0F01_REG_0) },
10227 { RM_TABLE (RM_0F01_REG_0) },
10228 },
10229 {
10230 /* MOD_0F01_REG_1 */
10231 { X86_64_TABLE (X86_64_0F01_REG_1) },
10232 { RM_TABLE (RM_0F01_REG_1) },
10233 },
10234 {
10235 /* MOD_0F01_REG_2 */
10236 { X86_64_TABLE (X86_64_0F01_REG_2) },
10237 { RM_TABLE (RM_0F01_REG_2) },
10238 },
10239 {
10240 /* MOD_0F01_REG_3 */
10241 { X86_64_TABLE (X86_64_0F01_REG_3) },
10242 { RM_TABLE (RM_0F01_REG_3) },
10243 },
8eab4136
L
10244 {
10245 /* MOD_0F01_REG_5 */
f8687e93
JB
10246 { PREFIX_TABLE (PREFIX_0F01_REG_5_MOD_0) },
10247 { RM_TABLE (RM_0F01_REG_5_MOD_3) },
8eab4136 10248 },
9e30b8e0
L
10249 {
10250 /* MOD_0F01_REG_7 */
bf890a93 10251 { "invlpg", { Mb }, 0 },
f8687e93 10252 { RM_TABLE (RM_0F01_REG_7_MOD_3) },
9e30b8e0
L
10253 },
10254 {
10255 /* MOD_0F12_PREFIX_0 */
507bd325
L
10256 { "movlps", { XM, EXq }, PREFIX_OPCODE },
10257 { "movhlps", { XM, EXq }, PREFIX_OPCODE },
9e30b8e0
L
10258 },
10259 {
10260 /* MOD_0F13 */
507bd325 10261 { "movlpX", { EXq, XM }, PREFIX_OPCODE },
9e30b8e0
L
10262 },
10263 {
10264 /* MOD_0F16_PREFIX_0 */
bf890a93
IT
10265 { "movhps", { XM, EXq }, 0 },
10266 { "movlhps", { XM, EXq }, 0 },
9e30b8e0
L
10267 },
10268 {
10269 /* MOD_0F17 */
507bd325 10270 { "movhpX", { EXq, XM }, PREFIX_OPCODE },
9e30b8e0
L
10271 },
10272 {
10273 /* MOD_0F18_REG_0 */
bf890a93 10274 { "prefetchnta", { Mb }, 0 },
9e30b8e0
L
10275 },
10276 {
10277 /* MOD_0F18_REG_1 */
bf890a93 10278 { "prefetcht0", { Mb }, 0 },
9e30b8e0
L
10279 },
10280 {
10281 /* MOD_0F18_REG_2 */
bf890a93 10282 { "prefetcht1", { Mb }, 0 },
9e30b8e0
L
10283 },
10284 {
10285 /* MOD_0F18_REG_3 */
bf890a93 10286 { "prefetcht2", { Mb }, 0 },
9e30b8e0 10287 },
d7189fa5
RM
10288 {
10289 /* MOD_0F18_REG_4 */
bf890a93 10290 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
10291 },
10292 {
10293 /* MOD_0F18_REG_5 */
bf890a93 10294 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
10295 },
10296 {
10297 /* MOD_0F18_REG_6 */
bf890a93 10298 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
10299 },
10300 {
10301 /* MOD_0F18_REG_7 */
bf890a93 10302 { "nop/reserved", { Mb }, 0 },
d7189fa5 10303 },
7e8b059b
L
10304 {
10305 /* MOD_0F1A_PREFIX_0 */
d276ec69 10306 { "bndldx", { Gbnd, Mv_bnd }, 0 },
bf890a93 10307 { "nopQ", { Ev }, 0 },
7e8b059b
L
10308 },
10309 {
10310 /* MOD_0F1B_PREFIX_0 */
d276ec69 10311 { "bndstx", { Mv_bnd, Gbnd }, 0 },
bf890a93 10312 { "nopQ", { Ev }, 0 },
7e8b059b
L
10313 },
10314 {
10315 /* MOD_0F1B_PREFIX_1 */
d276ec69 10316 { "bndmk", { Gbnd, Mv_bnd }, 0 },
bf890a93 10317 { "nopQ", { Ev }, 0 },
7e8b059b 10318 },
c48935d7
IT
10319 {
10320 /* MOD_0F1C_PREFIX_0 */
f8687e93 10321 { REG_TABLE (REG_0F1C_P_0_MOD_0) },
c48935d7
IT
10322 { "nopQ", { Ev }, 0 },
10323 },
603555e5
L
10324 {
10325 /* MOD_0F1E_PREFIX_1 */
10326 { "nopQ", { Ev }, 0 },
f8687e93 10327 { REG_TABLE (REG_0F1E_P_1_MOD_3) },
603555e5 10328 },
b844680a 10329 {
92fddf8e 10330 /* MOD_0F24 */
7bb15c6f 10331 { Bad_Opcode },
bf890a93 10332 { "movL", { Rd, Td }, 0 },
b844680a
L
10333 },
10334 {
92fddf8e 10335 /* MOD_0F26 */
592d1631 10336 { Bad_Opcode },
bf890a93 10337 { "movL", { Td, Rd }, 0 },
b844680a 10338 },
75c135a8
L
10339 {
10340 /* MOD_0F2B_PREFIX_0 */
507bd325 10341 {"movntps", { Mx, XM }, PREFIX_OPCODE },
75c135a8
L
10342 },
10343 {
10344 /* MOD_0F2B_PREFIX_1 */
507bd325 10345 {"movntss", { Md, XM }, PREFIX_OPCODE },
75c135a8
L
10346 },
10347 {
10348 /* MOD_0F2B_PREFIX_2 */
507bd325 10349 {"movntpd", { Mx, XM }, PREFIX_OPCODE },
75c135a8
L
10350 },
10351 {
10352 /* MOD_0F2B_PREFIX_3 */
507bd325 10353 {"movntsd", { Mq, XM }, PREFIX_OPCODE },
75c135a8
L
10354 },
10355 {
10356 /* MOD_0F51 */
592d1631 10357 { Bad_Opcode },
507bd325 10358 { "movmskpX", { Gdq, XS }, PREFIX_OPCODE },
75c135a8 10359 },
b844680a 10360 {
1ceb70f8 10361 /* MOD_0F71_REG_2 */
592d1631 10362 { Bad_Opcode },
bf890a93 10363 { "psrlw", { MS, Ib }, 0 },
b844680a
L
10364 },
10365 {
1ceb70f8 10366 /* MOD_0F71_REG_4 */
592d1631 10367 { Bad_Opcode },
bf890a93 10368 { "psraw", { MS, Ib }, 0 },
b844680a
L
10369 },
10370 {
1ceb70f8 10371 /* MOD_0F71_REG_6 */
592d1631 10372 { Bad_Opcode },
bf890a93 10373 { "psllw", { MS, Ib }, 0 },
b844680a
L
10374 },
10375 {
1ceb70f8 10376 /* MOD_0F72_REG_2 */
592d1631 10377 { Bad_Opcode },
bf890a93 10378 { "psrld", { MS, Ib }, 0 },
b844680a
L
10379 },
10380 {
1ceb70f8 10381 /* MOD_0F72_REG_4 */
592d1631 10382 { Bad_Opcode },
bf890a93 10383 { "psrad", { MS, Ib }, 0 },
b844680a
L
10384 },
10385 {
1ceb70f8 10386 /* MOD_0F72_REG_6 */
592d1631 10387 { Bad_Opcode },
bf890a93 10388 { "pslld", { MS, Ib }, 0 },
b844680a
L
10389 },
10390 {
1ceb70f8 10391 /* MOD_0F73_REG_2 */
592d1631 10392 { Bad_Opcode },
bf890a93 10393 { "psrlq", { MS, Ib }, 0 },
b844680a
L
10394 },
10395 {
1ceb70f8 10396 /* MOD_0F73_REG_3 */
592d1631 10397 { Bad_Opcode },
c0f3af97
L
10398 { PREFIX_TABLE (PREFIX_0F73_REG_3) },
10399 },
10400 {
10401 /* MOD_0F73_REG_6 */
592d1631 10402 { Bad_Opcode },
bf890a93 10403 { "psllq", { MS, Ib }, 0 },
c0f3af97
L
10404 },
10405 {
10406 /* MOD_0F73_REG_7 */
592d1631 10407 { Bad_Opcode },
c0f3af97
L
10408 { PREFIX_TABLE (PREFIX_0F73_REG_7) },
10409 },
10410 {
10411 /* MOD_0FAE_REG_0 */
bf890a93 10412 { "fxsave", { FXSAVE }, 0 },
f8687e93 10413 { PREFIX_TABLE (PREFIX_0FAE_REG_0_MOD_3) },
c0f3af97
L
10414 },
10415 {
10416 /* MOD_0FAE_REG_1 */
bf890a93 10417 { "fxrstor", { FXSAVE }, 0 },
f8687e93 10418 { PREFIX_TABLE (PREFIX_0FAE_REG_1_MOD_3) },
c0f3af97
L
10419 },
10420 {
10421 /* MOD_0FAE_REG_2 */
bf890a93 10422 { "ldmxcsr", { Md }, 0 },
f8687e93 10423 { PREFIX_TABLE (PREFIX_0FAE_REG_2_MOD_3) },
c0f3af97
L
10424 },
10425 {
10426 /* MOD_0FAE_REG_3 */
bf890a93 10427 { "stmxcsr", { Md }, 0 },
f8687e93 10428 { PREFIX_TABLE (PREFIX_0FAE_REG_3_MOD_3) },
c0f3af97
L
10429 },
10430 {
10431 /* MOD_0FAE_REG_4 */
f8687e93
JB
10432 { PREFIX_TABLE (PREFIX_0FAE_REG_4_MOD_0) },
10433 { PREFIX_TABLE (PREFIX_0FAE_REG_4_MOD_3) },
c0f3af97
L
10434 },
10435 {
10436 /* MOD_0FAE_REG_5 */
f8687e93
JB
10437 { PREFIX_TABLE (PREFIX_0FAE_REG_5_MOD_0) },
10438 { PREFIX_TABLE (PREFIX_0FAE_REG_5_MOD_3) },
c0f3af97
L
10439 },
10440 {
10441 /* MOD_0FAE_REG_6 */
f8687e93
JB
10442 { PREFIX_TABLE (PREFIX_0FAE_REG_6_MOD_0) },
10443 { PREFIX_TABLE (PREFIX_0FAE_REG_6_MOD_3) },
c0f3af97
L
10444 },
10445 {
10446 /* MOD_0FAE_REG_7 */
f8687e93
JB
10447 { PREFIX_TABLE (PREFIX_0FAE_REG_7_MOD_0) },
10448 { RM_TABLE (RM_0FAE_REG_7_MOD_3) },
c0f3af97
L
10449 },
10450 {
10451 /* MOD_0FB2 */
bf890a93 10452 { "lssS", { Gv, Mp }, 0 },
c0f3af97
L
10453 },
10454 {
10455 /* MOD_0FB4 */
bf890a93 10456 { "lfsS", { Gv, Mp }, 0 },
c0f3af97
L
10457 },
10458 {
10459 /* MOD_0FB5 */
bf890a93 10460 { "lgsS", { Gv, Mp }, 0 },
c0f3af97 10461 },
a8484f96
L
10462 {
10463 /* MOD_0FC3 */
f8687e93 10464 { PREFIX_TABLE (PREFIX_0FC3_MOD_0) },
a8484f96 10465 },
963f3586
IT
10466 {
10467 /* MOD_0FC7_REG_3 */
a8484f96 10468 { "xrstors", { FXSAVE }, 0 },
963f3586
IT
10469 },
10470 {
10471 /* MOD_0FC7_REG_4 */
bf890a93 10472 { "xsavec", { FXSAVE }, 0 },
963f3586
IT
10473 },
10474 {
10475 /* MOD_0FC7_REG_5 */
bf890a93 10476 { "xsaves", { FXSAVE }, 0 },
963f3586 10477 },
c0f3af97
L
10478 {
10479 /* MOD_0FC7_REG_6 */
f8687e93
JB
10480 { PREFIX_TABLE (PREFIX_0FC7_REG_6_MOD_0) },
10481 { PREFIX_TABLE (PREFIX_0FC7_REG_6_MOD_3) }
c0f3af97
L
10482 },
10483 {
10484 /* MOD_0FC7_REG_7 */
bf890a93 10485 { "vmptrst", { Mq }, 0 },
f8687e93 10486 { PREFIX_TABLE (PREFIX_0FC7_REG_7_MOD_3) }
c0f3af97
L
10487 },
10488 {
10489 /* MOD_0FD7 */
592d1631 10490 { Bad_Opcode },
bf890a93 10491 { "pmovmskb", { Gdq, MS }, 0 },
c0f3af97
L
10492 },
10493 {
10494 /* MOD_0FE7_PREFIX_2 */
bf890a93 10495 { "movntdq", { Mx, XM }, 0 },
c0f3af97
L
10496 },
10497 {
10498 /* MOD_0FF0_PREFIX_3 */
bf890a93 10499 { "lddqu", { XM, M }, 0 },
c0f3af97
L
10500 },
10501 {
10502 /* MOD_0F382A_PREFIX_2 */
bf890a93 10503 { "movntdqa", { XM, Mx }, 0 },
c0f3af97 10504 },
603555e5
L
10505 {
10506 /* MOD_0F38F5_PREFIX_2 */
10507 { "wrussK", { M, Gdq }, PREFIX_OPCODE },
10508 },
10509 {
10510 /* MOD_0F38F6_PREFIX_0 */
10511 { "wrssK", { M, Gdq }, PREFIX_OPCODE },
10512 },
5d79adc4
L
10513 {
10514 /* MOD_0F38F8_PREFIX_1 */
10515 { "enqcmds", { Gva, M }, PREFIX_OPCODE },
10516 },
c0a30a9f
L
10517 {
10518 /* MOD_0F38F8_PREFIX_2 */
10519 { "movdir64b", { Gva, M }, PREFIX_OPCODE },
10520 },
5d79adc4
L
10521 {
10522 /* MOD_0F38F8_PREFIX_3 */
10523 { "enqcmd", { Gva, M }, PREFIX_OPCODE },
10524 },
c0a30a9f
L
10525 {
10526 /* MOD_0F38F9_PREFIX_0 */
77ad8092 10527 { "movdiri", { Ev, Gv }, PREFIX_OPCODE },
c0a30a9f 10528 },
c0f3af97
L
10529 {
10530 /* MOD_62_32BIT */
bf890a93 10531 { "bound{S|}", { Gv, Ma }, 0 },
43234a1e 10532 { EVEX_TABLE (EVEX_0F) },
c0f3af97
L
10533 },
10534 {
10535 /* MOD_C4_32BIT */
bf890a93 10536 { "lesS", { Gv, Mp }, 0 },
c0f3af97
L
10537 { VEX_C4_TABLE (VEX_0F) },
10538 },
10539 {
10540 /* MOD_C5_32BIT */
bf890a93 10541 { "ldsS", { Gv, Mp }, 0 },
c0f3af97
L
10542 { VEX_C5_TABLE (VEX_0F) },
10543 },
10544 {
592a252b
L
10545 /* MOD_VEX_0F12_PREFIX_0 */
10546 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0) },
10547 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1) },
c0f3af97
L
10548 },
10549 {
592a252b
L
10550 /* MOD_VEX_0F13 */
10551 { VEX_LEN_TABLE (VEX_LEN_0F13_M_0) },
c0f3af97
L
10552 },
10553 {
592a252b
L
10554 /* MOD_VEX_0F16_PREFIX_0 */
10555 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0) },
10556 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1) },
c0f3af97
L
10557 },
10558 {
592a252b
L
10559 /* MOD_VEX_0F17 */
10560 { VEX_LEN_TABLE (VEX_LEN_0F17_M_0) },
c0f3af97
L
10561 },
10562 {
592a252b 10563 /* MOD_VEX_0F2B */
ec6f095a 10564 { "vmovntpX", { Mx, XM }, 0 },
c0f3af97 10565 },
ab4e4ed5
AF
10566 {
10567 /* MOD_VEX_W_0_0F41_P_0_LEN_1 */
10568 { Bad_Opcode },
10569 { "kandw", { MaskG, MaskVex, MaskR }, 0 },
10570 },
10571 {
10572 /* MOD_VEX_W_1_0F41_P_0_LEN_1 */
10573 { Bad_Opcode },
10574 { "kandq", { MaskG, MaskVex, MaskR }, 0 },
10575 },
10576 {
10577 /* MOD_VEX_W_0_0F41_P_2_LEN_1 */
10578 { Bad_Opcode },
10579 { "kandb", { MaskG, MaskVex, MaskR }, 0 },
10580 },
10581 {
10582 /* MOD_VEX_W_1_0F41_P_2_LEN_1 */
10583 { Bad_Opcode },
10584 { "kandd", { MaskG, MaskVex, MaskR }, 0 },
10585 },
10586 {
10587 /* MOD_VEX_W_0_0F42_P_0_LEN_1 */
10588 { Bad_Opcode },
10589 { "kandnw", { MaskG, MaskVex, MaskR }, 0 },
10590 },
10591 {
10592 /* MOD_VEX_W_1_0F42_P_0_LEN_1 */
10593 { Bad_Opcode },
10594 { "kandnq", { MaskG, MaskVex, MaskR }, 0 },
10595 },
10596 {
10597 /* MOD_VEX_W_0_0F42_P_2_LEN_1 */
10598 { Bad_Opcode },
10599 { "kandnb", { MaskG, MaskVex, MaskR }, 0 },
10600 },
10601 {
10602 /* MOD_VEX_W_1_0F42_P_2_LEN_1 */
10603 { Bad_Opcode },
10604 { "kandnd", { MaskG, MaskVex, MaskR }, 0 },
10605 },
10606 {
10607 /* MOD_VEX_W_0_0F44_P_0_LEN_0 */
10608 { Bad_Opcode },
10609 { "knotw", { MaskG, MaskR }, 0 },
10610 },
10611 {
10612 /* MOD_VEX_W_1_0F44_P_0_LEN_0 */
10613 { Bad_Opcode },
10614 { "knotq", { MaskG, MaskR }, 0 },
10615 },
10616 {
10617 /* MOD_VEX_W_0_0F44_P_2_LEN_0 */
10618 { Bad_Opcode },
10619 { "knotb", { MaskG, MaskR }, 0 },
10620 },
10621 {
10622 /* MOD_VEX_W_1_0F44_P_2_LEN_0 */
10623 { Bad_Opcode },
10624 { "knotd", { MaskG, MaskR }, 0 },
10625 },
10626 {
10627 /* MOD_VEX_W_0_0F45_P_0_LEN_1 */
10628 { Bad_Opcode },
10629 { "korw", { MaskG, MaskVex, MaskR }, 0 },
10630 },
10631 {
10632 /* MOD_VEX_W_1_0F45_P_0_LEN_1 */
10633 { Bad_Opcode },
10634 { "korq", { MaskG, MaskVex, MaskR }, 0 },
10635 },
10636 {
10637 /* MOD_VEX_W_0_0F45_P_2_LEN_1 */
10638 { Bad_Opcode },
10639 { "korb", { MaskG, MaskVex, MaskR }, 0 },
10640 },
10641 {
10642 /* MOD_VEX_W_1_0F45_P_2_LEN_1 */
10643 { Bad_Opcode },
10644 { "kord", { MaskG, MaskVex, MaskR }, 0 },
10645 },
10646 {
10647 /* MOD_VEX_W_0_0F46_P_0_LEN_1 */
10648 { Bad_Opcode },
10649 { "kxnorw", { MaskG, MaskVex, MaskR }, 0 },
10650 },
10651 {
10652 /* MOD_VEX_W_1_0F46_P_0_LEN_1 */
10653 { Bad_Opcode },
10654 { "kxnorq", { MaskG, MaskVex, MaskR }, 0 },
10655 },
10656 {
10657 /* MOD_VEX_W_0_0F46_P_2_LEN_1 */
10658 { Bad_Opcode },
10659 { "kxnorb", { MaskG, MaskVex, MaskR }, 0 },
10660 },
10661 {
10662 /* MOD_VEX_W_1_0F46_P_2_LEN_1 */
10663 { Bad_Opcode },
10664 { "kxnord", { MaskG, MaskVex, MaskR }, 0 },
10665 },
10666 {
10667 /* MOD_VEX_W_0_0F47_P_0_LEN_1 */
10668 { Bad_Opcode },
10669 { "kxorw", { MaskG, MaskVex, MaskR }, 0 },
10670 },
10671 {
10672 /* MOD_VEX_W_1_0F47_P_0_LEN_1 */
10673 { Bad_Opcode },
10674 { "kxorq", { MaskG, MaskVex, MaskR }, 0 },
10675 },
10676 {
10677 /* MOD_VEX_W_0_0F47_P_2_LEN_1 */
10678 { Bad_Opcode },
10679 { "kxorb", { MaskG, MaskVex, MaskR }, 0 },
10680 },
10681 {
10682 /* MOD_VEX_W_1_0F47_P_2_LEN_1 */
10683 { Bad_Opcode },
10684 { "kxord", { MaskG, MaskVex, MaskR }, 0 },
10685 },
10686 {
10687 /* MOD_VEX_W_0_0F4A_P_0_LEN_1 */
10688 { Bad_Opcode },
10689 { "kaddw", { MaskG, MaskVex, MaskR }, 0 },
10690 },
10691 {
10692 /* MOD_VEX_W_1_0F4A_P_0_LEN_1 */
10693 { Bad_Opcode },
10694 { "kaddq", { MaskG, MaskVex, MaskR }, 0 },
10695 },
10696 {
10697 /* MOD_VEX_W_0_0F4A_P_2_LEN_1 */
10698 { Bad_Opcode },
10699 { "kaddb", { MaskG, MaskVex, MaskR }, 0 },
10700 },
10701 {
10702 /* MOD_VEX_W_1_0F4A_P_2_LEN_1 */
10703 { Bad_Opcode },
10704 { "kaddd", { MaskG, MaskVex, MaskR }, 0 },
10705 },
10706 {
10707 /* MOD_VEX_W_0_0F4B_P_0_LEN_1 */
10708 { Bad_Opcode },
10709 { "kunpckwd", { MaskG, MaskVex, MaskR }, 0 },
10710 },
10711 {
10712 /* MOD_VEX_W_1_0F4B_P_0_LEN_1 */
10713 { Bad_Opcode },
10714 { "kunpckdq", { MaskG, MaskVex, MaskR }, 0 },
10715 },
10716 {
10717 /* MOD_VEX_W_0_0F4B_P_2_LEN_1 */
10718 { Bad_Opcode },
10719 { "kunpckbw", { MaskG, MaskVex, MaskR }, 0 },
10720 },
c0f3af97 10721 {
592a252b 10722 /* MOD_VEX_0F50 */
592d1631 10723 { Bad_Opcode },
ec6f095a 10724 { "vmovmskpX", { Gdq, XS }, 0 },
c0f3af97
L
10725 },
10726 {
592a252b 10727 /* MOD_VEX_0F71_REG_2 */
592d1631 10728 { Bad_Opcode },
592a252b 10729 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2) },
b844680a
L
10730 },
10731 {
592a252b 10732 /* MOD_VEX_0F71_REG_4 */
592d1631 10733 { Bad_Opcode },
592a252b 10734 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4) },
b844680a
L
10735 },
10736 {
592a252b 10737 /* MOD_VEX_0F71_REG_6 */
592d1631 10738 { Bad_Opcode },
592a252b 10739 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6) },
b844680a
L
10740 },
10741 {
592a252b 10742 /* MOD_VEX_0F72_REG_2 */
592d1631 10743 { Bad_Opcode },
592a252b 10744 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2) },
b844680a 10745 },
d8faab4e 10746 {
592a252b 10747 /* MOD_VEX_0F72_REG_4 */
592d1631 10748 { Bad_Opcode },
592a252b 10749 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4) },
d8faab4e
L
10750 },
10751 {
592a252b 10752 /* MOD_VEX_0F72_REG_6 */
592d1631 10753 { Bad_Opcode },
592a252b 10754 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6) },
d8faab4e 10755 },
876d4bfa 10756 {
592a252b 10757 /* MOD_VEX_0F73_REG_2 */
592d1631 10758 { Bad_Opcode },
592a252b 10759 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2) },
876d4bfa
L
10760 },
10761 {
592a252b 10762 /* MOD_VEX_0F73_REG_3 */
592d1631 10763 { Bad_Opcode },
592a252b 10764 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3) },
475a2301
L
10765 },
10766 {
592a252b 10767 /* MOD_VEX_0F73_REG_6 */
592d1631 10768 { Bad_Opcode },
592a252b 10769 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6) },
876d4bfa
L
10770 },
10771 {
592a252b 10772 /* MOD_VEX_0F73_REG_7 */
592d1631 10773 { Bad_Opcode },
592a252b 10774 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7) },
876d4bfa 10775 },
ab4e4ed5
AF
10776 {
10777 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
10778 { "kmovw", { Ew, MaskG }, 0 },
10779 { Bad_Opcode },
10780 },
10781 {
10782 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
10783 { "kmovq", { Eq, MaskG }, 0 },
10784 { Bad_Opcode },
10785 },
10786 {
10787 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
10788 { "kmovb", { Eb, MaskG }, 0 },
10789 { Bad_Opcode },
10790 },
10791 {
10792 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
10793 { "kmovd", { Ed, MaskG }, 0 },
10794 { Bad_Opcode },
10795 },
10796 {
10797 /* MOD_VEX_W_0_0F92_P_0_LEN_0 */
10798 { Bad_Opcode },
10799 { "kmovw", { MaskG, Rdq }, 0 },
10800 },
10801 {
10802 /* MOD_VEX_W_0_0F92_P_2_LEN_0 */
10803 { Bad_Opcode },
10804 { "kmovb", { MaskG, Rdq }, 0 },
10805 },
10806 {
58a211d2 10807 /* MOD_VEX_0F92_P_3_LEN_0 */
ab4e4ed5 10808 { Bad_Opcode },
58a211d2 10809 { "kmovK", { MaskG, Rdq }, 0 },
ab4e4ed5
AF
10810 },
10811 {
10812 /* MOD_VEX_W_0_0F93_P_0_LEN_0 */
10813 { Bad_Opcode },
10814 { "kmovw", { Gdq, MaskR }, 0 },
10815 },
10816 {
10817 /* MOD_VEX_W_0_0F93_P_2_LEN_0 */
10818 { Bad_Opcode },
10819 { "kmovb", { Gdq, MaskR }, 0 },
10820 },
10821 {
58a211d2 10822 /* MOD_VEX_0F93_P_3_LEN_0 */
ab4e4ed5 10823 { Bad_Opcode },
58a211d2 10824 { "kmovK", { Gdq, MaskR }, 0 },
ab4e4ed5
AF
10825 },
10826 {
10827 /* MOD_VEX_W_0_0F98_P_0_LEN_0 */
10828 { Bad_Opcode },
10829 { "kortestw", { MaskG, MaskR }, 0 },
10830 },
10831 {
10832 /* MOD_VEX_W_1_0F98_P_0_LEN_0 */
10833 { Bad_Opcode },
10834 { "kortestq", { MaskG, MaskR }, 0 },
10835 },
10836 {
10837 /* MOD_VEX_W_0_0F98_P_2_LEN_0 */
10838 { Bad_Opcode },
10839 { "kortestb", { MaskG, MaskR }, 0 },
10840 },
10841 {
10842 /* MOD_VEX_W_1_0F98_P_2_LEN_0 */
10843 { Bad_Opcode },
10844 { "kortestd", { MaskG, MaskR }, 0 },
10845 },
10846 {
10847 /* MOD_VEX_W_0_0F99_P_0_LEN_0 */
10848 { Bad_Opcode },
10849 { "ktestw", { MaskG, MaskR }, 0 },
10850 },
10851 {
10852 /* MOD_VEX_W_1_0F99_P_0_LEN_0 */
10853 { Bad_Opcode },
10854 { "ktestq", { MaskG, MaskR }, 0 },
10855 },
10856 {
10857 /* MOD_VEX_W_0_0F99_P_2_LEN_0 */
10858 { Bad_Opcode },
10859 { "ktestb", { MaskG, MaskR }, 0 },
10860 },
10861 {
10862 /* MOD_VEX_W_1_0F99_P_2_LEN_0 */
10863 { Bad_Opcode },
10864 { "ktestd", { MaskG, MaskR }, 0 },
10865 },
876d4bfa 10866 {
592a252b
L
10867 /* MOD_VEX_0FAE_REG_2 */
10868 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0) },
876d4bfa 10869 },
bbedc832 10870 {
592a252b
L
10871 /* MOD_VEX_0FAE_REG_3 */
10872 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0) },
bbedc832 10873 },
144c41d9 10874 {
592a252b 10875 /* MOD_VEX_0FD7_PREFIX_2 */
592d1631 10876 { Bad_Opcode },
ec6f095a 10877 { "vpmovmskb", { Gdq, XS }, 0 },
144c41d9 10878 },
1afd85e3 10879 {
592a252b 10880 /* MOD_VEX_0FE7_PREFIX_2 */
ec6f095a 10881 { "vmovntdq", { Mx, XM }, 0 },
1afd85e3
L
10882 },
10883 {
592a252b 10884 /* MOD_VEX_0FF0_PREFIX_3 */
ec6f095a 10885 { "vlddqu", { XM, M }, 0 },
92fddf8e 10886 },
75c135a8 10887 {
592a252b
L
10888 /* MOD_VEX_0F381A_PREFIX_2 */
10889 { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0) },
75c135a8 10890 },
1afd85e3 10891 {
592a252b 10892 /* MOD_VEX_0F382A_PREFIX_2 */
ec6f095a 10893 { "vmovntdqa", { XM, Mx }, 0 },
1afd85e3 10894 },
75c135a8 10895 {
592a252b
L
10896 /* MOD_VEX_0F382C_PREFIX_2 */
10897 { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0) },
75c135a8 10898 },
1afd85e3 10899 {
592a252b
L
10900 /* MOD_VEX_0F382D_PREFIX_2 */
10901 { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0) },
1afd85e3
L
10902 },
10903 {
592a252b
L
10904 /* MOD_VEX_0F382E_PREFIX_2 */
10905 { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0) },
1afd85e3
L
10906 },
10907 {
592a252b
L
10908 /* MOD_VEX_0F382F_PREFIX_2 */
10909 { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0) },
1afd85e3 10910 },
6c30d220
L
10911 {
10912 /* MOD_VEX_0F385A_PREFIX_2 */
10913 { VEX_LEN_TABLE (VEX_LEN_0F385A_P_2_M_0) },
10914 },
10915 {
10916 /* MOD_VEX_0F388C_PREFIX_2 */
bf890a93 10917 { "vpmaskmov%LW", { XM, Vex, Mx }, 0 },
6c30d220
L
10918 },
10919 {
10920 /* MOD_VEX_0F388E_PREFIX_2 */
bf890a93 10921 { "vpmaskmov%LW", { Mx, Vex, XM }, 0 },
6c30d220 10922 },
ab4e4ed5
AF
10923 {
10924 /* MOD_VEX_W_0_0F3A30_P_2_LEN_0 */
10925 { Bad_Opcode },
10926 { "kshiftrb", { MaskG, MaskR, Ib }, 0 },
10927 },
10928 {
10929 /* MOD_VEX_W_1_0F3A30_P_2_LEN_0 */
10930 { Bad_Opcode },
10931 { "kshiftrw", { MaskG, MaskR, Ib }, 0 },
10932 },
10933 {
10934 /* MOD_VEX_W_0_0F3A31_P_2_LEN_0 */
10935 { Bad_Opcode },
10936 { "kshiftrd", { MaskG, MaskR, Ib }, 0 },
10937 },
10938 {
10939 /* MOD_VEX_W_1_0F3A31_P_2_LEN_0 */
10940 { Bad_Opcode },
10941 { "kshiftrq", { MaskG, MaskR, Ib }, 0 },
10942 },
10943 {
10944 /* MOD_VEX_W_0_0F3A32_P_2_LEN_0 */
10945 { Bad_Opcode },
10946 { "kshiftlb", { MaskG, MaskR, Ib }, 0 },
10947 },
10948 {
10949 /* MOD_VEX_W_1_0F3A32_P_2_LEN_0 */
10950 { Bad_Opcode },
10951 { "kshiftlw", { MaskG, MaskR, Ib }, 0 },
10952 },
10953 {
10954 /* MOD_VEX_W_0_0F3A33_P_2_LEN_0 */
10955 { Bad_Opcode },
10956 { "kshiftld", { MaskG, MaskR, Ib }, 0 },
10957 },
10958 {
10959 /* MOD_VEX_W_1_0F3A33_P_2_LEN_0 */
10960 { Bad_Opcode },
10961 { "kshiftlq", { MaskG, MaskR, Ib }, 0 },
10962 },
ad692897
L
10963
10964#include "i386-dis-evex-mod.h"
b844680a
L
10965};
10966
1ceb70f8 10967static const struct dis386 rm_table[][8] = {
42164a71
L
10968 {
10969 /* RM_C6_REG_7 */
bf890a93 10970 { "xabort", { Skip_MODRM, Ib }, 0 },
42164a71
L
10971 },
10972 {
10973 /* RM_C7_REG_7 */
376cd056 10974 { "xbeginT", { Skip_MODRM, Jdqw }, 0 },
42164a71 10975 },
b844680a 10976 {
1ceb70f8 10977 /* RM_0F01_REG_0 */
a4e78aa5 10978 { "enclv", { Skip_MODRM }, 0 },
bf890a93
IT
10979 { "vmcall", { Skip_MODRM }, 0 },
10980 { "vmlaunch", { Skip_MODRM }, 0 },
10981 { "vmresume", { Skip_MODRM }, 0 },
10982 { "vmxoff", { Skip_MODRM }, 0 },
be3a8dca 10983 { "pconfig", { Skip_MODRM }, 0 },
b844680a
L
10984 },
10985 {
1ceb70f8 10986 /* RM_0F01_REG_1 */
bf890a93
IT
10987 { "monitor", { { OP_Monitor, 0 } }, 0 },
10988 { "mwait", { { OP_Mwait, 0 } }, 0 },
10989 { "clac", { Skip_MODRM }, 0 },
10990 { "stac", { Skip_MODRM }, 0 },
2cf200a4
IT
10991 { Bad_Opcode },
10992 { Bad_Opcode },
10993 { Bad_Opcode },
bf890a93 10994 { "encls", { Skip_MODRM }, 0 },
b844680a 10995 },
475a2301
L
10996 {
10997 /* RM_0F01_REG_2 */
bf890a93
IT
10998 { "xgetbv", { Skip_MODRM }, 0 },
10999 { "xsetbv", { Skip_MODRM }, 0 },
8729a6f6
L
11000 { Bad_Opcode },
11001 { Bad_Opcode },
bf890a93
IT
11002 { "vmfunc", { Skip_MODRM }, 0 },
11003 { "xend", { Skip_MODRM }, 0 },
11004 { "xtest", { Skip_MODRM }, 0 },
11005 { "enclu", { Skip_MODRM }, 0 },
475a2301 11006 },
b844680a 11007 {
1ceb70f8 11008 /* RM_0F01_REG_3 */
bf890a93
IT
11009 { "vmrun", { Skip_MODRM }, 0 },
11010 { "vmmcall", { Skip_MODRM }, 0 },
11011 { "vmload", { Skip_MODRM }, 0 },
11012 { "vmsave", { Skip_MODRM }, 0 },
11013 { "stgi", { Skip_MODRM }, 0 },
11014 { "clgi", { Skip_MODRM }, 0 },
11015 { "skinit", { Skip_MODRM }, 0 },
11016 { "invlpga", { Skip_MODRM }, 0 },
4e7d34a6 11017 },
8eab4136 11018 {
f8687e93
JB
11019 /* RM_0F01_REG_5_MOD_3 */
11020 { PREFIX_TABLE (PREFIX_0F01_REG_5_MOD_3_RM_0) },
8eab4136 11021 { Bad_Opcode },
f8687e93 11022 { PREFIX_TABLE (PREFIX_0F01_REG_5_MOD_3_RM_2) },
8eab4136
L
11023 { Bad_Opcode },
11024 { Bad_Opcode },
11025 { Bad_Opcode },
11026 { "rdpkru", { Skip_MODRM }, 0 },
11027 { "wrpkru", { Skip_MODRM }, 0 },
11028 },
4e7d34a6 11029 {
f8687e93 11030 /* RM_0F01_REG_7_MOD_3 */
bf890a93
IT
11031 { "swapgs", { Skip_MODRM }, 0 },
11032 { "rdtscp", { Skip_MODRM }, 0 },
267b8516
JB
11033 { PREFIX_TABLE (PREFIX_0F01_REG_7_MOD_3_RM_2) },
11034 { PREFIX_TABLE (PREFIX_0F01_REG_7_MOD_3_RM_3) },
bf890a93 11035 { "clzero", { Skip_MODRM }, 0 },
142861df 11036 { "rdpru", { Skip_MODRM }, 0 },
b844680a 11037 },
603555e5 11038 {
f8687e93 11039 /* RM_0F1E_P_1_MOD_3_REG_7 */
603555e5
L
11040 { "nopQ", { Ev }, 0 },
11041 { "nopQ", { Ev }, 0 },
11042 { "endbr64", { Skip_MODRM }, PREFIX_OPCODE },
11043 { "endbr32", { Skip_MODRM }, PREFIX_OPCODE },
11044 { "nopQ", { Ev }, 0 },
11045 { "nopQ", { Ev }, 0 },
11046 { "nopQ", { Ev }, 0 },
11047 { "nopQ", { Ev }, 0 },
11048 },
b844680a 11049 {
f8687e93 11050 /* RM_0FAE_REG_6_MOD_3 */
bf890a93 11051 { "mfence", { Skip_MODRM }, 0 },
b844680a 11052 },
bbedc832 11053 {
f8687e93 11054 /* RM_0FAE_REG_7_MOD_3 */
b5cefcca
L
11055 { "sfence", { Skip_MODRM }, 0 },
11056
144c41d9 11057 },
b844680a
L
11058};
11059
c608c12e
AM
11060#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
11061
f16cd0d5
L
11062/* We use the high bit to indicate different name for the same
11063 prefix. */
f16cd0d5 11064#define REP_PREFIX (0xf3 | 0x100)
42164a71
L
11065#define XACQUIRE_PREFIX (0xf2 | 0x200)
11066#define XRELEASE_PREFIX (0xf3 | 0x400)
7e8b059b 11067#define BND_PREFIX (0xf2 | 0x400)
04ef582a 11068#define NOTRACK_PREFIX (0x3e | 0x100)
f16cd0d5
L
11069
11070static int
26ca5450 11071ckprefix (void)
252b5132 11072{
f16cd0d5 11073 int newrex, i, length;
52b15da3 11074 rex = 0;
c0f3af97 11075 rex_ignored = 0;
252b5132 11076 prefixes = 0;
7d421014 11077 used_prefixes = 0;
52b15da3 11078 rex_used = 0;
f16cd0d5
L
11079 last_lock_prefix = -1;
11080 last_repz_prefix = -1;
11081 last_repnz_prefix = -1;
11082 last_data_prefix = -1;
11083 last_addr_prefix = -1;
11084 last_rex_prefix = -1;
11085 last_seg_prefix = -1;
d9949a36 11086 fwait_prefix = -1;
285ca992 11087 active_seg_prefix = 0;
f310f33d
L
11088 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
11089 all_prefixes[i] = 0;
11090 i = 0;
f16cd0d5
L
11091 length = 0;
11092 /* The maximum instruction length is 15bytes. */
11093 while (length < MAX_CODE_LENGTH - 1)
252b5132
RH
11094 {
11095 FETCH_DATA (the_info, codep + 1);
52b15da3 11096 newrex = 0;
252b5132
RH
11097 switch (*codep)
11098 {
52b15da3
JH
11099 /* REX prefixes family. */
11100 case 0x40:
11101 case 0x41:
11102 case 0x42:
11103 case 0x43:
11104 case 0x44:
11105 case 0x45:
11106 case 0x46:
11107 case 0x47:
11108 case 0x48:
11109 case 0x49:
11110 case 0x4a:
11111 case 0x4b:
11112 case 0x4c:
11113 case 0x4d:
11114 case 0x4e:
11115 case 0x4f:
f16cd0d5
L
11116 if (address_mode == mode_64bit)
11117 newrex = *codep;
11118 else
11119 return 1;
11120 last_rex_prefix = i;
52b15da3 11121 break;
252b5132
RH
11122 case 0xf3:
11123 prefixes |= PREFIX_REPZ;
f16cd0d5 11124 last_repz_prefix = i;
252b5132
RH
11125 break;
11126 case 0xf2:
11127 prefixes |= PREFIX_REPNZ;
f16cd0d5 11128 last_repnz_prefix = i;
252b5132
RH
11129 break;
11130 case 0xf0:
11131 prefixes |= PREFIX_LOCK;
f16cd0d5 11132 last_lock_prefix = i;
252b5132
RH
11133 break;
11134 case 0x2e:
11135 prefixes |= PREFIX_CS;
f16cd0d5 11136 last_seg_prefix = i;
285ca992 11137 active_seg_prefix = PREFIX_CS;
252b5132
RH
11138 break;
11139 case 0x36:
11140 prefixes |= PREFIX_SS;
f16cd0d5 11141 last_seg_prefix = i;
285ca992 11142 active_seg_prefix = PREFIX_SS;
252b5132
RH
11143 break;
11144 case 0x3e:
11145 prefixes |= PREFIX_DS;
f16cd0d5 11146 last_seg_prefix = i;
285ca992 11147 active_seg_prefix = PREFIX_DS;
252b5132
RH
11148 break;
11149 case 0x26:
11150 prefixes |= PREFIX_ES;
f16cd0d5 11151 last_seg_prefix = i;
285ca992 11152 active_seg_prefix = PREFIX_ES;
252b5132
RH
11153 break;
11154 case 0x64:
11155 prefixes |= PREFIX_FS;
f16cd0d5 11156 last_seg_prefix = i;
285ca992 11157 active_seg_prefix = PREFIX_FS;
252b5132
RH
11158 break;
11159 case 0x65:
11160 prefixes |= PREFIX_GS;
f16cd0d5 11161 last_seg_prefix = i;
285ca992 11162 active_seg_prefix = PREFIX_GS;
252b5132
RH
11163 break;
11164 case 0x66:
11165 prefixes |= PREFIX_DATA;
f16cd0d5 11166 last_data_prefix = i;
252b5132
RH
11167 break;
11168 case 0x67:
11169 prefixes |= PREFIX_ADDR;
f16cd0d5 11170 last_addr_prefix = i;
252b5132 11171 break;
5076851f 11172 case FWAIT_OPCODE:
252b5132
RH
11173 /* fwait is really an instruction. If there are prefixes
11174 before the fwait, they belong to the fwait, *not* to the
11175 following instruction. */
d9949a36 11176 fwait_prefix = i;
3e7d61b2 11177 if (prefixes || rex)
252b5132
RH
11178 {
11179 prefixes |= PREFIX_FWAIT;
11180 codep++;
6c067bbb
RM
11181 /* This ensures that the previous REX prefixes are noticed
11182 as unused prefixes, as in the return case below. */
11183 rex_used = rex;
f16cd0d5 11184 return 1;
252b5132
RH
11185 }
11186 prefixes = PREFIX_FWAIT;
11187 break;
11188 default:
f16cd0d5 11189 return 1;
252b5132 11190 }
52b15da3
JH
11191 /* Rex is ignored when followed by another prefix. */
11192 if (rex)
11193 {
3e7d61b2 11194 rex_used = rex;
f16cd0d5 11195 return 1;
52b15da3 11196 }
f16cd0d5 11197 if (*codep != FWAIT_OPCODE)
4e9ac44a 11198 all_prefixes[i++] = *codep;
52b15da3 11199 rex = newrex;
252b5132 11200 codep++;
f16cd0d5
L
11201 length++;
11202 }
11203 return 0;
11204}
11205
7d421014
ILT
11206/* Return the name of the prefix byte PREF, or NULL if PREF is not a
11207 prefix byte. */
11208
11209static const char *
26ca5450 11210prefix_name (int pref, int sizeflag)
7d421014 11211{
0003779b
L
11212 static const char *rexes [16] =
11213 {
11214 "rex", /* 0x40 */
11215 "rex.B", /* 0x41 */
11216 "rex.X", /* 0x42 */
11217 "rex.XB", /* 0x43 */
11218 "rex.R", /* 0x44 */
11219 "rex.RB", /* 0x45 */
11220 "rex.RX", /* 0x46 */
11221 "rex.RXB", /* 0x47 */
11222 "rex.W", /* 0x48 */
11223 "rex.WB", /* 0x49 */
11224 "rex.WX", /* 0x4a */
11225 "rex.WXB", /* 0x4b */
11226 "rex.WR", /* 0x4c */
11227 "rex.WRB", /* 0x4d */
11228 "rex.WRX", /* 0x4e */
11229 "rex.WRXB", /* 0x4f */
11230 };
11231
7d421014
ILT
11232 switch (pref)
11233 {
52b15da3
JH
11234 /* REX prefixes family. */
11235 case 0x40:
52b15da3 11236 case 0x41:
52b15da3 11237 case 0x42:
52b15da3 11238 case 0x43:
52b15da3 11239 case 0x44:
52b15da3 11240 case 0x45:
52b15da3 11241 case 0x46:
52b15da3 11242 case 0x47:
52b15da3 11243 case 0x48:
52b15da3 11244 case 0x49:
52b15da3 11245 case 0x4a:
52b15da3 11246 case 0x4b:
52b15da3 11247 case 0x4c:
52b15da3 11248 case 0x4d:
52b15da3 11249 case 0x4e:
52b15da3 11250 case 0x4f:
0003779b 11251 return rexes [pref - 0x40];
7d421014
ILT
11252 case 0xf3:
11253 return "repz";
11254 case 0xf2:
11255 return "repnz";
11256 case 0xf0:
11257 return "lock";
11258 case 0x2e:
11259 return "cs";
11260 case 0x36:
11261 return "ss";
11262 case 0x3e:
11263 return "ds";
11264 case 0x26:
11265 return "es";
11266 case 0x64:
11267 return "fs";
11268 case 0x65:
11269 return "gs";
11270 case 0x66:
11271 return (sizeflag & DFLAG) ? "data16" : "data32";
11272 case 0x67:
cb712a9e 11273 if (address_mode == mode_64bit)
db6eb5be 11274 return (sizeflag & AFLAG) ? "addr32" : "addr64";
c1a64871 11275 else
2888cb7a 11276 return (sizeflag & AFLAG) ? "addr16" : "addr32";
7d421014
ILT
11277 case FWAIT_OPCODE:
11278 return "fwait";
f16cd0d5
L
11279 case REP_PREFIX:
11280 return "rep";
42164a71
L
11281 case XACQUIRE_PREFIX:
11282 return "xacquire";
11283 case XRELEASE_PREFIX:
11284 return "xrelease";
7e8b059b
L
11285 case BND_PREFIX:
11286 return "bnd";
04ef582a
L
11287 case NOTRACK_PREFIX:
11288 return "notrack";
7d421014
ILT
11289 default:
11290 return NULL;
11291 }
11292}
11293
ce518a5f
L
11294static char op_out[MAX_OPERANDS][100];
11295static int op_ad, op_index[MAX_OPERANDS];
1d9f512f 11296static int two_source_ops;
ce518a5f
L
11297static bfd_vma op_address[MAX_OPERANDS];
11298static bfd_vma op_riprel[MAX_OPERANDS];
52b15da3 11299static bfd_vma start_pc;
ce518a5f 11300
252b5132
RH
11301/*
11302 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
11303 * (see topic "Redundant prefixes" in the "Differences from 8086"
11304 * section of the "Virtual 8086 Mode" chapter.)
11305 * 'pc' should be the address of this instruction, it will
11306 * be used to print the target address if this is a relative jump or call
11307 * The function returns the length of this instruction in bytes.
11308 */
11309
252b5132 11310static char intel_syntax;
9d141669 11311static char intel_mnemonic = !SYSV386_COMPAT;
252b5132
RH
11312static char open_char;
11313static char close_char;
11314static char separator_char;
11315static char scale_char;
11316
5db04b09
L
11317enum x86_64_isa
11318{
11319 amd64 = 0,
11320 intel64
11321};
11322
11323static enum x86_64_isa isa64;
11324
e396998b
AM
11325/* Here for backwards compatibility. When gdb stops using
11326 print_insn_i386_att and print_insn_i386_intel these functions can
11327 disappear, and print_insn_i386 be merged into print_insn. */
252b5132 11328int
26ca5450 11329print_insn_i386_att (bfd_vma pc, disassemble_info *info)
252b5132
RH
11330{
11331 intel_syntax = 0;
e396998b
AM
11332
11333 return print_insn (pc, info);
252b5132
RH
11334}
11335
11336int
26ca5450 11337print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
252b5132
RH
11338{
11339 intel_syntax = 1;
e396998b
AM
11340
11341 return print_insn (pc, info);
252b5132
RH
11342}
11343
e396998b 11344int
26ca5450 11345print_insn_i386 (bfd_vma pc, disassemble_info *info)
e396998b
AM
11346{
11347 intel_syntax = -1;
11348
11349 return print_insn (pc, info);
11350}
11351
f59a29b9
L
11352void
11353print_i386_disassembler_options (FILE *stream)
11354{
11355 fprintf (stream, _("\n\
11356The following i386/x86-64 specific disassembler options are supported for use\n\
11357with the -M switch (multiple options should be separated by commas):\n"));
11358
11359 fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
11360 fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
11361 fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
11362 fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
11363 fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
9d141669
L
11364 fprintf (stream, _(" att-mnemonic\n"
11365 " Display instruction in AT&T mnemonic\n"));
11366 fprintf (stream, _(" intel-mnemonic\n"
11367 " Display instruction in Intel mnemonic\n"));
f59a29b9
L
11368 fprintf (stream, _(" addr64 Assume 64bit address size\n"));
11369 fprintf (stream, _(" addr32 Assume 32bit address size\n"));
11370 fprintf (stream, _(" addr16 Assume 16bit address size\n"));
11371 fprintf (stream, _(" data32 Assume 32bit data size\n"));
11372 fprintf (stream, _(" data16 Assume 16bit data size\n"));
11373 fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
5db04b09
L
11374 fprintf (stream, _(" amd64 Display instruction in AMD64 ISA\n"));
11375 fprintf (stream, _(" intel64 Display instruction in Intel64 ISA\n"));
f59a29b9
L
11376}
11377
592d1631 11378/* Bad opcode. */
bf890a93 11379static const struct dis386 bad_opcode = { "(bad)", { XX }, 0 };
592d1631 11380
b844680a
L
11381/* Get a pointer to struct dis386 with a valid name. */
11382
11383static const struct dis386 *
8bb15339 11384get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
b844680a 11385{
91d6fa6a 11386 int vindex, vex_table_index;
b844680a
L
11387
11388 if (dp->name != NULL)
11389 return dp;
11390
11391 switch (dp->op[0].bytemode)
11392 {
1ceb70f8
L
11393 case USE_REG_TABLE:
11394 dp = &reg_table[dp->op[1].bytemode][modrm.reg];
11395 break;
11396
11397 case USE_MOD_TABLE:
91d6fa6a
NC
11398 vindex = modrm.mod == 0x3 ? 1 : 0;
11399 dp = &mod_table[dp->op[1].bytemode][vindex];
1ceb70f8
L
11400 break;
11401
11402 case USE_RM_TABLE:
11403 dp = &rm_table[dp->op[1].bytemode][modrm.rm];
b844680a
L
11404 break;
11405
4e7d34a6 11406 case USE_PREFIX_TABLE:
c0f3af97 11407 if (need_vex)
b844680a 11408 {
c0f3af97
L
11409 /* The prefix in VEX is implicit. */
11410 switch (vex.prefix)
11411 {
11412 case 0:
91d6fa6a 11413 vindex = 0;
c0f3af97
L
11414 break;
11415 case REPE_PREFIX_OPCODE:
91d6fa6a 11416 vindex = 1;
c0f3af97
L
11417 break;
11418 case DATA_PREFIX_OPCODE:
91d6fa6a 11419 vindex = 2;
c0f3af97
L
11420 break;
11421 case REPNE_PREFIX_OPCODE:
91d6fa6a 11422 vindex = 3;
c0f3af97
L
11423 break;
11424 default:
11425 abort ();
11426 break;
11427 }
b844680a 11428 }
7bb15c6f 11429 else
b844680a 11430 {
285ca992
L
11431 int last_prefix = -1;
11432 int prefix = 0;
91d6fa6a 11433 vindex = 0;
285ca992
L
11434 /* We check PREFIX_REPNZ and PREFIX_REPZ before PREFIX_DATA.
11435 When there are multiple PREFIX_REPNZ and PREFIX_REPZ, the
11436 last one wins. */
11437 if ((prefixes & (PREFIX_REPZ | PREFIX_REPNZ)) != 0)
b844680a 11438 {
285ca992 11439 if (last_repz_prefix > last_repnz_prefix)
c0f3af97 11440 {
285ca992
L
11441 vindex = 1;
11442 prefix = PREFIX_REPZ;
11443 last_prefix = last_repz_prefix;
c0f3af97
L
11444 }
11445 else
b844680a 11446 {
285ca992
L
11447 vindex = 3;
11448 prefix = PREFIX_REPNZ;
11449 last_prefix = last_repnz_prefix;
b844680a 11450 }
285ca992 11451
507bd325
L
11452 /* Check if prefix should be ignored. */
11453 if ((((prefix_table[dp->op[1].bytemode][vindex].prefix_requirement
11454 & PREFIX_IGNORED) >> PREFIX_IGNORED_SHIFT)
11455 & prefix) != 0)
285ca992
L
11456 vindex = 0;
11457 }
11458
11459 if (vindex == 0 && (prefixes & PREFIX_DATA) != 0)
11460 {
11461 vindex = 2;
11462 prefix = PREFIX_DATA;
11463 last_prefix = last_data_prefix;
11464 }
11465
11466 if (vindex != 0)
11467 {
11468 used_prefixes |= prefix;
11469 all_prefixes[last_prefix] = 0;
b844680a
L
11470 }
11471 }
91d6fa6a 11472 dp = &prefix_table[dp->op[1].bytemode][vindex];
b844680a
L
11473 break;
11474
4e7d34a6 11475 case USE_X86_64_TABLE:
91d6fa6a
NC
11476 vindex = address_mode == mode_64bit ? 1 : 0;
11477 dp = &x86_64_table[dp->op[1].bytemode][vindex];
b844680a
L
11478 break;
11479
4e7d34a6 11480 case USE_3BYTE_TABLE:
8bb15339 11481 FETCH_DATA (info, codep + 2);
91d6fa6a
NC
11482 vindex = *codep++;
11483 dp = &three_byte_table[dp->op[1].bytemode][vindex];
285ca992 11484 end_codep = codep;
8bb15339
L
11485 modrm.mod = (*codep >> 6) & 3;
11486 modrm.reg = (*codep >> 3) & 7;
11487 modrm.rm = *codep & 7;
11488 break;
11489
c0f3af97
L
11490 case USE_VEX_LEN_TABLE:
11491 if (!need_vex)
11492 abort ();
11493
11494 switch (vex.length)
11495 {
11496 case 128:
91d6fa6a 11497 vindex = 0;
c0f3af97
L
11498 break;
11499 case 256:
91d6fa6a 11500 vindex = 1;
c0f3af97
L
11501 break;
11502 default:
11503 abort ();
11504 break;
11505 }
11506
91d6fa6a 11507 dp = &vex_len_table[dp->op[1].bytemode][vindex];
c0f3af97
L
11508 break;
11509
04e2a182
L
11510 case USE_EVEX_LEN_TABLE:
11511 if (!vex.evex)
11512 abort ();
11513
11514 switch (vex.length)
11515 {
11516 case 128:
11517 vindex = 0;
11518 break;
11519 case 256:
11520 vindex = 1;
11521 break;
11522 case 512:
11523 vindex = 2;
11524 break;
11525 default:
11526 abort ();
11527 break;
11528 }
11529
11530 dp = &evex_len_table[dp->op[1].bytemode][vindex];
11531 break;
11532
f88c9eb0
SP
11533 case USE_XOP_8F_TABLE:
11534 FETCH_DATA (info, codep + 3);
11535 /* All bits in the REX prefix are ignored. */
11536 rex_ignored = rex;
11537 rex = ~(*codep >> 5) & 0x7;
11538
11539 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
11540 switch ((*codep & 0x1f))
11541 {
11542 default:
f07af43e
L
11543 dp = &bad_opcode;
11544 return dp;
5dd85c99
SP
11545 case 0x8:
11546 vex_table_index = XOP_08;
11547 break;
f88c9eb0
SP
11548 case 0x9:
11549 vex_table_index = XOP_09;
11550 break;
11551 case 0xa:
11552 vex_table_index = XOP_0A;
11553 break;
11554 }
11555 codep++;
11556 vex.w = *codep & 0x80;
11557 if (vex.w && address_mode == mode_64bit)
11558 rex |= REX_W;
11559
11560 vex.register_specifier = (~(*codep >> 3)) & 0xf;
abfcb414 11561 if (address_mode != mode_64bit)
f07af43e 11562 {
abfcb414
AP
11563 /* In 16/32-bit mode REX_B is silently ignored. */
11564 rex &= ~REX_B;
f07af43e 11565 }
f88c9eb0
SP
11566
11567 vex.length = (*codep & 0x4) ? 256 : 128;
11568 switch ((*codep & 0x3))
11569 {
11570 case 0:
f88c9eb0
SP
11571 break;
11572 case 1:
11573 vex.prefix = DATA_PREFIX_OPCODE;
11574 break;
11575 case 2:
11576 vex.prefix = REPE_PREFIX_OPCODE;
11577 break;
11578 case 3:
11579 vex.prefix = REPNE_PREFIX_OPCODE;
11580 break;
11581 }
11582 need_vex = 1;
11583 need_vex_reg = 1;
11584 codep++;
91d6fa6a
NC
11585 vindex = *codep++;
11586 dp = &xop_table[vex_table_index][vindex];
c48244a5 11587
285ca992 11588 end_codep = codep;
c48244a5
SP
11589 FETCH_DATA (info, codep + 1);
11590 modrm.mod = (*codep >> 6) & 3;
11591 modrm.reg = (*codep >> 3) & 7;
11592 modrm.rm = *codep & 7;
f88c9eb0
SP
11593 break;
11594
c0f3af97 11595 case USE_VEX_C4_TABLE:
43234a1e 11596 /* VEX prefix. */
c0f3af97
L
11597 FETCH_DATA (info, codep + 3);
11598 /* All bits in the REX prefix are ignored. */
11599 rex_ignored = rex;
11600 rex = ~(*codep >> 5) & 0x7;
11601 switch ((*codep & 0x1f))
11602 {
11603 default:
f07af43e
L
11604 dp = &bad_opcode;
11605 return dp;
c0f3af97 11606 case 0x1:
f88c9eb0 11607 vex_table_index = VEX_0F;
c0f3af97
L
11608 break;
11609 case 0x2:
f88c9eb0 11610 vex_table_index = VEX_0F38;
c0f3af97
L
11611 break;
11612 case 0x3:
f88c9eb0 11613 vex_table_index = VEX_0F3A;
c0f3af97
L
11614 break;
11615 }
11616 codep++;
11617 vex.w = *codep & 0x80;
9889cbb1 11618 if (address_mode == mode_64bit)
f07af43e 11619 {
9889cbb1
L
11620 if (vex.w)
11621 rex |= REX_W;
9889cbb1
L
11622 }
11623 else
11624 {
11625 /* For the 3-byte VEX prefix in 32-bit mode, the REX_B bit
11626 is ignored, other REX bits are 0 and the highest bit in
5f847646 11627 VEX.vvvv is also ignored (but we mustn't clear it here). */
9889cbb1 11628 rex = 0;
f07af43e 11629 }
5f847646 11630 vex.register_specifier = (~(*codep >> 3)) & 0xf;
c0f3af97
L
11631 vex.length = (*codep & 0x4) ? 256 : 128;
11632 switch ((*codep & 0x3))
11633 {
11634 case 0:
c0f3af97
L
11635 break;
11636 case 1:
11637 vex.prefix = DATA_PREFIX_OPCODE;
11638 break;
11639 case 2:
11640 vex.prefix = REPE_PREFIX_OPCODE;
11641 break;
11642 case 3:
11643 vex.prefix = REPNE_PREFIX_OPCODE;
11644 break;
11645 }
11646 need_vex = 1;
11647 need_vex_reg = 1;
11648 codep++;
91d6fa6a
NC
11649 vindex = *codep++;
11650 dp = &vex_table[vex_table_index][vindex];
285ca992 11651 end_codep = codep;
53c4d625
JB
11652 /* There is no MODRM byte for VEX0F 77. */
11653 if (vex_table_index != VEX_0F || vindex != 0x77)
c0f3af97
L
11654 {
11655 FETCH_DATA (info, codep + 1);
11656 modrm.mod = (*codep >> 6) & 3;
11657 modrm.reg = (*codep >> 3) & 7;
11658 modrm.rm = *codep & 7;
11659 }
11660 break;
11661
11662 case USE_VEX_C5_TABLE:
43234a1e 11663 /* VEX prefix. */
c0f3af97
L
11664 FETCH_DATA (info, codep + 2);
11665 /* All bits in the REX prefix are ignored. */
11666 rex_ignored = rex;
11667 rex = (*codep & 0x80) ? 0 : REX_R;
11668
9889cbb1
L
11669 /* For the 2-byte VEX prefix in 32-bit mode, the highest bit in
11670 VEX.vvvv is 1. */
c0f3af97 11671 vex.register_specifier = (~(*codep >> 3)) & 0xf;
c0f3af97
L
11672 vex.length = (*codep & 0x4) ? 256 : 128;
11673 switch ((*codep & 0x3))
11674 {
11675 case 0:
c0f3af97
L
11676 break;
11677 case 1:
11678 vex.prefix = DATA_PREFIX_OPCODE;
11679 break;
11680 case 2:
11681 vex.prefix = REPE_PREFIX_OPCODE;
11682 break;
11683 case 3:
11684 vex.prefix = REPNE_PREFIX_OPCODE;
11685 break;
11686 }
11687 need_vex = 1;
11688 need_vex_reg = 1;
11689 codep++;
91d6fa6a
NC
11690 vindex = *codep++;
11691 dp = &vex_table[dp->op[1].bytemode][vindex];
285ca992 11692 end_codep = codep;
53c4d625
JB
11693 /* There is no MODRM byte for VEX 77. */
11694 if (vindex != 0x77)
c0f3af97
L
11695 {
11696 FETCH_DATA (info, codep + 1);
11697 modrm.mod = (*codep >> 6) & 3;
11698 modrm.reg = (*codep >> 3) & 7;
11699 modrm.rm = *codep & 7;
11700 }
11701 break;
11702
9e30b8e0
L
11703 case USE_VEX_W_TABLE:
11704 if (!need_vex)
11705 abort ();
11706
11707 dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
11708 break;
11709
43234a1e
L
11710 case USE_EVEX_TABLE:
11711 two_source_ops = 0;
11712 /* EVEX prefix. */
11713 vex.evex = 1;
11714 FETCH_DATA (info, codep + 4);
11715 /* All bits in the REX prefix are ignored. */
11716 rex_ignored = rex;
11717 /* The first byte after 0x62. */
11718 rex = ~(*codep >> 5) & 0x7;
11719 vex.r = *codep & 0x10;
11720 switch ((*codep & 0xf))
11721 {
11722 default:
11723 return &bad_opcode;
11724 case 0x1:
11725 vex_table_index = EVEX_0F;
11726 break;
11727 case 0x2:
11728 vex_table_index = EVEX_0F38;
11729 break;
11730 case 0x3:
11731 vex_table_index = EVEX_0F3A;
11732 break;
11733 }
11734
11735 /* The second byte after 0x62. */
11736 codep++;
11737 vex.w = *codep & 0x80;
11738 if (vex.w && address_mode == mode_64bit)
11739 rex |= REX_W;
11740
11741 vex.register_specifier = (~(*codep >> 3)) & 0xf;
43234a1e
L
11742
11743 /* The U bit. */
11744 if (!(*codep & 0x4))
11745 return &bad_opcode;
11746
11747 switch ((*codep & 0x3))
11748 {
11749 case 0:
43234a1e
L
11750 break;
11751 case 1:
11752 vex.prefix = DATA_PREFIX_OPCODE;
11753 break;
11754 case 2:
11755 vex.prefix = REPE_PREFIX_OPCODE;
11756 break;
11757 case 3:
11758 vex.prefix = REPNE_PREFIX_OPCODE;
11759 break;
11760 }
11761
11762 /* The third byte after 0x62. */
11763 codep++;
11764
11765 /* Remember the static rounding bits. */
11766 vex.ll = (*codep >> 5) & 3;
11767 vex.b = (*codep & 0x10) != 0;
11768
11769 vex.v = *codep & 0x8;
11770 vex.mask_register_specifier = *codep & 0x7;
11771 vex.zeroing = *codep & 0x80;
11772
5f847646
JB
11773 if (address_mode != mode_64bit)
11774 {
11775 /* In 16/32-bit mode silently ignore following bits. */
11776 rex &= ~REX_B;
11777 vex.r = 1;
11778 vex.v = 1;
11779 }
11780
43234a1e
L
11781 need_vex = 1;
11782 need_vex_reg = 1;
11783 codep++;
11784 vindex = *codep++;
11785 dp = &evex_table[vex_table_index][vindex];
285ca992 11786 end_codep = codep;
43234a1e
L
11787 FETCH_DATA (info, codep + 1);
11788 modrm.mod = (*codep >> 6) & 3;
11789 modrm.reg = (*codep >> 3) & 7;
11790 modrm.rm = *codep & 7;
11791
11792 /* Set vector length. */
11793 if (modrm.mod == 3 && vex.b)
11794 vex.length = 512;
11795 else
11796 {
11797 switch (vex.ll)
11798 {
11799 case 0x0:
11800 vex.length = 128;
11801 break;
11802 case 0x1:
11803 vex.length = 256;
11804 break;
11805 case 0x2:
11806 vex.length = 512;
11807 break;
11808 default:
11809 return &bad_opcode;
11810 }
11811 }
11812 break;
11813
592d1631
L
11814 case 0:
11815 dp = &bad_opcode;
11816 break;
11817
b844680a 11818 default:
d34b5006 11819 abort ();
b844680a
L
11820 }
11821
11822 if (dp->name != NULL)
11823 return dp;
11824 else
8bb15339 11825 return get_valid_dis386 (dp, info);
b844680a
L
11826}
11827
dfc8cf43 11828static void
55cf16e1 11829get_sib (disassemble_info *info, int sizeflag)
dfc8cf43
L
11830{
11831 /* If modrm.mod == 3, operand must be register. */
11832 if (need_modrm
55cf16e1 11833 && ((sizeflag & AFLAG) || address_mode == mode_64bit)
dfc8cf43
L
11834 && modrm.mod != 3
11835 && modrm.rm == 4)
11836 {
11837 FETCH_DATA (info, codep + 2);
11838 sib.index = (codep [1] >> 3) & 7;
11839 sib.scale = (codep [1] >> 6) & 3;
11840 sib.base = codep [1] & 7;
11841 }
11842}
11843
e396998b 11844static int
26ca5450 11845print_insn (bfd_vma pc, disassemble_info *info)
252b5132 11846{
2da11e11 11847 const struct dis386 *dp;
252b5132 11848 int i;
ce518a5f 11849 char *op_txt[MAX_OPERANDS];
252b5132 11850 int needcomma;
df18fdba 11851 int sizeflag, orig_sizeflag;
e396998b 11852 const char *p;
252b5132 11853 struct dis_private priv;
f16cd0d5 11854 int prefix_length;
252b5132 11855
d7921315
L
11856 priv.orig_sizeflag = AFLAG | DFLAG;
11857 if ((info->mach & bfd_mach_i386_i386) != 0)
cb712a9e 11858 address_mode = mode_32bit;
2da11e11 11859 else if (info->mach == bfd_mach_i386_i8086)
d7921315
L
11860 {
11861 address_mode = mode_16bit;
11862 priv.orig_sizeflag = 0;
11863 }
2da11e11 11864 else
d7921315
L
11865 address_mode = mode_64bit;
11866
11867 if (intel_syntax == (char) -1)
11868 intel_syntax = (info->mach & bfd_mach_i386_intel_syntax) != 0;
e396998b
AM
11869
11870 for (p = info->disassembler_options; p != NULL; )
11871 {
5db04b09
L
11872 if (CONST_STRNEQ (p, "amd64"))
11873 isa64 = amd64;
11874 else if (CONST_STRNEQ (p, "intel64"))
11875 isa64 = intel64;
11876 else if (CONST_STRNEQ (p, "x86-64"))
e396998b 11877 {
cb712a9e 11878 address_mode = mode_64bit;
e396998b
AM
11879 priv.orig_sizeflag = AFLAG | DFLAG;
11880 }
0112cd26 11881 else if (CONST_STRNEQ (p, "i386"))
e396998b 11882 {
cb712a9e 11883 address_mode = mode_32bit;
e396998b
AM
11884 priv.orig_sizeflag = AFLAG | DFLAG;
11885 }
0112cd26 11886 else if (CONST_STRNEQ (p, "i8086"))
e396998b 11887 {
cb712a9e 11888 address_mode = mode_16bit;
e396998b
AM
11889 priv.orig_sizeflag = 0;
11890 }
0112cd26 11891 else if (CONST_STRNEQ (p, "intel"))
e396998b
AM
11892 {
11893 intel_syntax = 1;
9d141669
L
11894 if (CONST_STRNEQ (p + 5, "-mnemonic"))
11895 intel_mnemonic = 1;
e396998b 11896 }
0112cd26 11897 else if (CONST_STRNEQ (p, "att"))
e396998b
AM
11898 {
11899 intel_syntax = 0;
9d141669
L
11900 if (CONST_STRNEQ (p + 3, "-mnemonic"))
11901 intel_mnemonic = 0;
e396998b 11902 }
0112cd26 11903 else if (CONST_STRNEQ (p, "addr"))
e396998b 11904 {
f59a29b9
L
11905 if (address_mode == mode_64bit)
11906 {
11907 if (p[4] == '3' && p[5] == '2')
11908 priv.orig_sizeflag &= ~AFLAG;
11909 else if (p[4] == '6' && p[5] == '4')
11910 priv.orig_sizeflag |= AFLAG;
11911 }
11912 else
11913 {
11914 if (p[4] == '1' && p[5] == '6')
11915 priv.orig_sizeflag &= ~AFLAG;
11916 else if (p[4] == '3' && p[5] == '2')
11917 priv.orig_sizeflag |= AFLAG;
11918 }
e396998b 11919 }
0112cd26 11920 else if (CONST_STRNEQ (p, "data"))
e396998b
AM
11921 {
11922 if (p[4] == '1' && p[5] == '6')
11923 priv.orig_sizeflag &= ~DFLAG;
11924 else if (p[4] == '3' && p[5] == '2')
11925 priv.orig_sizeflag |= DFLAG;
11926 }
0112cd26 11927 else if (CONST_STRNEQ (p, "suffix"))
e396998b
AM
11928 priv.orig_sizeflag |= SUFFIX_ALWAYS;
11929
11930 p = strchr (p, ',');
11931 if (p != NULL)
11932 p++;
11933 }
11934
c0f92bf9
L
11935 if (address_mode == mode_64bit && sizeof (bfd_vma) < 8)
11936 {
11937 (*info->fprintf_func) (info->stream,
11938 _("64-bit address is disabled"));
11939 return -1;
11940 }
11941
e396998b
AM
11942 if (intel_syntax)
11943 {
11944 names64 = intel_names64;
11945 names32 = intel_names32;
11946 names16 = intel_names16;
11947 names8 = intel_names8;
11948 names8rex = intel_names8rex;
11949 names_seg = intel_names_seg;
b9733481 11950 names_mm = intel_names_mm;
7e8b059b 11951 names_bnd = intel_names_bnd;
b9733481
L
11952 names_xmm = intel_names_xmm;
11953 names_ymm = intel_names_ymm;
43234a1e 11954 names_zmm = intel_names_zmm;
db51cc60
L
11955 index64 = intel_index64;
11956 index32 = intel_index32;
43234a1e 11957 names_mask = intel_names_mask;
e396998b
AM
11958 index16 = intel_index16;
11959 open_char = '[';
11960 close_char = ']';
11961 separator_char = '+';
11962 scale_char = '*';
11963 }
11964 else
11965 {
11966 names64 = att_names64;
11967 names32 = att_names32;
11968 names16 = att_names16;
11969 names8 = att_names8;
11970 names8rex = att_names8rex;
11971 names_seg = att_names_seg;
b9733481 11972 names_mm = att_names_mm;
7e8b059b 11973 names_bnd = att_names_bnd;
b9733481
L
11974 names_xmm = att_names_xmm;
11975 names_ymm = att_names_ymm;
43234a1e 11976 names_zmm = att_names_zmm;
db51cc60
L
11977 index64 = att_index64;
11978 index32 = att_index32;
43234a1e 11979 names_mask = att_names_mask;
e396998b
AM
11980 index16 = att_index16;
11981 open_char = '(';
11982 close_char = ')';
11983 separator_char = ',';
11984 scale_char = ',';
11985 }
2da11e11 11986
4fe53c98 11987 /* The output looks better if we put 7 bytes on a line, since that
8a9036a4
L
11988 puts most long word instructions on a single line. Use 8 bytes
11989 for Intel L1OM. */
d7921315 11990 if ((info->mach & bfd_mach_l1om) != 0)
8a9036a4
L
11991 info->bytes_per_line = 8;
11992 else
11993 info->bytes_per_line = 7;
252b5132 11994
26ca5450 11995 info->private_data = &priv;
252b5132
RH
11996 priv.max_fetched = priv.the_buffer;
11997 priv.insn_start = pc;
252b5132
RH
11998
11999 obuf[0] = 0;
ce518a5f
L
12000 for (i = 0; i < MAX_OPERANDS; ++i)
12001 {
12002 op_out[i][0] = 0;
12003 op_index[i] = -1;
12004 }
252b5132
RH
12005
12006 the_info = info;
12007 start_pc = pc;
e396998b
AM
12008 start_codep = priv.the_buffer;
12009 codep = priv.the_buffer;
252b5132 12010
8df14d78 12011 if (OPCODES_SIGSETJMP (priv.bailout) != 0)
5076851f 12012 {
7d421014
ILT
12013 const char *name;
12014
5076851f 12015 /* Getting here means we tried for data but didn't get it. That
e396998b
AM
12016 means we have an incomplete instruction of some sort. Just
12017 print the first byte as a prefix or a .byte pseudo-op. */
12018 if (codep > priv.the_buffer)
5076851f 12019 {
e396998b 12020 name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
7d421014
ILT
12021 if (name != NULL)
12022 (*info->fprintf_func) (info->stream, "%s", name);
12023 else
5076851f 12024 {
7d421014
ILT
12025 /* Just print the first byte as a .byte instruction. */
12026 (*info->fprintf_func) (info->stream, ".byte 0x%x",
e396998b 12027 (unsigned int) priv.the_buffer[0]);
5076851f 12028 }
5076851f 12029
7d421014 12030 return 1;
5076851f
ILT
12031 }
12032
12033 return -1;
12034 }
12035
52b15da3 12036 obufp = obuf;
f16cd0d5
L
12037 sizeflag = priv.orig_sizeflag;
12038
12039 if (!ckprefix () || rex_used)
12040 {
12041 /* Too many prefixes or unused REX prefixes. */
12042 for (i = 0;
f6dd4781 12043 i < (int) ARRAY_SIZE (all_prefixes) && all_prefixes[i];
f16cd0d5 12044 i++)
de882298 12045 (*info->fprintf_func) (info->stream, "%s%s",
6c067bbb 12046 i == 0 ? "" : " ",
f16cd0d5 12047 prefix_name (all_prefixes[i], sizeflag));
de882298 12048 return i;
f16cd0d5 12049 }
252b5132
RH
12050
12051 insn_codep = codep;
12052
12053 FETCH_DATA (info, codep + 1);
12054 two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
12055
3e7d61b2 12056 if (((prefixes & PREFIX_FWAIT)
f16cd0d5 12057 && ((*codep < 0xd8) || (*codep > 0xdf))))
252b5132 12058 {
86a80a50 12059 /* Handle prefixes before fwait. */
d9949a36 12060 for (i = 0; i < fwait_prefix && all_prefixes[i];
86a80a50
L
12061 i++)
12062 (*info->fprintf_func) (info->stream, "%s ",
12063 prefix_name (all_prefixes[i], sizeflag));
f16cd0d5 12064 (*info->fprintf_func) (info->stream, "fwait");
86a80a50 12065 return i + 1;
252b5132
RH
12066 }
12067
252b5132
RH
12068 if (*codep == 0x0f)
12069 {
eec0f4ca 12070 unsigned char threebyte;
5f40e14d
JS
12071
12072 codep++;
12073 FETCH_DATA (info, codep + 1);
12074 threebyte = *codep;
eec0f4ca 12075 dp = &dis386_twobyte[threebyte];
252b5132 12076 need_modrm = twobyte_has_modrm[*codep];
eec0f4ca 12077 codep++;
252b5132
RH
12078 }
12079 else
12080 {
6439fc28 12081 dp = &dis386[*codep];
252b5132 12082 need_modrm = onebyte_has_modrm[*codep];
eec0f4ca 12083 codep++;
252b5132 12084 }
246c51aa 12085
df18fdba
L
12086 /* Save sizeflag for printing the extra prefixes later before updating
12087 it for mnemonic and operand processing. The prefix names depend
12088 only on the address mode. */
12089 orig_sizeflag = sizeflag;
c608c12e 12090 if (prefixes & PREFIX_ADDR)
df18fdba 12091 sizeflag ^= AFLAG;
b844680a 12092 if ((prefixes & PREFIX_DATA))
df18fdba 12093 sizeflag ^= DFLAG;
3ffd33cf 12094
285ca992 12095 end_codep = codep;
8bb15339 12096 if (need_modrm)
252b5132
RH
12097 {
12098 FETCH_DATA (info, codep + 1);
7967e09e
L
12099 modrm.mod = (*codep >> 6) & 3;
12100 modrm.reg = (*codep >> 3) & 7;
12101 modrm.rm = *codep & 7;
252b5132
RH
12102 }
12103
42d5f9c6
MS
12104 need_vex = 0;
12105 need_vex_reg = 0;
12106 vex_w_done = 0;
caf0678c 12107 memset (&vex, 0, sizeof (vex));
55b126d4 12108
ce518a5f 12109 if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
252b5132 12110 {
55cf16e1 12111 get_sib (info, sizeflag);
252b5132
RH
12112 dofloat (sizeflag);
12113 }
12114 else
12115 {
8bb15339 12116 dp = get_valid_dis386 (dp, info);
b844680a 12117 if (dp != NULL && putop (dp->name, sizeflag) == 0)
6c067bbb 12118 {
55cf16e1 12119 get_sib (info, sizeflag);
ce518a5f
L
12120 for (i = 0; i < MAX_OPERANDS; ++i)
12121 {
246c51aa 12122 obufp = op_out[i];
ce518a5f
L
12123 op_ad = MAX_OPERANDS - 1 - i;
12124 if (dp->op[i].rtn)
12125 (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
43234a1e
L
12126 /* For EVEX instruction after the last operand masking
12127 should be printed. */
12128 if (i == 0 && vex.evex)
12129 {
12130 /* Don't print {%k0}. */
12131 if (vex.mask_register_specifier)
12132 {
12133 oappend ("{");
12134 oappend (names_mask[vex.mask_register_specifier]);
12135 oappend ("}");
12136 }
12137 if (vex.zeroing)
12138 oappend ("{z}");
12139 }
ce518a5f 12140 }
6439fc28 12141 }
252b5132
RH
12142 }
12143
63c6fc6c
L
12144 /* If VEX.vvvv and EVEX.vvvv are unused, they must be all 1s, which
12145 are all 0s in inverted form. */
12146 if (need_vex && vex.register_specifier != 0)
12147 {
12148 (*info->fprintf_func) (info->stream, "(bad)");
12149 return end_codep - priv.the_buffer;
12150 }
12151
d869730d 12152 /* Check if the REX prefix is used. */
e2e6193d 12153 if (rex_ignored == 0 && (rex ^ rex_used) == 0 && last_rex_prefix >= 0)
f16cd0d5
L
12154 all_prefixes[last_rex_prefix] = 0;
12155
5e6718e4 12156 /* Check if the SEG prefix is used. */
f16cd0d5
L
12157 if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
12158 | PREFIX_FS | PREFIX_GS)) != 0
285ca992 12159 && (used_prefixes & active_seg_prefix) != 0)
f16cd0d5
L
12160 all_prefixes[last_seg_prefix] = 0;
12161
5e6718e4 12162 /* Check if the ADDR prefix is used. */
f16cd0d5
L
12163 if ((prefixes & PREFIX_ADDR) != 0
12164 && (used_prefixes & PREFIX_ADDR) != 0)
12165 all_prefixes[last_addr_prefix] = 0;
12166
df18fdba
L
12167 /* Check if the DATA prefix is used. */
12168 if ((prefixes & PREFIX_DATA) != 0
12169 && (used_prefixes & PREFIX_DATA) != 0)
12170 all_prefixes[last_data_prefix] = 0;
f16cd0d5 12171
df18fdba 12172 /* Print the extra prefixes. */
f16cd0d5 12173 prefix_length = 0;
f310f33d 12174 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
f16cd0d5
L
12175 if (all_prefixes[i])
12176 {
12177 const char *name;
df18fdba 12178 name = prefix_name (all_prefixes[i], orig_sizeflag);
f16cd0d5
L
12179 if (name == NULL)
12180 abort ();
12181 prefix_length += strlen (name) + 1;
12182 (*info->fprintf_func) (info->stream, "%s ", name);
12183 }
b844680a 12184
285ca992
L
12185 /* If the mandatory PREFIX_REPZ/PREFIX_REPNZ/PREFIX_DATA prefix is
12186 unused, opcode is invalid. Since the PREFIX_DATA prefix may be
12187 used by putop and MMX/SSE operand and may be overriden by the
12188 PREFIX_REPZ/PREFIX_REPNZ fix, we check the PREFIX_DATA prefix
12189 separately. */
3888916d 12190 if (dp->prefix_requirement == PREFIX_OPCODE
285ca992
L
12191 && dp != &bad_opcode
12192 && (((prefixes
12193 & (PREFIX_REPZ | PREFIX_REPNZ)) != 0
12194 && (used_prefixes
12195 & (PREFIX_REPZ | PREFIX_REPNZ)) == 0)
12196 || ((((prefixes
12197 & (PREFIX_REPZ | PREFIX_REPNZ | PREFIX_DATA))
12198 == PREFIX_DATA)
12199 && (used_prefixes & PREFIX_DATA) == 0))))
12200 {
12201 (*info->fprintf_func) (info->stream, "(bad)");
12202 return end_codep - priv.the_buffer;
12203 }
12204
f16cd0d5
L
12205 /* Check maximum code length. */
12206 if ((codep - start_codep) > MAX_CODE_LENGTH)
12207 {
12208 (*info->fprintf_func) (info->stream, "(bad)");
12209 return MAX_CODE_LENGTH;
12210 }
b844680a 12211
ea397f5b 12212 obufp = mnemonicendp;
f16cd0d5 12213 for (i = strlen (obuf) + prefix_length; i < 6; i++)
252b5132
RH
12214 oappend (" ");
12215 oappend (" ");
12216 (*info->fprintf_func) (info->stream, "%s", obuf);
12217
12218 /* The enter and bound instructions are printed with operands in the same
12219 order as the intel book; everything else is printed in reverse order. */
2da11e11 12220 if (intel_syntax || two_source_ops)
252b5132 12221 {
185b1163
L
12222 bfd_vma riprel;
12223
ce518a5f 12224 for (i = 0; i < MAX_OPERANDS; ++i)
6c067bbb 12225 op_txt[i] = op_out[i];
246c51aa 12226
3a8547d2
JB
12227 if (intel_syntax && dp && dp->op[2].rtn == OP_Rounding
12228 && dp->op[3].rtn == OP_E && dp->op[4].rtn == NULL)
12229 {
12230 op_txt[2] = op_out[3];
12231 op_txt[3] = op_out[2];
12232 }
12233
ce518a5f
L
12234 for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
12235 {
6c067bbb
RM
12236 op_ad = op_index[i];
12237 op_index[i] = op_index[MAX_OPERANDS - 1 - i];
12238 op_index[MAX_OPERANDS - 1 - i] = op_ad;
185b1163
L
12239 riprel = op_riprel[i];
12240 op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
12241 op_riprel[MAX_OPERANDS - 1 - i] = riprel;
ce518a5f 12242 }
252b5132
RH
12243 }
12244 else
12245 {
ce518a5f 12246 for (i = 0; i < MAX_OPERANDS; ++i)
6c067bbb 12247 op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
050dfa73
MM
12248 }
12249
ce518a5f
L
12250 needcomma = 0;
12251 for (i = 0; i < MAX_OPERANDS; ++i)
12252 if (*op_txt[i])
12253 {
12254 if (needcomma)
12255 (*info->fprintf_func) (info->stream, ",");
12256 if (op_index[i] != -1 && !op_riprel[i])
12257 (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
12258 else
12259 (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
12260 needcomma = 1;
12261 }
050dfa73 12262
ce518a5f 12263 for (i = 0; i < MAX_OPERANDS; i++)
52b15da3
JH
12264 if (op_index[i] != -1 && op_riprel[i])
12265 {
12266 (*info->fprintf_func) (info->stream, " # ");
4fd7268a 12267 (*info->print_address_func) ((bfd_vma) (start_pc + (codep - start_codep)
52b15da3 12268 + op_address[op_index[i]]), info);
185b1163 12269 break;
52b15da3 12270 }
e396998b 12271 return codep - priv.the_buffer;
252b5132
RH
12272}
12273
6439fc28 12274static const char *float_mem[] = {
252b5132 12275 /* d8 */
7c52e0e8
L
12276 "fadd{s|}",
12277 "fmul{s|}",
12278 "fcom{s|}",
12279 "fcomp{s|}",
12280 "fsub{s|}",
12281 "fsubr{s|}",
12282 "fdiv{s|}",
12283 "fdivr{s|}",
db6eb5be 12284 /* d9 */
7c52e0e8 12285 "fld{s|}",
252b5132 12286 "(bad)",
7c52e0e8
L
12287 "fst{s|}",
12288 "fstp{s|}",
9306ca4a 12289 "fldenvIC",
252b5132 12290 "fldcw",
9306ca4a 12291 "fNstenvIC",
252b5132
RH
12292 "fNstcw",
12293 /* da */
7c52e0e8
L
12294 "fiadd{l|}",
12295 "fimul{l|}",
12296 "ficom{l|}",
12297 "ficomp{l|}",
12298 "fisub{l|}",
12299 "fisubr{l|}",
12300 "fidiv{l|}",
12301 "fidivr{l|}",
252b5132 12302 /* db */
7c52e0e8
L
12303 "fild{l|}",
12304 "fisttp{l|}",
12305 "fist{l|}",
12306 "fistp{l|}",
252b5132 12307 "(bad)",
6439fc28 12308 "fld{t||t|}",
252b5132 12309 "(bad)",
6439fc28 12310 "fstp{t||t|}",
252b5132 12311 /* dc */
7c52e0e8
L
12312 "fadd{l|}",
12313 "fmul{l|}",
12314 "fcom{l|}",
12315 "fcomp{l|}",
12316 "fsub{l|}",
12317 "fsubr{l|}",
12318 "fdiv{l|}",
12319 "fdivr{l|}",
252b5132 12320 /* dd */
7c52e0e8
L
12321 "fld{l|}",
12322 "fisttp{ll|}",
12323 "fst{l||}",
12324 "fstp{l|}",
9306ca4a 12325 "frstorIC",
252b5132 12326 "(bad)",
9306ca4a 12327 "fNsaveIC",
252b5132
RH
12328 "fNstsw",
12329 /* de */
ac465521
JB
12330 "fiadd{s|}",
12331 "fimul{s|}",
12332 "ficom{s|}",
12333 "ficomp{s|}",
12334 "fisub{s|}",
12335 "fisubr{s|}",
12336 "fidiv{s|}",
12337 "fidivr{s|}",
252b5132 12338 /* df */
ac465521
JB
12339 "fild{s|}",
12340 "fisttp{s|}",
12341 "fist{s|}",
12342 "fistp{s|}",
252b5132 12343 "fbld",
7c52e0e8 12344 "fild{ll|}",
252b5132 12345 "fbstp",
7c52e0e8 12346 "fistp{ll|}",
1d9f512f
AM
12347};
12348
12349static const unsigned char float_mem_mode[] = {
12350 /* d8 */
12351 d_mode,
12352 d_mode,
12353 d_mode,
12354 d_mode,
12355 d_mode,
12356 d_mode,
12357 d_mode,
12358 d_mode,
12359 /* d9 */
12360 d_mode,
12361 0,
12362 d_mode,
12363 d_mode,
12364 0,
12365 w_mode,
12366 0,
12367 w_mode,
12368 /* da */
12369 d_mode,
12370 d_mode,
12371 d_mode,
12372 d_mode,
12373 d_mode,
12374 d_mode,
12375 d_mode,
12376 d_mode,
12377 /* db */
12378 d_mode,
12379 d_mode,
12380 d_mode,
12381 d_mode,
12382 0,
9306ca4a 12383 t_mode,
1d9f512f 12384 0,
9306ca4a 12385 t_mode,
1d9f512f
AM
12386 /* dc */
12387 q_mode,
12388 q_mode,
12389 q_mode,
12390 q_mode,
12391 q_mode,
12392 q_mode,
12393 q_mode,
12394 q_mode,
12395 /* dd */
12396 q_mode,
12397 q_mode,
12398 q_mode,
12399 q_mode,
12400 0,
12401 0,
12402 0,
12403 w_mode,
12404 /* de */
12405 w_mode,
12406 w_mode,
12407 w_mode,
12408 w_mode,
12409 w_mode,
12410 w_mode,
12411 w_mode,
12412 w_mode,
12413 /* df */
12414 w_mode,
12415 w_mode,
12416 w_mode,
12417 w_mode,
9306ca4a 12418 t_mode,
1d9f512f 12419 q_mode,
9306ca4a 12420 t_mode,
1d9f512f 12421 q_mode
252b5132
RH
12422};
12423
ce518a5f
L
12424#define ST { OP_ST, 0 }
12425#define STi { OP_STi, 0 }
252b5132 12426
48c97fa1
L
12427#define FGRPd9_2 NULL, { { NULL, 1 } }, 0
12428#define FGRPd9_4 NULL, { { NULL, 2 } }, 0
12429#define FGRPd9_5 NULL, { { NULL, 3 } }, 0
12430#define FGRPd9_6 NULL, { { NULL, 4 } }, 0
12431#define FGRPd9_7 NULL, { { NULL, 5 } }, 0
12432#define FGRPda_5 NULL, { { NULL, 6 } }, 0
12433#define FGRPdb_4 NULL, { { NULL, 7 } }, 0
12434#define FGRPde_3 NULL, { { NULL, 8 } }, 0
12435#define FGRPdf_4 NULL, { { NULL, 9 } }, 0
252b5132 12436
2da11e11 12437static const struct dis386 float_reg[][8] = {
252b5132
RH
12438 /* d8 */
12439 {
bf890a93
IT
12440 { "fadd", { ST, STi }, 0 },
12441 { "fmul", { ST, STi }, 0 },
12442 { "fcom", { STi }, 0 },
12443 { "fcomp", { STi }, 0 },
12444 { "fsub", { ST, STi }, 0 },
12445 { "fsubr", { ST, STi }, 0 },
12446 { "fdiv", { ST, STi }, 0 },
12447 { "fdivr", { ST, STi }, 0 },
252b5132
RH
12448 },
12449 /* d9 */
12450 {
bf890a93
IT
12451 { "fld", { STi }, 0 },
12452 { "fxch", { STi }, 0 },
252b5132 12453 { FGRPd9_2 },
592d1631 12454 { Bad_Opcode },
252b5132
RH
12455 { FGRPd9_4 },
12456 { FGRPd9_5 },
12457 { FGRPd9_6 },
12458 { FGRPd9_7 },
12459 },
12460 /* da */
12461 {
bf890a93
IT
12462 { "fcmovb", { ST, STi }, 0 },
12463 { "fcmove", { ST, STi }, 0 },
12464 { "fcmovbe",{ ST, STi }, 0 },
12465 { "fcmovu", { ST, STi }, 0 },
592d1631 12466 { Bad_Opcode },
252b5132 12467 { FGRPda_5 },
592d1631
L
12468 { Bad_Opcode },
12469 { Bad_Opcode },
252b5132
RH
12470 },
12471 /* db */
12472 {
bf890a93
IT
12473 { "fcmovnb",{ ST, STi }, 0 },
12474 { "fcmovne",{ ST, STi }, 0 },
12475 { "fcmovnbe",{ ST, STi }, 0 },
12476 { "fcmovnu",{ ST, STi }, 0 },
252b5132 12477 { FGRPdb_4 },
bf890a93
IT
12478 { "fucomi", { ST, STi }, 0 },
12479 { "fcomi", { ST, STi }, 0 },
592d1631 12480 { Bad_Opcode },
252b5132
RH
12481 },
12482 /* dc */
12483 {
bf890a93
IT
12484 { "fadd", { STi, ST }, 0 },
12485 { "fmul", { STi, ST }, 0 },
592d1631
L
12486 { Bad_Opcode },
12487 { Bad_Opcode },
d53e6b98
JB
12488 { "fsub{!M|r}", { STi, ST }, 0 },
12489 { "fsub{M|}", { STi, ST }, 0 },
12490 { "fdiv{!M|r}", { STi, ST }, 0 },
12491 { "fdiv{M|}", { STi, ST }, 0 },
252b5132
RH
12492 },
12493 /* dd */
12494 {
bf890a93 12495 { "ffree", { STi }, 0 },
592d1631 12496 { Bad_Opcode },
bf890a93
IT
12497 { "fst", { STi }, 0 },
12498 { "fstp", { STi }, 0 },
12499 { "fucom", { STi }, 0 },
12500 { "fucomp", { STi }, 0 },
592d1631
L
12501 { Bad_Opcode },
12502 { Bad_Opcode },
252b5132
RH
12503 },
12504 /* de */
12505 {
bf890a93
IT
12506 { "faddp", { STi, ST }, 0 },
12507 { "fmulp", { STi, ST }, 0 },
592d1631 12508 { Bad_Opcode },
252b5132 12509 { FGRPde_3 },
d53e6b98
JB
12510 { "fsub{!M|r}p", { STi, ST }, 0 },
12511 { "fsub{M|}p", { STi, ST }, 0 },
12512 { "fdiv{!M|r}p", { STi, ST }, 0 },
12513 { "fdiv{M|}p", { STi, ST }, 0 },
252b5132
RH
12514 },
12515 /* df */
12516 {
bf890a93 12517 { "ffreep", { STi }, 0 },
592d1631
L
12518 { Bad_Opcode },
12519 { Bad_Opcode },
12520 { Bad_Opcode },
252b5132 12521 { FGRPdf_4 },
bf890a93
IT
12522 { "fucomip", { ST, STi }, 0 },
12523 { "fcomip", { ST, STi }, 0 },
592d1631 12524 { Bad_Opcode },
252b5132
RH
12525 },
12526};
12527
252b5132 12528static char *fgrps[][8] = {
48c97fa1
L
12529 /* Bad opcode 0 */
12530 {
12531 "(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12532 },
12533
12534 /* d9_2 1 */
252b5132
RH
12535 {
12536 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12537 },
12538
48c97fa1 12539 /* d9_4 2 */
252b5132
RH
12540 {
12541 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
12542 },
12543
48c97fa1 12544 /* d9_5 3 */
252b5132
RH
12545 {
12546 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
12547 },
12548
48c97fa1 12549 /* d9_6 4 */
252b5132
RH
12550 {
12551 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
12552 },
12553
48c97fa1 12554 /* d9_7 5 */
252b5132
RH
12555 {
12556 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
12557 },
12558
48c97fa1 12559 /* da_5 6 */
252b5132
RH
12560 {
12561 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12562 },
12563
48c97fa1 12564 /* db_4 7 */
252b5132 12565 {
309d3373
JB
12566 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
12567 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
252b5132
RH
12568 },
12569
48c97fa1 12570 /* de_3 8 */
252b5132
RH
12571 {
12572 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12573 },
12574
48c97fa1 12575 /* df_4 9 */
252b5132
RH
12576 {
12577 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12578 },
12579};
12580
b6169b20
L
12581static void
12582swap_operand (void)
12583{
12584 mnemonicendp[0] = '.';
12585 mnemonicendp[1] = 's';
12586 mnemonicendp += 2;
12587}
12588
b844680a
L
12589static void
12590OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
12591 int sizeflag ATTRIBUTE_UNUSED)
12592{
12593 /* Skip mod/rm byte. */
12594 MODRM_CHECK;
12595 codep++;
12596}
12597
252b5132 12598static void
26ca5450 12599dofloat (int sizeflag)
252b5132 12600{
2da11e11 12601 const struct dis386 *dp;
252b5132
RH
12602 unsigned char floatop;
12603
12604 floatop = codep[-1];
12605
7967e09e 12606 if (modrm.mod != 3)
252b5132 12607 {
7967e09e 12608 int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
1d9f512f
AM
12609
12610 putop (float_mem[fp_indx], sizeflag);
ce518a5f 12611 obufp = op_out[0];
6e50d963 12612 op_ad = 2;
1d9f512f 12613 OP_E (float_mem_mode[fp_indx], sizeflag);
252b5132
RH
12614 return;
12615 }
6608db57 12616 /* Skip mod/rm byte. */
4bba6815 12617 MODRM_CHECK;
252b5132
RH
12618 codep++;
12619
7967e09e 12620 dp = &float_reg[floatop - 0xd8][modrm.reg];
252b5132
RH
12621 if (dp->name == NULL)
12622 {
7967e09e 12623 putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
252b5132 12624
6608db57 12625 /* Instruction fnstsw is only one with strange arg. */
252b5132 12626 if (floatop == 0xdf && codep[-1] == 0xe0)
ce518a5f 12627 strcpy (op_out[0], names16[0]);
252b5132
RH
12628 }
12629 else
12630 {
12631 putop (dp->name, sizeflag);
12632
ce518a5f 12633 obufp = op_out[0];
6e50d963 12634 op_ad = 2;
ce518a5f
L
12635 if (dp->op[0].rtn)
12636 (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
6e50d963 12637
ce518a5f 12638 obufp = op_out[1];
6e50d963 12639 op_ad = 1;
ce518a5f
L
12640 if (dp->op[1].rtn)
12641 (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
252b5132
RH
12642 }
12643}
12644
9ce09ba2
RM
12645/* Like oappend (below), but S is a string starting with '%'.
12646 In Intel syntax, the '%' is elided. */
12647static void
12648oappend_maybe_intel (const char *s)
12649{
12650 oappend (s + intel_syntax);
12651}
12652
252b5132 12653static void
26ca5450 12654OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12655{
9ce09ba2 12656 oappend_maybe_intel ("%st");
252b5132
RH
12657}
12658
252b5132 12659static void
26ca5450 12660OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12661{
7967e09e 12662 sprintf (scratchbuf, "%%st(%d)", modrm.rm);
9ce09ba2 12663 oappend_maybe_intel (scratchbuf);
252b5132
RH
12664}
12665
6608db57 12666/* Capital letters in template are macros. */
6439fc28 12667static int
d3ce72d0 12668putop (const char *in_template, int sizeflag)
252b5132 12669{
2da11e11 12670 const char *p;
9306ca4a 12671 int alt = 0;
9d141669 12672 int cond = 1;
98b528ac
L
12673 unsigned int l = 0, len = 1;
12674 char last[4];
12675
12676#define SAVE_LAST(c) \
12677 if (l < len && l < sizeof (last)) \
12678 last[l++] = c; \
12679 else \
12680 abort ();
252b5132 12681
d3ce72d0 12682 for (p = in_template; *p; p++)
252b5132
RH
12683 {
12684 switch (*p)
12685 {
12686 default:
12687 *obufp++ = *p;
12688 break;
98b528ac
L
12689 case '%':
12690 len++;
12691 break;
9d141669
L
12692 case '!':
12693 cond = 0;
12694 break;
6439fc28 12695 case '{':
6439fc28 12696 if (intel_syntax)
6439fc28
AM
12697 {
12698 while (*++p != '|')
7c52e0e8
L
12699 if (*p == '}' || *p == '\0')
12700 abort ();
6439fc28 12701 }
9306ca4a
JB
12702 /* Fall through. */
12703 case 'I':
12704 alt = 1;
12705 continue;
6439fc28
AM
12706 case '|':
12707 while (*++p != '}')
12708 {
12709 if (*p == '\0')
12710 abort ();
12711 }
12712 break;
12713 case '}':
12714 break;
252b5132 12715 case 'A':
db6eb5be
AM
12716 if (intel_syntax)
12717 break;
7967e09e 12718 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
252b5132
RH
12719 *obufp++ = 'b';
12720 break;
12721 case 'B':
4b06377f
L
12722 if (l == 0 && len == 1)
12723 {
12724case_B:
12725 if (intel_syntax)
12726 break;
12727 if (sizeflag & SUFFIX_ALWAYS)
12728 *obufp++ = 'b';
12729 }
12730 else
12731 {
12732 if (l != 1
12733 || len != 2
12734 || last[0] != 'L')
12735 {
12736 SAVE_LAST (*p);
12737 break;
12738 }
12739
12740 if (address_mode == mode_64bit
12741 && !(prefixes & PREFIX_ADDR))
12742 {
12743 *obufp++ = 'a';
12744 *obufp++ = 'b';
12745 *obufp++ = 's';
12746 }
12747
12748 goto case_B;
12749 }
252b5132 12750 break;
9306ca4a
JB
12751 case 'C':
12752 if (intel_syntax && !alt)
12753 break;
12754 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
12755 {
12756 if (sizeflag & DFLAG)
12757 *obufp++ = intel_syntax ? 'd' : 'l';
12758 else
12759 *obufp++ = intel_syntax ? 'w' : 's';
12760 used_prefixes |= (prefixes & PREFIX_DATA);
12761 }
12762 break;
ed7841b3
JB
12763 case 'D':
12764 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
12765 break;
161a04f6 12766 USED_REX (REX_W);
7967e09e 12767 if (modrm.mod == 3)
ed7841b3 12768 {
161a04f6 12769 if (rex & REX_W)
ed7841b3 12770 *obufp++ = 'q';
ed7841b3 12771 else
f16cd0d5
L
12772 {
12773 if (sizeflag & DFLAG)
12774 *obufp++ = intel_syntax ? 'd' : 'l';
12775 else
12776 *obufp++ = 'w';
12777 used_prefixes |= (prefixes & PREFIX_DATA);
12778 }
ed7841b3
JB
12779 }
12780 else
12781 *obufp++ = 'w';
12782 break;
252b5132 12783 case 'E': /* For jcxz/jecxz */
cb712a9e 12784 if (address_mode == mode_64bit)
c1a64871
JH
12785 {
12786 if (sizeflag & AFLAG)
12787 *obufp++ = 'r';
12788 else
12789 *obufp++ = 'e';
12790 }
12791 else
12792 if (sizeflag & AFLAG)
12793 *obufp++ = 'e';
3ffd33cf
AM
12794 used_prefixes |= (prefixes & PREFIX_ADDR);
12795 break;
12796 case 'F':
db6eb5be
AM
12797 if (intel_syntax)
12798 break;
e396998b 12799 if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
3ffd33cf
AM
12800 {
12801 if (sizeflag & AFLAG)
cb712a9e 12802 *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
3ffd33cf 12803 else
cb712a9e 12804 *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
3ffd33cf
AM
12805 used_prefixes |= (prefixes & PREFIX_ADDR);
12806 }
252b5132 12807 break;
52fd6d94
JB
12808 case 'G':
12809 if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
12810 break;
161a04f6 12811 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
12812 *obufp++ = 'l';
12813 else
12814 *obufp++ = 'w';
161a04f6 12815 if (!(rex & REX_W))
52fd6d94
JB
12816 used_prefixes |= (prefixes & PREFIX_DATA);
12817 break;
5dd0794d 12818 case 'H':
db6eb5be
AM
12819 if (intel_syntax)
12820 break;
5dd0794d
AM
12821 if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
12822 || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
12823 {
12824 used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
12825 *obufp++ = ',';
12826 *obufp++ = 'p';
12827 if (prefixes & PREFIX_DS)
12828 *obufp++ = 't';
12829 else
12830 *obufp++ = 'n';
12831 }
12832 break;
9306ca4a
JB
12833 case 'J':
12834 if (intel_syntax)
12835 break;
12836 *obufp++ = 'l';
12837 break;
42903f7f
L
12838 case 'K':
12839 USED_REX (REX_W);
12840 if (rex & REX_W)
12841 *obufp++ = 'q';
12842 else
12843 *obufp++ = 'd';
12844 break;
6dd5059a 12845 case 'Z':
04d824a4
JB
12846 if (l != 0 || len != 1)
12847 {
12848 if (l != 1 || len != 2 || last[0] != 'X')
12849 {
12850 SAVE_LAST (*p);
12851 break;
12852 }
12853 if (!need_vex || !vex.evex)
12854 abort ();
12855 if (intel_syntax
12856 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
12857 break;
12858 switch (vex.length)
12859 {
12860 case 128:
12861 *obufp++ = 'x';
12862 break;
12863 case 256:
12864 *obufp++ = 'y';
12865 break;
12866 case 512:
12867 *obufp++ = 'z';
12868 break;
12869 default:
12870 abort ();
12871 }
12872 break;
12873 }
6dd5059a
L
12874 if (intel_syntax)
12875 break;
12876 if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
12877 {
12878 *obufp++ = 'q';
12879 break;
12880 }
12881 /* Fall through. */
98b528ac 12882 goto case_L;
252b5132 12883 case 'L':
98b528ac
L
12884 if (l != 0 || len != 1)
12885 {
12886 SAVE_LAST (*p);
12887 break;
12888 }
12889case_L:
db6eb5be
AM
12890 if (intel_syntax)
12891 break;
252b5132
RH
12892 if (sizeflag & SUFFIX_ALWAYS)
12893 *obufp++ = 'l';
252b5132 12894 break;
9d141669
L
12895 case 'M':
12896 if (intel_mnemonic != cond)
12897 *obufp++ = 'r';
12898 break;
252b5132
RH
12899 case 'N':
12900 if ((prefixes & PREFIX_FWAIT) == 0)
12901 *obufp++ = 'n';
7d421014
ILT
12902 else
12903 used_prefixes |= PREFIX_FWAIT;
252b5132 12904 break;
52b15da3 12905 case 'O':
161a04f6
L
12906 USED_REX (REX_W);
12907 if (rex & REX_W)
6439fc28 12908 *obufp++ = 'o';
a35ca55a
JB
12909 else if (intel_syntax && (sizeflag & DFLAG))
12910 *obufp++ = 'q';
52b15da3
JH
12911 else
12912 *obufp++ = 'd';
161a04f6 12913 if (!(rex & REX_W))
a35ca55a 12914 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 12915 break;
07f5af7d
L
12916 case '&':
12917 if (!intel_syntax
12918 && address_mode == mode_64bit
12919 && isa64 == intel64)
12920 {
12921 *obufp++ = 'q';
12922 break;
12923 }
12924 /* Fall through. */
6439fc28 12925 case 'T':
d9e3625e
L
12926 if (!intel_syntax
12927 && address_mode == mode_64bit
7bb15c6f 12928 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28
AM
12929 {
12930 *obufp++ = 'q';
12931 break;
12932 }
6608db57 12933 /* Fall through. */
4b4c407a 12934 goto case_P;
252b5132 12935 case 'P':
4b4c407a 12936 if (l == 0 && len == 1)
d9e3625e 12937 {
4b4c407a
L
12938case_P:
12939 if (intel_syntax)
d9e3625e 12940 {
4b4c407a
L
12941 if ((rex & REX_W) == 0
12942 && (prefixes & PREFIX_DATA))
12943 {
12944 if ((sizeflag & DFLAG) == 0)
12945 *obufp++ = 'w';
12946 used_prefixes |= (prefixes & PREFIX_DATA);
12947 }
12948 break;
12949 }
12950 if ((prefixes & PREFIX_DATA)
12951 || (rex & REX_W)
12952 || (sizeflag & SUFFIX_ALWAYS))
12953 {
12954 USED_REX (REX_W);
12955 if (rex & REX_W)
12956 *obufp++ = 'q';
12957 else
12958 {
12959 if (sizeflag & DFLAG)
12960 *obufp++ = 'l';
12961 else
12962 *obufp++ = 'w';
12963 used_prefixes |= (prefixes & PREFIX_DATA);
12964 }
d9e3625e 12965 }
d9e3625e 12966 }
4b4c407a 12967 else
252b5132 12968 {
4b4c407a
L
12969 if (l != 1 || len != 2 || last[0] != 'L')
12970 {
12971 SAVE_LAST (*p);
12972 break;
12973 }
12974
12975 if ((prefixes & PREFIX_DATA)
12976 || (rex & REX_W)
12977 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 12978 {
4b4c407a
L
12979 USED_REX (REX_W);
12980 if (rex & REX_W)
12981 *obufp++ = 'q';
12982 else
12983 {
12984 if (sizeflag & DFLAG)
12985 *obufp++ = intel_syntax ? 'd' : 'l';
12986 else
12987 *obufp++ = 'w';
12988 used_prefixes |= (prefixes & PREFIX_DATA);
12989 }
52b15da3 12990 }
252b5132
RH
12991 }
12992 break;
6439fc28 12993 case 'U':
db6eb5be
AM
12994 if (intel_syntax)
12995 break;
7bb15c6f 12996 if (address_mode == mode_64bit
6c067bbb 12997 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28 12998 {
7967e09e 12999 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
1a114b12 13000 *obufp++ = 'q';
6439fc28
AM
13001 break;
13002 }
6608db57 13003 /* Fall through. */
98b528ac 13004 goto case_Q;
252b5132 13005 case 'Q':
98b528ac 13006 if (l == 0 && len == 1)
252b5132 13007 {
98b528ac
L
13008case_Q:
13009 if (intel_syntax && !alt)
13010 break;
13011 USED_REX (REX_W);
13012 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 13013 {
98b528ac
L
13014 if (rex & REX_W)
13015 *obufp++ = 'q';
52b15da3 13016 else
98b528ac
L
13017 {
13018 if (sizeflag & DFLAG)
13019 *obufp++ = intel_syntax ? 'd' : 'l';
13020 else
13021 *obufp++ = 'w';
f16cd0d5 13022 used_prefixes |= (prefixes & PREFIX_DATA);
98b528ac 13023 }
52b15da3 13024 }
98b528ac
L
13025 }
13026 else
13027 {
13028 if (l != 1 || len != 2 || last[0] != 'L')
13029 {
13030 SAVE_LAST (*p);
13031 break;
13032 }
13033 if (intel_syntax
13034 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
13035 break;
13036 if ((rex & REX_W))
13037 {
13038 USED_REX (REX_W);
13039 *obufp++ = 'q';
13040 }
13041 else
13042 *obufp++ = 'l';
252b5132
RH
13043 }
13044 break;
13045 case 'R':
161a04f6
L
13046 USED_REX (REX_W);
13047 if (rex & REX_W)
a35ca55a
JB
13048 *obufp++ = 'q';
13049 else if (sizeflag & DFLAG)
c608c12e 13050 {
a35ca55a 13051 if (intel_syntax)
c608c12e 13052 *obufp++ = 'd';
c608c12e 13053 else
a35ca55a 13054 *obufp++ = 'l';
c608c12e 13055 }
252b5132 13056 else
a35ca55a
JB
13057 *obufp++ = 'w';
13058 if (intel_syntax && !p[1]
161a04f6 13059 && ((rex & REX_W) || (sizeflag & DFLAG)))
a35ca55a 13060 *obufp++ = 'e';
161a04f6 13061 if (!(rex & REX_W))
52b15da3 13062 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132 13063 break;
1a114b12 13064 case 'V':
4b06377f 13065 if (l == 0 && len == 1)
1a114b12 13066 {
4b06377f
L
13067 if (intel_syntax)
13068 break;
7bb15c6f 13069 if (address_mode == mode_64bit
6c067bbb 13070 && ((sizeflag & DFLAG) || (rex & REX_W)))
4b06377f
L
13071 {
13072 if (sizeflag & SUFFIX_ALWAYS)
13073 *obufp++ = 'q';
13074 break;
13075 }
13076 }
13077 else
13078 {
13079 if (l != 1
13080 || len != 2
13081 || last[0] != 'L')
13082 {
13083 SAVE_LAST (*p);
13084 break;
13085 }
13086
13087 if (rex & REX_W)
13088 {
13089 *obufp++ = 'a';
13090 *obufp++ = 'b';
13091 *obufp++ = 's';
13092 }
1a114b12
JB
13093 }
13094 /* Fall through. */
4b06377f 13095 goto case_S;
252b5132 13096 case 'S':
4b06377f 13097 if (l == 0 && len == 1)
252b5132 13098 {
4b06377f
L
13099case_S:
13100 if (intel_syntax)
13101 break;
13102 if (sizeflag & SUFFIX_ALWAYS)
52b15da3 13103 {
4b06377f
L
13104 if (rex & REX_W)
13105 *obufp++ = 'q';
52b15da3 13106 else
4b06377f
L
13107 {
13108 if (sizeflag & DFLAG)
13109 *obufp++ = 'l';
13110 else
13111 *obufp++ = 'w';
13112 used_prefixes |= (prefixes & PREFIX_DATA);
13113 }
13114 }
13115 }
13116 else
13117 {
13118 if (l != 1
13119 || len != 2
13120 || last[0] != 'L')
13121 {
13122 SAVE_LAST (*p);
13123 break;
52b15da3 13124 }
4b06377f
L
13125
13126 if (address_mode == mode_64bit
13127 && !(prefixes & PREFIX_ADDR))
13128 {
13129 *obufp++ = 'a';
13130 *obufp++ = 'b';
13131 *obufp++ = 's';
13132 }
13133
13134 goto case_S;
252b5132 13135 }
252b5132 13136 break;
041bd2e0 13137 case 'X':
c0f3af97
L
13138 if (l != 0 || len != 1)
13139 {
13140 SAVE_LAST (*p);
13141 break;
13142 }
13143 if (need_vex && vex.prefix)
13144 {
13145 if (vex.prefix == DATA_PREFIX_OPCODE)
13146 *obufp++ = 'd';
13147 else
13148 *obufp++ = 's';
13149 }
041bd2e0 13150 else
f16cd0d5
L
13151 {
13152 if (prefixes & PREFIX_DATA)
13153 *obufp++ = 'd';
13154 else
13155 *obufp++ = 's';
13156 used_prefixes |= (prefixes & PREFIX_DATA);
13157 }
041bd2e0 13158 break;
76f227a5 13159 case 'Y':
c0f3af97 13160 if (l == 0 && len == 1)
9646c87b 13161 abort ();
c0f3af97
L
13162 else
13163 {
13164 if (l != 1 || len != 2 || last[0] != 'X')
13165 {
13166 SAVE_LAST (*p);
13167 break;
13168 }
13169 if (!need_vex)
13170 abort ();
13171 if (intel_syntax
04d824a4 13172 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
c0f3af97
L
13173 break;
13174 switch (vex.length)
13175 {
13176 case 128:
13177 *obufp++ = 'x';
13178 break;
13179 case 256:
13180 *obufp++ = 'y';
13181 break;
04d824a4
JB
13182 case 512:
13183 if (!vex.evex)
c0f3af97 13184 default:
04d824a4 13185 abort ();
c0f3af97 13186 }
76f227a5
JH
13187 }
13188 break;
252b5132 13189 case 'W':
0bfee649 13190 if (l == 0 && len == 1)
a35ca55a 13191 {
0bfee649
L
13192 /* operand size flag for cwtl, cbtw */
13193 USED_REX (REX_W);
13194 if (rex & REX_W)
13195 {
13196 if (intel_syntax)
13197 *obufp++ = 'd';
13198 else
13199 *obufp++ = 'l';
13200 }
13201 else if (sizeflag & DFLAG)
13202 *obufp++ = 'w';
a35ca55a 13203 else
0bfee649
L
13204 *obufp++ = 'b';
13205 if (!(rex & REX_W))
13206 used_prefixes |= (prefixes & PREFIX_DATA);
a35ca55a 13207 }
252b5132 13208 else
0bfee649 13209 {
6c30d220
L
13210 if (l != 1
13211 || len != 2
13212 || (last[0] != 'X'
13213 && last[0] != 'L'))
0bfee649
L
13214 {
13215 SAVE_LAST (*p);
13216 break;
13217 }
13218 if (!need_vex)
13219 abort ();
6c30d220
L
13220 if (last[0] == 'X')
13221 *obufp++ = vex.w ? 'd': 's';
13222 else
13223 *obufp++ = vex.w ? 'q': 'd';
0bfee649 13224 }
252b5132 13225 break;
a72d2af2
L
13226 case '^':
13227 if (intel_syntax)
13228 break;
13229 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
13230 {
13231 if (sizeflag & DFLAG)
13232 *obufp++ = 'l';
13233 else
13234 *obufp++ = 'w';
13235 used_prefixes |= (prefixes & PREFIX_DATA);
13236 }
13237 break;
5db04b09
L
13238 case '@':
13239 if (intel_syntax)
13240 break;
13241 if (address_mode == mode_64bit
13242 && (isa64 == intel64
13243 || ((sizeflag & DFLAG) || (rex & REX_W))))
13244 *obufp++ = 'q';
13245 else if ((prefixes & PREFIX_DATA))
13246 {
13247 if (!(sizeflag & DFLAG))
13248 *obufp++ = 'w';
13249 used_prefixes |= (prefixes & PREFIX_DATA);
13250 }
13251 break;
252b5132 13252 }
9306ca4a 13253 alt = 0;
252b5132
RH
13254 }
13255 *obufp = 0;
ea397f5b 13256 mnemonicendp = obufp;
6439fc28 13257 return 0;
252b5132
RH
13258}
13259
13260static void
26ca5450 13261oappend (const char *s)
252b5132 13262{
ea397f5b 13263 obufp = stpcpy (obufp, s);
252b5132
RH
13264}
13265
13266static void
26ca5450 13267append_seg (void)
252b5132 13268{
285ca992
L
13269 /* Only print the active segment register. */
13270 if (!active_seg_prefix)
13271 return;
13272
13273 used_prefixes |= active_seg_prefix;
13274 switch (active_seg_prefix)
7d421014 13275 {
285ca992 13276 case PREFIX_CS:
9ce09ba2 13277 oappend_maybe_intel ("%cs:");
285ca992
L
13278 break;
13279 case PREFIX_DS:
9ce09ba2 13280 oappend_maybe_intel ("%ds:");
285ca992
L
13281 break;
13282 case PREFIX_SS:
9ce09ba2 13283 oappend_maybe_intel ("%ss:");
285ca992
L
13284 break;
13285 case PREFIX_ES:
9ce09ba2 13286 oappend_maybe_intel ("%es:");
285ca992
L
13287 break;
13288 case PREFIX_FS:
9ce09ba2 13289 oappend_maybe_intel ("%fs:");
285ca992
L
13290 break;
13291 case PREFIX_GS:
9ce09ba2 13292 oappend_maybe_intel ("%gs:");
285ca992
L
13293 break;
13294 default:
13295 break;
7d421014 13296 }
252b5132
RH
13297}
13298
13299static void
26ca5450 13300OP_indirE (int bytemode, int sizeflag)
252b5132
RH
13301{
13302 if (!intel_syntax)
13303 oappend ("*");
13304 OP_E (bytemode, sizeflag);
13305}
13306
52b15da3 13307static void
26ca5450 13308print_operand_value (char *buf, int hex, bfd_vma disp)
52b15da3 13309{
cb712a9e 13310 if (address_mode == mode_64bit)
52b15da3
JH
13311 {
13312 if (hex)
13313 {
13314 char tmp[30];
13315 int i;
13316 buf[0] = '0';
13317 buf[1] = 'x';
13318 sprintf_vma (tmp, disp);
6608db57 13319 for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
52b15da3
JH
13320 strcpy (buf + 2, tmp + i);
13321 }
13322 else
13323 {
13324 bfd_signed_vma v = disp;
13325 char tmp[30];
13326 int i;
13327 if (v < 0)
13328 {
13329 *(buf++) = '-';
13330 v = -disp;
6608db57 13331 /* Check for possible overflow on 0x8000000000000000. */
52b15da3
JH
13332 if (v < 0)
13333 {
13334 strcpy (buf, "9223372036854775808");
13335 return;
13336 }
13337 }
13338 if (!v)
13339 {
13340 strcpy (buf, "0");
13341 return;
13342 }
13343
13344 i = 0;
13345 tmp[29] = 0;
13346 while (v)
13347 {
6608db57 13348 tmp[28 - i] = (v % 10) + '0';
52b15da3
JH
13349 v /= 10;
13350 i++;
13351 }
13352 strcpy (buf, tmp + 29 - i);
13353 }
13354 }
13355 else
13356 {
13357 if (hex)
13358 sprintf (buf, "0x%x", (unsigned int) disp);
13359 else
13360 sprintf (buf, "%d", (int) disp);
13361 }
13362}
13363
5d669648
L
13364/* Put DISP in BUF as signed hex number. */
13365
13366static void
13367print_displacement (char *buf, bfd_vma disp)
13368{
13369 bfd_signed_vma val = disp;
13370 char tmp[30];
13371 int i, j = 0;
13372
13373 if (val < 0)
13374 {
13375 buf[j++] = '-';
13376 val = -disp;
13377
13378 /* Check for possible overflow. */
13379 if (val < 0)
13380 {
13381 switch (address_mode)
13382 {
13383 case mode_64bit:
13384 strcpy (buf + j, "0x8000000000000000");
13385 break;
13386 case mode_32bit:
13387 strcpy (buf + j, "0x80000000");
13388 break;
13389 case mode_16bit:
13390 strcpy (buf + j, "0x8000");
13391 break;
13392 }
13393 return;
13394 }
13395 }
13396
13397 buf[j++] = '0';
13398 buf[j++] = 'x';
13399
0af1713e 13400 sprintf_vma (tmp, (bfd_vma) val);
5d669648
L
13401 for (i = 0; tmp[i] == '0'; i++)
13402 continue;
13403 if (tmp[i] == '\0')
13404 i--;
13405 strcpy (buf + j, tmp + i);
13406}
13407
3f31e633
JB
13408static void
13409intel_operand_size (int bytemode, int sizeflag)
13410{
43234a1e
L
13411 if (vex.evex
13412 && vex.b
13413 && (bytemode == x_mode
13414 || bytemode == evex_half_bcst_xmmq_mode))
13415 {
13416 if (vex.w)
13417 oappend ("QWORD PTR ");
13418 else
13419 oappend ("DWORD PTR ");
13420 return;
13421 }
3f31e633
JB
13422 switch (bytemode)
13423 {
13424 case b_mode:
b6169b20 13425 case b_swap_mode:
42903f7f 13426 case dqb_mode:
1ba585e8 13427 case db_mode:
3f31e633
JB
13428 oappend ("BYTE PTR ");
13429 break;
13430 case w_mode:
1ba585e8 13431 case dw_mode:
3f31e633
JB
13432 case dqw_mode:
13433 oappend ("WORD PTR ");
13434 break;
07f5af7d
L
13435 case indir_v_mode:
13436 if (address_mode == mode_64bit && isa64 == intel64)
13437 {
13438 oappend ("QWORD PTR ");
13439 break;
13440 }
1a0670f3 13441 /* Fall through. */
1a114b12 13442 case stack_v_mode:
7bb15c6f 13443 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
3f31e633
JB
13444 {
13445 oappend ("QWORD PTR ");
3f31e633
JB
13446 break;
13447 }
1a0670f3 13448 /* Fall through. */
3f31e633 13449 case v_mode:
b6169b20 13450 case v_swap_mode:
3f31e633 13451 case dq_mode:
161a04f6
L
13452 USED_REX (REX_W);
13453 if (rex & REX_W)
3f31e633 13454 oappend ("QWORD PTR ");
3f31e633 13455 else
f16cd0d5
L
13456 {
13457 if ((sizeflag & DFLAG) || bytemode == dq_mode)
13458 oappend ("DWORD PTR ");
13459 else
13460 oappend ("WORD PTR ");
13461 used_prefixes |= (prefixes & PREFIX_DATA);
13462 }
3f31e633 13463 break;
52fd6d94 13464 case z_mode:
161a04f6 13465 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
13466 *obufp++ = 'D';
13467 oappend ("WORD PTR ");
161a04f6 13468 if (!(rex & REX_W))
52fd6d94
JB
13469 used_prefixes |= (prefixes & PREFIX_DATA);
13470 break;
34b772a6
JB
13471 case a_mode:
13472 if (sizeflag & DFLAG)
13473 oappend ("QWORD PTR ");
13474 else
13475 oappend ("DWORD PTR ");
13476 used_prefixes |= (prefixes & PREFIX_DATA);
13477 break;
3f31e633 13478 case d_mode:
539f890d
L
13479 case d_scalar_mode:
13480 case d_scalar_swap_mode:
fa99fab2 13481 case d_swap_mode:
42903f7f 13482 case dqd_mode:
3f31e633
JB
13483 oappend ("DWORD PTR ");
13484 break;
13485 case q_mode:
539f890d
L
13486 case q_scalar_mode:
13487 case q_scalar_swap_mode:
b6169b20 13488 case q_swap_mode:
3f31e633
JB
13489 oappend ("QWORD PTR ");
13490 break;
13491 case m_mode:
cb712a9e 13492 if (address_mode == mode_64bit)
3f31e633
JB
13493 oappend ("QWORD PTR ");
13494 else
13495 oappend ("DWORD PTR ");
13496 break;
13497 case f_mode:
13498 if (sizeflag & DFLAG)
13499 oappend ("FWORD PTR ");
13500 else
13501 oappend ("DWORD PTR ");
13502 used_prefixes |= (prefixes & PREFIX_DATA);
13503 break;
13504 case t_mode:
13505 oappend ("TBYTE PTR ");
13506 break;
13507 case x_mode:
b6169b20 13508 case x_swap_mode:
43234a1e
L
13509 case evex_x_gscat_mode:
13510 case evex_x_nobcst_mode:
53467f57
IT
13511 case b_scalar_mode:
13512 case w_scalar_mode:
c0f3af97
L
13513 if (need_vex)
13514 {
13515 switch (vex.length)
13516 {
13517 case 128:
13518 oappend ("XMMWORD PTR ");
13519 break;
13520 case 256:
13521 oappend ("YMMWORD PTR ");
13522 break;
43234a1e
L
13523 case 512:
13524 oappend ("ZMMWORD PTR ");
13525 break;
c0f3af97
L
13526 default:
13527 abort ();
13528 }
13529 }
13530 else
13531 oappend ("XMMWORD PTR ");
13532 break;
13533 case xmm_mode:
3f31e633
JB
13534 oappend ("XMMWORD PTR ");
13535 break;
43234a1e
L
13536 case ymm_mode:
13537 oappend ("YMMWORD PTR ");
13538 break;
c0f3af97 13539 case xmmq_mode:
43234a1e 13540 case evex_half_bcst_xmmq_mode:
c0f3af97
L
13541 if (!need_vex)
13542 abort ();
13543
13544 switch (vex.length)
13545 {
13546 case 128:
13547 oappend ("QWORD PTR ");
13548 break;
13549 case 256:
13550 oappend ("XMMWORD PTR ");
13551 break;
43234a1e
L
13552 case 512:
13553 oappend ("YMMWORD PTR ");
13554 break;
c0f3af97
L
13555 default:
13556 abort ();
13557 }
13558 break;
6c30d220
L
13559 case xmm_mb_mode:
13560 if (!need_vex)
13561 abort ();
13562
13563 switch (vex.length)
13564 {
13565 case 128:
13566 case 256:
43234a1e 13567 case 512:
6c30d220
L
13568 oappend ("BYTE PTR ");
13569 break;
13570 default:
13571 abort ();
13572 }
13573 break;
13574 case xmm_mw_mode:
13575 if (!need_vex)
13576 abort ();
13577
13578 switch (vex.length)
13579 {
13580 case 128:
13581 case 256:
43234a1e 13582 case 512:
6c30d220
L
13583 oappend ("WORD PTR ");
13584 break;
13585 default:
13586 abort ();
13587 }
13588 break;
13589 case xmm_md_mode:
13590 if (!need_vex)
13591 abort ();
13592
13593 switch (vex.length)
13594 {
13595 case 128:
13596 case 256:
43234a1e 13597 case 512:
6c30d220
L
13598 oappend ("DWORD PTR ");
13599 break;
13600 default:
13601 abort ();
13602 }
13603 break;
13604 case xmm_mq_mode:
13605 if (!need_vex)
13606 abort ();
13607
13608 switch (vex.length)
13609 {
13610 case 128:
13611 case 256:
43234a1e 13612 case 512:
6c30d220
L
13613 oappend ("QWORD PTR ");
13614 break;
13615 default:
13616 abort ();
13617 }
13618 break;
13619 case xmmdw_mode:
13620 if (!need_vex)
13621 abort ();
13622
13623 switch (vex.length)
13624 {
13625 case 128:
13626 oappend ("WORD PTR ");
13627 break;
13628 case 256:
13629 oappend ("DWORD PTR ");
13630 break;
43234a1e
L
13631 case 512:
13632 oappend ("QWORD PTR ");
13633 break;
6c30d220
L
13634 default:
13635 abort ();
13636 }
13637 break;
13638 case xmmqd_mode:
13639 if (!need_vex)
13640 abort ();
13641
13642 switch (vex.length)
13643 {
13644 case 128:
13645 oappend ("DWORD PTR ");
13646 break;
13647 case 256:
13648 oappend ("QWORD PTR ");
13649 break;
43234a1e
L
13650 case 512:
13651 oappend ("XMMWORD PTR ");
13652 break;
6c30d220
L
13653 default:
13654 abort ();
13655 }
13656 break;
c0f3af97
L
13657 case ymmq_mode:
13658 if (!need_vex)
13659 abort ();
13660
13661 switch (vex.length)
13662 {
13663 case 128:
13664 oappend ("QWORD PTR ");
13665 break;
13666 case 256:
13667 oappend ("YMMWORD PTR ");
13668 break;
43234a1e
L
13669 case 512:
13670 oappend ("ZMMWORD PTR ");
13671 break;
c0f3af97
L
13672 default:
13673 abort ();
13674 }
13675 break;
6c30d220
L
13676 case ymmxmm_mode:
13677 if (!need_vex)
13678 abort ();
13679
13680 switch (vex.length)
13681 {
13682 case 128:
13683 case 256:
13684 oappend ("XMMWORD PTR ");
13685 break;
13686 default:
13687 abort ();
13688 }
13689 break;
fb9c77c7
L
13690 case o_mode:
13691 oappend ("OWORD PTR ");
13692 break;
43234a1e 13693 case xmm_mdq_mode:
0bfee649 13694 case vex_w_dq_mode:
1c480963 13695 case vex_scalar_w_dq_mode:
0bfee649
L
13696 if (!need_vex)
13697 abort ();
13698
13699 if (vex.w)
13700 oappend ("QWORD PTR ");
13701 else
13702 oappend ("DWORD PTR ");
13703 break;
43234a1e
L
13704 case vex_vsib_d_w_dq_mode:
13705 case vex_vsib_q_w_dq_mode:
13706 if (!need_vex)
13707 abort ();
13708
13709 if (!vex.evex)
13710 {
13711 if (vex.w)
13712 oappend ("QWORD PTR ");
13713 else
13714 oappend ("DWORD PTR ");
13715 }
13716 else
13717 {
b28d1bda
IT
13718 switch (vex.length)
13719 {
13720 case 128:
13721 oappend ("XMMWORD PTR ");
13722 break;
13723 case 256:
13724 oappend ("YMMWORD PTR ");
13725 break;
13726 case 512:
13727 oappend ("ZMMWORD PTR ");
13728 break;
13729 default:
13730 abort ();
13731 }
43234a1e
L
13732 }
13733 break;
5fc35d96
IT
13734 case vex_vsib_q_w_d_mode:
13735 case vex_vsib_d_w_d_mode:
b28d1bda 13736 if (!need_vex || !vex.evex)
5fc35d96
IT
13737 abort ();
13738
b28d1bda
IT
13739 switch (vex.length)
13740 {
13741 case 128:
13742 oappend ("QWORD PTR ");
13743 break;
13744 case 256:
13745 oappend ("XMMWORD PTR ");
13746 break;
13747 case 512:
13748 oappend ("YMMWORD PTR ");
13749 break;
13750 default:
13751 abort ();
13752 }
5fc35d96
IT
13753
13754 break;
1ba585e8
IT
13755 case mask_bd_mode:
13756 if (!need_vex || vex.length != 128)
13757 abort ();
13758 if (vex.w)
13759 oappend ("DWORD PTR ");
13760 else
13761 oappend ("BYTE PTR ");
13762 break;
43234a1e
L
13763 case mask_mode:
13764 if (!need_vex)
13765 abort ();
1ba585e8
IT
13766 if (vex.w)
13767 oappend ("QWORD PTR ");
13768 else
13769 oappend ("WORD PTR ");
43234a1e 13770 break;
6c75cc62 13771 case v_bnd_mode:
d276ec69 13772 case v_bndmk_mode:
3f31e633
JB
13773 default:
13774 break;
13775 }
13776}
13777
252b5132 13778static void
c0f3af97 13779OP_E_register (int bytemode, int sizeflag)
252b5132 13780{
c0f3af97
L
13781 int reg = modrm.rm;
13782 const char **names;
252b5132 13783
c0f3af97
L
13784 USED_REX (REX_B);
13785 if ((rex & REX_B))
13786 reg += 8;
252b5132 13787
b6169b20 13788 if ((sizeflag & SUFFIX_ALWAYS)
1ba585e8 13789 && (bytemode == b_swap_mode
9f79e886 13790 || bytemode == bnd_swap_mode
60227d64 13791 || bytemode == v_swap_mode))
b6169b20
L
13792 swap_operand ();
13793
c0f3af97 13794 switch (bytemode)
252b5132 13795 {
c0f3af97 13796 case b_mode:
b6169b20 13797 case b_swap_mode:
c0f3af97
L
13798 USED_REX (0);
13799 if (rex)
13800 names = names8rex;
13801 else
13802 names = names8;
13803 break;
13804 case w_mode:
13805 names = names16;
13806 break;
13807 case d_mode:
1ba585e8
IT
13808 case dw_mode:
13809 case db_mode:
c0f3af97
L
13810 names = names32;
13811 break;
13812 case q_mode:
13813 names = names64;
13814 break;
13815 case m_mode:
6c75cc62 13816 case v_bnd_mode:
c0f3af97
L
13817 names = address_mode == mode_64bit ? names64 : names32;
13818 break;
7e8b059b 13819 case bnd_mode:
9f79e886 13820 case bnd_swap_mode:
0d96e4df
L
13821 if (reg > 0x3)
13822 {
13823 oappend ("(bad)");
13824 return;
13825 }
7e8b059b
L
13826 names = names_bnd;
13827 break;
07f5af7d
L
13828 case indir_v_mode:
13829 if (address_mode == mode_64bit && isa64 == intel64)
13830 {
13831 names = names64;
13832 break;
13833 }
1a0670f3 13834 /* Fall through. */
c0f3af97 13835 case stack_v_mode:
7bb15c6f 13836 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
252b5132 13837 {
c0f3af97 13838 names = names64;
252b5132 13839 break;
252b5132 13840 }
c0f3af97 13841 bytemode = v_mode;
1a0670f3 13842 /* Fall through. */
c0f3af97 13843 case v_mode:
b6169b20 13844 case v_swap_mode:
c0f3af97
L
13845 case dq_mode:
13846 case dqb_mode:
13847 case dqd_mode:
13848 case dqw_mode:
13849 USED_REX (REX_W);
13850 if (rex & REX_W)
13851 names = names64;
c0f3af97 13852 else
f16cd0d5 13853 {
7bb15c6f 13854 if ((sizeflag & DFLAG)
f16cd0d5
L
13855 || (bytemode != v_mode
13856 && bytemode != v_swap_mode))
13857 names = names32;
13858 else
13859 names = names16;
13860 used_prefixes |= (prefixes & PREFIX_DATA);
13861 }
c0f3af97 13862 break;
de89d0a3
IT
13863 case va_mode:
13864 names = (address_mode == mode_64bit
13865 ? names64 : names32);
13866 if (!(prefixes & PREFIX_ADDR))
aa178437
IT
13867 names = (address_mode == mode_16bit
13868 ? names16 : names);
de89d0a3
IT
13869 else
13870 {
13871 /* Remove "addr16/addr32". */
13872 all_prefixes[last_addr_prefix] = 0;
13873 names = (address_mode != mode_32bit
13874 ? names32 : names16);
13875 used_prefixes |= PREFIX_ADDR;
13876 }
13877 break;
1ba585e8 13878 case mask_bd_mode:
43234a1e 13879 case mask_mode:
9889cbb1
L
13880 if (reg > 0x7)
13881 {
13882 oappend ("(bad)");
13883 return;
13884 }
43234a1e
L
13885 names = names_mask;
13886 break;
c0f3af97
L
13887 case 0:
13888 return;
13889 default:
13890 oappend (INTERNAL_DISASSEMBLER_ERROR);
252b5132
RH
13891 return;
13892 }
c0f3af97
L
13893 oappend (names[reg]);
13894}
13895
13896static void
c1e679ec 13897OP_E_memory (int bytemode, int sizeflag)
c0f3af97
L
13898{
13899 bfd_vma disp = 0;
13900 int add = (rex & REX_B) ? 8 : 0;
13901 int riprel = 0;
43234a1e
L
13902 int shift;
13903
13904 if (vex.evex)
13905 {
13906 /* In EVEX, if operand doesn't allow broadcast, vex.b should be 0. */
13907 if (vex.b
13908 && bytemode != x_mode
90a915bf 13909 && bytemode != xmmq_mode
43234a1e
L
13910 && bytemode != evex_half_bcst_xmmq_mode)
13911 {
13912 BadOp ();
13913 return;
13914 }
13915 switch (bytemode)
13916 {
1ba585e8
IT
13917 case dqw_mode:
13918 case dw_mode:
1ba585e8
IT
13919 shift = 1;
13920 break;
13921 case dqb_mode:
13922 case db_mode:
13923 shift = 0;
13924 break;
b50c9f31
JB
13925 case dq_mode:
13926 if (address_mode != mode_64bit)
13927 {
13928 shift = 2;
13929 break;
13930 }
13931 /* fall through */
43234a1e 13932 case vex_vsib_d_w_dq_mode:
5fc35d96 13933 case vex_vsib_d_w_d_mode:
eaa9d1ad 13934 case vex_vsib_q_w_dq_mode:
5fc35d96 13935 case vex_vsib_q_w_d_mode:
43234a1e
L
13936 case evex_x_gscat_mode:
13937 case xmm_mdq_mode:
13938 shift = vex.w ? 3 : 2;
13939 break;
43234a1e
L
13940 case x_mode:
13941 case evex_half_bcst_xmmq_mode:
90a915bf 13942 case xmmq_mode:
43234a1e
L
13943 if (vex.b)
13944 {
13945 shift = vex.w ? 3 : 2;
13946 break;
13947 }
1a0670f3 13948 /* Fall through. */
43234a1e
L
13949 case xmmqd_mode:
13950 case xmmdw_mode:
43234a1e
L
13951 case ymmq_mode:
13952 case evex_x_nobcst_mode:
13953 case x_swap_mode:
13954 switch (vex.length)
13955 {
13956 case 128:
13957 shift = 4;
13958 break;
13959 case 256:
13960 shift = 5;
13961 break;
13962 case 512:
13963 shift = 6;
13964 break;
13965 default:
13966 abort ();
13967 }
13968 break;
13969 case ymm_mode:
13970 shift = 5;
13971 break;
13972 case xmm_mode:
13973 shift = 4;
13974 break;
13975 case xmm_mq_mode:
13976 case q_mode:
13977 case q_scalar_mode:
13978 case q_swap_mode:
13979 case q_scalar_swap_mode:
13980 shift = 3;
13981 break;
13982 case dqd_mode:
13983 case xmm_md_mode:
13984 case d_mode:
13985 case d_scalar_mode:
13986 case d_swap_mode:
13987 case d_scalar_swap_mode:
13988 shift = 2;
13989 break;
5074ad8a 13990 case w_scalar_mode:
43234a1e
L
13991 case xmm_mw_mode:
13992 shift = 1;
13993 break;
5074ad8a 13994 case b_scalar_mode:
43234a1e
L
13995 case xmm_mb_mode:
13996 shift = 0;
13997 break;
13998 default:
13999 abort ();
14000 }
14001 /* Make necessary corrections to shift for modes that need it.
14002 For these modes we currently have shift 4, 5 or 6 depending on
14003 vex.length (it corresponds to xmmword, ymmword or zmmword
14004 operand). We might want to make it 3, 4 or 5 (e.g. for
14005 xmmq_mode). In case of broadcast enabled the corrections
14006 aren't needed, as element size is always 32 or 64 bits. */
90a915bf
IT
14007 if (!vex.b
14008 && (bytemode == xmmq_mode
14009 || bytemode == evex_half_bcst_xmmq_mode))
43234a1e
L
14010 shift -= 1;
14011 else if (bytemode == xmmqd_mode)
14012 shift -= 2;
14013 else if (bytemode == xmmdw_mode)
14014 shift -= 3;
b28d1bda
IT
14015 else if (bytemode == ymmq_mode && vex.length == 128)
14016 shift -= 1;
43234a1e
L
14017 }
14018 else
14019 shift = 0;
252b5132 14020
c0f3af97 14021 USED_REX (REX_B);
3f31e633
JB
14022 if (intel_syntax)
14023 intel_operand_size (bytemode, sizeflag);
252b5132
RH
14024 append_seg ();
14025
5d669648 14026 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132 14027 {
5d669648
L
14028 /* 32/64 bit address mode */
14029 int havedisp;
252b5132
RH
14030 int havesib;
14031 int havebase;
0f7da397 14032 int haveindex;
20afcfb7 14033 int needindex;
1bc60e56 14034 int needaddr32;
82c18208 14035 int base, rbase;
91d6fa6a 14036 int vindex = 0;
252b5132 14037 int scale = 0;
7e8b059b
L
14038 int addr32flag = !((sizeflag & AFLAG)
14039 || bytemode == v_bnd_mode
d276ec69 14040 || bytemode == v_bndmk_mode
9f79e886
JB
14041 || bytemode == bnd_mode
14042 || bytemode == bnd_swap_mode);
6c30d220
L
14043 const char **indexes64 = names64;
14044 const char **indexes32 = names32;
252b5132
RH
14045
14046 havesib = 0;
14047 havebase = 1;
0f7da397 14048 haveindex = 0;
7967e09e 14049 base = modrm.rm;
252b5132
RH
14050
14051 if (base == 4)
14052 {
14053 havesib = 1;
dfc8cf43 14054 vindex = sib.index;
161a04f6
L
14055 USED_REX (REX_X);
14056 if (rex & REX_X)
91d6fa6a 14057 vindex += 8;
6c30d220
L
14058 switch (bytemode)
14059 {
14060 case vex_vsib_d_w_dq_mode:
5fc35d96 14061 case vex_vsib_d_w_d_mode:
6c30d220 14062 case vex_vsib_q_w_dq_mode:
5fc35d96 14063 case vex_vsib_q_w_d_mode:
6c30d220
L
14064 if (!need_vex)
14065 abort ();
43234a1e
L
14066 if (vex.evex)
14067 {
14068 if (!vex.v)
14069 vindex += 16;
14070 }
6c30d220
L
14071
14072 haveindex = 1;
14073 switch (vex.length)
14074 {
14075 case 128:
7bb15c6f 14076 indexes64 = indexes32 = names_xmm;
6c30d220
L
14077 break;
14078 case 256:
5fc35d96
IT
14079 if (!vex.w
14080 || bytemode == vex_vsib_q_w_dq_mode
14081 || bytemode == vex_vsib_q_w_d_mode)
7bb15c6f 14082 indexes64 = indexes32 = names_ymm;
6c30d220 14083 else
7bb15c6f 14084 indexes64 = indexes32 = names_xmm;
6c30d220 14085 break;
43234a1e 14086 case 512:
5fc35d96
IT
14087 if (!vex.w
14088 || bytemode == vex_vsib_q_w_dq_mode
14089 || bytemode == vex_vsib_q_w_d_mode)
43234a1e
L
14090 indexes64 = indexes32 = names_zmm;
14091 else
14092 indexes64 = indexes32 = names_ymm;
14093 break;
6c30d220
L
14094 default:
14095 abort ();
14096 }
14097 break;
14098 default:
14099 haveindex = vindex != 4;
14100 break;
14101 }
14102 scale = sib.scale;
14103 base = sib.base;
252b5132
RH
14104 codep++;
14105 }
82c18208 14106 rbase = base + add;
252b5132 14107
7967e09e 14108 switch (modrm.mod)
252b5132
RH
14109 {
14110 case 0:
82c18208 14111 if (base == 5)
252b5132
RH
14112 {
14113 havebase = 0;
cb712a9e 14114 if (address_mode == mode_64bit && !havesib)
52b15da3
JH
14115 riprel = 1;
14116 disp = get32s ();
d276ec69
JB
14117 if (riprel && bytemode == v_bndmk_mode)
14118 {
14119 oappend ("(bad)");
14120 return;
14121 }
252b5132
RH
14122 }
14123 break;
14124 case 1:
14125 FETCH_DATA (the_info, codep + 1);
14126 disp = *codep++;
14127 if ((disp & 0x80) != 0)
14128 disp -= 0x100;
43234a1e
L
14129 if (vex.evex && shift > 0)
14130 disp <<= shift;
252b5132
RH
14131 break;
14132 case 2:
52b15da3 14133 disp = get32s ();
252b5132
RH
14134 break;
14135 }
14136
1bc60e56
L
14137 needindex = 0;
14138 needaddr32 = 0;
14139 if (havesib
14140 && !havebase
14141 && !haveindex
14142 && address_mode != mode_16bit)
14143 {
14144 if (address_mode == mode_64bit)
14145 {
14146 /* Display eiz instead of addr32. */
14147 needindex = addr32flag;
14148 needaddr32 = 1;
14149 }
14150 else
14151 {
14152 /* In 32-bit mode, we need index register to tell [offset]
14153 from [eiz*1 + offset]. */
14154 needindex = 1;
14155 }
14156 }
14157
20afcfb7
L
14158 havedisp = (havebase
14159 || needindex
14160 || (havesib && (haveindex || scale != 0)));
5d669648 14161
252b5132 14162 if (!intel_syntax)
82c18208 14163 if (modrm.mod != 0 || base == 5)
db6eb5be 14164 {
5d669648
L
14165 if (havedisp || riprel)
14166 print_displacement (scratchbuf, disp);
14167 else
14168 print_operand_value (scratchbuf, 1, disp);
db6eb5be 14169 oappend (scratchbuf);
52b15da3
JH
14170 if (riprel)
14171 {
14172 set_op (disp, 1);
28596323 14173 oappend (!addr32flag ? "(%rip)" : "(%eip)");
52b15da3 14174 }
db6eb5be 14175 }
2da11e11 14176
c1dc7af5 14177 if ((havebase || haveindex || needindex || needaddr32 || riprel)
7e8b059b 14178 && (bytemode != v_bnd_mode)
d276ec69 14179 && (bytemode != v_bndmk_mode)
9f79e886
JB
14180 && (bytemode != bnd_mode)
14181 && (bytemode != bnd_swap_mode))
87767711
JB
14182 used_prefixes |= PREFIX_ADDR;
14183
5d669648 14184 if (havedisp || (intel_syntax && riprel))
252b5132 14185 {
252b5132 14186 *obufp++ = open_char;
52b15da3 14187 if (intel_syntax && riprel)
185b1163
L
14188 {
14189 set_op (disp, 1);
28596323 14190 oappend (!addr32flag ? "rip" : "eip");
185b1163 14191 }
db6eb5be 14192 *obufp = '\0';
252b5132 14193 if (havebase)
7e8b059b 14194 oappend (address_mode == mode_64bit && !addr32flag
82c18208 14195 ? names64[rbase] : names32[rbase]);
252b5132
RH
14196 if (havesib)
14197 {
db51cc60
L
14198 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
14199 print index to tell base + index from base. */
14200 if (scale != 0
20afcfb7 14201 || needindex
db51cc60
L
14202 || haveindex
14203 || (havebase && base != ESP_REG_NUM))
252b5132 14204 {
9306ca4a 14205 if (!intel_syntax || havebase)
db6eb5be 14206 {
9306ca4a
JB
14207 *obufp++ = separator_char;
14208 *obufp = '\0';
db6eb5be 14209 }
db51cc60 14210 if (haveindex)
7e8b059b 14211 oappend (address_mode == mode_64bit && !addr32flag
6c30d220 14212 ? indexes64[vindex] : indexes32[vindex]);
db51cc60 14213 else
7e8b059b 14214 oappend (address_mode == mode_64bit && !addr32flag
db51cc60
L
14215 ? index64 : index32);
14216
db6eb5be
AM
14217 *obufp++ = scale_char;
14218 *obufp = '\0';
14219 sprintf (scratchbuf, "%d", 1 << scale);
14220 oappend (scratchbuf);
14221 }
252b5132 14222 }
185b1163 14223 if (intel_syntax
82c18208 14224 && (disp || modrm.mod != 0 || base == 5))
3d456fa1 14225 {
db51cc60 14226 if (!havedisp || (bfd_signed_vma) disp >= 0)
3d456fa1
JB
14227 {
14228 *obufp++ = '+';
14229 *obufp = '\0';
14230 }
05203043 14231 else if (modrm.mod != 1 && disp != -disp)
3d456fa1
JB
14232 {
14233 *obufp++ = '-';
14234 *obufp = '\0';
14235 disp = - (bfd_signed_vma) disp;
14236 }
14237
db51cc60
L
14238 if (havedisp)
14239 print_displacement (scratchbuf, disp);
14240 else
14241 print_operand_value (scratchbuf, 1, disp);
3d456fa1
JB
14242 oappend (scratchbuf);
14243 }
252b5132
RH
14244
14245 *obufp++ = close_char;
db6eb5be 14246 *obufp = '\0';
252b5132
RH
14247 }
14248 else if (intel_syntax)
db6eb5be 14249 {
82c18208 14250 if (modrm.mod != 0 || base == 5)
db6eb5be 14251 {
285ca992 14252 if (!active_seg_prefix)
252b5132 14253 {
d708bcba 14254 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
14255 oappend (":");
14256 }
52b15da3 14257 print_operand_value (scratchbuf, 1, disp);
db6eb5be
AM
14258 oappend (scratchbuf);
14259 }
14260 }
252b5132
RH
14261 }
14262 else
f16cd0d5
L
14263 {
14264 /* 16 bit address mode */
14265 used_prefixes |= prefixes & PREFIX_ADDR;
7967e09e 14266 switch (modrm.mod)
252b5132
RH
14267 {
14268 case 0:
7967e09e 14269 if (modrm.rm == 6)
252b5132
RH
14270 {
14271 disp = get16 ();
14272 if ((disp & 0x8000) != 0)
14273 disp -= 0x10000;
14274 }
14275 break;
14276 case 1:
14277 FETCH_DATA (the_info, codep + 1);
14278 disp = *codep++;
14279 if ((disp & 0x80) != 0)
14280 disp -= 0x100;
65f3ed04
JB
14281 if (vex.evex && shift > 0)
14282 disp <<= shift;
252b5132
RH
14283 break;
14284 case 2:
14285 disp = get16 ();
14286 if ((disp & 0x8000) != 0)
14287 disp -= 0x10000;
14288 break;
14289 }
14290
14291 if (!intel_syntax)
7967e09e 14292 if (modrm.mod != 0 || modrm.rm == 6)
db6eb5be 14293 {
5d669648 14294 print_displacement (scratchbuf, disp);
db6eb5be
AM
14295 oappend (scratchbuf);
14296 }
252b5132 14297
7967e09e 14298 if (modrm.mod != 0 || modrm.rm != 6)
252b5132
RH
14299 {
14300 *obufp++ = open_char;
db6eb5be 14301 *obufp = '\0';
7967e09e 14302 oappend (index16[modrm.rm]);
5d669648
L
14303 if (intel_syntax
14304 && (disp || modrm.mod != 0 || modrm.rm == 6))
3d456fa1 14305 {
5d669648 14306 if ((bfd_signed_vma) disp >= 0)
3d456fa1
JB
14307 {
14308 *obufp++ = '+';
14309 *obufp = '\0';
14310 }
7967e09e 14311 else if (modrm.mod != 1)
3d456fa1
JB
14312 {
14313 *obufp++ = '-';
14314 *obufp = '\0';
14315 disp = - (bfd_signed_vma) disp;
14316 }
14317
5d669648 14318 print_displacement (scratchbuf, disp);
3d456fa1
JB
14319 oappend (scratchbuf);
14320 }
14321
db6eb5be
AM
14322 *obufp++ = close_char;
14323 *obufp = '\0';
252b5132 14324 }
3d456fa1
JB
14325 else if (intel_syntax)
14326 {
285ca992 14327 if (!active_seg_prefix)
3d456fa1
JB
14328 {
14329 oappend (names_seg[ds_reg - es_reg]);
14330 oappend (":");
14331 }
14332 print_operand_value (scratchbuf, 1, disp & 0xffff);
14333 oappend (scratchbuf);
14334 }
252b5132 14335 }
43234a1e
L
14336 if (vex.evex && vex.b
14337 && (bytemode == x_mode
90a915bf 14338 || bytemode == xmmq_mode
43234a1e
L
14339 || bytemode == evex_half_bcst_xmmq_mode))
14340 {
90a915bf
IT
14341 if (vex.w
14342 || bytemode == xmmq_mode
14343 || bytemode == evex_half_bcst_xmmq_mode)
b28d1bda
IT
14344 {
14345 switch (vex.length)
14346 {
14347 case 128:
14348 oappend ("{1to2}");
14349 break;
14350 case 256:
14351 oappend ("{1to4}");
14352 break;
14353 case 512:
14354 oappend ("{1to8}");
14355 break;
14356 default:
14357 abort ();
14358 }
14359 }
43234a1e 14360 else
b28d1bda
IT
14361 {
14362 switch (vex.length)
14363 {
14364 case 128:
14365 oappend ("{1to4}");
14366 break;
14367 case 256:
14368 oappend ("{1to8}");
14369 break;
14370 case 512:
14371 oappend ("{1to16}");
14372 break;
14373 default:
14374 abort ();
14375 }
14376 }
43234a1e 14377 }
252b5132
RH
14378}
14379
c0f3af97 14380static void
8b3f93e7 14381OP_E (int bytemode, int sizeflag)
c0f3af97
L
14382{
14383 /* Skip mod/rm byte. */
14384 MODRM_CHECK;
14385 codep++;
14386
14387 if (modrm.mod == 3)
14388 OP_E_register (bytemode, sizeflag);
14389 else
c1e679ec 14390 OP_E_memory (bytemode, sizeflag);
c0f3af97
L
14391}
14392
252b5132 14393static void
26ca5450 14394OP_G (int bytemode, int sizeflag)
252b5132 14395{
52b15da3 14396 int add = 0;
c0a30a9f 14397 const char **names;
161a04f6
L
14398 USED_REX (REX_R);
14399 if (rex & REX_R)
52b15da3 14400 add += 8;
252b5132
RH
14401 switch (bytemode)
14402 {
14403 case b_mode:
52b15da3
JH
14404 USED_REX (0);
14405 if (rex)
7967e09e 14406 oappend (names8rex[modrm.reg + add]);
52b15da3 14407 else
7967e09e 14408 oappend (names8[modrm.reg + add]);
252b5132
RH
14409 break;
14410 case w_mode:
7967e09e 14411 oappend (names16[modrm.reg + add]);
252b5132
RH
14412 break;
14413 case d_mode:
1ba585e8
IT
14414 case db_mode:
14415 case dw_mode:
7967e09e 14416 oappend (names32[modrm.reg + add]);
52b15da3
JH
14417 break;
14418 case q_mode:
7967e09e 14419 oappend (names64[modrm.reg + add]);
252b5132 14420 break;
7e8b059b 14421 case bnd_mode:
0d96e4df
L
14422 if (modrm.reg > 0x3)
14423 {
14424 oappend ("(bad)");
14425 return;
14426 }
7e8b059b
L
14427 oappend (names_bnd[modrm.reg]);
14428 break;
252b5132 14429 case v_mode:
9306ca4a 14430 case dq_mode:
42903f7f
L
14431 case dqb_mode:
14432 case dqd_mode:
9306ca4a 14433 case dqw_mode:
161a04f6
L
14434 USED_REX (REX_W);
14435 if (rex & REX_W)
7967e09e 14436 oappend (names64[modrm.reg + add]);
252b5132 14437 else
f16cd0d5
L
14438 {
14439 if ((sizeflag & DFLAG) || bytemode != v_mode)
14440 oappend (names32[modrm.reg + add]);
14441 else
14442 oappend (names16[modrm.reg + add]);
14443 used_prefixes |= (prefixes & PREFIX_DATA);
14444 }
252b5132 14445 break;
c0a30a9f
L
14446 case va_mode:
14447 names = (address_mode == mode_64bit
14448 ? names64 : names32);
14449 if (!(prefixes & PREFIX_ADDR))
14450 {
14451 if (address_mode == mode_16bit)
14452 names = names16;
14453 }
14454 else
14455 {
14456 /* Remove "addr16/addr32". */
14457 all_prefixes[last_addr_prefix] = 0;
14458 names = (address_mode != mode_32bit
14459 ? names32 : names16);
14460 used_prefixes |= PREFIX_ADDR;
14461 }
14462 oappend (names[modrm.reg + add]);
14463 break;
90700ea2 14464 case m_mode:
cb712a9e 14465 if (address_mode == mode_64bit)
7967e09e 14466 oappend (names64[modrm.reg + add]);
90700ea2 14467 else
7967e09e 14468 oappend (names32[modrm.reg + add]);
90700ea2 14469 break;
1ba585e8 14470 case mask_bd_mode:
43234a1e 14471 case mask_mode:
9889cbb1
L
14472 if ((modrm.reg + add) > 0x7)
14473 {
14474 oappend ("(bad)");
14475 return;
14476 }
43234a1e
L
14477 oappend (names_mask[modrm.reg + add]);
14478 break;
252b5132
RH
14479 default:
14480 oappend (INTERNAL_DISASSEMBLER_ERROR);
14481 break;
14482 }
14483}
14484
52b15da3 14485static bfd_vma
26ca5450 14486get64 (void)
52b15da3 14487{
5dd0794d 14488 bfd_vma x;
52b15da3 14489#ifdef BFD64
5dd0794d
AM
14490 unsigned int a;
14491 unsigned int b;
14492
52b15da3
JH
14493 FETCH_DATA (the_info, codep + 8);
14494 a = *codep++ & 0xff;
14495 a |= (*codep++ & 0xff) << 8;
14496 a |= (*codep++ & 0xff) << 16;
070fe95d 14497 a |= (*codep++ & 0xffu) << 24;
5dd0794d 14498 b = *codep++ & 0xff;
52b15da3
JH
14499 b |= (*codep++ & 0xff) << 8;
14500 b |= (*codep++ & 0xff) << 16;
070fe95d 14501 b |= (*codep++ & 0xffu) << 24;
52b15da3
JH
14502 x = a + ((bfd_vma) b << 32);
14503#else
6608db57 14504 abort ();
5dd0794d 14505 x = 0;
52b15da3
JH
14506#endif
14507 return x;
14508}
14509
14510static bfd_signed_vma
26ca5450 14511get32 (void)
252b5132 14512{
52b15da3 14513 bfd_signed_vma x = 0;
252b5132
RH
14514
14515 FETCH_DATA (the_info, codep + 4);
52b15da3
JH
14516 x = *codep++ & (bfd_signed_vma) 0xff;
14517 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14518 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14519 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14520 return x;
14521}
14522
14523static bfd_signed_vma
26ca5450 14524get32s (void)
52b15da3
JH
14525{
14526 bfd_signed_vma x = 0;
14527
14528 FETCH_DATA (the_info, codep + 4);
14529 x = *codep++ & (bfd_signed_vma) 0xff;
14530 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14531 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14532 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14533
14534 x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
14535
252b5132
RH
14536 return x;
14537}
14538
14539static int
26ca5450 14540get16 (void)
252b5132
RH
14541{
14542 int x = 0;
14543
14544 FETCH_DATA (the_info, codep + 2);
14545 x = *codep++ & 0xff;
14546 x |= (*codep++ & 0xff) << 8;
14547 return x;
14548}
14549
14550static void
26ca5450 14551set_op (bfd_vma op, int riprel)
252b5132
RH
14552{
14553 op_index[op_ad] = op_ad;
cb712a9e 14554 if (address_mode == mode_64bit)
7081ff04
AJ
14555 {
14556 op_address[op_ad] = op;
14557 op_riprel[op_ad] = riprel;
14558 }
14559 else
14560 {
14561 /* Mask to get a 32-bit address. */
14562 op_address[op_ad] = op & 0xffffffff;
14563 op_riprel[op_ad] = riprel & 0xffffffff;
14564 }
252b5132
RH
14565}
14566
14567static void
26ca5450 14568OP_REG (int code, int sizeflag)
252b5132 14569{
2da11e11 14570 const char *s;
9b60702d 14571 int add;
de882298
RM
14572
14573 switch (code)
14574 {
14575 case es_reg: case ss_reg: case cs_reg:
14576 case ds_reg: case fs_reg: case gs_reg:
14577 oappend (names_seg[code - es_reg]);
14578 return;
14579 }
14580
161a04f6
L
14581 USED_REX (REX_B);
14582 if (rex & REX_B)
52b15da3 14583 add = 8;
9b60702d
L
14584 else
14585 add = 0;
52b15da3
JH
14586
14587 switch (code)
14588 {
52b15da3
JH
14589 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14590 case sp_reg: case bp_reg: case si_reg: case di_reg:
14591 s = names16[code - ax_reg + add];
14592 break;
52b15da3
JH
14593 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14594 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
14595 USED_REX (0);
14596 if (rex)
14597 s = names8rex[code - al_reg + add];
14598 else
14599 s = names8[code - al_reg];
14600 break;
6439fc28
AM
14601 case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
14602 case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
7bb15c6f 14603 if (address_mode == mode_64bit
6c067bbb 14604 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28
AM
14605 {
14606 s = names64[code - rAX_reg + add];
14607 break;
14608 }
14609 code += eAX_reg - rAX_reg;
6608db57 14610 /* Fall through. */
52b15da3
JH
14611 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14612 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
14613 USED_REX (REX_W);
14614 if (rex & REX_W)
52b15da3 14615 s = names64[code - eAX_reg + add];
52b15da3 14616 else
f16cd0d5
L
14617 {
14618 if (sizeflag & DFLAG)
14619 s = names32[code - eAX_reg + add];
14620 else
14621 s = names16[code - eAX_reg + add];
14622 used_prefixes |= (prefixes & PREFIX_DATA);
14623 }
52b15da3 14624 break;
52b15da3
JH
14625 default:
14626 s = INTERNAL_DISASSEMBLER_ERROR;
14627 break;
14628 }
14629 oappend (s);
14630}
14631
14632static void
26ca5450 14633OP_IMREG (int code, int sizeflag)
52b15da3
JH
14634{
14635 const char *s;
252b5132
RH
14636
14637 switch (code)
14638 {
14639 case indir_dx_reg:
d708bcba 14640 if (intel_syntax)
52fd6d94 14641 s = "dx";
d708bcba 14642 else
db6eb5be 14643 s = "(%dx)";
252b5132
RH
14644 break;
14645 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14646 case sp_reg: case bp_reg: case si_reg: case di_reg:
14647 s = names16[code - ax_reg];
14648 break;
14649 case es_reg: case ss_reg: case cs_reg:
14650 case ds_reg: case fs_reg: case gs_reg:
14651 s = names_seg[code - es_reg];
14652 break;
14653 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14654 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
52b15da3
JH
14655 USED_REX (0);
14656 if (rex)
14657 s = names8rex[code - al_reg];
14658 else
14659 s = names8[code - al_reg];
252b5132
RH
14660 break;
14661 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14662 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
14663 USED_REX (REX_W);
14664 if (rex & REX_W)
52b15da3 14665 s = names64[code - eAX_reg];
252b5132 14666 else
f16cd0d5
L
14667 {
14668 if (sizeflag & DFLAG)
14669 s = names32[code - eAX_reg];
14670 else
14671 s = names16[code - eAX_reg];
14672 used_prefixes |= (prefixes & PREFIX_DATA);
14673 }
252b5132 14674 break;
52fd6d94 14675 case z_mode_ax_reg:
161a04f6 14676 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
14677 s = *names32;
14678 else
14679 s = *names16;
161a04f6 14680 if (!(rex & REX_W))
52fd6d94
JB
14681 used_prefixes |= (prefixes & PREFIX_DATA);
14682 break;
252b5132
RH
14683 default:
14684 s = INTERNAL_DISASSEMBLER_ERROR;
14685 break;
14686 }
14687 oappend (s);
14688}
14689
14690static void
26ca5450 14691OP_I (int bytemode, int sizeflag)
252b5132 14692{
52b15da3
JH
14693 bfd_signed_vma op;
14694 bfd_signed_vma mask = -1;
252b5132
RH
14695
14696 switch (bytemode)
14697 {
14698 case b_mode:
14699 FETCH_DATA (the_info, codep + 1);
52b15da3
JH
14700 op = *codep++;
14701 mask = 0xff;
14702 break;
252b5132 14703 case v_mode:
161a04f6
L
14704 USED_REX (REX_W);
14705 if (rex & REX_W)
52b15da3 14706 op = get32s ();
252b5132 14707 else
52b15da3 14708 {
f16cd0d5
L
14709 if (sizeflag & DFLAG)
14710 {
14711 op = get32 ();
14712 mask = 0xffffffff;
14713 }
14714 else
14715 {
14716 op = get16 ();
14717 mask = 0xfffff;
14718 }
14719 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 14720 }
252b5132 14721 break;
c1dc7af5
JB
14722 case d_mode:
14723 mask = 0xffffffff;
14724 op = get32 ();
14725 break;
252b5132 14726 case w_mode:
52b15da3 14727 mask = 0xfffff;
252b5132
RH
14728 op = get16 ();
14729 break;
9306ca4a
JB
14730 case const_1_mode:
14731 if (intel_syntax)
6c067bbb 14732 oappend ("1");
9306ca4a 14733 return;
252b5132
RH
14734 default:
14735 oappend (INTERNAL_DISASSEMBLER_ERROR);
14736 return;
14737 }
14738
52b15da3
JH
14739 op &= mask;
14740 scratchbuf[0] = '$';
d708bcba 14741 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 14742 oappend_maybe_intel (scratchbuf);
52b15da3
JH
14743 scratchbuf[0] = '\0';
14744}
14745
14746static void
26ca5450 14747OP_I64 (int bytemode, int sizeflag)
52b15da3 14748{
a280ab8e 14749 if (bytemode != v_mode || address_mode != mode_64bit || !(rex & REX_W))
6439fc28
AM
14750 {
14751 OP_I (bytemode, sizeflag);
14752 return;
14753 }
14754
a280ab8e 14755 USED_REX (REX_W);
52b15da3 14756
52b15da3 14757 scratchbuf[0] = '$';
a280ab8e 14758 print_operand_value (scratchbuf + 1, 1, get64 ());
9ce09ba2 14759 oappend_maybe_intel (scratchbuf);
252b5132
RH
14760 scratchbuf[0] = '\0';
14761}
14762
14763static void
26ca5450 14764OP_sI (int bytemode, int sizeflag)
252b5132 14765{
52b15da3 14766 bfd_signed_vma op;
252b5132
RH
14767
14768 switch (bytemode)
14769 {
14770 case b_mode:
e3949f17 14771 case b_T_mode:
252b5132
RH
14772 FETCH_DATA (the_info, codep + 1);
14773 op = *codep++;
14774 if ((op & 0x80) != 0)
14775 op -= 0x100;
e3949f17
L
14776 if (bytemode == b_T_mode)
14777 {
14778 if (address_mode != mode_64bit
7bb15c6f 14779 || !((sizeflag & DFLAG) || (rex & REX_W)))
e3949f17 14780 {
6c067bbb
RM
14781 /* The operand-size prefix is overridden by a REX prefix. */
14782 if ((sizeflag & DFLAG) || (rex & REX_W))
e3949f17
L
14783 op &= 0xffffffff;
14784 else
14785 op &= 0xffff;
14786 }
14787 }
14788 else
14789 {
14790 if (!(rex & REX_W))
14791 {
14792 if (sizeflag & DFLAG)
14793 op &= 0xffffffff;
14794 else
14795 op &= 0xffff;
14796 }
14797 }
252b5132
RH
14798 break;
14799 case v_mode:
7bb15c6f
RM
14800 /* The operand-size prefix is overridden by a REX prefix. */
14801 if ((sizeflag & DFLAG) || (rex & REX_W))
52b15da3 14802 op = get32s ();
252b5132 14803 else
d9e3625e 14804 op = get16 ();
252b5132
RH
14805 break;
14806 default:
14807 oappend (INTERNAL_DISASSEMBLER_ERROR);
14808 return;
14809 }
52b15da3
JH
14810
14811 scratchbuf[0] = '$';
14812 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 14813 oappend_maybe_intel (scratchbuf);
252b5132
RH
14814}
14815
14816static void
26ca5450 14817OP_J (int bytemode, int sizeflag)
252b5132 14818{
52b15da3 14819 bfd_vma disp;
7081ff04 14820 bfd_vma mask = -1;
65ca155d 14821 bfd_vma segment = 0;
252b5132
RH
14822
14823 switch (bytemode)
14824 {
14825 case b_mode:
14826 FETCH_DATA (the_info, codep + 1);
14827 disp = *codep++;
14828 if ((disp & 0x80) != 0)
14829 disp -= 0x100;
14830 break;
14831 case v_mode:
5db04b09 14832 if (isa64 == amd64)
376cd056 14833 case dqw_mode:
5db04b09
L
14834 USED_REX (REX_W);
14835 if ((sizeflag & DFLAG)
14836 || (address_mode == mode_64bit
376cd056
JB
14837 && ((isa64 != amd64 && bytemode != dqw_mode)
14838 || (rex & REX_W))))
52b15da3 14839 disp = get32s ();
252b5132
RH
14840 else
14841 {
14842 disp = get16 ();
206717e8
L
14843 if ((disp & 0x8000) != 0)
14844 disp -= 0x10000;
65ca155d
L
14845 /* In 16bit mode, address is wrapped around at 64k within
14846 the same segment. Otherwise, a data16 prefix on a jump
14847 instruction means that the pc is masked to 16 bits after
14848 the displacement is added! */
14849 mask = 0xffff;
14850 if ((prefixes & PREFIX_DATA) == 0)
4fd7268a 14851 segment = ((start_pc + (codep - start_codep))
65ca155d 14852 & ~((bfd_vma) 0xffff));
252b5132 14853 }
5db04b09
L
14854 if (address_mode != mode_64bit
14855 || (isa64 == amd64 && !(rex & REX_W)))
f16cd0d5 14856 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132
RH
14857 break;
14858 default:
14859 oappend (INTERNAL_DISASSEMBLER_ERROR);
14860 return;
14861 }
42d5f9c6 14862 disp = ((start_pc + (codep - start_codep) + disp) & mask) | segment;
52b15da3
JH
14863 set_op (disp, 0);
14864 print_operand_value (scratchbuf, 1, disp);
252b5132
RH
14865 oappend (scratchbuf);
14866}
14867
252b5132 14868static void
ed7841b3 14869OP_SEG (int bytemode, int sizeflag)
252b5132 14870{
ed7841b3 14871 if (bytemode == w_mode)
7967e09e 14872 oappend (names_seg[modrm.reg]);
ed7841b3 14873 else
7967e09e 14874 OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
252b5132
RH
14875}
14876
14877static void
26ca5450 14878OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
252b5132
RH
14879{
14880 int seg, offset;
14881
c608c12e 14882 if (sizeflag & DFLAG)
252b5132 14883 {
c608c12e
AM
14884 offset = get32 ();
14885 seg = get16 ();
252b5132 14886 }
c608c12e
AM
14887 else
14888 {
14889 offset = get16 ();
14890 seg = get16 ();
14891 }
7d421014 14892 used_prefixes |= (prefixes & PREFIX_DATA);
d708bcba 14893 if (intel_syntax)
3f31e633 14894 sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
d708bcba
AM
14895 else
14896 sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
c608c12e 14897 oappend (scratchbuf);
252b5132
RH
14898}
14899
252b5132 14900static void
3f31e633 14901OP_OFF (int bytemode, int sizeflag)
252b5132 14902{
52b15da3 14903 bfd_vma off;
252b5132 14904
3f31e633
JB
14905 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
14906 intel_operand_size (bytemode, sizeflag);
252b5132
RH
14907 append_seg ();
14908
cb712a9e 14909 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132
RH
14910 off = get32 ();
14911 else
14912 off = get16 ();
14913
14914 if (intel_syntax)
14915 {
285ca992 14916 if (!active_seg_prefix)
252b5132 14917 {
d708bcba 14918 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
14919 oappend (":");
14920 }
14921 }
52b15da3
JH
14922 print_operand_value (scratchbuf, 1, off);
14923 oappend (scratchbuf);
14924}
6439fc28 14925
52b15da3 14926static void
3f31e633 14927OP_OFF64 (int bytemode, int sizeflag)
52b15da3
JH
14928{
14929 bfd_vma off;
14930
539e75ad
L
14931 if (address_mode != mode_64bit
14932 || (prefixes & PREFIX_ADDR))
6439fc28
AM
14933 {
14934 OP_OFF (bytemode, sizeflag);
14935 return;
14936 }
14937
3f31e633
JB
14938 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
14939 intel_operand_size (bytemode, sizeflag);
52b15da3
JH
14940 append_seg ();
14941
6608db57 14942 off = get64 ();
52b15da3
JH
14943
14944 if (intel_syntax)
14945 {
285ca992 14946 if (!active_seg_prefix)
52b15da3 14947 {
d708bcba 14948 oappend (names_seg[ds_reg - es_reg]);
52b15da3
JH
14949 oappend (":");
14950 }
14951 }
14952 print_operand_value (scratchbuf, 1, off);
252b5132
RH
14953 oappend (scratchbuf);
14954}
14955
14956static void
26ca5450 14957ptr_reg (int code, int sizeflag)
252b5132 14958{
2da11e11 14959 const char *s;
d708bcba 14960
1d9f512f 14961 *obufp++ = open_char;
20f0a1fc 14962 used_prefixes |= (prefixes & PREFIX_ADDR);
cb712a9e 14963 if (address_mode == mode_64bit)
c1a64871
JH
14964 {
14965 if (!(sizeflag & AFLAG))
db6eb5be 14966 s = names32[code - eAX_reg];
c1a64871 14967 else
db6eb5be 14968 s = names64[code - eAX_reg];
c1a64871 14969 }
52b15da3 14970 else if (sizeflag & AFLAG)
252b5132
RH
14971 s = names32[code - eAX_reg];
14972 else
14973 s = names16[code - eAX_reg];
14974 oappend (s);
1d9f512f
AM
14975 *obufp++ = close_char;
14976 *obufp = 0;
252b5132
RH
14977}
14978
14979static void
26ca5450 14980OP_ESreg (int code, int sizeflag)
252b5132 14981{
9306ca4a 14982 if (intel_syntax)
52fd6d94
JB
14983 {
14984 switch (codep[-1])
14985 {
14986 case 0x6d: /* insw/insl */
14987 intel_operand_size (z_mode, sizeflag);
14988 break;
14989 case 0xa5: /* movsw/movsl/movsq */
14990 case 0xa7: /* cmpsw/cmpsl/cmpsq */
14991 case 0xab: /* stosw/stosl */
14992 case 0xaf: /* scasw/scasl */
14993 intel_operand_size (v_mode, sizeflag);
14994 break;
14995 default:
14996 intel_operand_size (b_mode, sizeflag);
14997 }
14998 }
9ce09ba2 14999 oappend_maybe_intel ("%es:");
252b5132
RH
15000 ptr_reg (code, sizeflag);
15001}
15002
15003static void
26ca5450 15004OP_DSreg (int code, int sizeflag)
252b5132 15005{
9306ca4a 15006 if (intel_syntax)
52fd6d94
JB
15007 {
15008 switch (codep[-1])
15009 {
15010 case 0x6f: /* outsw/outsl */
15011 intel_operand_size (z_mode, sizeflag);
15012 break;
15013 case 0xa5: /* movsw/movsl/movsq */
15014 case 0xa7: /* cmpsw/cmpsl/cmpsq */
15015 case 0xad: /* lodsw/lodsl/lodsq */
15016 intel_operand_size (v_mode, sizeflag);
15017 break;
15018 default:
15019 intel_operand_size (b_mode, sizeflag);
15020 }
15021 }
285ca992
L
15022 /* Set active_seg_prefix to PREFIX_DS if it is unset so that the
15023 default segment register DS is printed. */
15024 if (!active_seg_prefix)
15025 active_seg_prefix = PREFIX_DS;
6608db57 15026 append_seg ();
252b5132
RH
15027 ptr_reg (code, sizeflag);
15028}
15029
252b5132 15030static void
26ca5450 15031OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15032{
9b60702d 15033 int add;
161a04f6 15034 if (rex & REX_R)
c4a530c5 15035 {
161a04f6 15036 USED_REX (REX_R);
c4a530c5
JB
15037 add = 8;
15038 }
cb712a9e 15039 else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
c4a530c5 15040 {
f16cd0d5 15041 all_prefixes[last_lock_prefix] = 0;
c4a530c5
JB
15042 used_prefixes |= PREFIX_LOCK;
15043 add = 8;
15044 }
9b60702d
L
15045 else
15046 add = 0;
7967e09e 15047 sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
9ce09ba2 15048 oappend_maybe_intel (scratchbuf);
252b5132
RH
15049}
15050
252b5132 15051static void
26ca5450 15052OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15053{
9b60702d 15054 int add;
161a04f6
L
15055 USED_REX (REX_R);
15056 if (rex & REX_R)
52b15da3 15057 add = 8;
9b60702d
L
15058 else
15059 add = 0;
d708bcba 15060 if (intel_syntax)
7967e09e 15061 sprintf (scratchbuf, "db%d", modrm.reg + add);
d708bcba 15062 else
7967e09e 15063 sprintf (scratchbuf, "%%db%d", modrm.reg + add);
252b5132
RH
15064 oappend (scratchbuf);
15065}
15066
252b5132 15067static void
26ca5450 15068OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15069{
7967e09e 15070 sprintf (scratchbuf, "%%tr%d", modrm.reg);
9ce09ba2 15071 oappend_maybe_intel (scratchbuf);
252b5132
RH
15072}
15073
15074static void
6f74c397 15075OP_R (int bytemode, int sizeflag)
252b5132 15076{
68f34464
L
15077 /* Skip mod/rm byte. */
15078 MODRM_CHECK;
15079 codep++;
15080 OP_E_register (bytemode, sizeflag);
252b5132
RH
15081}
15082
15083static void
26ca5450 15084OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15085{
b9733481
L
15086 int reg = modrm.reg;
15087 const char **names;
15088
041bd2e0
JH
15089 used_prefixes |= (prefixes & PREFIX_DATA);
15090 if (prefixes & PREFIX_DATA)
20f0a1fc 15091 {
b9733481 15092 names = names_xmm;
161a04f6
L
15093 USED_REX (REX_R);
15094 if (rex & REX_R)
b9733481 15095 reg += 8;
20f0a1fc 15096 }
041bd2e0 15097 else
b9733481
L
15098 names = names_mm;
15099 oappend (names[reg]);
252b5132
RH
15100}
15101
c608c12e 15102static void
c0f3af97 15103OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
c608c12e 15104{
b9733481
L
15105 int reg = modrm.reg;
15106 const char **names;
15107
161a04f6
L
15108 USED_REX (REX_R);
15109 if (rex & REX_R)
b9733481 15110 reg += 8;
43234a1e
L
15111 if (vex.evex)
15112 {
15113 if (!vex.r)
15114 reg += 16;
15115 }
15116
539f890d
L
15117 if (need_vex
15118 && bytemode != xmm_mode
43234a1e
L
15119 && bytemode != xmmq_mode
15120 && bytemode != evex_half_bcst_xmmq_mode
15121 && bytemode != ymm_mode
539f890d 15122 && bytemode != scalar_mode)
c0f3af97
L
15123 {
15124 switch (vex.length)
15125 {
15126 case 128:
b9733481 15127 names = names_xmm;
c0f3af97
L
15128 break;
15129 case 256:
5fc35d96
IT
15130 if (vex.w
15131 || (bytemode != vex_vsib_q_w_dq_mode
15132 && bytemode != vex_vsib_q_w_d_mode))
6c30d220
L
15133 names = names_ymm;
15134 else
15135 names = names_xmm;
c0f3af97 15136 break;
43234a1e
L
15137 case 512:
15138 names = names_zmm;
15139 break;
c0f3af97
L
15140 default:
15141 abort ();
15142 }
15143 }
43234a1e
L
15144 else if (bytemode == xmmq_mode
15145 || bytemode == evex_half_bcst_xmmq_mode)
15146 {
15147 switch (vex.length)
15148 {
15149 case 128:
15150 case 256:
15151 names = names_xmm;
15152 break;
15153 case 512:
15154 names = names_ymm;
15155 break;
15156 default:
15157 abort ();
15158 }
15159 }
15160 else if (bytemode == ymm_mode)
15161 names = names_ymm;
c0f3af97 15162 else
b9733481
L
15163 names = names_xmm;
15164 oappend (names[reg]);
c608c12e
AM
15165}
15166
252b5132 15167static void
26ca5450 15168OP_EM (int bytemode, int sizeflag)
252b5132 15169{
b9733481
L
15170 int reg;
15171 const char **names;
15172
7967e09e 15173 if (modrm.mod != 3)
252b5132 15174 {
b6169b20
L
15175 if (intel_syntax
15176 && (bytemode == v_mode || bytemode == v_swap_mode))
9306ca4a
JB
15177 {
15178 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
15179 used_prefixes |= (prefixes & PREFIX_DATA);
6c067bbb 15180 }
252b5132
RH
15181 OP_E (bytemode, sizeflag);
15182 return;
15183 }
15184
b6169b20
L
15185 if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
15186 swap_operand ();
15187
6608db57 15188 /* Skip mod/rm byte. */
4bba6815 15189 MODRM_CHECK;
252b5132 15190 codep++;
041bd2e0 15191 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 15192 reg = modrm.rm;
041bd2e0 15193 if (prefixes & PREFIX_DATA)
20f0a1fc 15194 {
b9733481 15195 names = names_xmm;
161a04f6
L
15196 USED_REX (REX_B);
15197 if (rex & REX_B)
b9733481 15198 reg += 8;
20f0a1fc 15199 }
041bd2e0 15200 else
b9733481
L
15201 names = names_mm;
15202 oappend (names[reg]);
252b5132
RH
15203}
15204
246c51aa
L
15205/* cvt* are the only instructions in sse2 which have
15206 both SSE and MMX operands and also have 0x66 prefix
15207 in their opcode. 0x66 was originally used to differentiate
15208 between SSE and MMX instruction(operands). So we have to handle the
4d9567e0
MM
15209 cvt* separately using OP_EMC and OP_MXC */
15210static void
15211OP_EMC (int bytemode, int sizeflag)
15212{
7967e09e 15213 if (modrm.mod != 3)
4d9567e0
MM
15214 {
15215 if (intel_syntax && bytemode == v_mode)
15216 {
15217 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
15218 used_prefixes |= (prefixes & PREFIX_DATA);
6c067bbb 15219 }
4d9567e0
MM
15220 OP_E (bytemode, sizeflag);
15221 return;
15222 }
246c51aa 15223
4d9567e0
MM
15224 /* Skip mod/rm byte. */
15225 MODRM_CHECK;
15226 codep++;
15227 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 15228 oappend (names_mm[modrm.rm]);
4d9567e0
MM
15229}
15230
15231static void
15232OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15233{
15234 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 15235 oappend (names_mm[modrm.reg]);
4d9567e0
MM
15236}
15237
c608c12e 15238static void
26ca5450 15239OP_EX (int bytemode, int sizeflag)
c608c12e 15240{
b9733481
L
15241 int reg;
15242 const char **names;
d6f574e0
L
15243
15244 /* Skip mod/rm byte. */
15245 MODRM_CHECK;
15246 codep++;
15247
7967e09e 15248 if (modrm.mod != 3)
c608c12e 15249 {
c1e679ec 15250 OP_E_memory (bytemode, sizeflag);
c608c12e
AM
15251 return;
15252 }
d6f574e0 15253
b9733481 15254 reg = modrm.rm;
161a04f6
L
15255 USED_REX (REX_B);
15256 if (rex & REX_B)
b9733481 15257 reg += 8;
43234a1e
L
15258 if (vex.evex)
15259 {
15260 USED_REX (REX_X);
15261 if ((rex & REX_X))
15262 reg += 16;
15263 }
c608c12e 15264
b6169b20 15265 if ((sizeflag & SUFFIX_ALWAYS)
fa99fab2
L
15266 && (bytemode == x_swap_mode
15267 || bytemode == d_swap_mode
7bb15c6f 15268 || bytemode == d_scalar_swap_mode
539f890d
L
15269 || bytemode == q_swap_mode
15270 || bytemode == q_scalar_swap_mode))
b6169b20
L
15271 swap_operand ();
15272
c0f3af97
L
15273 if (need_vex
15274 && bytemode != xmm_mode
6c30d220
L
15275 && bytemode != xmmdw_mode
15276 && bytemode != xmmqd_mode
15277 && bytemode != xmm_mb_mode
15278 && bytemode != xmm_mw_mode
15279 && bytemode != xmm_md_mode
15280 && bytemode != xmm_mq_mode
43234a1e 15281 && bytemode != xmm_mdq_mode
539f890d 15282 && bytemode != xmmq_mode
43234a1e
L
15283 && bytemode != evex_half_bcst_xmmq_mode
15284 && bytemode != ymm_mode
539f890d 15285 && bytemode != d_scalar_mode
7bb15c6f 15286 && bytemode != d_scalar_swap_mode
539f890d 15287 && bytemode != q_scalar_mode
1c480963
L
15288 && bytemode != q_scalar_swap_mode
15289 && bytemode != vex_scalar_w_dq_mode)
c0f3af97
L
15290 {
15291 switch (vex.length)
15292 {
15293 case 128:
b9733481 15294 names = names_xmm;
c0f3af97
L
15295 break;
15296 case 256:
b9733481 15297 names = names_ymm;
c0f3af97 15298 break;
43234a1e
L
15299 case 512:
15300 names = names_zmm;
15301 break;
c0f3af97
L
15302 default:
15303 abort ();
15304 }
15305 }
43234a1e
L
15306 else if (bytemode == xmmq_mode
15307 || bytemode == evex_half_bcst_xmmq_mode)
15308 {
15309 switch (vex.length)
15310 {
15311 case 128:
15312 case 256:
15313 names = names_xmm;
15314 break;
15315 case 512:
15316 names = names_ymm;
15317 break;
15318 default:
15319 abort ();
15320 }
15321 }
15322 else if (bytemode == ymm_mode)
15323 names = names_ymm;
c0f3af97 15324 else
b9733481
L
15325 names = names_xmm;
15326 oappend (names[reg]);
c608c12e
AM
15327}
15328
252b5132 15329static void
26ca5450 15330OP_MS (int bytemode, int sizeflag)
252b5132 15331{
7967e09e 15332 if (modrm.mod == 3)
2da11e11
AM
15333 OP_EM (bytemode, sizeflag);
15334 else
6608db57 15335 BadOp ();
252b5132
RH
15336}
15337
992aaec9 15338static void
26ca5450 15339OP_XS (int bytemode, int sizeflag)
992aaec9 15340{
7967e09e 15341 if (modrm.mod == 3)
992aaec9
AM
15342 OP_EX (bytemode, sizeflag);
15343 else
6608db57 15344 BadOp ();
992aaec9
AM
15345}
15346
cc0ec051
AM
15347static void
15348OP_M (int bytemode, int sizeflag)
15349{
7967e09e 15350 if (modrm.mod == 3)
75413a22
L
15351 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
15352 BadOp ();
cc0ec051
AM
15353 else
15354 OP_E (bytemode, sizeflag);
15355}
15356
15357static void
15358OP_0f07 (int bytemode, int sizeflag)
15359{
7967e09e 15360 if (modrm.mod != 3 || modrm.rm != 0)
cc0ec051
AM
15361 BadOp ();
15362 else
15363 OP_E (bytemode, sizeflag);
15364}
15365
46e883c5 15366/* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
246c51aa 15367 32bit mode and "xchg %rax,%rax" in 64bit mode. */
46e883c5 15368
cc0ec051 15369static void
46e883c5 15370NOP_Fixup1 (int bytemode, int sizeflag)
cc0ec051 15371{
8b38ad71
L
15372 if ((prefixes & PREFIX_DATA) != 0
15373 || (rex != 0
15374 && rex != 0x48
15375 && address_mode == mode_64bit))
46e883c5
L
15376 OP_REG (bytemode, sizeflag);
15377 else
15378 strcpy (obuf, "nop");
15379}
15380
15381static void
15382NOP_Fixup2 (int bytemode, int sizeflag)
15383{
8b38ad71
L
15384 if ((prefixes & PREFIX_DATA) != 0
15385 || (rex != 0
15386 && rex != 0x48
15387 && address_mode == mode_64bit))
46e883c5 15388 OP_IMREG (bytemode, sizeflag);
cc0ec051
AM
15389}
15390
84037f8c 15391static const char *const Suffix3DNow[] = {
252b5132
RH
15392/* 00 */ NULL, NULL, NULL, NULL,
15393/* 04 */ NULL, NULL, NULL, NULL,
15394/* 08 */ NULL, NULL, NULL, NULL,
9e525108 15395/* 0C */ "pi2fw", "pi2fd", NULL, NULL,
252b5132
RH
15396/* 10 */ NULL, NULL, NULL, NULL,
15397/* 14 */ NULL, NULL, NULL, NULL,
15398/* 18 */ NULL, NULL, NULL, NULL,
9e525108 15399/* 1C */ "pf2iw", "pf2id", NULL, NULL,
252b5132
RH
15400/* 20 */ NULL, NULL, NULL, NULL,
15401/* 24 */ NULL, NULL, NULL, NULL,
15402/* 28 */ NULL, NULL, NULL, NULL,
15403/* 2C */ NULL, NULL, NULL, NULL,
15404/* 30 */ NULL, NULL, NULL, NULL,
15405/* 34 */ NULL, NULL, NULL, NULL,
15406/* 38 */ NULL, NULL, NULL, NULL,
15407/* 3C */ NULL, NULL, NULL, NULL,
15408/* 40 */ NULL, NULL, NULL, NULL,
15409/* 44 */ NULL, NULL, NULL, NULL,
15410/* 48 */ NULL, NULL, NULL, NULL,
15411/* 4C */ NULL, NULL, NULL, NULL,
15412/* 50 */ NULL, NULL, NULL, NULL,
15413/* 54 */ NULL, NULL, NULL, NULL,
15414/* 58 */ NULL, NULL, NULL, NULL,
15415/* 5C */ NULL, NULL, NULL, NULL,
15416/* 60 */ NULL, NULL, NULL, NULL,
15417/* 64 */ NULL, NULL, NULL, NULL,
15418/* 68 */ NULL, NULL, NULL, NULL,
15419/* 6C */ NULL, NULL, NULL, NULL,
15420/* 70 */ NULL, NULL, NULL, NULL,
15421/* 74 */ NULL, NULL, NULL, NULL,
15422/* 78 */ NULL, NULL, NULL, NULL,
15423/* 7C */ NULL, NULL, NULL, NULL,
15424/* 80 */ NULL, NULL, NULL, NULL,
15425/* 84 */ NULL, NULL, NULL, NULL,
9e525108
AM
15426/* 88 */ NULL, NULL, "pfnacc", NULL,
15427/* 8C */ NULL, NULL, "pfpnacc", NULL,
252b5132
RH
15428/* 90 */ "pfcmpge", NULL, NULL, NULL,
15429/* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
15430/* 98 */ NULL, NULL, "pfsub", NULL,
15431/* 9C */ NULL, NULL, "pfadd", NULL,
15432/* A0 */ "pfcmpgt", NULL, NULL, NULL,
15433/* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
15434/* A8 */ NULL, NULL, "pfsubr", NULL,
15435/* AC */ NULL, NULL, "pfacc", NULL,
15436/* B0 */ "pfcmpeq", NULL, NULL, NULL,
9beff690 15437/* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
9e525108 15438/* B8 */ NULL, NULL, NULL, "pswapd",
252b5132
RH
15439/* BC */ NULL, NULL, NULL, "pavgusb",
15440/* C0 */ NULL, NULL, NULL, NULL,
15441/* C4 */ NULL, NULL, NULL, NULL,
15442/* C8 */ NULL, NULL, NULL, NULL,
15443/* CC */ NULL, NULL, NULL, NULL,
15444/* D0 */ NULL, NULL, NULL, NULL,
15445/* D4 */ NULL, NULL, NULL, NULL,
15446/* D8 */ NULL, NULL, NULL, NULL,
15447/* DC */ NULL, NULL, NULL, NULL,
15448/* E0 */ NULL, NULL, NULL, NULL,
15449/* E4 */ NULL, NULL, NULL, NULL,
15450/* E8 */ NULL, NULL, NULL, NULL,
15451/* EC */ NULL, NULL, NULL, NULL,
15452/* F0 */ NULL, NULL, NULL, NULL,
15453/* F4 */ NULL, NULL, NULL, NULL,
15454/* F8 */ NULL, NULL, NULL, NULL,
15455/* FC */ NULL, NULL, NULL, NULL,
15456};
15457
15458static void
26ca5450 15459OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132
RH
15460{
15461 const char *mnemonic;
15462
15463 FETCH_DATA (the_info, codep + 1);
15464 /* AMD 3DNow! instructions are specified by an opcode suffix in the
15465 place where an 8-bit immediate would normally go. ie. the last
15466 byte of the instruction. */
ea397f5b 15467 obufp = mnemonicendp;
c608c12e 15468 mnemonic = Suffix3DNow[*codep++ & 0xff];
252b5132 15469 if (mnemonic)
2da11e11 15470 oappend (mnemonic);
252b5132
RH
15471 else
15472 {
15473 /* Since a variable sized modrm/sib chunk is between the start
15474 of the opcode (0x0f0f) and the opcode suffix, we need to do
15475 all the modrm processing first, and don't know until now that
15476 we have a bad opcode. This necessitates some cleaning up. */
ce518a5f
L
15477 op_out[0][0] = '\0';
15478 op_out[1][0] = '\0';
6608db57 15479 BadOp ();
252b5132 15480 }
ea397f5b 15481 mnemonicendp = obufp;
252b5132 15482}
c608c12e 15483
ea397f5b
L
15484static struct op simd_cmp_op[] =
15485{
15486 { STRING_COMMA_LEN ("eq") },
15487 { STRING_COMMA_LEN ("lt") },
15488 { STRING_COMMA_LEN ("le") },
15489 { STRING_COMMA_LEN ("unord") },
15490 { STRING_COMMA_LEN ("neq") },
15491 { STRING_COMMA_LEN ("nlt") },
15492 { STRING_COMMA_LEN ("nle") },
15493 { STRING_COMMA_LEN ("ord") }
c608c12e
AM
15494};
15495
15496static void
ad19981d 15497CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
c608c12e
AM
15498{
15499 unsigned int cmp_type;
15500
15501 FETCH_DATA (the_info, codep + 1);
15502 cmp_type = *codep++ & 0xff;
c0f3af97 15503 if (cmp_type < ARRAY_SIZE (simd_cmp_op))
c608c12e 15504 {
ad19981d 15505 char suffix [3];
ea397f5b 15506 char *p = mnemonicendp - 2;
ad19981d
L
15507 suffix[0] = p[0];
15508 suffix[1] = p[1];
15509 suffix[2] = '\0';
ea397f5b
L
15510 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
15511 mnemonicendp += simd_cmp_op[cmp_type].len;
c608c12e
AM
15512 }
15513 else
15514 {
ad19981d
L
15515 /* We have a reserved extension byte. Output it directly. */
15516 scratchbuf[0] = '$';
15517 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 15518 oappend_maybe_intel (scratchbuf);
ad19981d 15519 scratchbuf[0] = '\0';
c608c12e
AM
15520 }
15521}
15522
9916071f 15523static void
7abb8d81 15524OP_Mwait (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
9916071f 15525{
7abb8d81 15526 /* mwait %eax,%ecx / mwaitx %eax,%ecx,%ebx */
b844680a
L
15527 if (!intel_syntax)
15528 {
081e283f
JB
15529 strcpy (op_out[0], names32[0]);
15530 strcpy (op_out[1], names32[1]);
7abb8d81 15531 if (bytemode == eBX_reg)
081e283f 15532 strcpy (op_out[2], names32[3]);
b844680a
L
15533 two_source_ops = 1;
15534 }
15535 /* Skip mod/rm byte. */
15536 MODRM_CHECK;
15537 codep++;
15538}
15539
15540static void
15541OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
15542 int sizeflag ATTRIBUTE_UNUSED)
ca164297 15543{
081e283f 15544 /* monitor %{e,r,}ax,%ecx,%edx" */
b844680a 15545 if (!intel_syntax)
ca164297 15546 {
cb712a9e
L
15547 const char **names = (address_mode == mode_64bit
15548 ? names64 : names32);
1d9f512f 15549
081e283f 15550 if (prefixes & PREFIX_ADDR)
ca164297 15551 {
b844680a 15552 /* Remove "addr16/addr32". */
f16cd0d5 15553 all_prefixes[last_addr_prefix] = 0;
081e283f
JB
15554 names = (address_mode != mode_32bit
15555 ? names32 : names16);
b844680a 15556 used_prefixes |= PREFIX_ADDR;
ca164297 15557 }
081e283f
JB
15558 else if (address_mode == mode_16bit)
15559 names = names16;
15560 strcpy (op_out[0], names[0]);
15561 strcpy (op_out[1], names32[1]);
15562 strcpy (op_out[2], names32[2]);
b844680a 15563 two_source_ops = 1;
ca164297 15564 }
b844680a
L
15565 /* Skip mod/rm byte. */
15566 MODRM_CHECK;
15567 codep++;
30123838
JB
15568}
15569
6608db57
KH
15570static void
15571BadOp (void)
2da11e11 15572{
6608db57
KH
15573 /* Throw away prefixes and 1st. opcode byte. */
15574 codep = insn_codep + 1;
2da11e11
AM
15575 oappend ("(bad)");
15576}
4cc91dba 15577
35c52694
L
15578static void
15579REP_Fixup (int bytemode, int sizeflag)
15580{
15581 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
15582 lods and stos. */
35c52694 15583 if (prefixes & PREFIX_REPZ)
f16cd0d5 15584 all_prefixes[last_repz_prefix] = REP_PREFIX;
35c52694
L
15585
15586 switch (bytemode)
15587 {
15588 case al_reg:
15589 case eAX_reg:
15590 case indir_dx_reg:
15591 OP_IMREG (bytemode, sizeflag);
15592 break;
15593 case eDI_reg:
15594 OP_ESreg (bytemode, sizeflag);
15595 break;
15596 case eSI_reg:
15597 OP_DSreg (bytemode, sizeflag);
15598 break;
15599 default:
15600 abort ();
15601 break;
15602 }
15603}
f5804c90 15604
7e8b059b
L
15605/* For BND-prefixed instructions 0xF2 prefix should be displayed as
15606 "bnd". */
15607
15608static void
15609BND_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15610{
15611 if (prefixes & PREFIX_REPNZ)
15612 all_prefixes[last_repnz_prefix] = BND_PREFIX;
15613}
15614
04ef582a
L
15615/* For NOTRACK-prefixed instructions, 0x3E prefix should be displayed as
15616 "notrack". */
15617
15618static void
15619NOTRACK_Fixup (int bytemode ATTRIBUTE_UNUSED,
15620 int sizeflag ATTRIBUTE_UNUSED)
15621{
9fef80d6 15622 if (active_seg_prefix == PREFIX_DS
04ef582a
L
15623 && (address_mode != mode_64bit || last_data_prefix < 0))
15624 {
4e9ac44a 15625 /* NOTRACK prefix is only valid on indirect branch instructions.
9fef80d6 15626 NB: DATA prefix is unsupported for Intel64. */
04ef582a
L
15627 active_seg_prefix = 0;
15628 all_prefixes[last_seg_prefix] = NOTRACK_PREFIX;
15629 }
15630}
15631
42164a71
L
15632/* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
15633 "xacquire"/"xrelease" for memory operand if there is a LOCK prefix.
15634 */
15635
15636static void
15637HLE_Fixup1 (int bytemode, int sizeflag)
15638{
15639 if (modrm.mod != 3
15640 && (prefixes & PREFIX_LOCK) != 0)
15641 {
15642 if (prefixes & PREFIX_REPZ)
15643 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15644 if (prefixes & PREFIX_REPNZ)
15645 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
15646 }
15647
15648 OP_E (bytemode, sizeflag);
15649}
15650
15651/* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
15652 "xacquire"/"xrelease" for memory operand. No check for LOCK prefix.
15653 */
15654
15655static void
15656HLE_Fixup2 (int bytemode, int sizeflag)
15657{
15658 if (modrm.mod != 3)
15659 {
15660 if (prefixes & PREFIX_REPZ)
15661 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15662 if (prefixes & PREFIX_REPNZ)
15663 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
15664 }
15665
15666 OP_E (bytemode, sizeflag);
15667}
15668
15669/* Similar to OP_E. But the 0xf3 prefixes should be displayed as
15670 "xrelease" for memory operand. No check for LOCK prefix. */
15671
15672static void
15673HLE_Fixup3 (int bytemode, int sizeflag)
15674{
15675 if (modrm.mod != 3
15676 && last_repz_prefix > last_repnz_prefix
15677 && (prefixes & PREFIX_REPZ) != 0)
15678 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15679
15680 OP_E (bytemode, sizeflag);
15681}
15682
f5804c90
L
15683static void
15684CMPXCHG8B_Fixup (int bytemode, int sizeflag)
15685{
161a04f6
L
15686 USED_REX (REX_W);
15687 if (rex & REX_W)
f5804c90
L
15688 {
15689 /* Change cmpxchg8b to cmpxchg16b. */
ea397f5b
L
15690 char *p = mnemonicendp - 2;
15691 mnemonicendp = stpcpy (p, "16b");
fb9c77c7 15692 bytemode = o_mode;
f5804c90 15693 }
42164a71
L
15694 else if ((prefixes & PREFIX_LOCK) != 0)
15695 {
15696 if (prefixes & PREFIX_REPZ)
15697 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15698 if (prefixes & PREFIX_REPNZ)
15699 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
15700 }
15701
f5804c90
L
15702 OP_M (bytemode, sizeflag);
15703}
42903f7f
L
15704
15705static void
15706XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
15707{
b9733481
L
15708 const char **names;
15709
c0f3af97
L
15710 if (need_vex)
15711 {
15712 switch (vex.length)
15713 {
15714 case 128:
b9733481 15715 names = names_xmm;
c0f3af97
L
15716 break;
15717 case 256:
b9733481 15718 names = names_ymm;
c0f3af97
L
15719 break;
15720 default:
15721 abort ();
15722 }
15723 }
15724 else
b9733481
L
15725 names = names_xmm;
15726 oappend (names[reg]);
42903f7f 15727}
381d071f
L
15728
15729static void
15730CRC32_Fixup (int bytemode, int sizeflag)
15731{
15732 /* Add proper suffix to "crc32". */
ea397f5b 15733 char *p = mnemonicendp;
381d071f
L
15734
15735 switch (bytemode)
15736 {
15737 case b_mode:
20592a94 15738 if (intel_syntax)
ea397f5b 15739 goto skip;
20592a94 15740
381d071f
L
15741 *p++ = 'b';
15742 break;
15743 case v_mode:
20592a94 15744 if (intel_syntax)
ea397f5b 15745 goto skip;
20592a94 15746
381d071f
L
15747 USED_REX (REX_W);
15748 if (rex & REX_W)
15749 *p++ = 'q';
7bb15c6f 15750 else
f16cd0d5
L
15751 {
15752 if (sizeflag & DFLAG)
15753 *p++ = 'l';
15754 else
15755 *p++ = 'w';
15756 used_prefixes |= (prefixes & PREFIX_DATA);
15757 }
381d071f
L
15758 break;
15759 default:
15760 oappend (INTERNAL_DISASSEMBLER_ERROR);
15761 break;
15762 }
ea397f5b 15763 mnemonicendp = p;
381d071f
L
15764 *p = '\0';
15765
ea397f5b 15766skip:
381d071f
L
15767 if (modrm.mod == 3)
15768 {
15769 int add;
15770
15771 /* Skip mod/rm byte. */
15772 MODRM_CHECK;
15773 codep++;
15774
15775 USED_REX (REX_B);
15776 add = (rex & REX_B) ? 8 : 0;
15777 if (bytemode == b_mode)
15778 {
15779 USED_REX (0);
15780 if (rex)
15781 oappend (names8rex[modrm.rm + add]);
15782 else
15783 oappend (names8[modrm.rm + add]);
15784 }
15785 else
15786 {
15787 USED_REX (REX_W);
15788 if (rex & REX_W)
15789 oappend (names64[modrm.rm + add]);
15790 else if ((prefixes & PREFIX_DATA))
15791 oappend (names16[modrm.rm + add]);
15792 else
15793 oappend (names32[modrm.rm + add]);
15794 }
15795 }
15796 else
9344ff29 15797 OP_E (bytemode, sizeflag);
381d071f 15798}
85f10a01 15799
eacc9c89
L
15800static void
15801FXSAVE_Fixup (int bytemode, int sizeflag)
15802{
15803 /* Add proper suffix to "fxsave" and "fxrstor". */
15804 USED_REX (REX_W);
15805 if (rex & REX_W)
15806 {
15807 char *p = mnemonicendp;
15808 *p++ = '6';
15809 *p++ = '4';
15810 *p = '\0';
15811 mnemonicendp = p;
15812 }
15813 OP_M (bytemode, sizeflag);
15814}
15815
15c7c1d8
JB
15816static void
15817PCMPESTR_Fixup (int bytemode, int sizeflag)
15818{
15819 /* Add proper suffix to "{,v}pcmpestr{i,m}". */
15820 if (!intel_syntax)
15821 {
15822 char *p = mnemonicendp;
15823
15824 USED_REX (REX_W);
15825 if (rex & REX_W)
15826 *p++ = 'q';
15827 else if (sizeflag & SUFFIX_ALWAYS)
15828 *p++ = 'l';
15829
15830 *p = '\0';
15831 mnemonicendp = p;
15832 }
15833
15834 OP_EX (bytemode, sizeflag);
15835}
15836
c0f3af97
L
15837/* Display the destination register operand for instructions with
15838 VEX. */
15839
15840static void
15841OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
15842{
539f890d 15843 int reg;
b9733481
L
15844 const char **names;
15845
c0f3af97
L
15846 if (!need_vex)
15847 abort ();
15848
15849 if (!need_vex_reg)
15850 return;
15851
539f890d 15852 reg = vex.register_specifier;
63c6fc6c 15853 vex.register_specifier = 0;
5f847646
JB
15854 if (address_mode != mode_64bit)
15855 reg &= 7;
15856 else if (vex.evex && !vex.v)
15857 reg += 16;
43234a1e 15858
539f890d
L
15859 if (bytemode == vex_scalar_mode)
15860 {
15861 oappend (names_xmm[reg]);
15862 return;
15863 }
15864
c0f3af97
L
15865 switch (vex.length)
15866 {
15867 case 128:
15868 switch (bytemode)
15869 {
15870 case vex_mode:
15871 case vex128_mode:
6c30d220 15872 case vex_vsib_q_w_dq_mode:
5fc35d96 15873 case vex_vsib_q_w_d_mode:
cb21baef
L
15874 names = names_xmm;
15875 break;
15876 case dq_mode:
390a6789 15877 if (rex & REX_W)
cb21baef
L
15878 names = names64;
15879 else
15880 names = names32;
c0f3af97 15881 break;
1ba585e8 15882 case mask_bd_mode:
43234a1e 15883 case mask_mode:
9889cbb1
L
15884 if (reg > 0x7)
15885 {
15886 oappend ("(bad)");
15887 return;
15888 }
43234a1e
L
15889 names = names_mask;
15890 break;
c0f3af97
L
15891 default:
15892 abort ();
15893 return;
15894 }
c0f3af97
L
15895 break;
15896 case 256:
15897 switch (bytemode)
15898 {
15899 case vex_mode:
15900 case vex256_mode:
6c30d220
L
15901 names = names_ymm;
15902 break;
15903 case vex_vsib_q_w_dq_mode:
5fc35d96 15904 case vex_vsib_q_w_d_mode:
6c30d220 15905 names = vex.w ? names_ymm : names_xmm;
c0f3af97 15906 break;
1ba585e8 15907 case mask_bd_mode:
43234a1e 15908 case mask_mode:
9889cbb1
L
15909 if (reg > 0x7)
15910 {
15911 oappend ("(bad)");
15912 return;
15913 }
43234a1e
L
15914 names = names_mask;
15915 break;
c0f3af97 15916 default:
a37a2806
NC
15917 /* See PR binutils/20893 for a reproducer. */
15918 oappend ("(bad)");
c0f3af97
L
15919 return;
15920 }
c0f3af97 15921 break;
43234a1e
L
15922 case 512:
15923 names = names_zmm;
15924 break;
c0f3af97
L
15925 default:
15926 abort ();
15927 break;
15928 }
539f890d 15929 oappend (names[reg]);
c0f3af97
L
15930}
15931
922d8de8
DR
15932/* Get the VEX immediate byte without moving codep. */
15933
15934static unsigned char
ccc5981b 15935get_vex_imm8 (int sizeflag, int opnum)
922d8de8
DR
15936{
15937 int bytes_before_imm = 0;
15938
922d8de8
DR
15939 if (modrm.mod != 3)
15940 {
15941 /* There are SIB/displacement bytes. */
15942 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
6c067bbb 15943 {
922d8de8 15944 /* 32/64 bit address mode */
6c067bbb 15945 int base = modrm.rm;
922d8de8
DR
15946
15947 /* Check SIB byte. */
6c067bbb
RM
15948 if (base == 4)
15949 {
15950 FETCH_DATA (the_info, codep + 1);
15951 base = *codep & 7;
15952 /* When decoding the third source, don't increase
15953 bytes_before_imm as this has already been incremented
15954 by one in OP_E_memory while decoding the second
15955 source operand. */
15956 if (opnum == 0)
15957 bytes_before_imm++;
15958 }
15959
15960 /* Don't increase bytes_before_imm when decoding the third source,
15961 it has already been incremented by OP_E_memory while decoding
15962 the second source operand. */
15963 if (opnum == 0)
15964 {
15965 switch (modrm.mod)
15966 {
15967 case 0:
15968 /* When modrm.rm == 5 or modrm.rm == 4 and base in
15969 SIB == 5, there is a 4 byte displacement. */
15970 if (base != 5)
15971 /* No displacement. */
15972 break;
1a0670f3 15973 /* Fall through. */
6c067bbb
RM
15974 case 2:
15975 /* 4 byte displacement. */
15976 bytes_before_imm += 4;
15977 break;
15978 case 1:
15979 /* 1 byte displacement. */
15980 bytes_before_imm++;
15981 break;
15982 }
15983 }
15984 }
922d8de8 15985 else
02e647f9
SP
15986 {
15987 /* 16 bit address mode */
6c067bbb
RM
15988 /* Don't increase bytes_before_imm when decoding the third source,
15989 it has already been incremented by OP_E_memory while decoding
15990 the second source operand. */
15991 if (opnum == 0)
15992 {
02e647f9
SP
15993 switch (modrm.mod)
15994 {
15995 case 0:
15996 /* When modrm.rm == 6, there is a 2 byte displacement. */
15997 if (modrm.rm != 6)
15998 /* No displacement. */
15999 break;
1a0670f3 16000 /* Fall through. */
02e647f9
SP
16001 case 2:
16002 /* 2 byte displacement. */
16003 bytes_before_imm += 2;
16004 break;
16005 case 1:
16006 /* 1 byte displacement: when decoding the third source,
16007 don't increase bytes_before_imm as this has already
16008 been incremented by one in OP_E_memory while decoding
16009 the second source operand. */
16010 if (opnum == 0)
16011 bytes_before_imm++;
ccc5981b 16012
02e647f9
SP
16013 break;
16014 }
922d8de8
DR
16015 }
16016 }
16017 }
16018
16019 FETCH_DATA (the_info, codep + bytes_before_imm + 1);
16020 return codep [bytes_before_imm];
16021}
16022
16023static void
16024OP_EX_VexReg (int bytemode, int sizeflag, int reg)
16025{
b9733481
L
16026 const char **names;
16027
922d8de8
DR
16028 if (reg == -1 && modrm.mod != 3)
16029 {
16030 OP_E_memory (bytemode, sizeflag);
16031 return;
16032 }
16033 else
16034 {
16035 if (reg == -1)
16036 {
16037 reg = modrm.rm;
16038 USED_REX (REX_B);
16039 if (rex & REX_B)
16040 reg += 8;
16041 }
5f847646
JB
16042 if (address_mode != mode_64bit)
16043 reg &= 7;
922d8de8
DR
16044 }
16045
16046 switch (vex.length)
16047 {
16048 case 128:
b9733481 16049 names = names_xmm;
922d8de8
DR
16050 break;
16051 case 256:
b9733481 16052 names = names_ymm;
922d8de8
DR
16053 break;
16054 default:
16055 abort ();
16056 }
b9733481 16057 oappend (names[reg]);
922d8de8
DR
16058}
16059
a683cc34
SP
16060static void
16061OP_EX_VexImmW (int bytemode, int sizeflag)
16062{
16063 int reg = -1;
16064 static unsigned char vex_imm8;
16065
16066 if (vex_w_done == 0)
16067 {
16068 vex_w_done = 1;
16069
16070 /* Skip mod/rm byte. */
16071 MODRM_CHECK;
16072 codep++;
16073
16074 vex_imm8 = get_vex_imm8 (sizeflag, 0);
16075
16076 if (vex.w)
16077 reg = vex_imm8 >> 4;
16078
16079 OP_EX_VexReg (bytemode, sizeflag, reg);
16080 }
16081 else if (vex_w_done == 1)
16082 {
16083 vex_w_done = 2;
16084
16085 if (!vex.w)
16086 reg = vex_imm8 >> 4;
16087
16088 OP_EX_VexReg (bytemode, sizeflag, reg);
16089 }
16090 else
16091 {
16092 /* Output the imm8 directly. */
16093 scratchbuf[0] = '$';
16094 print_operand_value (scratchbuf + 1, 1, vex_imm8 & 0xf);
9ce09ba2 16095 oappend_maybe_intel (scratchbuf);
a683cc34
SP
16096 scratchbuf[0] = '\0';
16097 codep++;
16098 }
16099}
16100
5dd85c99
SP
16101static void
16102OP_Vex_2src (int bytemode, int sizeflag)
16103{
16104 if (modrm.mod == 3)
16105 {
b9733481 16106 int reg = modrm.rm;
5dd85c99 16107 USED_REX (REX_B);
b9733481
L
16108 if (rex & REX_B)
16109 reg += 8;
16110 oappend (names_xmm[reg]);
5dd85c99
SP
16111 }
16112 else
16113 {
16114 if (intel_syntax
16115 && (bytemode == v_mode || bytemode == v_swap_mode))
16116 {
16117 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
16118 used_prefixes |= (prefixes & PREFIX_DATA);
16119 }
16120 OP_E (bytemode, sizeflag);
16121 }
16122}
16123
16124static void
16125OP_Vex_2src_1 (int bytemode, int sizeflag)
16126{
16127 if (modrm.mod == 3)
16128 {
16129 /* Skip mod/rm byte. */
16130 MODRM_CHECK;
16131 codep++;
16132 }
16133
16134 if (vex.w)
5f847646
JB
16135 {
16136 unsigned int reg = vex.register_specifier;
63c6fc6c 16137 vex.register_specifier = 0;
5f847646
JB
16138
16139 if (address_mode != mode_64bit)
16140 reg &= 7;
16141 oappend (names_xmm[reg]);
16142 }
5dd85c99
SP
16143 else
16144 OP_Vex_2src (bytemode, sizeflag);
16145}
16146
16147static void
16148OP_Vex_2src_2 (int bytemode, int sizeflag)
16149{
16150 if (vex.w)
16151 OP_Vex_2src (bytemode, sizeflag);
16152 else
5f847646
JB
16153 {
16154 unsigned int reg = vex.register_specifier;
63c6fc6c 16155 vex.register_specifier = 0;
5f847646
JB
16156
16157 if (address_mode != mode_64bit)
16158 reg &= 7;
16159 oappend (names_xmm[reg]);
16160 }
5dd85c99
SP
16161}
16162
922d8de8
DR
16163static void
16164OP_EX_VexW (int bytemode, int sizeflag)
16165{
16166 int reg = -1;
16167
16168 if (!vex_w_done)
16169 {
41effecb
SP
16170 /* Skip mod/rm byte. */
16171 MODRM_CHECK;
16172 codep++;
16173
922d8de8 16174 if (vex.w)
ccc5981b 16175 reg = get_vex_imm8 (sizeflag, 0) >> 4;
922d8de8
DR
16176 }
16177 else
16178 {
16179 if (!vex.w)
ccc5981b 16180 reg = get_vex_imm8 (sizeflag, 1) >> 4;
922d8de8
DR
16181 }
16182
16183 OP_EX_VexReg (bytemode, sizeflag, reg);
922d8de8 16184
3a2430e0
JB
16185 if (vex_w_done)
16186 codep++;
16187 vex_w_done = 1;
922d8de8
DR
16188}
16189
c0f3af97
L
16190static void
16191OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16192{
16193 int reg;
b9733481
L
16194 const char **names;
16195
c0f3af97
L
16196 FETCH_DATA (the_info, codep + 1);
16197 reg = *codep++;
16198
16199 if (bytemode != x_mode)
16200 abort ();
16201
c0f3af97 16202 reg >>= 4;
5f847646
JB
16203 if (address_mode != mode_64bit)
16204 reg &= 7;
dae39acc 16205
c0f3af97
L
16206 switch (vex.length)
16207 {
16208 case 128:
b9733481 16209 names = names_xmm;
c0f3af97
L
16210 break;
16211 case 256:
b9733481 16212 names = names_ymm;
c0f3af97
L
16213 break;
16214 default:
16215 abort ();
16216 }
b9733481 16217 oappend (names[reg]);
c0f3af97
L
16218}
16219
922d8de8
DR
16220static void
16221OP_XMM_VexW (int bytemode, int sizeflag)
16222{
16223 /* Turn off the REX.W bit since it is used for swapping operands
16224 now. */
16225 rex &= ~REX_W;
16226 OP_XMM (bytemode, sizeflag);
16227}
16228
c0f3af97
L
16229static void
16230OP_EX_Vex (int bytemode, int sizeflag)
16231{
16232 if (modrm.mod != 3)
63c6fc6c 16233 need_vex_reg = 0;
c0f3af97
L
16234 OP_EX (bytemode, sizeflag);
16235}
16236
16237static void
16238OP_XMM_Vex (int bytemode, int sizeflag)
16239{
16240 if (modrm.mod != 3)
63c6fc6c 16241 need_vex_reg = 0;
c0f3af97
L
16242 OP_XMM (bytemode, sizeflag);
16243}
16244
ea397f5b
L
16245static struct op vex_cmp_op[] =
16246{
16247 { STRING_COMMA_LEN ("eq") },
16248 { STRING_COMMA_LEN ("lt") },
16249 { STRING_COMMA_LEN ("le") },
16250 { STRING_COMMA_LEN ("unord") },
16251 { STRING_COMMA_LEN ("neq") },
16252 { STRING_COMMA_LEN ("nlt") },
16253 { STRING_COMMA_LEN ("nle") },
16254 { STRING_COMMA_LEN ("ord") },
16255 { STRING_COMMA_LEN ("eq_uq") },
16256 { STRING_COMMA_LEN ("nge") },
16257 { STRING_COMMA_LEN ("ngt") },
16258 { STRING_COMMA_LEN ("false") },
16259 { STRING_COMMA_LEN ("neq_oq") },
16260 { STRING_COMMA_LEN ("ge") },
16261 { STRING_COMMA_LEN ("gt") },
16262 { STRING_COMMA_LEN ("true") },
16263 { STRING_COMMA_LEN ("eq_os") },
16264 { STRING_COMMA_LEN ("lt_oq") },
16265 { STRING_COMMA_LEN ("le_oq") },
16266 { STRING_COMMA_LEN ("unord_s") },
16267 { STRING_COMMA_LEN ("neq_us") },
16268 { STRING_COMMA_LEN ("nlt_uq") },
16269 { STRING_COMMA_LEN ("nle_uq") },
16270 { STRING_COMMA_LEN ("ord_s") },
16271 { STRING_COMMA_LEN ("eq_us") },
16272 { STRING_COMMA_LEN ("nge_uq") },
16273 { STRING_COMMA_LEN ("ngt_uq") },
16274 { STRING_COMMA_LEN ("false_os") },
16275 { STRING_COMMA_LEN ("neq_os") },
16276 { STRING_COMMA_LEN ("ge_oq") },
16277 { STRING_COMMA_LEN ("gt_oq") },
16278 { STRING_COMMA_LEN ("true_us") },
c0f3af97
L
16279};
16280
16281static void
16282VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16283{
16284 unsigned int cmp_type;
16285
16286 FETCH_DATA (the_info, codep + 1);
16287 cmp_type = *codep++ & 0xff;
16288 if (cmp_type < ARRAY_SIZE (vex_cmp_op))
16289 {
16290 char suffix [3];
ea397f5b 16291 char *p = mnemonicendp - 2;
c0f3af97
L
16292 suffix[0] = p[0];
16293 suffix[1] = p[1];
16294 suffix[2] = '\0';
ea397f5b
L
16295 sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
16296 mnemonicendp += vex_cmp_op[cmp_type].len;
c0f3af97
L
16297 }
16298 else
16299 {
16300 /* We have a reserved extension byte. Output it directly. */
16301 scratchbuf[0] = '$';
16302 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 16303 oappend_maybe_intel (scratchbuf);
c0f3af97
L
16304 scratchbuf[0] = '\0';
16305 }
16306}
16307
43234a1e
L
16308static void
16309VPCMP_Fixup (int bytemode ATTRIBUTE_UNUSED,
16310 int sizeflag ATTRIBUTE_UNUSED)
16311{
16312 unsigned int cmp_type;
16313
16314 if (!vex.evex)
16315 abort ();
16316
16317 FETCH_DATA (the_info, codep + 1);
16318 cmp_type = *codep++ & 0xff;
16319 /* There are aliases for immediates 0, 1, 2, 4, 5, 6.
16320 If it's the case, print suffix, otherwise - print the immediate. */
16321 if (cmp_type < ARRAY_SIZE (simd_cmp_op)
16322 && cmp_type != 3
16323 && cmp_type != 7)
16324 {
16325 char suffix [3];
16326 char *p = mnemonicendp - 2;
16327
16328 /* vpcmp* can have both one- and two-lettered suffix. */
16329 if (p[0] == 'p')
16330 {
16331 p++;
16332 suffix[0] = p[0];
16333 suffix[1] = '\0';
16334 }
16335 else
16336 {
16337 suffix[0] = p[0];
16338 suffix[1] = p[1];
16339 suffix[2] = '\0';
16340 }
16341
16342 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
16343 mnemonicendp += simd_cmp_op[cmp_type].len;
16344 }
be92cb14
JB
16345 else
16346 {
16347 /* We have a reserved extension byte. Output it directly. */
16348 scratchbuf[0] = '$';
16349 print_operand_value (scratchbuf + 1, 1, cmp_type);
16350 oappend_maybe_intel (scratchbuf);
16351 scratchbuf[0] = '\0';
16352 }
16353}
16354
16355static const struct op xop_cmp_op[] =
16356{
16357 { STRING_COMMA_LEN ("lt") },
16358 { STRING_COMMA_LEN ("le") },
16359 { STRING_COMMA_LEN ("gt") },
16360 { STRING_COMMA_LEN ("ge") },
16361 { STRING_COMMA_LEN ("eq") },
16362 { STRING_COMMA_LEN ("neq") },
16363 { STRING_COMMA_LEN ("false") },
16364 { STRING_COMMA_LEN ("true") }
16365};
16366
16367static void
16368VPCOM_Fixup (int bytemode ATTRIBUTE_UNUSED,
16369 int sizeflag ATTRIBUTE_UNUSED)
16370{
16371 unsigned int cmp_type;
16372
16373 FETCH_DATA (the_info, codep + 1);
16374 cmp_type = *codep++ & 0xff;
16375 if (cmp_type < ARRAY_SIZE (xop_cmp_op))
16376 {
16377 char suffix[3];
16378 char *p = mnemonicendp - 2;
16379
16380 /* vpcom* can have both one- and two-lettered suffix. */
16381 if (p[0] == 'm')
16382 {
16383 p++;
16384 suffix[0] = p[0];
16385 suffix[1] = '\0';
16386 }
16387 else
16388 {
16389 suffix[0] = p[0];
16390 suffix[1] = p[1];
16391 suffix[2] = '\0';
16392 }
16393
16394 sprintf (p, "%s%s", xop_cmp_op[cmp_type].name, suffix);
16395 mnemonicendp += xop_cmp_op[cmp_type].len;
16396 }
43234a1e
L
16397 else
16398 {
16399 /* We have a reserved extension byte. Output it directly. */
16400 scratchbuf[0] = '$';
16401 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 16402 oappend_maybe_intel (scratchbuf);
43234a1e
L
16403 scratchbuf[0] = '\0';
16404 }
16405}
16406
ea397f5b
L
16407static const struct op pclmul_op[] =
16408{
16409 { STRING_COMMA_LEN ("lql") },
16410 { STRING_COMMA_LEN ("hql") },
16411 { STRING_COMMA_LEN ("lqh") },
16412 { STRING_COMMA_LEN ("hqh") }
c0f3af97
L
16413};
16414
16415static void
16416PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
16417 int sizeflag ATTRIBUTE_UNUSED)
16418{
16419 unsigned int pclmul_type;
16420
16421 FETCH_DATA (the_info, codep + 1);
16422 pclmul_type = *codep++ & 0xff;
16423 switch (pclmul_type)
16424 {
16425 case 0x10:
16426 pclmul_type = 2;
16427 break;
16428 case 0x11:
16429 pclmul_type = 3;
16430 break;
16431 default:
16432 break;
7bb15c6f 16433 }
c0f3af97
L
16434 if (pclmul_type < ARRAY_SIZE (pclmul_op))
16435 {
16436 char suffix [4];
ea397f5b 16437 char *p = mnemonicendp - 3;
c0f3af97
L
16438 suffix[0] = p[0];
16439 suffix[1] = p[1];
16440 suffix[2] = p[2];
16441 suffix[3] = '\0';
ea397f5b
L
16442 sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
16443 mnemonicendp += pclmul_op[pclmul_type].len;
c0f3af97
L
16444 }
16445 else
16446 {
16447 /* We have a reserved extension byte. Output it directly. */
16448 scratchbuf[0] = '$';
16449 print_operand_value (scratchbuf + 1, 1, pclmul_type);
9ce09ba2 16450 oappend_maybe_intel (scratchbuf);
c0f3af97
L
16451 scratchbuf[0] = '\0';
16452 }
16453}
16454
f1f8f695
L
16455static void
16456MOVBE_Fixup (int bytemode, int sizeflag)
16457{
16458 /* Add proper suffix to "movbe". */
ea397f5b 16459 char *p = mnemonicendp;
f1f8f695
L
16460
16461 switch (bytemode)
16462 {
16463 case v_mode:
16464 if (intel_syntax)
ea397f5b 16465 goto skip;
f1f8f695
L
16466
16467 USED_REX (REX_W);
16468 if (sizeflag & SUFFIX_ALWAYS)
16469 {
16470 if (rex & REX_W)
16471 *p++ = 'q';
f1f8f695 16472 else
f16cd0d5
L
16473 {
16474 if (sizeflag & DFLAG)
16475 *p++ = 'l';
16476 else
16477 *p++ = 'w';
16478 used_prefixes |= (prefixes & PREFIX_DATA);
16479 }
f1f8f695 16480 }
f1f8f695
L
16481 break;
16482 default:
16483 oappend (INTERNAL_DISASSEMBLER_ERROR);
16484 break;
16485 }
ea397f5b 16486 mnemonicendp = p;
f1f8f695
L
16487 *p = '\0';
16488
ea397f5b 16489skip:
f1f8f695
L
16490 OP_M (bytemode, sizeflag);
16491}
f88c9eb0
SP
16492
16493static void
16494OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16495{
16496 int reg;
16497 const char **names;
16498
16499 /* Skip mod/rm byte. */
16500 MODRM_CHECK;
16501 codep++;
16502
390a6789 16503 if (rex & REX_W)
f88c9eb0 16504 names = names64;
f88c9eb0 16505 else
ce7d077e 16506 names = names32;
f88c9eb0
SP
16507
16508 reg = modrm.rm;
16509 USED_REX (REX_B);
16510 if (rex & REX_B)
16511 reg += 8;
16512
16513 oappend (names[reg]);
16514}
16515
16516static void
16517OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16518{
16519 const char **names;
5f847646 16520 unsigned int reg = vex.register_specifier;
63c6fc6c 16521 vex.register_specifier = 0;
f88c9eb0 16522
390a6789 16523 if (rex & REX_W)
f88c9eb0 16524 names = names64;
f88c9eb0 16525 else
ce7d077e 16526 names = names32;
f88c9eb0 16527
5f847646
JB
16528 if (address_mode != mode_64bit)
16529 reg &= 7;
16530 oappend (names[reg]);
f88c9eb0 16531}
43234a1e
L
16532
16533static void
16534OP_Mask (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16535{
16536 if (!vex.evex
1ba585e8 16537 || (bytemode != mask_mode && bytemode != mask_bd_mode))
43234a1e
L
16538 abort ();
16539
16540 USED_REX (REX_R);
16541 if ((rex & REX_R) != 0 || !vex.r)
16542 {
16543 BadOp ();
16544 return;
16545 }
16546
16547 oappend (names_mask [modrm.reg]);
16548}
16549
16550static void
16551OP_Rounding (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16552{
16553 if (!vex.evex
16554 || (bytemode != evex_rounding_mode
70df6fc9 16555 && bytemode != evex_rounding_64_mode
43234a1e
L
16556 && bytemode != evex_sae_mode))
16557 abort ();
16558 if (modrm.mod == 3 && vex.b)
16559 switch (bytemode)
16560 {
70df6fc9
L
16561 case evex_rounding_64_mode:
16562 if (address_mode != mode_64bit)
16563 {
16564 oappend ("(bad)");
16565 break;
16566 }
16567 /* Fall through. */
43234a1e
L
16568 case evex_rounding_mode:
16569 oappend (names_rounding[vex.ll]);
16570 break;
16571 case evex_sae_mode:
16572 oappend ("{sae}");
16573 break;
16574 default:
16575 break;
16576 }
16577}
This page took 2.984609 seconds and 4 git commands to generate.