PR25281, sh disassembler abort
[deliverable/binutils-gdb.git] / opcodes / i386-dis.c
CommitLineData
252b5132 1/* Print i386 instructions for GDB, the GNU debugger.
82704155 2 Copyright (C) 1988-2019 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 }
299#define Cm { OP_C, m_mode }
300#define Dm { OP_D, m_mode }
301#define Td { OP_T, d_mode }
b844680a 302#define Skip_MODRM { OP_Skip_MODRM, 0 }
ce518a5f
L
303
304#define RMeAX { OP_REG, eAX_reg }
305#define RMeBX { OP_REG, eBX_reg }
306#define RMeCX { OP_REG, eCX_reg }
307#define RMeDX { OP_REG, eDX_reg }
308#define RMeSP { OP_REG, eSP_reg }
309#define RMeBP { OP_REG, eBP_reg }
310#define RMeSI { OP_REG, eSI_reg }
311#define RMeDI { OP_REG, eDI_reg }
312#define RMrAX { OP_REG, rAX_reg }
313#define RMrBX { OP_REG, rBX_reg }
314#define RMrCX { OP_REG, rCX_reg }
315#define RMrDX { OP_REG, rDX_reg }
316#define RMrSP { OP_REG, rSP_reg }
317#define RMrBP { OP_REG, rBP_reg }
318#define RMrSI { OP_REG, rSI_reg }
319#define RMrDI { OP_REG, rDI_reg }
320#define RMAL { OP_REG, al_reg }
ce518a5f
L
321#define RMCL { OP_REG, cl_reg }
322#define RMDL { OP_REG, dl_reg }
323#define RMBL { OP_REG, bl_reg }
324#define RMAH { OP_REG, ah_reg }
325#define RMCH { OP_REG, ch_reg }
326#define RMDH { OP_REG, dh_reg }
327#define RMBH { OP_REG, bh_reg }
328#define RMAX { OP_REG, ax_reg }
329#define RMDX { OP_REG, dx_reg }
330
331#define eAX { OP_IMREG, eAX_reg }
332#define eBX { OP_IMREG, eBX_reg }
333#define eCX { OP_IMREG, eCX_reg }
334#define eDX { OP_IMREG, eDX_reg }
335#define eSP { OP_IMREG, eSP_reg }
336#define eBP { OP_IMREG, eBP_reg }
337#define eSI { OP_IMREG, eSI_reg }
338#define eDI { OP_IMREG, eDI_reg }
339#define AL { OP_IMREG, al_reg }
340#define CL { OP_IMREG, cl_reg }
341#define DL { OP_IMREG, dl_reg }
342#define BL { OP_IMREG, bl_reg }
343#define AH { OP_IMREG, ah_reg }
344#define CH { OP_IMREG, ch_reg }
345#define DH { OP_IMREG, dh_reg }
346#define BH { OP_IMREG, bh_reg }
347#define AX { OP_IMREG, ax_reg }
348#define DX { OP_IMREG, dx_reg }
349#define zAX { OP_IMREG, z_mode_ax_reg }
350#define indirDX { OP_IMREG, indir_dx_reg }
351
352#define Sw { OP_SEG, w_mode }
353#define Sv { OP_SEG, v_mode }
354#define Ap { OP_DIR, 0 }
355#define Ob { OP_OFF64, b_mode }
356#define Ov { OP_OFF64, v_mode }
357#define Xb { OP_DSreg, eSI_reg }
358#define Xv { OP_DSreg, eSI_reg }
359#define Xz { OP_DSreg, eSI_reg }
360#define Yb { OP_ESreg, eDI_reg }
361#define Yv { OP_ESreg, eDI_reg }
362#define DSBX { OP_DSreg, eBX_reg }
363
364#define es { OP_REG, es_reg }
365#define ss { OP_REG, ss_reg }
366#define cs { OP_REG, cs_reg }
367#define ds { OP_REG, ds_reg }
368#define fs { OP_REG, fs_reg }
369#define gs { OP_REG, gs_reg }
370
371#define MX { OP_MMX, 0 }
372#define XM { OP_XMM, 0 }
539f890d 373#define XMScalar { OP_XMM, scalar_mode }
6c30d220 374#define XMGatherQ { OP_XMM, vex_vsib_q_w_dq_mode }
c0f3af97 375#define XMM { OP_XMM, xmm_mode }
43234a1e 376#define XMxmmq { OP_XMM, xmmq_mode }
ce518a5f 377#define EM { OP_EM, v_mode }
b6169b20 378#define EMS { OP_EM, v_swap_mode }
09a2c6cf 379#define EMd { OP_EM, d_mode }
14051056 380#define EMx { OP_EM, x_mode }
53467f57 381#define EXbScalar { OP_EX, b_scalar_mode }
8976381e 382#define EXw { OP_EX, w_mode }
53467f57 383#define EXwScalar { OP_EX, w_scalar_mode }
09a2c6cf 384#define EXd { OP_EX, d_mode }
539f890d 385#define EXdScalar { OP_EX, d_scalar_mode }
fa99fab2 386#define EXdS { OP_EX, d_swap_mode }
09a2c6cf 387#define EXq { OP_EX, q_mode }
539f890d
L
388#define EXqScalar { OP_EX, q_scalar_mode }
389#define EXqScalarS { OP_EX, q_scalar_swap_mode }
b6169b20 390#define EXqS { OP_EX, q_swap_mode }
09a2c6cf 391#define EXx { OP_EX, x_mode }
b6169b20 392#define EXxS { OP_EX, x_swap_mode }
c0f3af97 393#define EXxmm { OP_EX, xmm_mode }
43234a1e 394#define EXymm { OP_EX, ymm_mode }
c0f3af97 395#define EXxmmq { OP_EX, xmmq_mode }
43234a1e 396#define EXEvexHalfBcstXmmq { OP_EX, evex_half_bcst_xmmq_mode }
6c30d220
L
397#define EXxmm_mb { OP_EX, xmm_mb_mode }
398#define EXxmm_mw { OP_EX, xmm_mw_mode }
399#define EXxmm_md { OP_EX, xmm_md_mode }
400#define EXxmm_mq { OP_EX, xmm_mq_mode }
43234a1e 401#define EXxmm_mdq { OP_EX, xmm_mdq_mode }
6c30d220
L
402#define EXxmmdw { OP_EX, xmmdw_mode }
403#define EXxmmqd { OP_EX, xmmqd_mode }
c0f3af97 404#define EXymmq { OP_EX, ymmq_mode }
0bfee649 405#define EXVexWdq { OP_EX, vex_w_dq_mode }
1c480963 406#define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
43234a1e
L
407#define EXEvexXGscat { OP_EX, evex_x_gscat_mode }
408#define EXEvexXNoBcst { OP_EX, evex_x_nobcst_mode }
ce518a5f
L
409#define MS { OP_MS, v_mode }
410#define XS { OP_XS, v_mode }
09335d05 411#define EMCq { OP_EMC, q_mode }
ce518a5f 412#define MXC { OP_MXC, 0 }
ce518a5f 413#define OPSUF { OP_3DNowSuffix, 0 }
ad19981d 414#define CMP { CMP_Fixup, 0 }
42903f7f 415#define XMM0 { XMM_Fixup, 0 }
eacc9c89 416#define FXSAVE { FXSAVE_Fixup, 0 }
5dd85c99
SP
417#define Vex_2src_1 { OP_Vex_2src_1, 0 }
418#define Vex_2src_2 { OP_Vex_2src_2, 0 }
252b5132 419
c0f3af97 420#define Vex { OP_VEX, vex_mode }
539f890d 421#define VexScalar { OP_VEX, vex_scalar_mode }
6c30d220 422#define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode }
c0f3af97
L
423#define Vex128 { OP_VEX, vex128_mode }
424#define Vex256 { OP_VEX, vex256_mode }
cb21baef 425#define VexGdq { OP_VEX, dq_mode }
539f890d 426#define EXdVexScalarS { OP_EX_Vex, d_scalar_swap_mode }
539f890d 427#define EXqVexScalarS { OP_EX_Vex, q_scalar_swap_mode }
922d8de8
DR
428#define EXVexW { OP_EX_VexW, x_mode }
429#define EXdVexW { OP_EX_VexW, d_mode }
430#define EXqVexW { OP_EX_VexW, q_mode }
a683cc34 431#define EXVexImmW { OP_EX_VexImmW, x_mode }
539f890d 432#define XMVexScalar { OP_XMM_Vex, scalar_mode }
922d8de8 433#define XMVexW { OP_XMM_VexW, 0 }
c0f3af97
L
434#define XMVexI4 { OP_REG_VexI4, x_mode }
435#define PCLMUL { PCLMUL_Fixup, 0 }
c0f3af97 436#define VCMP { VCMP_Fixup, 0 }
43234a1e 437#define VPCMP { VPCMP_Fixup, 0 }
be92cb14 438#define VPCOM { VPCOM_Fixup, 0 }
43234a1e
L
439
440#define EXxEVexR { OP_Rounding, evex_rounding_mode }
70df6fc9 441#define EXxEVexR64 { OP_Rounding, evex_rounding_64_mode }
43234a1e
L
442#define EXxEVexS { OP_Rounding, evex_sae_mode }
443
444#define XMask { OP_Mask, mask_mode }
445#define MaskG { OP_G, mask_mode }
446#define MaskE { OP_E, mask_mode }
1ba585e8 447#define MaskBDE { OP_E, mask_bd_mode }
43234a1e
L
448#define MaskR { OP_R, mask_mode }
449#define MaskVex { OP_VEX, mask_mode }
c0f3af97 450
6c30d220 451#define MVexVSIBDWpX { OP_M, vex_vsib_d_w_dq_mode }
5fc35d96 452#define MVexVSIBDQWpX { OP_M, vex_vsib_d_w_d_mode }
6c30d220 453#define MVexVSIBQWpX { OP_M, vex_vsib_q_w_dq_mode }
5fc35d96 454#define MVexVSIBQDWpX { OP_M, vex_vsib_q_w_d_mode }
6c30d220 455
35c52694 456/* Used handle "rep" prefix for string instructions. */
ce518a5f
L
457#define Xbr { REP_Fixup, eSI_reg }
458#define Xvr { REP_Fixup, eSI_reg }
459#define Ybr { REP_Fixup, eDI_reg }
460#define Yvr { REP_Fixup, eDI_reg }
461#define Yzr { REP_Fixup, eDI_reg }
462#define indirDXr { REP_Fixup, indir_dx_reg }
463#define ALr { REP_Fixup, al_reg }
464#define eAXr { REP_Fixup, eAX_reg }
465
42164a71
L
466/* Used handle HLE prefix for lockable instructions. */
467#define Ebh1 { HLE_Fixup1, b_mode }
468#define Evh1 { HLE_Fixup1, v_mode }
469#define Ebh2 { HLE_Fixup2, b_mode }
470#define Evh2 { HLE_Fixup2, v_mode }
471#define Ebh3 { HLE_Fixup3, b_mode }
472#define Evh3 { HLE_Fixup3, v_mode }
473
7e8b059b 474#define BND { BND_Fixup, 0 }
04ef582a 475#define NOTRACK { NOTRACK_Fixup, 0 }
7e8b059b 476
ce518a5f
L
477#define cond_jump_flag { NULL, cond_jump_mode }
478#define loop_jcxz_flag { NULL, loop_jcxz_mode }
3ffd33cf 479
252b5132 480/* bits in sizeflag */
252b5132 481#define SUFFIX_ALWAYS 4
252b5132
RH
482#define AFLAG 2
483#define DFLAG 1
484
51e7da1b
L
485enum
486{
487 /* byte operand */
488 b_mode = 1,
489 /* byte operand with operand swapped */
3873ba12 490 b_swap_mode,
e3949f17
L
491 /* byte operand, sign extend like 'T' suffix */
492 b_T_mode,
51e7da1b 493 /* operand size depends on prefixes */
3873ba12 494 v_mode,
51e7da1b 495 /* operand size depends on prefixes with operand swapped */
3873ba12 496 v_swap_mode,
de89d0a3
IT
497 /* operand size depends on address prefix */
498 va_mode,
51e7da1b 499 /* word operand */
3873ba12 500 w_mode,
51e7da1b 501 /* double word operand */
3873ba12 502 d_mode,
51e7da1b 503 /* double word operand with operand swapped */
3873ba12 504 d_swap_mode,
51e7da1b 505 /* quad word operand */
3873ba12 506 q_mode,
51e7da1b 507 /* quad word operand with operand swapped */
3873ba12 508 q_swap_mode,
51e7da1b 509 /* ten-byte operand */
3873ba12 510 t_mode,
43234a1e
L
511 /* 16-byte XMM, 32-byte YMM or 64-byte ZMM operand. In EVEX with
512 broadcast enabled. */
3873ba12 513 x_mode,
43234a1e
L
514 /* Similar to x_mode, but with different EVEX mem shifts. */
515 evex_x_gscat_mode,
516 /* Similar to x_mode, but with disabled broadcast. */
517 evex_x_nobcst_mode,
518 /* Similar to x_mode, but with operands swapped and disabled broadcast
519 in EVEX. */
3873ba12 520 x_swap_mode,
51e7da1b 521 /* 16-byte XMM operand */
3873ba12 522 xmm_mode,
43234a1e
L
523 /* XMM, XMM or YMM register operand, or quad word, xmmword or ymmword
524 memory operand (depending on vector length). Broadcast isn't
525 allowed. */
3873ba12 526 xmmq_mode,
43234a1e
L
527 /* Same as xmmq_mode, but broadcast is allowed. */
528 evex_half_bcst_xmmq_mode,
6c30d220
L
529 /* XMM register or byte memory operand */
530 xmm_mb_mode,
531 /* XMM register or word memory operand */
532 xmm_mw_mode,
533 /* XMM register or double word memory operand */
534 xmm_md_mode,
535 /* XMM register or quad word memory operand */
536 xmm_mq_mode,
43234a1e
L
537 /* XMM register or double/quad word memory operand, depending on
538 VEX.W. */
539 xmm_mdq_mode,
540 /* 16-byte XMM, word, double word or quad word operand. */
6c30d220 541 xmmdw_mode,
43234a1e 542 /* 16-byte XMM, double word, quad word operand or xmm word operand. */
6c30d220 543 xmmqd_mode,
43234a1e
L
544 /* 32-byte YMM operand */
545 ymm_mode,
546 /* quad word, ymmword or zmmword memory operand. */
3873ba12 547 ymmq_mode,
6c30d220
L
548 /* 32-byte YMM or 16-byte word operand */
549 ymmxmm_mode,
51e7da1b 550 /* d_mode in 32bit, q_mode in 64bit mode. */
3873ba12 551 m_mode,
51e7da1b 552 /* pair of v_mode operands */
3873ba12
L
553 a_mode,
554 cond_jump_mode,
555 loop_jcxz_mode,
7e8b059b 556 v_bnd_mode,
d276ec69
JB
557 /* like v_bnd_mode in 32bit, no RIP-rel in 64bit mode. */
558 v_bndmk_mode,
51e7da1b 559 /* operand size depends on REX prefixes. */
3873ba12 560 dq_mode,
51e7da1b 561 /* registers like dq_mode, memory like w_mode. */
3873ba12 562 dqw_mode,
9f79e886 563 /* bounds operand */
7e8b059b 564 bnd_mode,
9f79e886
JB
565 /* bounds operand with operand swapped */
566 bnd_swap_mode,
51e7da1b 567 /* 4- or 6-byte pointer operand */
3873ba12
L
568 f_mode,
569 const_1_mode,
07f5af7d
L
570 /* v_mode for indirect branch opcodes. */
571 indir_v_mode,
51e7da1b 572 /* v_mode for stack-related opcodes. */
3873ba12 573 stack_v_mode,
51e7da1b 574 /* non-quad operand size depends on prefixes */
3873ba12 575 z_mode,
51e7da1b 576 /* 16-byte operand */
3873ba12 577 o_mode,
51e7da1b 578 /* registers like dq_mode, memory like b_mode. */
3873ba12 579 dqb_mode,
1ba585e8
IT
580 /* registers like d_mode, memory like b_mode. */
581 db_mode,
582 /* registers like d_mode, memory like w_mode. */
583 dw_mode,
51e7da1b 584 /* registers like dq_mode, memory like d_mode. */
3873ba12 585 dqd_mode,
51e7da1b 586 /* normal vex mode */
3873ba12 587 vex_mode,
51e7da1b 588 /* 128bit vex mode */
3873ba12 589 vex128_mode,
51e7da1b 590 /* 256bit vex mode */
3873ba12 591 vex256_mode,
51e7da1b 592 /* operand size depends on the VEX.W bit. */
3873ba12 593 vex_w_dq_mode,
d55ee72f 594
6c30d220
L
595 /* Similar to vex_w_dq_mode, with VSIB dword indices. */
596 vex_vsib_d_w_dq_mode,
5fc35d96
IT
597 /* Similar to vex_vsib_d_w_dq_mode, with smaller memory. */
598 vex_vsib_d_w_d_mode,
6c30d220
L
599 /* Similar to vex_w_dq_mode, with VSIB qword indices. */
600 vex_vsib_q_w_dq_mode,
5fc35d96
IT
601 /* Similar to vex_vsib_q_w_dq_mode, with smaller memory. */
602 vex_vsib_q_w_d_mode,
6c30d220 603
539f890d
L
604 /* scalar, ignore vector length. */
605 scalar_mode,
53467f57
IT
606 /* like b_mode, ignore vector length. */
607 b_scalar_mode,
608 /* like w_mode, ignore vector length. */
609 w_scalar_mode,
539f890d
L
610 /* like d_mode, ignore vector length. */
611 d_scalar_mode,
612 /* like d_swap_mode, ignore vector length. */
613 d_scalar_swap_mode,
614 /* like q_mode, ignore vector length. */
615 q_scalar_mode,
616 /* like q_swap_mode, ignore vector length. */
617 q_scalar_swap_mode,
618 /* like vex_mode, ignore vector length. */
619 vex_scalar_mode,
1c480963
L
620 /* like vex_w_dq_mode, ignore vector length. */
621 vex_scalar_w_dq_mode,
539f890d 622
43234a1e
L
623 /* Static rounding. */
624 evex_rounding_mode,
70df6fc9
L
625 /* Static rounding, 64-bit mode only. */
626 evex_rounding_64_mode,
43234a1e
L
627 /* Supress all exceptions. */
628 evex_sae_mode,
629
630 /* Mask register operand. */
631 mask_mode,
1ba585e8
IT
632 /* Mask register operand. */
633 mask_bd_mode,
43234a1e 634
3873ba12
L
635 es_reg,
636 cs_reg,
637 ss_reg,
638 ds_reg,
639 fs_reg,
640 gs_reg,
d55ee72f 641
3873ba12
L
642 eAX_reg,
643 eCX_reg,
644 eDX_reg,
645 eBX_reg,
646 eSP_reg,
647 eBP_reg,
648 eSI_reg,
649 eDI_reg,
d55ee72f 650
3873ba12
L
651 al_reg,
652 cl_reg,
653 dl_reg,
654 bl_reg,
655 ah_reg,
656 ch_reg,
657 dh_reg,
658 bh_reg,
d55ee72f 659
3873ba12
L
660 ax_reg,
661 cx_reg,
662 dx_reg,
663 bx_reg,
664 sp_reg,
665 bp_reg,
666 si_reg,
667 di_reg,
d55ee72f 668
3873ba12
L
669 rAX_reg,
670 rCX_reg,
671 rDX_reg,
672 rBX_reg,
673 rSP_reg,
674 rBP_reg,
675 rSI_reg,
676 rDI_reg,
d55ee72f 677
3873ba12
L
678 z_mode_ax_reg,
679 indir_dx_reg
51e7da1b 680};
252b5132 681
51e7da1b
L
682enum
683{
684 FLOATCODE = 1,
3873ba12
L
685 USE_REG_TABLE,
686 USE_MOD_TABLE,
687 USE_RM_TABLE,
688 USE_PREFIX_TABLE,
689 USE_X86_64_TABLE,
690 USE_3BYTE_TABLE,
f88c9eb0 691 USE_XOP_8F_TABLE,
3873ba12
L
692 USE_VEX_C4_TABLE,
693 USE_VEX_C5_TABLE,
9e30b8e0 694 USE_VEX_LEN_TABLE,
43234a1e 695 USE_VEX_W_TABLE,
04e2a182
L
696 USE_EVEX_TABLE,
697 USE_EVEX_LEN_TABLE
51e7da1b 698};
6439fc28 699
bf890a93 700#define FLOAT NULL, { { NULL, FLOATCODE } }, 0
4efba78c 701
bf890a93
IT
702#define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }, 0
703#define DIS386_PREFIX(T, I, P) NULL, { { NULL, (T)}, { NULL, (I) } }, P
1ceb70f8
L
704#define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
705#define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
706#define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
707#define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
4e7d34a6
L
708#define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
709#define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
bf890a93 710#define THREE_BYTE_TABLE_PREFIX(I, P) DIS386_PREFIX (USE_3BYTE_TABLE, (I), P)
f88c9eb0 711#define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
c0f3af97
L
712#define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
713#define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
714#define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
9e30b8e0 715#define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
43234a1e 716#define EVEX_TABLE(I) DIS386 (USE_EVEX_TABLE, (I))
04e2a182 717#define EVEX_LEN_TABLE(I) DIS386 (USE_EVEX_LEN_TABLE, (I))
1ceb70f8 718
51e7da1b
L
719enum
720{
721 REG_80 = 0,
3873ba12 722 REG_81,
7148c369 723 REG_83,
3873ba12
L
724 REG_8F,
725 REG_C0,
726 REG_C1,
727 REG_C6,
728 REG_C7,
729 REG_D0,
730 REG_D1,
731 REG_D2,
732 REG_D3,
733 REG_F6,
734 REG_F7,
735 REG_FE,
736 REG_FF,
737 REG_0F00,
738 REG_0F01,
739 REG_0F0D,
740 REG_0F18,
f8687e93
JB
741 REG_0F1C_P_0_MOD_0,
742 REG_0F1E_P_1_MOD_3,
3873ba12
L
743 REG_0F71,
744 REG_0F72,
745 REG_0F73,
746 REG_0FA6,
747 REG_0FA7,
748 REG_0FAE,
749 REG_0FBA,
750 REG_0FC7,
592a252b
L
751 REG_VEX_0F71,
752 REG_VEX_0F72,
753 REG_VEX_0F73,
754 REG_VEX_0FAE,
f12dc422 755 REG_VEX_0F38F3,
f88c9eb0 756 REG_XOP_LWPCB,
2a2a0f38
QN
757 REG_XOP_LWP,
758 REG_XOP_TBM_01,
43234a1e
L
759 REG_XOP_TBM_02,
760
1ba585e8 761 REG_EVEX_0F71,
43234a1e
L
762 REG_EVEX_0F72,
763 REG_EVEX_0F73,
764 REG_EVEX_0F38C6,
765 REG_EVEX_0F38C7
51e7da1b 766};
1ceb70f8 767
51e7da1b
L
768enum
769{
770 MOD_8D = 0,
42164a71
L
771 MOD_C6_REG_7,
772 MOD_C7_REG_7,
4a357820
MZ
773 MOD_FF_REG_3,
774 MOD_FF_REG_5,
3873ba12
L
775 MOD_0F01_REG_0,
776 MOD_0F01_REG_1,
777 MOD_0F01_REG_2,
778 MOD_0F01_REG_3,
8eab4136 779 MOD_0F01_REG_5,
3873ba12
L
780 MOD_0F01_REG_7,
781 MOD_0F12_PREFIX_0,
782 MOD_0F13,
783 MOD_0F16_PREFIX_0,
784 MOD_0F17,
785 MOD_0F18_REG_0,
786 MOD_0F18_REG_1,
787 MOD_0F18_REG_2,
788 MOD_0F18_REG_3,
d7189fa5
RM
789 MOD_0F18_REG_4,
790 MOD_0F18_REG_5,
791 MOD_0F18_REG_6,
792 MOD_0F18_REG_7,
7e8b059b
L
793 MOD_0F1A_PREFIX_0,
794 MOD_0F1B_PREFIX_0,
795 MOD_0F1B_PREFIX_1,
c48935d7 796 MOD_0F1C_PREFIX_0,
603555e5 797 MOD_0F1E_PREFIX_1,
3873ba12
L
798 MOD_0F24,
799 MOD_0F26,
800 MOD_0F2B_PREFIX_0,
801 MOD_0F2B_PREFIX_1,
802 MOD_0F2B_PREFIX_2,
803 MOD_0F2B_PREFIX_3,
804 MOD_0F51,
805 MOD_0F71_REG_2,
806 MOD_0F71_REG_4,
807 MOD_0F71_REG_6,
808 MOD_0F72_REG_2,
809 MOD_0F72_REG_4,
810 MOD_0F72_REG_6,
811 MOD_0F73_REG_2,
812 MOD_0F73_REG_3,
813 MOD_0F73_REG_6,
814 MOD_0F73_REG_7,
815 MOD_0FAE_REG_0,
816 MOD_0FAE_REG_1,
817 MOD_0FAE_REG_2,
818 MOD_0FAE_REG_3,
819 MOD_0FAE_REG_4,
820 MOD_0FAE_REG_5,
821 MOD_0FAE_REG_6,
822 MOD_0FAE_REG_7,
823 MOD_0FB2,
824 MOD_0FB4,
825 MOD_0FB5,
a8484f96 826 MOD_0FC3,
963f3586
IT
827 MOD_0FC7_REG_3,
828 MOD_0FC7_REG_4,
829 MOD_0FC7_REG_5,
3873ba12
L
830 MOD_0FC7_REG_6,
831 MOD_0FC7_REG_7,
832 MOD_0FD7,
833 MOD_0FE7_PREFIX_2,
834 MOD_0FF0_PREFIX_3,
835 MOD_0F382A_PREFIX_2,
603555e5
L
836 MOD_0F38F5_PREFIX_2,
837 MOD_0F38F6_PREFIX_0,
5d79adc4 838 MOD_0F38F8_PREFIX_1,
c0a30a9f 839 MOD_0F38F8_PREFIX_2,
5d79adc4 840 MOD_0F38F8_PREFIX_3,
c0a30a9f 841 MOD_0F38F9_PREFIX_0,
3873ba12
L
842 MOD_62_32BIT,
843 MOD_C4_32BIT,
844 MOD_C5_32BIT,
592a252b
L
845 MOD_VEX_0F12_PREFIX_0,
846 MOD_VEX_0F13,
847 MOD_VEX_0F16_PREFIX_0,
848 MOD_VEX_0F17,
849 MOD_VEX_0F2B,
ab4e4ed5
AF
850 MOD_VEX_W_0_0F41_P_0_LEN_1,
851 MOD_VEX_W_1_0F41_P_0_LEN_1,
852 MOD_VEX_W_0_0F41_P_2_LEN_1,
853 MOD_VEX_W_1_0F41_P_2_LEN_1,
854 MOD_VEX_W_0_0F42_P_0_LEN_1,
855 MOD_VEX_W_1_0F42_P_0_LEN_1,
856 MOD_VEX_W_0_0F42_P_2_LEN_1,
857 MOD_VEX_W_1_0F42_P_2_LEN_1,
858 MOD_VEX_W_0_0F44_P_0_LEN_1,
859 MOD_VEX_W_1_0F44_P_0_LEN_1,
860 MOD_VEX_W_0_0F44_P_2_LEN_1,
861 MOD_VEX_W_1_0F44_P_2_LEN_1,
862 MOD_VEX_W_0_0F45_P_0_LEN_1,
863 MOD_VEX_W_1_0F45_P_0_LEN_1,
864 MOD_VEX_W_0_0F45_P_2_LEN_1,
865 MOD_VEX_W_1_0F45_P_2_LEN_1,
866 MOD_VEX_W_0_0F46_P_0_LEN_1,
867 MOD_VEX_W_1_0F46_P_0_LEN_1,
868 MOD_VEX_W_0_0F46_P_2_LEN_1,
869 MOD_VEX_W_1_0F46_P_2_LEN_1,
870 MOD_VEX_W_0_0F47_P_0_LEN_1,
871 MOD_VEX_W_1_0F47_P_0_LEN_1,
872 MOD_VEX_W_0_0F47_P_2_LEN_1,
873 MOD_VEX_W_1_0F47_P_2_LEN_1,
874 MOD_VEX_W_0_0F4A_P_0_LEN_1,
875 MOD_VEX_W_1_0F4A_P_0_LEN_1,
876 MOD_VEX_W_0_0F4A_P_2_LEN_1,
877 MOD_VEX_W_1_0F4A_P_2_LEN_1,
878 MOD_VEX_W_0_0F4B_P_0_LEN_1,
879 MOD_VEX_W_1_0F4B_P_0_LEN_1,
880 MOD_VEX_W_0_0F4B_P_2_LEN_1,
592a252b
L
881 MOD_VEX_0F50,
882 MOD_VEX_0F71_REG_2,
883 MOD_VEX_0F71_REG_4,
884 MOD_VEX_0F71_REG_6,
885 MOD_VEX_0F72_REG_2,
886 MOD_VEX_0F72_REG_4,
887 MOD_VEX_0F72_REG_6,
888 MOD_VEX_0F73_REG_2,
889 MOD_VEX_0F73_REG_3,
890 MOD_VEX_0F73_REG_6,
891 MOD_VEX_0F73_REG_7,
ab4e4ed5
AF
892 MOD_VEX_W_0_0F91_P_0_LEN_0,
893 MOD_VEX_W_1_0F91_P_0_LEN_0,
894 MOD_VEX_W_0_0F91_P_2_LEN_0,
895 MOD_VEX_W_1_0F91_P_2_LEN_0,
896 MOD_VEX_W_0_0F92_P_0_LEN_0,
897 MOD_VEX_W_0_0F92_P_2_LEN_0,
58a211d2 898 MOD_VEX_0F92_P_3_LEN_0,
ab4e4ed5
AF
899 MOD_VEX_W_0_0F93_P_0_LEN_0,
900 MOD_VEX_W_0_0F93_P_2_LEN_0,
58a211d2 901 MOD_VEX_0F93_P_3_LEN_0,
ab4e4ed5
AF
902 MOD_VEX_W_0_0F98_P_0_LEN_0,
903 MOD_VEX_W_1_0F98_P_0_LEN_0,
904 MOD_VEX_W_0_0F98_P_2_LEN_0,
905 MOD_VEX_W_1_0F98_P_2_LEN_0,
906 MOD_VEX_W_0_0F99_P_0_LEN_0,
907 MOD_VEX_W_1_0F99_P_0_LEN_0,
908 MOD_VEX_W_0_0F99_P_2_LEN_0,
909 MOD_VEX_W_1_0F99_P_2_LEN_0,
592a252b
L
910 MOD_VEX_0FAE_REG_2,
911 MOD_VEX_0FAE_REG_3,
912 MOD_VEX_0FD7_PREFIX_2,
913 MOD_VEX_0FE7_PREFIX_2,
914 MOD_VEX_0FF0_PREFIX_3,
592a252b
L
915 MOD_VEX_0F381A_PREFIX_2,
916 MOD_VEX_0F382A_PREFIX_2,
917 MOD_VEX_0F382C_PREFIX_2,
918 MOD_VEX_0F382D_PREFIX_2,
919 MOD_VEX_0F382E_PREFIX_2,
6c30d220
L
920 MOD_VEX_0F382F_PREFIX_2,
921 MOD_VEX_0F385A_PREFIX_2,
922 MOD_VEX_0F388C_PREFIX_2,
923 MOD_VEX_0F388E_PREFIX_2,
ab4e4ed5
AF
924 MOD_VEX_W_0_0F3A30_P_2_LEN_0,
925 MOD_VEX_W_1_0F3A30_P_2_LEN_0,
926 MOD_VEX_W_0_0F3A31_P_2_LEN_0,
927 MOD_VEX_W_1_0F3A31_P_2_LEN_0,
928 MOD_VEX_W_0_0F3A32_P_2_LEN_0,
929 MOD_VEX_W_1_0F3A32_P_2_LEN_0,
930 MOD_VEX_W_0_0F3A33_P_2_LEN_0,
931 MOD_VEX_W_1_0F3A33_P_2_LEN_0,
43234a1e 932
43234a1e
L
933 MOD_EVEX_0F12_PREFIX_0,
934 MOD_EVEX_0F16_PREFIX_0,
935 MOD_EVEX_0F38C6_REG_1,
936 MOD_EVEX_0F38C6_REG_2,
937 MOD_EVEX_0F38C6_REG_5,
938 MOD_EVEX_0F38C6_REG_6,
939 MOD_EVEX_0F38C7_REG_1,
940 MOD_EVEX_0F38C7_REG_2,
941 MOD_EVEX_0F38C7_REG_5,
942 MOD_EVEX_0F38C7_REG_6
51e7da1b 943};
1ceb70f8 944
51e7da1b
L
945enum
946{
42164a71
L
947 RM_C6_REG_7 = 0,
948 RM_C7_REG_7,
949 RM_0F01_REG_0,
3873ba12
L
950 RM_0F01_REG_1,
951 RM_0F01_REG_2,
952 RM_0F01_REG_3,
f8687e93
JB
953 RM_0F01_REG_5_MOD_3,
954 RM_0F01_REG_7_MOD_3,
955 RM_0F1E_P_1_MOD_3_REG_7,
956 RM_0FAE_REG_6_MOD_3_P_0,
957 RM_0FAE_REG_7_MOD_3,
51e7da1b 958};
1ceb70f8 959
51e7da1b
L
960enum
961{
962 PREFIX_90 = 0,
f8687e93
JB
963 PREFIX_0F01_REG_5_MOD_0,
964 PREFIX_0F01_REG_5_MOD_3_RM_0,
965 PREFIX_0F01_REG_5_MOD_3_RM_2,
267b8516
JB
966 PREFIX_0F01_REG_7_MOD_3_RM_2,
967 PREFIX_0F01_REG_7_MOD_3_RM_3,
3233d7d0 968 PREFIX_0F09,
3873ba12
L
969 PREFIX_0F10,
970 PREFIX_0F11,
971 PREFIX_0F12,
972 PREFIX_0F16,
7e8b059b
L
973 PREFIX_0F1A,
974 PREFIX_0F1B,
c48935d7 975 PREFIX_0F1C,
603555e5 976 PREFIX_0F1E,
3873ba12
L
977 PREFIX_0F2A,
978 PREFIX_0F2B,
979 PREFIX_0F2C,
980 PREFIX_0F2D,
981 PREFIX_0F2E,
982 PREFIX_0F2F,
983 PREFIX_0F51,
984 PREFIX_0F52,
985 PREFIX_0F53,
986 PREFIX_0F58,
987 PREFIX_0F59,
988 PREFIX_0F5A,
989 PREFIX_0F5B,
990 PREFIX_0F5C,
991 PREFIX_0F5D,
992 PREFIX_0F5E,
993 PREFIX_0F5F,
994 PREFIX_0F60,
995 PREFIX_0F61,
996 PREFIX_0F62,
997 PREFIX_0F6C,
998 PREFIX_0F6D,
999 PREFIX_0F6F,
1000 PREFIX_0F70,
1001 PREFIX_0F73_REG_3,
1002 PREFIX_0F73_REG_7,
1003 PREFIX_0F78,
1004 PREFIX_0F79,
1005 PREFIX_0F7C,
1006 PREFIX_0F7D,
1007 PREFIX_0F7E,
1008 PREFIX_0F7F,
f8687e93
JB
1009 PREFIX_0FAE_REG_0_MOD_3,
1010 PREFIX_0FAE_REG_1_MOD_3,
1011 PREFIX_0FAE_REG_2_MOD_3,
1012 PREFIX_0FAE_REG_3_MOD_3,
1013 PREFIX_0FAE_REG_4_MOD_0,
1014 PREFIX_0FAE_REG_4_MOD_3,
1015 PREFIX_0FAE_REG_5_MOD_0,
1016 PREFIX_0FAE_REG_5_MOD_3,
1017 PREFIX_0FAE_REG_6_MOD_0,
1018 PREFIX_0FAE_REG_6_MOD_3,
1019 PREFIX_0FAE_REG_7_MOD_0,
3873ba12 1020 PREFIX_0FB8,
f12dc422 1021 PREFIX_0FBC,
3873ba12
L
1022 PREFIX_0FBD,
1023 PREFIX_0FC2,
f8687e93
JB
1024 PREFIX_0FC3_MOD_0,
1025 PREFIX_0FC7_REG_6_MOD_0,
1026 PREFIX_0FC7_REG_6_MOD_3,
1027 PREFIX_0FC7_REG_7_MOD_3,
3873ba12
L
1028 PREFIX_0FD0,
1029 PREFIX_0FD6,
1030 PREFIX_0FE6,
1031 PREFIX_0FE7,
1032 PREFIX_0FF0,
1033 PREFIX_0FF7,
1034 PREFIX_0F3810,
1035 PREFIX_0F3814,
1036 PREFIX_0F3815,
1037 PREFIX_0F3817,
1038 PREFIX_0F3820,
1039 PREFIX_0F3821,
1040 PREFIX_0F3822,
1041 PREFIX_0F3823,
1042 PREFIX_0F3824,
1043 PREFIX_0F3825,
1044 PREFIX_0F3828,
1045 PREFIX_0F3829,
1046 PREFIX_0F382A,
1047 PREFIX_0F382B,
1048 PREFIX_0F3830,
1049 PREFIX_0F3831,
1050 PREFIX_0F3832,
1051 PREFIX_0F3833,
1052 PREFIX_0F3834,
1053 PREFIX_0F3835,
1054 PREFIX_0F3837,
1055 PREFIX_0F3838,
1056 PREFIX_0F3839,
1057 PREFIX_0F383A,
1058 PREFIX_0F383B,
1059 PREFIX_0F383C,
1060 PREFIX_0F383D,
1061 PREFIX_0F383E,
1062 PREFIX_0F383F,
1063 PREFIX_0F3840,
1064 PREFIX_0F3841,
1065 PREFIX_0F3880,
1066 PREFIX_0F3881,
6c30d220 1067 PREFIX_0F3882,
a0046408
L
1068 PREFIX_0F38C8,
1069 PREFIX_0F38C9,
1070 PREFIX_0F38CA,
1071 PREFIX_0F38CB,
1072 PREFIX_0F38CC,
1073 PREFIX_0F38CD,
48521003 1074 PREFIX_0F38CF,
3873ba12
L
1075 PREFIX_0F38DB,
1076 PREFIX_0F38DC,
1077 PREFIX_0F38DD,
1078 PREFIX_0F38DE,
1079 PREFIX_0F38DF,
1080 PREFIX_0F38F0,
1081 PREFIX_0F38F1,
603555e5 1082 PREFIX_0F38F5,
e2e1fcde 1083 PREFIX_0F38F6,
c0a30a9f
L
1084 PREFIX_0F38F8,
1085 PREFIX_0F38F9,
3873ba12
L
1086 PREFIX_0F3A08,
1087 PREFIX_0F3A09,
1088 PREFIX_0F3A0A,
1089 PREFIX_0F3A0B,
1090 PREFIX_0F3A0C,
1091 PREFIX_0F3A0D,
1092 PREFIX_0F3A0E,
1093 PREFIX_0F3A14,
1094 PREFIX_0F3A15,
1095 PREFIX_0F3A16,
1096 PREFIX_0F3A17,
1097 PREFIX_0F3A20,
1098 PREFIX_0F3A21,
1099 PREFIX_0F3A22,
1100 PREFIX_0F3A40,
1101 PREFIX_0F3A41,
1102 PREFIX_0F3A42,
1103 PREFIX_0F3A44,
1104 PREFIX_0F3A60,
1105 PREFIX_0F3A61,
1106 PREFIX_0F3A62,
1107 PREFIX_0F3A63,
a0046408 1108 PREFIX_0F3ACC,
48521003
IT
1109 PREFIX_0F3ACE,
1110 PREFIX_0F3ACF,
3873ba12 1111 PREFIX_0F3ADF,
592a252b
L
1112 PREFIX_VEX_0F10,
1113 PREFIX_VEX_0F11,
1114 PREFIX_VEX_0F12,
1115 PREFIX_VEX_0F16,
1116 PREFIX_VEX_0F2A,
1117 PREFIX_VEX_0F2C,
1118 PREFIX_VEX_0F2D,
1119 PREFIX_VEX_0F2E,
1120 PREFIX_VEX_0F2F,
43234a1e
L
1121 PREFIX_VEX_0F41,
1122 PREFIX_VEX_0F42,
1123 PREFIX_VEX_0F44,
1124 PREFIX_VEX_0F45,
1125 PREFIX_VEX_0F46,
1126 PREFIX_VEX_0F47,
1ba585e8 1127 PREFIX_VEX_0F4A,
43234a1e 1128 PREFIX_VEX_0F4B,
592a252b
L
1129 PREFIX_VEX_0F51,
1130 PREFIX_VEX_0F52,
1131 PREFIX_VEX_0F53,
1132 PREFIX_VEX_0F58,
1133 PREFIX_VEX_0F59,
1134 PREFIX_VEX_0F5A,
1135 PREFIX_VEX_0F5B,
1136 PREFIX_VEX_0F5C,
1137 PREFIX_VEX_0F5D,
1138 PREFIX_VEX_0F5E,
1139 PREFIX_VEX_0F5F,
1140 PREFIX_VEX_0F60,
1141 PREFIX_VEX_0F61,
1142 PREFIX_VEX_0F62,
1143 PREFIX_VEX_0F63,
1144 PREFIX_VEX_0F64,
1145 PREFIX_VEX_0F65,
1146 PREFIX_VEX_0F66,
1147 PREFIX_VEX_0F67,
1148 PREFIX_VEX_0F68,
1149 PREFIX_VEX_0F69,
1150 PREFIX_VEX_0F6A,
1151 PREFIX_VEX_0F6B,
1152 PREFIX_VEX_0F6C,
1153 PREFIX_VEX_0F6D,
1154 PREFIX_VEX_0F6E,
1155 PREFIX_VEX_0F6F,
1156 PREFIX_VEX_0F70,
1157 PREFIX_VEX_0F71_REG_2,
1158 PREFIX_VEX_0F71_REG_4,
1159 PREFIX_VEX_0F71_REG_6,
1160 PREFIX_VEX_0F72_REG_2,
1161 PREFIX_VEX_0F72_REG_4,
1162 PREFIX_VEX_0F72_REG_6,
1163 PREFIX_VEX_0F73_REG_2,
1164 PREFIX_VEX_0F73_REG_3,
1165 PREFIX_VEX_0F73_REG_6,
1166 PREFIX_VEX_0F73_REG_7,
1167 PREFIX_VEX_0F74,
1168 PREFIX_VEX_0F75,
1169 PREFIX_VEX_0F76,
1170 PREFIX_VEX_0F77,
1171 PREFIX_VEX_0F7C,
1172 PREFIX_VEX_0F7D,
1173 PREFIX_VEX_0F7E,
1174 PREFIX_VEX_0F7F,
43234a1e
L
1175 PREFIX_VEX_0F90,
1176 PREFIX_VEX_0F91,
1177 PREFIX_VEX_0F92,
1178 PREFIX_VEX_0F93,
1179 PREFIX_VEX_0F98,
1ba585e8 1180 PREFIX_VEX_0F99,
592a252b
L
1181 PREFIX_VEX_0FC2,
1182 PREFIX_VEX_0FC4,
1183 PREFIX_VEX_0FC5,
1184 PREFIX_VEX_0FD0,
1185 PREFIX_VEX_0FD1,
1186 PREFIX_VEX_0FD2,
1187 PREFIX_VEX_0FD3,
1188 PREFIX_VEX_0FD4,
1189 PREFIX_VEX_0FD5,
1190 PREFIX_VEX_0FD6,
1191 PREFIX_VEX_0FD7,
1192 PREFIX_VEX_0FD8,
1193 PREFIX_VEX_0FD9,
1194 PREFIX_VEX_0FDA,
1195 PREFIX_VEX_0FDB,
1196 PREFIX_VEX_0FDC,
1197 PREFIX_VEX_0FDD,
1198 PREFIX_VEX_0FDE,
1199 PREFIX_VEX_0FDF,
1200 PREFIX_VEX_0FE0,
1201 PREFIX_VEX_0FE1,
1202 PREFIX_VEX_0FE2,
1203 PREFIX_VEX_0FE3,
1204 PREFIX_VEX_0FE4,
1205 PREFIX_VEX_0FE5,
1206 PREFIX_VEX_0FE6,
1207 PREFIX_VEX_0FE7,
1208 PREFIX_VEX_0FE8,
1209 PREFIX_VEX_0FE9,
1210 PREFIX_VEX_0FEA,
1211 PREFIX_VEX_0FEB,
1212 PREFIX_VEX_0FEC,
1213 PREFIX_VEX_0FED,
1214 PREFIX_VEX_0FEE,
1215 PREFIX_VEX_0FEF,
1216 PREFIX_VEX_0FF0,
1217 PREFIX_VEX_0FF1,
1218 PREFIX_VEX_0FF2,
1219 PREFIX_VEX_0FF3,
1220 PREFIX_VEX_0FF4,
1221 PREFIX_VEX_0FF5,
1222 PREFIX_VEX_0FF6,
1223 PREFIX_VEX_0FF7,
1224 PREFIX_VEX_0FF8,
1225 PREFIX_VEX_0FF9,
1226 PREFIX_VEX_0FFA,
1227 PREFIX_VEX_0FFB,
1228 PREFIX_VEX_0FFC,
1229 PREFIX_VEX_0FFD,
1230 PREFIX_VEX_0FFE,
1231 PREFIX_VEX_0F3800,
1232 PREFIX_VEX_0F3801,
1233 PREFIX_VEX_0F3802,
1234 PREFIX_VEX_0F3803,
1235 PREFIX_VEX_0F3804,
1236 PREFIX_VEX_0F3805,
1237 PREFIX_VEX_0F3806,
1238 PREFIX_VEX_0F3807,
1239 PREFIX_VEX_0F3808,
1240 PREFIX_VEX_0F3809,
1241 PREFIX_VEX_0F380A,
1242 PREFIX_VEX_0F380B,
1243 PREFIX_VEX_0F380C,
1244 PREFIX_VEX_0F380D,
1245 PREFIX_VEX_0F380E,
1246 PREFIX_VEX_0F380F,
1247 PREFIX_VEX_0F3813,
6c30d220 1248 PREFIX_VEX_0F3816,
592a252b
L
1249 PREFIX_VEX_0F3817,
1250 PREFIX_VEX_0F3818,
1251 PREFIX_VEX_0F3819,
1252 PREFIX_VEX_0F381A,
1253 PREFIX_VEX_0F381C,
1254 PREFIX_VEX_0F381D,
1255 PREFIX_VEX_0F381E,
1256 PREFIX_VEX_0F3820,
1257 PREFIX_VEX_0F3821,
1258 PREFIX_VEX_0F3822,
1259 PREFIX_VEX_0F3823,
1260 PREFIX_VEX_0F3824,
1261 PREFIX_VEX_0F3825,
1262 PREFIX_VEX_0F3828,
1263 PREFIX_VEX_0F3829,
1264 PREFIX_VEX_0F382A,
1265 PREFIX_VEX_0F382B,
1266 PREFIX_VEX_0F382C,
1267 PREFIX_VEX_0F382D,
1268 PREFIX_VEX_0F382E,
1269 PREFIX_VEX_0F382F,
1270 PREFIX_VEX_0F3830,
1271 PREFIX_VEX_0F3831,
1272 PREFIX_VEX_0F3832,
1273 PREFIX_VEX_0F3833,
1274 PREFIX_VEX_0F3834,
1275 PREFIX_VEX_0F3835,
6c30d220 1276 PREFIX_VEX_0F3836,
592a252b
L
1277 PREFIX_VEX_0F3837,
1278 PREFIX_VEX_0F3838,
1279 PREFIX_VEX_0F3839,
1280 PREFIX_VEX_0F383A,
1281 PREFIX_VEX_0F383B,
1282 PREFIX_VEX_0F383C,
1283 PREFIX_VEX_0F383D,
1284 PREFIX_VEX_0F383E,
1285 PREFIX_VEX_0F383F,
1286 PREFIX_VEX_0F3840,
1287 PREFIX_VEX_0F3841,
6c30d220
L
1288 PREFIX_VEX_0F3845,
1289 PREFIX_VEX_0F3846,
1290 PREFIX_VEX_0F3847,
1291 PREFIX_VEX_0F3858,
1292 PREFIX_VEX_0F3859,
1293 PREFIX_VEX_0F385A,
1294 PREFIX_VEX_0F3878,
1295 PREFIX_VEX_0F3879,
1296 PREFIX_VEX_0F388C,
1297 PREFIX_VEX_0F388E,
1298 PREFIX_VEX_0F3890,
1299 PREFIX_VEX_0F3891,
1300 PREFIX_VEX_0F3892,
1301 PREFIX_VEX_0F3893,
592a252b
L
1302 PREFIX_VEX_0F3896,
1303 PREFIX_VEX_0F3897,
1304 PREFIX_VEX_0F3898,
1305 PREFIX_VEX_0F3899,
1306 PREFIX_VEX_0F389A,
1307 PREFIX_VEX_0F389B,
1308 PREFIX_VEX_0F389C,
1309 PREFIX_VEX_0F389D,
1310 PREFIX_VEX_0F389E,
1311 PREFIX_VEX_0F389F,
1312 PREFIX_VEX_0F38A6,
1313 PREFIX_VEX_0F38A7,
1314 PREFIX_VEX_0F38A8,
1315 PREFIX_VEX_0F38A9,
1316 PREFIX_VEX_0F38AA,
1317 PREFIX_VEX_0F38AB,
1318 PREFIX_VEX_0F38AC,
1319 PREFIX_VEX_0F38AD,
1320 PREFIX_VEX_0F38AE,
1321 PREFIX_VEX_0F38AF,
1322 PREFIX_VEX_0F38B6,
1323 PREFIX_VEX_0F38B7,
1324 PREFIX_VEX_0F38B8,
1325 PREFIX_VEX_0F38B9,
1326 PREFIX_VEX_0F38BA,
1327 PREFIX_VEX_0F38BB,
1328 PREFIX_VEX_0F38BC,
1329 PREFIX_VEX_0F38BD,
1330 PREFIX_VEX_0F38BE,
1331 PREFIX_VEX_0F38BF,
48521003 1332 PREFIX_VEX_0F38CF,
592a252b
L
1333 PREFIX_VEX_0F38DB,
1334 PREFIX_VEX_0F38DC,
1335 PREFIX_VEX_0F38DD,
1336 PREFIX_VEX_0F38DE,
1337 PREFIX_VEX_0F38DF,
f12dc422
L
1338 PREFIX_VEX_0F38F2,
1339 PREFIX_VEX_0F38F3_REG_1,
1340 PREFIX_VEX_0F38F3_REG_2,
1341 PREFIX_VEX_0F38F3_REG_3,
6c30d220
L
1342 PREFIX_VEX_0F38F5,
1343 PREFIX_VEX_0F38F6,
f12dc422 1344 PREFIX_VEX_0F38F7,
6c30d220
L
1345 PREFIX_VEX_0F3A00,
1346 PREFIX_VEX_0F3A01,
1347 PREFIX_VEX_0F3A02,
592a252b
L
1348 PREFIX_VEX_0F3A04,
1349 PREFIX_VEX_0F3A05,
1350 PREFIX_VEX_0F3A06,
1351 PREFIX_VEX_0F3A08,
1352 PREFIX_VEX_0F3A09,
1353 PREFIX_VEX_0F3A0A,
1354 PREFIX_VEX_0F3A0B,
1355 PREFIX_VEX_0F3A0C,
1356 PREFIX_VEX_0F3A0D,
1357 PREFIX_VEX_0F3A0E,
1358 PREFIX_VEX_0F3A0F,
1359 PREFIX_VEX_0F3A14,
1360 PREFIX_VEX_0F3A15,
1361 PREFIX_VEX_0F3A16,
1362 PREFIX_VEX_0F3A17,
1363 PREFIX_VEX_0F3A18,
1364 PREFIX_VEX_0F3A19,
1365 PREFIX_VEX_0F3A1D,
1366 PREFIX_VEX_0F3A20,
1367 PREFIX_VEX_0F3A21,
1368 PREFIX_VEX_0F3A22,
43234a1e 1369 PREFIX_VEX_0F3A30,
1ba585e8 1370 PREFIX_VEX_0F3A31,
43234a1e 1371 PREFIX_VEX_0F3A32,
1ba585e8 1372 PREFIX_VEX_0F3A33,
6c30d220
L
1373 PREFIX_VEX_0F3A38,
1374 PREFIX_VEX_0F3A39,
592a252b
L
1375 PREFIX_VEX_0F3A40,
1376 PREFIX_VEX_0F3A41,
1377 PREFIX_VEX_0F3A42,
1378 PREFIX_VEX_0F3A44,
6c30d220 1379 PREFIX_VEX_0F3A46,
592a252b
L
1380 PREFIX_VEX_0F3A48,
1381 PREFIX_VEX_0F3A49,
1382 PREFIX_VEX_0F3A4A,
1383 PREFIX_VEX_0F3A4B,
1384 PREFIX_VEX_0F3A4C,
1385 PREFIX_VEX_0F3A5C,
1386 PREFIX_VEX_0F3A5D,
1387 PREFIX_VEX_0F3A5E,
1388 PREFIX_VEX_0F3A5F,
1389 PREFIX_VEX_0F3A60,
1390 PREFIX_VEX_0F3A61,
1391 PREFIX_VEX_0F3A62,
1392 PREFIX_VEX_0F3A63,
1393 PREFIX_VEX_0F3A68,
1394 PREFIX_VEX_0F3A69,
1395 PREFIX_VEX_0F3A6A,
1396 PREFIX_VEX_0F3A6B,
1397 PREFIX_VEX_0F3A6C,
1398 PREFIX_VEX_0F3A6D,
1399 PREFIX_VEX_0F3A6E,
1400 PREFIX_VEX_0F3A6F,
1401 PREFIX_VEX_0F3A78,
1402 PREFIX_VEX_0F3A79,
1403 PREFIX_VEX_0F3A7A,
1404 PREFIX_VEX_0F3A7B,
1405 PREFIX_VEX_0F3A7C,
1406 PREFIX_VEX_0F3A7D,
1407 PREFIX_VEX_0F3A7E,
1408 PREFIX_VEX_0F3A7F,
48521003
IT
1409 PREFIX_VEX_0F3ACE,
1410 PREFIX_VEX_0F3ACF,
6c30d220 1411 PREFIX_VEX_0F3ADF,
43234a1e
L
1412 PREFIX_VEX_0F3AF0,
1413
1414 PREFIX_EVEX_0F10,
1415 PREFIX_EVEX_0F11,
1416 PREFIX_EVEX_0F12,
1417 PREFIX_EVEX_0F13,
1418 PREFIX_EVEX_0F14,
1419 PREFIX_EVEX_0F15,
1420 PREFIX_EVEX_0F16,
1421 PREFIX_EVEX_0F17,
1422 PREFIX_EVEX_0F28,
1423 PREFIX_EVEX_0F29,
1424 PREFIX_EVEX_0F2A,
1425 PREFIX_EVEX_0F2B,
1426 PREFIX_EVEX_0F2C,
1427 PREFIX_EVEX_0F2D,
1428 PREFIX_EVEX_0F2E,
1429 PREFIX_EVEX_0F2F,
1430 PREFIX_EVEX_0F51,
90a915bf
IT
1431 PREFIX_EVEX_0F54,
1432 PREFIX_EVEX_0F55,
1433 PREFIX_EVEX_0F56,
1434 PREFIX_EVEX_0F57,
43234a1e
L
1435 PREFIX_EVEX_0F58,
1436 PREFIX_EVEX_0F59,
1437 PREFIX_EVEX_0F5A,
1438 PREFIX_EVEX_0F5B,
1439 PREFIX_EVEX_0F5C,
1440 PREFIX_EVEX_0F5D,
1441 PREFIX_EVEX_0F5E,
1442 PREFIX_EVEX_0F5F,
1ba585e8
IT
1443 PREFIX_EVEX_0F60,
1444 PREFIX_EVEX_0F61,
43234a1e 1445 PREFIX_EVEX_0F62,
1ba585e8
IT
1446 PREFIX_EVEX_0F63,
1447 PREFIX_EVEX_0F64,
1448 PREFIX_EVEX_0F65,
43234a1e 1449 PREFIX_EVEX_0F66,
1ba585e8
IT
1450 PREFIX_EVEX_0F67,
1451 PREFIX_EVEX_0F68,
1452 PREFIX_EVEX_0F69,
43234a1e 1453 PREFIX_EVEX_0F6A,
1ba585e8 1454 PREFIX_EVEX_0F6B,
43234a1e
L
1455 PREFIX_EVEX_0F6C,
1456 PREFIX_EVEX_0F6D,
1457 PREFIX_EVEX_0F6E,
1458 PREFIX_EVEX_0F6F,
1459 PREFIX_EVEX_0F70,
1ba585e8
IT
1460 PREFIX_EVEX_0F71_REG_2,
1461 PREFIX_EVEX_0F71_REG_4,
1462 PREFIX_EVEX_0F71_REG_6,
43234a1e
L
1463 PREFIX_EVEX_0F72_REG_0,
1464 PREFIX_EVEX_0F72_REG_1,
1465 PREFIX_EVEX_0F72_REG_2,
1466 PREFIX_EVEX_0F72_REG_4,
1467 PREFIX_EVEX_0F72_REG_6,
1468 PREFIX_EVEX_0F73_REG_2,
1ba585e8 1469 PREFIX_EVEX_0F73_REG_3,
43234a1e 1470 PREFIX_EVEX_0F73_REG_6,
1ba585e8
IT
1471 PREFIX_EVEX_0F73_REG_7,
1472 PREFIX_EVEX_0F74,
1473 PREFIX_EVEX_0F75,
43234a1e
L
1474 PREFIX_EVEX_0F76,
1475 PREFIX_EVEX_0F78,
1476 PREFIX_EVEX_0F79,
1477 PREFIX_EVEX_0F7A,
1478 PREFIX_EVEX_0F7B,
1479 PREFIX_EVEX_0F7E,
1480 PREFIX_EVEX_0F7F,
1481 PREFIX_EVEX_0FC2,
1ba585e8
IT
1482 PREFIX_EVEX_0FC4,
1483 PREFIX_EVEX_0FC5,
43234a1e 1484 PREFIX_EVEX_0FC6,
1ba585e8 1485 PREFIX_EVEX_0FD1,
43234a1e
L
1486 PREFIX_EVEX_0FD2,
1487 PREFIX_EVEX_0FD3,
1488 PREFIX_EVEX_0FD4,
1ba585e8 1489 PREFIX_EVEX_0FD5,
43234a1e 1490 PREFIX_EVEX_0FD6,
1ba585e8
IT
1491 PREFIX_EVEX_0FD8,
1492 PREFIX_EVEX_0FD9,
1493 PREFIX_EVEX_0FDA,
43234a1e 1494 PREFIX_EVEX_0FDB,
1ba585e8
IT
1495 PREFIX_EVEX_0FDC,
1496 PREFIX_EVEX_0FDD,
1497 PREFIX_EVEX_0FDE,
43234a1e 1498 PREFIX_EVEX_0FDF,
1ba585e8
IT
1499 PREFIX_EVEX_0FE0,
1500 PREFIX_EVEX_0FE1,
43234a1e 1501 PREFIX_EVEX_0FE2,
1ba585e8
IT
1502 PREFIX_EVEX_0FE3,
1503 PREFIX_EVEX_0FE4,
1504 PREFIX_EVEX_0FE5,
43234a1e
L
1505 PREFIX_EVEX_0FE6,
1506 PREFIX_EVEX_0FE7,
1ba585e8
IT
1507 PREFIX_EVEX_0FE8,
1508 PREFIX_EVEX_0FE9,
1509 PREFIX_EVEX_0FEA,
43234a1e 1510 PREFIX_EVEX_0FEB,
1ba585e8
IT
1511 PREFIX_EVEX_0FEC,
1512 PREFIX_EVEX_0FED,
1513 PREFIX_EVEX_0FEE,
43234a1e 1514 PREFIX_EVEX_0FEF,
1ba585e8 1515 PREFIX_EVEX_0FF1,
43234a1e
L
1516 PREFIX_EVEX_0FF2,
1517 PREFIX_EVEX_0FF3,
1518 PREFIX_EVEX_0FF4,
1ba585e8
IT
1519 PREFIX_EVEX_0FF5,
1520 PREFIX_EVEX_0FF6,
1521 PREFIX_EVEX_0FF8,
1522 PREFIX_EVEX_0FF9,
43234a1e
L
1523 PREFIX_EVEX_0FFA,
1524 PREFIX_EVEX_0FFB,
1ba585e8
IT
1525 PREFIX_EVEX_0FFC,
1526 PREFIX_EVEX_0FFD,
43234a1e 1527 PREFIX_EVEX_0FFE,
1ba585e8
IT
1528 PREFIX_EVEX_0F3800,
1529 PREFIX_EVEX_0F3804,
1530 PREFIX_EVEX_0F380B,
43234a1e
L
1531 PREFIX_EVEX_0F380C,
1532 PREFIX_EVEX_0F380D,
1ba585e8 1533 PREFIX_EVEX_0F3810,
43234a1e
L
1534 PREFIX_EVEX_0F3811,
1535 PREFIX_EVEX_0F3812,
1536 PREFIX_EVEX_0F3813,
1537 PREFIX_EVEX_0F3814,
1538 PREFIX_EVEX_0F3815,
1539 PREFIX_EVEX_0F3816,
1540 PREFIX_EVEX_0F3818,
1541 PREFIX_EVEX_0F3819,
1542 PREFIX_EVEX_0F381A,
1543 PREFIX_EVEX_0F381B,
1ba585e8
IT
1544 PREFIX_EVEX_0F381C,
1545 PREFIX_EVEX_0F381D,
43234a1e
L
1546 PREFIX_EVEX_0F381E,
1547 PREFIX_EVEX_0F381F,
1ba585e8 1548 PREFIX_EVEX_0F3820,
43234a1e
L
1549 PREFIX_EVEX_0F3821,
1550 PREFIX_EVEX_0F3822,
1551 PREFIX_EVEX_0F3823,
1552 PREFIX_EVEX_0F3824,
1553 PREFIX_EVEX_0F3825,
1ba585e8 1554 PREFIX_EVEX_0F3826,
43234a1e
L
1555 PREFIX_EVEX_0F3827,
1556 PREFIX_EVEX_0F3828,
1557 PREFIX_EVEX_0F3829,
1558 PREFIX_EVEX_0F382A,
1ba585e8 1559 PREFIX_EVEX_0F382B,
43234a1e
L
1560 PREFIX_EVEX_0F382C,
1561 PREFIX_EVEX_0F382D,
1ba585e8 1562 PREFIX_EVEX_0F3830,
43234a1e
L
1563 PREFIX_EVEX_0F3831,
1564 PREFIX_EVEX_0F3832,
1565 PREFIX_EVEX_0F3833,
1566 PREFIX_EVEX_0F3834,
1567 PREFIX_EVEX_0F3835,
1568 PREFIX_EVEX_0F3836,
1569 PREFIX_EVEX_0F3837,
1ba585e8 1570 PREFIX_EVEX_0F3838,
43234a1e
L
1571 PREFIX_EVEX_0F3839,
1572 PREFIX_EVEX_0F383A,
1573 PREFIX_EVEX_0F383B,
1ba585e8 1574 PREFIX_EVEX_0F383C,
43234a1e 1575 PREFIX_EVEX_0F383D,
1ba585e8 1576 PREFIX_EVEX_0F383E,
43234a1e
L
1577 PREFIX_EVEX_0F383F,
1578 PREFIX_EVEX_0F3840,
1579 PREFIX_EVEX_0F3842,
1580 PREFIX_EVEX_0F3843,
1581 PREFIX_EVEX_0F3844,
1582 PREFIX_EVEX_0F3845,
1583 PREFIX_EVEX_0F3846,
1584 PREFIX_EVEX_0F3847,
1585 PREFIX_EVEX_0F384C,
1586 PREFIX_EVEX_0F384D,
1587 PREFIX_EVEX_0F384E,
1588 PREFIX_EVEX_0F384F,
8cfcb765
IT
1589 PREFIX_EVEX_0F3850,
1590 PREFIX_EVEX_0F3851,
47acf0bd
IT
1591 PREFIX_EVEX_0F3852,
1592 PREFIX_EVEX_0F3853,
ee6872be 1593 PREFIX_EVEX_0F3854,
620214f7 1594 PREFIX_EVEX_0F3855,
43234a1e
L
1595 PREFIX_EVEX_0F3858,
1596 PREFIX_EVEX_0F3859,
1597 PREFIX_EVEX_0F385A,
1598 PREFIX_EVEX_0F385B,
53467f57
IT
1599 PREFIX_EVEX_0F3862,
1600 PREFIX_EVEX_0F3863,
43234a1e
L
1601 PREFIX_EVEX_0F3864,
1602 PREFIX_EVEX_0F3865,
1ba585e8 1603 PREFIX_EVEX_0F3866,
9186c494 1604 PREFIX_EVEX_0F3868,
53467f57
IT
1605 PREFIX_EVEX_0F3870,
1606 PREFIX_EVEX_0F3871,
1607 PREFIX_EVEX_0F3872,
1608 PREFIX_EVEX_0F3873,
1ba585e8 1609 PREFIX_EVEX_0F3875,
43234a1e
L
1610 PREFIX_EVEX_0F3876,
1611 PREFIX_EVEX_0F3877,
1ba585e8
IT
1612 PREFIX_EVEX_0F3878,
1613 PREFIX_EVEX_0F3879,
1614 PREFIX_EVEX_0F387A,
1615 PREFIX_EVEX_0F387B,
43234a1e 1616 PREFIX_EVEX_0F387C,
1ba585e8 1617 PREFIX_EVEX_0F387D,
43234a1e
L
1618 PREFIX_EVEX_0F387E,
1619 PREFIX_EVEX_0F387F,
14f195c9 1620 PREFIX_EVEX_0F3883,
43234a1e
L
1621 PREFIX_EVEX_0F3888,
1622 PREFIX_EVEX_0F3889,
1623 PREFIX_EVEX_0F388A,
1624 PREFIX_EVEX_0F388B,
1ba585e8 1625 PREFIX_EVEX_0F388D,
ee6872be 1626 PREFIX_EVEX_0F388F,
43234a1e
L
1627 PREFIX_EVEX_0F3890,
1628 PREFIX_EVEX_0F3891,
1629 PREFIX_EVEX_0F3892,
1630 PREFIX_EVEX_0F3893,
1631 PREFIX_EVEX_0F3896,
1632 PREFIX_EVEX_0F3897,
1633 PREFIX_EVEX_0F3898,
1634 PREFIX_EVEX_0F3899,
1635 PREFIX_EVEX_0F389A,
1636 PREFIX_EVEX_0F389B,
1637 PREFIX_EVEX_0F389C,
1638 PREFIX_EVEX_0F389D,
1639 PREFIX_EVEX_0F389E,
1640 PREFIX_EVEX_0F389F,
1641 PREFIX_EVEX_0F38A0,
1642 PREFIX_EVEX_0F38A1,
1643 PREFIX_EVEX_0F38A2,
1644 PREFIX_EVEX_0F38A3,
1645 PREFIX_EVEX_0F38A6,
1646 PREFIX_EVEX_0F38A7,
1647 PREFIX_EVEX_0F38A8,
1648 PREFIX_EVEX_0F38A9,
1649 PREFIX_EVEX_0F38AA,
1650 PREFIX_EVEX_0F38AB,
1651 PREFIX_EVEX_0F38AC,
1652 PREFIX_EVEX_0F38AD,
1653 PREFIX_EVEX_0F38AE,
1654 PREFIX_EVEX_0F38AF,
2cc1b5aa
IT
1655 PREFIX_EVEX_0F38B4,
1656 PREFIX_EVEX_0F38B5,
43234a1e
L
1657 PREFIX_EVEX_0F38B6,
1658 PREFIX_EVEX_0F38B7,
1659 PREFIX_EVEX_0F38B8,
1660 PREFIX_EVEX_0F38B9,
1661 PREFIX_EVEX_0F38BA,
1662 PREFIX_EVEX_0F38BB,
1663 PREFIX_EVEX_0F38BC,
1664 PREFIX_EVEX_0F38BD,
1665 PREFIX_EVEX_0F38BE,
1666 PREFIX_EVEX_0F38BF,
1667 PREFIX_EVEX_0F38C4,
1668 PREFIX_EVEX_0F38C6_REG_1,
1669 PREFIX_EVEX_0F38C6_REG_2,
1670 PREFIX_EVEX_0F38C6_REG_5,
1671 PREFIX_EVEX_0F38C6_REG_6,
1672 PREFIX_EVEX_0F38C7_REG_1,
1673 PREFIX_EVEX_0F38C7_REG_2,
1674 PREFIX_EVEX_0F38C7_REG_5,
1675 PREFIX_EVEX_0F38C7_REG_6,
1676 PREFIX_EVEX_0F38C8,
1677 PREFIX_EVEX_0F38CA,
1678 PREFIX_EVEX_0F38CB,
1679 PREFIX_EVEX_0F38CC,
1680 PREFIX_EVEX_0F38CD,
48521003 1681 PREFIX_EVEX_0F38CF,
8dcf1fad
IT
1682 PREFIX_EVEX_0F38DC,
1683 PREFIX_EVEX_0F38DD,
1684 PREFIX_EVEX_0F38DE,
1685 PREFIX_EVEX_0F38DF,
43234a1e
L
1686
1687 PREFIX_EVEX_0F3A00,
1688 PREFIX_EVEX_0F3A01,
1689 PREFIX_EVEX_0F3A03,
1690 PREFIX_EVEX_0F3A04,
1691 PREFIX_EVEX_0F3A05,
1692 PREFIX_EVEX_0F3A08,
1693 PREFIX_EVEX_0F3A09,
1694 PREFIX_EVEX_0F3A0A,
1695 PREFIX_EVEX_0F3A0B,
1ba585e8
IT
1696 PREFIX_EVEX_0F3A0F,
1697 PREFIX_EVEX_0F3A14,
1698 PREFIX_EVEX_0F3A15,
90a915bf 1699 PREFIX_EVEX_0F3A16,
43234a1e
L
1700 PREFIX_EVEX_0F3A17,
1701 PREFIX_EVEX_0F3A18,
1702 PREFIX_EVEX_0F3A19,
1703 PREFIX_EVEX_0F3A1A,
1704 PREFIX_EVEX_0F3A1B,
1705 PREFIX_EVEX_0F3A1D,
1706 PREFIX_EVEX_0F3A1E,
1707 PREFIX_EVEX_0F3A1F,
1ba585e8 1708 PREFIX_EVEX_0F3A20,
43234a1e 1709 PREFIX_EVEX_0F3A21,
90a915bf 1710 PREFIX_EVEX_0F3A22,
43234a1e
L
1711 PREFIX_EVEX_0F3A23,
1712 PREFIX_EVEX_0F3A25,
1713 PREFIX_EVEX_0F3A26,
1714 PREFIX_EVEX_0F3A27,
1715 PREFIX_EVEX_0F3A38,
1716 PREFIX_EVEX_0F3A39,
1717 PREFIX_EVEX_0F3A3A,
1718 PREFIX_EVEX_0F3A3B,
1ba585e8
IT
1719 PREFIX_EVEX_0F3A3E,
1720 PREFIX_EVEX_0F3A3F,
1721 PREFIX_EVEX_0F3A42,
43234a1e 1722 PREFIX_EVEX_0F3A43,
ff1982d5 1723 PREFIX_EVEX_0F3A44,
90a915bf
IT
1724 PREFIX_EVEX_0F3A50,
1725 PREFIX_EVEX_0F3A51,
43234a1e 1726 PREFIX_EVEX_0F3A54,
90a915bf
IT
1727 PREFIX_EVEX_0F3A55,
1728 PREFIX_EVEX_0F3A56,
1729 PREFIX_EVEX_0F3A57,
1730 PREFIX_EVEX_0F3A66,
53467f57
IT
1731 PREFIX_EVEX_0F3A67,
1732 PREFIX_EVEX_0F3A70,
1733 PREFIX_EVEX_0F3A71,
1734 PREFIX_EVEX_0F3A72,
48521003
IT
1735 PREFIX_EVEX_0F3A73,
1736 PREFIX_EVEX_0F3ACE,
1737 PREFIX_EVEX_0F3ACF
51e7da1b 1738};
4e7d34a6 1739
51e7da1b
L
1740enum
1741{
1742 X86_64_06 = 0,
3873ba12
L
1743 X86_64_07,
1744 X86_64_0D,
1745 X86_64_16,
1746 X86_64_17,
1747 X86_64_1E,
1748 X86_64_1F,
1749 X86_64_27,
1750 X86_64_2F,
1751 X86_64_37,
1752 X86_64_3F,
1753 X86_64_60,
1754 X86_64_61,
1755 X86_64_62,
1756 X86_64_63,
1757 X86_64_6D,
1758 X86_64_6F,
d039fef3 1759 X86_64_82,
3873ba12
L
1760 X86_64_9A,
1761 X86_64_C4,
1762 X86_64_C5,
1763 X86_64_CE,
1764 X86_64_D4,
1765 X86_64_D5,
a72d2af2
L
1766 X86_64_E8,
1767 X86_64_E9,
3873ba12
L
1768 X86_64_EA,
1769 X86_64_0F01_REG_0,
1770 X86_64_0F01_REG_1,
1771 X86_64_0F01_REG_2,
1772 X86_64_0F01_REG_3
51e7da1b 1773};
4e7d34a6 1774
51e7da1b
L
1775enum
1776{
1777 THREE_BYTE_0F38 = 0,
1f334aeb 1778 THREE_BYTE_0F3A
51e7da1b 1779};
4e7d34a6 1780
f88c9eb0
SP
1781enum
1782{
5dd85c99
SP
1783 XOP_08 = 0,
1784 XOP_09,
f88c9eb0
SP
1785 XOP_0A
1786};
1787
51e7da1b
L
1788enum
1789{
1790 VEX_0F = 0,
3873ba12
L
1791 VEX_0F38,
1792 VEX_0F3A
51e7da1b 1793};
c0f3af97 1794
43234a1e
L
1795enum
1796{
1797 EVEX_0F = 0,
1798 EVEX_0F38,
1799 EVEX_0F3A
1800};
1801
51e7da1b
L
1802enum
1803{
ec6f095a 1804 VEX_LEN_0F12_P_0_M_0 = 0,
592a252b
L
1805 VEX_LEN_0F12_P_0_M_1,
1806 VEX_LEN_0F12_P_2,
1807 VEX_LEN_0F13_M_0,
1808 VEX_LEN_0F16_P_0_M_0,
1809 VEX_LEN_0F16_P_0_M_1,
1810 VEX_LEN_0F16_P_2,
1811 VEX_LEN_0F17_M_0,
43234a1e 1812 VEX_LEN_0F41_P_0,
1ba585e8 1813 VEX_LEN_0F41_P_2,
43234a1e 1814 VEX_LEN_0F42_P_0,
1ba585e8 1815 VEX_LEN_0F42_P_2,
43234a1e 1816 VEX_LEN_0F44_P_0,
1ba585e8 1817 VEX_LEN_0F44_P_2,
43234a1e 1818 VEX_LEN_0F45_P_0,
1ba585e8 1819 VEX_LEN_0F45_P_2,
43234a1e 1820 VEX_LEN_0F46_P_0,
1ba585e8 1821 VEX_LEN_0F46_P_2,
43234a1e 1822 VEX_LEN_0F47_P_0,
1ba585e8
IT
1823 VEX_LEN_0F47_P_2,
1824 VEX_LEN_0F4A_P_0,
1825 VEX_LEN_0F4A_P_2,
1826 VEX_LEN_0F4B_P_0,
43234a1e 1827 VEX_LEN_0F4B_P_2,
592a252b 1828 VEX_LEN_0F6E_P_2,
ec6f095a 1829 VEX_LEN_0F77_P_0,
592a252b
L
1830 VEX_LEN_0F7E_P_1,
1831 VEX_LEN_0F7E_P_2,
43234a1e 1832 VEX_LEN_0F90_P_0,
1ba585e8 1833 VEX_LEN_0F90_P_2,
43234a1e 1834 VEX_LEN_0F91_P_0,
1ba585e8 1835 VEX_LEN_0F91_P_2,
43234a1e 1836 VEX_LEN_0F92_P_0,
90a915bf 1837 VEX_LEN_0F92_P_2,
1ba585e8 1838 VEX_LEN_0F92_P_3,
43234a1e 1839 VEX_LEN_0F93_P_0,
90a915bf 1840 VEX_LEN_0F93_P_2,
1ba585e8 1841 VEX_LEN_0F93_P_3,
43234a1e 1842 VEX_LEN_0F98_P_0,
1ba585e8
IT
1843 VEX_LEN_0F98_P_2,
1844 VEX_LEN_0F99_P_0,
1845 VEX_LEN_0F99_P_2,
592a252b
L
1846 VEX_LEN_0FAE_R_2_M_0,
1847 VEX_LEN_0FAE_R_3_M_0,
592a252b
L
1848 VEX_LEN_0FC4_P_2,
1849 VEX_LEN_0FC5_P_2,
592a252b 1850 VEX_LEN_0FD6_P_2,
592a252b 1851 VEX_LEN_0FF7_P_2,
6c30d220
L
1852 VEX_LEN_0F3816_P_2,
1853 VEX_LEN_0F3819_P_2,
592a252b 1854 VEX_LEN_0F381A_P_2_M_0,
6c30d220 1855 VEX_LEN_0F3836_P_2,
592a252b 1856 VEX_LEN_0F3841_P_2,
6c30d220 1857 VEX_LEN_0F385A_P_2_M_0,
592a252b 1858 VEX_LEN_0F38DB_P_2,
f12dc422
L
1859 VEX_LEN_0F38F2_P_0,
1860 VEX_LEN_0F38F3_R_1_P_0,
1861 VEX_LEN_0F38F3_R_2_P_0,
1862 VEX_LEN_0F38F3_R_3_P_0,
6c30d220
L
1863 VEX_LEN_0F38F5_P_0,
1864 VEX_LEN_0F38F5_P_1,
1865 VEX_LEN_0F38F5_P_3,
1866 VEX_LEN_0F38F6_P_3,
f12dc422 1867 VEX_LEN_0F38F7_P_0,
6c30d220
L
1868 VEX_LEN_0F38F7_P_1,
1869 VEX_LEN_0F38F7_P_2,
1870 VEX_LEN_0F38F7_P_3,
1871 VEX_LEN_0F3A00_P_2,
1872 VEX_LEN_0F3A01_P_2,
592a252b 1873 VEX_LEN_0F3A06_P_2,
592a252b
L
1874 VEX_LEN_0F3A14_P_2,
1875 VEX_LEN_0F3A15_P_2,
1876 VEX_LEN_0F3A16_P_2,
1877 VEX_LEN_0F3A17_P_2,
1878 VEX_LEN_0F3A18_P_2,
1879 VEX_LEN_0F3A19_P_2,
1880 VEX_LEN_0F3A20_P_2,
1881 VEX_LEN_0F3A21_P_2,
1882 VEX_LEN_0F3A22_P_2,
43234a1e 1883 VEX_LEN_0F3A30_P_2,
1ba585e8 1884 VEX_LEN_0F3A31_P_2,
43234a1e 1885 VEX_LEN_0F3A32_P_2,
1ba585e8 1886 VEX_LEN_0F3A33_P_2,
6c30d220
L
1887 VEX_LEN_0F3A38_P_2,
1888 VEX_LEN_0F3A39_P_2,
592a252b 1889 VEX_LEN_0F3A41_P_2,
6c30d220 1890 VEX_LEN_0F3A46_P_2,
592a252b
L
1891 VEX_LEN_0F3A60_P_2,
1892 VEX_LEN_0F3A61_P_2,
1893 VEX_LEN_0F3A62_P_2,
1894 VEX_LEN_0F3A63_P_2,
1895 VEX_LEN_0F3A6A_P_2,
1896 VEX_LEN_0F3A6B_P_2,
1897 VEX_LEN_0F3A6E_P_2,
1898 VEX_LEN_0F3A6F_P_2,
1899 VEX_LEN_0F3A7A_P_2,
1900 VEX_LEN_0F3A7B_P_2,
1901 VEX_LEN_0F3A7E_P_2,
1902 VEX_LEN_0F3A7F_P_2,
1903 VEX_LEN_0F3ADF_P_2,
6c30d220 1904 VEX_LEN_0F3AF0_P_3,
ff688e1f
L
1905 VEX_LEN_0FXOP_08_CC,
1906 VEX_LEN_0FXOP_08_CD,
1907 VEX_LEN_0FXOP_08_CE,
1908 VEX_LEN_0FXOP_08_CF,
1909 VEX_LEN_0FXOP_08_EC,
1910 VEX_LEN_0FXOP_08_ED,
1911 VEX_LEN_0FXOP_08_EE,
1912 VEX_LEN_0FXOP_08_EF,
592a252b
L
1913 VEX_LEN_0FXOP_09_80,
1914 VEX_LEN_0FXOP_09_81
51e7da1b 1915};
c0f3af97 1916
04e2a182
L
1917enum
1918{
1919 EVEX_LEN_0F6E_P_2 = 0,
1920 EVEX_LEN_0F7E_P_1,
1921 EVEX_LEN_0F7E_P_2,
12efd68d 1922 EVEX_LEN_0FD6_P_2,
f0a6222e
L
1923 EVEX_LEN_0F3819_P_2_W_0,
1924 EVEX_LEN_0F3819_P_2_W_1,
1925 EVEX_LEN_0F381A_P_2_W_0,
1926 EVEX_LEN_0F381A_P_2_W_1,
1927 EVEX_LEN_0F381B_P_2_W_0,
1928 EVEX_LEN_0F381B_P_2_W_1,
1929 EVEX_LEN_0F385A_P_2_W_0,
1930 EVEX_LEN_0F385A_P_2_W_1,
1931 EVEX_LEN_0F385B_P_2_W_0,
1932 EVEX_LEN_0F385B_P_2_W_1,
e395f487
L
1933 EVEX_LEN_0F38C6_REG_1_PREFIX_2,
1934 EVEX_LEN_0F38C6_REG_2_PREFIX_2,
1935 EVEX_LEN_0F38C6_REG_5_PREFIX_2,
1936 EVEX_LEN_0F38C6_REG_6_PREFIX_2,
1937 EVEX_LEN_0F38C7_R_1_P_2_W_0,
1938 EVEX_LEN_0F38C7_R_1_P_2_W_1,
1939 EVEX_LEN_0F38C7_R_2_P_2_W_0,
1940 EVEX_LEN_0F38C7_R_2_P_2_W_1,
1941 EVEX_LEN_0F38C7_R_5_P_2_W_0,
1942 EVEX_LEN_0F38C7_R_5_P_2_W_1,
1943 EVEX_LEN_0F38C7_R_6_P_2_W_0,
1944 EVEX_LEN_0F38C7_R_6_P_2_W_1,
12efd68d
L
1945 EVEX_LEN_0F3A18_P_2_W_0,
1946 EVEX_LEN_0F3A18_P_2_W_1,
1947 EVEX_LEN_0F3A19_P_2_W_0,
1948 EVEX_LEN_0F3A19_P_2_W_1,
1949 EVEX_LEN_0F3A1A_P_2_W_0,
1950 EVEX_LEN_0F3A1A_P_2_W_1,
1951 EVEX_LEN_0F3A1B_P_2_W_0,
6e1c90b7
L
1952 EVEX_LEN_0F3A1B_P_2_W_1,
1953 EVEX_LEN_0F3A23_P_2_W_0,
1954 EVEX_LEN_0F3A23_P_2_W_1,
1955 EVEX_LEN_0F3A38_P_2_W_0,
1956 EVEX_LEN_0F3A38_P_2_W_1,
1957 EVEX_LEN_0F3A39_P_2_W_0,
1958 EVEX_LEN_0F3A39_P_2_W_1,
1959 EVEX_LEN_0F3A3A_P_2_W_0,
1960 EVEX_LEN_0F3A3A_P_2_W_1,
1961 EVEX_LEN_0F3A3B_P_2_W_0,
1962 EVEX_LEN_0F3A3B_P_2_W_1,
1963 EVEX_LEN_0F3A43_P_2_W_0,
1964 EVEX_LEN_0F3A43_P_2_W_1
04e2a182
L
1965};
1966
9e30b8e0
L
1967enum
1968{
ec6f095a 1969 VEX_W_0F41_P_0_LEN_1 = 0,
1ba585e8 1970 VEX_W_0F41_P_2_LEN_1,
43234a1e 1971 VEX_W_0F42_P_0_LEN_1,
1ba585e8 1972 VEX_W_0F42_P_2_LEN_1,
43234a1e 1973 VEX_W_0F44_P_0_LEN_0,
1ba585e8 1974 VEX_W_0F44_P_2_LEN_0,
43234a1e 1975 VEX_W_0F45_P_0_LEN_1,
1ba585e8 1976 VEX_W_0F45_P_2_LEN_1,
43234a1e 1977 VEX_W_0F46_P_0_LEN_1,
1ba585e8 1978 VEX_W_0F46_P_2_LEN_1,
43234a1e 1979 VEX_W_0F47_P_0_LEN_1,
1ba585e8
IT
1980 VEX_W_0F47_P_2_LEN_1,
1981 VEX_W_0F4A_P_0_LEN_1,
1982 VEX_W_0F4A_P_2_LEN_1,
1983 VEX_W_0F4B_P_0_LEN_1,
43234a1e 1984 VEX_W_0F4B_P_2_LEN_1,
43234a1e 1985 VEX_W_0F90_P_0_LEN_0,
1ba585e8 1986 VEX_W_0F90_P_2_LEN_0,
43234a1e 1987 VEX_W_0F91_P_0_LEN_0,
1ba585e8 1988 VEX_W_0F91_P_2_LEN_0,
43234a1e 1989 VEX_W_0F92_P_0_LEN_0,
90a915bf 1990 VEX_W_0F92_P_2_LEN_0,
43234a1e 1991 VEX_W_0F93_P_0_LEN_0,
90a915bf 1992 VEX_W_0F93_P_2_LEN_0,
43234a1e 1993 VEX_W_0F98_P_0_LEN_0,
1ba585e8
IT
1994 VEX_W_0F98_P_2_LEN_0,
1995 VEX_W_0F99_P_0_LEN_0,
1996 VEX_W_0F99_P_2_LEN_0,
592a252b
L
1997 VEX_W_0F380C_P_2,
1998 VEX_W_0F380D_P_2,
1999 VEX_W_0F380E_P_2,
2000 VEX_W_0F380F_P_2,
6c30d220 2001 VEX_W_0F3816_P_2,
6c30d220
L
2002 VEX_W_0F3818_P_2,
2003 VEX_W_0F3819_P_2,
592a252b 2004 VEX_W_0F381A_P_2_M_0,
592a252b
L
2005 VEX_W_0F382C_P_2_M_0,
2006 VEX_W_0F382D_P_2_M_0,
2007 VEX_W_0F382E_P_2_M_0,
2008 VEX_W_0F382F_P_2_M_0,
6c30d220 2009 VEX_W_0F3836_P_2,
6c30d220
L
2010 VEX_W_0F3846_P_2,
2011 VEX_W_0F3858_P_2,
2012 VEX_W_0F3859_P_2,
2013 VEX_W_0F385A_P_2_M_0,
2014 VEX_W_0F3878_P_2,
2015 VEX_W_0F3879_P_2,
48521003 2016 VEX_W_0F38CF_P_2,
6c30d220
L
2017 VEX_W_0F3A00_P_2,
2018 VEX_W_0F3A01_P_2,
2019 VEX_W_0F3A02_P_2,
592a252b
L
2020 VEX_W_0F3A04_P_2,
2021 VEX_W_0F3A05_P_2,
2022 VEX_W_0F3A06_P_2,
592a252b
L
2023 VEX_W_0F3A18_P_2,
2024 VEX_W_0F3A19_P_2,
43234a1e 2025 VEX_W_0F3A30_P_2_LEN_0,
1ba585e8 2026 VEX_W_0F3A31_P_2_LEN_0,
43234a1e 2027 VEX_W_0F3A32_P_2_LEN_0,
1ba585e8 2028 VEX_W_0F3A33_P_2_LEN_0,
6c30d220
L
2029 VEX_W_0F3A38_P_2,
2030 VEX_W_0F3A39_P_2,
6c30d220 2031 VEX_W_0F3A46_P_2,
592a252b
L
2032 VEX_W_0F3A48_P_2,
2033 VEX_W_0F3A49_P_2,
2034 VEX_W_0F3A4A_P_2,
2035 VEX_W_0F3A4B_P_2,
2036 VEX_W_0F3A4C_P_2,
48521003
IT
2037 VEX_W_0F3ACE_P_2,
2038 VEX_W_0F3ACF_P_2,
43234a1e
L
2039
2040 EVEX_W_0F10_P_0,
36cc073e 2041 EVEX_W_0F10_P_1,
43234a1e 2042 EVEX_W_0F10_P_2,
36cc073e 2043 EVEX_W_0F10_P_3,
43234a1e 2044 EVEX_W_0F11_P_0,
36cc073e 2045 EVEX_W_0F11_P_1,
43234a1e 2046 EVEX_W_0F11_P_2,
36cc073e 2047 EVEX_W_0F11_P_3,
43234a1e
L
2048 EVEX_W_0F12_P_0_M_0,
2049 EVEX_W_0F12_P_0_M_1,
2050 EVEX_W_0F12_P_1,
2051 EVEX_W_0F12_P_2,
2052 EVEX_W_0F12_P_3,
2053 EVEX_W_0F13_P_0,
2054 EVEX_W_0F13_P_2,
2055 EVEX_W_0F14_P_0,
2056 EVEX_W_0F14_P_2,
2057 EVEX_W_0F15_P_0,
2058 EVEX_W_0F15_P_2,
2059 EVEX_W_0F16_P_0_M_0,
2060 EVEX_W_0F16_P_0_M_1,
2061 EVEX_W_0F16_P_1,
2062 EVEX_W_0F16_P_2,
2063 EVEX_W_0F17_P_0,
2064 EVEX_W_0F17_P_2,
2065 EVEX_W_0F28_P_0,
2066 EVEX_W_0F28_P_2,
2067 EVEX_W_0F29_P_0,
2068 EVEX_W_0F29_P_2,
43234a1e
L
2069 EVEX_W_0F2A_P_3,
2070 EVEX_W_0F2B_P_0,
2071 EVEX_W_0F2B_P_2,
2072 EVEX_W_0F2E_P_0,
2073 EVEX_W_0F2E_P_2,
2074 EVEX_W_0F2F_P_0,
2075 EVEX_W_0F2F_P_2,
2076 EVEX_W_0F51_P_0,
2077 EVEX_W_0F51_P_1,
2078 EVEX_W_0F51_P_2,
2079 EVEX_W_0F51_P_3,
90a915bf
IT
2080 EVEX_W_0F54_P_0,
2081 EVEX_W_0F54_P_2,
2082 EVEX_W_0F55_P_0,
2083 EVEX_W_0F55_P_2,
2084 EVEX_W_0F56_P_0,
2085 EVEX_W_0F56_P_2,
2086 EVEX_W_0F57_P_0,
2087 EVEX_W_0F57_P_2,
43234a1e
L
2088 EVEX_W_0F58_P_0,
2089 EVEX_W_0F58_P_1,
2090 EVEX_W_0F58_P_2,
2091 EVEX_W_0F58_P_3,
2092 EVEX_W_0F59_P_0,
2093 EVEX_W_0F59_P_1,
2094 EVEX_W_0F59_P_2,
2095 EVEX_W_0F59_P_3,
2096 EVEX_W_0F5A_P_0,
2097 EVEX_W_0F5A_P_1,
2098 EVEX_W_0F5A_P_2,
2099 EVEX_W_0F5A_P_3,
2100 EVEX_W_0F5B_P_0,
2101 EVEX_W_0F5B_P_1,
2102 EVEX_W_0F5B_P_2,
2103 EVEX_W_0F5C_P_0,
2104 EVEX_W_0F5C_P_1,
2105 EVEX_W_0F5C_P_2,
2106 EVEX_W_0F5C_P_3,
2107 EVEX_W_0F5D_P_0,
2108 EVEX_W_0F5D_P_1,
2109 EVEX_W_0F5D_P_2,
2110 EVEX_W_0F5D_P_3,
2111 EVEX_W_0F5E_P_0,
2112 EVEX_W_0F5E_P_1,
2113 EVEX_W_0F5E_P_2,
2114 EVEX_W_0F5E_P_3,
2115 EVEX_W_0F5F_P_0,
2116 EVEX_W_0F5F_P_1,
2117 EVEX_W_0F5F_P_2,
2118 EVEX_W_0F5F_P_3,
2119 EVEX_W_0F62_P_2,
2120 EVEX_W_0F66_P_2,
2121 EVEX_W_0F6A_P_2,
1ba585e8 2122 EVEX_W_0F6B_P_2,
43234a1e
L
2123 EVEX_W_0F6C_P_2,
2124 EVEX_W_0F6D_P_2,
43234a1e
L
2125 EVEX_W_0F6F_P_1,
2126 EVEX_W_0F6F_P_2,
1ba585e8 2127 EVEX_W_0F6F_P_3,
43234a1e
L
2128 EVEX_W_0F70_P_2,
2129 EVEX_W_0F72_R_2_P_2,
2130 EVEX_W_0F72_R_6_P_2,
2131 EVEX_W_0F73_R_2_P_2,
2132 EVEX_W_0F73_R_6_P_2,
2133 EVEX_W_0F76_P_2,
2134 EVEX_W_0F78_P_0,
90a915bf 2135 EVEX_W_0F78_P_2,
43234a1e 2136 EVEX_W_0F79_P_0,
90a915bf 2137 EVEX_W_0F79_P_2,
43234a1e 2138 EVEX_W_0F7A_P_1,
90a915bf 2139 EVEX_W_0F7A_P_2,
43234a1e 2140 EVEX_W_0F7A_P_3,
90a915bf 2141 EVEX_W_0F7B_P_2,
43234a1e
L
2142 EVEX_W_0F7B_P_3,
2143 EVEX_W_0F7E_P_1,
43234a1e
L
2144 EVEX_W_0F7F_P_1,
2145 EVEX_W_0F7F_P_2,
1ba585e8 2146 EVEX_W_0F7F_P_3,
43234a1e
L
2147 EVEX_W_0FC2_P_0,
2148 EVEX_W_0FC2_P_1,
2149 EVEX_W_0FC2_P_2,
2150 EVEX_W_0FC2_P_3,
2151 EVEX_W_0FC6_P_0,
2152 EVEX_W_0FC6_P_2,
2153 EVEX_W_0FD2_P_2,
2154 EVEX_W_0FD3_P_2,
2155 EVEX_W_0FD4_P_2,
2156 EVEX_W_0FD6_P_2,
2157 EVEX_W_0FE6_P_1,
2158 EVEX_W_0FE6_P_2,
2159 EVEX_W_0FE6_P_3,
2160 EVEX_W_0FE7_P_2,
2161 EVEX_W_0FF2_P_2,
2162 EVEX_W_0FF3_P_2,
2163 EVEX_W_0FF4_P_2,
2164 EVEX_W_0FFA_P_2,
2165 EVEX_W_0FFB_P_2,
2166 EVEX_W_0FFE_P_2,
2167 EVEX_W_0F380C_P_2,
2168 EVEX_W_0F380D_P_2,
1ba585e8
IT
2169 EVEX_W_0F3810_P_1,
2170 EVEX_W_0F3810_P_2,
43234a1e 2171 EVEX_W_0F3811_P_1,
1ba585e8 2172 EVEX_W_0F3811_P_2,
43234a1e 2173 EVEX_W_0F3812_P_1,
1ba585e8 2174 EVEX_W_0F3812_P_2,
43234a1e
L
2175 EVEX_W_0F3813_P_1,
2176 EVEX_W_0F3813_P_2,
2177 EVEX_W_0F3814_P_1,
2178 EVEX_W_0F3815_P_1,
2179 EVEX_W_0F3818_P_2,
2180 EVEX_W_0F3819_P_2,
2181 EVEX_W_0F381A_P_2,
2182 EVEX_W_0F381B_P_2,
2183 EVEX_W_0F381E_P_2,
2184 EVEX_W_0F381F_P_2,
1ba585e8 2185 EVEX_W_0F3820_P_1,
43234a1e
L
2186 EVEX_W_0F3821_P_1,
2187 EVEX_W_0F3822_P_1,
2188 EVEX_W_0F3823_P_1,
2189 EVEX_W_0F3824_P_1,
2190 EVEX_W_0F3825_P_1,
2191 EVEX_W_0F3825_P_2,
1ba585e8
IT
2192 EVEX_W_0F3826_P_1,
2193 EVEX_W_0F3826_P_2,
2194 EVEX_W_0F3828_P_1,
43234a1e 2195 EVEX_W_0F3828_P_2,
1ba585e8 2196 EVEX_W_0F3829_P_1,
43234a1e
L
2197 EVEX_W_0F3829_P_2,
2198 EVEX_W_0F382A_P_1,
2199 EVEX_W_0F382A_P_2,
1ba585e8
IT
2200 EVEX_W_0F382B_P_2,
2201 EVEX_W_0F3830_P_1,
43234a1e
L
2202 EVEX_W_0F3831_P_1,
2203 EVEX_W_0F3832_P_1,
2204 EVEX_W_0F3833_P_1,
2205 EVEX_W_0F3834_P_1,
2206 EVEX_W_0F3835_P_1,
2207 EVEX_W_0F3835_P_2,
2208 EVEX_W_0F3837_P_2,
90a915bf
IT
2209 EVEX_W_0F3838_P_1,
2210 EVEX_W_0F3839_P_1,
43234a1e
L
2211 EVEX_W_0F383A_P_1,
2212 EVEX_W_0F3840_P_2,
d6aab7a1 2213 EVEX_W_0F3852_P_1,
ee6872be 2214 EVEX_W_0F3854_P_2,
620214f7 2215 EVEX_W_0F3855_P_2,
43234a1e
L
2216 EVEX_W_0F3858_P_2,
2217 EVEX_W_0F3859_P_2,
2218 EVEX_W_0F385A_P_2,
2219 EVEX_W_0F385B_P_2,
53467f57
IT
2220 EVEX_W_0F3862_P_2,
2221 EVEX_W_0F3863_P_2,
1ba585e8 2222 EVEX_W_0F3866_P_2,
9186c494 2223 EVEX_W_0F3868_P_3,
53467f57
IT
2224 EVEX_W_0F3870_P_2,
2225 EVEX_W_0F3871_P_2,
d6aab7a1 2226 EVEX_W_0F3872_P_1,
53467f57 2227 EVEX_W_0F3872_P_2,
d6aab7a1 2228 EVEX_W_0F3872_P_3,
53467f57 2229 EVEX_W_0F3873_P_2,
1ba585e8
IT
2230 EVEX_W_0F3875_P_2,
2231 EVEX_W_0F3878_P_2,
2232 EVEX_W_0F3879_P_2,
2233 EVEX_W_0F387A_P_2,
2234 EVEX_W_0F387B_P_2,
2235 EVEX_W_0F387D_P_2,
14f195c9 2236 EVEX_W_0F3883_P_2,
1ba585e8 2237 EVEX_W_0F388D_P_2,
43234a1e
L
2238 EVEX_W_0F3891_P_2,
2239 EVEX_W_0F3893_P_2,
2240 EVEX_W_0F38A1_P_2,
2241 EVEX_W_0F38A3_P_2,
2242 EVEX_W_0F38C7_R_1_P_2,
2243 EVEX_W_0F38C7_R_2_P_2,
2244 EVEX_W_0F38C7_R_5_P_2,
2245 EVEX_W_0F38C7_R_6_P_2,
2246
2247 EVEX_W_0F3A00_P_2,
2248 EVEX_W_0F3A01_P_2,
2249 EVEX_W_0F3A04_P_2,
2250 EVEX_W_0F3A05_P_2,
2251 EVEX_W_0F3A08_P_2,
2252 EVEX_W_0F3A09_P_2,
2253 EVEX_W_0F3A0A_P_2,
2254 EVEX_W_0F3A0B_P_2,
2255 EVEX_W_0F3A18_P_2,
2256 EVEX_W_0F3A19_P_2,
2257 EVEX_W_0F3A1A_P_2,
2258 EVEX_W_0F3A1B_P_2,
2259 EVEX_W_0F3A1D_P_2,
2260 EVEX_W_0F3A21_P_2,
2261 EVEX_W_0F3A23_P_2,
2262 EVEX_W_0F3A38_P_2,
2263 EVEX_W_0F3A39_P_2,
2264 EVEX_W_0F3A3A_P_2,
2265 EVEX_W_0F3A3B_P_2,
1ba585e8
IT
2266 EVEX_W_0F3A3E_P_2,
2267 EVEX_W_0F3A3F_P_2,
2268 EVEX_W_0F3A42_P_2,
90a915bf
IT
2269 EVEX_W_0F3A43_P_2,
2270 EVEX_W_0F3A50_P_2,
2271 EVEX_W_0F3A51_P_2,
2272 EVEX_W_0F3A56_P_2,
2273 EVEX_W_0F3A57_P_2,
2274 EVEX_W_0F3A66_P_2,
53467f57
IT
2275 EVEX_W_0F3A67_P_2,
2276 EVEX_W_0F3A70_P_2,
2277 EVEX_W_0F3A71_P_2,
2278 EVEX_W_0F3A72_P_2,
48521003
IT
2279 EVEX_W_0F3A73_P_2,
2280 EVEX_W_0F3ACE_P_2,
2281 EVEX_W_0F3ACF_P_2
9e30b8e0
L
2282};
2283
26ca5450 2284typedef void (*op_rtn) (int bytemode, int sizeflag);
252b5132
RH
2285
2286struct dis386 {
2da11e11 2287 const char *name;
ce518a5f
L
2288 struct
2289 {
2290 op_rtn rtn;
2291 int bytemode;
2292 } op[MAX_OPERANDS];
bf890a93 2293 unsigned int prefix_requirement;
252b5132
RH
2294};
2295
2296/* Upper case letters in the instruction names here are macros.
2297 'A' => print 'b' if no register operands or suffix_always is true
2298 'B' => print 'b' if suffix_always is true
9306ca4a 2299 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
98b528ac 2300 size prefix
ed7841b3 2301 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
98b528ac 2302 suffix_always is true
252b5132 2303 'E' => print 'e' if 32-bit form of jcxz
3ffd33cf 2304 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
52fd6d94 2305 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
5dd0794d 2306 'H' => print ",pt" or ",pn" branch hint
9306ca4a 2307 'I' => honor following macro letter even in Intel mode (implemented only
98b528ac 2308 for some of the macro letters)
9306ca4a 2309 'J' => print 'l'
42903f7f 2310 'K' => print 'd' or 'q' if rex prefix is present.
252b5132 2311 'L' => print 'l' if suffix_always is true
9d141669 2312 'M' => print 'r' if intel_mnemonic is false.
252b5132 2313 'N' => print 'n' if instruction has no wait "prefix"
a35ca55a 2314 'O' => print 'd' or 'o' (or 'q' in Intel mode)
52b15da3 2315 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
98b528ac
L
2316 or suffix_always is true. print 'q' if rex prefix is present.
2317 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
2318 is true
a35ca55a 2319 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
52b15da3 2320 'S' => print 'w', 'l' or 'q' if suffix_always is true
a72d2af2
L
2321 'T' => print 'q' in 64bit mode if instruction has no operand size
2322 prefix and behave as 'P' otherwise
2323 'U' => print 'q' in 64bit mode if instruction has no operand size
2324 prefix and behave as 'Q' otherwise
2325 'V' => print 'q' in 64bit mode if instruction has no operand size
2326 prefix and behave as 'S' otherwise
a35ca55a 2327 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
9306ca4a 2328 'X' => print 's', 'd' depending on data16 prefix (for XMM)
9646c87b 2329 'Y' unused.
6dd5059a 2330 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
9d141669 2331 '!' => change condition from true to false or from false to true.
98b528ac 2332 '%' => add 1 upper case letter to the macro.
a72d2af2
L
2333 '^' => print 'w' or 'l' depending on operand size prefix or
2334 suffix_always is true (lcall/ljmp).
5db04b09
L
2335 '@' => print 'q' for Intel64 ISA, 'w' or 'q' for AMD64 ISA depending
2336 on operand size prefix.
07f5af7d
L
2337 '&' => print 'q' in 64bit mode for Intel64 ISA or if instruction
2338 has no operand size prefix for AMD64 ISA, behave as 'P'
2339 otherwise
98b528ac
L
2340
2341 2 upper case letter macros:
04d824a4
JB
2342 "XY" => print 'x' or 'y' if suffix_always is true or no register
2343 operands and no broadcast.
2344 "XZ" => print 'x', 'y', or 'z' if suffix_always is true or no
2345 register operands and no broadcast.
4b06377f
L
2346 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
2347 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
98b528ac 2348 or suffix_always is true
4b06377f
L
2349 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
2350 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
2351 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
6c30d220 2352 "LW" => print 'd', 'q' depending on the VEX.W bit
4b4c407a
L
2353 "LP" => print 'w' or 'l' ('d' in Intel mode) if instruction has
2354 an operand size prefix, or suffix_always is true. print
2355 'q' if rex prefix is present.
52b15da3 2356
6439fc28
AM
2357 Many of the above letters print nothing in Intel mode. See "putop"
2358 for the details.
52b15da3 2359
6439fc28 2360 Braces '{' and '}', and vertical bars '|', indicate alternative
7c52e0e8 2361 mnemonic strings for AT&T and Intel. */
252b5132 2362
6439fc28 2363static const struct dis386 dis386[] = {
252b5132 2364 /* 00 */
bf890a93
IT
2365 { "addB", { Ebh1, Gb }, 0 },
2366 { "addS", { Evh1, Gv }, 0 },
2367 { "addB", { Gb, EbS }, 0 },
2368 { "addS", { Gv, EvS }, 0 },
2369 { "addB", { AL, Ib }, 0 },
2370 { "addS", { eAX, Iv }, 0 },
4e7d34a6
L
2371 { X86_64_TABLE (X86_64_06) },
2372 { X86_64_TABLE (X86_64_07) },
252b5132 2373 /* 08 */
bf890a93
IT
2374 { "orB", { Ebh1, Gb }, 0 },
2375 { "orS", { Evh1, Gv }, 0 },
2376 { "orB", { Gb, EbS }, 0 },
2377 { "orS", { Gv, EvS }, 0 },
2378 { "orB", { AL, Ib }, 0 },
2379 { "orS", { eAX, Iv }, 0 },
4e7d34a6 2380 { X86_64_TABLE (X86_64_0D) },
592d1631 2381 { Bad_Opcode }, /* 0x0f extended opcode escape */
252b5132 2382 /* 10 */
bf890a93
IT
2383 { "adcB", { Ebh1, Gb }, 0 },
2384 { "adcS", { Evh1, Gv }, 0 },
2385 { "adcB", { Gb, EbS }, 0 },
2386 { "adcS", { Gv, EvS }, 0 },
2387 { "adcB", { AL, Ib }, 0 },
2388 { "adcS", { eAX, Iv }, 0 },
4e7d34a6
L
2389 { X86_64_TABLE (X86_64_16) },
2390 { X86_64_TABLE (X86_64_17) },
252b5132 2391 /* 18 */
bf890a93
IT
2392 { "sbbB", { Ebh1, Gb }, 0 },
2393 { "sbbS", { Evh1, Gv }, 0 },
2394 { "sbbB", { Gb, EbS }, 0 },
2395 { "sbbS", { Gv, EvS }, 0 },
2396 { "sbbB", { AL, Ib }, 0 },
2397 { "sbbS", { eAX, Iv }, 0 },
4e7d34a6
L
2398 { X86_64_TABLE (X86_64_1E) },
2399 { X86_64_TABLE (X86_64_1F) },
252b5132 2400 /* 20 */
bf890a93
IT
2401 { "andB", { Ebh1, Gb }, 0 },
2402 { "andS", { Evh1, Gv }, 0 },
2403 { "andB", { Gb, EbS }, 0 },
2404 { "andS", { Gv, EvS }, 0 },
2405 { "andB", { AL, Ib }, 0 },
2406 { "andS", { eAX, Iv }, 0 },
592d1631 2407 { Bad_Opcode }, /* SEG ES prefix */
4e7d34a6 2408 { X86_64_TABLE (X86_64_27) },
252b5132 2409 /* 28 */
bf890a93
IT
2410 { "subB", { Ebh1, Gb }, 0 },
2411 { "subS", { Evh1, Gv }, 0 },
2412 { "subB", { Gb, EbS }, 0 },
2413 { "subS", { Gv, EvS }, 0 },
2414 { "subB", { AL, Ib }, 0 },
2415 { "subS", { eAX, Iv }, 0 },
592d1631 2416 { Bad_Opcode }, /* SEG CS prefix */
4e7d34a6 2417 { X86_64_TABLE (X86_64_2F) },
252b5132 2418 /* 30 */
bf890a93
IT
2419 { "xorB", { Ebh1, Gb }, 0 },
2420 { "xorS", { Evh1, Gv }, 0 },
2421 { "xorB", { Gb, EbS }, 0 },
2422 { "xorS", { Gv, EvS }, 0 },
2423 { "xorB", { AL, Ib }, 0 },
2424 { "xorS", { eAX, Iv }, 0 },
592d1631 2425 { Bad_Opcode }, /* SEG SS prefix */
4e7d34a6 2426 { X86_64_TABLE (X86_64_37) },
252b5132 2427 /* 38 */
bf890a93
IT
2428 { "cmpB", { Eb, Gb }, 0 },
2429 { "cmpS", { Ev, Gv }, 0 },
2430 { "cmpB", { Gb, EbS }, 0 },
2431 { "cmpS", { Gv, EvS }, 0 },
2432 { "cmpB", { AL, Ib }, 0 },
2433 { "cmpS", { eAX, Iv }, 0 },
592d1631 2434 { Bad_Opcode }, /* SEG DS prefix */
4e7d34a6 2435 { X86_64_TABLE (X86_64_3F) },
252b5132 2436 /* 40 */
bf890a93
IT
2437 { "inc{S|}", { RMeAX }, 0 },
2438 { "inc{S|}", { RMeCX }, 0 },
2439 { "inc{S|}", { RMeDX }, 0 },
2440 { "inc{S|}", { RMeBX }, 0 },
2441 { "inc{S|}", { RMeSP }, 0 },
2442 { "inc{S|}", { RMeBP }, 0 },
2443 { "inc{S|}", { RMeSI }, 0 },
2444 { "inc{S|}", { RMeDI }, 0 },
252b5132 2445 /* 48 */
bf890a93
IT
2446 { "dec{S|}", { RMeAX }, 0 },
2447 { "dec{S|}", { RMeCX }, 0 },
2448 { "dec{S|}", { RMeDX }, 0 },
2449 { "dec{S|}", { RMeBX }, 0 },
2450 { "dec{S|}", { RMeSP }, 0 },
2451 { "dec{S|}", { RMeBP }, 0 },
2452 { "dec{S|}", { RMeSI }, 0 },
2453 { "dec{S|}", { RMeDI }, 0 },
252b5132 2454 /* 50 */
bf890a93
IT
2455 { "pushV", { RMrAX }, 0 },
2456 { "pushV", { RMrCX }, 0 },
2457 { "pushV", { RMrDX }, 0 },
2458 { "pushV", { RMrBX }, 0 },
2459 { "pushV", { RMrSP }, 0 },
2460 { "pushV", { RMrBP }, 0 },
2461 { "pushV", { RMrSI }, 0 },
2462 { "pushV", { RMrDI }, 0 },
252b5132 2463 /* 58 */
bf890a93
IT
2464 { "popV", { RMrAX }, 0 },
2465 { "popV", { RMrCX }, 0 },
2466 { "popV", { RMrDX }, 0 },
2467 { "popV", { RMrBX }, 0 },
2468 { "popV", { RMrSP }, 0 },
2469 { "popV", { RMrBP }, 0 },
2470 { "popV", { RMrSI }, 0 },
2471 { "popV", { RMrDI }, 0 },
252b5132 2472 /* 60 */
4e7d34a6
L
2473 { X86_64_TABLE (X86_64_60) },
2474 { X86_64_TABLE (X86_64_61) },
2475 { X86_64_TABLE (X86_64_62) },
2476 { X86_64_TABLE (X86_64_63) },
592d1631
L
2477 { Bad_Opcode }, /* seg fs */
2478 { Bad_Opcode }, /* seg gs */
2479 { Bad_Opcode }, /* op size prefix */
2480 { Bad_Opcode }, /* adr size prefix */
252b5132 2481 /* 68 */
bf890a93
IT
2482 { "pushT", { sIv }, 0 },
2483 { "imulS", { Gv, Ev, Iv }, 0 },
2484 { "pushT", { sIbT }, 0 },
2485 { "imulS", { Gv, Ev, sIb }, 0 },
2486 { "ins{b|}", { Ybr, indirDX }, 0 },
4e7d34a6 2487 { X86_64_TABLE (X86_64_6D) },
bf890a93 2488 { "outs{b|}", { indirDXr, Xb }, 0 },
4e7d34a6 2489 { X86_64_TABLE (X86_64_6F) },
252b5132 2490 /* 70 */
bf890a93
IT
2491 { "joH", { Jb, BND, cond_jump_flag }, 0 },
2492 { "jnoH", { Jb, BND, cond_jump_flag }, 0 },
2493 { "jbH", { Jb, BND, cond_jump_flag }, 0 },
2494 { "jaeH", { Jb, BND, cond_jump_flag }, 0 },
2495 { "jeH", { Jb, BND, cond_jump_flag }, 0 },
2496 { "jneH", { Jb, BND, cond_jump_flag }, 0 },
2497 { "jbeH", { Jb, BND, cond_jump_flag }, 0 },
2498 { "jaH", { Jb, BND, cond_jump_flag }, 0 },
252b5132 2499 /* 78 */
bf890a93
IT
2500 { "jsH", { Jb, BND, cond_jump_flag }, 0 },
2501 { "jnsH", { Jb, BND, cond_jump_flag }, 0 },
2502 { "jpH", { Jb, BND, cond_jump_flag }, 0 },
2503 { "jnpH", { Jb, BND, cond_jump_flag }, 0 },
2504 { "jlH", { Jb, BND, cond_jump_flag }, 0 },
2505 { "jgeH", { Jb, BND, cond_jump_flag }, 0 },
2506 { "jleH", { Jb, BND, cond_jump_flag }, 0 },
2507 { "jgH", { Jb, BND, cond_jump_flag }, 0 },
252b5132 2508 /* 80 */
1ceb70f8
L
2509 { REG_TABLE (REG_80) },
2510 { REG_TABLE (REG_81) },
d039fef3 2511 { X86_64_TABLE (X86_64_82) },
7148c369 2512 { REG_TABLE (REG_83) },
bf890a93
IT
2513 { "testB", { Eb, Gb }, 0 },
2514 { "testS", { Ev, Gv }, 0 },
2515 { "xchgB", { Ebh2, Gb }, 0 },
2516 { "xchgS", { Evh2, Gv }, 0 },
252b5132 2517 /* 88 */
bf890a93
IT
2518 { "movB", { Ebh3, Gb }, 0 },
2519 { "movS", { Evh3, Gv }, 0 },
2520 { "movB", { Gb, EbS }, 0 },
2521 { "movS", { Gv, EvS }, 0 },
2522 { "movD", { Sv, Sw }, 0 },
1ceb70f8 2523 { MOD_TABLE (MOD_8D) },
bf890a93 2524 { "movD", { Sw, Sv }, 0 },
1ceb70f8 2525 { REG_TABLE (REG_8F) },
252b5132 2526 /* 90 */
1ceb70f8 2527 { PREFIX_TABLE (PREFIX_90) },
bf890a93
IT
2528 { "xchgS", { RMeCX, eAX }, 0 },
2529 { "xchgS", { RMeDX, eAX }, 0 },
2530 { "xchgS", { RMeBX, eAX }, 0 },
2531 { "xchgS", { RMeSP, eAX }, 0 },
2532 { "xchgS", { RMeBP, eAX }, 0 },
2533 { "xchgS", { RMeSI, eAX }, 0 },
2534 { "xchgS", { RMeDI, eAX }, 0 },
252b5132 2535 /* 98 */
bf890a93
IT
2536 { "cW{t|}R", { XX }, 0 },
2537 { "cR{t|}O", { XX }, 0 },
4e7d34a6 2538 { X86_64_TABLE (X86_64_9A) },
592d1631 2539 { Bad_Opcode }, /* fwait */
bf890a93
IT
2540 { "pushfT", { XX }, 0 },
2541 { "popfT", { XX }, 0 },
2542 { "sahf", { XX }, 0 },
2543 { "lahf", { XX }, 0 },
252b5132 2544 /* a0 */
bf890a93
IT
2545 { "mov%LB", { AL, Ob }, 0 },
2546 { "mov%LS", { eAX, Ov }, 0 },
2547 { "mov%LB", { Ob, AL }, 0 },
2548 { "mov%LS", { Ov, eAX }, 0 },
2549 { "movs{b|}", { Ybr, Xb }, 0 },
2550 { "movs{R|}", { Yvr, Xv }, 0 },
2551 { "cmps{b|}", { Xb, Yb }, 0 },
2552 { "cmps{R|}", { Xv, Yv }, 0 },
252b5132 2553 /* a8 */
bf890a93
IT
2554 { "testB", { AL, Ib }, 0 },
2555 { "testS", { eAX, Iv }, 0 },
2556 { "stosB", { Ybr, AL }, 0 },
2557 { "stosS", { Yvr, eAX }, 0 },
2558 { "lodsB", { ALr, Xb }, 0 },
2559 { "lodsS", { eAXr, Xv }, 0 },
2560 { "scasB", { AL, Yb }, 0 },
2561 { "scasS", { eAX, Yv }, 0 },
252b5132 2562 /* b0 */
bf890a93
IT
2563 { "movB", { RMAL, Ib }, 0 },
2564 { "movB", { RMCL, Ib }, 0 },
2565 { "movB", { RMDL, Ib }, 0 },
2566 { "movB", { RMBL, Ib }, 0 },
2567 { "movB", { RMAH, Ib }, 0 },
2568 { "movB", { RMCH, Ib }, 0 },
2569 { "movB", { RMDH, Ib }, 0 },
2570 { "movB", { RMBH, Ib }, 0 },
252b5132 2571 /* b8 */
bf890a93
IT
2572 { "mov%LV", { RMeAX, Iv64 }, 0 },
2573 { "mov%LV", { RMeCX, Iv64 }, 0 },
2574 { "mov%LV", { RMeDX, Iv64 }, 0 },
2575 { "mov%LV", { RMeBX, Iv64 }, 0 },
2576 { "mov%LV", { RMeSP, Iv64 }, 0 },
2577 { "mov%LV", { RMeBP, Iv64 }, 0 },
2578 { "mov%LV", { RMeSI, Iv64 }, 0 },
2579 { "mov%LV", { RMeDI, Iv64 }, 0 },
252b5132 2580 /* c0 */
1ceb70f8
L
2581 { REG_TABLE (REG_C0) },
2582 { REG_TABLE (REG_C1) },
bf890a93
IT
2583 { "retT", { Iw, BND }, 0 },
2584 { "retT", { BND }, 0 },
4e7d34a6
L
2585 { X86_64_TABLE (X86_64_C4) },
2586 { X86_64_TABLE (X86_64_C5) },
1ceb70f8
L
2587 { REG_TABLE (REG_C6) },
2588 { REG_TABLE (REG_C7) },
252b5132 2589 /* c8 */
bf890a93
IT
2590 { "enterT", { Iw, Ib }, 0 },
2591 { "leaveT", { XX }, 0 },
2592 { "Jret{|f}P", { Iw }, 0 },
2593 { "Jret{|f}P", { XX }, 0 },
2594 { "int3", { XX }, 0 },
2595 { "int", { Ib }, 0 },
4e7d34a6 2596 { X86_64_TABLE (X86_64_CE) },
bf890a93 2597 { "iret%LP", { XX }, 0 },
252b5132 2598 /* d0 */
1ceb70f8
L
2599 { REG_TABLE (REG_D0) },
2600 { REG_TABLE (REG_D1) },
2601 { REG_TABLE (REG_D2) },
2602 { REG_TABLE (REG_D3) },
4e7d34a6
L
2603 { X86_64_TABLE (X86_64_D4) },
2604 { X86_64_TABLE (X86_64_D5) },
592d1631 2605 { Bad_Opcode },
bf890a93 2606 { "xlat", { DSBX }, 0 },
252b5132
RH
2607 /* d8 */
2608 { FLOAT },
2609 { FLOAT },
2610 { FLOAT },
2611 { FLOAT },
2612 { FLOAT },
2613 { FLOAT },
2614 { FLOAT },
2615 { FLOAT },
2616 /* e0 */
bf890a93
IT
2617 { "loopneFH", { Jb, XX, loop_jcxz_flag }, 0 },
2618 { "loopeFH", { Jb, XX, loop_jcxz_flag }, 0 },
2619 { "loopFH", { Jb, XX, loop_jcxz_flag }, 0 },
2620 { "jEcxzH", { Jb, XX, loop_jcxz_flag }, 0 },
2621 { "inB", { AL, Ib }, 0 },
2622 { "inG", { zAX, Ib }, 0 },
2623 { "outB", { Ib, AL }, 0 },
2624 { "outG", { Ib, zAX }, 0 },
252b5132 2625 /* e8 */
a72d2af2
L
2626 { X86_64_TABLE (X86_64_E8) },
2627 { X86_64_TABLE (X86_64_E9) },
4e7d34a6 2628 { X86_64_TABLE (X86_64_EA) },
bf890a93
IT
2629 { "jmp", { Jb, BND }, 0 },
2630 { "inB", { AL, indirDX }, 0 },
2631 { "inG", { zAX, indirDX }, 0 },
2632 { "outB", { indirDX, AL }, 0 },
2633 { "outG", { indirDX, zAX }, 0 },
252b5132 2634 /* f0 */
592d1631 2635 { Bad_Opcode }, /* lock prefix */
bf890a93 2636 { "icebp", { XX }, 0 },
592d1631
L
2637 { Bad_Opcode }, /* repne */
2638 { Bad_Opcode }, /* repz */
bf890a93
IT
2639 { "hlt", { XX }, 0 },
2640 { "cmc", { XX }, 0 },
1ceb70f8
L
2641 { REG_TABLE (REG_F6) },
2642 { REG_TABLE (REG_F7) },
252b5132 2643 /* f8 */
bf890a93
IT
2644 { "clc", { XX }, 0 },
2645 { "stc", { XX }, 0 },
2646 { "cli", { XX }, 0 },
2647 { "sti", { XX }, 0 },
2648 { "cld", { XX }, 0 },
2649 { "std", { XX }, 0 },
1ceb70f8
L
2650 { REG_TABLE (REG_FE) },
2651 { REG_TABLE (REG_FF) },
252b5132
RH
2652};
2653
6439fc28 2654static const struct dis386 dis386_twobyte[] = {
252b5132 2655 /* 00 */
1ceb70f8
L
2656 { REG_TABLE (REG_0F00 ) },
2657 { REG_TABLE (REG_0F01 ) },
bf890a93
IT
2658 { "larS", { Gv, Ew }, 0 },
2659 { "lslS", { Gv, Ew }, 0 },
592d1631 2660 { Bad_Opcode },
bf890a93
IT
2661 { "syscall", { XX }, 0 },
2662 { "clts", { XX }, 0 },
2663 { "sysret%LP", { XX }, 0 },
252b5132 2664 /* 08 */
bf890a93 2665 { "invd", { XX }, 0 },
3233d7d0 2666 { PREFIX_TABLE (PREFIX_0F09) },
592d1631 2667 { Bad_Opcode },
bf890a93 2668 { "ud2", { XX }, 0 },
592d1631 2669 { Bad_Opcode },
b5b1fc4f 2670 { REG_TABLE (REG_0F0D) },
bf890a93
IT
2671 { "femms", { XX }, 0 },
2672 { "", { MX, EM, OPSUF }, 0 }, /* See OP_3DNowSuffix. */
252b5132 2673 /* 10 */
1ceb70f8
L
2674 { PREFIX_TABLE (PREFIX_0F10) },
2675 { PREFIX_TABLE (PREFIX_0F11) },
2676 { PREFIX_TABLE (PREFIX_0F12) },
2677 { MOD_TABLE (MOD_0F13) },
507bd325
L
2678 { "unpcklpX", { XM, EXx }, PREFIX_OPCODE },
2679 { "unpckhpX", { XM, EXx }, PREFIX_OPCODE },
1ceb70f8
L
2680 { PREFIX_TABLE (PREFIX_0F16) },
2681 { MOD_TABLE (MOD_0F17) },
252b5132 2682 /* 18 */
1ceb70f8 2683 { REG_TABLE (REG_0F18) },
bf890a93 2684 { "nopQ", { Ev }, 0 },
7e8b059b
L
2685 { PREFIX_TABLE (PREFIX_0F1A) },
2686 { PREFIX_TABLE (PREFIX_0F1B) },
c48935d7 2687 { PREFIX_TABLE (PREFIX_0F1C) },
bf890a93 2688 { "nopQ", { Ev }, 0 },
603555e5 2689 { PREFIX_TABLE (PREFIX_0F1E) },
bf890a93 2690 { "nopQ", { Ev }, 0 },
252b5132 2691 /* 20 */
bf890a93
IT
2692 { "movZ", { Rm, Cm }, 0 },
2693 { "movZ", { Rm, Dm }, 0 },
2694 { "movZ", { Cm, Rm }, 0 },
2695 { "movZ", { Dm, Rm }, 0 },
1ceb70f8 2696 { MOD_TABLE (MOD_0F24) },
592d1631 2697 { Bad_Opcode },
1ceb70f8 2698 { MOD_TABLE (MOD_0F26) },
592d1631 2699 { Bad_Opcode },
252b5132 2700 /* 28 */
507bd325
L
2701 { "movapX", { XM, EXx }, PREFIX_OPCODE },
2702 { "movapX", { EXxS, XM }, PREFIX_OPCODE },
1ceb70f8
L
2703 { PREFIX_TABLE (PREFIX_0F2A) },
2704 { PREFIX_TABLE (PREFIX_0F2B) },
2705 { PREFIX_TABLE (PREFIX_0F2C) },
2706 { PREFIX_TABLE (PREFIX_0F2D) },
2707 { PREFIX_TABLE (PREFIX_0F2E) },
2708 { PREFIX_TABLE (PREFIX_0F2F) },
252b5132 2709 /* 30 */
bf890a93
IT
2710 { "wrmsr", { XX }, 0 },
2711 { "rdtsc", { XX }, 0 },
2712 { "rdmsr", { XX }, 0 },
2713 { "rdpmc", { XX }, 0 },
2714 { "sysenter", { XX }, 0 },
2715 { "sysexit", { XX }, 0 },
592d1631 2716 { Bad_Opcode },
bf890a93 2717 { "getsec", { XX }, 0 },
252b5132 2718 /* 38 */
507bd325 2719 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F38, PREFIX_OPCODE) },
592d1631 2720 { Bad_Opcode },
507bd325 2721 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F3A, PREFIX_OPCODE) },
592d1631
L
2722 { Bad_Opcode },
2723 { Bad_Opcode },
2724 { Bad_Opcode },
2725 { Bad_Opcode },
2726 { Bad_Opcode },
252b5132 2727 /* 40 */
bf890a93
IT
2728 { "cmovoS", { Gv, Ev }, 0 },
2729 { "cmovnoS", { Gv, Ev }, 0 },
2730 { "cmovbS", { Gv, Ev }, 0 },
2731 { "cmovaeS", { Gv, Ev }, 0 },
2732 { "cmoveS", { Gv, Ev }, 0 },
2733 { "cmovneS", { Gv, Ev }, 0 },
2734 { "cmovbeS", { Gv, Ev }, 0 },
2735 { "cmovaS", { Gv, Ev }, 0 },
252b5132 2736 /* 48 */
bf890a93
IT
2737 { "cmovsS", { Gv, Ev }, 0 },
2738 { "cmovnsS", { Gv, Ev }, 0 },
2739 { "cmovpS", { Gv, Ev }, 0 },
2740 { "cmovnpS", { Gv, Ev }, 0 },
2741 { "cmovlS", { Gv, Ev }, 0 },
2742 { "cmovgeS", { Gv, Ev }, 0 },
2743 { "cmovleS", { Gv, Ev }, 0 },
2744 { "cmovgS", { Gv, Ev }, 0 },
252b5132 2745 /* 50 */
75c135a8 2746 { MOD_TABLE (MOD_0F51) },
1ceb70f8
L
2747 { PREFIX_TABLE (PREFIX_0F51) },
2748 { PREFIX_TABLE (PREFIX_0F52) },
2749 { PREFIX_TABLE (PREFIX_0F53) },
507bd325
L
2750 { "andpX", { XM, EXx }, PREFIX_OPCODE },
2751 { "andnpX", { XM, EXx }, PREFIX_OPCODE },
2752 { "orpX", { XM, EXx }, PREFIX_OPCODE },
2753 { "xorpX", { XM, EXx }, PREFIX_OPCODE },
252b5132 2754 /* 58 */
1ceb70f8
L
2755 { PREFIX_TABLE (PREFIX_0F58) },
2756 { PREFIX_TABLE (PREFIX_0F59) },
2757 { PREFIX_TABLE (PREFIX_0F5A) },
2758 { PREFIX_TABLE (PREFIX_0F5B) },
2759 { PREFIX_TABLE (PREFIX_0F5C) },
2760 { PREFIX_TABLE (PREFIX_0F5D) },
2761 { PREFIX_TABLE (PREFIX_0F5E) },
2762 { PREFIX_TABLE (PREFIX_0F5F) },
252b5132 2763 /* 60 */
1ceb70f8
L
2764 { PREFIX_TABLE (PREFIX_0F60) },
2765 { PREFIX_TABLE (PREFIX_0F61) },
2766 { PREFIX_TABLE (PREFIX_0F62) },
507bd325
L
2767 { "packsswb", { MX, EM }, PREFIX_OPCODE },
2768 { "pcmpgtb", { MX, EM }, PREFIX_OPCODE },
2769 { "pcmpgtw", { MX, EM }, PREFIX_OPCODE },
2770 { "pcmpgtd", { MX, EM }, PREFIX_OPCODE },
2771 { "packuswb", { MX, EM }, PREFIX_OPCODE },
252b5132 2772 /* 68 */
507bd325
L
2773 { "punpckhbw", { MX, EM }, PREFIX_OPCODE },
2774 { "punpckhwd", { MX, EM }, PREFIX_OPCODE },
2775 { "punpckhdq", { MX, EM }, PREFIX_OPCODE },
2776 { "packssdw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8
L
2777 { PREFIX_TABLE (PREFIX_0F6C) },
2778 { PREFIX_TABLE (PREFIX_0F6D) },
507bd325 2779 { "movK", { MX, Edq }, PREFIX_OPCODE },
1ceb70f8 2780 { PREFIX_TABLE (PREFIX_0F6F) },
252b5132 2781 /* 70 */
1ceb70f8
L
2782 { PREFIX_TABLE (PREFIX_0F70) },
2783 { REG_TABLE (REG_0F71) },
2784 { REG_TABLE (REG_0F72) },
2785 { REG_TABLE (REG_0F73) },
507bd325
L
2786 { "pcmpeqb", { MX, EM }, PREFIX_OPCODE },
2787 { "pcmpeqw", { MX, EM }, PREFIX_OPCODE },
2788 { "pcmpeqd", { MX, EM }, PREFIX_OPCODE },
2789 { "emms", { XX }, PREFIX_OPCODE },
252b5132 2790 /* 78 */
1ceb70f8
L
2791 { PREFIX_TABLE (PREFIX_0F78) },
2792 { PREFIX_TABLE (PREFIX_0F79) },
1f334aeb 2793 { Bad_Opcode },
592d1631 2794 { Bad_Opcode },
1ceb70f8
L
2795 { PREFIX_TABLE (PREFIX_0F7C) },
2796 { PREFIX_TABLE (PREFIX_0F7D) },
2797 { PREFIX_TABLE (PREFIX_0F7E) },
2798 { PREFIX_TABLE (PREFIX_0F7F) },
252b5132 2799 /* 80 */
bf890a93
IT
2800 { "joH", { Jv, BND, cond_jump_flag }, 0 },
2801 { "jnoH", { Jv, BND, cond_jump_flag }, 0 },
2802 { "jbH", { Jv, BND, cond_jump_flag }, 0 },
2803 { "jaeH", { Jv, BND, cond_jump_flag }, 0 },
2804 { "jeH", { Jv, BND, cond_jump_flag }, 0 },
2805 { "jneH", { Jv, BND, cond_jump_flag }, 0 },
2806 { "jbeH", { Jv, BND, cond_jump_flag }, 0 },
2807 { "jaH", { Jv, BND, cond_jump_flag }, 0 },
252b5132 2808 /* 88 */
bf890a93
IT
2809 { "jsH", { Jv, BND, cond_jump_flag }, 0 },
2810 { "jnsH", { Jv, BND, cond_jump_flag }, 0 },
2811 { "jpH", { Jv, BND, cond_jump_flag }, 0 },
2812 { "jnpH", { Jv, BND, cond_jump_flag }, 0 },
2813 { "jlH", { Jv, BND, cond_jump_flag }, 0 },
2814 { "jgeH", { Jv, BND, cond_jump_flag }, 0 },
2815 { "jleH", { Jv, BND, cond_jump_flag }, 0 },
2816 { "jgH", { Jv, BND, cond_jump_flag }, 0 },
252b5132 2817 /* 90 */
bf890a93
IT
2818 { "seto", { Eb }, 0 },
2819 { "setno", { Eb }, 0 },
2820 { "setb", { Eb }, 0 },
2821 { "setae", { Eb }, 0 },
2822 { "sete", { Eb }, 0 },
2823 { "setne", { Eb }, 0 },
2824 { "setbe", { Eb }, 0 },
2825 { "seta", { Eb }, 0 },
252b5132 2826 /* 98 */
bf890a93
IT
2827 { "sets", { Eb }, 0 },
2828 { "setns", { Eb }, 0 },
2829 { "setp", { Eb }, 0 },
2830 { "setnp", { Eb }, 0 },
2831 { "setl", { Eb }, 0 },
2832 { "setge", { Eb }, 0 },
2833 { "setle", { Eb }, 0 },
2834 { "setg", { Eb }, 0 },
252b5132 2835 /* a0 */
bf890a93
IT
2836 { "pushT", { fs }, 0 },
2837 { "popT", { fs }, 0 },
2838 { "cpuid", { XX }, 0 },
2839 { "btS", { Ev, Gv }, 0 },
2840 { "shldS", { Ev, Gv, Ib }, 0 },
2841 { "shldS", { Ev, Gv, CL }, 0 },
1ceb70f8
L
2842 { REG_TABLE (REG_0FA6) },
2843 { REG_TABLE (REG_0FA7) },
252b5132 2844 /* a8 */
bf890a93
IT
2845 { "pushT", { gs }, 0 },
2846 { "popT", { gs }, 0 },
2847 { "rsm", { XX }, 0 },
2848 { "btsS", { Evh1, Gv }, 0 },
2849 { "shrdS", { Ev, Gv, Ib }, 0 },
2850 { "shrdS", { Ev, Gv, CL }, 0 },
1ceb70f8 2851 { REG_TABLE (REG_0FAE) },
bf890a93 2852 { "imulS", { Gv, Ev }, 0 },
252b5132 2853 /* b0 */
bf890a93
IT
2854 { "cmpxchgB", { Ebh1, Gb }, 0 },
2855 { "cmpxchgS", { Evh1, Gv }, 0 },
1ceb70f8 2856 { MOD_TABLE (MOD_0FB2) },
bf890a93 2857 { "btrS", { Evh1, Gv }, 0 },
1ceb70f8
L
2858 { MOD_TABLE (MOD_0FB4) },
2859 { MOD_TABLE (MOD_0FB5) },
bf890a93
IT
2860 { "movz{bR|x}", { Gv, Eb }, 0 },
2861 { "movz{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movzww ! */
252b5132 2862 /* b8 */
1ceb70f8 2863 { PREFIX_TABLE (PREFIX_0FB8) },
66f1eba0 2864 { "ud1S", { Gv, Ev }, 0 },
1ceb70f8 2865 { REG_TABLE (REG_0FBA) },
bf890a93 2866 { "btcS", { Evh1, Gv }, 0 },
f12dc422 2867 { PREFIX_TABLE (PREFIX_0FBC) },
1ceb70f8 2868 { PREFIX_TABLE (PREFIX_0FBD) },
bf890a93
IT
2869 { "movs{bR|x}", { Gv, Eb }, 0 },
2870 { "movs{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movsww ! */
252b5132 2871 /* c0 */
bf890a93
IT
2872 { "xaddB", { Ebh1, Gb }, 0 },
2873 { "xaddS", { Evh1, Gv }, 0 },
1ceb70f8 2874 { PREFIX_TABLE (PREFIX_0FC2) },
a8484f96 2875 { MOD_TABLE (MOD_0FC3) },
507bd325
L
2876 { "pinsrw", { MX, Edqw, Ib }, PREFIX_OPCODE },
2877 { "pextrw", { Gdq, MS, Ib }, PREFIX_OPCODE },
2878 { "shufpX", { XM, EXx, Ib }, PREFIX_OPCODE },
1ceb70f8 2879 { REG_TABLE (REG_0FC7) },
252b5132 2880 /* c8 */
bf890a93
IT
2881 { "bswap", { RMeAX }, 0 },
2882 { "bswap", { RMeCX }, 0 },
2883 { "bswap", { RMeDX }, 0 },
2884 { "bswap", { RMeBX }, 0 },
2885 { "bswap", { RMeSP }, 0 },
2886 { "bswap", { RMeBP }, 0 },
2887 { "bswap", { RMeSI }, 0 },
2888 { "bswap", { RMeDI }, 0 },
252b5132 2889 /* d0 */
1ceb70f8 2890 { PREFIX_TABLE (PREFIX_0FD0) },
507bd325
L
2891 { "psrlw", { MX, EM }, PREFIX_OPCODE },
2892 { "psrld", { MX, EM }, PREFIX_OPCODE },
2893 { "psrlq", { MX, EM }, PREFIX_OPCODE },
2894 { "paddq", { MX, EM }, PREFIX_OPCODE },
2895 { "pmullw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8 2896 { PREFIX_TABLE (PREFIX_0FD6) },
75c135a8 2897 { MOD_TABLE (MOD_0FD7) },
252b5132 2898 /* d8 */
507bd325
L
2899 { "psubusb", { MX, EM }, PREFIX_OPCODE },
2900 { "psubusw", { MX, EM }, PREFIX_OPCODE },
2901 { "pminub", { MX, EM }, PREFIX_OPCODE },
2902 { "pand", { MX, EM }, PREFIX_OPCODE },
2903 { "paddusb", { MX, EM }, PREFIX_OPCODE },
2904 { "paddusw", { MX, EM }, PREFIX_OPCODE },
2905 { "pmaxub", { MX, EM }, PREFIX_OPCODE },
2906 { "pandn", { MX, EM }, PREFIX_OPCODE },
252b5132 2907 /* e0 */
507bd325
L
2908 { "pavgb", { MX, EM }, PREFIX_OPCODE },
2909 { "psraw", { MX, EM }, PREFIX_OPCODE },
2910 { "psrad", { MX, EM }, PREFIX_OPCODE },
2911 { "pavgw", { MX, EM }, PREFIX_OPCODE },
2912 { "pmulhuw", { MX, EM }, PREFIX_OPCODE },
2913 { "pmulhw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8
L
2914 { PREFIX_TABLE (PREFIX_0FE6) },
2915 { PREFIX_TABLE (PREFIX_0FE7) },
252b5132 2916 /* e8 */
507bd325
L
2917 { "psubsb", { MX, EM }, PREFIX_OPCODE },
2918 { "psubsw", { MX, EM }, PREFIX_OPCODE },
2919 { "pminsw", { MX, EM }, PREFIX_OPCODE },
2920 { "por", { MX, EM }, PREFIX_OPCODE },
2921 { "paddsb", { MX, EM }, PREFIX_OPCODE },
2922 { "paddsw", { MX, EM }, PREFIX_OPCODE },
2923 { "pmaxsw", { MX, EM }, PREFIX_OPCODE },
2924 { "pxor", { MX, EM }, PREFIX_OPCODE },
252b5132 2925 /* f0 */
1ceb70f8 2926 { PREFIX_TABLE (PREFIX_0FF0) },
507bd325
L
2927 { "psllw", { MX, EM }, PREFIX_OPCODE },
2928 { "pslld", { MX, EM }, PREFIX_OPCODE },
2929 { "psllq", { MX, EM }, PREFIX_OPCODE },
2930 { "pmuludq", { MX, EM }, PREFIX_OPCODE },
2931 { "pmaddwd", { MX, EM }, PREFIX_OPCODE },
2932 { "psadbw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8 2933 { PREFIX_TABLE (PREFIX_0FF7) },
252b5132 2934 /* f8 */
507bd325
L
2935 { "psubb", { MX, EM }, PREFIX_OPCODE },
2936 { "psubw", { MX, EM }, PREFIX_OPCODE },
2937 { "psubd", { MX, EM }, PREFIX_OPCODE },
2938 { "psubq", { MX, EM }, PREFIX_OPCODE },
2939 { "paddb", { MX, EM }, PREFIX_OPCODE },
2940 { "paddw", { MX, EM }, PREFIX_OPCODE },
2941 { "paddd", { MX, EM }, PREFIX_OPCODE },
66f1eba0 2942 { "ud0S", { Gv, Ev }, 0 },
252b5132
RH
2943};
2944
2945static const unsigned char onebyte_has_modrm[256] = {
c608c12e
AM
2946 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2947 /* ------------------------------- */
2948 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
2949 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
2950 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
2951 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
2952 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
2953 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
2954 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
2955 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
2956 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
2957 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
2958 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
2959 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
2960 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
2961 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
2962 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
2963 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
2964 /* ------------------------------- */
2965 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
252b5132
RH
2966};
2967
2968static const unsigned char twobyte_has_modrm[256] = {
c608c12e
AM
2969 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2970 /* ------------------------------- */
252b5132 2971 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
b5b1fc4f 2972 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
85f10a01 2973 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
331d2d0d 2974 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
252b5132 2975 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
4bba6815
AM
2976 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
2977 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
85f10a01 2978 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
252b5132
RH
2979 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
2980 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
30d1c836 2981 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
66f1eba0 2982 /* b0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* bf */
252b5132 2983 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
ca164297 2984 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
4bba6815 2985 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
66f1eba0 2986 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 /* ff */
c608c12e
AM
2987 /* ------------------------------- */
2988 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2989};
2990
252b5132
RH
2991static char obuf[100];
2992static char *obufp;
ea397f5b 2993static char *mnemonicendp;
252b5132
RH
2994static char scratchbuf[100];
2995static unsigned char *start_codep;
2996static unsigned char *insn_codep;
2997static unsigned char *codep;
285ca992 2998static unsigned char *end_codep;
f16cd0d5
L
2999static int last_lock_prefix;
3000static int last_repz_prefix;
3001static int last_repnz_prefix;
3002static int last_data_prefix;
3003static int last_addr_prefix;
3004static int last_rex_prefix;
3005static int last_seg_prefix;
d9949a36 3006static int fwait_prefix;
285ca992
L
3007/* The active segment register prefix. */
3008static int active_seg_prefix;
f16cd0d5
L
3009#define MAX_CODE_LENGTH 15
3010/* We can up to 14 prefixes since the maximum instruction length is
3011 15bytes. */
3012static int all_prefixes[MAX_CODE_LENGTH - 1];
252b5132 3013static disassemble_info *the_info;
7967e09e
L
3014static struct
3015 {
3016 int mod;
7967e09e 3017 int reg;
484c222e 3018 int rm;
7967e09e
L
3019 }
3020modrm;
4bba6815 3021static unsigned char need_modrm;
dfc8cf43
L
3022static struct
3023 {
3024 int scale;
3025 int index;
3026 int base;
3027 }
3028sib;
c0f3af97
L
3029static struct
3030 {
3031 int register_specifier;
3032 int length;
3033 int prefix;
3034 int w;
43234a1e
L
3035 int evex;
3036 int r;
3037 int v;
3038 int mask_register_specifier;
3039 int zeroing;
3040 int ll;
3041 int b;
c0f3af97
L
3042 }
3043vex;
3044static unsigned char need_vex;
3045static unsigned char need_vex_reg;
dae39acc 3046static unsigned char vex_w_done;
252b5132 3047
ea397f5b
L
3048struct op
3049 {
3050 const char *name;
3051 unsigned int len;
3052 };
3053
4bba6815
AM
3054/* If we are accessing mod/rm/reg without need_modrm set, then the
3055 values are stale. Hitting this abort likely indicates that you
3056 need to update onebyte_has_modrm or twobyte_has_modrm. */
3057#define MODRM_CHECK if (!need_modrm) abort ()
3058
d708bcba
AM
3059static const char **names64;
3060static const char **names32;
3061static const char **names16;
3062static const char **names8;
3063static const char **names8rex;
3064static const char **names_seg;
db51cc60
L
3065static const char *index64;
3066static const char *index32;
d708bcba 3067static const char **index16;
7e8b059b 3068static const char **names_bnd;
d708bcba
AM
3069
3070static const char *intel_names64[] = {
3071 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
3072 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
3073};
3074static const char *intel_names32[] = {
3075 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
3076 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
3077};
3078static const char *intel_names16[] = {
3079 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
3080 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
3081};
3082static const char *intel_names8[] = {
3083 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
3084};
3085static const char *intel_names8rex[] = {
3086 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
3087 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
3088};
3089static const char *intel_names_seg[] = {
3090 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
3091};
db51cc60
L
3092static const char *intel_index64 = "riz";
3093static const char *intel_index32 = "eiz";
d708bcba
AM
3094static const char *intel_index16[] = {
3095 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
3096};
3097
3098static const char *att_names64[] = {
3099 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
52b15da3
JH
3100 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
3101};
d708bcba
AM
3102static const char *att_names32[] = {
3103 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
52b15da3 3104 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
252b5132 3105};
d708bcba
AM
3106static const char *att_names16[] = {
3107 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
52b15da3 3108 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
252b5132 3109};
d708bcba
AM
3110static const char *att_names8[] = {
3111 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
252b5132 3112};
d708bcba
AM
3113static const char *att_names8rex[] = {
3114 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
52b15da3
JH
3115 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
3116};
d708bcba
AM
3117static const char *att_names_seg[] = {
3118 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
252b5132 3119};
db51cc60
L
3120static const char *att_index64 = "%riz";
3121static const char *att_index32 = "%eiz";
d708bcba
AM
3122static const char *att_index16[] = {
3123 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
252b5132
RH
3124};
3125
b9733481
L
3126static const char **names_mm;
3127static const char *intel_names_mm[] = {
3128 "mm0", "mm1", "mm2", "mm3",
3129 "mm4", "mm5", "mm6", "mm7"
3130};
3131static const char *att_names_mm[] = {
3132 "%mm0", "%mm1", "%mm2", "%mm3",
3133 "%mm4", "%mm5", "%mm6", "%mm7"
3134};
3135
7e8b059b
L
3136static const char *intel_names_bnd[] = {
3137 "bnd0", "bnd1", "bnd2", "bnd3"
3138};
3139
3140static const char *att_names_bnd[] = {
3141 "%bnd0", "%bnd1", "%bnd2", "%bnd3"
3142};
3143
b9733481
L
3144static const char **names_xmm;
3145static const char *intel_names_xmm[] = {
3146 "xmm0", "xmm1", "xmm2", "xmm3",
3147 "xmm4", "xmm5", "xmm6", "xmm7",
3148 "xmm8", "xmm9", "xmm10", "xmm11",
43234a1e
L
3149 "xmm12", "xmm13", "xmm14", "xmm15",
3150 "xmm16", "xmm17", "xmm18", "xmm19",
3151 "xmm20", "xmm21", "xmm22", "xmm23",
3152 "xmm24", "xmm25", "xmm26", "xmm27",
3153 "xmm28", "xmm29", "xmm30", "xmm31"
b9733481
L
3154};
3155static const char *att_names_xmm[] = {
3156 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
3157 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
3158 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
43234a1e
L
3159 "%xmm12", "%xmm13", "%xmm14", "%xmm15",
3160 "%xmm16", "%xmm17", "%xmm18", "%xmm19",
3161 "%xmm20", "%xmm21", "%xmm22", "%xmm23",
3162 "%xmm24", "%xmm25", "%xmm26", "%xmm27",
3163 "%xmm28", "%xmm29", "%xmm30", "%xmm31"
b9733481
L
3164};
3165
3166static const char **names_ymm;
3167static const char *intel_names_ymm[] = {
3168 "ymm0", "ymm1", "ymm2", "ymm3",
3169 "ymm4", "ymm5", "ymm6", "ymm7",
3170 "ymm8", "ymm9", "ymm10", "ymm11",
43234a1e
L
3171 "ymm12", "ymm13", "ymm14", "ymm15",
3172 "ymm16", "ymm17", "ymm18", "ymm19",
3173 "ymm20", "ymm21", "ymm22", "ymm23",
3174 "ymm24", "ymm25", "ymm26", "ymm27",
3175 "ymm28", "ymm29", "ymm30", "ymm31"
b9733481
L
3176};
3177static const char *att_names_ymm[] = {
3178 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
3179 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
3180 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
43234a1e
L
3181 "%ymm12", "%ymm13", "%ymm14", "%ymm15",
3182 "%ymm16", "%ymm17", "%ymm18", "%ymm19",
3183 "%ymm20", "%ymm21", "%ymm22", "%ymm23",
3184 "%ymm24", "%ymm25", "%ymm26", "%ymm27",
3185 "%ymm28", "%ymm29", "%ymm30", "%ymm31"
3186};
3187
3188static const char **names_zmm;
3189static const char *intel_names_zmm[] = {
3190 "zmm0", "zmm1", "zmm2", "zmm3",
3191 "zmm4", "zmm5", "zmm6", "zmm7",
3192 "zmm8", "zmm9", "zmm10", "zmm11",
3193 "zmm12", "zmm13", "zmm14", "zmm15",
3194 "zmm16", "zmm17", "zmm18", "zmm19",
3195 "zmm20", "zmm21", "zmm22", "zmm23",
3196 "zmm24", "zmm25", "zmm26", "zmm27",
3197 "zmm28", "zmm29", "zmm30", "zmm31"
3198};
3199static const char *att_names_zmm[] = {
3200 "%zmm0", "%zmm1", "%zmm2", "%zmm3",
3201 "%zmm4", "%zmm5", "%zmm6", "%zmm7",
3202 "%zmm8", "%zmm9", "%zmm10", "%zmm11",
3203 "%zmm12", "%zmm13", "%zmm14", "%zmm15",
3204 "%zmm16", "%zmm17", "%zmm18", "%zmm19",
3205 "%zmm20", "%zmm21", "%zmm22", "%zmm23",
3206 "%zmm24", "%zmm25", "%zmm26", "%zmm27",
3207 "%zmm28", "%zmm29", "%zmm30", "%zmm31"
3208};
3209
3210static const char **names_mask;
3211static const char *intel_names_mask[] = {
3212 "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"
3213};
3214static const char *att_names_mask[] = {
3215 "%k0", "%k1", "%k2", "%k3", "%k4", "%k5", "%k6", "%k7"
3216};
3217
3218static const char *names_rounding[] =
3219{
3220 "{rn-sae}",
3221 "{rd-sae}",
3222 "{ru-sae}",
3223 "{rz-sae}"
b9733481
L
3224};
3225
1ceb70f8
L
3226static const struct dis386 reg_table[][8] = {
3227 /* REG_80 */
252b5132 3228 {
bf890a93
IT
3229 { "addA", { Ebh1, Ib }, 0 },
3230 { "orA", { Ebh1, Ib }, 0 },
3231 { "adcA", { Ebh1, Ib }, 0 },
3232 { "sbbA", { Ebh1, Ib }, 0 },
3233 { "andA", { Ebh1, Ib }, 0 },
3234 { "subA", { Ebh1, Ib }, 0 },
3235 { "xorA", { Ebh1, Ib }, 0 },
3236 { "cmpA", { Eb, Ib }, 0 },
252b5132 3237 },
1ceb70f8 3238 /* REG_81 */
252b5132 3239 {
bf890a93
IT
3240 { "addQ", { Evh1, Iv }, 0 },
3241 { "orQ", { Evh1, Iv }, 0 },
3242 { "adcQ", { Evh1, Iv }, 0 },
3243 { "sbbQ", { Evh1, Iv }, 0 },
3244 { "andQ", { Evh1, Iv }, 0 },
3245 { "subQ", { Evh1, Iv }, 0 },
3246 { "xorQ", { Evh1, Iv }, 0 },
3247 { "cmpQ", { Ev, Iv }, 0 },
252b5132 3248 },
7148c369 3249 /* REG_83 */
252b5132 3250 {
bf890a93
IT
3251 { "addQ", { Evh1, sIb }, 0 },
3252 { "orQ", { Evh1, sIb }, 0 },
3253 { "adcQ", { Evh1, sIb }, 0 },
3254 { "sbbQ", { Evh1, sIb }, 0 },
3255 { "andQ", { Evh1, sIb }, 0 },
3256 { "subQ", { Evh1, sIb }, 0 },
3257 { "xorQ", { Evh1, sIb }, 0 },
3258 { "cmpQ", { Ev, sIb }, 0 },
252b5132 3259 },
1ceb70f8 3260 /* REG_8F */
4e7d34a6 3261 {
bf890a93 3262 { "popU", { stackEv }, 0 },
c48244a5 3263 { XOP_8F_TABLE (XOP_09) },
592d1631
L
3264 { Bad_Opcode },
3265 { Bad_Opcode },
3266 { Bad_Opcode },
f88c9eb0 3267 { XOP_8F_TABLE (XOP_09) },
4e7d34a6 3268 },
1ceb70f8 3269 /* REG_C0 */
252b5132 3270 {
bf890a93
IT
3271 { "rolA", { Eb, Ib }, 0 },
3272 { "rorA", { Eb, Ib }, 0 },
3273 { "rclA", { Eb, Ib }, 0 },
3274 { "rcrA", { Eb, Ib }, 0 },
3275 { "shlA", { Eb, Ib }, 0 },
3276 { "shrA", { Eb, Ib }, 0 },
e4bdd679 3277 { "shlA", { Eb, Ib }, 0 },
bf890a93 3278 { "sarA", { Eb, Ib }, 0 },
252b5132 3279 },
1ceb70f8 3280 /* REG_C1 */
252b5132 3281 {
bf890a93
IT
3282 { "rolQ", { Ev, Ib }, 0 },
3283 { "rorQ", { Ev, Ib }, 0 },
3284 { "rclQ", { Ev, Ib }, 0 },
3285 { "rcrQ", { Ev, Ib }, 0 },
3286 { "shlQ", { Ev, Ib }, 0 },
3287 { "shrQ", { Ev, Ib }, 0 },
e4bdd679 3288 { "shlQ", { Ev, Ib }, 0 },
bf890a93 3289 { "sarQ", { Ev, Ib }, 0 },
252b5132 3290 },
1ceb70f8 3291 /* REG_C6 */
4e7d34a6 3292 {
bf890a93 3293 { "movA", { Ebh3, Ib }, 0 },
42164a71
L
3294 { Bad_Opcode },
3295 { Bad_Opcode },
3296 { Bad_Opcode },
3297 { Bad_Opcode },
3298 { Bad_Opcode },
3299 { Bad_Opcode },
3300 { MOD_TABLE (MOD_C6_REG_7) },
4e7d34a6 3301 },
1ceb70f8 3302 /* REG_C7 */
4e7d34a6 3303 {
bf890a93 3304 { "movQ", { Evh3, Iv }, 0 },
42164a71
L
3305 { Bad_Opcode },
3306 { Bad_Opcode },
3307 { Bad_Opcode },
3308 { Bad_Opcode },
3309 { Bad_Opcode },
3310 { Bad_Opcode },
3311 { MOD_TABLE (MOD_C7_REG_7) },
4e7d34a6 3312 },
1ceb70f8 3313 /* REG_D0 */
252b5132 3314 {
bf890a93
IT
3315 { "rolA", { Eb, I1 }, 0 },
3316 { "rorA", { Eb, I1 }, 0 },
3317 { "rclA", { Eb, I1 }, 0 },
3318 { "rcrA", { Eb, I1 }, 0 },
3319 { "shlA", { Eb, I1 }, 0 },
3320 { "shrA", { Eb, I1 }, 0 },
e4bdd679 3321 { "shlA", { Eb, I1 }, 0 },
bf890a93 3322 { "sarA", { Eb, I1 }, 0 },
252b5132 3323 },
1ceb70f8 3324 /* REG_D1 */
252b5132 3325 {
bf890a93
IT
3326 { "rolQ", { Ev, I1 }, 0 },
3327 { "rorQ", { Ev, I1 }, 0 },
3328 { "rclQ", { Ev, I1 }, 0 },
3329 { "rcrQ", { Ev, I1 }, 0 },
3330 { "shlQ", { Ev, I1 }, 0 },
3331 { "shrQ", { Ev, I1 }, 0 },
e4bdd679 3332 { "shlQ", { Ev, I1 }, 0 },
bf890a93 3333 { "sarQ", { Ev, I1 }, 0 },
252b5132 3334 },
1ceb70f8 3335 /* REG_D2 */
252b5132 3336 {
bf890a93
IT
3337 { "rolA", { Eb, CL }, 0 },
3338 { "rorA", { Eb, CL }, 0 },
3339 { "rclA", { Eb, CL }, 0 },
3340 { "rcrA", { Eb, CL }, 0 },
3341 { "shlA", { Eb, CL }, 0 },
3342 { "shrA", { Eb, CL }, 0 },
e4bdd679 3343 { "shlA", { Eb, CL }, 0 },
bf890a93 3344 { "sarA", { Eb, CL }, 0 },
252b5132 3345 },
1ceb70f8 3346 /* REG_D3 */
252b5132 3347 {
bf890a93
IT
3348 { "rolQ", { Ev, CL }, 0 },
3349 { "rorQ", { Ev, CL }, 0 },
3350 { "rclQ", { Ev, CL }, 0 },
3351 { "rcrQ", { Ev, CL }, 0 },
3352 { "shlQ", { Ev, CL }, 0 },
3353 { "shrQ", { Ev, CL }, 0 },
e4bdd679 3354 { "shlQ", { Ev, CL }, 0 },
bf890a93 3355 { "sarQ", { Ev, CL }, 0 },
252b5132 3356 },
1ceb70f8 3357 /* REG_F6 */
252b5132 3358 {
bf890a93 3359 { "testA", { Eb, Ib }, 0 },
7db2c588 3360 { "testA", { Eb, Ib }, 0 },
bf890a93
IT
3361 { "notA", { Ebh1 }, 0 },
3362 { "negA", { Ebh1 }, 0 },
3363 { "mulA", { Eb }, 0 }, /* Don't print the implicit %al register, */
3364 { "imulA", { Eb }, 0 }, /* to distinguish these opcodes from other */
3365 { "divA", { Eb }, 0 }, /* mul/imul opcodes. Do the same for div */
3366 { "idivA", { Eb }, 0 }, /* and idiv for consistency. */
252b5132 3367 },
1ceb70f8 3368 /* REG_F7 */
252b5132 3369 {
bf890a93 3370 { "testQ", { Ev, Iv }, 0 },
7db2c588 3371 { "testQ", { Ev, Iv }, 0 },
bf890a93
IT
3372 { "notQ", { Evh1 }, 0 },
3373 { "negQ", { Evh1 }, 0 },
3374 { "mulQ", { Ev }, 0 }, /* Don't print the implicit register. */
3375 { "imulQ", { Ev }, 0 },
3376 { "divQ", { Ev }, 0 },
3377 { "idivQ", { Ev }, 0 },
252b5132 3378 },
1ceb70f8 3379 /* REG_FE */
252b5132 3380 {
bf890a93
IT
3381 { "incA", { Ebh1 }, 0 },
3382 { "decA", { Ebh1 }, 0 },
252b5132 3383 },
1ceb70f8 3384 /* REG_FF */
252b5132 3385 {
bf890a93
IT
3386 { "incQ", { Evh1 }, 0 },
3387 { "decQ", { Evh1 }, 0 },
9fef80d6 3388 { "call{&|}", { NOTRACK, indirEv, BND }, 0 },
4a357820 3389 { MOD_TABLE (MOD_FF_REG_3) },
9fef80d6 3390 { "jmp{&|}", { NOTRACK, indirEv, BND }, 0 },
4a357820 3391 { MOD_TABLE (MOD_FF_REG_5) },
bf890a93 3392 { "pushU", { stackEv }, 0 },
592d1631 3393 { Bad_Opcode },
252b5132 3394 },
1ceb70f8 3395 /* REG_0F00 */
252b5132 3396 {
bf890a93
IT
3397 { "sldtD", { Sv }, 0 },
3398 { "strD", { Sv }, 0 },
3399 { "lldt", { Ew }, 0 },
3400 { "ltr", { Ew }, 0 },
3401 { "verr", { Ew }, 0 },
3402 { "verw", { Ew }, 0 },
592d1631
L
3403 { Bad_Opcode },
3404 { Bad_Opcode },
252b5132 3405 },
1ceb70f8 3406 /* REG_0F01 */
252b5132 3407 {
1ceb70f8
L
3408 { MOD_TABLE (MOD_0F01_REG_0) },
3409 { MOD_TABLE (MOD_0F01_REG_1) },
3410 { MOD_TABLE (MOD_0F01_REG_2) },
3411 { MOD_TABLE (MOD_0F01_REG_3) },
bf890a93 3412 { "smswD", { Sv }, 0 },
8eab4136 3413 { MOD_TABLE (MOD_0F01_REG_5) },
bf890a93 3414 { "lmsw", { Ew }, 0 },
1ceb70f8 3415 { MOD_TABLE (MOD_0F01_REG_7) },
252b5132 3416 },
b5b1fc4f 3417 /* REG_0F0D */
252b5132 3418 {
bf890a93
IT
3419 { "prefetch", { Mb }, 0 },
3420 { "prefetchw", { Mb }, 0 },
3421 { "prefetchwt1", { Mb }, 0 },
3422 { "prefetch", { Mb }, 0 },
3423 { "prefetch", { Mb }, 0 },
3424 { "prefetch", { Mb }, 0 },
3425 { "prefetch", { Mb }, 0 },
3426 { "prefetch", { Mb }, 0 },
252b5132 3427 },
1ceb70f8 3428 /* REG_0F18 */
252b5132 3429 {
1ceb70f8
L
3430 { MOD_TABLE (MOD_0F18_REG_0) },
3431 { MOD_TABLE (MOD_0F18_REG_1) },
3432 { MOD_TABLE (MOD_0F18_REG_2) },
3433 { MOD_TABLE (MOD_0F18_REG_3) },
d7189fa5
RM
3434 { MOD_TABLE (MOD_0F18_REG_4) },
3435 { MOD_TABLE (MOD_0F18_REG_5) },
3436 { MOD_TABLE (MOD_0F18_REG_6) },
3437 { MOD_TABLE (MOD_0F18_REG_7) },
252b5132 3438 },
f8687e93 3439 /* REG_0F1C_P_0_MOD_0 */
c48935d7
IT
3440 {
3441 { "cldemote", { Mb }, 0 },
3442 { "nopQ", { Ev }, 0 },
3443 { "nopQ", { Ev }, 0 },
3444 { "nopQ", { Ev }, 0 },
3445 { "nopQ", { Ev }, 0 },
3446 { "nopQ", { Ev }, 0 },
3447 { "nopQ", { Ev }, 0 },
3448 { "nopQ", { Ev }, 0 },
3449 },
f8687e93 3450 /* REG_0F1E_P_1_MOD_3 */
603555e5
L
3451 {
3452 { "nopQ", { Ev }, 0 },
3453 { "rdsspK", { Rdq }, PREFIX_OPCODE },
3454 { "nopQ", { Ev }, 0 },
3455 { "nopQ", { Ev }, 0 },
3456 { "nopQ", { Ev }, 0 },
3457 { "nopQ", { Ev }, 0 },
3458 { "nopQ", { Ev }, 0 },
f8687e93 3459 { RM_TABLE (RM_0F1E_P_1_MOD_3_REG_7) },
603555e5 3460 },
1ceb70f8 3461 /* REG_0F71 */
a6bd098c 3462 {
592d1631
L
3463 { Bad_Opcode },
3464 { Bad_Opcode },
1ceb70f8 3465 { MOD_TABLE (MOD_0F71_REG_2) },
592d1631 3466 { Bad_Opcode },
1ceb70f8 3467 { MOD_TABLE (MOD_0F71_REG_4) },
592d1631 3468 { Bad_Opcode },
1ceb70f8 3469 { MOD_TABLE (MOD_0F71_REG_6) },
a6bd098c 3470 },
1ceb70f8 3471 /* REG_0F72 */
a6bd098c 3472 {
592d1631
L
3473 { Bad_Opcode },
3474 { Bad_Opcode },
1ceb70f8 3475 { MOD_TABLE (MOD_0F72_REG_2) },
592d1631 3476 { Bad_Opcode },
1ceb70f8 3477 { MOD_TABLE (MOD_0F72_REG_4) },
592d1631 3478 { Bad_Opcode },
1ceb70f8 3479 { MOD_TABLE (MOD_0F72_REG_6) },
a6bd098c 3480 },
1ceb70f8 3481 /* REG_0F73 */
252b5132 3482 {
592d1631
L
3483 { Bad_Opcode },
3484 { Bad_Opcode },
1ceb70f8
L
3485 { MOD_TABLE (MOD_0F73_REG_2) },
3486 { MOD_TABLE (MOD_0F73_REG_3) },
592d1631
L
3487 { Bad_Opcode },
3488 { Bad_Opcode },
1ceb70f8
L
3489 { MOD_TABLE (MOD_0F73_REG_6) },
3490 { MOD_TABLE (MOD_0F73_REG_7) },
252b5132 3491 },
1ceb70f8 3492 /* REG_0FA6 */
252b5132 3493 {
bf890a93
IT
3494 { "montmul", { { OP_0f07, 0 } }, 0 },
3495 { "xsha1", { { OP_0f07, 0 } }, 0 },
3496 { "xsha256", { { OP_0f07, 0 } }, 0 },
4e7d34a6 3497 },
1ceb70f8 3498 /* REG_0FA7 */
4e7d34a6 3499 {
bf890a93
IT
3500 { "xstore-rng", { { OP_0f07, 0 } }, 0 },
3501 { "xcrypt-ecb", { { OP_0f07, 0 } }, 0 },
3502 { "xcrypt-cbc", { { OP_0f07, 0 } }, 0 },
3503 { "xcrypt-ctr", { { OP_0f07, 0 } }, 0 },
3504 { "xcrypt-cfb", { { OP_0f07, 0 } }, 0 },
3505 { "xcrypt-ofb", { { OP_0f07, 0 } }, 0 },
4e7d34a6 3506 },
1ceb70f8 3507 /* REG_0FAE */
4e7d34a6 3508 {
1ceb70f8
L
3509 { MOD_TABLE (MOD_0FAE_REG_0) },
3510 { MOD_TABLE (MOD_0FAE_REG_1) },
3511 { MOD_TABLE (MOD_0FAE_REG_2) },
3512 { MOD_TABLE (MOD_0FAE_REG_3) },
475a2301 3513 { MOD_TABLE (MOD_0FAE_REG_4) },
1ceb70f8
L
3514 { MOD_TABLE (MOD_0FAE_REG_5) },
3515 { MOD_TABLE (MOD_0FAE_REG_6) },
3516 { MOD_TABLE (MOD_0FAE_REG_7) },
252b5132 3517 },
1ceb70f8 3518 /* REG_0FBA */
252b5132 3519 {
592d1631
L
3520 { Bad_Opcode },
3521 { Bad_Opcode },
3522 { Bad_Opcode },
3523 { Bad_Opcode },
bf890a93
IT
3524 { "btQ", { Ev, Ib }, 0 },
3525 { "btsQ", { Evh1, Ib }, 0 },
3526 { "btrQ", { Evh1, Ib }, 0 },
3527 { "btcQ", { Evh1, Ib }, 0 },
c608c12e 3528 },
1ceb70f8 3529 /* REG_0FC7 */
c608c12e 3530 {
592d1631 3531 { Bad_Opcode },
bf890a93 3532 { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } }, 0 },
592d1631 3533 { Bad_Opcode },
963f3586
IT
3534 { MOD_TABLE (MOD_0FC7_REG_3) },
3535 { MOD_TABLE (MOD_0FC7_REG_4) },
3536 { MOD_TABLE (MOD_0FC7_REG_5) },
1ceb70f8
L
3537 { MOD_TABLE (MOD_0FC7_REG_6) },
3538 { MOD_TABLE (MOD_0FC7_REG_7) },
252b5132 3539 },
592a252b 3540 /* REG_VEX_0F71 */
c0f3af97 3541 {
592d1631
L
3542 { Bad_Opcode },
3543 { Bad_Opcode },
592a252b 3544 { MOD_TABLE (MOD_VEX_0F71_REG_2) },
592d1631 3545 { Bad_Opcode },
592a252b 3546 { MOD_TABLE (MOD_VEX_0F71_REG_4) },
592d1631 3547 { Bad_Opcode },
592a252b 3548 { MOD_TABLE (MOD_VEX_0F71_REG_6) },
c0f3af97 3549 },
592a252b 3550 /* REG_VEX_0F72 */
c0f3af97 3551 {
592d1631
L
3552 { Bad_Opcode },
3553 { Bad_Opcode },
592a252b 3554 { MOD_TABLE (MOD_VEX_0F72_REG_2) },
592d1631 3555 { Bad_Opcode },
592a252b 3556 { MOD_TABLE (MOD_VEX_0F72_REG_4) },
592d1631 3557 { Bad_Opcode },
592a252b 3558 { MOD_TABLE (MOD_VEX_0F72_REG_6) },
c0f3af97 3559 },
592a252b 3560 /* REG_VEX_0F73 */
c0f3af97 3561 {
592d1631
L
3562 { Bad_Opcode },
3563 { Bad_Opcode },
592a252b
L
3564 { MOD_TABLE (MOD_VEX_0F73_REG_2) },
3565 { MOD_TABLE (MOD_VEX_0F73_REG_3) },
592d1631
L
3566 { Bad_Opcode },
3567 { Bad_Opcode },
592a252b
L
3568 { MOD_TABLE (MOD_VEX_0F73_REG_6) },
3569 { MOD_TABLE (MOD_VEX_0F73_REG_7) },
c0f3af97 3570 },
592a252b 3571 /* REG_VEX_0FAE */
c0f3af97 3572 {
592d1631
L
3573 { Bad_Opcode },
3574 { Bad_Opcode },
592a252b
L
3575 { MOD_TABLE (MOD_VEX_0FAE_REG_2) },
3576 { MOD_TABLE (MOD_VEX_0FAE_REG_3) },
c0f3af97 3577 },
f12dc422
L
3578 /* REG_VEX_0F38F3 */
3579 {
3580 { Bad_Opcode },
3581 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1) },
3582 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2) },
3583 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3) },
3584 },
f88c9eb0
SP
3585 /* REG_XOP_LWPCB */
3586 {
bf890a93
IT
3587 { "llwpcb", { { OP_LWPCB_E, 0 } }, 0 },
3588 { "slwpcb", { { OP_LWPCB_E, 0 } }, 0 },
f88c9eb0
SP
3589 },
3590 /* REG_XOP_LWP */
3591 {
c1dc7af5
JB
3592 { "lwpins", { { OP_LWP_E, 0 }, Ed, Id }, 0 },
3593 { "lwpval", { { OP_LWP_E, 0 }, Ed, Id }, 0 },
f88c9eb0 3594 },
2a2a0f38
QN
3595 /* REG_XOP_TBM_01 */
3596 {
3597 { Bad_Opcode },
c1dc7af5
JB
3598 { "blcfill", { { OP_LWP_E, 0 }, Edq }, 0 },
3599 { "blsfill", { { OP_LWP_E, 0 }, Edq }, 0 },
3600 { "blcs", { { OP_LWP_E, 0 }, Edq }, 0 },
3601 { "tzmsk", { { OP_LWP_E, 0 }, Edq }, 0 },
3602 { "blcic", { { OP_LWP_E, 0 }, Edq }, 0 },
3603 { "blsic", { { OP_LWP_E, 0 }, Edq }, 0 },
3604 { "t1mskc", { { OP_LWP_E, 0 }, Edq }, 0 },
2a2a0f38
QN
3605 },
3606 /* REG_XOP_TBM_02 */
3607 {
3608 { Bad_Opcode },
c1dc7af5 3609 { "blcmsk", { { OP_LWP_E, 0 }, Edq }, 0 },
2a2a0f38
QN
3610 { Bad_Opcode },
3611 { Bad_Opcode },
3612 { Bad_Opcode },
3613 { Bad_Opcode },
c1dc7af5 3614 { "blci", { { OP_LWP_E, 0 }, Edq }, 0 },
2a2a0f38 3615 },
ad692897
L
3616
3617#include "i386-dis-evex-reg.h"
4e7d34a6
L
3618};
3619
1ceb70f8
L
3620static const struct dis386 prefix_table[][4] = {
3621 /* PREFIX_90 */
252b5132 3622 {
bf890a93
IT
3623 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
3624 { "pause", { XX }, 0 },
3625 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
507bd325 3626 { NULL, { { NULL, 0 } }, PREFIX_IGNORED }
0f10071e 3627 },
4e7d34a6 3628
f8687e93 3629 /* PREFIX_0F01_REG_5_MOD_0 */
603555e5
L
3630 {
3631 { Bad_Opcode },
3632 { "rstorssp", { Mq }, PREFIX_OPCODE },
3633 },
3634
f8687e93 3635 /* PREFIX_0F01_REG_5_MOD_3_RM_0 */
603555e5
L
3636 {
3637 { Bad_Opcode },
2234eee6 3638 { "setssbsy", { Skip_MODRM }, PREFIX_OPCODE },
603555e5
L
3639 },
3640
f8687e93 3641 /* PREFIX_0F01_REG_5_MOD_3_RM_2 */
603555e5
L
3642 {
3643 { Bad_Opcode },
c2f76402 3644 { "saveprevssp", { Skip_MODRM }, PREFIX_OPCODE },
603555e5
L
3645 },
3646
267b8516
JB
3647 /* PREFIX_0F01_REG_7_MOD_3_RM_2 */
3648 {
3649 { "monitorx", { { OP_Monitor, 0 } }, 0 },
142861df 3650 { "mcommit", { Skip_MODRM }, 0 },
267b8516
JB
3651 },
3652
3653 /* PREFIX_0F01_REG_7_MOD_3_RM_3 */
3654 {
7abb8d81 3655 { "mwaitx", { { OP_Mwait, eBX_reg } }, 0 },
267b8516
JB
3656 },
3657
3233d7d0
IT
3658 /* PREFIX_0F09 */
3659 {
3660 { "wbinvd", { XX }, 0 },
3661 { "wbnoinvd", { XX }, 0 },
3662 },
3663
1ceb70f8 3664 /* PREFIX_0F10 */
cc0ec051 3665 {
507bd325
L
3666 { "movups", { XM, EXx }, PREFIX_OPCODE },
3667 { "movss", { XM, EXd }, PREFIX_OPCODE },
3668 { "movupd", { XM, EXx }, PREFIX_OPCODE },
3669 { "movsd", { XM, EXq }, PREFIX_OPCODE },
30d1c836 3670 },
4e7d34a6 3671
1ceb70f8 3672 /* PREFIX_0F11 */
30d1c836 3673 {
507bd325
L
3674 { "movups", { EXxS, XM }, PREFIX_OPCODE },
3675 { "movss", { EXdS, XM }, PREFIX_OPCODE },
3676 { "movupd", { EXxS, XM }, PREFIX_OPCODE },
3677 { "movsd", { EXqS, XM }, PREFIX_OPCODE },
4e7d34a6 3678 },
252b5132 3679
1ceb70f8 3680 /* PREFIX_0F12 */
c608c12e 3681 {
1ceb70f8 3682 { MOD_TABLE (MOD_0F12_PREFIX_0) },
507bd325
L
3683 { "movsldup", { XM, EXx }, PREFIX_OPCODE },
3684 { "movlpd", { XM, EXq }, PREFIX_OPCODE },
3685 { "movddup", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3686 },
4e7d34a6 3687
1ceb70f8 3688 /* PREFIX_0F16 */
c608c12e 3689 {
1ceb70f8 3690 { MOD_TABLE (MOD_0F16_PREFIX_0) },
507bd325
L
3691 { "movshdup", { XM, EXx }, PREFIX_OPCODE },
3692 { "movhpd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3693 },
4e7d34a6 3694
7e8b059b
L
3695 /* PREFIX_0F1A */
3696 {
3697 { MOD_TABLE (MOD_0F1A_PREFIX_0) },
bf890a93
IT
3698 { "bndcl", { Gbnd, Ev_bnd }, 0 },
3699 { "bndmov", { Gbnd, Ebnd }, 0 },
3700 { "bndcu", { Gbnd, Ev_bnd }, 0 },
7e8b059b
L
3701 },
3702
3703 /* PREFIX_0F1B */
3704 {
3705 { MOD_TABLE (MOD_0F1B_PREFIX_0) },
3706 { MOD_TABLE (MOD_0F1B_PREFIX_1) },
9f79e886 3707 { "bndmov", { EbndS, Gbnd }, 0 },
bf890a93 3708 { "bndcn", { Gbnd, Ev_bnd }, 0 },
7e8b059b
L
3709 },
3710
c48935d7
IT
3711 /* PREFIX_0F1C */
3712 {
3713 { MOD_TABLE (MOD_0F1C_PREFIX_0) },
3714 { "nopQ", { Ev }, PREFIX_OPCODE },
3715 { "nopQ", { Ev }, PREFIX_OPCODE },
3716 { "nopQ", { Ev }, PREFIX_OPCODE },
3717 },
3718
603555e5
L
3719 /* PREFIX_0F1E */
3720 {
3721 { "nopQ", { Ev }, PREFIX_OPCODE },
3722 { MOD_TABLE (MOD_0F1E_PREFIX_1) },
3723 { "nopQ", { Ev }, PREFIX_OPCODE },
3724 { "nopQ", { Ev }, PREFIX_OPCODE },
3725 },
3726
1ceb70f8 3727 /* PREFIX_0F2A */
c608c12e 3728 {
507bd325 3729 { "cvtpi2ps", { XM, EMCq }, PREFIX_OPCODE },
e1a1babd 3730 { "cvtsi2ss%LQ", { XM, Edq }, PREFIX_OPCODE },
507bd325 3731 { "cvtpi2pd", { XM, EMCq }, PREFIX_OPCODE },
e1a1babd 3732 { "cvtsi2sd%LQ", { XM, Edq }, 0 },
c608c12e 3733 },
4e7d34a6 3734
1ceb70f8 3735 /* PREFIX_0F2B */
c608c12e 3736 {
75c135a8
L
3737 { MOD_TABLE (MOD_0F2B_PREFIX_0) },
3738 { MOD_TABLE (MOD_0F2B_PREFIX_1) },
3739 { MOD_TABLE (MOD_0F2B_PREFIX_2) },
3740 { MOD_TABLE (MOD_0F2B_PREFIX_3) },
c608c12e 3741 },
4e7d34a6 3742
1ceb70f8 3743 /* PREFIX_0F2C */
c608c12e 3744 {
507bd325 3745 { "cvttps2pi", { MXC, EXq }, PREFIX_OPCODE },
e1a1babd 3746 { "cvttss2si", { Gdq, EXd }, PREFIX_OPCODE },
507bd325 3747 { "cvttpd2pi", { MXC, EXx }, PREFIX_OPCODE },
e1a1babd 3748 { "cvttsd2si", { Gdq, EXq }, PREFIX_OPCODE },
c608c12e 3749 },
4e7d34a6 3750
1ceb70f8 3751 /* PREFIX_0F2D */
c608c12e 3752 {
507bd325 3753 { "cvtps2pi", { MXC, EXq }, PREFIX_OPCODE },
e1a1babd 3754 { "cvtss2si", { Gdq, EXd }, PREFIX_OPCODE },
507bd325 3755 { "cvtpd2pi", { MXC, EXx }, PREFIX_OPCODE },
e1a1babd 3756 { "cvtsd2si", { Gdq, EXq }, PREFIX_OPCODE },
c608c12e 3757 },
4e7d34a6 3758
1ceb70f8 3759 /* PREFIX_0F2E */
c608c12e 3760 {
bf890a93 3761 { "ucomiss",{ XM, EXd }, 0 },
592d1631 3762 { Bad_Opcode },
bf890a93 3763 { "ucomisd",{ XM, EXq }, 0 },
c608c12e 3764 },
4e7d34a6 3765
1ceb70f8 3766 /* PREFIX_0F2F */
c608c12e 3767 {
bf890a93 3768 { "comiss", { XM, EXd }, 0 },
592d1631 3769 { Bad_Opcode },
bf890a93 3770 { "comisd", { XM, EXq }, 0 },
c608c12e 3771 },
4e7d34a6 3772
1ceb70f8 3773 /* PREFIX_0F51 */
c608c12e 3774 {
507bd325
L
3775 { "sqrtps", { XM, EXx }, PREFIX_OPCODE },
3776 { "sqrtss", { XM, EXd }, PREFIX_OPCODE },
3777 { "sqrtpd", { XM, EXx }, PREFIX_OPCODE },
3778 { "sqrtsd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3779 },
4e7d34a6 3780
1ceb70f8 3781 /* PREFIX_0F52 */
c608c12e 3782 {
507bd325
L
3783 { "rsqrtps",{ XM, EXx }, PREFIX_OPCODE },
3784 { "rsqrtss",{ XM, EXd }, PREFIX_OPCODE },
c608c12e 3785 },
4e7d34a6 3786
1ceb70f8 3787 /* PREFIX_0F53 */
c608c12e 3788 {
507bd325
L
3789 { "rcpps", { XM, EXx }, PREFIX_OPCODE },
3790 { "rcpss", { XM, EXd }, PREFIX_OPCODE },
c608c12e 3791 },
4e7d34a6 3792
1ceb70f8 3793 /* PREFIX_0F58 */
c608c12e 3794 {
507bd325
L
3795 { "addps", { XM, EXx }, PREFIX_OPCODE },
3796 { "addss", { XM, EXd }, PREFIX_OPCODE },
3797 { "addpd", { XM, EXx }, PREFIX_OPCODE },
3798 { "addsd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3799 },
4e7d34a6 3800
1ceb70f8 3801 /* PREFIX_0F59 */
c608c12e 3802 {
507bd325
L
3803 { "mulps", { XM, EXx }, PREFIX_OPCODE },
3804 { "mulss", { XM, EXd }, PREFIX_OPCODE },
3805 { "mulpd", { XM, EXx }, PREFIX_OPCODE },
3806 { "mulsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3807 },
4e7d34a6 3808
1ceb70f8 3809 /* PREFIX_0F5A */
041bd2e0 3810 {
507bd325
L
3811 { "cvtps2pd", { XM, EXq }, PREFIX_OPCODE },
3812 { "cvtss2sd", { XM, EXd }, PREFIX_OPCODE },
3813 { "cvtpd2ps", { XM, EXx }, PREFIX_OPCODE },
3814 { "cvtsd2ss", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3815 },
4e7d34a6 3816
1ceb70f8 3817 /* PREFIX_0F5B */
041bd2e0 3818 {
507bd325
L
3819 { "cvtdq2ps", { XM, EXx }, PREFIX_OPCODE },
3820 { "cvttps2dq", { XM, EXx }, PREFIX_OPCODE },
3821 { "cvtps2dq", { XM, EXx }, PREFIX_OPCODE },
041bd2e0 3822 },
4e7d34a6 3823
1ceb70f8 3824 /* PREFIX_0F5C */
041bd2e0 3825 {
507bd325
L
3826 { "subps", { XM, EXx }, PREFIX_OPCODE },
3827 { "subss", { XM, EXd }, PREFIX_OPCODE },
3828 { "subpd", { XM, EXx }, PREFIX_OPCODE },
3829 { "subsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3830 },
4e7d34a6 3831
1ceb70f8 3832 /* PREFIX_0F5D */
041bd2e0 3833 {
507bd325
L
3834 { "minps", { XM, EXx }, PREFIX_OPCODE },
3835 { "minss", { XM, EXd }, PREFIX_OPCODE },
3836 { "minpd", { XM, EXx }, PREFIX_OPCODE },
3837 { "minsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3838 },
4e7d34a6 3839
1ceb70f8 3840 /* PREFIX_0F5E */
041bd2e0 3841 {
507bd325
L
3842 { "divps", { XM, EXx }, PREFIX_OPCODE },
3843 { "divss", { XM, EXd }, PREFIX_OPCODE },
3844 { "divpd", { XM, EXx }, PREFIX_OPCODE },
3845 { "divsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3846 },
4e7d34a6 3847
1ceb70f8 3848 /* PREFIX_0F5F */
041bd2e0 3849 {
507bd325
L
3850 { "maxps", { XM, EXx }, PREFIX_OPCODE },
3851 { "maxss", { XM, EXd }, PREFIX_OPCODE },
3852 { "maxpd", { XM, EXx }, PREFIX_OPCODE },
3853 { "maxsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3854 },
4e7d34a6 3855
1ceb70f8 3856 /* PREFIX_0F60 */
041bd2e0 3857 {
507bd325 3858 { "punpcklbw",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3859 { Bad_Opcode },
507bd325 3860 { "punpcklbw",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3861 },
4e7d34a6 3862
1ceb70f8 3863 /* PREFIX_0F61 */
041bd2e0 3864 {
507bd325 3865 { "punpcklwd",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3866 { Bad_Opcode },
507bd325 3867 { "punpcklwd",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3868 },
4e7d34a6 3869
1ceb70f8 3870 /* PREFIX_0F62 */
041bd2e0 3871 {
507bd325 3872 { "punpckldq",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3873 { Bad_Opcode },
507bd325 3874 { "punpckldq",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3875 },
4e7d34a6 3876
1ceb70f8 3877 /* PREFIX_0F6C */
041bd2e0 3878 {
592d1631
L
3879 { Bad_Opcode },
3880 { Bad_Opcode },
507bd325 3881 { "punpcklqdq", { XM, EXx }, PREFIX_OPCODE },
0f17484f 3882 },
4e7d34a6 3883
1ceb70f8 3884 /* PREFIX_0F6D */
0f17484f 3885 {
592d1631
L
3886 { Bad_Opcode },
3887 { Bad_Opcode },
507bd325 3888 { "punpckhqdq", { XM, EXx }, PREFIX_OPCODE },
041bd2e0 3889 },
4e7d34a6 3890
1ceb70f8 3891 /* PREFIX_0F6F */
ca164297 3892 {
507bd325
L
3893 { "movq", { MX, EM }, PREFIX_OPCODE },
3894 { "movdqu", { XM, EXx }, PREFIX_OPCODE },
3895 { "movdqa", { XM, EXx }, PREFIX_OPCODE },
ca164297 3896 },
4e7d34a6 3897
1ceb70f8 3898 /* PREFIX_0F70 */
4e7d34a6 3899 {
507bd325
L
3900 { "pshufw", { MX, EM, Ib }, PREFIX_OPCODE },
3901 { "pshufhw",{ XM, EXx, Ib }, PREFIX_OPCODE },
3902 { "pshufd", { XM, EXx, Ib }, PREFIX_OPCODE },
3903 { "pshuflw",{ XM, EXx, Ib }, PREFIX_OPCODE },
4e7d34a6
L
3904 },
3905
92fddf8e
L
3906 /* PREFIX_0F73_REG_3 */
3907 {
592d1631
L
3908 { Bad_Opcode },
3909 { Bad_Opcode },
bf890a93 3910 { "psrldq", { XS, Ib }, 0 },
92fddf8e
L
3911 },
3912
3913 /* PREFIX_0F73_REG_7 */
3914 {
592d1631
L
3915 { Bad_Opcode },
3916 { Bad_Opcode },
bf890a93 3917 { "pslldq", { XS, Ib }, 0 },
92fddf8e
L
3918 },
3919
1ceb70f8 3920 /* PREFIX_0F78 */
4e7d34a6 3921 {
bf890a93 3922 {"vmread", { Em, Gm }, 0 },
592d1631 3923 { Bad_Opcode },
bf890a93
IT
3924 {"extrq", { XS, Ib, Ib }, 0 },
3925 {"insertq", { XM, XS, Ib, Ib }, 0 },
4e7d34a6
L
3926 },
3927
1ceb70f8 3928 /* PREFIX_0F79 */
4e7d34a6 3929 {
bf890a93 3930 {"vmwrite", { Gm, Em }, 0 },
592d1631 3931 { Bad_Opcode },
bf890a93
IT
3932 {"extrq", { XM, XS }, 0 },
3933 {"insertq", { XM, XS }, 0 },
4e7d34a6
L
3934 },
3935
1ceb70f8 3936 /* PREFIX_0F7C */
ca164297 3937 {
592d1631
L
3938 { Bad_Opcode },
3939 { Bad_Opcode },
507bd325
L
3940 { "haddpd", { XM, EXx }, PREFIX_OPCODE },
3941 { "haddps", { XM, EXx }, PREFIX_OPCODE },
ca164297 3942 },
4e7d34a6 3943
1ceb70f8 3944 /* PREFIX_0F7D */
ca164297 3945 {
592d1631
L
3946 { Bad_Opcode },
3947 { Bad_Opcode },
507bd325
L
3948 { "hsubpd", { XM, EXx }, PREFIX_OPCODE },
3949 { "hsubps", { XM, EXx }, PREFIX_OPCODE },
ca164297 3950 },
4e7d34a6 3951
1ceb70f8 3952 /* PREFIX_0F7E */
ca164297 3953 {
507bd325
L
3954 { "movK", { Edq, MX }, PREFIX_OPCODE },
3955 { "movq", { XM, EXq }, PREFIX_OPCODE },
3956 { "movK", { Edq, XM }, PREFIX_OPCODE },
ca164297 3957 },
4e7d34a6 3958
1ceb70f8 3959 /* PREFIX_0F7F */
ca164297 3960 {
507bd325
L
3961 { "movq", { EMS, MX }, PREFIX_OPCODE },
3962 { "movdqu", { EXxS, XM }, PREFIX_OPCODE },
3963 { "movdqa", { EXxS, XM }, PREFIX_OPCODE },
ca164297 3964 },
4e7d34a6 3965
f8687e93 3966 /* PREFIX_0FAE_REG_0_MOD_3 */
c7b8aa3a
L
3967 {
3968 { Bad_Opcode },
bf890a93 3969 { "rdfsbase", { Ev }, 0 },
c7b8aa3a
L
3970 },
3971
f8687e93 3972 /* PREFIX_0FAE_REG_1_MOD_3 */
c7b8aa3a
L
3973 {
3974 { Bad_Opcode },
bf890a93 3975 { "rdgsbase", { Ev }, 0 },
c7b8aa3a
L
3976 },
3977
f8687e93 3978 /* PREFIX_0FAE_REG_2_MOD_3 */
c7b8aa3a
L
3979 {
3980 { Bad_Opcode },
bf890a93 3981 { "wrfsbase", { Ev }, 0 },
c7b8aa3a
L
3982 },
3983
f8687e93 3984 /* PREFIX_0FAE_REG_3_MOD_3 */
c7b8aa3a
L
3985 {
3986 { Bad_Opcode },
bf890a93 3987 { "wrgsbase", { Ev }, 0 },
c7b8aa3a
L
3988 },
3989
f8687e93 3990 /* PREFIX_0FAE_REG_4_MOD_0 */
6b40c462
L
3991 {
3992 { "xsave", { FXSAVE }, 0 },
3993 { "ptwrite%LQ", { Edq }, 0 },
3994 },
3995
f8687e93 3996 /* PREFIX_0FAE_REG_4_MOD_3 */
6b40c462
L
3997 {
3998 { Bad_Opcode },
3999 { "ptwrite%LQ", { Edq }, 0 },
4000 },
4001
f8687e93 4002 /* PREFIX_0FAE_REG_5_MOD_0 */
603555e5
L
4003 {
4004 { "xrstor", { FXSAVE }, PREFIX_OPCODE },
2234eee6
L
4005 },
4006
f8687e93 4007 /* PREFIX_0FAE_REG_5_MOD_3 */
2234eee6
L
4008 {
4009 { "lfence", { Skip_MODRM }, 0 },
4010 { "incsspK", { Rdq }, PREFIX_OPCODE },
603555e5
L
4011 },
4012
f8687e93 4013 /* PREFIX_0FAE_REG_6_MOD_0 */
c5e7287a 4014 {
603555e5
L
4015 { "xsaveopt", { FXSAVE }, PREFIX_OPCODE },
4016 { "clrssbsy", { Mq }, PREFIX_OPCODE },
4017 { "clwb", { Mb }, PREFIX_OPCODE },
c5e7287a
IT
4018 },
4019
f8687e93 4020 /* PREFIX_0FAE_REG_6_MOD_3 */
de89d0a3 4021 {
f8687e93 4022 { RM_TABLE (RM_0FAE_REG_6_MOD_3_P_0) },
de89d0a3 4023 { "umonitor", { Eva }, PREFIX_OPCODE },
ae1d3843
L
4024 { "tpause", { Edq }, PREFIX_OPCODE },
4025 { "umwait", { Edq }, PREFIX_OPCODE },
de89d0a3
IT
4026 },
4027
f8687e93 4028 /* PREFIX_0FAE_REG_7_MOD_0 */
963f3586 4029 {
bf890a93 4030 { "clflush", { Mb }, 0 },
963f3586 4031 { Bad_Opcode },
bf890a93 4032 { "clflushopt", { Mb }, 0 },
963f3586
IT
4033 },
4034
1ceb70f8 4035 /* PREFIX_0FB8 */
ca164297 4036 {
592d1631 4037 { Bad_Opcode },
bf890a93 4038 { "popcntS", { Gv, Ev }, 0 },
ca164297 4039 },
4e7d34a6 4040
f12dc422
L
4041 /* PREFIX_0FBC */
4042 {
bf890a93
IT
4043 { "bsfS", { Gv, Ev }, 0 },
4044 { "tzcntS", { Gv, Ev }, 0 },
4045 { "bsfS", { Gv, Ev }, 0 },
f12dc422
L
4046 },
4047
1ceb70f8 4048 /* PREFIX_0FBD */
050dfa73 4049 {
bf890a93
IT
4050 { "bsrS", { Gv, Ev }, 0 },
4051 { "lzcntS", { Gv, Ev }, 0 },
4052 { "bsrS", { Gv, Ev }, 0 },
050dfa73
MM
4053 },
4054
1ceb70f8 4055 /* PREFIX_0FC2 */
050dfa73 4056 {
507bd325
L
4057 { "cmpps", { XM, EXx, CMP }, PREFIX_OPCODE },
4058 { "cmpss", { XM, EXd, CMP }, PREFIX_OPCODE },
4059 { "cmppd", { XM, EXx, CMP }, PREFIX_OPCODE },
4060 { "cmpsd", { XM, EXq, CMP }, PREFIX_OPCODE },
050dfa73 4061 },
246c51aa 4062
f8687e93 4063 /* PREFIX_0FC3_MOD_0 */
4ee52178 4064 {
e1a1babd 4065 { "movntiS", { Edq, Gdq }, PREFIX_OPCODE },
4ee52178
L
4066 },
4067
f8687e93 4068 /* PREFIX_0FC7_REG_6_MOD_0 */
92fddf8e 4069 {
bf890a93
IT
4070 { "vmptrld",{ Mq }, 0 },
4071 { "vmxon", { Mq }, 0 },
4072 { "vmclear",{ Mq }, 0 },
92fddf8e
L
4073 },
4074
f8687e93 4075 /* PREFIX_0FC7_REG_6_MOD_3 */
f24bcbaa
L
4076 {
4077 { "rdrand", { Ev }, 0 },
4078 { Bad_Opcode },
4079 { "rdrand", { Ev }, 0 }
4080 },
4081
f8687e93 4082 /* PREFIX_0FC7_REG_7_MOD_3 */
f24bcbaa
L
4083 {
4084 { "rdseed", { Ev }, 0 },
8bc52696 4085 { "rdpid", { Em }, 0 },
f24bcbaa
L
4086 { "rdseed", { Ev }, 0 },
4087 },
4088
1ceb70f8 4089 /* PREFIX_0FD0 */
050dfa73 4090 {
592d1631
L
4091 { Bad_Opcode },
4092 { Bad_Opcode },
bf890a93
IT
4093 { "addsubpd", { XM, EXx }, 0 },
4094 { "addsubps", { XM, EXx }, 0 },
246c51aa 4095 },
050dfa73 4096
1ceb70f8 4097 /* PREFIX_0FD6 */
050dfa73 4098 {
592d1631 4099 { Bad_Opcode },
bf890a93
IT
4100 { "movq2dq",{ XM, MS }, 0 },
4101 { "movq", { EXqS, XM }, 0 },
4102 { "movdq2q",{ MX, XS }, 0 },
050dfa73
MM
4103 },
4104
1ceb70f8 4105 /* PREFIX_0FE6 */
7918206c 4106 {
592d1631 4107 { Bad_Opcode },
507bd325
L
4108 { "cvtdq2pd", { XM, EXq }, PREFIX_OPCODE },
4109 { "cvttpd2dq", { XM, EXx }, PREFIX_OPCODE },
4110 { "cvtpd2dq", { XM, EXx }, PREFIX_OPCODE },
7918206c 4111 },
8b38ad71 4112
1ceb70f8 4113 /* PREFIX_0FE7 */
8b38ad71 4114 {
507bd325 4115 { "movntq", { Mq, MX }, PREFIX_OPCODE },
592d1631 4116 { Bad_Opcode },
75c135a8 4117 { MOD_TABLE (MOD_0FE7_PREFIX_2) },
4e7d34a6
L
4118 },
4119
1ceb70f8 4120 /* PREFIX_0FF0 */
4e7d34a6 4121 {
592d1631
L
4122 { Bad_Opcode },
4123 { Bad_Opcode },
4124 { Bad_Opcode },
1ceb70f8 4125 { MOD_TABLE (MOD_0FF0_PREFIX_3) },
4e7d34a6
L
4126 },
4127
1ceb70f8 4128 /* PREFIX_0FF7 */
4e7d34a6 4129 {
507bd325 4130 { "maskmovq", { MX, MS }, PREFIX_OPCODE },
592d1631 4131 { Bad_Opcode },
507bd325 4132 { "maskmovdqu", { XM, XS }, PREFIX_OPCODE },
8b38ad71 4133 },
42903f7f 4134
1ceb70f8 4135 /* PREFIX_0F3810 */
42903f7f 4136 {
592d1631
L
4137 { Bad_Opcode },
4138 { Bad_Opcode },
507bd325 4139 { "pblendvb", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4140 },
4141
1ceb70f8 4142 /* PREFIX_0F3814 */
42903f7f 4143 {
592d1631
L
4144 { Bad_Opcode },
4145 { Bad_Opcode },
507bd325 4146 { "blendvps", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4147 },
4148
1ceb70f8 4149 /* PREFIX_0F3815 */
42903f7f 4150 {
592d1631
L
4151 { Bad_Opcode },
4152 { Bad_Opcode },
507bd325 4153 { "blendvpd", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4154 },
4155
1ceb70f8 4156 /* PREFIX_0F3817 */
42903f7f 4157 {
592d1631
L
4158 { Bad_Opcode },
4159 { Bad_Opcode },
507bd325 4160 { "ptest", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4161 },
4162
1ceb70f8 4163 /* PREFIX_0F3820 */
42903f7f 4164 {
592d1631
L
4165 { Bad_Opcode },
4166 { Bad_Opcode },
507bd325 4167 { "pmovsxbw", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4168 },
4169
1ceb70f8 4170 /* PREFIX_0F3821 */
42903f7f 4171 {
592d1631
L
4172 { Bad_Opcode },
4173 { Bad_Opcode },
507bd325 4174 { "pmovsxbd", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4175 },
4176
1ceb70f8 4177 /* PREFIX_0F3822 */
42903f7f 4178 {
592d1631
L
4179 { Bad_Opcode },
4180 { Bad_Opcode },
507bd325 4181 { "pmovsxbq", { XM, EXw }, PREFIX_OPCODE },
42903f7f
L
4182 },
4183
1ceb70f8 4184 /* PREFIX_0F3823 */
42903f7f 4185 {
592d1631
L
4186 { Bad_Opcode },
4187 { Bad_Opcode },
507bd325 4188 { "pmovsxwd", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4189 },
4190
1ceb70f8 4191 /* PREFIX_0F3824 */
42903f7f 4192 {
592d1631
L
4193 { Bad_Opcode },
4194 { Bad_Opcode },
507bd325 4195 { "pmovsxwq", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4196 },
4197
1ceb70f8 4198 /* PREFIX_0F3825 */
42903f7f 4199 {
592d1631
L
4200 { Bad_Opcode },
4201 { Bad_Opcode },
507bd325 4202 { "pmovsxdq", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4203 },
4204
1ceb70f8 4205 /* PREFIX_0F3828 */
42903f7f 4206 {
592d1631
L
4207 { Bad_Opcode },
4208 { Bad_Opcode },
507bd325 4209 { "pmuldq", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4210 },
4211
1ceb70f8 4212 /* PREFIX_0F3829 */
42903f7f 4213 {
592d1631
L
4214 { Bad_Opcode },
4215 { Bad_Opcode },
507bd325 4216 { "pcmpeqq", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4217 },
4218
1ceb70f8 4219 /* PREFIX_0F382A */
42903f7f 4220 {
592d1631
L
4221 { Bad_Opcode },
4222 { Bad_Opcode },
75c135a8 4223 { MOD_TABLE (MOD_0F382A_PREFIX_2) },
42903f7f
L
4224 },
4225
1ceb70f8 4226 /* PREFIX_0F382B */
42903f7f 4227 {
592d1631
L
4228 { Bad_Opcode },
4229 { Bad_Opcode },
507bd325 4230 { "packusdw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4231 },
4232
1ceb70f8 4233 /* PREFIX_0F3830 */
42903f7f 4234 {
592d1631
L
4235 { Bad_Opcode },
4236 { Bad_Opcode },
507bd325 4237 { "pmovzxbw", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4238 },
4239
1ceb70f8 4240 /* PREFIX_0F3831 */
42903f7f 4241 {
592d1631
L
4242 { Bad_Opcode },
4243 { Bad_Opcode },
507bd325 4244 { "pmovzxbd", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4245 },
4246
1ceb70f8 4247 /* PREFIX_0F3832 */
42903f7f 4248 {
592d1631
L
4249 { Bad_Opcode },
4250 { Bad_Opcode },
507bd325 4251 { "pmovzxbq", { XM, EXw }, PREFIX_OPCODE },
42903f7f
L
4252 },
4253
1ceb70f8 4254 /* PREFIX_0F3833 */
42903f7f 4255 {
592d1631
L
4256 { Bad_Opcode },
4257 { Bad_Opcode },
507bd325 4258 { "pmovzxwd", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4259 },
4260
1ceb70f8 4261 /* PREFIX_0F3834 */
42903f7f 4262 {
592d1631
L
4263 { Bad_Opcode },
4264 { Bad_Opcode },
507bd325 4265 { "pmovzxwq", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4266 },
4267
1ceb70f8 4268 /* PREFIX_0F3835 */
42903f7f 4269 {
592d1631
L
4270 { Bad_Opcode },
4271 { Bad_Opcode },
507bd325 4272 { "pmovzxdq", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4273 },
4274
1ceb70f8 4275 /* PREFIX_0F3837 */
4e7d34a6 4276 {
592d1631
L
4277 { Bad_Opcode },
4278 { Bad_Opcode },
507bd325 4279 { "pcmpgtq", { XM, EXx }, PREFIX_OPCODE },
4e7d34a6
L
4280 },
4281
1ceb70f8 4282 /* PREFIX_0F3838 */
42903f7f 4283 {
592d1631
L
4284 { Bad_Opcode },
4285 { Bad_Opcode },
507bd325 4286 { "pminsb", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4287 },
4288
1ceb70f8 4289 /* PREFIX_0F3839 */
42903f7f 4290 {
592d1631
L
4291 { Bad_Opcode },
4292 { Bad_Opcode },
507bd325 4293 { "pminsd", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4294 },
4295
1ceb70f8 4296 /* PREFIX_0F383A */
42903f7f 4297 {
592d1631
L
4298 { Bad_Opcode },
4299 { Bad_Opcode },
507bd325 4300 { "pminuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4301 },
4302
1ceb70f8 4303 /* PREFIX_0F383B */
42903f7f 4304 {
592d1631
L
4305 { Bad_Opcode },
4306 { Bad_Opcode },
507bd325 4307 { "pminud", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4308 },
4309
1ceb70f8 4310 /* PREFIX_0F383C */
42903f7f 4311 {
592d1631
L
4312 { Bad_Opcode },
4313 { Bad_Opcode },
507bd325 4314 { "pmaxsb", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4315 },
4316
1ceb70f8 4317 /* PREFIX_0F383D */
42903f7f 4318 {
592d1631
L
4319 { Bad_Opcode },
4320 { Bad_Opcode },
507bd325 4321 { "pmaxsd", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4322 },
4323
1ceb70f8 4324 /* PREFIX_0F383E */
42903f7f 4325 {
592d1631
L
4326 { Bad_Opcode },
4327 { Bad_Opcode },
507bd325 4328 { "pmaxuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4329 },
4330
1ceb70f8 4331 /* PREFIX_0F383F */
42903f7f 4332 {
592d1631
L
4333 { Bad_Opcode },
4334 { Bad_Opcode },
507bd325 4335 { "pmaxud", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4336 },
4337
1ceb70f8 4338 /* PREFIX_0F3840 */
42903f7f 4339 {
592d1631
L
4340 { Bad_Opcode },
4341 { Bad_Opcode },
507bd325 4342 { "pmulld", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4343 },
4344
1ceb70f8 4345 /* PREFIX_0F3841 */
42903f7f 4346 {
592d1631
L
4347 { Bad_Opcode },
4348 { Bad_Opcode },
507bd325 4349 { "phminposuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4350 },
4351
f1f8f695
L
4352 /* PREFIX_0F3880 */
4353 {
592d1631
L
4354 { Bad_Opcode },
4355 { Bad_Opcode },
507bd325 4356 { "invept", { Gm, Mo }, PREFIX_OPCODE },
f1f8f695
L
4357 },
4358
4359 /* PREFIX_0F3881 */
4360 {
592d1631
L
4361 { Bad_Opcode },
4362 { Bad_Opcode },
507bd325 4363 { "invvpid", { Gm, Mo }, PREFIX_OPCODE },
f1f8f695
L
4364 },
4365
6c30d220
L
4366 /* PREFIX_0F3882 */
4367 {
4368 { Bad_Opcode },
4369 { Bad_Opcode },
507bd325 4370 { "invpcid", { Gm, M }, PREFIX_OPCODE },
6c30d220
L
4371 },
4372
a0046408
L
4373 /* PREFIX_0F38C8 */
4374 {
507bd325 4375 { "sha1nexte", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4376 },
4377
4378 /* PREFIX_0F38C9 */
4379 {
507bd325 4380 { "sha1msg1", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4381 },
4382
4383 /* PREFIX_0F38CA */
4384 {
507bd325 4385 { "sha1msg2", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4386 },
4387
4388 /* PREFIX_0F38CB */
4389 {
507bd325 4390 { "sha256rnds2", { XM, EXxmm, XMM0 }, PREFIX_OPCODE },
a0046408
L
4391 },
4392
4393 /* PREFIX_0F38CC */
4394 {
507bd325 4395 { "sha256msg1", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4396 },
4397
4398 /* PREFIX_0F38CD */
4399 {
507bd325 4400 { "sha256msg2", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4401 },
4402
48521003
IT
4403 /* PREFIX_0F38CF */
4404 {
4405 { Bad_Opcode },
4406 { Bad_Opcode },
4407 { "gf2p8mulb", { XM, EXxmm }, PREFIX_OPCODE },
4408 },
4409
c0f3af97
L
4410 /* PREFIX_0F38DB */
4411 {
592d1631
L
4412 { Bad_Opcode },
4413 { Bad_Opcode },
507bd325 4414 { "aesimc", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4415 },
4416
4417 /* PREFIX_0F38DC */
4418 {
592d1631
L
4419 { Bad_Opcode },
4420 { Bad_Opcode },
507bd325 4421 { "aesenc", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4422 },
4423
4424 /* PREFIX_0F38DD */
4425 {
592d1631
L
4426 { Bad_Opcode },
4427 { Bad_Opcode },
507bd325 4428 { "aesenclast", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4429 },
4430
4431 /* PREFIX_0F38DE */
4432 {
592d1631
L
4433 { Bad_Opcode },
4434 { Bad_Opcode },
507bd325 4435 { "aesdec", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4436 },
4437
4438 /* PREFIX_0F38DF */
4439 {
592d1631
L
4440 { Bad_Opcode },
4441 { Bad_Opcode },
507bd325 4442 { "aesdeclast", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4443 },
4444
1ceb70f8 4445 /* PREFIX_0F38F0 */
4e7d34a6 4446 {
507bd325 4447 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
592d1631 4448 { Bad_Opcode },
507bd325
L
4449 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
4450 { "crc32", { Gdq, { CRC32_Fixup, b_mode } }, PREFIX_OPCODE },
4e7d34a6
L
4451 },
4452
1ceb70f8 4453 /* PREFIX_0F38F1 */
4e7d34a6 4454 {
507bd325 4455 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
592d1631 4456 { Bad_Opcode },
507bd325
L
4457 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
4458 { "crc32", { Gdq, { CRC32_Fixup, v_mode } }, PREFIX_OPCODE },
4e7d34a6
L
4459 },
4460
603555e5 4461 /* PREFIX_0F38F5 */
e2e1fcde
L
4462 {
4463 { Bad_Opcode },
603555e5
L
4464 { Bad_Opcode },
4465 { MOD_TABLE (MOD_0F38F5_PREFIX_2) },
4466 },
4467
4468 /* PREFIX_0F38F6 */
4469 {
4470 { MOD_TABLE (MOD_0F38F6_PREFIX_0) },
507bd325
L
4471 { "adoxS", { Gdq, Edq}, PREFIX_OPCODE },
4472 { "adcxS", { Gdq, Edq}, PREFIX_OPCODE },
e2e1fcde
L
4473 { Bad_Opcode },
4474 },
4475
c0a30a9f
L
4476 /* PREFIX_0F38F8 */
4477 {
4478 { Bad_Opcode },
5d79adc4 4479 { MOD_TABLE (MOD_0F38F8_PREFIX_1) },
c0a30a9f 4480 { MOD_TABLE (MOD_0F38F8_PREFIX_2) },
5d79adc4 4481 { MOD_TABLE (MOD_0F38F8_PREFIX_3) },
c0a30a9f
L
4482 },
4483
4484 /* PREFIX_0F38F9 */
4485 {
4486 { MOD_TABLE (MOD_0F38F9_PREFIX_0) },
4487 },
4488
1ceb70f8 4489 /* PREFIX_0F3A08 */
42903f7f 4490 {
592d1631
L
4491 { Bad_Opcode },
4492 { Bad_Opcode },
507bd325 4493 { "roundps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4494 },
4495
1ceb70f8 4496 /* PREFIX_0F3A09 */
42903f7f 4497 {
592d1631
L
4498 { Bad_Opcode },
4499 { Bad_Opcode },
507bd325 4500 { "roundpd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4501 },
4502
1ceb70f8 4503 /* PREFIX_0F3A0A */
42903f7f 4504 {
592d1631
L
4505 { Bad_Opcode },
4506 { Bad_Opcode },
507bd325 4507 { "roundss", { XM, EXd, Ib }, PREFIX_OPCODE },
42903f7f
L
4508 },
4509
1ceb70f8 4510 /* PREFIX_0F3A0B */
42903f7f 4511 {
592d1631
L
4512 { Bad_Opcode },
4513 { Bad_Opcode },
507bd325 4514 { "roundsd", { XM, EXq, Ib }, PREFIX_OPCODE },
42903f7f
L
4515 },
4516
1ceb70f8 4517 /* PREFIX_0F3A0C */
42903f7f 4518 {
592d1631
L
4519 { Bad_Opcode },
4520 { Bad_Opcode },
507bd325 4521 { "blendps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4522 },
4523
1ceb70f8 4524 /* PREFIX_0F3A0D */
42903f7f 4525 {
592d1631
L
4526 { Bad_Opcode },
4527 { Bad_Opcode },
507bd325 4528 { "blendpd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4529 },
4530
1ceb70f8 4531 /* PREFIX_0F3A0E */
42903f7f 4532 {
592d1631
L
4533 { Bad_Opcode },
4534 { Bad_Opcode },
507bd325 4535 { "pblendw", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4536 },
4537
1ceb70f8 4538 /* PREFIX_0F3A14 */
42903f7f 4539 {
592d1631
L
4540 { Bad_Opcode },
4541 { Bad_Opcode },
507bd325 4542 { "pextrb", { Edqb, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4543 },
4544
1ceb70f8 4545 /* PREFIX_0F3A15 */
42903f7f 4546 {
592d1631
L
4547 { Bad_Opcode },
4548 { Bad_Opcode },
507bd325 4549 { "pextrw", { Edqw, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4550 },
4551
1ceb70f8 4552 /* PREFIX_0F3A16 */
42903f7f 4553 {
592d1631
L
4554 { Bad_Opcode },
4555 { Bad_Opcode },
507bd325 4556 { "pextrK", { Edq, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4557 },
4558
1ceb70f8 4559 /* PREFIX_0F3A17 */
42903f7f 4560 {
592d1631
L
4561 { Bad_Opcode },
4562 { Bad_Opcode },
507bd325 4563 { "extractps", { Edqd, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4564 },
4565
1ceb70f8 4566 /* PREFIX_0F3A20 */
42903f7f 4567 {
592d1631
L
4568 { Bad_Opcode },
4569 { Bad_Opcode },
507bd325 4570 { "pinsrb", { XM, Edqb, Ib }, PREFIX_OPCODE },
42903f7f
L
4571 },
4572
1ceb70f8 4573 /* PREFIX_0F3A21 */
42903f7f 4574 {
592d1631
L
4575 { Bad_Opcode },
4576 { Bad_Opcode },
507bd325 4577 { "insertps", { XM, EXd, Ib }, PREFIX_OPCODE },
42903f7f
L
4578 },
4579
1ceb70f8 4580 /* PREFIX_0F3A22 */
42903f7f 4581 {
592d1631
L
4582 { Bad_Opcode },
4583 { Bad_Opcode },
507bd325 4584 { "pinsrK", { XM, Edq, Ib }, PREFIX_OPCODE },
42903f7f
L
4585 },
4586
1ceb70f8 4587 /* PREFIX_0F3A40 */
42903f7f 4588 {
592d1631
L
4589 { Bad_Opcode },
4590 { Bad_Opcode },
507bd325 4591 { "dpps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4592 },
4593
1ceb70f8 4594 /* PREFIX_0F3A41 */
42903f7f 4595 {
592d1631
L
4596 { Bad_Opcode },
4597 { Bad_Opcode },
507bd325 4598 { "dppd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4599 },
4600
1ceb70f8 4601 /* PREFIX_0F3A42 */
42903f7f 4602 {
592d1631
L
4603 { Bad_Opcode },
4604 { Bad_Opcode },
507bd325 4605 { "mpsadbw", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f 4606 },
381d071f 4607
c0f3af97
L
4608 /* PREFIX_0F3A44 */
4609 {
592d1631
L
4610 { Bad_Opcode },
4611 { Bad_Opcode },
507bd325 4612 { "pclmulqdq", { XM, EXx, PCLMUL }, PREFIX_OPCODE },
c0f3af97
L
4613 },
4614
1ceb70f8 4615 /* PREFIX_0F3A60 */
381d071f 4616 {
592d1631
L
4617 { Bad_Opcode },
4618 { Bad_Opcode },
15c7c1d8 4619 { "pcmpestrm", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, PREFIX_OPCODE },
381d071f
L
4620 },
4621
1ceb70f8 4622 /* PREFIX_0F3A61 */
381d071f 4623 {
592d1631
L
4624 { Bad_Opcode },
4625 { Bad_Opcode },
15c7c1d8 4626 { "pcmpestri", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, PREFIX_OPCODE },
381d071f
L
4627 },
4628
1ceb70f8 4629 /* PREFIX_0F3A62 */
381d071f 4630 {
592d1631
L
4631 { Bad_Opcode },
4632 { Bad_Opcode },
507bd325 4633 { "pcmpistrm", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f
L
4634 },
4635
1ceb70f8 4636 /* PREFIX_0F3A63 */
381d071f 4637 {
592d1631
L
4638 { Bad_Opcode },
4639 { Bad_Opcode },
507bd325 4640 { "pcmpistri", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f 4641 },
09a2c6cf 4642
a0046408
L
4643 /* PREFIX_0F3ACC */
4644 {
507bd325 4645 { "sha1rnds4", { XM, EXxmm, Ib }, PREFIX_OPCODE },
a0046408
L
4646 },
4647
48521003
IT
4648 /* PREFIX_0F3ACE */
4649 {
4650 { Bad_Opcode },
4651 { Bad_Opcode },
4652 { "gf2p8affineqb", { XM, EXxmm, Ib }, PREFIX_OPCODE },
4653 },
4654
4655 /* PREFIX_0F3ACF */
4656 {
4657 { Bad_Opcode },
4658 { Bad_Opcode },
4659 { "gf2p8affineinvqb", { XM, EXxmm, Ib }, PREFIX_OPCODE },
4660 },
4661
c0f3af97 4662 /* PREFIX_0F3ADF */
09a2c6cf 4663 {
592d1631
L
4664 { Bad_Opcode },
4665 { Bad_Opcode },
507bd325 4666 { "aeskeygenassist", { XM, EXx, Ib }, PREFIX_OPCODE },
09a2c6cf
L
4667 },
4668
592a252b 4669 /* PREFIX_VEX_0F10 */
09a2c6cf 4670 {
ec6f095a
L
4671 { "vmovups", { XM, EXx }, 0 },
4672 { "vmovss", { XMVexScalar, VexScalar, EXdScalar }, 0 },
4673 { "vmovupd", { XM, EXx }, 0 },
4674 { "vmovsd", { XMVexScalar, VexScalar, EXqScalar }, 0 },
09a2c6cf
L
4675 },
4676
592a252b 4677 /* PREFIX_VEX_0F11 */
09a2c6cf 4678 {
ec6f095a
L
4679 { "vmovups", { EXxS, XM }, 0 },
4680 { "vmovss", { EXdVexScalarS, VexScalar, XMScalar }, 0 },
4681 { "vmovupd", { EXxS, XM }, 0 },
4682 { "vmovsd", { EXqVexScalarS, VexScalar, XMScalar }, 0 },
09a2c6cf
L
4683 },
4684
592a252b 4685 /* PREFIX_VEX_0F12 */
09a2c6cf 4686 {
592a252b 4687 { MOD_TABLE (MOD_VEX_0F12_PREFIX_0) },
ec6f095a 4688 { "vmovsldup", { XM, EXx }, 0 },
592a252b 4689 { VEX_LEN_TABLE (VEX_LEN_0F12_P_2) },
ec6f095a 4690 { "vmovddup", { XM, EXymmq }, 0 },
09a2c6cf
L
4691 },
4692
592a252b 4693 /* PREFIX_VEX_0F16 */
09a2c6cf 4694 {
592a252b 4695 { MOD_TABLE (MOD_VEX_0F16_PREFIX_0) },
ec6f095a 4696 { "vmovshdup", { XM, EXx }, 0 },
592a252b 4697 { VEX_LEN_TABLE (VEX_LEN_0F16_P_2) },
5f754f58 4698 },
7c52e0e8 4699
592a252b 4700 /* PREFIX_VEX_0F2A */
5f754f58 4701 {
592d1631 4702 { Bad_Opcode },
2b7bcc87 4703 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Edq }, 0 },
592d1631 4704 { Bad_Opcode },
2b7bcc87 4705 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Edq }, 0 },
5f754f58 4706 },
7c52e0e8 4707
592a252b 4708 /* PREFIX_VEX_0F2C */
5f754f58 4709 {
592d1631 4710 { Bad_Opcode },
2b7bcc87 4711 { "vcvttss2si", { Gdq, EXdScalar }, 0 },
592d1631 4712 { Bad_Opcode },
2b7bcc87 4713 { "vcvttsd2si", { Gdq, EXqScalar }, 0 },
5f754f58 4714 },
7c52e0e8 4715
592a252b 4716 /* PREFIX_VEX_0F2D */
7c52e0e8 4717 {
592d1631 4718 { Bad_Opcode },
2b7bcc87 4719 { "vcvtss2si", { Gdq, EXdScalar }, 0 },
592d1631 4720 { Bad_Opcode },
2b7bcc87 4721 { "vcvtsd2si", { Gdq, EXqScalar }, 0 },
7c52e0e8
L
4722 },
4723
592a252b 4724 /* PREFIX_VEX_0F2E */
7c52e0e8 4725 {
ec6f095a 4726 { "vucomiss", { XMScalar, EXdScalar }, 0 },
592d1631 4727 { Bad_Opcode },
ec6f095a 4728 { "vucomisd", { XMScalar, EXqScalar }, 0 },
7c52e0e8
L
4729 },
4730
592a252b 4731 /* PREFIX_VEX_0F2F */
7c52e0e8 4732 {
ec6f095a 4733 { "vcomiss", { XMScalar, EXdScalar }, 0 },
592d1631 4734 { Bad_Opcode },
ec6f095a 4735 { "vcomisd", { XMScalar, EXqScalar }, 0 },
7c52e0e8
L
4736 },
4737
43234a1e
L
4738 /* PREFIX_VEX_0F41 */
4739 {
4740 { VEX_LEN_TABLE (VEX_LEN_0F41_P_0) },
1ba585e8
IT
4741 { Bad_Opcode },
4742 { VEX_LEN_TABLE (VEX_LEN_0F41_P_2) },
43234a1e
L
4743 },
4744
4745 /* PREFIX_VEX_0F42 */
4746 {
4747 { VEX_LEN_TABLE (VEX_LEN_0F42_P_0) },
1ba585e8
IT
4748 { Bad_Opcode },
4749 { VEX_LEN_TABLE (VEX_LEN_0F42_P_2) },
43234a1e
L
4750 },
4751
4752 /* PREFIX_VEX_0F44 */
4753 {
4754 { VEX_LEN_TABLE (VEX_LEN_0F44_P_0) },
1ba585e8
IT
4755 { Bad_Opcode },
4756 { VEX_LEN_TABLE (VEX_LEN_0F44_P_2) },
43234a1e
L
4757 },
4758
4759 /* PREFIX_VEX_0F45 */
4760 {
4761 { VEX_LEN_TABLE (VEX_LEN_0F45_P_0) },
1ba585e8
IT
4762 { Bad_Opcode },
4763 { VEX_LEN_TABLE (VEX_LEN_0F45_P_2) },
43234a1e
L
4764 },
4765
4766 /* PREFIX_VEX_0F46 */
4767 {
4768 { VEX_LEN_TABLE (VEX_LEN_0F46_P_0) },
1ba585e8
IT
4769 { Bad_Opcode },
4770 { VEX_LEN_TABLE (VEX_LEN_0F46_P_2) },
43234a1e
L
4771 },
4772
4773 /* PREFIX_VEX_0F47 */
4774 {
4775 { VEX_LEN_TABLE (VEX_LEN_0F47_P_0) },
1ba585e8
IT
4776 { Bad_Opcode },
4777 { VEX_LEN_TABLE (VEX_LEN_0F47_P_2) },
43234a1e
L
4778 },
4779
1ba585e8 4780 /* PREFIX_VEX_0F4A */
43234a1e 4781 {
1ba585e8 4782 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_0) },
43234a1e 4783 { Bad_Opcode },
1ba585e8
IT
4784 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_2) },
4785 },
4786
4787 /* PREFIX_VEX_0F4B */
4788 {
4789 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_0) },
43234a1e
L
4790 { Bad_Opcode },
4791 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_2) },
4792 },
4793
592a252b 4794 /* PREFIX_VEX_0F51 */
7c52e0e8 4795 {
ec6f095a
L
4796 { "vsqrtps", { XM, EXx }, 0 },
4797 { "vsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
4798 { "vsqrtpd", { XM, EXx }, 0 },
4799 { "vsqrtsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4800 },
4801
592a252b 4802 /* PREFIX_VEX_0F52 */
7c52e0e8 4803 {
ec6f095a
L
4804 { "vrsqrtps", { XM, EXx }, 0 },
4805 { "vrsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
7c52e0e8
L
4806 },
4807
592a252b 4808 /* PREFIX_VEX_0F53 */
7c52e0e8 4809 {
ec6f095a
L
4810 { "vrcpps", { XM, EXx }, 0 },
4811 { "vrcpss", { XMScalar, VexScalar, EXdScalar }, 0 },
7c52e0e8
L
4812 },
4813
592a252b 4814 /* PREFIX_VEX_0F58 */
7c52e0e8 4815 {
ec6f095a
L
4816 { "vaddps", { XM, Vex, EXx }, 0 },
4817 { "vaddss", { XMScalar, VexScalar, EXdScalar }, 0 },
4818 { "vaddpd", { XM, Vex, EXx }, 0 },
4819 { "vaddsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4820 },
4821
592a252b 4822 /* PREFIX_VEX_0F59 */
7c52e0e8 4823 {
ec6f095a
L
4824 { "vmulps", { XM, Vex, EXx }, 0 },
4825 { "vmulss", { XMScalar, VexScalar, EXdScalar }, 0 },
4826 { "vmulpd", { XM, Vex, EXx }, 0 },
4827 { "vmulsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4828 },
4829
592a252b 4830 /* PREFIX_VEX_0F5A */
7c52e0e8 4831 {
ec6f095a
L
4832 { "vcvtps2pd", { XM, EXxmmq }, 0 },
4833 { "vcvtss2sd", { XMScalar, VexScalar, EXdScalar }, 0 },
4834 { "vcvtpd2ps%XY",{ XMM, EXx }, 0 },
4835 { "vcvtsd2ss", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4836 },
4837
592a252b 4838 /* PREFIX_VEX_0F5B */
7c52e0e8 4839 {
ec6f095a
L
4840 { "vcvtdq2ps", { XM, EXx }, 0 },
4841 { "vcvttps2dq", { XM, EXx }, 0 },
4842 { "vcvtps2dq", { XM, EXx }, 0 },
7c52e0e8
L
4843 },
4844
592a252b 4845 /* PREFIX_VEX_0F5C */
7c52e0e8 4846 {
ec6f095a
L
4847 { "vsubps", { XM, Vex, EXx }, 0 },
4848 { "vsubss", { XMScalar, VexScalar, EXdScalar }, 0 },
4849 { "vsubpd", { XM, Vex, EXx }, 0 },
4850 { "vsubsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4851 },
4852
592a252b 4853 /* PREFIX_VEX_0F5D */
7c52e0e8 4854 {
ec6f095a
L
4855 { "vminps", { XM, Vex, EXx }, 0 },
4856 { "vminss", { XMScalar, VexScalar, EXdScalar }, 0 },
4857 { "vminpd", { XM, Vex, EXx }, 0 },
4858 { "vminsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4859 },
4860
592a252b 4861 /* PREFIX_VEX_0F5E */
7c52e0e8 4862 {
ec6f095a
L
4863 { "vdivps", { XM, Vex, EXx }, 0 },
4864 { "vdivss", { XMScalar, VexScalar, EXdScalar }, 0 },
4865 { "vdivpd", { XM, Vex, EXx }, 0 },
4866 { "vdivsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4867 },
4868
592a252b 4869 /* PREFIX_VEX_0F5F */
7c52e0e8 4870 {
ec6f095a
L
4871 { "vmaxps", { XM, Vex, EXx }, 0 },
4872 { "vmaxss", { XMScalar, VexScalar, EXdScalar }, 0 },
4873 { "vmaxpd", { XM, Vex, EXx }, 0 },
4874 { "vmaxsd", { XMScalar, VexScalar, EXqScalar }, 0 },
7c52e0e8
L
4875 },
4876
592a252b 4877 /* PREFIX_VEX_0F60 */
7c52e0e8 4878 {
592d1631
L
4879 { Bad_Opcode },
4880 { Bad_Opcode },
ec6f095a 4881 { "vpunpcklbw", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4882 },
4883
592a252b 4884 /* PREFIX_VEX_0F61 */
7c52e0e8 4885 {
592d1631
L
4886 { Bad_Opcode },
4887 { Bad_Opcode },
ec6f095a 4888 { "vpunpcklwd", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4889 },
4890
592a252b 4891 /* PREFIX_VEX_0F62 */
7c52e0e8 4892 {
592d1631
L
4893 { Bad_Opcode },
4894 { Bad_Opcode },
ec6f095a 4895 { "vpunpckldq", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4896 },
4897
592a252b 4898 /* PREFIX_VEX_0F63 */
7c52e0e8 4899 {
592d1631
L
4900 { Bad_Opcode },
4901 { Bad_Opcode },
ec6f095a 4902 { "vpacksswb", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4903 },
4904
592a252b 4905 /* PREFIX_VEX_0F64 */
7c52e0e8 4906 {
592d1631
L
4907 { Bad_Opcode },
4908 { Bad_Opcode },
ec6f095a 4909 { "vpcmpgtb", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4910 },
4911
592a252b 4912 /* PREFIX_VEX_0F65 */
7c52e0e8 4913 {
592d1631
L
4914 { Bad_Opcode },
4915 { Bad_Opcode },
ec6f095a 4916 { "vpcmpgtw", { XM, Vex, EXx }, 0 },
7c52e0e8
L
4917 },
4918
592a252b 4919 /* PREFIX_VEX_0F66 */
7c52e0e8 4920 {
592d1631
L
4921 { Bad_Opcode },
4922 { Bad_Opcode },
ec6f095a 4923 { "vpcmpgtd", { XM, Vex, EXx }, 0 },
7c52e0e8 4924 },
6439fc28 4925
592a252b 4926 /* PREFIX_VEX_0F67 */
331d2d0d 4927 {
592d1631
L
4928 { Bad_Opcode },
4929 { Bad_Opcode },
ec6f095a 4930 { "vpackuswb", { XM, Vex, EXx }, 0 },
c0f3af97
L
4931 },
4932
592a252b 4933 /* PREFIX_VEX_0F68 */
c0f3af97 4934 {
592d1631
L
4935 { Bad_Opcode },
4936 { Bad_Opcode },
ec6f095a 4937 { "vpunpckhbw", { XM, Vex, EXx }, 0 },
c0f3af97
L
4938 },
4939
592a252b 4940 /* PREFIX_VEX_0F69 */
c0f3af97 4941 {
592d1631
L
4942 { Bad_Opcode },
4943 { Bad_Opcode },
ec6f095a 4944 { "vpunpckhwd", { XM, Vex, EXx }, 0 },
c0f3af97
L
4945 },
4946
592a252b 4947 /* PREFIX_VEX_0F6A */
c0f3af97 4948 {
592d1631
L
4949 { Bad_Opcode },
4950 { Bad_Opcode },
ec6f095a 4951 { "vpunpckhdq", { XM, Vex, EXx }, 0 },
c0f3af97
L
4952 },
4953
592a252b 4954 /* PREFIX_VEX_0F6B */
c0f3af97 4955 {
592d1631
L
4956 { Bad_Opcode },
4957 { Bad_Opcode },
ec6f095a 4958 { "vpackssdw", { XM, Vex, EXx }, 0 },
c0f3af97
L
4959 },
4960
592a252b 4961 /* PREFIX_VEX_0F6C */
c0f3af97 4962 {
592d1631
L
4963 { Bad_Opcode },
4964 { Bad_Opcode },
ec6f095a 4965 { "vpunpcklqdq", { XM, Vex, EXx }, 0 },
c0f3af97
L
4966 },
4967
592a252b 4968 /* PREFIX_VEX_0F6D */
c0f3af97 4969 {
592d1631
L
4970 { Bad_Opcode },
4971 { Bad_Opcode },
ec6f095a 4972 { "vpunpckhqdq", { XM, Vex, EXx }, 0 },
c0f3af97
L
4973 },
4974
592a252b 4975 /* PREFIX_VEX_0F6E */
c0f3af97 4976 {
592d1631
L
4977 { Bad_Opcode },
4978 { Bad_Opcode },
592a252b 4979 { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2) },
c0f3af97
L
4980 },
4981
592a252b 4982 /* PREFIX_VEX_0F6F */
c0f3af97 4983 {
592d1631 4984 { Bad_Opcode },
ec6f095a
L
4985 { "vmovdqu", { XM, EXx }, 0 },
4986 { "vmovdqa", { XM, EXx }, 0 },
c0f3af97
L
4987 },
4988
592a252b 4989 /* PREFIX_VEX_0F70 */
c0f3af97 4990 {
592d1631 4991 { Bad_Opcode },
ec6f095a
L
4992 { "vpshufhw", { XM, EXx, Ib }, 0 },
4993 { "vpshufd", { XM, EXx, Ib }, 0 },
4994 { "vpshuflw", { XM, EXx, Ib }, 0 },
c0f3af97
L
4995 },
4996
592a252b 4997 /* PREFIX_VEX_0F71_REG_2 */
c0f3af97 4998 {
592d1631
L
4999 { Bad_Opcode },
5000 { Bad_Opcode },
ec6f095a 5001 { "vpsrlw", { Vex, XS, Ib }, 0 },
c0f3af97
L
5002 },
5003
592a252b 5004 /* PREFIX_VEX_0F71_REG_4 */
c0f3af97 5005 {
592d1631
L
5006 { Bad_Opcode },
5007 { Bad_Opcode },
ec6f095a 5008 { "vpsraw", { Vex, XS, Ib }, 0 },
c0f3af97
L
5009 },
5010
592a252b 5011 /* PREFIX_VEX_0F71_REG_6 */
c0f3af97 5012 {
592d1631
L
5013 { Bad_Opcode },
5014 { Bad_Opcode },
ec6f095a 5015 { "vpsllw", { Vex, XS, Ib }, 0 },
c0f3af97
L
5016 },
5017
592a252b 5018 /* PREFIX_VEX_0F72_REG_2 */
c0f3af97 5019 {
592d1631
L
5020 { Bad_Opcode },
5021 { Bad_Opcode },
ec6f095a 5022 { "vpsrld", { Vex, XS, Ib }, 0 },
c0f3af97
L
5023 },
5024
592a252b 5025 /* PREFIX_VEX_0F72_REG_4 */
c0f3af97 5026 {
592d1631
L
5027 { Bad_Opcode },
5028 { Bad_Opcode },
ec6f095a 5029 { "vpsrad", { Vex, XS, Ib }, 0 },
c0f3af97
L
5030 },
5031
592a252b 5032 /* PREFIX_VEX_0F72_REG_6 */
c0f3af97 5033 {
592d1631
L
5034 { Bad_Opcode },
5035 { Bad_Opcode },
ec6f095a 5036 { "vpslld", { Vex, XS, Ib }, 0 },
c0f3af97
L
5037 },
5038
592a252b 5039 /* PREFIX_VEX_0F73_REG_2 */
c0f3af97 5040 {
592d1631
L
5041 { Bad_Opcode },
5042 { Bad_Opcode },
ec6f095a 5043 { "vpsrlq", { Vex, XS, Ib }, 0 },
c0f3af97
L
5044 },
5045
592a252b 5046 /* PREFIX_VEX_0F73_REG_3 */
c0f3af97 5047 {
592d1631
L
5048 { Bad_Opcode },
5049 { Bad_Opcode },
ec6f095a 5050 { "vpsrldq", { Vex, XS, Ib }, 0 },
c0f3af97
L
5051 },
5052
592a252b 5053 /* PREFIX_VEX_0F73_REG_6 */
c0f3af97 5054 {
592d1631
L
5055 { Bad_Opcode },
5056 { Bad_Opcode },
ec6f095a 5057 { "vpsllq", { Vex, XS, Ib }, 0 },
c0f3af97
L
5058 },
5059
592a252b 5060 /* PREFIX_VEX_0F73_REG_7 */
c0f3af97 5061 {
592d1631
L
5062 { Bad_Opcode },
5063 { Bad_Opcode },
ec6f095a 5064 { "vpslldq", { Vex, XS, Ib }, 0 },
c0f3af97
L
5065 },
5066
592a252b 5067 /* PREFIX_VEX_0F74 */
c0f3af97 5068 {
592d1631
L
5069 { Bad_Opcode },
5070 { Bad_Opcode },
ec6f095a 5071 { "vpcmpeqb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5072 },
5073
592a252b 5074 /* PREFIX_VEX_0F75 */
c0f3af97 5075 {
592d1631
L
5076 { Bad_Opcode },
5077 { Bad_Opcode },
ec6f095a 5078 { "vpcmpeqw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5079 },
5080
592a252b 5081 /* PREFIX_VEX_0F76 */
c0f3af97 5082 {
592d1631
L
5083 { Bad_Opcode },
5084 { Bad_Opcode },
ec6f095a 5085 { "vpcmpeqd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5086 },
5087
592a252b 5088 /* PREFIX_VEX_0F77 */
c0f3af97 5089 {
ec6f095a 5090 { VEX_LEN_TABLE (VEX_LEN_0F77_P_0) },
c0f3af97
L
5091 },
5092
592a252b 5093 /* PREFIX_VEX_0F7C */
c0f3af97 5094 {
592d1631
L
5095 { Bad_Opcode },
5096 { Bad_Opcode },
ec6f095a
L
5097 { "vhaddpd", { XM, Vex, EXx }, 0 },
5098 { "vhaddps", { XM, Vex, EXx }, 0 },
c0f3af97
L
5099 },
5100
592a252b 5101 /* PREFIX_VEX_0F7D */
c0f3af97 5102 {
592d1631
L
5103 { Bad_Opcode },
5104 { Bad_Opcode },
ec6f095a
L
5105 { "vhsubpd", { XM, Vex, EXx }, 0 },
5106 { "vhsubps", { XM, Vex, EXx }, 0 },
c0f3af97
L
5107 },
5108
592a252b 5109 /* PREFIX_VEX_0F7E */
c0f3af97 5110 {
592d1631 5111 { Bad_Opcode },
592a252b
L
5112 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1) },
5113 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2) },
c0f3af97
L
5114 },
5115
592a252b 5116 /* PREFIX_VEX_0F7F */
c0f3af97 5117 {
592d1631 5118 { Bad_Opcode },
ec6f095a
L
5119 { "vmovdqu", { EXxS, XM }, 0 },
5120 { "vmovdqa", { EXxS, XM }, 0 },
c0f3af97
L
5121 },
5122
43234a1e
L
5123 /* PREFIX_VEX_0F90 */
5124 {
5125 { VEX_LEN_TABLE (VEX_LEN_0F90_P_0) },
1ba585e8
IT
5126 { Bad_Opcode },
5127 { VEX_LEN_TABLE (VEX_LEN_0F90_P_2) },
43234a1e
L
5128 },
5129
5130 /* PREFIX_VEX_0F91 */
5131 {
5132 { VEX_LEN_TABLE (VEX_LEN_0F91_P_0) },
1ba585e8
IT
5133 { Bad_Opcode },
5134 { VEX_LEN_TABLE (VEX_LEN_0F91_P_2) },
43234a1e
L
5135 },
5136
5137 /* PREFIX_VEX_0F92 */
5138 {
5139 { VEX_LEN_TABLE (VEX_LEN_0F92_P_0) },
1ba585e8 5140 { Bad_Opcode },
90a915bf 5141 { VEX_LEN_TABLE (VEX_LEN_0F92_P_2) },
1ba585e8 5142 { VEX_LEN_TABLE (VEX_LEN_0F92_P_3) },
43234a1e
L
5143 },
5144
5145 /* PREFIX_VEX_0F93 */
5146 {
5147 { VEX_LEN_TABLE (VEX_LEN_0F93_P_0) },
1ba585e8 5148 { Bad_Opcode },
90a915bf 5149 { VEX_LEN_TABLE (VEX_LEN_0F93_P_2) },
1ba585e8 5150 { VEX_LEN_TABLE (VEX_LEN_0F93_P_3) },
43234a1e
L
5151 },
5152
5153 /* PREFIX_VEX_0F98 */
5154 {
5155 { VEX_LEN_TABLE (VEX_LEN_0F98_P_0) },
1ba585e8
IT
5156 { Bad_Opcode },
5157 { VEX_LEN_TABLE (VEX_LEN_0F98_P_2) },
5158 },
5159
5160 /* PREFIX_VEX_0F99 */
5161 {
5162 { VEX_LEN_TABLE (VEX_LEN_0F99_P_0) },
5163 { Bad_Opcode },
5164 { VEX_LEN_TABLE (VEX_LEN_0F99_P_2) },
43234a1e
L
5165 },
5166
592a252b 5167 /* PREFIX_VEX_0FC2 */
c0f3af97 5168 {
ec6f095a
L
5169 { "vcmpps", { XM, Vex, EXx, VCMP }, 0 },
5170 { "vcmpss", { XMScalar, VexScalar, EXdScalar, VCMP }, 0 },
5171 { "vcmppd", { XM, Vex, EXx, VCMP }, 0 },
5172 { "vcmpsd", { XMScalar, VexScalar, EXqScalar, VCMP }, 0 },
c0f3af97
L
5173 },
5174
592a252b 5175 /* PREFIX_VEX_0FC4 */
c0f3af97 5176 {
592d1631
L
5177 { Bad_Opcode },
5178 { Bad_Opcode },
592a252b 5179 { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2) },
c0f3af97
L
5180 },
5181
592a252b 5182 /* PREFIX_VEX_0FC5 */
c0f3af97 5183 {
592d1631
L
5184 { Bad_Opcode },
5185 { Bad_Opcode },
592a252b 5186 { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2) },
c0f3af97
L
5187 },
5188
592a252b 5189 /* PREFIX_VEX_0FD0 */
c0f3af97 5190 {
592d1631
L
5191 { Bad_Opcode },
5192 { Bad_Opcode },
ec6f095a
L
5193 { "vaddsubpd", { XM, Vex, EXx }, 0 },
5194 { "vaddsubps", { XM, Vex, EXx }, 0 },
c0f3af97
L
5195 },
5196
592a252b 5197 /* PREFIX_VEX_0FD1 */
c0f3af97 5198 {
592d1631
L
5199 { Bad_Opcode },
5200 { Bad_Opcode },
ec6f095a 5201 { "vpsrlw", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5202 },
5203
592a252b 5204 /* PREFIX_VEX_0FD2 */
c0f3af97 5205 {
592d1631
L
5206 { Bad_Opcode },
5207 { Bad_Opcode },
ec6f095a 5208 { "vpsrld", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5209 },
5210
592a252b 5211 /* PREFIX_VEX_0FD3 */
c0f3af97 5212 {
592d1631
L
5213 { Bad_Opcode },
5214 { Bad_Opcode },
ec6f095a 5215 { "vpsrlq", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5216 },
5217
592a252b 5218 /* PREFIX_VEX_0FD4 */
c0f3af97 5219 {
592d1631
L
5220 { Bad_Opcode },
5221 { Bad_Opcode },
ec6f095a 5222 { "vpaddq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5223 },
5224
592a252b 5225 /* PREFIX_VEX_0FD5 */
c0f3af97 5226 {
592d1631
L
5227 { Bad_Opcode },
5228 { Bad_Opcode },
ec6f095a 5229 { "vpmullw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5230 },
5231
592a252b 5232 /* PREFIX_VEX_0FD6 */
c0f3af97 5233 {
592d1631
L
5234 { Bad_Opcode },
5235 { Bad_Opcode },
592a252b 5236 { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2) },
c0f3af97
L
5237 },
5238
592a252b 5239 /* PREFIX_VEX_0FD7 */
c0f3af97 5240 {
592d1631
L
5241 { Bad_Opcode },
5242 { Bad_Opcode },
592a252b 5243 { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2) },
c0f3af97
L
5244 },
5245
592a252b 5246 /* PREFIX_VEX_0FD8 */
c0f3af97 5247 {
592d1631
L
5248 { Bad_Opcode },
5249 { Bad_Opcode },
ec6f095a 5250 { "vpsubusb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5251 },
5252
592a252b 5253 /* PREFIX_VEX_0FD9 */
c0f3af97 5254 {
592d1631
L
5255 { Bad_Opcode },
5256 { Bad_Opcode },
ec6f095a 5257 { "vpsubusw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5258 },
5259
592a252b 5260 /* PREFIX_VEX_0FDA */
c0f3af97 5261 {
592d1631
L
5262 { Bad_Opcode },
5263 { Bad_Opcode },
ec6f095a 5264 { "vpminub", { XM, Vex, EXx }, 0 },
c0f3af97
L
5265 },
5266
592a252b 5267 /* PREFIX_VEX_0FDB */
c0f3af97 5268 {
592d1631
L
5269 { Bad_Opcode },
5270 { Bad_Opcode },
ec6f095a 5271 { "vpand", { XM, Vex, EXx }, 0 },
c0f3af97
L
5272 },
5273
592a252b 5274 /* PREFIX_VEX_0FDC */
c0f3af97 5275 {
592d1631
L
5276 { Bad_Opcode },
5277 { Bad_Opcode },
ec6f095a 5278 { "vpaddusb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5279 },
5280
592a252b 5281 /* PREFIX_VEX_0FDD */
c0f3af97 5282 {
592d1631
L
5283 { Bad_Opcode },
5284 { Bad_Opcode },
ec6f095a 5285 { "vpaddusw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5286 },
5287
592a252b 5288 /* PREFIX_VEX_0FDE */
c0f3af97 5289 {
592d1631
L
5290 { Bad_Opcode },
5291 { Bad_Opcode },
ec6f095a 5292 { "vpmaxub", { XM, Vex, EXx }, 0 },
c0f3af97
L
5293 },
5294
592a252b 5295 /* PREFIX_VEX_0FDF */
c0f3af97 5296 {
592d1631
L
5297 { Bad_Opcode },
5298 { Bad_Opcode },
ec6f095a 5299 { "vpandn", { XM, Vex, EXx }, 0 },
c0f3af97
L
5300 },
5301
592a252b 5302 /* PREFIX_VEX_0FE0 */
c0f3af97 5303 {
592d1631
L
5304 { Bad_Opcode },
5305 { Bad_Opcode },
ec6f095a 5306 { "vpavgb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5307 },
5308
592a252b 5309 /* PREFIX_VEX_0FE1 */
c0f3af97 5310 {
592d1631
L
5311 { Bad_Opcode },
5312 { Bad_Opcode },
ec6f095a 5313 { "vpsraw", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5314 },
5315
592a252b 5316 /* PREFIX_VEX_0FE2 */
c0f3af97 5317 {
592d1631
L
5318 { Bad_Opcode },
5319 { Bad_Opcode },
ec6f095a 5320 { "vpsrad", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5321 },
5322
592a252b 5323 /* PREFIX_VEX_0FE3 */
c0f3af97 5324 {
592d1631
L
5325 { Bad_Opcode },
5326 { Bad_Opcode },
ec6f095a 5327 { "vpavgw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5328 },
5329
592a252b 5330 /* PREFIX_VEX_0FE4 */
c0f3af97 5331 {
592d1631
L
5332 { Bad_Opcode },
5333 { Bad_Opcode },
ec6f095a 5334 { "vpmulhuw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5335 },
5336
592a252b 5337 /* PREFIX_VEX_0FE5 */
c0f3af97 5338 {
592d1631
L
5339 { Bad_Opcode },
5340 { Bad_Opcode },
ec6f095a 5341 { "vpmulhw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5342 },
5343
592a252b 5344 /* PREFIX_VEX_0FE6 */
c0f3af97 5345 {
592d1631 5346 { Bad_Opcode },
ec6f095a
L
5347 { "vcvtdq2pd", { XM, EXxmmq }, 0 },
5348 { "vcvttpd2dq%XY", { XMM, EXx }, 0 },
5349 { "vcvtpd2dq%XY", { XMM, EXx }, 0 },
c0f3af97
L
5350 },
5351
592a252b 5352 /* PREFIX_VEX_0FE7 */
c0f3af97 5353 {
592d1631
L
5354 { Bad_Opcode },
5355 { Bad_Opcode },
592a252b 5356 { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2) },
c0f3af97
L
5357 },
5358
592a252b 5359 /* PREFIX_VEX_0FE8 */
c0f3af97 5360 {
592d1631
L
5361 { Bad_Opcode },
5362 { Bad_Opcode },
ec6f095a 5363 { "vpsubsb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5364 },
5365
592a252b 5366 /* PREFIX_VEX_0FE9 */
c0f3af97 5367 {
592d1631
L
5368 { Bad_Opcode },
5369 { Bad_Opcode },
ec6f095a 5370 { "vpsubsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5371 },
5372
592a252b 5373 /* PREFIX_VEX_0FEA */
c0f3af97 5374 {
592d1631
L
5375 { Bad_Opcode },
5376 { Bad_Opcode },
ec6f095a 5377 { "vpminsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5378 },
5379
592a252b 5380 /* PREFIX_VEX_0FEB */
c0f3af97 5381 {
592d1631
L
5382 { Bad_Opcode },
5383 { Bad_Opcode },
ec6f095a 5384 { "vpor", { XM, Vex, EXx }, 0 },
c0f3af97
L
5385 },
5386
592a252b 5387 /* PREFIX_VEX_0FEC */
c0f3af97 5388 {
592d1631
L
5389 { Bad_Opcode },
5390 { Bad_Opcode },
ec6f095a 5391 { "vpaddsb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5392 },
5393
592a252b 5394 /* PREFIX_VEX_0FED */
c0f3af97 5395 {
592d1631
L
5396 { Bad_Opcode },
5397 { Bad_Opcode },
ec6f095a 5398 { "vpaddsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5399 },
5400
592a252b 5401 /* PREFIX_VEX_0FEE */
c0f3af97 5402 {
592d1631
L
5403 { Bad_Opcode },
5404 { Bad_Opcode },
ec6f095a 5405 { "vpmaxsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5406 },
5407
592a252b 5408 /* PREFIX_VEX_0FEF */
c0f3af97 5409 {
592d1631
L
5410 { Bad_Opcode },
5411 { Bad_Opcode },
ec6f095a 5412 { "vpxor", { XM, Vex, EXx }, 0 },
c0f3af97
L
5413 },
5414
592a252b 5415 /* PREFIX_VEX_0FF0 */
c0f3af97 5416 {
592d1631
L
5417 { Bad_Opcode },
5418 { Bad_Opcode },
5419 { Bad_Opcode },
592a252b 5420 { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3) },
c0f3af97
L
5421 },
5422
592a252b 5423 /* PREFIX_VEX_0FF1 */
c0f3af97 5424 {
592d1631
L
5425 { Bad_Opcode },
5426 { Bad_Opcode },
ec6f095a 5427 { "vpsllw", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5428 },
5429
592a252b 5430 /* PREFIX_VEX_0FF2 */
c0f3af97 5431 {
592d1631
L
5432 { Bad_Opcode },
5433 { Bad_Opcode },
ec6f095a 5434 { "vpslld", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5435 },
5436
592a252b 5437 /* PREFIX_VEX_0FF3 */
c0f3af97 5438 {
592d1631
L
5439 { Bad_Opcode },
5440 { Bad_Opcode },
ec6f095a 5441 { "vpsllq", { XM, Vex, EXxmm }, 0 },
c0f3af97
L
5442 },
5443
592a252b 5444 /* PREFIX_VEX_0FF4 */
c0f3af97 5445 {
592d1631
L
5446 { Bad_Opcode },
5447 { Bad_Opcode },
ec6f095a 5448 { "vpmuludq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5449 },
5450
592a252b 5451 /* PREFIX_VEX_0FF5 */
c0f3af97 5452 {
592d1631
L
5453 { Bad_Opcode },
5454 { Bad_Opcode },
ec6f095a 5455 { "vpmaddwd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5456 },
5457
592a252b 5458 /* PREFIX_VEX_0FF6 */
c0f3af97 5459 {
592d1631
L
5460 { Bad_Opcode },
5461 { Bad_Opcode },
ec6f095a 5462 { "vpsadbw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5463 },
5464
592a252b 5465 /* PREFIX_VEX_0FF7 */
c0f3af97 5466 {
592d1631
L
5467 { Bad_Opcode },
5468 { Bad_Opcode },
592a252b 5469 { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2) },
c0f3af97
L
5470 },
5471
592a252b 5472 /* PREFIX_VEX_0FF8 */
c0f3af97 5473 {
592d1631
L
5474 { Bad_Opcode },
5475 { Bad_Opcode },
ec6f095a 5476 { "vpsubb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5477 },
5478
592a252b 5479 /* PREFIX_VEX_0FF9 */
c0f3af97 5480 {
592d1631
L
5481 { Bad_Opcode },
5482 { Bad_Opcode },
ec6f095a 5483 { "vpsubw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5484 },
5485
592a252b 5486 /* PREFIX_VEX_0FFA */
c0f3af97 5487 {
592d1631
L
5488 { Bad_Opcode },
5489 { Bad_Opcode },
ec6f095a 5490 { "vpsubd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5491 },
5492
592a252b 5493 /* PREFIX_VEX_0FFB */
c0f3af97 5494 {
592d1631
L
5495 { Bad_Opcode },
5496 { Bad_Opcode },
ec6f095a 5497 { "vpsubq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5498 },
5499
592a252b 5500 /* PREFIX_VEX_0FFC */
c0f3af97 5501 {
592d1631
L
5502 { Bad_Opcode },
5503 { Bad_Opcode },
ec6f095a 5504 { "vpaddb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5505 },
5506
592a252b 5507 /* PREFIX_VEX_0FFD */
c0f3af97 5508 {
592d1631
L
5509 { Bad_Opcode },
5510 { Bad_Opcode },
ec6f095a 5511 { "vpaddw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5512 },
5513
592a252b 5514 /* PREFIX_VEX_0FFE */
c0f3af97 5515 {
592d1631
L
5516 { Bad_Opcode },
5517 { Bad_Opcode },
ec6f095a 5518 { "vpaddd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5519 },
5520
592a252b 5521 /* PREFIX_VEX_0F3800 */
c0f3af97 5522 {
592d1631
L
5523 { Bad_Opcode },
5524 { Bad_Opcode },
ec6f095a 5525 { "vpshufb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5526 },
5527
592a252b 5528 /* PREFIX_VEX_0F3801 */
c0f3af97 5529 {
592d1631
L
5530 { Bad_Opcode },
5531 { Bad_Opcode },
ec6f095a 5532 { "vphaddw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5533 },
5534
592a252b 5535 /* PREFIX_VEX_0F3802 */
c0f3af97 5536 {
592d1631
L
5537 { Bad_Opcode },
5538 { Bad_Opcode },
ec6f095a 5539 { "vphaddd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5540 },
5541
592a252b 5542 /* PREFIX_VEX_0F3803 */
c0f3af97 5543 {
592d1631
L
5544 { Bad_Opcode },
5545 { Bad_Opcode },
ec6f095a 5546 { "vphaddsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5547 },
5548
592a252b 5549 /* PREFIX_VEX_0F3804 */
c0f3af97 5550 {
592d1631
L
5551 { Bad_Opcode },
5552 { Bad_Opcode },
ec6f095a 5553 { "vpmaddubsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5554 },
5555
592a252b 5556 /* PREFIX_VEX_0F3805 */
c0f3af97 5557 {
592d1631
L
5558 { Bad_Opcode },
5559 { Bad_Opcode },
ec6f095a 5560 { "vphsubw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5561 },
5562
592a252b 5563 /* PREFIX_VEX_0F3806 */
c0f3af97 5564 {
592d1631
L
5565 { Bad_Opcode },
5566 { Bad_Opcode },
ec6f095a 5567 { "vphsubd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5568 },
5569
592a252b 5570 /* PREFIX_VEX_0F3807 */
c0f3af97 5571 {
592d1631
L
5572 { Bad_Opcode },
5573 { Bad_Opcode },
ec6f095a 5574 { "vphsubsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5575 },
5576
592a252b 5577 /* PREFIX_VEX_0F3808 */
c0f3af97 5578 {
592d1631
L
5579 { Bad_Opcode },
5580 { Bad_Opcode },
ec6f095a 5581 { "vpsignb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5582 },
5583
592a252b 5584 /* PREFIX_VEX_0F3809 */
c0f3af97 5585 {
592d1631
L
5586 { Bad_Opcode },
5587 { Bad_Opcode },
ec6f095a 5588 { "vpsignw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5589 },
5590
592a252b 5591 /* PREFIX_VEX_0F380A */
c0f3af97 5592 {
592d1631
L
5593 { Bad_Opcode },
5594 { Bad_Opcode },
ec6f095a 5595 { "vpsignd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5596 },
5597
592a252b 5598 /* PREFIX_VEX_0F380B */
c0f3af97 5599 {
592d1631
L
5600 { Bad_Opcode },
5601 { Bad_Opcode },
ec6f095a 5602 { "vpmulhrsw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5603 },
5604
592a252b 5605 /* PREFIX_VEX_0F380C */
c0f3af97 5606 {
592d1631
L
5607 { Bad_Opcode },
5608 { Bad_Opcode },
592a252b 5609 { VEX_W_TABLE (VEX_W_0F380C_P_2) },
c0f3af97
L
5610 },
5611
592a252b 5612 /* PREFIX_VEX_0F380D */
c0f3af97 5613 {
592d1631
L
5614 { Bad_Opcode },
5615 { Bad_Opcode },
592a252b 5616 { VEX_W_TABLE (VEX_W_0F380D_P_2) },
c0f3af97
L
5617 },
5618
592a252b 5619 /* PREFIX_VEX_0F380E */
c0f3af97 5620 {
592d1631
L
5621 { Bad_Opcode },
5622 { Bad_Opcode },
592a252b 5623 { VEX_W_TABLE (VEX_W_0F380E_P_2) },
c0f3af97
L
5624 },
5625
592a252b 5626 /* PREFIX_VEX_0F380F */
c0f3af97 5627 {
592d1631
L
5628 { Bad_Opcode },
5629 { Bad_Opcode },
592a252b 5630 { VEX_W_TABLE (VEX_W_0F380F_P_2) },
c0f3af97
L
5631 },
5632
592a252b 5633 /* PREFIX_VEX_0F3813 */
c7b8aa3a
L
5634 {
5635 { Bad_Opcode },
5636 { Bad_Opcode },
bf890a93 5637 { "vcvtph2ps", { XM, EXxmmq }, 0 },
c7b8aa3a
L
5638 },
5639
6c30d220
L
5640 /* PREFIX_VEX_0F3816 */
5641 {
5642 { Bad_Opcode },
5643 { Bad_Opcode },
5644 { VEX_LEN_TABLE (VEX_LEN_0F3816_P_2) },
5645 },
5646
592a252b 5647 /* PREFIX_VEX_0F3817 */
c0f3af97 5648 {
592d1631
L
5649 { Bad_Opcode },
5650 { Bad_Opcode },
ec6f095a 5651 { "vptest", { XM, EXx }, 0 },
c0f3af97
L
5652 },
5653
592a252b 5654 /* PREFIX_VEX_0F3818 */
c0f3af97 5655 {
592d1631
L
5656 { Bad_Opcode },
5657 { Bad_Opcode },
6c30d220 5658 { VEX_W_TABLE (VEX_W_0F3818_P_2) },
c0f3af97
L
5659 },
5660
592a252b 5661 /* PREFIX_VEX_0F3819 */
c0f3af97 5662 {
592d1631
L
5663 { Bad_Opcode },
5664 { Bad_Opcode },
6c30d220 5665 { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2) },
c0f3af97
L
5666 },
5667
592a252b 5668 /* PREFIX_VEX_0F381A */
c0f3af97 5669 {
592d1631
L
5670 { Bad_Opcode },
5671 { Bad_Opcode },
592a252b 5672 { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2) },
c0f3af97
L
5673 },
5674
592a252b 5675 /* PREFIX_VEX_0F381C */
c0f3af97 5676 {
592d1631
L
5677 { Bad_Opcode },
5678 { Bad_Opcode },
ec6f095a 5679 { "vpabsb", { XM, EXx }, 0 },
c0f3af97
L
5680 },
5681
592a252b 5682 /* PREFIX_VEX_0F381D */
c0f3af97 5683 {
592d1631
L
5684 { Bad_Opcode },
5685 { Bad_Opcode },
ec6f095a 5686 { "vpabsw", { XM, EXx }, 0 },
c0f3af97
L
5687 },
5688
592a252b 5689 /* PREFIX_VEX_0F381E */
c0f3af97 5690 {
592d1631
L
5691 { Bad_Opcode },
5692 { Bad_Opcode },
ec6f095a 5693 { "vpabsd", { XM, EXx }, 0 },
c0f3af97
L
5694 },
5695
592a252b 5696 /* PREFIX_VEX_0F3820 */
c0f3af97 5697 {
592d1631
L
5698 { Bad_Opcode },
5699 { Bad_Opcode },
ec6f095a 5700 { "vpmovsxbw", { XM, EXxmmq }, 0 },
c0f3af97
L
5701 },
5702
592a252b 5703 /* PREFIX_VEX_0F3821 */
c0f3af97 5704 {
592d1631
L
5705 { Bad_Opcode },
5706 { Bad_Opcode },
ec6f095a 5707 { "vpmovsxbd", { XM, EXxmmqd }, 0 },
c0f3af97
L
5708 },
5709
592a252b 5710 /* PREFIX_VEX_0F3822 */
c0f3af97 5711 {
592d1631
L
5712 { Bad_Opcode },
5713 { Bad_Opcode },
ec6f095a 5714 { "vpmovsxbq", { XM, EXxmmdw }, 0 },
c0f3af97
L
5715 },
5716
592a252b 5717 /* PREFIX_VEX_0F3823 */
c0f3af97 5718 {
592d1631
L
5719 { Bad_Opcode },
5720 { Bad_Opcode },
ec6f095a 5721 { "vpmovsxwd", { XM, EXxmmq }, 0 },
c0f3af97
L
5722 },
5723
592a252b 5724 /* PREFIX_VEX_0F3824 */
c0f3af97 5725 {
592d1631
L
5726 { Bad_Opcode },
5727 { Bad_Opcode },
ec6f095a 5728 { "vpmovsxwq", { XM, EXxmmqd }, 0 },
c0f3af97
L
5729 },
5730
592a252b 5731 /* PREFIX_VEX_0F3825 */
c0f3af97 5732 {
592d1631
L
5733 { Bad_Opcode },
5734 { Bad_Opcode },
ec6f095a 5735 { "vpmovsxdq", { XM, EXxmmq }, 0 },
c0f3af97
L
5736 },
5737
592a252b 5738 /* PREFIX_VEX_0F3828 */
c0f3af97 5739 {
592d1631
L
5740 { Bad_Opcode },
5741 { Bad_Opcode },
ec6f095a 5742 { "vpmuldq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5743 },
5744
592a252b 5745 /* PREFIX_VEX_0F3829 */
c0f3af97 5746 {
592d1631
L
5747 { Bad_Opcode },
5748 { Bad_Opcode },
ec6f095a 5749 { "vpcmpeqq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5750 },
5751
592a252b 5752 /* PREFIX_VEX_0F382A */
c0f3af97 5753 {
592d1631
L
5754 { Bad_Opcode },
5755 { Bad_Opcode },
592a252b 5756 { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2) },
c0f3af97
L
5757 },
5758
592a252b 5759 /* PREFIX_VEX_0F382B */
c0f3af97 5760 {
592d1631
L
5761 { Bad_Opcode },
5762 { Bad_Opcode },
ec6f095a 5763 { "vpackusdw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5764 },
5765
592a252b 5766 /* PREFIX_VEX_0F382C */
c0f3af97 5767 {
592d1631
L
5768 { Bad_Opcode },
5769 { Bad_Opcode },
592a252b 5770 { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2) },
c0f3af97
L
5771 },
5772
592a252b 5773 /* PREFIX_VEX_0F382D */
c0f3af97 5774 {
592d1631
L
5775 { Bad_Opcode },
5776 { Bad_Opcode },
592a252b 5777 { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2) },
c0f3af97
L
5778 },
5779
592a252b 5780 /* PREFIX_VEX_0F382E */
c0f3af97 5781 {
592d1631
L
5782 { Bad_Opcode },
5783 { Bad_Opcode },
592a252b 5784 { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2) },
c0f3af97
L
5785 },
5786
592a252b 5787 /* PREFIX_VEX_0F382F */
c0f3af97 5788 {
592d1631
L
5789 { Bad_Opcode },
5790 { Bad_Opcode },
592a252b 5791 { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2) },
c0f3af97
L
5792 },
5793
592a252b 5794 /* PREFIX_VEX_0F3830 */
c0f3af97 5795 {
592d1631
L
5796 { Bad_Opcode },
5797 { Bad_Opcode },
ec6f095a 5798 { "vpmovzxbw", { XM, EXxmmq }, 0 },
c0f3af97
L
5799 },
5800
592a252b 5801 /* PREFIX_VEX_0F3831 */
c0f3af97 5802 {
592d1631
L
5803 { Bad_Opcode },
5804 { Bad_Opcode },
ec6f095a 5805 { "vpmovzxbd", { XM, EXxmmqd }, 0 },
c0f3af97
L
5806 },
5807
592a252b 5808 /* PREFIX_VEX_0F3832 */
c0f3af97 5809 {
592d1631
L
5810 { Bad_Opcode },
5811 { Bad_Opcode },
ec6f095a 5812 { "vpmovzxbq", { XM, EXxmmdw }, 0 },
c0f3af97
L
5813 },
5814
592a252b 5815 /* PREFIX_VEX_0F3833 */
c0f3af97 5816 {
592d1631
L
5817 { Bad_Opcode },
5818 { Bad_Opcode },
ec6f095a 5819 { "vpmovzxwd", { XM, EXxmmq }, 0 },
c0f3af97
L
5820 },
5821
592a252b 5822 /* PREFIX_VEX_0F3834 */
c0f3af97 5823 {
592d1631
L
5824 { Bad_Opcode },
5825 { Bad_Opcode },
ec6f095a 5826 { "vpmovzxwq", { XM, EXxmmqd }, 0 },
c0f3af97
L
5827 },
5828
592a252b 5829 /* PREFIX_VEX_0F3835 */
c0f3af97 5830 {
592d1631
L
5831 { Bad_Opcode },
5832 { Bad_Opcode },
ec6f095a 5833 { "vpmovzxdq", { XM, EXxmmq }, 0 },
6c30d220
L
5834 },
5835
5836 /* PREFIX_VEX_0F3836 */
5837 {
5838 { Bad_Opcode },
5839 { Bad_Opcode },
5840 { VEX_LEN_TABLE (VEX_LEN_0F3836_P_2) },
c0f3af97
L
5841 },
5842
592a252b 5843 /* PREFIX_VEX_0F3837 */
c0f3af97 5844 {
592d1631
L
5845 { Bad_Opcode },
5846 { Bad_Opcode },
ec6f095a 5847 { "vpcmpgtq", { XM, Vex, EXx }, 0 },
c0f3af97
L
5848 },
5849
592a252b 5850 /* PREFIX_VEX_0F3838 */
c0f3af97 5851 {
592d1631
L
5852 { Bad_Opcode },
5853 { Bad_Opcode },
ec6f095a 5854 { "vpminsb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5855 },
5856
592a252b 5857 /* PREFIX_VEX_0F3839 */
c0f3af97 5858 {
592d1631
L
5859 { Bad_Opcode },
5860 { Bad_Opcode },
ec6f095a 5861 { "vpminsd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5862 },
5863
592a252b 5864 /* PREFIX_VEX_0F383A */
c0f3af97 5865 {
592d1631
L
5866 { Bad_Opcode },
5867 { Bad_Opcode },
ec6f095a 5868 { "vpminuw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5869 },
5870
592a252b 5871 /* PREFIX_VEX_0F383B */
c0f3af97 5872 {
592d1631
L
5873 { Bad_Opcode },
5874 { Bad_Opcode },
ec6f095a 5875 { "vpminud", { XM, Vex, EXx }, 0 },
c0f3af97
L
5876 },
5877
592a252b 5878 /* PREFIX_VEX_0F383C */
c0f3af97 5879 {
592d1631
L
5880 { Bad_Opcode },
5881 { Bad_Opcode },
ec6f095a 5882 { "vpmaxsb", { XM, Vex, EXx }, 0 },
c0f3af97
L
5883 },
5884
592a252b 5885 /* PREFIX_VEX_0F383D */
c0f3af97 5886 {
592d1631
L
5887 { Bad_Opcode },
5888 { Bad_Opcode },
ec6f095a 5889 { "vpmaxsd", { XM, Vex, EXx }, 0 },
c0f3af97
L
5890 },
5891
592a252b 5892 /* PREFIX_VEX_0F383E */
c0f3af97 5893 {
592d1631
L
5894 { Bad_Opcode },
5895 { Bad_Opcode },
ec6f095a 5896 { "vpmaxuw", { XM, Vex, EXx }, 0 },
c0f3af97
L
5897 },
5898
592a252b 5899 /* PREFIX_VEX_0F383F */
c0f3af97 5900 {
592d1631
L
5901 { Bad_Opcode },
5902 { Bad_Opcode },
ec6f095a 5903 { "vpmaxud", { XM, Vex, EXx }, 0 },
c0f3af97
L
5904 },
5905
592a252b 5906 /* PREFIX_VEX_0F3840 */
c0f3af97 5907 {
592d1631
L
5908 { Bad_Opcode },
5909 { Bad_Opcode },
ec6f095a 5910 { "vpmulld", { XM, Vex, EXx }, 0 },
c0f3af97
L
5911 },
5912
592a252b 5913 /* PREFIX_VEX_0F3841 */
c0f3af97 5914 {
592d1631
L
5915 { Bad_Opcode },
5916 { Bad_Opcode },
592a252b 5917 { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2) },
c0f3af97
L
5918 },
5919
6c30d220
L
5920 /* PREFIX_VEX_0F3845 */
5921 {
5922 { Bad_Opcode },
5923 { Bad_Opcode },
bf890a93 5924 { "vpsrlv%LW", { XM, Vex, EXx }, 0 },
6c30d220
L
5925 },
5926
5927 /* PREFIX_VEX_0F3846 */
5928 {
5929 { Bad_Opcode },
5930 { Bad_Opcode },
5931 { VEX_W_TABLE (VEX_W_0F3846_P_2) },
5932 },
5933
5934 /* PREFIX_VEX_0F3847 */
5935 {
5936 { Bad_Opcode },
5937 { Bad_Opcode },
bf890a93 5938 { "vpsllv%LW", { XM, Vex, EXx }, 0 },
6c30d220
L
5939 },
5940
5941 /* PREFIX_VEX_0F3858 */
5942 {
5943 { Bad_Opcode },
5944 { Bad_Opcode },
5945 { VEX_W_TABLE (VEX_W_0F3858_P_2) },
5946 },
5947
5948 /* PREFIX_VEX_0F3859 */
5949 {
5950 { Bad_Opcode },
5951 { Bad_Opcode },
5952 { VEX_W_TABLE (VEX_W_0F3859_P_2) },
5953 },
5954
5955 /* PREFIX_VEX_0F385A */
5956 {
5957 { Bad_Opcode },
5958 { Bad_Opcode },
5959 { MOD_TABLE (MOD_VEX_0F385A_PREFIX_2) },
5960 },
5961
5962 /* PREFIX_VEX_0F3878 */
5963 {
5964 { Bad_Opcode },
5965 { Bad_Opcode },
5966 { VEX_W_TABLE (VEX_W_0F3878_P_2) },
5967 },
5968
5969 /* PREFIX_VEX_0F3879 */
5970 {
5971 { Bad_Opcode },
5972 { Bad_Opcode },
5973 { VEX_W_TABLE (VEX_W_0F3879_P_2) },
5974 },
5975
5976 /* PREFIX_VEX_0F388C */
5977 {
5978 { Bad_Opcode },
5979 { Bad_Opcode },
f7002f42 5980 { MOD_TABLE (MOD_VEX_0F388C_PREFIX_2) },
6c30d220
L
5981 },
5982
5983 /* PREFIX_VEX_0F388E */
5984 {
5985 { Bad_Opcode },
5986 { Bad_Opcode },
f7002f42 5987 { MOD_TABLE (MOD_VEX_0F388E_PREFIX_2) },
6c30d220
L
5988 },
5989
5990 /* PREFIX_VEX_0F3890 */
5991 {
5992 { Bad_Opcode },
5993 { Bad_Opcode },
bf890a93 5994 { "vpgatherd%LW", { XM, MVexVSIBDWpX, Vex }, 0 },
6c30d220
L
5995 },
5996
5997 /* PREFIX_VEX_0F3891 */
5998 {
5999 { Bad_Opcode },
6000 { Bad_Opcode },
bf890a93 6001 { "vpgatherq%LW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6c30d220
L
6002 },
6003
6004 /* PREFIX_VEX_0F3892 */
6005 {
6006 { Bad_Opcode },
6007 { Bad_Opcode },
bf890a93 6008 { "vgatherdp%XW", { XM, MVexVSIBDWpX, Vex }, 0 },
6c30d220
L
6009 },
6010
6011 /* PREFIX_VEX_0F3893 */
6012 {
6013 { Bad_Opcode },
6014 { Bad_Opcode },
bf890a93 6015 { "vgatherqp%XW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6c30d220
L
6016 },
6017
592a252b 6018 /* PREFIX_VEX_0F3896 */
a5ff0eb2 6019 {
592d1631
L
6020 { Bad_Opcode },
6021 { Bad_Opcode },
bf890a93 6022 { "vfmaddsub132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6023 },
6024
592a252b 6025 /* PREFIX_VEX_0F3897 */
a5ff0eb2 6026 {
592d1631
L
6027 { Bad_Opcode },
6028 { Bad_Opcode },
bf890a93 6029 { "vfmsubadd132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6030 },
6031
592a252b 6032 /* PREFIX_VEX_0F3898 */
a5ff0eb2 6033 {
592d1631
L
6034 { Bad_Opcode },
6035 { Bad_Opcode },
bf890a93 6036 { "vfmadd132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6037 },
6038
592a252b 6039 /* PREFIX_VEX_0F3899 */
a5ff0eb2 6040 {
592d1631
L
6041 { Bad_Opcode },
6042 { Bad_Opcode },
bf890a93 6043 { "vfmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
a5ff0eb2
L
6044 },
6045
592a252b 6046 /* PREFIX_VEX_0F389A */
a5ff0eb2 6047 {
592d1631
L
6048 { Bad_Opcode },
6049 { Bad_Opcode },
bf890a93 6050 { "vfmsub132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6051 },
6052
592a252b 6053 /* PREFIX_VEX_0F389B */
c0f3af97 6054 {
592d1631
L
6055 { Bad_Opcode },
6056 { Bad_Opcode },
bf890a93 6057 { "vfmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6058 },
6059
592a252b 6060 /* PREFIX_VEX_0F389C */
c0f3af97 6061 {
592d1631
L
6062 { Bad_Opcode },
6063 { Bad_Opcode },
bf890a93 6064 { "vfnmadd132p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6065 },
6066
592a252b 6067 /* PREFIX_VEX_0F389D */
c0f3af97 6068 {
592d1631
L
6069 { Bad_Opcode },
6070 { Bad_Opcode },
bf890a93 6071 { "vfnmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6072 },
6073
592a252b 6074 /* PREFIX_VEX_0F389E */
c0f3af97 6075 {
592d1631
L
6076 { Bad_Opcode },
6077 { Bad_Opcode },
bf890a93 6078 { "vfnmsub132p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6079 },
6080
592a252b 6081 /* PREFIX_VEX_0F389F */
c0f3af97 6082 {
592d1631
L
6083 { Bad_Opcode },
6084 { Bad_Opcode },
bf890a93 6085 { "vfnmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6086 },
6087
592a252b 6088 /* PREFIX_VEX_0F38A6 */
c0f3af97 6089 {
592d1631
L
6090 { Bad_Opcode },
6091 { Bad_Opcode },
bf890a93 6092 { "vfmaddsub213p%XW", { XM, Vex, EXx }, 0 },
592d1631 6093 { Bad_Opcode },
c0f3af97
L
6094 },
6095
592a252b 6096 /* PREFIX_VEX_0F38A7 */
c0f3af97 6097 {
592d1631
L
6098 { Bad_Opcode },
6099 { Bad_Opcode },
bf890a93 6100 { "vfmsubadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6101 },
6102
592a252b 6103 /* PREFIX_VEX_0F38A8 */
c0f3af97 6104 {
592d1631
L
6105 { Bad_Opcode },
6106 { Bad_Opcode },
bf890a93 6107 { "vfmadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6108 },
6109
592a252b 6110 /* PREFIX_VEX_0F38A9 */
c0f3af97 6111 {
592d1631
L
6112 { Bad_Opcode },
6113 { Bad_Opcode },
bf890a93 6114 { "vfmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6115 },
6116
592a252b 6117 /* PREFIX_VEX_0F38AA */
c0f3af97 6118 {
592d1631
L
6119 { Bad_Opcode },
6120 { Bad_Opcode },
bf890a93 6121 { "vfmsub213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6122 },
6123
592a252b 6124 /* PREFIX_VEX_0F38AB */
c0f3af97 6125 {
592d1631
L
6126 { Bad_Opcode },
6127 { Bad_Opcode },
bf890a93 6128 { "vfmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6129 },
6130
592a252b 6131 /* PREFIX_VEX_0F38AC */
c0f3af97 6132 {
592d1631
L
6133 { Bad_Opcode },
6134 { Bad_Opcode },
bf890a93 6135 { "vfnmadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6136 },
6137
592a252b 6138 /* PREFIX_VEX_0F38AD */
c0f3af97 6139 {
592d1631
L
6140 { Bad_Opcode },
6141 { Bad_Opcode },
bf890a93 6142 { "vfnmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6143 },
6144
592a252b 6145 /* PREFIX_VEX_0F38AE */
c0f3af97 6146 {
592d1631
L
6147 { Bad_Opcode },
6148 { Bad_Opcode },
bf890a93 6149 { "vfnmsub213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6150 },
6151
592a252b 6152 /* PREFIX_VEX_0F38AF */
c0f3af97 6153 {
592d1631
L
6154 { Bad_Opcode },
6155 { Bad_Opcode },
bf890a93 6156 { "vfnmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6157 },
6158
592a252b 6159 /* PREFIX_VEX_0F38B6 */
c0f3af97 6160 {
592d1631
L
6161 { Bad_Opcode },
6162 { Bad_Opcode },
bf890a93 6163 { "vfmaddsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6164 },
6165
592a252b 6166 /* PREFIX_VEX_0F38B7 */
c0f3af97 6167 {
592d1631
L
6168 { Bad_Opcode },
6169 { Bad_Opcode },
bf890a93 6170 { "vfmsubadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6171 },
6172
592a252b 6173 /* PREFIX_VEX_0F38B8 */
c0f3af97 6174 {
592d1631
L
6175 { Bad_Opcode },
6176 { Bad_Opcode },
bf890a93 6177 { "vfmadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6178 },
6179
592a252b 6180 /* PREFIX_VEX_0F38B9 */
c0f3af97 6181 {
592d1631
L
6182 { Bad_Opcode },
6183 { Bad_Opcode },
bf890a93 6184 { "vfmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6185 },
6186
592a252b 6187 /* PREFIX_VEX_0F38BA */
c0f3af97 6188 {
592d1631
L
6189 { Bad_Opcode },
6190 { Bad_Opcode },
bf890a93 6191 { "vfmsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6192 },
6193
592a252b 6194 /* PREFIX_VEX_0F38BB */
c0f3af97 6195 {
592d1631
L
6196 { Bad_Opcode },
6197 { Bad_Opcode },
bf890a93 6198 { "vfmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6199 },
6200
592a252b 6201 /* PREFIX_VEX_0F38BC */
c0f3af97 6202 {
592d1631
L
6203 { Bad_Opcode },
6204 { Bad_Opcode },
bf890a93 6205 { "vfnmadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6206 },
6207
592a252b 6208 /* PREFIX_VEX_0F38BD */
c0f3af97 6209 {
592d1631
L
6210 { Bad_Opcode },
6211 { Bad_Opcode },
bf890a93 6212 { "vfnmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6213 },
6214
592a252b 6215 /* PREFIX_VEX_0F38BE */
c0f3af97 6216 {
592d1631
L
6217 { Bad_Opcode },
6218 { Bad_Opcode },
bf890a93 6219 { "vfnmsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6220 },
6221
592a252b 6222 /* PREFIX_VEX_0F38BF */
c0f3af97 6223 {
592d1631
L
6224 { Bad_Opcode },
6225 { Bad_Opcode },
bf890a93 6226 { "vfnmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6227 },
6228
48521003
IT
6229 /* PREFIX_VEX_0F38CF */
6230 {
6231 { Bad_Opcode },
6232 { Bad_Opcode },
6233 { VEX_W_TABLE (VEX_W_0F38CF_P_2) },
6234 },
6235
592a252b 6236 /* PREFIX_VEX_0F38DB */
c0f3af97 6237 {
592d1631
L
6238 { Bad_Opcode },
6239 { Bad_Opcode },
592a252b 6240 { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2) },
c0f3af97
L
6241 },
6242
592a252b 6243 /* PREFIX_VEX_0F38DC */
c0f3af97 6244 {
592d1631
L
6245 { Bad_Opcode },
6246 { Bad_Opcode },
8dcf1fad 6247 { "vaesenc", { XM, Vex, EXx }, 0 },
c0f3af97
L
6248 },
6249
592a252b 6250 /* PREFIX_VEX_0F38DD */
c0f3af97 6251 {
592d1631
L
6252 { Bad_Opcode },
6253 { Bad_Opcode },
8dcf1fad 6254 { "vaesenclast", { XM, Vex, EXx }, 0 },
c0f3af97
L
6255 },
6256
592a252b 6257 /* PREFIX_VEX_0F38DE */
c0f3af97 6258 {
592d1631
L
6259 { Bad_Opcode },
6260 { Bad_Opcode },
8dcf1fad 6261 { "vaesdec", { XM, Vex, EXx }, 0 },
c0f3af97
L
6262 },
6263
592a252b 6264 /* PREFIX_VEX_0F38DF */
c0f3af97 6265 {
592d1631
L
6266 { Bad_Opcode },
6267 { Bad_Opcode },
8dcf1fad 6268 { "vaesdeclast", { XM, Vex, EXx }, 0 },
c0f3af97
L
6269 },
6270
f12dc422
L
6271 /* PREFIX_VEX_0F38F2 */
6272 {
6273 { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0) },
6274 },
6275
6276 /* PREFIX_VEX_0F38F3_REG_1 */
6277 {
6278 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0) },
6279 },
6280
6281 /* PREFIX_VEX_0F38F3_REG_2 */
6282 {
6283 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0) },
6284 },
6285
6286 /* PREFIX_VEX_0F38F3_REG_3 */
6287 {
6288 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0) },
6289 },
6290
6c30d220
L
6291 /* PREFIX_VEX_0F38F5 */
6292 {
6293 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_0) },
6294 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_1) },
6295 { Bad_Opcode },
6296 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_3) },
6297 },
6298
6299 /* PREFIX_VEX_0F38F6 */
6300 {
6301 { Bad_Opcode },
6302 { Bad_Opcode },
6303 { Bad_Opcode },
6304 { VEX_LEN_TABLE (VEX_LEN_0F38F6_P_3) },
6305 },
6306
f12dc422
L
6307 /* PREFIX_VEX_0F38F7 */
6308 {
6309 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0) },
6c30d220
L
6310 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_1) },
6311 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_2) },
6312 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_3) },
6313 },
6314
6315 /* PREFIX_VEX_0F3A00 */
6316 {
6317 { Bad_Opcode },
6318 { Bad_Opcode },
6319 { VEX_LEN_TABLE (VEX_LEN_0F3A00_P_2) },
6320 },
6321
6322 /* PREFIX_VEX_0F3A01 */
6323 {
6324 { Bad_Opcode },
6325 { Bad_Opcode },
6326 { VEX_LEN_TABLE (VEX_LEN_0F3A01_P_2) },
6327 },
6328
6329 /* PREFIX_VEX_0F3A02 */
6330 {
6331 { Bad_Opcode },
6332 { Bad_Opcode },
6333 { VEX_W_TABLE (VEX_W_0F3A02_P_2) },
f12dc422
L
6334 },
6335
592a252b 6336 /* PREFIX_VEX_0F3A04 */
c0f3af97 6337 {
592d1631
L
6338 { Bad_Opcode },
6339 { Bad_Opcode },
592a252b 6340 { VEX_W_TABLE (VEX_W_0F3A04_P_2) },
c0f3af97
L
6341 },
6342
592a252b 6343 /* PREFIX_VEX_0F3A05 */
c0f3af97 6344 {
592d1631
L
6345 { Bad_Opcode },
6346 { Bad_Opcode },
592a252b 6347 { VEX_W_TABLE (VEX_W_0F3A05_P_2) },
c0f3af97
L
6348 },
6349
592a252b 6350 /* PREFIX_VEX_0F3A06 */
c0f3af97 6351 {
592d1631
L
6352 { Bad_Opcode },
6353 { Bad_Opcode },
592a252b 6354 { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2) },
c0f3af97
L
6355 },
6356
592a252b 6357 /* PREFIX_VEX_0F3A08 */
c0f3af97 6358 {
592d1631
L
6359 { Bad_Opcode },
6360 { Bad_Opcode },
ec6f095a 6361 { "vroundps", { XM, EXx, Ib }, 0 },
c0f3af97
L
6362 },
6363
592a252b 6364 /* PREFIX_VEX_0F3A09 */
c0f3af97 6365 {
592d1631
L
6366 { Bad_Opcode },
6367 { Bad_Opcode },
ec6f095a 6368 { "vroundpd", { XM, EXx, Ib }, 0 },
c0f3af97
L
6369 },
6370
592a252b 6371 /* PREFIX_VEX_0F3A0A */
c0f3af97 6372 {
592d1631
L
6373 { Bad_Opcode },
6374 { Bad_Opcode },
ec6f095a 6375 { "vroundss", { XMScalar, VexScalar, EXdScalar, Ib }, 0 },
0bfee649
L
6376 },
6377
592a252b 6378 /* PREFIX_VEX_0F3A0B */
0bfee649 6379 {
592d1631
L
6380 { Bad_Opcode },
6381 { Bad_Opcode },
ec6f095a 6382 { "vroundsd", { XMScalar, VexScalar, EXqScalar, Ib }, 0 },
0bfee649
L
6383 },
6384
592a252b 6385 /* PREFIX_VEX_0F3A0C */
0bfee649 6386 {
592d1631
L
6387 { Bad_Opcode },
6388 { Bad_Opcode },
ec6f095a 6389 { "vblendps", { XM, Vex, EXx, Ib }, 0 },
0bfee649
L
6390 },
6391
592a252b 6392 /* PREFIX_VEX_0F3A0D */
0bfee649 6393 {
592d1631
L
6394 { Bad_Opcode },
6395 { Bad_Opcode },
ec6f095a 6396 { "vblendpd", { XM, Vex, EXx, Ib }, 0 },
c0f3af97
L
6397 },
6398
592a252b 6399 /* PREFIX_VEX_0F3A0E */
0bfee649 6400 {
592d1631
L
6401 { Bad_Opcode },
6402 { Bad_Opcode },
ec6f095a 6403 { "vpblendw", { XM, Vex, EXx, Ib }, 0 },
0bfee649
L
6404 },
6405
592a252b 6406 /* PREFIX_VEX_0F3A0F */
0bfee649 6407 {
592d1631
L
6408 { Bad_Opcode },
6409 { Bad_Opcode },
ec6f095a 6410 { "vpalignr", { XM, Vex, EXx, Ib }, 0 },
0bfee649
L
6411 },
6412
592a252b 6413 /* PREFIX_VEX_0F3A14 */
0bfee649 6414 {
592d1631
L
6415 { Bad_Opcode },
6416 { Bad_Opcode },
592a252b 6417 { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2) },
0bfee649
L
6418 },
6419
592a252b 6420 /* PREFIX_VEX_0F3A15 */
0bfee649 6421 {
592d1631
L
6422 { Bad_Opcode },
6423 { Bad_Opcode },
592a252b 6424 { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2) },
0bfee649
L
6425 },
6426
592a252b 6427 /* PREFIX_VEX_0F3A16 */
c0f3af97 6428 {
592d1631
L
6429 { Bad_Opcode },
6430 { Bad_Opcode },
592a252b 6431 { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2) },
c0f3af97
L
6432 },
6433
592a252b 6434 /* PREFIX_VEX_0F3A17 */
c0f3af97 6435 {
592d1631
L
6436 { Bad_Opcode },
6437 { Bad_Opcode },
592a252b 6438 { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2) },
c0f3af97
L
6439 },
6440
592a252b 6441 /* PREFIX_VEX_0F3A18 */
c0f3af97 6442 {
592d1631
L
6443 { Bad_Opcode },
6444 { Bad_Opcode },
592a252b 6445 { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2) },
c0f3af97
L
6446 },
6447
592a252b 6448 /* PREFIX_VEX_0F3A19 */
c0f3af97 6449 {
592d1631
L
6450 { Bad_Opcode },
6451 { Bad_Opcode },
592a252b 6452 { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2) },
c0f3af97
L
6453 },
6454
592a252b 6455 /* PREFIX_VEX_0F3A1D */
c7b8aa3a
L
6456 {
6457 { Bad_Opcode },
6458 { Bad_Opcode },
bf890a93 6459 { "vcvtps2ph", { EXxmmq, XM, Ib }, 0 },
c7b8aa3a
L
6460 },
6461
592a252b 6462 /* PREFIX_VEX_0F3A20 */
c0f3af97 6463 {
592d1631
L
6464 { Bad_Opcode },
6465 { Bad_Opcode },
592a252b 6466 { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2) },
c0f3af97
L
6467 },
6468
592a252b 6469 /* PREFIX_VEX_0F3A21 */
c0f3af97 6470 {
592d1631
L
6471 { Bad_Opcode },
6472 { Bad_Opcode },
592a252b 6473 { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2) },
c0f3af97
L
6474 },
6475
592a252b 6476 /* PREFIX_VEX_0F3A22 */
0bfee649 6477 {
592d1631
L
6478 { Bad_Opcode },
6479 { Bad_Opcode },
592a252b 6480 { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2) },
0bfee649
L
6481 },
6482
43234a1e
L
6483 /* PREFIX_VEX_0F3A30 */
6484 {
6485 { Bad_Opcode },
6486 { Bad_Opcode },
6487 { VEX_LEN_TABLE (VEX_LEN_0F3A30_P_2) },
6488 },
6489
1ba585e8
IT
6490 /* PREFIX_VEX_0F3A31 */
6491 {
6492 { Bad_Opcode },
6493 { Bad_Opcode },
6494 { VEX_LEN_TABLE (VEX_LEN_0F3A31_P_2) },
6495 },
6496
43234a1e
L
6497 /* PREFIX_VEX_0F3A32 */
6498 {
6499 { Bad_Opcode },
6500 { Bad_Opcode },
6501 { VEX_LEN_TABLE (VEX_LEN_0F3A32_P_2) },
6502 },
6503
1ba585e8
IT
6504 /* PREFIX_VEX_0F3A33 */
6505 {
6506 { Bad_Opcode },
6507 { Bad_Opcode },
6508 { VEX_LEN_TABLE (VEX_LEN_0F3A33_P_2) },
6509 },
6510
6c30d220
L
6511 /* PREFIX_VEX_0F3A38 */
6512 {
6513 { Bad_Opcode },
6514 { Bad_Opcode },
6515 { VEX_LEN_TABLE (VEX_LEN_0F3A38_P_2) },
6516 },
6517
6518 /* PREFIX_VEX_0F3A39 */
6519 {
6520 { Bad_Opcode },
6521 { Bad_Opcode },
6522 { VEX_LEN_TABLE (VEX_LEN_0F3A39_P_2) },
6523 },
6524
592a252b 6525 /* PREFIX_VEX_0F3A40 */
c0f3af97 6526 {
592d1631
L
6527 { Bad_Opcode },
6528 { Bad_Opcode },
ec6f095a 6529 { "vdpps", { XM, Vex, EXx, Ib }, 0 },
c0f3af97
L
6530 },
6531
592a252b 6532 /* PREFIX_VEX_0F3A41 */
c0f3af97 6533 {
592d1631
L
6534 { Bad_Opcode },
6535 { Bad_Opcode },
592a252b 6536 { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2) },
c0f3af97
L
6537 },
6538
592a252b 6539 /* PREFIX_VEX_0F3A42 */
c0f3af97 6540 {
592d1631
L
6541 { Bad_Opcode },
6542 { Bad_Opcode },
ec6f095a 6543 { "vmpsadbw", { XM, Vex, EXx, Ib }, 0 },
c0f3af97
L
6544 },
6545
592a252b 6546 /* PREFIX_VEX_0F3A44 */
ce2f5b3c 6547 {
592d1631
L
6548 { Bad_Opcode },
6549 { Bad_Opcode },
ff1982d5 6550 { "vpclmulqdq", { XM, Vex, EXx, PCLMUL }, 0 },
ce2f5b3c
L
6551 },
6552
6c30d220
L
6553 /* PREFIX_VEX_0F3A46 */
6554 {
6555 { Bad_Opcode },
6556 { Bad_Opcode },
6557 { VEX_LEN_TABLE (VEX_LEN_0F3A46_P_2) },
6558 },
6559
592a252b 6560 /* PREFIX_VEX_0F3A48 */
a683cc34
SP
6561 {
6562 { Bad_Opcode },
6563 { Bad_Opcode },
592a252b 6564 { VEX_W_TABLE (VEX_W_0F3A48_P_2) },
a683cc34
SP
6565 },
6566
592a252b 6567 /* PREFIX_VEX_0F3A49 */
a683cc34
SP
6568 {
6569 { Bad_Opcode },
6570 { Bad_Opcode },
592a252b 6571 { VEX_W_TABLE (VEX_W_0F3A49_P_2) },
a683cc34
SP
6572 },
6573
592a252b 6574 /* PREFIX_VEX_0F3A4A */
c0f3af97 6575 {
592d1631
L
6576 { Bad_Opcode },
6577 { Bad_Opcode },
592a252b 6578 { VEX_W_TABLE (VEX_W_0F3A4A_P_2) },
c0f3af97
L
6579 },
6580
592a252b 6581 /* PREFIX_VEX_0F3A4B */
c0f3af97 6582 {
592d1631
L
6583 { Bad_Opcode },
6584 { Bad_Opcode },
592a252b 6585 { VEX_W_TABLE (VEX_W_0F3A4B_P_2) },
c0f3af97
L
6586 },
6587
592a252b 6588 /* PREFIX_VEX_0F3A4C */
c0f3af97 6589 {
592d1631
L
6590 { Bad_Opcode },
6591 { Bad_Opcode },
6c30d220 6592 { VEX_W_TABLE (VEX_W_0F3A4C_P_2) },
c0f3af97
L
6593 },
6594
592a252b 6595 /* PREFIX_VEX_0F3A5C */
922d8de8 6596 {
592d1631
L
6597 { Bad_Opcode },
6598 { Bad_Opcode },
3a2430e0 6599 { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6600 },
6601
592a252b 6602 /* PREFIX_VEX_0F3A5D */
922d8de8 6603 {
592d1631
L
6604 { Bad_Opcode },
6605 { Bad_Opcode },
3a2430e0 6606 { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6607 },
6608
592a252b 6609 /* PREFIX_VEX_0F3A5E */
922d8de8 6610 {
592d1631
L
6611 { Bad_Opcode },
6612 { Bad_Opcode },
3a2430e0 6613 { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6614 },
6615
592a252b 6616 /* PREFIX_VEX_0F3A5F */
922d8de8 6617 {
592d1631
L
6618 { Bad_Opcode },
6619 { Bad_Opcode },
3a2430e0 6620 { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6621 },
6622
592a252b 6623 /* PREFIX_VEX_0F3A60 */
c0f3af97 6624 {
592d1631
L
6625 { Bad_Opcode },
6626 { Bad_Opcode },
592a252b 6627 { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2) },
592d1631 6628 { Bad_Opcode },
c0f3af97
L
6629 },
6630
592a252b 6631 /* PREFIX_VEX_0F3A61 */
c0f3af97 6632 {
592d1631
L
6633 { Bad_Opcode },
6634 { Bad_Opcode },
592a252b 6635 { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2) },
c0f3af97
L
6636 },
6637
592a252b 6638 /* PREFIX_VEX_0F3A62 */
c0f3af97 6639 {
592d1631
L
6640 { Bad_Opcode },
6641 { Bad_Opcode },
592a252b 6642 { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2) },
c0f3af97
L
6643 },
6644
592a252b 6645 /* PREFIX_VEX_0F3A63 */
c0f3af97 6646 {
592d1631
L
6647 { Bad_Opcode },
6648 { Bad_Opcode },
592a252b 6649 { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2) },
c0f3af97 6650 },
a5ff0eb2 6651
592a252b 6652 /* PREFIX_VEX_0F3A68 */
922d8de8 6653 {
592d1631
L
6654 { Bad_Opcode },
6655 { Bad_Opcode },
3a2430e0 6656 { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6657 },
6658
592a252b 6659 /* PREFIX_VEX_0F3A69 */
922d8de8 6660 {
592d1631
L
6661 { Bad_Opcode },
6662 { Bad_Opcode },
3a2430e0 6663 { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6664 },
6665
592a252b 6666 /* PREFIX_VEX_0F3A6A */
922d8de8 6667 {
592d1631
L
6668 { Bad_Opcode },
6669 { Bad_Opcode },
592a252b 6670 { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2) },
922d8de8
DR
6671 },
6672
592a252b 6673 /* PREFIX_VEX_0F3A6B */
922d8de8 6674 {
592d1631
L
6675 { Bad_Opcode },
6676 { Bad_Opcode },
592a252b 6677 { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2) },
922d8de8
DR
6678 },
6679
592a252b 6680 /* PREFIX_VEX_0F3A6C */
922d8de8 6681 {
592d1631
L
6682 { Bad_Opcode },
6683 { Bad_Opcode },
3a2430e0 6684 { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6685 },
6686
592a252b 6687 /* PREFIX_VEX_0F3A6D */
922d8de8 6688 {
592d1631
L
6689 { Bad_Opcode },
6690 { Bad_Opcode },
3a2430e0 6691 { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6692 },
6693
592a252b 6694 /* PREFIX_VEX_0F3A6E */
922d8de8 6695 {
592d1631
L
6696 { Bad_Opcode },
6697 { Bad_Opcode },
592a252b 6698 { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2) },
922d8de8
DR
6699 },
6700
592a252b 6701 /* PREFIX_VEX_0F3A6F */
922d8de8 6702 {
592d1631
L
6703 { Bad_Opcode },
6704 { Bad_Opcode },
592a252b 6705 { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2) },
922d8de8
DR
6706 },
6707
592a252b 6708 /* PREFIX_VEX_0F3A78 */
922d8de8 6709 {
592d1631
L
6710 { Bad_Opcode },
6711 { Bad_Opcode },
3a2430e0 6712 { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6713 },
6714
592a252b 6715 /* PREFIX_VEX_0F3A79 */
922d8de8 6716 {
592d1631
L
6717 { Bad_Opcode },
6718 { Bad_Opcode },
3a2430e0 6719 { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6720 },
6721
592a252b 6722 /* PREFIX_VEX_0F3A7A */
922d8de8 6723 {
592d1631
L
6724 { Bad_Opcode },
6725 { Bad_Opcode },
592a252b 6726 { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2) },
922d8de8
DR
6727 },
6728
592a252b 6729 /* PREFIX_VEX_0F3A7B */
922d8de8 6730 {
592d1631
L
6731 { Bad_Opcode },
6732 { Bad_Opcode },
592a252b 6733 { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2) },
922d8de8
DR
6734 },
6735
592a252b 6736 /* PREFIX_VEX_0F3A7C */
922d8de8 6737 {
592d1631
L
6738 { Bad_Opcode },
6739 { Bad_Opcode },
3a2430e0 6740 { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
592d1631 6741 { Bad_Opcode },
922d8de8
DR
6742 },
6743
592a252b 6744 /* PREFIX_VEX_0F3A7D */
922d8de8 6745 {
592d1631
L
6746 { Bad_Opcode },
6747 { Bad_Opcode },
3a2430e0 6748 { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
922d8de8
DR
6749 },
6750
592a252b 6751 /* PREFIX_VEX_0F3A7E */
922d8de8 6752 {
592d1631
L
6753 { Bad_Opcode },
6754 { Bad_Opcode },
592a252b 6755 { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2) },
922d8de8
DR
6756 },
6757
592a252b 6758 /* PREFIX_VEX_0F3A7F */
922d8de8 6759 {
592d1631
L
6760 { Bad_Opcode },
6761 { Bad_Opcode },
592a252b 6762 { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2) },
922d8de8
DR
6763 },
6764
48521003
IT
6765 /* PREFIX_VEX_0F3ACE */
6766 {
6767 { Bad_Opcode },
6768 { Bad_Opcode },
6769 { VEX_W_TABLE (VEX_W_0F3ACE_P_2) },
6770 },
6771
6772 /* PREFIX_VEX_0F3ACF */
6773 {
6774 { Bad_Opcode },
6775 { Bad_Opcode },
6776 { VEX_W_TABLE (VEX_W_0F3ACF_P_2) },
6777 },
6778
592a252b 6779 /* PREFIX_VEX_0F3ADF */
a5ff0eb2 6780 {
592d1631
L
6781 { Bad_Opcode },
6782 { Bad_Opcode },
592a252b 6783 { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2) },
a5ff0eb2 6784 },
6c30d220
L
6785
6786 /* PREFIX_VEX_0F3AF0 */
6787 {
6788 { Bad_Opcode },
6789 { Bad_Opcode },
6790 { Bad_Opcode },
6791 { VEX_LEN_TABLE (VEX_LEN_0F3AF0_P_3) },
6792 },
43234a1e 6793
ad692897 6794#include "i386-dis-evex-prefix.h"
c0f3af97
L
6795};
6796
6797static const struct dis386 x86_64_table[][2] = {
6798 /* X86_64_06 */
6799 {
bf890a93 6800 { "pushP", { es }, 0 },
c0f3af97
L
6801 },
6802
6803 /* X86_64_07 */
6804 {
bf890a93 6805 { "popP", { es }, 0 },
c0f3af97
L
6806 },
6807
6808 /* X86_64_0D */
6809 {
bf890a93 6810 { "pushP", { cs }, 0 },
c0f3af97
L
6811 },
6812
6813 /* X86_64_16 */
6814 {
bf890a93 6815 { "pushP", { ss }, 0 },
c0f3af97
L
6816 },
6817
6818 /* X86_64_17 */
6819 {
bf890a93 6820 { "popP", { ss }, 0 },
c0f3af97
L
6821 },
6822
6823 /* X86_64_1E */
6824 {
bf890a93 6825 { "pushP", { ds }, 0 },
c0f3af97
L
6826 },
6827
6828 /* X86_64_1F */
6829 {
bf890a93 6830 { "popP", { ds }, 0 },
c0f3af97
L
6831 },
6832
6833 /* X86_64_27 */
6834 {
bf890a93 6835 { "daa", { XX }, 0 },
c0f3af97
L
6836 },
6837
6838 /* X86_64_2F */
6839 {
bf890a93 6840 { "das", { XX }, 0 },
c0f3af97
L
6841 },
6842
6843 /* X86_64_37 */
6844 {
bf890a93 6845 { "aaa", { XX }, 0 },
c0f3af97
L
6846 },
6847
6848 /* X86_64_3F */
6849 {
bf890a93 6850 { "aas", { XX }, 0 },
c0f3af97
L
6851 },
6852
6853 /* X86_64_60 */
6854 {
bf890a93 6855 { "pushaP", { XX }, 0 },
c0f3af97
L
6856 },
6857
6858 /* X86_64_61 */
6859 {
bf890a93 6860 { "popaP", { XX }, 0 },
c0f3af97
L
6861 },
6862
6863 /* X86_64_62 */
6864 {
6865 { MOD_TABLE (MOD_62_32BIT) },
43234a1e 6866 { EVEX_TABLE (EVEX_0F) },
c0f3af97
L
6867 },
6868
6869 /* X86_64_63 */
6870 {
bf890a93
IT
6871 { "arpl", { Ew, Gw }, 0 },
6872 { "movs{lq|xd}", { Gv, Ed }, 0 },
c0f3af97
L
6873 },
6874
6875 /* X86_64_6D */
6876 {
bf890a93
IT
6877 { "ins{R|}", { Yzr, indirDX }, 0 },
6878 { "ins{G|}", { Yzr, indirDX }, 0 },
c0f3af97
L
6879 },
6880
6881 /* X86_64_6F */
6882 {
bf890a93
IT
6883 { "outs{R|}", { indirDXr, Xz }, 0 },
6884 { "outs{G|}", { indirDXr, Xz }, 0 },
c0f3af97
L
6885 },
6886
d039fef3 6887 /* X86_64_82 */
8b89fe14 6888 {
de194d85 6889 /* Opcode 0x82 is an alias of opcode 0x80 in 32-bit mode. */
d039fef3 6890 { REG_TABLE (REG_80) },
8b89fe14
L
6891 },
6892
c0f3af97
L
6893 /* X86_64_9A */
6894 {
bf890a93 6895 { "Jcall{T|}", { Ap }, 0 },
c0f3af97
L
6896 },
6897
6898 /* X86_64_C4 */
6899 {
6900 { MOD_TABLE (MOD_C4_32BIT) },
6901 { VEX_C4_TABLE (VEX_0F) },
6902 },
6903
6904 /* X86_64_C5 */
6905 {
6906 { MOD_TABLE (MOD_C5_32BIT) },
6907 { VEX_C5_TABLE (VEX_0F) },
6908 },
6909
6910 /* X86_64_CE */
6911 {
bf890a93 6912 { "into", { XX }, 0 },
c0f3af97
L
6913 },
6914
6915 /* X86_64_D4 */
6916 {
bf890a93 6917 { "aam", { Ib }, 0 },
c0f3af97
L
6918 },
6919
6920 /* X86_64_D5 */
6921 {
bf890a93 6922 { "aad", { Ib }, 0 },
c0f3af97
L
6923 },
6924
a72d2af2
L
6925 /* X86_64_E8 */
6926 {
6927 { "callP", { Jv, BND }, 0 },
5db04b09 6928 { "call@", { Jv, BND }, 0 }
a72d2af2
L
6929 },
6930
6931 /* X86_64_E9 */
6932 {
6933 { "jmpP", { Jv, BND }, 0 },
5db04b09 6934 { "jmp@", { Jv, BND }, 0 }
a72d2af2
L
6935 },
6936
c0f3af97
L
6937 /* X86_64_EA */
6938 {
bf890a93 6939 { "Jjmp{T|}", { Ap }, 0 },
c0f3af97
L
6940 },
6941
6942 /* X86_64_0F01_REG_0 */
6943 {
bf890a93
IT
6944 { "sgdt{Q|IQ}", { M }, 0 },
6945 { "sgdt", { M }, 0 },
c0f3af97
L
6946 },
6947
6948 /* X86_64_0F01_REG_1 */
6949 {
bf890a93
IT
6950 { "sidt{Q|IQ}", { M }, 0 },
6951 { "sidt", { M }, 0 },
c0f3af97
L
6952 },
6953
6954 /* X86_64_0F01_REG_2 */
6955 {
bf890a93
IT
6956 { "lgdt{Q|Q}", { M }, 0 },
6957 { "lgdt", { M }, 0 },
c0f3af97
L
6958 },
6959
6960 /* X86_64_0F01_REG_3 */
6961 {
bf890a93
IT
6962 { "lidt{Q|Q}", { M }, 0 },
6963 { "lidt", { M }, 0 },
c0f3af97
L
6964 },
6965};
6966
6967static const struct dis386 three_byte_table[][256] = {
c1e679ec
DR
6968
6969 /* THREE_BYTE_0F38 */
c0f3af97
L
6970 {
6971 /* 00 */
507bd325
L
6972 { "pshufb", { MX, EM }, PREFIX_OPCODE },
6973 { "phaddw", { MX, EM }, PREFIX_OPCODE },
6974 { "phaddd", { MX, EM }, PREFIX_OPCODE },
6975 { "phaddsw", { MX, EM }, PREFIX_OPCODE },
6976 { "pmaddubsw", { MX, EM }, PREFIX_OPCODE },
6977 { "phsubw", { MX, EM }, PREFIX_OPCODE },
6978 { "phsubd", { MX, EM }, PREFIX_OPCODE },
6979 { "phsubsw", { MX, EM }, PREFIX_OPCODE },
c0f3af97 6980 /* 08 */
507bd325
L
6981 { "psignb", { MX, EM }, PREFIX_OPCODE },
6982 { "psignw", { MX, EM }, PREFIX_OPCODE },
6983 { "psignd", { MX, EM }, PREFIX_OPCODE },
6984 { "pmulhrsw", { MX, EM }, PREFIX_OPCODE },
592d1631
L
6985 { Bad_Opcode },
6986 { Bad_Opcode },
6987 { Bad_Opcode },
6988 { Bad_Opcode },
f88c9eb0
SP
6989 /* 10 */
6990 { PREFIX_TABLE (PREFIX_0F3810) },
592d1631
L
6991 { Bad_Opcode },
6992 { Bad_Opcode },
6993 { Bad_Opcode },
f88c9eb0
SP
6994 { PREFIX_TABLE (PREFIX_0F3814) },
6995 { PREFIX_TABLE (PREFIX_0F3815) },
592d1631 6996 { Bad_Opcode },
f88c9eb0
SP
6997 { PREFIX_TABLE (PREFIX_0F3817) },
6998 /* 18 */
592d1631
L
6999 { Bad_Opcode },
7000 { Bad_Opcode },
7001 { Bad_Opcode },
7002 { Bad_Opcode },
507bd325
L
7003 { "pabsb", { MX, EM }, PREFIX_OPCODE },
7004 { "pabsw", { MX, EM }, PREFIX_OPCODE },
7005 { "pabsd", { MX, EM }, PREFIX_OPCODE },
592d1631 7006 { Bad_Opcode },
f88c9eb0
SP
7007 /* 20 */
7008 { PREFIX_TABLE (PREFIX_0F3820) },
7009 { PREFIX_TABLE (PREFIX_0F3821) },
7010 { PREFIX_TABLE (PREFIX_0F3822) },
7011 { PREFIX_TABLE (PREFIX_0F3823) },
7012 { PREFIX_TABLE (PREFIX_0F3824) },
7013 { PREFIX_TABLE (PREFIX_0F3825) },
592d1631
L
7014 { Bad_Opcode },
7015 { Bad_Opcode },
f88c9eb0
SP
7016 /* 28 */
7017 { PREFIX_TABLE (PREFIX_0F3828) },
7018 { PREFIX_TABLE (PREFIX_0F3829) },
7019 { PREFIX_TABLE (PREFIX_0F382A) },
7020 { PREFIX_TABLE (PREFIX_0F382B) },
592d1631
L
7021 { Bad_Opcode },
7022 { Bad_Opcode },
7023 { Bad_Opcode },
7024 { Bad_Opcode },
f88c9eb0
SP
7025 /* 30 */
7026 { PREFIX_TABLE (PREFIX_0F3830) },
7027 { PREFIX_TABLE (PREFIX_0F3831) },
7028 { PREFIX_TABLE (PREFIX_0F3832) },
7029 { PREFIX_TABLE (PREFIX_0F3833) },
7030 { PREFIX_TABLE (PREFIX_0F3834) },
7031 { PREFIX_TABLE (PREFIX_0F3835) },
592d1631 7032 { Bad_Opcode },
f88c9eb0
SP
7033 { PREFIX_TABLE (PREFIX_0F3837) },
7034 /* 38 */
7035 { PREFIX_TABLE (PREFIX_0F3838) },
7036 { PREFIX_TABLE (PREFIX_0F3839) },
7037 { PREFIX_TABLE (PREFIX_0F383A) },
7038 { PREFIX_TABLE (PREFIX_0F383B) },
7039 { PREFIX_TABLE (PREFIX_0F383C) },
7040 { PREFIX_TABLE (PREFIX_0F383D) },
7041 { PREFIX_TABLE (PREFIX_0F383E) },
7042 { PREFIX_TABLE (PREFIX_0F383F) },
7043 /* 40 */
7044 { PREFIX_TABLE (PREFIX_0F3840) },
7045 { PREFIX_TABLE (PREFIX_0F3841) },
592d1631
L
7046 { Bad_Opcode },
7047 { Bad_Opcode },
7048 { Bad_Opcode },
7049 { Bad_Opcode },
7050 { Bad_Opcode },
7051 { Bad_Opcode },
f88c9eb0 7052 /* 48 */
592d1631
L
7053 { Bad_Opcode },
7054 { Bad_Opcode },
7055 { Bad_Opcode },
7056 { Bad_Opcode },
7057 { Bad_Opcode },
7058 { Bad_Opcode },
7059 { Bad_Opcode },
7060 { Bad_Opcode },
f88c9eb0 7061 /* 50 */
592d1631
L
7062 { Bad_Opcode },
7063 { Bad_Opcode },
7064 { Bad_Opcode },
7065 { Bad_Opcode },
7066 { Bad_Opcode },
7067 { Bad_Opcode },
7068 { Bad_Opcode },
7069 { Bad_Opcode },
f88c9eb0 7070 /* 58 */
592d1631
L
7071 { Bad_Opcode },
7072 { Bad_Opcode },
7073 { Bad_Opcode },
7074 { Bad_Opcode },
7075 { Bad_Opcode },
7076 { Bad_Opcode },
7077 { Bad_Opcode },
7078 { Bad_Opcode },
f88c9eb0 7079 /* 60 */
592d1631
L
7080 { Bad_Opcode },
7081 { Bad_Opcode },
7082 { Bad_Opcode },
7083 { Bad_Opcode },
7084 { Bad_Opcode },
7085 { Bad_Opcode },
7086 { Bad_Opcode },
7087 { Bad_Opcode },
f88c9eb0 7088 /* 68 */
592d1631
L
7089 { Bad_Opcode },
7090 { Bad_Opcode },
7091 { Bad_Opcode },
7092 { Bad_Opcode },
7093 { Bad_Opcode },
7094 { Bad_Opcode },
7095 { Bad_Opcode },
7096 { Bad_Opcode },
f88c9eb0 7097 /* 70 */
592d1631
L
7098 { Bad_Opcode },
7099 { Bad_Opcode },
7100 { Bad_Opcode },
7101 { Bad_Opcode },
7102 { Bad_Opcode },
7103 { Bad_Opcode },
7104 { Bad_Opcode },
7105 { Bad_Opcode },
f88c9eb0 7106 /* 78 */
592d1631
L
7107 { Bad_Opcode },
7108 { Bad_Opcode },
7109 { Bad_Opcode },
7110 { Bad_Opcode },
7111 { Bad_Opcode },
7112 { Bad_Opcode },
7113 { Bad_Opcode },
7114 { Bad_Opcode },
f88c9eb0
SP
7115 /* 80 */
7116 { PREFIX_TABLE (PREFIX_0F3880) },
7117 { PREFIX_TABLE (PREFIX_0F3881) },
6c30d220 7118 { PREFIX_TABLE (PREFIX_0F3882) },
592d1631
L
7119 { Bad_Opcode },
7120 { Bad_Opcode },
7121 { Bad_Opcode },
7122 { Bad_Opcode },
7123 { Bad_Opcode },
f88c9eb0 7124 /* 88 */
592d1631
L
7125 { Bad_Opcode },
7126 { Bad_Opcode },
7127 { Bad_Opcode },
7128 { Bad_Opcode },
7129 { Bad_Opcode },
7130 { Bad_Opcode },
7131 { Bad_Opcode },
7132 { Bad_Opcode },
f88c9eb0 7133 /* 90 */
592d1631
L
7134 { Bad_Opcode },
7135 { Bad_Opcode },
7136 { Bad_Opcode },
7137 { Bad_Opcode },
7138 { Bad_Opcode },
7139 { Bad_Opcode },
7140 { Bad_Opcode },
7141 { Bad_Opcode },
f88c9eb0 7142 /* 98 */
592d1631
L
7143 { Bad_Opcode },
7144 { Bad_Opcode },
7145 { Bad_Opcode },
7146 { Bad_Opcode },
7147 { Bad_Opcode },
7148 { Bad_Opcode },
7149 { Bad_Opcode },
7150 { Bad_Opcode },
f88c9eb0 7151 /* a0 */
592d1631
L
7152 { Bad_Opcode },
7153 { Bad_Opcode },
7154 { Bad_Opcode },
7155 { Bad_Opcode },
7156 { Bad_Opcode },
7157 { Bad_Opcode },
7158 { Bad_Opcode },
7159 { Bad_Opcode },
f88c9eb0 7160 /* a8 */
592d1631
L
7161 { Bad_Opcode },
7162 { Bad_Opcode },
7163 { Bad_Opcode },
7164 { Bad_Opcode },
7165 { Bad_Opcode },
7166 { Bad_Opcode },
7167 { Bad_Opcode },
7168 { Bad_Opcode },
f88c9eb0 7169 /* b0 */
592d1631
L
7170 { Bad_Opcode },
7171 { Bad_Opcode },
7172 { Bad_Opcode },
7173 { Bad_Opcode },
7174 { Bad_Opcode },
7175 { Bad_Opcode },
7176 { Bad_Opcode },
7177 { Bad_Opcode },
f88c9eb0 7178 /* b8 */
592d1631
L
7179 { Bad_Opcode },
7180 { Bad_Opcode },
7181 { Bad_Opcode },
7182 { Bad_Opcode },
7183 { Bad_Opcode },
7184 { Bad_Opcode },
7185 { Bad_Opcode },
7186 { Bad_Opcode },
f88c9eb0 7187 /* c0 */
592d1631
L
7188 { Bad_Opcode },
7189 { Bad_Opcode },
7190 { Bad_Opcode },
7191 { Bad_Opcode },
7192 { Bad_Opcode },
7193 { Bad_Opcode },
7194 { Bad_Opcode },
7195 { Bad_Opcode },
f88c9eb0 7196 /* c8 */
a0046408
L
7197 { PREFIX_TABLE (PREFIX_0F38C8) },
7198 { PREFIX_TABLE (PREFIX_0F38C9) },
7199 { PREFIX_TABLE (PREFIX_0F38CA) },
7200 { PREFIX_TABLE (PREFIX_0F38CB) },
7201 { PREFIX_TABLE (PREFIX_0F38CC) },
7202 { PREFIX_TABLE (PREFIX_0F38CD) },
592d1631 7203 { Bad_Opcode },
48521003 7204 { PREFIX_TABLE (PREFIX_0F38CF) },
f88c9eb0 7205 /* d0 */
592d1631
L
7206 { Bad_Opcode },
7207 { Bad_Opcode },
7208 { Bad_Opcode },
7209 { Bad_Opcode },
7210 { Bad_Opcode },
7211 { Bad_Opcode },
7212 { Bad_Opcode },
7213 { Bad_Opcode },
f88c9eb0 7214 /* d8 */
592d1631
L
7215 { Bad_Opcode },
7216 { Bad_Opcode },
7217 { Bad_Opcode },
f88c9eb0
SP
7218 { PREFIX_TABLE (PREFIX_0F38DB) },
7219 { PREFIX_TABLE (PREFIX_0F38DC) },
7220 { PREFIX_TABLE (PREFIX_0F38DD) },
7221 { PREFIX_TABLE (PREFIX_0F38DE) },
7222 { PREFIX_TABLE (PREFIX_0F38DF) },
7223 /* e0 */
592d1631
L
7224 { Bad_Opcode },
7225 { Bad_Opcode },
7226 { Bad_Opcode },
7227 { Bad_Opcode },
7228 { Bad_Opcode },
7229 { Bad_Opcode },
7230 { Bad_Opcode },
7231 { Bad_Opcode },
f88c9eb0 7232 /* e8 */
592d1631
L
7233 { Bad_Opcode },
7234 { Bad_Opcode },
7235 { Bad_Opcode },
7236 { Bad_Opcode },
7237 { Bad_Opcode },
7238 { Bad_Opcode },
7239 { Bad_Opcode },
7240 { Bad_Opcode },
f88c9eb0
SP
7241 /* f0 */
7242 { PREFIX_TABLE (PREFIX_0F38F0) },
7243 { PREFIX_TABLE (PREFIX_0F38F1) },
592d1631
L
7244 { Bad_Opcode },
7245 { Bad_Opcode },
7246 { Bad_Opcode },
603555e5 7247 { PREFIX_TABLE (PREFIX_0F38F5) },
e2e1fcde 7248 { PREFIX_TABLE (PREFIX_0F38F6) },
592d1631 7249 { Bad_Opcode },
f88c9eb0 7250 /* f8 */
c0a30a9f
L
7251 { PREFIX_TABLE (PREFIX_0F38F8) },
7252 { PREFIX_TABLE (PREFIX_0F38F9) },
592d1631
L
7253 { Bad_Opcode },
7254 { Bad_Opcode },
7255 { Bad_Opcode },
7256 { Bad_Opcode },
7257 { Bad_Opcode },
7258 { Bad_Opcode },
f88c9eb0
SP
7259 },
7260 /* THREE_BYTE_0F3A */
7261 {
7262 /* 00 */
592d1631
L
7263 { Bad_Opcode },
7264 { Bad_Opcode },
7265 { Bad_Opcode },
7266 { Bad_Opcode },
7267 { Bad_Opcode },
7268 { Bad_Opcode },
7269 { Bad_Opcode },
7270 { Bad_Opcode },
f88c9eb0
SP
7271 /* 08 */
7272 { PREFIX_TABLE (PREFIX_0F3A08) },
7273 { PREFIX_TABLE (PREFIX_0F3A09) },
7274 { PREFIX_TABLE (PREFIX_0F3A0A) },
7275 { PREFIX_TABLE (PREFIX_0F3A0B) },
7276 { PREFIX_TABLE (PREFIX_0F3A0C) },
7277 { PREFIX_TABLE (PREFIX_0F3A0D) },
7278 { PREFIX_TABLE (PREFIX_0F3A0E) },
507bd325 7279 { "palignr", { MX, EM, Ib }, PREFIX_OPCODE },
f88c9eb0 7280 /* 10 */
592d1631
L
7281 { Bad_Opcode },
7282 { Bad_Opcode },
7283 { Bad_Opcode },
7284 { Bad_Opcode },
f88c9eb0
SP
7285 { PREFIX_TABLE (PREFIX_0F3A14) },
7286 { PREFIX_TABLE (PREFIX_0F3A15) },
7287 { PREFIX_TABLE (PREFIX_0F3A16) },
7288 { PREFIX_TABLE (PREFIX_0F3A17) },
7289 /* 18 */
592d1631
L
7290 { Bad_Opcode },
7291 { Bad_Opcode },
7292 { Bad_Opcode },
7293 { Bad_Opcode },
7294 { Bad_Opcode },
7295 { Bad_Opcode },
7296 { Bad_Opcode },
7297 { Bad_Opcode },
f88c9eb0
SP
7298 /* 20 */
7299 { PREFIX_TABLE (PREFIX_0F3A20) },
7300 { PREFIX_TABLE (PREFIX_0F3A21) },
7301 { PREFIX_TABLE (PREFIX_0F3A22) },
592d1631
L
7302 { Bad_Opcode },
7303 { Bad_Opcode },
7304 { Bad_Opcode },
7305 { Bad_Opcode },
7306 { Bad_Opcode },
f88c9eb0 7307 /* 28 */
592d1631
L
7308 { Bad_Opcode },
7309 { Bad_Opcode },
7310 { Bad_Opcode },
7311 { Bad_Opcode },
7312 { Bad_Opcode },
7313 { Bad_Opcode },
7314 { Bad_Opcode },
7315 { Bad_Opcode },
f88c9eb0 7316 /* 30 */
592d1631
L
7317 { Bad_Opcode },
7318 { Bad_Opcode },
7319 { Bad_Opcode },
7320 { Bad_Opcode },
7321 { Bad_Opcode },
7322 { Bad_Opcode },
7323 { Bad_Opcode },
7324 { Bad_Opcode },
f88c9eb0 7325 /* 38 */
592d1631
L
7326 { Bad_Opcode },
7327 { Bad_Opcode },
7328 { Bad_Opcode },
7329 { Bad_Opcode },
7330 { Bad_Opcode },
7331 { Bad_Opcode },
7332 { Bad_Opcode },
7333 { Bad_Opcode },
f88c9eb0
SP
7334 /* 40 */
7335 { PREFIX_TABLE (PREFIX_0F3A40) },
7336 { PREFIX_TABLE (PREFIX_0F3A41) },
7337 { PREFIX_TABLE (PREFIX_0F3A42) },
592d1631 7338 { Bad_Opcode },
f88c9eb0 7339 { PREFIX_TABLE (PREFIX_0F3A44) },
592d1631
L
7340 { Bad_Opcode },
7341 { Bad_Opcode },
7342 { Bad_Opcode },
f88c9eb0 7343 /* 48 */
592d1631
L
7344 { Bad_Opcode },
7345 { Bad_Opcode },
7346 { Bad_Opcode },
7347 { Bad_Opcode },
7348 { Bad_Opcode },
7349 { Bad_Opcode },
7350 { Bad_Opcode },
7351 { Bad_Opcode },
f88c9eb0 7352 /* 50 */
592d1631
L
7353 { Bad_Opcode },
7354 { Bad_Opcode },
7355 { Bad_Opcode },
7356 { Bad_Opcode },
7357 { Bad_Opcode },
7358 { Bad_Opcode },
7359 { Bad_Opcode },
7360 { Bad_Opcode },
f88c9eb0 7361 /* 58 */
592d1631
L
7362 { Bad_Opcode },
7363 { Bad_Opcode },
7364 { Bad_Opcode },
7365 { Bad_Opcode },
7366 { Bad_Opcode },
7367 { Bad_Opcode },
7368 { Bad_Opcode },
7369 { Bad_Opcode },
f88c9eb0
SP
7370 /* 60 */
7371 { PREFIX_TABLE (PREFIX_0F3A60) },
7372 { PREFIX_TABLE (PREFIX_0F3A61) },
7373 { PREFIX_TABLE (PREFIX_0F3A62) },
7374 { PREFIX_TABLE (PREFIX_0F3A63) },
592d1631
L
7375 { Bad_Opcode },
7376 { Bad_Opcode },
7377 { Bad_Opcode },
7378 { Bad_Opcode },
f88c9eb0 7379 /* 68 */
592d1631
L
7380 { Bad_Opcode },
7381 { Bad_Opcode },
7382 { Bad_Opcode },
7383 { Bad_Opcode },
7384 { Bad_Opcode },
7385 { Bad_Opcode },
7386 { Bad_Opcode },
7387 { Bad_Opcode },
f88c9eb0 7388 /* 70 */
592d1631
L
7389 { Bad_Opcode },
7390 { Bad_Opcode },
7391 { Bad_Opcode },
7392 { Bad_Opcode },
7393 { Bad_Opcode },
7394 { Bad_Opcode },
7395 { Bad_Opcode },
7396 { Bad_Opcode },
f88c9eb0 7397 /* 78 */
592d1631
L
7398 { Bad_Opcode },
7399 { Bad_Opcode },
7400 { Bad_Opcode },
7401 { Bad_Opcode },
7402 { Bad_Opcode },
7403 { Bad_Opcode },
7404 { Bad_Opcode },
7405 { Bad_Opcode },
f88c9eb0 7406 /* 80 */
592d1631
L
7407 { Bad_Opcode },
7408 { Bad_Opcode },
7409 { Bad_Opcode },
7410 { Bad_Opcode },
7411 { Bad_Opcode },
7412 { Bad_Opcode },
7413 { Bad_Opcode },
7414 { Bad_Opcode },
f88c9eb0 7415 /* 88 */
592d1631
L
7416 { Bad_Opcode },
7417 { Bad_Opcode },
7418 { Bad_Opcode },
7419 { Bad_Opcode },
7420 { Bad_Opcode },
7421 { Bad_Opcode },
7422 { Bad_Opcode },
7423 { Bad_Opcode },
f88c9eb0 7424 /* 90 */
592d1631
L
7425 { Bad_Opcode },
7426 { Bad_Opcode },
7427 { Bad_Opcode },
7428 { Bad_Opcode },
7429 { Bad_Opcode },
7430 { Bad_Opcode },
7431 { Bad_Opcode },
7432 { Bad_Opcode },
f88c9eb0 7433 /* 98 */
592d1631
L
7434 { Bad_Opcode },
7435 { Bad_Opcode },
7436 { Bad_Opcode },
7437 { Bad_Opcode },
7438 { Bad_Opcode },
7439 { Bad_Opcode },
7440 { Bad_Opcode },
7441 { Bad_Opcode },
f88c9eb0 7442 /* a0 */
592d1631
L
7443 { Bad_Opcode },
7444 { Bad_Opcode },
7445 { Bad_Opcode },
7446 { Bad_Opcode },
7447 { Bad_Opcode },
7448 { Bad_Opcode },
7449 { Bad_Opcode },
7450 { Bad_Opcode },
f88c9eb0 7451 /* a8 */
592d1631
L
7452 { Bad_Opcode },
7453 { Bad_Opcode },
7454 { Bad_Opcode },
7455 { Bad_Opcode },
7456 { Bad_Opcode },
7457 { Bad_Opcode },
7458 { Bad_Opcode },
7459 { Bad_Opcode },
f88c9eb0 7460 /* b0 */
592d1631
L
7461 { Bad_Opcode },
7462 { Bad_Opcode },
7463 { Bad_Opcode },
7464 { Bad_Opcode },
7465 { Bad_Opcode },
7466 { Bad_Opcode },
7467 { Bad_Opcode },
7468 { Bad_Opcode },
f88c9eb0 7469 /* b8 */
592d1631
L
7470 { Bad_Opcode },
7471 { Bad_Opcode },
7472 { Bad_Opcode },
7473 { Bad_Opcode },
7474 { Bad_Opcode },
7475 { Bad_Opcode },
7476 { Bad_Opcode },
7477 { Bad_Opcode },
f88c9eb0 7478 /* c0 */
592d1631
L
7479 { Bad_Opcode },
7480 { Bad_Opcode },
7481 { Bad_Opcode },
7482 { Bad_Opcode },
7483 { Bad_Opcode },
7484 { Bad_Opcode },
7485 { Bad_Opcode },
7486 { Bad_Opcode },
f88c9eb0 7487 /* c8 */
592d1631
L
7488 { Bad_Opcode },
7489 { Bad_Opcode },
7490 { Bad_Opcode },
7491 { Bad_Opcode },
a0046408 7492 { PREFIX_TABLE (PREFIX_0F3ACC) },
592d1631 7493 { Bad_Opcode },
48521003
IT
7494 { PREFIX_TABLE (PREFIX_0F3ACE) },
7495 { PREFIX_TABLE (PREFIX_0F3ACF) },
f88c9eb0 7496 /* d0 */
592d1631
L
7497 { Bad_Opcode },
7498 { Bad_Opcode },
7499 { Bad_Opcode },
7500 { Bad_Opcode },
7501 { Bad_Opcode },
7502 { Bad_Opcode },
7503 { Bad_Opcode },
7504 { Bad_Opcode },
f88c9eb0 7505 /* d8 */
592d1631
L
7506 { Bad_Opcode },
7507 { Bad_Opcode },
7508 { Bad_Opcode },
7509 { Bad_Opcode },
7510 { Bad_Opcode },
7511 { Bad_Opcode },
7512 { Bad_Opcode },
f88c9eb0
SP
7513 { PREFIX_TABLE (PREFIX_0F3ADF) },
7514 /* e0 */
592d1631
L
7515 { Bad_Opcode },
7516 { Bad_Opcode },
7517 { Bad_Opcode },
7518 { Bad_Opcode },
7519 { Bad_Opcode },
592d1631
L
7520 { Bad_Opcode },
7521 { Bad_Opcode },
7522 { Bad_Opcode },
85f10a01 7523 /* e8 */
592d1631
L
7524 { Bad_Opcode },
7525 { Bad_Opcode },
7526 { Bad_Opcode },
7527 { Bad_Opcode },
7528 { Bad_Opcode },
7529 { Bad_Opcode },
7530 { Bad_Opcode },
7531 { Bad_Opcode },
85f10a01 7532 /* f0 */
592d1631
L
7533 { Bad_Opcode },
7534 { Bad_Opcode },
7535 { Bad_Opcode },
7536 { Bad_Opcode },
7537 { Bad_Opcode },
7538 { Bad_Opcode },
7539 { Bad_Opcode },
7540 { Bad_Opcode },
85f10a01 7541 /* f8 */
592d1631
L
7542 { Bad_Opcode },
7543 { Bad_Opcode },
7544 { Bad_Opcode },
7545 { Bad_Opcode },
7546 { Bad_Opcode },
7547 { Bad_Opcode },
7548 { Bad_Opcode },
7549 { Bad_Opcode },
85f10a01 7550 },
f88c9eb0
SP
7551};
7552
7553static const struct dis386 xop_table[][256] = {
5dd85c99 7554 /* XOP_08 */
85f10a01
MM
7555 {
7556 /* 00 */
592d1631
L
7557 { Bad_Opcode },
7558 { Bad_Opcode },
7559 { Bad_Opcode },
7560 { Bad_Opcode },
7561 { Bad_Opcode },
7562 { Bad_Opcode },
7563 { Bad_Opcode },
7564 { Bad_Opcode },
85f10a01 7565 /* 08 */
592d1631
L
7566 { Bad_Opcode },
7567 { Bad_Opcode },
7568 { Bad_Opcode },
7569 { Bad_Opcode },
7570 { Bad_Opcode },
7571 { Bad_Opcode },
7572 { Bad_Opcode },
7573 { Bad_Opcode },
85f10a01 7574 /* 10 */
3929df09 7575 { Bad_Opcode },
592d1631
L
7576 { Bad_Opcode },
7577 { Bad_Opcode },
7578 { Bad_Opcode },
7579 { Bad_Opcode },
7580 { Bad_Opcode },
7581 { Bad_Opcode },
7582 { Bad_Opcode },
85f10a01 7583 /* 18 */
592d1631
L
7584 { Bad_Opcode },
7585 { Bad_Opcode },
7586 { Bad_Opcode },
7587 { Bad_Opcode },
7588 { Bad_Opcode },
7589 { Bad_Opcode },
7590 { Bad_Opcode },
7591 { Bad_Opcode },
85f10a01 7592 /* 20 */
592d1631
L
7593 { Bad_Opcode },
7594 { Bad_Opcode },
7595 { Bad_Opcode },
7596 { Bad_Opcode },
7597 { Bad_Opcode },
7598 { Bad_Opcode },
7599 { Bad_Opcode },
7600 { Bad_Opcode },
85f10a01 7601 /* 28 */
592d1631
L
7602 { Bad_Opcode },
7603 { Bad_Opcode },
7604 { Bad_Opcode },
7605 { Bad_Opcode },
7606 { Bad_Opcode },
7607 { Bad_Opcode },
7608 { Bad_Opcode },
7609 { Bad_Opcode },
c0f3af97 7610 /* 30 */
592d1631
L
7611 { Bad_Opcode },
7612 { Bad_Opcode },
7613 { Bad_Opcode },
7614 { Bad_Opcode },
7615 { Bad_Opcode },
7616 { Bad_Opcode },
7617 { Bad_Opcode },
7618 { Bad_Opcode },
c0f3af97 7619 /* 38 */
592d1631
L
7620 { Bad_Opcode },
7621 { Bad_Opcode },
7622 { Bad_Opcode },
7623 { Bad_Opcode },
7624 { Bad_Opcode },
7625 { Bad_Opcode },
7626 { Bad_Opcode },
7627 { Bad_Opcode },
c0f3af97 7628 /* 40 */
592d1631
L
7629 { Bad_Opcode },
7630 { Bad_Opcode },
7631 { Bad_Opcode },
7632 { Bad_Opcode },
7633 { Bad_Opcode },
7634 { Bad_Opcode },
7635 { Bad_Opcode },
7636 { Bad_Opcode },
85f10a01 7637 /* 48 */
592d1631
L
7638 { Bad_Opcode },
7639 { Bad_Opcode },
7640 { Bad_Opcode },
7641 { Bad_Opcode },
7642 { Bad_Opcode },
7643 { Bad_Opcode },
7644 { Bad_Opcode },
7645 { Bad_Opcode },
c0f3af97 7646 /* 50 */
592d1631
L
7647 { Bad_Opcode },
7648 { Bad_Opcode },
7649 { Bad_Opcode },
7650 { Bad_Opcode },
7651 { Bad_Opcode },
7652 { Bad_Opcode },
7653 { Bad_Opcode },
7654 { Bad_Opcode },
85f10a01 7655 /* 58 */
592d1631
L
7656 { Bad_Opcode },
7657 { Bad_Opcode },
7658 { Bad_Opcode },
7659 { Bad_Opcode },
7660 { Bad_Opcode },
7661 { Bad_Opcode },
7662 { Bad_Opcode },
7663 { Bad_Opcode },
c1e679ec 7664 /* 60 */
592d1631
L
7665 { Bad_Opcode },
7666 { Bad_Opcode },
7667 { Bad_Opcode },
7668 { Bad_Opcode },
7669 { Bad_Opcode },
7670 { Bad_Opcode },
7671 { Bad_Opcode },
7672 { Bad_Opcode },
c0f3af97 7673 /* 68 */
592d1631
L
7674 { Bad_Opcode },
7675 { Bad_Opcode },
7676 { Bad_Opcode },
7677 { Bad_Opcode },
7678 { Bad_Opcode },
7679 { Bad_Opcode },
7680 { Bad_Opcode },
7681 { Bad_Opcode },
85f10a01 7682 /* 70 */
592d1631
L
7683 { Bad_Opcode },
7684 { Bad_Opcode },
7685 { Bad_Opcode },
7686 { Bad_Opcode },
7687 { Bad_Opcode },
7688 { Bad_Opcode },
7689 { Bad_Opcode },
7690 { Bad_Opcode },
85f10a01 7691 /* 78 */
592d1631
L
7692 { Bad_Opcode },
7693 { Bad_Opcode },
7694 { Bad_Opcode },
7695 { Bad_Opcode },
7696 { Bad_Opcode },
7697 { Bad_Opcode },
7698 { Bad_Opcode },
7699 { Bad_Opcode },
85f10a01 7700 /* 80 */
592d1631
L
7701 { Bad_Opcode },
7702 { Bad_Opcode },
7703 { Bad_Opcode },
7704 { Bad_Opcode },
7705 { Bad_Opcode },
3a2430e0
JB
7706 { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7707 { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7708 { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
5dd85c99 7709 /* 88 */
592d1631
L
7710 { Bad_Opcode },
7711 { Bad_Opcode },
7712 { Bad_Opcode },
7713 { Bad_Opcode },
7714 { Bad_Opcode },
7715 { Bad_Opcode },
3a2430e0
JB
7716 { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7717 { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
5dd85c99 7718 /* 90 */
592d1631
L
7719 { Bad_Opcode },
7720 { Bad_Opcode },
7721 { Bad_Opcode },
7722 { Bad_Opcode },
7723 { Bad_Opcode },
3a2430e0
JB
7724 { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7725 { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7726 { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
5dd85c99 7727 /* 98 */
592d1631
L
7728 { Bad_Opcode },
7729 { Bad_Opcode },
7730 { Bad_Opcode },
7731 { Bad_Opcode },
7732 { Bad_Opcode },
7733 { Bad_Opcode },
3a2430e0
JB
7734 { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7735 { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
5dd85c99 7736 /* a0 */
592d1631
L
7737 { Bad_Opcode },
7738 { Bad_Opcode },
3a2430e0
JB
7739 { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7740 { "vpperm", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
592d1631
L
7741 { Bad_Opcode },
7742 { Bad_Opcode },
3a2430e0 7743 { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
592d1631 7744 { Bad_Opcode },
5dd85c99 7745 /* a8 */
592d1631
L
7746 { Bad_Opcode },
7747 { Bad_Opcode },
7748 { Bad_Opcode },
7749 { Bad_Opcode },
7750 { Bad_Opcode },
7751 { Bad_Opcode },
7752 { Bad_Opcode },
7753 { Bad_Opcode },
5dd85c99 7754 /* b0 */
592d1631
L
7755 { Bad_Opcode },
7756 { Bad_Opcode },
7757 { Bad_Opcode },
7758 { Bad_Opcode },
7759 { Bad_Opcode },
7760 { Bad_Opcode },
3a2430e0 7761 { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
592d1631 7762 { Bad_Opcode },
5dd85c99 7763 /* b8 */
592d1631
L
7764 { Bad_Opcode },
7765 { Bad_Opcode },
7766 { Bad_Opcode },
7767 { Bad_Opcode },
7768 { Bad_Opcode },
7769 { Bad_Opcode },
7770 { Bad_Opcode },
7771 { Bad_Opcode },
5dd85c99 7772 /* c0 */
bf890a93
IT
7773 { "vprotb", { XM, Vex_2src_1, Ib }, 0 },
7774 { "vprotw", { XM, Vex_2src_1, Ib }, 0 },
7775 { "vprotd", { XM, Vex_2src_1, Ib }, 0 },
7776 { "vprotq", { XM, Vex_2src_1, Ib }, 0 },
592d1631
L
7777 { Bad_Opcode },
7778 { Bad_Opcode },
7779 { Bad_Opcode },
7780 { Bad_Opcode },
5dd85c99 7781 /* c8 */
592d1631
L
7782 { Bad_Opcode },
7783 { Bad_Opcode },
7784 { Bad_Opcode },
7785 { Bad_Opcode },
ff688e1f
L
7786 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CC) },
7787 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CD) },
7788 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CE) },
7789 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CF) },
5dd85c99 7790 /* d0 */
592d1631
L
7791 { Bad_Opcode },
7792 { Bad_Opcode },
7793 { Bad_Opcode },
7794 { Bad_Opcode },
7795 { Bad_Opcode },
7796 { Bad_Opcode },
7797 { Bad_Opcode },
7798 { Bad_Opcode },
5dd85c99 7799 /* d8 */
592d1631
L
7800 { Bad_Opcode },
7801 { Bad_Opcode },
7802 { Bad_Opcode },
7803 { Bad_Opcode },
7804 { Bad_Opcode },
7805 { Bad_Opcode },
7806 { Bad_Opcode },
7807 { Bad_Opcode },
5dd85c99 7808 /* e0 */
592d1631
L
7809 { Bad_Opcode },
7810 { Bad_Opcode },
7811 { Bad_Opcode },
7812 { Bad_Opcode },
7813 { Bad_Opcode },
7814 { Bad_Opcode },
7815 { Bad_Opcode },
7816 { Bad_Opcode },
5dd85c99 7817 /* e8 */
592d1631
L
7818 { Bad_Opcode },
7819 { Bad_Opcode },
7820 { Bad_Opcode },
7821 { Bad_Opcode },
ff688e1f
L
7822 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EC) },
7823 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_ED) },
7824 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EE) },
7825 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EF) },
5dd85c99 7826 /* f0 */
592d1631
L
7827 { Bad_Opcode },
7828 { Bad_Opcode },
7829 { Bad_Opcode },
7830 { Bad_Opcode },
7831 { Bad_Opcode },
7832 { Bad_Opcode },
7833 { Bad_Opcode },
7834 { Bad_Opcode },
5dd85c99 7835 /* f8 */
592d1631
L
7836 { Bad_Opcode },
7837 { Bad_Opcode },
7838 { Bad_Opcode },
7839 { Bad_Opcode },
7840 { Bad_Opcode },
7841 { Bad_Opcode },
7842 { Bad_Opcode },
7843 { Bad_Opcode },
5dd85c99
SP
7844 },
7845 /* XOP_09 */
7846 {
7847 /* 00 */
592d1631 7848 { Bad_Opcode },
2a2a0f38
QN
7849 { REG_TABLE (REG_XOP_TBM_01) },
7850 { REG_TABLE (REG_XOP_TBM_02) },
592d1631
L
7851 { Bad_Opcode },
7852 { Bad_Opcode },
7853 { Bad_Opcode },
7854 { Bad_Opcode },
7855 { Bad_Opcode },
5dd85c99 7856 /* 08 */
592d1631
L
7857 { Bad_Opcode },
7858 { Bad_Opcode },
7859 { Bad_Opcode },
7860 { Bad_Opcode },
7861 { Bad_Opcode },
7862 { Bad_Opcode },
7863 { Bad_Opcode },
7864 { Bad_Opcode },
5dd85c99 7865 /* 10 */
592d1631
L
7866 { Bad_Opcode },
7867 { Bad_Opcode },
5dd85c99 7868 { REG_TABLE (REG_XOP_LWPCB) },
592d1631
L
7869 { Bad_Opcode },
7870 { Bad_Opcode },
7871 { Bad_Opcode },
7872 { Bad_Opcode },
7873 { Bad_Opcode },
5dd85c99 7874 /* 18 */
592d1631
L
7875 { Bad_Opcode },
7876 { Bad_Opcode },
7877 { Bad_Opcode },
7878 { Bad_Opcode },
7879 { Bad_Opcode },
7880 { Bad_Opcode },
7881 { Bad_Opcode },
7882 { Bad_Opcode },
5dd85c99 7883 /* 20 */
592d1631
L
7884 { Bad_Opcode },
7885 { Bad_Opcode },
7886 { Bad_Opcode },
7887 { Bad_Opcode },
7888 { Bad_Opcode },
7889 { Bad_Opcode },
7890 { Bad_Opcode },
7891 { Bad_Opcode },
5dd85c99 7892 /* 28 */
592d1631
L
7893 { Bad_Opcode },
7894 { Bad_Opcode },
7895 { Bad_Opcode },
7896 { Bad_Opcode },
7897 { Bad_Opcode },
7898 { Bad_Opcode },
7899 { Bad_Opcode },
7900 { Bad_Opcode },
5dd85c99 7901 /* 30 */
592d1631
L
7902 { Bad_Opcode },
7903 { Bad_Opcode },
7904 { Bad_Opcode },
7905 { Bad_Opcode },
7906 { Bad_Opcode },
7907 { Bad_Opcode },
7908 { Bad_Opcode },
7909 { Bad_Opcode },
5dd85c99 7910 /* 38 */
592d1631
L
7911 { Bad_Opcode },
7912 { Bad_Opcode },
7913 { Bad_Opcode },
7914 { Bad_Opcode },
7915 { Bad_Opcode },
7916 { Bad_Opcode },
7917 { Bad_Opcode },
7918 { Bad_Opcode },
5dd85c99 7919 /* 40 */
592d1631
L
7920 { Bad_Opcode },
7921 { Bad_Opcode },
7922 { Bad_Opcode },
7923 { Bad_Opcode },
7924 { Bad_Opcode },
7925 { Bad_Opcode },
7926 { Bad_Opcode },
7927 { Bad_Opcode },
5dd85c99 7928 /* 48 */
592d1631
L
7929 { Bad_Opcode },
7930 { Bad_Opcode },
7931 { Bad_Opcode },
7932 { Bad_Opcode },
7933 { Bad_Opcode },
7934 { Bad_Opcode },
7935 { Bad_Opcode },
7936 { Bad_Opcode },
5dd85c99 7937 /* 50 */
592d1631
L
7938 { Bad_Opcode },
7939 { Bad_Opcode },
7940 { Bad_Opcode },
7941 { Bad_Opcode },
7942 { Bad_Opcode },
7943 { Bad_Opcode },
7944 { Bad_Opcode },
7945 { Bad_Opcode },
5dd85c99 7946 /* 58 */
592d1631
L
7947 { Bad_Opcode },
7948 { Bad_Opcode },
7949 { Bad_Opcode },
7950 { Bad_Opcode },
7951 { Bad_Opcode },
7952 { Bad_Opcode },
7953 { Bad_Opcode },
7954 { Bad_Opcode },
5dd85c99 7955 /* 60 */
592d1631
L
7956 { Bad_Opcode },
7957 { Bad_Opcode },
7958 { Bad_Opcode },
7959 { Bad_Opcode },
7960 { Bad_Opcode },
7961 { Bad_Opcode },
7962 { Bad_Opcode },
7963 { Bad_Opcode },
5dd85c99 7964 /* 68 */
592d1631
L
7965 { Bad_Opcode },
7966 { Bad_Opcode },
7967 { Bad_Opcode },
7968 { Bad_Opcode },
7969 { Bad_Opcode },
7970 { Bad_Opcode },
7971 { Bad_Opcode },
7972 { Bad_Opcode },
5dd85c99 7973 /* 70 */
592d1631
L
7974 { Bad_Opcode },
7975 { Bad_Opcode },
7976 { Bad_Opcode },
7977 { Bad_Opcode },
7978 { Bad_Opcode },
7979 { Bad_Opcode },
7980 { Bad_Opcode },
7981 { Bad_Opcode },
5dd85c99 7982 /* 78 */
592d1631
L
7983 { Bad_Opcode },
7984 { Bad_Opcode },
7985 { Bad_Opcode },
7986 { Bad_Opcode },
7987 { Bad_Opcode },
7988 { Bad_Opcode },
7989 { Bad_Opcode },
7990 { Bad_Opcode },
5dd85c99 7991 /* 80 */
592a252b
L
7992 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80) },
7993 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81) },
bf890a93
IT
7994 { "vfrczss", { XM, EXd }, 0 },
7995 { "vfrczsd", { XM, EXq }, 0 },
592d1631
L
7996 { Bad_Opcode },
7997 { Bad_Opcode },
7998 { Bad_Opcode },
7999 { Bad_Opcode },
5dd85c99 8000 /* 88 */
592d1631
L
8001 { Bad_Opcode },
8002 { Bad_Opcode },
8003 { Bad_Opcode },
8004 { Bad_Opcode },
8005 { Bad_Opcode },
8006 { Bad_Opcode },
8007 { Bad_Opcode },
8008 { Bad_Opcode },
5dd85c99 8009 /* 90 */
bf890a93
IT
8010 { "vprotb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8011 { "vprotw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8012 { "vprotd", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8013 { "vprotq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8014 { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8015 { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8016 { "vpshld", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8017 { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
5dd85c99 8018 /* 98 */
bf890a93
IT
8019 { "vpshab", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8020 { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8021 { "vpshad", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8022 { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
592d1631
L
8023 { Bad_Opcode },
8024 { Bad_Opcode },
8025 { Bad_Opcode },
8026 { Bad_Opcode },
5dd85c99 8027 /* a0 */
592d1631
L
8028 { Bad_Opcode },
8029 { Bad_Opcode },
8030 { Bad_Opcode },
8031 { Bad_Opcode },
8032 { Bad_Opcode },
8033 { Bad_Opcode },
8034 { Bad_Opcode },
8035 { Bad_Opcode },
5dd85c99 8036 /* a8 */
592d1631
L
8037 { Bad_Opcode },
8038 { Bad_Opcode },
8039 { Bad_Opcode },
8040 { Bad_Opcode },
8041 { Bad_Opcode },
8042 { Bad_Opcode },
8043 { Bad_Opcode },
8044 { Bad_Opcode },
5dd85c99 8045 /* b0 */
592d1631
L
8046 { Bad_Opcode },
8047 { Bad_Opcode },
8048 { Bad_Opcode },
8049 { Bad_Opcode },
8050 { Bad_Opcode },
8051 { Bad_Opcode },
8052 { Bad_Opcode },
8053 { Bad_Opcode },
5dd85c99 8054 /* b8 */
592d1631
L
8055 { Bad_Opcode },
8056 { Bad_Opcode },
8057 { Bad_Opcode },
8058 { Bad_Opcode },
8059 { Bad_Opcode },
8060 { Bad_Opcode },
8061 { Bad_Opcode },
8062 { Bad_Opcode },
5dd85c99 8063 /* c0 */
592d1631 8064 { Bad_Opcode },
bf890a93
IT
8065 { "vphaddbw", { XM, EXxmm }, 0 },
8066 { "vphaddbd", { XM, EXxmm }, 0 },
8067 { "vphaddbq", { XM, EXxmm }, 0 },
592d1631
L
8068 { Bad_Opcode },
8069 { Bad_Opcode },
bf890a93
IT
8070 { "vphaddwd", { XM, EXxmm }, 0 },
8071 { "vphaddwq", { XM, EXxmm }, 0 },
5dd85c99 8072 /* c8 */
592d1631
L
8073 { Bad_Opcode },
8074 { Bad_Opcode },
8075 { Bad_Opcode },
bf890a93 8076 { "vphadddq", { XM, EXxmm }, 0 },
592d1631
L
8077 { Bad_Opcode },
8078 { Bad_Opcode },
8079 { Bad_Opcode },
8080 { Bad_Opcode },
5dd85c99 8081 /* d0 */
592d1631 8082 { Bad_Opcode },
bf890a93
IT
8083 { "vphaddubw", { XM, EXxmm }, 0 },
8084 { "vphaddubd", { XM, EXxmm }, 0 },
8085 { "vphaddubq", { XM, EXxmm }, 0 },
592d1631
L
8086 { Bad_Opcode },
8087 { Bad_Opcode },
bf890a93
IT
8088 { "vphadduwd", { XM, EXxmm }, 0 },
8089 { "vphadduwq", { XM, EXxmm }, 0 },
5dd85c99 8090 /* d8 */
592d1631
L
8091 { Bad_Opcode },
8092 { Bad_Opcode },
8093 { Bad_Opcode },
bf890a93 8094 { "vphaddudq", { XM, EXxmm }, 0 },
592d1631
L
8095 { Bad_Opcode },
8096 { Bad_Opcode },
8097 { Bad_Opcode },
8098 { Bad_Opcode },
5dd85c99 8099 /* e0 */
592d1631 8100 { Bad_Opcode },
bf890a93
IT
8101 { "vphsubbw", { XM, EXxmm }, 0 },
8102 { "vphsubwd", { XM, EXxmm }, 0 },
8103 { "vphsubdq", { XM, EXxmm }, 0 },
592d1631
L
8104 { Bad_Opcode },
8105 { Bad_Opcode },
8106 { Bad_Opcode },
8107 { Bad_Opcode },
4e7d34a6 8108 /* e8 */
592d1631
L
8109 { Bad_Opcode },
8110 { Bad_Opcode },
8111 { Bad_Opcode },
8112 { Bad_Opcode },
8113 { Bad_Opcode },
8114 { Bad_Opcode },
8115 { Bad_Opcode },
8116 { Bad_Opcode },
4e7d34a6 8117 /* f0 */
592d1631
L
8118 { Bad_Opcode },
8119 { Bad_Opcode },
8120 { Bad_Opcode },
8121 { Bad_Opcode },
8122 { Bad_Opcode },
8123 { Bad_Opcode },
8124 { Bad_Opcode },
8125 { Bad_Opcode },
4e7d34a6 8126 /* f8 */
592d1631
L
8127 { Bad_Opcode },
8128 { Bad_Opcode },
8129 { Bad_Opcode },
8130 { Bad_Opcode },
8131 { Bad_Opcode },
8132 { Bad_Opcode },
8133 { Bad_Opcode },
8134 { Bad_Opcode },
4e7d34a6 8135 },
f88c9eb0 8136 /* XOP_0A */
4e7d34a6
L
8137 {
8138 /* 00 */
592d1631
L
8139 { Bad_Opcode },
8140 { Bad_Opcode },
8141 { Bad_Opcode },
8142 { Bad_Opcode },
8143 { Bad_Opcode },
8144 { Bad_Opcode },
8145 { Bad_Opcode },
8146 { Bad_Opcode },
4e7d34a6 8147 /* 08 */
592d1631
L
8148 { Bad_Opcode },
8149 { Bad_Opcode },
8150 { Bad_Opcode },
8151 { Bad_Opcode },
8152 { Bad_Opcode },
8153 { Bad_Opcode },
8154 { Bad_Opcode },
8155 { Bad_Opcode },
4e7d34a6 8156 /* 10 */
c1dc7af5 8157 { "bextrS", { Gdq, Edq, Id }, 0 },
592d1631 8158 { Bad_Opcode },
f88c9eb0 8159 { REG_TABLE (REG_XOP_LWP) },
592d1631
L
8160 { Bad_Opcode },
8161 { Bad_Opcode },
8162 { Bad_Opcode },
8163 { Bad_Opcode },
8164 { Bad_Opcode },
4e7d34a6 8165 /* 18 */
592d1631
L
8166 { Bad_Opcode },
8167 { Bad_Opcode },
8168 { Bad_Opcode },
8169 { Bad_Opcode },
8170 { Bad_Opcode },
8171 { Bad_Opcode },
8172 { Bad_Opcode },
8173 { Bad_Opcode },
4e7d34a6 8174 /* 20 */
592d1631
L
8175 { Bad_Opcode },
8176 { Bad_Opcode },
8177 { Bad_Opcode },
8178 { Bad_Opcode },
8179 { Bad_Opcode },
8180 { Bad_Opcode },
8181 { Bad_Opcode },
8182 { Bad_Opcode },
4e7d34a6 8183 /* 28 */
592d1631
L
8184 { Bad_Opcode },
8185 { Bad_Opcode },
8186 { Bad_Opcode },
8187 { Bad_Opcode },
8188 { Bad_Opcode },
8189 { Bad_Opcode },
8190 { Bad_Opcode },
8191 { Bad_Opcode },
4e7d34a6 8192 /* 30 */
592d1631
L
8193 { Bad_Opcode },
8194 { Bad_Opcode },
8195 { Bad_Opcode },
8196 { Bad_Opcode },
8197 { Bad_Opcode },
8198 { Bad_Opcode },
8199 { Bad_Opcode },
8200 { Bad_Opcode },
c0f3af97 8201 /* 38 */
592d1631
L
8202 { Bad_Opcode },
8203 { Bad_Opcode },
8204 { Bad_Opcode },
8205 { Bad_Opcode },
8206 { Bad_Opcode },
8207 { Bad_Opcode },
8208 { Bad_Opcode },
8209 { Bad_Opcode },
c0f3af97 8210 /* 40 */
592d1631
L
8211 { Bad_Opcode },
8212 { Bad_Opcode },
8213 { Bad_Opcode },
8214 { Bad_Opcode },
8215 { Bad_Opcode },
8216 { Bad_Opcode },
8217 { Bad_Opcode },
8218 { Bad_Opcode },
c1e679ec 8219 /* 48 */
592d1631
L
8220 { Bad_Opcode },
8221 { Bad_Opcode },
8222 { Bad_Opcode },
8223 { Bad_Opcode },
8224 { Bad_Opcode },
8225 { Bad_Opcode },
8226 { Bad_Opcode },
8227 { Bad_Opcode },
c1e679ec 8228 /* 50 */
592d1631
L
8229 { Bad_Opcode },
8230 { Bad_Opcode },
8231 { Bad_Opcode },
8232 { Bad_Opcode },
8233 { Bad_Opcode },
8234 { Bad_Opcode },
8235 { Bad_Opcode },
8236 { Bad_Opcode },
4e7d34a6 8237 /* 58 */
592d1631
L
8238 { Bad_Opcode },
8239 { Bad_Opcode },
8240 { Bad_Opcode },
8241 { Bad_Opcode },
8242 { Bad_Opcode },
8243 { Bad_Opcode },
8244 { Bad_Opcode },
8245 { Bad_Opcode },
4e7d34a6 8246 /* 60 */
592d1631
L
8247 { Bad_Opcode },
8248 { Bad_Opcode },
8249 { Bad_Opcode },
8250 { Bad_Opcode },
8251 { Bad_Opcode },
8252 { Bad_Opcode },
8253 { Bad_Opcode },
8254 { Bad_Opcode },
4e7d34a6 8255 /* 68 */
592d1631
L
8256 { Bad_Opcode },
8257 { Bad_Opcode },
8258 { Bad_Opcode },
8259 { Bad_Opcode },
8260 { Bad_Opcode },
8261 { Bad_Opcode },
8262 { Bad_Opcode },
8263 { Bad_Opcode },
4e7d34a6 8264 /* 70 */
592d1631
L
8265 { Bad_Opcode },
8266 { Bad_Opcode },
8267 { Bad_Opcode },
8268 { Bad_Opcode },
8269 { Bad_Opcode },
8270 { Bad_Opcode },
8271 { Bad_Opcode },
8272 { Bad_Opcode },
4e7d34a6 8273 /* 78 */
592d1631
L
8274 { Bad_Opcode },
8275 { Bad_Opcode },
8276 { Bad_Opcode },
8277 { Bad_Opcode },
8278 { Bad_Opcode },
8279 { Bad_Opcode },
8280 { Bad_Opcode },
8281 { Bad_Opcode },
4e7d34a6 8282 /* 80 */
592d1631
L
8283 { Bad_Opcode },
8284 { Bad_Opcode },
8285 { Bad_Opcode },
8286 { Bad_Opcode },
8287 { Bad_Opcode },
8288 { Bad_Opcode },
8289 { Bad_Opcode },
8290 { Bad_Opcode },
4e7d34a6 8291 /* 88 */
592d1631
L
8292 { Bad_Opcode },
8293 { Bad_Opcode },
8294 { Bad_Opcode },
8295 { Bad_Opcode },
8296 { Bad_Opcode },
8297 { Bad_Opcode },
8298 { Bad_Opcode },
8299 { Bad_Opcode },
4e7d34a6 8300 /* 90 */
592d1631
L
8301 { Bad_Opcode },
8302 { Bad_Opcode },
8303 { Bad_Opcode },
8304 { Bad_Opcode },
8305 { Bad_Opcode },
8306 { Bad_Opcode },
8307 { Bad_Opcode },
8308 { Bad_Opcode },
4e7d34a6 8309 /* 98 */
592d1631
L
8310 { Bad_Opcode },
8311 { Bad_Opcode },
8312 { Bad_Opcode },
8313 { Bad_Opcode },
8314 { Bad_Opcode },
8315 { Bad_Opcode },
8316 { Bad_Opcode },
8317 { Bad_Opcode },
4e7d34a6 8318 /* a0 */
592d1631
L
8319 { Bad_Opcode },
8320 { Bad_Opcode },
8321 { Bad_Opcode },
8322 { Bad_Opcode },
8323 { Bad_Opcode },
8324 { Bad_Opcode },
8325 { Bad_Opcode },
8326 { Bad_Opcode },
4e7d34a6 8327 /* a8 */
592d1631
L
8328 { Bad_Opcode },
8329 { Bad_Opcode },
8330 { Bad_Opcode },
8331 { Bad_Opcode },
8332 { Bad_Opcode },
8333 { Bad_Opcode },
8334 { Bad_Opcode },
8335 { Bad_Opcode },
d5d7db8e 8336 /* b0 */
592d1631
L
8337 { Bad_Opcode },
8338 { Bad_Opcode },
8339 { Bad_Opcode },
8340 { Bad_Opcode },
8341 { Bad_Opcode },
8342 { Bad_Opcode },
8343 { Bad_Opcode },
8344 { Bad_Opcode },
85f10a01 8345 /* b8 */
592d1631
L
8346 { Bad_Opcode },
8347 { Bad_Opcode },
8348 { Bad_Opcode },
8349 { Bad_Opcode },
8350 { Bad_Opcode },
8351 { Bad_Opcode },
8352 { Bad_Opcode },
8353 { Bad_Opcode },
85f10a01 8354 /* c0 */
592d1631
L
8355 { Bad_Opcode },
8356 { Bad_Opcode },
8357 { Bad_Opcode },
8358 { Bad_Opcode },
8359 { Bad_Opcode },
8360 { Bad_Opcode },
8361 { Bad_Opcode },
8362 { Bad_Opcode },
85f10a01 8363 /* c8 */
592d1631
L
8364 { Bad_Opcode },
8365 { Bad_Opcode },
8366 { Bad_Opcode },
8367 { Bad_Opcode },
8368 { Bad_Opcode },
8369 { Bad_Opcode },
8370 { Bad_Opcode },
8371 { Bad_Opcode },
85f10a01 8372 /* d0 */
592d1631
L
8373 { Bad_Opcode },
8374 { Bad_Opcode },
8375 { Bad_Opcode },
8376 { Bad_Opcode },
8377 { Bad_Opcode },
8378 { Bad_Opcode },
8379 { Bad_Opcode },
8380 { Bad_Opcode },
85f10a01 8381 /* d8 */
592d1631
L
8382 { Bad_Opcode },
8383 { Bad_Opcode },
8384 { Bad_Opcode },
8385 { Bad_Opcode },
8386 { Bad_Opcode },
8387 { Bad_Opcode },
8388 { Bad_Opcode },
8389 { Bad_Opcode },
85f10a01 8390 /* e0 */
592d1631
L
8391 { Bad_Opcode },
8392 { Bad_Opcode },
8393 { Bad_Opcode },
8394 { Bad_Opcode },
8395 { Bad_Opcode },
8396 { Bad_Opcode },
8397 { Bad_Opcode },
8398 { Bad_Opcode },
85f10a01 8399 /* e8 */
592d1631
L
8400 { Bad_Opcode },
8401 { Bad_Opcode },
8402 { Bad_Opcode },
8403 { Bad_Opcode },
8404 { Bad_Opcode },
8405 { Bad_Opcode },
8406 { Bad_Opcode },
8407 { Bad_Opcode },
85f10a01 8408 /* f0 */
592d1631
L
8409 { Bad_Opcode },
8410 { Bad_Opcode },
8411 { Bad_Opcode },
8412 { Bad_Opcode },
8413 { Bad_Opcode },
8414 { Bad_Opcode },
8415 { Bad_Opcode },
8416 { Bad_Opcode },
85f10a01 8417 /* f8 */
592d1631
L
8418 { Bad_Opcode },
8419 { Bad_Opcode },
8420 { Bad_Opcode },
8421 { Bad_Opcode },
8422 { Bad_Opcode },
8423 { Bad_Opcode },
8424 { Bad_Opcode },
8425 { Bad_Opcode },
85f10a01 8426 },
c0f3af97
L
8427};
8428
8429static const struct dis386 vex_table[][256] = {
8430 /* VEX_0F */
85f10a01
MM
8431 {
8432 /* 00 */
592d1631
L
8433 { Bad_Opcode },
8434 { Bad_Opcode },
8435 { Bad_Opcode },
8436 { Bad_Opcode },
8437 { Bad_Opcode },
8438 { Bad_Opcode },
8439 { Bad_Opcode },
8440 { Bad_Opcode },
85f10a01 8441 /* 08 */
592d1631
L
8442 { Bad_Opcode },
8443 { Bad_Opcode },
8444 { Bad_Opcode },
8445 { Bad_Opcode },
8446 { Bad_Opcode },
8447 { Bad_Opcode },
8448 { Bad_Opcode },
8449 { Bad_Opcode },
c0f3af97 8450 /* 10 */
592a252b
L
8451 { PREFIX_TABLE (PREFIX_VEX_0F10) },
8452 { PREFIX_TABLE (PREFIX_VEX_0F11) },
8453 { PREFIX_TABLE (PREFIX_VEX_0F12) },
8454 { MOD_TABLE (MOD_VEX_0F13) },
ec6f095a
L
8455 { "vunpcklpX", { XM, Vex, EXx }, 0 },
8456 { "vunpckhpX", { XM, Vex, EXx }, 0 },
592a252b
L
8457 { PREFIX_TABLE (PREFIX_VEX_0F16) },
8458 { MOD_TABLE (MOD_VEX_0F17) },
c0f3af97 8459 /* 18 */
592d1631
L
8460 { Bad_Opcode },
8461 { Bad_Opcode },
8462 { Bad_Opcode },
8463 { Bad_Opcode },
8464 { Bad_Opcode },
8465 { Bad_Opcode },
8466 { Bad_Opcode },
8467 { Bad_Opcode },
c0f3af97 8468 /* 20 */
592d1631
L
8469 { Bad_Opcode },
8470 { Bad_Opcode },
8471 { Bad_Opcode },
8472 { Bad_Opcode },
8473 { Bad_Opcode },
8474 { Bad_Opcode },
8475 { Bad_Opcode },
8476 { Bad_Opcode },
c0f3af97 8477 /* 28 */
ec6f095a
L
8478 { "vmovapX", { XM, EXx }, 0 },
8479 { "vmovapX", { EXxS, XM }, 0 },
592a252b
L
8480 { PREFIX_TABLE (PREFIX_VEX_0F2A) },
8481 { MOD_TABLE (MOD_VEX_0F2B) },
8482 { PREFIX_TABLE (PREFIX_VEX_0F2C) },
8483 { PREFIX_TABLE (PREFIX_VEX_0F2D) },
8484 { PREFIX_TABLE (PREFIX_VEX_0F2E) },
8485 { PREFIX_TABLE (PREFIX_VEX_0F2F) },
85f10a01 8486 /* 30 */
592d1631
L
8487 { Bad_Opcode },
8488 { Bad_Opcode },
8489 { Bad_Opcode },
8490 { Bad_Opcode },
8491 { Bad_Opcode },
8492 { Bad_Opcode },
8493 { Bad_Opcode },
8494 { Bad_Opcode },
4e7d34a6 8495 /* 38 */
592d1631
L
8496 { Bad_Opcode },
8497 { Bad_Opcode },
8498 { Bad_Opcode },
8499 { Bad_Opcode },
8500 { Bad_Opcode },
8501 { Bad_Opcode },
8502 { Bad_Opcode },
8503 { Bad_Opcode },
d5d7db8e 8504 /* 40 */
592d1631 8505 { Bad_Opcode },
43234a1e
L
8506 { PREFIX_TABLE (PREFIX_VEX_0F41) },
8507 { PREFIX_TABLE (PREFIX_VEX_0F42) },
592d1631 8508 { Bad_Opcode },
43234a1e
L
8509 { PREFIX_TABLE (PREFIX_VEX_0F44) },
8510 { PREFIX_TABLE (PREFIX_VEX_0F45) },
8511 { PREFIX_TABLE (PREFIX_VEX_0F46) },
8512 { PREFIX_TABLE (PREFIX_VEX_0F47) },
85f10a01 8513 /* 48 */
592d1631
L
8514 { Bad_Opcode },
8515 { Bad_Opcode },
1ba585e8 8516 { PREFIX_TABLE (PREFIX_VEX_0F4A) },
43234a1e 8517 { PREFIX_TABLE (PREFIX_VEX_0F4B) },
592d1631
L
8518 { Bad_Opcode },
8519 { Bad_Opcode },
8520 { Bad_Opcode },
8521 { Bad_Opcode },
d5d7db8e 8522 /* 50 */
592a252b
L
8523 { MOD_TABLE (MOD_VEX_0F50) },
8524 { PREFIX_TABLE (PREFIX_VEX_0F51) },
8525 { PREFIX_TABLE (PREFIX_VEX_0F52) },
8526 { PREFIX_TABLE (PREFIX_VEX_0F53) },
bf890a93
IT
8527 { "vandpX", { XM, Vex, EXx }, 0 },
8528 { "vandnpX", { XM, Vex, EXx }, 0 },
8529 { "vorpX", { XM, Vex, EXx }, 0 },
8530 { "vxorpX", { XM, Vex, EXx }, 0 },
c0f3af97 8531 /* 58 */
592a252b
L
8532 { PREFIX_TABLE (PREFIX_VEX_0F58) },
8533 { PREFIX_TABLE (PREFIX_VEX_0F59) },
8534 { PREFIX_TABLE (PREFIX_VEX_0F5A) },
8535 { PREFIX_TABLE (PREFIX_VEX_0F5B) },
8536 { PREFIX_TABLE (PREFIX_VEX_0F5C) },
8537 { PREFIX_TABLE (PREFIX_VEX_0F5D) },
8538 { PREFIX_TABLE (PREFIX_VEX_0F5E) },
8539 { PREFIX_TABLE (PREFIX_VEX_0F5F) },
c0f3af97 8540 /* 60 */
592a252b
L
8541 { PREFIX_TABLE (PREFIX_VEX_0F60) },
8542 { PREFIX_TABLE (PREFIX_VEX_0F61) },
8543 { PREFIX_TABLE (PREFIX_VEX_0F62) },
8544 { PREFIX_TABLE (PREFIX_VEX_0F63) },
8545 { PREFIX_TABLE (PREFIX_VEX_0F64) },
8546 { PREFIX_TABLE (PREFIX_VEX_0F65) },
8547 { PREFIX_TABLE (PREFIX_VEX_0F66) },
8548 { PREFIX_TABLE (PREFIX_VEX_0F67) },
c0f3af97 8549 /* 68 */
592a252b
L
8550 { PREFIX_TABLE (PREFIX_VEX_0F68) },
8551 { PREFIX_TABLE (PREFIX_VEX_0F69) },
8552 { PREFIX_TABLE (PREFIX_VEX_0F6A) },
8553 { PREFIX_TABLE (PREFIX_VEX_0F6B) },
8554 { PREFIX_TABLE (PREFIX_VEX_0F6C) },
8555 { PREFIX_TABLE (PREFIX_VEX_0F6D) },
8556 { PREFIX_TABLE (PREFIX_VEX_0F6E) },
8557 { PREFIX_TABLE (PREFIX_VEX_0F6F) },
c0f3af97 8558 /* 70 */
592a252b
L
8559 { PREFIX_TABLE (PREFIX_VEX_0F70) },
8560 { REG_TABLE (REG_VEX_0F71) },
8561 { REG_TABLE (REG_VEX_0F72) },
8562 { REG_TABLE (REG_VEX_0F73) },
8563 { PREFIX_TABLE (PREFIX_VEX_0F74) },
8564 { PREFIX_TABLE (PREFIX_VEX_0F75) },
8565 { PREFIX_TABLE (PREFIX_VEX_0F76) },
8566 { PREFIX_TABLE (PREFIX_VEX_0F77) },
c0f3af97 8567 /* 78 */
592d1631
L
8568 { Bad_Opcode },
8569 { Bad_Opcode },
8570 { Bad_Opcode },
8571 { Bad_Opcode },
592a252b
L
8572 { PREFIX_TABLE (PREFIX_VEX_0F7C) },
8573 { PREFIX_TABLE (PREFIX_VEX_0F7D) },
8574 { PREFIX_TABLE (PREFIX_VEX_0F7E) },
8575 { PREFIX_TABLE (PREFIX_VEX_0F7F) },
c0f3af97 8576 /* 80 */
592d1631
L
8577 { Bad_Opcode },
8578 { Bad_Opcode },
8579 { Bad_Opcode },
8580 { Bad_Opcode },
8581 { Bad_Opcode },
8582 { Bad_Opcode },
8583 { Bad_Opcode },
8584 { Bad_Opcode },
c0f3af97 8585 /* 88 */
592d1631
L
8586 { Bad_Opcode },
8587 { Bad_Opcode },
8588 { Bad_Opcode },
8589 { Bad_Opcode },
8590 { Bad_Opcode },
8591 { Bad_Opcode },
8592 { Bad_Opcode },
8593 { Bad_Opcode },
c0f3af97 8594 /* 90 */
43234a1e
L
8595 { PREFIX_TABLE (PREFIX_VEX_0F90) },
8596 { PREFIX_TABLE (PREFIX_VEX_0F91) },
8597 { PREFIX_TABLE (PREFIX_VEX_0F92) },
8598 { PREFIX_TABLE (PREFIX_VEX_0F93) },
592d1631
L
8599 { Bad_Opcode },
8600 { Bad_Opcode },
8601 { Bad_Opcode },
8602 { Bad_Opcode },
c0f3af97 8603 /* 98 */
43234a1e 8604 { PREFIX_TABLE (PREFIX_VEX_0F98) },
1ba585e8 8605 { PREFIX_TABLE (PREFIX_VEX_0F99) },
592d1631
L
8606 { Bad_Opcode },
8607 { Bad_Opcode },
8608 { Bad_Opcode },
8609 { Bad_Opcode },
8610 { Bad_Opcode },
8611 { Bad_Opcode },
c0f3af97 8612 /* a0 */
592d1631
L
8613 { Bad_Opcode },
8614 { Bad_Opcode },
8615 { Bad_Opcode },
8616 { Bad_Opcode },
8617 { Bad_Opcode },
8618 { Bad_Opcode },
8619 { Bad_Opcode },
8620 { Bad_Opcode },
c0f3af97 8621 /* a8 */
592d1631
L
8622 { Bad_Opcode },
8623 { Bad_Opcode },
8624 { Bad_Opcode },
8625 { Bad_Opcode },
8626 { Bad_Opcode },
8627 { Bad_Opcode },
592a252b 8628 { REG_TABLE (REG_VEX_0FAE) },
592d1631 8629 { Bad_Opcode },
c0f3af97 8630 /* b0 */
592d1631
L
8631 { Bad_Opcode },
8632 { Bad_Opcode },
8633 { Bad_Opcode },
8634 { Bad_Opcode },
8635 { Bad_Opcode },
8636 { Bad_Opcode },
8637 { Bad_Opcode },
8638 { Bad_Opcode },
c0f3af97 8639 /* b8 */
592d1631
L
8640 { Bad_Opcode },
8641 { Bad_Opcode },
8642 { Bad_Opcode },
8643 { Bad_Opcode },
8644 { Bad_Opcode },
8645 { Bad_Opcode },
8646 { Bad_Opcode },
8647 { Bad_Opcode },
c0f3af97 8648 /* c0 */
592d1631
L
8649 { Bad_Opcode },
8650 { Bad_Opcode },
592a252b 8651 { PREFIX_TABLE (PREFIX_VEX_0FC2) },
592d1631 8652 { Bad_Opcode },
592a252b
L
8653 { PREFIX_TABLE (PREFIX_VEX_0FC4) },
8654 { PREFIX_TABLE (PREFIX_VEX_0FC5) },
bf890a93 8655 { "vshufpX", { XM, Vex, EXx, Ib }, 0 },
592d1631 8656 { Bad_Opcode },
c0f3af97 8657 /* c8 */
592d1631
L
8658 { Bad_Opcode },
8659 { Bad_Opcode },
8660 { Bad_Opcode },
8661 { Bad_Opcode },
8662 { Bad_Opcode },
8663 { Bad_Opcode },
8664 { Bad_Opcode },
8665 { Bad_Opcode },
c0f3af97 8666 /* d0 */
592a252b
L
8667 { PREFIX_TABLE (PREFIX_VEX_0FD0) },
8668 { PREFIX_TABLE (PREFIX_VEX_0FD1) },
8669 { PREFIX_TABLE (PREFIX_VEX_0FD2) },
8670 { PREFIX_TABLE (PREFIX_VEX_0FD3) },
8671 { PREFIX_TABLE (PREFIX_VEX_0FD4) },
8672 { PREFIX_TABLE (PREFIX_VEX_0FD5) },
8673 { PREFIX_TABLE (PREFIX_VEX_0FD6) },
8674 { PREFIX_TABLE (PREFIX_VEX_0FD7) },
c0f3af97 8675 /* d8 */
592a252b
L
8676 { PREFIX_TABLE (PREFIX_VEX_0FD8) },
8677 { PREFIX_TABLE (PREFIX_VEX_0FD9) },
8678 { PREFIX_TABLE (PREFIX_VEX_0FDA) },
8679 { PREFIX_TABLE (PREFIX_VEX_0FDB) },
8680 { PREFIX_TABLE (PREFIX_VEX_0FDC) },
8681 { PREFIX_TABLE (PREFIX_VEX_0FDD) },
8682 { PREFIX_TABLE (PREFIX_VEX_0FDE) },
8683 { PREFIX_TABLE (PREFIX_VEX_0FDF) },
c0f3af97 8684 /* e0 */
592a252b
L
8685 { PREFIX_TABLE (PREFIX_VEX_0FE0) },
8686 { PREFIX_TABLE (PREFIX_VEX_0FE1) },
8687 { PREFIX_TABLE (PREFIX_VEX_0FE2) },
8688 { PREFIX_TABLE (PREFIX_VEX_0FE3) },
8689 { PREFIX_TABLE (PREFIX_VEX_0FE4) },
8690 { PREFIX_TABLE (PREFIX_VEX_0FE5) },
8691 { PREFIX_TABLE (PREFIX_VEX_0FE6) },
8692 { PREFIX_TABLE (PREFIX_VEX_0FE7) },
c0f3af97 8693 /* e8 */
592a252b
L
8694 { PREFIX_TABLE (PREFIX_VEX_0FE8) },
8695 { PREFIX_TABLE (PREFIX_VEX_0FE9) },
8696 { PREFIX_TABLE (PREFIX_VEX_0FEA) },
8697 { PREFIX_TABLE (PREFIX_VEX_0FEB) },
8698 { PREFIX_TABLE (PREFIX_VEX_0FEC) },
8699 { PREFIX_TABLE (PREFIX_VEX_0FED) },
8700 { PREFIX_TABLE (PREFIX_VEX_0FEE) },
8701 { PREFIX_TABLE (PREFIX_VEX_0FEF) },
c0f3af97 8702 /* f0 */
592a252b
L
8703 { PREFIX_TABLE (PREFIX_VEX_0FF0) },
8704 { PREFIX_TABLE (PREFIX_VEX_0FF1) },
8705 { PREFIX_TABLE (PREFIX_VEX_0FF2) },
8706 { PREFIX_TABLE (PREFIX_VEX_0FF3) },
8707 { PREFIX_TABLE (PREFIX_VEX_0FF4) },
8708 { PREFIX_TABLE (PREFIX_VEX_0FF5) },
8709 { PREFIX_TABLE (PREFIX_VEX_0FF6) },
8710 { PREFIX_TABLE (PREFIX_VEX_0FF7) },
c0f3af97 8711 /* f8 */
592a252b
L
8712 { PREFIX_TABLE (PREFIX_VEX_0FF8) },
8713 { PREFIX_TABLE (PREFIX_VEX_0FF9) },
8714 { PREFIX_TABLE (PREFIX_VEX_0FFA) },
8715 { PREFIX_TABLE (PREFIX_VEX_0FFB) },
8716 { PREFIX_TABLE (PREFIX_VEX_0FFC) },
8717 { PREFIX_TABLE (PREFIX_VEX_0FFD) },
8718 { PREFIX_TABLE (PREFIX_VEX_0FFE) },
592d1631 8719 { Bad_Opcode },
c0f3af97
L
8720 },
8721 /* VEX_0F38 */
8722 {
8723 /* 00 */
592a252b
L
8724 { PREFIX_TABLE (PREFIX_VEX_0F3800) },
8725 { PREFIX_TABLE (PREFIX_VEX_0F3801) },
8726 { PREFIX_TABLE (PREFIX_VEX_0F3802) },
8727 { PREFIX_TABLE (PREFIX_VEX_0F3803) },
8728 { PREFIX_TABLE (PREFIX_VEX_0F3804) },
8729 { PREFIX_TABLE (PREFIX_VEX_0F3805) },
8730 { PREFIX_TABLE (PREFIX_VEX_0F3806) },
8731 { PREFIX_TABLE (PREFIX_VEX_0F3807) },
c0f3af97 8732 /* 08 */
592a252b
L
8733 { PREFIX_TABLE (PREFIX_VEX_0F3808) },
8734 { PREFIX_TABLE (PREFIX_VEX_0F3809) },
8735 { PREFIX_TABLE (PREFIX_VEX_0F380A) },
8736 { PREFIX_TABLE (PREFIX_VEX_0F380B) },
8737 { PREFIX_TABLE (PREFIX_VEX_0F380C) },
8738 { PREFIX_TABLE (PREFIX_VEX_0F380D) },
8739 { PREFIX_TABLE (PREFIX_VEX_0F380E) },
8740 { PREFIX_TABLE (PREFIX_VEX_0F380F) },
c0f3af97 8741 /* 10 */
592d1631
L
8742 { Bad_Opcode },
8743 { Bad_Opcode },
8744 { Bad_Opcode },
592a252b 8745 { PREFIX_TABLE (PREFIX_VEX_0F3813) },
592d1631
L
8746 { Bad_Opcode },
8747 { Bad_Opcode },
6c30d220 8748 { PREFIX_TABLE (PREFIX_VEX_0F3816) },
592a252b 8749 { PREFIX_TABLE (PREFIX_VEX_0F3817) },
c0f3af97 8750 /* 18 */
592a252b
L
8751 { PREFIX_TABLE (PREFIX_VEX_0F3818) },
8752 { PREFIX_TABLE (PREFIX_VEX_0F3819) },
8753 { PREFIX_TABLE (PREFIX_VEX_0F381A) },
592d1631 8754 { Bad_Opcode },
592a252b
L
8755 { PREFIX_TABLE (PREFIX_VEX_0F381C) },
8756 { PREFIX_TABLE (PREFIX_VEX_0F381D) },
8757 { PREFIX_TABLE (PREFIX_VEX_0F381E) },
592d1631 8758 { Bad_Opcode },
c0f3af97 8759 /* 20 */
592a252b
L
8760 { PREFIX_TABLE (PREFIX_VEX_0F3820) },
8761 { PREFIX_TABLE (PREFIX_VEX_0F3821) },
8762 { PREFIX_TABLE (PREFIX_VEX_0F3822) },
8763 { PREFIX_TABLE (PREFIX_VEX_0F3823) },
8764 { PREFIX_TABLE (PREFIX_VEX_0F3824) },
8765 { PREFIX_TABLE (PREFIX_VEX_0F3825) },
592d1631
L
8766 { Bad_Opcode },
8767 { Bad_Opcode },
c0f3af97 8768 /* 28 */
592a252b
L
8769 { PREFIX_TABLE (PREFIX_VEX_0F3828) },
8770 { PREFIX_TABLE (PREFIX_VEX_0F3829) },
8771 { PREFIX_TABLE (PREFIX_VEX_0F382A) },
8772 { PREFIX_TABLE (PREFIX_VEX_0F382B) },
8773 { PREFIX_TABLE (PREFIX_VEX_0F382C) },
8774 { PREFIX_TABLE (PREFIX_VEX_0F382D) },
8775 { PREFIX_TABLE (PREFIX_VEX_0F382E) },
8776 { PREFIX_TABLE (PREFIX_VEX_0F382F) },
c0f3af97 8777 /* 30 */
592a252b
L
8778 { PREFIX_TABLE (PREFIX_VEX_0F3830) },
8779 { PREFIX_TABLE (PREFIX_VEX_0F3831) },
8780 { PREFIX_TABLE (PREFIX_VEX_0F3832) },
8781 { PREFIX_TABLE (PREFIX_VEX_0F3833) },
8782 { PREFIX_TABLE (PREFIX_VEX_0F3834) },
8783 { PREFIX_TABLE (PREFIX_VEX_0F3835) },
6c30d220 8784 { PREFIX_TABLE (PREFIX_VEX_0F3836) },
592a252b 8785 { PREFIX_TABLE (PREFIX_VEX_0F3837) },
c0f3af97 8786 /* 38 */
592a252b
L
8787 { PREFIX_TABLE (PREFIX_VEX_0F3838) },
8788 { PREFIX_TABLE (PREFIX_VEX_0F3839) },
8789 { PREFIX_TABLE (PREFIX_VEX_0F383A) },
8790 { PREFIX_TABLE (PREFIX_VEX_0F383B) },
8791 { PREFIX_TABLE (PREFIX_VEX_0F383C) },
8792 { PREFIX_TABLE (PREFIX_VEX_0F383D) },
8793 { PREFIX_TABLE (PREFIX_VEX_0F383E) },
8794 { PREFIX_TABLE (PREFIX_VEX_0F383F) },
c0f3af97 8795 /* 40 */
592a252b
L
8796 { PREFIX_TABLE (PREFIX_VEX_0F3840) },
8797 { PREFIX_TABLE (PREFIX_VEX_0F3841) },
592d1631
L
8798 { Bad_Opcode },
8799 { Bad_Opcode },
8800 { Bad_Opcode },
6c30d220
L
8801 { PREFIX_TABLE (PREFIX_VEX_0F3845) },
8802 { PREFIX_TABLE (PREFIX_VEX_0F3846) },
8803 { PREFIX_TABLE (PREFIX_VEX_0F3847) },
c0f3af97 8804 /* 48 */
592d1631
L
8805 { Bad_Opcode },
8806 { Bad_Opcode },
8807 { Bad_Opcode },
8808 { Bad_Opcode },
8809 { Bad_Opcode },
8810 { Bad_Opcode },
8811 { Bad_Opcode },
8812 { Bad_Opcode },
c0f3af97 8813 /* 50 */
592d1631
L
8814 { Bad_Opcode },
8815 { Bad_Opcode },
8816 { Bad_Opcode },
8817 { Bad_Opcode },
8818 { Bad_Opcode },
8819 { Bad_Opcode },
8820 { Bad_Opcode },
8821 { Bad_Opcode },
c0f3af97 8822 /* 58 */
6c30d220
L
8823 { PREFIX_TABLE (PREFIX_VEX_0F3858) },
8824 { PREFIX_TABLE (PREFIX_VEX_0F3859) },
8825 { PREFIX_TABLE (PREFIX_VEX_0F385A) },
592d1631
L
8826 { Bad_Opcode },
8827 { Bad_Opcode },
8828 { Bad_Opcode },
8829 { Bad_Opcode },
8830 { Bad_Opcode },
c0f3af97 8831 /* 60 */
592d1631
L
8832 { Bad_Opcode },
8833 { Bad_Opcode },
8834 { Bad_Opcode },
8835 { Bad_Opcode },
8836 { Bad_Opcode },
8837 { Bad_Opcode },
8838 { Bad_Opcode },
8839 { Bad_Opcode },
c0f3af97 8840 /* 68 */
592d1631
L
8841 { Bad_Opcode },
8842 { Bad_Opcode },
8843 { Bad_Opcode },
8844 { Bad_Opcode },
8845 { Bad_Opcode },
8846 { Bad_Opcode },
8847 { Bad_Opcode },
8848 { Bad_Opcode },
c0f3af97 8849 /* 70 */
592d1631
L
8850 { Bad_Opcode },
8851 { Bad_Opcode },
8852 { Bad_Opcode },
8853 { Bad_Opcode },
8854 { Bad_Opcode },
8855 { Bad_Opcode },
8856 { Bad_Opcode },
8857 { Bad_Opcode },
c0f3af97 8858 /* 78 */
6c30d220
L
8859 { PREFIX_TABLE (PREFIX_VEX_0F3878) },
8860 { PREFIX_TABLE (PREFIX_VEX_0F3879) },
592d1631
L
8861 { Bad_Opcode },
8862 { Bad_Opcode },
8863 { Bad_Opcode },
8864 { Bad_Opcode },
8865 { Bad_Opcode },
8866 { Bad_Opcode },
c0f3af97 8867 /* 80 */
592d1631
L
8868 { Bad_Opcode },
8869 { Bad_Opcode },
8870 { Bad_Opcode },
8871 { Bad_Opcode },
8872 { Bad_Opcode },
8873 { Bad_Opcode },
8874 { Bad_Opcode },
8875 { Bad_Opcode },
c0f3af97 8876 /* 88 */
592d1631
L
8877 { Bad_Opcode },
8878 { Bad_Opcode },
8879 { Bad_Opcode },
8880 { Bad_Opcode },
6c30d220 8881 { PREFIX_TABLE (PREFIX_VEX_0F388C) },
592d1631 8882 { Bad_Opcode },
6c30d220 8883 { PREFIX_TABLE (PREFIX_VEX_0F388E) },
592d1631 8884 { Bad_Opcode },
c0f3af97 8885 /* 90 */
6c30d220
L
8886 { PREFIX_TABLE (PREFIX_VEX_0F3890) },
8887 { PREFIX_TABLE (PREFIX_VEX_0F3891) },
8888 { PREFIX_TABLE (PREFIX_VEX_0F3892) },
8889 { PREFIX_TABLE (PREFIX_VEX_0F3893) },
592d1631
L
8890 { Bad_Opcode },
8891 { Bad_Opcode },
592a252b
L
8892 { PREFIX_TABLE (PREFIX_VEX_0F3896) },
8893 { PREFIX_TABLE (PREFIX_VEX_0F3897) },
c0f3af97 8894 /* 98 */
592a252b
L
8895 { PREFIX_TABLE (PREFIX_VEX_0F3898) },
8896 { PREFIX_TABLE (PREFIX_VEX_0F3899) },
8897 { PREFIX_TABLE (PREFIX_VEX_0F389A) },
8898 { PREFIX_TABLE (PREFIX_VEX_0F389B) },
8899 { PREFIX_TABLE (PREFIX_VEX_0F389C) },
8900 { PREFIX_TABLE (PREFIX_VEX_0F389D) },
8901 { PREFIX_TABLE (PREFIX_VEX_0F389E) },
8902 { PREFIX_TABLE (PREFIX_VEX_0F389F) },
c0f3af97 8903 /* a0 */
592d1631
L
8904 { Bad_Opcode },
8905 { Bad_Opcode },
8906 { Bad_Opcode },
8907 { Bad_Opcode },
8908 { Bad_Opcode },
8909 { Bad_Opcode },
592a252b
L
8910 { PREFIX_TABLE (PREFIX_VEX_0F38A6) },
8911 { PREFIX_TABLE (PREFIX_VEX_0F38A7) },
c0f3af97 8912 /* a8 */
592a252b
L
8913 { PREFIX_TABLE (PREFIX_VEX_0F38A8) },
8914 { PREFIX_TABLE (PREFIX_VEX_0F38A9) },
8915 { PREFIX_TABLE (PREFIX_VEX_0F38AA) },
8916 { PREFIX_TABLE (PREFIX_VEX_0F38AB) },
8917 { PREFIX_TABLE (PREFIX_VEX_0F38AC) },
8918 { PREFIX_TABLE (PREFIX_VEX_0F38AD) },
8919 { PREFIX_TABLE (PREFIX_VEX_0F38AE) },
8920 { PREFIX_TABLE (PREFIX_VEX_0F38AF) },
c0f3af97 8921 /* b0 */
592d1631
L
8922 { Bad_Opcode },
8923 { Bad_Opcode },
8924 { Bad_Opcode },
8925 { Bad_Opcode },
8926 { Bad_Opcode },
8927 { Bad_Opcode },
592a252b
L
8928 { PREFIX_TABLE (PREFIX_VEX_0F38B6) },
8929 { PREFIX_TABLE (PREFIX_VEX_0F38B7) },
c0f3af97 8930 /* b8 */
592a252b
L
8931 { PREFIX_TABLE (PREFIX_VEX_0F38B8) },
8932 { PREFIX_TABLE (PREFIX_VEX_0F38B9) },
8933 { PREFIX_TABLE (PREFIX_VEX_0F38BA) },
8934 { PREFIX_TABLE (PREFIX_VEX_0F38BB) },
8935 { PREFIX_TABLE (PREFIX_VEX_0F38BC) },
8936 { PREFIX_TABLE (PREFIX_VEX_0F38BD) },
8937 { PREFIX_TABLE (PREFIX_VEX_0F38BE) },
8938 { PREFIX_TABLE (PREFIX_VEX_0F38BF) },
c0f3af97 8939 /* c0 */
592d1631
L
8940 { Bad_Opcode },
8941 { Bad_Opcode },
8942 { Bad_Opcode },
8943 { Bad_Opcode },
8944 { Bad_Opcode },
8945 { Bad_Opcode },
8946 { Bad_Opcode },
8947 { Bad_Opcode },
c0f3af97 8948 /* c8 */
592d1631
L
8949 { Bad_Opcode },
8950 { Bad_Opcode },
8951 { Bad_Opcode },
8952 { Bad_Opcode },
8953 { Bad_Opcode },
8954 { Bad_Opcode },
8955 { Bad_Opcode },
48521003 8956 { PREFIX_TABLE (PREFIX_VEX_0F38CF) },
c0f3af97 8957 /* d0 */
592d1631
L
8958 { Bad_Opcode },
8959 { Bad_Opcode },
8960 { Bad_Opcode },
8961 { Bad_Opcode },
8962 { Bad_Opcode },
8963 { Bad_Opcode },
8964 { Bad_Opcode },
8965 { Bad_Opcode },
c0f3af97 8966 /* d8 */
592d1631
L
8967 { Bad_Opcode },
8968 { Bad_Opcode },
8969 { Bad_Opcode },
592a252b
L
8970 { PREFIX_TABLE (PREFIX_VEX_0F38DB) },
8971 { PREFIX_TABLE (PREFIX_VEX_0F38DC) },
8972 { PREFIX_TABLE (PREFIX_VEX_0F38DD) },
8973 { PREFIX_TABLE (PREFIX_VEX_0F38DE) },
8974 { PREFIX_TABLE (PREFIX_VEX_0F38DF) },
c0f3af97 8975 /* e0 */
592d1631
L
8976 { Bad_Opcode },
8977 { Bad_Opcode },
8978 { Bad_Opcode },
8979 { Bad_Opcode },
8980 { Bad_Opcode },
8981 { Bad_Opcode },
8982 { Bad_Opcode },
8983 { Bad_Opcode },
c0f3af97 8984 /* e8 */
592d1631
L
8985 { Bad_Opcode },
8986 { Bad_Opcode },
8987 { Bad_Opcode },
8988 { Bad_Opcode },
8989 { Bad_Opcode },
8990 { Bad_Opcode },
8991 { Bad_Opcode },
8992 { Bad_Opcode },
c0f3af97 8993 /* f0 */
592d1631
L
8994 { Bad_Opcode },
8995 { Bad_Opcode },
f12dc422
L
8996 { PREFIX_TABLE (PREFIX_VEX_0F38F2) },
8997 { REG_TABLE (REG_VEX_0F38F3) },
592d1631 8998 { Bad_Opcode },
6c30d220
L
8999 { PREFIX_TABLE (PREFIX_VEX_0F38F5) },
9000 { PREFIX_TABLE (PREFIX_VEX_0F38F6) },
f12dc422 9001 { PREFIX_TABLE (PREFIX_VEX_0F38F7) },
c0f3af97 9002 /* f8 */
592d1631
L
9003 { Bad_Opcode },
9004 { Bad_Opcode },
9005 { Bad_Opcode },
9006 { Bad_Opcode },
9007 { Bad_Opcode },
9008 { Bad_Opcode },
9009 { Bad_Opcode },
9010 { Bad_Opcode },
c0f3af97
L
9011 },
9012 /* VEX_0F3A */
9013 {
9014 /* 00 */
6c30d220
L
9015 { PREFIX_TABLE (PREFIX_VEX_0F3A00) },
9016 { PREFIX_TABLE (PREFIX_VEX_0F3A01) },
9017 { PREFIX_TABLE (PREFIX_VEX_0F3A02) },
592d1631 9018 { Bad_Opcode },
592a252b
L
9019 { PREFIX_TABLE (PREFIX_VEX_0F3A04) },
9020 { PREFIX_TABLE (PREFIX_VEX_0F3A05) },
9021 { PREFIX_TABLE (PREFIX_VEX_0F3A06) },
592d1631 9022 { Bad_Opcode },
c0f3af97 9023 /* 08 */
592a252b
L
9024 { PREFIX_TABLE (PREFIX_VEX_0F3A08) },
9025 { PREFIX_TABLE (PREFIX_VEX_0F3A09) },
9026 { PREFIX_TABLE (PREFIX_VEX_0F3A0A) },
9027 { PREFIX_TABLE (PREFIX_VEX_0F3A0B) },
9028 { PREFIX_TABLE (PREFIX_VEX_0F3A0C) },
9029 { PREFIX_TABLE (PREFIX_VEX_0F3A0D) },
9030 { PREFIX_TABLE (PREFIX_VEX_0F3A0E) },
9031 { PREFIX_TABLE (PREFIX_VEX_0F3A0F) },
c0f3af97 9032 /* 10 */
592d1631
L
9033 { Bad_Opcode },
9034 { Bad_Opcode },
9035 { Bad_Opcode },
9036 { Bad_Opcode },
592a252b
L
9037 { PREFIX_TABLE (PREFIX_VEX_0F3A14) },
9038 { PREFIX_TABLE (PREFIX_VEX_0F3A15) },
9039 { PREFIX_TABLE (PREFIX_VEX_0F3A16) },
9040 { PREFIX_TABLE (PREFIX_VEX_0F3A17) },
c0f3af97 9041 /* 18 */
592a252b
L
9042 { PREFIX_TABLE (PREFIX_VEX_0F3A18) },
9043 { PREFIX_TABLE (PREFIX_VEX_0F3A19) },
592d1631
L
9044 { Bad_Opcode },
9045 { Bad_Opcode },
9046 { Bad_Opcode },
592a252b 9047 { PREFIX_TABLE (PREFIX_VEX_0F3A1D) },
592d1631
L
9048 { Bad_Opcode },
9049 { Bad_Opcode },
c0f3af97 9050 /* 20 */
592a252b
L
9051 { PREFIX_TABLE (PREFIX_VEX_0F3A20) },
9052 { PREFIX_TABLE (PREFIX_VEX_0F3A21) },
9053 { PREFIX_TABLE (PREFIX_VEX_0F3A22) },
592d1631
L
9054 { Bad_Opcode },
9055 { Bad_Opcode },
9056 { Bad_Opcode },
9057 { Bad_Opcode },
9058 { Bad_Opcode },
c0f3af97 9059 /* 28 */
592d1631
L
9060 { Bad_Opcode },
9061 { Bad_Opcode },
9062 { Bad_Opcode },
9063 { Bad_Opcode },
9064 { Bad_Opcode },
9065 { Bad_Opcode },
9066 { Bad_Opcode },
9067 { Bad_Opcode },
c0f3af97 9068 /* 30 */
43234a1e 9069 { PREFIX_TABLE (PREFIX_VEX_0F3A30) },
1ba585e8 9070 { PREFIX_TABLE (PREFIX_VEX_0F3A31) },
43234a1e 9071 { PREFIX_TABLE (PREFIX_VEX_0F3A32) },
1ba585e8 9072 { PREFIX_TABLE (PREFIX_VEX_0F3A33) },
592d1631
L
9073 { Bad_Opcode },
9074 { Bad_Opcode },
9075 { Bad_Opcode },
9076 { Bad_Opcode },
c0f3af97 9077 /* 38 */
6c30d220
L
9078 { PREFIX_TABLE (PREFIX_VEX_0F3A38) },
9079 { PREFIX_TABLE (PREFIX_VEX_0F3A39) },
592d1631
L
9080 { Bad_Opcode },
9081 { Bad_Opcode },
9082 { Bad_Opcode },
9083 { Bad_Opcode },
9084 { Bad_Opcode },
9085 { Bad_Opcode },
c0f3af97 9086 /* 40 */
592a252b
L
9087 { PREFIX_TABLE (PREFIX_VEX_0F3A40) },
9088 { PREFIX_TABLE (PREFIX_VEX_0F3A41) },
9089 { PREFIX_TABLE (PREFIX_VEX_0F3A42) },
592d1631 9090 { Bad_Opcode },
592a252b 9091 { PREFIX_TABLE (PREFIX_VEX_0F3A44) },
592d1631 9092 { Bad_Opcode },
6c30d220 9093 { PREFIX_TABLE (PREFIX_VEX_0F3A46) },
592d1631 9094 { Bad_Opcode },
c0f3af97 9095 /* 48 */
592a252b
L
9096 { PREFIX_TABLE (PREFIX_VEX_0F3A48) },
9097 { PREFIX_TABLE (PREFIX_VEX_0F3A49) },
9098 { PREFIX_TABLE (PREFIX_VEX_0F3A4A) },
9099 { PREFIX_TABLE (PREFIX_VEX_0F3A4B) },
9100 { PREFIX_TABLE (PREFIX_VEX_0F3A4C) },
592d1631
L
9101 { Bad_Opcode },
9102 { Bad_Opcode },
9103 { Bad_Opcode },
c0f3af97 9104 /* 50 */
592d1631
L
9105 { Bad_Opcode },
9106 { Bad_Opcode },
9107 { Bad_Opcode },
9108 { Bad_Opcode },
9109 { Bad_Opcode },
9110 { Bad_Opcode },
9111 { Bad_Opcode },
9112 { Bad_Opcode },
c0f3af97 9113 /* 58 */
592d1631
L
9114 { Bad_Opcode },
9115 { Bad_Opcode },
9116 { Bad_Opcode },
9117 { Bad_Opcode },
592a252b
L
9118 { PREFIX_TABLE (PREFIX_VEX_0F3A5C) },
9119 { PREFIX_TABLE (PREFIX_VEX_0F3A5D) },
9120 { PREFIX_TABLE (PREFIX_VEX_0F3A5E) },
9121 { PREFIX_TABLE (PREFIX_VEX_0F3A5F) },
c0f3af97 9122 /* 60 */
592a252b
L
9123 { PREFIX_TABLE (PREFIX_VEX_0F3A60) },
9124 { PREFIX_TABLE (PREFIX_VEX_0F3A61) },
9125 { PREFIX_TABLE (PREFIX_VEX_0F3A62) },
9126 { PREFIX_TABLE (PREFIX_VEX_0F3A63) },
592d1631
L
9127 { Bad_Opcode },
9128 { Bad_Opcode },
9129 { Bad_Opcode },
9130 { Bad_Opcode },
c0f3af97 9131 /* 68 */
592a252b
L
9132 { PREFIX_TABLE (PREFIX_VEX_0F3A68) },
9133 { PREFIX_TABLE (PREFIX_VEX_0F3A69) },
9134 { PREFIX_TABLE (PREFIX_VEX_0F3A6A) },
9135 { PREFIX_TABLE (PREFIX_VEX_0F3A6B) },
9136 { PREFIX_TABLE (PREFIX_VEX_0F3A6C) },
9137 { PREFIX_TABLE (PREFIX_VEX_0F3A6D) },
9138 { PREFIX_TABLE (PREFIX_VEX_0F3A6E) },
9139 { PREFIX_TABLE (PREFIX_VEX_0F3A6F) },
c0f3af97 9140 /* 70 */
592d1631
L
9141 { Bad_Opcode },
9142 { Bad_Opcode },
9143 { Bad_Opcode },
9144 { Bad_Opcode },
9145 { Bad_Opcode },
9146 { Bad_Opcode },
9147 { Bad_Opcode },
9148 { Bad_Opcode },
c0f3af97 9149 /* 78 */
592a252b
L
9150 { PREFIX_TABLE (PREFIX_VEX_0F3A78) },
9151 { PREFIX_TABLE (PREFIX_VEX_0F3A79) },
9152 { PREFIX_TABLE (PREFIX_VEX_0F3A7A) },
9153 { PREFIX_TABLE (PREFIX_VEX_0F3A7B) },
9154 { PREFIX_TABLE (PREFIX_VEX_0F3A7C) },
9155 { PREFIX_TABLE (PREFIX_VEX_0F3A7D) },
9156 { PREFIX_TABLE (PREFIX_VEX_0F3A7E) },
9157 { PREFIX_TABLE (PREFIX_VEX_0F3A7F) },
c0f3af97 9158 /* 80 */
592d1631
L
9159 { Bad_Opcode },
9160 { Bad_Opcode },
9161 { Bad_Opcode },
9162 { Bad_Opcode },
9163 { Bad_Opcode },
9164 { Bad_Opcode },
9165 { Bad_Opcode },
9166 { Bad_Opcode },
c0f3af97 9167 /* 88 */
592d1631
L
9168 { Bad_Opcode },
9169 { Bad_Opcode },
9170 { Bad_Opcode },
9171 { Bad_Opcode },
9172 { Bad_Opcode },
9173 { Bad_Opcode },
9174 { Bad_Opcode },
9175 { Bad_Opcode },
c0f3af97 9176 /* 90 */
592d1631
L
9177 { Bad_Opcode },
9178 { Bad_Opcode },
9179 { Bad_Opcode },
9180 { Bad_Opcode },
9181 { Bad_Opcode },
9182 { Bad_Opcode },
9183 { Bad_Opcode },
9184 { Bad_Opcode },
c0f3af97 9185 /* 98 */
592d1631
L
9186 { Bad_Opcode },
9187 { Bad_Opcode },
9188 { Bad_Opcode },
9189 { Bad_Opcode },
9190 { Bad_Opcode },
9191 { Bad_Opcode },
9192 { Bad_Opcode },
9193 { Bad_Opcode },
c0f3af97 9194 /* a0 */
592d1631
L
9195 { Bad_Opcode },
9196 { Bad_Opcode },
9197 { Bad_Opcode },
9198 { Bad_Opcode },
9199 { Bad_Opcode },
9200 { Bad_Opcode },
9201 { Bad_Opcode },
9202 { Bad_Opcode },
c0f3af97 9203 /* a8 */
592d1631
L
9204 { Bad_Opcode },
9205 { Bad_Opcode },
9206 { Bad_Opcode },
9207 { Bad_Opcode },
9208 { Bad_Opcode },
9209 { Bad_Opcode },
9210 { Bad_Opcode },
9211 { Bad_Opcode },
c0f3af97 9212 /* b0 */
592d1631
L
9213 { Bad_Opcode },
9214 { Bad_Opcode },
9215 { Bad_Opcode },
9216 { Bad_Opcode },
9217 { Bad_Opcode },
9218 { Bad_Opcode },
9219 { Bad_Opcode },
9220 { Bad_Opcode },
c0f3af97 9221 /* b8 */
592d1631
L
9222 { Bad_Opcode },
9223 { Bad_Opcode },
9224 { Bad_Opcode },
9225 { Bad_Opcode },
9226 { Bad_Opcode },
9227 { Bad_Opcode },
9228 { Bad_Opcode },
9229 { Bad_Opcode },
c0f3af97 9230 /* c0 */
592d1631
L
9231 { Bad_Opcode },
9232 { Bad_Opcode },
9233 { Bad_Opcode },
9234 { Bad_Opcode },
9235 { Bad_Opcode },
9236 { Bad_Opcode },
9237 { Bad_Opcode },
9238 { Bad_Opcode },
c0f3af97 9239 /* c8 */
592d1631
L
9240 { Bad_Opcode },
9241 { Bad_Opcode },
9242 { Bad_Opcode },
9243 { Bad_Opcode },
9244 { Bad_Opcode },
9245 { Bad_Opcode },
48521003
IT
9246 { PREFIX_TABLE(PREFIX_VEX_0F3ACE) },
9247 { PREFIX_TABLE(PREFIX_VEX_0F3ACF) },
c0f3af97 9248 /* d0 */
592d1631
L
9249 { Bad_Opcode },
9250 { Bad_Opcode },
9251 { Bad_Opcode },
9252 { Bad_Opcode },
9253 { Bad_Opcode },
9254 { Bad_Opcode },
9255 { Bad_Opcode },
9256 { Bad_Opcode },
c0f3af97 9257 /* d8 */
592d1631
L
9258 { Bad_Opcode },
9259 { Bad_Opcode },
9260 { Bad_Opcode },
9261 { Bad_Opcode },
9262 { Bad_Opcode },
9263 { Bad_Opcode },
9264 { Bad_Opcode },
592a252b 9265 { PREFIX_TABLE (PREFIX_VEX_0F3ADF) },
c0f3af97 9266 /* e0 */
592d1631
L
9267 { Bad_Opcode },
9268 { Bad_Opcode },
9269 { Bad_Opcode },
9270 { Bad_Opcode },
9271 { Bad_Opcode },
9272 { Bad_Opcode },
9273 { Bad_Opcode },
9274 { Bad_Opcode },
c0f3af97 9275 /* e8 */
592d1631
L
9276 { Bad_Opcode },
9277 { Bad_Opcode },
9278 { Bad_Opcode },
9279 { Bad_Opcode },
9280 { Bad_Opcode },
9281 { Bad_Opcode },
9282 { Bad_Opcode },
9283 { Bad_Opcode },
c0f3af97 9284 /* f0 */
6c30d220 9285 { PREFIX_TABLE (PREFIX_VEX_0F3AF0) },
592d1631
L
9286 { Bad_Opcode },
9287 { Bad_Opcode },
9288 { Bad_Opcode },
9289 { Bad_Opcode },
9290 { Bad_Opcode },
9291 { Bad_Opcode },
9292 { Bad_Opcode },
c0f3af97 9293 /* f8 */
592d1631
L
9294 { Bad_Opcode },
9295 { Bad_Opcode },
9296 { Bad_Opcode },
9297 { Bad_Opcode },
9298 { Bad_Opcode },
9299 { Bad_Opcode },
9300 { Bad_Opcode },
9301 { Bad_Opcode },
c0f3af97
L
9302 },
9303};
9304
43234a1e 9305#include "i386-dis-evex.h"
ad692897 9306
c0f3af97 9307static const struct dis386 vex_len_table[][2] = {
592a252b 9308 /* VEX_LEN_0F12_P_0_M_0 */
c0f3af97 9309 {
ec6f095a 9310 { "vmovlps", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9311 },
9312
592a252b 9313 /* VEX_LEN_0F12_P_0_M_1 */
c0f3af97 9314 {
ec6f095a 9315 { "vmovhlps", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9316 },
9317
592a252b 9318 /* VEX_LEN_0F12_P_2 */
c0f3af97 9319 {
ec6f095a 9320 { "vmovlpd", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9321 },
9322
592a252b 9323 /* VEX_LEN_0F13_M_0 */
c0f3af97 9324 {
ec6f095a 9325 { "vmovlpX", { EXq, XM }, 0 },
c0f3af97
L
9326 },
9327
592a252b 9328 /* VEX_LEN_0F16_P_0_M_0 */
c0f3af97 9329 {
ec6f095a 9330 { "vmovhps", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9331 },
9332
592a252b 9333 /* VEX_LEN_0F16_P_0_M_1 */
c0f3af97 9334 {
ec6f095a 9335 { "vmovlhps", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9336 },
9337
592a252b 9338 /* VEX_LEN_0F16_P_2 */
c0f3af97 9339 {
ec6f095a 9340 { "vmovhpd", { XM, Vex128, EXq }, 0 },
c0f3af97
L
9341 },
9342
592a252b 9343 /* VEX_LEN_0F17_M_0 */
c0f3af97 9344 {
ec6f095a 9345 { "vmovhpX", { EXq, XM }, 0 },
c0f3af97
L
9346 },
9347
43234a1e
L
9348 /* VEX_LEN_0F41_P_0 */
9349 {
9350 { Bad_Opcode },
9351 { VEX_W_TABLE (VEX_W_0F41_P_0_LEN_1) },
9352 },
1ba585e8
IT
9353 /* VEX_LEN_0F41_P_2 */
9354 {
9355 { Bad_Opcode },
9356 { VEX_W_TABLE (VEX_W_0F41_P_2_LEN_1) },
9357 },
43234a1e
L
9358 /* VEX_LEN_0F42_P_0 */
9359 {
9360 { Bad_Opcode },
9361 { VEX_W_TABLE (VEX_W_0F42_P_0_LEN_1) },
9362 },
1ba585e8
IT
9363 /* VEX_LEN_0F42_P_2 */
9364 {
9365 { Bad_Opcode },
9366 { VEX_W_TABLE (VEX_W_0F42_P_2_LEN_1) },
9367 },
43234a1e
L
9368 /* VEX_LEN_0F44_P_0 */
9369 {
9370 { VEX_W_TABLE (VEX_W_0F44_P_0_LEN_0) },
9371 },
1ba585e8
IT
9372 /* VEX_LEN_0F44_P_2 */
9373 {
9374 { VEX_W_TABLE (VEX_W_0F44_P_2_LEN_0) },
9375 },
43234a1e
L
9376 /* VEX_LEN_0F45_P_0 */
9377 {
9378 { Bad_Opcode },
9379 { VEX_W_TABLE (VEX_W_0F45_P_0_LEN_1) },
9380 },
1ba585e8
IT
9381 /* VEX_LEN_0F45_P_2 */
9382 {
9383 { Bad_Opcode },
9384 { VEX_W_TABLE (VEX_W_0F45_P_2_LEN_1) },
9385 },
43234a1e
L
9386 /* VEX_LEN_0F46_P_0 */
9387 {
9388 { Bad_Opcode },
9389 { VEX_W_TABLE (VEX_W_0F46_P_0_LEN_1) },
9390 },
1ba585e8
IT
9391 /* VEX_LEN_0F46_P_2 */
9392 {
9393 { Bad_Opcode },
9394 { VEX_W_TABLE (VEX_W_0F46_P_2_LEN_1) },
9395 },
43234a1e
L
9396 /* VEX_LEN_0F47_P_0 */
9397 {
9398 { Bad_Opcode },
9399 { VEX_W_TABLE (VEX_W_0F47_P_0_LEN_1) },
9400 },
1ba585e8
IT
9401 /* VEX_LEN_0F47_P_2 */
9402 {
9403 { Bad_Opcode },
9404 { VEX_W_TABLE (VEX_W_0F47_P_2_LEN_1) },
9405 },
9406 /* VEX_LEN_0F4A_P_0 */
9407 {
9408 { Bad_Opcode },
9409 { VEX_W_TABLE (VEX_W_0F4A_P_0_LEN_1) },
9410 },
9411 /* VEX_LEN_0F4A_P_2 */
9412 {
9413 { Bad_Opcode },
9414 { VEX_W_TABLE (VEX_W_0F4A_P_2_LEN_1) },
9415 },
9416 /* VEX_LEN_0F4B_P_0 */
9417 {
9418 { Bad_Opcode },
9419 { VEX_W_TABLE (VEX_W_0F4B_P_0_LEN_1) },
9420 },
43234a1e
L
9421 /* VEX_LEN_0F4B_P_2 */
9422 {
9423 { Bad_Opcode },
9424 { VEX_W_TABLE (VEX_W_0F4B_P_2_LEN_1) },
9425 },
9426
ec6f095a 9427 /* VEX_LEN_0F6E_P_2 */
c0f3af97 9428 {
ec6f095a 9429 { "vmovK", { XMScalar, Edq }, 0 },
c0f3af97
L
9430 },
9431
ec6f095a 9432 /* VEX_LEN_0F77_P_1 */
c0f3af97 9433 {
ec6f095a
L
9434 { "vzeroupper", { XX }, 0 },
9435 { "vzeroall", { XX }, 0 },
c0f3af97
L
9436 },
9437
ec6f095a 9438 /* VEX_LEN_0F7E_P_1 */
c0f3af97 9439 {
ec6f095a 9440 { "vmovq", { XMScalar, EXqScalar }, 0 },
c0f3af97
L
9441 },
9442
ec6f095a 9443 /* VEX_LEN_0F7E_P_2 */
c0f3af97 9444 {
ec6f095a 9445 { "vmovK", { Edq, XMScalar }, 0 },
c0f3af97
L
9446 },
9447
ec6f095a 9448 /* VEX_LEN_0F90_P_0 */
c0f3af97 9449 {
ec6f095a 9450 { VEX_W_TABLE (VEX_W_0F90_P_0_LEN_0) },
c0f3af97
L
9451 },
9452
ec6f095a 9453 /* VEX_LEN_0F90_P_2 */
c0f3af97 9454 {
ec6f095a 9455 { VEX_W_TABLE (VEX_W_0F90_P_2_LEN_0) },
c0f3af97
L
9456 },
9457
ec6f095a 9458 /* VEX_LEN_0F91_P_0 */
c0f3af97 9459 {
ec6f095a 9460 { VEX_W_TABLE (VEX_W_0F91_P_0_LEN_0) },
c0f3af97
L
9461 },
9462
ec6f095a 9463 /* VEX_LEN_0F91_P_2 */
c0f3af97 9464 {
ec6f095a 9465 { VEX_W_TABLE (VEX_W_0F91_P_2_LEN_0) },
c0f3af97
L
9466 },
9467
ec6f095a 9468 /* VEX_LEN_0F92_P_0 */
c0f3af97 9469 {
ec6f095a 9470 { VEX_W_TABLE (VEX_W_0F92_P_0_LEN_0) },
c0f3af97
L
9471 },
9472
ec6f095a 9473 /* VEX_LEN_0F92_P_2 */
c0f3af97 9474 {
ec6f095a 9475 { VEX_W_TABLE (VEX_W_0F92_P_2_LEN_0) },
c0f3af97
L
9476 },
9477
ec6f095a 9478 /* VEX_LEN_0F92_P_3 */
c0f3af97 9479 {
58a211d2 9480 { MOD_TABLE (MOD_VEX_0F92_P_3_LEN_0) },
c0f3af97
L
9481 },
9482
ec6f095a 9483 /* VEX_LEN_0F93_P_0 */
c0f3af97 9484 {
ec6f095a 9485 { VEX_W_TABLE (VEX_W_0F93_P_0_LEN_0) },
c0f3af97
L
9486 },
9487
ec6f095a 9488 /* VEX_LEN_0F93_P_2 */
c0f3af97 9489 {
ec6f095a 9490 { VEX_W_TABLE (VEX_W_0F93_P_2_LEN_0) },
c0f3af97
L
9491 },
9492
ec6f095a 9493 /* VEX_LEN_0F93_P_3 */
c0f3af97 9494 {
58a211d2 9495 { MOD_TABLE (MOD_VEX_0F93_P_3_LEN_0) },
c0f3af97
L
9496 },
9497
ec6f095a 9498 /* VEX_LEN_0F98_P_0 */
43234a1e
L
9499 {
9500 { VEX_W_TABLE (VEX_W_0F98_P_0_LEN_0) },
9501 },
9502
1ba585e8
IT
9503 /* VEX_LEN_0F98_P_2 */
9504 {
9505 { VEX_W_TABLE (VEX_W_0F98_P_2_LEN_0) },
9506 },
9507
9508 /* VEX_LEN_0F99_P_0 */
9509 {
9510 { VEX_W_TABLE (VEX_W_0F99_P_0_LEN_0) },
9511 },
9512
9513 /* VEX_LEN_0F99_P_2 */
9514 {
9515 { VEX_W_TABLE (VEX_W_0F99_P_2_LEN_0) },
9516 },
9517
6c30d220 9518 /* VEX_LEN_0FAE_R_2_M_0 */
c0f3af97 9519 {
ec6f095a 9520 { "vldmxcsr", { Md }, 0 },
c0f3af97
L
9521 },
9522
6c30d220 9523 /* VEX_LEN_0FAE_R_3_M_0 */
c0f3af97 9524 {
ec6f095a 9525 { "vstmxcsr", { Md }, 0 },
c0f3af97
L
9526 },
9527
6c30d220 9528 /* VEX_LEN_0FC4_P_2 */
c0f3af97 9529 {
b50c9f31 9530 { "vpinsrw", { XM, Vex128, Edqw, Ib }, 0 },
c0f3af97
L
9531 },
9532
6c30d220 9533 /* VEX_LEN_0FC5_P_2 */
c0f3af97 9534 {
b50c9f31 9535 { "vpextrw", { Gdq, XS, Ib }, 0 },
c0f3af97
L
9536 },
9537
6c30d220 9538 /* VEX_LEN_0FD6_P_2 */
c0f3af97 9539 {
ec6f095a 9540 { "vmovq", { EXqScalarS, XMScalar }, 0 },
c0f3af97
L
9541 },
9542
6c30d220 9543 /* VEX_LEN_0FF7_P_2 */
c0f3af97 9544 {
ec6f095a 9545 { "vmaskmovdqu", { XM, XS }, 0 },
c0f3af97
L
9546 },
9547
6c30d220 9548 /* VEX_LEN_0F3816_P_2 */
c0f3af97 9549 {
6c30d220
L
9550 { Bad_Opcode },
9551 { VEX_W_TABLE (VEX_W_0F3816_P_2) },
c0f3af97
L
9552 },
9553
6c30d220 9554 /* VEX_LEN_0F3819_P_2 */
c0f3af97 9555 {
6c30d220
L
9556 { Bad_Opcode },
9557 { VEX_W_TABLE (VEX_W_0F3819_P_2) },
c0f3af97
L
9558 },
9559
6c30d220 9560 /* VEX_LEN_0F381A_P_2_M_0 */
c0f3af97 9561 {
6c30d220
L
9562 { Bad_Opcode },
9563 { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0) },
c0f3af97
L
9564 },
9565
6c30d220 9566 /* VEX_LEN_0F3836_P_2 */
c0f3af97 9567 {
6c30d220
L
9568 { Bad_Opcode },
9569 { VEX_W_TABLE (VEX_W_0F3836_P_2) },
c0f3af97
L
9570 },
9571
592a252b 9572 /* VEX_LEN_0F3841_P_2 */
c0f3af97 9573 {
ec6f095a 9574 { "vphminposuw", { XM, EXx }, 0 },
c0f3af97
L
9575 },
9576
6c30d220
L
9577 /* VEX_LEN_0F385A_P_2_M_0 */
9578 {
9579 { Bad_Opcode },
9580 { VEX_W_TABLE (VEX_W_0F385A_P_2_M_0) },
9581 },
9582
592a252b 9583 /* VEX_LEN_0F38DB_P_2 */
a5ff0eb2 9584 {
ec6f095a 9585 { "vaesimc", { XM, EXx }, 0 },
a5ff0eb2
L
9586 },
9587
f12dc422
L
9588 /* VEX_LEN_0F38F2_P_0 */
9589 {
bf890a93 9590 { "andnS", { Gdq, VexGdq, Edq }, 0 },
f12dc422
L
9591 },
9592
9593 /* VEX_LEN_0F38F3_R_1_P_0 */
9594 {
bf890a93 9595 { "blsrS", { VexGdq, Edq }, 0 },
f12dc422
L
9596 },
9597
9598 /* VEX_LEN_0F38F3_R_2_P_0 */
9599 {
bf890a93 9600 { "blsmskS", { VexGdq, Edq }, 0 },
f12dc422
L
9601 },
9602
9603 /* VEX_LEN_0F38F3_R_3_P_0 */
9604 {
bf890a93 9605 { "blsiS", { VexGdq, Edq }, 0 },
f12dc422
L
9606 },
9607
6c30d220
L
9608 /* VEX_LEN_0F38F5_P_0 */
9609 {
bf890a93 9610 { "bzhiS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9611 },
9612
9613 /* VEX_LEN_0F38F5_P_1 */
9614 {
bf890a93 9615 { "pextS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
9616 },
9617
9618 /* VEX_LEN_0F38F5_P_3 */
9619 {
bf890a93 9620 { "pdepS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
9621 },
9622
9623 /* VEX_LEN_0F38F6_P_3 */
9624 {
bf890a93 9625 { "mulxS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
9626 },
9627
f12dc422
L
9628 /* VEX_LEN_0F38F7_P_0 */
9629 {
bf890a93 9630 { "bextrS", { Gdq, Edq, VexGdq }, 0 },
f12dc422
L
9631 },
9632
6c30d220
L
9633 /* VEX_LEN_0F38F7_P_1 */
9634 {
bf890a93 9635 { "sarxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9636 },
9637
9638 /* VEX_LEN_0F38F7_P_2 */
9639 {
bf890a93 9640 { "shlxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9641 },
9642
9643 /* VEX_LEN_0F38F7_P_3 */
9644 {
bf890a93 9645 { "shrxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9646 },
9647
9648 /* VEX_LEN_0F3A00_P_2 */
9649 {
9650 { Bad_Opcode },
9651 { VEX_W_TABLE (VEX_W_0F3A00_P_2) },
9652 },
9653
9654 /* VEX_LEN_0F3A01_P_2 */
9655 {
9656 { Bad_Opcode },
9657 { VEX_W_TABLE (VEX_W_0F3A01_P_2) },
9658 },
9659
592a252b 9660 /* VEX_LEN_0F3A06_P_2 */
c0f3af97 9661 {
592d1631 9662 { Bad_Opcode },
592a252b 9663 { VEX_W_TABLE (VEX_W_0F3A06_P_2) },
c0f3af97
L
9664 },
9665
592a252b 9666 /* VEX_LEN_0F3A14_P_2 */
c0f3af97 9667 {
b50c9f31 9668 { "vpextrb", { Edqb, XM, Ib }, 0 },
c0f3af97
L
9669 },
9670
592a252b 9671 /* VEX_LEN_0F3A15_P_2 */
c0f3af97 9672 {
b50c9f31 9673 { "vpextrw", { Edqw, XM, Ib }, 0 },
c0f3af97
L
9674 },
9675
592a252b 9676 /* VEX_LEN_0F3A16_P_2 */
c0f3af97 9677 {
bf890a93 9678 { "vpextrK", { Edq, XM, Ib }, 0 },
c0f3af97
L
9679 },
9680
592a252b 9681 /* VEX_LEN_0F3A17_P_2 */
c0f3af97 9682 {
bf890a93 9683 { "vextractps", { Edqd, XM, Ib }, 0 },
c0f3af97
L
9684 },
9685
592a252b 9686 /* VEX_LEN_0F3A18_P_2 */
c0f3af97 9687 {
592d1631 9688 { Bad_Opcode },
592a252b 9689 { VEX_W_TABLE (VEX_W_0F3A18_P_2) },
c0f3af97
L
9690 },
9691
592a252b 9692 /* VEX_LEN_0F3A19_P_2 */
c0f3af97 9693 {
592d1631 9694 { Bad_Opcode },
592a252b 9695 { VEX_W_TABLE (VEX_W_0F3A19_P_2) },
c0f3af97
L
9696 },
9697
592a252b 9698 /* VEX_LEN_0F3A20_P_2 */
c0f3af97 9699 {
b50c9f31 9700 { "vpinsrb", { XM, Vex128, Edqb, Ib }, 0 },
c0f3af97
L
9701 },
9702
592a252b 9703 /* VEX_LEN_0F3A21_P_2 */
c0f3af97 9704 {
ec6f095a 9705 { "vinsertps", { XM, Vex128, EXd, Ib }, 0 },
c0f3af97
L
9706 },
9707
592a252b 9708 /* VEX_LEN_0F3A22_P_2 */
c0f3af97 9709 {
bf890a93 9710 { "vpinsrK", { XM, Vex128, Edq, Ib }, 0 },
c0f3af97
L
9711 },
9712
43234a1e
L
9713 /* VEX_LEN_0F3A30_P_2 */
9714 {
9715 { VEX_W_TABLE (VEX_W_0F3A30_P_2_LEN_0) },
9716 },
9717
1ba585e8
IT
9718 /* VEX_LEN_0F3A31_P_2 */
9719 {
9720 { VEX_W_TABLE (VEX_W_0F3A31_P_2_LEN_0) },
9721 },
9722
43234a1e
L
9723 /* VEX_LEN_0F3A32_P_2 */
9724 {
9725 { VEX_W_TABLE (VEX_W_0F3A32_P_2_LEN_0) },
9726 },
9727
1ba585e8
IT
9728 /* VEX_LEN_0F3A33_P_2 */
9729 {
9730 { VEX_W_TABLE (VEX_W_0F3A33_P_2_LEN_0) },
9731 },
9732
6c30d220 9733 /* VEX_LEN_0F3A38_P_2 */
c0f3af97 9734 {
6c30d220
L
9735 { Bad_Opcode },
9736 { VEX_W_TABLE (VEX_W_0F3A38_P_2) },
c0f3af97
L
9737 },
9738
6c30d220 9739 /* VEX_LEN_0F3A39_P_2 */
c0f3af97 9740 {
6c30d220
L
9741 { Bad_Opcode },
9742 { VEX_W_TABLE (VEX_W_0F3A39_P_2) },
9743 },
9744
9745 /* VEX_LEN_0F3A41_P_2 */
9746 {
ec6f095a 9747 { "vdppd", { XM, Vex128, EXx, Ib }, 0 },
c0f3af97
L
9748 },
9749
6c30d220 9750 /* VEX_LEN_0F3A46_P_2 */
c0f3af97 9751 {
6c30d220
L
9752 { Bad_Opcode },
9753 { VEX_W_TABLE (VEX_W_0F3A46_P_2) },
c0f3af97
L
9754 },
9755
592a252b 9756 /* VEX_LEN_0F3A60_P_2 */
c0f3af97 9757 {
15c7c1d8 9758 { "vpcmpestrm", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, 0 },
c0f3af97
L
9759 },
9760
592a252b 9761 /* VEX_LEN_0F3A61_P_2 */
c0f3af97 9762 {
15c7c1d8 9763 { "vpcmpestri", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, 0 },
c0f3af97
L
9764 },
9765
592a252b 9766 /* VEX_LEN_0F3A62_P_2 */
c0f3af97 9767 {
ec6f095a 9768 { "vpcmpistrm", { XM, EXx, Ib }, 0 },
c0f3af97
L
9769 },
9770
592a252b 9771 /* VEX_LEN_0F3A63_P_2 */
c0f3af97 9772 {
ec6f095a 9773 { "vpcmpistri", { XM, EXx, Ib }, 0 },
c0f3af97
L
9774 },
9775
592a252b 9776 /* VEX_LEN_0F3A6A_P_2 */
922d8de8 9777 {
3a2430e0 9778 { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
922d8de8
DR
9779 },
9780
592a252b 9781 /* VEX_LEN_0F3A6B_P_2 */
922d8de8 9782 {
3a2430e0 9783 { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
922d8de8
DR
9784 },
9785
592a252b 9786 /* VEX_LEN_0F3A6E_P_2 */
922d8de8 9787 {
3a2430e0 9788 { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
922d8de8
DR
9789 },
9790
592a252b 9791 /* VEX_LEN_0F3A6F_P_2 */
922d8de8 9792 {
3a2430e0 9793 { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
922d8de8
DR
9794 },
9795
592a252b 9796 /* VEX_LEN_0F3A7A_P_2 */
922d8de8 9797 {
3a2430e0 9798 { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
922d8de8
DR
9799 },
9800
592a252b 9801 /* VEX_LEN_0F3A7B_P_2 */
922d8de8 9802 {
3a2430e0 9803 { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
922d8de8
DR
9804 },
9805
592a252b 9806 /* VEX_LEN_0F3A7E_P_2 */
922d8de8 9807 {
3a2430e0 9808 { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
922d8de8
DR
9809 },
9810
592a252b 9811 /* VEX_LEN_0F3A7F_P_2 */
922d8de8 9812 {
3a2430e0 9813 { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
922d8de8
DR
9814 },
9815
592a252b 9816 /* VEX_LEN_0F3ADF_P_2 */
a5ff0eb2 9817 {
ec6f095a 9818 { "vaeskeygenassist", { XM, EXx, Ib }, 0 },
a5ff0eb2 9819 },
4c807e72 9820
6c30d220
L
9821 /* VEX_LEN_0F3AF0_P_3 */
9822 {
bf890a93 9823 { "rorxS", { Gdq, Edq, Ib }, 0 },
6c30d220
L
9824 },
9825
ff688e1f
L
9826 /* VEX_LEN_0FXOP_08_CC */
9827 {
be92cb14 9828 { "vpcomb", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9829 },
9830
9831 /* VEX_LEN_0FXOP_08_CD */
9832 {
be92cb14 9833 { "vpcomw", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9834 },
9835
9836 /* VEX_LEN_0FXOP_08_CE */
9837 {
be92cb14 9838 { "vpcomd", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9839 },
9840
9841 /* VEX_LEN_0FXOP_08_CF */
9842 {
be92cb14 9843 { "vpcomq", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9844 },
9845
9846 /* VEX_LEN_0FXOP_08_EC */
9847 {
be92cb14 9848 { "vpcomub", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9849 },
9850
9851 /* VEX_LEN_0FXOP_08_ED */
9852 {
be92cb14 9853 { "vpcomuw", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9854 },
9855
9856 /* VEX_LEN_0FXOP_08_EE */
9857 {
be92cb14 9858 { "vpcomud", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9859 },
9860
9861 /* VEX_LEN_0FXOP_08_EF */
9862 {
be92cb14 9863 { "vpcomuq", { XM, Vex128, EXx, VPCOM }, 0 },
ff688e1f
L
9864 },
9865
592a252b 9866 /* VEX_LEN_0FXOP_09_80 */
5dd85c99 9867 {
bf890a93
IT
9868 { "vfrczps", { XM, EXxmm }, 0 },
9869 { "vfrczps", { XM, EXymmq }, 0 },
5dd85c99 9870 },
4c807e72 9871
592a252b 9872 /* VEX_LEN_0FXOP_09_81 */
5dd85c99 9873 {
bf890a93
IT
9874 { "vfrczpd", { XM, EXxmm }, 0 },
9875 { "vfrczpd", { XM, EXymmq }, 0 },
5dd85c99 9876 },
331d2d0d
L
9877};
9878
ad692897 9879#include "i386-dis-evex-len.h"
04e2a182 9880
9e30b8e0 9881static const struct dis386 vex_w_table[][2] = {
43234a1e
L
9882 {
9883 /* VEX_W_0F41_P_0_LEN_1 */
ab4e4ed5
AF
9884 { MOD_TABLE (MOD_VEX_W_0_0F41_P_0_LEN_1) },
9885 { MOD_TABLE (MOD_VEX_W_1_0F41_P_0_LEN_1) },
1ba585e8
IT
9886 },
9887 {
9888 /* VEX_W_0F41_P_2_LEN_1 */
ab4e4ed5
AF
9889 { MOD_TABLE (MOD_VEX_W_0_0F41_P_2_LEN_1) },
9890 { MOD_TABLE (MOD_VEX_W_1_0F41_P_2_LEN_1) }
43234a1e
L
9891 },
9892 {
9893 /* VEX_W_0F42_P_0_LEN_1 */
ab4e4ed5
AF
9894 { MOD_TABLE (MOD_VEX_W_0_0F42_P_0_LEN_1) },
9895 { MOD_TABLE (MOD_VEX_W_1_0F42_P_0_LEN_1) },
1ba585e8
IT
9896 },
9897 {
9898 /* VEX_W_0F42_P_2_LEN_1 */
ab4e4ed5
AF
9899 { MOD_TABLE (MOD_VEX_W_0_0F42_P_2_LEN_1) },
9900 { MOD_TABLE (MOD_VEX_W_1_0F42_P_2_LEN_1) },
43234a1e
L
9901 },
9902 {
9903 /* VEX_W_0F44_P_0_LEN_0 */
ab4e4ed5
AF
9904 { MOD_TABLE (MOD_VEX_W_0_0F44_P_0_LEN_1) },
9905 { MOD_TABLE (MOD_VEX_W_1_0F44_P_0_LEN_1) },
1ba585e8
IT
9906 },
9907 {
9908 /* VEX_W_0F44_P_2_LEN_0 */
ab4e4ed5
AF
9909 { MOD_TABLE (MOD_VEX_W_0_0F44_P_2_LEN_1) },
9910 { MOD_TABLE (MOD_VEX_W_1_0F44_P_2_LEN_1) },
43234a1e
L
9911 },
9912 {
ec6f095a
L
9913 /* VEX_W_0F45_P_0_LEN_1 */
9914 { MOD_TABLE (MOD_VEX_W_0_0F45_P_0_LEN_1) },
9915 { MOD_TABLE (MOD_VEX_W_1_0F45_P_0_LEN_1) },
9e30b8e0
L
9916 },
9917 {
ec6f095a
L
9918 /* VEX_W_0F45_P_2_LEN_1 */
9919 { MOD_TABLE (MOD_VEX_W_0_0F45_P_2_LEN_1) },
9920 { MOD_TABLE (MOD_VEX_W_1_0F45_P_2_LEN_1) },
9e30b8e0
L
9921 },
9922 {
ec6f095a
L
9923 /* VEX_W_0F46_P_0_LEN_1 */
9924 { MOD_TABLE (MOD_VEX_W_0_0F46_P_0_LEN_1) },
9925 { MOD_TABLE (MOD_VEX_W_1_0F46_P_0_LEN_1) },
9e30b8e0
L
9926 },
9927 {
ec6f095a
L
9928 /* VEX_W_0F46_P_2_LEN_1 */
9929 { MOD_TABLE (MOD_VEX_W_0_0F46_P_2_LEN_1) },
9930 { MOD_TABLE (MOD_VEX_W_1_0F46_P_2_LEN_1) },
9e30b8e0
L
9931 },
9932 {
ec6f095a
L
9933 /* VEX_W_0F47_P_0_LEN_1 */
9934 { MOD_TABLE (MOD_VEX_W_0_0F47_P_0_LEN_1) },
9935 { MOD_TABLE (MOD_VEX_W_1_0F47_P_0_LEN_1) },
9e30b8e0
L
9936 },
9937 {
ec6f095a
L
9938 /* VEX_W_0F47_P_2_LEN_1 */
9939 { MOD_TABLE (MOD_VEX_W_0_0F47_P_2_LEN_1) },
9940 { MOD_TABLE (MOD_VEX_W_1_0F47_P_2_LEN_1) },
9e30b8e0
L
9941 },
9942 {
ec6f095a
L
9943 /* VEX_W_0F4A_P_0_LEN_1 */
9944 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_0_LEN_1) },
9945 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_0_LEN_1) },
9e30b8e0
L
9946 },
9947 {
ec6f095a
L
9948 /* VEX_W_0F4A_P_2_LEN_1 */
9949 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_2_LEN_1) },
9950 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_2_LEN_1) },
9e30b8e0
L
9951 },
9952 {
ec6f095a
L
9953 /* VEX_W_0F4B_P_0_LEN_1 */
9954 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_0_LEN_1) },
9955 { MOD_TABLE (MOD_VEX_W_1_0F4B_P_0_LEN_1) },
9e30b8e0
L
9956 },
9957 {
ec6f095a
L
9958 /* VEX_W_0F4B_P_2_LEN_1 */
9959 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_2_LEN_1) },
9e30b8e0
L
9960 },
9961 {
ec6f095a
L
9962 /* VEX_W_0F90_P_0_LEN_0 */
9963 { "kmovw", { MaskG, MaskE }, 0 },
9964 { "kmovq", { MaskG, MaskE }, 0 },
9e30b8e0
L
9965 },
9966 {
ec6f095a
L
9967 /* VEX_W_0F90_P_2_LEN_0 */
9968 { "kmovb", { MaskG, MaskBDE }, 0 },
9969 { "kmovd", { MaskG, MaskBDE }, 0 },
9e30b8e0
L
9970 },
9971 {
ec6f095a
L
9972 /* VEX_W_0F91_P_0_LEN_0 */
9973 { MOD_TABLE (MOD_VEX_W_0_0F91_P_0_LEN_0) },
9974 { MOD_TABLE (MOD_VEX_W_1_0F91_P_0_LEN_0) },
9e30b8e0
L
9975 },
9976 {
ec6f095a
L
9977 /* VEX_W_0F91_P_2_LEN_0 */
9978 { MOD_TABLE (MOD_VEX_W_0_0F91_P_2_LEN_0) },
9979 { MOD_TABLE (MOD_VEX_W_1_0F91_P_2_LEN_0) },
9e30b8e0
L
9980 },
9981 {
ec6f095a
L
9982 /* VEX_W_0F92_P_0_LEN_0 */
9983 { MOD_TABLE (MOD_VEX_W_0_0F92_P_0_LEN_0) },
9e30b8e0
L
9984 },
9985 {
ec6f095a
L
9986 /* VEX_W_0F92_P_2_LEN_0 */
9987 { MOD_TABLE (MOD_VEX_W_0_0F92_P_2_LEN_0) },
9e30b8e0 9988 },
9e30b8e0 9989 {
ec6f095a
L
9990 /* VEX_W_0F93_P_0_LEN_0 */
9991 { MOD_TABLE (MOD_VEX_W_0_0F93_P_0_LEN_0) },
9e30b8e0
L
9992 },
9993 {
ec6f095a
L
9994 /* VEX_W_0F93_P_2_LEN_0 */
9995 { MOD_TABLE (MOD_VEX_W_0_0F93_P_2_LEN_0) },
9e30b8e0 9996 },
9e30b8e0 9997 {
ec6f095a
L
9998 /* VEX_W_0F98_P_0_LEN_0 */
9999 { MOD_TABLE (MOD_VEX_W_0_0F98_P_0_LEN_0) },
10000 { MOD_TABLE (MOD_VEX_W_1_0F98_P_0_LEN_0) },
9e30b8e0
L
10001 },
10002 {
ec6f095a
L
10003 /* VEX_W_0F98_P_2_LEN_0 */
10004 { MOD_TABLE (MOD_VEX_W_0_0F98_P_2_LEN_0) },
10005 { MOD_TABLE (MOD_VEX_W_1_0F98_P_2_LEN_0) },
9e30b8e0
L
10006 },
10007 {
ec6f095a
L
10008 /* VEX_W_0F99_P_0_LEN_0 */
10009 { MOD_TABLE (MOD_VEX_W_0_0F99_P_0_LEN_0) },
10010 { MOD_TABLE (MOD_VEX_W_1_0F99_P_0_LEN_0) },
9e30b8e0
L
10011 },
10012 {
ec6f095a
L
10013 /* VEX_W_0F99_P_2_LEN_0 */
10014 { MOD_TABLE (MOD_VEX_W_0_0F99_P_2_LEN_0) },
10015 { MOD_TABLE (MOD_VEX_W_1_0F99_P_2_LEN_0) },
9e30b8e0 10016 },
9e30b8e0 10017 {
592a252b 10018 /* VEX_W_0F380C_P_2 */
bf890a93 10019 { "vpermilps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10020 },
10021 {
592a252b 10022 /* VEX_W_0F380D_P_2 */
bf890a93 10023 { "vpermilpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10024 },
10025 {
592a252b 10026 /* VEX_W_0F380E_P_2 */
bf890a93 10027 { "vtestps", { XM, EXx }, 0 },
9e30b8e0
L
10028 },
10029 {
592a252b 10030 /* VEX_W_0F380F_P_2 */
bf890a93 10031 { "vtestpd", { XM, EXx }, 0 },
9e30b8e0 10032 },
6c30d220
L
10033 {
10034 /* VEX_W_0F3816_P_2 */
bf890a93 10035 { "vpermps", { XM, Vex, EXx }, 0 },
6c30d220 10036 },
bcf2684f 10037 {
6c30d220 10038 /* VEX_W_0F3818_P_2 */
bf890a93 10039 { "vbroadcastss", { XM, EXxmm_md }, 0 },
bcf2684f 10040 },
9e30b8e0 10041 {
6c30d220 10042 /* VEX_W_0F3819_P_2 */
bf890a93 10043 { "vbroadcastsd", { XM, EXxmm_mq }, 0 },
9e30b8e0
L
10044 },
10045 {
592a252b 10046 /* VEX_W_0F381A_P_2_M_0 */
bf890a93 10047 { "vbroadcastf128", { XM, Mxmm }, 0 },
9e30b8e0 10048 },
53aa04a0 10049 {
592a252b 10050 /* VEX_W_0F382C_P_2_M_0 */
bf890a93 10051 { "vmaskmovps", { XM, Vex, Mx }, 0 },
53aa04a0
L
10052 },
10053 {
592a252b 10054 /* VEX_W_0F382D_P_2_M_0 */
bf890a93 10055 { "vmaskmovpd", { XM, Vex, Mx }, 0 },
53aa04a0
L
10056 },
10057 {
592a252b 10058 /* VEX_W_0F382E_P_2_M_0 */
bf890a93 10059 { "vmaskmovps", { Mx, Vex, XM }, 0 },
53aa04a0
L
10060 },
10061 {
592a252b 10062 /* VEX_W_0F382F_P_2_M_0 */
bf890a93 10063 { "vmaskmovpd", { Mx, Vex, XM }, 0 },
53aa04a0 10064 },
6c30d220
L
10065 {
10066 /* VEX_W_0F3836_P_2 */
bf890a93 10067 { "vpermd", { XM, Vex, EXx }, 0 },
9e30b8e0 10068 },
6c30d220
L
10069 {
10070 /* VEX_W_0F3846_P_2 */
bf890a93 10071 { "vpsravd", { XM, Vex, EXx }, 0 },
6c30d220
L
10072 },
10073 {
10074 /* VEX_W_0F3858_P_2 */
bf890a93 10075 { "vpbroadcastd", { XM, EXxmm_md }, 0 },
6c30d220
L
10076 },
10077 {
10078 /* VEX_W_0F3859_P_2 */
bf890a93 10079 { "vpbroadcastq", { XM, EXxmm_mq }, 0 },
6c30d220
L
10080 },
10081 {
10082 /* VEX_W_0F385A_P_2_M_0 */
bf890a93 10083 { "vbroadcasti128", { XM, Mxmm }, 0 },
6c30d220
L
10084 },
10085 {
10086 /* VEX_W_0F3878_P_2 */
bf890a93 10087 { "vpbroadcastb", { XM, EXxmm_mb }, 0 },
6c30d220
L
10088 },
10089 {
10090 /* VEX_W_0F3879_P_2 */
bf890a93 10091 { "vpbroadcastw", { XM, EXxmm_mw }, 0 },
6c30d220 10092 },
48521003
IT
10093 {
10094 /* VEX_W_0F38CF_P_2 */
10095 { "vgf2p8mulb", { XM, Vex, EXx }, 0 },
10096 },
6c30d220
L
10097 {
10098 /* VEX_W_0F3A00_P_2 */
10099 { Bad_Opcode },
bf890a93 10100 { "vpermq", { XM, EXx, Ib }, 0 },
6c30d220
L
10101 },
10102 {
10103 /* VEX_W_0F3A01_P_2 */
10104 { Bad_Opcode },
bf890a93 10105 { "vpermpd", { XM, EXx, Ib }, 0 },
6c30d220
L
10106 },
10107 {
10108 /* VEX_W_0F3A02_P_2 */
bf890a93 10109 { "vpblendd", { XM, Vex, EXx, Ib }, 0 },
6c30d220 10110 },
9e30b8e0 10111 {
592a252b 10112 /* VEX_W_0F3A04_P_2 */
bf890a93 10113 { "vpermilps", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10114 },
10115 {
592a252b 10116 /* VEX_W_0F3A05_P_2 */
bf890a93 10117 { "vpermilpd", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10118 },
10119 {
592a252b 10120 /* VEX_W_0F3A06_P_2 */
bf890a93 10121 { "vperm2f128", { XM, Vex256, EXx, Ib }, 0 },
9e30b8e0 10122 },
9e30b8e0 10123 {
592a252b 10124 /* VEX_W_0F3A18_P_2 */
bf890a93 10125 { "vinsertf128", { XM, Vex256, EXxmm, Ib }, 0 },
9e30b8e0
L
10126 },
10127 {
592a252b 10128 /* VEX_W_0F3A19_P_2 */
bf890a93 10129 { "vextractf128", { EXxmm, XM, Ib }, 0 },
9e30b8e0 10130 },
43234a1e 10131 {
1ba585e8 10132 /* VEX_W_0F3A30_P_2_LEN_0 */
ab4e4ed5
AF
10133 { MOD_TABLE (MOD_VEX_W_0_0F3A30_P_2_LEN_0) },
10134 { MOD_TABLE (MOD_VEX_W_1_0F3A30_P_2_LEN_0) },
43234a1e
L
10135 },
10136 {
1ba585e8 10137 /* VEX_W_0F3A31_P_2_LEN_0 */
ab4e4ed5
AF
10138 { MOD_TABLE (MOD_VEX_W_0_0F3A31_P_2_LEN_0) },
10139 { MOD_TABLE (MOD_VEX_W_1_0F3A31_P_2_LEN_0) },
1ba585e8
IT
10140 },
10141 {
10142 /* VEX_W_0F3A32_P_2_LEN_0 */
ab4e4ed5
AF
10143 { MOD_TABLE (MOD_VEX_W_0_0F3A32_P_2_LEN_0) },
10144 { MOD_TABLE (MOD_VEX_W_1_0F3A32_P_2_LEN_0) },
43234a1e 10145 },
1ba585e8
IT
10146 {
10147 /* VEX_W_0F3A33_P_2_LEN_0 */
ab4e4ed5
AF
10148 { MOD_TABLE (MOD_VEX_W_0_0F3A33_P_2_LEN_0) },
10149 { MOD_TABLE (MOD_VEX_W_1_0F3A33_P_2_LEN_0) },
1ba585e8 10150 },
6c30d220
L
10151 {
10152 /* VEX_W_0F3A38_P_2 */
bf890a93 10153 { "vinserti128", { XM, Vex256, EXxmm, Ib }, 0 },
6c30d220
L
10154 },
10155 {
10156 /* VEX_W_0F3A39_P_2 */
bf890a93 10157 { "vextracti128", { EXxmm, XM, Ib }, 0 },
6c30d220 10158 },
6c30d220
L
10159 {
10160 /* VEX_W_0F3A46_P_2 */
bf890a93 10161 { "vperm2i128", { XM, Vex256, EXx, Ib }, 0 },
6c30d220 10162 },
a683cc34 10163 {
592a252b 10164 /* VEX_W_0F3A48_P_2 */
bf890a93
IT
10165 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
10166 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
a683cc34
SP
10167 },
10168 {
592a252b 10169 /* VEX_W_0F3A49_P_2 */
bf890a93
IT
10170 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
10171 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
a683cc34 10172 },
9e30b8e0 10173 {
592a252b 10174 /* VEX_W_0F3A4A_P_2 */
bf890a93 10175 { "vblendvps", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0
L
10176 },
10177 {
592a252b 10178 /* VEX_W_0F3A4B_P_2 */
bf890a93 10179 { "vblendvpd", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0
L
10180 },
10181 {
592a252b 10182 /* VEX_W_0F3A4C_P_2 */
bf890a93 10183 { "vpblendvb", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0 10184 },
48521003
IT
10185 {
10186 /* VEX_W_0F3ACE_P_2 */
10187 { Bad_Opcode },
10188 { "vgf2p8affineqb", { XM, Vex, EXx, Ib }, 0 },
10189 },
10190 {
10191 /* VEX_W_0F3ACF_P_2 */
10192 { Bad_Opcode },
10193 { "vgf2p8affineinvqb", { XM, Vex, EXx, Ib }, 0 },
10194 },
ad692897
L
10195
10196#include "i386-dis-evex-w.h"
9e30b8e0
L
10197};
10198
10199static const struct dis386 mod_table[][2] = {
10200 {
10201 /* MOD_8D */
bf890a93 10202 { "leaS", { Gv, M }, 0 },
9e30b8e0 10203 },
42164a71
L
10204 {
10205 /* MOD_C6_REG_7 */
10206 { Bad_Opcode },
10207 { RM_TABLE (RM_C6_REG_7) },
10208 },
10209 {
10210 /* MOD_C7_REG_7 */
10211 { Bad_Opcode },
10212 { RM_TABLE (RM_C7_REG_7) },
10213 },
4a357820
MZ
10214 {
10215 /* MOD_FF_REG_3 */
a72d2af2 10216 { "Jcall^", { indirEp }, 0 },
4a357820
MZ
10217 },
10218 {
10219 /* MOD_FF_REG_5 */
a72d2af2 10220 { "Jjmp^", { indirEp }, 0 },
4a357820 10221 },
9e30b8e0
L
10222 {
10223 /* MOD_0F01_REG_0 */
10224 { X86_64_TABLE (X86_64_0F01_REG_0) },
10225 { RM_TABLE (RM_0F01_REG_0) },
10226 },
10227 {
10228 /* MOD_0F01_REG_1 */
10229 { X86_64_TABLE (X86_64_0F01_REG_1) },
10230 { RM_TABLE (RM_0F01_REG_1) },
10231 },
10232 {
10233 /* MOD_0F01_REG_2 */
10234 { X86_64_TABLE (X86_64_0F01_REG_2) },
10235 { RM_TABLE (RM_0F01_REG_2) },
10236 },
10237 {
10238 /* MOD_0F01_REG_3 */
10239 { X86_64_TABLE (X86_64_0F01_REG_3) },
10240 { RM_TABLE (RM_0F01_REG_3) },
10241 },
8eab4136
L
10242 {
10243 /* MOD_0F01_REG_5 */
f8687e93
JB
10244 { PREFIX_TABLE (PREFIX_0F01_REG_5_MOD_0) },
10245 { RM_TABLE (RM_0F01_REG_5_MOD_3) },
8eab4136 10246 },
9e30b8e0
L
10247 {
10248 /* MOD_0F01_REG_7 */
bf890a93 10249 { "invlpg", { Mb }, 0 },
f8687e93 10250 { RM_TABLE (RM_0F01_REG_7_MOD_3) },
9e30b8e0
L
10251 },
10252 {
10253 /* MOD_0F12_PREFIX_0 */
507bd325
L
10254 { "movlps", { XM, EXq }, PREFIX_OPCODE },
10255 { "movhlps", { XM, EXq }, PREFIX_OPCODE },
9e30b8e0
L
10256 },
10257 {
10258 /* MOD_0F13 */
507bd325 10259 { "movlpX", { EXq, XM }, PREFIX_OPCODE },
9e30b8e0
L
10260 },
10261 {
10262 /* MOD_0F16_PREFIX_0 */
bf890a93
IT
10263 { "movhps", { XM, EXq }, 0 },
10264 { "movlhps", { XM, EXq }, 0 },
9e30b8e0
L
10265 },
10266 {
10267 /* MOD_0F17 */
507bd325 10268 { "movhpX", { EXq, XM }, PREFIX_OPCODE },
9e30b8e0
L
10269 },
10270 {
10271 /* MOD_0F18_REG_0 */
bf890a93 10272 { "prefetchnta", { Mb }, 0 },
9e30b8e0
L
10273 },
10274 {
10275 /* MOD_0F18_REG_1 */
bf890a93 10276 { "prefetcht0", { Mb }, 0 },
9e30b8e0
L
10277 },
10278 {
10279 /* MOD_0F18_REG_2 */
bf890a93 10280 { "prefetcht1", { Mb }, 0 },
9e30b8e0
L
10281 },
10282 {
10283 /* MOD_0F18_REG_3 */
bf890a93 10284 { "prefetcht2", { Mb }, 0 },
9e30b8e0 10285 },
d7189fa5
RM
10286 {
10287 /* MOD_0F18_REG_4 */
bf890a93 10288 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
10289 },
10290 {
10291 /* MOD_0F18_REG_5 */
bf890a93 10292 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
10293 },
10294 {
10295 /* MOD_0F18_REG_6 */
bf890a93 10296 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
10297 },
10298 {
10299 /* MOD_0F18_REG_7 */
bf890a93 10300 { "nop/reserved", { Mb }, 0 },
d7189fa5 10301 },
7e8b059b
L
10302 {
10303 /* MOD_0F1A_PREFIX_0 */
d276ec69 10304 { "bndldx", { Gbnd, Mv_bnd }, 0 },
bf890a93 10305 { "nopQ", { Ev }, 0 },
7e8b059b
L
10306 },
10307 {
10308 /* MOD_0F1B_PREFIX_0 */
d276ec69 10309 { "bndstx", { Mv_bnd, Gbnd }, 0 },
bf890a93 10310 { "nopQ", { Ev }, 0 },
7e8b059b
L
10311 },
10312 {
10313 /* MOD_0F1B_PREFIX_1 */
d276ec69 10314 { "bndmk", { Gbnd, Mv_bnd }, 0 },
bf890a93 10315 { "nopQ", { Ev }, 0 },
7e8b059b 10316 },
c48935d7
IT
10317 {
10318 /* MOD_0F1C_PREFIX_0 */
f8687e93 10319 { REG_TABLE (REG_0F1C_P_0_MOD_0) },
c48935d7
IT
10320 { "nopQ", { Ev }, 0 },
10321 },
603555e5
L
10322 {
10323 /* MOD_0F1E_PREFIX_1 */
10324 { "nopQ", { Ev }, 0 },
f8687e93 10325 { REG_TABLE (REG_0F1E_P_1_MOD_3) },
603555e5 10326 },
b844680a 10327 {
92fddf8e 10328 /* MOD_0F24 */
7bb15c6f 10329 { Bad_Opcode },
bf890a93 10330 { "movL", { Rd, Td }, 0 },
b844680a
L
10331 },
10332 {
92fddf8e 10333 /* MOD_0F26 */
592d1631 10334 { Bad_Opcode },
bf890a93 10335 { "movL", { Td, Rd }, 0 },
b844680a 10336 },
75c135a8
L
10337 {
10338 /* MOD_0F2B_PREFIX_0 */
507bd325 10339 {"movntps", { Mx, XM }, PREFIX_OPCODE },
75c135a8
L
10340 },
10341 {
10342 /* MOD_0F2B_PREFIX_1 */
507bd325 10343 {"movntss", { Md, XM }, PREFIX_OPCODE },
75c135a8
L
10344 },
10345 {
10346 /* MOD_0F2B_PREFIX_2 */
507bd325 10347 {"movntpd", { Mx, XM }, PREFIX_OPCODE },
75c135a8
L
10348 },
10349 {
10350 /* MOD_0F2B_PREFIX_3 */
507bd325 10351 {"movntsd", { Mq, XM }, PREFIX_OPCODE },
75c135a8
L
10352 },
10353 {
10354 /* MOD_0F51 */
592d1631 10355 { Bad_Opcode },
507bd325 10356 { "movmskpX", { Gdq, XS }, PREFIX_OPCODE },
75c135a8 10357 },
b844680a 10358 {
1ceb70f8 10359 /* MOD_0F71_REG_2 */
592d1631 10360 { Bad_Opcode },
bf890a93 10361 { "psrlw", { MS, Ib }, 0 },
b844680a
L
10362 },
10363 {
1ceb70f8 10364 /* MOD_0F71_REG_4 */
592d1631 10365 { Bad_Opcode },
bf890a93 10366 { "psraw", { MS, Ib }, 0 },
b844680a
L
10367 },
10368 {
1ceb70f8 10369 /* MOD_0F71_REG_6 */
592d1631 10370 { Bad_Opcode },
bf890a93 10371 { "psllw", { MS, Ib }, 0 },
b844680a
L
10372 },
10373 {
1ceb70f8 10374 /* MOD_0F72_REG_2 */
592d1631 10375 { Bad_Opcode },
bf890a93 10376 { "psrld", { MS, Ib }, 0 },
b844680a
L
10377 },
10378 {
1ceb70f8 10379 /* MOD_0F72_REG_4 */
592d1631 10380 { Bad_Opcode },
bf890a93 10381 { "psrad", { MS, Ib }, 0 },
b844680a
L
10382 },
10383 {
1ceb70f8 10384 /* MOD_0F72_REG_6 */
592d1631 10385 { Bad_Opcode },
bf890a93 10386 { "pslld", { MS, Ib }, 0 },
b844680a
L
10387 },
10388 {
1ceb70f8 10389 /* MOD_0F73_REG_2 */
592d1631 10390 { Bad_Opcode },
bf890a93 10391 { "psrlq", { MS, Ib }, 0 },
b844680a
L
10392 },
10393 {
1ceb70f8 10394 /* MOD_0F73_REG_3 */
592d1631 10395 { Bad_Opcode },
c0f3af97
L
10396 { PREFIX_TABLE (PREFIX_0F73_REG_3) },
10397 },
10398 {
10399 /* MOD_0F73_REG_6 */
592d1631 10400 { Bad_Opcode },
bf890a93 10401 { "psllq", { MS, Ib }, 0 },
c0f3af97
L
10402 },
10403 {
10404 /* MOD_0F73_REG_7 */
592d1631 10405 { Bad_Opcode },
c0f3af97
L
10406 { PREFIX_TABLE (PREFIX_0F73_REG_7) },
10407 },
10408 {
10409 /* MOD_0FAE_REG_0 */
bf890a93 10410 { "fxsave", { FXSAVE }, 0 },
f8687e93 10411 { PREFIX_TABLE (PREFIX_0FAE_REG_0_MOD_3) },
c0f3af97
L
10412 },
10413 {
10414 /* MOD_0FAE_REG_1 */
bf890a93 10415 { "fxrstor", { FXSAVE }, 0 },
f8687e93 10416 { PREFIX_TABLE (PREFIX_0FAE_REG_1_MOD_3) },
c0f3af97
L
10417 },
10418 {
10419 /* MOD_0FAE_REG_2 */
bf890a93 10420 { "ldmxcsr", { Md }, 0 },
f8687e93 10421 { PREFIX_TABLE (PREFIX_0FAE_REG_2_MOD_3) },
c0f3af97
L
10422 },
10423 {
10424 /* MOD_0FAE_REG_3 */
bf890a93 10425 { "stmxcsr", { Md }, 0 },
f8687e93 10426 { PREFIX_TABLE (PREFIX_0FAE_REG_3_MOD_3) },
c0f3af97
L
10427 },
10428 {
10429 /* MOD_0FAE_REG_4 */
f8687e93
JB
10430 { PREFIX_TABLE (PREFIX_0FAE_REG_4_MOD_0) },
10431 { PREFIX_TABLE (PREFIX_0FAE_REG_4_MOD_3) },
c0f3af97
L
10432 },
10433 {
10434 /* MOD_0FAE_REG_5 */
f8687e93
JB
10435 { PREFIX_TABLE (PREFIX_0FAE_REG_5_MOD_0) },
10436 { PREFIX_TABLE (PREFIX_0FAE_REG_5_MOD_3) },
c0f3af97
L
10437 },
10438 {
10439 /* MOD_0FAE_REG_6 */
f8687e93
JB
10440 { PREFIX_TABLE (PREFIX_0FAE_REG_6_MOD_0) },
10441 { PREFIX_TABLE (PREFIX_0FAE_REG_6_MOD_3) },
c0f3af97
L
10442 },
10443 {
10444 /* MOD_0FAE_REG_7 */
f8687e93
JB
10445 { PREFIX_TABLE (PREFIX_0FAE_REG_7_MOD_0) },
10446 { RM_TABLE (RM_0FAE_REG_7_MOD_3) },
c0f3af97
L
10447 },
10448 {
10449 /* MOD_0FB2 */
bf890a93 10450 { "lssS", { Gv, Mp }, 0 },
c0f3af97
L
10451 },
10452 {
10453 /* MOD_0FB4 */
bf890a93 10454 { "lfsS", { Gv, Mp }, 0 },
c0f3af97
L
10455 },
10456 {
10457 /* MOD_0FB5 */
bf890a93 10458 { "lgsS", { Gv, Mp }, 0 },
c0f3af97 10459 },
a8484f96
L
10460 {
10461 /* MOD_0FC3 */
f8687e93 10462 { PREFIX_TABLE (PREFIX_0FC3_MOD_0) },
a8484f96 10463 },
963f3586
IT
10464 {
10465 /* MOD_0FC7_REG_3 */
a8484f96 10466 { "xrstors", { FXSAVE }, 0 },
963f3586
IT
10467 },
10468 {
10469 /* MOD_0FC7_REG_4 */
bf890a93 10470 { "xsavec", { FXSAVE }, 0 },
963f3586
IT
10471 },
10472 {
10473 /* MOD_0FC7_REG_5 */
bf890a93 10474 { "xsaves", { FXSAVE }, 0 },
963f3586 10475 },
c0f3af97
L
10476 {
10477 /* MOD_0FC7_REG_6 */
f8687e93
JB
10478 { PREFIX_TABLE (PREFIX_0FC7_REG_6_MOD_0) },
10479 { PREFIX_TABLE (PREFIX_0FC7_REG_6_MOD_3) }
c0f3af97
L
10480 },
10481 {
10482 /* MOD_0FC7_REG_7 */
bf890a93 10483 { "vmptrst", { Mq }, 0 },
f8687e93 10484 { PREFIX_TABLE (PREFIX_0FC7_REG_7_MOD_3) }
c0f3af97
L
10485 },
10486 {
10487 /* MOD_0FD7 */
592d1631 10488 { Bad_Opcode },
bf890a93 10489 { "pmovmskb", { Gdq, MS }, 0 },
c0f3af97
L
10490 },
10491 {
10492 /* MOD_0FE7_PREFIX_2 */
bf890a93 10493 { "movntdq", { Mx, XM }, 0 },
c0f3af97
L
10494 },
10495 {
10496 /* MOD_0FF0_PREFIX_3 */
bf890a93 10497 { "lddqu", { XM, M }, 0 },
c0f3af97
L
10498 },
10499 {
10500 /* MOD_0F382A_PREFIX_2 */
bf890a93 10501 { "movntdqa", { XM, Mx }, 0 },
c0f3af97 10502 },
603555e5
L
10503 {
10504 /* MOD_0F38F5_PREFIX_2 */
10505 { "wrussK", { M, Gdq }, PREFIX_OPCODE },
10506 },
10507 {
10508 /* MOD_0F38F6_PREFIX_0 */
10509 { "wrssK", { M, Gdq }, PREFIX_OPCODE },
10510 },
5d79adc4
L
10511 {
10512 /* MOD_0F38F8_PREFIX_1 */
10513 { "enqcmds", { Gva, M }, PREFIX_OPCODE },
10514 },
c0a30a9f
L
10515 {
10516 /* MOD_0F38F8_PREFIX_2 */
10517 { "movdir64b", { Gva, M }, PREFIX_OPCODE },
10518 },
5d79adc4
L
10519 {
10520 /* MOD_0F38F8_PREFIX_3 */
10521 { "enqcmd", { Gva, M }, PREFIX_OPCODE },
10522 },
c0a30a9f
L
10523 {
10524 /* MOD_0F38F9_PREFIX_0 */
77ad8092 10525 { "movdiri", { Ev, Gv }, PREFIX_OPCODE },
c0a30a9f 10526 },
c0f3af97
L
10527 {
10528 /* MOD_62_32BIT */
bf890a93 10529 { "bound{S|}", { Gv, Ma }, 0 },
43234a1e 10530 { EVEX_TABLE (EVEX_0F) },
c0f3af97
L
10531 },
10532 {
10533 /* MOD_C4_32BIT */
bf890a93 10534 { "lesS", { Gv, Mp }, 0 },
c0f3af97
L
10535 { VEX_C4_TABLE (VEX_0F) },
10536 },
10537 {
10538 /* MOD_C5_32BIT */
bf890a93 10539 { "ldsS", { Gv, Mp }, 0 },
c0f3af97
L
10540 { VEX_C5_TABLE (VEX_0F) },
10541 },
10542 {
592a252b
L
10543 /* MOD_VEX_0F12_PREFIX_0 */
10544 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0) },
10545 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1) },
c0f3af97
L
10546 },
10547 {
592a252b
L
10548 /* MOD_VEX_0F13 */
10549 { VEX_LEN_TABLE (VEX_LEN_0F13_M_0) },
c0f3af97
L
10550 },
10551 {
592a252b
L
10552 /* MOD_VEX_0F16_PREFIX_0 */
10553 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0) },
10554 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1) },
c0f3af97
L
10555 },
10556 {
592a252b
L
10557 /* MOD_VEX_0F17 */
10558 { VEX_LEN_TABLE (VEX_LEN_0F17_M_0) },
c0f3af97
L
10559 },
10560 {
592a252b 10561 /* MOD_VEX_0F2B */
ec6f095a 10562 { "vmovntpX", { Mx, XM }, 0 },
c0f3af97 10563 },
ab4e4ed5
AF
10564 {
10565 /* MOD_VEX_W_0_0F41_P_0_LEN_1 */
10566 { Bad_Opcode },
10567 { "kandw", { MaskG, MaskVex, MaskR }, 0 },
10568 },
10569 {
10570 /* MOD_VEX_W_1_0F41_P_0_LEN_1 */
10571 { Bad_Opcode },
10572 { "kandq", { MaskG, MaskVex, MaskR }, 0 },
10573 },
10574 {
10575 /* MOD_VEX_W_0_0F41_P_2_LEN_1 */
10576 { Bad_Opcode },
10577 { "kandb", { MaskG, MaskVex, MaskR }, 0 },
10578 },
10579 {
10580 /* MOD_VEX_W_1_0F41_P_2_LEN_1 */
10581 { Bad_Opcode },
10582 { "kandd", { MaskG, MaskVex, MaskR }, 0 },
10583 },
10584 {
10585 /* MOD_VEX_W_0_0F42_P_0_LEN_1 */
10586 { Bad_Opcode },
10587 { "kandnw", { MaskG, MaskVex, MaskR }, 0 },
10588 },
10589 {
10590 /* MOD_VEX_W_1_0F42_P_0_LEN_1 */
10591 { Bad_Opcode },
10592 { "kandnq", { MaskG, MaskVex, MaskR }, 0 },
10593 },
10594 {
10595 /* MOD_VEX_W_0_0F42_P_2_LEN_1 */
10596 { Bad_Opcode },
10597 { "kandnb", { MaskG, MaskVex, MaskR }, 0 },
10598 },
10599 {
10600 /* MOD_VEX_W_1_0F42_P_2_LEN_1 */
10601 { Bad_Opcode },
10602 { "kandnd", { MaskG, MaskVex, MaskR }, 0 },
10603 },
10604 {
10605 /* MOD_VEX_W_0_0F44_P_0_LEN_0 */
10606 { Bad_Opcode },
10607 { "knotw", { MaskG, MaskR }, 0 },
10608 },
10609 {
10610 /* MOD_VEX_W_1_0F44_P_0_LEN_0 */
10611 { Bad_Opcode },
10612 { "knotq", { MaskG, MaskR }, 0 },
10613 },
10614 {
10615 /* MOD_VEX_W_0_0F44_P_2_LEN_0 */
10616 { Bad_Opcode },
10617 { "knotb", { MaskG, MaskR }, 0 },
10618 },
10619 {
10620 /* MOD_VEX_W_1_0F44_P_2_LEN_0 */
10621 { Bad_Opcode },
10622 { "knotd", { MaskG, MaskR }, 0 },
10623 },
10624 {
10625 /* MOD_VEX_W_0_0F45_P_0_LEN_1 */
10626 { Bad_Opcode },
10627 { "korw", { MaskG, MaskVex, MaskR }, 0 },
10628 },
10629 {
10630 /* MOD_VEX_W_1_0F45_P_0_LEN_1 */
10631 { Bad_Opcode },
10632 { "korq", { MaskG, MaskVex, MaskR }, 0 },
10633 },
10634 {
10635 /* MOD_VEX_W_0_0F45_P_2_LEN_1 */
10636 { Bad_Opcode },
10637 { "korb", { MaskG, MaskVex, MaskR }, 0 },
10638 },
10639 {
10640 /* MOD_VEX_W_1_0F45_P_2_LEN_1 */
10641 { Bad_Opcode },
10642 { "kord", { MaskG, MaskVex, MaskR }, 0 },
10643 },
10644 {
10645 /* MOD_VEX_W_0_0F46_P_0_LEN_1 */
10646 { Bad_Opcode },
10647 { "kxnorw", { MaskG, MaskVex, MaskR }, 0 },
10648 },
10649 {
10650 /* MOD_VEX_W_1_0F46_P_0_LEN_1 */
10651 { Bad_Opcode },
10652 { "kxnorq", { MaskG, MaskVex, MaskR }, 0 },
10653 },
10654 {
10655 /* MOD_VEX_W_0_0F46_P_2_LEN_1 */
10656 { Bad_Opcode },
10657 { "kxnorb", { MaskG, MaskVex, MaskR }, 0 },
10658 },
10659 {
10660 /* MOD_VEX_W_1_0F46_P_2_LEN_1 */
10661 { Bad_Opcode },
10662 { "kxnord", { MaskG, MaskVex, MaskR }, 0 },
10663 },
10664 {
10665 /* MOD_VEX_W_0_0F47_P_0_LEN_1 */
10666 { Bad_Opcode },
10667 { "kxorw", { MaskG, MaskVex, MaskR }, 0 },
10668 },
10669 {
10670 /* MOD_VEX_W_1_0F47_P_0_LEN_1 */
10671 { Bad_Opcode },
10672 { "kxorq", { MaskG, MaskVex, MaskR }, 0 },
10673 },
10674 {
10675 /* MOD_VEX_W_0_0F47_P_2_LEN_1 */
10676 { Bad_Opcode },
10677 { "kxorb", { MaskG, MaskVex, MaskR }, 0 },
10678 },
10679 {
10680 /* MOD_VEX_W_1_0F47_P_2_LEN_1 */
10681 { Bad_Opcode },
10682 { "kxord", { MaskG, MaskVex, MaskR }, 0 },
10683 },
10684 {
10685 /* MOD_VEX_W_0_0F4A_P_0_LEN_1 */
10686 { Bad_Opcode },
10687 { "kaddw", { MaskG, MaskVex, MaskR }, 0 },
10688 },
10689 {
10690 /* MOD_VEX_W_1_0F4A_P_0_LEN_1 */
10691 { Bad_Opcode },
10692 { "kaddq", { MaskG, MaskVex, MaskR }, 0 },
10693 },
10694 {
10695 /* MOD_VEX_W_0_0F4A_P_2_LEN_1 */
10696 { Bad_Opcode },
10697 { "kaddb", { MaskG, MaskVex, MaskR }, 0 },
10698 },
10699 {
10700 /* MOD_VEX_W_1_0F4A_P_2_LEN_1 */
10701 { Bad_Opcode },
10702 { "kaddd", { MaskG, MaskVex, MaskR }, 0 },
10703 },
10704 {
10705 /* MOD_VEX_W_0_0F4B_P_0_LEN_1 */
10706 { Bad_Opcode },
10707 { "kunpckwd", { MaskG, MaskVex, MaskR }, 0 },
10708 },
10709 {
10710 /* MOD_VEX_W_1_0F4B_P_0_LEN_1 */
10711 { Bad_Opcode },
10712 { "kunpckdq", { MaskG, MaskVex, MaskR }, 0 },
10713 },
10714 {
10715 /* MOD_VEX_W_0_0F4B_P_2_LEN_1 */
10716 { Bad_Opcode },
10717 { "kunpckbw", { MaskG, MaskVex, MaskR }, 0 },
10718 },
c0f3af97 10719 {
592a252b 10720 /* MOD_VEX_0F50 */
592d1631 10721 { Bad_Opcode },
ec6f095a 10722 { "vmovmskpX", { Gdq, XS }, 0 },
c0f3af97
L
10723 },
10724 {
592a252b 10725 /* MOD_VEX_0F71_REG_2 */
592d1631 10726 { Bad_Opcode },
592a252b 10727 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2) },
b844680a
L
10728 },
10729 {
592a252b 10730 /* MOD_VEX_0F71_REG_4 */
592d1631 10731 { Bad_Opcode },
592a252b 10732 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4) },
b844680a
L
10733 },
10734 {
592a252b 10735 /* MOD_VEX_0F71_REG_6 */
592d1631 10736 { Bad_Opcode },
592a252b 10737 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6) },
b844680a
L
10738 },
10739 {
592a252b 10740 /* MOD_VEX_0F72_REG_2 */
592d1631 10741 { Bad_Opcode },
592a252b 10742 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2) },
b844680a 10743 },
d8faab4e 10744 {
592a252b 10745 /* MOD_VEX_0F72_REG_4 */
592d1631 10746 { Bad_Opcode },
592a252b 10747 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4) },
d8faab4e
L
10748 },
10749 {
592a252b 10750 /* MOD_VEX_0F72_REG_6 */
592d1631 10751 { Bad_Opcode },
592a252b 10752 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6) },
d8faab4e 10753 },
876d4bfa 10754 {
592a252b 10755 /* MOD_VEX_0F73_REG_2 */
592d1631 10756 { Bad_Opcode },
592a252b 10757 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2) },
876d4bfa
L
10758 },
10759 {
592a252b 10760 /* MOD_VEX_0F73_REG_3 */
592d1631 10761 { Bad_Opcode },
592a252b 10762 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3) },
475a2301
L
10763 },
10764 {
592a252b 10765 /* MOD_VEX_0F73_REG_6 */
592d1631 10766 { Bad_Opcode },
592a252b 10767 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6) },
876d4bfa
L
10768 },
10769 {
592a252b 10770 /* MOD_VEX_0F73_REG_7 */
592d1631 10771 { Bad_Opcode },
592a252b 10772 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7) },
876d4bfa 10773 },
ab4e4ed5
AF
10774 {
10775 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
10776 { "kmovw", { Ew, MaskG }, 0 },
10777 { Bad_Opcode },
10778 },
10779 {
10780 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
10781 { "kmovq", { Eq, MaskG }, 0 },
10782 { Bad_Opcode },
10783 },
10784 {
10785 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
10786 { "kmovb", { Eb, MaskG }, 0 },
10787 { Bad_Opcode },
10788 },
10789 {
10790 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
10791 { "kmovd", { Ed, MaskG }, 0 },
10792 { Bad_Opcode },
10793 },
10794 {
10795 /* MOD_VEX_W_0_0F92_P_0_LEN_0 */
10796 { Bad_Opcode },
10797 { "kmovw", { MaskG, Rdq }, 0 },
10798 },
10799 {
10800 /* MOD_VEX_W_0_0F92_P_2_LEN_0 */
10801 { Bad_Opcode },
10802 { "kmovb", { MaskG, Rdq }, 0 },
10803 },
10804 {
58a211d2 10805 /* MOD_VEX_0F92_P_3_LEN_0 */
ab4e4ed5 10806 { Bad_Opcode },
58a211d2 10807 { "kmovK", { MaskG, Rdq }, 0 },
ab4e4ed5
AF
10808 },
10809 {
10810 /* MOD_VEX_W_0_0F93_P_0_LEN_0 */
10811 { Bad_Opcode },
10812 { "kmovw", { Gdq, MaskR }, 0 },
10813 },
10814 {
10815 /* MOD_VEX_W_0_0F93_P_2_LEN_0 */
10816 { Bad_Opcode },
10817 { "kmovb", { Gdq, MaskR }, 0 },
10818 },
10819 {
58a211d2 10820 /* MOD_VEX_0F93_P_3_LEN_0 */
ab4e4ed5 10821 { Bad_Opcode },
58a211d2 10822 { "kmovK", { Gdq, MaskR }, 0 },
ab4e4ed5
AF
10823 },
10824 {
10825 /* MOD_VEX_W_0_0F98_P_0_LEN_0 */
10826 { Bad_Opcode },
10827 { "kortestw", { MaskG, MaskR }, 0 },
10828 },
10829 {
10830 /* MOD_VEX_W_1_0F98_P_0_LEN_0 */
10831 { Bad_Opcode },
10832 { "kortestq", { MaskG, MaskR }, 0 },
10833 },
10834 {
10835 /* MOD_VEX_W_0_0F98_P_2_LEN_0 */
10836 { Bad_Opcode },
10837 { "kortestb", { MaskG, MaskR }, 0 },
10838 },
10839 {
10840 /* MOD_VEX_W_1_0F98_P_2_LEN_0 */
10841 { Bad_Opcode },
10842 { "kortestd", { MaskG, MaskR }, 0 },
10843 },
10844 {
10845 /* MOD_VEX_W_0_0F99_P_0_LEN_0 */
10846 { Bad_Opcode },
10847 { "ktestw", { MaskG, MaskR }, 0 },
10848 },
10849 {
10850 /* MOD_VEX_W_1_0F99_P_0_LEN_0 */
10851 { Bad_Opcode },
10852 { "ktestq", { MaskG, MaskR }, 0 },
10853 },
10854 {
10855 /* MOD_VEX_W_0_0F99_P_2_LEN_0 */
10856 { Bad_Opcode },
10857 { "ktestb", { MaskG, MaskR }, 0 },
10858 },
10859 {
10860 /* MOD_VEX_W_1_0F99_P_2_LEN_0 */
10861 { Bad_Opcode },
10862 { "ktestd", { MaskG, MaskR }, 0 },
10863 },
876d4bfa 10864 {
592a252b
L
10865 /* MOD_VEX_0FAE_REG_2 */
10866 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0) },
876d4bfa 10867 },
bbedc832 10868 {
592a252b
L
10869 /* MOD_VEX_0FAE_REG_3 */
10870 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0) },
bbedc832 10871 },
144c41d9 10872 {
592a252b 10873 /* MOD_VEX_0FD7_PREFIX_2 */
592d1631 10874 { Bad_Opcode },
ec6f095a 10875 { "vpmovmskb", { Gdq, XS }, 0 },
144c41d9 10876 },
1afd85e3 10877 {
592a252b 10878 /* MOD_VEX_0FE7_PREFIX_2 */
ec6f095a 10879 { "vmovntdq", { Mx, XM }, 0 },
1afd85e3
L
10880 },
10881 {
592a252b 10882 /* MOD_VEX_0FF0_PREFIX_3 */
ec6f095a 10883 { "vlddqu", { XM, M }, 0 },
92fddf8e 10884 },
75c135a8 10885 {
592a252b
L
10886 /* MOD_VEX_0F381A_PREFIX_2 */
10887 { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0) },
75c135a8 10888 },
1afd85e3 10889 {
592a252b 10890 /* MOD_VEX_0F382A_PREFIX_2 */
ec6f095a 10891 { "vmovntdqa", { XM, Mx }, 0 },
1afd85e3 10892 },
75c135a8 10893 {
592a252b
L
10894 /* MOD_VEX_0F382C_PREFIX_2 */
10895 { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0) },
75c135a8 10896 },
1afd85e3 10897 {
592a252b
L
10898 /* MOD_VEX_0F382D_PREFIX_2 */
10899 { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0) },
1afd85e3
L
10900 },
10901 {
592a252b
L
10902 /* MOD_VEX_0F382E_PREFIX_2 */
10903 { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0) },
1afd85e3
L
10904 },
10905 {
592a252b
L
10906 /* MOD_VEX_0F382F_PREFIX_2 */
10907 { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0) },
1afd85e3 10908 },
6c30d220
L
10909 {
10910 /* MOD_VEX_0F385A_PREFIX_2 */
10911 { VEX_LEN_TABLE (VEX_LEN_0F385A_P_2_M_0) },
10912 },
10913 {
10914 /* MOD_VEX_0F388C_PREFIX_2 */
bf890a93 10915 { "vpmaskmov%LW", { XM, Vex, Mx }, 0 },
6c30d220
L
10916 },
10917 {
10918 /* MOD_VEX_0F388E_PREFIX_2 */
bf890a93 10919 { "vpmaskmov%LW", { Mx, Vex, XM }, 0 },
6c30d220 10920 },
ab4e4ed5
AF
10921 {
10922 /* MOD_VEX_W_0_0F3A30_P_2_LEN_0 */
10923 { Bad_Opcode },
10924 { "kshiftrb", { MaskG, MaskR, Ib }, 0 },
10925 },
10926 {
10927 /* MOD_VEX_W_1_0F3A30_P_2_LEN_0 */
10928 { Bad_Opcode },
10929 { "kshiftrw", { MaskG, MaskR, Ib }, 0 },
10930 },
10931 {
10932 /* MOD_VEX_W_0_0F3A31_P_2_LEN_0 */
10933 { Bad_Opcode },
10934 { "kshiftrd", { MaskG, MaskR, Ib }, 0 },
10935 },
10936 {
10937 /* MOD_VEX_W_1_0F3A31_P_2_LEN_0 */
10938 { Bad_Opcode },
10939 { "kshiftrq", { MaskG, MaskR, Ib }, 0 },
10940 },
10941 {
10942 /* MOD_VEX_W_0_0F3A32_P_2_LEN_0 */
10943 { Bad_Opcode },
10944 { "kshiftlb", { MaskG, MaskR, Ib }, 0 },
10945 },
10946 {
10947 /* MOD_VEX_W_1_0F3A32_P_2_LEN_0 */
10948 { Bad_Opcode },
10949 { "kshiftlw", { MaskG, MaskR, Ib }, 0 },
10950 },
10951 {
10952 /* MOD_VEX_W_0_0F3A33_P_2_LEN_0 */
10953 { Bad_Opcode },
10954 { "kshiftld", { MaskG, MaskR, Ib }, 0 },
10955 },
10956 {
10957 /* MOD_VEX_W_1_0F3A33_P_2_LEN_0 */
10958 { Bad_Opcode },
10959 { "kshiftlq", { MaskG, MaskR, Ib }, 0 },
10960 },
ad692897
L
10961
10962#include "i386-dis-evex-mod.h"
b844680a
L
10963};
10964
1ceb70f8 10965static const struct dis386 rm_table[][8] = {
42164a71
L
10966 {
10967 /* RM_C6_REG_7 */
bf890a93 10968 { "xabort", { Skip_MODRM, Ib }, 0 },
42164a71
L
10969 },
10970 {
10971 /* RM_C7_REG_7 */
bf890a93 10972 { "xbeginT", { Skip_MODRM, Jv }, 0 },
42164a71 10973 },
b844680a 10974 {
1ceb70f8 10975 /* RM_0F01_REG_0 */
a4e78aa5 10976 { "enclv", { Skip_MODRM }, 0 },
bf890a93
IT
10977 { "vmcall", { Skip_MODRM }, 0 },
10978 { "vmlaunch", { Skip_MODRM }, 0 },
10979 { "vmresume", { Skip_MODRM }, 0 },
10980 { "vmxoff", { Skip_MODRM }, 0 },
be3a8dca 10981 { "pconfig", { Skip_MODRM }, 0 },
b844680a
L
10982 },
10983 {
1ceb70f8 10984 /* RM_0F01_REG_1 */
bf890a93
IT
10985 { "monitor", { { OP_Monitor, 0 } }, 0 },
10986 { "mwait", { { OP_Mwait, 0 } }, 0 },
10987 { "clac", { Skip_MODRM }, 0 },
10988 { "stac", { Skip_MODRM }, 0 },
2cf200a4
IT
10989 { Bad_Opcode },
10990 { Bad_Opcode },
10991 { Bad_Opcode },
bf890a93 10992 { "encls", { Skip_MODRM }, 0 },
b844680a 10993 },
475a2301
L
10994 {
10995 /* RM_0F01_REG_2 */
bf890a93
IT
10996 { "xgetbv", { Skip_MODRM }, 0 },
10997 { "xsetbv", { Skip_MODRM }, 0 },
8729a6f6
L
10998 { Bad_Opcode },
10999 { Bad_Opcode },
bf890a93
IT
11000 { "vmfunc", { Skip_MODRM }, 0 },
11001 { "xend", { Skip_MODRM }, 0 },
11002 { "xtest", { Skip_MODRM }, 0 },
11003 { "enclu", { Skip_MODRM }, 0 },
475a2301 11004 },
b844680a 11005 {
1ceb70f8 11006 /* RM_0F01_REG_3 */
bf890a93
IT
11007 { "vmrun", { Skip_MODRM }, 0 },
11008 { "vmmcall", { Skip_MODRM }, 0 },
11009 { "vmload", { Skip_MODRM }, 0 },
11010 { "vmsave", { Skip_MODRM }, 0 },
11011 { "stgi", { Skip_MODRM }, 0 },
11012 { "clgi", { Skip_MODRM }, 0 },
11013 { "skinit", { Skip_MODRM }, 0 },
11014 { "invlpga", { Skip_MODRM }, 0 },
4e7d34a6 11015 },
8eab4136 11016 {
f8687e93
JB
11017 /* RM_0F01_REG_5_MOD_3 */
11018 { PREFIX_TABLE (PREFIX_0F01_REG_5_MOD_3_RM_0) },
8eab4136 11019 { Bad_Opcode },
f8687e93 11020 { PREFIX_TABLE (PREFIX_0F01_REG_5_MOD_3_RM_2) },
8eab4136
L
11021 { Bad_Opcode },
11022 { Bad_Opcode },
11023 { Bad_Opcode },
11024 { "rdpkru", { Skip_MODRM }, 0 },
11025 { "wrpkru", { Skip_MODRM }, 0 },
11026 },
4e7d34a6 11027 {
f8687e93 11028 /* RM_0F01_REG_7_MOD_3 */
bf890a93
IT
11029 { "swapgs", { Skip_MODRM }, 0 },
11030 { "rdtscp", { Skip_MODRM }, 0 },
267b8516
JB
11031 { PREFIX_TABLE (PREFIX_0F01_REG_7_MOD_3_RM_2) },
11032 { PREFIX_TABLE (PREFIX_0F01_REG_7_MOD_3_RM_3) },
bf890a93 11033 { "clzero", { Skip_MODRM }, 0 },
142861df 11034 { "rdpru", { Skip_MODRM }, 0 },
b844680a 11035 },
603555e5 11036 {
f8687e93 11037 /* RM_0F1E_P_1_MOD_3_REG_7 */
603555e5
L
11038 { "nopQ", { Ev }, 0 },
11039 { "nopQ", { Ev }, 0 },
11040 { "endbr64", { Skip_MODRM }, PREFIX_OPCODE },
11041 { "endbr32", { Skip_MODRM }, PREFIX_OPCODE },
11042 { "nopQ", { Ev }, 0 },
11043 { "nopQ", { Ev }, 0 },
11044 { "nopQ", { Ev }, 0 },
11045 { "nopQ", { Ev }, 0 },
11046 },
b844680a 11047 {
f8687e93 11048 /* RM_0FAE_REG_6_MOD_3 */
bf890a93 11049 { "mfence", { Skip_MODRM }, 0 },
b844680a 11050 },
bbedc832 11051 {
f8687e93 11052 /* RM_0FAE_REG_7_MOD_3 */
b5cefcca
L
11053 { "sfence", { Skip_MODRM }, 0 },
11054
144c41d9 11055 },
b844680a
L
11056};
11057
c608c12e
AM
11058#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
11059
f16cd0d5
L
11060/* We use the high bit to indicate different name for the same
11061 prefix. */
f16cd0d5 11062#define REP_PREFIX (0xf3 | 0x100)
42164a71
L
11063#define XACQUIRE_PREFIX (0xf2 | 0x200)
11064#define XRELEASE_PREFIX (0xf3 | 0x400)
7e8b059b 11065#define BND_PREFIX (0xf2 | 0x400)
04ef582a 11066#define NOTRACK_PREFIX (0x3e | 0x100)
f16cd0d5
L
11067
11068static int
26ca5450 11069ckprefix (void)
252b5132 11070{
f16cd0d5 11071 int newrex, i, length;
52b15da3 11072 rex = 0;
c0f3af97 11073 rex_ignored = 0;
252b5132 11074 prefixes = 0;
7d421014 11075 used_prefixes = 0;
52b15da3 11076 rex_used = 0;
f16cd0d5
L
11077 last_lock_prefix = -1;
11078 last_repz_prefix = -1;
11079 last_repnz_prefix = -1;
11080 last_data_prefix = -1;
11081 last_addr_prefix = -1;
11082 last_rex_prefix = -1;
11083 last_seg_prefix = -1;
d9949a36 11084 fwait_prefix = -1;
285ca992 11085 active_seg_prefix = 0;
f310f33d
L
11086 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
11087 all_prefixes[i] = 0;
11088 i = 0;
f16cd0d5
L
11089 length = 0;
11090 /* The maximum instruction length is 15bytes. */
11091 while (length < MAX_CODE_LENGTH - 1)
252b5132
RH
11092 {
11093 FETCH_DATA (the_info, codep + 1);
52b15da3 11094 newrex = 0;
252b5132
RH
11095 switch (*codep)
11096 {
52b15da3
JH
11097 /* REX prefixes family. */
11098 case 0x40:
11099 case 0x41:
11100 case 0x42:
11101 case 0x43:
11102 case 0x44:
11103 case 0x45:
11104 case 0x46:
11105 case 0x47:
11106 case 0x48:
11107 case 0x49:
11108 case 0x4a:
11109 case 0x4b:
11110 case 0x4c:
11111 case 0x4d:
11112 case 0x4e:
11113 case 0x4f:
f16cd0d5
L
11114 if (address_mode == mode_64bit)
11115 newrex = *codep;
11116 else
11117 return 1;
11118 last_rex_prefix = i;
52b15da3 11119 break;
252b5132
RH
11120 case 0xf3:
11121 prefixes |= PREFIX_REPZ;
f16cd0d5 11122 last_repz_prefix = i;
252b5132
RH
11123 break;
11124 case 0xf2:
11125 prefixes |= PREFIX_REPNZ;
f16cd0d5 11126 last_repnz_prefix = i;
252b5132
RH
11127 break;
11128 case 0xf0:
11129 prefixes |= PREFIX_LOCK;
f16cd0d5 11130 last_lock_prefix = i;
252b5132
RH
11131 break;
11132 case 0x2e:
11133 prefixes |= PREFIX_CS;
f16cd0d5 11134 last_seg_prefix = i;
285ca992 11135 active_seg_prefix = PREFIX_CS;
252b5132
RH
11136 break;
11137 case 0x36:
11138 prefixes |= PREFIX_SS;
f16cd0d5 11139 last_seg_prefix = i;
285ca992 11140 active_seg_prefix = PREFIX_SS;
252b5132
RH
11141 break;
11142 case 0x3e:
11143 prefixes |= PREFIX_DS;
f16cd0d5 11144 last_seg_prefix = i;
285ca992 11145 active_seg_prefix = PREFIX_DS;
252b5132
RH
11146 break;
11147 case 0x26:
11148 prefixes |= PREFIX_ES;
f16cd0d5 11149 last_seg_prefix = i;
285ca992 11150 active_seg_prefix = PREFIX_ES;
252b5132
RH
11151 break;
11152 case 0x64:
11153 prefixes |= PREFIX_FS;
f16cd0d5 11154 last_seg_prefix = i;
285ca992 11155 active_seg_prefix = PREFIX_FS;
252b5132
RH
11156 break;
11157 case 0x65:
11158 prefixes |= PREFIX_GS;
f16cd0d5 11159 last_seg_prefix = i;
285ca992 11160 active_seg_prefix = PREFIX_GS;
252b5132
RH
11161 break;
11162 case 0x66:
11163 prefixes |= PREFIX_DATA;
f16cd0d5 11164 last_data_prefix = i;
252b5132
RH
11165 break;
11166 case 0x67:
11167 prefixes |= PREFIX_ADDR;
f16cd0d5 11168 last_addr_prefix = i;
252b5132 11169 break;
5076851f 11170 case FWAIT_OPCODE:
252b5132
RH
11171 /* fwait is really an instruction. If there are prefixes
11172 before the fwait, they belong to the fwait, *not* to the
11173 following instruction. */
d9949a36 11174 fwait_prefix = i;
3e7d61b2 11175 if (prefixes || rex)
252b5132
RH
11176 {
11177 prefixes |= PREFIX_FWAIT;
11178 codep++;
6c067bbb
RM
11179 /* This ensures that the previous REX prefixes are noticed
11180 as unused prefixes, as in the return case below. */
11181 rex_used = rex;
f16cd0d5 11182 return 1;
252b5132
RH
11183 }
11184 prefixes = PREFIX_FWAIT;
11185 break;
11186 default:
f16cd0d5 11187 return 1;
252b5132 11188 }
52b15da3
JH
11189 /* Rex is ignored when followed by another prefix. */
11190 if (rex)
11191 {
3e7d61b2 11192 rex_used = rex;
f16cd0d5 11193 return 1;
52b15da3 11194 }
f16cd0d5 11195 if (*codep != FWAIT_OPCODE)
4e9ac44a 11196 all_prefixes[i++] = *codep;
52b15da3 11197 rex = newrex;
252b5132 11198 codep++;
f16cd0d5
L
11199 length++;
11200 }
11201 return 0;
11202}
11203
7d421014
ILT
11204/* Return the name of the prefix byte PREF, or NULL if PREF is not a
11205 prefix byte. */
11206
11207static const char *
26ca5450 11208prefix_name (int pref, int sizeflag)
7d421014 11209{
0003779b
L
11210 static const char *rexes [16] =
11211 {
11212 "rex", /* 0x40 */
11213 "rex.B", /* 0x41 */
11214 "rex.X", /* 0x42 */
11215 "rex.XB", /* 0x43 */
11216 "rex.R", /* 0x44 */
11217 "rex.RB", /* 0x45 */
11218 "rex.RX", /* 0x46 */
11219 "rex.RXB", /* 0x47 */
11220 "rex.W", /* 0x48 */
11221 "rex.WB", /* 0x49 */
11222 "rex.WX", /* 0x4a */
11223 "rex.WXB", /* 0x4b */
11224 "rex.WR", /* 0x4c */
11225 "rex.WRB", /* 0x4d */
11226 "rex.WRX", /* 0x4e */
11227 "rex.WRXB", /* 0x4f */
11228 };
11229
7d421014
ILT
11230 switch (pref)
11231 {
52b15da3
JH
11232 /* REX prefixes family. */
11233 case 0x40:
52b15da3 11234 case 0x41:
52b15da3 11235 case 0x42:
52b15da3 11236 case 0x43:
52b15da3 11237 case 0x44:
52b15da3 11238 case 0x45:
52b15da3 11239 case 0x46:
52b15da3 11240 case 0x47:
52b15da3 11241 case 0x48:
52b15da3 11242 case 0x49:
52b15da3 11243 case 0x4a:
52b15da3 11244 case 0x4b:
52b15da3 11245 case 0x4c:
52b15da3 11246 case 0x4d:
52b15da3 11247 case 0x4e:
52b15da3 11248 case 0x4f:
0003779b 11249 return rexes [pref - 0x40];
7d421014
ILT
11250 case 0xf3:
11251 return "repz";
11252 case 0xf2:
11253 return "repnz";
11254 case 0xf0:
11255 return "lock";
11256 case 0x2e:
11257 return "cs";
11258 case 0x36:
11259 return "ss";
11260 case 0x3e:
11261 return "ds";
11262 case 0x26:
11263 return "es";
11264 case 0x64:
11265 return "fs";
11266 case 0x65:
11267 return "gs";
11268 case 0x66:
11269 return (sizeflag & DFLAG) ? "data16" : "data32";
11270 case 0x67:
cb712a9e 11271 if (address_mode == mode_64bit)
db6eb5be 11272 return (sizeflag & AFLAG) ? "addr32" : "addr64";
c1a64871 11273 else
2888cb7a 11274 return (sizeflag & AFLAG) ? "addr16" : "addr32";
7d421014
ILT
11275 case FWAIT_OPCODE:
11276 return "fwait";
f16cd0d5
L
11277 case REP_PREFIX:
11278 return "rep";
42164a71
L
11279 case XACQUIRE_PREFIX:
11280 return "xacquire";
11281 case XRELEASE_PREFIX:
11282 return "xrelease";
7e8b059b
L
11283 case BND_PREFIX:
11284 return "bnd";
04ef582a
L
11285 case NOTRACK_PREFIX:
11286 return "notrack";
7d421014
ILT
11287 default:
11288 return NULL;
11289 }
11290}
11291
ce518a5f
L
11292static char op_out[MAX_OPERANDS][100];
11293static int op_ad, op_index[MAX_OPERANDS];
1d9f512f 11294static int two_source_ops;
ce518a5f
L
11295static bfd_vma op_address[MAX_OPERANDS];
11296static bfd_vma op_riprel[MAX_OPERANDS];
52b15da3 11297static bfd_vma start_pc;
ce518a5f 11298
252b5132
RH
11299/*
11300 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
11301 * (see topic "Redundant prefixes" in the "Differences from 8086"
11302 * section of the "Virtual 8086 Mode" chapter.)
11303 * 'pc' should be the address of this instruction, it will
11304 * be used to print the target address if this is a relative jump or call
11305 * The function returns the length of this instruction in bytes.
11306 */
11307
252b5132 11308static char intel_syntax;
9d141669 11309static char intel_mnemonic = !SYSV386_COMPAT;
252b5132
RH
11310static char open_char;
11311static char close_char;
11312static char separator_char;
11313static char scale_char;
11314
5db04b09
L
11315enum x86_64_isa
11316{
11317 amd64 = 0,
11318 intel64
11319};
11320
11321static enum x86_64_isa isa64;
11322
e396998b
AM
11323/* Here for backwards compatibility. When gdb stops using
11324 print_insn_i386_att and print_insn_i386_intel these functions can
11325 disappear, and print_insn_i386 be merged into print_insn. */
252b5132 11326int
26ca5450 11327print_insn_i386_att (bfd_vma pc, disassemble_info *info)
252b5132
RH
11328{
11329 intel_syntax = 0;
e396998b
AM
11330
11331 return print_insn (pc, info);
252b5132
RH
11332}
11333
11334int
26ca5450 11335print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
252b5132
RH
11336{
11337 intel_syntax = 1;
e396998b
AM
11338
11339 return print_insn (pc, info);
252b5132
RH
11340}
11341
e396998b 11342int
26ca5450 11343print_insn_i386 (bfd_vma pc, disassemble_info *info)
e396998b
AM
11344{
11345 intel_syntax = -1;
11346
11347 return print_insn (pc, info);
11348}
11349
f59a29b9
L
11350void
11351print_i386_disassembler_options (FILE *stream)
11352{
11353 fprintf (stream, _("\n\
11354The following i386/x86-64 specific disassembler options are supported for use\n\
11355with the -M switch (multiple options should be separated by commas):\n"));
11356
11357 fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
11358 fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
11359 fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
11360 fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
11361 fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
9d141669
L
11362 fprintf (stream, _(" att-mnemonic\n"
11363 " Display instruction in AT&T mnemonic\n"));
11364 fprintf (stream, _(" intel-mnemonic\n"
11365 " Display instruction in Intel mnemonic\n"));
f59a29b9
L
11366 fprintf (stream, _(" addr64 Assume 64bit address size\n"));
11367 fprintf (stream, _(" addr32 Assume 32bit address size\n"));
11368 fprintf (stream, _(" addr16 Assume 16bit address size\n"));
11369 fprintf (stream, _(" data32 Assume 32bit data size\n"));
11370 fprintf (stream, _(" data16 Assume 16bit data size\n"));
11371 fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
5db04b09
L
11372 fprintf (stream, _(" amd64 Display instruction in AMD64 ISA\n"));
11373 fprintf (stream, _(" intel64 Display instruction in Intel64 ISA\n"));
f59a29b9
L
11374}
11375
592d1631 11376/* Bad opcode. */
bf890a93 11377static const struct dis386 bad_opcode = { "(bad)", { XX }, 0 };
592d1631 11378
b844680a
L
11379/* Get a pointer to struct dis386 with a valid name. */
11380
11381static const struct dis386 *
8bb15339 11382get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
b844680a 11383{
91d6fa6a 11384 int vindex, vex_table_index;
b844680a
L
11385
11386 if (dp->name != NULL)
11387 return dp;
11388
11389 switch (dp->op[0].bytemode)
11390 {
1ceb70f8
L
11391 case USE_REG_TABLE:
11392 dp = &reg_table[dp->op[1].bytemode][modrm.reg];
11393 break;
11394
11395 case USE_MOD_TABLE:
91d6fa6a
NC
11396 vindex = modrm.mod == 0x3 ? 1 : 0;
11397 dp = &mod_table[dp->op[1].bytemode][vindex];
1ceb70f8
L
11398 break;
11399
11400 case USE_RM_TABLE:
11401 dp = &rm_table[dp->op[1].bytemode][modrm.rm];
b844680a
L
11402 break;
11403
4e7d34a6 11404 case USE_PREFIX_TABLE:
c0f3af97 11405 if (need_vex)
b844680a 11406 {
c0f3af97
L
11407 /* The prefix in VEX is implicit. */
11408 switch (vex.prefix)
11409 {
11410 case 0:
91d6fa6a 11411 vindex = 0;
c0f3af97
L
11412 break;
11413 case REPE_PREFIX_OPCODE:
91d6fa6a 11414 vindex = 1;
c0f3af97
L
11415 break;
11416 case DATA_PREFIX_OPCODE:
91d6fa6a 11417 vindex = 2;
c0f3af97
L
11418 break;
11419 case REPNE_PREFIX_OPCODE:
91d6fa6a 11420 vindex = 3;
c0f3af97
L
11421 break;
11422 default:
11423 abort ();
11424 break;
11425 }
b844680a 11426 }
7bb15c6f 11427 else
b844680a 11428 {
285ca992
L
11429 int last_prefix = -1;
11430 int prefix = 0;
91d6fa6a 11431 vindex = 0;
285ca992
L
11432 /* We check PREFIX_REPNZ and PREFIX_REPZ before PREFIX_DATA.
11433 When there are multiple PREFIX_REPNZ and PREFIX_REPZ, the
11434 last one wins. */
11435 if ((prefixes & (PREFIX_REPZ | PREFIX_REPNZ)) != 0)
b844680a 11436 {
285ca992 11437 if (last_repz_prefix > last_repnz_prefix)
c0f3af97 11438 {
285ca992
L
11439 vindex = 1;
11440 prefix = PREFIX_REPZ;
11441 last_prefix = last_repz_prefix;
c0f3af97
L
11442 }
11443 else
b844680a 11444 {
285ca992
L
11445 vindex = 3;
11446 prefix = PREFIX_REPNZ;
11447 last_prefix = last_repnz_prefix;
b844680a 11448 }
285ca992 11449
507bd325
L
11450 /* Check if prefix should be ignored. */
11451 if ((((prefix_table[dp->op[1].bytemode][vindex].prefix_requirement
11452 & PREFIX_IGNORED) >> PREFIX_IGNORED_SHIFT)
11453 & prefix) != 0)
285ca992
L
11454 vindex = 0;
11455 }
11456
11457 if (vindex == 0 && (prefixes & PREFIX_DATA) != 0)
11458 {
11459 vindex = 2;
11460 prefix = PREFIX_DATA;
11461 last_prefix = last_data_prefix;
11462 }
11463
11464 if (vindex != 0)
11465 {
11466 used_prefixes |= prefix;
11467 all_prefixes[last_prefix] = 0;
b844680a
L
11468 }
11469 }
91d6fa6a 11470 dp = &prefix_table[dp->op[1].bytemode][vindex];
b844680a
L
11471 break;
11472
4e7d34a6 11473 case USE_X86_64_TABLE:
91d6fa6a
NC
11474 vindex = address_mode == mode_64bit ? 1 : 0;
11475 dp = &x86_64_table[dp->op[1].bytemode][vindex];
b844680a
L
11476 break;
11477
4e7d34a6 11478 case USE_3BYTE_TABLE:
8bb15339 11479 FETCH_DATA (info, codep + 2);
91d6fa6a
NC
11480 vindex = *codep++;
11481 dp = &three_byte_table[dp->op[1].bytemode][vindex];
285ca992 11482 end_codep = codep;
8bb15339
L
11483 modrm.mod = (*codep >> 6) & 3;
11484 modrm.reg = (*codep >> 3) & 7;
11485 modrm.rm = *codep & 7;
11486 break;
11487
c0f3af97
L
11488 case USE_VEX_LEN_TABLE:
11489 if (!need_vex)
11490 abort ();
11491
11492 switch (vex.length)
11493 {
11494 case 128:
91d6fa6a 11495 vindex = 0;
c0f3af97
L
11496 break;
11497 case 256:
91d6fa6a 11498 vindex = 1;
c0f3af97
L
11499 break;
11500 default:
11501 abort ();
11502 break;
11503 }
11504
91d6fa6a 11505 dp = &vex_len_table[dp->op[1].bytemode][vindex];
c0f3af97
L
11506 break;
11507
04e2a182
L
11508 case USE_EVEX_LEN_TABLE:
11509 if (!vex.evex)
11510 abort ();
11511
11512 switch (vex.length)
11513 {
11514 case 128:
11515 vindex = 0;
11516 break;
11517 case 256:
11518 vindex = 1;
11519 break;
11520 case 512:
11521 vindex = 2;
11522 break;
11523 default:
11524 abort ();
11525 break;
11526 }
11527
11528 dp = &evex_len_table[dp->op[1].bytemode][vindex];
11529 break;
11530
f88c9eb0
SP
11531 case USE_XOP_8F_TABLE:
11532 FETCH_DATA (info, codep + 3);
11533 /* All bits in the REX prefix are ignored. */
11534 rex_ignored = rex;
11535 rex = ~(*codep >> 5) & 0x7;
11536
11537 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
11538 switch ((*codep & 0x1f))
11539 {
11540 default:
f07af43e
L
11541 dp = &bad_opcode;
11542 return dp;
5dd85c99
SP
11543 case 0x8:
11544 vex_table_index = XOP_08;
11545 break;
f88c9eb0
SP
11546 case 0x9:
11547 vex_table_index = XOP_09;
11548 break;
11549 case 0xa:
11550 vex_table_index = XOP_0A;
11551 break;
11552 }
11553 codep++;
11554 vex.w = *codep & 0x80;
11555 if (vex.w && address_mode == mode_64bit)
11556 rex |= REX_W;
11557
11558 vex.register_specifier = (~(*codep >> 3)) & 0xf;
abfcb414 11559 if (address_mode != mode_64bit)
f07af43e 11560 {
abfcb414
AP
11561 /* In 16/32-bit mode REX_B is silently ignored. */
11562 rex &= ~REX_B;
f07af43e 11563 }
f88c9eb0
SP
11564
11565 vex.length = (*codep & 0x4) ? 256 : 128;
11566 switch ((*codep & 0x3))
11567 {
11568 case 0:
f88c9eb0
SP
11569 break;
11570 case 1:
11571 vex.prefix = DATA_PREFIX_OPCODE;
11572 break;
11573 case 2:
11574 vex.prefix = REPE_PREFIX_OPCODE;
11575 break;
11576 case 3:
11577 vex.prefix = REPNE_PREFIX_OPCODE;
11578 break;
11579 }
11580 need_vex = 1;
11581 need_vex_reg = 1;
11582 codep++;
91d6fa6a
NC
11583 vindex = *codep++;
11584 dp = &xop_table[vex_table_index][vindex];
c48244a5 11585
285ca992 11586 end_codep = codep;
c48244a5
SP
11587 FETCH_DATA (info, codep + 1);
11588 modrm.mod = (*codep >> 6) & 3;
11589 modrm.reg = (*codep >> 3) & 7;
11590 modrm.rm = *codep & 7;
f88c9eb0
SP
11591 break;
11592
c0f3af97 11593 case USE_VEX_C4_TABLE:
43234a1e 11594 /* VEX prefix. */
c0f3af97
L
11595 FETCH_DATA (info, codep + 3);
11596 /* All bits in the REX prefix are ignored. */
11597 rex_ignored = rex;
11598 rex = ~(*codep >> 5) & 0x7;
11599 switch ((*codep & 0x1f))
11600 {
11601 default:
f07af43e
L
11602 dp = &bad_opcode;
11603 return dp;
c0f3af97 11604 case 0x1:
f88c9eb0 11605 vex_table_index = VEX_0F;
c0f3af97
L
11606 break;
11607 case 0x2:
f88c9eb0 11608 vex_table_index = VEX_0F38;
c0f3af97
L
11609 break;
11610 case 0x3:
f88c9eb0 11611 vex_table_index = VEX_0F3A;
c0f3af97
L
11612 break;
11613 }
11614 codep++;
11615 vex.w = *codep & 0x80;
9889cbb1 11616 if (address_mode == mode_64bit)
f07af43e 11617 {
9889cbb1
L
11618 if (vex.w)
11619 rex |= REX_W;
9889cbb1
L
11620 }
11621 else
11622 {
11623 /* For the 3-byte VEX prefix in 32-bit mode, the REX_B bit
11624 is ignored, other REX bits are 0 and the highest bit in
5f847646 11625 VEX.vvvv is also ignored (but we mustn't clear it here). */
9889cbb1 11626 rex = 0;
f07af43e 11627 }
5f847646 11628 vex.register_specifier = (~(*codep >> 3)) & 0xf;
c0f3af97
L
11629 vex.length = (*codep & 0x4) ? 256 : 128;
11630 switch ((*codep & 0x3))
11631 {
11632 case 0:
c0f3af97
L
11633 break;
11634 case 1:
11635 vex.prefix = DATA_PREFIX_OPCODE;
11636 break;
11637 case 2:
11638 vex.prefix = REPE_PREFIX_OPCODE;
11639 break;
11640 case 3:
11641 vex.prefix = REPNE_PREFIX_OPCODE;
11642 break;
11643 }
11644 need_vex = 1;
11645 need_vex_reg = 1;
11646 codep++;
91d6fa6a
NC
11647 vindex = *codep++;
11648 dp = &vex_table[vex_table_index][vindex];
285ca992 11649 end_codep = codep;
53c4d625
JB
11650 /* There is no MODRM byte for VEX0F 77. */
11651 if (vex_table_index != VEX_0F || vindex != 0x77)
c0f3af97
L
11652 {
11653 FETCH_DATA (info, codep + 1);
11654 modrm.mod = (*codep >> 6) & 3;
11655 modrm.reg = (*codep >> 3) & 7;
11656 modrm.rm = *codep & 7;
11657 }
11658 break;
11659
11660 case USE_VEX_C5_TABLE:
43234a1e 11661 /* VEX prefix. */
c0f3af97
L
11662 FETCH_DATA (info, codep + 2);
11663 /* All bits in the REX prefix are ignored. */
11664 rex_ignored = rex;
11665 rex = (*codep & 0x80) ? 0 : REX_R;
11666
9889cbb1
L
11667 /* For the 2-byte VEX prefix in 32-bit mode, the highest bit in
11668 VEX.vvvv is 1. */
c0f3af97 11669 vex.register_specifier = (~(*codep >> 3)) & 0xf;
c0f3af97
L
11670 vex.length = (*codep & 0x4) ? 256 : 128;
11671 switch ((*codep & 0x3))
11672 {
11673 case 0:
c0f3af97
L
11674 break;
11675 case 1:
11676 vex.prefix = DATA_PREFIX_OPCODE;
11677 break;
11678 case 2:
11679 vex.prefix = REPE_PREFIX_OPCODE;
11680 break;
11681 case 3:
11682 vex.prefix = REPNE_PREFIX_OPCODE;
11683 break;
11684 }
11685 need_vex = 1;
11686 need_vex_reg = 1;
11687 codep++;
91d6fa6a
NC
11688 vindex = *codep++;
11689 dp = &vex_table[dp->op[1].bytemode][vindex];
285ca992 11690 end_codep = codep;
53c4d625
JB
11691 /* There is no MODRM byte for VEX 77. */
11692 if (vindex != 0x77)
c0f3af97
L
11693 {
11694 FETCH_DATA (info, codep + 1);
11695 modrm.mod = (*codep >> 6) & 3;
11696 modrm.reg = (*codep >> 3) & 7;
11697 modrm.rm = *codep & 7;
11698 }
11699 break;
11700
9e30b8e0
L
11701 case USE_VEX_W_TABLE:
11702 if (!need_vex)
11703 abort ();
11704
11705 dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
11706 break;
11707
43234a1e
L
11708 case USE_EVEX_TABLE:
11709 two_source_ops = 0;
11710 /* EVEX prefix. */
11711 vex.evex = 1;
11712 FETCH_DATA (info, codep + 4);
11713 /* All bits in the REX prefix are ignored. */
11714 rex_ignored = rex;
11715 /* The first byte after 0x62. */
11716 rex = ~(*codep >> 5) & 0x7;
11717 vex.r = *codep & 0x10;
11718 switch ((*codep & 0xf))
11719 {
11720 default:
11721 return &bad_opcode;
11722 case 0x1:
11723 vex_table_index = EVEX_0F;
11724 break;
11725 case 0x2:
11726 vex_table_index = EVEX_0F38;
11727 break;
11728 case 0x3:
11729 vex_table_index = EVEX_0F3A;
11730 break;
11731 }
11732
11733 /* The second byte after 0x62. */
11734 codep++;
11735 vex.w = *codep & 0x80;
11736 if (vex.w && address_mode == mode_64bit)
11737 rex |= REX_W;
11738
11739 vex.register_specifier = (~(*codep >> 3)) & 0xf;
43234a1e
L
11740
11741 /* The U bit. */
11742 if (!(*codep & 0x4))
11743 return &bad_opcode;
11744
11745 switch ((*codep & 0x3))
11746 {
11747 case 0:
43234a1e
L
11748 break;
11749 case 1:
11750 vex.prefix = DATA_PREFIX_OPCODE;
11751 break;
11752 case 2:
11753 vex.prefix = REPE_PREFIX_OPCODE;
11754 break;
11755 case 3:
11756 vex.prefix = REPNE_PREFIX_OPCODE;
11757 break;
11758 }
11759
11760 /* The third byte after 0x62. */
11761 codep++;
11762
11763 /* Remember the static rounding bits. */
11764 vex.ll = (*codep >> 5) & 3;
11765 vex.b = (*codep & 0x10) != 0;
11766
11767 vex.v = *codep & 0x8;
11768 vex.mask_register_specifier = *codep & 0x7;
11769 vex.zeroing = *codep & 0x80;
11770
5f847646
JB
11771 if (address_mode != mode_64bit)
11772 {
11773 /* In 16/32-bit mode silently ignore following bits. */
11774 rex &= ~REX_B;
11775 vex.r = 1;
11776 vex.v = 1;
11777 }
11778
43234a1e
L
11779 need_vex = 1;
11780 need_vex_reg = 1;
11781 codep++;
11782 vindex = *codep++;
11783 dp = &evex_table[vex_table_index][vindex];
285ca992 11784 end_codep = codep;
43234a1e
L
11785 FETCH_DATA (info, codep + 1);
11786 modrm.mod = (*codep >> 6) & 3;
11787 modrm.reg = (*codep >> 3) & 7;
11788 modrm.rm = *codep & 7;
11789
11790 /* Set vector length. */
11791 if (modrm.mod == 3 && vex.b)
11792 vex.length = 512;
11793 else
11794 {
11795 switch (vex.ll)
11796 {
11797 case 0x0:
11798 vex.length = 128;
11799 break;
11800 case 0x1:
11801 vex.length = 256;
11802 break;
11803 case 0x2:
11804 vex.length = 512;
11805 break;
11806 default:
11807 return &bad_opcode;
11808 }
11809 }
11810 break;
11811
592d1631
L
11812 case 0:
11813 dp = &bad_opcode;
11814 break;
11815
b844680a 11816 default:
d34b5006 11817 abort ();
b844680a
L
11818 }
11819
11820 if (dp->name != NULL)
11821 return dp;
11822 else
8bb15339 11823 return get_valid_dis386 (dp, info);
b844680a
L
11824}
11825
dfc8cf43 11826static void
55cf16e1 11827get_sib (disassemble_info *info, int sizeflag)
dfc8cf43
L
11828{
11829 /* If modrm.mod == 3, operand must be register. */
11830 if (need_modrm
55cf16e1 11831 && ((sizeflag & AFLAG) || address_mode == mode_64bit)
dfc8cf43
L
11832 && modrm.mod != 3
11833 && modrm.rm == 4)
11834 {
11835 FETCH_DATA (info, codep + 2);
11836 sib.index = (codep [1] >> 3) & 7;
11837 sib.scale = (codep [1] >> 6) & 3;
11838 sib.base = codep [1] & 7;
11839 }
11840}
11841
e396998b 11842static int
26ca5450 11843print_insn (bfd_vma pc, disassemble_info *info)
252b5132 11844{
2da11e11 11845 const struct dis386 *dp;
252b5132 11846 int i;
ce518a5f 11847 char *op_txt[MAX_OPERANDS];
252b5132 11848 int needcomma;
df18fdba 11849 int sizeflag, orig_sizeflag;
e396998b 11850 const char *p;
252b5132 11851 struct dis_private priv;
f16cd0d5 11852 int prefix_length;
252b5132 11853
d7921315
L
11854 priv.orig_sizeflag = AFLAG | DFLAG;
11855 if ((info->mach & bfd_mach_i386_i386) != 0)
cb712a9e 11856 address_mode = mode_32bit;
2da11e11 11857 else if (info->mach == bfd_mach_i386_i8086)
d7921315
L
11858 {
11859 address_mode = mode_16bit;
11860 priv.orig_sizeflag = 0;
11861 }
2da11e11 11862 else
d7921315
L
11863 address_mode = mode_64bit;
11864
11865 if (intel_syntax == (char) -1)
11866 intel_syntax = (info->mach & bfd_mach_i386_intel_syntax) != 0;
e396998b
AM
11867
11868 for (p = info->disassembler_options; p != NULL; )
11869 {
5db04b09
L
11870 if (CONST_STRNEQ (p, "amd64"))
11871 isa64 = amd64;
11872 else if (CONST_STRNEQ (p, "intel64"))
11873 isa64 = intel64;
11874 else if (CONST_STRNEQ (p, "x86-64"))
e396998b 11875 {
cb712a9e 11876 address_mode = mode_64bit;
e396998b
AM
11877 priv.orig_sizeflag = AFLAG | DFLAG;
11878 }
0112cd26 11879 else if (CONST_STRNEQ (p, "i386"))
e396998b 11880 {
cb712a9e 11881 address_mode = mode_32bit;
e396998b
AM
11882 priv.orig_sizeflag = AFLAG | DFLAG;
11883 }
0112cd26 11884 else if (CONST_STRNEQ (p, "i8086"))
e396998b 11885 {
cb712a9e 11886 address_mode = mode_16bit;
e396998b
AM
11887 priv.orig_sizeflag = 0;
11888 }
0112cd26 11889 else if (CONST_STRNEQ (p, "intel"))
e396998b
AM
11890 {
11891 intel_syntax = 1;
9d141669
L
11892 if (CONST_STRNEQ (p + 5, "-mnemonic"))
11893 intel_mnemonic = 1;
e396998b 11894 }
0112cd26 11895 else if (CONST_STRNEQ (p, "att"))
e396998b
AM
11896 {
11897 intel_syntax = 0;
9d141669
L
11898 if (CONST_STRNEQ (p + 3, "-mnemonic"))
11899 intel_mnemonic = 0;
e396998b 11900 }
0112cd26 11901 else if (CONST_STRNEQ (p, "addr"))
e396998b 11902 {
f59a29b9
L
11903 if (address_mode == mode_64bit)
11904 {
11905 if (p[4] == '3' && p[5] == '2')
11906 priv.orig_sizeflag &= ~AFLAG;
11907 else if (p[4] == '6' && p[5] == '4')
11908 priv.orig_sizeflag |= AFLAG;
11909 }
11910 else
11911 {
11912 if (p[4] == '1' && p[5] == '6')
11913 priv.orig_sizeflag &= ~AFLAG;
11914 else if (p[4] == '3' && p[5] == '2')
11915 priv.orig_sizeflag |= AFLAG;
11916 }
e396998b 11917 }
0112cd26 11918 else if (CONST_STRNEQ (p, "data"))
e396998b
AM
11919 {
11920 if (p[4] == '1' && p[5] == '6')
11921 priv.orig_sizeflag &= ~DFLAG;
11922 else if (p[4] == '3' && p[5] == '2')
11923 priv.orig_sizeflag |= DFLAG;
11924 }
0112cd26 11925 else if (CONST_STRNEQ (p, "suffix"))
e396998b
AM
11926 priv.orig_sizeflag |= SUFFIX_ALWAYS;
11927
11928 p = strchr (p, ',');
11929 if (p != NULL)
11930 p++;
11931 }
11932
c0f92bf9
L
11933 if (address_mode == mode_64bit && sizeof (bfd_vma) < 8)
11934 {
11935 (*info->fprintf_func) (info->stream,
11936 _("64-bit address is disabled"));
11937 return -1;
11938 }
11939
e396998b
AM
11940 if (intel_syntax)
11941 {
11942 names64 = intel_names64;
11943 names32 = intel_names32;
11944 names16 = intel_names16;
11945 names8 = intel_names8;
11946 names8rex = intel_names8rex;
11947 names_seg = intel_names_seg;
b9733481 11948 names_mm = intel_names_mm;
7e8b059b 11949 names_bnd = intel_names_bnd;
b9733481
L
11950 names_xmm = intel_names_xmm;
11951 names_ymm = intel_names_ymm;
43234a1e 11952 names_zmm = intel_names_zmm;
db51cc60
L
11953 index64 = intel_index64;
11954 index32 = intel_index32;
43234a1e 11955 names_mask = intel_names_mask;
e396998b
AM
11956 index16 = intel_index16;
11957 open_char = '[';
11958 close_char = ']';
11959 separator_char = '+';
11960 scale_char = '*';
11961 }
11962 else
11963 {
11964 names64 = att_names64;
11965 names32 = att_names32;
11966 names16 = att_names16;
11967 names8 = att_names8;
11968 names8rex = att_names8rex;
11969 names_seg = att_names_seg;
b9733481 11970 names_mm = att_names_mm;
7e8b059b 11971 names_bnd = att_names_bnd;
b9733481
L
11972 names_xmm = att_names_xmm;
11973 names_ymm = att_names_ymm;
43234a1e 11974 names_zmm = att_names_zmm;
db51cc60
L
11975 index64 = att_index64;
11976 index32 = att_index32;
43234a1e 11977 names_mask = att_names_mask;
e396998b
AM
11978 index16 = att_index16;
11979 open_char = '(';
11980 close_char = ')';
11981 separator_char = ',';
11982 scale_char = ',';
11983 }
2da11e11 11984
4fe53c98 11985 /* The output looks better if we put 7 bytes on a line, since that
8a9036a4
L
11986 puts most long word instructions on a single line. Use 8 bytes
11987 for Intel L1OM. */
d7921315 11988 if ((info->mach & bfd_mach_l1om) != 0)
8a9036a4
L
11989 info->bytes_per_line = 8;
11990 else
11991 info->bytes_per_line = 7;
252b5132 11992
26ca5450 11993 info->private_data = &priv;
252b5132
RH
11994 priv.max_fetched = priv.the_buffer;
11995 priv.insn_start = pc;
252b5132
RH
11996
11997 obuf[0] = 0;
ce518a5f
L
11998 for (i = 0; i < MAX_OPERANDS; ++i)
11999 {
12000 op_out[i][0] = 0;
12001 op_index[i] = -1;
12002 }
252b5132
RH
12003
12004 the_info = info;
12005 start_pc = pc;
e396998b
AM
12006 start_codep = priv.the_buffer;
12007 codep = priv.the_buffer;
252b5132 12008
8df14d78 12009 if (OPCODES_SIGSETJMP (priv.bailout) != 0)
5076851f 12010 {
7d421014
ILT
12011 const char *name;
12012
5076851f 12013 /* Getting here means we tried for data but didn't get it. That
e396998b
AM
12014 means we have an incomplete instruction of some sort. Just
12015 print the first byte as a prefix or a .byte pseudo-op. */
12016 if (codep > priv.the_buffer)
5076851f 12017 {
e396998b 12018 name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
7d421014
ILT
12019 if (name != NULL)
12020 (*info->fprintf_func) (info->stream, "%s", name);
12021 else
5076851f 12022 {
7d421014
ILT
12023 /* Just print the first byte as a .byte instruction. */
12024 (*info->fprintf_func) (info->stream, ".byte 0x%x",
e396998b 12025 (unsigned int) priv.the_buffer[0]);
5076851f 12026 }
5076851f 12027
7d421014 12028 return 1;
5076851f
ILT
12029 }
12030
12031 return -1;
12032 }
12033
52b15da3 12034 obufp = obuf;
f16cd0d5
L
12035 sizeflag = priv.orig_sizeflag;
12036
12037 if (!ckprefix () || rex_used)
12038 {
12039 /* Too many prefixes or unused REX prefixes. */
12040 for (i = 0;
f6dd4781 12041 i < (int) ARRAY_SIZE (all_prefixes) && all_prefixes[i];
f16cd0d5 12042 i++)
de882298 12043 (*info->fprintf_func) (info->stream, "%s%s",
6c067bbb 12044 i == 0 ? "" : " ",
f16cd0d5 12045 prefix_name (all_prefixes[i], sizeflag));
de882298 12046 return i;
f16cd0d5 12047 }
252b5132
RH
12048
12049 insn_codep = codep;
12050
12051 FETCH_DATA (info, codep + 1);
12052 two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
12053
3e7d61b2 12054 if (((prefixes & PREFIX_FWAIT)
f16cd0d5 12055 && ((*codep < 0xd8) || (*codep > 0xdf))))
252b5132 12056 {
86a80a50 12057 /* Handle prefixes before fwait. */
d9949a36 12058 for (i = 0; i < fwait_prefix && all_prefixes[i];
86a80a50
L
12059 i++)
12060 (*info->fprintf_func) (info->stream, "%s ",
12061 prefix_name (all_prefixes[i], sizeflag));
f16cd0d5 12062 (*info->fprintf_func) (info->stream, "fwait");
86a80a50 12063 return i + 1;
252b5132
RH
12064 }
12065
252b5132
RH
12066 if (*codep == 0x0f)
12067 {
eec0f4ca 12068 unsigned char threebyte;
5f40e14d
JS
12069
12070 codep++;
12071 FETCH_DATA (info, codep + 1);
12072 threebyte = *codep;
eec0f4ca 12073 dp = &dis386_twobyte[threebyte];
252b5132 12074 need_modrm = twobyte_has_modrm[*codep];
eec0f4ca 12075 codep++;
252b5132
RH
12076 }
12077 else
12078 {
6439fc28 12079 dp = &dis386[*codep];
252b5132 12080 need_modrm = onebyte_has_modrm[*codep];
eec0f4ca 12081 codep++;
252b5132 12082 }
246c51aa 12083
df18fdba
L
12084 /* Save sizeflag for printing the extra prefixes later before updating
12085 it for mnemonic and operand processing. The prefix names depend
12086 only on the address mode. */
12087 orig_sizeflag = sizeflag;
c608c12e 12088 if (prefixes & PREFIX_ADDR)
df18fdba 12089 sizeflag ^= AFLAG;
b844680a 12090 if ((prefixes & PREFIX_DATA))
df18fdba 12091 sizeflag ^= DFLAG;
3ffd33cf 12092
285ca992 12093 end_codep = codep;
8bb15339 12094 if (need_modrm)
252b5132
RH
12095 {
12096 FETCH_DATA (info, codep + 1);
7967e09e
L
12097 modrm.mod = (*codep >> 6) & 3;
12098 modrm.reg = (*codep >> 3) & 7;
12099 modrm.rm = *codep & 7;
252b5132
RH
12100 }
12101
42d5f9c6
MS
12102 need_vex = 0;
12103 need_vex_reg = 0;
12104 vex_w_done = 0;
caf0678c 12105 memset (&vex, 0, sizeof (vex));
55b126d4 12106
ce518a5f 12107 if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
252b5132 12108 {
55cf16e1 12109 get_sib (info, sizeflag);
252b5132
RH
12110 dofloat (sizeflag);
12111 }
12112 else
12113 {
8bb15339 12114 dp = get_valid_dis386 (dp, info);
b844680a 12115 if (dp != NULL && putop (dp->name, sizeflag) == 0)
6c067bbb 12116 {
55cf16e1 12117 get_sib (info, sizeflag);
ce518a5f
L
12118 for (i = 0; i < MAX_OPERANDS; ++i)
12119 {
246c51aa 12120 obufp = op_out[i];
ce518a5f
L
12121 op_ad = MAX_OPERANDS - 1 - i;
12122 if (dp->op[i].rtn)
12123 (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
43234a1e
L
12124 /* For EVEX instruction after the last operand masking
12125 should be printed. */
12126 if (i == 0 && vex.evex)
12127 {
12128 /* Don't print {%k0}. */
12129 if (vex.mask_register_specifier)
12130 {
12131 oappend ("{");
12132 oappend (names_mask[vex.mask_register_specifier]);
12133 oappend ("}");
12134 }
12135 if (vex.zeroing)
12136 oappend ("{z}");
12137 }
ce518a5f 12138 }
6439fc28 12139 }
252b5132
RH
12140 }
12141
63c6fc6c
L
12142 /* If VEX.vvvv and EVEX.vvvv are unused, they must be all 1s, which
12143 are all 0s in inverted form. */
12144 if (need_vex && vex.register_specifier != 0)
12145 {
12146 (*info->fprintf_func) (info->stream, "(bad)");
12147 return end_codep - priv.the_buffer;
12148 }
12149
d869730d 12150 /* Check if the REX prefix is used. */
e2e6193d 12151 if (rex_ignored == 0 && (rex ^ rex_used) == 0 && last_rex_prefix >= 0)
f16cd0d5
L
12152 all_prefixes[last_rex_prefix] = 0;
12153
5e6718e4 12154 /* Check if the SEG prefix is used. */
f16cd0d5
L
12155 if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
12156 | PREFIX_FS | PREFIX_GS)) != 0
285ca992 12157 && (used_prefixes & active_seg_prefix) != 0)
f16cd0d5
L
12158 all_prefixes[last_seg_prefix] = 0;
12159
5e6718e4 12160 /* Check if the ADDR prefix is used. */
f16cd0d5
L
12161 if ((prefixes & PREFIX_ADDR) != 0
12162 && (used_prefixes & PREFIX_ADDR) != 0)
12163 all_prefixes[last_addr_prefix] = 0;
12164
df18fdba
L
12165 /* Check if the DATA prefix is used. */
12166 if ((prefixes & PREFIX_DATA) != 0
12167 && (used_prefixes & PREFIX_DATA) != 0)
12168 all_prefixes[last_data_prefix] = 0;
f16cd0d5 12169
df18fdba 12170 /* Print the extra prefixes. */
f16cd0d5 12171 prefix_length = 0;
f310f33d 12172 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
f16cd0d5
L
12173 if (all_prefixes[i])
12174 {
12175 const char *name;
df18fdba 12176 name = prefix_name (all_prefixes[i], orig_sizeflag);
f16cd0d5
L
12177 if (name == NULL)
12178 abort ();
12179 prefix_length += strlen (name) + 1;
12180 (*info->fprintf_func) (info->stream, "%s ", name);
12181 }
b844680a 12182
285ca992
L
12183 /* If the mandatory PREFIX_REPZ/PREFIX_REPNZ/PREFIX_DATA prefix is
12184 unused, opcode is invalid. Since the PREFIX_DATA prefix may be
12185 used by putop and MMX/SSE operand and may be overriden by the
12186 PREFIX_REPZ/PREFIX_REPNZ fix, we check the PREFIX_DATA prefix
12187 separately. */
3888916d 12188 if (dp->prefix_requirement == PREFIX_OPCODE
285ca992
L
12189 && dp != &bad_opcode
12190 && (((prefixes
12191 & (PREFIX_REPZ | PREFIX_REPNZ)) != 0
12192 && (used_prefixes
12193 & (PREFIX_REPZ | PREFIX_REPNZ)) == 0)
12194 || ((((prefixes
12195 & (PREFIX_REPZ | PREFIX_REPNZ | PREFIX_DATA))
12196 == PREFIX_DATA)
12197 && (used_prefixes & PREFIX_DATA) == 0))))
12198 {
12199 (*info->fprintf_func) (info->stream, "(bad)");
12200 return end_codep - priv.the_buffer;
12201 }
12202
f16cd0d5
L
12203 /* Check maximum code length. */
12204 if ((codep - start_codep) > MAX_CODE_LENGTH)
12205 {
12206 (*info->fprintf_func) (info->stream, "(bad)");
12207 return MAX_CODE_LENGTH;
12208 }
b844680a 12209
ea397f5b 12210 obufp = mnemonicendp;
f16cd0d5 12211 for (i = strlen (obuf) + prefix_length; i < 6; i++)
252b5132
RH
12212 oappend (" ");
12213 oappend (" ");
12214 (*info->fprintf_func) (info->stream, "%s", obuf);
12215
12216 /* The enter and bound instructions are printed with operands in the same
12217 order as the intel book; everything else is printed in reverse order. */
2da11e11 12218 if (intel_syntax || two_source_ops)
252b5132 12219 {
185b1163
L
12220 bfd_vma riprel;
12221
ce518a5f 12222 for (i = 0; i < MAX_OPERANDS; ++i)
6c067bbb 12223 op_txt[i] = op_out[i];
246c51aa 12224
3a8547d2
JB
12225 if (intel_syntax && dp && dp->op[2].rtn == OP_Rounding
12226 && dp->op[3].rtn == OP_E && dp->op[4].rtn == NULL)
12227 {
12228 op_txt[2] = op_out[3];
12229 op_txt[3] = op_out[2];
12230 }
12231
ce518a5f
L
12232 for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
12233 {
6c067bbb
RM
12234 op_ad = op_index[i];
12235 op_index[i] = op_index[MAX_OPERANDS - 1 - i];
12236 op_index[MAX_OPERANDS - 1 - i] = op_ad;
185b1163
L
12237 riprel = op_riprel[i];
12238 op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
12239 op_riprel[MAX_OPERANDS - 1 - i] = riprel;
ce518a5f 12240 }
252b5132
RH
12241 }
12242 else
12243 {
ce518a5f 12244 for (i = 0; i < MAX_OPERANDS; ++i)
6c067bbb 12245 op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
050dfa73
MM
12246 }
12247
ce518a5f
L
12248 needcomma = 0;
12249 for (i = 0; i < MAX_OPERANDS; ++i)
12250 if (*op_txt[i])
12251 {
12252 if (needcomma)
12253 (*info->fprintf_func) (info->stream, ",");
12254 if (op_index[i] != -1 && !op_riprel[i])
12255 (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
12256 else
12257 (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
12258 needcomma = 1;
12259 }
050dfa73 12260
ce518a5f 12261 for (i = 0; i < MAX_OPERANDS; i++)
52b15da3
JH
12262 if (op_index[i] != -1 && op_riprel[i])
12263 {
12264 (*info->fprintf_func) (info->stream, " # ");
4fd7268a 12265 (*info->print_address_func) ((bfd_vma) (start_pc + (codep - start_codep)
52b15da3 12266 + op_address[op_index[i]]), info);
185b1163 12267 break;
52b15da3 12268 }
e396998b 12269 return codep - priv.the_buffer;
252b5132
RH
12270}
12271
6439fc28 12272static const char *float_mem[] = {
252b5132 12273 /* d8 */
7c52e0e8
L
12274 "fadd{s|}",
12275 "fmul{s|}",
12276 "fcom{s|}",
12277 "fcomp{s|}",
12278 "fsub{s|}",
12279 "fsubr{s|}",
12280 "fdiv{s|}",
12281 "fdivr{s|}",
db6eb5be 12282 /* d9 */
7c52e0e8 12283 "fld{s|}",
252b5132 12284 "(bad)",
7c52e0e8
L
12285 "fst{s|}",
12286 "fstp{s|}",
9306ca4a 12287 "fldenvIC",
252b5132 12288 "fldcw",
9306ca4a 12289 "fNstenvIC",
252b5132
RH
12290 "fNstcw",
12291 /* da */
7c52e0e8
L
12292 "fiadd{l|}",
12293 "fimul{l|}",
12294 "ficom{l|}",
12295 "ficomp{l|}",
12296 "fisub{l|}",
12297 "fisubr{l|}",
12298 "fidiv{l|}",
12299 "fidivr{l|}",
252b5132 12300 /* db */
7c52e0e8
L
12301 "fild{l|}",
12302 "fisttp{l|}",
12303 "fist{l|}",
12304 "fistp{l|}",
252b5132 12305 "(bad)",
6439fc28 12306 "fld{t||t|}",
252b5132 12307 "(bad)",
6439fc28 12308 "fstp{t||t|}",
252b5132 12309 /* dc */
7c52e0e8
L
12310 "fadd{l|}",
12311 "fmul{l|}",
12312 "fcom{l|}",
12313 "fcomp{l|}",
12314 "fsub{l|}",
12315 "fsubr{l|}",
12316 "fdiv{l|}",
12317 "fdivr{l|}",
252b5132 12318 /* dd */
7c52e0e8
L
12319 "fld{l|}",
12320 "fisttp{ll|}",
12321 "fst{l||}",
12322 "fstp{l|}",
9306ca4a 12323 "frstorIC",
252b5132 12324 "(bad)",
9306ca4a 12325 "fNsaveIC",
252b5132
RH
12326 "fNstsw",
12327 /* de */
ac465521
JB
12328 "fiadd{s|}",
12329 "fimul{s|}",
12330 "ficom{s|}",
12331 "ficomp{s|}",
12332 "fisub{s|}",
12333 "fisubr{s|}",
12334 "fidiv{s|}",
12335 "fidivr{s|}",
252b5132 12336 /* df */
ac465521
JB
12337 "fild{s|}",
12338 "fisttp{s|}",
12339 "fist{s|}",
12340 "fistp{s|}",
252b5132 12341 "fbld",
7c52e0e8 12342 "fild{ll|}",
252b5132 12343 "fbstp",
7c52e0e8 12344 "fistp{ll|}",
1d9f512f
AM
12345};
12346
12347static const unsigned char float_mem_mode[] = {
12348 /* d8 */
12349 d_mode,
12350 d_mode,
12351 d_mode,
12352 d_mode,
12353 d_mode,
12354 d_mode,
12355 d_mode,
12356 d_mode,
12357 /* d9 */
12358 d_mode,
12359 0,
12360 d_mode,
12361 d_mode,
12362 0,
12363 w_mode,
12364 0,
12365 w_mode,
12366 /* da */
12367 d_mode,
12368 d_mode,
12369 d_mode,
12370 d_mode,
12371 d_mode,
12372 d_mode,
12373 d_mode,
12374 d_mode,
12375 /* db */
12376 d_mode,
12377 d_mode,
12378 d_mode,
12379 d_mode,
12380 0,
9306ca4a 12381 t_mode,
1d9f512f 12382 0,
9306ca4a 12383 t_mode,
1d9f512f
AM
12384 /* dc */
12385 q_mode,
12386 q_mode,
12387 q_mode,
12388 q_mode,
12389 q_mode,
12390 q_mode,
12391 q_mode,
12392 q_mode,
12393 /* dd */
12394 q_mode,
12395 q_mode,
12396 q_mode,
12397 q_mode,
12398 0,
12399 0,
12400 0,
12401 w_mode,
12402 /* de */
12403 w_mode,
12404 w_mode,
12405 w_mode,
12406 w_mode,
12407 w_mode,
12408 w_mode,
12409 w_mode,
12410 w_mode,
12411 /* df */
12412 w_mode,
12413 w_mode,
12414 w_mode,
12415 w_mode,
9306ca4a 12416 t_mode,
1d9f512f 12417 q_mode,
9306ca4a 12418 t_mode,
1d9f512f 12419 q_mode
252b5132
RH
12420};
12421
ce518a5f
L
12422#define ST { OP_ST, 0 }
12423#define STi { OP_STi, 0 }
252b5132 12424
48c97fa1
L
12425#define FGRPd9_2 NULL, { { NULL, 1 } }, 0
12426#define FGRPd9_4 NULL, { { NULL, 2 } }, 0
12427#define FGRPd9_5 NULL, { { NULL, 3 } }, 0
12428#define FGRPd9_6 NULL, { { NULL, 4 } }, 0
12429#define FGRPd9_7 NULL, { { NULL, 5 } }, 0
12430#define FGRPda_5 NULL, { { NULL, 6 } }, 0
12431#define FGRPdb_4 NULL, { { NULL, 7 } }, 0
12432#define FGRPde_3 NULL, { { NULL, 8 } }, 0
12433#define FGRPdf_4 NULL, { { NULL, 9 } }, 0
252b5132 12434
2da11e11 12435static const struct dis386 float_reg[][8] = {
252b5132
RH
12436 /* d8 */
12437 {
bf890a93
IT
12438 { "fadd", { ST, STi }, 0 },
12439 { "fmul", { ST, STi }, 0 },
12440 { "fcom", { STi }, 0 },
12441 { "fcomp", { STi }, 0 },
12442 { "fsub", { ST, STi }, 0 },
12443 { "fsubr", { ST, STi }, 0 },
12444 { "fdiv", { ST, STi }, 0 },
12445 { "fdivr", { ST, STi }, 0 },
252b5132
RH
12446 },
12447 /* d9 */
12448 {
bf890a93
IT
12449 { "fld", { STi }, 0 },
12450 { "fxch", { STi }, 0 },
252b5132 12451 { FGRPd9_2 },
592d1631 12452 { Bad_Opcode },
252b5132
RH
12453 { FGRPd9_4 },
12454 { FGRPd9_5 },
12455 { FGRPd9_6 },
12456 { FGRPd9_7 },
12457 },
12458 /* da */
12459 {
bf890a93
IT
12460 { "fcmovb", { ST, STi }, 0 },
12461 { "fcmove", { ST, STi }, 0 },
12462 { "fcmovbe",{ ST, STi }, 0 },
12463 { "fcmovu", { ST, STi }, 0 },
592d1631 12464 { Bad_Opcode },
252b5132 12465 { FGRPda_5 },
592d1631
L
12466 { Bad_Opcode },
12467 { Bad_Opcode },
252b5132
RH
12468 },
12469 /* db */
12470 {
bf890a93
IT
12471 { "fcmovnb",{ ST, STi }, 0 },
12472 { "fcmovne",{ ST, STi }, 0 },
12473 { "fcmovnbe",{ ST, STi }, 0 },
12474 { "fcmovnu",{ ST, STi }, 0 },
252b5132 12475 { FGRPdb_4 },
bf890a93
IT
12476 { "fucomi", { ST, STi }, 0 },
12477 { "fcomi", { ST, STi }, 0 },
592d1631 12478 { Bad_Opcode },
252b5132
RH
12479 },
12480 /* dc */
12481 {
bf890a93
IT
12482 { "fadd", { STi, ST }, 0 },
12483 { "fmul", { STi, ST }, 0 },
592d1631
L
12484 { Bad_Opcode },
12485 { Bad_Opcode },
d53e6b98
JB
12486 { "fsub{!M|r}", { STi, ST }, 0 },
12487 { "fsub{M|}", { STi, ST }, 0 },
12488 { "fdiv{!M|r}", { STi, ST }, 0 },
12489 { "fdiv{M|}", { STi, ST }, 0 },
252b5132
RH
12490 },
12491 /* dd */
12492 {
bf890a93 12493 { "ffree", { STi }, 0 },
592d1631 12494 { Bad_Opcode },
bf890a93
IT
12495 { "fst", { STi }, 0 },
12496 { "fstp", { STi }, 0 },
12497 { "fucom", { STi }, 0 },
12498 { "fucomp", { STi }, 0 },
592d1631
L
12499 { Bad_Opcode },
12500 { Bad_Opcode },
252b5132
RH
12501 },
12502 /* de */
12503 {
bf890a93
IT
12504 { "faddp", { STi, ST }, 0 },
12505 { "fmulp", { STi, ST }, 0 },
592d1631 12506 { Bad_Opcode },
252b5132 12507 { FGRPde_3 },
d53e6b98
JB
12508 { "fsub{!M|r}p", { STi, ST }, 0 },
12509 { "fsub{M|}p", { STi, ST }, 0 },
12510 { "fdiv{!M|r}p", { STi, ST }, 0 },
12511 { "fdiv{M|}p", { STi, ST }, 0 },
252b5132
RH
12512 },
12513 /* df */
12514 {
bf890a93 12515 { "ffreep", { STi }, 0 },
592d1631
L
12516 { Bad_Opcode },
12517 { Bad_Opcode },
12518 { Bad_Opcode },
252b5132 12519 { FGRPdf_4 },
bf890a93
IT
12520 { "fucomip", { ST, STi }, 0 },
12521 { "fcomip", { ST, STi }, 0 },
592d1631 12522 { Bad_Opcode },
252b5132
RH
12523 },
12524};
12525
252b5132 12526static char *fgrps[][8] = {
48c97fa1
L
12527 /* Bad opcode 0 */
12528 {
12529 "(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12530 },
12531
12532 /* d9_2 1 */
252b5132
RH
12533 {
12534 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12535 },
12536
48c97fa1 12537 /* d9_4 2 */
252b5132
RH
12538 {
12539 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
12540 },
12541
48c97fa1 12542 /* d9_5 3 */
252b5132
RH
12543 {
12544 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
12545 },
12546
48c97fa1 12547 /* d9_6 4 */
252b5132
RH
12548 {
12549 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
12550 },
12551
48c97fa1 12552 /* d9_7 5 */
252b5132
RH
12553 {
12554 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
12555 },
12556
48c97fa1 12557 /* da_5 6 */
252b5132
RH
12558 {
12559 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12560 },
12561
48c97fa1 12562 /* db_4 7 */
252b5132 12563 {
309d3373
JB
12564 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
12565 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
252b5132
RH
12566 },
12567
48c97fa1 12568 /* de_3 8 */
252b5132
RH
12569 {
12570 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12571 },
12572
48c97fa1 12573 /* df_4 9 */
252b5132
RH
12574 {
12575 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12576 },
12577};
12578
b6169b20
L
12579static void
12580swap_operand (void)
12581{
12582 mnemonicendp[0] = '.';
12583 mnemonicendp[1] = 's';
12584 mnemonicendp += 2;
12585}
12586
b844680a
L
12587static void
12588OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
12589 int sizeflag ATTRIBUTE_UNUSED)
12590{
12591 /* Skip mod/rm byte. */
12592 MODRM_CHECK;
12593 codep++;
12594}
12595
252b5132 12596static void
26ca5450 12597dofloat (int sizeflag)
252b5132 12598{
2da11e11 12599 const struct dis386 *dp;
252b5132
RH
12600 unsigned char floatop;
12601
12602 floatop = codep[-1];
12603
7967e09e 12604 if (modrm.mod != 3)
252b5132 12605 {
7967e09e 12606 int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
1d9f512f
AM
12607
12608 putop (float_mem[fp_indx], sizeflag);
ce518a5f 12609 obufp = op_out[0];
6e50d963 12610 op_ad = 2;
1d9f512f 12611 OP_E (float_mem_mode[fp_indx], sizeflag);
252b5132
RH
12612 return;
12613 }
6608db57 12614 /* Skip mod/rm byte. */
4bba6815 12615 MODRM_CHECK;
252b5132
RH
12616 codep++;
12617
7967e09e 12618 dp = &float_reg[floatop - 0xd8][modrm.reg];
252b5132
RH
12619 if (dp->name == NULL)
12620 {
7967e09e 12621 putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
252b5132 12622
6608db57 12623 /* Instruction fnstsw is only one with strange arg. */
252b5132 12624 if (floatop == 0xdf && codep[-1] == 0xe0)
ce518a5f 12625 strcpy (op_out[0], names16[0]);
252b5132
RH
12626 }
12627 else
12628 {
12629 putop (dp->name, sizeflag);
12630
ce518a5f 12631 obufp = op_out[0];
6e50d963 12632 op_ad = 2;
ce518a5f
L
12633 if (dp->op[0].rtn)
12634 (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
6e50d963 12635
ce518a5f 12636 obufp = op_out[1];
6e50d963 12637 op_ad = 1;
ce518a5f
L
12638 if (dp->op[1].rtn)
12639 (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
252b5132
RH
12640 }
12641}
12642
9ce09ba2
RM
12643/* Like oappend (below), but S is a string starting with '%'.
12644 In Intel syntax, the '%' is elided. */
12645static void
12646oappend_maybe_intel (const char *s)
12647{
12648 oappend (s + intel_syntax);
12649}
12650
252b5132 12651static void
26ca5450 12652OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12653{
9ce09ba2 12654 oappend_maybe_intel ("%st");
252b5132
RH
12655}
12656
252b5132 12657static void
26ca5450 12658OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12659{
7967e09e 12660 sprintf (scratchbuf, "%%st(%d)", modrm.rm);
9ce09ba2 12661 oappend_maybe_intel (scratchbuf);
252b5132
RH
12662}
12663
6608db57 12664/* Capital letters in template are macros. */
6439fc28 12665static int
d3ce72d0 12666putop (const char *in_template, int sizeflag)
252b5132 12667{
2da11e11 12668 const char *p;
9306ca4a 12669 int alt = 0;
9d141669 12670 int cond = 1;
98b528ac
L
12671 unsigned int l = 0, len = 1;
12672 char last[4];
12673
12674#define SAVE_LAST(c) \
12675 if (l < len && l < sizeof (last)) \
12676 last[l++] = c; \
12677 else \
12678 abort ();
252b5132 12679
d3ce72d0 12680 for (p = in_template; *p; p++)
252b5132
RH
12681 {
12682 switch (*p)
12683 {
12684 default:
12685 *obufp++ = *p;
12686 break;
98b528ac
L
12687 case '%':
12688 len++;
12689 break;
9d141669
L
12690 case '!':
12691 cond = 0;
12692 break;
6439fc28 12693 case '{':
6439fc28 12694 if (intel_syntax)
6439fc28
AM
12695 {
12696 while (*++p != '|')
7c52e0e8
L
12697 if (*p == '}' || *p == '\0')
12698 abort ();
6439fc28 12699 }
9306ca4a
JB
12700 /* Fall through. */
12701 case 'I':
12702 alt = 1;
12703 continue;
6439fc28
AM
12704 case '|':
12705 while (*++p != '}')
12706 {
12707 if (*p == '\0')
12708 abort ();
12709 }
12710 break;
12711 case '}':
12712 break;
252b5132 12713 case 'A':
db6eb5be
AM
12714 if (intel_syntax)
12715 break;
7967e09e 12716 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
252b5132
RH
12717 *obufp++ = 'b';
12718 break;
12719 case 'B':
4b06377f
L
12720 if (l == 0 && len == 1)
12721 {
12722case_B:
12723 if (intel_syntax)
12724 break;
12725 if (sizeflag & SUFFIX_ALWAYS)
12726 *obufp++ = 'b';
12727 }
12728 else
12729 {
12730 if (l != 1
12731 || len != 2
12732 || last[0] != 'L')
12733 {
12734 SAVE_LAST (*p);
12735 break;
12736 }
12737
12738 if (address_mode == mode_64bit
12739 && !(prefixes & PREFIX_ADDR))
12740 {
12741 *obufp++ = 'a';
12742 *obufp++ = 'b';
12743 *obufp++ = 's';
12744 }
12745
12746 goto case_B;
12747 }
252b5132 12748 break;
9306ca4a
JB
12749 case 'C':
12750 if (intel_syntax && !alt)
12751 break;
12752 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
12753 {
12754 if (sizeflag & DFLAG)
12755 *obufp++ = intel_syntax ? 'd' : 'l';
12756 else
12757 *obufp++ = intel_syntax ? 'w' : 's';
12758 used_prefixes |= (prefixes & PREFIX_DATA);
12759 }
12760 break;
ed7841b3
JB
12761 case 'D':
12762 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
12763 break;
161a04f6 12764 USED_REX (REX_W);
7967e09e 12765 if (modrm.mod == 3)
ed7841b3 12766 {
161a04f6 12767 if (rex & REX_W)
ed7841b3 12768 *obufp++ = 'q';
ed7841b3 12769 else
f16cd0d5
L
12770 {
12771 if (sizeflag & DFLAG)
12772 *obufp++ = intel_syntax ? 'd' : 'l';
12773 else
12774 *obufp++ = 'w';
12775 used_prefixes |= (prefixes & PREFIX_DATA);
12776 }
ed7841b3
JB
12777 }
12778 else
12779 *obufp++ = 'w';
12780 break;
252b5132 12781 case 'E': /* For jcxz/jecxz */
cb712a9e 12782 if (address_mode == mode_64bit)
c1a64871
JH
12783 {
12784 if (sizeflag & AFLAG)
12785 *obufp++ = 'r';
12786 else
12787 *obufp++ = 'e';
12788 }
12789 else
12790 if (sizeflag & AFLAG)
12791 *obufp++ = 'e';
3ffd33cf
AM
12792 used_prefixes |= (prefixes & PREFIX_ADDR);
12793 break;
12794 case 'F':
db6eb5be
AM
12795 if (intel_syntax)
12796 break;
e396998b 12797 if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
3ffd33cf
AM
12798 {
12799 if (sizeflag & AFLAG)
cb712a9e 12800 *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
3ffd33cf 12801 else
cb712a9e 12802 *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
3ffd33cf
AM
12803 used_prefixes |= (prefixes & PREFIX_ADDR);
12804 }
252b5132 12805 break;
52fd6d94
JB
12806 case 'G':
12807 if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
12808 break;
161a04f6 12809 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
12810 *obufp++ = 'l';
12811 else
12812 *obufp++ = 'w';
161a04f6 12813 if (!(rex & REX_W))
52fd6d94
JB
12814 used_prefixes |= (prefixes & PREFIX_DATA);
12815 break;
5dd0794d 12816 case 'H':
db6eb5be
AM
12817 if (intel_syntax)
12818 break;
5dd0794d
AM
12819 if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
12820 || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
12821 {
12822 used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
12823 *obufp++ = ',';
12824 *obufp++ = 'p';
12825 if (prefixes & PREFIX_DS)
12826 *obufp++ = 't';
12827 else
12828 *obufp++ = 'n';
12829 }
12830 break;
9306ca4a
JB
12831 case 'J':
12832 if (intel_syntax)
12833 break;
12834 *obufp++ = 'l';
12835 break;
42903f7f
L
12836 case 'K':
12837 USED_REX (REX_W);
12838 if (rex & REX_W)
12839 *obufp++ = 'q';
12840 else
12841 *obufp++ = 'd';
12842 break;
6dd5059a 12843 case 'Z':
04d824a4
JB
12844 if (l != 0 || len != 1)
12845 {
12846 if (l != 1 || len != 2 || last[0] != 'X')
12847 {
12848 SAVE_LAST (*p);
12849 break;
12850 }
12851 if (!need_vex || !vex.evex)
12852 abort ();
12853 if (intel_syntax
12854 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
12855 break;
12856 switch (vex.length)
12857 {
12858 case 128:
12859 *obufp++ = 'x';
12860 break;
12861 case 256:
12862 *obufp++ = 'y';
12863 break;
12864 case 512:
12865 *obufp++ = 'z';
12866 break;
12867 default:
12868 abort ();
12869 }
12870 break;
12871 }
6dd5059a
L
12872 if (intel_syntax)
12873 break;
12874 if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
12875 {
12876 *obufp++ = 'q';
12877 break;
12878 }
12879 /* Fall through. */
98b528ac 12880 goto case_L;
252b5132 12881 case 'L':
98b528ac
L
12882 if (l != 0 || len != 1)
12883 {
12884 SAVE_LAST (*p);
12885 break;
12886 }
12887case_L:
db6eb5be
AM
12888 if (intel_syntax)
12889 break;
252b5132
RH
12890 if (sizeflag & SUFFIX_ALWAYS)
12891 *obufp++ = 'l';
252b5132 12892 break;
9d141669
L
12893 case 'M':
12894 if (intel_mnemonic != cond)
12895 *obufp++ = 'r';
12896 break;
252b5132
RH
12897 case 'N':
12898 if ((prefixes & PREFIX_FWAIT) == 0)
12899 *obufp++ = 'n';
7d421014
ILT
12900 else
12901 used_prefixes |= PREFIX_FWAIT;
252b5132 12902 break;
52b15da3 12903 case 'O':
161a04f6
L
12904 USED_REX (REX_W);
12905 if (rex & REX_W)
6439fc28 12906 *obufp++ = 'o';
a35ca55a
JB
12907 else if (intel_syntax && (sizeflag & DFLAG))
12908 *obufp++ = 'q';
52b15da3
JH
12909 else
12910 *obufp++ = 'd';
161a04f6 12911 if (!(rex & REX_W))
a35ca55a 12912 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 12913 break;
07f5af7d
L
12914 case '&':
12915 if (!intel_syntax
12916 && address_mode == mode_64bit
12917 && isa64 == intel64)
12918 {
12919 *obufp++ = 'q';
12920 break;
12921 }
12922 /* Fall through. */
6439fc28 12923 case 'T':
d9e3625e
L
12924 if (!intel_syntax
12925 && address_mode == mode_64bit
7bb15c6f 12926 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28
AM
12927 {
12928 *obufp++ = 'q';
12929 break;
12930 }
6608db57 12931 /* Fall through. */
4b4c407a 12932 goto case_P;
252b5132 12933 case 'P':
4b4c407a 12934 if (l == 0 && len == 1)
d9e3625e 12935 {
4b4c407a
L
12936case_P:
12937 if (intel_syntax)
d9e3625e 12938 {
4b4c407a
L
12939 if ((rex & REX_W) == 0
12940 && (prefixes & PREFIX_DATA))
12941 {
12942 if ((sizeflag & DFLAG) == 0)
12943 *obufp++ = 'w';
12944 used_prefixes |= (prefixes & PREFIX_DATA);
12945 }
12946 break;
12947 }
12948 if ((prefixes & PREFIX_DATA)
12949 || (rex & REX_W)
12950 || (sizeflag & SUFFIX_ALWAYS))
12951 {
12952 USED_REX (REX_W);
12953 if (rex & REX_W)
12954 *obufp++ = 'q';
12955 else
12956 {
12957 if (sizeflag & DFLAG)
12958 *obufp++ = 'l';
12959 else
12960 *obufp++ = 'w';
12961 used_prefixes |= (prefixes & PREFIX_DATA);
12962 }
d9e3625e 12963 }
d9e3625e 12964 }
4b4c407a 12965 else
252b5132 12966 {
4b4c407a
L
12967 if (l != 1 || len != 2 || last[0] != 'L')
12968 {
12969 SAVE_LAST (*p);
12970 break;
12971 }
12972
12973 if ((prefixes & PREFIX_DATA)
12974 || (rex & REX_W)
12975 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 12976 {
4b4c407a
L
12977 USED_REX (REX_W);
12978 if (rex & REX_W)
12979 *obufp++ = 'q';
12980 else
12981 {
12982 if (sizeflag & DFLAG)
12983 *obufp++ = intel_syntax ? 'd' : 'l';
12984 else
12985 *obufp++ = 'w';
12986 used_prefixes |= (prefixes & PREFIX_DATA);
12987 }
52b15da3 12988 }
252b5132
RH
12989 }
12990 break;
6439fc28 12991 case 'U':
db6eb5be
AM
12992 if (intel_syntax)
12993 break;
7bb15c6f 12994 if (address_mode == mode_64bit
6c067bbb 12995 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28 12996 {
7967e09e 12997 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
1a114b12 12998 *obufp++ = 'q';
6439fc28
AM
12999 break;
13000 }
6608db57 13001 /* Fall through. */
98b528ac 13002 goto case_Q;
252b5132 13003 case 'Q':
98b528ac 13004 if (l == 0 && len == 1)
252b5132 13005 {
98b528ac
L
13006case_Q:
13007 if (intel_syntax && !alt)
13008 break;
13009 USED_REX (REX_W);
13010 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 13011 {
98b528ac
L
13012 if (rex & REX_W)
13013 *obufp++ = 'q';
52b15da3 13014 else
98b528ac
L
13015 {
13016 if (sizeflag & DFLAG)
13017 *obufp++ = intel_syntax ? 'd' : 'l';
13018 else
13019 *obufp++ = 'w';
f16cd0d5 13020 used_prefixes |= (prefixes & PREFIX_DATA);
98b528ac 13021 }
52b15da3 13022 }
98b528ac
L
13023 }
13024 else
13025 {
13026 if (l != 1 || len != 2 || last[0] != 'L')
13027 {
13028 SAVE_LAST (*p);
13029 break;
13030 }
13031 if (intel_syntax
13032 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
13033 break;
13034 if ((rex & REX_W))
13035 {
13036 USED_REX (REX_W);
13037 *obufp++ = 'q';
13038 }
13039 else
13040 *obufp++ = 'l';
252b5132
RH
13041 }
13042 break;
13043 case 'R':
161a04f6
L
13044 USED_REX (REX_W);
13045 if (rex & REX_W)
a35ca55a
JB
13046 *obufp++ = 'q';
13047 else if (sizeflag & DFLAG)
c608c12e 13048 {
a35ca55a 13049 if (intel_syntax)
c608c12e 13050 *obufp++ = 'd';
c608c12e 13051 else
a35ca55a 13052 *obufp++ = 'l';
c608c12e 13053 }
252b5132 13054 else
a35ca55a
JB
13055 *obufp++ = 'w';
13056 if (intel_syntax && !p[1]
161a04f6 13057 && ((rex & REX_W) || (sizeflag & DFLAG)))
a35ca55a 13058 *obufp++ = 'e';
161a04f6 13059 if (!(rex & REX_W))
52b15da3 13060 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132 13061 break;
1a114b12 13062 case 'V':
4b06377f 13063 if (l == 0 && len == 1)
1a114b12 13064 {
4b06377f
L
13065 if (intel_syntax)
13066 break;
7bb15c6f 13067 if (address_mode == mode_64bit
6c067bbb 13068 && ((sizeflag & DFLAG) || (rex & REX_W)))
4b06377f
L
13069 {
13070 if (sizeflag & SUFFIX_ALWAYS)
13071 *obufp++ = 'q';
13072 break;
13073 }
13074 }
13075 else
13076 {
13077 if (l != 1
13078 || len != 2
13079 || last[0] != 'L')
13080 {
13081 SAVE_LAST (*p);
13082 break;
13083 }
13084
13085 if (rex & REX_W)
13086 {
13087 *obufp++ = 'a';
13088 *obufp++ = 'b';
13089 *obufp++ = 's';
13090 }
1a114b12
JB
13091 }
13092 /* Fall through. */
4b06377f 13093 goto case_S;
252b5132 13094 case 'S':
4b06377f 13095 if (l == 0 && len == 1)
252b5132 13096 {
4b06377f
L
13097case_S:
13098 if (intel_syntax)
13099 break;
13100 if (sizeflag & SUFFIX_ALWAYS)
52b15da3 13101 {
4b06377f
L
13102 if (rex & REX_W)
13103 *obufp++ = 'q';
52b15da3 13104 else
4b06377f
L
13105 {
13106 if (sizeflag & DFLAG)
13107 *obufp++ = 'l';
13108 else
13109 *obufp++ = 'w';
13110 used_prefixes |= (prefixes & PREFIX_DATA);
13111 }
13112 }
13113 }
13114 else
13115 {
13116 if (l != 1
13117 || len != 2
13118 || last[0] != 'L')
13119 {
13120 SAVE_LAST (*p);
13121 break;
52b15da3 13122 }
4b06377f
L
13123
13124 if (address_mode == mode_64bit
13125 && !(prefixes & PREFIX_ADDR))
13126 {
13127 *obufp++ = 'a';
13128 *obufp++ = 'b';
13129 *obufp++ = 's';
13130 }
13131
13132 goto case_S;
252b5132 13133 }
252b5132 13134 break;
041bd2e0 13135 case 'X':
c0f3af97
L
13136 if (l != 0 || len != 1)
13137 {
13138 SAVE_LAST (*p);
13139 break;
13140 }
13141 if (need_vex && vex.prefix)
13142 {
13143 if (vex.prefix == DATA_PREFIX_OPCODE)
13144 *obufp++ = 'd';
13145 else
13146 *obufp++ = 's';
13147 }
041bd2e0 13148 else
f16cd0d5
L
13149 {
13150 if (prefixes & PREFIX_DATA)
13151 *obufp++ = 'd';
13152 else
13153 *obufp++ = 's';
13154 used_prefixes |= (prefixes & PREFIX_DATA);
13155 }
041bd2e0 13156 break;
76f227a5 13157 case 'Y':
c0f3af97 13158 if (l == 0 && len == 1)
9646c87b 13159 abort ();
c0f3af97
L
13160 else
13161 {
13162 if (l != 1 || len != 2 || last[0] != 'X')
13163 {
13164 SAVE_LAST (*p);
13165 break;
13166 }
13167 if (!need_vex)
13168 abort ();
13169 if (intel_syntax
04d824a4 13170 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
c0f3af97
L
13171 break;
13172 switch (vex.length)
13173 {
13174 case 128:
13175 *obufp++ = 'x';
13176 break;
13177 case 256:
13178 *obufp++ = 'y';
13179 break;
04d824a4
JB
13180 case 512:
13181 if (!vex.evex)
c0f3af97 13182 default:
04d824a4 13183 abort ();
c0f3af97 13184 }
76f227a5
JH
13185 }
13186 break;
252b5132 13187 case 'W':
0bfee649 13188 if (l == 0 && len == 1)
a35ca55a 13189 {
0bfee649
L
13190 /* operand size flag for cwtl, cbtw */
13191 USED_REX (REX_W);
13192 if (rex & REX_W)
13193 {
13194 if (intel_syntax)
13195 *obufp++ = 'd';
13196 else
13197 *obufp++ = 'l';
13198 }
13199 else if (sizeflag & DFLAG)
13200 *obufp++ = 'w';
a35ca55a 13201 else
0bfee649
L
13202 *obufp++ = 'b';
13203 if (!(rex & REX_W))
13204 used_prefixes |= (prefixes & PREFIX_DATA);
a35ca55a 13205 }
252b5132 13206 else
0bfee649 13207 {
6c30d220
L
13208 if (l != 1
13209 || len != 2
13210 || (last[0] != 'X'
13211 && last[0] != 'L'))
0bfee649
L
13212 {
13213 SAVE_LAST (*p);
13214 break;
13215 }
13216 if (!need_vex)
13217 abort ();
6c30d220
L
13218 if (last[0] == 'X')
13219 *obufp++ = vex.w ? 'd': 's';
13220 else
13221 *obufp++ = vex.w ? 'q': 'd';
0bfee649 13222 }
252b5132 13223 break;
a72d2af2
L
13224 case '^':
13225 if (intel_syntax)
13226 break;
13227 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
13228 {
13229 if (sizeflag & DFLAG)
13230 *obufp++ = 'l';
13231 else
13232 *obufp++ = 'w';
13233 used_prefixes |= (prefixes & PREFIX_DATA);
13234 }
13235 break;
5db04b09
L
13236 case '@':
13237 if (intel_syntax)
13238 break;
13239 if (address_mode == mode_64bit
13240 && (isa64 == intel64
13241 || ((sizeflag & DFLAG) || (rex & REX_W))))
13242 *obufp++ = 'q';
13243 else if ((prefixes & PREFIX_DATA))
13244 {
13245 if (!(sizeflag & DFLAG))
13246 *obufp++ = 'w';
13247 used_prefixes |= (prefixes & PREFIX_DATA);
13248 }
13249 break;
252b5132 13250 }
9306ca4a 13251 alt = 0;
252b5132
RH
13252 }
13253 *obufp = 0;
ea397f5b 13254 mnemonicendp = obufp;
6439fc28 13255 return 0;
252b5132
RH
13256}
13257
13258static void
26ca5450 13259oappend (const char *s)
252b5132 13260{
ea397f5b 13261 obufp = stpcpy (obufp, s);
252b5132
RH
13262}
13263
13264static void
26ca5450 13265append_seg (void)
252b5132 13266{
285ca992
L
13267 /* Only print the active segment register. */
13268 if (!active_seg_prefix)
13269 return;
13270
13271 used_prefixes |= active_seg_prefix;
13272 switch (active_seg_prefix)
7d421014 13273 {
285ca992 13274 case PREFIX_CS:
9ce09ba2 13275 oappend_maybe_intel ("%cs:");
285ca992
L
13276 break;
13277 case PREFIX_DS:
9ce09ba2 13278 oappend_maybe_intel ("%ds:");
285ca992
L
13279 break;
13280 case PREFIX_SS:
9ce09ba2 13281 oappend_maybe_intel ("%ss:");
285ca992
L
13282 break;
13283 case PREFIX_ES:
9ce09ba2 13284 oappend_maybe_intel ("%es:");
285ca992
L
13285 break;
13286 case PREFIX_FS:
9ce09ba2 13287 oappend_maybe_intel ("%fs:");
285ca992
L
13288 break;
13289 case PREFIX_GS:
9ce09ba2 13290 oappend_maybe_intel ("%gs:");
285ca992
L
13291 break;
13292 default:
13293 break;
7d421014 13294 }
252b5132
RH
13295}
13296
13297static void
26ca5450 13298OP_indirE (int bytemode, int sizeflag)
252b5132
RH
13299{
13300 if (!intel_syntax)
13301 oappend ("*");
13302 OP_E (bytemode, sizeflag);
13303}
13304
52b15da3 13305static void
26ca5450 13306print_operand_value (char *buf, int hex, bfd_vma disp)
52b15da3 13307{
cb712a9e 13308 if (address_mode == mode_64bit)
52b15da3
JH
13309 {
13310 if (hex)
13311 {
13312 char tmp[30];
13313 int i;
13314 buf[0] = '0';
13315 buf[1] = 'x';
13316 sprintf_vma (tmp, disp);
6608db57 13317 for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
52b15da3
JH
13318 strcpy (buf + 2, tmp + i);
13319 }
13320 else
13321 {
13322 bfd_signed_vma v = disp;
13323 char tmp[30];
13324 int i;
13325 if (v < 0)
13326 {
13327 *(buf++) = '-';
13328 v = -disp;
6608db57 13329 /* Check for possible overflow on 0x8000000000000000. */
52b15da3
JH
13330 if (v < 0)
13331 {
13332 strcpy (buf, "9223372036854775808");
13333 return;
13334 }
13335 }
13336 if (!v)
13337 {
13338 strcpy (buf, "0");
13339 return;
13340 }
13341
13342 i = 0;
13343 tmp[29] = 0;
13344 while (v)
13345 {
6608db57 13346 tmp[28 - i] = (v % 10) + '0';
52b15da3
JH
13347 v /= 10;
13348 i++;
13349 }
13350 strcpy (buf, tmp + 29 - i);
13351 }
13352 }
13353 else
13354 {
13355 if (hex)
13356 sprintf (buf, "0x%x", (unsigned int) disp);
13357 else
13358 sprintf (buf, "%d", (int) disp);
13359 }
13360}
13361
5d669648
L
13362/* Put DISP in BUF as signed hex number. */
13363
13364static void
13365print_displacement (char *buf, bfd_vma disp)
13366{
13367 bfd_signed_vma val = disp;
13368 char tmp[30];
13369 int i, j = 0;
13370
13371 if (val < 0)
13372 {
13373 buf[j++] = '-';
13374 val = -disp;
13375
13376 /* Check for possible overflow. */
13377 if (val < 0)
13378 {
13379 switch (address_mode)
13380 {
13381 case mode_64bit:
13382 strcpy (buf + j, "0x8000000000000000");
13383 break;
13384 case mode_32bit:
13385 strcpy (buf + j, "0x80000000");
13386 break;
13387 case mode_16bit:
13388 strcpy (buf + j, "0x8000");
13389 break;
13390 }
13391 return;
13392 }
13393 }
13394
13395 buf[j++] = '0';
13396 buf[j++] = 'x';
13397
0af1713e 13398 sprintf_vma (tmp, (bfd_vma) val);
5d669648
L
13399 for (i = 0; tmp[i] == '0'; i++)
13400 continue;
13401 if (tmp[i] == '\0')
13402 i--;
13403 strcpy (buf + j, tmp + i);
13404}
13405
3f31e633
JB
13406static void
13407intel_operand_size (int bytemode, int sizeflag)
13408{
43234a1e
L
13409 if (vex.evex
13410 && vex.b
13411 && (bytemode == x_mode
13412 || bytemode == evex_half_bcst_xmmq_mode))
13413 {
13414 if (vex.w)
13415 oappend ("QWORD PTR ");
13416 else
13417 oappend ("DWORD PTR ");
13418 return;
13419 }
3f31e633
JB
13420 switch (bytemode)
13421 {
13422 case b_mode:
b6169b20 13423 case b_swap_mode:
42903f7f 13424 case dqb_mode:
1ba585e8 13425 case db_mode:
3f31e633
JB
13426 oappend ("BYTE PTR ");
13427 break;
13428 case w_mode:
1ba585e8 13429 case dw_mode:
3f31e633
JB
13430 case dqw_mode:
13431 oappend ("WORD PTR ");
13432 break;
07f5af7d
L
13433 case indir_v_mode:
13434 if (address_mode == mode_64bit && isa64 == intel64)
13435 {
13436 oappend ("QWORD PTR ");
13437 break;
13438 }
1a0670f3 13439 /* Fall through. */
1a114b12 13440 case stack_v_mode:
7bb15c6f 13441 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
3f31e633
JB
13442 {
13443 oappend ("QWORD PTR ");
3f31e633
JB
13444 break;
13445 }
1a0670f3 13446 /* Fall through. */
3f31e633 13447 case v_mode:
b6169b20 13448 case v_swap_mode:
3f31e633 13449 case dq_mode:
161a04f6
L
13450 USED_REX (REX_W);
13451 if (rex & REX_W)
3f31e633 13452 oappend ("QWORD PTR ");
3f31e633 13453 else
f16cd0d5
L
13454 {
13455 if ((sizeflag & DFLAG) || bytemode == dq_mode)
13456 oappend ("DWORD PTR ");
13457 else
13458 oappend ("WORD PTR ");
13459 used_prefixes |= (prefixes & PREFIX_DATA);
13460 }
3f31e633 13461 break;
52fd6d94 13462 case z_mode:
161a04f6 13463 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
13464 *obufp++ = 'D';
13465 oappend ("WORD PTR ");
161a04f6 13466 if (!(rex & REX_W))
52fd6d94
JB
13467 used_prefixes |= (prefixes & PREFIX_DATA);
13468 break;
34b772a6
JB
13469 case a_mode:
13470 if (sizeflag & DFLAG)
13471 oappend ("QWORD PTR ");
13472 else
13473 oappend ("DWORD PTR ");
13474 used_prefixes |= (prefixes & PREFIX_DATA);
13475 break;
3f31e633 13476 case d_mode:
539f890d
L
13477 case d_scalar_mode:
13478 case d_scalar_swap_mode:
fa99fab2 13479 case d_swap_mode:
42903f7f 13480 case dqd_mode:
3f31e633
JB
13481 oappend ("DWORD PTR ");
13482 break;
13483 case q_mode:
539f890d
L
13484 case q_scalar_mode:
13485 case q_scalar_swap_mode:
b6169b20 13486 case q_swap_mode:
3f31e633
JB
13487 oappend ("QWORD PTR ");
13488 break;
13489 case m_mode:
cb712a9e 13490 if (address_mode == mode_64bit)
3f31e633
JB
13491 oappend ("QWORD PTR ");
13492 else
13493 oappend ("DWORD PTR ");
13494 break;
13495 case f_mode:
13496 if (sizeflag & DFLAG)
13497 oappend ("FWORD PTR ");
13498 else
13499 oappend ("DWORD PTR ");
13500 used_prefixes |= (prefixes & PREFIX_DATA);
13501 break;
13502 case t_mode:
13503 oappend ("TBYTE PTR ");
13504 break;
13505 case x_mode:
b6169b20 13506 case x_swap_mode:
43234a1e
L
13507 case evex_x_gscat_mode:
13508 case evex_x_nobcst_mode:
53467f57
IT
13509 case b_scalar_mode:
13510 case w_scalar_mode:
c0f3af97
L
13511 if (need_vex)
13512 {
13513 switch (vex.length)
13514 {
13515 case 128:
13516 oappend ("XMMWORD PTR ");
13517 break;
13518 case 256:
13519 oappend ("YMMWORD PTR ");
13520 break;
43234a1e
L
13521 case 512:
13522 oappend ("ZMMWORD PTR ");
13523 break;
c0f3af97
L
13524 default:
13525 abort ();
13526 }
13527 }
13528 else
13529 oappend ("XMMWORD PTR ");
13530 break;
13531 case xmm_mode:
3f31e633
JB
13532 oappend ("XMMWORD PTR ");
13533 break;
43234a1e
L
13534 case ymm_mode:
13535 oappend ("YMMWORD PTR ");
13536 break;
c0f3af97 13537 case xmmq_mode:
43234a1e 13538 case evex_half_bcst_xmmq_mode:
c0f3af97
L
13539 if (!need_vex)
13540 abort ();
13541
13542 switch (vex.length)
13543 {
13544 case 128:
13545 oappend ("QWORD PTR ");
13546 break;
13547 case 256:
13548 oappend ("XMMWORD PTR ");
13549 break;
43234a1e
L
13550 case 512:
13551 oappend ("YMMWORD PTR ");
13552 break;
c0f3af97
L
13553 default:
13554 abort ();
13555 }
13556 break;
6c30d220
L
13557 case xmm_mb_mode:
13558 if (!need_vex)
13559 abort ();
13560
13561 switch (vex.length)
13562 {
13563 case 128:
13564 case 256:
43234a1e 13565 case 512:
6c30d220
L
13566 oappend ("BYTE PTR ");
13567 break;
13568 default:
13569 abort ();
13570 }
13571 break;
13572 case xmm_mw_mode:
13573 if (!need_vex)
13574 abort ();
13575
13576 switch (vex.length)
13577 {
13578 case 128:
13579 case 256:
43234a1e 13580 case 512:
6c30d220
L
13581 oappend ("WORD PTR ");
13582 break;
13583 default:
13584 abort ();
13585 }
13586 break;
13587 case xmm_md_mode:
13588 if (!need_vex)
13589 abort ();
13590
13591 switch (vex.length)
13592 {
13593 case 128:
13594 case 256:
43234a1e 13595 case 512:
6c30d220
L
13596 oappend ("DWORD PTR ");
13597 break;
13598 default:
13599 abort ();
13600 }
13601 break;
13602 case xmm_mq_mode:
13603 if (!need_vex)
13604 abort ();
13605
13606 switch (vex.length)
13607 {
13608 case 128:
13609 case 256:
43234a1e 13610 case 512:
6c30d220
L
13611 oappend ("QWORD PTR ");
13612 break;
13613 default:
13614 abort ();
13615 }
13616 break;
13617 case xmmdw_mode:
13618 if (!need_vex)
13619 abort ();
13620
13621 switch (vex.length)
13622 {
13623 case 128:
13624 oappend ("WORD PTR ");
13625 break;
13626 case 256:
13627 oappend ("DWORD PTR ");
13628 break;
43234a1e
L
13629 case 512:
13630 oappend ("QWORD PTR ");
13631 break;
6c30d220
L
13632 default:
13633 abort ();
13634 }
13635 break;
13636 case xmmqd_mode:
13637 if (!need_vex)
13638 abort ();
13639
13640 switch (vex.length)
13641 {
13642 case 128:
13643 oappend ("DWORD PTR ");
13644 break;
13645 case 256:
13646 oappend ("QWORD PTR ");
13647 break;
43234a1e
L
13648 case 512:
13649 oappend ("XMMWORD PTR ");
13650 break;
6c30d220
L
13651 default:
13652 abort ();
13653 }
13654 break;
c0f3af97
L
13655 case ymmq_mode:
13656 if (!need_vex)
13657 abort ();
13658
13659 switch (vex.length)
13660 {
13661 case 128:
13662 oappend ("QWORD PTR ");
13663 break;
13664 case 256:
13665 oappend ("YMMWORD PTR ");
13666 break;
43234a1e
L
13667 case 512:
13668 oappend ("ZMMWORD PTR ");
13669 break;
c0f3af97
L
13670 default:
13671 abort ();
13672 }
13673 break;
6c30d220
L
13674 case ymmxmm_mode:
13675 if (!need_vex)
13676 abort ();
13677
13678 switch (vex.length)
13679 {
13680 case 128:
13681 case 256:
13682 oappend ("XMMWORD PTR ");
13683 break;
13684 default:
13685 abort ();
13686 }
13687 break;
fb9c77c7
L
13688 case o_mode:
13689 oappend ("OWORD PTR ");
13690 break;
43234a1e 13691 case xmm_mdq_mode:
0bfee649 13692 case vex_w_dq_mode:
1c480963 13693 case vex_scalar_w_dq_mode:
0bfee649
L
13694 if (!need_vex)
13695 abort ();
13696
13697 if (vex.w)
13698 oappend ("QWORD PTR ");
13699 else
13700 oappend ("DWORD PTR ");
13701 break;
43234a1e
L
13702 case vex_vsib_d_w_dq_mode:
13703 case vex_vsib_q_w_dq_mode:
13704 if (!need_vex)
13705 abort ();
13706
13707 if (!vex.evex)
13708 {
13709 if (vex.w)
13710 oappend ("QWORD PTR ");
13711 else
13712 oappend ("DWORD PTR ");
13713 }
13714 else
13715 {
b28d1bda
IT
13716 switch (vex.length)
13717 {
13718 case 128:
13719 oappend ("XMMWORD PTR ");
13720 break;
13721 case 256:
13722 oappend ("YMMWORD PTR ");
13723 break;
13724 case 512:
13725 oappend ("ZMMWORD PTR ");
13726 break;
13727 default:
13728 abort ();
13729 }
43234a1e
L
13730 }
13731 break;
5fc35d96
IT
13732 case vex_vsib_q_w_d_mode:
13733 case vex_vsib_d_w_d_mode:
b28d1bda 13734 if (!need_vex || !vex.evex)
5fc35d96
IT
13735 abort ();
13736
b28d1bda
IT
13737 switch (vex.length)
13738 {
13739 case 128:
13740 oappend ("QWORD PTR ");
13741 break;
13742 case 256:
13743 oappend ("XMMWORD PTR ");
13744 break;
13745 case 512:
13746 oappend ("YMMWORD PTR ");
13747 break;
13748 default:
13749 abort ();
13750 }
5fc35d96
IT
13751
13752 break;
1ba585e8
IT
13753 case mask_bd_mode:
13754 if (!need_vex || vex.length != 128)
13755 abort ();
13756 if (vex.w)
13757 oappend ("DWORD PTR ");
13758 else
13759 oappend ("BYTE PTR ");
13760 break;
43234a1e
L
13761 case mask_mode:
13762 if (!need_vex)
13763 abort ();
1ba585e8
IT
13764 if (vex.w)
13765 oappend ("QWORD PTR ");
13766 else
13767 oappend ("WORD PTR ");
43234a1e 13768 break;
6c75cc62 13769 case v_bnd_mode:
d276ec69 13770 case v_bndmk_mode:
3f31e633
JB
13771 default:
13772 break;
13773 }
13774}
13775
252b5132 13776static void
c0f3af97 13777OP_E_register (int bytemode, int sizeflag)
252b5132 13778{
c0f3af97
L
13779 int reg = modrm.rm;
13780 const char **names;
252b5132 13781
c0f3af97
L
13782 USED_REX (REX_B);
13783 if ((rex & REX_B))
13784 reg += 8;
252b5132 13785
b6169b20 13786 if ((sizeflag & SUFFIX_ALWAYS)
1ba585e8 13787 && (bytemode == b_swap_mode
9f79e886 13788 || bytemode == bnd_swap_mode
60227d64 13789 || bytemode == v_swap_mode))
b6169b20
L
13790 swap_operand ();
13791
c0f3af97 13792 switch (bytemode)
252b5132 13793 {
c0f3af97 13794 case b_mode:
b6169b20 13795 case b_swap_mode:
c0f3af97
L
13796 USED_REX (0);
13797 if (rex)
13798 names = names8rex;
13799 else
13800 names = names8;
13801 break;
13802 case w_mode:
13803 names = names16;
13804 break;
13805 case d_mode:
1ba585e8
IT
13806 case dw_mode:
13807 case db_mode:
c0f3af97
L
13808 names = names32;
13809 break;
13810 case q_mode:
13811 names = names64;
13812 break;
13813 case m_mode:
6c75cc62 13814 case v_bnd_mode:
c0f3af97
L
13815 names = address_mode == mode_64bit ? names64 : names32;
13816 break;
7e8b059b 13817 case bnd_mode:
9f79e886 13818 case bnd_swap_mode:
0d96e4df
L
13819 if (reg > 0x3)
13820 {
13821 oappend ("(bad)");
13822 return;
13823 }
7e8b059b
L
13824 names = names_bnd;
13825 break;
07f5af7d
L
13826 case indir_v_mode:
13827 if (address_mode == mode_64bit && isa64 == intel64)
13828 {
13829 names = names64;
13830 break;
13831 }
1a0670f3 13832 /* Fall through. */
c0f3af97 13833 case stack_v_mode:
7bb15c6f 13834 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
252b5132 13835 {
c0f3af97 13836 names = names64;
252b5132 13837 break;
252b5132 13838 }
c0f3af97 13839 bytemode = v_mode;
1a0670f3 13840 /* Fall through. */
c0f3af97 13841 case v_mode:
b6169b20 13842 case v_swap_mode:
c0f3af97
L
13843 case dq_mode:
13844 case dqb_mode:
13845 case dqd_mode:
13846 case dqw_mode:
13847 USED_REX (REX_W);
13848 if (rex & REX_W)
13849 names = names64;
c0f3af97 13850 else
f16cd0d5 13851 {
7bb15c6f 13852 if ((sizeflag & DFLAG)
f16cd0d5
L
13853 || (bytemode != v_mode
13854 && bytemode != v_swap_mode))
13855 names = names32;
13856 else
13857 names = names16;
13858 used_prefixes |= (prefixes & PREFIX_DATA);
13859 }
c0f3af97 13860 break;
de89d0a3
IT
13861 case va_mode:
13862 names = (address_mode == mode_64bit
13863 ? names64 : names32);
13864 if (!(prefixes & PREFIX_ADDR))
aa178437
IT
13865 names = (address_mode == mode_16bit
13866 ? names16 : names);
de89d0a3
IT
13867 else
13868 {
13869 /* Remove "addr16/addr32". */
13870 all_prefixes[last_addr_prefix] = 0;
13871 names = (address_mode != mode_32bit
13872 ? names32 : names16);
13873 used_prefixes |= PREFIX_ADDR;
13874 }
13875 break;
1ba585e8 13876 case mask_bd_mode:
43234a1e 13877 case mask_mode:
9889cbb1
L
13878 if (reg > 0x7)
13879 {
13880 oappend ("(bad)");
13881 return;
13882 }
43234a1e
L
13883 names = names_mask;
13884 break;
c0f3af97
L
13885 case 0:
13886 return;
13887 default:
13888 oappend (INTERNAL_DISASSEMBLER_ERROR);
252b5132
RH
13889 return;
13890 }
c0f3af97
L
13891 oappend (names[reg]);
13892}
13893
13894static void
c1e679ec 13895OP_E_memory (int bytemode, int sizeflag)
c0f3af97
L
13896{
13897 bfd_vma disp = 0;
13898 int add = (rex & REX_B) ? 8 : 0;
13899 int riprel = 0;
43234a1e
L
13900 int shift;
13901
13902 if (vex.evex)
13903 {
13904 /* In EVEX, if operand doesn't allow broadcast, vex.b should be 0. */
13905 if (vex.b
13906 && bytemode != x_mode
90a915bf 13907 && bytemode != xmmq_mode
43234a1e
L
13908 && bytemode != evex_half_bcst_xmmq_mode)
13909 {
13910 BadOp ();
13911 return;
13912 }
13913 switch (bytemode)
13914 {
1ba585e8
IT
13915 case dqw_mode:
13916 case dw_mode:
1ba585e8
IT
13917 shift = 1;
13918 break;
13919 case dqb_mode:
13920 case db_mode:
13921 shift = 0;
13922 break;
b50c9f31
JB
13923 case dq_mode:
13924 if (address_mode != mode_64bit)
13925 {
13926 shift = 2;
13927 break;
13928 }
13929 /* fall through */
43234a1e 13930 case vex_vsib_d_w_dq_mode:
5fc35d96 13931 case vex_vsib_d_w_d_mode:
eaa9d1ad 13932 case vex_vsib_q_w_dq_mode:
5fc35d96 13933 case vex_vsib_q_w_d_mode:
43234a1e
L
13934 case evex_x_gscat_mode:
13935 case xmm_mdq_mode:
13936 shift = vex.w ? 3 : 2;
13937 break;
43234a1e
L
13938 case x_mode:
13939 case evex_half_bcst_xmmq_mode:
90a915bf 13940 case xmmq_mode:
43234a1e
L
13941 if (vex.b)
13942 {
13943 shift = vex.w ? 3 : 2;
13944 break;
13945 }
1a0670f3 13946 /* Fall through. */
43234a1e
L
13947 case xmmqd_mode:
13948 case xmmdw_mode:
43234a1e
L
13949 case ymmq_mode:
13950 case evex_x_nobcst_mode:
13951 case x_swap_mode:
13952 switch (vex.length)
13953 {
13954 case 128:
13955 shift = 4;
13956 break;
13957 case 256:
13958 shift = 5;
13959 break;
13960 case 512:
13961 shift = 6;
13962 break;
13963 default:
13964 abort ();
13965 }
13966 break;
13967 case ymm_mode:
13968 shift = 5;
13969 break;
13970 case xmm_mode:
13971 shift = 4;
13972 break;
13973 case xmm_mq_mode:
13974 case q_mode:
13975 case q_scalar_mode:
13976 case q_swap_mode:
13977 case q_scalar_swap_mode:
13978 shift = 3;
13979 break;
13980 case dqd_mode:
13981 case xmm_md_mode:
13982 case d_mode:
13983 case d_scalar_mode:
13984 case d_swap_mode:
13985 case d_scalar_swap_mode:
13986 shift = 2;
13987 break;
5074ad8a 13988 case w_scalar_mode:
43234a1e
L
13989 case xmm_mw_mode:
13990 shift = 1;
13991 break;
5074ad8a 13992 case b_scalar_mode:
43234a1e
L
13993 case xmm_mb_mode:
13994 shift = 0;
13995 break;
13996 default:
13997 abort ();
13998 }
13999 /* Make necessary corrections to shift for modes that need it.
14000 For these modes we currently have shift 4, 5 or 6 depending on
14001 vex.length (it corresponds to xmmword, ymmword or zmmword
14002 operand). We might want to make it 3, 4 or 5 (e.g. for
14003 xmmq_mode). In case of broadcast enabled the corrections
14004 aren't needed, as element size is always 32 or 64 bits. */
90a915bf
IT
14005 if (!vex.b
14006 && (bytemode == xmmq_mode
14007 || bytemode == evex_half_bcst_xmmq_mode))
43234a1e
L
14008 shift -= 1;
14009 else if (bytemode == xmmqd_mode)
14010 shift -= 2;
14011 else if (bytemode == xmmdw_mode)
14012 shift -= 3;
b28d1bda
IT
14013 else if (bytemode == ymmq_mode && vex.length == 128)
14014 shift -= 1;
43234a1e
L
14015 }
14016 else
14017 shift = 0;
252b5132 14018
c0f3af97 14019 USED_REX (REX_B);
3f31e633
JB
14020 if (intel_syntax)
14021 intel_operand_size (bytemode, sizeflag);
252b5132
RH
14022 append_seg ();
14023
5d669648 14024 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132 14025 {
5d669648
L
14026 /* 32/64 bit address mode */
14027 int havedisp;
252b5132
RH
14028 int havesib;
14029 int havebase;
0f7da397 14030 int haveindex;
20afcfb7 14031 int needindex;
1bc60e56 14032 int needaddr32;
82c18208 14033 int base, rbase;
91d6fa6a 14034 int vindex = 0;
252b5132 14035 int scale = 0;
7e8b059b
L
14036 int addr32flag = !((sizeflag & AFLAG)
14037 || bytemode == v_bnd_mode
d276ec69 14038 || bytemode == v_bndmk_mode
9f79e886
JB
14039 || bytemode == bnd_mode
14040 || bytemode == bnd_swap_mode);
6c30d220
L
14041 const char **indexes64 = names64;
14042 const char **indexes32 = names32;
252b5132
RH
14043
14044 havesib = 0;
14045 havebase = 1;
0f7da397 14046 haveindex = 0;
7967e09e 14047 base = modrm.rm;
252b5132
RH
14048
14049 if (base == 4)
14050 {
14051 havesib = 1;
dfc8cf43 14052 vindex = sib.index;
161a04f6
L
14053 USED_REX (REX_X);
14054 if (rex & REX_X)
91d6fa6a 14055 vindex += 8;
6c30d220
L
14056 switch (bytemode)
14057 {
14058 case vex_vsib_d_w_dq_mode:
5fc35d96 14059 case vex_vsib_d_w_d_mode:
6c30d220 14060 case vex_vsib_q_w_dq_mode:
5fc35d96 14061 case vex_vsib_q_w_d_mode:
6c30d220
L
14062 if (!need_vex)
14063 abort ();
43234a1e
L
14064 if (vex.evex)
14065 {
14066 if (!vex.v)
14067 vindex += 16;
14068 }
6c30d220
L
14069
14070 haveindex = 1;
14071 switch (vex.length)
14072 {
14073 case 128:
7bb15c6f 14074 indexes64 = indexes32 = names_xmm;
6c30d220
L
14075 break;
14076 case 256:
5fc35d96
IT
14077 if (!vex.w
14078 || bytemode == vex_vsib_q_w_dq_mode
14079 || bytemode == vex_vsib_q_w_d_mode)
7bb15c6f 14080 indexes64 = indexes32 = names_ymm;
6c30d220 14081 else
7bb15c6f 14082 indexes64 = indexes32 = names_xmm;
6c30d220 14083 break;
43234a1e 14084 case 512:
5fc35d96
IT
14085 if (!vex.w
14086 || bytemode == vex_vsib_q_w_dq_mode
14087 || bytemode == vex_vsib_q_w_d_mode)
43234a1e
L
14088 indexes64 = indexes32 = names_zmm;
14089 else
14090 indexes64 = indexes32 = names_ymm;
14091 break;
6c30d220
L
14092 default:
14093 abort ();
14094 }
14095 break;
14096 default:
14097 haveindex = vindex != 4;
14098 break;
14099 }
14100 scale = sib.scale;
14101 base = sib.base;
252b5132
RH
14102 codep++;
14103 }
82c18208 14104 rbase = base + add;
252b5132 14105
7967e09e 14106 switch (modrm.mod)
252b5132
RH
14107 {
14108 case 0:
82c18208 14109 if (base == 5)
252b5132
RH
14110 {
14111 havebase = 0;
cb712a9e 14112 if (address_mode == mode_64bit && !havesib)
52b15da3
JH
14113 riprel = 1;
14114 disp = get32s ();
d276ec69
JB
14115 if (riprel && bytemode == v_bndmk_mode)
14116 {
14117 oappend ("(bad)");
14118 return;
14119 }
252b5132
RH
14120 }
14121 break;
14122 case 1:
14123 FETCH_DATA (the_info, codep + 1);
14124 disp = *codep++;
14125 if ((disp & 0x80) != 0)
14126 disp -= 0x100;
43234a1e
L
14127 if (vex.evex && shift > 0)
14128 disp <<= shift;
252b5132
RH
14129 break;
14130 case 2:
52b15da3 14131 disp = get32s ();
252b5132
RH
14132 break;
14133 }
14134
1bc60e56
L
14135 needindex = 0;
14136 needaddr32 = 0;
14137 if (havesib
14138 && !havebase
14139 && !haveindex
14140 && address_mode != mode_16bit)
14141 {
14142 if (address_mode == mode_64bit)
14143 {
14144 /* Display eiz instead of addr32. */
14145 needindex = addr32flag;
14146 needaddr32 = 1;
14147 }
14148 else
14149 {
14150 /* In 32-bit mode, we need index register to tell [offset]
14151 from [eiz*1 + offset]. */
14152 needindex = 1;
14153 }
14154 }
14155
20afcfb7
L
14156 havedisp = (havebase
14157 || needindex
14158 || (havesib && (haveindex || scale != 0)));
5d669648 14159
252b5132 14160 if (!intel_syntax)
82c18208 14161 if (modrm.mod != 0 || base == 5)
db6eb5be 14162 {
5d669648
L
14163 if (havedisp || riprel)
14164 print_displacement (scratchbuf, disp);
14165 else
14166 print_operand_value (scratchbuf, 1, disp);
db6eb5be 14167 oappend (scratchbuf);
52b15da3
JH
14168 if (riprel)
14169 {
14170 set_op (disp, 1);
28596323 14171 oappend (!addr32flag ? "(%rip)" : "(%eip)");
52b15da3 14172 }
db6eb5be 14173 }
2da11e11 14174
c1dc7af5 14175 if ((havebase || haveindex || needindex || needaddr32 || riprel)
7e8b059b 14176 && (bytemode != v_bnd_mode)
d276ec69 14177 && (bytemode != v_bndmk_mode)
9f79e886
JB
14178 && (bytemode != bnd_mode)
14179 && (bytemode != bnd_swap_mode))
87767711
JB
14180 used_prefixes |= PREFIX_ADDR;
14181
5d669648 14182 if (havedisp || (intel_syntax && riprel))
252b5132 14183 {
252b5132 14184 *obufp++ = open_char;
52b15da3 14185 if (intel_syntax && riprel)
185b1163
L
14186 {
14187 set_op (disp, 1);
28596323 14188 oappend (!addr32flag ? "rip" : "eip");
185b1163 14189 }
db6eb5be 14190 *obufp = '\0';
252b5132 14191 if (havebase)
7e8b059b 14192 oappend (address_mode == mode_64bit && !addr32flag
82c18208 14193 ? names64[rbase] : names32[rbase]);
252b5132
RH
14194 if (havesib)
14195 {
db51cc60
L
14196 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
14197 print index to tell base + index from base. */
14198 if (scale != 0
20afcfb7 14199 || needindex
db51cc60
L
14200 || haveindex
14201 || (havebase && base != ESP_REG_NUM))
252b5132 14202 {
9306ca4a 14203 if (!intel_syntax || havebase)
db6eb5be 14204 {
9306ca4a
JB
14205 *obufp++ = separator_char;
14206 *obufp = '\0';
db6eb5be 14207 }
db51cc60 14208 if (haveindex)
7e8b059b 14209 oappend (address_mode == mode_64bit && !addr32flag
6c30d220 14210 ? indexes64[vindex] : indexes32[vindex]);
db51cc60 14211 else
7e8b059b 14212 oappend (address_mode == mode_64bit && !addr32flag
db51cc60
L
14213 ? index64 : index32);
14214
db6eb5be
AM
14215 *obufp++ = scale_char;
14216 *obufp = '\0';
14217 sprintf (scratchbuf, "%d", 1 << scale);
14218 oappend (scratchbuf);
14219 }
252b5132 14220 }
185b1163 14221 if (intel_syntax
82c18208 14222 && (disp || modrm.mod != 0 || base == 5))
3d456fa1 14223 {
db51cc60 14224 if (!havedisp || (bfd_signed_vma) disp >= 0)
3d456fa1
JB
14225 {
14226 *obufp++ = '+';
14227 *obufp = '\0';
14228 }
05203043 14229 else if (modrm.mod != 1 && disp != -disp)
3d456fa1
JB
14230 {
14231 *obufp++ = '-';
14232 *obufp = '\0';
14233 disp = - (bfd_signed_vma) disp;
14234 }
14235
db51cc60
L
14236 if (havedisp)
14237 print_displacement (scratchbuf, disp);
14238 else
14239 print_operand_value (scratchbuf, 1, disp);
3d456fa1
JB
14240 oappend (scratchbuf);
14241 }
252b5132
RH
14242
14243 *obufp++ = close_char;
db6eb5be 14244 *obufp = '\0';
252b5132
RH
14245 }
14246 else if (intel_syntax)
db6eb5be 14247 {
82c18208 14248 if (modrm.mod != 0 || base == 5)
db6eb5be 14249 {
285ca992 14250 if (!active_seg_prefix)
252b5132 14251 {
d708bcba 14252 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
14253 oappend (":");
14254 }
52b15da3 14255 print_operand_value (scratchbuf, 1, disp);
db6eb5be
AM
14256 oappend (scratchbuf);
14257 }
14258 }
252b5132
RH
14259 }
14260 else
f16cd0d5
L
14261 {
14262 /* 16 bit address mode */
14263 used_prefixes |= prefixes & PREFIX_ADDR;
7967e09e 14264 switch (modrm.mod)
252b5132
RH
14265 {
14266 case 0:
7967e09e 14267 if (modrm.rm == 6)
252b5132
RH
14268 {
14269 disp = get16 ();
14270 if ((disp & 0x8000) != 0)
14271 disp -= 0x10000;
14272 }
14273 break;
14274 case 1:
14275 FETCH_DATA (the_info, codep + 1);
14276 disp = *codep++;
14277 if ((disp & 0x80) != 0)
14278 disp -= 0x100;
65f3ed04
JB
14279 if (vex.evex && shift > 0)
14280 disp <<= shift;
252b5132
RH
14281 break;
14282 case 2:
14283 disp = get16 ();
14284 if ((disp & 0x8000) != 0)
14285 disp -= 0x10000;
14286 break;
14287 }
14288
14289 if (!intel_syntax)
7967e09e 14290 if (modrm.mod != 0 || modrm.rm == 6)
db6eb5be 14291 {
5d669648 14292 print_displacement (scratchbuf, disp);
db6eb5be
AM
14293 oappend (scratchbuf);
14294 }
252b5132 14295
7967e09e 14296 if (modrm.mod != 0 || modrm.rm != 6)
252b5132
RH
14297 {
14298 *obufp++ = open_char;
db6eb5be 14299 *obufp = '\0';
7967e09e 14300 oappend (index16[modrm.rm]);
5d669648
L
14301 if (intel_syntax
14302 && (disp || modrm.mod != 0 || modrm.rm == 6))
3d456fa1 14303 {
5d669648 14304 if ((bfd_signed_vma) disp >= 0)
3d456fa1
JB
14305 {
14306 *obufp++ = '+';
14307 *obufp = '\0';
14308 }
7967e09e 14309 else if (modrm.mod != 1)
3d456fa1
JB
14310 {
14311 *obufp++ = '-';
14312 *obufp = '\0';
14313 disp = - (bfd_signed_vma) disp;
14314 }
14315
5d669648 14316 print_displacement (scratchbuf, disp);
3d456fa1
JB
14317 oappend (scratchbuf);
14318 }
14319
db6eb5be
AM
14320 *obufp++ = close_char;
14321 *obufp = '\0';
252b5132 14322 }
3d456fa1
JB
14323 else if (intel_syntax)
14324 {
285ca992 14325 if (!active_seg_prefix)
3d456fa1
JB
14326 {
14327 oappend (names_seg[ds_reg - es_reg]);
14328 oappend (":");
14329 }
14330 print_operand_value (scratchbuf, 1, disp & 0xffff);
14331 oappend (scratchbuf);
14332 }
252b5132 14333 }
43234a1e
L
14334 if (vex.evex && vex.b
14335 && (bytemode == x_mode
90a915bf 14336 || bytemode == xmmq_mode
43234a1e
L
14337 || bytemode == evex_half_bcst_xmmq_mode))
14338 {
90a915bf
IT
14339 if (vex.w
14340 || bytemode == xmmq_mode
14341 || bytemode == evex_half_bcst_xmmq_mode)
b28d1bda
IT
14342 {
14343 switch (vex.length)
14344 {
14345 case 128:
14346 oappend ("{1to2}");
14347 break;
14348 case 256:
14349 oappend ("{1to4}");
14350 break;
14351 case 512:
14352 oappend ("{1to8}");
14353 break;
14354 default:
14355 abort ();
14356 }
14357 }
43234a1e 14358 else
b28d1bda
IT
14359 {
14360 switch (vex.length)
14361 {
14362 case 128:
14363 oappend ("{1to4}");
14364 break;
14365 case 256:
14366 oappend ("{1to8}");
14367 break;
14368 case 512:
14369 oappend ("{1to16}");
14370 break;
14371 default:
14372 abort ();
14373 }
14374 }
43234a1e 14375 }
252b5132
RH
14376}
14377
c0f3af97 14378static void
8b3f93e7 14379OP_E (int bytemode, int sizeflag)
c0f3af97
L
14380{
14381 /* Skip mod/rm byte. */
14382 MODRM_CHECK;
14383 codep++;
14384
14385 if (modrm.mod == 3)
14386 OP_E_register (bytemode, sizeflag);
14387 else
c1e679ec 14388 OP_E_memory (bytemode, sizeflag);
c0f3af97
L
14389}
14390
252b5132 14391static void
26ca5450 14392OP_G (int bytemode, int sizeflag)
252b5132 14393{
52b15da3 14394 int add = 0;
c0a30a9f 14395 const char **names;
161a04f6
L
14396 USED_REX (REX_R);
14397 if (rex & REX_R)
52b15da3 14398 add += 8;
252b5132
RH
14399 switch (bytemode)
14400 {
14401 case b_mode:
52b15da3
JH
14402 USED_REX (0);
14403 if (rex)
7967e09e 14404 oappend (names8rex[modrm.reg + add]);
52b15da3 14405 else
7967e09e 14406 oappend (names8[modrm.reg + add]);
252b5132
RH
14407 break;
14408 case w_mode:
7967e09e 14409 oappend (names16[modrm.reg + add]);
252b5132
RH
14410 break;
14411 case d_mode:
1ba585e8
IT
14412 case db_mode:
14413 case dw_mode:
7967e09e 14414 oappend (names32[modrm.reg + add]);
52b15da3
JH
14415 break;
14416 case q_mode:
7967e09e 14417 oappend (names64[modrm.reg + add]);
252b5132 14418 break;
7e8b059b 14419 case bnd_mode:
0d96e4df
L
14420 if (modrm.reg > 0x3)
14421 {
14422 oappend ("(bad)");
14423 return;
14424 }
7e8b059b
L
14425 oappend (names_bnd[modrm.reg]);
14426 break;
252b5132 14427 case v_mode:
9306ca4a 14428 case dq_mode:
42903f7f
L
14429 case dqb_mode:
14430 case dqd_mode:
9306ca4a 14431 case dqw_mode:
161a04f6
L
14432 USED_REX (REX_W);
14433 if (rex & REX_W)
7967e09e 14434 oappend (names64[modrm.reg + add]);
252b5132 14435 else
f16cd0d5
L
14436 {
14437 if ((sizeflag & DFLAG) || bytemode != v_mode)
14438 oappend (names32[modrm.reg + add]);
14439 else
14440 oappend (names16[modrm.reg + add]);
14441 used_prefixes |= (prefixes & PREFIX_DATA);
14442 }
252b5132 14443 break;
c0a30a9f
L
14444 case va_mode:
14445 names = (address_mode == mode_64bit
14446 ? names64 : names32);
14447 if (!(prefixes & PREFIX_ADDR))
14448 {
14449 if (address_mode == mode_16bit)
14450 names = names16;
14451 }
14452 else
14453 {
14454 /* Remove "addr16/addr32". */
14455 all_prefixes[last_addr_prefix] = 0;
14456 names = (address_mode != mode_32bit
14457 ? names32 : names16);
14458 used_prefixes |= PREFIX_ADDR;
14459 }
14460 oappend (names[modrm.reg + add]);
14461 break;
90700ea2 14462 case m_mode:
cb712a9e 14463 if (address_mode == mode_64bit)
7967e09e 14464 oappend (names64[modrm.reg + add]);
90700ea2 14465 else
7967e09e 14466 oappend (names32[modrm.reg + add]);
90700ea2 14467 break;
1ba585e8 14468 case mask_bd_mode:
43234a1e 14469 case mask_mode:
9889cbb1
L
14470 if ((modrm.reg + add) > 0x7)
14471 {
14472 oappend ("(bad)");
14473 return;
14474 }
43234a1e
L
14475 oappend (names_mask[modrm.reg + add]);
14476 break;
252b5132
RH
14477 default:
14478 oappend (INTERNAL_DISASSEMBLER_ERROR);
14479 break;
14480 }
14481}
14482
52b15da3 14483static bfd_vma
26ca5450 14484get64 (void)
52b15da3 14485{
5dd0794d 14486 bfd_vma x;
52b15da3 14487#ifdef BFD64
5dd0794d
AM
14488 unsigned int a;
14489 unsigned int b;
14490
52b15da3
JH
14491 FETCH_DATA (the_info, codep + 8);
14492 a = *codep++ & 0xff;
14493 a |= (*codep++ & 0xff) << 8;
14494 a |= (*codep++ & 0xff) << 16;
070fe95d 14495 a |= (*codep++ & 0xffu) << 24;
5dd0794d 14496 b = *codep++ & 0xff;
52b15da3
JH
14497 b |= (*codep++ & 0xff) << 8;
14498 b |= (*codep++ & 0xff) << 16;
070fe95d 14499 b |= (*codep++ & 0xffu) << 24;
52b15da3
JH
14500 x = a + ((bfd_vma) b << 32);
14501#else
6608db57 14502 abort ();
5dd0794d 14503 x = 0;
52b15da3
JH
14504#endif
14505 return x;
14506}
14507
14508static bfd_signed_vma
26ca5450 14509get32 (void)
252b5132 14510{
52b15da3 14511 bfd_signed_vma x = 0;
252b5132
RH
14512
14513 FETCH_DATA (the_info, codep + 4);
52b15da3
JH
14514 x = *codep++ & (bfd_signed_vma) 0xff;
14515 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14516 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14517 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14518 return x;
14519}
14520
14521static bfd_signed_vma
26ca5450 14522get32s (void)
52b15da3
JH
14523{
14524 bfd_signed_vma x = 0;
14525
14526 FETCH_DATA (the_info, codep + 4);
14527 x = *codep++ & (bfd_signed_vma) 0xff;
14528 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14529 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14530 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14531
14532 x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
14533
252b5132
RH
14534 return x;
14535}
14536
14537static int
26ca5450 14538get16 (void)
252b5132
RH
14539{
14540 int x = 0;
14541
14542 FETCH_DATA (the_info, codep + 2);
14543 x = *codep++ & 0xff;
14544 x |= (*codep++ & 0xff) << 8;
14545 return x;
14546}
14547
14548static void
26ca5450 14549set_op (bfd_vma op, int riprel)
252b5132
RH
14550{
14551 op_index[op_ad] = op_ad;
cb712a9e 14552 if (address_mode == mode_64bit)
7081ff04
AJ
14553 {
14554 op_address[op_ad] = op;
14555 op_riprel[op_ad] = riprel;
14556 }
14557 else
14558 {
14559 /* Mask to get a 32-bit address. */
14560 op_address[op_ad] = op & 0xffffffff;
14561 op_riprel[op_ad] = riprel & 0xffffffff;
14562 }
252b5132
RH
14563}
14564
14565static void
26ca5450 14566OP_REG (int code, int sizeflag)
252b5132 14567{
2da11e11 14568 const char *s;
9b60702d 14569 int add;
de882298
RM
14570
14571 switch (code)
14572 {
14573 case es_reg: case ss_reg: case cs_reg:
14574 case ds_reg: case fs_reg: case gs_reg:
14575 oappend (names_seg[code - es_reg]);
14576 return;
14577 }
14578
161a04f6
L
14579 USED_REX (REX_B);
14580 if (rex & REX_B)
52b15da3 14581 add = 8;
9b60702d
L
14582 else
14583 add = 0;
52b15da3
JH
14584
14585 switch (code)
14586 {
52b15da3
JH
14587 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14588 case sp_reg: case bp_reg: case si_reg: case di_reg:
14589 s = names16[code - ax_reg + add];
14590 break;
52b15da3
JH
14591 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14592 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
14593 USED_REX (0);
14594 if (rex)
14595 s = names8rex[code - al_reg + add];
14596 else
14597 s = names8[code - al_reg];
14598 break;
6439fc28
AM
14599 case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
14600 case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
7bb15c6f 14601 if (address_mode == mode_64bit
6c067bbb 14602 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28
AM
14603 {
14604 s = names64[code - rAX_reg + add];
14605 break;
14606 }
14607 code += eAX_reg - rAX_reg;
6608db57 14608 /* Fall through. */
52b15da3
JH
14609 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14610 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
14611 USED_REX (REX_W);
14612 if (rex & REX_W)
52b15da3 14613 s = names64[code - eAX_reg + add];
52b15da3 14614 else
f16cd0d5
L
14615 {
14616 if (sizeflag & DFLAG)
14617 s = names32[code - eAX_reg + add];
14618 else
14619 s = names16[code - eAX_reg + add];
14620 used_prefixes |= (prefixes & PREFIX_DATA);
14621 }
52b15da3 14622 break;
52b15da3
JH
14623 default:
14624 s = INTERNAL_DISASSEMBLER_ERROR;
14625 break;
14626 }
14627 oappend (s);
14628}
14629
14630static void
26ca5450 14631OP_IMREG (int code, int sizeflag)
52b15da3
JH
14632{
14633 const char *s;
252b5132
RH
14634
14635 switch (code)
14636 {
14637 case indir_dx_reg:
d708bcba 14638 if (intel_syntax)
52fd6d94 14639 s = "dx";
d708bcba 14640 else
db6eb5be 14641 s = "(%dx)";
252b5132
RH
14642 break;
14643 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14644 case sp_reg: case bp_reg: case si_reg: case di_reg:
14645 s = names16[code - ax_reg];
14646 break;
14647 case es_reg: case ss_reg: case cs_reg:
14648 case ds_reg: case fs_reg: case gs_reg:
14649 s = names_seg[code - es_reg];
14650 break;
14651 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14652 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
52b15da3
JH
14653 USED_REX (0);
14654 if (rex)
14655 s = names8rex[code - al_reg];
14656 else
14657 s = names8[code - al_reg];
252b5132
RH
14658 break;
14659 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14660 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
14661 USED_REX (REX_W);
14662 if (rex & REX_W)
52b15da3 14663 s = names64[code - eAX_reg];
252b5132 14664 else
f16cd0d5
L
14665 {
14666 if (sizeflag & DFLAG)
14667 s = names32[code - eAX_reg];
14668 else
14669 s = names16[code - eAX_reg];
14670 used_prefixes |= (prefixes & PREFIX_DATA);
14671 }
252b5132 14672 break;
52fd6d94 14673 case z_mode_ax_reg:
161a04f6 14674 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
14675 s = *names32;
14676 else
14677 s = *names16;
161a04f6 14678 if (!(rex & REX_W))
52fd6d94
JB
14679 used_prefixes |= (prefixes & PREFIX_DATA);
14680 break;
252b5132
RH
14681 default:
14682 s = INTERNAL_DISASSEMBLER_ERROR;
14683 break;
14684 }
14685 oappend (s);
14686}
14687
14688static void
26ca5450 14689OP_I (int bytemode, int sizeflag)
252b5132 14690{
52b15da3
JH
14691 bfd_signed_vma op;
14692 bfd_signed_vma mask = -1;
252b5132
RH
14693
14694 switch (bytemode)
14695 {
14696 case b_mode:
14697 FETCH_DATA (the_info, codep + 1);
52b15da3
JH
14698 op = *codep++;
14699 mask = 0xff;
14700 break;
252b5132 14701 case v_mode:
161a04f6
L
14702 USED_REX (REX_W);
14703 if (rex & REX_W)
52b15da3 14704 op = get32s ();
252b5132 14705 else
52b15da3 14706 {
f16cd0d5
L
14707 if (sizeflag & DFLAG)
14708 {
14709 op = get32 ();
14710 mask = 0xffffffff;
14711 }
14712 else
14713 {
14714 op = get16 ();
14715 mask = 0xfffff;
14716 }
14717 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 14718 }
252b5132 14719 break;
c1dc7af5
JB
14720 case d_mode:
14721 mask = 0xffffffff;
14722 op = get32 ();
14723 break;
252b5132 14724 case w_mode:
52b15da3 14725 mask = 0xfffff;
252b5132
RH
14726 op = get16 ();
14727 break;
9306ca4a
JB
14728 case const_1_mode:
14729 if (intel_syntax)
6c067bbb 14730 oappend ("1");
9306ca4a 14731 return;
252b5132
RH
14732 default:
14733 oappend (INTERNAL_DISASSEMBLER_ERROR);
14734 return;
14735 }
14736
52b15da3
JH
14737 op &= mask;
14738 scratchbuf[0] = '$';
d708bcba 14739 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 14740 oappend_maybe_intel (scratchbuf);
52b15da3
JH
14741 scratchbuf[0] = '\0';
14742}
14743
14744static void
26ca5450 14745OP_I64 (int bytemode, int sizeflag)
52b15da3 14746{
a280ab8e 14747 if (bytemode != v_mode || address_mode != mode_64bit || !(rex & REX_W))
6439fc28
AM
14748 {
14749 OP_I (bytemode, sizeflag);
14750 return;
14751 }
14752
a280ab8e 14753 USED_REX (REX_W);
52b15da3 14754
52b15da3 14755 scratchbuf[0] = '$';
a280ab8e 14756 print_operand_value (scratchbuf + 1, 1, get64 ());
9ce09ba2 14757 oappend_maybe_intel (scratchbuf);
252b5132
RH
14758 scratchbuf[0] = '\0';
14759}
14760
14761static void
26ca5450 14762OP_sI (int bytemode, int sizeflag)
252b5132 14763{
52b15da3 14764 bfd_signed_vma op;
252b5132
RH
14765
14766 switch (bytemode)
14767 {
14768 case b_mode:
e3949f17 14769 case b_T_mode:
252b5132
RH
14770 FETCH_DATA (the_info, codep + 1);
14771 op = *codep++;
14772 if ((op & 0x80) != 0)
14773 op -= 0x100;
e3949f17
L
14774 if (bytemode == b_T_mode)
14775 {
14776 if (address_mode != mode_64bit
7bb15c6f 14777 || !((sizeflag & DFLAG) || (rex & REX_W)))
e3949f17 14778 {
6c067bbb
RM
14779 /* The operand-size prefix is overridden by a REX prefix. */
14780 if ((sizeflag & DFLAG) || (rex & REX_W))
e3949f17
L
14781 op &= 0xffffffff;
14782 else
14783 op &= 0xffff;
14784 }
14785 }
14786 else
14787 {
14788 if (!(rex & REX_W))
14789 {
14790 if (sizeflag & DFLAG)
14791 op &= 0xffffffff;
14792 else
14793 op &= 0xffff;
14794 }
14795 }
252b5132
RH
14796 break;
14797 case v_mode:
7bb15c6f
RM
14798 /* The operand-size prefix is overridden by a REX prefix. */
14799 if ((sizeflag & DFLAG) || (rex & REX_W))
52b15da3 14800 op = get32s ();
252b5132 14801 else
d9e3625e 14802 op = get16 ();
252b5132
RH
14803 break;
14804 default:
14805 oappend (INTERNAL_DISASSEMBLER_ERROR);
14806 return;
14807 }
52b15da3
JH
14808
14809 scratchbuf[0] = '$';
14810 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 14811 oappend_maybe_intel (scratchbuf);
252b5132
RH
14812}
14813
14814static void
26ca5450 14815OP_J (int bytemode, int sizeflag)
252b5132 14816{
52b15da3 14817 bfd_vma disp;
7081ff04 14818 bfd_vma mask = -1;
65ca155d 14819 bfd_vma segment = 0;
252b5132
RH
14820
14821 switch (bytemode)
14822 {
14823 case b_mode:
14824 FETCH_DATA (the_info, codep + 1);
14825 disp = *codep++;
14826 if ((disp & 0x80) != 0)
14827 disp -= 0x100;
14828 break;
14829 case v_mode:
5db04b09
L
14830 if (isa64 == amd64)
14831 USED_REX (REX_W);
14832 if ((sizeflag & DFLAG)
14833 || (address_mode == mode_64bit
14834 && (isa64 != amd64 || (rex & REX_W))))
52b15da3 14835 disp = get32s ();
252b5132
RH
14836 else
14837 {
14838 disp = get16 ();
206717e8
L
14839 if ((disp & 0x8000) != 0)
14840 disp -= 0x10000;
65ca155d
L
14841 /* In 16bit mode, address is wrapped around at 64k within
14842 the same segment. Otherwise, a data16 prefix on a jump
14843 instruction means that the pc is masked to 16 bits after
14844 the displacement is added! */
14845 mask = 0xffff;
14846 if ((prefixes & PREFIX_DATA) == 0)
4fd7268a 14847 segment = ((start_pc + (codep - start_codep))
65ca155d 14848 & ~((bfd_vma) 0xffff));
252b5132 14849 }
5db04b09
L
14850 if (address_mode != mode_64bit
14851 || (isa64 == amd64 && !(rex & REX_W)))
f16cd0d5 14852 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132
RH
14853 break;
14854 default:
14855 oappend (INTERNAL_DISASSEMBLER_ERROR);
14856 return;
14857 }
42d5f9c6 14858 disp = ((start_pc + (codep - start_codep) + disp) & mask) | segment;
52b15da3
JH
14859 set_op (disp, 0);
14860 print_operand_value (scratchbuf, 1, disp);
252b5132
RH
14861 oappend (scratchbuf);
14862}
14863
252b5132 14864static void
ed7841b3 14865OP_SEG (int bytemode, int sizeflag)
252b5132 14866{
ed7841b3 14867 if (bytemode == w_mode)
7967e09e 14868 oappend (names_seg[modrm.reg]);
ed7841b3 14869 else
7967e09e 14870 OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
252b5132
RH
14871}
14872
14873static void
26ca5450 14874OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
252b5132
RH
14875{
14876 int seg, offset;
14877
c608c12e 14878 if (sizeflag & DFLAG)
252b5132 14879 {
c608c12e
AM
14880 offset = get32 ();
14881 seg = get16 ();
252b5132 14882 }
c608c12e
AM
14883 else
14884 {
14885 offset = get16 ();
14886 seg = get16 ();
14887 }
7d421014 14888 used_prefixes |= (prefixes & PREFIX_DATA);
d708bcba 14889 if (intel_syntax)
3f31e633 14890 sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
d708bcba
AM
14891 else
14892 sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
c608c12e 14893 oappend (scratchbuf);
252b5132
RH
14894}
14895
252b5132 14896static void
3f31e633 14897OP_OFF (int bytemode, int sizeflag)
252b5132 14898{
52b15da3 14899 bfd_vma off;
252b5132 14900
3f31e633
JB
14901 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
14902 intel_operand_size (bytemode, sizeflag);
252b5132
RH
14903 append_seg ();
14904
cb712a9e 14905 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132
RH
14906 off = get32 ();
14907 else
14908 off = get16 ();
14909
14910 if (intel_syntax)
14911 {
285ca992 14912 if (!active_seg_prefix)
252b5132 14913 {
d708bcba 14914 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
14915 oappend (":");
14916 }
14917 }
52b15da3
JH
14918 print_operand_value (scratchbuf, 1, off);
14919 oappend (scratchbuf);
14920}
6439fc28 14921
52b15da3 14922static void
3f31e633 14923OP_OFF64 (int bytemode, int sizeflag)
52b15da3
JH
14924{
14925 bfd_vma off;
14926
539e75ad
L
14927 if (address_mode != mode_64bit
14928 || (prefixes & PREFIX_ADDR))
6439fc28
AM
14929 {
14930 OP_OFF (bytemode, sizeflag);
14931 return;
14932 }
14933
3f31e633
JB
14934 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
14935 intel_operand_size (bytemode, sizeflag);
52b15da3
JH
14936 append_seg ();
14937
6608db57 14938 off = get64 ();
52b15da3
JH
14939
14940 if (intel_syntax)
14941 {
285ca992 14942 if (!active_seg_prefix)
52b15da3 14943 {
d708bcba 14944 oappend (names_seg[ds_reg - es_reg]);
52b15da3
JH
14945 oappend (":");
14946 }
14947 }
14948 print_operand_value (scratchbuf, 1, off);
252b5132
RH
14949 oappend (scratchbuf);
14950}
14951
14952static void
26ca5450 14953ptr_reg (int code, int sizeflag)
252b5132 14954{
2da11e11 14955 const char *s;
d708bcba 14956
1d9f512f 14957 *obufp++ = open_char;
20f0a1fc 14958 used_prefixes |= (prefixes & PREFIX_ADDR);
cb712a9e 14959 if (address_mode == mode_64bit)
c1a64871
JH
14960 {
14961 if (!(sizeflag & AFLAG))
db6eb5be 14962 s = names32[code - eAX_reg];
c1a64871 14963 else
db6eb5be 14964 s = names64[code - eAX_reg];
c1a64871 14965 }
52b15da3 14966 else if (sizeflag & AFLAG)
252b5132
RH
14967 s = names32[code - eAX_reg];
14968 else
14969 s = names16[code - eAX_reg];
14970 oappend (s);
1d9f512f
AM
14971 *obufp++ = close_char;
14972 *obufp = 0;
252b5132
RH
14973}
14974
14975static void
26ca5450 14976OP_ESreg (int code, int sizeflag)
252b5132 14977{
9306ca4a 14978 if (intel_syntax)
52fd6d94
JB
14979 {
14980 switch (codep[-1])
14981 {
14982 case 0x6d: /* insw/insl */
14983 intel_operand_size (z_mode, sizeflag);
14984 break;
14985 case 0xa5: /* movsw/movsl/movsq */
14986 case 0xa7: /* cmpsw/cmpsl/cmpsq */
14987 case 0xab: /* stosw/stosl */
14988 case 0xaf: /* scasw/scasl */
14989 intel_operand_size (v_mode, sizeflag);
14990 break;
14991 default:
14992 intel_operand_size (b_mode, sizeflag);
14993 }
14994 }
9ce09ba2 14995 oappend_maybe_intel ("%es:");
252b5132
RH
14996 ptr_reg (code, sizeflag);
14997}
14998
14999static void
26ca5450 15000OP_DSreg (int code, int sizeflag)
252b5132 15001{
9306ca4a 15002 if (intel_syntax)
52fd6d94
JB
15003 {
15004 switch (codep[-1])
15005 {
15006 case 0x6f: /* outsw/outsl */
15007 intel_operand_size (z_mode, sizeflag);
15008 break;
15009 case 0xa5: /* movsw/movsl/movsq */
15010 case 0xa7: /* cmpsw/cmpsl/cmpsq */
15011 case 0xad: /* lodsw/lodsl/lodsq */
15012 intel_operand_size (v_mode, sizeflag);
15013 break;
15014 default:
15015 intel_operand_size (b_mode, sizeflag);
15016 }
15017 }
285ca992
L
15018 /* Set active_seg_prefix to PREFIX_DS if it is unset so that the
15019 default segment register DS is printed. */
15020 if (!active_seg_prefix)
15021 active_seg_prefix = PREFIX_DS;
6608db57 15022 append_seg ();
252b5132
RH
15023 ptr_reg (code, sizeflag);
15024}
15025
252b5132 15026static void
26ca5450 15027OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15028{
9b60702d 15029 int add;
161a04f6 15030 if (rex & REX_R)
c4a530c5 15031 {
161a04f6 15032 USED_REX (REX_R);
c4a530c5
JB
15033 add = 8;
15034 }
cb712a9e 15035 else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
c4a530c5 15036 {
f16cd0d5 15037 all_prefixes[last_lock_prefix] = 0;
c4a530c5
JB
15038 used_prefixes |= PREFIX_LOCK;
15039 add = 8;
15040 }
9b60702d
L
15041 else
15042 add = 0;
7967e09e 15043 sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
9ce09ba2 15044 oappend_maybe_intel (scratchbuf);
252b5132
RH
15045}
15046
252b5132 15047static void
26ca5450 15048OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15049{
9b60702d 15050 int add;
161a04f6
L
15051 USED_REX (REX_R);
15052 if (rex & REX_R)
52b15da3 15053 add = 8;
9b60702d
L
15054 else
15055 add = 0;
d708bcba 15056 if (intel_syntax)
7967e09e 15057 sprintf (scratchbuf, "db%d", modrm.reg + add);
d708bcba 15058 else
7967e09e 15059 sprintf (scratchbuf, "%%db%d", modrm.reg + add);
252b5132
RH
15060 oappend (scratchbuf);
15061}
15062
252b5132 15063static void
26ca5450 15064OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15065{
7967e09e 15066 sprintf (scratchbuf, "%%tr%d", modrm.reg);
9ce09ba2 15067 oappend_maybe_intel (scratchbuf);
252b5132
RH
15068}
15069
15070static void
6f74c397 15071OP_R (int bytemode, int sizeflag)
252b5132 15072{
68f34464
L
15073 /* Skip mod/rm byte. */
15074 MODRM_CHECK;
15075 codep++;
15076 OP_E_register (bytemode, sizeflag);
252b5132
RH
15077}
15078
15079static void
26ca5450 15080OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 15081{
b9733481
L
15082 int reg = modrm.reg;
15083 const char **names;
15084
041bd2e0
JH
15085 used_prefixes |= (prefixes & PREFIX_DATA);
15086 if (prefixes & PREFIX_DATA)
20f0a1fc 15087 {
b9733481 15088 names = names_xmm;
161a04f6
L
15089 USED_REX (REX_R);
15090 if (rex & REX_R)
b9733481 15091 reg += 8;
20f0a1fc 15092 }
041bd2e0 15093 else
b9733481
L
15094 names = names_mm;
15095 oappend (names[reg]);
252b5132
RH
15096}
15097
c608c12e 15098static void
c0f3af97 15099OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
c608c12e 15100{
b9733481
L
15101 int reg = modrm.reg;
15102 const char **names;
15103
161a04f6
L
15104 USED_REX (REX_R);
15105 if (rex & REX_R)
b9733481 15106 reg += 8;
43234a1e
L
15107 if (vex.evex)
15108 {
15109 if (!vex.r)
15110 reg += 16;
15111 }
15112
539f890d
L
15113 if (need_vex
15114 && bytemode != xmm_mode
43234a1e
L
15115 && bytemode != xmmq_mode
15116 && bytemode != evex_half_bcst_xmmq_mode
15117 && bytemode != ymm_mode
539f890d 15118 && bytemode != scalar_mode)
c0f3af97
L
15119 {
15120 switch (vex.length)
15121 {
15122 case 128:
b9733481 15123 names = names_xmm;
c0f3af97
L
15124 break;
15125 case 256:
5fc35d96
IT
15126 if (vex.w
15127 || (bytemode != vex_vsib_q_w_dq_mode
15128 && bytemode != vex_vsib_q_w_d_mode))
6c30d220
L
15129 names = names_ymm;
15130 else
15131 names = names_xmm;
c0f3af97 15132 break;
43234a1e
L
15133 case 512:
15134 names = names_zmm;
15135 break;
c0f3af97
L
15136 default:
15137 abort ();
15138 }
15139 }
43234a1e
L
15140 else if (bytemode == xmmq_mode
15141 || bytemode == evex_half_bcst_xmmq_mode)
15142 {
15143 switch (vex.length)
15144 {
15145 case 128:
15146 case 256:
15147 names = names_xmm;
15148 break;
15149 case 512:
15150 names = names_ymm;
15151 break;
15152 default:
15153 abort ();
15154 }
15155 }
15156 else if (bytemode == ymm_mode)
15157 names = names_ymm;
c0f3af97 15158 else
b9733481
L
15159 names = names_xmm;
15160 oappend (names[reg]);
c608c12e
AM
15161}
15162
252b5132 15163static void
26ca5450 15164OP_EM (int bytemode, int sizeflag)
252b5132 15165{
b9733481
L
15166 int reg;
15167 const char **names;
15168
7967e09e 15169 if (modrm.mod != 3)
252b5132 15170 {
b6169b20
L
15171 if (intel_syntax
15172 && (bytemode == v_mode || bytemode == v_swap_mode))
9306ca4a
JB
15173 {
15174 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
15175 used_prefixes |= (prefixes & PREFIX_DATA);
6c067bbb 15176 }
252b5132
RH
15177 OP_E (bytemode, sizeflag);
15178 return;
15179 }
15180
b6169b20
L
15181 if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
15182 swap_operand ();
15183
6608db57 15184 /* Skip mod/rm byte. */
4bba6815 15185 MODRM_CHECK;
252b5132 15186 codep++;
041bd2e0 15187 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 15188 reg = modrm.rm;
041bd2e0 15189 if (prefixes & PREFIX_DATA)
20f0a1fc 15190 {
b9733481 15191 names = names_xmm;
161a04f6
L
15192 USED_REX (REX_B);
15193 if (rex & REX_B)
b9733481 15194 reg += 8;
20f0a1fc 15195 }
041bd2e0 15196 else
b9733481
L
15197 names = names_mm;
15198 oappend (names[reg]);
252b5132
RH
15199}
15200
246c51aa
L
15201/* cvt* are the only instructions in sse2 which have
15202 both SSE and MMX operands and also have 0x66 prefix
15203 in their opcode. 0x66 was originally used to differentiate
15204 between SSE and MMX instruction(operands). So we have to handle the
4d9567e0
MM
15205 cvt* separately using OP_EMC and OP_MXC */
15206static void
15207OP_EMC (int bytemode, int sizeflag)
15208{
7967e09e 15209 if (modrm.mod != 3)
4d9567e0
MM
15210 {
15211 if (intel_syntax && bytemode == v_mode)
15212 {
15213 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
15214 used_prefixes |= (prefixes & PREFIX_DATA);
6c067bbb 15215 }
4d9567e0
MM
15216 OP_E (bytemode, sizeflag);
15217 return;
15218 }
246c51aa 15219
4d9567e0
MM
15220 /* Skip mod/rm byte. */
15221 MODRM_CHECK;
15222 codep++;
15223 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 15224 oappend (names_mm[modrm.rm]);
4d9567e0
MM
15225}
15226
15227static void
15228OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15229{
15230 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 15231 oappend (names_mm[modrm.reg]);
4d9567e0
MM
15232}
15233
c608c12e 15234static void
26ca5450 15235OP_EX (int bytemode, int sizeflag)
c608c12e 15236{
b9733481
L
15237 int reg;
15238 const char **names;
d6f574e0
L
15239
15240 /* Skip mod/rm byte. */
15241 MODRM_CHECK;
15242 codep++;
15243
7967e09e 15244 if (modrm.mod != 3)
c608c12e 15245 {
c1e679ec 15246 OP_E_memory (bytemode, sizeflag);
c608c12e
AM
15247 return;
15248 }
d6f574e0 15249
b9733481 15250 reg = modrm.rm;
161a04f6
L
15251 USED_REX (REX_B);
15252 if (rex & REX_B)
b9733481 15253 reg += 8;
43234a1e
L
15254 if (vex.evex)
15255 {
15256 USED_REX (REX_X);
15257 if ((rex & REX_X))
15258 reg += 16;
15259 }
c608c12e 15260
b6169b20 15261 if ((sizeflag & SUFFIX_ALWAYS)
fa99fab2
L
15262 && (bytemode == x_swap_mode
15263 || bytemode == d_swap_mode
7bb15c6f 15264 || bytemode == d_scalar_swap_mode
539f890d
L
15265 || bytemode == q_swap_mode
15266 || bytemode == q_scalar_swap_mode))
b6169b20
L
15267 swap_operand ();
15268
c0f3af97
L
15269 if (need_vex
15270 && bytemode != xmm_mode
6c30d220
L
15271 && bytemode != xmmdw_mode
15272 && bytemode != xmmqd_mode
15273 && bytemode != xmm_mb_mode
15274 && bytemode != xmm_mw_mode
15275 && bytemode != xmm_md_mode
15276 && bytemode != xmm_mq_mode
43234a1e 15277 && bytemode != xmm_mdq_mode
539f890d 15278 && bytemode != xmmq_mode
43234a1e
L
15279 && bytemode != evex_half_bcst_xmmq_mode
15280 && bytemode != ymm_mode
539f890d 15281 && bytemode != d_scalar_mode
7bb15c6f 15282 && bytemode != d_scalar_swap_mode
539f890d 15283 && bytemode != q_scalar_mode
1c480963
L
15284 && bytemode != q_scalar_swap_mode
15285 && bytemode != vex_scalar_w_dq_mode)
c0f3af97
L
15286 {
15287 switch (vex.length)
15288 {
15289 case 128:
b9733481 15290 names = names_xmm;
c0f3af97
L
15291 break;
15292 case 256:
b9733481 15293 names = names_ymm;
c0f3af97 15294 break;
43234a1e
L
15295 case 512:
15296 names = names_zmm;
15297 break;
c0f3af97
L
15298 default:
15299 abort ();
15300 }
15301 }
43234a1e
L
15302 else if (bytemode == xmmq_mode
15303 || bytemode == evex_half_bcst_xmmq_mode)
15304 {
15305 switch (vex.length)
15306 {
15307 case 128:
15308 case 256:
15309 names = names_xmm;
15310 break;
15311 case 512:
15312 names = names_ymm;
15313 break;
15314 default:
15315 abort ();
15316 }
15317 }
15318 else if (bytemode == ymm_mode)
15319 names = names_ymm;
c0f3af97 15320 else
b9733481
L
15321 names = names_xmm;
15322 oappend (names[reg]);
c608c12e
AM
15323}
15324
252b5132 15325static void
26ca5450 15326OP_MS (int bytemode, int sizeflag)
252b5132 15327{
7967e09e 15328 if (modrm.mod == 3)
2da11e11
AM
15329 OP_EM (bytemode, sizeflag);
15330 else
6608db57 15331 BadOp ();
252b5132
RH
15332}
15333
992aaec9 15334static void
26ca5450 15335OP_XS (int bytemode, int sizeflag)
992aaec9 15336{
7967e09e 15337 if (modrm.mod == 3)
992aaec9
AM
15338 OP_EX (bytemode, sizeflag);
15339 else
6608db57 15340 BadOp ();
992aaec9
AM
15341}
15342
cc0ec051
AM
15343static void
15344OP_M (int bytemode, int sizeflag)
15345{
7967e09e 15346 if (modrm.mod == 3)
75413a22
L
15347 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
15348 BadOp ();
cc0ec051
AM
15349 else
15350 OP_E (bytemode, sizeflag);
15351}
15352
15353static void
15354OP_0f07 (int bytemode, int sizeflag)
15355{
7967e09e 15356 if (modrm.mod != 3 || modrm.rm != 0)
cc0ec051
AM
15357 BadOp ();
15358 else
15359 OP_E (bytemode, sizeflag);
15360}
15361
46e883c5 15362/* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
246c51aa 15363 32bit mode and "xchg %rax,%rax" in 64bit mode. */
46e883c5 15364
cc0ec051 15365static void
46e883c5 15366NOP_Fixup1 (int bytemode, int sizeflag)
cc0ec051 15367{
8b38ad71
L
15368 if ((prefixes & PREFIX_DATA) != 0
15369 || (rex != 0
15370 && rex != 0x48
15371 && address_mode == mode_64bit))
46e883c5
L
15372 OP_REG (bytemode, sizeflag);
15373 else
15374 strcpy (obuf, "nop");
15375}
15376
15377static void
15378NOP_Fixup2 (int bytemode, int sizeflag)
15379{
8b38ad71
L
15380 if ((prefixes & PREFIX_DATA) != 0
15381 || (rex != 0
15382 && rex != 0x48
15383 && address_mode == mode_64bit))
46e883c5 15384 OP_IMREG (bytemode, sizeflag);
cc0ec051
AM
15385}
15386
84037f8c 15387static const char *const Suffix3DNow[] = {
252b5132
RH
15388/* 00 */ NULL, NULL, NULL, NULL,
15389/* 04 */ NULL, NULL, NULL, NULL,
15390/* 08 */ NULL, NULL, NULL, NULL,
9e525108 15391/* 0C */ "pi2fw", "pi2fd", NULL, NULL,
252b5132
RH
15392/* 10 */ NULL, NULL, NULL, NULL,
15393/* 14 */ NULL, NULL, NULL, NULL,
15394/* 18 */ NULL, NULL, NULL, NULL,
9e525108 15395/* 1C */ "pf2iw", "pf2id", NULL, NULL,
252b5132
RH
15396/* 20 */ NULL, NULL, NULL, NULL,
15397/* 24 */ NULL, NULL, NULL, NULL,
15398/* 28 */ NULL, NULL, NULL, NULL,
15399/* 2C */ NULL, NULL, NULL, NULL,
15400/* 30 */ NULL, NULL, NULL, NULL,
15401/* 34 */ NULL, NULL, NULL, NULL,
15402/* 38 */ NULL, NULL, NULL, NULL,
15403/* 3C */ NULL, NULL, NULL, NULL,
15404/* 40 */ NULL, NULL, NULL, NULL,
15405/* 44 */ NULL, NULL, NULL, NULL,
15406/* 48 */ NULL, NULL, NULL, NULL,
15407/* 4C */ NULL, NULL, NULL, NULL,
15408/* 50 */ NULL, NULL, NULL, NULL,
15409/* 54 */ NULL, NULL, NULL, NULL,
15410/* 58 */ NULL, NULL, NULL, NULL,
15411/* 5C */ NULL, NULL, NULL, NULL,
15412/* 60 */ NULL, NULL, NULL, NULL,
15413/* 64 */ NULL, NULL, NULL, NULL,
15414/* 68 */ NULL, NULL, NULL, NULL,
15415/* 6C */ NULL, NULL, NULL, NULL,
15416/* 70 */ NULL, NULL, NULL, NULL,
15417/* 74 */ NULL, NULL, NULL, NULL,
15418/* 78 */ NULL, NULL, NULL, NULL,
15419/* 7C */ NULL, NULL, NULL, NULL,
15420/* 80 */ NULL, NULL, NULL, NULL,
15421/* 84 */ NULL, NULL, NULL, NULL,
9e525108
AM
15422/* 88 */ NULL, NULL, "pfnacc", NULL,
15423/* 8C */ NULL, NULL, "pfpnacc", NULL,
252b5132
RH
15424/* 90 */ "pfcmpge", NULL, NULL, NULL,
15425/* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
15426/* 98 */ NULL, NULL, "pfsub", NULL,
15427/* 9C */ NULL, NULL, "pfadd", NULL,
15428/* A0 */ "pfcmpgt", NULL, NULL, NULL,
15429/* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
15430/* A8 */ NULL, NULL, "pfsubr", NULL,
15431/* AC */ NULL, NULL, "pfacc", NULL,
15432/* B0 */ "pfcmpeq", NULL, NULL, NULL,
9beff690 15433/* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
9e525108 15434/* B8 */ NULL, NULL, NULL, "pswapd",
252b5132
RH
15435/* BC */ NULL, NULL, NULL, "pavgusb",
15436/* C0 */ NULL, NULL, NULL, NULL,
15437/* C4 */ NULL, NULL, NULL, NULL,
15438/* C8 */ NULL, NULL, NULL, NULL,
15439/* CC */ NULL, NULL, NULL, NULL,
15440/* D0 */ NULL, NULL, NULL, NULL,
15441/* D4 */ NULL, NULL, NULL, NULL,
15442/* D8 */ NULL, NULL, NULL, NULL,
15443/* DC */ NULL, NULL, NULL, NULL,
15444/* E0 */ NULL, NULL, NULL, NULL,
15445/* E4 */ NULL, NULL, NULL, NULL,
15446/* E8 */ NULL, NULL, NULL, NULL,
15447/* EC */ NULL, NULL, NULL, NULL,
15448/* F0 */ NULL, NULL, NULL, NULL,
15449/* F4 */ NULL, NULL, NULL, NULL,
15450/* F8 */ NULL, NULL, NULL, NULL,
15451/* FC */ NULL, NULL, NULL, NULL,
15452};
15453
15454static void
26ca5450 15455OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132
RH
15456{
15457 const char *mnemonic;
15458
15459 FETCH_DATA (the_info, codep + 1);
15460 /* AMD 3DNow! instructions are specified by an opcode suffix in the
15461 place where an 8-bit immediate would normally go. ie. the last
15462 byte of the instruction. */
ea397f5b 15463 obufp = mnemonicendp;
c608c12e 15464 mnemonic = Suffix3DNow[*codep++ & 0xff];
252b5132 15465 if (mnemonic)
2da11e11 15466 oappend (mnemonic);
252b5132
RH
15467 else
15468 {
15469 /* Since a variable sized modrm/sib chunk is between the start
15470 of the opcode (0x0f0f) and the opcode suffix, we need to do
15471 all the modrm processing first, and don't know until now that
15472 we have a bad opcode. This necessitates some cleaning up. */
ce518a5f
L
15473 op_out[0][0] = '\0';
15474 op_out[1][0] = '\0';
6608db57 15475 BadOp ();
252b5132 15476 }
ea397f5b 15477 mnemonicendp = obufp;
252b5132 15478}
c608c12e 15479
ea397f5b
L
15480static struct op simd_cmp_op[] =
15481{
15482 { STRING_COMMA_LEN ("eq") },
15483 { STRING_COMMA_LEN ("lt") },
15484 { STRING_COMMA_LEN ("le") },
15485 { STRING_COMMA_LEN ("unord") },
15486 { STRING_COMMA_LEN ("neq") },
15487 { STRING_COMMA_LEN ("nlt") },
15488 { STRING_COMMA_LEN ("nle") },
15489 { STRING_COMMA_LEN ("ord") }
c608c12e
AM
15490};
15491
15492static void
ad19981d 15493CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
c608c12e
AM
15494{
15495 unsigned int cmp_type;
15496
15497 FETCH_DATA (the_info, codep + 1);
15498 cmp_type = *codep++ & 0xff;
c0f3af97 15499 if (cmp_type < ARRAY_SIZE (simd_cmp_op))
c608c12e 15500 {
ad19981d 15501 char suffix [3];
ea397f5b 15502 char *p = mnemonicendp - 2;
ad19981d
L
15503 suffix[0] = p[0];
15504 suffix[1] = p[1];
15505 suffix[2] = '\0';
ea397f5b
L
15506 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
15507 mnemonicendp += simd_cmp_op[cmp_type].len;
c608c12e
AM
15508 }
15509 else
15510 {
ad19981d
L
15511 /* We have a reserved extension byte. Output it directly. */
15512 scratchbuf[0] = '$';
15513 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 15514 oappend_maybe_intel (scratchbuf);
ad19981d 15515 scratchbuf[0] = '\0';
c608c12e
AM
15516 }
15517}
15518
9916071f 15519static void
7abb8d81 15520OP_Mwait (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
9916071f 15521{
7abb8d81 15522 /* mwait %eax,%ecx / mwaitx %eax,%ecx,%ebx */
b844680a
L
15523 if (!intel_syntax)
15524 {
081e283f
JB
15525 strcpy (op_out[0], names32[0]);
15526 strcpy (op_out[1], names32[1]);
7abb8d81 15527 if (bytemode == eBX_reg)
081e283f 15528 strcpy (op_out[2], names32[3]);
b844680a
L
15529 two_source_ops = 1;
15530 }
15531 /* Skip mod/rm byte. */
15532 MODRM_CHECK;
15533 codep++;
15534}
15535
15536static void
15537OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
15538 int sizeflag ATTRIBUTE_UNUSED)
ca164297 15539{
081e283f 15540 /* monitor %{e,r,}ax,%ecx,%edx" */
b844680a 15541 if (!intel_syntax)
ca164297 15542 {
cb712a9e
L
15543 const char **names = (address_mode == mode_64bit
15544 ? names64 : names32);
1d9f512f 15545
081e283f 15546 if (prefixes & PREFIX_ADDR)
ca164297 15547 {
b844680a 15548 /* Remove "addr16/addr32". */
f16cd0d5 15549 all_prefixes[last_addr_prefix] = 0;
081e283f
JB
15550 names = (address_mode != mode_32bit
15551 ? names32 : names16);
b844680a 15552 used_prefixes |= PREFIX_ADDR;
ca164297 15553 }
081e283f
JB
15554 else if (address_mode == mode_16bit)
15555 names = names16;
15556 strcpy (op_out[0], names[0]);
15557 strcpy (op_out[1], names32[1]);
15558 strcpy (op_out[2], names32[2]);
b844680a 15559 two_source_ops = 1;
ca164297 15560 }
b844680a
L
15561 /* Skip mod/rm byte. */
15562 MODRM_CHECK;
15563 codep++;
30123838
JB
15564}
15565
6608db57
KH
15566static void
15567BadOp (void)
2da11e11 15568{
6608db57
KH
15569 /* Throw away prefixes and 1st. opcode byte. */
15570 codep = insn_codep + 1;
2da11e11
AM
15571 oappend ("(bad)");
15572}
4cc91dba 15573
35c52694
L
15574static void
15575REP_Fixup (int bytemode, int sizeflag)
15576{
15577 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
15578 lods and stos. */
35c52694 15579 if (prefixes & PREFIX_REPZ)
f16cd0d5 15580 all_prefixes[last_repz_prefix] = REP_PREFIX;
35c52694
L
15581
15582 switch (bytemode)
15583 {
15584 case al_reg:
15585 case eAX_reg:
15586 case indir_dx_reg:
15587 OP_IMREG (bytemode, sizeflag);
15588 break;
15589 case eDI_reg:
15590 OP_ESreg (bytemode, sizeflag);
15591 break;
15592 case eSI_reg:
15593 OP_DSreg (bytemode, sizeflag);
15594 break;
15595 default:
15596 abort ();
15597 break;
15598 }
15599}
f5804c90 15600
7e8b059b
L
15601/* For BND-prefixed instructions 0xF2 prefix should be displayed as
15602 "bnd". */
15603
15604static void
15605BND_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15606{
15607 if (prefixes & PREFIX_REPNZ)
15608 all_prefixes[last_repnz_prefix] = BND_PREFIX;
15609}
15610
04ef582a
L
15611/* For NOTRACK-prefixed instructions, 0x3E prefix should be displayed as
15612 "notrack". */
15613
15614static void
15615NOTRACK_Fixup (int bytemode ATTRIBUTE_UNUSED,
15616 int sizeflag ATTRIBUTE_UNUSED)
15617{
9fef80d6 15618 if (active_seg_prefix == PREFIX_DS
04ef582a
L
15619 && (address_mode != mode_64bit || last_data_prefix < 0))
15620 {
4e9ac44a 15621 /* NOTRACK prefix is only valid on indirect branch instructions.
9fef80d6 15622 NB: DATA prefix is unsupported for Intel64. */
04ef582a
L
15623 active_seg_prefix = 0;
15624 all_prefixes[last_seg_prefix] = NOTRACK_PREFIX;
15625 }
15626}
15627
42164a71
L
15628/* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
15629 "xacquire"/"xrelease" for memory operand if there is a LOCK prefix.
15630 */
15631
15632static void
15633HLE_Fixup1 (int bytemode, int sizeflag)
15634{
15635 if (modrm.mod != 3
15636 && (prefixes & PREFIX_LOCK) != 0)
15637 {
15638 if (prefixes & PREFIX_REPZ)
15639 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15640 if (prefixes & PREFIX_REPNZ)
15641 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
15642 }
15643
15644 OP_E (bytemode, sizeflag);
15645}
15646
15647/* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
15648 "xacquire"/"xrelease" for memory operand. No check for LOCK prefix.
15649 */
15650
15651static void
15652HLE_Fixup2 (int bytemode, int sizeflag)
15653{
15654 if (modrm.mod != 3)
15655 {
15656 if (prefixes & PREFIX_REPZ)
15657 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15658 if (prefixes & PREFIX_REPNZ)
15659 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
15660 }
15661
15662 OP_E (bytemode, sizeflag);
15663}
15664
15665/* Similar to OP_E. But the 0xf3 prefixes should be displayed as
15666 "xrelease" for memory operand. No check for LOCK prefix. */
15667
15668static void
15669HLE_Fixup3 (int bytemode, int sizeflag)
15670{
15671 if (modrm.mod != 3
15672 && last_repz_prefix > last_repnz_prefix
15673 && (prefixes & PREFIX_REPZ) != 0)
15674 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15675
15676 OP_E (bytemode, sizeflag);
15677}
15678
f5804c90
L
15679static void
15680CMPXCHG8B_Fixup (int bytemode, int sizeflag)
15681{
161a04f6
L
15682 USED_REX (REX_W);
15683 if (rex & REX_W)
f5804c90
L
15684 {
15685 /* Change cmpxchg8b to cmpxchg16b. */
ea397f5b
L
15686 char *p = mnemonicendp - 2;
15687 mnemonicendp = stpcpy (p, "16b");
fb9c77c7 15688 bytemode = o_mode;
f5804c90 15689 }
42164a71
L
15690 else if ((prefixes & PREFIX_LOCK) != 0)
15691 {
15692 if (prefixes & PREFIX_REPZ)
15693 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15694 if (prefixes & PREFIX_REPNZ)
15695 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
15696 }
15697
f5804c90
L
15698 OP_M (bytemode, sizeflag);
15699}
42903f7f
L
15700
15701static void
15702XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
15703{
b9733481
L
15704 const char **names;
15705
c0f3af97
L
15706 if (need_vex)
15707 {
15708 switch (vex.length)
15709 {
15710 case 128:
b9733481 15711 names = names_xmm;
c0f3af97
L
15712 break;
15713 case 256:
b9733481 15714 names = names_ymm;
c0f3af97
L
15715 break;
15716 default:
15717 abort ();
15718 }
15719 }
15720 else
b9733481
L
15721 names = names_xmm;
15722 oappend (names[reg]);
42903f7f 15723}
381d071f
L
15724
15725static void
15726CRC32_Fixup (int bytemode, int sizeflag)
15727{
15728 /* Add proper suffix to "crc32". */
ea397f5b 15729 char *p = mnemonicendp;
381d071f
L
15730
15731 switch (bytemode)
15732 {
15733 case b_mode:
20592a94 15734 if (intel_syntax)
ea397f5b 15735 goto skip;
20592a94 15736
381d071f
L
15737 *p++ = 'b';
15738 break;
15739 case v_mode:
20592a94 15740 if (intel_syntax)
ea397f5b 15741 goto skip;
20592a94 15742
381d071f
L
15743 USED_REX (REX_W);
15744 if (rex & REX_W)
15745 *p++ = 'q';
7bb15c6f 15746 else
f16cd0d5
L
15747 {
15748 if (sizeflag & DFLAG)
15749 *p++ = 'l';
15750 else
15751 *p++ = 'w';
15752 used_prefixes |= (prefixes & PREFIX_DATA);
15753 }
381d071f
L
15754 break;
15755 default:
15756 oappend (INTERNAL_DISASSEMBLER_ERROR);
15757 break;
15758 }
ea397f5b 15759 mnemonicendp = p;
381d071f
L
15760 *p = '\0';
15761
ea397f5b 15762skip:
381d071f
L
15763 if (modrm.mod == 3)
15764 {
15765 int add;
15766
15767 /* Skip mod/rm byte. */
15768 MODRM_CHECK;
15769 codep++;
15770
15771 USED_REX (REX_B);
15772 add = (rex & REX_B) ? 8 : 0;
15773 if (bytemode == b_mode)
15774 {
15775 USED_REX (0);
15776 if (rex)
15777 oappend (names8rex[modrm.rm + add]);
15778 else
15779 oappend (names8[modrm.rm + add]);
15780 }
15781 else
15782 {
15783 USED_REX (REX_W);
15784 if (rex & REX_W)
15785 oappend (names64[modrm.rm + add]);
15786 else if ((prefixes & PREFIX_DATA))
15787 oappend (names16[modrm.rm + add]);
15788 else
15789 oappend (names32[modrm.rm + add]);
15790 }
15791 }
15792 else
9344ff29 15793 OP_E (bytemode, sizeflag);
381d071f 15794}
85f10a01 15795
eacc9c89
L
15796static void
15797FXSAVE_Fixup (int bytemode, int sizeflag)
15798{
15799 /* Add proper suffix to "fxsave" and "fxrstor". */
15800 USED_REX (REX_W);
15801 if (rex & REX_W)
15802 {
15803 char *p = mnemonicendp;
15804 *p++ = '6';
15805 *p++ = '4';
15806 *p = '\0';
15807 mnemonicendp = p;
15808 }
15809 OP_M (bytemode, sizeflag);
15810}
15811
15c7c1d8
JB
15812static void
15813PCMPESTR_Fixup (int bytemode, int sizeflag)
15814{
15815 /* Add proper suffix to "{,v}pcmpestr{i,m}". */
15816 if (!intel_syntax)
15817 {
15818 char *p = mnemonicendp;
15819
15820 USED_REX (REX_W);
15821 if (rex & REX_W)
15822 *p++ = 'q';
15823 else if (sizeflag & SUFFIX_ALWAYS)
15824 *p++ = 'l';
15825
15826 *p = '\0';
15827 mnemonicendp = p;
15828 }
15829
15830 OP_EX (bytemode, sizeflag);
15831}
15832
c0f3af97
L
15833/* Display the destination register operand for instructions with
15834 VEX. */
15835
15836static void
15837OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
15838{
539f890d 15839 int reg;
b9733481
L
15840 const char **names;
15841
c0f3af97
L
15842 if (!need_vex)
15843 abort ();
15844
15845 if (!need_vex_reg)
15846 return;
15847
539f890d 15848 reg = vex.register_specifier;
63c6fc6c 15849 vex.register_specifier = 0;
5f847646
JB
15850 if (address_mode != mode_64bit)
15851 reg &= 7;
15852 else if (vex.evex && !vex.v)
15853 reg += 16;
43234a1e 15854
539f890d
L
15855 if (bytemode == vex_scalar_mode)
15856 {
15857 oappend (names_xmm[reg]);
15858 return;
15859 }
15860
c0f3af97
L
15861 switch (vex.length)
15862 {
15863 case 128:
15864 switch (bytemode)
15865 {
15866 case vex_mode:
15867 case vex128_mode:
6c30d220 15868 case vex_vsib_q_w_dq_mode:
5fc35d96 15869 case vex_vsib_q_w_d_mode:
cb21baef
L
15870 names = names_xmm;
15871 break;
15872 case dq_mode:
390a6789 15873 if (rex & REX_W)
cb21baef
L
15874 names = names64;
15875 else
15876 names = names32;
c0f3af97 15877 break;
1ba585e8 15878 case mask_bd_mode:
43234a1e 15879 case mask_mode:
9889cbb1
L
15880 if (reg > 0x7)
15881 {
15882 oappend ("(bad)");
15883 return;
15884 }
43234a1e
L
15885 names = names_mask;
15886 break;
c0f3af97
L
15887 default:
15888 abort ();
15889 return;
15890 }
c0f3af97
L
15891 break;
15892 case 256:
15893 switch (bytemode)
15894 {
15895 case vex_mode:
15896 case vex256_mode:
6c30d220
L
15897 names = names_ymm;
15898 break;
15899 case vex_vsib_q_w_dq_mode:
5fc35d96 15900 case vex_vsib_q_w_d_mode:
6c30d220 15901 names = vex.w ? names_ymm : names_xmm;
c0f3af97 15902 break;
1ba585e8 15903 case mask_bd_mode:
43234a1e 15904 case mask_mode:
9889cbb1
L
15905 if (reg > 0x7)
15906 {
15907 oappend ("(bad)");
15908 return;
15909 }
43234a1e
L
15910 names = names_mask;
15911 break;
c0f3af97 15912 default:
a37a2806
NC
15913 /* See PR binutils/20893 for a reproducer. */
15914 oappend ("(bad)");
c0f3af97
L
15915 return;
15916 }
c0f3af97 15917 break;
43234a1e
L
15918 case 512:
15919 names = names_zmm;
15920 break;
c0f3af97
L
15921 default:
15922 abort ();
15923 break;
15924 }
539f890d 15925 oappend (names[reg]);
c0f3af97
L
15926}
15927
922d8de8
DR
15928/* Get the VEX immediate byte without moving codep. */
15929
15930static unsigned char
ccc5981b 15931get_vex_imm8 (int sizeflag, int opnum)
922d8de8
DR
15932{
15933 int bytes_before_imm = 0;
15934
922d8de8
DR
15935 if (modrm.mod != 3)
15936 {
15937 /* There are SIB/displacement bytes. */
15938 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
6c067bbb 15939 {
922d8de8 15940 /* 32/64 bit address mode */
6c067bbb 15941 int base = modrm.rm;
922d8de8
DR
15942
15943 /* Check SIB byte. */
6c067bbb
RM
15944 if (base == 4)
15945 {
15946 FETCH_DATA (the_info, codep + 1);
15947 base = *codep & 7;
15948 /* When decoding the third source, don't increase
15949 bytes_before_imm as this has already been incremented
15950 by one in OP_E_memory while decoding the second
15951 source operand. */
15952 if (opnum == 0)
15953 bytes_before_imm++;
15954 }
15955
15956 /* Don't increase bytes_before_imm when decoding the third source,
15957 it has already been incremented by OP_E_memory while decoding
15958 the second source operand. */
15959 if (opnum == 0)
15960 {
15961 switch (modrm.mod)
15962 {
15963 case 0:
15964 /* When modrm.rm == 5 or modrm.rm == 4 and base in
15965 SIB == 5, there is a 4 byte displacement. */
15966 if (base != 5)
15967 /* No displacement. */
15968 break;
1a0670f3 15969 /* Fall through. */
6c067bbb
RM
15970 case 2:
15971 /* 4 byte displacement. */
15972 bytes_before_imm += 4;
15973 break;
15974 case 1:
15975 /* 1 byte displacement. */
15976 bytes_before_imm++;
15977 break;
15978 }
15979 }
15980 }
922d8de8 15981 else
02e647f9
SP
15982 {
15983 /* 16 bit address mode */
6c067bbb
RM
15984 /* Don't increase bytes_before_imm when decoding the third source,
15985 it has already been incremented by OP_E_memory while decoding
15986 the second source operand. */
15987 if (opnum == 0)
15988 {
02e647f9
SP
15989 switch (modrm.mod)
15990 {
15991 case 0:
15992 /* When modrm.rm == 6, there is a 2 byte displacement. */
15993 if (modrm.rm != 6)
15994 /* No displacement. */
15995 break;
1a0670f3 15996 /* Fall through. */
02e647f9
SP
15997 case 2:
15998 /* 2 byte displacement. */
15999 bytes_before_imm += 2;
16000 break;
16001 case 1:
16002 /* 1 byte displacement: when decoding the third source,
16003 don't increase bytes_before_imm as this has already
16004 been incremented by one in OP_E_memory while decoding
16005 the second source operand. */
16006 if (opnum == 0)
16007 bytes_before_imm++;
ccc5981b 16008
02e647f9
SP
16009 break;
16010 }
922d8de8
DR
16011 }
16012 }
16013 }
16014
16015 FETCH_DATA (the_info, codep + bytes_before_imm + 1);
16016 return codep [bytes_before_imm];
16017}
16018
16019static void
16020OP_EX_VexReg (int bytemode, int sizeflag, int reg)
16021{
b9733481
L
16022 const char **names;
16023
922d8de8
DR
16024 if (reg == -1 && modrm.mod != 3)
16025 {
16026 OP_E_memory (bytemode, sizeflag);
16027 return;
16028 }
16029 else
16030 {
16031 if (reg == -1)
16032 {
16033 reg = modrm.rm;
16034 USED_REX (REX_B);
16035 if (rex & REX_B)
16036 reg += 8;
16037 }
5f847646
JB
16038 if (address_mode != mode_64bit)
16039 reg &= 7;
922d8de8
DR
16040 }
16041
16042 switch (vex.length)
16043 {
16044 case 128:
b9733481 16045 names = names_xmm;
922d8de8
DR
16046 break;
16047 case 256:
b9733481 16048 names = names_ymm;
922d8de8
DR
16049 break;
16050 default:
16051 abort ();
16052 }
b9733481 16053 oappend (names[reg]);
922d8de8
DR
16054}
16055
a683cc34
SP
16056static void
16057OP_EX_VexImmW (int bytemode, int sizeflag)
16058{
16059 int reg = -1;
16060 static unsigned char vex_imm8;
16061
16062 if (vex_w_done == 0)
16063 {
16064 vex_w_done = 1;
16065
16066 /* Skip mod/rm byte. */
16067 MODRM_CHECK;
16068 codep++;
16069
16070 vex_imm8 = get_vex_imm8 (sizeflag, 0);
16071
16072 if (vex.w)
16073 reg = vex_imm8 >> 4;
16074
16075 OP_EX_VexReg (bytemode, sizeflag, reg);
16076 }
16077 else if (vex_w_done == 1)
16078 {
16079 vex_w_done = 2;
16080
16081 if (!vex.w)
16082 reg = vex_imm8 >> 4;
16083
16084 OP_EX_VexReg (bytemode, sizeflag, reg);
16085 }
16086 else
16087 {
16088 /* Output the imm8 directly. */
16089 scratchbuf[0] = '$';
16090 print_operand_value (scratchbuf + 1, 1, vex_imm8 & 0xf);
9ce09ba2 16091 oappend_maybe_intel (scratchbuf);
a683cc34
SP
16092 scratchbuf[0] = '\0';
16093 codep++;
16094 }
16095}
16096
5dd85c99
SP
16097static void
16098OP_Vex_2src (int bytemode, int sizeflag)
16099{
16100 if (modrm.mod == 3)
16101 {
b9733481 16102 int reg = modrm.rm;
5dd85c99 16103 USED_REX (REX_B);
b9733481
L
16104 if (rex & REX_B)
16105 reg += 8;
16106 oappend (names_xmm[reg]);
5dd85c99
SP
16107 }
16108 else
16109 {
16110 if (intel_syntax
16111 && (bytemode == v_mode || bytemode == v_swap_mode))
16112 {
16113 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
16114 used_prefixes |= (prefixes & PREFIX_DATA);
16115 }
16116 OP_E (bytemode, sizeflag);
16117 }
16118}
16119
16120static void
16121OP_Vex_2src_1 (int bytemode, int sizeflag)
16122{
16123 if (modrm.mod == 3)
16124 {
16125 /* Skip mod/rm byte. */
16126 MODRM_CHECK;
16127 codep++;
16128 }
16129
16130 if (vex.w)
5f847646
JB
16131 {
16132 unsigned int reg = vex.register_specifier;
63c6fc6c 16133 vex.register_specifier = 0;
5f847646
JB
16134
16135 if (address_mode != mode_64bit)
16136 reg &= 7;
16137 oappend (names_xmm[reg]);
16138 }
5dd85c99
SP
16139 else
16140 OP_Vex_2src (bytemode, sizeflag);
16141}
16142
16143static void
16144OP_Vex_2src_2 (int bytemode, int sizeflag)
16145{
16146 if (vex.w)
16147 OP_Vex_2src (bytemode, sizeflag);
16148 else
5f847646
JB
16149 {
16150 unsigned int reg = vex.register_specifier;
63c6fc6c 16151 vex.register_specifier = 0;
5f847646
JB
16152
16153 if (address_mode != mode_64bit)
16154 reg &= 7;
16155 oappend (names_xmm[reg]);
16156 }
5dd85c99
SP
16157}
16158
922d8de8
DR
16159static void
16160OP_EX_VexW (int bytemode, int sizeflag)
16161{
16162 int reg = -1;
16163
16164 if (!vex_w_done)
16165 {
41effecb
SP
16166 /* Skip mod/rm byte. */
16167 MODRM_CHECK;
16168 codep++;
16169
922d8de8 16170 if (vex.w)
ccc5981b 16171 reg = get_vex_imm8 (sizeflag, 0) >> 4;
922d8de8
DR
16172 }
16173 else
16174 {
16175 if (!vex.w)
ccc5981b 16176 reg = get_vex_imm8 (sizeflag, 1) >> 4;
922d8de8
DR
16177 }
16178
16179 OP_EX_VexReg (bytemode, sizeflag, reg);
922d8de8 16180
3a2430e0
JB
16181 if (vex_w_done)
16182 codep++;
16183 vex_w_done = 1;
922d8de8
DR
16184}
16185
c0f3af97
L
16186static void
16187OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16188{
16189 int reg;
b9733481
L
16190 const char **names;
16191
c0f3af97
L
16192 FETCH_DATA (the_info, codep + 1);
16193 reg = *codep++;
16194
16195 if (bytemode != x_mode)
16196 abort ();
16197
c0f3af97 16198 reg >>= 4;
5f847646
JB
16199 if (address_mode != mode_64bit)
16200 reg &= 7;
dae39acc 16201
c0f3af97
L
16202 switch (vex.length)
16203 {
16204 case 128:
b9733481 16205 names = names_xmm;
c0f3af97
L
16206 break;
16207 case 256:
b9733481 16208 names = names_ymm;
c0f3af97
L
16209 break;
16210 default:
16211 abort ();
16212 }
b9733481 16213 oappend (names[reg]);
c0f3af97
L
16214}
16215
922d8de8
DR
16216static void
16217OP_XMM_VexW (int bytemode, int sizeflag)
16218{
16219 /* Turn off the REX.W bit since it is used for swapping operands
16220 now. */
16221 rex &= ~REX_W;
16222 OP_XMM (bytemode, sizeflag);
16223}
16224
c0f3af97
L
16225static void
16226OP_EX_Vex (int bytemode, int sizeflag)
16227{
16228 if (modrm.mod != 3)
63c6fc6c 16229 need_vex_reg = 0;
c0f3af97
L
16230 OP_EX (bytemode, sizeflag);
16231}
16232
16233static void
16234OP_XMM_Vex (int bytemode, int sizeflag)
16235{
16236 if (modrm.mod != 3)
63c6fc6c 16237 need_vex_reg = 0;
c0f3af97
L
16238 OP_XMM (bytemode, sizeflag);
16239}
16240
ea397f5b
L
16241static struct op vex_cmp_op[] =
16242{
16243 { STRING_COMMA_LEN ("eq") },
16244 { STRING_COMMA_LEN ("lt") },
16245 { STRING_COMMA_LEN ("le") },
16246 { STRING_COMMA_LEN ("unord") },
16247 { STRING_COMMA_LEN ("neq") },
16248 { STRING_COMMA_LEN ("nlt") },
16249 { STRING_COMMA_LEN ("nle") },
16250 { STRING_COMMA_LEN ("ord") },
16251 { STRING_COMMA_LEN ("eq_uq") },
16252 { STRING_COMMA_LEN ("nge") },
16253 { STRING_COMMA_LEN ("ngt") },
16254 { STRING_COMMA_LEN ("false") },
16255 { STRING_COMMA_LEN ("neq_oq") },
16256 { STRING_COMMA_LEN ("ge") },
16257 { STRING_COMMA_LEN ("gt") },
16258 { STRING_COMMA_LEN ("true") },
16259 { STRING_COMMA_LEN ("eq_os") },
16260 { STRING_COMMA_LEN ("lt_oq") },
16261 { STRING_COMMA_LEN ("le_oq") },
16262 { STRING_COMMA_LEN ("unord_s") },
16263 { STRING_COMMA_LEN ("neq_us") },
16264 { STRING_COMMA_LEN ("nlt_uq") },
16265 { STRING_COMMA_LEN ("nle_uq") },
16266 { STRING_COMMA_LEN ("ord_s") },
16267 { STRING_COMMA_LEN ("eq_us") },
16268 { STRING_COMMA_LEN ("nge_uq") },
16269 { STRING_COMMA_LEN ("ngt_uq") },
16270 { STRING_COMMA_LEN ("false_os") },
16271 { STRING_COMMA_LEN ("neq_os") },
16272 { STRING_COMMA_LEN ("ge_oq") },
16273 { STRING_COMMA_LEN ("gt_oq") },
16274 { STRING_COMMA_LEN ("true_us") },
c0f3af97
L
16275};
16276
16277static void
16278VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16279{
16280 unsigned int cmp_type;
16281
16282 FETCH_DATA (the_info, codep + 1);
16283 cmp_type = *codep++ & 0xff;
16284 if (cmp_type < ARRAY_SIZE (vex_cmp_op))
16285 {
16286 char suffix [3];
ea397f5b 16287 char *p = mnemonicendp - 2;
c0f3af97
L
16288 suffix[0] = p[0];
16289 suffix[1] = p[1];
16290 suffix[2] = '\0';
ea397f5b
L
16291 sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
16292 mnemonicendp += vex_cmp_op[cmp_type].len;
c0f3af97
L
16293 }
16294 else
16295 {
16296 /* We have a reserved extension byte. Output it directly. */
16297 scratchbuf[0] = '$';
16298 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 16299 oappend_maybe_intel (scratchbuf);
c0f3af97
L
16300 scratchbuf[0] = '\0';
16301 }
16302}
16303
43234a1e
L
16304static void
16305VPCMP_Fixup (int bytemode ATTRIBUTE_UNUSED,
16306 int sizeflag ATTRIBUTE_UNUSED)
16307{
16308 unsigned int cmp_type;
16309
16310 if (!vex.evex)
16311 abort ();
16312
16313 FETCH_DATA (the_info, codep + 1);
16314 cmp_type = *codep++ & 0xff;
16315 /* There are aliases for immediates 0, 1, 2, 4, 5, 6.
16316 If it's the case, print suffix, otherwise - print the immediate. */
16317 if (cmp_type < ARRAY_SIZE (simd_cmp_op)
16318 && cmp_type != 3
16319 && cmp_type != 7)
16320 {
16321 char suffix [3];
16322 char *p = mnemonicendp - 2;
16323
16324 /* vpcmp* can have both one- and two-lettered suffix. */
16325 if (p[0] == 'p')
16326 {
16327 p++;
16328 suffix[0] = p[0];
16329 suffix[1] = '\0';
16330 }
16331 else
16332 {
16333 suffix[0] = p[0];
16334 suffix[1] = p[1];
16335 suffix[2] = '\0';
16336 }
16337
16338 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
16339 mnemonicendp += simd_cmp_op[cmp_type].len;
16340 }
be92cb14
JB
16341 else
16342 {
16343 /* We have a reserved extension byte. Output it directly. */
16344 scratchbuf[0] = '$';
16345 print_operand_value (scratchbuf + 1, 1, cmp_type);
16346 oappend_maybe_intel (scratchbuf);
16347 scratchbuf[0] = '\0';
16348 }
16349}
16350
16351static const struct op xop_cmp_op[] =
16352{
16353 { STRING_COMMA_LEN ("lt") },
16354 { STRING_COMMA_LEN ("le") },
16355 { STRING_COMMA_LEN ("gt") },
16356 { STRING_COMMA_LEN ("ge") },
16357 { STRING_COMMA_LEN ("eq") },
16358 { STRING_COMMA_LEN ("neq") },
16359 { STRING_COMMA_LEN ("false") },
16360 { STRING_COMMA_LEN ("true") }
16361};
16362
16363static void
16364VPCOM_Fixup (int bytemode ATTRIBUTE_UNUSED,
16365 int sizeflag ATTRIBUTE_UNUSED)
16366{
16367 unsigned int cmp_type;
16368
16369 FETCH_DATA (the_info, codep + 1);
16370 cmp_type = *codep++ & 0xff;
16371 if (cmp_type < ARRAY_SIZE (xop_cmp_op))
16372 {
16373 char suffix[3];
16374 char *p = mnemonicendp - 2;
16375
16376 /* vpcom* can have both one- and two-lettered suffix. */
16377 if (p[0] == 'm')
16378 {
16379 p++;
16380 suffix[0] = p[0];
16381 suffix[1] = '\0';
16382 }
16383 else
16384 {
16385 suffix[0] = p[0];
16386 suffix[1] = p[1];
16387 suffix[2] = '\0';
16388 }
16389
16390 sprintf (p, "%s%s", xop_cmp_op[cmp_type].name, suffix);
16391 mnemonicendp += xop_cmp_op[cmp_type].len;
16392 }
43234a1e
L
16393 else
16394 {
16395 /* We have a reserved extension byte. Output it directly. */
16396 scratchbuf[0] = '$';
16397 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 16398 oappend_maybe_intel (scratchbuf);
43234a1e
L
16399 scratchbuf[0] = '\0';
16400 }
16401}
16402
ea397f5b
L
16403static const struct op pclmul_op[] =
16404{
16405 { STRING_COMMA_LEN ("lql") },
16406 { STRING_COMMA_LEN ("hql") },
16407 { STRING_COMMA_LEN ("lqh") },
16408 { STRING_COMMA_LEN ("hqh") }
c0f3af97
L
16409};
16410
16411static void
16412PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
16413 int sizeflag ATTRIBUTE_UNUSED)
16414{
16415 unsigned int pclmul_type;
16416
16417 FETCH_DATA (the_info, codep + 1);
16418 pclmul_type = *codep++ & 0xff;
16419 switch (pclmul_type)
16420 {
16421 case 0x10:
16422 pclmul_type = 2;
16423 break;
16424 case 0x11:
16425 pclmul_type = 3;
16426 break;
16427 default:
16428 break;
7bb15c6f 16429 }
c0f3af97
L
16430 if (pclmul_type < ARRAY_SIZE (pclmul_op))
16431 {
16432 char suffix [4];
ea397f5b 16433 char *p = mnemonicendp - 3;
c0f3af97
L
16434 suffix[0] = p[0];
16435 suffix[1] = p[1];
16436 suffix[2] = p[2];
16437 suffix[3] = '\0';
ea397f5b
L
16438 sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
16439 mnemonicendp += pclmul_op[pclmul_type].len;
c0f3af97
L
16440 }
16441 else
16442 {
16443 /* We have a reserved extension byte. Output it directly. */
16444 scratchbuf[0] = '$';
16445 print_operand_value (scratchbuf + 1, 1, pclmul_type);
9ce09ba2 16446 oappend_maybe_intel (scratchbuf);
c0f3af97
L
16447 scratchbuf[0] = '\0';
16448 }
16449}
16450
f1f8f695
L
16451static void
16452MOVBE_Fixup (int bytemode, int sizeflag)
16453{
16454 /* Add proper suffix to "movbe". */
ea397f5b 16455 char *p = mnemonicendp;
f1f8f695
L
16456
16457 switch (bytemode)
16458 {
16459 case v_mode:
16460 if (intel_syntax)
ea397f5b 16461 goto skip;
f1f8f695
L
16462
16463 USED_REX (REX_W);
16464 if (sizeflag & SUFFIX_ALWAYS)
16465 {
16466 if (rex & REX_W)
16467 *p++ = 'q';
f1f8f695 16468 else
f16cd0d5
L
16469 {
16470 if (sizeflag & DFLAG)
16471 *p++ = 'l';
16472 else
16473 *p++ = 'w';
16474 used_prefixes |= (prefixes & PREFIX_DATA);
16475 }
f1f8f695 16476 }
f1f8f695
L
16477 break;
16478 default:
16479 oappend (INTERNAL_DISASSEMBLER_ERROR);
16480 break;
16481 }
ea397f5b 16482 mnemonicendp = p;
f1f8f695
L
16483 *p = '\0';
16484
ea397f5b 16485skip:
f1f8f695
L
16486 OP_M (bytemode, sizeflag);
16487}
f88c9eb0
SP
16488
16489static void
16490OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16491{
16492 int reg;
16493 const char **names;
16494
16495 /* Skip mod/rm byte. */
16496 MODRM_CHECK;
16497 codep++;
16498
390a6789 16499 if (rex & REX_W)
f88c9eb0 16500 names = names64;
f88c9eb0 16501 else
ce7d077e 16502 names = names32;
f88c9eb0
SP
16503
16504 reg = modrm.rm;
16505 USED_REX (REX_B);
16506 if (rex & REX_B)
16507 reg += 8;
16508
16509 oappend (names[reg]);
16510}
16511
16512static void
16513OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16514{
16515 const char **names;
5f847646 16516 unsigned int reg = vex.register_specifier;
63c6fc6c 16517 vex.register_specifier = 0;
f88c9eb0 16518
390a6789 16519 if (rex & REX_W)
f88c9eb0 16520 names = names64;
f88c9eb0 16521 else
ce7d077e 16522 names = names32;
f88c9eb0 16523
5f847646
JB
16524 if (address_mode != mode_64bit)
16525 reg &= 7;
16526 oappend (names[reg]);
f88c9eb0 16527}
43234a1e
L
16528
16529static void
16530OP_Mask (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16531{
16532 if (!vex.evex
1ba585e8 16533 || (bytemode != mask_mode && bytemode != mask_bd_mode))
43234a1e
L
16534 abort ();
16535
16536 USED_REX (REX_R);
16537 if ((rex & REX_R) != 0 || !vex.r)
16538 {
16539 BadOp ();
16540 return;
16541 }
16542
16543 oappend (names_mask [modrm.reg]);
16544}
16545
16546static void
16547OP_Rounding (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16548{
16549 if (!vex.evex
16550 || (bytemode != evex_rounding_mode
70df6fc9 16551 && bytemode != evex_rounding_64_mode
43234a1e
L
16552 && bytemode != evex_sae_mode))
16553 abort ();
16554 if (modrm.mod == 3 && vex.b)
16555 switch (bytemode)
16556 {
70df6fc9
L
16557 case evex_rounding_64_mode:
16558 if (address_mode != mode_64bit)
16559 {
16560 oappend ("(bad)");
16561 break;
16562 }
16563 /* Fall through. */
43234a1e
L
16564 case evex_rounding_mode:
16565 oappend (names_rounding[vex.ll]);
16566 break;
16567 case evex_sae_mode:
16568 oappend ("{sae}");
16569 break;
16570 default:
16571 break;
16572 }
16573}
This page took 2.606324 seconds and 4 git commands to generate.