i386-dis: Check valid bnd register
[deliverable/binutils-gdb.git] / opcodes / i386-dis.c
CommitLineData
252b5132 1/* Print i386 instructions for GDB, the GNU debugger.
2571583a 2 Copyright (C) 1988-2017 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);
922d8de8 98static void VEXI4_Fixup (int, int);
c0f3af97
L
99static void VZERO_Fixup (int, int);
100static void VCMP_Fixup (int, int);
43234a1e 101static void VPCMP_Fixup (int, int);
cc0ec051 102static void OP_0f07 (int, int);
b844680a
L
103static void OP_Monitor (int, int);
104static void OP_Mwait (int, int);
9916071f 105static void OP_Mwaitx (int, int);
46e883c5
L
106static void NOP_Fixup1 (int, int);
107static void NOP_Fixup2 (int, int);
26ca5450 108static void OP_3DNowSuffix (int, int);
ad19981d 109static void CMP_Fixup (int, int);
26ca5450 110static void BadOp (void);
35c52694 111static void REP_Fixup (int, int);
7e8b059b 112static void BND_Fixup (int, int);
04ef582a 113static void NOTRACK_Fixup (int, int);
42164a71
L
114static void HLE_Fixup1 (int, int);
115static void HLE_Fixup2 (int, int);
116static void HLE_Fixup3 (int, int);
f5804c90 117static void CMPXCHG8B_Fixup (int, int);
42903f7f 118static void XMM_Fixup (int, int);
381d071f 119static void CRC32_Fixup (int, int);
eacc9c89 120static void FXSAVE_Fixup (int, int);
15c7c1d8 121static void PCMPESTR_Fixup (int, int);
f88c9eb0
SP
122static void OP_LWPCB_E (int, int);
123static void OP_LWP_E (int, int);
5dd85c99
SP
124static void OP_Vex_2src_1 (int, int);
125static void OP_Vex_2src_2 (int, int);
c1e679ec 126
f1f8f695 127static void MOVBE_Fixup (int, int);
252b5132 128
43234a1e
L
129static void OP_Mask (int, int);
130
6608db57 131struct dis_private {
252b5132
RH
132 /* Points to first byte not fetched. */
133 bfd_byte *max_fetched;
0b1cf022 134 bfd_byte the_buffer[MAX_MNEM_SIZE];
252b5132 135 bfd_vma insn_start;
e396998b 136 int orig_sizeflag;
8df14d78 137 OPCODES_SIGJMP_BUF bailout;
252b5132
RH
138};
139
cb712a9e
L
140enum address_mode
141{
142 mode_16bit,
143 mode_32bit,
144 mode_64bit
145};
146
147enum address_mode address_mode;
52b15da3 148
5076851f
ILT
149/* Flags for the prefixes for the current instruction. See below. */
150static int prefixes;
151
52b15da3
JH
152/* REX prefix the current instruction. See below. */
153static int rex;
154/* Bits of REX we've already used. */
155static int rex_used;
d869730d 156/* REX bits in original REX prefix ignored. */
c0f3af97 157static int rex_ignored;
52b15da3
JH
158/* Mark parts used in the REX prefix. When we are testing for
159 empty prefix (for 8bit register REX extension), just mask it
160 out. Otherwise test for REX bit is excuse for existence of REX
161 only in case value is nonzero. */
162#define USED_REX(value) \
163 { \
164 if (value) \
161a04f6
L
165 { \
166 if ((rex & value)) \
167 rex_used |= (value) | REX_OPCODE; \
168 } \
52b15da3 169 else \
161a04f6 170 rex_used |= REX_OPCODE; \
52b15da3
JH
171 }
172
7d421014
ILT
173/* Flags for prefixes which we somehow handled when printing the
174 current instruction. */
175static int used_prefixes;
176
5076851f
ILT
177/* Flags stored in PREFIXES. */
178#define PREFIX_REPZ 1
179#define PREFIX_REPNZ 2
180#define PREFIX_LOCK 4
181#define PREFIX_CS 8
182#define PREFIX_SS 0x10
183#define PREFIX_DS 0x20
184#define PREFIX_ES 0x40
185#define PREFIX_FS 0x80
186#define PREFIX_GS 0x100
187#define PREFIX_DATA 0x200
188#define PREFIX_ADDR 0x400
189#define PREFIX_FWAIT 0x800
190
252b5132
RH
191/* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
192 to ADDR (exclusive) are valid. Returns 1 for success, longjmps
193 on error. */
194#define FETCH_DATA(info, addr) \
6608db57 195 ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
252b5132
RH
196 ? 1 : fetch_data ((info), (addr)))
197
198static int
26ca5450 199fetch_data (struct disassemble_info *info, bfd_byte *addr)
252b5132
RH
200{
201 int status;
6608db57 202 struct dis_private *priv = (struct dis_private *) info->private_data;
252b5132
RH
203 bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
204
0b1cf022 205 if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
272c9217
JB
206 status = (*info->read_memory_func) (start,
207 priv->max_fetched,
208 addr - priv->max_fetched,
209 info);
210 else
211 status = -1;
252b5132
RH
212 if (status != 0)
213 {
7d421014 214 /* If we did manage to read at least one byte, then
db6eb5be
AM
215 print_insn_i386 will do something sensible. Otherwise, print
216 an error. We do that here because this is where we know
217 STATUS. */
7d421014 218 if (priv->max_fetched == priv->the_buffer)
5076851f 219 (*info->memory_error_func) (status, start, info);
8df14d78 220 OPCODES_SIGLONGJMP (priv->bailout, 1);
252b5132
RH
221 }
222 else
223 priv->max_fetched = addr;
224 return 1;
225}
226
bf890a93 227/* Possible values for prefix requirement. */
507bd325
L
228#define PREFIX_IGNORED_SHIFT 16
229#define PREFIX_IGNORED_REPZ (PREFIX_REPZ << PREFIX_IGNORED_SHIFT)
230#define PREFIX_IGNORED_REPNZ (PREFIX_REPNZ << PREFIX_IGNORED_SHIFT)
231#define PREFIX_IGNORED_DATA (PREFIX_DATA << PREFIX_IGNORED_SHIFT)
232#define PREFIX_IGNORED_ADDR (PREFIX_ADDR << PREFIX_IGNORED_SHIFT)
233#define PREFIX_IGNORED_LOCK (PREFIX_LOCK << PREFIX_IGNORED_SHIFT)
234
235/* Opcode prefixes. */
236#define PREFIX_OPCODE (PREFIX_REPZ \
237 | PREFIX_REPNZ \
238 | PREFIX_DATA)
239
240/* Prefixes ignored. */
241#define PREFIX_IGNORED (PREFIX_IGNORED_REPZ \
242 | PREFIX_IGNORED_REPNZ \
243 | PREFIX_IGNORED_DATA)
bf890a93 244
ce518a5f 245#define XX { NULL, 0 }
507bd325 246#define Bad_Opcode NULL, { { NULL, 0 } }, 0
ce518a5f
L
247
248#define Eb { OP_E, b_mode }
7e8b059b 249#define Ebnd { OP_E, bnd_mode }
b6169b20 250#define EbS { OP_E, b_swap_mode }
ce518a5f 251#define Ev { OP_E, v_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 }
4ee52178 274#define Mx { OP_M, x_mode }
c0f3af97 275#define Mxmm { OP_M, xmm_mode }
ce518a5f 276#define Gb { OP_G, b_mode }
7e8b059b 277#define Gbnd { OP_G, bnd_mode }
ce518a5f
L
278#define Gv { OP_G, v_mode }
279#define Gd { OP_G, d_mode }
280#define Gdq { OP_G, dq_mode }
281#define Gm { OP_G, m_mode }
282#define Gw { OP_G, w_mode }
6f74c397 283#define Rd { OP_R, d_mode }
43234a1e 284#define Rdq { OP_R, dq_mode }
6f74c397 285#define Rm { OP_R, m_mode }
ce518a5f
L
286#define Ib { OP_I, b_mode }
287#define sIb { OP_sI, b_mode } /* sign extened byte */
e3949f17 288#define sIbT { OP_sI, b_T_mode } /* sign extened byte like 'T' */
ce518a5f 289#define Iv { OP_I, v_mode }
7bb15c6f 290#define sIv { OP_sI, v_mode }
ce518a5f
L
291#define Iq { OP_I, q_mode }
292#define Iv64 { OP_I64, v_mode }
293#define Iw { OP_I, w_mode }
294#define I1 { OP_I, const_1_mode }
295#define Jb { OP_J, b_mode }
296#define Jv { OP_J, v_mode }
297#define Cm { OP_C, m_mode }
298#define Dm { OP_D, m_mode }
299#define Td { OP_T, d_mode }
b844680a 300#define Skip_MODRM { OP_Skip_MODRM, 0 }
ce518a5f
L
301
302#define RMeAX { OP_REG, eAX_reg }
303#define RMeBX { OP_REG, eBX_reg }
304#define RMeCX { OP_REG, eCX_reg }
305#define RMeDX { OP_REG, eDX_reg }
306#define RMeSP { OP_REG, eSP_reg }
307#define RMeBP { OP_REG, eBP_reg }
308#define RMeSI { OP_REG, eSI_reg }
309#define RMeDI { OP_REG, eDI_reg }
310#define RMrAX { OP_REG, rAX_reg }
311#define RMrBX { OP_REG, rBX_reg }
312#define RMrCX { OP_REG, rCX_reg }
313#define RMrDX { OP_REG, rDX_reg }
314#define RMrSP { OP_REG, rSP_reg }
315#define RMrBP { OP_REG, rBP_reg }
316#define RMrSI { OP_REG, rSI_reg }
317#define RMrDI { OP_REG, rDI_reg }
318#define RMAL { OP_REG, al_reg }
ce518a5f
L
319#define RMCL { OP_REG, cl_reg }
320#define RMDL { OP_REG, dl_reg }
321#define RMBL { OP_REG, bl_reg }
322#define RMAH { OP_REG, ah_reg }
323#define RMCH { OP_REG, ch_reg }
324#define RMDH { OP_REG, dh_reg }
325#define RMBH { OP_REG, bh_reg }
326#define RMAX { OP_REG, ax_reg }
327#define RMDX { OP_REG, dx_reg }
328
329#define eAX { OP_IMREG, eAX_reg }
330#define eBX { OP_IMREG, eBX_reg }
331#define eCX { OP_IMREG, eCX_reg }
332#define eDX { OP_IMREG, eDX_reg }
333#define eSP { OP_IMREG, eSP_reg }
334#define eBP { OP_IMREG, eBP_reg }
335#define eSI { OP_IMREG, eSI_reg }
336#define eDI { OP_IMREG, eDI_reg }
337#define AL { OP_IMREG, al_reg }
338#define CL { OP_IMREG, cl_reg }
339#define DL { OP_IMREG, dl_reg }
340#define BL { OP_IMREG, bl_reg }
341#define AH { OP_IMREG, ah_reg }
342#define CH { OP_IMREG, ch_reg }
343#define DH { OP_IMREG, dh_reg }
344#define BH { OP_IMREG, bh_reg }
345#define AX { OP_IMREG, ax_reg }
346#define DX { OP_IMREG, dx_reg }
347#define zAX { OP_IMREG, z_mode_ax_reg }
348#define indirDX { OP_IMREG, indir_dx_reg }
349
350#define Sw { OP_SEG, w_mode }
351#define Sv { OP_SEG, v_mode }
352#define Ap { OP_DIR, 0 }
353#define Ob { OP_OFF64, b_mode }
354#define Ov { OP_OFF64, v_mode }
355#define Xb { OP_DSreg, eSI_reg }
356#define Xv { OP_DSreg, eSI_reg }
357#define Xz { OP_DSreg, eSI_reg }
358#define Yb { OP_ESreg, eDI_reg }
359#define Yv { OP_ESreg, eDI_reg }
360#define DSBX { OP_DSreg, eBX_reg }
361
362#define es { OP_REG, es_reg }
363#define ss { OP_REG, ss_reg }
364#define cs { OP_REG, cs_reg }
365#define ds { OP_REG, ds_reg }
366#define fs { OP_REG, fs_reg }
367#define gs { OP_REG, gs_reg }
368
369#define MX { OP_MMX, 0 }
370#define XM { OP_XMM, 0 }
539f890d 371#define XMScalar { OP_XMM, scalar_mode }
6c30d220 372#define XMGatherQ { OP_XMM, vex_vsib_q_w_dq_mode }
c0f3af97 373#define XMM { OP_XMM, xmm_mode }
43234a1e 374#define XMxmmq { OP_XMM, xmmq_mode }
ce518a5f 375#define EM { OP_EM, v_mode }
b6169b20 376#define EMS { OP_EM, v_swap_mode }
09a2c6cf 377#define EMd { OP_EM, d_mode }
14051056 378#define EMx { OP_EM, x_mode }
8976381e 379#define EXw { OP_EX, w_mode }
09a2c6cf 380#define EXd { OP_EX, d_mode }
539f890d 381#define EXdScalar { OP_EX, d_scalar_mode }
fa99fab2 382#define EXdS { OP_EX, d_swap_mode }
43234a1e 383#define EXdScalarS { OP_EX, d_scalar_swap_mode }
09a2c6cf 384#define EXq { OP_EX, q_mode }
539f890d
L
385#define EXqScalar { OP_EX, q_scalar_mode }
386#define EXqScalarS { OP_EX, q_scalar_swap_mode }
b6169b20 387#define EXqS { OP_EX, q_swap_mode }
09a2c6cf 388#define EXx { OP_EX, x_mode }
b6169b20 389#define EXxS { OP_EX, x_swap_mode }
c0f3af97 390#define EXxmm { OP_EX, xmm_mode }
43234a1e 391#define EXymm { OP_EX, ymm_mode }
c0f3af97 392#define EXxmmq { OP_EX, xmmq_mode }
43234a1e 393#define EXEvexHalfBcstXmmq { OP_EX, evex_half_bcst_xmmq_mode }
6c30d220
L
394#define EXxmm_mb { OP_EX, xmm_mb_mode }
395#define EXxmm_mw { OP_EX, xmm_mw_mode }
396#define EXxmm_md { OP_EX, xmm_md_mode }
397#define EXxmm_mq { OP_EX, xmm_mq_mode }
43234a1e 398#define EXxmm_mdq { OP_EX, xmm_mdq_mode }
6c30d220
L
399#define EXxmmdw { OP_EX, xmmdw_mode }
400#define EXxmmqd { OP_EX, xmmqd_mode }
c0f3af97 401#define EXymmq { OP_EX, ymmq_mode }
0bfee649 402#define EXVexWdq { OP_EX, vex_w_dq_mode }
1c480963 403#define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
43234a1e
L
404#define EXEvexXGscat { OP_EX, evex_x_gscat_mode }
405#define EXEvexXNoBcst { OP_EX, evex_x_nobcst_mode }
ce518a5f
L
406#define MS { OP_MS, v_mode }
407#define XS { OP_XS, v_mode }
09335d05 408#define EMCq { OP_EMC, q_mode }
ce518a5f 409#define MXC { OP_MXC, 0 }
ce518a5f 410#define OPSUF { OP_3DNowSuffix, 0 }
ad19981d 411#define CMP { CMP_Fixup, 0 }
42903f7f 412#define XMM0 { XMM_Fixup, 0 }
eacc9c89 413#define FXSAVE { FXSAVE_Fixup, 0 }
5dd85c99
SP
414#define Vex_2src_1 { OP_Vex_2src_1, 0 }
415#define Vex_2src_2 { OP_Vex_2src_2, 0 }
252b5132 416
c0f3af97 417#define Vex { OP_VEX, vex_mode }
539f890d 418#define VexScalar { OP_VEX, vex_scalar_mode }
6c30d220 419#define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode }
c0f3af97
L
420#define Vex128 { OP_VEX, vex128_mode }
421#define Vex256 { OP_VEX, vex256_mode }
cb21baef 422#define VexGdq { OP_VEX, dq_mode }
922d8de8 423#define VexI4 { VEXI4_Fixup, 0}
c0f3af97 424#define EXdVex { OP_EX_Vex, d_mode }
fa99fab2 425#define EXdVexS { OP_EX_Vex, d_swap_mode }
539f890d 426#define EXdVexScalarS { OP_EX_Vex, d_scalar_swap_mode }
c0f3af97 427#define EXqVex { OP_EX_Vex, q_mode }
fa99fab2 428#define EXqVexS { OP_EX_Vex, q_swap_mode }
539f890d 429#define EXqVexScalarS { OP_EX_Vex, q_scalar_swap_mode }
922d8de8
DR
430#define EXVexW { OP_EX_VexW, x_mode }
431#define EXdVexW { OP_EX_VexW, d_mode }
432#define EXqVexW { OP_EX_VexW, q_mode }
a683cc34 433#define EXVexImmW { OP_EX_VexImmW, x_mode }
c0f3af97 434#define XMVex { OP_XMM_Vex, 0 }
539f890d 435#define XMVexScalar { OP_XMM_Vex, scalar_mode }
922d8de8 436#define XMVexW { OP_XMM_VexW, 0 }
c0f3af97
L
437#define XMVexI4 { OP_REG_VexI4, x_mode }
438#define PCLMUL { PCLMUL_Fixup, 0 }
439#define VZERO { VZERO_Fixup, 0 }
440#define VCMP { VCMP_Fixup, 0 }
43234a1e
L
441#define VPCMP { VPCMP_Fixup, 0 }
442
443#define EXxEVexR { OP_Rounding, evex_rounding_mode }
444#define EXxEVexS { OP_Rounding, evex_sae_mode }
445
446#define XMask { OP_Mask, mask_mode }
447#define MaskG { OP_G, mask_mode }
448#define MaskE { OP_E, mask_mode }
1ba585e8 449#define MaskBDE { OP_E, mask_bd_mode }
43234a1e
L
450#define MaskR { OP_R, mask_mode }
451#define MaskVex { OP_VEX, mask_mode }
c0f3af97 452
6c30d220 453#define MVexVSIBDWpX { OP_M, vex_vsib_d_w_dq_mode }
5fc35d96 454#define MVexVSIBDQWpX { OP_M, vex_vsib_d_w_d_mode }
6c30d220 455#define MVexVSIBQWpX { OP_M, vex_vsib_q_w_dq_mode }
5fc35d96 456#define MVexVSIBQDWpX { OP_M, vex_vsib_q_w_d_mode }
6c30d220 457
35c52694 458/* Used handle "rep" prefix for string instructions. */
ce518a5f
L
459#define Xbr { REP_Fixup, eSI_reg }
460#define Xvr { REP_Fixup, eSI_reg }
461#define Ybr { REP_Fixup, eDI_reg }
462#define Yvr { REP_Fixup, eDI_reg }
463#define Yzr { REP_Fixup, eDI_reg }
464#define indirDXr { REP_Fixup, indir_dx_reg }
465#define ALr { REP_Fixup, al_reg }
466#define eAXr { REP_Fixup, eAX_reg }
467
42164a71
L
468/* Used handle HLE prefix for lockable instructions. */
469#define Ebh1 { HLE_Fixup1, b_mode }
470#define Evh1 { HLE_Fixup1, v_mode }
471#define Ebh2 { HLE_Fixup2, b_mode }
472#define Evh2 { HLE_Fixup2, v_mode }
473#define Ebh3 { HLE_Fixup3, b_mode }
474#define Evh3 { HLE_Fixup3, v_mode }
475
7e8b059b 476#define BND { BND_Fixup, 0 }
04ef582a 477#define NOTRACK { NOTRACK_Fixup, 0 }
7e8b059b 478
ce518a5f
L
479#define cond_jump_flag { NULL, cond_jump_mode }
480#define loop_jcxz_flag { NULL, loop_jcxz_mode }
3ffd33cf 481
252b5132 482/* bits in sizeflag */
252b5132 483#define SUFFIX_ALWAYS 4
252b5132
RH
484#define AFLAG 2
485#define DFLAG 1
486
51e7da1b
L
487enum
488{
489 /* byte operand */
490 b_mode = 1,
491 /* byte operand with operand swapped */
3873ba12 492 b_swap_mode,
e3949f17
L
493 /* byte operand, sign extend like 'T' suffix */
494 b_T_mode,
51e7da1b 495 /* operand size depends on prefixes */
3873ba12 496 v_mode,
51e7da1b 497 /* operand size depends on prefixes with operand swapped */
3873ba12 498 v_swap_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,
51e7da1b 557 /* operand size depends on REX prefixes. */
3873ba12 558 dq_mode,
51e7da1b 559 /* registers like dq_mode, memory like w_mode. */
3873ba12 560 dqw_mode,
7e8b059b 561 bnd_mode,
51e7da1b 562 /* 4- or 6-byte pointer operand */
3873ba12
L
563 f_mode,
564 const_1_mode,
07f5af7d
L
565 /* v_mode for indirect branch opcodes. */
566 indir_v_mode,
51e7da1b 567 /* v_mode for stack-related opcodes. */
3873ba12 568 stack_v_mode,
51e7da1b 569 /* non-quad operand size depends on prefixes */
3873ba12 570 z_mode,
51e7da1b 571 /* 16-byte operand */
3873ba12 572 o_mode,
51e7da1b 573 /* registers like dq_mode, memory like b_mode. */
3873ba12 574 dqb_mode,
1ba585e8
IT
575 /* registers like d_mode, memory like b_mode. */
576 db_mode,
577 /* registers like d_mode, memory like w_mode. */
578 dw_mode,
51e7da1b 579 /* registers like dq_mode, memory like d_mode. */
3873ba12 580 dqd_mode,
51e7da1b 581 /* normal vex mode */
3873ba12 582 vex_mode,
51e7da1b 583 /* 128bit vex mode */
3873ba12 584 vex128_mode,
51e7da1b 585 /* 256bit vex mode */
3873ba12 586 vex256_mode,
51e7da1b 587 /* operand size depends on the VEX.W bit. */
3873ba12 588 vex_w_dq_mode,
d55ee72f 589
6c30d220
L
590 /* Similar to vex_w_dq_mode, with VSIB dword indices. */
591 vex_vsib_d_w_dq_mode,
5fc35d96
IT
592 /* Similar to vex_vsib_d_w_dq_mode, with smaller memory. */
593 vex_vsib_d_w_d_mode,
6c30d220
L
594 /* Similar to vex_w_dq_mode, with VSIB qword indices. */
595 vex_vsib_q_w_dq_mode,
5fc35d96
IT
596 /* Similar to vex_vsib_q_w_dq_mode, with smaller memory. */
597 vex_vsib_q_w_d_mode,
6c30d220 598
539f890d
L
599 /* scalar, ignore vector length. */
600 scalar_mode,
601 /* like d_mode, ignore vector length. */
602 d_scalar_mode,
603 /* like d_swap_mode, ignore vector length. */
604 d_scalar_swap_mode,
605 /* like q_mode, ignore vector length. */
606 q_scalar_mode,
607 /* like q_swap_mode, ignore vector length. */
608 q_scalar_swap_mode,
609 /* like vex_mode, ignore vector length. */
610 vex_scalar_mode,
1c480963
L
611 /* like vex_w_dq_mode, ignore vector length. */
612 vex_scalar_w_dq_mode,
539f890d 613
43234a1e
L
614 /* Static rounding. */
615 evex_rounding_mode,
616 /* Supress all exceptions. */
617 evex_sae_mode,
618
619 /* Mask register operand. */
620 mask_mode,
1ba585e8
IT
621 /* Mask register operand. */
622 mask_bd_mode,
43234a1e 623
3873ba12
L
624 es_reg,
625 cs_reg,
626 ss_reg,
627 ds_reg,
628 fs_reg,
629 gs_reg,
d55ee72f 630
3873ba12
L
631 eAX_reg,
632 eCX_reg,
633 eDX_reg,
634 eBX_reg,
635 eSP_reg,
636 eBP_reg,
637 eSI_reg,
638 eDI_reg,
d55ee72f 639
3873ba12
L
640 al_reg,
641 cl_reg,
642 dl_reg,
643 bl_reg,
644 ah_reg,
645 ch_reg,
646 dh_reg,
647 bh_reg,
d55ee72f 648
3873ba12
L
649 ax_reg,
650 cx_reg,
651 dx_reg,
652 bx_reg,
653 sp_reg,
654 bp_reg,
655 si_reg,
656 di_reg,
d55ee72f 657
3873ba12
L
658 rAX_reg,
659 rCX_reg,
660 rDX_reg,
661 rBX_reg,
662 rSP_reg,
663 rBP_reg,
664 rSI_reg,
665 rDI_reg,
d55ee72f 666
3873ba12
L
667 z_mode_ax_reg,
668 indir_dx_reg
51e7da1b 669};
252b5132 670
51e7da1b
L
671enum
672{
673 FLOATCODE = 1,
3873ba12
L
674 USE_REG_TABLE,
675 USE_MOD_TABLE,
676 USE_RM_TABLE,
677 USE_PREFIX_TABLE,
678 USE_X86_64_TABLE,
679 USE_3BYTE_TABLE,
f88c9eb0 680 USE_XOP_8F_TABLE,
3873ba12
L
681 USE_VEX_C4_TABLE,
682 USE_VEX_C5_TABLE,
9e30b8e0 683 USE_VEX_LEN_TABLE,
43234a1e
L
684 USE_VEX_W_TABLE,
685 USE_EVEX_TABLE
51e7da1b 686};
6439fc28 687
bf890a93 688#define FLOAT NULL, { { NULL, FLOATCODE } }, 0
4efba78c 689
bf890a93
IT
690#define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }, 0
691#define DIS386_PREFIX(T, I, P) NULL, { { NULL, (T)}, { NULL, (I) } }, P
1ceb70f8
L
692#define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
693#define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
694#define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
695#define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
4e7d34a6
L
696#define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
697#define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
bf890a93 698#define THREE_BYTE_TABLE_PREFIX(I, P) DIS386_PREFIX (USE_3BYTE_TABLE, (I), P)
f88c9eb0 699#define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
c0f3af97
L
700#define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
701#define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
702#define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
9e30b8e0 703#define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
43234a1e 704#define EVEX_TABLE(I) DIS386 (USE_EVEX_TABLE, (I))
1ceb70f8 705
51e7da1b
L
706enum
707{
708 REG_80 = 0,
3873ba12 709 REG_81,
7148c369 710 REG_83,
3873ba12
L
711 REG_8F,
712 REG_C0,
713 REG_C1,
714 REG_C6,
715 REG_C7,
716 REG_D0,
717 REG_D1,
718 REG_D2,
719 REG_D3,
720 REG_F6,
721 REG_F7,
722 REG_FE,
723 REG_FF,
724 REG_0F00,
725 REG_0F01,
726 REG_0F0D,
727 REG_0F18,
603555e5 728 REG_0F1E_MOD_3,
3873ba12
L
729 REG_0F71,
730 REG_0F72,
731 REG_0F73,
732 REG_0FA6,
733 REG_0FA7,
734 REG_0FAE,
735 REG_0FBA,
736 REG_0FC7,
592a252b
L
737 REG_VEX_0F71,
738 REG_VEX_0F72,
739 REG_VEX_0F73,
740 REG_VEX_0FAE,
f12dc422 741 REG_VEX_0F38F3,
f88c9eb0 742 REG_XOP_LWPCB,
2a2a0f38
QN
743 REG_XOP_LWP,
744 REG_XOP_TBM_01,
43234a1e
L
745 REG_XOP_TBM_02,
746
1ba585e8 747 REG_EVEX_0F71,
43234a1e
L
748 REG_EVEX_0F72,
749 REG_EVEX_0F73,
750 REG_EVEX_0F38C6,
751 REG_EVEX_0F38C7
51e7da1b 752};
1ceb70f8 753
51e7da1b
L
754enum
755{
756 MOD_8D = 0,
42164a71
L
757 MOD_C6_REG_7,
758 MOD_C7_REG_7,
4a357820
MZ
759 MOD_FF_REG_3,
760 MOD_FF_REG_5,
3873ba12
L
761 MOD_0F01_REG_0,
762 MOD_0F01_REG_1,
763 MOD_0F01_REG_2,
764 MOD_0F01_REG_3,
8eab4136 765 MOD_0F01_REG_5,
3873ba12
L
766 MOD_0F01_REG_7,
767 MOD_0F12_PREFIX_0,
768 MOD_0F13,
769 MOD_0F16_PREFIX_0,
770 MOD_0F17,
771 MOD_0F18_REG_0,
772 MOD_0F18_REG_1,
773 MOD_0F18_REG_2,
774 MOD_0F18_REG_3,
d7189fa5
RM
775 MOD_0F18_REG_4,
776 MOD_0F18_REG_5,
777 MOD_0F18_REG_6,
778 MOD_0F18_REG_7,
7e8b059b
L
779 MOD_0F1A_PREFIX_0,
780 MOD_0F1B_PREFIX_0,
781 MOD_0F1B_PREFIX_1,
603555e5 782 MOD_0F1E_PREFIX_1,
3873ba12
L
783 MOD_0F24,
784 MOD_0F26,
785 MOD_0F2B_PREFIX_0,
786 MOD_0F2B_PREFIX_1,
787 MOD_0F2B_PREFIX_2,
788 MOD_0F2B_PREFIX_3,
789 MOD_0F51,
790 MOD_0F71_REG_2,
791 MOD_0F71_REG_4,
792 MOD_0F71_REG_6,
793 MOD_0F72_REG_2,
794 MOD_0F72_REG_4,
795 MOD_0F72_REG_6,
796 MOD_0F73_REG_2,
797 MOD_0F73_REG_3,
798 MOD_0F73_REG_6,
799 MOD_0F73_REG_7,
800 MOD_0FAE_REG_0,
801 MOD_0FAE_REG_1,
802 MOD_0FAE_REG_2,
803 MOD_0FAE_REG_3,
804 MOD_0FAE_REG_4,
805 MOD_0FAE_REG_5,
806 MOD_0FAE_REG_6,
807 MOD_0FAE_REG_7,
808 MOD_0FB2,
809 MOD_0FB4,
810 MOD_0FB5,
a8484f96 811 MOD_0FC3,
963f3586
IT
812 MOD_0FC7_REG_3,
813 MOD_0FC7_REG_4,
814 MOD_0FC7_REG_5,
3873ba12
L
815 MOD_0FC7_REG_6,
816 MOD_0FC7_REG_7,
817 MOD_0FD7,
818 MOD_0FE7_PREFIX_2,
819 MOD_0FF0_PREFIX_3,
820 MOD_0F382A_PREFIX_2,
603555e5
L
821 MOD_0F38F5_PREFIX_2,
822 MOD_0F38F6_PREFIX_0,
3873ba12
L
823 MOD_62_32BIT,
824 MOD_C4_32BIT,
825 MOD_C5_32BIT,
592a252b
L
826 MOD_VEX_0F12_PREFIX_0,
827 MOD_VEX_0F13,
828 MOD_VEX_0F16_PREFIX_0,
829 MOD_VEX_0F17,
830 MOD_VEX_0F2B,
ab4e4ed5
AF
831 MOD_VEX_W_0_0F41_P_0_LEN_1,
832 MOD_VEX_W_1_0F41_P_0_LEN_1,
833 MOD_VEX_W_0_0F41_P_2_LEN_1,
834 MOD_VEX_W_1_0F41_P_2_LEN_1,
835 MOD_VEX_W_0_0F42_P_0_LEN_1,
836 MOD_VEX_W_1_0F42_P_0_LEN_1,
837 MOD_VEX_W_0_0F42_P_2_LEN_1,
838 MOD_VEX_W_1_0F42_P_2_LEN_1,
839 MOD_VEX_W_0_0F44_P_0_LEN_1,
840 MOD_VEX_W_1_0F44_P_0_LEN_1,
841 MOD_VEX_W_0_0F44_P_2_LEN_1,
842 MOD_VEX_W_1_0F44_P_2_LEN_1,
843 MOD_VEX_W_0_0F45_P_0_LEN_1,
844 MOD_VEX_W_1_0F45_P_0_LEN_1,
845 MOD_VEX_W_0_0F45_P_2_LEN_1,
846 MOD_VEX_W_1_0F45_P_2_LEN_1,
847 MOD_VEX_W_0_0F46_P_0_LEN_1,
848 MOD_VEX_W_1_0F46_P_0_LEN_1,
849 MOD_VEX_W_0_0F46_P_2_LEN_1,
850 MOD_VEX_W_1_0F46_P_2_LEN_1,
851 MOD_VEX_W_0_0F47_P_0_LEN_1,
852 MOD_VEX_W_1_0F47_P_0_LEN_1,
853 MOD_VEX_W_0_0F47_P_2_LEN_1,
854 MOD_VEX_W_1_0F47_P_2_LEN_1,
855 MOD_VEX_W_0_0F4A_P_0_LEN_1,
856 MOD_VEX_W_1_0F4A_P_0_LEN_1,
857 MOD_VEX_W_0_0F4A_P_2_LEN_1,
858 MOD_VEX_W_1_0F4A_P_2_LEN_1,
859 MOD_VEX_W_0_0F4B_P_0_LEN_1,
860 MOD_VEX_W_1_0F4B_P_0_LEN_1,
861 MOD_VEX_W_0_0F4B_P_2_LEN_1,
592a252b
L
862 MOD_VEX_0F50,
863 MOD_VEX_0F71_REG_2,
864 MOD_VEX_0F71_REG_4,
865 MOD_VEX_0F71_REG_6,
866 MOD_VEX_0F72_REG_2,
867 MOD_VEX_0F72_REG_4,
868 MOD_VEX_0F72_REG_6,
869 MOD_VEX_0F73_REG_2,
870 MOD_VEX_0F73_REG_3,
871 MOD_VEX_0F73_REG_6,
872 MOD_VEX_0F73_REG_7,
ab4e4ed5
AF
873 MOD_VEX_W_0_0F91_P_0_LEN_0,
874 MOD_VEX_W_1_0F91_P_0_LEN_0,
875 MOD_VEX_W_0_0F91_P_2_LEN_0,
876 MOD_VEX_W_1_0F91_P_2_LEN_0,
877 MOD_VEX_W_0_0F92_P_0_LEN_0,
878 MOD_VEX_W_0_0F92_P_2_LEN_0,
879 MOD_VEX_W_0_0F92_P_3_LEN_0,
880 MOD_VEX_W_1_0F92_P_3_LEN_0,
881 MOD_VEX_W_0_0F93_P_0_LEN_0,
882 MOD_VEX_W_0_0F93_P_2_LEN_0,
883 MOD_VEX_W_0_0F93_P_3_LEN_0,
884 MOD_VEX_W_1_0F93_P_3_LEN_0,
885 MOD_VEX_W_0_0F98_P_0_LEN_0,
886 MOD_VEX_W_1_0F98_P_0_LEN_0,
887 MOD_VEX_W_0_0F98_P_2_LEN_0,
888 MOD_VEX_W_1_0F98_P_2_LEN_0,
889 MOD_VEX_W_0_0F99_P_0_LEN_0,
890 MOD_VEX_W_1_0F99_P_0_LEN_0,
891 MOD_VEX_W_0_0F99_P_2_LEN_0,
892 MOD_VEX_W_1_0F99_P_2_LEN_0,
592a252b
L
893 MOD_VEX_0FAE_REG_2,
894 MOD_VEX_0FAE_REG_3,
895 MOD_VEX_0FD7_PREFIX_2,
896 MOD_VEX_0FE7_PREFIX_2,
897 MOD_VEX_0FF0_PREFIX_3,
592a252b
L
898 MOD_VEX_0F381A_PREFIX_2,
899 MOD_VEX_0F382A_PREFIX_2,
900 MOD_VEX_0F382C_PREFIX_2,
901 MOD_VEX_0F382D_PREFIX_2,
902 MOD_VEX_0F382E_PREFIX_2,
6c30d220
L
903 MOD_VEX_0F382F_PREFIX_2,
904 MOD_VEX_0F385A_PREFIX_2,
905 MOD_VEX_0F388C_PREFIX_2,
906 MOD_VEX_0F388E_PREFIX_2,
ab4e4ed5
AF
907 MOD_VEX_W_0_0F3A30_P_2_LEN_0,
908 MOD_VEX_W_1_0F3A30_P_2_LEN_0,
909 MOD_VEX_W_0_0F3A31_P_2_LEN_0,
910 MOD_VEX_W_1_0F3A31_P_2_LEN_0,
911 MOD_VEX_W_0_0F3A32_P_2_LEN_0,
912 MOD_VEX_W_1_0F3A32_P_2_LEN_0,
913 MOD_VEX_W_0_0F3A33_P_2_LEN_0,
914 MOD_VEX_W_1_0F3A33_P_2_LEN_0,
43234a1e
L
915
916 MOD_EVEX_0F10_PREFIX_1,
917 MOD_EVEX_0F10_PREFIX_3,
918 MOD_EVEX_0F11_PREFIX_1,
919 MOD_EVEX_0F11_PREFIX_3,
920 MOD_EVEX_0F12_PREFIX_0,
921 MOD_EVEX_0F16_PREFIX_0,
922 MOD_EVEX_0F38C6_REG_1,
923 MOD_EVEX_0F38C6_REG_2,
924 MOD_EVEX_0F38C6_REG_5,
925 MOD_EVEX_0F38C6_REG_6,
926 MOD_EVEX_0F38C7_REG_1,
927 MOD_EVEX_0F38C7_REG_2,
928 MOD_EVEX_0F38C7_REG_5,
929 MOD_EVEX_0F38C7_REG_6
51e7da1b 930};
1ceb70f8 931
51e7da1b
L
932enum
933{
42164a71
L
934 RM_C6_REG_7 = 0,
935 RM_C7_REG_7,
936 RM_0F01_REG_0,
3873ba12
L
937 RM_0F01_REG_1,
938 RM_0F01_REG_2,
939 RM_0F01_REG_3,
8eab4136 940 RM_0F01_REG_5,
3873ba12 941 RM_0F01_REG_7,
603555e5 942 RM_0F1E_MOD_3_REG_7,
3873ba12
L
943 RM_0FAE_REG_5,
944 RM_0FAE_REG_6,
945 RM_0FAE_REG_7
51e7da1b 946};
1ceb70f8 947
51e7da1b
L
948enum
949{
950 PREFIX_90 = 0,
603555e5
L
951 PREFIX_MOD_0_0F01_REG_5,
952 PREFIX_MOD_3_0F01_REG_5_RM_1,
953 PREFIX_MOD_3_0F01_REG_5_RM_2,
3873ba12
L
954 PREFIX_0F10,
955 PREFIX_0F11,
956 PREFIX_0F12,
957 PREFIX_0F16,
7e8b059b
L
958 PREFIX_0F1A,
959 PREFIX_0F1B,
603555e5 960 PREFIX_0F1E,
3873ba12
L
961 PREFIX_0F2A,
962 PREFIX_0F2B,
963 PREFIX_0F2C,
964 PREFIX_0F2D,
965 PREFIX_0F2E,
966 PREFIX_0F2F,
967 PREFIX_0F51,
968 PREFIX_0F52,
969 PREFIX_0F53,
970 PREFIX_0F58,
971 PREFIX_0F59,
972 PREFIX_0F5A,
973 PREFIX_0F5B,
974 PREFIX_0F5C,
975 PREFIX_0F5D,
976 PREFIX_0F5E,
977 PREFIX_0F5F,
978 PREFIX_0F60,
979 PREFIX_0F61,
980 PREFIX_0F62,
981 PREFIX_0F6C,
982 PREFIX_0F6D,
983 PREFIX_0F6F,
984 PREFIX_0F70,
985 PREFIX_0F73_REG_3,
986 PREFIX_0F73_REG_7,
987 PREFIX_0F78,
988 PREFIX_0F79,
989 PREFIX_0F7C,
990 PREFIX_0F7D,
991 PREFIX_0F7E,
992 PREFIX_0F7F,
c7b8aa3a
L
993 PREFIX_0FAE_REG_0,
994 PREFIX_0FAE_REG_1,
995 PREFIX_0FAE_REG_2,
996 PREFIX_0FAE_REG_3,
6b40c462
L
997 PREFIX_MOD_0_0FAE_REG_4,
998 PREFIX_MOD_3_0FAE_REG_4,
603555e5 999 PREFIX_MOD_0_0FAE_REG_5,
c5e7287a 1000 PREFIX_0FAE_REG_6,
963f3586 1001 PREFIX_0FAE_REG_7,
3873ba12 1002 PREFIX_0FB8,
f12dc422 1003 PREFIX_0FBC,
3873ba12
L
1004 PREFIX_0FBD,
1005 PREFIX_0FC2,
a8484f96 1006 PREFIX_MOD_0_0FC3,
f24bcbaa
L
1007 PREFIX_MOD_0_0FC7_REG_6,
1008 PREFIX_MOD_3_0FC7_REG_6,
1009 PREFIX_MOD_3_0FC7_REG_7,
3873ba12
L
1010 PREFIX_0FD0,
1011 PREFIX_0FD6,
1012 PREFIX_0FE6,
1013 PREFIX_0FE7,
1014 PREFIX_0FF0,
1015 PREFIX_0FF7,
1016 PREFIX_0F3810,
1017 PREFIX_0F3814,
1018 PREFIX_0F3815,
1019 PREFIX_0F3817,
1020 PREFIX_0F3820,
1021 PREFIX_0F3821,
1022 PREFIX_0F3822,
1023 PREFIX_0F3823,
1024 PREFIX_0F3824,
1025 PREFIX_0F3825,
1026 PREFIX_0F3828,
1027 PREFIX_0F3829,
1028 PREFIX_0F382A,
1029 PREFIX_0F382B,
1030 PREFIX_0F3830,
1031 PREFIX_0F3831,
1032 PREFIX_0F3832,
1033 PREFIX_0F3833,
1034 PREFIX_0F3834,
1035 PREFIX_0F3835,
1036 PREFIX_0F3837,
1037 PREFIX_0F3838,
1038 PREFIX_0F3839,
1039 PREFIX_0F383A,
1040 PREFIX_0F383B,
1041 PREFIX_0F383C,
1042 PREFIX_0F383D,
1043 PREFIX_0F383E,
1044 PREFIX_0F383F,
1045 PREFIX_0F3840,
1046 PREFIX_0F3841,
1047 PREFIX_0F3880,
1048 PREFIX_0F3881,
6c30d220 1049 PREFIX_0F3882,
a0046408
L
1050 PREFIX_0F38C8,
1051 PREFIX_0F38C9,
1052 PREFIX_0F38CA,
1053 PREFIX_0F38CB,
1054 PREFIX_0F38CC,
1055 PREFIX_0F38CD,
3873ba12
L
1056 PREFIX_0F38DB,
1057 PREFIX_0F38DC,
1058 PREFIX_0F38DD,
1059 PREFIX_0F38DE,
1060 PREFIX_0F38DF,
1061 PREFIX_0F38F0,
1062 PREFIX_0F38F1,
603555e5 1063 PREFIX_0F38F5,
e2e1fcde 1064 PREFIX_0F38F6,
3873ba12
L
1065 PREFIX_0F3A08,
1066 PREFIX_0F3A09,
1067 PREFIX_0F3A0A,
1068 PREFIX_0F3A0B,
1069 PREFIX_0F3A0C,
1070 PREFIX_0F3A0D,
1071 PREFIX_0F3A0E,
1072 PREFIX_0F3A14,
1073 PREFIX_0F3A15,
1074 PREFIX_0F3A16,
1075 PREFIX_0F3A17,
1076 PREFIX_0F3A20,
1077 PREFIX_0F3A21,
1078 PREFIX_0F3A22,
1079 PREFIX_0F3A40,
1080 PREFIX_0F3A41,
1081 PREFIX_0F3A42,
1082 PREFIX_0F3A44,
1083 PREFIX_0F3A60,
1084 PREFIX_0F3A61,
1085 PREFIX_0F3A62,
1086 PREFIX_0F3A63,
a0046408 1087 PREFIX_0F3ACC,
3873ba12 1088 PREFIX_0F3ADF,
592a252b
L
1089 PREFIX_VEX_0F10,
1090 PREFIX_VEX_0F11,
1091 PREFIX_VEX_0F12,
1092 PREFIX_VEX_0F16,
1093 PREFIX_VEX_0F2A,
1094 PREFIX_VEX_0F2C,
1095 PREFIX_VEX_0F2D,
1096 PREFIX_VEX_0F2E,
1097 PREFIX_VEX_0F2F,
43234a1e
L
1098 PREFIX_VEX_0F41,
1099 PREFIX_VEX_0F42,
1100 PREFIX_VEX_0F44,
1101 PREFIX_VEX_0F45,
1102 PREFIX_VEX_0F46,
1103 PREFIX_VEX_0F47,
1ba585e8 1104 PREFIX_VEX_0F4A,
43234a1e 1105 PREFIX_VEX_0F4B,
592a252b
L
1106 PREFIX_VEX_0F51,
1107 PREFIX_VEX_0F52,
1108 PREFIX_VEX_0F53,
1109 PREFIX_VEX_0F58,
1110 PREFIX_VEX_0F59,
1111 PREFIX_VEX_0F5A,
1112 PREFIX_VEX_0F5B,
1113 PREFIX_VEX_0F5C,
1114 PREFIX_VEX_0F5D,
1115 PREFIX_VEX_0F5E,
1116 PREFIX_VEX_0F5F,
1117 PREFIX_VEX_0F60,
1118 PREFIX_VEX_0F61,
1119 PREFIX_VEX_0F62,
1120 PREFIX_VEX_0F63,
1121 PREFIX_VEX_0F64,
1122 PREFIX_VEX_0F65,
1123 PREFIX_VEX_0F66,
1124 PREFIX_VEX_0F67,
1125 PREFIX_VEX_0F68,
1126 PREFIX_VEX_0F69,
1127 PREFIX_VEX_0F6A,
1128 PREFIX_VEX_0F6B,
1129 PREFIX_VEX_0F6C,
1130 PREFIX_VEX_0F6D,
1131 PREFIX_VEX_0F6E,
1132 PREFIX_VEX_0F6F,
1133 PREFIX_VEX_0F70,
1134 PREFIX_VEX_0F71_REG_2,
1135 PREFIX_VEX_0F71_REG_4,
1136 PREFIX_VEX_0F71_REG_6,
1137 PREFIX_VEX_0F72_REG_2,
1138 PREFIX_VEX_0F72_REG_4,
1139 PREFIX_VEX_0F72_REG_6,
1140 PREFIX_VEX_0F73_REG_2,
1141 PREFIX_VEX_0F73_REG_3,
1142 PREFIX_VEX_0F73_REG_6,
1143 PREFIX_VEX_0F73_REG_7,
1144 PREFIX_VEX_0F74,
1145 PREFIX_VEX_0F75,
1146 PREFIX_VEX_0F76,
1147 PREFIX_VEX_0F77,
1148 PREFIX_VEX_0F7C,
1149 PREFIX_VEX_0F7D,
1150 PREFIX_VEX_0F7E,
1151 PREFIX_VEX_0F7F,
43234a1e
L
1152 PREFIX_VEX_0F90,
1153 PREFIX_VEX_0F91,
1154 PREFIX_VEX_0F92,
1155 PREFIX_VEX_0F93,
1156 PREFIX_VEX_0F98,
1ba585e8 1157 PREFIX_VEX_0F99,
592a252b
L
1158 PREFIX_VEX_0FC2,
1159 PREFIX_VEX_0FC4,
1160 PREFIX_VEX_0FC5,
1161 PREFIX_VEX_0FD0,
1162 PREFIX_VEX_0FD1,
1163 PREFIX_VEX_0FD2,
1164 PREFIX_VEX_0FD3,
1165 PREFIX_VEX_0FD4,
1166 PREFIX_VEX_0FD5,
1167 PREFIX_VEX_0FD6,
1168 PREFIX_VEX_0FD7,
1169 PREFIX_VEX_0FD8,
1170 PREFIX_VEX_0FD9,
1171 PREFIX_VEX_0FDA,
1172 PREFIX_VEX_0FDB,
1173 PREFIX_VEX_0FDC,
1174 PREFIX_VEX_0FDD,
1175 PREFIX_VEX_0FDE,
1176 PREFIX_VEX_0FDF,
1177 PREFIX_VEX_0FE0,
1178 PREFIX_VEX_0FE1,
1179 PREFIX_VEX_0FE2,
1180 PREFIX_VEX_0FE3,
1181 PREFIX_VEX_0FE4,
1182 PREFIX_VEX_0FE5,
1183 PREFIX_VEX_0FE6,
1184 PREFIX_VEX_0FE7,
1185 PREFIX_VEX_0FE8,
1186 PREFIX_VEX_0FE9,
1187 PREFIX_VEX_0FEA,
1188 PREFIX_VEX_0FEB,
1189 PREFIX_VEX_0FEC,
1190 PREFIX_VEX_0FED,
1191 PREFIX_VEX_0FEE,
1192 PREFIX_VEX_0FEF,
1193 PREFIX_VEX_0FF0,
1194 PREFIX_VEX_0FF1,
1195 PREFIX_VEX_0FF2,
1196 PREFIX_VEX_0FF3,
1197 PREFIX_VEX_0FF4,
1198 PREFIX_VEX_0FF5,
1199 PREFIX_VEX_0FF6,
1200 PREFIX_VEX_0FF7,
1201 PREFIX_VEX_0FF8,
1202 PREFIX_VEX_0FF9,
1203 PREFIX_VEX_0FFA,
1204 PREFIX_VEX_0FFB,
1205 PREFIX_VEX_0FFC,
1206 PREFIX_VEX_0FFD,
1207 PREFIX_VEX_0FFE,
1208 PREFIX_VEX_0F3800,
1209 PREFIX_VEX_0F3801,
1210 PREFIX_VEX_0F3802,
1211 PREFIX_VEX_0F3803,
1212 PREFIX_VEX_0F3804,
1213 PREFIX_VEX_0F3805,
1214 PREFIX_VEX_0F3806,
1215 PREFIX_VEX_0F3807,
1216 PREFIX_VEX_0F3808,
1217 PREFIX_VEX_0F3809,
1218 PREFIX_VEX_0F380A,
1219 PREFIX_VEX_0F380B,
1220 PREFIX_VEX_0F380C,
1221 PREFIX_VEX_0F380D,
1222 PREFIX_VEX_0F380E,
1223 PREFIX_VEX_0F380F,
1224 PREFIX_VEX_0F3813,
6c30d220 1225 PREFIX_VEX_0F3816,
592a252b
L
1226 PREFIX_VEX_0F3817,
1227 PREFIX_VEX_0F3818,
1228 PREFIX_VEX_0F3819,
1229 PREFIX_VEX_0F381A,
1230 PREFIX_VEX_0F381C,
1231 PREFIX_VEX_0F381D,
1232 PREFIX_VEX_0F381E,
1233 PREFIX_VEX_0F3820,
1234 PREFIX_VEX_0F3821,
1235 PREFIX_VEX_0F3822,
1236 PREFIX_VEX_0F3823,
1237 PREFIX_VEX_0F3824,
1238 PREFIX_VEX_0F3825,
1239 PREFIX_VEX_0F3828,
1240 PREFIX_VEX_0F3829,
1241 PREFIX_VEX_0F382A,
1242 PREFIX_VEX_0F382B,
1243 PREFIX_VEX_0F382C,
1244 PREFIX_VEX_0F382D,
1245 PREFIX_VEX_0F382E,
1246 PREFIX_VEX_0F382F,
1247 PREFIX_VEX_0F3830,
1248 PREFIX_VEX_0F3831,
1249 PREFIX_VEX_0F3832,
1250 PREFIX_VEX_0F3833,
1251 PREFIX_VEX_0F3834,
1252 PREFIX_VEX_0F3835,
6c30d220 1253 PREFIX_VEX_0F3836,
592a252b
L
1254 PREFIX_VEX_0F3837,
1255 PREFIX_VEX_0F3838,
1256 PREFIX_VEX_0F3839,
1257 PREFIX_VEX_0F383A,
1258 PREFIX_VEX_0F383B,
1259 PREFIX_VEX_0F383C,
1260 PREFIX_VEX_0F383D,
1261 PREFIX_VEX_0F383E,
1262 PREFIX_VEX_0F383F,
1263 PREFIX_VEX_0F3840,
1264 PREFIX_VEX_0F3841,
6c30d220
L
1265 PREFIX_VEX_0F3845,
1266 PREFIX_VEX_0F3846,
1267 PREFIX_VEX_0F3847,
1268 PREFIX_VEX_0F3858,
1269 PREFIX_VEX_0F3859,
1270 PREFIX_VEX_0F385A,
1271 PREFIX_VEX_0F3878,
1272 PREFIX_VEX_0F3879,
1273 PREFIX_VEX_0F388C,
1274 PREFIX_VEX_0F388E,
1275 PREFIX_VEX_0F3890,
1276 PREFIX_VEX_0F3891,
1277 PREFIX_VEX_0F3892,
1278 PREFIX_VEX_0F3893,
592a252b
L
1279 PREFIX_VEX_0F3896,
1280 PREFIX_VEX_0F3897,
1281 PREFIX_VEX_0F3898,
1282 PREFIX_VEX_0F3899,
1283 PREFIX_VEX_0F389A,
1284 PREFIX_VEX_0F389B,
1285 PREFIX_VEX_0F389C,
1286 PREFIX_VEX_0F389D,
1287 PREFIX_VEX_0F389E,
1288 PREFIX_VEX_0F389F,
1289 PREFIX_VEX_0F38A6,
1290 PREFIX_VEX_0F38A7,
1291 PREFIX_VEX_0F38A8,
1292 PREFIX_VEX_0F38A9,
1293 PREFIX_VEX_0F38AA,
1294 PREFIX_VEX_0F38AB,
1295 PREFIX_VEX_0F38AC,
1296 PREFIX_VEX_0F38AD,
1297 PREFIX_VEX_0F38AE,
1298 PREFIX_VEX_0F38AF,
1299 PREFIX_VEX_0F38B6,
1300 PREFIX_VEX_0F38B7,
1301 PREFIX_VEX_0F38B8,
1302 PREFIX_VEX_0F38B9,
1303 PREFIX_VEX_0F38BA,
1304 PREFIX_VEX_0F38BB,
1305 PREFIX_VEX_0F38BC,
1306 PREFIX_VEX_0F38BD,
1307 PREFIX_VEX_0F38BE,
1308 PREFIX_VEX_0F38BF,
1309 PREFIX_VEX_0F38DB,
1310 PREFIX_VEX_0F38DC,
1311 PREFIX_VEX_0F38DD,
1312 PREFIX_VEX_0F38DE,
1313 PREFIX_VEX_0F38DF,
f12dc422
L
1314 PREFIX_VEX_0F38F2,
1315 PREFIX_VEX_0F38F3_REG_1,
1316 PREFIX_VEX_0F38F3_REG_2,
1317 PREFIX_VEX_0F38F3_REG_3,
6c30d220
L
1318 PREFIX_VEX_0F38F5,
1319 PREFIX_VEX_0F38F6,
f12dc422 1320 PREFIX_VEX_0F38F7,
6c30d220
L
1321 PREFIX_VEX_0F3A00,
1322 PREFIX_VEX_0F3A01,
1323 PREFIX_VEX_0F3A02,
592a252b
L
1324 PREFIX_VEX_0F3A04,
1325 PREFIX_VEX_0F3A05,
1326 PREFIX_VEX_0F3A06,
1327 PREFIX_VEX_0F3A08,
1328 PREFIX_VEX_0F3A09,
1329 PREFIX_VEX_0F3A0A,
1330 PREFIX_VEX_0F3A0B,
1331 PREFIX_VEX_0F3A0C,
1332 PREFIX_VEX_0F3A0D,
1333 PREFIX_VEX_0F3A0E,
1334 PREFIX_VEX_0F3A0F,
1335 PREFIX_VEX_0F3A14,
1336 PREFIX_VEX_0F3A15,
1337 PREFIX_VEX_0F3A16,
1338 PREFIX_VEX_0F3A17,
1339 PREFIX_VEX_0F3A18,
1340 PREFIX_VEX_0F3A19,
1341 PREFIX_VEX_0F3A1D,
1342 PREFIX_VEX_0F3A20,
1343 PREFIX_VEX_0F3A21,
1344 PREFIX_VEX_0F3A22,
43234a1e 1345 PREFIX_VEX_0F3A30,
1ba585e8 1346 PREFIX_VEX_0F3A31,
43234a1e 1347 PREFIX_VEX_0F3A32,
1ba585e8 1348 PREFIX_VEX_0F3A33,
6c30d220
L
1349 PREFIX_VEX_0F3A38,
1350 PREFIX_VEX_0F3A39,
592a252b
L
1351 PREFIX_VEX_0F3A40,
1352 PREFIX_VEX_0F3A41,
1353 PREFIX_VEX_0F3A42,
1354 PREFIX_VEX_0F3A44,
6c30d220 1355 PREFIX_VEX_0F3A46,
592a252b
L
1356 PREFIX_VEX_0F3A48,
1357 PREFIX_VEX_0F3A49,
1358 PREFIX_VEX_0F3A4A,
1359 PREFIX_VEX_0F3A4B,
1360 PREFIX_VEX_0F3A4C,
1361 PREFIX_VEX_0F3A5C,
1362 PREFIX_VEX_0F3A5D,
1363 PREFIX_VEX_0F3A5E,
1364 PREFIX_VEX_0F3A5F,
1365 PREFIX_VEX_0F3A60,
1366 PREFIX_VEX_0F3A61,
1367 PREFIX_VEX_0F3A62,
1368 PREFIX_VEX_0F3A63,
1369 PREFIX_VEX_0F3A68,
1370 PREFIX_VEX_0F3A69,
1371 PREFIX_VEX_0F3A6A,
1372 PREFIX_VEX_0F3A6B,
1373 PREFIX_VEX_0F3A6C,
1374 PREFIX_VEX_0F3A6D,
1375 PREFIX_VEX_0F3A6E,
1376 PREFIX_VEX_0F3A6F,
1377 PREFIX_VEX_0F3A78,
1378 PREFIX_VEX_0F3A79,
1379 PREFIX_VEX_0F3A7A,
1380 PREFIX_VEX_0F3A7B,
1381 PREFIX_VEX_0F3A7C,
1382 PREFIX_VEX_0F3A7D,
1383 PREFIX_VEX_0F3A7E,
1384 PREFIX_VEX_0F3A7F,
6c30d220 1385 PREFIX_VEX_0F3ADF,
43234a1e
L
1386 PREFIX_VEX_0F3AF0,
1387
1388 PREFIX_EVEX_0F10,
1389 PREFIX_EVEX_0F11,
1390 PREFIX_EVEX_0F12,
1391 PREFIX_EVEX_0F13,
1392 PREFIX_EVEX_0F14,
1393 PREFIX_EVEX_0F15,
1394 PREFIX_EVEX_0F16,
1395 PREFIX_EVEX_0F17,
1396 PREFIX_EVEX_0F28,
1397 PREFIX_EVEX_0F29,
1398 PREFIX_EVEX_0F2A,
1399 PREFIX_EVEX_0F2B,
1400 PREFIX_EVEX_0F2C,
1401 PREFIX_EVEX_0F2D,
1402 PREFIX_EVEX_0F2E,
1403 PREFIX_EVEX_0F2F,
1404 PREFIX_EVEX_0F51,
90a915bf
IT
1405 PREFIX_EVEX_0F54,
1406 PREFIX_EVEX_0F55,
1407 PREFIX_EVEX_0F56,
1408 PREFIX_EVEX_0F57,
43234a1e
L
1409 PREFIX_EVEX_0F58,
1410 PREFIX_EVEX_0F59,
1411 PREFIX_EVEX_0F5A,
1412 PREFIX_EVEX_0F5B,
1413 PREFIX_EVEX_0F5C,
1414 PREFIX_EVEX_0F5D,
1415 PREFIX_EVEX_0F5E,
1416 PREFIX_EVEX_0F5F,
1ba585e8
IT
1417 PREFIX_EVEX_0F60,
1418 PREFIX_EVEX_0F61,
43234a1e 1419 PREFIX_EVEX_0F62,
1ba585e8
IT
1420 PREFIX_EVEX_0F63,
1421 PREFIX_EVEX_0F64,
1422 PREFIX_EVEX_0F65,
43234a1e 1423 PREFIX_EVEX_0F66,
1ba585e8
IT
1424 PREFIX_EVEX_0F67,
1425 PREFIX_EVEX_0F68,
1426 PREFIX_EVEX_0F69,
43234a1e 1427 PREFIX_EVEX_0F6A,
1ba585e8 1428 PREFIX_EVEX_0F6B,
43234a1e
L
1429 PREFIX_EVEX_0F6C,
1430 PREFIX_EVEX_0F6D,
1431 PREFIX_EVEX_0F6E,
1432 PREFIX_EVEX_0F6F,
1433 PREFIX_EVEX_0F70,
1ba585e8
IT
1434 PREFIX_EVEX_0F71_REG_2,
1435 PREFIX_EVEX_0F71_REG_4,
1436 PREFIX_EVEX_0F71_REG_6,
43234a1e
L
1437 PREFIX_EVEX_0F72_REG_0,
1438 PREFIX_EVEX_0F72_REG_1,
1439 PREFIX_EVEX_0F72_REG_2,
1440 PREFIX_EVEX_0F72_REG_4,
1441 PREFIX_EVEX_0F72_REG_6,
1442 PREFIX_EVEX_0F73_REG_2,
1ba585e8 1443 PREFIX_EVEX_0F73_REG_3,
43234a1e 1444 PREFIX_EVEX_0F73_REG_6,
1ba585e8
IT
1445 PREFIX_EVEX_0F73_REG_7,
1446 PREFIX_EVEX_0F74,
1447 PREFIX_EVEX_0F75,
43234a1e
L
1448 PREFIX_EVEX_0F76,
1449 PREFIX_EVEX_0F78,
1450 PREFIX_EVEX_0F79,
1451 PREFIX_EVEX_0F7A,
1452 PREFIX_EVEX_0F7B,
1453 PREFIX_EVEX_0F7E,
1454 PREFIX_EVEX_0F7F,
1455 PREFIX_EVEX_0FC2,
1ba585e8
IT
1456 PREFIX_EVEX_0FC4,
1457 PREFIX_EVEX_0FC5,
43234a1e 1458 PREFIX_EVEX_0FC6,
1ba585e8 1459 PREFIX_EVEX_0FD1,
43234a1e
L
1460 PREFIX_EVEX_0FD2,
1461 PREFIX_EVEX_0FD3,
1462 PREFIX_EVEX_0FD4,
1ba585e8 1463 PREFIX_EVEX_0FD5,
43234a1e 1464 PREFIX_EVEX_0FD6,
1ba585e8
IT
1465 PREFIX_EVEX_0FD8,
1466 PREFIX_EVEX_0FD9,
1467 PREFIX_EVEX_0FDA,
43234a1e 1468 PREFIX_EVEX_0FDB,
1ba585e8
IT
1469 PREFIX_EVEX_0FDC,
1470 PREFIX_EVEX_0FDD,
1471 PREFIX_EVEX_0FDE,
43234a1e 1472 PREFIX_EVEX_0FDF,
1ba585e8
IT
1473 PREFIX_EVEX_0FE0,
1474 PREFIX_EVEX_0FE1,
43234a1e 1475 PREFIX_EVEX_0FE2,
1ba585e8
IT
1476 PREFIX_EVEX_0FE3,
1477 PREFIX_EVEX_0FE4,
1478 PREFIX_EVEX_0FE5,
43234a1e
L
1479 PREFIX_EVEX_0FE6,
1480 PREFIX_EVEX_0FE7,
1ba585e8
IT
1481 PREFIX_EVEX_0FE8,
1482 PREFIX_EVEX_0FE9,
1483 PREFIX_EVEX_0FEA,
43234a1e 1484 PREFIX_EVEX_0FEB,
1ba585e8
IT
1485 PREFIX_EVEX_0FEC,
1486 PREFIX_EVEX_0FED,
1487 PREFIX_EVEX_0FEE,
43234a1e 1488 PREFIX_EVEX_0FEF,
1ba585e8 1489 PREFIX_EVEX_0FF1,
43234a1e
L
1490 PREFIX_EVEX_0FF2,
1491 PREFIX_EVEX_0FF3,
1492 PREFIX_EVEX_0FF4,
1ba585e8
IT
1493 PREFIX_EVEX_0FF5,
1494 PREFIX_EVEX_0FF6,
1495 PREFIX_EVEX_0FF8,
1496 PREFIX_EVEX_0FF9,
43234a1e
L
1497 PREFIX_EVEX_0FFA,
1498 PREFIX_EVEX_0FFB,
1ba585e8
IT
1499 PREFIX_EVEX_0FFC,
1500 PREFIX_EVEX_0FFD,
43234a1e 1501 PREFIX_EVEX_0FFE,
1ba585e8
IT
1502 PREFIX_EVEX_0F3800,
1503 PREFIX_EVEX_0F3804,
1504 PREFIX_EVEX_0F380B,
43234a1e
L
1505 PREFIX_EVEX_0F380C,
1506 PREFIX_EVEX_0F380D,
1ba585e8 1507 PREFIX_EVEX_0F3810,
43234a1e
L
1508 PREFIX_EVEX_0F3811,
1509 PREFIX_EVEX_0F3812,
1510 PREFIX_EVEX_0F3813,
1511 PREFIX_EVEX_0F3814,
1512 PREFIX_EVEX_0F3815,
1513 PREFIX_EVEX_0F3816,
1514 PREFIX_EVEX_0F3818,
1515 PREFIX_EVEX_0F3819,
1516 PREFIX_EVEX_0F381A,
1517 PREFIX_EVEX_0F381B,
1ba585e8
IT
1518 PREFIX_EVEX_0F381C,
1519 PREFIX_EVEX_0F381D,
43234a1e
L
1520 PREFIX_EVEX_0F381E,
1521 PREFIX_EVEX_0F381F,
1ba585e8 1522 PREFIX_EVEX_0F3820,
43234a1e
L
1523 PREFIX_EVEX_0F3821,
1524 PREFIX_EVEX_0F3822,
1525 PREFIX_EVEX_0F3823,
1526 PREFIX_EVEX_0F3824,
1527 PREFIX_EVEX_0F3825,
1ba585e8 1528 PREFIX_EVEX_0F3826,
43234a1e
L
1529 PREFIX_EVEX_0F3827,
1530 PREFIX_EVEX_0F3828,
1531 PREFIX_EVEX_0F3829,
1532 PREFIX_EVEX_0F382A,
1ba585e8 1533 PREFIX_EVEX_0F382B,
43234a1e
L
1534 PREFIX_EVEX_0F382C,
1535 PREFIX_EVEX_0F382D,
1ba585e8 1536 PREFIX_EVEX_0F3830,
43234a1e
L
1537 PREFIX_EVEX_0F3831,
1538 PREFIX_EVEX_0F3832,
1539 PREFIX_EVEX_0F3833,
1540 PREFIX_EVEX_0F3834,
1541 PREFIX_EVEX_0F3835,
1542 PREFIX_EVEX_0F3836,
1543 PREFIX_EVEX_0F3837,
1ba585e8 1544 PREFIX_EVEX_0F3838,
43234a1e
L
1545 PREFIX_EVEX_0F3839,
1546 PREFIX_EVEX_0F383A,
1547 PREFIX_EVEX_0F383B,
1ba585e8 1548 PREFIX_EVEX_0F383C,
43234a1e 1549 PREFIX_EVEX_0F383D,
1ba585e8 1550 PREFIX_EVEX_0F383E,
43234a1e
L
1551 PREFIX_EVEX_0F383F,
1552 PREFIX_EVEX_0F3840,
1553 PREFIX_EVEX_0F3842,
1554 PREFIX_EVEX_0F3843,
1555 PREFIX_EVEX_0F3844,
1556 PREFIX_EVEX_0F3845,
1557 PREFIX_EVEX_0F3846,
1558 PREFIX_EVEX_0F3847,
1559 PREFIX_EVEX_0F384C,
1560 PREFIX_EVEX_0F384D,
1561 PREFIX_EVEX_0F384E,
1562 PREFIX_EVEX_0F384F,
47acf0bd
IT
1563 PREFIX_EVEX_0F3852,
1564 PREFIX_EVEX_0F3853,
620214f7 1565 PREFIX_EVEX_0F3855,
43234a1e
L
1566 PREFIX_EVEX_0F3858,
1567 PREFIX_EVEX_0F3859,
1568 PREFIX_EVEX_0F385A,
1569 PREFIX_EVEX_0F385B,
1570 PREFIX_EVEX_0F3864,
1571 PREFIX_EVEX_0F3865,
1ba585e8
IT
1572 PREFIX_EVEX_0F3866,
1573 PREFIX_EVEX_0F3875,
43234a1e
L
1574 PREFIX_EVEX_0F3876,
1575 PREFIX_EVEX_0F3877,
1ba585e8
IT
1576 PREFIX_EVEX_0F3878,
1577 PREFIX_EVEX_0F3879,
1578 PREFIX_EVEX_0F387A,
1579 PREFIX_EVEX_0F387B,
43234a1e 1580 PREFIX_EVEX_0F387C,
1ba585e8 1581 PREFIX_EVEX_0F387D,
43234a1e
L
1582 PREFIX_EVEX_0F387E,
1583 PREFIX_EVEX_0F387F,
14f195c9 1584 PREFIX_EVEX_0F3883,
43234a1e
L
1585 PREFIX_EVEX_0F3888,
1586 PREFIX_EVEX_0F3889,
1587 PREFIX_EVEX_0F388A,
1588 PREFIX_EVEX_0F388B,
1ba585e8 1589 PREFIX_EVEX_0F388D,
43234a1e
L
1590 PREFIX_EVEX_0F3890,
1591 PREFIX_EVEX_0F3891,
1592 PREFIX_EVEX_0F3892,
1593 PREFIX_EVEX_0F3893,
1594 PREFIX_EVEX_0F3896,
1595 PREFIX_EVEX_0F3897,
1596 PREFIX_EVEX_0F3898,
1597 PREFIX_EVEX_0F3899,
1598 PREFIX_EVEX_0F389A,
1599 PREFIX_EVEX_0F389B,
1600 PREFIX_EVEX_0F389C,
1601 PREFIX_EVEX_0F389D,
1602 PREFIX_EVEX_0F389E,
1603 PREFIX_EVEX_0F389F,
1604 PREFIX_EVEX_0F38A0,
1605 PREFIX_EVEX_0F38A1,
1606 PREFIX_EVEX_0F38A2,
1607 PREFIX_EVEX_0F38A3,
1608 PREFIX_EVEX_0F38A6,
1609 PREFIX_EVEX_0F38A7,
1610 PREFIX_EVEX_0F38A8,
1611 PREFIX_EVEX_0F38A9,
1612 PREFIX_EVEX_0F38AA,
1613 PREFIX_EVEX_0F38AB,
1614 PREFIX_EVEX_0F38AC,
1615 PREFIX_EVEX_0F38AD,
1616 PREFIX_EVEX_0F38AE,
1617 PREFIX_EVEX_0F38AF,
2cc1b5aa
IT
1618 PREFIX_EVEX_0F38B4,
1619 PREFIX_EVEX_0F38B5,
43234a1e
L
1620 PREFIX_EVEX_0F38B6,
1621 PREFIX_EVEX_0F38B7,
1622 PREFIX_EVEX_0F38B8,
1623 PREFIX_EVEX_0F38B9,
1624 PREFIX_EVEX_0F38BA,
1625 PREFIX_EVEX_0F38BB,
1626 PREFIX_EVEX_0F38BC,
1627 PREFIX_EVEX_0F38BD,
1628 PREFIX_EVEX_0F38BE,
1629 PREFIX_EVEX_0F38BF,
1630 PREFIX_EVEX_0F38C4,
1631 PREFIX_EVEX_0F38C6_REG_1,
1632 PREFIX_EVEX_0F38C6_REG_2,
1633 PREFIX_EVEX_0F38C6_REG_5,
1634 PREFIX_EVEX_0F38C6_REG_6,
1635 PREFIX_EVEX_0F38C7_REG_1,
1636 PREFIX_EVEX_0F38C7_REG_2,
1637 PREFIX_EVEX_0F38C7_REG_5,
1638 PREFIX_EVEX_0F38C7_REG_6,
1639 PREFIX_EVEX_0F38C8,
1640 PREFIX_EVEX_0F38CA,
1641 PREFIX_EVEX_0F38CB,
1642 PREFIX_EVEX_0F38CC,
1643 PREFIX_EVEX_0F38CD,
1644
1645 PREFIX_EVEX_0F3A00,
1646 PREFIX_EVEX_0F3A01,
1647 PREFIX_EVEX_0F3A03,
1648 PREFIX_EVEX_0F3A04,
1649 PREFIX_EVEX_0F3A05,
1650 PREFIX_EVEX_0F3A08,
1651 PREFIX_EVEX_0F3A09,
1652 PREFIX_EVEX_0F3A0A,
1653 PREFIX_EVEX_0F3A0B,
1ba585e8
IT
1654 PREFIX_EVEX_0F3A0F,
1655 PREFIX_EVEX_0F3A14,
1656 PREFIX_EVEX_0F3A15,
90a915bf 1657 PREFIX_EVEX_0F3A16,
43234a1e
L
1658 PREFIX_EVEX_0F3A17,
1659 PREFIX_EVEX_0F3A18,
1660 PREFIX_EVEX_0F3A19,
1661 PREFIX_EVEX_0F3A1A,
1662 PREFIX_EVEX_0F3A1B,
1663 PREFIX_EVEX_0F3A1D,
1664 PREFIX_EVEX_0F3A1E,
1665 PREFIX_EVEX_0F3A1F,
1ba585e8 1666 PREFIX_EVEX_0F3A20,
43234a1e 1667 PREFIX_EVEX_0F3A21,
90a915bf 1668 PREFIX_EVEX_0F3A22,
43234a1e
L
1669 PREFIX_EVEX_0F3A23,
1670 PREFIX_EVEX_0F3A25,
1671 PREFIX_EVEX_0F3A26,
1672 PREFIX_EVEX_0F3A27,
1673 PREFIX_EVEX_0F3A38,
1674 PREFIX_EVEX_0F3A39,
1675 PREFIX_EVEX_0F3A3A,
1676 PREFIX_EVEX_0F3A3B,
1ba585e8
IT
1677 PREFIX_EVEX_0F3A3E,
1678 PREFIX_EVEX_0F3A3F,
1679 PREFIX_EVEX_0F3A42,
43234a1e 1680 PREFIX_EVEX_0F3A43,
90a915bf
IT
1681 PREFIX_EVEX_0F3A50,
1682 PREFIX_EVEX_0F3A51,
43234a1e 1683 PREFIX_EVEX_0F3A54,
90a915bf
IT
1684 PREFIX_EVEX_0F3A55,
1685 PREFIX_EVEX_0F3A56,
1686 PREFIX_EVEX_0F3A57,
1687 PREFIX_EVEX_0F3A66,
1688 PREFIX_EVEX_0F3A67
51e7da1b 1689};
4e7d34a6 1690
51e7da1b
L
1691enum
1692{
1693 X86_64_06 = 0,
3873ba12
L
1694 X86_64_07,
1695 X86_64_0D,
1696 X86_64_16,
1697 X86_64_17,
1698 X86_64_1E,
1699 X86_64_1F,
1700 X86_64_27,
1701 X86_64_2F,
1702 X86_64_37,
1703 X86_64_3F,
1704 X86_64_60,
1705 X86_64_61,
1706 X86_64_62,
1707 X86_64_63,
1708 X86_64_6D,
1709 X86_64_6F,
d039fef3 1710 X86_64_82,
3873ba12
L
1711 X86_64_9A,
1712 X86_64_C4,
1713 X86_64_C5,
1714 X86_64_CE,
1715 X86_64_D4,
1716 X86_64_D5,
a72d2af2
L
1717 X86_64_E8,
1718 X86_64_E9,
3873ba12
L
1719 X86_64_EA,
1720 X86_64_0F01_REG_0,
1721 X86_64_0F01_REG_1,
1722 X86_64_0F01_REG_2,
1723 X86_64_0F01_REG_3
51e7da1b 1724};
4e7d34a6 1725
51e7da1b
L
1726enum
1727{
1728 THREE_BYTE_0F38 = 0,
1f334aeb 1729 THREE_BYTE_0F3A
51e7da1b 1730};
4e7d34a6 1731
f88c9eb0
SP
1732enum
1733{
5dd85c99
SP
1734 XOP_08 = 0,
1735 XOP_09,
f88c9eb0
SP
1736 XOP_0A
1737};
1738
51e7da1b
L
1739enum
1740{
1741 VEX_0F = 0,
3873ba12
L
1742 VEX_0F38,
1743 VEX_0F3A
51e7da1b 1744};
c0f3af97 1745
43234a1e
L
1746enum
1747{
1748 EVEX_0F = 0,
1749 EVEX_0F38,
1750 EVEX_0F3A
1751};
1752
51e7da1b
L
1753enum
1754{
592a252b
L
1755 VEX_LEN_0F10_P_1 = 0,
1756 VEX_LEN_0F10_P_3,
1757 VEX_LEN_0F11_P_1,
1758 VEX_LEN_0F11_P_3,
1759 VEX_LEN_0F12_P_0_M_0,
1760 VEX_LEN_0F12_P_0_M_1,
1761 VEX_LEN_0F12_P_2,
1762 VEX_LEN_0F13_M_0,
1763 VEX_LEN_0F16_P_0_M_0,
1764 VEX_LEN_0F16_P_0_M_1,
1765 VEX_LEN_0F16_P_2,
1766 VEX_LEN_0F17_M_0,
1767 VEX_LEN_0F2A_P_1,
1768 VEX_LEN_0F2A_P_3,
1769 VEX_LEN_0F2C_P_1,
1770 VEX_LEN_0F2C_P_3,
1771 VEX_LEN_0F2D_P_1,
1772 VEX_LEN_0F2D_P_3,
1773 VEX_LEN_0F2E_P_0,
1774 VEX_LEN_0F2E_P_2,
1775 VEX_LEN_0F2F_P_0,
1776 VEX_LEN_0F2F_P_2,
43234a1e 1777 VEX_LEN_0F41_P_0,
1ba585e8 1778 VEX_LEN_0F41_P_2,
43234a1e 1779 VEX_LEN_0F42_P_0,
1ba585e8 1780 VEX_LEN_0F42_P_2,
43234a1e 1781 VEX_LEN_0F44_P_0,
1ba585e8 1782 VEX_LEN_0F44_P_2,
43234a1e 1783 VEX_LEN_0F45_P_0,
1ba585e8 1784 VEX_LEN_0F45_P_2,
43234a1e 1785 VEX_LEN_0F46_P_0,
1ba585e8 1786 VEX_LEN_0F46_P_2,
43234a1e 1787 VEX_LEN_0F47_P_0,
1ba585e8
IT
1788 VEX_LEN_0F47_P_2,
1789 VEX_LEN_0F4A_P_0,
1790 VEX_LEN_0F4A_P_2,
1791 VEX_LEN_0F4B_P_0,
43234a1e 1792 VEX_LEN_0F4B_P_2,
592a252b
L
1793 VEX_LEN_0F51_P_1,
1794 VEX_LEN_0F51_P_3,
1795 VEX_LEN_0F52_P_1,
1796 VEX_LEN_0F53_P_1,
1797 VEX_LEN_0F58_P_1,
1798 VEX_LEN_0F58_P_3,
1799 VEX_LEN_0F59_P_1,
1800 VEX_LEN_0F59_P_3,
1801 VEX_LEN_0F5A_P_1,
1802 VEX_LEN_0F5A_P_3,
1803 VEX_LEN_0F5C_P_1,
1804 VEX_LEN_0F5C_P_3,
1805 VEX_LEN_0F5D_P_1,
1806 VEX_LEN_0F5D_P_3,
1807 VEX_LEN_0F5E_P_1,
1808 VEX_LEN_0F5E_P_3,
1809 VEX_LEN_0F5F_P_1,
1810 VEX_LEN_0F5F_P_3,
592a252b 1811 VEX_LEN_0F6E_P_2,
592a252b
L
1812 VEX_LEN_0F7E_P_1,
1813 VEX_LEN_0F7E_P_2,
43234a1e 1814 VEX_LEN_0F90_P_0,
1ba585e8 1815 VEX_LEN_0F90_P_2,
43234a1e 1816 VEX_LEN_0F91_P_0,
1ba585e8 1817 VEX_LEN_0F91_P_2,
43234a1e 1818 VEX_LEN_0F92_P_0,
90a915bf 1819 VEX_LEN_0F92_P_2,
1ba585e8 1820 VEX_LEN_0F92_P_3,
43234a1e 1821 VEX_LEN_0F93_P_0,
90a915bf 1822 VEX_LEN_0F93_P_2,
1ba585e8 1823 VEX_LEN_0F93_P_3,
43234a1e 1824 VEX_LEN_0F98_P_0,
1ba585e8
IT
1825 VEX_LEN_0F98_P_2,
1826 VEX_LEN_0F99_P_0,
1827 VEX_LEN_0F99_P_2,
592a252b
L
1828 VEX_LEN_0FAE_R_2_M_0,
1829 VEX_LEN_0FAE_R_3_M_0,
1830 VEX_LEN_0FC2_P_1,
1831 VEX_LEN_0FC2_P_3,
1832 VEX_LEN_0FC4_P_2,
1833 VEX_LEN_0FC5_P_2,
592a252b 1834 VEX_LEN_0FD6_P_2,
592a252b 1835 VEX_LEN_0FF7_P_2,
6c30d220
L
1836 VEX_LEN_0F3816_P_2,
1837 VEX_LEN_0F3819_P_2,
592a252b 1838 VEX_LEN_0F381A_P_2_M_0,
6c30d220 1839 VEX_LEN_0F3836_P_2,
592a252b 1840 VEX_LEN_0F3841_P_2,
6c30d220 1841 VEX_LEN_0F385A_P_2_M_0,
592a252b
L
1842 VEX_LEN_0F38DB_P_2,
1843 VEX_LEN_0F38DC_P_2,
1844 VEX_LEN_0F38DD_P_2,
1845 VEX_LEN_0F38DE_P_2,
1846 VEX_LEN_0F38DF_P_2,
f12dc422
L
1847 VEX_LEN_0F38F2_P_0,
1848 VEX_LEN_0F38F3_R_1_P_0,
1849 VEX_LEN_0F38F3_R_2_P_0,
1850 VEX_LEN_0F38F3_R_3_P_0,
6c30d220
L
1851 VEX_LEN_0F38F5_P_0,
1852 VEX_LEN_0F38F5_P_1,
1853 VEX_LEN_0F38F5_P_3,
1854 VEX_LEN_0F38F6_P_3,
f12dc422 1855 VEX_LEN_0F38F7_P_0,
6c30d220
L
1856 VEX_LEN_0F38F7_P_1,
1857 VEX_LEN_0F38F7_P_2,
1858 VEX_LEN_0F38F7_P_3,
1859 VEX_LEN_0F3A00_P_2,
1860 VEX_LEN_0F3A01_P_2,
592a252b
L
1861 VEX_LEN_0F3A06_P_2,
1862 VEX_LEN_0F3A0A_P_2,
1863 VEX_LEN_0F3A0B_P_2,
592a252b
L
1864 VEX_LEN_0F3A14_P_2,
1865 VEX_LEN_0F3A15_P_2,
1866 VEX_LEN_0F3A16_P_2,
1867 VEX_LEN_0F3A17_P_2,
1868 VEX_LEN_0F3A18_P_2,
1869 VEX_LEN_0F3A19_P_2,
1870 VEX_LEN_0F3A20_P_2,
1871 VEX_LEN_0F3A21_P_2,
1872 VEX_LEN_0F3A22_P_2,
43234a1e 1873 VEX_LEN_0F3A30_P_2,
1ba585e8 1874 VEX_LEN_0F3A31_P_2,
43234a1e 1875 VEX_LEN_0F3A32_P_2,
1ba585e8 1876 VEX_LEN_0F3A33_P_2,
6c30d220
L
1877 VEX_LEN_0F3A38_P_2,
1878 VEX_LEN_0F3A39_P_2,
592a252b 1879 VEX_LEN_0F3A41_P_2,
592a252b 1880 VEX_LEN_0F3A44_P_2,
6c30d220 1881 VEX_LEN_0F3A46_P_2,
592a252b
L
1882 VEX_LEN_0F3A60_P_2,
1883 VEX_LEN_0F3A61_P_2,
1884 VEX_LEN_0F3A62_P_2,
1885 VEX_LEN_0F3A63_P_2,
1886 VEX_LEN_0F3A6A_P_2,
1887 VEX_LEN_0F3A6B_P_2,
1888 VEX_LEN_0F3A6E_P_2,
1889 VEX_LEN_0F3A6F_P_2,
1890 VEX_LEN_0F3A7A_P_2,
1891 VEX_LEN_0F3A7B_P_2,
1892 VEX_LEN_0F3A7E_P_2,
1893 VEX_LEN_0F3A7F_P_2,
1894 VEX_LEN_0F3ADF_P_2,
6c30d220 1895 VEX_LEN_0F3AF0_P_3,
ff688e1f
L
1896 VEX_LEN_0FXOP_08_CC,
1897 VEX_LEN_0FXOP_08_CD,
1898 VEX_LEN_0FXOP_08_CE,
1899 VEX_LEN_0FXOP_08_CF,
1900 VEX_LEN_0FXOP_08_EC,
1901 VEX_LEN_0FXOP_08_ED,
1902 VEX_LEN_0FXOP_08_EE,
1903 VEX_LEN_0FXOP_08_EF,
592a252b
L
1904 VEX_LEN_0FXOP_09_80,
1905 VEX_LEN_0FXOP_09_81
51e7da1b 1906};
c0f3af97 1907
9e30b8e0
L
1908enum
1909{
592a252b
L
1910 VEX_W_0F10_P_0 = 0,
1911 VEX_W_0F10_P_1,
1912 VEX_W_0F10_P_2,
1913 VEX_W_0F10_P_3,
1914 VEX_W_0F11_P_0,
1915 VEX_W_0F11_P_1,
1916 VEX_W_0F11_P_2,
1917 VEX_W_0F11_P_3,
1918 VEX_W_0F12_P_0_M_0,
1919 VEX_W_0F12_P_0_M_1,
1920 VEX_W_0F12_P_1,
1921 VEX_W_0F12_P_2,
1922 VEX_W_0F12_P_3,
1923 VEX_W_0F13_M_0,
1924 VEX_W_0F14,
1925 VEX_W_0F15,
1926 VEX_W_0F16_P_0_M_0,
1927 VEX_W_0F16_P_0_M_1,
1928 VEX_W_0F16_P_1,
1929 VEX_W_0F16_P_2,
1930 VEX_W_0F17_M_0,
1931 VEX_W_0F28,
1932 VEX_W_0F29,
1933 VEX_W_0F2B_M_0,
1934 VEX_W_0F2E_P_0,
1935 VEX_W_0F2E_P_2,
1936 VEX_W_0F2F_P_0,
1937 VEX_W_0F2F_P_2,
43234a1e 1938 VEX_W_0F41_P_0_LEN_1,
1ba585e8 1939 VEX_W_0F41_P_2_LEN_1,
43234a1e 1940 VEX_W_0F42_P_0_LEN_1,
1ba585e8 1941 VEX_W_0F42_P_2_LEN_1,
43234a1e 1942 VEX_W_0F44_P_0_LEN_0,
1ba585e8 1943 VEX_W_0F44_P_2_LEN_0,
43234a1e 1944 VEX_W_0F45_P_0_LEN_1,
1ba585e8 1945 VEX_W_0F45_P_2_LEN_1,
43234a1e 1946 VEX_W_0F46_P_0_LEN_1,
1ba585e8 1947 VEX_W_0F46_P_2_LEN_1,
43234a1e 1948 VEX_W_0F47_P_0_LEN_1,
1ba585e8
IT
1949 VEX_W_0F47_P_2_LEN_1,
1950 VEX_W_0F4A_P_0_LEN_1,
1951 VEX_W_0F4A_P_2_LEN_1,
1952 VEX_W_0F4B_P_0_LEN_1,
43234a1e 1953 VEX_W_0F4B_P_2_LEN_1,
592a252b
L
1954 VEX_W_0F50_M_0,
1955 VEX_W_0F51_P_0,
1956 VEX_W_0F51_P_1,
1957 VEX_W_0F51_P_2,
1958 VEX_W_0F51_P_3,
1959 VEX_W_0F52_P_0,
1960 VEX_W_0F52_P_1,
1961 VEX_W_0F53_P_0,
1962 VEX_W_0F53_P_1,
1963 VEX_W_0F58_P_0,
1964 VEX_W_0F58_P_1,
1965 VEX_W_0F58_P_2,
1966 VEX_W_0F58_P_3,
1967 VEX_W_0F59_P_0,
1968 VEX_W_0F59_P_1,
1969 VEX_W_0F59_P_2,
1970 VEX_W_0F59_P_3,
1971 VEX_W_0F5A_P_0,
1972 VEX_W_0F5A_P_1,
1973 VEX_W_0F5A_P_3,
1974 VEX_W_0F5B_P_0,
1975 VEX_W_0F5B_P_1,
1976 VEX_W_0F5B_P_2,
1977 VEX_W_0F5C_P_0,
1978 VEX_W_0F5C_P_1,
1979 VEX_W_0F5C_P_2,
1980 VEX_W_0F5C_P_3,
1981 VEX_W_0F5D_P_0,
1982 VEX_W_0F5D_P_1,
1983 VEX_W_0F5D_P_2,
1984 VEX_W_0F5D_P_3,
1985 VEX_W_0F5E_P_0,
1986 VEX_W_0F5E_P_1,
1987 VEX_W_0F5E_P_2,
1988 VEX_W_0F5E_P_3,
1989 VEX_W_0F5F_P_0,
1990 VEX_W_0F5F_P_1,
1991 VEX_W_0F5F_P_2,
1992 VEX_W_0F5F_P_3,
1993 VEX_W_0F60_P_2,
1994 VEX_W_0F61_P_2,
1995 VEX_W_0F62_P_2,
1996 VEX_W_0F63_P_2,
1997 VEX_W_0F64_P_2,
1998 VEX_W_0F65_P_2,
1999 VEX_W_0F66_P_2,
2000 VEX_W_0F67_P_2,
2001 VEX_W_0F68_P_2,
2002 VEX_W_0F69_P_2,
2003 VEX_W_0F6A_P_2,
2004 VEX_W_0F6B_P_2,
2005 VEX_W_0F6C_P_2,
2006 VEX_W_0F6D_P_2,
2007 VEX_W_0F6F_P_1,
2008 VEX_W_0F6F_P_2,
2009 VEX_W_0F70_P_1,
2010 VEX_W_0F70_P_2,
2011 VEX_W_0F70_P_3,
2012 VEX_W_0F71_R_2_P_2,
2013 VEX_W_0F71_R_4_P_2,
2014 VEX_W_0F71_R_6_P_2,
2015 VEX_W_0F72_R_2_P_2,
2016 VEX_W_0F72_R_4_P_2,
2017 VEX_W_0F72_R_6_P_2,
2018 VEX_W_0F73_R_2_P_2,
2019 VEX_W_0F73_R_3_P_2,
2020 VEX_W_0F73_R_6_P_2,
2021 VEX_W_0F73_R_7_P_2,
2022 VEX_W_0F74_P_2,
2023 VEX_W_0F75_P_2,
2024 VEX_W_0F76_P_2,
2025 VEX_W_0F77_P_0,
2026 VEX_W_0F7C_P_2,
2027 VEX_W_0F7C_P_3,
2028 VEX_W_0F7D_P_2,
2029 VEX_W_0F7D_P_3,
2030 VEX_W_0F7E_P_1,
2031 VEX_W_0F7F_P_1,
2032 VEX_W_0F7F_P_2,
43234a1e 2033 VEX_W_0F90_P_0_LEN_0,
1ba585e8 2034 VEX_W_0F90_P_2_LEN_0,
43234a1e 2035 VEX_W_0F91_P_0_LEN_0,
1ba585e8 2036 VEX_W_0F91_P_2_LEN_0,
43234a1e 2037 VEX_W_0F92_P_0_LEN_0,
90a915bf 2038 VEX_W_0F92_P_2_LEN_0,
1ba585e8 2039 VEX_W_0F92_P_3_LEN_0,
43234a1e 2040 VEX_W_0F93_P_0_LEN_0,
90a915bf 2041 VEX_W_0F93_P_2_LEN_0,
1ba585e8 2042 VEX_W_0F93_P_3_LEN_0,
43234a1e 2043 VEX_W_0F98_P_0_LEN_0,
1ba585e8
IT
2044 VEX_W_0F98_P_2_LEN_0,
2045 VEX_W_0F99_P_0_LEN_0,
2046 VEX_W_0F99_P_2_LEN_0,
592a252b
L
2047 VEX_W_0FAE_R_2_M_0,
2048 VEX_W_0FAE_R_3_M_0,
2049 VEX_W_0FC2_P_0,
2050 VEX_W_0FC2_P_1,
2051 VEX_W_0FC2_P_2,
2052 VEX_W_0FC2_P_3,
2053 VEX_W_0FC4_P_2,
2054 VEX_W_0FC5_P_2,
2055 VEX_W_0FD0_P_2,
2056 VEX_W_0FD0_P_3,
2057 VEX_W_0FD1_P_2,
2058 VEX_W_0FD2_P_2,
2059 VEX_W_0FD3_P_2,
2060 VEX_W_0FD4_P_2,
2061 VEX_W_0FD5_P_2,
2062 VEX_W_0FD6_P_2,
2063 VEX_W_0FD7_P_2_M_1,
2064 VEX_W_0FD8_P_2,
2065 VEX_W_0FD9_P_2,
2066 VEX_W_0FDA_P_2,
2067 VEX_W_0FDB_P_2,
2068 VEX_W_0FDC_P_2,
2069 VEX_W_0FDD_P_2,
2070 VEX_W_0FDE_P_2,
2071 VEX_W_0FDF_P_2,
2072 VEX_W_0FE0_P_2,
2073 VEX_W_0FE1_P_2,
2074 VEX_W_0FE2_P_2,
2075 VEX_W_0FE3_P_2,
2076 VEX_W_0FE4_P_2,
2077 VEX_W_0FE5_P_2,
2078 VEX_W_0FE6_P_1,
2079 VEX_W_0FE6_P_2,
2080 VEX_W_0FE6_P_3,
2081 VEX_W_0FE7_P_2_M_0,
2082 VEX_W_0FE8_P_2,
2083 VEX_W_0FE9_P_2,
2084 VEX_W_0FEA_P_2,
2085 VEX_W_0FEB_P_2,
2086 VEX_W_0FEC_P_2,
2087 VEX_W_0FED_P_2,
2088 VEX_W_0FEE_P_2,
2089 VEX_W_0FEF_P_2,
2090 VEX_W_0FF0_P_3_M_0,
2091 VEX_W_0FF1_P_2,
2092 VEX_W_0FF2_P_2,
2093 VEX_W_0FF3_P_2,
2094 VEX_W_0FF4_P_2,
2095 VEX_W_0FF5_P_2,
2096 VEX_W_0FF6_P_2,
2097 VEX_W_0FF7_P_2,
2098 VEX_W_0FF8_P_2,
2099 VEX_W_0FF9_P_2,
2100 VEX_W_0FFA_P_2,
2101 VEX_W_0FFB_P_2,
2102 VEX_W_0FFC_P_2,
2103 VEX_W_0FFD_P_2,
2104 VEX_W_0FFE_P_2,
2105 VEX_W_0F3800_P_2,
2106 VEX_W_0F3801_P_2,
2107 VEX_W_0F3802_P_2,
2108 VEX_W_0F3803_P_2,
2109 VEX_W_0F3804_P_2,
2110 VEX_W_0F3805_P_2,
2111 VEX_W_0F3806_P_2,
2112 VEX_W_0F3807_P_2,
2113 VEX_W_0F3808_P_2,
2114 VEX_W_0F3809_P_2,
2115 VEX_W_0F380A_P_2,
2116 VEX_W_0F380B_P_2,
2117 VEX_W_0F380C_P_2,
2118 VEX_W_0F380D_P_2,
2119 VEX_W_0F380E_P_2,
2120 VEX_W_0F380F_P_2,
6c30d220 2121 VEX_W_0F3816_P_2,
592a252b 2122 VEX_W_0F3817_P_2,
6c30d220
L
2123 VEX_W_0F3818_P_2,
2124 VEX_W_0F3819_P_2,
592a252b
L
2125 VEX_W_0F381A_P_2_M_0,
2126 VEX_W_0F381C_P_2,
2127 VEX_W_0F381D_P_2,
2128 VEX_W_0F381E_P_2,
2129 VEX_W_0F3820_P_2,
2130 VEX_W_0F3821_P_2,
2131 VEX_W_0F3822_P_2,
2132 VEX_W_0F3823_P_2,
2133 VEX_W_0F3824_P_2,
2134 VEX_W_0F3825_P_2,
2135 VEX_W_0F3828_P_2,
2136 VEX_W_0F3829_P_2,
2137 VEX_W_0F382A_P_2_M_0,
2138 VEX_W_0F382B_P_2,
2139 VEX_W_0F382C_P_2_M_0,
2140 VEX_W_0F382D_P_2_M_0,
2141 VEX_W_0F382E_P_2_M_0,
2142 VEX_W_0F382F_P_2_M_0,
2143 VEX_W_0F3830_P_2,
2144 VEX_W_0F3831_P_2,
2145 VEX_W_0F3832_P_2,
2146 VEX_W_0F3833_P_2,
2147 VEX_W_0F3834_P_2,
2148 VEX_W_0F3835_P_2,
6c30d220 2149 VEX_W_0F3836_P_2,
592a252b
L
2150 VEX_W_0F3837_P_2,
2151 VEX_W_0F3838_P_2,
2152 VEX_W_0F3839_P_2,
2153 VEX_W_0F383A_P_2,
2154 VEX_W_0F383B_P_2,
2155 VEX_W_0F383C_P_2,
2156 VEX_W_0F383D_P_2,
2157 VEX_W_0F383E_P_2,
2158 VEX_W_0F383F_P_2,
2159 VEX_W_0F3840_P_2,
2160 VEX_W_0F3841_P_2,
6c30d220
L
2161 VEX_W_0F3846_P_2,
2162 VEX_W_0F3858_P_2,
2163 VEX_W_0F3859_P_2,
2164 VEX_W_0F385A_P_2_M_0,
2165 VEX_W_0F3878_P_2,
2166 VEX_W_0F3879_P_2,
592a252b
L
2167 VEX_W_0F38DB_P_2,
2168 VEX_W_0F38DC_P_2,
2169 VEX_W_0F38DD_P_2,
2170 VEX_W_0F38DE_P_2,
2171 VEX_W_0F38DF_P_2,
6c30d220
L
2172 VEX_W_0F3A00_P_2,
2173 VEX_W_0F3A01_P_2,
2174 VEX_W_0F3A02_P_2,
592a252b
L
2175 VEX_W_0F3A04_P_2,
2176 VEX_W_0F3A05_P_2,
2177 VEX_W_0F3A06_P_2,
2178 VEX_W_0F3A08_P_2,
2179 VEX_W_0F3A09_P_2,
2180 VEX_W_0F3A0A_P_2,
2181 VEX_W_0F3A0B_P_2,
2182 VEX_W_0F3A0C_P_2,
2183 VEX_W_0F3A0D_P_2,
2184 VEX_W_0F3A0E_P_2,
2185 VEX_W_0F3A0F_P_2,
2186 VEX_W_0F3A14_P_2,
2187 VEX_W_0F3A15_P_2,
2188 VEX_W_0F3A18_P_2,
2189 VEX_W_0F3A19_P_2,
2190 VEX_W_0F3A20_P_2,
2191 VEX_W_0F3A21_P_2,
43234a1e 2192 VEX_W_0F3A30_P_2_LEN_0,
1ba585e8 2193 VEX_W_0F3A31_P_2_LEN_0,
43234a1e 2194 VEX_W_0F3A32_P_2_LEN_0,
1ba585e8 2195 VEX_W_0F3A33_P_2_LEN_0,
6c30d220
L
2196 VEX_W_0F3A38_P_2,
2197 VEX_W_0F3A39_P_2,
592a252b
L
2198 VEX_W_0F3A40_P_2,
2199 VEX_W_0F3A41_P_2,
2200 VEX_W_0F3A42_P_2,
2201 VEX_W_0F3A44_P_2,
6c30d220 2202 VEX_W_0F3A46_P_2,
592a252b
L
2203 VEX_W_0F3A48_P_2,
2204 VEX_W_0F3A49_P_2,
2205 VEX_W_0F3A4A_P_2,
2206 VEX_W_0F3A4B_P_2,
2207 VEX_W_0F3A4C_P_2,
592a252b
L
2208 VEX_W_0F3A62_P_2,
2209 VEX_W_0F3A63_P_2,
43234a1e
L
2210 VEX_W_0F3ADF_P_2,
2211
2212 EVEX_W_0F10_P_0,
2213 EVEX_W_0F10_P_1_M_0,
2214 EVEX_W_0F10_P_1_M_1,
2215 EVEX_W_0F10_P_2,
2216 EVEX_W_0F10_P_3_M_0,
2217 EVEX_W_0F10_P_3_M_1,
2218 EVEX_W_0F11_P_0,
2219 EVEX_W_0F11_P_1_M_0,
2220 EVEX_W_0F11_P_1_M_1,
2221 EVEX_W_0F11_P_2,
2222 EVEX_W_0F11_P_3_M_0,
2223 EVEX_W_0F11_P_3_M_1,
2224 EVEX_W_0F12_P_0_M_0,
2225 EVEX_W_0F12_P_0_M_1,
2226 EVEX_W_0F12_P_1,
2227 EVEX_W_0F12_P_2,
2228 EVEX_W_0F12_P_3,
2229 EVEX_W_0F13_P_0,
2230 EVEX_W_0F13_P_2,
2231 EVEX_W_0F14_P_0,
2232 EVEX_W_0F14_P_2,
2233 EVEX_W_0F15_P_0,
2234 EVEX_W_0F15_P_2,
2235 EVEX_W_0F16_P_0_M_0,
2236 EVEX_W_0F16_P_0_M_1,
2237 EVEX_W_0F16_P_1,
2238 EVEX_W_0F16_P_2,
2239 EVEX_W_0F17_P_0,
2240 EVEX_W_0F17_P_2,
2241 EVEX_W_0F28_P_0,
2242 EVEX_W_0F28_P_2,
2243 EVEX_W_0F29_P_0,
2244 EVEX_W_0F29_P_2,
2245 EVEX_W_0F2A_P_1,
2246 EVEX_W_0F2A_P_3,
2247 EVEX_W_0F2B_P_0,
2248 EVEX_W_0F2B_P_2,
2249 EVEX_W_0F2E_P_0,
2250 EVEX_W_0F2E_P_2,
2251 EVEX_W_0F2F_P_0,
2252 EVEX_W_0F2F_P_2,
2253 EVEX_W_0F51_P_0,
2254 EVEX_W_0F51_P_1,
2255 EVEX_W_0F51_P_2,
2256 EVEX_W_0F51_P_3,
90a915bf
IT
2257 EVEX_W_0F54_P_0,
2258 EVEX_W_0F54_P_2,
2259 EVEX_W_0F55_P_0,
2260 EVEX_W_0F55_P_2,
2261 EVEX_W_0F56_P_0,
2262 EVEX_W_0F56_P_2,
2263 EVEX_W_0F57_P_0,
2264 EVEX_W_0F57_P_2,
43234a1e
L
2265 EVEX_W_0F58_P_0,
2266 EVEX_W_0F58_P_1,
2267 EVEX_W_0F58_P_2,
2268 EVEX_W_0F58_P_3,
2269 EVEX_W_0F59_P_0,
2270 EVEX_W_0F59_P_1,
2271 EVEX_W_0F59_P_2,
2272 EVEX_W_0F59_P_3,
2273 EVEX_W_0F5A_P_0,
2274 EVEX_W_0F5A_P_1,
2275 EVEX_W_0F5A_P_2,
2276 EVEX_W_0F5A_P_3,
2277 EVEX_W_0F5B_P_0,
2278 EVEX_W_0F5B_P_1,
2279 EVEX_W_0F5B_P_2,
2280 EVEX_W_0F5C_P_0,
2281 EVEX_W_0F5C_P_1,
2282 EVEX_W_0F5C_P_2,
2283 EVEX_W_0F5C_P_3,
2284 EVEX_W_0F5D_P_0,
2285 EVEX_W_0F5D_P_1,
2286 EVEX_W_0F5D_P_2,
2287 EVEX_W_0F5D_P_3,
2288 EVEX_W_0F5E_P_0,
2289 EVEX_W_0F5E_P_1,
2290 EVEX_W_0F5E_P_2,
2291 EVEX_W_0F5E_P_3,
2292 EVEX_W_0F5F_P_0,
2293 EVEX_W_0F5F_P_1,
2294 EVEX_W_0F5F_P_2,
2295 EVEX_W_0F5F_P_3,
2296 EVEX_W_0F62_P_2,
2297 EVEX_W_0F66_P_2,
2298 EVEX_W_0F6A_P_2,
1ba585e8 2299 EVEX_W_0F6B_P_2,
43234a1e
L
2300 EVEX_W_0F6C_P_2,
2301 EVEX_W_0F6D_P_2,
2302 EVEX_W_0F6E_P_2,
2303 EVEX_W_0F6F_P_1,
2304 EVEX_W_0F6F_P_2,
1ba585e8 2305 EVEX_W_0F6F_P_3,
43234a1e
L
2306 EVEX_W_0F70_P_2,
2307 EVEX_W_0F72_R_2_P_2,
2308 EVEX_W_0F72_R_6_P_2,
2309 EVEX_W_0F73_R_2_P_2,
2310 EVEX_W_0F73_R_6_P_2,
2311 EVEX_W_0F76_P_2,
2312 EVEX_W_0F78_P_0,
90a915bf 2313 EVEX_W_0F78_P_2,
43234a1e 2314 EVEX_W_0F79_P_0,
90a915bf 2315 EVEX_W_0F79_P_2,
43234a1e 2316 EVEX_W_0F7A_P_1,
90a915bf 2317 EVEX_W_0F7A_P_2,
43234a1e
L
2318 EVEX_W_0F7A_P_3,
2319 EVEX_W_0F7B_P_1,
90a915bf 2320 EVEX_W_0F7B_P_2,
43234a1e
L
2321 EVEX_W_0F7B_P_3,
2322 EVEX_W_0F7E_P_1,
2323 EVEX_W_0F7E_P_2,
2324 EVEX_W_0F7F_P_1,
2325 EVEX_W_0F7F_P_2,
1ba585e8 2326 EVEX_W_0F7F_P_3,
43234a1e
L
2327 EVEX_W_0FC2_P_0,
2328 EVEX_W_0FC2_P_1,
2329 EVEX_W_0FC2_P_2,
2330 EVEX_W_0FC2_P_3,
2331 EVEX_W_0FC6_P_0,
2332 EVEX_W_0FC6_P_2,
2333 EVEX_W_0FD2_P_2,
2334 EVEX_W_0FD3_P_2,
2335 EVEX_W_0FD4_P_2,
2336 EVEX_W_0FD6_P_2,
2337 EVEX_W_0FE6_P_1,
2338 EVEX_W_0FE6_P_2,
2339 EVEX_W_0FE6_P_3,
2340 EVEX_W_0FE7_P_2,
2341 EVEX_W_0FF2_P_2,
2342 EVEX_W_0FF3_P_2,
2343 EVEX_W_0FF4_P_2,
2344 EVEX_W_0FFA_P_2,
2345 EVEX_W_0FFB_P_2,
2346 EVEX_W_0FFE_P_2,
2347 EVEX_W_0F380C_P_2,
2348 EVEX_W_0F380D_P_2,
1ba585e8
IT
2349 EVEX_W_0F3810_P_1,
2350 EVEX_W_0F3810_P_2,
43234a1e 2351 EVEX_W_0F3811_P_1,
1ba585e8 2352 EVEX_W_0F3811_P_2,
43234a1e 2353 EVEX_W_0F3812_P_1,
1ba585e8 2354 EVEX_W_0F3812_P_2,
43234a1e
L
2355 EVEX_W_0F3813_P_1,
2356 EVEX_W_0F3813_P_2,
2357 EVEX_W_0F3814_P_1,
2358 EVEX_W_0F3815_P_1,
2359 EVEX_W_0F3818_P_2,
2360 EVEX_W_0F3819_P_2,
2361 EVEX_W_0F381A_P_2,
2362 EVEX_W_0F381B_P_2,
2363 EVEX_W_0F381E_P_2,
2364 EVEX_W_0F381F_P_2,
1ba585e8 2365 EVEX_W_0F3820_P_1,
43234a1e
L
2366 EVEX_W_0F3821_P_1,
2367 EVEX_W_0F3822_P_1,
2368 EVEX_W_0F3823_P_1,
2369 EVEX_W_0F3824_P_1,
2370 EVEX_W_0F3825_P_1,
2371 EVEX_W_0F3825_P_2,
1ba585e8
IT
2372 EVEX_W_0F3826_P_1,
2373 EVEX_W_0F3826_P_2,
2374 EVEX_W_0F3828_P_1,
43234a1e 2375 EVEX_W_0F3828_P_2,
1ba585e8 2376 EVEX_W_0F3829_P_1,
43234a1e
L
2377 EVEX_W_0F3829_P_2,
2378 EVEX_W_0F382A_P_1,
2379 EVEX_W_0F382A_P_2,
1ba585e8
IT
2380 EVEX_W_0F382B_P_2,
2381 EVEX_W_0F3830_P_1,
43234a1e
L
2382 EVEX_W_0F3831_P_1,
2383 EVEX_W_0F3832_P_1,
2384 EVEX_W_0F3833_P_1,
2385 EVEX_W_0F3834_P_1,
2386 EVEX_W_0F3835_P_1,
2387 EVEX_W_0F3835_P_2,
2388 EVEX_W_0F3837_P_2,
90a915bf
IT
2389 EVEX_W_0F3838_P_1,
2390 EVEX_W_0F3839_P_1,
43234a1e
L
2391 EVEX_W_0F383A_P_1,
2392 EVEX_W_0F3840_P_2,
620214f7 2393 EVEX_W_0F3855_P_2,
43234a1e
L
2394 EVEX_W_0F3858_P_2,
2395 EVEX_W_0F3859_P_2,
2396 EVEX_W_0F385A_P_2,
2397 EVEX_W_0F385B_P_2,
1ba585e8
IT
2398 EVEX_W_0F3866_P_2,
2399 EVEX_W_0F3875_P_2,
2400 EVEX_W_0F3878_P_2,
2401 EVEX_W_0F3879_P_2,
2402 EVEX_W_0F387A_P_2,
2403 EVEX_W_0F387B_P_2,
2404 EVEX_W_0F387D_P_2,
14f195c9 2405 EVEX_W_0F3883_P_2,
1ba585e8 2406 EVEX_W_0F388D_P_2,
43234a1e
L
2407 EVEX_W_0F3891_P_2,
2408 EVEX_W_0F3893_P_2,
2409 EVEX_W_0F38A1_P_2,
2410 EVEX_W_0F38A3_P_2,
2411 EVEX_W_0F38C7_R_1_P_2,
2412 EVEX_W_0F38C7_R_2_P_2,
2413 EVEX_W_0F38C7_R_5_P_2,
2414 EVEX_W_0F38C7_R_6_P_2,
2415
2416 EVEX_W_0F3A00_P_2,
2417 EVEX_W_0F3A01_P_2,
2418 EVEX_W_0F3A04_P_2,
2419 EVEX_W_0F3A05_P_2,
2420 EVEX_W_0F3A08_P_2,
2421 EVEX_W_0F3A09_P_2,
2422 EVEX_W_0F3A0A_P_2,
2423 EVEX_W_0F3A0B_P_2,
90a915bf 2424 EVEX_W_0F3A16_P_2,
43234a1e
L
2425 EVEX_W_0F3A18_P_2,
2426 EVEX_W_0F3A19_P_2,
2427 EVEX_W_0F3A1A_P_2,
2428 EVEX_W_0F3A1B_P_2,
2429 EVEX_W_0F3A1D_P_2,
2430 EVEX_W_0F3A21_P_2,
90a915bf 2431 EVEX_W_0F3A22_P_2,
43234a1e
L
2432 EVEX_W_0F3A23_P_2,
2433 EVEX_W_0F3A38_P_2,
2434 EVEX_W_0F3A39_P_2,
2435 EVEX_W_0F3A3A_P_2,
2436 EVEX_W_0F3A3B_P_2,
1ba585e8
IT
2437 EVEX_W_0F3A3E_P_2,
2438 EVEX_W_0F3A3F_P_2,
2439 EVEX_W_0F3A42_P_2,
90a915bf
IT
2440 EVEX_W_0F3A43_P_2,
2441 EVEX_W_0F3A50_P_2,
2442 EVEX_W_0F3A51_P_2,
2443 EVEX_W_0F3A56_P_2,
2444 EVEX_W_0F3A57_P_2,
2445 EVEX_W_0F3A66_P_2,
2446 EVEX_W_0F3A67_P_2
9e30b8e0
L
2447};
2448
26ca5450 2449typedef void (*op_rtn) (int bytemode, int sizeflag);
252b5132
RH
2450
2451struct dis386 {
2da11e11 2452 const char *name;
ce518a5f
L
2453 struct
2454 {
2455 op_rtn rtn;
2456 int bytemode;
2457 } op[MAX_OPERANDS];
bf890a93 2458 unsigned int prefix_requirement;
252b5132
RH
2459};
2460
2461/* Upper case letters in the instruction names here are macros.
2462 'A' => print 'b' if no register operands or suffix_always is true
2463 'B' => print 'b' if suffix_always is true
9306ca4a 2464 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
98b528ac 2465 size prefix
ed7841b3 2466 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
98b528ac 2467 suffix_always is true
252b5132 2468 'E' => print 'e' if 32-bit form of jcxz
3ffd33cf 2469 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
52fd6d94 2470 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
5dd0794d 2471 'H' => print ",pt" or ",pn" branch hint
9306ca4a 2472 'I' => honor following macro letter even in Intel mode (implemented only
98b528ac 2473 for some of the macro letters)
9306ca4a 2474 'J' => print 'l'
42903f7f 2475 'K' => print 'd' or 'q' if rex prefix is present.
252b5132 2476 'L' => print 'l' if suffix_always is true
9d141669 2477 'M' => print 'r' if intel_mnemonic is false.
252b5132 2478 'N' => print 'n' if instruction has no wait "prefix"
a35ca55a 2479 'O' => print 'd' or 'o' (or 'q' in Intel mode)
52b15da3 2480 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
98b528ac
L
2481 or suffix_always is true. print 'q' if rex prefix is present.
2482 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
2483 is true
a35ca55a 2484 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
52b15da3 2485 'S' => print 'w', 'l' or 'q' if suffix_always is true
a72d2af2
L
2486 'T' => print 'q' in 64bit mode if instruction has no operand size
2487 prefix and behave as 'P' otherwise
2488 'U' => print 'q' in 64bit mode if instruction has no operand size
2489 prefix and behave as 'Q' otherwise
2490 'V' => print 'q' in 64bit mode if instruction has no operand size
2491 prefix and behave as 'S' otherwise
a35ca55a 2492 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
9306ca4a 2493 'X' => print 's', 'd' depending on data16 prefix (for XMM)
8a72226a
L
2494 'Y' => 'q' if instruction has an REX 64bit overwrite prefix and
2495 suffix_always is true.
6dd5059a 2496 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
9d141669 2497 '!' => change condition from true to false or from false to true.
98b528ac 2498 '%' => add 1 upper case letter to the macro.
a72d2af2
L
2499 '^' => print 'w' or 'l' depending on operand size prefix or
2500 suffix_always is true (lcall/ljmp).
5db04b09
L
2501 '@' => print 'q' for Intel64 ISA, 'w' or 'q' for AMD64 ISA depending
2502 on operand size prefix.
07f5af7d
L
2503 '&' => print 'q' in 64bit mode for Intel64 ISA or if instruction
2504 has no operand size prefix for AMD64 ISA, behave as 'P'
2505 otherwise
98b528ac
L
2506
2507 2 upper case letter macros:
04d824a4
JB
2508 "XY" => print 'x' or 'y' if suffix_always is true or no register
2509 operands and no broadcast.
2510 "XZ" => print 'x', 'y', or 'z' if suffix_always is true or no
2511 register operands and no broadcast.
4b06377f
L
2512 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
2513 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
98b528ac 2514 or suffix_always is true
4b06377f
L
2515 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
2516 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
2517 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
6c30d220 2518 "LW" => print 'd', 'q' depending on the VEX.W bit
4b4c407a
L
2519 "LP" => print 'w' or 'l' ('d' in Intel mode) if instruction has
2520 an operand size prefix, or suffix_always is true. print
2521 'q' if rex prefix is present.
52b15da3 2522
6439fc28
AM
2523 Many of the above letters print nothing in Intel mode. See "putop"
2524 for the details.
52b15da3 2525
6439fc28 2526 Braces '{' and '}', and vertical bars '|', indicate alternative
7c52e0e8 2527 mnemonic strings for AT&T and Intel. */
252b5132 2528
6439fc28 2529static const struct dis386 dis386[] = {
252b5132 2530 /* 00 */
bf890a93
IT
2531 { "addB", { Ebh1, Gb }, 0 },
2532 { "addS", { Evh1, Gv }, 0 },
2533 { "addB", { Gb, EbS }, 0 },
2534 { "addS", { Gv, EvS }, 0 },
2535 { "addB", { AL, Ib }, 0 },
2536 { "addS", { eAX, Iv }, 0 },
4e7d34a6
L
2537 { X86_64_TABLE (X86_64_06) },
2538 { X86_64_TABLE (X86_64_07) },
252b5132 2539 /* 08 */
bf890a93
IT
2540 { "orB", { Ebh1, Gb }, 0 },
2541 { "orS", { Evh1, Gv }, 0 },
2542 { "orB", { Gb, EbS }, 0 },
2543 { "orS", { Gv, EvS }, 0 },
2544 { "orB", { AL, Ib }, 0 },
2545 { "orS", { eAX, Iv }, 0 },
4e7d34a6 2546 { X86_64_TABLE (X86_64_0D) },
592d1631 2547 { Bad_Opcode }, /* 0x0f extended opcode escape */
252b5132 2548 /* 10 */
bf890a93
IT
2549 { "adcB", { Ebh1, Gb }, 0 },
2550 { "adcS", { Evh1, Gv }, 0 },
2551 { "adcB", { Gb, EbS }, 0 },
2552 { "adcS", { Gv, EvS }, 0 },
2553 { "adcB", { AL, Ib }, 0 },
2554 { "adcS", { eAX, Iv }, 0 },
4e7d34a6
L
2555 { X86_64_TABLE (X86_64_16) },
2556 { X86_64_TABLE (X86_64_17) },
252b5132 2557 /* 18 */
bf890a93
IT
2558 { "sbbB", { Ebh1, Gb }, 0 },
2559 { "sbbS", { Evh1, Gv }, 0 },
2560 { "sbbB", { Gb, EbS }, 0 },
2561 { "sbbS", { Gv, EvS }, 0 },
2562 { "sbbB", { AL, Ib }, 0 },
2563 { "sbbS", { eAX, Iv }, 0 },
4e7d34a6
L
2564 { X86_64_TABLE (X86_64_1E) },
2565 { X86_64_TABLE (X86_64_1F) },
252b5132 2566 /* 20 */
bf890a93
IT
2567 { "andB", { Ebh1, Gb }, 0 },
2568 { "andS", { Evh1, Gv }, 0 },
2569 { "andB", { Gb, EbS }, 0 },
2570 { "andS", { Gv, EvS }, 0 },
2571 { "andB", { AL, Ib }, 0 },
2572 { "andS", { eAX, Iv }, 0 },
592d1631 2573 { Bad_Opcode }, /* SEG ES prefix */
4e7d34a6 2574 { X86_64_TABLE (X86_64_27) },
252b5132 2575 /* 28 */
bf890a93
IT
2576 { "subB", { Ebh1, Gb }, 0 },
2577 { "subS", { Evh1, Gv }, 0 },
2578 { "subB", { Gb, EbS }, 0 },
2579 { "subS", { Gv, EvS }, 0 },
2580 { "subB", { AL, Ib }, 0 },
2581 { "subS", { eAX, Iv }, 0 },
592d1631 2582 { Bad_Opcode }, /* SEG CS prefix */
4e7d34a6 2583 { X86_64_TABLE (X86_64_2F) },
252b5132 2584 /* 30 */
bf890a93
IT
2585 { "xorB", { Ebh1, Gb }, 0 },
2586 { "xorS", { Evh1, Gv }, 0 },
2587 { "xorB", { Gb, EbS }, 0 },
2588 { "xorS", { Gv, EvS }, 0 },
2589 { "xorB", { AL, Ib }, 0 },
2590 { "xorS", { eAX, Iv }, 0 },
592d1631 2591 { Bad_Opcode }, /* SEG SS prefix */
4e7d34a6 2592 { X86_64_TABLE (X86_64_37) },
252b5132 2593 /* 38 */
bf890a93
IT
2594 { "cmpB", { Eb, Gb }, 0 },
2595 { "cmpS", { Ev, Gv }, 0 },
2596 { "cmpB", { Gb, EbS }, 0 },
2597 { "cmpS", { Gv, EvS }, 0 },
2598 { "cmpB", { AL, Ib }, 0 },
2599 { "cmpS", { eAX, Iv }, 0 },
592d1631 2600 { Bad_Opcode }, /* SEG DS prefix */
4e7d34a6 2601 { X86_64_TABLE (X86_64_3F) },
252b5132 2602 /* 40 */
bf890a93
IT
2603 { "inc{S|}", { RMeAX }, 0 },
2604 { "inc{S|}", { RMeCX }, 0 },
2605 { "inc{S|}", { RMeDX }, 0 },
2606 { "inc{S|}", { RMeBX }, 0 },
2607 { "inc{S|}", { RMeSP }, 0 },
2608 { "inc{S|}", { RMeBP }, 0 },
2609 { "inc{S|}", { RMeSI }, 0 },
2610 { "inc{S|}", { RMeDI }, 0 },
252b5132 2611 /* 48 */
bf890a93
IT
2612 { "dec{S|}", { RMeAX }, 0 },
2613 { "dec{S|}", { RMeCX }, 0 },
2614 { "dec{S|}", { RMeDX }, 0 },
2615 { "dec{S|}", { RMeBX }, 0 },
2616 { "dec{S|}", { RMeSP }, 0 },
2617 { "dec{S|}", { RMeBP }, 0 },
2618 { "dec{S|}", { RMeSI }, 0 },
2619 { "dec{S|}", { RMeDI }, 0 },
252b5132 2620 /* 50 */
bf890a93
IT
2621 { "pushV", { RMrAX }, 0 },
2622 { "pushV", { RMrCX }, 0 },
2623 { "pushV", { RMrDX }, 0 },
2624 { "pushV", { RMrBX }, 0 },
2625 { "pushV", { RMrSP }, 0 },
2626 { "pushV", { RMrBP }, 0 },
2627 { "pushV", { RMrSI }, 0 },
2628 { "pushV", { RMrDI }, 0 },
252b5132 2629 /* 58 */
bf890a93
IT
2630 { "popV", { RMrAX }, 0 },
2631 { "popV", { RMrCX }, 0 },
2632 { "popV", { RMrDX }, 0 },
2633 { "popV", { RMrBX }, 0 },
2634 { "popV", { RMrSP }, 0 },
2635 { "popV", { RMrBP }, 0 },
2636 { "popV", { RMrSI }, 0 },
2637 { "popV", { RMrDI }, 0 },
252b5132 2638 /* 60 */
4e7d34a6
L
2639 { X86_64_TABLE (X86_64_60) },
2640 { X86_64_TABLE (X86_64_61) },
2641 { X86_64_TABLE (X86_64_62) },
2642 { X86_64_TABLE (X86_64_63) },
592d1631
L
2643 { Bad_Opcode }, /* seg fs */
2644 { Bad_Opcode }, /* seg gs */
2645 { Bad_Opcode }, /* op size prefix */
2646 { Bad_Opcode }, /* adr size prefix */
252b5132 2647 /* 68 */
bf890a93
IT
2648 { "pushT", { sIv }, 0 },
2649 { "imulS", { Gv, Ev, Iv }, 0 },
2650 { "pushT", { sIbT }, 0 },
2651 { "imulS", { Gv, Ev, sIb }, 0 },
2652 { "ins{b|}", { Ybr, indirDX }, 0 },
4e7d34a6 2653 { X86_64_TABLE (X86_64_6D) },
bf890a93 2654 { "outs{b|}", { indirDXr, Xb }, 0 },
4e7d34a6 2655 { X86_64_TABLE (X86_64_6F) },
252b5132 2656 /* 70 */
bf890a93
IT
2657 { "joH", { Jb, BND, cond_jump_flag }, 0 },
2658 { "jnoH", { Jb, BND, cond_jump_flag }, 0 },
2659 { "jbH", { Jb, BND, cond_jump_flag }, 0 },
2660 { "jaeH", { Jb, BND, cond_jump_flag }, 0 },
2661 { "jeH", { Jb, BND, cond_jump_flag }, 0 },
2662 { "jneH", { Jb, BND, cond_jump_flag }, 0 },
2663 { "jbeH", { Jb, BND, cond_jump_flag }, 0 },
2664 { "jaH", { Jb, BND, cond_jump_flag }, 0 },
252b5132 2665 /* 78 */
bf890a93
IT
2666 { "jsH", { Jb, BND, cond_jump_flag }, 0 },
2667 { "jnsH", { Jb, BND, cond_jump_flag }, 0 },
2668 { "jpH", { Jb, BND, cond_jump_flag }, 0 },
2669 { "jnpH", { Jb, BND, cond_jump_flag }, 0 },
2670 { "jlH", { Jb, BND, cond_jump_flag }, 0 },
2671 { "jgeH", { Jb, BND, cond_jump_flag }, 0 },
2672 { "jleH", { Jb, BND, cond_jump_flag }, 0 },
2673 { "jgH", { Jb, BND, cond_jump_flag }, 0 },
252b5132 2674 /* 80 */
1ceb70f8
L
2675 { REG_TABLE (REG_80) },
2676 { REG_TABLE (REG_81) },
d039fef3 2677 { X86_64_TABLE (X86_64_82) },
7148c369 2678 { REG_TABLE (REG_83) },
bf890a93
IT
2679 { "testB", { Eb, Gb }, 0 },
2680 { "testS", { Ev, Gv }, 0 },
2681 { "xchgB", { Ebh2, Gb }, 0 },
2682 { "xchgS", { Evh2, Gv }, 0 },
252b5132 2683 /* 88 */
bf890a93
IT
2684 { "movB", { Ebh3, Gb }, 0 },
2685 { "movS", { Evh3, Gv }, 0 },
2686 { "movB", { Gb, EbS }, 0 },
2687 { "movS", { Gv, EvS }, 0 },
2688 { "movD", { Sv, Sw }, 0 },
1ceb70f8 2689 { MOD_TABLE (MOD_8D) },
bf890a93 2690 { "movD", { Sw, Sv }, 0 },
1ceb70f8 2691 { REG_TABLE (REG_8F) },
252b5132 2692 /* 90 */
1ceb70f8 2693 { PREFIX_TABLE (PREFIX_90) },
bf890a93
IT
2694 { "xchgS", { RMeCX, eAX }, 0 },
2695 { "xchgS", { RMeDX, eAX }, 0 },
2696 { "xchgS", { RMeBX, eAX }, 0 },
2697 { "xchgS", { RMeSP, eAX }, 0 },
2698 { "xchgS", { RMeBP, eAX }, 0 },
2699 { "xchgS", { RMeSI, eAX }, 0 },
2700 { "xchgS", { RMeDI, eAX }, 0 },
252b5132 2701 /* 98 */
bf890a93
IT
2702 { "cW{t|}R", { XX }, 0 },
2703 { "cR{t|}O", { XX }, 0 },
4e7d34a6 2704 { X86_64_TABLE (X86_64_9A) },
592d1631 2705 { Bad_Opcode }, /* fwait */
bf890a93
IT
2706 { "pushfT", { XX }, 0 },
2707 { "popfT", { XX }, 0 },
2708 { "sahf", { XX }, 0 },
2709 { "lahf", { XX }, 0 },
252b5132 2710 /* a0 */
bf890a93
IT
2711 { "mov%LB", { AL, Ob }, 0 },
2712 { "mov%LS", { eAX, Ov }, 0 },
2713 { "mov%LB", { Ob, AL }, 0 },
2714 { "mov%LS", { Ov, eAX }, 0 },
2715 { "movs{b|}", { Ybr, Xb }, 0 },
2716 { "movs{R|}", { Yvr, Xv }, 0 },
2717 { "cmps{b|}", { Xb, Yb }, 0 },
2718 { "cmps{R|}", { Xv, Yv }, 0 },
252b5132 2719 /* a8 */
bf890a93
IT
2720 { "testB", { AL, Ib }, 0 },
2721 { "testS", { eAX, Iv }, 0 },
2722 { "stosB", { Ybr, AL }, 0 },
2723 { "stosS", { Yvr, eAX }, 0 },
2724 { "lodsB", { ALr, Xb }, 0 },
2725 { "lodsS", { eAXr, Xv }, 0 },
2726 { "scasB", { AL, Yb }, 0 },
2727 { "scasS", { eAX, Yv }, 0 },
252b5132 2728 /* b0 */
bf890a93
IT
2729 { "movB", { RMAL, Ib }, 0 },
2730 { "movB", { RMCL, Ib }, 0 },
2731 { "movB", { RMDL, Ib }, 0 },
2732 { "movB", { RMBL, Ib }, 0 },
2733 { "movB", { RMAH, Ib }, 0 },
2734 { "movB", { RMCH, Ib }, 0 },
2735 { "movB", { RMDH, Ib }, 0 },
2736 { "movB", { RMBH, Ib }, 0 },
252b5132 2737 /* b8 */
bf890a93
IT
2738 { "mov%LV", { RMeAX, Iv64 }, 0 },
2739 { "mov%LV", { RMeCX, Iv64 }, 0 },
2740 { "mov%LV", { RMeDX, Iv64 }, 0 },
2741 { "mov%LV", { RMeBX, Iv64 }, 0 },
2742 { "mov%LV", { RMeSP, Iv64 }, 0 },
2743 { "mov%LV", { RMeBP, Iv64 }, 0 },
2744 { "mov%LV", { RMeSI, Iv64 }, 0 },
2745 { "mov%LV", { RMeDI, Iv64 }, 0 },
252b5132 2746 /* c0 */
1ceb70f8
L
2747 { REG_TABLE (REG_C0) },
2748 { REG_TABLE (REG_C1) },
bf890a93
IT
2749 { "retT", { Iw, BND }, 0 },
2750 { "retT", { BND }, 0 },
4e7d34a6
L
2751 { X86_64_TABLE (X86_64_C4) },
2752 { X86_64_TABLE (X86_64_C5) },
1ceb70f8
L
2753 { REG_TABLE (REG_C6) },
2754 { REG_TABLE (REG_C7) },
252b5132 2755 /* c8 */
bf890a93
IT
2756 { "enterT", { Iw, Ib }, 0 },
2757 { "leaveT", { XX }, 0 },
2758 { "Jret{|f}P", { Iw }, 0 },
2759 { "Jret{|f}P", { XX }, 0 },
2760 { "int3", { XX }, 0 },
2761 { "int", { Ib }, 0 },
4e7d34a6 2762 { X86_64_TABLE (X86_64_CE) },
bf890a93 2763 { "iret%LP", { XX }, 0 },
252b5132 2764 /* d0 */
1ceb70f8
L
2765 { REG_TABLE (REG_D0) },
2766 { REG_TABLE (REG_D1) },
2767 { REG_TABLE (REG_D2) },
2768 { REG_TABLE (REG_D3) },
4e7d34a6
L
2769 { X86_64_TABLE (X86_64_D4) },
2770 { X86_64_TABLE (X86_64_D5) },
592d1631 2771 { Bad_Opcode },
bf890a93 2772 { "xlat", { DSBX }, 0 },
252b5132
RH
2773 /* d8 */
2774 { FLOAT },
2775 { FLOAT },
2776 { FLOAT },
2777 { FLOAT },
2778 { FLOAT },
2779 { FLOAT },
2780 { FLOAT },
2781 { FLOAT },
2782 /* e0 */
bf890a93
IT
2783 { "loopneFH", { Jb, XX, loop_jcxz_flag }, 0 },
2784 { "loopeFH", { Jb, XX, loop_jcxz_flag }, 0 },
2785 { "loopFH", { Jb, XX, loop_jcxz_flag }, 0 },
2786 { "jEcxzH", { Jb, XX, loop_jcxz_flag }, 0 },
2787 { "inB", { AL, Ib }, 0 },
2788 { "inG", { zAX, Ib }, 0 },
2789 { "outB", { Ib, AL }, 0 },
2790 { "outG", { Ib, zAX }, 0 },
252b5132 2791 /* e8 */
a72d2af2
L
2792 { X86_64_TABLE (X86_64_E8) },
2793 { X86_64_TABLE (X86_64_E9) },
4e7d34a6 2794 { X86_64_TABLE (X86_64_EA) },
bf890a93
IT
2795 { "jmp", { Jb, BND }, 0 },
2796 { "inB", { AL, indirDX }, 0 },
2797 { "inG", { zAX, indirDX }, 0 },
2798 { "outB", { indirDX, AL }, 0 },
2799 { "outG", { indirDX, zAX }, 0 },
252b5132 2800 /* f0 */
592d1631 2801 { Bad_Opcode }, /* lock prefix */
bf890a93 2802 { "icebp", { XX }, 0 },
592d1631
L
2803 { Bad_Opcode }, /* repne */
2804 { Bad_Opcode }, /* repz */
bf890a93
IT
2805 { "hlt", { XX }, 0 },
2806 { "cmc", { XX }, 0 },
1ceb70f8
L
2807 { REG_TABLE (REG_F6) },
2808 { REG_TABLE (REG_F7) },
252b5132 2809 /* f8 */
bf890a93
IT
2810 { "clc", { XX }, 0 },
2811 { "stc", { XX }, 0 },
2812 { "cli", { XX }, 0 },
2813 { "sti", { XX }, 0 },
2814 { "cld", { XX }, 0 },
2815 { "std", { XX }, 0 },
1ceb70f8
L
2816 { REG_TABLE (REG_FE) },
2817 { REG_TABLE (REG_FF) },
252b5132
RH
2818};
2819
6439fc28 2820static const struct dis386 dis386_twobyte[] = {
252b5132 2821 /* 00 */
1ceb70f8
L
2822 { REG_TABLE (REG_0F00 ) },
2823 { REG_TABLE (REG_0F01 ) },
bf890a93
IT
2824 { "larS", { Gv, Ew }, 0 },
2825 { "lslS", { Gv, Ew }, 0 },
592d1631 2826 { Bad_Opcode },
bf890a93
IT
2827 { "syscall", { XX }, 0 },
2828 { "clts", { XX }, 0 },
2829 { "sysret%LP", { XX }, 0 },
252b5132 2830 /* 08 */
bf890a93
IT
2831 { "invd", { XX }, 0 },
2832 { "wbinvd", { XX }, 0 },
592d1631 2833 { Bad_Opcode },
bf890a93 2834 { "ud2", { XX }, 0 },
592d1631 2835 { Bad_Opcode },
b5b1fc4f 2836 { REG_TABLE (REG_0F0D) },
bf890a93
IT
2837 { "femms", { XX }, 0 },
2838 { "", { MX, EM, OPSUF }, 0 }, /* See OP_3DNowSuffix. */
252b5132 2839 /* 10 */
1ceb70f8
L
2840 { PREFIX_TABLE (PREFIX_0F10) },
2841 { PREFIX_TABLE (PREFIX_0F11) },
2842 { PREFIX_TABLE (PREFIX_0F12) },
2843 { MOD_TABLE (MOD_0F13) },
507bd325
L
2844 { "unpcklpX", { XM, EXx }, PREFIX_OPCODE },
2845 { "unpckhpX", { XM, EXx }, PREFIX_OPCODE },
1ceb70f8
L
2846 { PREFIX_TABLE (PREFIX_0F16) },
2847 { MOD_TABLE (MOD_0F17) },
252b5132 2848 /* 18 */
1ceb70f8 2849 { REG_TABLE (REG_0F18) },
bf890a93 2850 { "nopQ", { Ev }, 0 },
7e8b059b
L
2851 { PREFIX_TABLE (PREFIX_0F1A) },
2852 { PREFIX_TABLE (PREFIX_0F1B) },
bf890a93
IT
2853 { "nopQ", { Ev }, 0 },
2854 { "nopQ", { Ev }, 0 },
603555e5 2855 { PREFIX_TABLE (PREFIX_0F1E) },
bf890a93 2856 { "nopQ", { Ev }, 0 },
252b5132 2857 /* 20 */
bf890a93
IT
2858 { "movZ", { Rm, Cm }, 0 },
2859 { "movZ", { Rm, Dm }, 0 },
2860 { "movZ", { Cm, Rm }, 0 },
2861 { "movZ", { Dm, Rm }, 0 },
1ceb70f8 2862 { MOD_TABLE (MOD_0F24) },
592d1631 2863 { Bad_Opcode },
1ceb70f8 2864 { MOD_TABLE (MOD_0F26) },
592d1631 2865 { Bad_Opcode },
252b5132 2866 /* 28 */
507bd325
L
2867 { "movapX", { XM, EXx }, PREFIX_OPCODE },
2868 { "movapX", { EXxS, XM }, PREFIX_OPCODE },
1ceb70f8
L
2869 { PREFIX_TABLE (PREFIX_0F2A) },
2870 { PREFIX_TABLE (PREFIX_0F2B) },
2871 { PREFIX_TABLE (PREFIX_0F2C) },
2872 { PREFIX_TABLE (PREFIX_0F2D) },
2873 { PREFIX_TABLE (PREFIX_0F2E) },
2874 { PREFIX_TABLE (PREFIX_0F2F) },
252b5132 2875 /* 30 */
bf890a93
IT
2876 { "wrmsr", { XX }, 0 },
2877 { "rdtsc", { XX }, 0 },
2878 { "rdmsr", { XX }, 0 },
2879 { "rdpmc", { XX }, 0 },
2880 { "sysenter", { XX }, 0 },
2881 { "sysexit", { XX }, 0 },
592d1631 2882 { Bad_Opcode },
bf890a93 2883 { "getsec", { XX }, 0 },
252b5132 2884 /* 38 */
507bd325 2885 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F38, PREFIX_OPCODE) },
592d1631 2886 { Bad_Opcode },
507bd325 2887 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F3A, PREFIX_OPCODE) },
592d1631
L
2888 { Bad_Opcode },
2889 { Bad_Opcode },
2890 { Bad_Opcode },
2891 { Bad_Opcode },
2892 { Bad_Opcode },
252b5132 2893 /* 40 */
bf890a93
IT
2894 { "cmovoS", { Gv, Ev }, 0 },
2895 { "cmovnoS", { Gv, Ev }, 0 },
2896 { "cmovbS", { Gv, Ev }, 0 },
2897 { "cmovaeS", { Gv, Ev }, 0 },
2898 { "cmoveS", { Gv, Ev }, 0 },
2899 { "cmovneS", { Gv, Ev }, 0 },
2900 { "cmovbeS", { Gv, Ev }, 0 },
2901 { "cmovaS", { Gv, Ev }, 0 },
252b5132 2902 /* 48 */
bf890a93
IT
2903 { "cmovsS", { Gv, Ev }, 0 },
2904 { "cmovnsS", { Gv, Ev }, 0 },
2905 { "cmovpS", { Gv, Ev }, 0 },
2906 { "cmovnpS", { Gv, Ev }, 0 },
2907 { "cmovlS", { Gv, Ev }, 0 },
2908 { "cmovgeS", { Gv, Ev }, 0 },
2909 { "cmovleS", { Gv, Ev }, 0 },
2910 { "cmovgS", { Gv, Ev }, 0 },
252b5132 2911 /* 50 */
75c135a8 2912 { MOD_TABLE (MOD_0F51) },
1ceb70f8
L
2913 { PREFIX_TABLE (PREFIX_0F51) },
2914 { PREFIX_TABLE (PREFIX_0F52) },
2915 { PREFIX_TABLE (PREFIX_0F53) },
507bd325
L
2916 { "andpX", { XM, EXx }, PREFIX_OPCODE },
2917 { "andnpX", { XM, EXx }, PREFIX_OPCODE },
2918 { "orpX", { XM, EXx }, PREFIX_OPCODE },
2919 { "xorpX", { XM, EXx }, PREFIX_OPCODE },
252b5132 2920 /* 58 */
1ceb70f8
L
2921 { PREFIX_TABLE (PREFIX_0F58) },
2922 { PREFIX_TABLE (PREFIX_0F59) },
2923 { PREFIX_TABLE (PREFIX_0F5A) },
2924 { PREFIX_TABLE (PREFIX_0F5B) },
2925 { PREFIX_TABLE (PREFIX_0F5C) },
2926 { PREFIX_TABLE (PREFIX_0F5D) },
2927 { PREFIX_TABLE (PREFIX_0F5E) },
2928 { PREFIX_TABLE (PREFIX_0F5F) },
252b5132 2929 /* 60 */
1ceb70f8
L
2930 { PREFIX_TABLE (PREFIX_0F60) },
2931 { PREFIX_TABLE (PREFIX_0F61) },
2932 { PREFIX_TABLE (PREFIX_0F62) },
507bd325
L
2933 { "packsswb", { MX, EM }, PREFIX_OPCODE },
2934 { "pcmpgtb", { MX, EM }, PREFIX_OPCODE },
2935 { "pcmpgtw", { MX, EM }, PREFIX_OPCODE },
2936 { "pcmpgtd", { MX, EM }, PREFIX_OPCODE },
2937 { "packuswb", { MX, EM }, PREFIX_OPCODE },
252b5132 2938 /* 68 */
507bd325
L
2939 { "punpckhbw", { MX, EM }, PREFIX_OPCODE },
2940 { "punpckhwd", { MX, EM }, PREFIX_OPCODE },
2941 { "punpckhdq", { MX, EM }, PREFIX_OPCODE },
2942 { "packssdw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8
L
2943 { PREFIX_TABLE (PREFIX_0F6C) },
2944 { PREFIX_TABLE (PREFIX_0F6D) },
507bd325 2945 { "movK", { MX, Edq }, PREFIX_OPCODE },
1ceb70f8 2946 { PREFIX_TABLE (PREFIX_0F6F) },
252b5132 2947 /* 70 */
1ceb70f8
L
2948 { PREFIX_TABLE (PREFIX_0F70) },
2949 { REG_TABLE (REG_0F71) },
2950 { REG_TABLE (REG_0F72) },
2951 { REG_TABLE (REG_0F73) },
507bd325
L
2952 { "pcmpeqb", { MX, EM }, PREFIX_OPCODE },
2953 { "pcmpeqw", { MX, EM }, PREFIX_OPCODE },
2954 { "pcmpeqd", { MX, EM }, PREFIX_OPCODE },
2955 { "emms", { XX }, PREFIX_OPCODE },
252b5132 2956 /* 78 */
1ceb70f8
L
2957 { PREFIX_TABLE (PREFIX_0F78) },
2958 { PREFIX_TABLE (PREFIX_0F79) },
1f334aeb 2959 { Bad_Opcode },
592d1631 2960 { Bad_Opcode },
1ceb70f8
L
2961 { PREFIX_TABLE (PREFIX_0F7C) },
2962 { PREFIX_TABLE (PREFIX_0F7D) },
2963 { PREFIX_TABLE (PREFIX_0F7E) },
2964 { PREFIX_TABLE (PREFIX_0F7F) },
252b5132 2965 /* 80 */
bf890a93
IT
2966 { "joH", { Jv, BND, cond_jump_flag }, 0 },
2967 { "jnoH", { Jv, BND, cond_jump_flag }, 0 },
2968 { "jbH", { Jv, BND, cond_jump_flag }, 0 },
2969 { "jaeH", { Jv, BND, cond_jump_flag }, 0 },
2970 { "jeH", { Jv, BND, cond_jump_flag }, 0 },
2971 { "jneH", { Jv, BND, cond_jump_flag }, 0 },
2972 { "jbeH", { Jv, BND, cond_jump_flag }, 0 },
2973 { "jaH", { Jv, BND, cond_jump_flag }, 0 },
252b5132 2974 /* 88 */
bf890a93
IT
2975 { "jsH", { Jv, BND, cond_jump_flag }, 0 },
2976 { "jnsH", { Jv, BND, cond_jump_flag }, 0 },
2977 { "jpH", { Jv, BND, cond_jump_flag }, 0 },
2978 { "jnpH", { Jv, BND, cond_jump_flag }, 0 },
2979 { "jlH", { Jv, BND, cond_jump_flag }, 0 },
2980 { "jgeH", { Jv, BND, cond_jump_flag }, 0 },
2981 { "jleH", { Jv, BND, cond_jump_flag }, 0 },
2982 { "jgH", { Jv, BND, cond_jump_flag }, 0 },
252b5132 2983 /* 90 */
bf890a93
IT
2984 { "seto", { Eb }, 0 },
2985 { "setno", { Eb }, 0 },
2986 { "setb", { Eb }, 0 },
2987 { "setae", { Eb }, 0 },
2988 { "sete", { Eb }, 0 },
2989 { "setne", { Eb }, 0 },
2990 { "setbe", { Eb }, 0 },
2991 { "seta", { Eb }, 0 },
252b5132 2992 /* 98 */
bf890a93
IT
2993 { "sets", { Eb }, 0 },
2994 { "setns", { Eb }, 0 },
2995 { "setp", { Eb }, 0 },
2996 { "setnp", { Eb }, 0 },
2997 { "setl", { Eb }, 0 },
2998 { "setge", { Eb }, 0 },
2999 { "setle", { Eb }, 0 },
3000 { "setg", { Eb }, 0 },
252b5132 3001 /* a0 */
bf890a93
IT
3002 { "pushT", { fs }, 0 },
3003 { "popT", { fs }, 0 },
3004 { "cpuid", { XX }, 0 },
3005 { "btS", { Ev, Gv }, 0 },
3006 { "shldS", { Ev, Gv, Ib }, 0 },
3007 { "shldS", { Ev, Gv, CL }, 0 },
1ceb70f8
L
3008 { REG_TABLE (REG_0FA6) },
3009 { REG_TABLE (REG_0FA7) },
252b5132 3010 /* a8 */
bf890a93
IT
3011 { "pushT", { gs }, 0 },
3012 { "popT", { gs }, 0 },
3013 { "rsm", { XX }, 0 },
3014 { "btsS", { Evh1, Gv }, 0 },
3015 { "shrdS", { Ev, Gv, Ib }, 0 },
3016 { "shrdS", { Ev, Gv, CL }, 0 },
1ceb70f8 3017 { REG_TABLE (REG_0FAE) },
bf890a93 3018 { "imulS", { Gv, Ev }, 0 },
252b5132 3019 /* b0 */
bf890a93
IT
3020 { "cmpxchgB", { Ebh1, Gb }, 0 },
3021 { "cmpxchgS", { Evh1, Gv }, 0 },
1ceb70f8 3022 { MOD_TABLE (MOD_0FB2) },
bf890a93 3023 { "btrS", { Evh1, Gv }, 0 },
1ceb70f8
L
3024 { MOD_TABLE (MOD_0FB4) },
3025 { MOD_TABLE (MOD_0FB5) },
bf890a93
IT
3026 { "movz{bR|x}", { Gv, Eb }, 0 },
3027 { "movz{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movzww ! */
252b5132 3028 /* b8 */
1ceb70f8 3029 { PREFIX_TABLE (PREFIX_0FB8) },
bf890a93 3030 { "ud1", { XX }, 0 },
1ceb70f8 3031 { REG_TABLE (REG_0FBA) },
bf890a93 3032 { "btcS", { Evh1, Gv }, 0 },
f12dc422 3033 { PREFIX_TABLE (PREFIX_0FBC) },
1ceb70f8 3034 { PREFIX_TABLE (PREFIX_0FBD) },
bf890a93
IT
3035 { "movs{bR|x}", { Gv, Eb }, 0 },
3036 { "movs{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movsww ! */
252b5132 3037 /* c0 */
bf890a93
IT
3038 { "xaddB", { Ebh1, Gb }, 0 },
3039 { "xaddS", { Evh1, Gv }, 0 },
1ceb70f8 3040 { PREFIX_TABLE (PREFIX_0FC2) },
a8484f96 3041 { MOD_TABLE (MOD_0FC3) },
507bd325
L
3042 { "pinsrw", { MX, Edqw, Ib }, PREFIX_OPCODE },
3043 { "pextrw", { Gdq, MS, Ib }, PREFIX_OPCODE },
3044 { "shufpX", { XM, EXx, Ib }, PREFIX_OPCODE },
1ceb70f8 3045 { REG_TABLE (REG_0FC7) },
252b5132 3046 /* c8 */
bf890a93
IT
3047 { "bswap", { RMeAX }, 0 },
3048 { "bswap", { RMeCX }, 0 },
3049 { "bswap", { RMeDX }, 0 },
3050 { "bswap", { RMeBX }, 0 },
3051 { "bswap", { RMeSP }, 0 },
3052 { "bswap", { RMeBP }, 0 },
3053 { "bswap", { RMeSI }, 0 },
3054 { "bswap", { RMeDI }, 0 },
252b5132 3055 /* d0 */
1ceb70f8 3056 { PREFIX_TABLE (PREFIX_0FD0) },
507bd325
L
3057 { "psrlw", { MX, EM }, PREFIX_OPCODE },
3058 { "psrld", { MX, EM }, PREFIX_OPCODE },
3059 { "psrlq", { MX, EM }, PREFIX_OPCODE },
3060 { "paddq", { MX, EM }, PREFIX_OPCODE },
3061 { "pmullw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8 3062 { PREFIX_TABLE (PREFIX_0FD6) },
75c135a8 3063 { MOD_TABLE (MOD_0FD7) },
252b5132 3064 /* d8 */
507bd325
L
3065 { "psubusb", { MX, EM }, PREFIX_OPCODE },
3066 { "psubusw", { MX, EM }, PREFIX_OPCODE },
3067 { "pminub", { MX, EM }, PREFIX_OPCODE },
3068 { "pand", { MX, EM }, PREFIX_OPCODE },
3069 { "paddusb", { MX, EM }, PREFIX_OPCODE },
3070 { "paddusw", { MX, EM }, PREFIX_OPCODE },
3071 { "pmaxub", { MX, EM }, PREFIX_OPCODE },
3072 { "pandn", { MX, EM }, PREFIX_OPCODE },
252b5132 3073 /* e0 */
507bd325
L
3074 { "pavgb", { MX, EM }, PREFIX_OPCODE },
3075 { "psraw", { MX, EM }, PREFIX_OPCODE },
3076 { "psrad", { MX, EM }, PREFIX_OPCODE },
3077 { "pavgw", { MX, EM }, PREFIX_OPCODE },
3078 { "pmulhuw", { MX, EM }, PREFIX_OPCODE },
3079 { "pmulhw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8
L
3080 { PREFIX_TABLE (PREFIX_0FE6) },
3081 { PREFIX_TABLE (PREFIX_0FE7) },
252b5132 3082 /* e8 */
507bd325
L
3083 { "psubsb", { MX, EM }, PREFIX_OPCODE },
3084 { "psubsw", { MX, EM }, PREFIX_OPCODE },
3085 { "pminsw", { MX, EM }, PREFIX_OPCODE },
3086 { "por", { MX, EM }, PREFIX_OPCODE },
3087 { "paddsb", { MX, EM }, PREFIX_OPCODE },
3088 { "paddsw", { MX, EM }, PREFIX_OPCODE },
3089 { "pmaxsw", { MX, EM }, PREFIX_OPCODE },
3090 { "pxor", { MX, EM }, PREFIX_OPCODE },
252b5132 3091 /* f0 */
1ceb70f8 3092 { PREFIX_TABLE (PREFIX_0FF0) },
507bd325
L
3093 { "psllw", { MX, EM }, PREFIX_OPCODE },
3094 { "pslld", { MX, EM }, PREFIX_OPCODE },
3095 { "psllq", { MX, EM }, PREFIX_OPCODE },
3096 { "pmuludq", { MX, EM }, PREFIX_OPCODE },
3097 { "pmaddwd", { MX, EM }, PREFIX_OPCODE },
3098 { "psadbw", { MX, EM }, PREFIX_OPCODE },
1ceb70f8 3099 { PREFIX_TABLE (PREFIX_0FF7) },
252b5132 3100 /* f8 */
507bd325
L
3101 { "psubb", { MX, EM }, PREFIX_OPCODE },
3102 { "psubw", { MX, EM }, PREFIX_OPCODE },
3103 { "psubd", { MX, EM }, PREFIX_OPCODE },
3104 { "psubq", { MX, EM }, PREFIX_OPCODE },
3105 { "paddb", { MX, EM }, PREFIX_OPCODE },
3106 { "paddw", { MX, EM }, PREFIX_OPCODE },
3107 { "paddd", { MX, EM }, PREFIX_OPCODE },
592d1631 3108 { Bad_Opcode },
252b5132
RH
3109};
3110
3111static const unsigned char onebyte_has_modrm[256] = {
c608c12e
AM
3112 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3113 /* ------------------------------- */
3114 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
3115 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
3116 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
3117 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
3118 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
3119 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
3120 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
3121 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
3122 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
3123 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
3124 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
3125 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
3126 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
3127 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
3128 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
3129 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
3130 /* ------------------------------- */
3131 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
252b5132
RH
3132};
3133
3134static const unsigned char twobyte_has_modrm[256] = {
c608c12e
AM
3135 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3136 /* ------------------------------- */
252b5132 3137 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
b5b1fc4f 3138 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
85f10a01 3139 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
331d2d0d 3140 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
252b5132 3141 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
4bba6815
AM
3142 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
3143 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
85f10a01 3144 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
252b5132
RH
3145 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
3146 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
30d1c836 3147 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
050dfa73 3148 /* b0 */ 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, /* bf */
252b5132 3149 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
ca164297 3150 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
4bba6815 3151 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
ca164297 3152 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
c608c12e
AM
3153 /* ------------------------------- */
3154 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3155};
3156
252b5132
RH
3157static char obuf[100];
3158static char *obufp;
ea397f5b 3159static char *mnemonicendp;
252b5132
RH
3160static char scratchbuf[100];
3161static unsigned char *start_codep;
3162static unsigned char *insn_codep;
3163static unsigned char *codep;
285ca992 3164static unsigned char *end_codep;
f16cd0d5
L
3165static int last_lock_prefix;
3166static int last_repz_prefix;
3167static int last_repnz_prefix;
3168static int last_data_prefix;
3169static int last_addr_prefix;
3170static int last_rex_prefix;
3171static int last_seg_prefix;
04ef582a 3172static int last_active_prefix;
d9949a36 3173static int fwait_prefix;
285ca992
L
3174/* The active segment register prefix. */
3175static int active_seg_prefix;
f16cd0d5
L
3176#define MAX_CODE_LENGTH 15
3177/* We can up to 14 prefixes since the maximum instruction length is
3178 15bytes. */
3179static int all_prefixes[MAX_CODE_LENGTH - 1];
252b5132 3180static disassemble_info *the_info;
7967e09e
L
3181static struct
3182 {
3183 int mod;
7967e09e 3184 int reg;
484c222e 3185 int rm;
7967e09e
L
3186 }
3187modrm;
4bba6815 3188static unsigned char need_modrm;
dfc8cf43
L
3189static struct
3190 {
3191 int scale;
3192 int index;
3193 int base;
3194 }
3195sib;
c0f3af97
L
3196static struct
3197 {
3198 int register_specifier;
3199 int length;
3200 int prefix;
3201 int w;
43234a1e
L
3202 int evex;
3203 int r;
3204 int v;
3205 int mask_register_specifier;
3206 int zeroing;
3207 int ll;
3208 int b;
c0f3af97
L
3209 }
3210vex;
3211static unsigned char need_vex;
3212static unsigned char need_vex_reg;
dae39acc 3213static unsigned char vex_w_done;
252b5132 3214
ea397f5b
L
3215struct op
3216 {
3217 const char *name;
3218 unsigned int len;
3219 };
3220
4bba6815
AM
3221/* If we are accessing mod/rm/reg without need_modrm set, then the
3222 values are stale. Hitting this abort likely indicates that you
3223 need to update onebyte_has_modrm or twobyte_has_modrm. */
3224#define MODRM_CHECK if (!need_modrm) abort ()
3225
d708bcba
AM
3226static const char **names64;
3227static const char **names32;
3228static const char **names16;
3229static const char **names8;
3230static const char **names8rex;
3231static const char **names_seg;
db51cc60
L
3232static const char *index64;
3233static const char *index32;
d708bcba 3234static const char **index16;
7e8b059b 3235static const char **names_bnd;
d708bcba
AM
3236
3237static const char *intel_names64[] = {
3238 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
3239 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
3240};
3241static const char *intel_names32[] = {
3242 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
3243 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
3244};
3245static const char *intel_names16[] = {
3246 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
3247 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
3248};
3249static const char *intel_names8[] = {
3250 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
3251};
3252static const char *intel_names8rex[] = {
3253 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
3254 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
3255};
3256static const char *intel_names_seg[] = {
3257 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
3258};
db51cc60
L
3259static const char *intel_index64 = "riz";
3260static const char *intel_index32 = "eiz";
d708bcba
AM
3261static const char *intel_index16[] = {
3262 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
3263};
3264
3265static const char *att_names64[] = {
3266 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
52b15da3
JH
3267 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
3268};
d708bcba
AM
3269static const char *att_names32[] = {
3270 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
52b15da3 3271 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
252b5132 3272};
d708bcba
AM
3273static const char *att_names16[] = {
3274 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
52b15da3 3275 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
252b5132 3276};
d708bcba
AM
3277static const char *att_names8[] = {
3278 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
252b5132 3279};
d708bcba
AM
3280static const char *att_names8rex[] = {
3281 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
52b15da3
JH
3282 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
3283};
d708bcba
AM
3284static const char *att_names_seg[] = {
3285 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
252b5132 3286};
db51cc60
L
3287static const char *att_index64 = "%riz";
3288static const char *att_index32 = "%eiz";
d708bcba
AM
3289static const char *att_index16[] = {
3290 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
252b5132
RH
3291};
3292
b9733481
L
3293static const char **names_mm;
3294static const char *intel_names_mm[] = {
3295 "mm0", "mm1", "mm2", "mm3",
3296 "mm4", "mm5", "mm6", "mm7"
3297};
3298static const char *att_names_mm[] = {
3299 "%mm0", "%mm1", "%mm2", "%mm3",
3300 "%mm4", "%mm5", "%mm6", "%mm7"
3301};
3302
7e8b059b
L
3303static const char *intel_names_bnd[] = {
3304 "bnd0", "bnd1", "bnd2", "bnd3"
3305};
3306
3307static const char *att_names_bnd[] = {
3308 "%bnd0", "%bnd1", "%bnd2", "%bnd3"
3309};
3310
b9733481
L
3311static const char **names_xmm;
3312static const char *intel_names_xmm[] = {
3313 "xmm0", "xmm1", "xmm2", "xmm3",
3314 "xmm4", "xmm5", "xmm6", "xmm7",
3315 "xmm8", "xmm9", "xmm10", "xmm11",
43234a1e
L
3316 "xmm12", "xmm13", "xmm14", "xmm15",
3317 "xmm16", "xmm17", "xmm18", "xmm19",
3318 "xmm20", "xmm21", "xmm22", "xmm23",
3319 "xmm24", "xmm25", "xmm26", "xmm27",
3320 "xmm28", "xmm29", "xmm30", "xmm31"
b9733481
L
3321};
3322static const char *att_names_xmm[] = {
3323 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
3324 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
3325 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
43234a1e
L
3326 "%xmm12", "%xmm13", "%xmm14", "%xmm15",
3327 "%xmm16", "%xmm17", "%xmm18", "%xmm19",
3328 "%xmm20", "%xmm21", "%xmm22", "%xmm23",
3329 "%xmm24", "%xmm25", "%xmm26", "%xmm27",
3330 "%xmm28", "%xmm29", "%xmm30", "%xmm31"
b9733481
L
3331};
3332
3333static const char **names_ymm;
3334static const char *intel_names_ymm[] = {
3335 "ymm0", "ymm1", "ymm2", "ymm3",
3336 "ymm4", "ymm5", "ymm6", "ymm7",
3337 "ymm8", "ymm9", "ymm10", "ymm11",
43234a1e
L
3338 "ymm12", "ymm13", "ymm14", "ymm15",
3339 "ymm16", "ymm17", "ymm18", "ymm19",
3340 "ymm20", "ymm21", "ymm22", "ymm23",
3341 "ymm24", "ymm25", "ymm26", "ymm27",
3342 "ymm28", "ymm29", "ymm30", "ymm31"
b9733481
L
3343};
3344static const char *att_names_ymm[] = {
3345 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
3346 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
3347 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
43234a1e
L
3348 "%ymm12", "%ymm13", "%ymm14", "%ymm15",
3349 "%ymm16", "%ymm17", "%ymm18", "%ymm19",
3350 "%ymm20", "%ymm21", "%ymm22", "%ymm23",
3351 "%ymm24", "%ymm25", "%ymm26", "%ymm27",
3352 "%ymm28", "%ymm29", "%ymm30", "%ymm31"
3353};
3354
3355static const char **names_zmm;
3356static const char *intel_names_zmm[] = {
3357 "zmm0", "zmm1", "zmm2", "zmm3",
3358 "zmm4", "zmm5", "zmm6", "zmm7",
3359 "zmm8", "zmm9", "zmm10", "zmm11",
3360 "zmm12", "zmm13", "zmm14", "zmm15",
3361 "zmm16", "zmm17", "zmm18", "zmm19",
3362 "zmm20", "zmm21", "zmm22", "zmm23",
3363 "zmm24", "zmm25", "zmm26", "zmm27",
3364 "zmm28", "zmm29", "zmm30", "zmm31"
3365};
3366static const char *att_names_zmm[] = {
3367 "%zmm0", "%zmm1", "%zmm2", "%zmm3",
3368 "%zmm4", "%zmm5", "%zmm6", "%zmm7",
3369 "%zmm8", "%zmm9", "%zmm10", "%zmm11",
3370 "%zmm12", "%zmm13", "%zmm14", "%zmm15",
3371 "%zmm16", "%zmm17", "%zmm18", "%zmm19",
3372 "%zmm20", "%zmm21", "%zmm22", "%zmm23",
3373 "%zmm24", "%zmm25", "%zmm26", "%zmm27",
3374 "%zmm28", "%zmm29", "%zmm30", "%zmm31"
3375};
3376
3377static const char **names_mask;
3378static const char *intel_names_mask[] = {
3379 "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"
3380};
3381static const char *att_names_mask[] = {
3382 "%k0", "%k1", "%k2", "%k3", "%k4", "%k5", "%k6", "%k7"
3383};
3384
3385static const char *names_rounding[] =
3386{
3387 "{rn-sae}",
3388 "{rd-sae}",
3389 "{ru-sae}",
3390 "{rz-sae}"
b9733481
L
3391};
3392
1ceb70f8
L
3393static const struct dis386 reg_table[][8] = {
3394 /* REG_80 */
252b5132 3395 {
bf890a93
IT
3396 { "addA", { Ebh1, Ib }, 0 },
3397 { "orA", { Ebh1, Ib }, 0 },
3398 { "adcA", { Ebh1, Ib }, 0 },
3399 { "sbbA", { Ebh1, Ib }, 0 },
3400 { "andA", { Ebh1, Ib }, 0 },
3401 { "subA", { Ebh1, Ib }, 0 },
3402 { "xorA", { Ebh1, Ib }, 0 },
3403 { "cmpA", { Eb, Ib }, 0 },
252b5132 3404 },
1ceb70f8 3405 /* REG_81 */
252b5132 3406 {
bf890a93
IT
3407 { "addQ", { Evh1, Iv }, 0 },
3408 { "orQ", { Evh1, Iv }, 0 },
3409 { "adcQ", { Evh1, Iv }, 0 },
3410 { "sbbQ", { Evh1, Iv }, 0 },
3411 { "andQ", { Evh1, Iv }, 0 },
3412 { "subQ", { Evh1, Iv }, 0 },
3413 { "xorQ", { Evh1, Iv }, 0 },
3414 { "cmpQ", { Ev, Iv }, 0 },
252b5132 3415 },
7148c369 3416 /* REG_83 */
252b5132 3417 {
bf890a93
IT
3418 { "addQ", { Evh1, sIb }, 0 },
3419 { "orQ", { Evh1, sIb }, 0 },
3420 { "adcQ", { Evh1, sIb }, 0 },
3421 { "sbbQ", { Evh1, sIb }, 0 },
3422 { "andQ", { Evh1, sIb }, 0 },
3423 { "subQ", { Evh1, sIb }, 0 },
3424 { "xorQ", { Evh1, sIb }, 0 },
3425 { "cmpQ", { Ev, sIb }, 0 },
252b5132 3426 },
1ceb70f8 3427 /* REG_8F */
4e7d34a6 3428 {
bf890a93 3429 { "popU", { stackEv }, 0 },
c48244a5 3430 { XOP_8F_TABLE (XOP_09) },
592d1631
L
3431 { Bad_Opcode },
3432 { Bad_Opcode },
3433 { Bad_Opcode },
f88c9eb0 3434 { XOP_8F_TABLE (XOP_09) },
4e7d34a6 3435 },
1ceb70f8 3436 /* REG_C0 */
252b5132 3437 {
bf890a93
IT
3438 { "rolA", { Eb, Ib }, 0 },
3439 { "rorA", { Eb, Ib }, 0 },
3440 { "rclA", { Eb, Ib }, 0 },
3441 { "rcrA", { Eb, Ib }, 0 },
3442 { "shlA", { Eb, Ib }, 0 },
3443 { "shrA", { Eb, Ib }, 0 },
592d1631 3444 { Bad_Opcode },
bf890a93 3445 { "sarA", { Eb, Ib }, 0 },
252b5132 3446 },
1ceb70f8 3447 /* REG_C1 */
252b5132 3448 {
bf890a93
IT
3449 { "rolQ", { Ev, Ib }, 0 },
3450 { "rorQ", { Ev, Ib }, 0 },
3451 { "rclQ", { Ev, Ib }, 0 },
3452 { "rcrQ", { Ev, Ib }, 0 },
3453 { "shlQ", { Ev, Ib }, 0 },
3454 { "shrQ", { Ev, Ib }, 0 },
592d1631 3455 { Bad_Opcode },
bf890a93 3456 { "sarQ", { Ev, Ib }, 0 },
252b5132 3457 },
1ceb70f8 3458 /* REG_C6 */
4e7d34a6 3459 {
bf890a93 3460 { "movA", { Ebh3, Ib }, 0 },
42164a71
L
3461 { Bad_Opcode },
3462 { Bad_Opcode },
3463 { Bad_Opcode },
3464 { Bad_Opcode },
3465 { Bad_Opcode },
3466 { Bad_Opcode },
3467 { MOD_TABLE (MOD_C6_REG_7) },
4e7d34a6 3468 },
1ceb70f8 3469 /* REG_C7 */
4e7d34a6 3470 {
bf890a93 3471 { "movQ", { Evh3, Iv }, 0 },
42164a71
L
3472 { Bad_Opcode },
3473 { Bad_Opcode },
3474 { Bad_Opcode },
3475 { Bad_Opcode },
3476 { Bad_Opcode },
3477 { Bad_Opcode },
3478 { MOD_TABLE (MOD_C7_REG_7) },
4e7d34a6 3479 },
1ceb70f8 3480 /* REG_D0 */
252b5132 3481 {
bf890a93
IT
3482 { "rolA", { Eb, I1 }, 0 },
3483 { "rorA", { Eb, I1 }, 0 },
3484 { "rclA", { Eb, I1 }, 0 },
3485 { "rcrA", { Eb, I1 }, 0 },
3486 { "shlA", { Eb, I1 }, 0 },
3487 { "shrA", { Eb, I1 }, 0 },
592d1631 3488 { Bad_Opcode },
bf890a93 3489 { "sarA", { Eb, I1 }, 0 },
252b5132 3490 },
1ceb70f8 3491 /* REG_D1 */
252b5132 3492 {
bf890a93
IT
3493 { "rolQ", { Ev, I1 }, 0 },
3494 { "rorQ", { Ev, I1 }, 0 },
3495 { "rclQ", { Ev, I1 }, 0 },
3496 { "rcrQ", { Ev, I1 }, 0 },
3497 { "shlQ", { Ev, I1 }, 0 },
3498 { "shrQ", { Ev, I1 }, 0 },
592d1631 3499 { Bad_Opcode },
bf890a93 3500 { "sarQ", { Ev, I1 }, 0 },
252b5132 3501 },
1ceb70f8 3502 /* REG_D2 */
252b5132 3503 {
bf890a93
IT
3504 { "rolA", { Eb, CL }, 0 },
3505 { "rorA", { Eb, CL }, 0 },
3506 { "rclA", { Eb, CL }, 0 },
3507 { "rcrA", { Eb, CL }, 0 },
3508 { "shlA", { Eb, CL }, 0 },
3509 { "shrA", { Eb, CL }, 0 },
592d1631 3510 { Bad_Opcode },
bf890a93 3511 { "sarA", { Eb, CL }, 0 },
252b5132 3512 },
1ceb70f8 3513 /* REG_D3 */
252b5132 3514 {
bf890a93
IT
3515 { "rolQ", { Ev, CL }, 0 },
3516 { "rorQ", { Ev, CL }, 0 },
3517 { "rclQ", { Ev, CL }, 0 },
3518 { "rcrQ", { Ev, CL }, 0 },
3519 { "shlQ", { Ev, CL }, 0 },
3520 { "shrQ", { Ev, CL }, 0 },
592d1631 3521 { Bad_Opcode },
bf890a93 3522 { "sarQ", { Ev, CL }, 0 },
252b5132 3523 },
1ceb70f8 3524 /* REG_F6 */
252b5132 3525 {
bf890a93 3526 { "testA", { Eb, Ib }, 0 },
7db2c588 3527 { "testA", { Eb, Ib }, 0 },
bf890a93
IT
3528 { "notA", { Ebh1 }, 0 },
3529 { "negA", { Ebh1 }, 0 },
3530 { "mulA", { Eb }, 0 }, /* Don't print the implicit %al register, */
3531 { "imulA", { Eb }, 0 }, /* to distinguish these opcodes from other */
3532 { "divA", { Eb }, 0 }, /* mul/imul opcodes. Do the same for div */
3533 { "idivA", { Eb }, 0 }, /* and idiv for consistency. */
252b5132 3534 },
1ceb70f8 3535 /* REG_F7 */
252b5132 3536 {
bf890a93 3537 { "testQ", { Ev, Iv }, 0 },
7db2c588 3538 { "testQ", { Ev, Iv }, 0 },
bf890a93
IT
3539 { "notQ", { Evh1 }, 0 },
3540 { "negQ", { Evh1 }, 0 },
3541 { "mulQ", { Ev }, 0 }, /* Don't print the implicit register. */
3542 { "imulQ", { Ev }, 0 },
3543 { "divQ", { Ev }, 0 },
3544 { "idivQ", { Ev }, 0 },
252b5132 3545 },
1ceb70f8 3546 /* REG_FE */
252b5132 3547 {
bf890a93
IT
3548 { "incA", { Ebh1 }, 0 },
3549 { "decA", { Ebh1 }, 0 },
252b5132 3550 },
1ceb70f8 3551 /* REG_FF */
252b5132 3552 {
bf890a93
IT
3553 { "incQ", { Evh1 }, 0 },
3554 { "decQ", { Evh1 }, 0 },
04ef582a 3555 { "call{&|}", { indirEv, NOTRACK, BND }, 0 },
4a357820 3556 { MOD_TABLE (MOD_FF_REG_3) },
04ef582a 3557 { "jmp{&|}", { indirEv, NOTRACK, BND }, 0 },
4a357820 3558 { MOD_TABLE (MOD_FF_REG_5) },
bf890a93 3559 { "pushU", { stackEv }, 0 },
592d1631 3560 { Bad_Opcode },
252b5132 3561 },
1ceb70f8 3562 /* REG_0F00 */
252b5132 3563 {
bf890a93
IT
3564 { "sldtD", { Sv }, 0 },
3565 { "strD", { Sv }, 0 },
3566 { "lldt", { Ew }, 0 },
3567 { "ltr", { Ew }, 0 },
3568 { "verr", { Ew }, 0 },
3569 { "verw", { Ew }, 0 },
592d1631
L
3570 { Bad_Opcode },
3571 { Bad_Opcode },
252b5132 3572 },
1ceb70f8 3573 /* REG_0F01 */
252b5132 3574 {
1ceb70f8
L
3575 { MOD_TABLE (MOD_0F01_REG_0) },
3576 { MOD_TABLE (MOD_0F01_REG_1) },
3577 { MOD_TABLE (MOD_0F01_REG_2) },
3578 { MOD_TABLE (MOD_0F01_REG_3) },
bf890a93 3579 { "smswD", { Sv }, 0 },
8eab4136 3580 { MOD_TABLE (MOD_0F01_REG_5) },
bf890a93 3581 { "lmsw", { Ew }, 0 },
1ceb70f8 3582 { MOD_TABLE (MOD_0F01_REG_7) },
252b5132 3583 },
b5b1fc4f 3584 /* REG_0F0D */
252b5132 3585 {
bf890a93
IT
3586 { "prefetch", { Mb }, 0 },
3587 { "prefetchw", { Mb }, 0 },
3588 { "prefetchwt1", { Mb }, 0 },
3589 { "prefetch", { Mb }, 0 },
3590 { "prefetch", { Mb }, 0 },
3591 { "prefetch", { Mb }, 0 },
3592 { "prefetch", { Mb }, 0 },
3593 { "prefetch", { Mb }, 0 },
252b5132 3594 },
1ceb70f8 3595 /* REG_0F18 */
252b5132 3596 {
1ceb70f8
L
3597 { MOD_TABLE (MOD_0F18_REG_0) },
3598 { MOD_TABLE (MOD_0F18_REG_1) },
3599 { MOD_TABLE (MOD_0F18_REG_2) },
3600 { MOD_TABLE (MOD_0F18_REG_3) },
d7189fa5
RM
3601 { MOD_TABLE (MOD_0F18_REG_4) },
3602 { MOD_TABLE (MOD_0F18_REG_5) },
3603 { MOD_TABLE (MOD_0F18_REG_6) },
3604 { MOD_TABLE (MOD_0F18_REG_7) },
252b5132 3605 },
603555e5
L
3606 /* REG_0F1E_MOD_3 */
3607 {
3608 { "nopQ", { Ev }, 0 },
3609 { "rdsspK", { Rdq }, PREFIX_OPCODE },
3610 { "nopQ", { Ev }, 0 },
3611 { "nopQ", { Ev }, 0 },
3612 { "nopQ", { Ev }, 0 },
3613 { "nopQ", { Ev }, 0 },
3614 { "nopQ", { Ev }, 0 },
3615 { RM_TABLE (RM_0F1E_MOD_3_REG_7) },
3616 },
1ceb70f8 3617 /* REG_0F71 */
a6bd098c 3618 {
592d1631
L
3619 { Bad_Opcode },
3620 { Bad_Opcode },
1ceb70f8 3621 { MOD_TABLE (MOD_0F71_REG_2) },
592d1631 3622 { Bad_Opcode },
1ceb70f8 3623 { MOD_TABLE (MOD_0F71_REG_4) },
592d1631 3624 { Bad_Opcode },
1ceb70f8 3625 { MOD_TABLE (MOD_0F71_REG_6) },
a6bd098c 3626 },
1ceb70f8 3627 /* REG_0F72 */
a6bd098c 3628 {
592d1631
L
3629 { Bad_Opcode },
3630 { Bad_Opcode },
1ceb70f8 3631 { MOD_TABLE (MOD_0F72_REG_2) },
592d1631 3632 { Bad_Opcode },
1ceb70f8 3633 { MOD_TABLE (MOD_0F72_REG_4) },
592d1631 3634 { Bad_Opcode },
1ceb70f8 3635 { MOD_TABLE (MOD_0F72_REG_6) },
a6bd098c 3636 },
1ceb70f8 3637 /* REG_0F73 */
252b5132 3638 {
592d1631
L
3639 { Bad_Opcode },
3640 { Bad_Opcode },
1ceb70f8
L
3641 { MOD_TABLE (MOD_0F73_REG_2) },
3642 { MOD_TABLE (MOD_0F73_REG_3) },
592d1631
L
3643 { Bad_Opcode },
3644 { Bad_Opcode },
1ceb70f8
L
3645 { MOD_TABLE (MOD_0F73_REG_6) },
3646 { MOD_TABLE (MOD_0F73_REG_7) },
252b5132 3647 },
1ceb70f8 3648 /* REG_0FA6 */
252b5132 3649 {
bf890a93
IT
3650 { "montmul", { { OP_0f07, 0 } }, 0 },
3651 { "xsha1", { { OP_0f07, 0 } }, 0 },
3652 { "xsha256", { { OP_0f07, 0 } }, 0 },
4e7d34a6 3653 },
1ceb70f8 3654 /* REG_0FA7 */
4e7d34a6 3655 {
bf890a93
IT
3656 { "xstore-rng", { { OP_0f07, 0 } }, 0 },
3657 { "xcrypt-ecb", { { OP_0f07, 0 } }, 0 },
3658 { "xcrypt-cbc", { { OP_0f07, 0 } }, 0 },
3659 { "xcrypt-ctr", { { OP_0f07, 0 } }, 0 },
3660 { "xcrypt-cfb", { { OP_0f07, 0 } }, 0 },
3661 { "xcrypt-ofb", { { OP_0f07, 0 } }, 0 },
4e7d34a6 3662 },
1ceb70f8 3663 /* REG_0FAE */
4e7d34a6 3664 {
1ceb70f8
L
3665 { MOD_TABLE (MOD_0FAE_REG_0) },
3666 { MOD_TABLE (MOD_0FAE_REG_1) },
3667 { MOD_TABLE (MOD_0FAE_REG_2) },
3668 { MOD_TABLE (MOD_0FAE_REG_3) },
475a2301 3669 { MOD_TABLE (MOD_0FAE_REG_4) },
1ceb70f8
L
3670 { MOD_TABLE (MOD_0FAE_REG_5) },
3671 { MOD_TABLE (MOD_0FAE_REG_6) },
3672 { MOD_TABLE (MOD_0FAE_REG_7) },
252b5132 3673 },
1ceb70f8 3674 /* REG_0FBA */
252b5132 3675 {
592d1631
L
3676 { Bad_Opcode },
3677 { Bad_Opcode },
3678 { Bad_Opcode },
3679 { Bad_Opcode },
bf890a93
IT
3680 { "btQ", { Ev, Ib }, 0 },
3681 { "btsQ", { Evh1, Ib }, 0 },
3682 { "btrQ", { Evh1, Ib }, 0 },
3683 { "btcQ", { Evh1, Ib }, 0 },
c608c12e 3684 },
1ceb70f8 3685 /* REG_0FC7 */
c608c12e 3686 {
592d1631 3687 { Bad_Opcode },
bf890a93 3688 { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } }, 0 },
592d1631 3689 { Bad_Opcode },
963f3586
IT
3690 { MOD_TABLE (MOD_0FC7_REG_3) },
3691 { MOD_TABLE (MOD_0FC7_REG_4) },
3692 { MOD_TABLE (MOD_0FC7_REG_5) },
1ceb70f8
L
3693 { MOD_TABLE (MOD_0FC7_REG_6) },
3694 { MOD_TABLE (MOD_0FC7_REG_7) },
252b5132 3695 },
592a252b 3696 /* REG_VEX_0F71 */
c0f3af97 3697 {
592d1631
L
3698 { Bad_Opcode },
3699 { Bad_Opcode },
592a252b 3700 { MOD_TABLE (MOD_VEX_0F71_REG_2) },
592d1631 3701 { Bad_Opcode },
592a252b 3702 { MOD_TABLE (MOD_VEX_0F71_REG_4) },
592d1631 3703 { Bad_Opcode },
592a252b 3704 { MOD_TABLE (MOD_VEX_0F71_REG_6) },
c0f3af97 3705 },
592a252b 3706 /* REG_VEX_0F72 */
c0f3af97 3707 {
592d1631
L
3708 { Bad_Opcode },
3709 { Bad_Opcode },
592a252b 3710 { MOD_TABLE (MOD_VEX_0F72_REG_2) },
592d1631 3711 { Bad_Opcode },
592a252b 3712 { MOD_TABLE (MOD_VEX_0F72_REG_4) },
592d1631 3713 { Bad_Opcode },
592a252b 3714 { MOD_TABLE (MOD_VEX_0F72_REG_6) },
c0f3af97 3715 },
592a252b 3716 /* REG_VEX_0F73 */
c0f3af97 3717 {
592d1631
L
3718 { Bad_Opcode },
3719 { Bad_Opcode },
592a252b
L
3720 { MOD_TABLE (MOD_VEX_0F73_REG_2) },
3721 { MOD_TABLE (MOD_VEX_0F73_REG_3) },
592d1631
L
3722 { Bad_Opcode },
3723 { Bad_Opcode },
592a252b
L
3724 { MOD_TABLE (MOD_VEX_0F73_REG_6) },
3725 { MOD_TABLE (MOD_VEX_0F73_REG_7) },
c0f3af97 3726 },
592a252b 3727 /* REG_VEX_0FAE */
c0f3af97 3728 {
592d1631
L
3729 { Bad_Opcode },
3730 { Bad_Opcode },
592a252b
L
3731 { MOD_TABLE (MOD_VEX_0FAE_REG_2) },
3732 { MOD_TABLE (MOD_VEX_0FAE_REG_3) },
c0f3af97 3733 },
f12dc422
L
3734 /* REG_VEX_0F38F3 */
3735 {
3736 { Bad_Opcode },
3737 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1) },
3738 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2) },
3739 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3) },
3740 },
f88c9eb0
SP
3741 /* REG_XOP_LWPCB */
3742 {
bf890a93
IT
3743 { "llwpcb", { { OP_LWPCB_E, 0 } }, 0 },
3744 { "slwpcb", { { OP_LWPCB_E, 0 } }, 0 },
f88c9eb0
SP
3745 },
3746 /* REG_XOP_LWP */
3747 {
bf890a93
IT
3748 { "lwpins", { { OP_LWP_E, 0 }, Ed, Iq }, 0 },
3749 { "lwpval", { { OP_LWP_E, 0 }, Ed, Iq }, 0 },
f88c9eb0 3750 },
2a2a0f38
QN
3751 /* REG_XOP_TBM_01 */
3752 {
3753 { Bad_Opcode },
bf890a93
IT
3754 { "blcfill", { { OP_LWP_E, 0 }, Ev }, 0 },
3755 { "blsfill", { { OP_LWP_E, 0 }, Ev }, 0 },
3756 { "blcs", { { OP_LWP_E, 0 }, Ev }, 0 },
3757 { "tzmsk", { { OP_LWP_E, 0 }, Ev }, 0 },
3758 { "blcic", { { OP_LWP_E, 0 }, Ev }, 0 },
3759 { "blsic", { { OP_LWP_E, 0 }, Ev }, 0 },
3760 { "t1mskc", { { OP_LWP_E, 0 }, Ev }, 0 },
2a2a0f38
QN
3761 },
3762 /* REG_XOP_TBM_02 */
3763 {
3764 { Bad_Opcode },
bf890a93 3765 { "blcmsk", { { OP_LWP_E, 0 }, Ev }, 0 },
2a2a0f38
QN
3766 { Bad_Opcode },
3767 { Bad_Opcode },
3768 { Bad_Opcode },
3769 { Bad_Opcode },
bf890a93 3770 { "blci", { { OP_LWP_E, 0 }, Ev }, 0 },
2a2a0f38 3771 },
43234a1e
L
3772#define NEED_REG_TABLE
3773#include "i386-dis-evex.h"
3774#undef NEED_REG_TABLE
4e7d34a6
L
3775};
3776
1ceb70f8
L
3777static const struct dis386 prefix_table[][4] = {
3778 /* PREFIX_90 */
252b5132 3779 {
bf890a93
IT
3780 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
3781 { "pause", { XX }, 0 },
3782 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
507bd325 3783 { NULL, { { NULL, 0 } }, PREFIX_IGNORED }
0f10071e 3784 },
4e7d34a6 3785
603555e5
L
3786 /* PREFIX_MOD_0_0F01_REG_5 */
3787 {
3788 { Bad_Opcode },
3789 { "rstorssp", { Mq }, PREFIX_OPCODE },
3790 },
3791
3792 /* PREFIX_MOD_3_0F01_REG_5_RM_1 */
3793 {
3794 { Bad_Opcode },
3795 { "incsspK", { Skip_MODRM }, PREFIX_OPCODE },
3796 },
3797
3798 /* PREFIX_MOD_3_0F01_REG_5_RM_2 */
3799 {
3800 { Bad_Opcode },
3801 { "savessp", { Skip_MODRM }, PREFIX_OPCODE },
3802 },
3803
1ceb70f8 3804 /* PREFIX_0F10 */
cc0ec051 3805 {
507bd325
L
3806 { "movups", { XM, EXx }, PREFIX_OPCODE },
3807 { "movss", { XM, EXd }, PREFIX_OPCODE },
3808 { "movupd", { XM, EXx }, PREFIX_OPCODE },
3809 { "movsd", { XM, EXq }, PREFIX_OPCODE },
30d1c836 3810 },
4e7d34a6 3811
1ceb70f8 3812 /* PREFIX_0F11 */
30d1c836 3813 {
507bd325
L
3814 { "movups", { EXxS, XM }, PREFIX_OPCODE },
3815 { "movss", { EXdS, XM }, PREFIX_OPCODE },
3816 { "movupd", { EXxS, XM }, PREFIX_OPCODE },
3817 { "movsd", { EXqS, XM }, PREFIX_OPCODE },
4e7d34a6 3818 },
252b5132 3819
1ceb70f8 3820 /* PREFIX_0F12 */
c608c12e 3821 {
1ceb70f8 3822 { MOD_TABLE (MOD_0F12_PREFIX_0) },
507bd325
L
3823 { "movsldup", { XM, EXx }, PREFIX_OPCODE },
3824 { "movlpd", { XM, EXq }, PREFIX_OPCODE },
3825 { "movddup", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3826 },
4e7d34a6 3827
1ceb70f8 3828 /* PREFIX_0F16 */
c608c12e 3829 {
1ceb70f8 3830 { MOD_TABLE (MOD_0F16_PREFIX_0) },
507bd325
L
3831 { "movshdup", { XM, EXx }, PREFIX_OPCODE },
3832 { "movhpd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3833 },
4e7d34a6 3834
7e8b059b
L
3835 /* PREFIX_0F1A */
3836 {
3837 { MOD_TABLE (MOD_0F1A_PREFIX_0) },
bf890a93
IT
3838 { "bndcl", { Gbnd, Ev_bnd }, 0 },
3839 { "bndmov", { Gbnd, Ebnd }, 0 },
3840 { "bndcu", { Gbnd, Ev_bnd }, 0 },
7e8b059b
L
3841 },
3842
3843 /* PREFIX_0F1B */
3844 {
3845 { MOD_TABLE (MOD_0F1B_PREFIX_0) },
3846 { MOD_TABLE (MOD_0F1B_PREFIX_1) },
bf890a93
IT
3847 { "bndmov", { Ebnd, Gbnd }, 0 },
3848 { "bndcn", { Gbnd, Ev_bnd }, 0 },
7e8b059b
L
3849 },
3850
603555e5
L
3851 /* PREFIX_0F1E */
3852 {
3853 { "nopQ", { Ev }, PREFIX_OPCODE },
3854 { MOD_TABLE (MOD_0F1E_PREFIX_1) },
3855 { "nopQ", { Ev }, PREFIX_OPCODE },
3856 { "nopQ", { Ev }, PREFIX_OPCODE },
3857 },
3858
1ceb70f8 3859 /* PREFIX_0F2A */
c608c12e 3860 {
507bd325
L
3861 { "cvtpi2ps", { XM, EMCq }, PREFIX_OPCODE },
3862 { "cvtsi2ss%LQ", { XM, Ev }, PREFIX_OPCODE },
3863 { "cvtpi2pd", { XM, EMCq }, PREFIX_OPCODE },
bf890a93 3864 { "cvtsi2sd%LQ", { XM, Ev }, 0 },
c608c12e 3865 },
4e7d34a6 3866
1ceb70f8 3867 /* PREFIX_0F2B */
c608c12e 3868 {
75c135a8
L
3869 { MOD_TABLE (MOD_0F2B_PREFIX_0) },
3870 { MOD_TABLE (MOD_0F2B_PREFIX_1) },
3871 { MOD_TABLE (MOD_0F2B_PREFIX_2) },
3872 { MOD_TABLE (MOD_0F2B_PREFIX_3) },
c608c12e 3873 },
4e7d34a6 3874
1ceb70f8 3875 /* PREFIX_0F2C */
c608c12e 3876 {
507bd325
L
3877 { "cvttps2pi", { MXC, EXq }, PREFIX_OPCODE },
3878 { "cvttss2siY", { Gv, EXd }, PREFIX_OPCODE },
3879 { "cvttpd2pi", { MXC, EXx }, PREFIX_OPCODE },
3880 { "cvttsd2siY", { Gv, EXq }, PREFIX_OPCODE },
c608c12e 3881 },
4e7d34a6 3882
1ceb70f8 3883 /* PREFIX_0F2D */
c608c12e 3884 {
507bd325
L
3885 { "cvtps2pi", { MXC, EXq }, PREFIX_OPCODE },
3886 { "cvtss2siY", { Gv, EXd }, PREFIX_OPCODE },
3887 { "cvtpd2pi", { MXC, EXx }, PREFIX_OPCODE },
3888 { "cvtsd2siY", { Gv, EXq }, PREFIX_OPCODE },
c608c12e 3889 },
4e7d34a6 3890
1ceb70f8 3891 /* PREFIX_0F2E */
c608c12e 3892 {
bf890a93 3893 { "ucomiss",{ XM, EXd }, 0 },
592d1631 3894 { Bad_Opcode },
bf890a93 3895 { "ucomisd",{ XM, EXq }, 0 },
c608c12e 3896 },
4e7d34a6 3897
1ceb70f8 3898 /* PREFIX_0F2F */
c608c12e 3899 {
bf890a93 3900 { "comiss", { XM, EXd }, 0 },
592d1631 3901 { Bad_Opcode },
bf890a93 3902 { "comisd", { XM, EXq }, 0 },
c608c12e 3903 },
4e7d34a6 3904
1ceb70f8 3905 /* PREFIX_0F51 */
c608c12e 3906 {
507bd325
L
3907 { "sqrtps", { XM, EXx }, PREFIX_OPCODE },
3908 { "sqrtss", { XM, EXd }, PREFIX_OPCODE },
3909 { "sqrtpd", { XM, EXx }, PREFIX_OPCODE },
3910 { "sqrtsd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3911 },
4e7d34a6 3912
1ceb70f8 3913 /* PREFIX_0F52 */
c608c12e 3914 {
507bd325
L
3915 { "rsqrtps",{ XM, EXx }, PREFIX_OPCODE },
3916 { "rsqrtss",{ XM, EXd }, PREFIX_OPCODE },
c608c12e 3917 },
4e7d34a6 3918
1ceb70f8 3919 /* PREFIX_0F53 */
c608c12e 3920 {
507bd325
L
3921 { "rcpps", { XM, EXx }, PREFIX_OPCODE },
3922 { "rcpss", { XM, EXd }, PREFIX_OPCODE },
c608c12e 3923 },
4e7d34a6 3924
1ceb70f8 3925 /* PREFIX_0F58 */
c608c12e 3926 {
507bd325
L
3927 { "addps", { XM, EXx }, PREFIX_OPCODE },
3928 { "addss", { XM, EXd }, PREFIX_OPCODE },
3929 { "addpd", { XM, EXx }, PREFIX_OPCODE },
3930 { "addsd", { XM, EXq }, PREFIX_OPCODE },
c608c12e 3931 },
4e7d34a6 3932
1ceb70f8 3933 /* PREFIX_0F59 */
c608c12e 3934 {
507bd325
L
3935 { "mulps", { XM, EXx }, PREFIX_OPCODE },
3936 { "mulss", { XM, EXd }, PREFIX_OPCODE },
3937 { "mulpd", { XM, EXx }, PREFIX_OPCODE },
3938 { "mulsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3939 },
4e7d34a6 3940
1ceb70f8 3941 /* PREFIX_0F5A */
041bd2e0 3942 {
507bd325
L
3943 { "cvtps2pd", { XM, EXq }, PREFIX_OPCODE },
3944 { "cvtss2sd", { XM, EXd }, PREFIX_OPCODE },
3945 { "cvtpd2ps", { XM, EXx }, PREFIX_OPCODE },
3946 { "cvtsd2ss", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3947 },
4e7d34a6 3948
1ceb70f8 3949 /* PREFIX_0F5B */
041bd2e0 3950 {
507bd325
L
3951 { "cvtdq2ps", { XM, EXx }, PREFIX_OPCODE },
3952 { "cvttps2dq", { XM, EXx }, PREFIX_OPCODE },
3953 { "cvtps2dq", { XM, EXx }, PREFIX_OPCODE },
041bd2e0 3954 },
4e7d34a6 3955
1ceb70f8 3956 /* PREFIX_0F5C */
041bd2e0 3957 {
507bd325
L
3958 { "subps", { XM, EXx }, PREFIX_OPCODE },
3959 { "subss", { XM, EXd }, PREFIX_OPCODE },
3960 { "subpd", { XM, EXx }, PREFIX_OPCODE },
3961 { "subsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3962 },
4e7d34a6 3963
1ceb70f8 3964 /* PREFIX_0F5D */
041bd2e0 3965 {
507bd325
L
3966 { "minps", { XM, EXx }, PREFIX_OPCODE },
3967 { "minss", { XM, EXd }, PREFIX_OPCODE },
3968 { "minpd", { XM, EXx }, PREFIX_OPCODE },
3969 { "minsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3970 },
4e7d34a6 3971
1ceb70f8 3972 /* PREFIX_0F5E */
041bd2e0 3973 {
507bd325
L
3974 { "divps", { XM, EXx }, PREFIX_OPCODE },
3975 { "divss", { XM, EXd }, PREFIX_OPCODE },
3976 { "divpd", { XM, EXx }, PREFIX_OPCODE },
3977 { "divsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3978 },
4e7d34a6 3979
1ceb70f8 3980 /* PREFIX_0F5F */
041bd2e0 3981 {
507bd325
L
3982 { "maxps", { XM, EXx }, PREFIX_OPCODE },
3983 { "maxss", { XM, EXd }, PREFIX_OPCODE },
3984 { "maxpd", { XM, EXx }, PREFIX_OPCODE },
3985 { "maxsd", { XM, EXq }, PREFIX_OPCODE },
041bd2e0 3986 },
4e7d34a6 3987
1ceb70f8 3988 /* PREFIX_0F60 */
041bd2e0 3989 {
507bd325 3990 { "punpcklbw",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3991 { Bad_Opcode },
507bd325 3992 { "punpcklbw",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 3993 },
4e7d34a6 3994
1ceb70f8 3995 /* PREFIX_0F61 */
041bd2e0 3996 {
507bd325 3997 { "punpcklwd",{ MX, EMd }, PREFIX_OPCODE },
592d1631 3998 { Bad_Opcode },
507bd325 3999 { "punpcklwd",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 4000 },
4e7d34a6 4001
1ceb70f8 4002 /* PREFIX_0F62 */
041bd2e0 4003 {
507bd325 4004 { "punpckldq",{ MX, EMd }, PREFIX_OPCODE },
592d1631 4005 { Bad_Opcode },
507bd325 4006 { "punpckldq",{ MX, EMx }, PREFIX_OPCODE },
041bd2e0 4007 },
4e7d34a6 4008
1ceb70f8 4009 /* PREFIX_0F6C */
041bd2e0 4010 {
592d1631
L
4011 { Bad_Opcode },
4012 { Bad_Opcode },
507bd325 4013 { "punpcklqdq", { XM, EXx }, PREFIX_OPCODE },
0f17484f 4014 },
4e7d34a6 4015
1ceb70f8 4016 /* PREFIX_0F6D */
0f17484f 4017 {
592d1631
L
4018 { Bad_Opcode },
4019 { Bad_Opcode },
507bd325 4020 { "punpckhqdq", { XM, EXx }, PREFIX_OPCODE },
041bd2e0 4021 },
4e7d34a6 4022
1ceb70f8 4023 /* PREFIX_0F6F */
ca164297 4024 {
507bd325
L
4025 { "movq", { MX, EM }, PREFIX_OPCODE },
4026 { "movdqu", { XM, EXx }, PREFIX_OPCODE },
4027 { "movdqa", { XM, EXx }, PREFIX_OPCODE },
ca164297 4028 },
4e7d34a6 4029
1ceb70f8 4030 /* PREFIX_0F70 */
4e7d34a6 4031 {
507bd325
L
4032 { "pshufw", { MX, EM, Ib }, PREFIX_OPCODE },
4033 { "pshufhw",{ XM, EXx, Ib }, PREFIX_OPCODE },
4034 { "pshufd", { XM, EXx, Ib }, PREFIX_OPCODE },
4035 { "pshuflw",{ XM, EXx, Ib }, PREFIX_OPCODE },
4e7d34a6
L
4036 },
4037
92fddf8e
L
4038 /* PREFIX_0F73_REG_3 */
4039 {
592d1631
L
4040 { Bad_Opcode },
4041 { Bad_Opcode },
bf890a93 4042 { "psrldq", { XS, Ib }, 0 },
92fddf8e
L
4043 },
4044
4045 /* PREFIX_0F73_REG_7 */
4046 {
592d1631
L
4047 { Bad_Opcode },
4048 { Bad_Opcode },
bf890a93 4049 { "pslldq", { XS, Ib }, 0 },
92fddf8e
L
4050 },
4051
1ceb70f8 4052 /* PREFIX_0F78 */
4e7d34a6 4053 {
bf890a93 4054 {"vmread", { Em, Gm }, 0 },
592d1631 4055 { Bad_Opcode },
bf890a93
IT
4056 {"extrq", { XS, Ib, Ib }, 0 },
4057 {"insertq", { XM, XS, Ib, Ib }, 0 },
4e7d34a6
L
4058 },
4059
1ceb70f8 4060 /* PREFIX_0F79 */
4e7d34a6 4061 {
bf890a93 4062 {"vmwrite", { Gm, Em }, 0 },
592d1631 4063 { Bad_Opcode },
bf890a93
IT
4064 {"extrq", { XM, XS }, 0 },
4065 {"insertq", { XM, XS }, 0 },
4e7d34a6
L
4066 },
4067
1ceb70f8 4068 /* PREFIX_0F7C */
ca164297 4069 {
592d1631
L
4070 { Bad_Opcode },
4071 { Bad_Opcode },
507bd325
L
4072 { "haddpd", { XM, EXx }, PREFIX_OPCODE },
4073 { "haddps", { XM, EXx }, PREFIX_OPCODE },
ca164297 4074 },
4e7d34a6 4075
1ceb70f8 4076 /* PREFIX_0F7D */
ca164297 4077 {
592d1631
L
4078 { Bad_Opcode },
4079 { Bad_Opcode },
507bd325
L
4080 { "hsubpd", { XM, EXx }, PREFIX_OPCODE },
4081 { "hsubps", { XM, EXx }, PREFIX_OPCODE },
ca164297 4082 },
4e7d34a6 4083
1ceb70f8 4084 /* PREFIX_0F7E */
ca164297 4085 {
507bd325
L
4086 { "movK", { Edq, MX }, PREFIX_OPCODE },
4087 { "movq", { XM, EXq }, PREFIX_OPCODE },
4088 { "movK", { Edq, XM }, PREFIX_OPCODE },
ca164297 4089 },
4e7d34a6 4090
1ceb70f8 4091 /* PREFIX_0F7F */
ca164297 4092 {
507bd325
L
4093 { "movq", { EMS, MX }, PREFIX_OPCODE },
4094 { "movdqu", { EXxS, XM }, PREFIX_OPCODE },
4095 { "movdqa", { EXxS, XM }, PREFIX_OPCODE },
ca164297 4096 },
4e7d34a6 4097
c7b8aa3a
L
4098 /* PREFIX_0FAE_REG_0 */
4099 {
4100 { Bad_Opcode },
bf890a93 4101 { "rdfsbase", { Ev }, 0 },
c7b8aa3a
L
4102 },
4103
4104 /* PREFIX_0FAE_REG_1 */
4105 {
4106 { Bad_Opcode },
bf890a93 4107 { "rdgsbase", { Ev }, 0 },
c7b8aa3a
L
4108 },
4109
4110 /* PREFIX_0FAE_REG_2 */
4111 {
4112 { Bad_Opcode },
bf890a93 4113 { "wrfsbase", { Ev }, 0 },
c7b8aa3a
L
4114 },
4115
4116 /* PREFIX_0FAE_REG_3 */
4117 {
4118 { Bad_Opcode },
bf890a93 4119 { "wrgsbase", { Ev }, 0 },
c7b8aa3a
L
4120 },
4121
6b40c462
L
4122 /* PREFIX_MOD_0_0FAE_REG_4 */
4123 {
4124 { "xsave", { FXSAVE }, 0 },
4125 { "ptwrite%LQ", { Edq }, 0 },
4126 },
4127
4128 /* PREFIX_MOD_3_0FAE_REG_4 */
4129 {
4130 { Bad_Opcode },
4131 { "ptwrite%LQ", { Edq }, 0 },
4132 },
4133
603555e5
L
4134 /* PREFIX_MOD_0_0FAE_REG_5 */
4135 {
4136 { "xrstor", { FXSAVE }, PREFIX_OPCODE },
4137 { "setssbsy", { Mq }, PREFIX_OPCODE },
4138 },
4139
c5e7287a
IT
4140 /* PREFIX_0FAE_REG_6 */
4141 {
603555e5
L
4142 { "xsaveopt", { FXSAVE }, PREFIX_OPCODE },
4143 { "clrssbsy", { Mq }, PREFIX_OPCODE },
4144 { "clwb", { Mb }, PREFIX_OPCODE },
c5e7287a
IT
4145 },
4146
963f3586
IT
4147 /* PREFIX_0FAE_REG_7 */
4148 {
bf890a93 4149 { "clflush", { Mb }, 0 },
963f3586 4150 { Bad_Opcode },
bf890a93 4151 { "clflushopt", { Mb }, 0 },
963f3586
IT
4152 },
4153
1ceb70f8 4154 /* PREFIX_0FB8 */
ca164297 4155 {
592d1631 4156 { Bad_Opcode },
bf890a93 4157 { "popcntS", { Gv, Ev }, 0 },
ca164297 4158 },
4e7d34a6 4159
f12dc422
L
4160 /* PREFIX_0FBC */
4161 {
bf890a93
IT
4162 { "bsfS", { Gv, Ev }, 0 },
4163 { "tzcntS", { Gv, Ev }, 0 },
4164 { "bsfS", { Gv, Ev }, 0 },
f12dc422
L
4165 },
4166
1ceb70f8 4167 /* PREFIX_0FBD */
050dfa73 4168 {
bf890a93
IT
4169 { "bsrS", { Gv, Ev }, 0 },
4170 { "lzcntS", { Gv, Ev }, 0 },
4171 { "bsrS", { Gv, Ev }, 0 },
050dfa73
MM
4172 },
4173
1ceb70f8 4174 /* PREFIX_0FC2 */
050dfa73 4175 {
507bd325
L
4176 { "cmpps", { XM, EXx, CMP }, PREFIX_OPCODE },
4177 { "cmpss", { XM, EXd, CMP }, PREFIX_OPCODE },
4178 { "cmppd", { XM, EXx, CMP }, PREFIX_OPCODE },
4179 { "cmpsd", { XM, EXq, CMP }, PREFIX_OPCODE },
050dfa73 4180 },
246c51aa 4181
a8484f96 4182 /* PREFIX_MOD_0_0FC3 */
4ee52178 4183 {
a8484f96 4184 { "movntiS", { Ev, Gv }, PREFIX_OPCODE },
4ee52178
L
4185 },
4186
f24bcbaa 4187 /* PREFIX_MOD_0_0FC7_REG_6 */
92fddf8e 4188 {
bf890a93
IT
4189 { "vmptrld",{ Mq }, 0 },
4190 { "vmxon", { Mq }, 0 },
4191 { "vmclear",{ Mq }, 0 },
92fddf8e
L
4192 },
4193
f24bcbaa
L
4194 /* PREFIX_MOD_3_0FC7_REG_6 */
4195 {
4196 { "rdrand", { Ev }, 0 },
4197 { Bad_Opcode },
4198 { "rdrand", { Ev }, 0 }
4199 },
4200
4201 /* PREFIX_MOD_3_0FC7_REG_7 */
4202 {
4203 { "rdseed", { Ev }, 0 },
8bc52696 4204 { "rdpid", { Em }, 0 },
f24bcbaa
L
4205 { "rdseed", { Ev }, 0 },
4206 },
4207
1ceb70f8 4208 /* PREFIX_0FD0 */
050dfa73 4209 {
592d1631
L
4210 { Bad_Opcode },
4211 { Bad_Opcode },
bf890a93
IT
4212 { "addsubpd", { XM, EXx }, 0 },
4213 { "addsubps", { XM, EXx }, 0 },
246c51aa 4214 },
050dfa73 4215
1ceb70f8 4216 /* PREFIX_0FD6 */
050dfa73 4217 {
592d1631 4218 { Bad_Opcode },
bf890a93
IT
4219 { "movq2dq",{ XM, MS }, 0 },
4220 { "movq", { EXqS, XM }, 0 },
4221 { "movdq2q",{ MX, XS }, 0 },
050dfa73
MM
4222 },
4223
1ceb70f8 4224 /* PREFIX_0FE6 */
7918206c 4225 {
592d1631 4226 { Bad_Opcode },
507bd325
L
4227 { "cvtdq2pd", { XM, EXq }, PREFIX_OPCODE },
4228 { "cvttpd2dq", { XM, EXx }, PREFIX_OPCODE },
4229 { "cvtpd2dq", { XM, EXx }, PREFIX_OPCODE },
7918206c 4230 },
8b38ad71 4231
1ceb70f8 4232 /* PREFIX_0FE7 */
8b38ad71 4233 {
507bd325 4234 { "movntq", { Mq, MX }, PREFIX_OPCODE },
592d1631 4235 { Bad_Opcode },
75c135a8 4236 { MOD_TABLE (MOD_0FE7_PREFIX_2) },
4e7d34a6
L
4237 },
4238
1ceb70f8 4239 /* PREFIX_0FF0 */
4e7d34a6 4240 {
592d1631
L
4241 { Bad_Opcode },
4242 { Bad_Opcode },
4243 { Bad_Opcode },
1ceb70f8 4244 { MOD_TABLE (MOD_0FF0_PREFIX_3) },
4e7d34a6
L
4245 },
4246
1ceb70f8 4247 /* PREFIX_0FF7 */
4e7d34a6 4248 {
507bd325 4249 { "maskmovq", { MX, MS }, PREFIX_OPCODE },
592d1631 4250 { Bad_Opcode },
507bd325 4251 { "maskmovdqu", { XM, XS }, PREFIX_OPCODE },
8b38ad71 4252 },
42903f7f 4253
1ceb70f8 4254 /* PREFIX_0F3810 */
42903f7f 4255 {
592d1631
L
4256 { Bad_Opcode },
4257 { Bad_Opcode },
507bd325 4258 { "pblendvb", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4259 },
4260
1ceb70f8 4261 /* PREFIX_0F3814 */
42903f7f 4262 {
592d1631
L
4263 { Bad_Opcode },
4264 { Bad_Opcode },
507bd325 4265 { "blendvps", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4266 },
4267
1ceb70f8 4268 /* PREFIX_0F3815 */
42903f7f 4269 {
592d1631
L
4270 { Bad_Opcode },
4271 { Bad_Opcode },
507bd325 4272 { "blendvpd", { XM, EXx, XMM0 }, PREFIX_OPCODE },
42903f7f
L
4273 },
4274
1ceb70f8 4275 /* PREFIX_0F3817 */
42903f7f 4276 {
592d1631
L
4277 { Bad_Opcode },
4278 { Bad_Opcode },
507bd325 4279 { "ptest", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4280 },
4281
1ceb70f8 4282 /* PREFIX_0F3820 */
42903f7f 4283 {
592d1631
L
4284 { Bad_Opcode },
4285 { Bad_Opcode },
507bd325 4286 { "pmovsxbw", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4287 },
4288
1ceb70f8 4289 /* PREFIX_0F3821 */
42903f7f 4290 {
592d1631
L
4291 { Bad_Opcode },
4292 { Bad_Opcode },
507bd325 4293 { "pmovsxbd", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4294 },
4295
1ceb70f8 4296 /* PREFIX_0F3822 */
42903f7f 4297 {
592d1631
L
4298 { Bad_Opcode },
4299 { Bad_Opcode },
507bd325 4300 { "pmovsxbq", { XM, EXw }, PREFIX_OPCODE },
42903f7f
L
4301 },
4302
1ceb70f8 4303 /* PREFIX_0F3823 */
42903f7f 4304 {
592d1631
L
4305 { Bad_Opcode },
4306 { Bad_Opcode },
507bd325 4307 { "pmovsxwd", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4308 },
4309
1ceb70f8 4310 /* PREFIX_0F3824 */
42903f7f 4311 {
592d1631
L
4312 { Bad_Opcode },
4313 { Bad_Opcode },
507bd325 4314 { "pmovsxwq", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4315 },
4316
1ceb70f8 4317 /* PREFIX_0F3825 */
42903f7f 4318 {
592d1631
L
4319 { Bad_Opcode },
4320 { Bad_Opcode },
507bd325 4321 { "pmovsxdq", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4322 },
4323
1ceb70f8 4324 /* PREFIX_0F3828 */
42903f7f 4325 {
592d1631
L
4326 { Bad_Opcode },
4327 { Bad_Opcode },
507bd325 4328 { "pmuldq", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4329 },
4330
1ceb70f8 4331 /* PREFIX_0F3829 */
42903f7f 4332 {
592d1631
L
4333 { Bad_Opcode },
4334 { Bad_Opcode },
507bd325 4335 { "pcmpeqq", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4336 },
4337
1ceb70f8 4338 /* PREFIX_0F382A */
42903f7f 4339 {
592d1631
L
4340 { Bad_Opcode },
4341 { Bad_Opcode },
75c135a8 4342 { MOD_TABLE (MOD_0F382A_PREFIX_2) },
42903f7f
L
4343 },
4344
1ceb70f8 4345 /* PREFIX_0F382B */
42903f7f 4346 {
592d1631
L
4347 { Bad_Opcode },
4348 { Bad_Opcode },
507bd325 4349 { "packusdw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4350 },
4351
1ceb70f8 4352 /* PREFIX_0F3830 */
42903f7f 4353 {
592d1631
L
4354 { Bad_Opcode },
4355 { Bad_Opcode },
507bd325 4356 { "pmovzxbw", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4357 },
4358
1ceb70f8 4359 /* PREFIX_0F3831 */
42903f7f 4360 {
592d1631
L
4361 { Bad_Opcode },
4362 { Bad_Opcode },
507bd325 4363 { "pmovzxbd", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4364 },
4365
1ceb70f8 4366 /* PREFIX_0F3832 */
42903f7f 4367 {
592d1631
L
4368 { Bad_Opcode },
4369 { Bad_Opcode },
507bd325 4370 { "pmovzxbq", { XM, EXw }, PREFIX_OPCODE },
42903f7f
L
4371 },
4372
1ceb70f8 4373 /* PREFIX_0F3833 */
42903f7f 4374 {
592d1631
L
4375 { Bad_Opcode },
4376 { Bad_Opcode },
507bd325 4377 { "pmovzxwd", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4378 },
4379
1ceb70f8 4380 /* PREFIX_0F3834 */
42903f7f 4381 {
592d1631
L
4382 { Bad_Opcode },
4383 { Bad_Opcode },
507bd325 4384 { "pmovzxwq", { XM, EXd }, PREFIX_OPCODE },
42903f7f
L
4385 },
4386
1ceb70f8 4387 /* PREFIX_0F3835 */
42903f7f 4388 {
592d1631
L
4389 { Bad_Opcode },
4390 { Bad_Opcode },
507bd325 4391 { "pmovzxdq", { XM, EXq }, PREFIX_OPCODE },
42903f7f
L
4392 },
4393
1ceb70f8 4394 /* PREFIX_0F3837 */
4e7d34a6 4395 {
592d1631
L
4396 { Bad_Opcode },
4397 { Bad_Opcode },
507bd325 4398 { "pcmpgtq", { XM, EXx }, PREFIX_OPCODE },
4e7d34a6
L
4399 },
4400
1ceb70f8 4401 /* PREFIX_0F3838 */
42903f7f 4402 {
592d1631
L
4403 { Bad_Opcode },
4404 { Bad_Opcode },
507bd325 4405 { "pminsb", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4406 },
4407
1ceb70f8 4408 /* PREFIX_0F3839 */
42903f7f 4409 {
592d1631
L
4410 { Bad_Opcode },
4411 { Bad_Opcode },
507bd325 4412 { "pminsd", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4413 },
4414
1ceb70f8 4415 /* PREFIX_0F383A */
42903f7f 4416 {
592d1631
L
4417 { Bad_Opcode },
4418 { Bad_Opcode },
507bd325 4419 { "pminuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4420 },
4421
1ceb70f8 4422 /* PREFIX_0F383B */
42903f7f 4423 {
592d1631
L
4424 { Bad_Opcode },
4425 { Bad_Opcode },
507bd325 4426 { "pminud", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4427 },
4428
1ceb70f8 4429 /* PREFIX_0F383C */
42903f7f 4430 {
592d1631
L
4431 { Bad_Opcode },
4432 { Bad_Opcode },
507bd325 4433 { "pmaxsb", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4434 },
4435
1ceb70f8 4436 /* PREFIX_0F383D */
42903f7f 4437 {
592d1631
L
4438 { Bad_Opcode },
4439 { Bad_Opcode },
507bd325 4440 { "pmaxsd", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4441 },
4442
1ceb70f8 4443 /* PREFIX_0F383E */
42903f7f 4444 {
592d1631
L
4445 { Bad_Opcode },
4446 { Bad_Opcode },
507bd325 4447 { "pmaxuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4448 },
4449
1ceb70f8 4450 /* PREFIX_0F383F */
42903f7f 4451 {
592d1631
L
4452 { Bad_Opcode },
4453 { Bad_Opcode },
507bd325 4454 { "pmaxud", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4455 },
4456
1ceb70f8 4457 /* PREFIX_0F3840 */
42903f7f 4458 {
592d1631
L
4459 { Bad_Opcode },
4460 { Bad_Opcode },
507bd325 4461 { "pmulld", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4462 },
4463
1ceb70f8 4464 /* PREFIX_0F3841 */
42903f7f 4465 {
592d1631
L
4466 { Bad_Opcode },
4467 { Bad_Opcode },
507bd325 4468 { "phminposuw", { XM, EXx }, PREFIX_OPCODE },
42903f7f
L
4469 },
4470
f1f8f695
L
4471 /* PREFIX_0F3880 */
4472 {
592d1631
L
4473 { Bad_Opcode },
4474 { Bad_Opcode },
507bd325 4475 { "invept", { Gm, Mo }, PREFIX_OPCODE },
f1f8f695
L
4476 },
4477
4478 /* PREFIX_0F3881 */
4479 {
592d1631
L
4480 { Bad_Opcode },
4481 { Bad_Opcode },
507bd325 4482 { "invvpid", { Gm, Mo }, PREFIX_OPCODE },
f1f8f695
L
4483 },
4484
6c30d220
L
4485 /* PREFIX_0F3882 */
4486 {
4487 { Bad_Opcode },
4488 { Bad_Opcode },
507bd325 4489 { "invpcid", { Gm, M }, PREFIX_OPCODE },
6c30d220
L
4490 },
4491
a0046408
L
4492 /* PREFIX_0F38C8 */
4493 {
507bd325 4494 { "sha1nexte", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4495 },
4496
4497 /* PREFIX_0F38C9 */
4498 {
507bd325 4499 { "sha1msg1", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4500 },
4501
4502 /* PREFIX_0F38CA */
4503 {
507bd325 4504 { "sha1msg2", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4505 },
4506
4507 /* PREFIX_0F38CB */
4508 {
507bd325 4509 { "sha256rnds2", { XM, EXxmm, XMM0 }, PREFIX_OPCODE },
a0046408
L
4510 },
4511
4512 /* PREFIX_0F38CC */
4513 {
507bd325 4514 { "sha256msg1", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4515 },
4516
4517 /* PREFIX_0F38CD */
4518 {
507bd325 4519 { "sha256msg2", { XM, EXxmm }, PREFIX_OPCODE },
a0046408
L
4520 },
4521
c0f3af97
L
4522 /* PREFIX_0F38DB */
4523 {
592d1631
L
4524 { Bad_Opcode },
4525 { Bad_Opcode },
507bd325 4526 { "aesimc", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4527 },
4528
4529 /* PREFIX_0F38DC */
4530 {
592d1631
L
4531 { Bad_Opcode },
4532 { Bad_Opcode },
507bd325 4533 { "aesenc", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4534 },
4535
4536 /* PREFIX_0F38DD */
4537 {
592d1631
L
4538 { Bad_Opcode },
4539 { Bad_Opcode },
507bd325 4540 { "aesenclast", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4541 },
4542
4543 /* PREFIX_0F38DE */
4544 {
592d1631
L
4545 { Bad_Opcode },
4546 { Bad_Opcode },
507bd325 4547 { "aesdec", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4548 },
4549
4550 /* PREFIX_0F38DF */
4551 {
592d1631
L
4552 { Bad_Opcode },
4553 { Bad_Opcode },
507bd325 4554 { "aesdeclast", { XM, EXx }, PREFIX_OPCODE },
c0f3af97
L
4555 },
4556
1ceb70f8 4557 /* PREFIX_0F38F0 */
4e7d34a6 4558 {
507bd325 4559 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
592d1631 4560 { Bad_Opcode },
507bd325
L
4561 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
4562 { "crc32", { Gdq, { CRC32_Fixup, b_mode } }, PREFIX_OPCODE },
4e7d34a6
L
4563 },
4564
1ceb70f8 4565 /* PREFIX_0F38F1 */
4e7d34a6 4566 {
507bd325 4567 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
592d1631 4568 { Bad_Opcode },
507bd325
L
4569 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
4570 { "crc32", { Gdq, { CRC32_Fixup, v_mode } }, PREFIX_OPCODE },
4e7d34a6
L
4571 },
4572
603555e5 4573 /* PREFIX_0F38F5 */
e2e1fcde
L
4574 {
4575 { Bad_Opcode },
603555e5
L
4576 { Bad_Opcode },
4577 { MOD_TABLE (MOD_0F38F5_PREFIX_2) },
4578 },
4579
4580 /* PREFIX_0F38F6 */
4581 {
4582 { MOD_TABLE (MOD_0F38F6_PREFIX_0) },
507bd325
L
4583 { "adoxS", { Gdq, Edq}, PREFIX_OPCODE },
4584 { "adcxS", { Gdq, Edq}, PREFIX_OPCODE },
e2e1fcde
L
4585 { Bad_Opcode },
4586 },
4587
1ceb70f8 4588 /* PREFIX_0F3A08 */
42903f7f 4589 {
592d1631
L
4590 { Bad_Opcode },
4591 { Bad_Opcode },
507bd325 4592 { "roundps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4593 },
4594
1ceb70f8 4595 /* PREFIX_0F3A09 */
42903f7f 4596 {
592d1631
L
4597 { Bad_Opcode },
4598 { Bad_Opcode },
507bd325 4599 { "roundpd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4600 },
4601
1ceb70f8 4602 /* PREFIX_0F3A0A */
42903f7f 4603 {
592d1631
L
4604 { Bad_Opcode },
4605 { Bad_Opcode },
507bd325 4606 { "roundss", { XM, EXd, Ib }, PREFIX_OPCODE },
42903f7f
L
4607 },
4608
1ceb70f8 4609 /* PREFIX_0F3A0B */
42903f7f 4610 {
592d1631
L
4611 { Bad_Opcode },
4612 { Bad_Opcode },
507bd325 4613 { "roundsd", { XM, EXq, Ib }, PREFIX_OPCODE },
42903f7f
L
4614 },
4615
1ceb70f8 4616 /* PREFIX_0F3A0C */
42903f7f 4617 {
592d1631
L
4618 { Bad_Opcode },
4619 { Bad_Opcode },
507bd325 4620 { "blendps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4621 },
4622
1ceb70f8 4623 /* PREFIX_0F3A0D */
42903f7f 4624 {
592d1631
L
4625 { Bad_Opcode },
4626 { Bad_Opcode },
507bd325 4627 { "blendpd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4628 },
4629
1ceb70f8 4630 /* PREFIX_0F3A0E */
42903f7f 4631 {
592d1631
L
4632 { Bad_Opcode },
4633 { Bad_Opcode },
507bd325 4634 { "pblendw", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4635 },
4636
1ceb70f8 4637 /* PREFIX_0F3A14 */
42903f7f 4638 {
592d1631
L
4639 { Bad_Opcode },
4640 { Bad_Opcode },
507bd325 4641 { "pextrb", { Edqb, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4642 },
4643
1ceb70f8 4644 /* PREFIX_0F3A15 */
42903f7f 4645 {
592d1631
L
4646 { Bad_Opcode },
4647 { Bad_Opcode },
507bd325 4648 { "pextrw", { Edqw, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4649 },
4650
1ceb70f8 4651 /* PREFIX_0F3A16 */
42903f7f 4652 {
592d1631
L
4653 { Bad_Opcode },
4654 { Bad_Opcode },
507bd325 4655 { "pextrK", { Edq, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4656 },
4657
1ceb70f8 4658 /* PREFIX_0F3A17 */
42903f7f 4659 {
592d1631
L
4660 { Bad_Opcode },
4661 { Bad_Opcode },
507bd325 4662 { "extractps", { Edqd, XM, Ib }, PREFIX_OPCODE },
42903f7f
L
4663 },
4664
1ceb70f8 4665 /* PREFIX_0F3A20 */
42903f7f 4666 {
592d1631
L
4667 { Bad_Opcode },
4668 { Bad_Opcode },
507bd325 4669 { "pinsrb", { XM, Edqb, Ib }, PREFIX_OPCODE },
42903f7f
L
4670 },
4671
1ceb70f8 4672 /* PREFIX_0F3A21 */
42903f7f 4673 {
592d1631
L
4674 { Bad_Opcode },
4675 { Bad_Opcode },
507bd325 4676 { "insertps", { XM, EXd, Ib }, PREFIX_OPCODE },
42903f7f
L
4677 },
4678
1ceb70f8 4679 /* PREFIX_0F3A22 */
42903f7f 4680 {
592d1631
L
4681 { Bad_Opcode },
4682 { Bad_Opcode },
507bd325 4683 { "pinsrK", { XM, Edq, Ib }, PREFIX_OPCODE },
42903f7f
L
4684 },
4685
1ceb70f8 4686 /* PREFIX_0F3A40 */
42903f7f 4687 {
592d1631
L
4688 { Bad_Opcode },
4689 { Bad_Opcode },
507bd325 4690 { "dpps", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4691 },
4692
1ceb70f8 4693 /* PREFIX_0F3A41 */
42903f7f 4694 {
592d1631
L
4695 { Bad_Opcode },
4696 { Bad_Opcode },
507bd325 4697 { "dppd", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f
L
4698 },
4699
1ceb70f8 4700 /* PREFIX_0F3A42 */
42903f7f 4701 {
592d1631
L
4702 { Bad_Opcode },
4703 { Bad_Opcode },
507bd325 4704 { "mpsadbw", { XM, EXx, Ib }, PREFIX_OPCODE },
42903f7f 4705 },
381d071f 4706
c0f3af97
L
4707 /* PREFIX_0F3A44 */
4708 {
592d1631
L
4709 { Bad_Opcode },
4710 { Bad_Opcode },
507bd325 4711 { "pclmulqdq", { XM, EXx, PCLMUL }, PREFIX_OPCODE },
c0f3af97
L
4712 },
4713
1ceb70f8 4714 /* PREFIX_0F3A60 */
381d071f 4715 {
592d1631
L
4716 { Bad_Opcode },
4717 { Bad_Opcode },
15c7c1d8 4718 { "pcmpestrm", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, PREFIX_OPCODE },
381d071f
L
4719 },
4720
1ceb70f8 4721 /* PREFIX_0F3A61 */
381d071f 4722 {
592d1631
L
4723 { Bad_Opcode },
4724 { Bad_Opcode },
15c7c1d8 4725 { "pcmpestri", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, PREFIX_OPCODE },
381d071f
L
4726 },
4727
1ceb70f8 4728 /* PREFIX_0F3A62 */
381d071f 4729 {
592d1631
L
4730 { Bad_Opcode },
4731 { Bad_Opcode },
507bd325 4732 { "pcmpistrm", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f
L
4733 },
4734
1ceb70f8 4735 /* PREFIX_0F3A63 */
381d071f 4736 {
592d1631
L
4737 { Bad_Opcode },
4738 { Bad_Opcode },
507bd325 4739 { "pcmpistri", { XM, EXx, Ib }, PREFIX_OPCODE },
381d071f 4740 },
09a2c6cf 4741
a0046408
L
4742 /* PREFIX_0F3ACC */
4743 {
507bd325 4744 { "sha1rnds4", { XM, EXxmm, Ib }, PREFIX_OPCODE },
a0046408
L
4745 },
4746
c0f3af97 4747 /* PREFIX_0F3ADF */
09a2c6cf 4748 {
592d1631
L
4749 { Bad_Opcode },
4750 { Bad_Opcode },
507bd325 4751 { "aeskeygenassist", { XM, EXx, Ib }, PREFIX_OPCODE },
09a2c6cf
L
4752 },
4753
592a252b 4754 /* PREFIX_VEX_0F10 */
09a2c6cf 4755 {
592a252b
L
4756 { VEX_W_TABLE (VEX_W_0F10_P_0) },
4757 { VEX_LEN_TABLE (VEX_LEN_0F10_P_1) },
4758 { VEX_W_TABLE (VEX_W_0F10_P_2) },
4759 { VEX_LEN_TABLE (VEX_LEN_0F10_P_3) },
09a2c6cf
L
4760 },
4761
592a252b 4762 /* PREFIX_VEX_0F11 */
09a2c6cf 4763 {
592a252b
L
4764 { VEX_W_TABLE (VEX_W_0F11_P_0) },
4765 { VEX_LEN_TABLE (VEX_LEN_0F11_P_1) },
4766 { VEX_W_TABLE (VEX_W_0F11_P_2) },
4767 { VEX_LEN_TABLE (VEX_LEN_0F11_P_3) },
09a2c6cf
L
4768 },
4769
592a252b 4770 /* PREFIX_VEX_0F12 */
09a2c6cf 4771 {
592a252b
L
4772 { MOD_TABLE (MOD_VEX_0F12_PREFIX_0) },
4773 { VEX_W_TABLE (VEX_W_0F12_P_1) },
4774 { VEX_LEN_TABLE (VEX_LEN_0F12_P_2) },
4775 { VEX_W_TABLE (VEX_W_0F12_P_3) },
09a2c6cf
L
4776 },
4777
592a252b 4778 /* PREFIX_VEX_0F16 */
09a2c6cf 4779 {
592a252b
L
4780 { MOD_TABLE (MOD_VEX_0F16_PREFIX_0) },
4781 { VEX_W_TABLE (VEX_W_0F16_P_1) },
4782 { VEX_LEN_TABLE (VEX_LEN_0F16_P_2) },
5f754f58 4783 },
7c52e0e8 4784
592a252b 4785 /* PREFIX_VEX_0F2A */
5f754f58 4786 {
592d1631 4787 { Bad_Opcode },
592a252b 4788 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_1) },
592d1631 4789 { Bad_Opcode },
592a252b 4790 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_3) },
5f754f58 4791 },
7c52e0e8 4792
592a252b 4793 /* PREFIX_VEX_0F2C */
5f754f58 4794 {
592d1631 4795 { Bad_Opcode },
592a252b 4796 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_1) },
592d1631 4797 { Bad_Opcode },
592a252b 4798 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_3) },
5f754f58 4799 },
7c52e0e8 4800
592a252b 4801 /* PREFIX_VEX_0F2D */
7c52e0e8 4802 {
592d1631 4803 { Bad_Opcode },
592a252b 4804 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_1) },
592d1631 4805 { Bad_Opcode },
592a252b 4806 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_3) },
7c52e0e8
L
4807 },
4808
592a252b 4809 /* PREFIX_VEX_0F2E */
7c52e0e8 4810 {
592a252b 4811 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_0) },
592d1631 4812 { Bad_Opcode },
592a252b 4813 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_2) },
7c52e0e8
L
4814 },
4815
592a252b 4816 /* PREFIX_VEX_0F2F */
7c52e0e8 4817 {
592a252b 4818 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_0) },
592d1631 4819 { Bad_Opcode },
592a252b 4820 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_2) },
7c52e0e8
L
4821 },
4822
43234a1e
L
4823 /* PREFIX_VEX_0F41 */
4824 {
4825 { VEX_LEN_TABLE (VEX_LEN_0F41_P_0) },
1ba585e8
IT
4826 { Bad_Opcode },
4827 { VEX_LEN_TABLE (VEX_LEN_0F41_P_2) },
43234a1e
L
4828 },
4829
4830 /* PREFIX_VEX_0F42 */
4831 {
4832 { VEX_LEN_TABLE (VEX_LEN_0F42_P_0) },
1ba585e8
IT
4833 { Bad_Opcode },
4834 { VEX_LEN_TABLE (VEX_LEN_0F42_P_2) },
43234a1e
L
4835 },
4836
4837 /* PREFIX_VEX_0F44 */
4838 {
4839 { VEX_LEN_TABLE (VEX_LEN_0F44_P_0) },
1ba585e8
IT
4840 { Bad_Opcode },
4841 { VEX_LEN_TABLE (VEX_LEN_0F44_P_2) },
43234a1e
L
4842 },
4843
4844 /* PREFIX_VEX_0F45 */
4845 {
4846 { VEX_LEN_TABLE (VEX_LEN_0F45_P_0) },
1ba585e8
IT
4847 { Bad_Opcode },
4848 { VEX_LEN_TABLE (VEX_LEN_0F45_P_2) },
43234a1e
L
4849 },
4850
4851 /* PREFIX_VEX_0F46 */
4852 {
4853 { VEX_LEN_TABLE (VEX_LEN_0F46_P_0) },
1ba585e8
IT
4854 { Bad_Opcode },
4855 { VEX_LEN_TABLE (VEX_LEN_0F46_P_2) },
43234a1e
L
4856 },
4857
4858 /* PREFIX_VEX_0F47 */
4859 {
4860 { VEX_LEN_TABLE (VEX_LEN_0F47_P_0) },
1ba585e8
IT
4861 { Bad_Opcode },
4862 { VEX_LEN_TABLE (VEX_LEN_0F47_P_2) },
43234a1e
L
4863 },
4864
1ba585e8 4865 /* PREFIX_VEX_0F4A */
43234a1e 4866 {
1ba585e8 4867 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_0) },
43234a1e 4868 { Bad_Opcode },
1ba585e8
IT
4869 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_2) },
4870 },
4871
4872 /* PREFIX_VEX_0F4B */
4873 {
4874 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_0) },
43234a1e
L
4875 { Bad_Opcode },
4876 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_2) },
4877 },
4878
592a252b 4879 /* PREFIX_VEX_0F51 */
7c52e0e8 4880 {
592a252b
L
4881 { VEX_W_TABLE (VEX_W_0F51_P_0) },
4882 { VEX_LEN_TABLE (VEX_LEN_0F51_P_1) },
4883 { VEX_W_TABLE (VEX_W_0F51_P_2) },
4884 { VEX_LEN_TABLE (VEX_LEN_0F51_P_3) },
7c52e0e8
L
4885 },
4886
592a252b 4887 /* PREFIX_VEX_0F52 */
7c52e0e8 4888 {
592a252b
L
4889 { VEX_W_TABLE (VEX_W_0F52_P_0) },
4890 { VEX_LEN_TABLE (VEX_LEN_0F52_P_1) },
7c52e0e8
L
4891 },
4892
592a252b 4893 /* PREFIX_VEX_0F53 */
7c52e0e8 4894 {
592a252b
L
4895 { VEX_W_TABLE (VEX_W_0F53_P_0) },
4896 { VEX_LEN_TABLE (VEX_LEN_0F53_P_1) },
7c52e0e8
L
4897 },
4898
592a252b 4899 /* PREFIX_VEX_0F58 */
7c52e0e8 4900 {
592a252b
L
4901 { VEX_W_TABLE (VEX_W_0F58_P_0) },
4902 { VEX_LEN_TABLE (VEX_LEN_0F58_P_1) },
4903 { VEX_W_TABLE (VEX_W_0F58_P_2) },
4904 { VEX_LEN_TABLE (VEX_LEN_0F58_P_3) },
7c52e0e8
L
4905 },
4906
592a252b 4907 /* PREFIX_VEX_0F59 */
7c52e0e8 4908 {
592a252b
L
4909 { VEX_W_TABLE (VEX_W_0F59_P_0) },
4910 { VEX_LEN_TABLE (VEX_LEN_0F59_P_1) },
4911 { VEX_W_TABLE (VEX_W_0F59_P_2) },
4912 { VEX_LEN_TABLE (VEX_LEN_0F59_P_3) },
7c52e0e8
L
4913 },
4914
592a252b 4915 /* PREFIX_VEX_0F5A */
7c52e0e8 4916 {
592a252b
L
4917 { VEX_W_TABLE (VEX_W_0F5A_P_0) },
4918 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_1) },
bf890a93 4919 { "vcvtpd2ps%XY", { XMM, EXx }, 0 },
592a252b 4920 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_3) },
7c52e0e8
L
4921 },
4922
592a252b 4923 /* PREFIX_VEX_0F5B */
7c52e0e8 4924 {
592a252b
L
4925 { VEX_W_TABLE (VEX_W_0F5B_P_0) },
4926 { VEX_W_TABLE (VEX_W_0F5B_P_1) },
4927 { VEX_W_TABLE (VEX_W_0F5B_P_2) },
7c52e0e8
L
4928 },
4929
592a252b 4930 /* PREFIX_VEX_0F5C */
7c52e0e8 4931 {
592a252b
L
4932 { VEX_W_TABLE (VEX_W_0F5C_P_0) },
4933 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_1) },
4934 { VEX_W_TABLE (VEX_W_0F5C_P_2) },
4935 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_3) },
7c52e0e8
L
4936 },
4937
592a252b 4938 /* PREFIX_VEX_0F5D */
7c52e0e8 4939 {
592a252b
L
4940 { VEX_W_TABLE (VEX_W_0F5D_P_0) },
4941 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_1) },
4942 { VEX_W_TABLE (VEX_W_0F5D_P_2) },
4943 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_3) },
7c52e0e8
L
4944 },
4945
592a252b 4946 /* PREFIX_VEX_0F5E */
7c52e0e8 4947 {
592a252b
L
4948 { VEX_W_TABLE (VEX_W_0F5E_P_0) },
4949 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_1) },
4950 { VEX_W_TABLE (VEX_W_0F5E_P_2) },
4951 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_3) },
7c52e0e8
L
4952 },
4953
592a252b 4954 /* PREFIX_VEX_0F5F */
7c52e0e8 4955 {
592a252b
L
4956 { VEX_W_TABLE (VEX_W_0F5F_P_0) },
4957 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_1) },
4958 { VEX_W_TABLE (VEX_W_0F5F_P_2) },
4959 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_3) },
7c52e0e8
L
4960 },
4961
592a252b 4962 /* PREFIX_VEX_0F60 */
7c52e0e8 4963 {
592d1631
L
4964 { Bad_Opcode },
4965 { Bad_Opcode },
6c30d220 4966 { VEX_W_TABLE (VEX_W_0F60_P_2) },
7c52e0e8
L
4967 },
4968
592a252b 4969 /* PREFIX_VEX_0F61 */
7c52e0e8 4970 {
592d1631
L
4971 { Bad_Opcode },
4972 { Bad_Opcode },
6c30d220 4973 { VEX_W_TABLE (VEX_W_0F61_P_2) },
7c52e0e8
L
4974 },
4975
592a252b 4976 /* PREFIX_VEX_0F62 */
7c52e0e8 4977 {
592d1631
L
4978 { Bad_Opcode },
4979 { Bad_Opcode },
6c30d220 4980 { VEX_W_TABLE (VEX_W_0F62_P_2) },
7c52e0e8
L
4981 },
4982
592a252b 4983 /* PREFIX_VEX_0F63 */
7c52e0e8 4984 {
592d1631
L
4985 { Bad_Opcode },
4986 { Bad_Opcode },
6c30d220 4987 { VEX_W_TABLE (VEX_W_0F63_P_2) },
7c52e0e8
L
4988 },
4989
592a252b 4990 /* PREFIX_VEX_0F64 */
7c52e0e8 4991 {
592d1631
L
4992 { Bad_Opcode },
4993 { Bad_Opcode },
6c30d220 4994 { VEX_W_TABLE (VEX_W_0F64_P_2) },
7c52e0e8
L
4995 },
4996
592a252b 4997 /* PREFIX_VEX_0F65 */
7c52e0e8 4998 {
592d1631
L
4999 { Bad_Opcode },
5000 { Bad_Opcode },
6c30d220 5001 { VEX_W_TABLE (VEX_W_0F65_P_2) },
7c52e0e8
L
5002 },
5003
592a252b 5004 /* PREFIX_VEX_0F66 */
7c52e0e8 5005 {
592d1631
L
5006 { Bad_Opcode },
5007 { Bad_Opcode },
6c30d220 5008 { VEX_W_TABLE (VEX_W_0F66_P_2) },
7c52e0e8 5009 },
6439fc28 5010
592a252b 5011 /* PREFIX_VEX_0F67 */
331d2d0d 5012 {
592d1631
L
5013 { Bad_Opcode },
5014 { Bad_Opcode },
6c30d220 5015 { VEX_W_TABLE (VEX_W_0F67_P_2) },
c0f3af97
L
5016 },
5017
592a252b 5018 /* PREFIX_VEX_0F68 */
c0f3af97 5019 {
592d1631
L
5020 { Bad_Opcode },
5021 { Bad_Opcode },
6c30d220 5022 { VEX_W_TABLE (VEX_W_0F68_P_2) },
c0f3af97
L
5023 },
5024
592a252b 5025 /* PREFIX_VEX_0F69 */
c0f3af97 5026 {
592d1631
L
5027 { Bad_Opcode },
5028 { Bad_Opcode },
6c30d220 5029 { VEX_W_TABLE (VEX_W_0F69_P_2) },
c0f3af97
L
5030 },
5031
592a252b 5032 /* PREFIX_VEX_0F6A */
c0f3af97 5033 {
592d1631
L
5034 { Bad_Opcode },
5035 { Bad_Opcode },
6c30d220 5036 { VEX_W_TABLE (VEX_W_0F6A_P_2) },
c0f3af97
L
5037 },
5038
592a252b 5039 /* PREFIX_VEX_0F6B */
c0f3af97 5040 {
592d1631
L
5041 { Bad_Opcode },
5042 { Bad_Opcode },
6c30d220 5043 { VEX_W_TABLE (VEX_W_0F6B_P_2) },
c0f3af97
L
5044 },
5045
592a252b 5046 /* PREFIX_VEX_0F6C */
c0f3af97 5047 {
592d1631
L
5048 { Bad_Opcode },
5049 { Bad_Opcode },
6c30d220 5050 { VEX_W_TABLE (VEX_W_0F6C_P_2) },
c0f3af97
L
5051 },
5052
592a252b 5053 /* PREFIX_VEX_0F6D */
c0f3af97 5054 {
592d1631
L
5055 { Bad_Opcode },
5056 { Bad_Opcode },
6c30d220 5057 { VEX_W_TABLE (VEX_W_0F6D_P_2) },
c0f3af97
L
5058 },
5059
592a252b 5060 /* PREFIX_VEX_0F6E */
c0f3af97 5061 {
592d1631
L
5062 { Bad_Opcode },
5063 { Bad_Opcode },
592a252b 5064 { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2) },
c0f3af97
L
5065 },
5066
592a252b 5067 /* PREFIX_VEX_0F6F */
c0f3af97 5068 {
592d1631 5069 { Bad_Opcode },
592a252b
L
5070 { VEX_W_TABLE (VEX_W_0F6F_P_1) },
5071 { VEX_W_TABLE (VEX_W_0F6F_P_2) },
c0f3af97
L
5072 },
5073
592a252b 5074 /* PREFIX_VEX_0F70 */
c0f3af97 5075 {
592d1631 5076 { Bad_Opcode },
6c30d220
L
5077 { VEX_W_TABLE (VEX_W_0F70_P_1) },
5078 { VEX_W_TABLE (VEX_W_0F70_P_2) },
5079 { VEX_W_TABLE (VEX_W_0F70_P_3) },
c0f3af97
L
5080 },
5081
592a252b 5082 /* PREFIX_VEX_0F71_REG_2 */
c0f3af97 5083 {
592d1631
L
5084 { Bad_Opcode },
5085 { Bad_Opcode },
6c30d220 5086 { VEX_W_TABLE (VEX_W_0F71_R_2_P_2) },
c0f3af97
L
5087 },
5088
592a252b 5089 /* PREFIX_VEX_0F71_REG_4 */
c0f3af97 5090 {
592d1631
L
5091 { Bad_Opcode },
5092 { Bad_Opcode },
6c30d220 5093 { VEX_W_TABLE (VEX_W_0F71_R_4_P_2) },
c0f3af97
L
5094 },
5095
592a252b 5096 /* PREFIX_VEX_0F71_REG_6 */
c0f3af97 5097 {
592d1631
L
5098 { Bad_Opcode },
5099 { Bad_Opcode },
6c30d220 5100 { VEX_W_TABLE (VEX_W_0F71_R_6_P_2) },
c0f3af97
L
5101 },
5102
592a252b 5103 /* PREFIX_VEX_0F72_REG_2 */
c0f3af97 5104 {
592d1631
L
5105 { Bad_Opcode },
5106 { Bad_Opcode },
6c30d220 5107 { VEX_W_TABLE (VEX_W_0F72_R_2_P_2) },
c0f3af97
L
5108 },
5109
592a252b 5110 /* PREFIX_VEX_0F72_REG_4 */
c0f3af97 5111 {
592d1631
L
5112 { Bad_Opcode },
5113 { Bad_Opcode },
6c30d220 5114 { VEX_W_TABLE (VEX_W_0F72_R_4_P_2) },
c0f3af97
L
5115 },
5116
592a252b 5117 /* PREFIX_VEX_0F72_REG_6 */
c0f3af97 5118 {
592d1631
L
5119 { Bad_Opcode },
5120 { Bad_Opcode },
6c30d220 5121 { VEX_W_TABLE (VEX_W_0F72_R_6_P_2) },
c0f3af97
L
5122 },
5123
592a252b 5124 /* PREFIX_VEX_0F73_REG_2 */
c0f3af97 5125 {
592d1631
L
5126 { Bad_Opcode },
5127 { Bad_Opcode },
6c30d220 5128 { VEX_W_TABLE (VEX_W_0F73_R_2_P_2) },
c0f3af97
L
5129 },
5130
592a252b 5131 /* PREFIX_VEX_0F73_REG_3 */
c0f3af97 5132 {
592d1631
L
5133 { Bad_Opcode },
5134 { Bad_Opcode },
6c30d220 5135 { VEX_W_TABLE (VEX_W_0F73_R_3_P_2) },
c0f3af97
L
5136 },
5137
592a252b 5138 /* PREFIX_VEX_0F73_REG_6 */
c0f3af97 5139 {
592d1631
L
5140 { Bad_Opcode },
5141 { Bad_Opcode },
6c30d220 5142 { VEX_W_TABLE (VEX_W_0F73_R_6_P_2) },
c0f3af97
L
5143 },
5144
592a252b 5145 /* PREFIX_VEX_0F73_REG_7 */
c0f3af97 5146 {
592d1631
L
5147 { Bad_Opcode },
5148 { Bad_Opcode },
6c30d220 5149 { VEX_W_TABLE (VEX_W_0F73_R_7_P_2) },
c0f3af97
L
5150 },
5151
592a252b 5152 /* PREFIX_VEX_0F74 */
c0f3af97 5153 {
592d1631
L
5154 { Bad_Opcode },
5155 { Bad_Opcode },
6c30d220 5156 { VEX_W_TABLE (VEX_W_0F74_P_2) },
c0f3af97
L
5157 },
5158
592a252b 5159 /* PREFIX_VEX_0F75 */
c0f3af97 5160 {
592d1631
L
5161 { Bad_Opcode },
5162 { Bad_Opcode },
6c30d220 5163 { VEX_W_TABLE (VEX_W_0F75_P_2) },
c0f3af97
L
5164 },
5165
592a252b 5166 /* PREFIX_VEX_0F76 */
c0f3af97 5167 {
592d1631
L
5168 { Bad_Opcode },
5169 { Bad_Opcode },
6c30d220 5170 { VEX_W_TABLE (VEX_W_0F76_P_2) },
c0f3af97
L
5171 },
5172
592a252b 5173 /* PREFIX_VEX_0F77 */
c0f3af97 5174 {
592a252b 5175 { VEX_W_TABLE (VEX_W_0F77_P_0) },
c0f3af97
L
5176 },
5177
592a252b 5178 /* PREFIX_VEX_0F7C */
c0f3af97 5179 {
592d1631
L
5180 { Bad_Opcode },
5181 { Bad_Opcode },
592a252b
L
5182 { VEX_W_TABLE (VEX_W_0F7C_P_2) },
5183 { VEX_W_TABLE (VEX_W_0F7C_P_3) },
c0f3af97
L
5184 },
5185
592a252b 5186 /* PREFIX_VEX_0F7D */
c0f3af97 5187 {
592d1631
L
5188 { Bad_Opcode },
5189 { Bad_Opcode },
592a252b
L
5190 { VEX_W_TABLE (VEX_W_0F7D_P_2) },
5191 { VEX_W_TABLE (VEX_W_0F7D_P_3) },
c0f3af97
L
5192 },
5193
592a252b 5194 /* PREFIX_VEX_0F7E */
c0f3af97 5195 {
592d1631 5196 { Bad_Opcode },
592a252b
L
5197 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1) },
5198 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2) },
c0f3af97
L
5199 },
5200
592a252b 5201 /* PREFIX_VEX_0F7F */
c0f3af97 5202 {
592d1631 5203 { Bad_Opcode },
592a252b
L
5204 { VEX_W_TABLE (VEX_W_0F7F_P_1) },
5205 { VEX_W_TABLE (VEX_W_0F7F_P_2) },
c0f3af97
L
5206 },
5207
43234a1e
L
5208 /* PREFIX_VEX_0F90 */
5209 {
5210 { VEX_LEN_TABLE (VEX_LEN_0F90_P_0) },
1ba585e8
IT
5211 { Bad_Opcode },
5212 { VEX_LEN_TABLE (VEX_LEN_0F90_P_2) },
43234a1e
L
5213 },
5214
5215 /* PREFIX_VEX_0F91 */
5216 {
5217 { VEX_LEN_TABLE (VEX_LEN_0F91_P_0) },
1ba585e8
IT
5218 { Bad_Opcode },
5219 { VEX_LEN_TABLE (VEX_LEN_0F91_P_2) },
43234a1e
L
5220 },
5221
5222 /* PREFIX_VEX_0F92 */
5223 {
5224 { VEX_LEN_TABLE (VEX_LEN_0F92_P_0) },
1ba585e8 5225 { Bad_Opcode },
90a915bf 5226 { VEX_LEN_TABLE (VEX_LEN_0F92_P_2) },
1ba585e8 5227 { VEX_LEN_TABLE (VEX_LEN_0F92_P_3) },
43234a1e
L
5228 },
5229
5230 /* PREFIX_VEX_0F93 */
5231 {
5232 { VEX_LEN_TABLE (VEX_LEN_0F93_P_0) },
1ba585e8 5233 { Bad_Opcode },
90a915bf 5234 { VEX_LEN_TABLE (VEX_LEN_0F93_P_2) },
1ba585e8 5235 { VEX_LEN_TABLE (VEX_LEN_0F93_P_3) },
43234a1e
L
5236 },
5237
5238 /* PREFIX_VEX_0F98 */
5239 {
5240 { VEX_LEN_TABLE (VEX_LEN_0F98_P_0) },
1ba585e8
IT
5241 { Bad_Opcode },
5242 { VEX_LEN_TABLE (VEX_LEN_0F98_P_2) },
5243 },
5244
5245 /* PREFIX_VEX_0F99 */
5246 {
5247 { VEX_LEN_TABLE (VEX_LEN_0F99_P_0) },
5248 { Bad_Opcode },
5249 { VEX_LEN_TABLE (VEX_LEN_0F99_P_2) },
43234a1e
L
5250 },
5251
592a252b 5252 /* PREFIX_VEX_0FC2 */
c0f3af97 5253 {
592a252b
L
5254 { VEX_W_TABLE (VEX_W_0FC2_P_0) },
5255 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_1) },
5256 { VEX_W_TABLE (VEX_W_0FC2_P_2) },
5257 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_3) },
c0f3af97
L
5258 },
5259
592a252b 5260 /* PREFIX_VEX_0FC4 */
c0f3af97 5261 {
592d1631
L
5262 { Bad_Opcode },
5263 { Bad_Opcode },
592a252b 5264 { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2) },
c0f3af97
L
5265 },
5266
592a252b 5267 /* PREFIX_VEX_0FC5 */
c0f3af97 5268 {
592d1631
L
5269 { Bad_Opcode },
5270 { Bad_Opcode },
592a252b 5271 { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2) },
c0f3af97
L
5272 },
5273
592a252b 5274 /* PREFIX_VEX_0FD0 */
c0f3af97 5275 {
592d1631
L
5276 { Bad_Opcode },
5277 { Bad_Opcode },
592a252b
L
5278 { VEX_W_TABLE (VEX_W_0FD0_P_2) },
5279 { VEX_W_TABLE (VEX_W_0FD0_P_3) },
c0f3af97
L
5280 },
5281
592a252b 5282 /* PREFIX_VEX_0FD1 */
c0f3af97 5283 {
592d1631
L
5284 { Bad_Opcode },
5285 { Bad_Opcode },
6c30d220 5286 { VEX_W_TABLE (VEX_W_0FD1_P_2) },
c0f3af97
L
5287 },
5288
592a252b 5289 /* PREFIX_VEX_0FD2 */
c0f3af97 5290 {
592d1631
L
5291 { Bad_Opcode },
5292 { Bad_Opcode },
6c30d220 5293 { VEX_W_TABLE (VEX_W_0FD2_P_2) },
c0f3af97
L
5294 },
5295
592a252b 5296 /* PREFIX_VEX_0FD3 */
c0f3af97 5297 {
592d1631
L
5298 { Bad_Opcode },
5299 { Bad_Opcode },
6c30d220 5300 { VEX_W_TABLE (VEX_W_0FD3_P_2) },
c0f3af97
L
5301 },
5302
592a252b 5303 /* PREFIX_VEX_0FD4 */
c0f3af97 5304 {
592d1631
L
5305 { Bad_Opcode },
5306 { Bad_Opcode },
6c30d220 5307 { VEX_W_TABLE (VEX_W_0FD4_P_2) },
c0f3af97
L
5308 },
5309
592a252b 5310 /* PREFIX_VEX_0FD5 */
c0f3af97 5311 {
592d1631
L
5312 { Bad_Opcode },
5313 { Bad_Opcode },
6c30d220 5314 { VEX_W_TABLE (VEX_W_0FD5_P_2) },
c0f3af97
L
5315 },
5316
592a252b 5317 /* PREFIX_VEX_0FD6 */
c0f3af97 5318 {
592d1631
L
5319 { Bad_Opcode },
5320 { Bad_Opcode },
592a252b 5321 { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2) },
c0f3af97
L
5322 },
5323
592a252b 5324 /* PREFIX_VEX_0FD7 */
c0f3af97 5325 {
592d1631
L
5326 { Bad_Opcode },
5327 { Bad_Opcode },
592a252b 5328 { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2) },
c0f3af97
L
5329 },
5330
592a252b 5331 /* PREFIX_VEX_0FD8 */
c0f3af97 5332 {
592d1631
L
5333 { Bad_Opcode },
5334 { Bad_Opcode },
6c30d220 5335 { VEX_W_TABLE (VEX_W_0FD8_P_2) },
c0f3af97
L
5336 },
5337
592a252b 5338 /* PREFIX_VEX_0FD9 */
c0f3af97 5339 {
592d1631
L
5340 { Bad_Opcode },
5341 { Bad_Opcode },
6c30d220 5342 { VEX_W_TABLE (VEX_W_0FD9_P_2) },
c0f3af97
L
5343 },
5344
592a252b 5345 /* PREFIX_VEX_0FDA */
c0f3af97 5346 {
592d1631
L
5347 { Bad_Opcode },
5348 { Bad_Opcode },
6c30d220 5349 { VEX_W_TABLE (VEX_W_0FDA_P_2) },
c0f3af97
L
5350 },
5351
592a252b 5352 /* PREFIX_VEX_0FDB */
c0f3af97 5353 {
592d1631
L
5354 { Bad_Opcode },
5355 { Bad_Opcode },
6c30d220 5356 { VEX_W_TABLE (VEX_W_0FDB_P_2) },
c0f3af97
L
5357 },
5358
592a252b 5359 /* PREFIX_VEX_0FDC */
c0f3af97 5360 {
592d1631
L
5361 { Bad_Opcode },
5362 { Bad_Opcode },
6c30d220 5363 { VEX_W_TABLE (VEX_W_0FDC_P_2) },
c0f3af97
L
5364 },
5365
592a252b 5366 /* PREFIX_VEX_0FDD */
c0f3af97 5367 {
592d1631
L
5368 { Bad_Opcode },
5369 { Bad_Opcode },
6c30d220 5370 { VEX_W_TABLE (VEX_W_0FDD_P_2) },
c0f3af97
L
5371 },
5372
592a252b 5373 /* PREFIX_VEX_0FDE */
c0f3af97 5374 {
592d1631
L
5375 { Bad_Opcode },
5376 { Bad_Opcode },
6c30d220 5377 { VEX_W_TABLE (VEX_W_0FDE_P_2) },
c0f3af97
L
5378 },
5379
592a252b 5380 /* PREFIX_VEX_0FDF */
c0f3af97 5381 {
592d1631
L
5382 { Bad_Opcode },
5383 { Bad_Opcode },
6c30d220 5384 { VEX_W_TABLE (VEX_W_0FDF_P_2) },
c0f3af97
L
5385 },
5386
592a252b 5387 /* PREFIX_VEX_0FE0 */
c0f3af97 5388 {
592d1631
L
5389 { Bad_Opcode },
5390 { Bad_Opcode },
6c30d220 5391 { VEX_W_TABLE (VEX_W_0FE0_P_2) },
c0f3af97
L
5392 },
5393
592a252b 5394 /* PREFIX_VEX_0FE1 */
c0f3af97 5395 {
592d1631
L
5396 { Bad_Opcode },
5397 { Bad_Opcode },
6c30d220 5398 { VEX_W_TABLE (VEX_W_0FE1_P_2) },
c0f3af97
L
5399 },
5400
592a252b 5401 /* PREFIX_VEX_0FE2 */
c0f3af97 5402 {
592d1631
L
5403 { Bad_Opcode },
5404 { Bad_Opcode },
6c30d220 5405 { VEX_W_TABLE (VEX_W_0FE2_P_2) },
c0f3af97
L
5406 },
5407
592a252b 5408 /* PREFIX_VEX_0FE3 */
c0f3af97 5409 {
592d1631
L
5410 { Bad_Opcode },
5411 { Bad_Opcode },
6c30d220 5412 { VEX_W_TABLE (VEX_W_0FE3_P_2) },
c0f3af97
L
5413 },
5414
592a252b 5415 /* PREFIX_VEX_0FE4 */
c0f3af97 5416 {
592d1631
L
5417 { Bad_Opcode },
5418 { Bad_Opcode },
6c30d220 5419 { VEX_W_TABLE (VEX_W_0FE4_P_2) },
c0f3af97
L
5420 },
5421
592a252b 5422 /* PREFIX_VEX_0FE5 */
c0f3af97 5423 {
592d1631
L
5424 { Bad_Opcode },
5425 { Bad_Opcode },
6c30d220 5426 { VEX_W_TABLE (VEX_W_0FE5_P_2) },
c0f3af97
L
5427 },
5428
592a252b 5429 /* PREFIX_VEX_0FE6 */
c0f3af97 5430 {
592d1631 5431 { Bad_Opcode },
592a252b
L
5432 { VEX_W_TABLE (VEX_W_0FE6_P_1) },
5433 { VEX_W_TABLE (VEX_W_0FE6_P_2) },
5434 { VEX_W_TABLE (VEX_W_0FE6_P_3) },
c0f3af97
L
5435 },
5436
592a252b 5437 /* PREFIX_VEX_0FE7 */
c0f3af97 5438 {
592d1631
L
5439 { Bad_Opcode },
5440 { Bad_Opcode },
592a252b 5441 { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2) },
c0f3af97
L
5442 },
5443
592a252b 5444 /* PREFIX_VEX_0FE8 */
c0f3af97 5445 {
592d1631
L
5446 { Bad_Opcode },
5447 { Bad_Opcode },
6c30d220 5448 { VEX_W_TABLE (VEX_W_0FE8_P_2) },
c0f3af97
L
5449 },
5450
592a252b 5451 /* PREFIX_VEX_0FE9 */
c0f3af97 5452 {
592d1631
L
5453 { Bad_Opcode },
5454 { Bad_Opcode },
6c30d220 5455 { VEX_W_TABLE (VEX_W_0FE9_P_2) },
c0f3af97
L
5456 },
5457
592a252b 5458 /* PREFIX_VEX_0FEA */
c0f3af97 5459 {
592d1631
L
5460 { Bad_Opcode },
5461 { Bad_Opcode },
6c30d220 5462 { VEX_W_TABLE (VEX_W_0FEA_P_2) },
c0f3af97
L
5463 },
5464
592a252b 5465 /* PREFIX_VEX_0FEB */
c0f3af97 5466 {
592d1631
L
5467 { Bad_Opcode },
5468 { Bad_Opcode },
6c30d220 5469 { VEX_W_TABLE (VEX_W_0FEB_P_2) },
c0f3af97
L
5470 },
5471
592a252b 5472 /* PREFIX_VEX_0FEC */
c0f3af97 5473 {
592d1631
L
5474 { Bad_Opcode },
5475 { Bad_Opcode },
6c30d220 5476 { VEX_W_TABLE (VEX_W_0FEC_P_2) },
c0f3af97
L
5477 },
5478
592a252b 5479 /* PREFIX_VEX_0FED */
c0f3af97 5480 {
592d1631
L
5481 { Bad_Opcode },
5482 { Bad_Opcode },
6c30d220 5483 { VEX_W_TABLE (VEX_W_0FED_P_2) },
c0f3af97
L
5484 },
5485
592a252b 5486 /* PREFIX_VEX_0FEE */
c0f3af97 5487 {
592d1631
L
5488 { Bad_Opcode },
5489 { Bad_Opcode },
6c30d220 5490 { VEX_W_TABLE (VEX_W_0FEE_P_2) },
c0f3af97
L
5491 },
5492
592a252b 5493 /* PREFIX_VEX_0FEF */
c0f3af97 5494 {
592d1631
L
5495 { Bad_Opcode },
5496 { Bad_Opcode },
6c30d220 5497 { VEX_W_TABLE (VEX_W_0FEF_P_2) },
c0f3af97
L
5498 },
5499
592a252b 5500 /* PREFIX_VEX_0FF0 */
c0f3af97 5501 {
592d1631
L
5502 { Bad_Opcode },
5503 { Bad_Opcode },
5504 { Bad_Opcode },
592a252b 5505 { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3) },
c0f3af97
L
5506 },
5507
592a252b 5508 /* PREFIX_VEX_0FF1 */
c0f3af97 5509 {
592d1631
L
5510 { Bad_Opcode },
5511 { Bad_Opcode },
6c30d220 5512 { VEX_W_TABLE (VEX_W_0FF1_P_2) },
c0f3af97
L
5513 },
5514
592a252b 5515 /* PREFIX_VEX_0FF2 */
c0f3af97 5516 {
592d1631
L
5517 { Bad_Opcode },
5518 { Bad_Opcode },
6c30d220 5519 { VEX_W_TABLE (VEX_W_0FF2_P_2) },
c0f3af97
L
5520 },
5521
592a252b 5522 /* PREFIX_VEX_0FF3 */
c0f3af97 5523 {
592d1631
L
5524 { Bad_Opcode },
5525 { Bad_Opcode },
6c30d220 5526 { VEX_W_TABLE (VEX_W_0FF3_P_2) },
c0f3af97
L
5527 },
5528
592a252b 5529 /* PREFIX_VEX_0FF4 */
c0f3af97 5530 {
592d1631
L
5531 { Bad_Opcode },
5532 { Bad_Opcode },
6c30d220 5533 { VEX_W_TABLE (VEX_W_0FF4_P_2) },
c0f3af97
L
5534 },
5535
592a252b 5536 /* PREFIX_VEX_0FF5 */
c0f3af97 5537 {
592d1631
L
5538 { Bad_Opcode },
5539 { Bad_Opcode },
6c30d220 5540 { VEX_W_TABLE (VEX_W_0FF5_P_2) },
c0f3af97
L
5541 },
5542
592a252b 5543 /* PREFIX_VEX_0FF6 */
c0f3af97 5544 {
592d1631
L
5545 { Bad_Opcode },
5546 { Bad_Opcode },
6c30d220 5547 { VEX_W_TABLE (VEX_W_0FF6_P_2) },
c0f3af97
L
5548 },
5549
592a252b 5550 /* PREFIX_VEX_0FF7 */
c0f3af97 5551 {
592d1631
L
5552 { Bad_Opcode },
5553 { Bad_Opcode },
592a252b 5554 { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2) },
c0f3af97
L
5555 },
5556
592a252b 5557 /* PREFIX_VEX_0FF8 */
c0f3af97 5558 {
592d1631
L
5559 { Bad_Opcode },
5560 { Bad_Opcode },
6c30d220 5561 { VEX_W_TABLE (VEX_W_0FF8_P_2) },
c0f3af97
L
5562 },
5563
592a252b 5564 /* PREFIX_VEX_0FF9 */
c0f3af97 5565 {
592d1631
L
5566 { Bad_Opcode },
5567 { Bad_Opcode },
6c30d220 5568 { VEX_W_TABLE (VEX_W_0FF9_P_2) },
c0f3af97
L
5569 },
5570
592a252b 5571 /* PREFIX_VEX_0FFA */
c0f3af97 5572 {
592d1631
L
5573 { Bad_Opcode },
5574 { Bad_Opcode },
6c30d220 5575 { VEX_W_TABLE (VEX_W_0FFA_P_2) },
c0f3af97
L
5576 },
5577
592a252b 5578 /* PREFIX_VEX_0FFB */
c0f3af97 5579 {
592d1631
L
5580 { Bad_Opcode },
5581 { Bad_Opcode },
6c30d220 5582 { VEX_W_TABLE (VEX_W_0FFB_P_2) },
c0f3af97
L
5583 },
5584
592a252b 5585 /* PREFIX_VEX_0FFC */
c0f3af97 5586 {
592d1631
L
5587 { Bad_Opcode },
5588 { Bad_Opcode },
6c30d220 5589 { VEX_W_TABLE (VEX_W_0FFC_P_2) },
c0f3af97
L
5590 },
5591
592a252b 5592 /* PREFIX_VEX_0FFD */
c0f3af97 5593 {
592d1631
L
5594 { Bad_Opcode },
5595 { Bad_Opcode },
6c30d220 5596 { VEX_W_TABLE (VEX_W_0FFD_P_2) },
c0f3af97
L
5597 },
5598
592a252b 5599 /* PREFIX_VEX_0FFE */
c0f3af97 5600 {
592d1631
L
5601 { Bad_Opcode },
5602 { Bad_Opcode },
6c30d220 5603 { VEX_W_TABLE (VEX_W_0FFE_P_2) },
c0f3af97
L
5604 },
5605
592a252b 5606 /* PREFIX_VEX_0F3800 */
c0f3af97 5607 {
592d1631
L
5608 { Bad_Opcode },
5609 { Bad_Opcode },
6c30d220 5610 { VEX_W_TABLE (VEX_W_0F3800_P_2) },
c0f3af97
L
5611 },
5612
592a252b 5613 /* PREFIX_VEX_0F3801 */
c0f3af97 5614 {
592d1631
L
5615 { Bad_Opcode },
5616 { Bad_Opcode },
6c30d220 5617 { VEX_W_TABLE (VEX_W_0F3801_P_2) },
c0f3af97
L
5618 },
5619
592a252b 5620 /* PREFIX_VEX_0F3802 */
c0f3af97 5621 {
592d1631
L
5622 { Bad_Opcode },
5623 { Bad_Opcode },
6c30d220 5624 { VEX_W_TABLE (VEX_W_0F3802_P_2) },
c0f3af97
L
5625 },
5626
592a252b 5627 /* PREFIX_VEX_0F3803 */
c0f3af97 5628 {
592d1631
L
5629 { Bad_Opcode },
5630 { Bad_Opcode },
6c30d220 5631 { VEX_W_TABLE (VEX_W_0F3803_P_2) },
c0f3af97
L
5632 },
5633
592a252b 5634 /* PREFIX_VEX_0F3804 */
c0f3af97 5635 {
592d1631
L
5636 { Bad_Opcode },
5637 { Bad_Opcode },
6c30d220 5638 { VEX_W_TABLE (VEX_W_0F3804_P_2) },
c0f3af97
L
5639 },
5640
592a252b 5641 /* PREFIX_VEX_0F3805 */
c0f3af97 5642 {
592d1631
L
5643 { Bad_Opcode },
5644 { Bad_Opcode },
6c30d220 5645 { VEX_W_TABLE (VEX_W_0F3805_P_2) },
c0f3af97
L
5646 },
5647
592a252b 5648 /* PREFIX_VEX_0F3806 */
c0f3af97 5649 {
592d1631
L
5650 { Bad_Opcode },
5651 { Bad_Opcode },
6c30d220 5652 { VEX_W_TABLE (VEX_W_0F3806_P_2) },
c0f3af97
L
5653 },
5654
592a252b 5655 /* PREFIX_VEX_0F3807 */
c0f3af97 5656 {
592d1631
L
5657 { Bad_Opcode },
5658 { Bad_Opcode },
6c30d220 5659 { VEX_W_TABLE (VEX_W_0F3807_P_2) },
c0f3af97
L
5660 },
5661
592a252b 5662 /* PREFIX_VEX_0F3808 */
c0f3af97 5663 {
592d1631
L
5664 { Bad_Opcode },
5665 { Bad_Opcode },
6c30d220 5666 { VEX_W_TABLE (VEX_W_0F3808_P_2) },
c0f3af97
L
5667 },
5668
592a252b 5669 /* PREFIX_VEX_0F3809 */
c0f3af97 5670 {
592d1631
L
5671 { Bad_Opcode },
5672 { Bad_Opcode },
6c30d220 5673 { VEX_W_TABLE (VEX_W_0F3809_P_2) },
c0f3af97
L
5674 },
5675
592a252b 5676 /* PREFIX_VEX_0F380A */
c0f3af97 5677 {
592d1631
L
5678 { Bad_Opcode },
5679 { Bad_Opcode },
6c30d220 5680 { VEX_W_TABLE (VEX_W_0F380A_P_2) },
c0f3af97
L
5681 },
5682
592a252b 5683 /* PREFIX_VEX_0F380B */
c0f3af97 5684 {
592d1631
L
5685 { Bad_Opcode },
5686 { Bad_Opcode },
6c30d220 5687 { VEX_W_TABLE (VEX_W_0F380B_P_2) },
c0f3af97
L
5688 },
5689
592a252b 5690 /* PREFIX_VEX_0F380C */
c0f3af97 5691 {
592d1631
L
5692 { Bad_Opcode },
5693 { Bad_Opcode },
592a252b 5694 { VEX_W_TABLE (VEX_W_0F380C_P_2) },
c0f3af97
L
5695 },
5696
592a252b 5697 /* PREFIX_VEX_0F380D */
c0f3af97 5698 {
592d1631
L
5699 { Bad_Opcode },
5700 { Bad_Opcode },
592a252b 5701 { VEX_W_TABLE (VEX_W_0F380D_P_2) },
c0f3af97
L
5702 },
5703
592a252b 5704 /* PREFIX_VEX_0F380E */
c0f3af97 5705 {
592d1631
L
5706 { Bad_Opcode },
5707 { Bad_Opcode },
592a252b 5708 { VEX_W_TABLE (VEX_W_0F380E_P_2) },
c0f3af97
L
5709 },
5710
592a252b 5711 /* PREFIX_VEX_0F380F */
c0f3af97 5712 {
592d1631
L
5713 { Bad_Opcode },
5714 { Bad_Opcode },
592a252b 5715 { VEX_W_TABLE (VEX_W_0F380F_P_2) },
c0f3af97
L
5716 },
5717
592a252b 5718 /* PREFIX_VEX_0F3813 */
c7b8aa3a
L
5719 {
5720 { Bad_Opcode },
5721 { Bad_Opcode },
bf890a93 5722 { "vcvtph2ps", { XM, EXxmmq }, 0 },
c7b8aa3a
L
5723 },
5724
6c30d220
L
5725 /* PREFIX_VEX_0F3816 */
5726 {
5727 { Bad_Opcode },
5728 { Bad_Opcode },
5729 { VEX_LEN_TABLE (VEX_LEN_0F3816_P_2) },
5730 },
5731
592a252b 5732 /* PREFIX_VEX_0F3817 */
c0f3af97 5733 {
592d1631
L
5734 { Bad_Opcode },
5735 { Bad_Opcode },
592a252b 5736 { VEX_W_TABLE (VEX_W_0F3817_P_2) },
c0f3af97
L
5737 },
5738
592a252b 5739 /* PREFIX_VEX_0F3818 */
c0f3af97 5740 {
592d1631
L
5741 { Bad_Opcode },
5742 { Bad_Opcode },
6c30d220 5743 { VEX_W_TABLE (VEX_W_0F3818_P_2) },
c0f3af97
L
5744 },
5745
592a252b 5746 /* PREFIX_VEX_0F3819 */
c0f3af97 5747 {
592d1631
L
5748 { Bad_Opcode },
5749 { Bad_Opcode },
6c30d220 5750 { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2) },
c0f3af97
L
5751 },
5752
592a252b 5753 /* PREFIX_VEX_0F381A */
c0f3af97 5754 {
592d1631
L
5755 { Bad_Opcode },
5756 { Bad_Opcode },
592a252b 5757 { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2) },
c0f3af97
L
5758 },
5759
592a252b 5760 /* PREFIX_VEX_0F381C */
c0f3af97 5761 {
592d1631
L
5762 { Bad_Opcode },
5763 { Bad_Opcode },
6c30d220 5764 { VEX_W_TABLE (VEX_W_0F381C_P_2) },
c0f3af97
L
5765 },
5766
592a252b 5767 /* PREFIX_VEX_0F381D */
c0f3af97 5768 {
592d1631
L
5769 { Bad_Opcode },
5770 { Bad_Opcode },
6c30d220 5771 { VEX_W_TABLE (VEX_W_0F381D_P_2) },
c0f3af97
L
5772 },
5773
592a252b 5774 /* PREFIX_VEX_0F381E */
c0f3af97 5775 {
592d1631
L
5776 { Bad_Opcode },
5777 { Bad_Opcode },
6c30d220 5778 { VEX_W_TABLE (VEX_W_0F381E_P_2) },
c0f3af97
L
5779 },
5780
592a252b 5781 /* PREFIX_VEX_0F3820 */
c0f3af97 5782 {
592d1631
L
5783 { Bad_Opcode },
5784 { Bad_Opcode },
6c30d220 5785 { VEX_W_TABLE (VEX_W_0F3820_P_2) },
c0f3af97
L
5786 },
5787
592a252b 5788 /* PREFIX_VEX_0F3821 */
c0f3af97 5789 {
592d1631
L
5790 { Bad_Opcode },
5791 { Bad_Opcode },
6c30d220 5792 { VEX_W_TABLE (VEX_W_0F3821_P_2) },
c0f3af97
L
5793 },
5794
592a252b 5795 /* PREFIX_VEX_0F3822 */
c0f3af97 5796 {
592d1631
L
5797 { Bad_Opcode },
5798 { Bad_Opcode },
6c30d220 5799 { VEX_W_TABLE (VEX_W_0F3822_P_2) },
c0f3af97
L
5800 },
5801
592a252b 5802 /* PREFIX_VEX_0F3823 */
c0f3af97 5803 {
592d1631
L
5804 { Bad_Opcode },
5805 { Bad_Opcode },
6c30d220 5806 { VEX_W_TABLE (VEX_W_0F3823_P_2) },
c0f3af97
L
5807 },
5808
592a252b 5809 /* PREFIX_VEX_0F3824 */
c0f3af97 5810 {
592d1631
L
5811 { Bad_Opcode },
5812 { Bad_Opcode },
6c30d220 5813 { VEX_W_TABLE (VEX_W_0F3824_P_2) },
c0f3af97
L
5814 },
5815
592a252b 5816 /* PREFIX_VEX_0F3825 */
c0f3af97 5817 {
592d1631
L
5818 { Bad_Opcode },
5819 { Bad_Opcode },
6c30d220 5820 { VEX_W_TABLE (VEX_W_0F3825_P_2) },
c0f3af97
L
5821 },
5822
592a252b 5823 /* PREFIX_VEX_0F3828 */
c0f3af97 5824 {
592d1631
L
5825 { Bad_Opcode },
5826 { Bad_Opcode },
6c30d220 5827 { VEX_W_TABLE (VEX_W_0F3828_P_2) },
c0f3af97
L
5828 },
5829
592a252b 5830 /* PREFIX_VEX_0F3829 */
c0f3af97 5831 {
592d1631
L
5832 { Bad_Opcode },
5833 { Bad_Opcode },
6c30d220 5834 { VEX_W_TABLE (VEX_W_0F3829_P_2) },
c0f3af97
L
5835 },
5836
592a252b 5837 /* PREFIX_VEX_0F382A */
c0f3af97 5838 {
592d1631
L
5839 { Bad_Opcode },
5840 { Bad_Opcode },
592a252b 5841 { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2) },
c0f3af97
L
5842 },
5843
592a252b 5844 /* PREFIX_VEX_0F382B */
c0f3af97 5845 {
592d1631
L
5846 { Bad_Opcode },
5847 { Bad_Opcode },
6c30d220 5848 { VEX_W_TABLE (VEX_W_0F382B_P_2) },
c0f3af97
L
5849 },
5850
592a252b 5851 /* PREFIX_VEX_0F382C */
c0f3af97 5852 {
592d1631
L
5853 { Bad_Opcode },
5854 { Bad_Opcode },
592a252b 5855 { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2) },
c0f3af97
L
5856 },
5857
592a252b 5858 /* PREFIX_VEX_0F382D */
c0f3af97 5859 {
592d1631
L
5860 { Bad_Opcode },
5861 { Bad_Opcode },
592a252b 5862 { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2) },
c0f3af97
L
5863 },
5864
592a252b 5865 /* PREFIX_VEX_0F382E */
c0f3af97 5866 {
592d1631
L
5867 { Bad_Opcode },
5868 { Bad_Opcode },
592a252b 5869 { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2) },
c0f3af97
L
5870 },
5871
592a252b 5872 /* PREFIX_VEX_0F382F */
c0f3af97 5873 {
592d1631
L
5874 { Bad_Opcode },
5875 { Bad_Opcode },
592a252b 5876 { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2) },
c0f3af97
L
5877 },
5878
592a252b 5879 /* PREFIX_VEX_0F3830 */
c0f3af97 5880 {
592d1631
L
5881 { Bad_Opcode },
5882 { Bad_Opcode },
6c30d220 5883 { VEX_W_TABLE (VEX_W_0F3830_P_2) },
c0f3af97
L
5884 },
5885
592a252b 5886 /* PREFIX_VEX_0F3831 */
c0f3af97 5887 {
592d1631
L
5888 { Bad_Opcode },
5889 { Bad_Opcode },
6c30d220 5890 { VEX_W_TABLE (VEX_W_0F3831_P_2) },
c0f3af97
L
5891 },
5892
592a252b 5893 /* PREFIX_VEX_0F3832 */
c0f3af97 5894 {
592d1631
L
5895 { Bad_Opcode },
5896 { Bad_Opcode },
6c30d220 5897 { VEX_W_TABLE (VEX_W_0F3832_P_2) },
c0f3af97
L
5898 },
5899
592a252b 5900 /* PREFIX_VEX_0F3833 */
c0f3af97 5901 {
592d1631
L
5902 { Bad_Opcode },
5903 { Bad_Opcode },
6c30d220 5904 { VEX_W_TABLE (VEX_W_0F3833_P_2) },
c0f3af97
L
5905 },
5906
592a252b 5907 /* PREFIX_VEX_0F3834 */
c0f3af97 5908 {
592d1631
L
5909 { Bad_Opcode },
5910 { Bad_Opcode },
6c30d220 5911 { VEX_W_TABLE (VEX_W_0F3834_P_2) },
c0f3af97
L
5912 },
5913
592a252b 5914 /* PREFIX_VEX_0F3835 */
c0f3af97 5915 {
592d1631
L
5916 { Bad_Opcode },
5917 { Bad_Opcode },
6c30d220
L
5918 { VEX_W_TABLE (VEX_W_0F3835_P_2) },
5919 },
5920
5921 /* PREFIX_VEX_0F3836 */
5922 {
5923 { Bad_Opcode },
5924 { Bad_Opcode },
5925 { VEX_LEN_TABLE (VEX_LEN_0F3836_P_2) },
c0f3af97
L
5926 },
5927
592a252b 5928 /* PREFIX_VEX_0F3837 */
c0f3af97 5929 {
592d1631
L
5930 { Bad_Opcode },
5931 { Bad_Opcode },
6c30d220 5932 { VEX_W_TABLE (VEX_W_0F3837_P_2) },
c0f3af97
L
5933 },
5934
592a252b 5935 /* PREFIX_VEX_0F3838 */
c0f3af97 5936 {
592d1631
L
5937 { Bad_Opcode },
5938 { Bad_Opcode },
6c30d220 5939 { VEX_W_TABLE (VEX_W_0F3838_P_2) },
c0f3af97
L
5940 },
5941
592a252b 5942 /* PREFIX_VEX_0F3839 */
c0f3af97 5943 {
592d1631
L
5944 { Bad_Opcode },
5945 { Bad_Opcode },
6c30d220 5946 { VEX_W_TABLE (VEX_W_0F3839_P_2) },
c0f3af97
L
5947 },
5948
592a252b 5949 /* PREFIX_VEX_0F383A */
c0f3af97 5950 {
592d1631
L
5951 { Bad_Opcode },
5952 { Bad_Opcode },
6c30d220 5953 { VEX_W_TABLE (VEX_W_0F383A_P_2) },
c0f3af97
L
5954 },
5955
592a252b 5956 /* PREFIX_VEX_0F383B */
c0f3af97 5957 {
592d1631
L
5958 { Bad_Opcode },
5959 { Bad_Opcode },
6c30d220 5960 { VEX_W_TABLE (VEX_W_0F383B_P_2) },
c0f3af97
L
5961 },
5962
592a252b 5963 /* PREFIX_VEX_0F383C */
c0f3af97 5964 {
592d1631
L
5965 { Bad_Opcode },
5966 { Bad_Opcode },
6c30d220 5967 { VEX_W_TABLE (VEX_W_0F383C_P_2) },
c0f3af97
L
5968 },
5969
592a252b 5970 /* PREFIX_VEX_0F383D */
c0f3af97 5971 {
592d1631
L
5972 { Bad_Opcode },
5973 { Bad_Opcode },
6c30d220 5974 { VEX_W_TABLE (VEX_W_0F383D_P_2) },
c0f3af97
L
5975 },
5976
592a252b 5977 /* PREFIX_VEX_0F383E */
c0f3af97 5978 {
592d1631
L
5979 { Bad_Opcode },
5980 { Bad_Opcode },
6c30d220 5981 { VEX_W_TABLE (VEX_W_0F383E_P_2) },
c0f3af97
L
5982 },
5983
592a252b 5984 /* PREFIX_VEX_0F383F */
c0f3af97 5985 {
592d1631
L
5986 { Bad_Opcode },
5987 { Bad_Opcode },
6c30d220 5988 { VEX_W_TABLE (VEX_W_0F383F_P_2) },
c0f3af97
L
5989 },
5990
592a252b 5991 /* PREFIX_VEX_0F3840 */
c0f3af97 5992 {
592d1631
L
5993 { Bad_Opcode },
5994 { Bad_Opcode },
6c30d220 5995 { VEX_W_TABLE (VEX_W_0F3840_P_2) },
c0f3af97
L
5996 },
5997
592a252b 5998 /* PREFIX_VEX_0F3841 */
c0f3af97 5999 {
592d1631
L
6000 { Bad_Opcode },
6001 { Bad_Opcode },
592a252b 6002 { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2) },
c0f3af97
L
6003 },
6004
6c30d220
L
6005 /* PREFIX_VEX_0F3845 */
6006 {
6007 { Bad_Opcode },
6008 { Bad_Opcode },
bf890a93 6009 { "vpsrlv%LW", { XM, Vex, EXx }, 0 },
6c30d220
L
6010 },
6011
6012 /* PREFIX_VEX_0F3846 */
6013 {
6014 { Bad_Opcode },
6015 { Bad_Opcode },
6016 { VEX_W_TABLE (VEX_W_0F3846_P_2) },
6017 },
6018
6019 /* PREFIX_VEX_0F3847 */
6020 {
6021 { Bad_Opcode },
6022 { Bad_Opcode },
bf890a93 6023 { "vpsllv%LW", { XM, Vex, EXx }, 0 },
6c30d220
L
6024 },
6025
6026 /* PREFIX_VEX_0F3858 */
6027 {
6028 { Bad_Opcode },
6029 { Bad_Opcode },
6030 { VEX_W_TABLE (VEX_W_0F3858_P_2) },
6031 },
6032
6033 /* PREFIX_VEX_0F3859 */
6034 {
6035 { Bad_Opcode },
6036 { Bad_Opcode },
6037 { VEX_W_TABLE (VEX_W_0F3859_P_2) },
6038 },
6039
6040 /* PREFIX_VEX_0F385A */
6041 {
6042 { Bad_Opcode },
6043 { Bad_Opcode },
6044 { MOD_TABLE (MOD_VEX_0F385A_PREFIX_2) },
6045 },
6046
6047 /* PREFIX_VEX_0F3878 */
6048 {
6049 { Bad_Opcode },
6050 { Bad_Opcode },
6051 { VEX_W_TABLE (VEX_W_0F3878_P_2) },
6052 },
6053
6054 /* PREFIX_VEX_0F3879 */
6055 {
6056 { Bad_Opcode },
6057 { Bad_Opcode },
6058 { VEX_W_TABLE (VEX_W_0F3879_P_2) },
6059 },
6060
6061 /* PREFIX_VEX_0F388C */
6062 {
6063 { Bad_Opcode },
6064 { Bad_Opcode },
f7002f42 6065 { MOD_TABLE (MOD_VEX_0F388C_PREFIX_2) },
6c30d220
L
6066 },
6067
6068 /* PREFIX_VEX_0F388E */
6069 {
6070 { Bad_Opcode },
6071 { Bad_Opcode },
f7002f42 6072 { MOD_TABLE (MOD_VEX_0F388E_PREFIX_2) },
6c30d220
L
6073 },
6074
6075 /* PREFIX_VEX_0F3890 */
6076 {
6077 { Bad_Opcode },
6078 { Bad_Opcode },
bf890a93 6079 { "vpgatherd%LW", { XM, MVexVSIBDWpX, Vex }, 0 },
6c30d220
L
6080 },
6081
6082 /* PREFIX_VEX_0F3891 */
6083 {
6084 { Bad_Opcode },
6085 { Bad_Opcode },
bf890a93 6086 { "vpgatherq%LW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6c30d220
L
6087 },
6088
6089 /* PREFIX_VEX_0F3892 */
6090 {
6091 { Bad_Opcode },
6092 { Bad_Opcode },
bf890a93 6093 { "vgatherdp%XW", { XM, MVexVSIBDWpX, Vex }, 0 },
6c30d220
L
6094 },
6095
6096 /* PREFIX_VEX_0F3893 */
6097 {
6098 { Bad_Opcode },
6099 { Bad_Opcode },
bf890a93 6100 { "vgatherqp%XW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6c30d220
L
6101 },
6102
592a252b 6103 /* PREFIX_VEX_0F3896 */
a5ff0eb2 6104 {
592d1631
L
6105 { Bad_Opcode },
6106 { Bad_Opcode },
bf890a93 6107 { "vfmaddsub132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6108 },
6109
592a252b 6110 /* PREFIX_VEX_0F3897 */
a5ff0eb2 6111 {
592d1631
L
6112 { Bad_Opcode },
6113 { Bad_Opcode },
bf890a93 6114 { "vfmsubadd132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6115 },
6116
592a252b 6117 /* PREFIX_VEX_0F3898 */
a5ff0eb2 6118 {
592d1631
L
6119 { Bad_Opcode },
6120 { Bad_Opcode },
bf890a93 6121 { "vfmadd132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6122 },
6123
592a252b 6124 /* PREFIX_VEX_0F3899 */
a5ff0eb2 6125 {
592d1631
L
6126 { Bad_Opcode },
6127 { Bad_Opcode },
bf890a93 6128 { "vfmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
a5ff0eb2
L
6129 },
6130
592a252b 6131 /* PREFIX_VEX_0F389A */
a5ff0eb2 6132 {
592d1631
L
6133 { Bad_Opcode },
6134 { Bad_Opcode },
bf890a93 6135 { "vfmsub132p%XW", { XM, Vex, EXx }, 0 },
a5ff0eb2
L
6136 },
6137
592a252b 6138 /* PREFIX_VEX_0F389B */
c0f3af97 6139 {
592d1631
L
6140 { Bad_Opcode },
6141 { Bad_Opcode },
bf890a93 6142 { "vfmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6143 },
6144
592a252b 6145 /* PREFIX_VEX_0F389C */
c0f3af97 6146 {
592d1631
L
6147 { Bad_Opcode },
6148 { Bad_Opcode },
bf890a93 6149 { "vfnmadd132p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6150 },
6151
592a252b 6152 /* PREFIX_VEX_0F389D */
c0f3af97 6153 {
592d1631
L
6154 { Bad_Opcode },
6155 { Bad_Opcode },
bf890a93 6156 { "vfnmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6157 },
6158
592a252b 6159 /* PREFIX_VEX_0F389E */
c0f3af97 6160 {
592d1631
L
6161 { Bad_Opcode },
6162 { Bad_Opcode },
bf890a93 6163 { "vfnmsub132p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6164 },
6165
592a252b 6166 /* PREFIX_VEX_0F389F */
c0f3af97 6167 {
592d1631
L
6168 { Bad_Opcode },
6169 { Bad_Opcode },
bf890a93 6170 { "vfnmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6171 },
6172
592a252b 6173 /* PREFIX_VEX_0F38A6 */
c0f3af97 6174 {
592d1631
L
6175 { Bad_Opcode },
6176 { Bad_Opcode },
bf890a93 6177 { "vfmaddsub213p%XW", { XM, Vex, EXx }, 0 },
592d1631 6178 { Bad_Opcode },
c0f3af97
L
6179 },
6180
592a252b 6181 /* PREFIX_VEX_0F38A7 */
c0f3af97 6182 {
592d1631
L
6183 { Bad_Opcode },
6184 { Bad_Opcode },
bf890a93 6185 { "vfmsubadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6186 },
6187
592a252b 6188 /* PREFIX_VEX_0F38A8 */
c0f3af97 6189 {
592d1631
L
6190 { Bad_Opcode },
6191 { Bad_Opcode },
bf890a93 6192 { "vfmadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6193 },
6194
592a252b 6195 /* PREFIX_VEX_0F38A9 */
c0f3af97 6196 {
592d1631
L
6197 { Bad_Opcode },
6198 { Bad_Opcode },
bf890a93 6199 { "vfmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6200 },
6201
592a252b 6202 /* PREFIX_VEX_0F38AA */
c0f3af97 6203 {
592d1631
L
6204 { Bad_Opcode },
6205 { Bad_Opcode },
bf890a93 6206 { "vfmsub213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6207 },
6208
592a252b 6209 /* PREFIX_VEX_0F38AB */
c0f3af97 6210 {
592d1631
L
6211 { Bad_Opcode },
6212 { Bad_Opcode },
bf890a93 6213 { "vfmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6214 },
6215
592a252b 6216 /* PREFIX_VEX_0F38AC */
c0f3af97 6217 {
592d1631
L
6218 { Bad_Opcode },
6219 { Bad_Opcode },
bf890a93 6220 { "vfnmadd213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6221 },
6222
592a252b 6223 /* PREFIX_VEX_0F38AD */
c0f3af97 6224 {
592d1631
L
6225 { Bad_Opcode },
6226 { Bad_Opcode },
bf890a93 6227 { "vfnmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6228 },
6229
592a252b 6230 /* PREFIX_VEX_0F38AE */
c0f3af97 6231 {
592d1631
L
6232 { Bad_Opcode },
6233 { Bad_Opcode },
bf890a93 6234 { "vfnmsub213p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6235 },
6236
592a252b 6237 /* PREFIX_VEX_0F38AF */
c0f3af97 6238 {
592d1631
L
6239 { Bad_Opcode },
6240 { Bad_Opcode },
bf890a93 6241 { "vfnmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6242 },
6243
592a252b 6244 /* PREFIX_VEX_0F38B6 */
c0f3af97 6245 {
592d1631
L
6246 { Bad_Opcode },
6247 { Bad_Opcode },
bf890a93 6248 { "vfmaddsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6249 },
6250
592a252b 6251 /* PREFIX_VEX_0F38B7 */
c0f3af97 6252 {
592d1631
L
6253 { Bad_Opcode },
6254 { Bad_Opcode },
bf890a93 6255 { "vfmsubadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6256 },
6257
592a252b 6258 /* PREFIX_VEX_0F38B8 */
c0f3af97 6259 {
592d1631
L
6260 { Bad_Opcode },
6261 { Bad_Opcode },
bf890a93 6262 { "vfmadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6263 },
6264
592a252b 6265 /* PREFIX_VEX_0F38B9 */
c0f3af97 6266 {
592d1631
L
6267 { Bad_Opcode },
6268 { Bad_Opcode },
bf890a93 6269 { "vfmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6270 },
6271
592a252b 6272 /* PREFIX_VEX_0F38BA */
c0f3af97 6273 {
592d1631
L
6274 { Bad_Opcode },
6275 { Bad_Opcode },
bf890a93 6276 { "vfmsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6277 },
6278
592a252b 6279 /* PREFIX_VEX_0F38BB */
c0f3af97 6280 {
592d1631
L
6281 { Bad_Opcode },
6282 { Bad_Opcode },
bf890a93 6283 { "vfmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6284 },
6285
592a252b 6286 /* PREFIX_VEX_0F38BC */
c0f3af97 6287 {
592d1631
L
6288 { Bad_Opcode },
6289 { Bad_Opcode },
bf890a93 6290 { "vfnmadd231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6291 },
6292
592a252b 6293 /* PREFIX_VEX_0F38BD */
c0f3af97 6294 {
592d1631
L
6295 { Bad_Opcode },
6296 { Bad_Opcode },
bf890a93 6297 { "vfnmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6298 },
6299
592a252b 6300 /* PREFIX_VEX_0F38BE */
c0f3af97 6301 {
592d1631
L
6302 { Bad_Opcode },
6303 { Bad_Opcode },
bf890a93 6304 { "vfnmsub231p%XW", { XM, Vex, EXx }, 0 },
c0f3af97
L
6305 },
6306
592a252b 6307 /* PREFIX_VEX_0F38BF */
c0f3af97 6308 {
592d1631
L
6309 { Bad_Opcode },
6310 { Bad_Opcode },
bf890a93 6311 { "vfnmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
c0f3af97
L
6312 },
6313
592a252b 6314 /* PREFIX_VEX_0F38DB */
c0f3af97 6315 {
592d1631
L
6316 { Bad_Opcode },
6317 { Bad_Opcode },
592a252b 6318 { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2) },
c0f3af97
L
6319 },
6320
592a252b 6321 /* PREFIX_VEX_0F38DC */
c0f3af97 6322 {
592d1631
L
6323 { Bad_Opcode },
6324 { Bad_Opcode },
592a252b 6325 { VEX_LEN_TABLE (VEX_LEN_0F38DC_P_2) },
c0f3af97
L
6326 },
6327
592a252b 6328 /* PREFIX_VEX_0F38DD */
c0f3af97 6329 {
592d1631
L
6330 { Bad_Opcode },
6331 { Bad_Opcode },
592a252b 6332 { VEX_LEN_TABLE (VEX_LEN_0F38DD_P_2) },
c0f3af97
L
6333 },
6334
592a252b 6335 /* PREFIX_VEX_0F38DE */
c0f3af97 6336 {
592d1631
L
6337 { Bad_Opcode },
6338 { Bad_Opcode },
592a252b 6339 { VEX_LEN_TABLE (VEX_LEN_0F38DE_P_2) },
c0f3af97
L
6340 },
6341
592a252b 6342 /* PREFIX_VEX_0F38DF */
c0f3af97 6343 {
592d1631
L
6344 { Bad_Opcode },
6345 { Bad_Opcode },
592a252b 6346 { VEX_LEN_TABLE (VEX_LEN_0F38DF_P_2) },
c0f3af97
L
6347 },
6348
f12dc422
L
6349 /* PREFIX_VEX_0F38F2 */
6350 {
6351 { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0) },
6352 },
6353
6354 /* PREFIX_VEX_0F38F3_REG_1 */
6355 {
6356 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0) },
6357 },
6358
6359 /* PREFIX_VEX_0F38F3_REG_2 */
6360 {
6361 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0) },
6362 },
6363
6364 /* PREFIX_VEX_0F38F3_REG_3 */
6365 {
6366 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0) },
6367 },
6368
6c30d220
L
6369 /* PREFIX_VEX_0F38F5 */
6370 {
6371 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_0) },
6372 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_1) },
6373 { Bad_Opcode },
6374 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_3) },
6375 },
6376
6377 /* PREFIX_VEX_0F38F6 */
6378 {
6379 { Bad_Opcode },
6380 { Bad_Opcode },
6381 { Bad_Opcode },
6382 { VEX_LEN_TABLE (VEX_LEN_0F38F6_P_3) },
6383 },
6384
f12dc422
L
6385 /* PREFIX_VEX_0F38F7 */
6386 {
6387 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0) },
6c30d220
L
6388 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_1) },
6389 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_2) },
6390 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_3) },
6391 },
6392
6393 /* PREFIX_VEX_0F3A00 */
6394 {
6395 { Bad_Opcode },
6396 { Bad_Opcode },
6397 { VEX_LEN_TABLE (VEX_LEN_0F3A00_P_2) },
6398 },
6399
6400 /* PREFIX_VEX_0F3A01 */
6401 {
6402 { Bad_Opcode },
6403 { Bad_Opcode },
6404 { VEX_LEN_TABLE (VEX_LEN_0F3A01_P_2) },
6405 },
6406
6407 /* PREFIX_VEX_0F3A02 */
6408 {
6409 { Bad_Opcode },
6410 { Bad_Opcode },
6411 { VEX_W_TABLE (VEX_W_0F3A02_P_2) },
f12dc422
L
6412 },
6413
592a252b 6414 /* PREFIX_VEX_0F3A04 */
c0f3af97 6415 {
592d1631
L
6416 { Bad_Opcode },
6417 { Bad_Opcode },
592a252b 6418 { VEX_W_TABLE (VEX_W_0F3A04_P_2) },
c0f3af97
L
6419 },
6420
592a252b 6421 /* PREFIX_VEX_0F3A05 */
c0f3af97 6422 {
592d1631
L
6423 { Bad_Opcode },
6424 { Bad_Opcode },
592a252b 6425 { VEX_W_TABLE (VEX_W_0F3A05_P_2) },
c0f3af97
L
6426 },
6427
592a252b 6428 /* PREFIX_VEX_0F3A06 */
c0f3af97 6429 {
592d1631
L
6430 { Bad_Opcode },
6431 { Bad_Opcode },
592a252b 6432 { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2) },
c0f3af97
L
6433 },
6434
592a252b 6435 /* PREFIX_VEX_0F3A08 */
c0f3af97 6436 {
592d1631
L
6437 { Bad_Opcode },
6438 { Bad_Opcode },
592a252b 6439 { VEX_W_TABLE (VEX_W_0F3A08_P_2) },
c0f3af97
L
6440 },
6441
592a252b 6442 /* PREFIX_VEX_0F3A09 */
c0f3af97 6443 {
592d1631
L
6444 { Bad_Opcode },
6445 { Bad_Opcode },
592a252b 6446 { VEX_W_TABLE (VEX_W_0F3A09_P_2) },
c0f3af97
L
6447 },
6448
592a252b 6449 /* PREFIX_VEX_0F3A0A */
c0f3af97 6450 {
592d1631
L
6451 { Bad_Opcode },
6452 { Bad_Opcode },
592a252b 6453 { VEX_LEN_TABLE (VEX_LEN_0F3A0A_P_2) },
0bfee649
L
6454 },
6455
592a252b 6456 /* PREFIX_VEX_0F3A0B */
0bfee649 6457 {
592d1631
L
6458 { Bad_Opcode },
6459 { Bad_Opcode },
592a252b 6460 { VEX_LEN_TABLE (VEX_LEN_0F3A0B_P_2) },
0bfee649
L
6461 },
6462
592a252b 6463 /* PREFIX_VEX_0F3A0C */
0bfee649 6464 {
592d1631
L
6465 { Bad_Opcode },
6466 { Bad_Opcode },
592a252b 6467 { VEX_W_TABLE (VEX_W_0F3A0C_P_2) },
0bfee649
L
6468 },
6469
592a252b 6470 /* PREFIX_VEX_0F3A0D */
0bfee649 6471 {
592d1631
L
6472 { Bad_Opcode },
6473 { Bad_Opcode },
592a252b 6474 { VEX_W_TABLE (VEX_W_0F3A0D_P_2) },
c0f3af97
L
6475 },
6476
592a252b 6477 /* PREFIX_VEX_0F3A0E */
0bfee649 6478 {
592d1631
L
6479 { Bad_Opcode },
6480 { Bad_Opcode },
6c30d220 6481 { VEX_W_TABLE (VEX_W_0F3A0E_P_2) },
0bfee649
L
6482 },
6483
592a252b 6484 /* PREFIX_VEX_0F3A0F */
0bfee649 6485 {
592d1631
L
6486 { Bad_Opcode },
6487 { Bad_Opcode },
6c30d220 6488 { VEX_W_TABLE (VEX_W_0F3A0F_P_2) },
0bfee649
L
6489 },
6490
592a252b 6491 /* PREFIX_VEX_0F3A14 */
0bfee649 6492 {
592d1631
L
6493 { Bad_Opcode },
6494 { Bad_Opcode },
592a252b 6495 { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2) },
0bfee649
L
6496 },
6497
592a252b 6498 /* PREFIX_VEX_0F3A15 */
0bfee649 6499 {
592d1631
L
6500 { Bad_Opcode },
6501 { Bad_Opcode },
592a252b 6502 { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2) },
0bfee649
L
6503 },
6504
592a252b 6505 /* PREFIX_VEX_0F3A16 */
c0f3af97 6506 {
592d1631
L
6507 { Bad_Opcode },
6508 { Bad_Opcode },
592a252b 6509 { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2) },
c0f3af97
L
6510 },
6511
592a252b 6512 /* PREFIX_VEX_0F3A17 */
c0f3af97 6513 {
592d1631
L
6514 { Bad_Opcode },
6515 { Bad_Opcode },
592a252b 6516 { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2) },
c0f3af97
L
6517 },
6518
592a252b 6519 /* PREFIX_VEX_0F3A18 */
c0f3af97 6520 {
592d1631
L
6521 { Bad_Opcode },
6522 { Bad_Opcode },
592a252b 6523 { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2) },
c0f3af97
L
6524 },
6525
592a252b 6526 /* PREFIX_VEX_0F3A19 */
c0f3af97 6527 {
592d1631
L
6528 { Bad_Opcode },
6529 { Bad_Opcode },
592a252b 6530 { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2) },
c0f3af97
L
6531 },
6532
592a252b 6533 /* PREFIX_VEX_0F3A1D */
c7b8aa3a
L
6534 {
6535 { Bad_Opcode },
6536 { Bad_Opcode },
bf890a93 6537 { "vcvtps2ph", { EXxmmq, XM, Ib }, 0 },
c7b8aa3a
L
6538 },
6539
592a252b 6540 /* PREFIX_VEX_0F3A20 */
c0f3af97 6541 {
592d1631
L
6542 { Bad_Opcode },
6543 { Bad_Opcode },
592a252b 6544 { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2) },
c0f3af97
L
6545 },
6546
592a252b 6547 /* PREFIX_VEX_0F3A21 */
c0f3af97 6548 {
592d1631
L
6549 { Bad_Opcode },
6550 { Bad_Opcode },
592a252b 6551 { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2) },
c0f3af97
L
6552 },
6553
592a252b 6554 /* PREFIX_VEX_0F3A22 */
0bfee649 6555 {
592d1631
L
6556 { Bad_Opcode },
6557 { Bad_Opcode },
592a252b 6558 { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2) },
0bfee649
L
6559 },
6560
43234a1e
L
6561 /* PREFIX_VEX_0F3A30 */
6562 {
6563 { Bad_Opcode },
6564 { Bad_Opcode },
6565 { VEX_LEN_TABLE (VEX_LEN_0F3A30_P_2) },
6566 },
6567
1ba585e8
IT
6568 /* PREFIX_VEX_0F3A31 */
6569 {
6570 { Bad_Opcode },
6571 { Bad_Opcode },
6572 { VEX_LEN_TABLE (VEX_LEN_0F3A31_P_2) },
6573 },
6574
43234a1e
L
6575 /* PREFIX_VEX_0F3A32 */
6576 {
6577 { Bad_Opcode },
6578 { Bad_Opcode },
6579 { VEX_LEN_TABLE (VEX_LEN_0F3A32_P_2) },
6580 },
6581
1ba585e8
IT
6582 /* PREFIX_VEX_0F3A33 */
6583 {
6584 { Bad_Opcode },
6585 { Bad_Opcode },
6586 { VEX_LEN_TABLE (VEX_LEN_0F3A33_P_2) },
6587 },
6588
6c30d220
L
6589 /* PREFIX_VEX_0F3A38 */
6590 {
6591 { Bad_Opcode },
6592 { Bad_Opcode },
6593 { VEX_LEN_TABLE (VEX_LEN_0F3A38_P_2) },
6594 },
6595
6596 /* PREFIX_VEX_0F3A39 */
6597 {
6598 { Bad_Opcode },
6599 { Bad_Opcode },
6600 { VEX_LEN_TABLE (VEX_LEN_0F3A39_P_2) },
6601 },
6602
592a252b 6603 /* PREFIX_VEX_0F3A40 */
c0f3af97 6604 {
592d1631
L
6605 { Bad_Opcode },
6606 { Bad_Opcode },
592a252b 6607 { VEX_W_TABLE (VEX_W_0F3A40_P_2) },
c0f3af97
L
6608 },
6609
592a252b 6610 /* PREFIX_VEX_0F3A41 */
c0f3af97 6611 {
592d1631
L
6612 { Bad_Opcode },
6613 { Bad_Opcode },
592a252b 6614 { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2) },
c0f3af97
L
6615 },
6616
592a252b 6617 /* PREFIX_VEX_0F3A42 */
c0f3af97 6618 {
592d1631
L
6619 { Bad_Opcode },
6620 { Bad_Opcode },
6c30d220 6621 { VEX_W_TABLE (VEX_W_0F3A42_P_2) },
c0f3af97
L
6622 },
6623
592a252b 6624 /* PREFIX_VEX_0F3A44 */
ce2f5b3c 6625 {
592d1631
L
6626 { Bad_Opcode },
6627 { Bad_Opcode },
592a252b 6628 { VEX_LEN_TABLE (VEX_LEN_0F3A44_P_2) },
ce2f5b3c
L
6629 },
6630
6c30d220
L
6631 /* PREFIX_VEX_0F3A46 */
6632 {
6633 { Bad_Opcode },
6634 { Bad_Opcode },
6635 { VEX_LEN_TABLE (VEX_LEN_0F3A46_P_2) },
6636 },
6637
592a252b 6638 /* PREFIX_VEX_0F3A48 */
a683cc34
SP
6639 {
6640 { Bad_Opcode },
6641 { Bad_Opcode },
592a252b 6642 { VEX_W_TABLE (VEX_W_0F3A48_P_2) },
a683cc34
SP
6643 },
6644
592a252b 6645 /* PREFIX_VEX_0F3A49 */
a683cc34
SP
6646 {
6647 { Bad_Opcode },
6648 { Bad_Opcode },
592a252b 6649 { VEX_W_TABLE (VEX_W_0F3A49_P_2) },
a683cc34
SP
6650 },
6651
592a252b 6652 /* PREFIX_VEX_0F3A4A */
c0f3af97 6653 {
592d1631
L
6654 { Bad_Opcode },
6655 { Bad_Opcode },
592a252b 6656 { VEX_W_TABLE (VEX_W_0F3A4A_P_2) },
c0f3af97
L
6657 },
6658
592a252b 6659 /* PREFIX_VEX_0F3A4B */
c0f3af97 6660 {
592d1631
L
6661 { Bad_Opcode },
6662 { Bad_Opcode },
592a252b 6663 { VEX_W_TABLE (VEX_W_0F3A4B_P_2) },
c0f3af97
L
6664 },
6665
592a252b 6666 /* PREFIX_VEX_0F3A4C */
c0f3af97 6667 {
592d1631
L
6668 { Bad_Opcode },
6669 { Bad_Opcode },
6c30d220 6670 { VEX_W_TABLE (VEX_W_0F3A4C_P_2) },
c0f3af97
L
6671 },
6672
592a252b 6673 /* PREFIX_VEX_0F3A5C */
922d8de8 6674 {
592d1631
L
6675 { Bad_Opcode },
6676 { Bad_Opcode },
bf890a93 6677 { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6678 },
6679
592a252b 6680 /* PREFIX_VEX_0F3A5D */
922d8de8 6681 {
592d1631
L
6682 { Bad_Opcode },
6683 { Bad_Opcode },
bf890a93 6684 { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6685 },
6686
592a252b 6687 /* PREFIX_VEX_0F3A5E */
922d8de8 6688 {
592d1631
L
6689 { Bad_Opcode },
6690 { Bad_Opcode },
bf890a93 6691 { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6692 },
6693
592a252b 6694 /* PREFIX_VEX_0F3A5F */
922d8de8 6695 {
592d1631
L
6696 { Bad_Opcode },
6697 { Bad_Opcode },
bf890a93 6698 { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6699 },
6700
592a252b 6701 /* PREFIX_VEX_0F3A60 */
c0f3af97 6702 {
592d1631
L
6703 { Bad_Opcode },
6704 { Bad_Opcode },
592a252b 6705 { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2) },
592d1631 6706 { Bad_Opcode },
c0f3af97
L
6707 },
6708
592a252b 6709 /* PREFIX_VEX_0F3A61 */
c0f3af97 6710 {
592d1631
L
6711 { Bad_Opcode },
6712 { Bad_Opcode },
592a252b 6713 { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2) },
c0f3af97
L
6714 },
6715
592a252b 6716 /* PREFIX_VEX_0F3A62 */
c0f3af97 6717 {
592d1631
L
6718 { Bad_Opcode },
6719 { Bad_Opcode },
592a252b 6720 { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2) },
c0f3af97
L
6721 },
6722
592a252b 6723 /* PREFIX_VEX_0F3A63 */
c0f3af97 6724 {
592d1631
L
6725 { Bad_Opcode },
6726 { Bad_Opcode },
592a252b 6727 { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2) },
c0f3af97 6728 },
a5ff0eb2 6729
592a252b 6730 /* PREFIX_VEX_0F3A68 */
922d8de8 6731 {
592d1631
L
6732 { Bad_Opcode },
6733 { Bad_Opcode },
bf890a93 6734 { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6735 },
6736
592a252b 6737 /* PREFIX_VEX_0F3A69 */
922d8de8 6738 {
592d1631
L
6739 { Bad_Opcode },
6740 { Bad_Opcode },
bf890a93 6741 { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6742 },
6743
592a252b 6744 /* PREFIX_VEX_0F3A6A */
922d8de8 6745 {
592d1631
L
6746 { Bad_Opcode },
6747 { Bad_Opcode },
592a252b 6748 { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2) },
922d8de8
DR
6749 },
6750
592a252b 6751 /* PREFIX_VEX_0F3A6B */
922d8de8 6752 {
592d1631
L
6753 { Bad_Opcode },
6754 { Bad_Opcode },
592a252b 6755 { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2) },
922d8de8
DR
6756 },
6757
592a252b 6758 /* PREFIX_VEX_0F3A6C */
922d8de8 6759 {
592d1631
L
6760 { Bad_Opcode },
6761 { Bad_Opcode },
bf890a93 6762 { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6763 },
6764
592a252b 6765 /* PREFIX_VEX_0F3A6D */
922d8de8 6766 {
592d1631
L
6767 { Bad_Opcode },
6768 { Bad_Opcode },
bf890a93 6769 { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6770 },
6771
592a252b 6772 /* PREFIX_VEX_0F3A6E */
922d8de8 6773 {
592d1631
L
6774 { Bad_Opcode },
6775 { Bad_Opcode },
592a252b 6776 { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2) },
922d8de8
DR
6777 },
6778
592a252b 6779 /* PREFIX_VEX_0F3A6F */
922d8de8 6780 {
592d1631
L
6781 { Bad_Opcode },
6782 { Bad_Opcode },
592a252b 6783 { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2) },
922d8de8
DR
6784 },
6785
592a252b 6786 /* PREFIX_VEX_0F3A78 */
922d8de8 6787 {
592d1631
L
6788 { Bad_Opcode },
6789 { Bad_Opcode },
bf890a93 6790 { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6791 },
6792
592a252b 6793 /* PREFIX_VEX_0F3A79 */
922d8de8 6794 {
592d1631
L
6795 { Bad_Opcode },
6796 { Bad_Opcode },
bf890a93 6797 { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6798 },
6799
592a252b 6800 /* PREFIX_VEX_0F3A7A */
922d8de8 6801 {
592d1631
L
6802 { Bad_Opcode },
6803 { Bad_Opcode },
592a252b 6804 { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2) },
922d8de8
DR
6805 },
6806
592a252b 6807 /* PREFIX_VEX_0F3A7B */
922d8de8 6808 {
592d1631
L
6809 { Bad_Opcode },
6810 { Bad_Opcode },
592a252b 6811 { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2) },
922d8de8
DR
6812 },
6813
592a252b 6814 /* PREFIX_VEX_0F3A7C */
922d8de8 6815 {
592d1631
L
6816 { Bad_Opcode },
6817 { Bad_Opcode },
bf890a93 6818 { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
592d1631 6819 { Bad_Opcode },
922d8de8
DR
6820 },
6821
592a252b 6822 /* PREFIX_VEX_0F3A7D */
922d8de8 6823 {
592d1631
L
6824 { Bad_Opcode },
6825 { Bad_Opcode },
bf890a93 6826 { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
922d8de8
DR
6827 },
6828
592a252b 6829 /* PREFIX_VEX_0F3A7E */
922d8de8 6830 {
592d1631
L
6831 { Bad_Opcode },
6832 { Bad_Opcode },
592a252b 6833 { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2) },
922d8de8
DR
6834 },
6835
592a252b 6836 /* PREFIX_VEX_0F3A7F */
922d8de8 6837 {
592d1631
L
6838 { Bad_Opcode },
6839 { Bad_Opcode },
592a252b 6840 { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2) },
922d8de8
DR
6841 },
6842
592a252b 6843 /* PREFIX_VEX_0F3ADF */
a5ff0eb2 6844 {
592d1631
L
6845 { Bad_Opcode },
6846 { Bad_Opcode },
592a252b 6847 { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2) },
a5ff0eb2 6848 },
6c30d220
L
6849
6850 /* PREFIX_VEX_0F3AF0 */
6851 {
6852 { Bad_Opcode },
6853 { Bad_Opcode },
6854 { Bad_Opcode },
6855 { VEX_LEN_TABLE (VEX_LEN_0F3AF0_P_3) },
6856 },
43234a1e
L
6857
6858#define NEED_PREFIX_TABLE
6859#include "i386-dis-evex.h"
6860#undef NEED_PREFIX_TABLE
c0f3af97
L
6861};
6862
6863static const struct dis386 x86_64_table[][2] = {
6864 /* X86_64_06 */
6865 {
bf890a93 6866 { "pushP", { es }, 0 },
c0f3af97
L
6867 },
6868
6869 /* X86_64_07 */
6870 {
bf890a93 6871 { "popP", { es }, 0 },
c0f3af97
L
6872 },
6873
6874 /* X86_64_0D */
6875 {
bf890a93 6876 { "pushP", { cs }, 0 },
c0f3af97
L
6877 },
6878
6879 /* X86_64_16 */
6880 {
bf890a93 6881 { "pushP", { ss }, 0 },
c0f3af97
L
6882 },
6883
6884 /* X86_64_17 */
6885 {
bf890a93 6886 { "popP", { ss }, 0 },
c0f3af97
L
6887 },
6888
6889 /* X86_64_1E */
6890 {
bf890a93 6891 { "pushP", { ds }, 0 },
c0f3af97
L
6892 },
6893
6894 /* X86_64_1F */
6895 {
bf890a93 6896 { "popP", { ds }, 0 },
c0f3af97
L
6897 },
6898
6899 /* X86_64_27 */
6900 {
bf890a93 6901 { "daa", { XX }, 0 },
c0f3af97
L
6902 },
6903
6904 /* X86_64_2F */
6905 {
bf890a93 6906 { "das", { XX }, 0 },
c0f3af97
L
6907 },
6908
6909 /* X86_64_37 */
6910 {
bf890a93 6911 { "aaa", { XX }, 0 },
c0f3af97
L
6912 },
6913
6914 /* X86_64_3F */
6915 {
bf890a93 6916 { "aas", { XX }, 0 },
c0f3af97
L
6917 },
6918
6919 /* X86_64_60 */
6920 {
bf890a93 6921 { "pushaP", { XX }, 0 },
c0f3af97
L
6922 },
6923
6924 /* X86_64_61 */
6925 {
bf890a93 6926 { "popaP", { XX }, 0 },
c0f3af97
L
6927 },
6928
6929 /* X86_64_62 */
6930 {
6931 { MOD_TABLE (MOD_62_32BIT) },
43234a1e 6932 { EVEX_TABLE (EVEX_0F) },
c0f3af97
L
6933 },
6934
6935 /* X86_64_63 */
6936 {
bf890a93
IT
6937 { "arpl", { Ew, Gw }, 0 },
6938 { "movs{lq|xd}", { Gv, Ed }, 0 },
c0f3af97
L
6939 },
6940
6941 /* X86_64_6D */
6942 {
bf890a93
IT
6943 { "ins{R|}", { Yzr, indirDX }, 0 },
6944 { "ins{G|}", { Yzr, indirDX }, 0 },
c0f3af97
L
6945 },
6946
6947 /* X86_64_6F */
6948 {
bf890a93
IT
6949 { "outs{R|}", { indirDXr, Xz }, 0 },
6950 { "outs{G|}", { indirDXr, Xz }, 0 },
c0f3af97
L
6951 },
6952
d039fef3 6953 /* X86_64_82 */
8b89fe14 6954 {
d039fef3
L
6955 /* Opcode 0x82 is an alias of of opcode 0x80 in 32-bit mode. */
6956 { REG_TABLE (REG_80) },
8b89fe14
L
6957 },
6958
c0f3af97
L
6959 /* X86_64_9A */
6960 {
bf890a93 6961 { "Jcall{T|}", { Ap }, 0 },
c0f3af97
L
6962 },
6963
6964 /* X86_64_C4 */
6965 {
6966 { MOD_TABLE (MOD_C4_32BIT) },
6967 { VEX_C4_TABLE (VEX_0F) },
6968 },
6969
6970 /* X86_64_C5 */
6971 {
6972 { MOD_TABLE (MOD_C5_32BIT) },
6973 { VEX_C5_TABLE (VEX_0F) },
6974 },
6975
6976 /* X86_64_CE */
6977 {
bf890a93 6978 { "into", { XX }, 0 },
c0f3af97
L
6979 },
6980
6981 /* X86_64_D4 */
6982 {
bf890a93 6983 { "aam", { Ib }, 0 },
c0f3af97
L
6984 },
6985
6986 /* X86_64_D5 */
6987 {
bf890a93 6988 { "aad", { Ib }, 0 },
c0f3af97
L
6989 },
6990
a72d2af2
L
6991 /* X86_64_E8 */
6992 {
6993 { "callP", { Jv, BND }, 0 },
5db04b09 6994 { "call@", { Jv, BND }, 0 }
a72d2af2
L
6995 },
6996
6997 /* X86_64_E9 */
6998 {
6999 { "jmpP", { Jv, BND }, 0 },
5db04b09 7000 { "jmp@", { Jv, BND }, 0 }
a72d2af2
L
7001 },
7002
c0f3af97
L
7003 /* X86_64_EA */
7004 {
bf890a93 7005 { "Jjmp{T|}", { Ap }, 0 },
c0f3af97
L
7006 },
7007
7008 /* X86_64_0F01_REG_0 */
7009 {
bf890a93
IT
7010 { "sgdt{Q|IQ}", { M }, 0 },
7011 { "sgdt", { M }, 0 },
c0f3af97
L
7012 },
7013
7014 /* X86_64_0F01_REG_1 */
7015 {
bf890a93
IT
7016 { "sidt{Q|IQ}", { M }, 0 },
7017 { "sidt", { M }, 0 },
c0f3af97
L
7018 },
7019
7020 /* X86_64_0F01_REG_2 */
7021 {
bf890a93
IT
7022 { "lgdt{Q|Q}", { M }, 0 },
7023 { "lgdt", { M }, 0 },
c0f3af97
L
7024 },
7025
7026 /* X86_64_0F01_REG_3 */
7027 {
bf890a93
IT
7028 { "lidt{Q|Q}", { M }, 0 },
7029 { "lidt", { M }, 0 },
c0f3af97
L
7030 },
7031};
7032
7033static const struct dis386 three_byte_table[][256] = {
c1e679ec
DR
7034
7035 /* THREE_BYTE_0F38 */
c0f3af97
L
7036 {
7037 /* 00 */
507bd325
L
7038 { "pshufb", { MX, EM }, PREFIX_OPCODE },
7039 { "phaddw", { MX, EM }, PREFIX_OPCODE },
7040 { "phaddd", { MX, EM }, PREFIX_OPCODE },
7041 { "phaddsw", { MX, EM }, PREFIX_OPCODE },
7042 { "pmaddubsw", { MX, EM }, PREFIX_OPCODE },
7043 { "phsubw", { MX, EM }, PREFIX_OPCODE },
7044 { "phsubd", { MX, EM }, PREFIX_OPCODE },
7045 { "phsubsw", { MX, EM }, PREFIX_OPCODE },
c0f3af97 7046 /* 08 */
507bd325
L
7047 { "psignb", { MX, EM }, PREFIX_OPCODE },
7048 { "psignw", { MX, EM }, PREFIX_OPCODE },
7049 { "psignd", { MX, EM }, PREFIX_OPCODE },
7050 { "pmulhrsw", { MX, EM }, PREFIX_OPCODE },
592d1631
L
7051 { Bad_Opcode },
7052 { Bad_Opcode },
7053 { Bad_Opcode },
7054 { Bad_Opcode },
f88c9eb0
SP
7055 /* 10 */
7056 { PREFIX_TABLE (PREFIX_0F3810) },
592d1631
L
7057 { Bad_Opcode },
7058 { Bad_Opcode },
7059 { Bad_Opcode },
f88c9eb0
SP
7060 { PREFIX_TABLE (PREFIX_0F3814) },
7061 { PREFIX_TABLE (PREFIX_0F3815) },
592d1631 7062 { Bad_Opcode },
f88c9eb0
SP
7063 { PREFIX_TABLE (PREFIX_0F3817) },
7064 /* 18 */
592d1631
L
7065 { Bad_Opcode },
7066 { Bad_Opcode },
7067 { Bad_Opcode },
7068 { Bad_Opcode },
507bd325
L
7069 { "pabsb", { MX, EM }, PREFIX_OPCODE },
7070 { "pabsw", { MX, EM }, PREFIX_OPCODE },
7071 { "pabsd", { MX, EM }, PREFIX_OPCODE },
592d1631 7072 { Bad_Opcode },
f88c9eb0
SP
7073 /* 20 */
7074 { PREFIX_TABLE (PREFIX_0F3820) },
7075 { PREFIX_TABLE (PREFIX_0F3821) },
7076 { PREFIX_TABLE (PREFIX_0F3822) },
7077 { PREFIX_TABLE (PREFIX_0F3823) },
7078 { PREFIX_TABLE (PREFIX_0F3824) },
7079 { PREFIX_TABLE (PREFIX_0F3825) },
592d1631
L
7080 { Bad_Opcode },
7081 { Bad_Opcode },
f88c9eb0
SP
7082 /* 28 */
7083 { PREFIX_TABLE (PREFIX_0F3828) },
7084 { PREFIX_TABLE (PREFIX_0F3829) },
7085 { PREFIX_TABLE (PREFIX_0F382A) },
7086 { PREFIX_TABLE (PREFIX_0F382B) },
592d1631
L
7087 { Bad_Opcode },
7088 { Bad_Opcode },
7089 { Bad_Opcode },
7090 { Bad_Opcode },
f88c9eb0
SP
7091 /* 30 */
7092 { PREFIX_TABLE (PREFIX_0F3830) },
7093 { PREFIX_TABLE (PREFIX_0F3831) },
7094 { PREFIX_TABLE (PREFIX_0F3832) },
7095 { PREFIX_TABLE (PREFIX_0F3833) },
7096 { PREFIX_TABLE (PREFIX_0F3834) },
7097 { PREFIX_TABLE (PREFIX_0F3835) },
592d1631 7098 { Bad_Opcode },
f88c9eb0
SP
7099 { PREFIX_TABLE (PREFIX_0F3837) },
7100 /* 38 */
7101 { PREFIX_TABLE (PREFIX_0F3838) },
7102 { PREFIX_TABLE (PREFIX_0F3839) },
7103 { PREFIX_TABLE (PREFIX_0F383A) },
7104 { PREFIX_TABLE (PREFIX_0F383B) },
7105 { PREFIX_TABLE (PREFIX_0F383C) },
7106 { PREFIX_TABLE (PREFIX_0F383D) },
7107 { PREFIX_TABLE (PREFIX_0F383E) },
7108 { PREFIX_TABLE (PREFIX_0F383F) },
7109 /* 40 */
7110 { PREFIX_TABLE (PREFIX_0F3840) },
7111 { PREFIX_TABLE (PREFIX_0F3841) },
592d1631
L
7112 { Bad_Opcode },
7113 { Bad_Opcode },
7114 { Bad_Opcode },
7115 { Bad_Opcode },
7116 { Bad_Opcode },
7117 { Bad_Opcode },
f88c9eb0 7118 /* 48 */
592d1631
L
7119 { Bad_Opcode },
7120 { Bad_Opcode },
7121 { Bad_Opcode },
7122 { Bad_Opcode },
7123 { Bad_Opcode },
7124 { Bad_Opcode },
7125 { Bad_Opcode },
7126 { Bad_Opcode },
f88c9eb0 7127 /* 50 */
592d1631
L
7128 { Bad_Opcode },
7129 { Bad_Opcode },
7130 { Bad_Opcode },
7131 { Bad_Opcode },
7132 { Bad_Opcode },
7133 { Bad_Opcode },
7134 { Bad_Opcode },
7135 { Bad_Opcode },
f88c9eb0 7136 /* 58 */
592d1631
L
7137 { Bad_Opcode },
7138 { Bad_Opcode },
7139 { Bad_Opcode },
7140 { Bad_Opcode },
7141 { Bad_Opcode },
7142 { Bad_Opcode },
7143 { Bad_Opcode },
7144 { Bad_Opcode },
f88c9eb0 7145 /* 60 */
592d1631
L
7146 { Bad_Opcode },
7147 { Bad_Opcode },
7148 { Bad_Opcode },
7149 { Bad_Opcode },
7150 { Bad_Opcode },
7151 { Bad_Opcode },
7152 { Bad_Opcode },
7153 { Bad_Opcode },
f88c9eb0 7154 /* 68 */
592d1631
L
7155 { Bad_Opcode },
7156 { Bad_Opcode },
7157 { Bad_Opcode },
7158 { Bad_Opcode },
7159 { Bad_Opcode },
7160 { Bad_Opcode },
7161 { Bad_Opcode },
7162 { Bad_Opcode },
f88c9eb0 7163 /* 70 */
592d1631
L
7164 { Bad_Opcode },
7165 { Bad_Opcode },
7166 { Bad_Opcode },
7167 { Bad_Opcode },
7168 { Bad_Opcode },
7169 { Bad_Opcode },
7170 { Bad_Opcode },
7171 { Bad_Opcode },
f88c9eb0 7172 /* 78 */
592d1631
L
7173 { Bad_Opcode },
7174 { Bad_Opcode },
7175 { Bad_Opcode },
7176 { Bad_Opcode },
7177 { Bad_Opcode },
7178 { Bad_Opcode },
7179 { Bad_Opcode },
7180 { Bad_Opcode },
f88c9eb0
SP
7181 /* 80 */
7182 { PREFIX_TABLE (PREFIX_0F3880) },
7183 { PREFIX_TABLE (PREFIX_0F3881) },
6c30d220 7184 { PREFIX_TABLE (PREFIX_0F3882) },
592d1631
L
7185 { Bad_Opcode },
7186 { Bad_Opcode },
7187 { Bad_Opcode },
7188 { Bad_Opcode },
7189 { Bad_Opcode },
f88c9eb0 7190 /* 88 */
592d1631
L
7191 { Bad_Opcode },
7192 { Bad_Opcode },
7193 { Bad_Opcode },
7194 { Bad_Opcode },
7195 { Bad_Opcode },
7196 { Bad_Opcode },
7197 { Bad_Opcode },
7198 { Bad_Opcode },
f88c9eb0 7199 /* 90 */
592d1631
L
7200 { Bad_Opcode },
7201 { Bad_Opcode },
7202 { Bad_Opcode },
7203 { Bad_Opcode },
7204 { Bad_Opcode },
7205 { Bad_Opcode },
7206 { Bad_Opcode },
7207 { Bad_Opcode },
f88c9eb0 7208 /* 98 */
592d1631
L
7209 { Bad_Opcode },
7210 { Bad_Opcode },
7211 { Bad_Opcode },
7212 { Bad_Opcode },
7213 { Bad_Opcode },
7214 { Bad_Opcode },
7215 { Bad_Opcode },
7216 { Bad_Opcode },
f88c9eb0 7217 /* a0 */
592d1631
L
7218 { Bad_Opcode },
7219 { Bad_Opcode },
7220 { Bad_Opcode },
7221 { Bad_Opcode },
7222 { Bad_Opcode },
7223 { Bad_Opcode },
7224 { Bad_Opcode },
7225 { Bad_Opcode },
f88c9eb0 7226 /* a8 */
592d1631
L
7227 { Bad_Opcode },
7228 { Bad_Opcode },
7229 { Bad_Opcode },
7230 { Bad_Opcode },
7231 { Bad_Opcode },
7232 { Bad_Opcode },
7233 { Bad_Opcode },
7234 { Bad_Opcode },
f88c9eb0 7235 /* b0 */
592d1631
L
7236 { Bad_Opcode },
7237 { Bad_Opcode },
7238 { Bad_Opcode },
7239 { Bad_Opcode },
7240 { Bad_Opcode },
7241 { Bad_Opcode },
7242 { Bad_Opcode },
7243 { Bad_Opcode },
f88c9eb0 7244 /* b8 */
592d1631
L
7245 { Bad_Opcode },
7246 { Bad_Opcode },
7247 { Bad_Opcode },
7248 { Bad_Opcode },
7249 { Bad_Opcode },
7250 { Bad_Opcode },
7251 { Bad_Opcode },
7252 { Bad_Opcode },
f88c9eb0 7253 /* c0 */
592d1631
L
7254 { Bad_Opcode },
7255 { Bad_Opcode },
7256 { Bad_Opcode },
7257 { Bad_Opcode },
7258 { Bad_Opcode },
7259 { Bad_Opcode },
7260 { Bad_Opcode },
7261 { Bad_Opcode },
f88c9eb0 7262 /* c8 */
a0046408
L
7263 { PREFIX_TABLE (PREFIX_0F38C8) },
7264 { PREFIX_TABLE (PREFIX_0F38C9) },
7265 { PREFIX_TABLE (PREFIX_0F38CA) },
7266 { PREFIX_TABLE (PREFIX_0F38CB) },
7267 { PREFIX_TABLE (PREFIX_0F38CC) },
7268 { PREFIX_TABLE (PREFIX_0F38CD) },
592d1631
L
7269 { Bad_Opcode },
7270 { Bad_Opcode },
f88c9eb0 7271 /* d0 */
592d1631
L
7272 { Bad_Opcode },
7273 { Bad_Opcode },
7274 { Bad_Opcode },
7275 { Bad_Opcode },
7276 { Bad_Opcode },
7277 { Bad_Opcode },
7278 { Bad_Opcode },
7279 { Bad_Opcode },
f88c9eb0 7280 /* d8 */
592d1631
L
7281 { Bad_Opcode },
7282 { Bad_Opcode },
7283 { Bad_Opcode },
f88c9eb0
SP
7284 { PREFIX_TABLE (PREFIX_0F38DB) },
7285 { PREFIX_TABLE (PREFIX_0F38DC) },
7286 { PREFIX_TABLE (PREFIX_0F38DD) },
7287 { PREFIX_TABLE (PREFIX_0F38DE) },
7288 { PREFIX_TABLE (PREFIX_0F38DF) },
7289 /* e0 */
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 7298 /* e8 */
592d1631
L
7299 { Bad_Opcode },
7300 { Bad_Opcode },
7301 { Bad_Opcode },
7302 { Bad_Opcode },
7303 { Bad_Opcode },
7304 { Bad_Opcode },
7305 { Bad_Opcode },
7306 { Bad_Opcode },
f88c9eb0
SP
7307 /* f0 */
7308 { PREFIX_TABLE (PREFIX_0F38F0) },
7309 { PREFIX_TABLE (PREFIX_0F38F1) },
592d1631
L
7310 { Bad_Opcode },
7311 { Bad_Opcode },
7312 { Bad_Opcode },
603555e5 7313 { PREFIX_TABLE (PREFIX_0F38F5) },
e2e1fcde 7314 { PREFIX_TABLE (PREFIX_0F38F6) },
592d1631 7315 { Bad_Opcode },
f88c9eb0 7316 /* f8 */
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
SP
7325 },
7326 /* THREE_BYTE_0F3A */
7327 {
7328 /* 00 */
592d1631
L
7329 { Bad_Opcode },
7330 { Bad_Opcode },
7331 { Bad_Opcode },
7332 { Bad_Opcode },
7333 { Bad_Opcode },
7334 { Bad_Opcode },
7335 { Bad_Opcode },
7336 { Bad_Opcode },
f88c9eb0
SP
7337 /* 08 */
7338 { PREFIX_TABLE (PREFIX_0F3A08) },
7339 { PREFIX_TABLE (PREFIX_0F3A09) },
7340 { PREFIX_TABLE (PREFIX_0F3A0A) },
7341 { PREFIX_TABLE (PREFIX_0F3A0B) },
7342 { PREFIX_TABLE (PREFIX_0F3A0C) },
7343 { PREFIX_TABLE (PREFIX_0F3A0D) },
7344 { PREFIX_TABLE (PREFIX_0F3A0E) },
507bd325 7345 { "palignr", { MX, EM, Ib }, PREFIX_OPCODE },
f88c9eb0 7346 /* 10 */
592d1631
L
7347 { Bad_Opcode },
7348 { Bad_Opcode },
7349 { Bad_Opcode },
7350 { Bad_Opcode },
f88c9eb0
SP
7351 { PREFIX_TABLE (PREFIX_0F3A14) },
7352 { PREFIX_TABLE (PREFIX_0F3A15) },
7353 { PREFIX_TABLE (PREFIX_0F3A16) },
7354 { PREFIX_TABLE (PREFIX_0F3A17) },
7355 /* 18 */
592d1631
L
7356 { Bad_Opcode },
7357 { Bad_Opcode },
7358 { Bad_Opcode },
7359 { Bad_Opcode },
7360 { Bad_Opcode },
7361 { Bad_Opcode },
7362 { Bad_Opcode },
7363 { Bad_Opcode },
f88c9eb0
SP
7364 /* 20 */
7365 { PREFIX_TABLE (PREFIX_0F3A20) },
7366 { PREFIX_TABLE (PREFIX_0F3A21) },
7367 { PREFIX_TABLE (PREFIX_0F3A22) },
592d1631
L
7368 { Bad_Opcode },
7369 { Bad_Opcode },
7370 { Bad_Opcode },
7371 { Bad_Opcode },
7372 { Bad_Opcode },
f88c9eb0 7373 /* 28 */
592d1631
L
7374 { Bad_Opcode },
7375 { Bad_Opcode },
7376 { Bad_Opcode },
7377 { Bad_Opcode },
7378 { Bad_Opcode },
7379 { Bad_Opcode },
7380 { Bad_Opcode },
7381 { Bad_Opcode },
f88c9eb0 7382 /* 30 */
592d1631
L
7383 { Bad_Opcode },
7384 { Bad_Opcode },
7385 { Bad_Opcode },
7386 { Bad_Opcode },
7387 { Bad_Opcode },
7388 { Bad_Opcode },
7389 { Bad_Opcode },
7390 { Bad_Opcode },
f88c9eb0 7391 /* 38 */
592d1631
L
7392 { Bad_Opcode },
7393 { Bad_Opcode },
7394 { Bad_Opcode },
7395 { Bad_Opcode },
7396 { Bad_Opcode },
7397 { Bad_Opcode },
7398 { Bad_Opcode },
7399 { Bad_Opcode },
f88c9eb0
SP
7400 /* 40 */
7401 { PREFIX_TABLE (PREFIX_0F3A40) },
7402 { PREFIX_TABLE (PREFIX_0F3A41) },
7403 { PREFIX_TABLE (PREFIX_0F3A42) },
592d1631 7404 { Bad_Opcode },
f88c9eb0 7405 { PREFIX_TABLE (PREFIX_0F3A44) },
592d1631
L
7406 { Bad_Opcode },
7407 { Bad_Opcode },
7408 { Bad_Opcode },
f88c9eb0 7409 /* 48 */
592d1631
L
7410 { Bad_Opcode },
7411 { Bad_Opcode },
7412 { Bad_Opcode },
7413 { Bad_Opcode },
7414 { Bad_Opcode },
7415 { Bad_Opcode },
7416 { Bad_Opcode },
7417 { Bad_Opcode },
f88c9eb0 7418 /* 50 */
592d1631
L
7419 { Bad_Opcode },
7420 { Bad_Opcode },
7421 { Bad_Opcode },
7422 { Bad_Opcode },
7423 { Bad_Opcode },
7424 { Bad_Opcode },
7425 { Bad_Opcode },
7426 { Bad_Opcode },
f88c9eb0 7427 /* 58 */
592d1631
L
7428 { Bad_Opcode },
7429 { Bad_Opcode },
7430 { Bad_Opcode },
7431 { Bad_Opcode },
7432 { Bad_Opcode },
7433 { Bad_Opcode },
7434 { Bad_Opcode },
7435 { Bad_Opcode },
f88c9eb0
SP
7436 /* 60 */
7437 { PREFIX_TABLE (PREFIX_0F3A60) },
7438 { PREFIX_TABLE (PREFIX_0F3A61) },
7439 { PREFIX_TABLE (PREFIX_0F3A62) },
7440 { PREFIX_TABLE (PREFIX_0F3A63) },
592d1631
L
7441 { Bad_Opcode },
7442 { Bad_Opcode },
7443 { Bad_Opcode },
7444 { Bad_Opcode },
f88c9eb0 7445 /* 68 */
592d1631
L
7446 { Bad_Opcode },
7447 { Bad_Opcode },
7448 { Bad_Opcode },
7449 { Bad_Opcode },
7450 { Bad_Opcode },
7451 { Bad_Opcode },
7452 { Bad_Opcode },
7453 { Bad_Opcode },
f88c9eb0 7454 /* 70 */
592d1631
L
7455 { Bad_Opcode },
7456 { Bad_Opcode },
7457 { Bad_Opcode },
7458 { Bad_Opcode },
7459 { Bad_Opcode },
7460 { Bad_Opcode },
7461 { Bad_Opcode },
7462 { Bad_Opcode },
f88c9eb0 7463 /* 78 */
592d1631
L
7464 { Bad_Opcode },
7465 { Bad_Opcode },
7466 { Bad_Opcode },
7467 { Bad_Opcode },
7468 { Bad_Opcode },
7469 { Bad_Opcode },
7470 { Bad_Opcode },
7471 { Bad_Opcode },
f88c9eb0 7472 /* 80 */
592d1631
L
7473 { Bad_Opcode },
7474 { Bad_Opcode },
7475 { Bad_Opcode },
7476 { Bad_Opcode },
7477 { Bad_Opcode },
7478 { Bad_Opcode },
7479 { Bad_Opcode },
7480 { Bad_Opcode },
f88c9eb0 7481 /* 88 */
592d1631
L
7482 { Bad_Opcode },
7483 { Bad_Opcode },
7484 { Bad_Opcode },
7485 { Bad_Opcode },
7486 { Bad_Opcode },
7487 { Bad_Opcode },
7488 { Bad_Opcode },
7489 { Bad_Opcode },
f88c9eb0 7490 /* 90 */
592d1631
L
7491 { Bad_Opcode },
7492 { Bad_Opcode },
7493 { Bad_Opcode },
7494 { Bad_Opcode },
7495 { Bad_Opcode },
7496 { Bad_Opcode },
7497 { Bad_Opcode },
7498 { Bad_Opcode },
f88c9eb0 7499 /* 98 */
592d1631
L
7500 { Bad_Opcode },
7501 { Bad_Opcode },
7502 { Bad_Opcode },
7503 { Bad_Opcode },
7504 { Bad_Opcode },
7505 { Bad_Opcode },
7506 { Bad_Opcode },
7507 { Bad_Opcode },
f88c9eb0 7508 /* a0 */
592d1631
L
7509 { Bad_Opcode },
7510 { Bad_Opcode },
7511 { Bad_Opcode },
7512 { Bad_Opcode },
7513 { Bad_Opcode },
7514 { Bad_Opcode },
7515 { Bad_Opcode },
7516 { Bad_Opcode },
f88c9eb0 7517 /* a8 */
592d1631
L
7518 { Bad_Opcode },
7519 { Bad_Opcode },
7520 { Bad_Opcode },
7521 { Bad_Opcode },
7522 { Bad_Opcode },
7523 { Bad_Opcode },
7524 { Bad_Opcode },
7525 { Bad_Opcode },
f88c9eb0 7526 /* b0 */
592d1631
L
7527 { Bad_Opcode },
7528 { Bad_Opcode },
7529 { Bad_Opcode },
7530 { Bad_Opcode },
7531 { Bad_Opcode },
7532 { Bad_Opcode },
7533 { Bad_Opcode },
7534 { Bad_Opcode },
f88c9eb0 7535 /* b8 */
592d1631
L
7536 { Bad_Opcode },
7537 { Bad_Opcode },
7538 { Bad_Opcode },
7539 { Bad_Opcode },
7540 { Bad_Opcode },
7541 { Bad_Opcode },
7542 { Bad_Opcode },
7543 { Bad_Opcode },
f88c9eb0 7544 /* c0 */
592d1631
L
7545 { Bad_Opcode },
7546 { Bad_Opcode },
7547 { Bad_Opcode },
7548 { Bad_Opcode },
7549 { Bad_Opcode },
7550 { Bad_Opcode },
7551 { Bad_Opcode },
7552 { Bad_Opcode },
f88c9eb0 7553 /* c8 */
592d1631
L
7554 { Bad_Opcode },
7555 { Bad_Opcode },
7556 { Bad_Opcode },
7557 { Bad_Opcode },
a0046408 7558 { PREFIX_TABLE (PREFIX_0F3ACC) },
592d1631
L
7559 { Bad_Opcode },
7560 { Bad_Opcode },
7561 { Bad_Opcode },
f88c9eb0 7562 /* d0 */
592d1631
L
7563 { Bad_Opcode },
7564 { Bad_Opcode },
7565 { Bad_Opcode },
7566 { Bad_Opcode },
7567 { Bad_Opcode },
7568 { Bad_Opcode },
7569 { Bad_Opcode },
7570 { Bad_Opcode },
f88c9eb0 7571 /* d8 */
592d1631
L
7572 { Bad_Opcode },
7573 { Bad_Opcode },
7574 { Bad_Opcode },
7575 { Bad_Opcode },
7576 { Bad_Opcode },
7577 { Bad_Opcode },
7578 { Bad_Opcode },
f88c9eb0
SP
7579 { PREFIX_TABLE (PREFIX_0F3ADF) },
7580 /* e0 */
592d1631
L
7581 { Bad_Opcode },
7582 { Bad_Opcode },
7583 { Bad_Opcode },
7584 { Bad_Opcode },
7585 { Bad_Opcode },
592d1631
L
7586 { Bad_Opcode },
7587 { Bad_Opcode },
7588 { Bad_Opcode },
85f10a01 7589 /* e8 */
592d1631
L
7590 { Bad_Opcode },
7591 { Bad_Opcode },
7592 { Bad_Opcode },
7593 { Bad_Opcode },
7594 { Bad_Opcode },
7595 { Bad_Opcode },
7596 { Bad_Opcode },
7597 { Bad_Opcode },
85f10a01 7598 /* f0 */
592d1631
L
7599 { Bad_Opcode },
7600 { Bad_Opcode },
7601 { Bad_Opcode },
7602 { Bad_Opcode },
7603 { Bad_Opcode },
7604 { Bad_Opcode },
7605 { Bad_Opcode },
7606 { Bad_Opcode },
85f10a01 7607 /* f8 */
592d1631
L
7608 { Bad_Opcode },
7609 { Bad_Opcode },
7610 { Bad_Opcode },
7611 { Bad_Opcode },
7612 { Bad_Opcode },
7613 { Bad_Opcode },
7614 { Bad_Opcode },
7615 { Bad_Opcode },
85f10a01 7616 },
f88c9eb0
SP
7617};
7618
7619static const struct dis386 xop_table[][256] = {
5dd85c99 7620 /* XOP_08 */
85f10a01
MM
7621 {
7622 /* 00 */
592d1631
L
7623 { Bad_Opcode },
7624 { Bad_Opcode },
7625 { Bad_Opcode },
7626 { Bad_Opcode },
7627 { Bad_Opcode },
7628 { Bad_Opcode },
7629 { Bad_Opcode },
7630 { Bad_Opcode },
85f10a01 7631 /* 08 */
592d1631
L
7632 { Bad_Opcode },
7633 { Bad_Opcode },
7634 { Bad_Opcode },
7635 { Bad_Opcode },
7636 { Bad_Opcode },
7637 { Bad_Opcode },
7638 { Bad_Opcode },
7639 { Bad_Opcode },
85f10a01 7640 /* 10 */
3929df09 7641 { Bad_Opcode },
592d1631
L
7642 { Bad_Opcode },
7643 { Bad_Opcode },
7644 { Bad_Opcode },
7645 { Bad_Opcode },
7646 { Bad_Opcode },
7647 { Bad_Opcode },
7648 { Bad_Opcode },
85f10a01 7649 /* 18 */
592d1631
L
7650 { Bad_Opcode },
7651 { Bad_Opcode },
7652 { Bad_Opcode },
7653 { Bad_Opcode },
7654 { Bad_Opcode },
7655 { Bad_Opcode },
7656 { Bad_Opcode },
7657 { Bad_Opcode },
85f10a01 7658 /* 20 */
592d1631
L
7659 { Bad_Opcode },
7660 { Bad_Opcode },
7661 { Bad_Opcode },
7662 { Bad_Opcode },
7663 { Bad_Opcode },
7664 { Bad_Opcode },
7665 { Bad_Opcode },
7666 { Bad_Opcode },
85f10a01 7667 /* 28 */
592d1631
L
7668 { Bad_Opcode },
7669 { Bad_Opcode },
7670 { Bad_Opcode },
7671 { Bad_Opcode },
7672 { Bad_Opcode },
7673 { Bad_Opcode },
7674 { Bad_Opcode },
7675 { Bad_Opcode },
c0f3af97 7676 /* 30 */
592d1631
L
7677 { Bad_Opcode },
7678 { Bad_Opcode },
7679 { Bad_Opcode },
7680 { Bad_Opcode },
7681 { Bad_Opcode },
7682 { Bad_Opcode },
7683 { Bad_Opcode },
7684 { Bad_Opcode },
c0f3af97 7685 /* 38 */
592d1631
L
7686 { Bad_Opcode },
7687 { Bad_Opcode },
7688 { Bad_Opcode },
7689 { Bad_Opcode },
7690 { Bad_Opcode },
7691 { Bad_Opcode },
7692 { Bad_Opcode },
7693 { Bad_Opcode },
c0f3af97 7694 /* 40 */
592d1631
L
7695 { Bad_Opcode },
7696 { Bad_Opcode },
7697 { Bad_Opcode },
7698 { Bad_Opcode },
7699 { Bad_Opcode },
7700 { Bad_Opcode },
7701 { Bad_Opcode },
7702 { Bad_Opcode },
85f10a01 7703 /* 48 */
592d1631
L
7704 { Bad_Opcode },
7705 { Bad_Opcode },
7706 { Bad_Opcode },
7707 { Bad_Opcode },
7708 { Bad_Opcode },
7709 { Bad_Opcode },
7710 { Bad_Opcode },
7711 { Bad_Opcode },
c0f3af97 7712 /* 50 */
592d1631
L
7713 { Bad_Opcode },
7714 { Bad_Opcode },
7715 { Bad_Opcode },
7716 { Bad_Opcode },
7717 { Bad_Opcode },
7718 { Bad_Opcode },
7719 { Bad_Opcode },
7720 { Bad_Opcode },
85f10a01 7721 /* 58 */
592d1631
L
7722 { Bad_Opcode },
7723 { Bad_Opcode },
7724 { Bad_Opcode },
7725 { Bad_Opcode },
7726 { Bad_Opcode },
7727 { Bad_Opcode },
7728 { Bad_Opcode },
7729 { Bad_Opcode },
c1e679ec 7730 /* 60 */
592d1631
L
7731 { Bad_Opcode },
7732 { Bad_Opcode },
7733 { Bad_Opcode },
7734 { Bad_Opcode },
7735 { Bad_Opcode },
7736 { Bad_Opcode },
7737 { Bad_Opcode },
7738 { Bad_Opcode },
c0f3af97 7739 /* 68 */
592d1631
L
7740 { Bad_Opcode },
7741 { Bad_Opcode },
7742 { Bad_Opcode },
7743 { Bad_Opcode },
7744 { Bad_Opcode },
7745 { Bad_Opcode },
7746 { Bad_Opcode },
7747 { Bad_Opcode },
85f10a01 7748 /* 70 */
592d1631
L
7749 { Bad_Opcode },
7750 { Bad_Opcode },
7751 { Bad_Opcode },
7752 { Bad_Opcode },
7753 { Bad_Opcode },
7754 { Bad_Opcode },
7755 { Bad_Opcode },
7756 { Bad_Opcode },
85f10a01 7757 /* 78 */
592d1631
L
7758 { Bad_Opcode },
7759 { Bad_Opcode },
7760 { Bad_Opcode },
7761 { Bad_Opcode },
7762 { Bad_Opcode },
7763 { Bad_Opcode },
7764 { Bad_Opcode },
7765 { Bad_Opcode },
85f10a01 7766 /* 80 */
592d1631
L
7767 { Bad_Opcode },
7768 { Bad_Opcode },
7769 { Bad_Opcode },
7770 { Bad_Opcode },
7771 { Bad_Opcode },
bf890a93
IT
7772 { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7773 { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7774 { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
5dd85c99 7775 /* 88 */
592d1631
L
7776 { Bad_Opcode },
7777 { Bad_Opcode },
7778 { Bad_Opcode },
7779 { Bad_Opcode },
7780 { Bad_Opcode },
7781 { Bad_Opcode },
bf890a93
IT
7782 { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7783 { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
5dd85c99 7784 /* 90 */
592d1631
L
7785 { Bad_Opcode },
7786 { Bad_Opcode },
7787 { Bad_Opcode },
7788 { Bad_Opcode },
7789 { Bad_Opcode },
bf890a93
IT
7790 { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7791 { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7792 { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
5dd85c99 7793 /* 98 */
592d1631
L
7794 { Bad_Opcode },
7795 { Bad_Opcode },
7796 { Bad_Opcode },
7797 { Bad_Opcode },
7798 { Bad_Opcode },
7799 { Bad_Opcode },
bf890a93
IT
7800 { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7801 { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
5dd85c99 7802 /* a0 */
592d1631
L
7803 { Bad_Opcode },
7804 { Bad_Opcode },
bf890a93
IT
7805 { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
7806 { "vpperm", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
592d1631
L
7807 { Bad_Opcode },
7808 { Bad_Opcode },
bf890a93 7809 { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
592d1631 7810 { Bad_Opcode },
5dd85c99 7811 /* a8 */
592d1631
L
7812 { Bad_Opcode },
7813 { Bad_Opcode },
7814 { Bad_Opcode },
7815 { Bad_Opcode },
7816 { Bad_Opcode },
7817 { Bad_Opcode },
7818 { Bad_Opcode },
7819 { Bad_Opcode },
5dd85c99 7820 /* b0 */
592d1631
L
7821 { Bad_Opcode },
7822 { Bad_Opcode },
7823 { Bad_Opcode },
7824 { Bad_Opcode },
7825 { Bad_Opcode },
7826 { Bad_Opcode },
bf890a93 7827 { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 }, 0 },
592d1631 7828 { Bad_Opcode },
5dd85c99 7829 /* b8 */
592d1631
L
7830 { Bad_Opcode },
7831 { Bad_Opcode },
7832 { Bad_Opcode },
7833 { Bad_Opcode },
7834 { Bad_Opcode },
7835 { Bad_Opcode },
7836 { Bad_Opcode },
7837 { Bad_Opcode },
5dd85c99 7838 /* c0 */
bf890a93
IT
7839 { "vprotb", { XM, Vex_2src_1, Ib }, 0 },
7840 { "vprotw", { XM, Vex_2src_1, Ib }, 0 },
7841 { "vprotd", { XM, Vex_2src_1, Ib }, 0 },
7842 { "vprotq", { XM, Vex_2src_1, Ib }, 0 },
592d1631
L
7843 { Bad_Opcode },
7844 { Bad_Opcode },
7845 { Bad_Opcode },
7846 { Bad_Opcode },
5dd85c99 7847 /* c8 */
592d1631
L
7848 { Bad_Opcode },
7849 { Bad_Opcode },
7850 { Bad_Opcode },
7851 { Bad_Opcode },
ff688e1f
L
7852 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CC) },
7853 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CD) },
7854 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CE) },
7855 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CF) },
5dd85c99 7856 /* d0 */
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 /* d8 */
592d1631
L
7866 { Bad_Opcode },
7867 { Bad_Opcode },
7868 { Bad_Opcode },
7869 { Bad_Opcode },
7870 { Bad_Opcode },
7871 { Bad_Opcode },
7872 { Bad_Opcode },
7873 { Bad_Opcode },
5dd85c99 7874 /* e0 */
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 /* e8 */
592d1631
L
7884 { Bad_Opcode },
7885 { Bad_Opcode },
7886 { Bad_Opcode },
7887 { Bad_Opcode },
ff688e1f
L
7888 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EC) },
7889 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_ED) },
7890 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EE) },
7891 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EF) },
5dd85c99 7892 /* f0 */
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 /* f8 */
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
SP
7910 },
7911 /* XOP_09 */
7912 {
7913 /* 00 */
592d1631 7914 { Bad_Opcode },
2a2a0f38
QN
7915 { REG_TABLE (REG_XOP_TBM_01) },
7916 { REG_TABLE (REG_XOP_TBM_02) },
592d1631
L
7917 { Bad_Opcode },
7918 { Bad_Opcode },
7919 { Bad_Opcode },
7920 { Bad_Opcode },
7921 { Bad_Opcode },
5dd85c99 7922 /* 08 */
592d1631
L
7923 { Bad_Opcode },
7924 { Bad_Opcode },
7925 { Bad_Opcode },
7926 { Bad_Opcode },
7927 { Bad_Opcode },
7928 { Bad_Opcode },
7929 { Bad_Opcode },
7930 { Bad_Opcode },
5dd85c99 7931 /* 10 */
592d1631
L
7932 { Bad_Opcode },
7933 { Bad_Opcode },
5dd85c99 7934 { REG_TABLE (REG_XOP_LWPCB) },
592d1631
L
7935 { Bad_Opcode },
7936 { Bad_Opcode },
7937 { Bad_Opcode },
7938 { Bad_Opcode },
7939 { Bad_Opcode },
5dd85c99 7940 /* 18 */
592d1631
L
7941 { Bad_Opcode },
7942 { Bad_Opcode },
7943 { Bad_Opcode },
7944 { Bad_Opcode },
7945 { Bad_Opcode },
7946 { Bad_Opcode },
7947 { Bad_Opcode },
7948 { Bad_Opcode },
5dd85c99 7949 /* 20 */
592d1631
L
7950 { Bad_Opcode },
7951 { Bad_Opcode },
7952 { Bad_Opcode },
7953 { Bad_Opcode },
7954 { Bad_Opcode },
7955 { Bad_Opcode },
7956 { Bad_Opcode },
7957 { Bad_Opcode },
5dd85c99 7958 /* 28 */
592d1631
L
7959 { Bad_Opcode },
7960 { Bad_Opcode },
7961 { Bad_Opcode },
7962 { Bad_Opcode },
7963 { Bad_Opcode },
7964 { Bad_Opcode },
7965 { Bad_Opcode },
7966 { Bad_Opcode },
5dd85c99 7967 /* 30 */
592d1631
L
7968 { Bad_Opcode },
7969 { Bad_Opcode },
7970 { Bad_Opcode },
7971 { Bad_Opcode },
7972 { Bad_Opcode },
7973 { Bad_Opcode },
7974 { Bad_Opcode },
7975 { Bad_Opcode },
5dd85c99 7976 /* 38 */
592d1631
L
7977 { Bad_Opcode },
7978 { Bad_Opcode },
7979 { Bad_Opcode },
7980 { Bad_Opcode },
7981 { Bad_Opcode },
7982 { Bad_Opcode },
7983 { Bad_Opcode },
7984 { Bad_Opcode },
5dd85c99 7985 /* 40 */
592d1631
L
7986 { Bad_Opcode },
7987 { Bad_Opcode },
7988 { Bad_Opcode },
7989 { Bad_Opcode },
7990 { Bad_Opcode },
7991 { Bad_Opcode },
7992 { Bad_Opcode },
7993 { Bad_Opcode },
5dd85c99 7994 /* 48 */
592d1631
L
7995 { Bad_Opcode },
7996 { Bad_Opcode },
7997 { Bad_Opcode },
7998 { Bad_Opcode },
7999 { Bad_Opcode },
8000 { Bad_Opcode },
8001 { Bad_Opcode },
8002 { Bad_Opcode },
5dd85c99 8003 /* 50 */
592d1631
L
8004 { Bad_Opcode },
8005 { Bad_Opcode },
8006 { Bad_Opcode },
8007 { Bad_Opcode },
8008 { Bad_Opcode },
8009 { Bad_Opcode },
8010 { Bad_Opcode },
8011 { Bad_Opcode },
5dd85c99 8012 /* 58 */
592d1631
L
8013 { Bad_Opcode },
8014 { Bad_Opcode },
8015 { Bad_Opcode },
8016 { Bad_Opcode },
8017 { Bad_Opcode },
8018 { Bad_Opcode },
8019 { Bad_Opcode },
8020 { Bad_Opcode },
5dd85c99 8021 /* 60 */
592d1631
L
8022 { Bad_Opcode },
8023 { Bad_Opcode },
8024 { Bad_Opcode },
8025 { Bad_Opcode },
8026 { Bad_Opcode },
8027 { Bad_Opcode },
8028 { Bad_Opcode },
8029 { Bad_Opcode },
5dd85c99 8030 /* 68 */
592d1631
L
8031 { Bad_Opcode },
8032 { Bad_Opcode },
8033 { Bad_Opcode },
8034 { Bad_Opcode },
8035 { Bad_Opcode },
8036 { Bad_Opcode },
8037 { Bad_Opcode },
8038 { Bad_Opcode },
5dd85c99 8039 /* 70 */
592d1631
L
8040 { Bad_Opcode },
8041 { Bad_Opcode },
8042 { Bad_Opcode },
8043 { Bad_Opcode },
8044 { Bad_Opcode },
8045 { Bad_Opcode },
8046 { Bad_Opcode },
8047 { Bad_Opcode },
5dd85c99 8048 /* 78 */
592d1631
L
8049 { Bad_Opcode },
8050 { Bad_Opcode },
8051 { Bad_Opcode },
8052 { Bad_Opcode },
8053 { Bad_Opcode },
8054 { Bad_Opcode },
8055 { Bad_Opcode },
8056 { Bad_Opcode },
5dd85c99 8057 /* 80 */
592a252b
L
8058 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80) },
8059 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81) },
bf890a93
IT
8060 { "vfrczss", { XM, EXd }, 0 },
8061 { "vfrczsd", { XM, EXq }, 0 },
592d1631
L
8062 { Bad_Opcode },
8063 { Bad_Opcode },
8064 { Bad_Opcode },
8065 { Bad_Opcode },
5dd85c99 8066 /* 88 */
592d1631
L
8067 { Bad_Opcode },
8068 { Bad_Opcode },
8069 { Bad_Opcode },
8070 { Bad_Opcode },
8071 { Bad_Opcode },
8072 { Bad_Opcode },
8073 { Bad_Opcode },
8074 { Bad_Opcode },
5dd85c99 8075 /* 90 */
bf890a93
IT
8076 { "vprotb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8077 { "vprotw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8078 { "vprotd", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8079 { "vprotq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8080 { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8081 { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8082 { "vpshld", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8083 { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
5dd85c99 8084 /* 98 */
bf890a93
IT
8085 { "vpshab", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8086 { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8087 { "vpshad", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8088 { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
592d1631
L
8089 { Bad_Opcode },
8090 { Bad_Opcode },
8091 { Bad_Opcode },
8092 { Bad_Opcode },
5dd85c99 8093 /* a0 */
592d1631
L
8094 { Bad_Opcode },
8095 { Bad_Opcode },
8096 { Bad_Opcode },
8097 { Bad_Opcode },
8098 { Bad_Opcode },
8099 { Bad_Opcode },
8100 { Bad_Opcode },
8101 { Bad_Opcode },
5dd85c99 8102 /* a8 */
592d1631
L
8103 { Bad_Opcode },
8104 { Bad_Opcode },
8105 { Bad_Opcode },
8106 { Bad_Opcode },
8107 { Bad_Opcode },
8108 { Bad_Opcode },
8109 { Bad_Opcode },
8110 { Bad_Opcode },
5dd85c99 8111 /* b0 */
592d1631
L
8112 { Bad_Opcode },
8113 { Bad_Opcode },
8114 { Bad_Opcode },
8115 { Bad_Opcode },
8116 { Bad_Opcode },
8117 { Bad_Opcode },
8118 { Bad_Opcode },
8119 { Bad_Opcode },
5dd85c99 8120 /* b8 */
592d1631
L
8121 { Bad_Opcode },
8122 { Bad_Opcode },
8123 { Bad_Opcode },
8124 { Bad_Opcode },
8125 { Bad_Opcode },
8126 { Bad_Opcode },
8127 { Bad_Opcode },
8128 { Bad_Opcode },
5dd85c99 8129 /* c0 */
592d1631 8130 { Bad_Opcode },
bf890a93
IT
8131 { "vphaddbw", { XM, EXxmm }, 0 },
8132 { "vphaddbd", { XM, EXxmm }, 0 },
8133 { "vphaddbq", { XM, EXxmm }, 0 },
592d1631
L
8134 { Bad_Opcode },
8135 { Bad_Opcode },
bf890a93
IT
8136 { "vphaddwd", { XM, EXxmm }, 0 },
8137 { "vphaddwq", { XM, EXxmm }, 0 },
5dd85c99 8138 /* c8 */
592d1631
L
8139 { Bad_Opcode },
8140 { Bad_Opcode },
8141 { Bad_Opcode },
bf890a93 8142 { "vphadddq", { XM, EXxmm }, 0 },
592d1631
L
8143 { Bad_Opcode },
8144 { Bad_Opcode },
8145 { Bad_Opcode },
8146 { Bad_Opcode },
5dd85c99 8147 /* d0 */
592d1631 8148 { Bad_Opcode },
bf890a93
IT
8149 { "vphaddubw", { XM, EXxmm }, 0 },
8150 { "vphaddubd", { XM, EXxmm }, 0 },
8151 { "vphaddubq", { XM, EXxmm }, 0 },
592d1631
L
8152 { Bad_Opcode },
8153 { Bad_Opcode },
bf890a93
IT
8154 { "vphadduwd", { XM, EXxmm }, 0 },
8155 { "vphadduwq", { XM, EXxmm }, 0 },
5dd85c99 8156 /* d8 */
592d1631
L
8157 { Bad_Opcode },
8158 { Bad_Opcode },
8159 { Bad_Opcode },
bf890a93 8160 { "vphaddudq", { XM, EXxmm }, 0 },
592d1631
L
8161 { Bad_Opcode },
8162 { Bad_Opcode },
8163 { Bad_Opcode },
8164 { Bad_Opcode },
5dd85c99 8165 /* e0 */
592d1631 8166 { Bad_Opcode },
bf890a93
IT
8167 { "vphsubbw", { XM, EXxmm }, 0 },
8168 { "vphsubwd", { XM, EXxmm }, 0 },
8169 { "vphsubdq", { XM, EXxmm }, 0 },
592d1631
L
8170 { Bad_Opcode },
8171 { Bad_Opcode },
8172 { Bad_Opcode },
8173 { Bad_Opcode },
4e7d34a6 8174 /* e8 */
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 /* f0 */
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 /* f8 */
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 },
4e7d34a6 8201 },
f88c9eb0 8202 /* XOP_0A */
4e7d34a6
L
8203 {
8204 /* 00 */
592d1631
L
8205 { Bad_Opcode },
8206 { Bad_Opcode },
8207 { Bad_Opcode },
8208 { Bad_Opcode },
8209 { Bad_Opcode },
8210 { Bad_Opcode },
8211 { Bad_Opcode },
8212 { Bad_Opcode },
4e7d34a6 8213 /* 08 */
592d1631
L
8214 { Bad_Opcode },
8215 { Bad_Opcode },
8216 { Bad_Opcode },
8217 { Bad_Opcode },
8218 { Bad_Opcode },
8219 { Bad_Opcode },
8220 { Bad_Opcode },
8221 { Bad_Opcode },
4e7d34a6 8222 /* 10 */
bf890a93 8223 { "bextr", { Gv, Ev, Iq }, 0 },
592d1631 8224 { Bad_Opcode },
f88c9eb0 8225 { REG_TABLE (REG_XOP_LWP) },
592d1631
L
8226 { Bad_Opcode },
8227 { Bad_Opcode },
8228 { Bad_Opcode },
8229 { Bad_Opcode },
8230 { Bad_Opcode },
4e7d34a6 8231 /* 18 */
592d1631
L
8232 { Bad_Opcode },
8233 { Bad_Opcode },
8234 { Bad_Opcode },
8235 { Bad_Opcode },
8236 { Bad_Opcode },
8237 { Bad_Opcode },
8238 { Bad_Opcode },
8239 { Bad_Opcode },
4e7d34a6 8240 /* 20 */
592d1631
L
8241 { Bad_Opcode },
8242 { Bad_Opcode },
8243 { Bad_Opcode },
8244 { Bad_Opcode },
8245 { Bad_Opcode },
8246 { Bad_Opcode },
8247 { Bad_Opcode },
8248 { Bad_Opcode },
4e7d34a6 8249 /* 28 */
592d1631
L
8250 { Bad_Opcode },
8251 { Bad_Opcode },
8252 { Bad_Opcode },
8253 { Bad_Opcode },
8254 { Bad_Opcode },
8255 { Bad_Opcode },
8256 { Bad_Opcode },
8257 { Bad_Opcode },
4e7d34a6 8258 /* 30 */
592d1631
L
8259 { Bad_Opcode },
8260 { Bad_Opcode },
8261 { Bad_Opcode },
8262 { Bad_Opcode },
8263 { Bad_Opcode },
8264 { Bad_Opcode },
8265 { Bad_Opcode },
8266 { Bad_Opcode },
c0f3af97 8267 /* 38 */
592d1631
L
8268 { Bad_Opcode },
8269 { Bad_Opcode },
8270 { Bad_Opcode },
8271 { Bad_Opcode },
8272 { Bad_Opcode },
8273 { Bad_Opcode },
8274 { Bad_Opcode },
8275 { Bad_Opcode },
c0f3af97 8276 /* 40 */
592d1631
L
8277 { Bad_Opcode },
8278 { Bad_Opcode },
8279 { Bad_Opcode },
8280 { Bad_Opcode },
8281 { Bad_Opcode },
8282 { Bad_Opcode },
8283 { Bad_Opcode },
8284 { Bad_Opcode },
c1e679ec 8285 /* 48 */
592d1631
L
8286 { Bad_Opcode },
8287 { Bad_Opcode },
8288 { Bad_Opcode },
8289 { Bad_Opcode },
8290 { Bad_Opcode },
8291 { Bad_Opcode },
8292 { Bad_Opcode },
8293 { Bad_Opcode },
c1e679ec 8294 /* 50 */
592d1631
L
8295 { Bad_Opcode },
8296 { Bad_Opcode },
8297 { Bad_Opcode },
8298 { Bad_Opcode },
8299 { Bad_Opcode },
8300 { Bad_Opcode },
8301 { Bad_Opcode },
8302 { Bad_Opcode },
4e7d34a6 8303 /* 58 */
592d1631
L
8304 { Bad_Opcode },
8305 { Bad_Opcode },
8306 { Bad_Opcode },
8307 { Bad_Opcode },
8308 { Bad_Opcode },
8309 { Bad_Opcode },
8310 { Bad_Opcode },
8311 { Bad_Opcode },
4e7d34a6 8312 /* 60 */
592d1631
L
8313 { Bad_Opcode },
8314 { Bad_Opcode },
8315 { Bad_Opcode },
8316 { Bad_Opcode },
8317 { Bad_Opcode },
8318 { Bad_Opcode },
8319 { Bad_Opcode },
8320 { Bad_Opcode },
4e7d34a6 8321 /* 68 */
592d1631
L
8322 { Bad_Opcode },
8323 { Bad_Opcode },
8324 { Bad_Opcode },
8325 { Bad_Opcode },
8326 { Bad_Opcode },
8327 { Bad_Opcode },
8328 { Bad_Opcode },
8329 { Bad_Opcode },
4e7d34a6 8330 /* 70 */
592d1631
L
8331 { Bad_Opcode },
8332 { Bad_Opcode },
8333 { Bad_Opcode },
8334 { Bad_Opcode },
8335 { Bad_Opcode },
8336 { Bad_Opcode },
8337 { Bad_Opcode },
8338 { Bad_Opcode },
4e7d34a6 8339 /* 78 */
592d1631
L
8340 { Bad_Opcode },
8341 { Bad_Opcode },
8342 { Bad_Opcode },
8343 { Bad_Opcode },
8344 { Bad_Opcode },
8345 { Bad_Opcode },
8346 { Bad_Opcode },
8347 { Bad_Opcode },
4e7d34a6 8348 /* 80 */
592d1631
L
8349 { Bad_Opcode },
8350 { Bad_Opcode },
8351 { Bad_Opcode },
8352 { Bad_Opcode },
8353 { Bad_Opcode },
8354 { Bad_Opcode },
8355 { Bad_Opcode },
8356 { Bad_Opcode },
4e7d34a6 8357 /* 88 */
592d1631
L
8358 { Bad_Opcode },
8359 { Bad_Opcode },
8360 { Bad_Opcode },
8361 { Bad_Opcode },
8362 { Bad_Opcode },
8363 { Bad_Opcode },
8364 { Bad_Opcode },
8365 { Bad_Opcode },
4e7d34a6 8366 /* 90 */
592d1631
L
8367 { Bad_Opcode },
8368 { Bad_Opcode },
8369 { Bad_Opcode },
8370 { Bad_Opcode },
8371 { Bad_Opcode },
8372 { Bad_Opcode },
8373 { Bad_Opcode },
8374 { Bad_Opcode },
4e7d34a6 8375 /* 98 */
592d1631
L
8376 { Bad_Opcode },
8377 { Bad_Opcode },
8378 { Bad_Opcode },
8379 { Bad_Opcode },
8380 { Bad_Opcode },
8381 { Bad_Opcode },
8382 { Bad_Opcode },
8383 { Bad_Opcode },
4e7d34a6 8384 /* a0 */
592d1631
L
8385 { Bad_Opcode },
8386 { Bad_Opcode },
8387 { Bad_Opcode },
8388 { Bad_Opcode },
8389 { Bad_Opcode },
8390 { Bad_Opcode },
8391 { Bad_Opcode },
8392 { Bad_Opcode },
4e7d34a6 8393 /* a8 */
592d1631
L
8394 { Bad_Opcode },
8395 { Bad_Opcode },
8396 { Bad_Opcode },
8397 { Bad_Opcode },
8398 { Bad_Opcode },
8399 { Bad_Opcode },
8400 { Bad_Opcode },
8401 { Bad_Opcode },
d5d7db8e 8402 /* b0 */
592d1631
L
8403 { Bad_Opcode },
8404 { Bad_Opcode },
8405 { Bad_Opcode },
8406 { Bad_Opcode },
8407 { Bad_Opcode },
8408 { Bad_Opcode },
8409 { Bad_Opcode },
8410 { Bad_Opcode },
85f10a01 8411 /* b8 */
592d1631
L
8412 { Bad_Opcode },
8413 { Bad_Opcode },
8414 { Bad_Opcode },
8415 { Bad_Opcode },
8416 { Bad_Opcode },
8417 { Bad_Opcode },
8418 { Bad_Opcode },
8419 { Bad_Opcode },
85f10a01 8420 /* c0 */
592d1631
L
8421 { Bad_Opcode },
8422 { Bad_Opcode },
8423 { Bad_Opcode },
8424 { Bad_Opcode },
8425 { Bad_Opcode },
8426 { Bad_Opcode },
8427 { Bad_Opcode },
8428 { Bad_Opcode },
85f10a01 8429 /* c8 */
592d1631
L
8430 { Bad_Opcode },
8431 { Bad_Opcode },
8432 { Bad_Opcode },
8433 { Bad_Opcode },
8434 { Bad_Opcode },
8435 { Bad_Opcode },
8436 { Bad_Opcode },
8437 { Bad_Opcode },
85f10a01 8438 /* d0 */
592d1631
L
8439 { Bad_Opcode },
8440 { Bad_Opcode },
8441 { Bad_Opcode },
8442 { Bad_Opcode },
8443 { Bad_Opcode },
8444 { Bad_Opcode },
8445 { Bad_Opcode },
8446 { Bad_Opcode },
85f10a01 8447 /* d8 */
592d1631
L
8448 { Bad_Opcode },
8449 { Bad_Opcode },
8450 { Bad_Opcode },
8451 { Bad_Opcode },
8452 { Bad_Opcode },
8453 { Bad_Opcode },
8454 { Bad_Opcode },
8455 { Bad_Opcode },
85f10a01 8456 /* e0 */
592d1631
L
8457 { Bad_Opcode },
8458 { Bad_Opcode },
8459 { Bad_Opcode },
8460 { Bad_Opcode },
8461 { Bad_Opcode },
8462 { Bad_Opcode },
8463 { Bad_Opcode },
8464 { Bad_Opcode },
85f10a01 8465 /* e8 */
592d1631
L
8466 { Bad_Opcode },
8467 { Bad_Opcode },
8468 { Bad_Opcode },
8469 { Bad_Opcode },
8470 { Bad_Opcode },
8471 { Bad_Opcode },
8472 { Bad_Opcode },
8473 { Bad_Opcode },
85f10a01 8474 /* f0 */
592d1631
L
8475 { Bad_Opcode },
8476 { Bad_Opcode },
8477 { Bad_Opcode },
8478 { Bad_Opcode },
8479 { Bad_Opcode },
8480 { Bad_Opcode },
8481 { Bad_Opcode },
8482 { Bad_Opcode },
85f10a01 8483 /* f8 */
592d1631
L
8484 { Bad_Opcode },
8485 { Bad_Opcode },
8486 { Bad_Opcode },
8487 { Bad_Opcode },
8488 { Bad_Opcode },
8489 { Bad_Opcode },
8490 { Bad_Opcode },
8491 { Bad_Opcode },
85f10a01 8492 },
c0f3af97
L
8493};
8494
8495static const struct dis386 vex_table[][256] = {
8496 /* VEX_0F */
85f10a01
MM
8497 {
8498 /* 00 */
592d1631
L
8499 { Bad_Opcode },
8500 { Bad_Opcode },
8501 { Bad_Opcode },
8502 { Bad_Opcode },
8503 { Bad_Opcode },
8504 { Bad_Opcode },
8505 { Bad_Opcode },
8506 { Bad_Opcode },
85f10a01 8507 /* 08 */
592d1631
L
8508 { Bad_Opcode },
8509 { Bad_Opcode },
8510 { Bad_Opcode },
8511 { Bad_Opcode },
8512 { Bad_Opcode },
8513 { Bad_Opcode },
8514 { Bad_Opcode },
8515 { Bad_Opcode },
c0f3af97 8516 /* 10 */
592a252b
L
8517 { PREFIX_TABLE (PREFIX_VEX_0F10) },
8518 { PREFIX_TABLE (PREFIX_VEX_0F11) },
8519 { PREFIX_TABLE (PREFIX_VEX_0F12) },
8520 { MOD_TABLE (MOD_VEX_0F13) },
8521 { VEX_W_TABLE (VEX_W_0F14) },
8522 { VEX_W_TABLE (VEX_W_0F15) },
8523 { PREFIX_TABLE (PREFIX_VEX_0F16) },
8524 { MOD_TABLE (MOD_VEX_0F17) },
c0f3af97 8525 /* 18 */
592d1631
L
8526 { Bad_Opcode },
8527 { Bad_Opcode },
8528 { Bad_Opcode },
8529 { Bad_Opcode },
8530 { Bad_Opcode },
8531 { Bad_Opcode },
8532 { Bad_Opcode },
8533 { Bad_Opcode },
c0f3af97 8534 /* 20 */
592d1631
L
8535 { Bad_Opcode },
8536 { Bad_Opcode },
8537 { Bad_Opcode },
8538 { Bad_Opcode },
8539 { Bad_Opcode },
8540 { Bad_Opcode },
8541 { Bad_Opcode },
8542 { Bad_Opcode },
c0f3af97 8543 /* 28 */
592a252b
L
8544 { VEX_W_TABLE (VEX_W_0F28) },
8545 { VEX_W_TABLE (VEX_W_0F29) },
8546 { PREFIX_TABLE (PREFIX_VEX_0F2A) },
8547 { MOD_TABLE (MOD_VEX_0F2B) },
8548 { PREFIX_TABLE (PREFIX_VEX_0F2C) },
8549 { PREFIX_TABLE (PREFIX_VEX_0F2D) },
8550 { PREFIX_TABLE (PREFIX_VEX_0F2E) },
8551 { PREFIX_TABLE (PREFIX_VEX_0F2F) },
85f10a01 8552 /* 30 */
592d1631
L
8553 { Bad_Opcode },
8554 { Bad_Opcode },
8555 { Bad_Opcode },
8556 { Bad_Opcode },
8557 { Bad_Opcode },
8558 { Bad_Opcode },
8559 { Bad_Opcode },
8560 { Bad_Opcode },
4e7d34a6 8561 /* 38 */
592d1631
L
8562 { Bad_Opcode },
8563 { Bad_Opcode },
8564 { Bad_Opcode },
8565 { Bad_Opcode },
8566 { Bad_Opcode },
8567 { Bad_Opcode },
8568 { Bad_Opcode },
8569 { Bad_Opcode },
d5d7db8e 8570 /* 40 */
592d1631 8571 { Bad_Opcode },
43234a1e
L
8572 { PREFIX_TABLE (PREFIX_VEX_0F41) },
8573 { PREFIX_TABLE (PREFIX_VEX_0F42) },
592d1631 8574 { Bad_Opcode },
43234a1e
L
8575 { PREFIX_TABLE (PREFIX_VEX_0F44) },
8576 { PREFIX_TABLE (PREFIX_VEX_0F45) },
8577 { PREFIX_TABLE (PREFIX_VEX_0F46) },
8578 { PREFIX_TABLE (PREFIX_VEX_0F47) },
85f10a01 8579 /* 48 */
592d1631
L
8580 { Bad_Opcode },
8581 { Bad_Opcode },
1ba585e8 8582 { PREFIX_TABLE (PREFIX_VEX_0F4A) },
43234a1e 8583 { PREFIX_TABLE (PREFIX_VEX_0F4B) },
592d1631
L
8584 { Bad_Opcode },
8585 { Bad_Opcode },
8586 { Bad_Opcode },
8587 { Bad_Opcode },
d5d7db8e 8588 /* 50 */
592a252b
L
8589 { MOD_TABLE (MOD_VEX_0F50) },
8590 { PREFIX_TABLE (PREFIX_VEX_0F51) },
8591 { PREFIX_TABLE (PREFIX_VEX_0F52) },
8592 { PREFIX_TABLE (PREFIX_VEX_0F53) },
bf890a93
IT
8593 { "vandpX", { XM, Vex, EXx }, 0 },
8594 { "vandnpX", { XM, Vex, EXx }, 0 },
8595 { "vorpX", { XM, Vex, EXx }, 0 },
8596 { "vxorpX", { XM, Vex, EXx }, 0 },
c0f3af97 8597 /* 58 */
592a252b
L
8598 { PREFIX_TABLE (PREFIX_VEX_0F58) },
8599 { PREFIX_TABLE (PREFIX_VEX_0F59) },
8600 { PREFIX_TABLE (PREFIX_VEX_0F5A) },
8601 { PREFIX_TABLE (PREFIX_VEX_0F5B) },
8602 { PREFIX_TABLE (PREFIX_VEX_0F5C) },
8603 { PREFIX_TABLE (PREFIX_VEX_0F5D) },
8604 { PREFIX_TABLE (PREFIX_VEX_0F5E) },
8605 { PREFIX_TABLE (PREFIX_VEX_0F5F) },
c0f3af97 8606 /* 60 */
592a252b
L
8607 { PREFIX_TABLE (PREFIX_VEX_0F60) },
8608 { PREFIX_TABLE (PREFIX_VEX_0F61) },
8609 { PREFIX_TABLE (PREFIX_VEX_0F62) },
8610 { PREFIX_TABLE (PREFIX_VEX_0F63) },
8611 { PREFIX_TABLE (PREFIX_VEX_0F64) },
8612 { PREFIX_TABLE (PREFIX_VEX_0F65) },
8613 { PREFIX_TABLE (PREFIX_VEX_0F66) },
8614 { PREFIX_TABLE (PREFIX_VEX_0F67) },
c0f3af97 8615 /* 68 */
592a252b
L
8616 { PREFIX_TABLE (PREFIX_VEX_0F68) },
8617 { PREFIX_TABLE (PREFIX_VEX_0F69) },
8618 { PREFIX_TABLE (PREFIX_VEX_0F6A) },
8619 { PREFIX_TABLE (PREFIX_VEX_0F6B) },
8620 { PREFIX_TABLE (PREFIX_VEX_0F6C) },
8621 { PREFIX_TABLE (PREFIX_VEX_0F6D) },
8622 { PREFIX_TABLE (PREFIX_VEX_0F6E) },
8623 { PREFIX_TABLE (PREFIX_VEX_0F6F) },
c0f3af97 8624 /* 70 */
592a252b
L
8625 { PREFIX_TABLE (PREFIX_VEX_0F70) },
8626 { REG_TABLE (REG_VEX_0F71) },
8627 { REG_TABLE (REG_VEX_0F72) },
8628 { REG_TABLE (REG_VEX_0F73) },
8629 { PREFIX_TABLE (PREFIX_VEX_0F74) },
8630 { PREFIX_TABLE (PREFIX_VEX_0F75) },
8631 { PREFIX_TABLE (PREFIX_VEX_0F76) },
8632 { PREFIX_TABLE (PREFIX_VEX_0F77) },
c0f3af97 8633 /* 78 */
592d1631
L
8634 { Bad_Opcode },
8635 { Bad_Opcode },
8636 { Bad_Opcode },
8637 { Bad_Opcode },
592a252b
L
8638 { PREFIX_TABLE (PREFIX_VEX_0F7C) },
8639 { PREFIX_TABLE (PREFIX_VEX_0F7D) },
8640 { PREFIX_TABLE (PREFIX_VEX_0F7E) },
8641 { PREFIX_TABLE (PREFIX_VEX_0F7F) },
c0f3af97 8642 /* 80 */
592d1631
L
8643 { Bad_Opcode },
8644 { Bad_Opcode },
8645 { Bad_Opcode },
8646 { Bad_Opcode },
8647 { Bad_Opcode },
8648 { Bad_Opcode },
8649 { Bad_Opcode },
8650 { Bad_Opcode },
c0f3af97 8651 /* 88 */
592d1631
L
8652 { Bad_Opcode },
8653 { Bad_Opcode },
8654 { Bad_Opcode },
8655 { Bad_Opcode },
8656 { Bad_Opcode },
8657 { Bad_Opcode },
8658 { Bad_Opcode },
8659 { Bad_Opcode },
c0f3af97 8660 /* 90 */
43234a1e
L
8661 { PREFIX_TABLE (PREFIX_VEX_0F90) },
8662 { PREFIX_TABLE (PREFIX_VEX_0F91) },
8663 { PREFIX_TABLE (PREFIX_VEX_0F92) },
8664 { PREFIX_TABLE (PREFIX_VEX_0F93) },
592d1631
L
8665 { Bad_Opcode },
8666 { Bad_Opcode },
8667 { Bad_Opcode },
8668 { Bad_Opcode },
c0f3af97 8669 /* 98 */
43234a1e 8670 { PREFIX_TABLE (PREFIX_VEX_0F98) },
1ba585e8 8671 { PREFIX_TABLE (PREFIX_VEX_0F99) },
592d1631
L
8672 { Bad_Opcode },
8673 { Bad_Opcode },
8674 { Bad_Opcode },
8675 { Bad_Opcode },
8676 { Bad_Opcode },
8677 { Bad_Opcode },
c0f3af97 8678 /* a0 */
592d1631
L
8679 { Bad_Opcode },
8680 { Bad_Opcode },
8681 { Bad_Opcode },
8682 { Bad_Opcode },
8683 { Bad_Opcode },
8684 { Bad_Opcode },
8685 { Bad_Opcode },
8686 { Bad_Opcode },
c0f3af97 8687 /* a8 */
592d1631
L
8688 { Bad_Opcode },
8689 { Bad_Opcode },
8690 { Bad_Opcode },
8691 { Bad_Opcode },
8692 { Bad_Opcode },
8693 { Bad_Opcode },
592a252b 8694 { REG_TABLE (REG_VEX_0FAE) },
592d1631 8695 { Bad_Opcode },
c0f3af97 8696 /* b0 */
592d1631
L
8697 { Bad_Opcode },
8698 { Bad_Opcode },
8699 { Bad_Opcode },
8700 { Bad_Opcode },
8701 { Bad_Opcode },
8702 { Bad_Opcode },
8703 { Bad_Opcode },
8704 { Bad_Opcode },
c0f3af97 8705 /* b8 */
592d1631
L
8706 { Bad_Opcode },
8707 { Bad_Opcode },
8708 { Bad_Opcode },
8709 { Bad_Opcode },
8710 { Bad_Opcode },
8711 { Bad_Opcode },
8712 { Bad_Opcode },
8713 { Bad_Opcode },
c0f3af97 8714 /* c0 */
592d1631
L
8715 { Bad_Opcode },
8716 { Bad_Opcode },
592a252b 8717 { PREFIX_TABLE (PREFIX_VEX_0FC2) },
592d1631 8718 { Bad_Opcode },
592a252b
L
8719 { PREFIX_TABLE (PREFIX_VEX_0FC4) },
8720 { PREFIX_TABLE (PREFIX_VEX_0FC5) },
bf890a93 8721 { "vshufpX", { XM, Vex, EXx, Ib }, 0 },
592d1631 8722 { Bad_Opcode },
c0f3af97 8723 /* c8 */
592d1631
L
8724 { Bad_Opcode },
8725 { Bad_Opcode },
8726 { Bad_Opcode },
8727 { Bad_Opcode },
8728 { Bad_Opcode },
8729 { Bad_Opcode },
8730 { Bad_Opcode },
8731 { Bad_Opcode },
c0f3af97 8732 /* d0 */
592a252b
L
8733 { PREFIX_TABLE (PREFIX_VEX_0FD0) },
8734 { PREFIX_TABLE (PREFIX_VEX_0FD1) },
8735 { PREFIX_TABLE (PREFIX_VEX_0FD2) },
8736 { PREFIX_TABLE (PREFIX_VEX_0FD3) },
8737 { PREFIX_TABLE (PREFIX_VEX_0FD4) },
8738 { PREFIX_TABLE (PREFIX_VEX_0FD5) },
8739 { PREFIX_TABLE (PREFIX_VEX_0FD6) },
8740 { PREFIX_TABLE (PREFIX_VEX_0FD7) },
c0f3af97 8741 /* d8 */
592a252b
L
8742 { PREFIX_TABLE (PREFIX_VEX_0FD8) },
8743 { PREFIX_TABLE (PREFIX_VEX_0FD9) },
8744 { PREFIX_TABLE (PREFIX_VEX_0FDA) },
8745 { PREFIX_TABLE (PREFIX_VEX_0FDB) },
8746 { PREFIX_TABLE (PREFIX_VEX_0FDC) },
8747 { PREFIX_TABLE (PREFIX_VEX_0FDD) },
8748 { PREFIX_TABLE (PREFIX_VEX_0FDE) },
8749 { PREFIX_TABLE (PREFIX_VEX_0FDF) },
c0f3af97 8750 /* e0 */
592a252b
L
8751 { PREFIX_TABLE (PREFIX_VEX_0FE0) },
8752 { PREFIX_TABLE (PREFIX_VEX_0FE1) },
8753 { PREFIX_TABLE (PREFIX_VEX_0FE2) },
8754 { PREFIX_TABLE (PREFIX_VEX_0FE3) },
8755 { PREFIX_TABLE (PREFIX_VEX_0FE4) },
8756 { PREFIX_TABLE (PREFIX_VEX_0FE5) },
8757 { PREFIX_TABLE (PREFIX_VEX_0FE6) },
8758 { PREFIX_TABLE (PREFIX_VEX_0FE7) },
c0f3af97 8759 /* e8 */
592a252b
L
8760 { PREFIX_TABLE (PREFIX_VEX_0FE8) },
8761 { PREFIX_TABLE (PREFIX_VEX_0FE9) },
8762 { PREFIX_TABLE (PREFIX_VEX_0FEA) },
8763 { PREFIX_TABLE (PREFIX_VEX_0FEB) },
8764 { PREFIX_TABLE (PREFIX_VEX_0FEC) },
8765 { PREFIX_TABLE (PREFIX_VEX_0FED) },
8766 { PREFIX_TABLE (PREFIX_VEX_0FEE) },
8767 { PREFIX_TABLE (PREFIX_VEX_0FEF) },
c0f3af97 8768 /* f0 */
592a252b
L
8769 { PREFIX_TABLE (PREFIX_VEX_0FF0) },
8770 { PREFIX_TABLE (PREFIX_VEX_0FF1) },
8771 { PREFIX_TABLE (PREFIX_VEX_0FF2) },
8772 { PREFIX_TABLE (PREFIX_VEX_0FF3) },
8773 { PREFIX_TABLE (PREFIX_VEX_0FF4) },
8774 { PREFIX_TABLE (PREFIX_VEX_0FF5) },
8775 { PREFIX_TABLE (PREFIX_VEX_0FF6) },
8776 { PREFIX_TABLE (PREFIX_VEX_0FF7) },
c0f3af97 8777 /* f8 */
592a252b
L
8778 { PREFIX_TABLE (PREFIX_VEX_0FF8) },
8779 { PREFIX_TABLE (PREFIX_VEX_0FF9) },
8780 { PREFIX_TABLE (PREFIX_VEX_0FFA) },
8781 { PREFIX_TABLE (PREFIX_VEX_0FFB) },
8782 { PREFIX_TABLE (PREFIX_VEX_0FFC) },
8783 { PREFIX_TABLE (PREFIX_VEX_0FFD) },
8784 { PREFIX_TABLE (PREFIX_VEX_0FFE) },
592d1631 8785 { Bad_Opcode },
c0f3af97
L
8786 },
8787 /* VEX_0F38 */
8788 {
8789 /* 00 */
592a252b
L
8790 { PREFIX_TABLE (PREFIX_VEX_0F3800) },
8791 { PREFIX_TABLE (PREFIX_VEX_0F3801) },
8792 { PREFIX_TABLE (PREFIX_VEX_0F3802) },
8793 { PREFIX_TABLE (PREFIX_VEX_0F3803) },
8794 { PREFIX_TABLE (PREFIX_VEX_0F3804) },
8795 { PREFIX_TABLE (PREFIX_VEX_0F3805) },
8796 { PREFIX_TABLE (PREFIX_VEX_0F3806) },
8797 { PREFIX_TABLE (PREFIX_VEX_0F3807) },
c0f3af97 8798 /* 08 */
592a252b
L
8799 { PREFIX_TABLE (PREFIX_VEX_0F3808) },
8800 { PREFIX_TABLE (PREFIX_VEX_0F3809) },
8801 { PREFIX_TABLE (PREFIX_VEX_0F380A) },
8802 { PREFIX_TABLE (PREFIX_VEX_0F380B) },
8803 { PREFIX_TABLE (PREFIX_VEX_0F380C) },
8804 { PREFIX_TABLE (PREFIX_VEX_0F380D) },
8805 { PREFIX_TABLE (PREFIX_VEX_0F380E) },
8806 { PREFIX_TABLE (PREFIX_VEX_0F380F) },
c0f3af97 8807 /* 10 */
592d1631
L
8808 { Bad_Opcode },
8809 { Bad_Opcode },
8810 { Bad_Opcode },
592a252b 8811 { PREFIX_TABLE (PREFIX_VEX_0F3813) },
592d1631
L
8812 { Bad_Opcode },
8813 { Bad_Opcode },
6c30d220 8814 { PREFIX_TABLE (PREFIX_VEX_0F3816) },
592a252b 8815 { PREFIX_TABLE (PREFIX_VEX_0F3817) },
c0f3af97 8816 /* 18 */
592a252b
L
8817 { PREFIX_TABLE (PREFIX_VEX_0F3818) },
8818 { PREFIX_TABLE (PREFIX_VEX_0F3819) },
8819 { PREFIX_TABLE (PREFIX_VEX_0F381A) },
592d1631 8820 { Bad_Opcode },
592a252b
L
8821 { PREFIX_TABLE (PREFIX_VEX_0F381C) },
8822 { PREFIX_TABLE (PREFIX_VEX_0F381D) },
8823 { PREFIX_TABLE (PREFIX_VEX_0F381E) },
592d1631 8824 { Bad_Opcode },
c0f3af97 8825 /* 20 */
592a252b
L
8826 { PREFIX_TABLE (PREFIX_VEX_0F3820) },
8827 { PREFIX_TABLE (PREFIX_VEX_0F3821) },
8828 { PREFIX_TABLE (PREFIX_VEX_0F3822) },
8829 { PREFIX_TABLE (PREFIX_VEX_0F3823) },
8830 { PREFIX_TABLE (PREFIX_VEX_0F3824) },
8831 { PREFIX_TABLE (PREFIX_VEX_0F3825) },
592d1631
L
8832 { Bad_Opcode },
8833 { Bad_Opcode },
c0f3af97 8834 /* 28 */
592a252b
L
8835 { PREFIX_TABLE (PREFIX_VEX_0F3828) },
8836 { PREFIX_TABLE (PREFIX_VEX_0F3829) },
8837 { PREFIX_TABLE (PREFIX_VEX_0F382A) },
8838 { PREFIX_TABLE (PREFIX_VEX_0F382B) },
8839 { PREFIX_TABLE (PREFIX_VEX_0F382C) },
8840 { PREFIX_TABLE (PREFIX_VEX_0F382D) },
8841 { PREFIX_TABLE (PREFIX_VEX_0F382E) },
8842 { PREFIX_TABLE (PREFIX_VEX_0F382F) },
c0f3af97 8843 /* 30 */
592a252b
L
8844 { PREFIX_TABLE (PREFIX_VEX_0F3830) },
8845 { PREFIX_TABLE (PREFIX_VEX_0F3831) },
8846 { PREFIX_TABLE (PREFIX_VEX_0F3832) },
8847 { PREFIX_TABLE (PREFIX_VEX_0F3833) },
8848 { PREFIX_TABLE (PREFIX_VEX_0F3834) },
8849 { PREFIX_TABLE (PREFIX_VEX_0F3835) },
6c30d220 8850 { PREFIX_TABLE (PREFIX_VEX_0F3836) },
592a252b 8851 { PREFIX_TABLE (PREFIX_VEX_0F3837) },
c0f3af97 8852 /* 38 */
592a252b
L
8853 { PREFIX_TABLE (PREFIX_VEX_0F3838) },
8854 { PREFIX_TABLE (PREFIX_VEX_0F3839) },
8855 { PREFIX_TABLE (PREFIX_VEX_0F383A) },
8856 { PREFIX_TABLE (PREFIX_VEX_0F383B) },
8857 { PREFIX_TABLE (PREFIX_VEX_0F383C) },
8858 { PREFIX_TABLE (PREFIX_VEX_0F383D) },
8859 { PREFIX_TABLE (PREFIX_VEX_0F383E) },
8860 { PREFIX_TABLE (PREFIX_VEX_0F383F) },
c0f3af97 8861 /* 40 */
592a252b
L
8862 { PREFIX_TABLE (PREFIX_VEX_0F3840) },
8863 { PREFIX_TABLE (PREFIX_VEX_0F3841) },
592d1631
L
8864 { Bad_Opcode },
8865 { Bad_Opcode },
8866 { Bad_Opcode },
6c30d220
L
8867 { PREFIX_TABLE (PREFIX_VEX_0F3845) },
8868 { PREFIX_TABLE (PREFIX_VEX_0F3846) },
8869 { PREFIX_TABLE (PREFIX_VEX_0F3847) },
c0f3af97 8870 /* 48 */
592d1631
L
8871 { Bad_Opcode },
8872 { Bad_Opcode },
8873 { Bad_Opcode },
8874 { Bad_Opcode },
8875 { Bad_Opcode },
8876 { Bad_Opcode },
8877 { Bad_Opcode },
8878 { Bad_Opcode },
c0f3af97 8879 /* 50 */
592d1631
L
8880 { Bad_Opcode },
8881 { Bad_Opcode },
8882 { Bad_Opcode },
8883 { Bad_Opcode },
8884 { Bad_Opcode },
8885 { Bad_Opcode },
8886 { Bad_Opcode },
8887 { Bad_Opcode },
c0f3af97 8888 /* 58 */
6c30d220
L
8889 { PREFIX_TABLE (PREFIX_VEX_0F3858) },
8890 { PREFIX_TABLE (PREFIX_VEX_0F3859) },
8891 { PREFIX_TABLE (PREFIX_VEX_0F385A) },
592d1631
L
8892 { Bad_Opcode },
8893 { Bad_Opcode },
8894 { Bad_Opcode },
8895 { Bad_Opcode },
8896 { Bad_Opcode },
c0f3af97 8897 /* 60 */
592d1631
L
8898 { Bad_Opcode },
8899 { Bad_Opcode },
8900 { Bad_Opcode },
8901 { Bad_Opcode },
8902 { Bad_Opcode },
8903 { Bad_Opcode },
8904 { Bad_Opcode },
8905 { Bad_Opcode },
c0f3af97 8906 /* 68 */
592d1631
L
8907 { Bad_Opcode },
8908 { Bad_Opcode },
8909 { Bad_Opcode },
8910 { Bad_Opcode },
8911 { Bad_Opcode },
8912 { Bad_Opcode },
8913 { Bad_Opcode },
8914 { Bad_Opcode },
c0f3af97 8915 /* 70 */
592d1631
L
8916 { Bad_Opcode },
8917 { Bad_Opcode },
8918 { Bad_Opcode },
8919 { Bad_Opcode },
8920 { Bad_Opcode },
8921 { Bad_Opcode },
8922 { Bad_Opcode },
8923 { Bad_Opcode },
c0f3af97 8924 /* 78 */
6c30d220
L
8925 { PREFIX_TABLE (PREFIX_VEX_0F3878) },
8926 { PREFIX_TABLE (PREFIX_VEX_0F3879) },
592d1631
L
8927 { Bad_Opcode },
8928 { Bad_Opcode },
8929 { Bad_Opcode },
8930 { Bad_Opcode },
8931 { Bad_Opcode },
8932 { Bad_Opcode },
c0f3af97 8933 /* 80 */
592d1631
L
8934 { Bad_Opcode },
8935 { Bad_Opcode },
8936 { Bad_Opcode },
8937 { Bad_Opcode },
8938 { Bad_Opcode },
8939 { Bad_Opcode },
8940 { Bad_Opcode },
8941 { Bad_Opcode },
c0f3af97 8942 /* 88 */
592d1631
L
8943 { Bad_Opcode },
8944 { Bad_Opcode },
8945 { Bad_Opcode },
8946 { Bad_Opcode },
6c30d220 8947 { PREFIX_TABLE (PREFIX_VEX_0F388C) },
592d1631 8948 { Bad_Opcode },
6c30d220 8949 { PREFIX_TABLE (PREFIX_VEX_0F388E) },
592d1631 8950 { Bad_Opcode },
c0f3af97 8951 /* 90 */
6c30d220
L
8952 { PREFIX_TABLE (PREFIX_VEX_0F3890) },
8953 { PREFIX_TABLE (PREFIX_VEX_0F3891) },
8954 { PREFIX_TABLE (PREFIX_VEX_0F3892) },
8955 { PREFIX_TABLE (PREFIX_VEX_0F3893) },
592d1631
L
8956 { Bad_Opcode },
8957 { Bad_Opcode },
592a252b
L
8958 { PREFIX_TABLE (PREFIX_VEX_0F3896) },
8959 { PREFIX_TABLE (PREFIX_VEX_0F3897) },
c0f3af97 8960 /* 98 */
592a252b
L
8961 { PREFIX_TABLE (PREFIX_VEX_0F3898) },
8962 { PREFIX_TABLE (PREFIX_VEX_0F3899) },
8963 { PREFIX_TABLE (PREFIX_VEX_0F389A) },
8964 { PREFIX_TABLE (PREFIX_VEX_0F389B) },
8965 { PREFIX_TABLE (PREFIX_VEX_0F389C) },
8966 { PREFIX_TABLE (PREFIX_VEX_0F389D) },
8967 { PREFIX_TABLE (PREFIX_VEX_0F389E) },
8968 { PREFIX_TABLE (PREFIX_VEX_0F389F) },
c0f3af97 8969 /* a0 */
592d1631
L
8970 { Bad_Opcode },
8971 { Bad_Opcode },
8972 { Bad_Opcode },
8973 { Bad_Opcode },
8974 { Bad_Opcode },
8975 { Bad_Opcode },
592a252b
L
8976 { PREFIX_TABLE (PREFIX_VEX_0F38A6) },
8977 { PREFIX_TABLE (PREFIX_VEX_0F38A7) },
c0f3af97 8978 /* a8 */
592a252b
L
8979 { PREFIX_TABLE (PREFIX_VEX_0F38A8) },
8980 { PREFIX_TABLE (PREFIX_VEX_0F38A9) },
8981 { PREFIX_TABLE (PREFIX_VEX_0F38AA) },
8982 { PREFIX_TABLE (PREFIX_VEX_0F38AB) },
8983 { PREFIX_TABLE (PREFIX_VEX_0F38AC) },
8984 { PREFIX_TABLE (PREFIX_VEX_0F38AD) },
8985 { PREFIX_TABLE (PREFIX_VEX_0F38AE) },
8986 { PREFIX_TABLE (PREFIX_VEX_0F38AF) },
c0f3af97 8987 /* b0 */
592d1631
L
8988 { Bad_Opcode },
8989 { Bad_Opcode },
8990 { Bad_Opcode },
8991 { Bad_Opcode },
8992 { Bad_Opcode },
8993 { Bad_Opcode },
592a252b
L
8994 { PREFIX_TABLE (PREFIX_VEX_0F38B6) },
8995 { PREFIX_TABLE (PREFIX_VEX_0F38B7) },
c0f3af97 8996 /* b8 */
592a252b
L
8997 { PREFIX_TABLE (PREFIX_VEX_0F38B8) },
8998 { PREFIX_TABLE (PREFIX_VEX_0F38B9) },
8999 { PREFIX_TABLE (PREFIX_VEX_0F38BA) },
9000 { PREFIX_TABLE (PREFIX_VEX_0F38BB) },
9001 { PREFIX_TABLE (PREFIX_VEX_0F38BC) },
9002 { PREFIX_TABLE (PREFIX_VEX_0F38BD) },
9003 { PREFIX_TABLE (PREFIX_VEX_0F38BE) },
9004 { PREFIX_TABLE (PREFIX_VEX_0F38BF) },
c0f3af97 9005 /* c0 */
592d1631
L
9006 { Bad_Opcode },
9007 { Bad_Opcode },
9008 { Bad_Opcode },
9009 { Bad_Opcode },
9010 { Bad_Opcode },
9011 { Bad_Opcode },
9012 { Bad_Opcode },
9013 { Bad_Opcode },
c0f3af97 9014 /* c8 */
592d1631
L
9015 { Bad_Opcode },
9016 { Bad_Opcode },
9017 { Bad_Opcode },
9018 { Bad_Opcode },
9019 { Bad_Opcode },
9020 { Bad_Opcode },
9021 { Bad_Opcode },
9022 { Bad_Opcode },
c0f3af97 9023 /* d0 */
592d1631
L
9024 { Bad_Opcode },
9025 { Bad_Opcode },
9026 { Bad_Opcode },
9027 { Bad_Opcode },
9028 { Bad_Opcode },
9029 { Bad_Opcode },
9030 { Bad_Opcode },
9031 { Bad_Opcode },
c0f3af97 9032 /* d8 */
592d1631
L
9033 { Bad_Opcode },
9034 { Bad_Opcode },
9035 { Bad_Opcode },
592a252b
L
9036 { PREFIX_TABLE (PREFIX_VEX_0F38DB) },
9037 { PREFIX_TABLE (PREFIX_VEX_0F38DC) },
9038 { PREFIX_TABLE (PREFIX_VEX_0F38DD) },
9039 { PREFIX_TABLE (PREFIX_VEX_0F38DE) },
9040 { PREFIX_TABLE (PREFIX_VEX_0F38DF) },
c0f3af97 9041 /* e0 */
592d1631
L
9042 { Bad_Opcode },
9043 { Bad_Opcode },
9044 { Bad_Opcode },
9045 { Bad_Opcode },
9046 { Bad_Opcode },
9047 { Bad_Opcode },
9048 { Bad_Opcode },
9049 { Bad_Opcode },
c0f3af97 9050 /* e8 */
592d1631
L
9051 { Bad_Opcode },
9052 { Bad_Opcode },
9053 { Bad_Opcode },
9054 { Bad_Opcode },
9055 { Bad_Opcode },
9056 { Bad_Opcode },
9057 { Bad_Opcode },
9058 { Bad_Opcode },
c0f3af97 9059 /* f0 */
592d1631
L
9060 { Bad_Opcode },
9061 { Bad_Opcode },
f12dc422
L
9062 { PREFIX_TABLE (PREFIX_VEX_0F38F2) },
9063 { REG_TABLE (REG_VEX_0F38F3) },
592d1631 9064 { Bad_Opcode },
6c30d220
L
9065 { PREFIX_TABLE (PREFIX_VEX_0F38F5) },
9066 { PREFIX_TABLE (PREFIX_VEX_0F38F6) },
f12dc422 9067 { PREFIX_TABLE (PREFIX_VEX_0F38F7) },
c0f3af97 9068 /* f8 */
592d1631
L
9069 { Bad_Opcode },
9070 { Bad_Opcode },
9071 { Bad_Opcode },
9072 { Bad_Opcode },
9073 { Bad_Opcode },
9074 { Bad_Opcode },
9075 { Bad_Opcode },
9076 { Bad_Opcode },
c0f3af97
L
9077 },
9078 /* VEX_0F3A */
9079 {
9080 /* 00 */
6c30d220
L
9081 { PREFIX_TABLE (PREFIX_VEX_0F3A00) },
9082 { PREFIX_TABLE (PREFIX_VEX_0F3A01) },
9083 { PREFIX_TABLE (PREFIX_VEX_0F3A02) },
592d1631 9084 { Bad_Opcode },
592a252b
L
9085 { PREFIX_TABLE (PREFIX_VEX_0F3A04) },
9086 { PREFIX_TABLE (PREFIX_VEX_0F3A05) },
9087 { PREFIX_TABLE (PREFIX_VEX_0F3A06) },
592d1631 9088 { Bad_Opcode },
c0f3af97 9089 /* 08 */
592a252b
L
9090 { PREFIX_TABLE (PREFIX_VEX_0F3A08) },
9091 { PREFIX_TABLE (PREFIX_VEX_0F3A09) },
9092 { PREFIX_TABLE (PREFIX_VEX_0F3A0A) },
9093 { PREFIX_TABLE (PREFIX_VEX_0F3A0B) },
9094 { PREFIX_TABLE (PREFIX_VEX_0F3A0C) },
9095 { PREFIX_TABLE (PREFIX_VEX_0F3A0D) },
9096 { PREFIX_TABLE (PREFIX_VEX_0F3A0E) },
9097 { PREFIX_TABLE (PREFIX_VEX_0F3A0F) },
c0f3af97 9098 /* 10 */
592d1631
L
9099 { Bad_Opcode },
9100 { Bad_Opcode },
9101 { Bad_Opcode },
9102 { Bad_Opcode },
592a252b
L
9103 { PREFIX_TABLE (PREFIX_VEX_0F3A14) },
9104 { PREFIX_TABLE (PREFIX_VEX_0F3A15) },
9105 { PREFIX_TABLE (PREFIX_VEX_0F3A16) },
9106 { PREFIX_TABLE (PREFIX_VEX_0F3A17) },
c0f3af97 9107 /* 18 */
592a252b
L
9108 { PREFIX_TABLE (PREFIX_VEX_0F3A18) },
9109 { PREFIX_TABLE (PREFIX_VEX_0F3A19) },
592d1631
L
9110 { Bad_Opcode },
9111 { Bad_Opcode },
9112 { Bad_Opcode },
592a252b 9113 { PREFIX_TABLE (PREFIX_VEX_0F3A1D) },
592d1631
L
9114 { Bad_Opcode },
9115 { Bad_Opcode },
c0f3af97 9116 /* 20 */
592a252b
L
9117 { PREFIX_TABLE (PREFIX_VEX_0F3A20) },
9118 { PREFIX_TABLE (PREFIX_VEX_0F3A21) },
9119 { PREFIX_TABLE (PREFIX_VEX_0F3A22) },
592d1631
L
9120 { Bad_Opcode },
9121 { Bad_Opcode },
9122 { Bad_Opcode },
9123 { Bad_Opcode },
9124 { Bad_Opcode },
c0f3af97 9125 /* 28 */
592d1631
L
9126 { Bad_Opcode },
9127 { Bad_Opcode },
9128 { Bad_Opcode },
9129 { Bad_Opcode },
9130 { Bad_Opcode },
9131 { Bad_Opcode },
9132 { Bad_Opcode },
9133 { Bad_Opcode },
c0f3af97 9134 /* 30 */
43234a1e 9135 { PREFIX_TABLE (PREFIX_VEX_0F3A30) },
1ba585e8 9136 { PREFIX_TABLE (PREFIX_VEX_0F3A31) },
43234a1e 9137 { PREFIX_TABLE (PREFIX_VEX_0F3A32) },
1ba585e8 9138 { PREFIX_TABLE (PREFIX_VEX_0F3A33) },
592d1631
L
9139 { Bad_Opcode },
9140 { Bad_Opcode },
9141 { Bad_Opcode },
9142 { Bad_Opcode },
c0f3af97 9143 /* 38 */
6c30d220
L
9144 { PREFIX_TABLE (PREFIX_VEX_0F3A38) },
9145 { PREFIX_TABLE (PREFIX_VEX_0F3A39) },
592d1631
L
9146 { Bad_Opcode },
9147 { Bad_Opcode },
9148 { Bad_Opcode },
9149 { Bad_Opcode },
9150 { Bad_Opcode },
9151 { Bad_Opcode },
c0f3af97 9152 /* 40 */
592a252b
L
9153 { PREFIX_TABLE (PREFIX_VEX_0F3A40) },
9154 { PREFIX_TABLE (PREFIX_VEX_0F3A41) },
9155 { PREFIX_TABLE (PREFIX_VEX_0F3A42) },
592d1631 9156 { Bad_Opcode },
592a252b 9157 { PREFIX_TABLE (PREFIX_VEX_0F3A44) },
592d1631 9158 { Bad_Opcode },
6c30d220 9159 { PREFIX_TABLE (PREFIX_VEX_0F3A46) },
592d1631 9160 { Bad_Opcode },
c0f3af97 9161 /* 48 */
592a252b
L
9162 { PREFIX_TABLE (PREFIX_VEX_0F3A48) },
9163 { PREFIX_TABLE (PREFIX_VEX_0F3A49) },
9164 { PREFIX_TABLE (PREFIX_VEX_0F3A4A) },
9165 { PREFIX_TABLE (PREFIX_VEX_0F3A4B) },
9166 { PREFIX_TABLE (PREFIX_VEX_0F3A4C) },
592d1631
L
9167 { Bad_Opcode },
9168 { Bad_Opcode },
9169 { Bad_Opcode },
c0f3af97 9170 /* 50 */
592d1631
L
9171 { Bad_Opcode },
9172 { Bad_Opcode },
9173 { Bad_Opcode },
9174 { Bad_Opcode },
9175 { Bad_Opcode },
9176 { Bad_Opcode },
9177 { Bad_Opcode },
9178 { Bad_Opcode },
c0f3af97 9179 /* 58 */
592d1631
L
9180 { Bad_Opcode },
9181 { Bad_Opcode },
9182 { Bad_Opcode },
9183 { Bad_Opcode },
592a252b
L
9184 { PREFIX_TABLE (PREFIX_VEX_0F3A5C) },
9185 { PREFIX_TABLE (PREFIX_VEX_0F3A5D) },
9186 { PREFIX_TABLE (PREFIX_VEX_0F3A5E) },
9187 { PREFIX_TABLE (PREFIX_VEX_0F3A5F) },
c0f3af97 9188 /* 60 */
592a252b
L
9189 { PREFIX_TABLE (PREFIX_VEX_0F3A60) },
9190 { PREFIX_TABLE (PREFIX_VEX_0F3A61) },
9191 { PREFIX_TABLE (PREFIX_VEX_0F3A62) },
9192 { PREFIX_TABLE (PREFIX_VEX_0F3A63) },
592d1631
L
9193 { Bad_Opcode },
9194 { Bad_Opcode },
9195 { Bad_Opcode },
9196 { Bad_Opcode },
c0f3af97 9197 /* 68 */
592a252b
L
9198 { PREFIX_TABLE (PREFIX_VEX_0F3A68) },
9199 { PREFIX_TABLE (PREFIX_VEX_0F3A69) },
9200 { PREFIX_TABLE (PREFIX_VEX_0F3A6A) },
9201 { PREFIX_TABLE (PREFIX_VEX_0F3A6B) },
9202 { PREFIX_TABLE (PREFIX_VEX_0F3A6C) },
9203 { PREFIX_TABLE (PREFIX_VEX_0F3A6D) },
9204 { PREFIX_TABLE (PREFIX_VEX_0F3A6E) },
9205 { PREFIX_TABLE (PREFIX_VEX_0F3A6F) },
c0f3af97 9206 /* 70 */
592d1631
L
9207 { Bad_Opcode },
9208 { Bad_Opcode },
9209 { Bad_Opcode },
9210 { Bad_Opcode },
9211 { Bad_Opcode },
9212 { Bad_Opcode },
9213 { Bad_Opcode },
9214 { Bad_Opcode },
c0f3af97 9215 /* 78 */
592a252b
L
9216 { PREFIX_TABLE (PREFIX_VEX_0F3A78) },
9217 { PREFIX_TABLE (PREFIX_VEX_0F3A79) },
9218 { PREFIX_TABLE (PREFIX_VEX_0F3A7A) },
9219 { PREFIX_TABLE (PREFIX_VEX_0F3A7B) },
9220 { PREFIX_TABLE (PREFIX_VEX_0F3A7C) },
9221 { PREFIX_TABLE (PREFIX_VEX_0F3A7D) },
9222 { PREFIX_TABLE (PREFIX_VEX_0F3A7E) },
9223 { PREFIX_TABLE (PREFIX_VEX_0F3A7F) },
c0f3af97 9224 /* 80 */
592d1631
L
9225 { Bad_Opcode },
9226 { Bad_Opcode },
9227 { Bad_Opcode },
9228 { Bad_Opcode },
9229 { Bad_Opcode },
9230 { Bad_Opcode },
9231 { Bad_Opcode },
9232 { Bad_Opcode },
c0f3af97 9233 /* 88 */
592d1631
L
9234 { Bad_Opcode },
9235 { Bad_Opcode },
9236 { Bad_Opcode },
9237 { Bad_Opcode },
9238 { Bad_Opcode },
9239 { Bad_Opcode },
9240 { Bad_Opcode },
9241 { Bad_Opcode },
c0f3af97 9242 /* 90 */
592d1631
L
9243 { Bad_Opcode },
9244 { Bad_Opcode },
9245 { Bad_Opcode },
9246 { Bad_Opcode },
9247 { Bad_Opcode },
9248 { Bad_Opcode },
9249 { Bad_Opcode },
9250 { Bad_Opcode },
c0f3af97 9251 /* 98 */
592d1631
L
9252 { Bad_Opcode },
9253 { Bad_Opcode },
9254 { Bad_Opcode },
9255 { Bad_Opcode },
9256 { Bad_Opcode },
9257 { Bad_Opcode },
9258 { Bad_Opcode },
9259 { Bad_Opcode },
c0f3af97 9260 /* a0 */
592d1631
L
9261 { Bad_Opcode },
9262 { Bad_Opcode },
9263 { Bad_Opcode },
9264 { Bad_Opcode },
9265 { Bad_Opcode },
9266 { Bad_Opcode },
9267 { Bad_Opcode },
9268 { Bad_Opcode },
c0f3af97 9269 /* a8 */
592d1631
L
9270 { Bad_Opcode },
9271 { Bad_Opcode },
9272 { Bad_Opcode },
9273 { Bad_Opcode },
9274 { Bad_Opcode },
9275 { Bad_Opcode },
9276 { Bad_Opcode },
9277 { Bad_Opcode },
c0f3af97 9278 /* b0 */
592d1631
L
9279 { Bad_Opcode },
9280 { Bad_Opcode },
9281 { Bad_Opcode },
9282 { Bad_Opcode },
9283 { Bad_Opcode },
9284 { Bad_Opcode },
9285 { Bad_Opcode },
9286 { Bad_Opcode },
c0f3af97 9287 /* b8 */
592d1631
L
9288 { Bad_Opcode },
9289 { Bad_Opcode },
9290 { Bad_Opcode },
9291 { Bad_Opcode },
9292 { Bad_Opcode },
9293 { Bad_Opcode },
9294 { Bad_Opcode },
9295 { Bad_Opcode },
c0f3af97 9296 /* c0 */
592d1631
L
9297 { Bad_Opcode },
9298 { Bad_Opcode },
9299 { Bad_Opcode },
9300 { Bad_Opcode },
9301 { Bad_Opcode },
9302 { Bad_Opcode },
9303 { Bad_Opcode },
9304 { Bad_Opcode },
c0f3af97 9305 /* c8 */
592d1631
L
9306 { Bad_Opcode },
9307 { Bad_Opcode },
9308 { Bad_Opcode },
9309 { Bad_Opcode },
9310 { Bad_Opcode },
9311 { Bad_Opcode },
9312 { Bad_Opcode },
9313 { Bad_Opcode },
c0f3af97 9314 /* d0 */
592d1631
L
9315 { Bad_Opcode },
9316 { Bad_Opcode },
9317 { Bad_Opcode },
9318 { Bad_Opcode },
9319 { Bad_Opcode },
9320 { Bad_Opcode },
9321 { Bad_Opcode },
9322 { Bad_Opcode },
c0f3af97 9323 /* d8 */
592d1631
L
9324 { Bad_Opcode },
9325 { Bad_Opcode },
9326 { Bad_Opcode },
9327 { Bad_Opcode },
9328 { Bad_Opcode },
9329 { Bad_Opcode },
9330 { Bad_Opcode },
592a252b 9331 { PREFIX_TABLE (PREFIX_VEX_0F3ADF) },
c0f3af97 9332 /* e0 */
592d1631
L
9333 { Bad_Opcode },
9334 { Bad_Opcode },
9335 { Bad_Opcode },
9336 { Bad_Opcode },
9337 { Bad_Opcode },
9338 { Bad_Opcode },
9339 { Bad_Opcode },
9340 { Bad_Opcode },
c0f3af97 9341 /* e8 */
592d1631
L
9342 { Bad_Opcode },
9343 { Bad_Opcode },
9344 { Bad_Opcode },
9345 { Bad_Opcode },
9346 { Bad_Opcode },
9347 { Bad_Opcode },
9348 { Bad_Opcode },
9349 { Bad_Opcode },
c0f3af97 9350 /* f0 */
6c30d220 9351 { PREFIX_TABLE (PREFIX_VEX_0F3AF0) },
592d1631
L
9352 { Bad_Opcode },
9353 { Bad_Opcode },
9354 { Bad_Opcode },
9355 { Bad_Opcode },
9356 { Bad_Opcode },
9357 { Bad_Opcode },
9358 { Bad_Opcode },
c0f3af97 9359 /* f8 */
592d1631
L
9360 { Bad_Opcode },
9361 { Bad_Opcode },
9362 { Bad_Opcode },
9363 { Bad_Opcode },
9364 { Bad_Opcode },
9365 { Bad_Opcode },
9366 { Bad_Opcode },
9367 { Bad_Opcode },
c0f3af97
L
9368 },
9369};
9370
43234a1e
L
9371#define NEED_OPCODE_TABLE
9372#include "i386-dis-evex.h"
9373#undef NEED_OPCODE_TABLE
c0f3af97 9374static const struct dis386 vex_len_table[][2] = {
592a252b 9375 /* VEX_LEN_0F10_P_1 */
c0f3af97 9376 {
592a252b
L
9377 { VEX_W_TABLE (VEX_W_0F10_P_1) },
9378 { VEX_W_TABLE (VEX_W_0F10_P_1) },
c0f3af97
L
9379 },
9380
592a252b 9381 /* VEX_LEN_0F10_P_3 */
c0f3af97 9382 {
592a252b
L
9383 { VEX_W_TABLE (VEX_W_0F10_P_3) },
9384 { VEX_W_TABLE (VEX_W_0F10_P_3) },
c0f3af97
L
9385 },
9386
592a252b 9387 /* VEX_LEN_0F11_P_1 */
c0f3af97 9388 {
592a252b
L
9389 { VEX_W_TABLE (VEX_W_0F11_P_1) },
9390 { VEX_W_TABLE (VEX_W_0F11_P_1) },
c0f3af97
L
9391 },
9392
592a252b 9393 /* VEX_LEN_0F11_P_3 */
c0f3af97 9394 {
592a252b
L
9395 { VEX_W_TABLE (VEX_W_0F11_P_3) },
9396 { VEX_W_TABLE (VEX_W_0F11_P_3) },
c0f3af97
L
9397 },
9398
592a252b 9399 /* VEX_LEN_0F12_P_0_M_0 */
c0f3af97 9400 {
592a252b 9401 { VEX_W_TABLE (VEX_W_0F12_P_0_M_0) },
c0f3af97
L
9402 },
9403
592a252b 9404 /* VEX_LEN_0F12_P_0_M_1 */
c0f3af97 9405 {
592a252b 9406 { VEX_W_TABLE (VEX_W_0F12_P_0_M_1) },
c0f3af97
L
9407 },
9408
592a252b 9409 /* VEX_LEN_0F12_P_2 */
c0f3af97 9410 {
592a252b 9411 { VEX_W_TABLE (VEX_W_0F12_P_2) },
c0f3af97
L
9412 },
9413
592a252b 9414 /* VEX_LEN_0F13_M_0 */
c0f3af97 9415 {
592a252b 9416 { VEX_W_TABLE (VEX_W_0F13_M_0) },
c0f3af97
L
9417 },
9418
592a252b 9419 /* VEX_LEN_0F16_P_0_M_0 */
c0f3af97 9420 {
592a252b 9421 { VEX_W_TABLE (VEX_W_0F16_P_0_M_0) },
c0f3af97
L
9422 },
9423
592a252b 9424 /* VEX_LEN_0F16_P_0_M_1 */
c0f3af97 9425 {
592a252b 9426 { VEX_W_TABLE (VEX_W_0F16_P_0_M_1) },
c0f3af97
L
9427 },
9428
592a252b 9429 /* VEX_LEN_0F16_P_2 */
c0f3af97 9430 {
592a252b 9431 { VEX_W_TABLE (VEX_W_0F16_P_2) },
c0f3af97
L
9432 },
9433
592a252b 9434 /* VEX_LEN_0F17_M_0 */
c0f3af97 9435 {
592a252b 9436 { VEX_W_TABLE (VEX_W_0F17_M_0) },
c0f3af97
L
9437 },
9438
592a252b 9439 /* VEX_LEN_0F2A_P_1 */
c0f3af97 9440 {
bf890a93
IT
9441 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev }, 0 },
9442 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev }, 0 },
c0f3af97
L
9443 },
9444
592a252b 9445 /* VEX_LEN_0F2A_P_3 */
c0f3af97 9446 {
bf890a93
IT
9447 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev }, 0 },
9448 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev }, 0 },
c0f3af97
L
9449 },
9450
592a252b 9451 /* VEX_LEN_0F2C_P_1 */
c0f3af97 9452 {
bf890a93
IT
9453 { "vcvttss2siY", { Gv, EXdScalar }, 0 },
9454 { "vcvttss2siY", { Gv, EXdScalar }, 0 },
c0f3af97
L
9455 },
9456
592a252b 9457 /* VEX_LEN_0F2C_P_3 */
c0f3af97 9458 {
bf890a93
IT
9459 { "vcvttsd2siY", { Gv, EXqScalar }, 0 },
9460 { "vcvttsd2siY", { Gv, EXqScalar }, 0 },
c0f3af97
L
9461 },
9462
592a252b 9463 /* VEX_LEN_0F2D_P_1 */
c0f3af97 9464 {
bf890a93
IT
9465 { "vcvtss2siY", { Gv, EXdScalar }, 0 },
9466 { "vcvtss2siY", { Gv, EXdScalar }, 0 },
c0f3af97
L
9467 },
9468
592a252b 9469 /* VEX_LEN_0F2D_P_3 */
c0f3af97 9470 {
bf890a93
IT
9471 { "vcvtsd2siY", { Gv, EXqScalar }, 0 },
9472 { "vcvtsd2siY", { Gv, EXqScalar }, 0 },
c0f3af97
L
9473 },
9474
592a252b 9475 /* VEX_LEN_0F2E_P_0 */
c0f3af97 9476 {
592a252b
L
9477 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
9478 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
c0f3af97
L
9479 },
9480
592a252b 9481 /* VEX_LEN_0F2E_P_2 */
c0f3af97 9482 {
592a252b
L
9483 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
9484 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
c0f3af97
L
9485 },
9486
592a252b 9487 /* VEX_LEN_0F2F_P_0 */
c0f3af97 9488 {
592a252b
L
9489 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
9490 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
c0f3af97
L
9491 },
9492
592a252b 9493 /* VEX_LEN_0F2F_P_2 */
c0f3af97 9494 {
592a252b
L
9495 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
9496 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
c0f3af97
L
9497 },
9498
43234a1e
L
9499 /* VEX_LEN_0F41_P_0 */
9500 {
9501 { Bad_Opcode },
9502 { VEX_W_TABLE (VEX_W_0F41_P_0_LEN_1) },
9503 },
1ba585e8
IT
9504 /* VEX_LEN_0F41_P_2 */
9505 {
9506 { Bad_Opcode },
9507 { VEX_W_TABLE (VEX_W_0F41_P_2_LEN_1) },
9508 },
43234a1e
L
9509 /* VEX_LEN_0F42_P_0 */
9510 {
9511 { Bad_Opcode },
9512 { VEX_W_TABLE (VEX_W_0F42_P_0_LEN_1) },
9513 },
1ba585e8
IT
9514 /* VEX_LEN_0F42_P_2 */
9515 {
9516 { Bad_Opcode },
9517 { VEX_W_TABLE (VEX_W_0F42_P_2_LEN_1) },
9518 },
43234a1e
L
9519 /* VEX_LEN_0F44_P_0 */
9520 {
9521 { VEX_W_TABLE (VEX_W_0F44_P_0_LEN_0) },
9522 },
1ba585e8
IT
9523 /* VEX_LEN_0F44_P_2 */
9524 {
9525 { VEX_W_TABLE (VEX_W_0F44_P_2_LEN_0) },
9526 },
43234a1e
L
9527 /* VEX_LEN_0F45_P_0 */
9528 {
9529 { Bad_Opcode },
9530 { VEX_W_TABLE (VEX_W_0F45_P_0_LEN_1) },
9531 },
1ba585e8
IT
9532 /* VEX_LEN_0F45_P_2 */
9533 {
9534 { Bad_Opcode },
9535 { VEX_W_TABLE (VEX_W_0F45_P_2_LEN_1) },
9536 },
43234a1e
L
9537 /* VEX_LEN_0F46_P_0 */
9538 {
9539 { Bad_Opcode },
9540 { VEX_W_TABLE (VEX_W_0F46_P_0_LEN_1) },
9541 },
1ba585e8
IT
9542 /* VEX_LEN_0F46_P_2 */
9543 {
9544 { Bad_Opcode },
9545 { VEX_W_TABLE (VEX_W_0F46_P_2_LEN_1) },
9546 },
43234a1e
L
9547 /* VEX_LEN_0F47_P_0 */
9548 {
9549 { Bad_Opcode },
9550 { VEX_W_TABLE (VEX_W_0F47_P_0_LEN_1) },
9551 },
1ba585e8
IT
9552 /* VEX_LEN_0F47_P_2 */
9553 {
9554 { Bad_Opcode },
9555 { VEX_W_TABLE (VEX_W_0F47_P_2_LEN_1) },
9556 },
9557 /* VEX_LEN_0F4A_P_0 */
9558 {
9559 { Bad_Opcode },
9560 { VEX_W_TABLE (VEX_W_0F4A_P_0_LEN_1) },
9561 },
9562 /* VEX_LEN_0F4A_P_2 */
9563 {
9564 { Bad_Opcode },
9565 { VEX_W_TABLE (VEX_W_0F4A_P_2_LEN_1) },
9566 },
9567 /* VEX_LEN_0F4B_P_0 */
9568 {
9569 { Bad_Opcode },
9570 { VEX_W_TABLE (VEX_W_0F4B_P_0_LEN_1) },
9571 },
43234a1e
L
9572 /* VEX_LEN_0F4B_P_2 */
9573 {
9574 { Bad_Opcode },
9575 { VEX_W_TABLE (VEX_W_0F4B_P_2_LEN_1) },
9576 },
9577
592a252b 9578 /* VEX_LEN_0F51_P_1 */
c0f3af97 9579 {
592a252b
L
9580 { VEX_W_TABLE (VEX_W_0F51_P_1) },
9581 { VEX_W_TABLE (VEX_W_0F51_P_1) },
c0f3af97
L
9582 },
9583
592a252b 9584 /* VEX_LEN_0F51_P_3 */
c0f3af97 9585 {
592a252b
L
9586 { VEX_W_TABLE (VEX_W_0F51_P_3) },
9587 { VEX_W_TABLE (VEX_W_0F51_P_3) },
c0f3af97
L
9588 },
9589
592a252b 9590 /* VEX_LEN_0F52_P_1 */
c0f3af97 9591 {
592a252b
L
9592 { VEX_W_TABLE (VEX_W_0F52_P_1) },
9593 { VEX_W_TABLE (VEX_W_0F52_P_1) },
c0f3af97
L
9594 },
9595
592a252b 9596 /* VEX_LEN_0F53_P_1 */
c0f3af97 9597 {
592a252b
L
9598 { VEX_W_TABLE (VEX_W_0F53_P_1) },
9599 { VEX_W_TABLE (VEX_W_0F53_P_1) },
c0f3af97
L
9600 },
9601
592a252b 9602 /* VEX_LEN_0F58_P_1 */
c0f3af97 9603 {
592a252b
L
9604 { VEX_W_TABLE (VEX_W_0F58_P_1) },
9605 { VEX_W_TABLE (VEX_W_0F58_P_1) },
c0f3af97
L
9606 },
9607
592a252b 9608 /* VEX_LEN_0F58_P_3 */
c0f3af97 9609 {
592a252b
L
9610 { VEX_W_TABLE (VEX_W_0F58_P_3) },
9611 { VEX_W_TABLE (VEX_W_0F58_P_3) },
c0f3af97
L
9612 },
9613
592a252b 9614 /* VEX_LEN_0F59_P_1 */
c0f3af97 9615 {
592a252b
L
9616 { VEX_W_TABLE (VEX_W_0F59_P_1) },
9617 { VEX_W_TABLE (VEX_W_0F59_P_1) },
c0f3af97
L
9618 },
9619
592a252b 9620 /* VEX_LEN_0F59_P_3 */
c0f3af97 9621 {
592a252b
L
9622 { VEX_W_TABLE (VEX_W_0F59_P_3) },
9623 { VEX_W_TABLE (VEX_W_0F59_P_3) },
c0f3af97
L
9624 },
9625
592a252b 9626 /* VEX_LEN_0F5A_P_1 */
c0f3af97 9627 {
592a252b
L
9628 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
9629 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
c0f3af97
L
9630 },
9631
592a252b 9632 /* VEX_LEN_0F5A_P_3 */
c0f3af97 9633 {
592a252b
L
9634 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
9635 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
c0f3af97
L
9636 },
9637
592a252b 9638 /* VEX_LEN_0F5C_P_1 */
c0f3af97 9639 {
592a252b
L
9640 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
9641 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
c0f3af97
L
9642 },
9643
592a252b 9644 /* VEX_LEN_0F5C_P_3 */
c0f3af97 9645 {
592a252b
L
9646 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
9647 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
c0f3af97
L
9648 },
9649
592a252b 9650 /* VEX_LEN_0F5D_P_1 */
c0f3af97 9651 {
592a252b
L
9652 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
9653 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
c0f3af97
L
9654 },
9655
592a252b 9656 /* VEX_LEN_0F5D_P_3 */
c0f3af97 9657 {
592a252b
L
9658 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
9659 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
c0f3af97
L
9660 },
9661
592a252b 9662 /* VEX_LEN_0F5E_P_1 */
c0f3af97 9663 {
592a252b
L
9664 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
9665 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
c0f3af97
L
9666 },
9667
592a252b 9668 /* VEX_LEN_0F5E_P_3 */
c0f3af97 9669 {
592a252b
L
9670 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
9671 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
c0f3af97
L
9672 },
9673
592a252b 9674 /* VEX_LEN_0F5F_P_1 */
c0f3af97 9675 {
592a252b
L
9676 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
9677 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
c0f3af97
L
9678 },
9679
592a252b 9680 /* VEX_LEN_0F5F_P_3 */
c0f3af97 9681 {
592a252b
L
9682 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
9683 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
c0f3af97
L
9684 },
9685
592a252b 9686 /* VEX_LEN_0F6E_P_2 */
c0f3af97 9687 {
bf890a93
IT
9688 { "vmovK", { XMScalar, Edq }, 0 },
9689 { "vmovK", { XMScalar, Edq }, 0 },
c0f3af97
L
9690 },
9691
592a252b 9692 /* VEX_LEN_0F7E_P_1 */
c0f3af97 9693 {
592a252b
L
9694 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
9695 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
c0f3af97
L
9696 },
9697
592a252b 9698 /* VEX_LEN_0F7E_P_2 */
c0f3af97 9699 {
bf890a93
IT
9700 { "vmovK", { Edq, XMScalar }, 0 },
9701 { "vmovK", { Edq, XMScalar }, 0 },
c0f3af97
L
9702 },
9703
43234a1e
L
9704 /* VEX_LEN_0F90_P_0 */
9705 {
9706 { VEX_W_TABLE (VEX_W_0F90_P_0_LEN_0) },
9707 },
9708
1ba585e8
IT
9709 /* VEX_LEN_0F90_P_2 */
9710 {
9711 { VEX_W_TABLE (VEX_W_0F90_P_2_LEN_0) },
9712 },
9713
43234a1e
L
9714 /* VEX_LEN_0F91_P_0 */
9715 {
9716 { VEX_W_TABLE (VEX_W_0F91_P_0_LEN_0) },
9717 },
9718
1ba585e8
IT
9719 /* VEX_LEN_0F91_P_2 */
9720 {
9721 { VEX_W_TABLE (VEX_W_0F91_P_2_LEN_0) },
9722 },
9723
43234a1e
L
9724 /* VEX_LEN_0F92_P_0 */
9725 {
9726 { VEX_W_TABLE (VEX_W_0F92_P_0_LEN_0) },
9727 },
9728
90a915bf
IT
9729 /* VEX_LEN_0F92_P_2 */
9730 {
9731 { VEX_W_TABLE (VEX_W_0F92_P_2_LEN_0) },
9732 },
9733
1ba585e8
IT
9734 /* VEX_LEN_0F92_P_3 */
9735 {
9736 { VEX_W_TABLE (VEX_W_0F92_P_3_LEN_0) },
9737 },
9738
43234a1e
L
9739 /* VEX_LEN_0F93_P_0 */
9740 {
9741 { VEX_W_TABLE (VEX_W_0F93_P_0_LEN_0) },
9742 },
9743
90a915bf
IT
9744 /* VEX_LEN_0F93_P_2 */
9745 {
9746 { VEX_W_TABLE (VEX_W_0F93_P_2_LEN_0) },
9747 },
9748
1ba585e8
IT
9749 /* VEX_LEN_0F93_P_3 */
9750 {
9751 { VEX_W_TABLE (VEX_W_0F93_P_3_LEN_0) },
9752 },
9753
43234a1e
L
9754 /* VEX_LEN_0F98_P_0 */
9755 {
9756 { VEX_W_TABLE (VEX_W_0F98_P_0_LEN_0) },
9757 },
9758
1ba585e8
IT
9759 /* VEX_LEN_0F98_P_2 */
9760 {
9761 { VEX_W_TABLE (VEX_W_0F98_P_2_LEN_0) },
9762 },
9763
9764 /* VEX_LEN_0F99_P_0 */
9765 {
9766 { VEX_W_TABLE (VEX_W_0F99_P_0_LEN_0) },
9767 },
9768
9769 /* VEX_LEN_0F99_P_2 */
9770 {
9771 { VEX_W_TABLE (VEX_W_0F99_P_2_LEN_0) },
9772 },
9773
6c30d220 9774 /* VEX_LEN_0FAE_R_2_M_0 */
c0f3af97 9775 {
6c30d220 9776 { VEX_W_TABLE (VEX_W_0FAE_R_2_M_0) },
c0f3af97
L
9777 },
9778
6c30d220 9779 /* VEX_LEN_0FAE_R_3_M_0 */
c0f3af97 9780 {
6c30d220 9781 { VEX_W_TABLE (VEX_W_0FAE_R_3_M_0) },
c0f3af97
L
9782 },
9783
6c30d220 9784 /* VEX_LEN_0FC2_P_1 */
c0f3af97 9785 {
6c30d220
L
9786 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
9787 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
c0f3af97
L
9788 },
9789
6c30d220 9790 /* VEX_LEN_0FC2_P_3 */
c0f3af97 9791 {
6c30d220
L
9792 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
9793 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
c0f3af97
L
9794 },
9795
6c30d220 9796 /* VEX_LEN_0FC4_P_2 */
c0f3af97 9797 {
6c30d220 9798 { VEX_W_TABLE (VEX_W_0FC4_P_2) },
c0f3af97
L
9799 },
9800
6c30d220 9801 /* VEX_LEN_0FC5_P_2 */
c0f3af97 9802 {
6c30d220 9803 { VEX_W_TABLE (VEX_W_0FC5_P_2) },
c0f3af97
L
9804 },
9805
6c30d220 9806 /* VEX_LEN_0FD6_P_2 */
c0f3af97 9807 {
6c30d220
L
9808 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
9809 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
c0f3af97
L
9810 },
9811
6c30d220 9812 /* VEX_LEN_0FF7_P_2 */
c0f3af97 9813 {
6c30d220 9814 { VEX_W_TABLE (VEX_W_0FF7_P_2) },
c0f3af97
L
9815 },
9816
6c30d220 9817 /* VEX_LEN_0F3816_P_2 */
c0f3af97 9818 {
6c30d220
L
9819 { Bad_Opcode },
9820 { VEX_W_TABLE (VEX_W_0F3816_P_2) },
c0f3af97
L
9821 },
9822
6c30d220 9823 /* VEX_LEN_0F3819_P_2 */
c0f3af97 9824 {
6c30d220
L
9825 { Bad_Opcode },
9826 { VEX_W_TABLE (VEX_W_0F3819_P_2) },
c0f3af97
L
9827 },
9828
6c30d220 9829 /* VEX_LEN_0F381A_P_2_M_0 */
c0f3af97 9830 {
6c30d220
L
9831 { Bad_Opcode },
9832 { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0) },
c0f3af97
L
9833 },
9834
6c30d220 9835 /* VEX_LEN_0F3836_P_2 */
c0f3af97 9836 {
6c30d220
L
9837 { Bad_Opcode },
9838 { VEX_W_TABLE (VEX_W_0F3836_P_2) },
c0f3af97
L
9839 },
9840
592a252b 9841 /* VEX_LEN_0F3841_P_2 */
c0f3af97 9842 {
592a252b 9843 { VEX_W_TABLE (VEX_W_0F3841_P_2) },
c0f3af97
L
9844 },
9845
6c30d220
L
9846 /* VEX_LEN_0F385A_P_2_M_0 */
9847 {
9848 { Bad_Opcode },
9849 { VEX_W_TABLE (VEX_W_0F385A_P_2_M_0) },
9850 },
9851
592a252b 9852 /* VEX_LEN_0F38DB_P_2 */
a5ff0eb2 9853 {
592a252b 9854 { VEX_W_TABLE (VEX_W_0F38DB_P_2) },
a5ff0eb2
L
9855 },
9856
592a252b 9857 /* VEX_LEN_0F38DC_P_2 */
a5ff0eb2 9858 {
592a252b 9859 { VEX_W_TABLE (VEX_W_0F38DC_P_2) },
a5ff0eb2
L
9860 },
9861
592a252b 9862 /* VEX_LEN_0F38DD_P_2 */
a5ff0eb2 9863 {
592a252b 9864 { VEX_W_TABLE (VEX_W_0F38DD_P_2) },
a5ff0eb2
L
9865 },
9866
592a252b 9867 /* VEX_LEN_0F38DE_P_2 */
a5ff0eb2 9868 {
592a252b 9869 { VEX_W_TABLE (VEX_W_0F38DE_P_2) },
a5ff0eb2
L
9870 },
9871
592a252b 9872 /* VEX_LEN_0F38DF_P_2 */
a5ff0eb2 9873 {
592a252b 9874 { VEX_W_TABLE (VEX_W_0F38DF_P_2) },
a5ff0eb2
L
9875 },
9876
f12dc422
L
9877 /* VEX_LEN_0F38F2_P_0 */
9878 {
bf890a93 9879 { "andnS", { Gdq, VexGdq, Edq }, 0 },
f12dc422
L
9880 },
9881
9882 /* VEX_LEN_0F38F3_R_1_P_0 */
9883 {
bf890a93 9884 { "blsrS", { VexGdq, Edq }, 0 },
f12dc422
L
9885 },
9886
9887 /* VEX_LEN_0F38F3_R_2_P_0 */
9888 {
bf890a93 9889 { "blsmskS", { VexGdq, Edq }, 0 },
f12dc422
L
9890 },
9891
9892 /* VEX_LEN_0F38F3_R_3_P_0 */
9893 {
bf890a93 9894 { "blsiS", { VexGdq, Edq }, 0 },
f12dc422
L
9895 },
9896
6c30d220
L
9897 /* VEX_LEN_0F38F5_P_0 */
9898 {
bf890a93 9899 { "bzhiS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9900 },
9901
9902 /* VEX_LEN_0F38F5_P_1 */
9903 {
bf890a93 9904 { "pextS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
9905 },
9906
9907 /* VEX_LEN_0F38F5_P_3 */
9908 {
bf890a93 9909 { "pdepS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
9910 },
9911
9912 /* VEX_LEN_0F38F6_P_3 */
9913 {
bf890a93 9914 { "mulxS", { Gdq, VexGdq, Edq }, 0 },
6c30d220
L
9915 },
9916
f12dc422
L
9917 /* VEX_LEN_0F38F7_P_0 */
9918 {
bf890a93 9919 { "bextrS", { Gdq, Edq, VexGdq }, 0 },
f12dc422
L
9920 },
9921
6c30d220
L
9922 /* VEX_LEN_0F38F7_P_1 */
9923 {
bf890a93 9924 { "sarxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9925 },
9926
9927 /* VEX_LEN_0F38F7_P_2 */
9928 {
bf890a93 9929 { "shlxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9930 },
9931
9932 /* VEX_LEN_0F38F7_P_3 */
9933 {
bf890a93 9934 { "shrxS", { Gdq, Edq, VexGdq }, 0 },
6c30d220
L
9935 },
9936
9937 /* VEX_LEN_0F3A00_P_2 */
9938 {
9939 { Bad_Opcode },
9940 { VEX_W_TABLE (VEX_W_0F3A00_P_2) },
9941 },
9942
9943 /* VEX_LEN_0F3A01_P_2 */
9944 {
9945 { Bad_Opcode },
9946 { VEX_W_TABLE (VEX_W_0F3A01_P_2) },
9947 },
9948
592a252b 9949 /* VEX_LEN_0F3A06_P_2 */
c0f3af97 9950 {
592d1631 9951 { Bad_Opcode },
592a252b 9952 { VEX_W_TABLE (VEX_W_0F3A06_P_2) },
c0f3af97
L
9953 },
9954
592a252b 9955 /* VEX_LEN_0F3A0A_P_2 */
c0f3af97 9956 {
592a252b
L
9957 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
9958 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
c0f3af97
L
9959 },
9960
592a252b 9961 /* VEX_LEN_0F3A0B_P_2 */
c0f3af97 9962 {
592a252b
L
9963 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
9964 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
c0f3af97
L
9965 },
9966
592a252b 9967 /* VEX_LEN_0F3A14_P_2 */
c0f3af97 9968 {
592a252b 9969 { VEX_W_TABLE (VEX_W_0F3A14_P_2) },
c0f3af97
L
9970 },
9971
592a252b 9972 /* VEX_LEN_0F3A15_P_2 */
c0f3af97 9973 {
592a252b 9974 { VEX_W_TABLE (VEX_W_0F3A15_P_2) },
c0f3af97
L
9975 },
9976
592a252b 9977 /* VEX_LEN_0F3A16_P_2 */
c0f3af97 9978 {
bf890a93 9979 { "vpextrK", { Edq, XM, Ib }, 0 },
c0f3af97
L
9980 },
9981
592a252b 9982 /* VEX_LEN_0F3A17_P_2 */
c0f3af97 9983 {
bf890a93 9984 { "vextractps", { Edqd, XM, Ib }, 0 },
c0f3af97
L
9985 },
9986
592a252b 9987 /* VEX_LEN_0F3A18_P_2 */
c0f3af97 9988 {
592d1631 9989 { Bad_Opcode },
592a252b 9990 { VEX_W_TABLE (VEX_W_0F3A18_P_2) },
c0f3af97
L
9991 },
9992
592a252b 9993 /* VEX_LEN_0F3A19_P_2 */
c0f3af97 9994 {
592d1631 9995 { Bad_Opcode },
592a252b 9996 { VEX_W_TABLE (VEX_W_0F3A19_P_2) },
c0f3af97
L
9997 },
9998
592a252b 9999 /* VEX_LEN_0F3A20_P_2 */
c0f3af97 10000 {
592a252b 10001 { VEX_W_TABLE (VEX_W_0F3A20_P_2) },
c0f3af97
L
10002 },
10003
592a252b 10004 /* VEX_LEN_0F3A21_P_2 */
c0f3af97 10005 {
592a252b 10006 { VEX_W_TABLE (VEX_W_0F3A21_P_2) },
c0f3af97
L
10007 },
10008
592a252b 10009 /* VEX_LEN_0F3A22_P_2 */
c0f3af97 10010 {
bf890a93 10011 { "vpinsrK", { XM, Vex128, Edq, Ib }, 0 },
c0f3af97
L
10012 },
10013
43234a1e
L
10014 /* VEX_LEN_0F3A30_P_2 */
10015 {
10016 { VEX_W_TABLE (VEX_W_0F3A30_P_2_LEN_0) },
10017 },
10018
1ba585e8
IT
10019 /* VEX_LEN_0F3A31_P_2 */
10020 {
10021 { VEX_W_TABLE (VEX_W_0F3A31_P_2_LEN_0) },
10022 },
10023
43234a1e
L
10024 /* VEX_LEN_0F3A32_P_2 */
10025 {
10026 { VEX_W_TABLE (VEX_W_0F3A32_P_2_LEN_0) },
10027 },
10028
1ba585e8
IT
10029 /* VEX_LEN_0F3A33_P_2 */
10030 {
10031 { VEX_W_TABLE (VEX_W_0F3A33_P_2_LEN_0) },
10032 },
10033
6c30d220 10034 /* VEX_LEN_0F3A38_P_2 */
c0f3af97 10035 {
6c30d220
L
10036 { Bad_Opcode },
10037 { VEX_W_TABLE (VEX_W_0F3A38_P_2) },
c0f3af97
L
10038 },
10039
6c30d220 10040 /* VEX_LEN_0F3A39_P_2 */
c0f3af97 10041 {
6c30d220
L
10042 { Bad_Opcode },
10043 { VEX_W_TABLE (VEX_W_0F3A39_P_2) },
10044 },
10045
10046 /* VEX_LEN_0F3A41_P_2 */
10047 {
10048 { VEX_W_TABLE (VEX_W_0F3A41_P_2) },
c0f3af97
L
10049 },
10050
592a252b 10051 /* VEX_LEN_0F3A44_P_2 */
ce2f5b3c 10052 {
592a252b 10053 { VEX_W_TABLE (VEX_W_0F3A44_P_2) },
ce2f5b3c
L
10054 },
10055
6c30d220 10056 /* VEX_LEN_0F3A46_P_2 */
c0f3af97 10057 {
6c30d220
L
10058 { Bad_Opcode },
10059 { VEX_W_TABLE (VEX_W_0F3A46_P_2) },
c0f3af97
L
10060 },
10061
592a252b 10062 /* VEX_LEN_0F3A60_P_2 */
c0f3af97 10063 {
15c7c1d8 10064 { "vpcmpestrm", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, 0 },
c0f3af97
L
10065 },
10066
592a252b 10067 /* VEX_LEN_0F3A61_P_2 */
c0f3af97 10068 {
15c7c1d8 10069 { "vpcmpestri", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, 0 },
c0f3af97
L
10070 },
10071
592a252b 10072 /* VEX_LEN_0F3A62_P_2 */
c0f3af97 10073 {
592a252b 10074 { VEX_W_TABLE (VEX_W_0F3A62_P_2) },
c0f3af97
L
10075 },
10076
592a252b 10077 /* VEX_LEN_0F3A63_P_2 */
c0f3af97 10078 {
592a252b 10079 { VEX_W_TABLE (VEX_W_0F3A63_P_2) },
c0f3af97
L
10080 },
10081
592a252b 10082 /* VEX_LEN_0F3A6A_P_2 */
922d8de8 10083 {
bf890a93 10084 { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 }, 0 },
922d8de8
DR
10085 },
10086
592a252b 10087 /* VEX_LEN_0F3A6B_P_2 */
922d8de8 10088 {
bf890a93 10089 { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 }, 0 },
922d8de8
DR
10090 },
10091
592a252b 10092 /* VEX_LEN_0F3A6E_P_2 */
922d8de8 10093 {
bf890a93 10094 { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 }, 0 },
922d8de8
DR
10095 },
10096
592a252b 10097 /* VEX_LEN_0F3A6F_P_2 */
922d8de8 10098 {
bf890a93 10099 { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 }, 0 },
922d8de8
DR
10100 },
10101
592a252b 10102 /* VEX_LEN_0F3A7A_P_2 */
922d8de8 10103 {
bf890a93 10104 { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 }, 0 },
922d8de8
DR
10105 },
10106
592a252b 10107 /* VEX_LEN_0F3A7B_P_2 */
922d8de8 10108 {
bf890a93 10109 { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 }, 0 },
922d8de8
DR
10110 },
10111
592a252b 10112 /* VEX_LEN_0F3A7E_P_2 */
922d8de8 10113 {
bf890a93 10114 { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 }, 0 },
922d8de8
DR
10115 },
10116
592a252b 10117 /* VEX_LEN_0F3A7F_P_2 */
922d8de8 10118 {
bf890a93 10119 { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 }, 0 },
922d8de8
DR
10120 },
10121
592a252b 10122 /* VEX_LEN_0F3ADF_P_2 */
a5ff0eb2 10123 {
592a252b 10124 { VEX_W_TABLE (VEX_W_0F3ADF_P_2) },
a5ff0eb2 10125 },
4c807e72 10126
6c30d220
L
10127 /* VEX_LEN_0F3AF0_P_3 */
10128 {
bf890a93 10129 { "rorxS", { Gdq, Edq, Ib }, 0 },
6c30d220
L
10130 },
10131
ff688e1f
L
10132 /* VEX_LEN_0FXOP_08_CC */
10133 {
bf890a93 10134 { "vpcomb", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10135 },
10136
10137 /* VEX_LEN_0FXOP_08_CD */
10138 {
bf890a93 10139 { "vpcomw", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10140 },
10141
10142 /* VEX_LEN_0FXOP_08_CE */
10143 {
bf890a93 10144 { "vpcomd", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10145 },
10146
10147 /* VEX_LEN_0FXOP_08_CF */
10148 {
bf890a93 10149 { "vpcomq", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10150 },
10151
10152 /* VEX_LEN_0FXOP_08_EC */
10153 {
bf890a93 10154 { "vpcomub", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10155 },
10156
10157 /* VEX_LEN_0FXOP_08_ED */
10158 {
bf890a93 10159 { "vpcomuw", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10160 },
10161
10162 /* VEX_LEN_0FXOP_08_EE */
10163 {
bf890a93 10164 { "vpcomud", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10165 },
10166
10167 /* VEX_LEN_0FXOP_08_EF */
10168 {
bf890a93 10169 { "vpcomuq", { XM, Vex128, EXx, Ib }, 0 },
ff688e1f
L
10170 },
10171
592a252b 10172 /* VEX_LEN_0FXOP_09_80 */
5dd85c99 10173 {
bf890a93
IT
10174 { "vfrczps", { XM, EXxmm }, 0 },
10175 { "vfrczps", { XM, EXymmq }, 0 },
5dd85c99 10176 },
4c807e72 10177
592a252b 10178 /* VEX_LEN_0FXOP_09_81 */
5dd85c99 10179 {
bf890a93
IT
10180 { "vfrczpd", { XM, EXxmm }, 0 },
10181 { "vfrczpd", { XM, EXymmq }, 0 },
5dd85c99 10182 },
331d2d0d
L
10183};
10184
9e30b8e0 10185static const struct dis386 vex_w_table[][2] = {
b844680a 10186 {
592a252b 10187 /* VEX_W_0F10_P_0 */
bf890a93 10188 { "vmovups", { XM, EXx }, 0 },
d8faab4e
L
10189 },
10190 {
592a252b 10191 /* VEX_W_0F10_P_1 */
bf890a93 10192 { "vmovss", { XMVexScalar, VexScalar, EXdScalar }, 0 },
d8faab4e
L
10193 },
10194 {
592a252b 10195 /* VEX_W_0F10_P_2 */
bf890a93 10196 { "vmovupd", { XM, EXx }, 0 },
d8faab4e
L
10197 },
10198 {
592a252b 10199 /* VEX_W_0F10_P_3 */
bf890a93 10200 { "vmovsd", { XMVexScalar, VexScalar, EXqScalar }, 0 },
d8faab4e
L
10201 },
10202 {
592a252b 10203 /* VEX_W_0F11_P_0 */
bf890a93 10204 { "vmovups", { EXxS, XM }, 0 },
d8faab4e
L
10205 },
10206 {
592a252b 10207 /* VEX_W_0F11_P_1 */
bf890a93 10208 { "vmovss", { EXdVexScalarS, VexScalar, XMScalar }, 0 },
b844680a
L
10209 },
10210 {
592a252b 10211 /* VEX_W_0F11_P_2 */
bf890a93 10212 { "vmovupd", { EXxS, XM }, 0 },
b844680a
L
10213 },
10214 {
592a252b 10215 /* VEX_W_0F11_P_3 */
bf890a93 10216 { "vmovsd", { EXqVexScalarS, VexScalar, XMScalar }, 0 },
d8faab4e
L
10217 },
10218 {
592a252b 10219 /* VEX_W_0F12_P_0_M_0 */
bf890a93 10220 { "vmovlps", { XM, Vex128, EXq }, 0 },
b844680a
L
10221 },
10222 {
592a252b 10223 /* VEX_W_0F12_P_0_M_1 */
bf890a93 10224 { "vmovhlps", { XM, Vex128, EXq }, 0 },
b844680a
L
10225 },
10226 {
592a252b 10227 /* VEX_W_0F12_P_1 */
bf890a93 10228 { "vmovsldup", { XM, EXx }, 0 },
b844680a
L
10229 },
10230 {
592a252b 10231 /* VEX_W_0F12_P_2 */
bf890a93 10232 { "vmovlpd", { XM, Vex128, EXq }, 0 },
b844680a
L
10233 },
10234 {
592a252b 10235 /* VEX_W_0F12_P_3 */
bf890a93 10236 { "vmovddup", { XM, EXymmq }, 0 },
b844680a
L
10237 },
10238 {
592a252b 10239 /* VEX_W_0F13_M_0 */
bf890a93 10240 { "vmovlpX", { EXq, XM }, 0 },
b844680a
L
10241 },
10242 {
592a252b 10243 /* VEX_W_0F14 */
bf890a93 10244 { "vunpcklpX", { XM, Vex, EXx }, 0 },
b844680a
L
10245 },
10246 {
592a252b 10247 /* VEX_W_0F15 */
bf890a93 10248 { "vunpckhpX", { XM, Vex, EXx }, 0 },
b844680a
L
10249 },
10250 {
592a252b 10251 /* VEX_W_0F16_P_0_M_0 */
bf890a93 10252 { "vmovhps", { XM, Vex128, EXq }, 0 },
9e30b8e0
L
10253 },
10254 {
592a252b 10255 /* VEX_W_0F16_P_0_M_1 */
bf890a93 10256 { "vmovlhps", { XM, Vex128, EXq }, 0 },
9e30b8e0
L
10257 },
10258 {
592a252b 10259 /* VEX_W_0F16_P_1 */
bf890a93 10260 { "vmovshdup", { XM, EXx }, 0 },
9e30b8e0
L
10261 },
10262 {
592a252b 10263 /* VEX_W_0F16_P_2 */
bf890a93 10264 { "vmovhpd", { XM, Vex128, EXq }, 0 },
9e30b8e0
L
10265 },
10266 {
592a252b 10267 /* VEX_W_0F17_M_0 */
bf890a93 10268 { "vmovhpX", { EXq, XM }, 0 },
9e30b8e0
L
10269 },
10270 {
592a252b 10271 /* VEX_W_0F28 */
bf890a93 10272 { "vmovapX", { XM, EXx }, 0 },
9e30b8e0
L
10273 },
10274 {
592a252b 10275 /* VEX_W_0F29 */
bf890a93 10276 { "vmovapX", { EXxS, XM }, 0 },
9e30b8e0
L
10277 },
10278 {
592a252b 10279 /* VEX_W_0F2B_M_0 */
bf890a93 10280 { "vmovntpX", { Mx, XM }, 0 },
9e30b8e0
L
10281 },
10282 {
592a252b 10283 /* VEX_W_0F2E_P_0 */
bf890a93 10284 { "vucomiss", { XMScalar, EXdScalar }, 0 },
9e30b8e0
L
10285 },
10286 {
592a252b 10287 /* VEX_W_0F2E_P_2 */
bf890a93 10288 { "vucomisd", { XMScalar, EXqScalar }, 0 },
9e30b8e0
L
10289 },
10290 {
592a252b 10291 /* VEX_W_0F2F_P_0 */
bf890a93 10292 { "vcomiss", { XMScalar, EXdScalar }, 0 },
9e30b8e0
L
10293 },
10294 {
592a252b 10295 /* VEX_W_0F2F_P_2 */
bf890a93 10296 { "vcomisd", { XMScalar, EXqScalar }, 0 },
9e30b8e0 10297 },
43234a1e
L
10298 {
10299 /* VEX_W_0F41_P_0_LEN_1 */
ab4e4ed5
AF
10300 { MOD_TABLE (MOD_VEX_W_0_0F41_P_0_LEN_1) },
10301 { MOD_TABLE (MOD_VEX_W_1_0F41_P_0_LEN_1) },
1ba585e8
IT
10302 },
10303 {
10304 /* VEX_W_0F41_P_2_LEN_1 */
ab4e4ed5
AF
10305 { MOD_TABLE (MOD_VEX_W_0_0F41_P_2_LEN_1) },
10306 { MOD_TABLE (MOD_VEX_W_1_0F41_P_2_LEN_1) }
43234a1e
L
10307 },
10308 {
10309 /* VEX_W_0F42_P_0_LEN_1 */
ab4e4ed5
AF
10310 { MOD_TABLE (MOD_VEX_W_0_0F42_P_0_LEN_1) },
10311 { MOD_TABLE (MOD_VEX_W_1_0F42_P_0_LEN_1) },
1ba585e8
IT
10312 },
10313 {
10314 /* VEX_W_0F42_P_2_LEN_1 */
ab4e4ed5
AF
10315 { MOD_TABLE (MOD_VEX_W_0_0F42_P_2_LEN_1) },
10316 { MOD_TABLE (MOD_VEX_W_1_0F42_P_2_LEN_1) },
43234a1e
L
10317 },
10318 {
10319 /* VEX_W_0F44_P_0_LEN_0 */
ab4e4ed5
AF
10320 { MOD_TABLE (MOD_VEX_W_0_0F44_P_0_LEN_1) },
10321 { MOD_TABLE (MOD_VEX_W_1_0F44_P_0_LEN_1) },
1ba585e8
IT
10322 },
10323 {
10324 /* VEX_W_0F44_P_2_LEN_0 */
ab4e4ed5
AF
10325 { MOD_TABLE (MOD_VEX_W_0_0F44_P_2_LEN_1) },
10326 { MOD_TABLE (MOD_VEX_W_1_0F44_P_2_LEN_1) },
43234a1e
L
10327 },
10328 {
10329 /* VEX_W_0F45_P_0_LEN_1 */
ab4e4ed5
AF
10330 { MOD_TABLE (MOD_VEX_W_0_0F45_P_0_LEN_1) },
10331 { MOD_TABLE (MOD_VEX_W_1_0F45_P_0_LEN_1) },
1ba585e8
IT
10332 },
10333 {
10334 /* VEX_W_0F45_P_2_LEN_1 */
ab4e4ed5
AF
10335 { MOD_TABLE (MOD_VEX_W_0_0F45_P_2_LEN_1) },
10336 { MOD_TABLE (MOD_VEX_W_1_0F45_P_2_LEN_1) },
43234a1e
L
10337 },
10338 {
10339 /* VEX_W_0F46_P_0_LEN_1 */
ab4e4ed5
AF
10340 { MOD_TABLE (MOD_VEX_W_0_0F46_P_0_LEN_1) },
10341 { MOD_TABLE (MOD_VEX_W_1_0F46_P_0_LEN_1) },
1ba585e8
IT
10342 },
10343 {
10344 /* VEX_W_0F46_P_2_LEN_1 */
ab4e4ed5
AF
10345 { MOD_TABLE (MOD_VEX_W_0_0F46_P_2_LEN_1) },
10346 { MOD_TABLE (MOD_VEX_W_1_0F46_P_2_LEN_1) },
43234a1e
L
10347 },
10348 {
10349 /* VEX_W_0F47_P_0_LEN_1 */
ab4e4ed5
AF
10350 { MOD_TABLE (MOD_VEX_W_0_0F47_P_0_LEN_1) },
10351 { MOD_TABLE (MOD_VEX_W_1_0F47_P_0_LEN_1) },
1ba585e8
IT
10352 },
10353 {
10354 /* VEX_W_0F47_P_2_LEN_1 */
ab4e4ed5
AF
10355 { MOD_TABLE (MOD_VEX_W_0_0F47_P_2_LEN_1) },
10356 { MOD_TABLE (MOD_VEX_W_1_0F47_P_2_LEN_1) },
1ba585e8
IT
10357 },
10358 {
10359 /* VEX_W_0F4A_P_0_LEN_1 */
ab4e4ed5
AF
10360 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_0_LEN_1) },
10361 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_0_LEN_1) },
1ba585e8
IT
10362 },
10363 {
10364 /* VEX_W_0F4A_P_2_LEN_1 */
ab4e4ed5
AF
10365 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_2_LEN_1) },
10366 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_2_LEN_1) },
1ba585e8
IT
10367 },
10368 {
10369 /* VEX_W_0F4B_P_0_LEN_1 */
ab4e4ed5
AF
10370 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_0_LEN_1) },
10371 { MOD_TABLE (MOD_VEX_W_1_0F4B_P_0_LEN_1) },
43234a1e
L
10372 },
10373 {
10374 /* VEX_W_0F4B_P_2_LEN_1 */
ab4e4ed5 10375 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_2_LEN_1) },
43234a1e 10376 },
9e30b8e0 10377 {
592a252b 10378 /* VEX_W_0F50_M_0 */
bf890a93 10379 { "vmovmskpX", { Gdq, XS }, 0 },
9e30b8e0
L
10380 },
10381 {
592a252b 10382 /* VEX_W_0F51_P_0 */
bf890a93 10383 { "vsqrtps", { XM, EXx }, 0 },
9e30b8e0
L
10384 },
10385 {
592a252b 10386 /* VEX_W_0F51_P_1 */
bf890a93 10387 { "vsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10388 },
10389 {
592a252b 10390 /* VEX_W_0F51_P_2 */
bf890a93 10391 { "vsqrtpd", { XM, EXx }, 0 },
9e30b8e0
L
10392 },
10393 {
592a252b 10394 /* VEX_W_0F51_P_3 */
bf890a93 10395 { "vsqrtsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10396 },
10397 {
592a252b 10398 /* VEX_W_0F52_P_0 */
bf890a93 10399 { "vrsqrtps", { XM, EXx }, 0 },
9e30b8e0
L
10400 },
10401 {
592a252b 10402 /* VEX_W_0F52_P_1 */
bf890a93 10403 { "vrsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10404 },
10405 {
592a252b 10406 /* VEX_W_0F53_P_0 */
bf890a93 10407 { "vrcpps", { XM, EXx }, 0 },
9e30b8e0
L
10408 },
10409 {
592a252b 10410 /* VEX_W_0F53_P_1 */
bf890a93 10411 { "vrcpss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10412 },
10413 {
592a252b 10414 /* VEX_W_0F58_P_0 */
bf890a93 10415 { "vaddps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10416 },
10417 {
592a252b 10418 /* VEX_W_0F58_P_1 */
bf890a93 10419 { "vaddss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10420 },
10421 {
592a252b 10422 /* VEX_W_0F58_P_2 */
bf890a93 10423 { "vaddpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10424 },
10425 {
592a252b 10426 /* VEX_W_0F58_P_3 */
bf890a93 10427 { "vaddsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10428 },
10429 {
592a252b 10430 /* VEX_W_0F59_P_0 */
bf890a93 10431 { "vmulps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10432 },
10433 {
592a252b 10434 /* VEX_W_0F59_P_1 */
bf890a93 10435 { "vmulss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10436 },
10437 {
592a252b 10438 /* VEX_W_0F59_P_2 */
bf890a93 10439 { "vmulpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10440 },
10441 {
592a252b 10442 /* VEX_W_0F59_P_3 */
bf890a93 10443 { "vmulsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10444 },
10445 {
592a252b 10446 /* VEX_W_0F5A_P_0 */
bf890a93 10447 { "vcvtps2pd", { XM, EXxmmq }, 0 },
9e30b8e0
L
10448 },
10449 {
592a252b 10450 /* VEX_W_0F5A_P_1 */
bf890a93 10451 { "vcvtss2sd", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10452 },
10453 {
592a252b 10454 /* VEX_W_0F5A_P_3 */
bf890a93 10455 { "vcvtsd2ss", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10456 },
10457 {
592a252b 10458 /* VEX_W_0F5B_P_0 */
bf890a93 10459 { "vcvtdq2ps", { XM, EXx }, 0 },
9e30b8e0
L
10460 },
10461 {
592a252b 10462 /* VEX_W_0F5B_P_1 */
bf890a93 10463 { "vcvttps2dq", { XM, EXx }, 0 },
9e30b8e0
L
10464 },
10465 {
592a252b 10466 /* VEX_W_0F5B_P_2 */
bf890a93 10467 { "vcvtps2dq", { XM, EXx }, 0 },
9e30b8e0
L
10468 },
10469 {
592a252b 10470 /* VEX_W_0F5C_P_0 */
bf890a93 10471 { "vsubps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10472 },
10473 {
592a252b 10474 /* VEX_W_0F5C_P_1 */
bf890a93 10475 { "vsubss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10476 },
10477 {
592a252b 10478 /* VEX_W_0F5C_P_2 */
bf890a93 10479 { "vsubpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10480 },
10481 {
592a252b 10482 /* VEX_W_0F5C_P_3 */
bf890a93 10483 { "vsubsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10484 },
10485 {
592a252b 10486 /* VEX_W_0F5D_P_0 */
bf890a93 10487 { "vminps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10488 },
10489 {
592a252b 10490 /* VEX_W_0F5D_P_1 */
bf890a93 10491 { "vminss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10492 },
10493 {
592a252b 10494 /* VEX_W_0F5D_P_2 */
bf890a93 10495 { "vminpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10496 },
10497 {
592a252b 10498 /* VEX_W_0F5D_P_3 */
bf890a93 10499 { "vminsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10500 },
10501 {
592a252b 10502 /* VEX_W_0F5E_P_0 */
bf890a93 10503 { "vdivps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10504 },
10505 {
592a252b 10506 /* VEX_W_0F5E_P_1 */
bf890a93 10507 { "vdivss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10508 },
10509 {
592a252b 10510 /* VEX_W_0F5E_P_2 */
bf890a93 10511 { "vdivpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10512 },
10513 {
592a252b 10514 /* VEX_W_0F5E_P_3 */
bf890a93 10515 { "vdivsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10516 },
10517 {
592a252b 10518 /* VEX_W_0F5F_P_0 */
bf890a93 10519 { "vmaxps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10520 },
10521 {
592a252b 10522 /* VEX_W_0F5F_P_1 */
bf890a93 10523 { "vmaxss", { XMScalar, VexScalar, EXdScalar }, 0 },
9e30b8e0
L
10524 },
10525 {
592a252b 10526 /* VEX_W_0F5F_P_2 */
bf890a93 10527 { "vmaxpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10528 },
10529 {
592a252b 10530 /* VEX_W_0F5F_P_3 */
bf890a93 10531 { "vmaxsd", { XMScalar, VexScalar, EXqScalar }, 0 },
9e30b8e0
L
10532 },
10533 {
592a252b 10534 /* VEX_W_0F60_P_2 */
bf890a93 10535 { "vpunpcklbw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10536 },
10537 {
592a252b 10538 /* VEX_W_0F61_P_2 */
bf890a93 10539 { "vpunpcklwd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10540 },
10541 {
592a252b 10542 /* VEX_W_0F62_P_2 */
bf890a93 10543 { "vpunpckldq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10544 },
10545 {
592a252b 10546 /* VEX_W_0F63_P_2 */
bf890a93 10547 { "vpacksswb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10548 },
10549 {
592a252b 10550 /* VEX_W_0F64_P_2 */
bf890a93 10551 { "vpcmpgtb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10552 },
10553 {
592a252b 10554 /* VEX_W_0F65_P_2 */
bf890a93 10555 { "vpcmpgtw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10556 },
10557 {
592a252b 10558 /* VEX_W_0F66_P_2 */
bf890a93 10559 { "vpcmpgtd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10560 },
10561 {
592a252b 10562 /* VEX_W_0F67_P_2 */
bf890a93 10563 { "vpackuswb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10564 },
10565 {
592a252b 10566 /* VEX_W_0F68_P_2 */
bf890a93 10567 { "vpunpckhbw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10568 },
10569 {
592a252b 10570 /* VEX_W_0F69_P_2 */
bf890a93 10571 { "vpunpckhwd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10572 },
10573 {
592a252b 10574 /* VEX_W_0F6A_P_2 */
bf890a93 10575 { "vpunpckhdq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10576 },
10577 {
592a252b 10578 /* VEX_W_0F6B_P_2 */
bf890a93 10579 { "vpackssdw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10580 },
10581 {
592a252b 10582 /* VEX_W_0F6C_P_2 */
bf890a93 10583 { "vpunpcklqdq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10584 },
10585 {
592a252b 10586 /* VEX_W_0F6D_P_2 */
bf890a93 10587 { "vpunpckhqdq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10588 },
10589 {
592a252b 10590 /* VEX_W_0F6F_P_1 */
bf890a93 10591 { "vmovdqu", { XM, EXx }, 0 },
9e30b8e0
L
10592 },
10593 {
592a252b 10594 /* VEX_W_0F6F_P_2 */
bf890a93 10595 { "vmovdqa", { XM, EXx }, 0 },
9e30b8e0
L
10596 },
10597 {
592a252b 10598 /* VEX_W_0F70_P_1 */
bf890a93 10599 { "vpshufhw", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10600 },
10601 {
592a252b 10602 /* VEX_W_0F70_P_2 */
bf890a93 10603 { "vpshufd", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10604 },
10605 {
592a252b 10606 /* VEX_W_0F70_P_3 */
bf890a93 10607 { "vpshuflw", { XM, EXx, Ib }, 0 },
9e30b8e0
L
10608 },
10609 {
592a252b 10610 /* VEX_W_0F71_R_2_P_2 */
bf890a93 10611 { "vpsrlw", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10612 },
10613 {
592a252b 10614 /* VEX_W_0F71_R_4_P_2 */
bf890a93 10615 { "vpsraw", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10616 },
10617 {
592a252b 10618 /* VEX_W_0F71_R_6_P_2 */
bf890a93 10619 { "vpsllw", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10620 },
10621 {
592a252b 10622 /* VEX_W_0F72_R_2_P_2 */
bf890a93 10623 { "vpsrld", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10624 },
10625 {
592a252b 10626 /* VEX_W_0F72_R_4_P_2 */
bf890a93 10627 { "vpsrad", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10628 },
10629 {
592a252b 10630 /* VEX_W_0F72_R_6_P_2 */
bf890a93 10631 { "vpslld", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10632 },
10633 {
592a252b 10634 /* VEX_W_0F73_R_2_P_2 */
bf890a93 10635 { "vpsrlq", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10636 },
10637 {
592a252b 10638 /* VEX_W_0F73_R_3_P_2 */
bf890a93 10639 { "vpsrldq", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10640 },
10641 {
592a252b 10642 /* VEX_W_0F73_R_6_P_2 */
bf890a93 10643 { "vpsllq", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10644 },
10645 {
592a252b 10646 /* VEX_W_0F73_R_7_P_2 */
bf890a93 10647 { "vpslldq", { Vex, XS, Ib }, 0 },
9e30b8e0
L
10648 },
10649 {
592a252b 10650 /* VEX_W_0F74_P_2 */
bf890a93 10651 { "vpcmpeqb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10652 },
10653 {
592a252b 10654 /* VEX_W_0F75_P_2 */
bf890a93 10655 { "vpcmpeqw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10656 },
10657 {
592a252b 10658 /* VEX_W_0F76_P_2 */
bf890a93 10659 { "vpcmpeqd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10660 },
10661 {
592a252b 10662 /* VEX_W_0F77_P_0 */
bf890a93 10663 { "", { VZERO }, 0 },
9e30b8e0
L
10664 },
10665 {
592a252b 10666 /* VEX_W_0F7C_P_2 */
bf890a93 10667 { "vhaddpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10668 },
10669 {
592a252b 10670 /* VEX_W_0F7C_P_3 */
bf890a93 10671 { "vhaddps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10672 },
10673 {
592a252b 10674 /* VEX_W_0F7D_P_2 */
bf890a93 10675 { "vhsubpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10676 },
10677 {
592a252b 10678 /* VEX_W_0F7D_P_3 */
bf890a93 10679 { "vhsubps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10680 },
10681 {
592a252b 10682 /* VEX_W_0F7E_P_1 */
bf890a93 10683 { "vmovq", { XMScalar, EXqScalar }, 0 },
9e30b8e0
L
10684 },
10685 {
592a252b 10686 /* VEX_W_0F7F_P_1 */
bf890a93 10687 { "vmovdqu", { EXxS, XM }, 0 },
9e30b8e0
L
10688 },
10689 {
592a252b 10690 /* VEX_W_0F7F_P_2 */
bf890a93 10691 { "vmovdqa", { EXxS, XM }, 0 },
9e30b8e0 10692 },
43234a1e
L
10693 {
10694 /* VEX_W_0F90_P_0_LEN_0 */
bf890a93
IT
10695 { "kmovw", { MaskG, MaskE }, 0 },
10696 { "kmovq", { MaskG, MaskE }, 0 },
1ba585e8
IT
10697 },
10698 {
10699 /* VEX_W_0F90_P_2_LEN_0 */
bf890a93
IT
10700 { "kmovb", { MaskG, MaskBDE }, 0 },
10701 { "kmovd", { MaskG, MaskBDE }, 0 },
43234a1e
L
10702 },
10703 {
10704 /* VEX_W_0F91_P_0_LEN_0 */
ab4e4ed5
AF
10705 { MOD_TABLE (MOD_VEX_W_0_0F91_P_0_LEN_0) },
10706 { MOD_TABLE (MOD_VEX_W_1_0F91_P_0_LEN_0) },
1ba585e8
IT
10707 },
10708 {
10709 /* VEX_W_0F91_P_2_LEN_0 */
ab4e4ed5
AF
10710 { MOD_TABLE (MOD_VEX_W_0_0F91_P_2_LEN_0) },
10711 { MOD_TABLE (MOD_VEX_W_1_0F91_P_2_LEN_0) },
43234a1e
L
10712 },
10713 {
10714 /* VEX_W_0F92_P_0_LEN_0 */
ab4e4ed5 10715 { MOD_TABLE (MOD_VEX_W_0_0F92_P_0_LEN_0) },
43234a1e 10716 },
90a915bf
IT
10717 {
10718 /* VEX_W_0F92_P_2_LEN_0 */
ab4e4ed5 10719 { MOD_TABLE (MOD_VEX_W_0_0F92_P_2_LEN_0) },
90a915bf 10720 },
1ba585e8
IT
10721 {
10722 /* VEX_W_0F92_P_3_LEN_0 */
ab4e4ed5
AF
10723 { MOD_TABLE (MOD_VEX_W_0_0F92_P_3_LEN_0) },
10724 { MOD_TABLE (MOD_VEX_W_1_0F92_P_3_LEN_0) },
1ba585e8 10725 },
43234a1e
L
10726 {
10727 /* VEX_W_0F93_P_0_LEN_0 */
ab4e4ed5 10728 { MOD_TABLE (MOD_VEX_W_0_0F93_P_0_LEN_0) },
43234a1e 10729 },
90a915bf
IT
10730 {
10731 /* VEX_W_0F93_P_2_LEN_0 */
ab4e4ed5 10732 { MOD_TABLE (MOD_VEX_W_0_0F93_P_2_LEN_0) },
90a915bf 10733 },
1ba585e8
IT
10734 {
10735 /* VEX_W_0F93_P_3_LEN_0 */
ab4e4ed5
AF
10736 { MOD_TABLE (MOD_VEX_W_0_0F93_P_3_LEN_0) },
10737 { MOD_TABLE (MOD_VEX_W_1_0F93_P_3_LEN_0) },
1ba585e8 10738 },
43234a1e
L
10739 {
10740 /* VEX_W_0F98_P_0_LEN_0 */
ab4e4ed5
AF
10741 { MOD_TABLE (MOD_VEX_W_0_0F98_P_0_LEN_0) },
10742 { MOD_TABLE (MOD_VEX_W_1_0F98_P_0_LEN_0) },
1ba585e8
IT
10743 },
10744 {
10745 /* VEX_W_0F98_P_2_LEN_0 */
ab4e4ed5
AF
10746 { MOD_TABLE (MOD_VEX_W_0_0F98_P_2_LEN_0) },
10747 { MOD_TABLE (MOD_VEX_W_1_0F98_P_2_LEN_0) },
1ba585e8
IT
10748 },
10749 {
10750 /* VEX_W_0F99_P_0_LEN_0 */
ab4e4ed5
AF
10751 { MOD_TABLE (MOD_VEX_W_0_0F99_P_0_LEN_0) },
10752 { MOD_TABLE (MOD_VEX_W_1_0F99_P_0_LEN_0) },
1ba585e8
IT
10753 },
10754 {
10755 /* VEX_W_0F99_P_2_LEN_0 */
ab4e4ed5
AF
10756 { MOD_TABLE (MOD_VEX_W_0_0F99_P_2_LEN_0) },
10757 { MOD_TABLE (MOD_VEX_W_1_0F99_P_2_LEN_0) },
43234a1e 10758 },
9e30b8e0 10759 {
592a252b 10760 /* VEX_W_0FAE_R_2_M_0 */
bf890a93 10761 { "vldmxcsr", { Md }, 0 },
9e30b8e0
L
10762 },
10763 {
592a252b 10764 /* VEX_W_0FAE_R_3_M_0 */
bf890a93 10765 { "vstmxcsr", { Md }, 0 },
9e30b8e0
L
10766 },
10767 {
592a252b 10768 /* VEX_W_0FC2_P_0 */
bf890a93 10769 { "vcmpps", { XM, Vex, EXx, VCMP }, 0 },
9e30b8e0
L
10770 },
10771 {
592a252b 10772 /* VEX_W_0FC2_P_1 */
bf890a93 10773 { "vcmpss", { XMScalar, VexScalar, EXdScalar, VCMP }, 0 },
9e30b8e0
L
10774 },
10775 {
592a252b 10776 /* VEX_W_0FC2_P_2 */
bf890a93 10777 { "vcmppd", { XM, Vex, EXx, VCMP }, 0 },
9e30b8e0
L
10778 },
10779 {
592a252b 10780 /* VEX_W_0FC2_P_3 */
bf890a93 10781 { "vcmpsd", { XMScalar, VexScalar, EXqScalar, VCMP }, 0 },
9e30b8e0
L
10782 },
10783 {
592a252b 10784 /* VEX_W_0FC4_P_2 */
bf890a93 10785 { "vpinsrw", { XM, Vex128, Edqw, Ib }, 0 },
9e30b8e0
L
10786 },
10787 {
592a252b 10788 /* VEX_W_0FC5_P_2 */
bf890a93 10789 { "vpextrw", { Gdq, XS, Ib }, 0 },
9e30b8e0
L
10790 },
10791 {
592a252b 10792 /* VEX_W_0FD0_P_2 */
bf890a93 10793 { "vaddsubpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10794 },
10795 {
592a252b 10796 /* VEX_W_0FD0_P_3 */
bf890a93 10797 { "vaddsubps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10798 },
10799 {
592a252b 10800 /* VEX_W_0FD1_P_2 */
bf890a93 10801 { "vpsrlw", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10802 },
10803 {
592a252b 10804 /* VEX_W_0FD2_P_2 */
bf890a93 10805 { "vpsrld", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10806 },
10807 {
592a252b 10808 /* VEX_W_0FD3_P_2 */
bf890a93 10809 { "vpsrlq", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10810 },
10811 {
592a252b 10812 /* VEX_W_0FD4_P_2 */
bf890a93 10813 { "vpaddq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10814 },
10815 {
592a252b 10816 /* VEX_W_0FD5_P_2 */
bf890a93 10817 { "vpmullw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10818 },
10819 {
592a252b 10820 /* VEX_W_0FD6_P_2 */
bf890a93 10821 { "vmovq", { EXqScalarS, XMScalar }, 0 },
9e30b8e0
L
10822 },
10823 {
592a252b 10824 /* VEX_W_0FD7_P_2_M_1 */
bf890a93 10825 { "vpmovmskb", { Gdq, XS }, 0 },
9e30b8e0
L
10826 },
10827 {
592a252b 10828 /* VEX_W_0FD8_P_2 */
bf890a93 10829 { "vpsubusb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10830 },
10831 {
592a252b 10832 /* VEX_W_0FD9_P_2 */
bf890a93 10833 { "vpsubusw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10834 },
10835 {
592a252b 10836 /* VEX_W_0FDA_P_2 */
bf890a93 10837 { "vpminub", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10838 },
10839 {
592a252b 10840 /* VEX_W_0FDB_P_2 */
bf890a93 10841 { "vpand", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10842 },
10843 {
592a252b 10844 /* VEX_W_0FDC_P_2 */
bf890a93 10845 { "vpaddusb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10846 },
10847 {
592a252b 10848 /* VEX_W_0FDD_P_2 */
bf890a93 10849 { "vpaddusw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10850 },
10851 {
592a252b 10852 /* VEX_W_0FDE_P_2 */
bf890a93 10853 { "vpmaxub", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10854 },
10855 {
592a252b 10856 /* VEX_W_0FDF_P_2 */
bf890a93 10857 { "vpandn", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10858 },
10859 {
592a252b 10860 /* VEX_W_0FE0_P_2 */
bf890a93 10861 { "vpavgb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10862 },
10863 {
592a252b 10864 /* VEX_W_0FE1_P_2 */
bf890a93 10865 { "vpsraw", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10866 },
10867 {
592a252b 10868 /* VEX_W_0FE2_P_2 */
bf890a93 10869 { "vpsrad", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10870 },
10871 {
592a252b 10872 /* VEX_W_0FE3_P_2 */
bf890a93 10873 { "vpavgw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10874 },
10875 {
592a252b 10876 /* VEX_W_0FE4_P_2 */
bf890a93 10877 { "vpmulhuw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10878 },
10879 {
592a252b 10880 /* VEX_W_0FE5_P_2 */
bf890a93 10881 { "vpmulhw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10882 },
10883 {
592a252b 10884 /* VEX_W_0FE6_P_1 */
bf890a93 10885 { "vcvtdq2pd", { XM, EXxmmq }, 0 },
9e30b8e0
L
10886 },
10887 {
592a252b 10888 /* VEX_W_0FE6_P_2 */
bf890a93 10889 { "vcvttpd2dq%XY", { XMM, EXx }, 0 },
9e30b8e0
L
10890 },
10891 {
592a252b 10892 /* VEX_W_0FE6_P_3 */
bf890a93 10893 { "vcvtpd2dq%XY", { XMM, EXx }, 0 },
9e30b8e0
L
10894 },
10895 {
592a252b 10896 /* VEX_W_0FE7_P_2_M_0 */
bf890a93 10897 { "vmovntdq", { Mx, XM }, 0 },
9e30b8e0
L
10898 },
10899 {
592a252b 10900 /* VEX_W_0FE8_P_2 */
bf890a93 10901 { "vpsubsb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10902 },
10903 {
592a252b 10904 /* VEX_W_0FE9_P_2 */
bf890a93 10905 { "vpsubsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10906 },
10907 {
592a252b 10908 /* VEX_W_0FEA_P_2 */
bf890a93 10909 { "vpminsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10910 },
10911 {
592a252b 10912 /* VEX_W_0FEB_P_2 */
bf890a93 10913 { "vpor", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10914 },
10915 {
592a252b 10916 /* VEX_W_0FEC_P_2 */
bf890a93 10917 { "vpaddsb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10918 },
10919 {
592a252b 10920 /* VEX_W_0FED_P_2 */
bf890a93 10921 { "vpaddsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10922 },
10923 {
592a252b 10924 /* VEX_W_0FEE_P_2 */
bf890a93 10925 { "vpmaxsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10926 },
10927 {
592a252b 10928 /* VEX_W_0FEF_P_2 */
bf890a93 10929 { "vpxor", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10930 },
10931 {
592a252b 10932 /* VEX_W_0FF0_P_3_M_0 */
bf890a93 10933 { "vlddqu", { XM, M }, 0 },
9e30b8e0
L
10934 },
10935 {
592a252b 10936 /* VEX_W_0FF1_P_2 */
bf890a93 10937 { "vpsllw", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10938 },
10939 {
592a252b 10940 /* VEX_W_0FF2_P_2 */
bf890a93 10941 { "vpslld", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10942 },
10943 {
592a252b 10944 /* VEX_W_0FF3_P_2 */
bf890a93 10945 { "vpsllq", { XM, Vex, EXxmm }, 0 },
9e30b8e0
L
10946 },
10947 {
592a252b 10948 /* VEX_W_0FF4_P_2 */
bf890a93 10949 { "vpmuludq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10950 },
10951 {
592a252b 10952 /* VEX_W_0FF5_P_2 */
bf890a93 10953 { "vpmaddwd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10954 },
10955 {
592a252b 10956 /* VEX_W_0FF6_P_2 */
bf890a93 10957 { "vpsadbw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10958 },
10959 {
592a252b 10960 /* VEX_W_0FF7_P_2 */
bf890a93 10961 { "vmaskmovdqu", { XM, XS }, 0 },
9e30b8e0
L
10962 },
10963 {
592a252b 10964 /* VEX_W_0FF8_P_2 */
bf890a93 10965 { "vpsubb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10966 },
10967 {
592a252b 10968 /* VEX_W_0FF9_P_2 */
bf890a93 10969 { "vpsubw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10970 },
10971 {
592a252b 10972 /* VEX_W_0FFA_P_2 */
bf890a93 10973 { "vpsubd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10974 },
10975 {
592a252b 10976 /* VEX_W_0FFB_P_2 */
bf890a93 10977 { "vpsubq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10978 },
10979 {
592a252b 10980 /* VEX_W_0FFC_P_2 */
bf890a93 10981 { "vpaddb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10982 },
10983 {
592a252b 10984 /* VEX_W_0FFD_P_2 */
bf890a93 10985 { "vpaddw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10986 },
10987 {
592a252b 10988 /* VEX_W_0FFE_P_2 */
bf890a93 10989 { "vpaddd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10990 },
10991 {
592a252b 10992 /* VEX_W_0F3800_P_2 */
bf890a93 10993 { "vpshufb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10994 },
10995 {
592a252b 10996 /* VEX_W_0F3801_P_2 */
bf890a93 10997 { "vphaddw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
10998 },
10999 {
592a252b 11000 /* VEX_W_0F3802_P_2 */
bf890a93 11001 { "vphaddd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11002 },
11003 {
592a252b 11004 /* VEX_W_0F3803_P_2 */
bf890a93 11005 { "vphaddsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11006 },
11007 {
592a252b 11008 /* VEX_W_0F3804_P_2 */
bf890a93 11009 { "vpmaddubsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11010 },
11011 {
592a252b 11012 /* VEX_W_0F3805_P_2 */
bf890a93 11013 { "vphsubw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11014 },
11015 {
592a252b 11016 /* VEX_W_0F3806_P_2 */
bf890a93 11017 { "vphsubd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11018 },
11019 {
592a252b 11020 /* VEX_W_0F3807_P_2 */
bf890a93 11021 { "vphsubsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11022 },
11023 {
592a252b 11024 /* VEX_W_0F3808_P_2 */
bf890a93 11025 { "vpsignb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11026 },
11027 {
592a252b 11028 /* VEX_W_0F3809_P_2 */
bf890a93 11029 { "vpsignw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11030 },
11031 {
592a252b 11032 /* VEX_W_0F380A_P_2 */
bf890a93 11033 { "vpsignd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11034 },
11035 {
592a252b 11036 /* VEX_W_0F380B_P_2 */
bf890a93 11037 { "vpmulhrsw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11038 },
11039 {
592a252b 11040 /* VEX_W_0F380C_P_2 */
bf890a93 11041 { "vpermilps", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11042 },
11043 {
592a252b 11044 /* VEX_W_0F380D_P_2 */
bf890a93 11045 { "vpermilpd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11046 },
11047 {
592a252b 11048 /* VEX_W_0F380E_P_2 */
bf890a93 11049 { "vtestps", { XM, EXx }, 0 },
9e30b8e0
L
11050 },
11051 {
592a252b 11052 /* VEX_W_0F380F_P_2 */
bf890a93 11053 { "vtestpd", { XM, EXx }, 0 },
9e30b8e0 11054 },
6c30d220
L
11055 {
11056 /* VEX_W_0F3816_P_2 */
bf890a93 11057 { "vpermps", { XM, Vex, EXx }, 0 },
6c30d220 11058 },
9e30b8e0 11059 {
592a252b 11060 /* VEX_W_0F3817_P_2 */
bf890a93 11061 { "vptest", { XM, EXx }, 0 },
9e30b8e0 11062 },
bcf2684f 11063 {
6c30d220 11064 /* VEX_W_0F3818_P_2 */
bf890a93 11065 { "vbroadcastss", { XM, EXxmm_md }, 0 },
bcf2684f 11066 },
9e30b8e0 11067 {
6c30d220 11068 /* VEX_W_0F3819_P_2 */
bf890a93 11069 { "vbroadcastsd", { XM, EXxmm_mq }, 0 },
9e30b8e0
L
11070 },
11071 {
592a252b 11072 /* VEX_W_0F381A_P_2_M_0 */
bf890a93 11073 { "vbroadcastf128", { XM, Mxmm }, 0 },
9e30b8e0
L
11074 },
11075 {
592a252b 11076 /* VEX_W_0F381C_P_2 */
bf890a93 11077 { "vpabsb", { XM, EXx }, 0 },
9e30b8e0
L
11078 },
11079 {
592a252b 11080 /* VEX_W_0F381D_P_2 */
bf890a93 11081 { "vpabsw", { XM, EXx }, 0 },
9e30b8e0
L
11082 },
11083 {
592a252b 11084 /* VEX_W_0F381E_P_2 */
bf890a93 11085 { "vpabsd", { XM, EXx }, 0 },
9e30b8e0
L
11086 },
11087 {
592a252b 11088 /* VEX_W_0F3820_P_2 */
bf890a93 11089 { "vpmovsxbw", { XM, EXxmmq }, 0 },
9e30b8e0
L
11090 },
11091 {
592a252b 11092 /* VEX_W_0F3821_P_2 */
bf890a93 11093 { "vpmovsxbd", { XM, EXxmmqd }, 0 },
9e30b8e0
L
11094 },
11095 {
592a252b 11096 /* VEX_W_0F3822_P_2 */
bf890a93 11097 { "vpmovsxbq", { XM, EXxmmdw }, 0 },
9e30b8e0
L
11098 },
11099 {
592a252b 11100 /* VEX_W_0F3823_P_2 */
bf890a93 11101 { "vpmovsxwd", { XM, EXxmmq }, 0 },
9e30b8e0
L
11102 },
11103 {
592a252b 11104 /* VEX_W_0F3824_P_2 */
bf890a93 11105 { "vpmovsxwq", { XM, EXxmmqd }, 0 },
9e30b8e0
L
11106 },
11107 {
592a252b 11108 /* VEX_W_0F3825_P_2 */
bf890a93 11109 { "vpmovsxdq", { XM, EXxmmq }, 0 },
9e30b8e0
L
11110 },
11111 {
592a252b 11112 /* VEX_W_0F3828_P_2 */
bf890a93 11113 { "vpmuldq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11114 },
11115 {
592a252b 11116 /* VEX_W_0F3829_P_2 */
bf890a93 11117 { "vpcmpeqq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11118 },
11119 {
592a252b 11120 /* VEX_W_0F382A_P_2_M_0 */
bf890a93 11121 { "vmovntdqa", { XM, Mx }, 0 },
9e30b8e0
L
11122 },
11123 {
592a252b 11124 /* VEX_W_0F382B_P_2 */
bf890a93 11125 { "vpackusdw", { XM, Vex, EXx }, 0 },
9e30b8e0 11126 },
53aa04a0 11127 {
592a252b 11128 /* VEX_W_0F382C_P_2_M_0 */
bf890a93 11129 { "vmaskmovps", { XM, Vex, Mx }, 0 },
53aa04a0
L
11130 },
11131 {
592a252b 11132 /* VEX_W_0F382D_P_2_M_0 */
bf890a93 11133 { "vmaskmovpd", { XM, Vex, Mx }, 0 },
53aa04a0
L
11134 },
11135 {
592a252b 11136 /* VEX_W_0F382E_P_2_M_0 */
bf890a93 11137 { "vmaskmovps", { Mx, Vex, XM }, 0 },
53aa04a0
L
11138 },
11139 {
592a252b 11140 /* VEX_W_0F382F_P_2_M_0 */
bf890a93 11141 { "vmaskmovpd", { Mx, Vex, XM }, 0 },
53aa04a0 11142 },
9e30b8e0 11143 {
592a252b 11144 /* VEX_W_0F3830_P_2 */
bf890a93 11145 { "vpmovzxbw", { XM, EXxmmq }, 0 },
9e30b8e0
L
11146 },
11147 {
592a252b 11148 /* VEX_W_0F3831_P_2 */
bf890a93 11149 { "vpmovzxbd", { XM, EXxmmqd }, 0 },
9e30b8e0
L
11150 },
11151 {
592a252b 11152 /* VEX_W_0F3832_P_2 */
bf890a93 11153 { "vpmovzxbq", { XM, EXxmmdw }, 0 },
9e30b8e0
L
11154 },
11155 {
592a252b 11156 /* VEX_W_0F3833_P_2 */
bf890a93 11157 { "vpmovzxwd", { XM, EXxmmq }, 0 },
9e30b8e0
L
11158 },
11159 {
592a252b 11160 /* VEX_W_0F3834_P_2 */
bf890a93 11161 { "vpmovzxwq", { XM, EXxmmqd }, 0 },
9e30b8e0
L
11162 },
11163 {
592a252b 11164 /* VEX_W_0F3835_P_2 */
bf890a93 11165 { "vpmovzxdq", { XM, EXxmmq }, 0 },
6c30d220
L
11166 },
11167 {
11168 /* VEX_W_0F3836_P_2 */
bf890a93 11169 { "vpermd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11170 },
11171 {
592a252b 11172 /* VEX_W_0F3837_P_2 */
bf890a93 11173 { "vpcmpgtq", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11174 },
11175 {
592a252b 11176 /* VEX_W_0F3838_P_2 */
bf890a93 11177 { "vpminsb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11178 },
11179 {
592a252b 11180 /* VEX_W_0F3839_P_2 */
bf890a93 11181 { "vpminsd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11182 },
11183 {
592a252b 11184 /* VEX_W_0F383A_P_2 */
bf890a93 11185 { "vpminuw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11186 },
11187 {
592a252b 11188 /* VEX_W_0F383B_P_2 */
bf890a93 11189 { "vpminud", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11190 },
11191 {
592a252b 11192 /* VEX_W_0F383C_P_2 */
bf890a93 11193 { "vpmaxsb", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11194 },
11195 {
592a252b 11196 /* VEX_W_0F383D_P_2 */
bf890a93 11197 { "vpmaxsd", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11198 },
11199 {
592a252b 11200 /* VEX_W_0F383E_P_2 */
bf890a93 11201 { "vpmaxuw", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11202 },
11203 {
592a252b 11204 /* VEX_W_0F383F_P_2 */
bf890a93 11205 { "vpmaxud", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11206 },
11207 {
592a252b 11208 /* VEX_W_0F3840_P_2 */
bf890a93 11209 { "vpmulld", { XM, Vex, EXx }, 0 },
9e30b8e0
L
11210 },
11211 {
592a252b 11212 /* VEX_W_0F3841_P_2 */
bf890a93 11213 { "vphminposuw", { XM, EXx }, 0 },
9e30b8e0 11214 },
6c30d220
L
11215 {
11216 /* VEX_W_0F3846_P_2 */
bf890a93 11217 { "vpsravd", { XM, Vex, EXx }, 0 },
6c30d220
L
11218 },
11219 {
11220 /* VEX_W_0F3858_P_2 */
bf890a93 11221 { "vpbroadcastd", { XM, EXxmm_md }, 0 },
6c30d220
L
11222 },
11223 {
11224 /* VEX_W_0F3859_P_2 */
bf890a93 11225 { "vpbroadcastq", { XM, EXxmm_mq }, 0 },
6c30d220
L
11226 },
11227 {
11228 /* VEX_W_0F385A_P_2_M_0 */
bf890a93 11229 { "vbroadcasti128", { XM, Mxmm }, 0 },
6c30d220
L
11230 },
11231 {
11232 /* VEX_W_0F3878_P_2 */
bf890a93 11233 { "vpbroadcastb", { XM, EXxmm_mb }, 0 },
6c30d220
L
11234 },
11235 {
11236 /* VEX_W_0F3879_P_2 */
bf890a93 11237 { "vpbroadcastw", { XM, EXxmm_mw }, 0 },
6c30d220 11238 },
9e30b8e0 11239 {
592a252b 11240 /* VEX_W_0F38DB_P_2 */
bf890a93 11241 { "vaesimc", { XM, EXx }, 0 },
9e30b8e0
L
11242 },
11243 {
592a252b 11244 /* VEX_W_0F38DC_P_2 */
bf890a93 11245 { "vaesenc", { XM, Vex128, EXx }, 0 },
9e30b8e0
L
11246 },
11247 {
592a252b 11248 /* VEX_W_0F38DD_P_2 */
bf890a93 11249 { "vaesenclast", { XM, Vex128, EXx }, 0 },
9e30b8e0
L
11250 },
11251 {
592a252b 11252 /* VEX_W_0F38DE_P_2 */
bf890a93 11253 { "vaesdec", { XM, Vex128, EXx }, 0 },
9e30b8e0
L
11254 },
11255 {
592a252b 11256 /* VEX_W_0F38DF_P_2 */
bf890a93 11257 { "vaesdeclast", { XM, Vex128, EXx }, 0 },
9e30b8e0 11258 },
6c30d220
L
11259 {
11260 /* VEX_W_0F3A00_P_2 */
11261 { Bad_Opcode },
bf890a93 11262 { "vpermq", { XM, EXx, Ib }, 0 },
6c30d220
L
11263 },
11264 {
11265 /* VEX_W_0F3A01_P_2 */
11266 { Bad_Opcode },
bf890a93 11267 { "vpermpd", { XM, EXx, Ib }, 0 },
6c30d220
L
11268 },
11269 {
11270 /* VEX_W_0F3A02_P_2 */
bf890a93 11271 { "vpblendd", { XM, Vex, EXx, Ib }, 0 },
6c30d220 11272 },
9e30b8e0 11273 {
592a252b 11274 /* VEX_W_0F3A04_P_2 */
bf890a93 11275 { "vpermilps", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11276 },
11277 {
592a252b 11278 /* VEX_W_0F3A05_P_2 */
bf890a93 11279 { "vpermilpd", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11280 },
11281 {
592a252b 11282 /* VEX_W_0F3A06_P_2 */
bf890a93 11283 { "vperm2f128", { XM, Vex256, EXx, Ib }, 0 },
9e30b8e0
L
11284 },
11285 {
592a252b 11286 /* VEX_W_0F3A08_P_2 */
bf890a93 11287 { "vroundps", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11288 },
11289 {
592a252b 11290 /* VEX_W_0F3A09_P_2 */
bf890a93 11291 { "vroundpd", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11292 },
11293 {
592a252b 11294 /* VEX_W_0F3A0A_P_2 */
bf890a93 11295 { "vroundss", { XMScalar, VexScalar, EXdScalar, Ib }, 0 },
9e30b8e0
L
11296 },
11297 {
592a252b 11298 /* VEX_W_0F3A0B_P_2 */
bf890a93 11299 { "vroundsd", { XMScalar, VexScalar, EXqScalar, Ib }, 0 },
9e30b8e0
L
11300 },
11301 {
592a252b 11302 /* VEX_W_0F3A0C_P_2 */
bf890a93 11303 { "vblendps", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11304 },
11305 {
592a252b 11306 /* VEX_W_0F3A0D_P_2 */
bf890a93 11307 { "vblendpd", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11308 },
11309 {
592a252b 11310 /* VEX_W_0F3A0E_P_2 */
bf890a93 11311 { "vpblendw", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11312 },
11313 {
592a252b 11314 /* VEX_W_0F3A0F_P_2 */
bf890a93 11315 { "vpalignr", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11316 },
11317 {
592a252b 11318 /* VEX_W_0F3A14_P_2 */
bf890a93 11319 { "vpextrb", { Edqb, XM, Ib }, 0 },
9e30b8e0
L
11320 },
11321 {
592a252b 11322 /* VEX_W_0F3A15_P_2 */
bf890a93 11323 { "vpextrw", { Edqw, XM, Ib }, 0 },
9e30b8e0
L
11324 },
11325 {
592a252b 11326 /* VEX_W_0F3A18_P_2 */
bf890a93 11327 { "vinsertf128", { XM, Vex256, EXxmm, Ib }, 0 },
9e30b8e0
L
11328 },
11329 {
592a252b 11330 /* VEX_W_0F3A19_P_2 */
bf890a93 11331 { "vextractf128", { EXxmm, XM, Ib }, 0 },
9e30b8e0
L
11332 },
11333 {
592a252b 11334 /* VEX_W_0F3A20_P_2 */
bf890a93 11335 { "vpinsrb", { XM, Vex128, Edqb, Ib }, 0 },
9e30b8e0
L
11336 },
11337 {
592a252b 11338 /* VEX_W_0F3A21_P_2 */
bf890a93 11339 { "vinsertps", { XM, Vex128, EXd, Ib }, 0 },
9e30b8e0 11340 },
43234a1e 11341 {
1ba585e8 11342 /* VEX_W_0F3A30_P_2_LEN_0 */
ab4e4ed5
AF
11343 { MOD_TABLE (MOD_VEX_W_0_0F3A30_P_2_LEN_0) },
11344 { MOD_TABLE (MOD_VEX_W_1_0F3A30_P_2_LEN_0) },
43234a1e
L
11345 },
11346 {
1ba585e8 11347 /* VEX_W_0F3A31_P_2_LEN_0 */
ab4e4ed5
AF
11348 { MOD_TABLE (MOD_VEX_W_0_0F3A31_P_2_LEN_0) },
11349 { MOD_TABLE (MOD_VEX_W_1_0F3A31_P_2_LEN_0) },
1ba585e8
IT
11350 },
11351 {
11352 /* VEX_W_0F3A32_P_2_LEN_0 */
ab4e4ed5
AF
11353 { MOD_TABLE (MOD_VEX_W_0_0F3A32_P_2_LEN_0) },
11354 { MOD_TABLE (MOD_VEX_W_1_0F3A32_P_2_LEN_0) },
43234a1e 11355 },
1ba585e8
IT
11356 {
11357 /* VEX_W_0F3A33_P_2_LEN_0 */
ab4e4ed5
AF
11358 { MOD_TABLE (MOD_VEX_W_0_0F3A33_P_2_LEN_0) },
11359 { MOD_TABLE (MOD_VEX_W_1_0F3A33_P_2_LEN_0) },
1ba585e8 11360 },
6c30d220
L
11361 {
11362 /* VEX_W_0F3A38_P_2 */
bf890a93 11363 { "vinserti128", { XM, Vex256, EXxmm, Ib }, 0 },
6c30d220
L
11364 },
11365 {
11366 /* VEX_W_0F3A39_P_2 */
bf890a93 11367 { "vextracti128", { EXxmm, XM, Ib }, 0 },
6c30d220 11368 },
9e30b8e0 11369 {
592a252b 11370 /* VEX_W_0F3A40_P_2 */
bf890a93 11371 { "vdpps", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11372 },
11373 {
592a252b 11374 /* VEX_W_0F3A41_P_2 */
bf890a93 11375 { "vdppd", { XM, Vex128, EXx, Ib }, 0 },
9e30b8e0
L
11376 },
11377 {
592a252b 11378 /* VEX_W_0F3A42_P_2 */
bf890a93 11379 { "vmpsadbw", { XM, Vex, EXx, Ib }, 0 },
9e30b8e0
L
11380 },
11381 {
592a252b 11382 /* VEX_W_0F3A44_P_2 */
bf890a93 11383 { "vpclmulqdq", { XM, Vex128, EXx, PCLMUL }, 0 },
9e30b8e0 11384 },
6c30d220
L
11385 {
11386 /* VEX_W_0F3A46_P_2 */
bf890a93 11387 { "vperm2i128", { XM, Vex256, EXx, Ib }, 0 },
6c30d220 11388 },
a683cc34 11389 {
592a252b 11390 /* VEX_W_0F3A48_P_2 */
bf890a93
IT
11391 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
11392 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
a683cc34
SP
11393 },
11394 {
592a252b 11395 /* VEX_W_0F3A49_P_2 */
bf890a93
IT
11396 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
11397 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
a683cc34 11398 },
9e30b8e0 11399 {
592a252b 11400 /* VEX_W_0F3A4A_P_2 */
bf890a93 11401 { "vblendvps", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0
L
11402 },
11403 {
592a252b 11404 /* VEX_W_0F3A4B_P_2 */
bf890a93 11405 { "vblendvpd", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0
L
11406 },
11407 {
592a252b 11408 /* VEX_W_0F3A4C_P_2 */
bf890a93 11409 { "vpblendvb", { XM, Vex, EXx, XMVexI4 }, 0 },
9e30b8e0 11410 },
9e30b8e0 11411 {
592a252b 11412 /* VEX_W_0F3A62_P_2 */
bf890a93 11413 { "vpcmpistrm", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11414 },
11415 {
592a252b 11416 /* VEX_W_0F3A63_P_2 */
bf890a93 11417 { "vpcmpistri", { XM, EXx, Ib }, 0 },
9e30b8e0
L
11418 },
11419 {
592a252b 11420 /* VEX_W_0F3ADF_P_2 */
bf890a93 11421 { "vaeskeygenassist", { XM, EXx, Ib }, 0 },
9e30b8e0 11422 },
43234a1e
L
11423#define NEED_VEX_W_TABLE
11424#include "i386-dis-evex.h"
11425#undef NEED_VEX_W_TABLE
9e30b8e0
L
11426};
11427
11428static const struct dis386 mod_table[][2] = {
11429 {
11430 /* MOD_8D */
bf890a93 11431 { "leaS", { Gv, M }, 0 },
9e30b8e0 11432 },
42164a71
L
11433 {
11434 /* MOD_C6_REG_7 */
11435 { Bad_Opcode },
11436 { RM_TABLE (RM_C6_REG_7) },
11437 },
11438 {
11439 /* MOD_C7_REG_7 */
11440 { Bad_Opcode },
11441 { RM_TABLE (RM_C7_REG_7) },
11442 },
4a357820
MZ
11443 {
11444 /* MOD_FF_REG_3 */
a72d2af2 11445 { "Jcall^", { indirEp }, 0 },
4a357820
MZ
11446 },
11447 {
11448 /* MOD_FF_REG_5 */
a72d2af2 11449 { "Jjmp^", { indirEp }, 0 },
4a357820 11450 },
9e30b8e0
L
11451 {
11452 /* MOD_0F01_REG_0 */
11453 { X86_64_TABLE (X86_64_0F01_REG_0) },
11454 { RM_TABLE (RM_0F01_REG_0) },
11455 },
11456 {
11457 /* MOD_0F01_REG_1 */
11458 { X86_64_TABLE (X86_64_0F01_REG_1) },
11459 { RM_TABLE (RM_0F01_REG_1) },
11460 },
11461 {
11462 /* MOD_0F01_REG_2 */
11463 { X86_64_TABLE (X86_64_0F01_REG_2) },
11464 { RM_TABLE (RM_0F01_REG_2) },
11465 },
11466 {
11467 /* MOD_0F01_REG_3 */
11468 { X86_64_TABLE (X86_64_0F01_REG_3) },
11469 { RM_TABLE (RM_0F01_REG_3) },
11470 },
8eab4136
L
11471 {
11472 /* MOD_0F01_REG_5 */
603555e5 11473 { PREFIX_TABLE (PREFIX_MOD_0_0F01_REG_5) },
8eab4136
L
11474 { RM_TABLE (RM_0F01_REG_5) },
11475 },
9e30b8e0
L
11476 {
11477 /* MOD_0F01_REG_7 */
bf890a93 11478 { "invlpg", { Mb }, 0 },
9e30b8e0
L
11479 { RM_TABLE (RM_0F01_REG_7) },
11480 },
11481 {
11482 /* MOD_0F12_PREFIX_0 */
507bd325
L
11483 { "movlps", { XM, EXq }, PREFIX_OPCODE },
11484 { "movhlps", { XM, EXq }, PREFIX_OPCODE },
9e30b8e0
L
11485 },
11486 {
11487 /* MOD_0F13 */
507bd325 11488 { "movlpX", { EXq, XM }, PREFIX_OPCODE },
9e30b8e0
L
11489 },
11490 {
11491 /* MOD_0F16_PREFIX_0 */
bf890a93
IT
11492 { "movhps", { XM, EXq }, 0 },
11493 { "movlhps", { XM, EXq }, 0 },
9e30b8e0
L
11494 },
11495 {
11496 /* MOD_0F17 */
507bd325 11497 { "movhpX", { EXq, XM }, PREFIX_OPCODE },
9e30b8e0
L
11498 },
11499 {
11500 /* MOD_0F18_REG_0 */
bf890a93 11501 { "prefetchnta", { Mb }, 0 },
9e30b8e0
L
11502 },
11503 {
11504 /* MOD_0F18_REG_1 */
bf890a93 11505 { "prefetcht0", { Mb }, 0 },
9e30b8e0
L
11506 },
11507 {
11508 /* MOD_0F18_REG_2 */
bf890a93 11509 { "prefetcht1", { Mb }, 0 },
9e30b8e0
L
11510 },
11511 {
11512 /* MOD_0F18_REG_3 */
bf890a93 11513 { "prefetcht2", { Mb }, 0 },
9e30b8e0 11514 },
d7189fa5
RM
11515 {
11516 /* MOD_0F18_REG_4 */
bf890a93 11517 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
11518 },
11519 {
11520 /* MOD_0F18_REG_5 */
bf890a93 11521 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
11522 },
11523 {
11524 /* MOD_0F18_REG_6 */
bf890a93 11525 { "nop/reserved", { Mb }, 0 },
d7189fa5
RM
11526 },
11527 {
11528 /* MOD_0F18_REG_7 */
bf890a93 11529 { "nop/reserved", { Mb }, 0 },
d7189fa5 11530 },
7e8b059b
L
11531 {
11532 /* MOD_0F1A_PREFIX_0 */
bf890a93
IT
11533 { "bndldx", { Gbnd, Ev_bnd }, 0 },
11534 { "nopQ", { Ev }, 0 },
7e8b059b
L
11535 },
11536 {
11537 /* MOD_0F1B_PREFIX_0 */
bf890a93
IT
11538 { "bndstx", { Ev_bnd, Gbnd }, 0 },
11539 { "nopQ", { Ev }, 0 },
7e8b059b
L
11540 },
11541 {
11542 /* MOD_0F1B_PREFIX_1 */
bf890a93
IT
11543 { "bndmk", { Gbnd, Ev_bnd }, 0 },
11544 { "nopQ", { Ev }, 0 },
7e8b059b 11545 },
603555e5
L
11546 {
11547 /* MOD_0F1E_PREFIX_1 */
11548 { "nopQ", { Ev }, 0 },
11549 { REG_TABLE (REG_0F1E_MOD_3) },
11550 },
b844680a 11551 {
92fddf8e 11552 /* MOD_0F24 */
7bb15c6f 11553 { Bad_Opcode },
bf890a93 11554 { "movL", { Rd, Td }, 0 },
b844680a
L
11555 },
11556 {
92fddf8e 11557 /* MOD_0F26 */
592d1631 11558 { Bad_Opcode },
bf890a93 11559 { "movL", { Td, Rd }, 0 },
b844680a 11560 },
75c135a8
L
11561 {
11562 /* MOD_0F2B_PREFIX_0 */
507bd325 11563 {"movntps", { Mx, XM }, PREFIX_OPCODE },
75c135a8
L
11564 },
11565 {
11566 /* MOD_0F2B_PREFIX_1 */
507bd325 11567 {"movntss", { Md, XM }, PREFIX_OPCODE },
75c135a8
L
11568 },
11569 {
11570 /* MOD_0F2B_PREFIX_2 */
507bd325 11571 {"movntpd", { Mx, XM }, PREFIX_OPCODE },
75c135a8
L
11572 },
11573 {
11574 /* MOD_0F2B_PREFIX_3 */
507bd325 11575 {"movntsd", { Mq, XM }, PREFIX_OPCODE },
75c135a8
L
11576 },
11577 {
11578 /* MOD_0F51 */
592d1631 11579 { Bad_Opcode },
507bd325 11580 { "movmskpX", { Gdq, XS }, PREFIX_OPCODE },
75c135a8 11581 },
b844680a 11582 {
1ceb70f8 11583 /* MOD_0F71_REG_2 */
592d1631 11584 { Bad_Opcode },
bf890a93 11585 { "psrlw", { MS, Ib }, 0 },
b844680a
L
11586 },
11587 {
1ceb70f8 11588 /* MOD_0F71_REG_4 */
592d1631 11589 { Bad_Opcode },
bf890a93 11590 { "psraw", { MS, Ib }, 0 },
b844680a
L
11591 },
11592 {
1ceb70f8 11593 /* MOD_0F71_REG_6 */
592d1631 11594 { Bad_Opcode },
bf890a93 11595 { "psllw", { MS, Ib }, 0 },
b844680a
L
11596 },
11597 {
1ceb70f8 11598 /* MOD_0F72_REG_2 */
592d1631 11599 { Bad_Opcode },
bf890a93 11600 { "psrld", { MS, Ib }, 0 },
b844680a
L
11601 },
11602 {
1ceb70f8 11603 /* MOD_0F72_REG_4 */
592d1631 11604 { Bad_Opcode },
bf890a93 11605 { "psrad", { MS, Ib }, 0 },
b844680a
L
11606 },
11607 {
1ceb70f8 11608 /* MOD_0F72_REG_6 */
592d1631 11609 { Bad_Opcode },
bf890a93 11610 { "pslld", { MS, Ib }, 0 },
b844680a
L
11611 },
11612 {
1ceb70f8 11613 /* MOD_0F73_REG_2 */
592d1631 11614 { Bad_Opcode },
bf890a93 11615 { "psrlq", { MS, Ib }, 0 },
b844680a
L
11616 },
11617 {
1ceb70f8 11618 /* MOD_0F73_REG_3 */
592d1631 11619 { Bad_Opcode },
c0f3af97
L
11620 { PREFIX_TABLE (PREFIX_0F73_REG_3) },
11621 },
11622 {
11623 /* MOD_0F73_REG_6 */
592d1631 11624 { Bad_Opcode },
bf890a93 11625 { "psllq", { MS, Ib }, 0 },
c0f3af97
L
11626 },
11627 {
11628 /* MOD_0F73_REG_7 */
592d1631 11629 { Bad_Opcode },
c0f3af97
L
11630 { PREFIX_TABLE (PREFIX_0F73_REG_7) },
11631 },
11632 {
11633 /* MOD_0FAE_REG_0 */
bf890a93 11634 { "fxsave", { FXSAVE }, 0 },
c7b8aa3a 11635 { PREFIX_TABLE (PREFIX_0FAE_REG_0) },
c0f3af97
L
11636 },
11637 {
11638 /* MOD_0FAE_REG_1 */
bf890a93 11639 { "fxrstor", { FXSAVE }, 0 },
c7b8aa3a 11640 { PREFIX_TABLE (PREFIX_0FAE_REG_1) },
c0f3af97
L
11641 },
11642 {
11643 /* MOD_0FAE_REG_2 */
bf890a93 11644 { "ldmxcsr", { Md }, 0 },
c7b8aa3a 11645 { PREFIX_TABLE (PREFIX_0FAE_REG_2) },
c0f3af97
L
11646 },
11647 {
11648 /* MOD_0FAE_REG_3 */
bf890a93 11649 { "stmxcsr", { Md }, 0 },
c7b8aa3a 11650 { PREFIX_TABLE (PREFIX_0FAE_REG_3) },
c0f3af97
L
11651 },
11652 {
11653 /* MOD_0FAE_REG_4 */
6b40c462
L
11654 { PREFIX_TABLE (PREFIX_MOD_0_0FAE_REG_4) },
11655 { PREFIX_TABLE (PREFIX_MOD_3_0FAE_REG_4) },
c0f3af97
L
11656 },
11657 {
11658 /* MOD_0FAE_REG_5 */
603555e5 11659 { PREFIX_TABLE (PREFIX_MOD_0_0FAE_REG_5) },
c0f3af97
L
11660 { RM_TABLE (RM_0FAE_REG_5) },
11661 },
11662 {
11663 /* MOD_0FAE_REG_6 */
c5e7287a 11664 { PREFIX_TABLE (PREFIX_0FAE_REG_6) },
c0f3af97
L
11665 { RM_TABLE (RM_0FAE_REG_6) },
11666 },
11667 {
11668 /* MOD_0FAE_REG_7 */
963f3586 11669 { PREFIX_TABLE (PREFIX_0FAE_REG_7) },
c0f3af97
L
11670 { RM_TABLE (RM_0FAE_REG_7) },
11671 },
11672 {
11673 /* MOD_0FB2 */
bf890a93 11674 { "lssS", { Gv, Mp }, 0 },
c0f3af97
L
11675 },
11676 {
11677 /* MOD_0FB4 */
bf890a93 11678 { "lfsS", { Gv, Mp }, 0 },
c0f3af97
L
11679 },
11680 {
11681 /* MOD_0FB5 */
bf890a93 11682 { "lgsS", { Gv, Mp }, 0 },
c0f3af97 11683 },
a8484f96
L
11684 {
11685 /* MOD_0FC3 */
11686 { PREFIX_TABLE (PREFIX_MOD_0_0FC3) },
11687 },
963f3586
IT
11688 {
11689 /* MOD_0FC7_REG_3 */
a8484f96 11690 { "xrstors", { FXSAVE }, 0 },
963f3586
IT
11691 },
11692 {
11693 /* MOD_0FC7_REG_4 */
bf890a93 11694 { "xsavec", { FXSAVE }, 0 },
963f3586
IT
11695 },
11696 {
11697 /* MOD_0FC7_REG_5 */
bf890a93 11698 { "xsaves", { FXSAVE }, 0 },
963f3586 11699 },
c0f3af97
L
11700 {
11701 /* MOD_0FC7_REG_6 */
f24bcbaa
L
11702 { PREFIX_TABLE (PREFIX_MOD_0_0FC7_REG_6) },
11703 { PREFIX_TABLE (PREFIX_MOD_3_0FC7_REG_6) }
c0f3af97
L
11704 },
11705 {
11706 /* MOD_0FC7_REG_7 */
bf890a93 11707 { "vmptrst", { Mq }, 0 },
f24bcbaa 11708 { PREFIX_TABLE (PREFIX_MOD_3_0FC7_REG_7) }
c0f3af97
L
11709 },
11710 {
11711 /* MOD_0FD7 */
592d1631 11712 { Bad_Opcode },
bf890a93 11713 { "pmovmskb", { Gdq, MS }, 0 },
c0f3af97
L
11714 },
11715 {
11716 /* MOD_0FE7_PREFIX_2 */
bf890a93 11717 { "movntdq", { Mx, XM }, 0 },
c0f3af97
L
11718 },
11719 {
11720 /* MOD_0FF0_PREFIX_3 */
bf890a93 11721 { "lddqu", { XM, M }, 0 },
c0f3af97
L
11722 },
11723 {
11724 /* MOD_0F382A_PREFIX_2 */
bf890a93 11725 { "movntdqa", { XM, Mx }, 0 },
c0f3af97 11726 },
603555e5
L
11727 {
11728 /* MOD_0F38F5_PREFIX_2 */
11729 { "wrussK", { M, Gdq }, PREFIX_OPCODE },
11730 },
11731 {
11732 /* MOD_0F38F6_PREFIX_0 */
11733 { "wrssK", { M, Gdq }, PREFIX_OPCODE },
11734 },
c0f3af97
L
11735 {
11736 /* MOD_62_32BIT */
bf890a93 11737 { "bound{S|}", { Gv, Ma }, 0 },
43234a1e 11738 { EVEX_TABLE (EVEX_0F) },
c0f3af97
L
11739 },
11740 {
11741 /* MOD_C4_32BIT */
bf890a93 11742 { "lesS", { Gv, Mp }, 0 },
c0f3af97
L
11743 { VEX_C4_TABLE (VEX_0F) },
11744 },
11745 {
11746 /* MOD_C5_32BIT */
bf890a93 11747 { "ldsS", { Gv, Mp }, 0 },
c0f3af97
L
11748 { VEX_C5_TABLE (VEX_0F) },
11749 },
11750 {
592a252b
L
11751 /* MOD_VEX_0F12_PREFIX_0 */
11752 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0) },
11753 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1) },
c0f3af97
L
11754 },
11755 {
592a252b
L
11756 /* MOD_VEX_0F13 */
11757 { VEX_LEN_TABLE (VEX_LEN_0F13_M_0) },
c0f3af97
L
11758 },
11759 {
592a252b
L
11760 /* MOD_VEX_0F16_PREFIX_0 */
11761 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0) },
11762 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1) },
c0f3af97
L
11763 },
11764 {
592a252b
L
11765 /* MOD_VEX_0F17 */
11766 { VEX_LEN_TABLE (VEX_LEN_0F17_M_0) },
c0f3af97
L
11767 },
11768 {
592a252b
L
11769 /* MOD_VEX_0F2B */
11770 { VEX_W_TABLE (VEX_W_0F2B_M_0) },
c0f3af97 11771 },
ab4e4ed5
AF
11772 {
11773 /* MOD_VEX_W_0_0F41_P_0_LEN_1 */
11774 { Bad_Opcode },
11775 { "kandw", { MaskG, MaskVex, MaskR }, 0 },
11776 },
11777 {
11778 /* MOD_VEX_W_1_0F41_P_0_LEN_1 */
11779 { Bad_Opcode },
11780 { "kandq", { MaskG, MaskVex, MaskR }, 0 },
11781 },
11782 {
11783 /* MOD_VEX_W_0_0F41_P_2_LEN_1 */
11784 { Bad_Opcode },
11785 { "kandb", { MaskG, MaskVex, MaskR }, 0 },
11786 },
11787 {
11788 /* MOD_VEX_W_1_0F41_P_2_LEN_1 */
11789 { Bad_Opcode },
11790 { "kandd", { MaskG, MaskVex, MaskR }, 0 },
11791 },
11792 {
11793 /* MOD_VEX_W_0_0F42_P_0_LEN_1 */
11794 { Bad_Opcode },
11795 { "kandnw", { MaskG, MaskVex, MaskR }, 0 },
11796 },
11797 {
11798 /* MOD_VEX_W_1_0F42_P_0_LEN_1 */
11799 { Bad_Opcode },
11800 { "kandnq", { MaskG, MaskVex, MaskR }, 0 },
11801 },
11802 {
11803 /* MOD_VEX_W_0_0F42_P_2_LEN_1 */
11804 { Bad_Opcode },
11805 { "kandnb", { MaskG, MaskVex, MaskR }, 0 },
11806 },
11807 {
11808 /* MOD_VEX_W_1_0F42_P_2_LEN_1 */
11809 { Bad_Opcode },
11810 { "kandnd", { MaskG, MaskVex, MaskR }, 0 },
11811 },
11812 {
11813 /* MOD_VEX_W_0_0F44_P_0_LEN_0 */
11814 { Bad_Opcode },
11815 { "knotw", { MaskG, MaskR }, 0 },
11816 },
11817 {
11818 /* MOD_VEX_W_1_0F44_P_0_LEN_0 */
11819 { Bad_Opcode },
11820 { "knotq", { MaskG, MaskR }, 0 },
11821 },
11822 {
11823 /* MOD_VEX_W_0_0F44_P_2_LEN_0 */
11824 { Bad_Opcode },
11825 { "knotb", { MaskG, MaskR }, 0 },
11826 },
11827 {
11828 /* MOD_VEX_W_1_0F44_P_2_LEN_0 */
11829 { Bad_Opcode },
11830 { "knotd", { MaskG, MaskR }, 0 },
11831 },
11832 {
11833 /* MOD_VEX_W_0_0F45_P_0_LEN_1 */
11834 { Bad_Opcode },
11835 { "korw", { MaskG, MaskVex, MaskR }, 0 },
11836 },
11837 {
11838 /* MOD_VEX_W_1_0F45_P_0_LEN_1 */
11839 { Bad_Opcode },
11840 { "korq", { MaskG, MaskVex, MaskR }, 0 },
11841 },
11842 {
11843 /* MOD_VEX_W_0_0F45_P_2_LEN_1 */
11844 { Bad_Opcode },
11845 { "korb", { MaskG, MaskVex, MaskR }, 0 },
11846 },
11847 {
11848 /* MOD_VEX_W_1_0F45_P_2_LEN_1 */
11849 { Bad_Opcode },
11850 { "kord", { MaskG, MaskVex, MaskR }, 0 },
11851 },
11852 {
11853 /* MOD_VEX_W_0_0F46_P_0_LEN_1 */
11854 { Bad_Opcode },
11855 { "kxnorw", { MaskG, MaskVex, MaskR }, 0 },
11856 },
11857 {
11858 /* MOD_VEX_W_1_0F46_P_0_LEN_1 */
11859 { Bad_Opcode },
11860 { "kxnorq", { MaskG, MaskVex, MaskR }, 0 },
11861 },
11862 {
11863 /* MOD_VEX_W_0_0F46_P_2_LEN_1 */
11864 { Bad_Opcode },
11865 { "kxnorb", { MaskG, MaskVex, MaskR }, 0 },
11866 },
11867 {
11868 /* MOD_VEX_W_1_0F46_P_2_LEN_1 */
11869 { Bad_Opcode },
11870 { "kxnord", { MaskG, MaskVex, MaskR }, 0 },
11871 },
11872 {
11873 /* MOD_VEX_W_0_0F47_P_0_LEN_1 */
11874 { Bad_Opcode },
11875 { "kxorw", { MaskG, MaskVex, MaskR }, 0 },
11876 },
11877 {
11878 /* MOD_VEX_W_1_0F47_P_0_LEN_1 */
11879 { Bad_Opcode },
11880 { "kxorq", { MaskG, MaskVex, MaskR }, 0 },
11881 },
11882 {
11883 /* MOD_VEX_W_0_0F47_P_2_LEN_1 */
11884 { Bad_Opcode },
11885 { "kxorb", { MaskG, MaskVex, MaskR }, 0 },
11886 },
11887 {
11888 /* MOD_VEX_W_1_0F47_P_2_LEN_1 */
11889 { Bad_Opcode },
11890 { "kxord", { MaskG, MaskVex, MaskR }, 0 },
11891 },
11892 {
11893 /* MOD_VEX_W_0_0F4A_P_0_LEN_1 */
11894 { Bad_Opcode },
11895 { "kaddw", { MaskG, MaskVex, MaskR }, 0 },
11896 },
11897 {
11898 /* MOD_VEX_W_1_0F4A_P_0_LEN_1 */
11899 { Bad_Opcode },
11900 { "kaddq", { MaskG, MaskVex, MaskR }, 0 },
11901 },
11902 {
11903 /* MOD_VEX_W_0_0F4A_P_2_LEN_1 */
11904 { Bad_Opcode },
11905 { "kaddb", { MaskG, MaskVex, MaskR }, 0 },
11906 },
11907 {
11908 /* MOD_VEX_W_1_0F4A_P_2_LEN_1 */
11909 { Bad_Opcode },
11910 { "kaddd", { MaskG, MaskVex, MaskR }, 0 },
11911 },
11912 {
11913 /* MOD_VEX_W_0_0F4B_P_0_LEN_1 */
11914 { Bad_Opcode },
11915 { "kunpckwd", { MaskG, MaskVex, MaskR }, 0 },
11916 },
11917 {
11918 /* MOD_VEX_W_1_0F4B_P_0_LEN_1 */
11919 { Bad_Opcode },
11920 { "kunpckdq", { MaskG, MaskVex, MaskR }, 0 },
11921 },
11922 {
11923 /* MOD_VEX_W_0_0F4B_P_2_LEN_1 */
11924 { Bad_Opcode },
11925 { "kunpckbw", { MaskG, MaskVex, MaskR }, 0 },
11926 },
c0f3af97 11927 {
592a252b 11928 /* MOD_VEX_0F50 */
592d1631 11929 { Bad_Opcode },
592a252b 11930 { VEX_W_TABLE (VEX_W_0F50_M_0) },
c0f3af97
L
11931 },
11932 {
592a252b 11933 /* MOD_VEX_0F71_REG_2 */
592d1631 11934 { Bad_Opcode },
592a252b 11935 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2) },
b844680a
L
11936 },
11937 {
592a252b 11938 /* MOD_VEX_0F71_REG_4 */
592d1631 11939 { Bad_Opcode },
592a252b 11940 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4) },
b844680a
L
11941 },
11942 {
592a252b 11943 /* MOD_VEX_0F71_REG_6 */
592d1631 11944 { Bad_Opcode },
592a252b 11945 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6) },
b844680a
L
11946 },
11947 {
592a252b 11948 /* MOD_VEX_0F72_REG_2 */
592d1631 11949 { Bad_Opcode },
592a252b 11950 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2) },
b844680a 11951 },
d8faab4e 11952 {
592a252b 11953 /* MOD_VEX_0F72_REG_4 */
592d1631 11954 { Bad_Opcode },
592a252b 11955 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4) },
d8faab4e
L
11956 },
11957 {
592a252b 11958 /* MOD_VEX_0F72_REG_6 */
592d1631 11959 { Bad_Opcode },
592a252b 11960 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6) },
d8faab4e 11961 },
876d4bfa 11962 {
592a252b 11963 /* MOD_VEX_0F73_REG_2 */
592d1631 11964 { Bad_Opcode },
592a252b 11965 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2) },
876d4bfa
L
11966 },
11967 {
592a252b 11968 /* MOD_VEX_0F73_REG_3 */
592d1631 11969 { Bad_Opcode },
592a252b 11970 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3) },
475a2301
L
11971 },
11972 {
592a252b 11973 /* MOD_VEX_0F73_REG_6 */
592d1631 11974 { Bad_Opcode },
592a252b 11975 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6) },
876d4bfa
L
11976 },
11977 {
592a252b 11978 /* MOD_VEX_0F73_REG_7 */
592d1631 11979 { Bad_Opcode },
592a252b 11980 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7) },
876d4bfa 11981 },
ab4e4ed5
AF
11982 {
11983 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
11984 { "kmovw", { Ew, MaskG }, 0 },
11985 { Bad_Opcode },
11986 },
11987 {
11988 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
11989 { "kmovq", { Eq, MaskG }, 0 },
11990 { Bad_Opcode },
11991 },
11992 {
11993 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
11994 { "kmovb", { Eb, MaskG }, 0 },
11995 { Bad_Opcode },
11996 },
11997 {
11998 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
11999 { "kmovd", { Ed, MaskG }, 0 },
12000 { Bad_Opcode },
12001 },
12002 {
12003 /* MOD_VEX_W_0_0F92_P_0_LEN_0 */
12004 { Bad_Opcode },
12005 { "kmovw", { MaskG, Rdq }, 0 },
12006 },
12007 {
12008 /* MOD_VEX_W_0_0F92_P_2_LEN_0 */
12009 { Bad_Opcode },
12010 { "kmovb", { MaskG, Rdq }, 0 },
12011 },
12012 {
12013 /* MOD_VEX_W_0_0F92_P_3_LEN_0 */
12014 { Bad_Opcode },
12015 { "kmovd", { MaskG, Rdq }, 0 },
12016 },
12017 {
12018 /* MOD_VEX_W_1_0F92_P_3_LEN_0 */
12019 { Bad_Opcode },
12020 { "kmovq", { MaskG, Rdq }, 0 },
12021 },
12022 {
12023 /* MOD_VEX_W_0_0F93_P_0_LEN_0 */
12024 { Bad_Opcode },
12025 { "kmovw", { Gdq, MaskR }, 0 },
12026 },
12027 {
12028 /* MOD_VEX_W_0_0F93_P_2_LEN_0 */
12029 { Bad_Opcode },
12030 { "kmovb", { Gdq, MaskR }, 0 },
12031 },
12032 {
12033 /* MOD_VEX_W_0_0F93_P_3_LEN_0 */
12034 { Bad_Opcode },
12035 { "kmovd", { Gdq, MaskR }, 0 },
12036 },
12037 {
12038 /* MOD_VEX_W_1_0F93_P_3_LEN_0 */
12039 { Bad_Opcode },
12040 { "kmovq", { Gdq, MaskR }, 0 },
12041 },
12042 {
12043 /* MOD_VEX_W_0_0F98_P_0_LEN_0 */
12044 { Bad_Opcode },
12045 { "kortestw", { MaskG, MaskR }, 0 },
12046 },
12047 {
12048 /* MOD_VEX_W_1_0F98_P_0_LEN_0 */
12049 { Bad_Opcode },
12050 { "kortestq", { MaskG, MaskR }, 0 },
12051 },
12052 {
12053 /* MOD_VEX_W_0_0F98_P_2_LEN_0 */
12054 { Bad_Opcode },
12055 { "kortestb", { MaskG, MaskR }, 0 },
12056 },
12057 {
12058 /* MOD_VEX_W_1_0F98_P_2_LEN_0 */
12059 { Bad_Opcode },
12060 { "kortestd", { MaskG, MaskR }, 0 },
12061 },
12062 {
12063 /* MOD_VEX_W_0_0F99_P_0_LEN_0 */
12064 { Bad_Opcode },
12065 { "ktestw", { MaskG, MaskR }, 0 },
12066 },
12067 {
12068 /* MOD_VEX_W_1_0F99_P_0_LEN_0 */
12069 { Bad_Opcode },
12070 { "ktestq", { MaskG, MaskR }, 0 },
12071 },
12072 {
12073 /* MOD_VEX_W_0_0F99_P_2_LEN_0 */
12074 { Bad_Opcode },
12075 { "ktestb", { MaskG, MaskR }, 0 },
12076 },
12077 {
12078 /* MOD_VEX_W_1_0F99_P_2_LEN_0 */
12079 { Bad_Opcode },
12080 { "ktestd", { MaskG, MaskR }, 0 },
12081 },
876d4bfa 12082 {
592a252b
L
12083 /* MOD_VEX_0FAE_REG_2 */
12084 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0) },
876d4bfa 12085 },
bbedc832 12086 {
592a252b
L
12087 /* MOD_VEX_0FAE_REG_3 */
12088 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0) },
bbedc832 12089 },
144c41d9 12090 {
592a252b 12091 /* MOD_VEX_0FD7_PREFIX_2 */
592d1631 12092 { Bad_Opcode },
6c30d220 12093 { VEX_W_TABLE (VEX_W_0FD7_P_2_M_1) },
144c41d9 12094 },
1afd85e3 12095 {
592a252b
L
12096 /* MOD_VEX_0FE7_PREFIX_2 */
12097 { VEX_W_TABLE (VEX_W_0FE7_P_2_M_0) },
1afd85e3
L
12098 },
12099 {
592a252b
L
12100 /* MOD_VEX_0FF0_PREFIX_3 */
12101 { VEX_W_TABLE (VEX_W_0FF0_P_3_M_0) },
92fddf8e 12102 },
75c135a8 12103 {
592a252b
L
12104 /* MOD_VEX_0F381A_PREFIX_2 */
12105 { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0) },
75c135a8 12106 },
1afd85e3 12107 {
592a252b 12108 /* MOD_VEX_0F382A_PREFIX_2 */
6c30d220 12109 { VEX_W_TABLE (VEX_W_0F382A_P_2_M_0) },
1afd85e3 12110 },
75c135a8 12111 {
592a252b
L
12112 /* MOD_VEX_0F382C_PREFIX_2 */
12113 { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0) },
75c135a8 12114 },
1afd85e3 12115 {
592a252b
L
12116 /* MOD_VEX_0F382D_PREFIX_2 */
12117 { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0) },
1afd85e3
L
12118 },
12119 {
592a252b
L
12120 /* MOD_VEX_0F382E_PREFIX_2 */
12121 { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0) },
1afd85e3
L
12122 },
12123 {
592a252b
L
12124 /* MOD_VEX_0F382F_PREFIX_2 */
12125 { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0) },
1afd85e3 12126 },
6c30d220
L
12127 {
12128 /* MOD_VEX_0F385A_PREFIX_2 */
12129 { VEX_LEN_TABLE (VEX_LEN_0F385A_P_2_M_0) },
12130 },
12131 {
12132 /* MOD_VEX_0F388C_PREFIX_2 */
bf890a93 12133 { "vpmaskmov%LW", { XM, Vex, Mx }, 0 },
6c30d220
L
12134 },
12135 {
12136 /* MOD_VEX_0F388E_PREFIX_2 */
bf890a93 12137 { "vpmaskmov%LW", { Mx, Vex, XM }, 0 },
6c30d220 12138 },
ab4e4ed5
AF
12139 {
12140 /* MOD_VEX_W_0_0F3A30_P_2_LEN_0 */
12141 { Bad_Opcode },
12142 { "kshiftrb", { MaskG, MaskR, Ib }, 0 },
12143 },
12144 {
12145 /* MOD_VEX_W_1_0F3A30_P_2_LEN_0 */
12146 { Bad_Opcode },
12147 { "kshiftrw", { MaskG, MaskR, Ib }, 0 },
12148 },
12149 {
12150 /* MOD_VEX_W_0_0F3A31_P_2_LEN_0 */
12151 { Bad_Opcode },
12152 { "kshiftrd", { MaskG, MaskR, Ib }, 0 },
12153 },
12154 {
12155 /* MOD_VEX_W_1_0F3A31_P_2_LEN_0 */
12156 { Bad_Opcode },
12157 { "kshiftrq", { MaskG, MaskR, Ib }, 0 },
12158 },
12159 {
12160 /* MOD_VEX_W_0_0F3A32_P_2_LEN_0 */
12161 { Bad_Opcode },
12162 { "kshiftlb", { MaskG, MaskR, Ib }, 0 },
12163 },
12164 {
12165 /* MOD_VEX_W_1_0F3A32_P_2_LEN_0 */
12166 { Bad_Opcode },
12167 { "kshiftlw", { MaskG, MaskR, Ib }, 0 },
12168 },
12169 {
12170 /* MOD_VEX_W_0_0F3A33_P_2_LEN_0 */
12171 { Bad_Opcode },
12172 { "kshiftld", { MaskG, MaskR, Ib }, 0 },
12173 },
12174 {
12175 /* MOD_VEX_W_1_0F3A33_P_2_LEN_0 */
12176 { Bad_Opcode },
12177 { "kshiftlq", { MaskG, MaskR, Ib }, 0 },
12178 },
43234a1e
L
12179#define NEED_MOD_TABLE
12180#include "i386-dis-evex.h"
12181#undef NEED_MOD_TABLE
b844680a
L
12182};
12183
1ceb70f8 12184static const struct dis386 rm_table[][8] = {
42164a71
L
12185 {
12186 /* RM_C6_REG_7 */
bf890a93 12187 { "xabort", { Skip_MODRM, Ib }, 0 },
42164a71
L
12188 },
12189 {
12190 /* RM_C7_REG_7 */
bf890a93 12191 { "xbeginT", { Skip_MODRM, Jv }, 0 },
42164a71 12192 },
b844680a 12193 {
1ceb70f8 12194 /* RM_0F01_REG_0 */
592d1631 12195 { Bad_Opcode },
bf890a93
IT
12196 { "vmcall", { Skip_MODRM }, 0 },
12197 { "vmlaunch", { Skip_MODRM }, 0 },
12198 { "vmresume", { Skip_MODRM }, 0 },
12199 { "vmxoff", { Skip_MODRM }, 0 },
b844680a
L
12200 },
12201 {
1ceb70f8 12202 /* RM_0F01_REG_1 */
bf890a93
IT
12203 { "monitor", { { OP_Monitor, 0 } }, 0 },
12204 { "mwait", { { OP_Mwait, 0 } }, 0 },
12205 { "clac", { Skip_MODRM }, 0 },
12206 { "stac", { Skip_MODRM }, 0 },
2cf200a4
IT
12207 { Bad_Opcode },
12208 { Bad_Opcode },
12209 { Bad_Opcode },
bf890a93 12210 { "encls", { Skip_MODRM }, 0 },
b844680a 12211 },
475a2301
L
12212 {
12213 /* RM_0F01_REG_2 */
bf890a93
IT
12214 { "xgetbv", { Skip_MODRM }, 0 },
12215 { "xsetbv", { Skip_MODRM }, 0 },
8729a6f6
L
12216 { Bad_Opcode },
12217 { Bad_Opcode },
bf890a93
IT
12218 { "vmfunc", { Skip_MODRM }, 0 },
12219 { "xend", { Skip_MODRM }, 0 },
12220 { "xtest", { Skip_MODRM }, 0 },
12221 { "enclu", { Skip_MODRM }, 0 },
475a2301 12222 },
b844680a 12223 {
1ceb70f8 12224 /* RM_0F01_REG_3 */
bf890a93
IT
12225 { "vmrun", { Skip_MODRM }, 0 },
12226 { "vmmcall", { Skip_MODRM }, 0 },
12227 { "vmload", { Skip_MODRM }, 0 },
12228 { "vmsave", { Skip_MODRM }, 0 },
12229 { "stgi", { Skip_MODRM }, 0 },
12230 { "clgi", { Skip_MODRM }, 0 },
12231 { "skinit", { Skip_MODRM }, 0 },
12232 { "invlpga", { Skip_MODRM }, 0 },
4e7d34a6 12233 },
8eab4136
L
12234 {
12235 /* RM_0F01_REG_5 */
12236 { Bad_Opcode },
603555e5
L
12237 { PREFIX_TABLE (PREFIX_MOD_3_0F01_REG_5_RM_1) },
12238 { PREFIX_TABLE (PREFIX_MOD_3_0F01_REG_5_RM_2) },
8eab4136
L
12239 { Bad_Opcode },
12240 { Bad_Opcode },
12241 { Bad_Opcode },
12242 { "rdpkru", { Skip_MODRM }, 0 },
12243 { "wrpkru", { Skip_MODRM }, 0 },
12244 },
4e7d34a6 12245 {
1ceb70f8 12246 /* RM_0F01_REG_7 */
bf890a93
IT
12247 { "swapgs", { Skip_MODRM }, 0 },
12248 { "rdtscp", { Skip_MODRM }, 0 },
9916071f
AP
12249 { "monitorx", { { OP_Monitor, 0 } }, 0 },
12250 { "mwaitx", { { OP_Mwaitx, 0 } }, 0 },
bf890a93 12251 { "clzero", { Skip_MODRM }, 0 },
b844680a 12252 },
603555e5
L
12253 {
12254 /* RM_0F1E_MOD_3_REG_7 */
12255 { "nopQ", { Ev }, 0 },
12256 { "nopQ", { Ev }, 0 },
12257 { "endbr64", { Skip_MODRM }, PREFIX_OPCODE },
12258 { "endbr32", { Skip_MODRM }, PREFIX_OPCODE },
12259 { "nopQ", { Ev }, 0 },
12260 { "nopQ", { Ev }, 0 },
12261 { "nopQ", { Ev }, 0 },
12262 { "nopQ", { Ev }, 0 },
12263 },
b844680a 12264 {
1ceb70f8 12265 /* RM_0FAE_REG_5 */
bf890a93 12266 { "lfence", { Skip_MODRM }, 0 },
b844680a
L
12267 },
12268 {
1ceb70f8 12269 /* RM_0FAE_REG_6 */
bf890a93 12270 { "mfence", { Skip_MODRM }, 0 },
b844680a 12271 },
bbedc832 12272 {
1ceb70f8 12273 /* RM_0FAE_REG_7 */
b5cefcca
L
12274 { "sfence", { Skip_MODRM }, 0 },
12275
144c41d9 12276 },
b844680a
L
12277};
12278
c608c12e
AM
12279#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
12280
f16cd0d5
L
12281/* We use the high bit to indicate different name for the same
12282 prefix. */
f16cd0d5 12283#define REP_PREFIX (0xf3 | 0x100)
42164a71
L
12284#define XACQUIRE_PREFIX (0xf2 | 0x200)
12285#define XRELEASE_PREFIX (0xf3 | 0x400)
7e8b059b 12286#define BND_PREFIX (0xf2 | 0x400)
04ef582a 12287#define NOTRACK_PREFIX (0x3e | 0x100)
f16cd0d5
L
12288
12289static int
26ca5450 12290ckprefix (void)
252b5132 12291{
f16cd0d5 12292 int newrex, i, length;
52b15da3 12293 rex = 0;
c0f3af97 12294 rex_ignored = 0;
252b5132 12295 prefixes = 0;
7d421014 12296 used_prefixes = 0;
52b15da3 12297 rex_used = 0;
f16cd0d5
L
12298 last_lock_prefix = -1;
12299 last_repz_prefix = -1;
12300 last_repnz_prefix = -1;
12301 last_data_prefix = -1;
12302 last_addr_prefix = -1;
12303 last_rex_prefix = -1;
12304 last_seg_prefix = -1;
04ef582a 12305 last_active_prefix = -1;
d9949a36 12306 fwait_prefix = -1;
285ca992 12307 active_seg_prefix = 0;
f310f33d
L
12308 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
12309 all_prefixes[i] = 0;
12310 i = 0;
f16cd0d5
L
12311 length = 0;
12312 /* The maximum instruction length is 15bytes. */
12313 while (length < MAX_CODE_LENGTH - 1)
252b5132
RH
12314 {
12315 FETCH_DATA (the_info, codep + 1);
52b15da3 12316 newrex = 0;
252b5132
RH
12317 switch (*codep)
12318 {
52b15da3
JH
12319 /* REX prefixes family. */
12320 case 0x40:
12321 case 0x41:
12322 case 0x42:
12323 case 0x43:
12324 case 0x44:
12325 case 0x45:
12326 case 0x46:
12327 case 0x47:
12328 case 0x48:
12329 case 0x49:
12330 case 0x4a:
12331 case 0x4b:
12332 case 0x4c:
12333 case 0x4d:
12334 case 0x4e:
12335 case 0x4f:
f16cd0d5
L
12336 if (address_mode == mode_64bit)
12337 newrex = *codep;
12338 else
12339 return 1;
12340 last_rex_prefix = i;
52b15da3 12341 break;
252b5132
RH
12342 case 0xf3:
12343 prefixes |= PREFIX_REPZ;
f16cd0d5 12344 last_repz_prefix = i;
252b5132
RH
12345 break;
12346 case 0xf2:
12347 prefixes |= PREFIX_REPNZ;
f16cd0d5 12348 last_repnz_prefix = i;
252b5132
RH
12349 break;
12350 case 0xf0:
12351 prefixes |= PREFIX_LOCK;
f16cd0d5 12352 last_lock_prefix = i;
252b5132
RH
12353 break;
12354 case 0x2e:
12355 prefixes |= PREFIX_CS;
f16cd0d5 12356 last_seg_prefix = i;
285ca992 12357 active_seg_prefix = PREFIX_CS;
252b5132
RH
12358 break;
12359 case 0x36:
12360 prefixes |= PREFIX_SS;
f16cd0d5 12361 last_seg_prefix = i;
285ca992 12362 active_seg_prefix = PREFIX_SS;
252b5132
RH
12363 break;
12364 case 0x3e:
12365 prefixes |= PREFIX_DS;
f16cd0d5 12366 last_seg_prefix = i;
285ca992 12367 active_seg_prefix = PREFIX_DS;
252b5132
RH
12368 break;
12369 case 0x26:
12370 prefixes |= PREFIX_ES;
f16cd0d5 12371 last_seg_prefix = i;
285ca992 12372 active_seg_prefix = PREFIX_ES;
252b5132
RH
12373 break;
12374 case 0x64:
12375 prefixes |= PREFIX_FS;
f16cd0d5 12376 last_seg_prefix = i;
285ca992 12377 active_seg_prefix = PREFIX_FS;
252b5132
RH
12378 break;
12379 case 0x65:
12380 prefixes |= PREFIX_GS;
f16cd0d5 12381 last_seg_prefix = i;
285ca992 12382 active_seg_prefix = PREFIX_GS;
252b5132
RH
12383 break;
12384 case 0x66:
12385 prefixes |= PREFIX_DATA;
f16cd0d5 12386 last_data_prefix = i;
252b5132
RH
12387 break;
12388 case 0x67:
12389 prefixes |= PREFIX_ADDR;
f16cd0d5 12390 last_addr_prefix = i;
252b5132 12391 break;
5076851f 12392 case FWAIT_OPCODE:
252b5132
RH
12393 /* fwait is really an instruction. If there are prefixes
12394 before the fwait, they belong to the fwait, *not* to the
12395 following instruction. */
d9949a36 12396 fwait_prefix = i;
3e7d61b2 12397 if (prefixes || rex)
252b5132
RH
12398 {
12399 prefixes |= PREFIX_FWAIT;
12400 codep++;
6c067bbb
RM
12401 /* This ensures that the previous REX prefixes are noticed
12402 as unused prefixes, as in the return case below. */
12403 rex_used = rex;
f16cd0d5 12404 return 1;
252b5132
RH
12405 }
12406 prefixes = PREFIX_FWAIT;
12407 break;
12408 default:
f16cd0d5 12409 return 1;
252b5132 12410 }
52b15da3
JH
12411 /* Rex is ignored when followed by another prefix. */
12412 if (rex)
12413 {
3e7d61b2 12414 rex_used = rex;
f16cd0d5 12415 return 1;
52b15da3 12416 }
f16cd0d5 12417 if (*codep != FWAIT_OPCODE)
04ef582a
L
12418 {
12419 last_active_prefix = i;
12420 all_prefixes[i++] = *codep;
12421 }
52b15da3 12422 rex = newrex;
252b5132 12423 codep++;
f16cd0d5
L
12424 length++;
12425 }
12426 return 0;
12427}
12428
7d421014
ILT
12429/* Return the name of the prefix byte PREF, or NULL if PREF is not a
12430 prefix byte. */
12431
12432static const char *
26ca5450 12433prefix_name (int pref, int sizeflag)
7d421014 12434{
0003779b
L
12435 static const char *rexes [16] =
12436 {
12437 "rex", /* 0x40 */
12438 "rex.B", /* 0x41 */
12439 "rex.X", /* 0x42 */
12440 "rex.XB", /* 0x43 */
12441 "rex.R", /* 0x44 */
12442 "rex.RB", /* 0x45 */
12443 "rex.RX", /* 0x46 */
12444 "rex.RXB", /* 0x47 */
12445 "rex.W", /* 0x48 */
12446 "rex.WB", /* 0x49 */
12447 "rex.WX", /* 0x4a */
12448 "rex.WXB", /* 0x4b */
12449 "rex.WR", /* 0x4c */
12450 "rex.WRB", /* 0x4d */
12451 "rex.WRX", /* 0x4e */
12452 "rex.WRXB", /* 0x4f */
12453 };
12454
7d421014
ILT
12455 switch (pref)
12456 {
52b15da3
JH
12457 /* REX prefixes family. */
12458 case 0x40:
52b15da3 12459 case 0x41:
52b15da3 12460 case 0x42:
52b15da3 12461 case 0x43:
52b15da3 12462 case 0x44:
52b15da3 12463 case 0x45:
52b15da3 12464 case 0x46:
52b15da3 12465 case 0x47:
52b15da3 12466 case 0x48:
52b15da3 12467 case 0x49:
52b15da3 12468 case 0x4a:
52b15da3 12469 case 0x4b:
52b15da3 12470 case 0x4c:
52b15da3 12471 case 0x4d:
52b15da3 12472 case 0x4e:
52b15da3 12473 case 0x4f:
0003779b 12474 return rexes [pref - 0x40];
7d421014
ILT
12475 case 0xf3:
12476 return "repz";
12477 case 0xf2:
12478 return "repnz";
12479 case 0xf0:
12480 return "lock";
12481 case 0x2e:
12482 return "cs";
12483 case 0x36:
12484 return "ss";
12485 case 0x3e:
12486 return "ds";
12487 case 0x26:
12488 return "es";
12489 case 0x64:
12490 return "fs";
12491 case 0x65:
12492 return "gs";
12493 case 0x66:
12494 return (sizeflag & DFLAG) ? "data16" : "data32";
12495 case 0x67:
cb712a9e 12496 if (address_mode == mode_64bit)
db6eb5be 12497 return (sizeflag & AFLAG) ? "addr32" : "addr64";
c1a64871 12498 else
2888cb7a 12499 return (sizeflag & AFLAG) ? "addr16" : "addr32";
7d421014
ILT
12500 case FWAIT_OPCODE:
12501 return "fwait";
f16cd0d5
L
12502 case REP_PREFIX:
12503 return "rep";
42164a71
L
12504 case XACQUIRE_PREFIX:
12505 return "xacquire";
12506 case XRELEASE_PREFIX:
12507 return "xrelease";
7e8b059b
L
12508 case BND_PREFIX:
12509 return "bnd";
04ef582a
L
12510 case NOTRACK_PREFIX:
12511 return "notrack";
7d421014
ILT
12512 default:
12513 return NULL;
12514 }
12515}
12516
ce518a5f
L
12517static char op_out[MAX_OPERANDS][100];
12518static int op_ad, op_index[MAX_OPERANDS];
1d9f512f 12519static int two_source_ops;
ce518a5f
L
12520static bfd_vma op_address[MAX_OPERANDS];
12521static bfd_vma op_riprel[MAX_OPERANDS];
52b15da3 12522static bfd_vma start_pc;
ce518a5f 12523
252b5132
RH
12524/*
12525 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
12526 * (see topic "Redundant prefixes" in the "Differences from 8086"
12527 * section of the "Virtual 8086 Mode" chapter.)
12528 * 'pc' should be the address of this instruction, it will
12529 * be used to print the target address if this is a relative jump or call
12530 * The function returns the length of this instruction in bytes.
12531 */
12532
252b5132 12533static char intel_syntax;
9d141669 12534static char intel_mnemonic = !SYSV386_COMPAT;
252b5132
RH
12535static char open_char;
12536static char close_char;
12537static char separator_char;
12538static char scale_char;
12539
5db04b09
L
12540enum x86_64_isa
12541{
12542 amd64 = 0,
12543 intel64
12544};
12545
12546static enum x86_64_isa isa64;
12547
e396998b
AM
12548/* Here for backwards compatibility. When gdb stops using
12549 print_insn_i386_att and print_insn_i386_intel these functions can
12550 disappear, and print_insn_i386 be merged into print_insn. */
252b5132 12551int
26ca5450 12552print_insn_i386_att (bfd_vma pc, disassemble_info *info)
252b5132
RH
12553{
12554 intel_syntax = 0;
e396998b
AM
12555
12556 return print_insn (pc, info);
252b5132
RH
12557}
12558
12559int
26ca5450 12560print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
252b5132
RH
12561{
12562 intel_syntax = 1;
e396998b
AM
12563
12564 return print_insn (pc, info);
252b5132
RH
12565}
12566
e396998b 12567int
26ca5450 12568print_insn_i386 (bfd_vma pc, disassemble_info *info)
e396998b
AM
12569{
12570 intel_syntax = -1;
12571
12572 return print_insn (pc, info);
12573}
12574
f59a29b9
L
12575void
12576print_i386_disassembler_options (FILE *stream)
12577{
12578 fprintf (stream, _("\n\
12579The following i386/x86-64 specific disassembler options are supported for use\n\
12580with the -M switch (multiple options should be separated by commas):\n"));
12581
12582 fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
12583 fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
12584 fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
12585 fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
12586 fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
9d141669
L
12587 fprintf (stream, _(" att-mnemonic\n"
12588 " Display instruction in AT&T mnemonic\n"));
12589 fprintf (stream, _(" intel-mnemonic\n"
12590 " Display instruction in Intel mnemonic\n"));
f59a29b9
L
12591 fprintf (stream, _(" addr64 Assume 64bit address size\n"));
12592 fprintf (stream, _(" addr32 Assume 32bit address size\n"));
12593 fprintf (stream, _(" addr16 Assume 16bit address size\n"));
12594 fprintf (stream, _(" data32 Assume 32bit data size\n"));
12595 fprintf (stream, _(" data16 Assume 16bit data size\n"));
12596 fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
5db04b09
L
12597 fprintf (stream, _(" amd64 Display instruction in AMD64 ISA\n"));
12598 fprintf (stream, _(" intel64 Display instruction in Intel64 ISA\n"));
f59a29b9
L
12599}
12600
592d1631 12601/* Bad opcode. */
bf890a93 12602static const struct dis386 bad_opcode = { "(bad)", { XX }, 0 };
592d1631 12603
b844680a
L
12604/* Get a pointer to struct dis386 with a valid name. */
12605
12606static const struct dis386 *
8bb15339 12607get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
b844680a 12608{
91d6fa6a 12609 int vindex, vex_table_index;
b844680a
L
12610
12611 if (dp->name != NULL)
12612 return dp;
12613
12614 switch (dp->op[0].bytemode)
12615 {
1ceb70f8
L
12616 case USE_REG_TABLE:
12617 dp = &reg_table[dp->op[1].bytemode][modrm.reg];
12618 break;
12619
12620 case USE_MOD_TABLE:
91d6fa6a
NC
12621 vindex = modrm.mod == 0x3 ? 1 : 0;
12622 dp = &mod_table[dp->op[1].bytemode][vindex];
1ceb70f8
L
12623 break;
12624
12625 case USE_RM_TABLE:
12626 dp = &rm_table[dp->op[1].bytemode][modrm.rm];
b844680a
L
12627 break;
12628
4e7d34a6 12629 case USE_PREFIX_TABLE:
c0f3af97 12630 if (need_vex)
b844680a 12631 {
c0f3af97
L
12632 /* The prefix in VEX is implicit. */
12633 switch (vex.prefix)
12634 {
12635 case 0:
91d6fa6a 12636 vindex = 0;
c0f3af97
L
12637 break;
12638 case REPE_PREFIX_OPCODE:
91d6fa6a 12639 vindex = 1;
c0f3af97
L
12640 break;
12641 case DATA_PREFIX_OPCODE:
91d6fa6a 12642 vindex = 2;
c0f3af97
L
12643 break;
12644 case REPNE_PREFIX_OPCODE:
91d6fa6a 12645 vindex = 3;
c0f3af97
L
12646 break;
12647 default:
12648 abort ();
12649 break;
12650 }
b844680a 12651 }
7bb15c6f 12652 else
b844680a 12653 {
285ca992
L
12654 int last_prefix = -1;
12655 int prefix = 0;
91d6fa6a 12656 vindex = 0;
285ca992
L
12657 /* We check PREFIX_REPNZ and PREFIX_REPZ before PREFIX_DATA.
12658 When there are multiple PREFIX_REPNZ and PREFIX_REPZ, the
12659 last one wins. */
12660 if ((prefixes & (PREFIX_REPZ | PREFIX_REPNZ)) != 0)
b844680a 12661 {
285ca992 12662 if (last_repz_prefix > last_repnz_prefix)
c0f3af97 12663 {
285ca992
L
12664 vindex = 1;
12665 prefix = PREFIX_REPZ;
12666 last_prefix = last_repz_prefix;
c0f3af97
L
12667 }
12668 else
b844680a 12669 {
285ca992
L
12670 vindex = 3;
12671 prefix = PREFIX_REPNZ;
12672 last_prefix = last_repnz_prefix;
b844680a 12673 }
285ca992 12674
507bd325
L
12675 /* Check if prefix should be ignored. */
12676 if ((((prefix_table[dp->op[1].bytemode][vindex].prefix_requirement
12677 & PREFIX_IGNORED) >> PREFIX_IGNORED_SHIFT)
12678 & prefix) != 0)
285ca992
L
12679 vindex = 0;
12680 }
12681
12682 if (vindex == 0 && (prefixes & PREFIX_DATA) != 0)
12683 {
12684 vindex = 2;
12685 prefix = PREFIX_DATA;
12686 last_prefix = last_data_prefix;
12687 }
12688
12689 if (vindex != 0)
12690 {
12691 used_prefixes |= prefix;
12692 all_prefixes[last_prefix] = 0;
b844680a
L
12693 }
12694 }
91d6fa6a 12695 dp = &prefix_table[dp->op[1].bytemode][vindex];
b844680a
L
12696 break;
12697
4e7d34a6 12698 case USE_X86_64_TABLE:
91d6fa6a
NC
12699 vindex = address_mode == mode_64bit ? 1 : 0;
12700 dp = &x86_64_table[dp->op[1].bytemode][vindex];
b844680a
L
12701 break;
12702
4e7d34a6 12703 case USE_3BYTE_TABLE:
8bb15339 12704 FETCH_DATA (info, codep + 2);
91d6fa6a
NC
12705 vindex = *codep++;
12706 dp = &three_byte_table[dp->op[1].bytemode][vindex];
285ca992 12707 end_codep = codep;
8bb15339
L
12708 modrm.mod = (*codep >> 6) & 3;
12709 modrm.reg = (*codep >> 3) & 7;
12710 modrm.rm = *codep & 7;
12711 break;
12712
c0f3af97
L
12713 case USE_VEX_LEN_TABLE:
12714 if (!need_vex)
12715 abort ();
12716
12717 switch (vex.length)
12718 {
12719 case 128:
91d6fa6a 12720 vindex = 0;
c0f3af97
L
12721 break;
12722 case 256:
91d6fa6a 12723 vindex = 1;
c0f3af97
L
12724 break;
12725 default:
12726 abort ();
12727 break;
12728 }
12729
91d6fa6a 12730 dp = &vex_len_table[dp->op[1].bytemode][vindex];
c0f3af97
L
12731 break;
12732
f88c9eb0
SP
12733 case USE_XOP_8F_TABLE:
12734 FETCH_DATA (info, codep + 3);
12735 /* All bits in the REX prefix are ignored. */
12736 rex_ignored = rex;
12737 rex = ~(*codep >> 5) & 0x7;
12738
12739 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
12740 switch ((*codep & 0x1f))
12741 {
12742 default:
f07af43e
L
12743 dp = &bad_opcode;
12744 return dp;
5dd85c99
SP
12745 case 0x8:
12746 vex_table_index = XOP_08;
12747 break;
f88c9eb0
SP
12748 case 0x9:
12749 vex_table_index = XOP_09;
12750 break;
12751 case 0xa:
12752 vex_table_index = XOP_0A;
12753 break;
12754 }
12755 codep++;
12756 vex.w = *codep & 0x80;
12757 if (vex.w && address_mode == mode_64bit)
12758 rex |= REX_W;
12759
12760 vex.register_specifier = (~(*codep >> 3)) & 0xf;
abfcb414 12761 if (address_mode != mode_64bit)
f07af43e 12762 {
abfcb414
AP
12763 /* In 16/32-bit mode REX_B is silently ignored. */
12764 rex &= ~REX_B;
12765 if (vex.register_specifier > 0x7)
12766 {
12767 dp = &bad_opcode;
12768 return dp;
12769 }
f07af43e 12770 }
f88c9eb0
SP
12771
12772 vex.length = (*codep & 0x4) ? 256 : 128;
12773 switch ((*codep & 0x3))
12774 {
12775 case 0:
12776 vex.prefix = 0;
12777 break;
12778 case 1:
12779 vex.prefix = DATA_PREFIX_OPCODE;
12780 break;
12781 case 2:
12782 vex.prefix = REPE_PREFIX_OPCODE;
12783 break;
12784 case 3:
12785 vex.prefix = REPNE_PREFIX_OPCODE;
12786 break;
12787 }
12788 need_vex = 1;
12789 need_vex_reg = 1;
12790 codep++;
91d6fa6a
NC
12791 vindex = *codep++;
12792 dp = &xop_table[vex_table_index][vindex];
c48244a5 12793
285ca992 12794 end_codep = codep;
c48244a5
SP
12795 FETCH_DATA (info, codep + 1);
12796 modrm.mod = (*codep >> 6) & 3;
12797 modrm.reg = (*codep >> 3) & 7;
12798 modrm.rm = *codep & 7;
f88c9eb0
SP
12799 break;
12800
c0f3af97 12801 case USE_VEX_C4_TABLE:
43234a1e 12802 /* VEX prefix. */
c0f3af97
L
12803 FETCH_DATA (info, codep + 3);
12804 /* All bits in the REX prefix are ignored. */
12805 rex_ignored = rex;
12806 rex = ~(*codep >> 5) & 0x7;
12807 switch ((*codep & 0x1f))
12808 {
12809 default:
f07af43e
L
12810 dp = &bad_opcode;
12811 return dp;
c0f3af97 12812 case 0x1:
f88c9eb0 12813 vex_table_index = VEX_0F;
c0f3af97
L
12814 break;
12815 case 0x2:
f88c9eb0 12816 vex_table_index = VEX_0F38;
c0f3af97
L
12817 break;
12818 case 0x3:
f88c9eb0 12819 vex_table_index = VEX_0F3A;
c0f3af97
L
12820 break;
12821 }
12822 codep++;
12823 vex.w = *codep & 0x80;
9889cbb1 12824 if (address_mode == mode_64bit)
f07af43e 12825 {
9889cbb1
L
12826 if (vex.w)
12827 rex |= REX_W;
12828 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12829 }
12830 else
12831 {
12832 /* For the 3-byte VEX prefix in 32-bit mode, the REX_B bit
12833 is ignored, other REX bits are 0 and the highest bit in
12834 VEX.vvvv is also ignored. */
12835 rex = 0;
12836 vex.register_specifier = (~(*codep >> 3)) & 0x7;
f07af43e 12837 }
c0f3af97
L
12838 vex.length = (*codep & 0x4) ? 256 : 128;
12839 switch ((*codep & 0x3))
12840 {
12841 case 0:
12842 vex.prefix = 0;
12843 break;
12844 case 1:
12845 vex.prefix = DATA_PREFIX_OPCODE;
12846 break;
12847 case 2:
12848 vex.prefix = REPE_PREFIX_OPCODE;
12849 break;
12850 case 3:
12851 vex.prefix = REPNE_PREFIX_OPCODE;
12852 break;
12853 }
12854 need_vex = 1;
12855 need_vex_reg = 1;
12856 codep++;
91d6fa6a
NC
12857 vindex = *codep++;
12858 dp = &vex_table[vex_table_index][vindex];
285ca992 12859 end_codep = codep;
53c4d625
JB
12860 /* There is no MODRM byte for VEX0F 77. */
12861 if (vex_table_index != VEX_0F || vindex != 0x77)
c0f3af97
L
12862 {
12863 FETCH_DATA (info, codep + 1);
12864 modrm.mod = (*codep >> 6) & 3;
12865 modrm.reg = (*codep >> 3) & 7;
12866 modrm.rm = *codep & 7;
12867 }
12868 break;
12869
12870 case USE_VEX_C5_TABLE:
43234a1e 12871 /* VEX prefix. */
c0f3af97
L
12872 FETCH_DATA (info, codep + 2);
12873 /* All bits in the REX prefix are ignored. */
12874 rex_ignored = rex;
12875 rex = (*codep & 0x80) ? 0 : REX_R;
12876
9889cbb1
L
12877 /* For the 2-byte VEX prefix in 32-bit mode, the highest bit in
12878 VEX.vvvv is 1. */
c0f3af97 12879 vex.register_specifier = (~(*codep >> 3)) & 0xf;
759a05ce 12880 vex.w = 0;
c0f3af97
L
12881 vex.length = (*codep & 0x4) ? 256 : 128;
12882 switch ((*codep & 0x3))
12883 {
12884 case 0:
12885 vex.prefix = 0;
12886 break;
12887 case 1:
12888 vex.prefix = DATA_PREFIX_OPCODE;
12889 break;
12890 case 2:
12891 vex.prefix = REPE_PREFIX_OPCODE;
12892 break;
12893 case 3:
12894 vex.prefix = REPNE_PREFIX_OPCODE;
12895 break;
12896 }
12897 need_vex = 1;
12898 need_vex_reg = 1;
12899 codep++;
91d6fa6a
NC
12900 vindex = *codep++;
12901 dp = &vex_table[dp->op[1].bytemode][vindex];
285ca992 12902 end_codep = codep;
53c4d625
JB
12903 /* There is no MODRM byte for VEX 77. */
12904 if (vindex != 0x77)
c0f3af97
L
12905 {
12906 FETCH_DATA (info, codep + 1);
12907 modrm.mod = (*codep >> 6) & 3;
12908 modrm.reg = (*codep >> 3) & 7;
12909 modrm.rm = *codep & 7;
12910 }
12911 break;
12912
9e30b8e0
L
12913 case USE_VEX_W_TABLE:
12914 if (!need_vex)
12915 abort ();
12916
12917 dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
12918 break;
12919
43234a1e
L
12920 case USE_EVEX_TABLE:
12921 two_source_ops = 0;
12922 /* EVEX prefix. */
12923 vex.evex = 1;
12924 FETCH_DATA (info, codep + 4);
12925 /* All bits in the REX prefix are ignored. */
12926 rex_ignored = rex;
12927 /* The first byte after 0x62. */
12928 rex = ~(*codep >> 5) & 0x7;
12929 vex.r = *codep & 0x10;
12930 switch ((*codep & 0xf))
12931 {
12932 default:
12933 return &bad_opcode;
12934 case 0x1:
12935 vex_table_index = EVEX_0F;
12936 break;
12937 case 0x2:
12938 vex_table_index = EVEX_0F38;
12939 break;
12940 case 0x3:
12941 vex_table_index = EVEX_0F3A;
12942 break;
12943 }
12944
12945 /* The second byte after 0x62. */
12946 codep++;
12947 vex.w = *codep & 0x80;
12948 if (vex.w && address_mode == mode_64bit)
12949 rex |= REX_W;
12950
12951 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12952 if (address_mode != mode_64bit)
12953 {
12954 /* In 16/32-bit mode silently ignore following bits. */
12955 rex &= ~REX_B;
12956 vex.r = 1;
12957 vex.v = 1;
12958 vex.register_specifier &= 0x7;
12959 }
12960
12961 /* The U bit. */
12962 if (!(*codep & 0x4))
12963 return &bad_opcode;
12964
12965 switch ((*codep & 0x3))
12966 {
12967 case 0:
12968 vex.prefix = 0;
12969 break;
12970 case 1:
12971 vex.prefix = DATA_PREFIX_OPCODE;
12972 break;
12973 case 2:
12974 vex.prefix = REPE_PREFIX_OPCODE;
12975 break;
12976 case 3:
12977 vex.prefix = REPNE_PREFIX_OPCODE;
12978 break;
12979 }
12980
12981 /* The third byte after 0x62. */
12982 codep++;
12983
12984 /* Remember the static rounding bits. */
12985 vex.ll = (*codep >> 5) & 3;
12986 vex.b = (*codep & 0x10) != 0;
12987
12988 vex.v = *codep & 0x8;
12989 vex.mask_register_specifier = *codep & 0x7;
12990 vex.zeroing = *codep & 0x80;
12991
12992 need_vex = 1;
12993 need_vex_reg = 1;
12994 codep++;
12995 vindex = *codep++;
12996 dp = &evex_table[vex_table_index][vindex];
285ca992 12997 end_codep = codep;
43234a1e
L
12998 FETCH_DATA (info, codep + 1);
12999 modrm.mod = (*codep >> 6) & 3;
13000 modrm.reg = (*codep >> 3) & 7;
13001 modrm.rm = *codep & 7;
13002
13003 /* Set vector length. */
13004 if (modrm.mod == 3 && vex.b)
13005 vex.length = 512;
13006 else
13007 {
13008 switch (vex.ll)
13009 {
13010 case 0x0:
13011 vex.length = 128;
13012 break;
13013 case 0x1:
13014 vex.length = 256;
13015 break;
13016 case 0x2:
13017 vex.length = 512;
13018 break;
13019 default:
13020 return &bad_opcode;
13021 }
13022 }
13023 break;
13024
592d1631
L
13025 case 0:
13026 dp = &bad_opcode;
13027 break;
13028
b844680a 13029 default:
d34b5006 13030 abort ();
b844680a
L
13031 }
13032
13033 if (dp->name != NULL)
13034 return dp;
13035 else
8bb15339 13036 return get_valid_dis386 (dp, info);
b844680a
L
13037}
13038
dfc8cf43 13039static void
55cf16e1 13040get_sib (disassemble_info *info, int sizeflag)
dfc8cf43
L
13041{
13042 /* If modrm.mod == 3, operand must be register. */
13043 if (need_modrm
55cf16e1 13044 && ((sizeflag & AFLAG) || address_mode == mode_64bit)
dfc8cf43
L
13045 && modrm.mod != 3
13046 && modrm.rm == 4)
13047 {
13048 FETCH_DATA (info, codep + 2);
13049 sib.index = (codep [1] >> 3) & 7;
13050 sib.scale = (codep [1] >> 6) & 3;
13051 sib.base = codep [1] & 7;
13052 }
13053}
13054
e396998b 13055static int
26ca5450 13056print_insn (bfd_vma pc, disassemble_info *info)
252b5132 13057{
2da11e11 13058 const struct dis386 *dp;
252b5132 13059 int i;
ce518a5f 13060 char *op_txt[MAX_OPERANDS];
252b5132 13061 int needcomma;
df18fdba 13062 int sizeflag, orig_sizeflag;
e396998b 13063 const char *p;
252b5132 13064 struct dis_private priv;
f16cd0d5 13065 int prefix_length;
252b5132 13066
d7921315
L
13067 priv.orig_sizeflag = AFLAG | DFLAG;
13068 if ((info->mach & bfd_mach_i386_i386) != 0)
cb712a9e 13069 address_mode = mode_32bit;
2da11e11 13070 else if (info->mach == bfd_mach_i386_i8086)
d7921315
L
13071 {
13072 address_mode = mode_16bit;
13073 priv.orig_sizeflag = 0;
13074 }
2da11e11 13075 else
d7921315
L
13076 address_mode = mode_64bit;
13077
13078 if (intel_syntax == (char) -1)
13079 intel_syntax = (info->mach & bfd_mach_i386_intel_syntax) != 0;
e396998b
AM
13080
13081 for (p = info->disassembler_options; p != NULL; )
13082 {
5db04b09
L
13083 if (CONST_STRNEQ (p, "amd64"))
13084 isa64 = amd64;
13085 else if (CONST_STRNEQ (p, "intel64"))
13086 isa64 = intel64;
13087 else if (CONST_STRNEQ (p, "x86-64"))
e396998b 13088 {
cb712a9e 13089 address_mode = mode_64bit;
e396998b
AM
13090 priv.orig_sizeflag = AFLAG | DFLAG;
13091 }
0112cd26 13092 else if (CONST_STRNEQ (p, "i386"))
e396998b 13093 {
cb712a9e 13094 address_mode = mode_32bit;
e396998b
AM
13095 priv.orig_sizeflag = AFLAG | DFLAG;
13096 }
0112cd26 13097 else if (CONST_STRNEQ (p, "i8086"))
e396998b 13098 {
cb712a9e 13099 address_mode = mode_16bit;
e396998b
AM
13100 priv.orig_sizeflag = 0;
13101 }
0112cd26 13102 else if (CONST_STRNEQ (p, "intel"))
e396998b
AM
13103 {
13104 intel_syntax = 1;
9d141669
L
13105 if (CONST_STRNEQ (p + 5, "-mnemonic"))
13106 intel_mnemonic = 1;
e396998b 13107 }
0112cd26 13108 else if (CONST_STRNEQ (p, "att"))
e396998b
AM
13109 {
13110 intel_syntax = 0;
9d141669
L
13111 if (CONST_STRNEQ (p + 3, "-mnemonic"))
13112 intel_mnemonic = 0;
e396998b 13113 }
0112cd26 13114 else if (CONST_STRNEQ (p, "addr"))
e396998b 13115 {
f59a29b9
L
13116 if (address_mode == mode_64bit)
13117 {
13118 if (p[4] == '3' && p[5] == '2')
13119 priv.orig_sizeflag &= ~AFLAG;
13120 else if (p[4] == '6' && p[5] == '4')
13121 priv.orig_sizeflag |= AFLAG;
13122 }
13123 else
13124 {
13125 if (p[4] == '1' && p[5] == '6')
13126 priv.orig_sizeflag &= ~AFLAG;
13127 else if (p[4] == '3' && p[5] == '2')
13128 priv.orig_sizeflag |= AFLAG;
13129 }
e396998b 13130 }
0112cd26 13131 else if (CONST_STRNEQ (p, "data"))
e396998b
AM
13132 {
13133 if (p[4] == '1' && p[5] == '6')
13134 priv.orig_sizeflag &= ~DFLAG;
13135 else if (p[4] == '3' && p[5] == '2')
13136 priv.orig_sizeflag |= DFLAG;
13137 }
0112cd26 13138 else if (CONST_STRNEQ (p, "suffix"))
e396998b
AM
13139 priv.orig_sizeflag |= SUFFIX_ALWAYS;
13140
13141 p = strchr (p, ',');
13142 if (p != NULL)
13143 p++;
13144 }
13145
c0f92bf9
L
13146 if (address_mode == mode_64bit && sizeof (bfd_vma) < 8)
13147 {
13148 (*info->fprintf_func) (info->stream,
13149 _("64-bit address is disabled"));
13150 return -1;
13151 }
13152
e396998b
AM
13153 if (intel_syntax)
13154 {
13155 names64 = intel_names64;
13156 names32 = intel_names32;
13157 names16 = intel_names16;
13158 names8 = intel_names8;
13159 names8rex = intel_names8rex;
13160 names_seg = intel_names_seg;
b9733481 13161 names_mm = intel_names_mm;
7e8b059b 13162 names_bnd = intel_names_bnd;
b9733481
L
13163 names_xmm = intel_names_xmm;
13164 names_ymm = intel_names_ymm;
43234a1e 13165 names_zmm = intel_names_zmm;
db51cc60
L
13166 index64 = intel_index64;
13167 index32 = intel_index32;
43234a1e 13168 names_mask = intel_names_mask;
e396998b
AM
13169 index16 = intel_index16;
13170 open_char = '[';
13171 close_char = ']';
13172 separator_char = '+';
13173 scale_char = '*';
13174 }
13175 else
13176 {
13177 names64 = att_names64;
13178 names32 = att_names32;
13179 names16 = att_names16;
13180 names8 = att_names8;
13181 names8rex = att_names8rex;
13182 names_seg = att_names_seg;
b9733481 13183 names_mm = att_names_mm;
7e8b059b 13184 names_bnd = att_names_bnd;
b9733481
L
13185 names_xmm = att_names_xmm;
13186 names_ymm = att_names_ymm;
43234a1e 13187 names_zmm = att_names_zmm;
db51cc60
L
13188 index64 = att_index64;
13189 index32 = att_index32;
43234a1e 13190 names_mask = att_names_mask;
e396998b
AM
13191 index16 = att_index16;
13192 open_char = '(';
13193 close_char = ')';
13194 separator_char = ',';
13195 scale_char = ',';
13196 }
2da11e11 13197
4fe53c98 13198 /* The output looks better if we put 7 bytes on a line, since that
8a9036a4
L
13199 puts most long word instructions on a single line. Use 8 bytes
13200 for Intel L1OM. */
d7921315 13201 if ((info->mach & bfd_mach_l1om) != 0)
8a9036a4
L
13202 info->bytes_per_line = 8;
13203 else
13204 info->bytes_per_line = 7;
252b5132 13205
26ca5450 13206 info->private_data = &priv;
252b5132
RH
13207 priv.max_fetched = priv.the_buffer;
13208 priv.insn_start = pc;
252b5132
RH
13209
13210 obuf[0] = 0;
ce518a5f
L
13211 for (i = 0; i < MAX_OPERANDS; ++i)
13212 {
13213 op_out[i][0] = 0;
13214 op_index[i] = -1;
13215 }
252b5132
RH
13216
13217 the_info = info;
13218 start_pc = pc;
e396998b
AM
13219 start_codep = priv.the_buffer;
13220 codep = priv.the_buffer;
252b5132 13221
8df14d78 13222 if (OPCODES_SIGSETJMP (priv.bailout) != 0)
5076851f 13223 {
7d421014
ILT
13224 const char *name;
13225
5076851f 13226 /* Getting here means we tried for data but didn't get it. That
e396998b
AM
13227 means we have an incomplete instruction of some sort. Just
13228 print the first byte as a prefix or a .byte pseudo-op. */
13229 if (codep > priv.the_buffer)
5076851f 13230 {
e396998b 13231 name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
7d421014
ILT
13232 if (name != NULL)
13233 (*info->fprintf_func) (info->stream, "%s", name);
13234 else
5076851f 13235 {
7d421014
ILT
13236 /* Just print the first byte as a .byte instruction. */
13237 (*info->fprintf_func) (info->stream, ".byte 0x%x",
e396998b 13238 (unsigned int) priv.the_buffer[0]);
5076851f 13239 }
5076851f 13240
7d421014 13241 return 1;
5076851f
ILT
13242 }
13243
13244 return -1;
13245 }
13246
52b15da3 13247 obufp = obuf;
f16cd0d5
L
13248 sizeflag = priv.orig_sizeflag;
13249
13250 if (!ckprefix () || rex_used)
13251 {
13252 /* Too many prefixes or unused REX prefixes. */
13253 for (i = 0;
f6dd4781 13254 i < (int) ARRAY_SIZE (all_prefixes) && all_prefixes[i];
f16cd0d5 13255 i++)
de882298 13256 (*info->fprintf_func) (info->stream, "%s%s",
6c067bbb 13257 i == 0 ? "" : " ",
f16cd0d5 13258 prefix_name (all_prefixes[i], sizeflag));
de882298 13259 return i;
f16cd0d5 13260 }
252b5132
RH
13261
13262 insn_codep = codep;
13263
13264 FETCH_DATA (info, codep + 1);
13265 two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
13266
3e7d61b2 13267 if (((prefixes & PREFIX_FWAIT)
f16cd0d5 13268 && ((*codep < 0xd8) || (*codep > 0xdf))))
252b5132 13269 {
86a80a50 13270 /* Handle prefixes before fwait. */
d9949a36 13271 for (i = 0; i < fwait_prefix && all_prefixes[i];
86a80a50
L
13272 i++)
13273 (*info->fprintf_func) (info->stream, "%s ",
13274 prefix_name (all_prefixes[i], sizeflag));
f16cd0d5 13275 (*info->fprintf_func) (info->stream, "fwait");
86a80a50 13276 return i + 1;
252b5132
RH
13277 }
13278
252b5132
RH
13279 if (*codep == 0x0f)
13280 {
eec0f4ca 13281 unsigned char threebyte;
5f40e14d
JS
13282
13283 codep++;
13284 FETCH_DATA (info, codep + 1);
13285 threebyte = *codep;
eec0f4ca 13286 dp = &dis386_twobyte[threebyte];
252b5132 13287 need_modrm = twobyte_has_modrm[*codep];
eec0f4ca 13288 codep++;
252b5132
RH
13289 }
13290 else
13291 {
6439fc28 13292 dp = &dis386[*codep];
252b5132 13293 need_modrm = onebyte_has_modrm[*codep];
eec0f4ca 13294 codep++;
252b5132 13295 }
246c51aa 13296
df18fdba
L
13297 /* Save sizeflag for printing the extra prefixes later before updating
13298 it for mnemonic and operand processing. The prefix names depend
13299 only on the address mode. */
13300 orig_sizeflag = sizeflag;
c608c12e 13301 if (prefixes & PREFIX_ADDR)
df18fdba 13302 sizeflag ^= AFLAG;
b844680a 13303 if ((prefixes & PREFIX_DATA))
df18fdba 13304 sizeflag ^= DFLAG;
3ffd33cf 13305
285ca992 13306 end_codep = codep;
8bb15339 13307 if (need_modrm)
252b5132
RH
13308 {
13309 FETCH_DATA (info, codep + 1);
7967e09e
L
13310 modrm.mod = (*codep >> 6) & 3;
13311 modrm.reg = (*codep >> 3) & 7;
13312 modrm.rm = *codep & 7;
252b5132
RH
13313 }
13314
42d5f9c6
MS
13315 need_vex = 0;
13316 need_vex_reg = 0;
13317 vex_w_done = 0;
43234a1e 13318 vex.evex = 0;
55b126d4 13319
ce518a5f 13320 if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
252b5132 13321 {
55cf16e1 13322 get_sib (info, sizeflag);
252b5132
RH
13323 dofloat (sizeflag);
13324 }
13325 else
13326 {
8bb15339 13327 dp = get_valid_dis386 (dp, info);
b844680a 13328 if (dp != NULL && putop (dp->name, sizeflag) == 0)
6c067bbb 13329 {
55cf16e1 13330 get_sib (info, sizeflag);
ce518a5f
L
13331 for (i = 0; i < MAX_OPERANDS; ++i)
13332 {
246c51aa 13333 obufp = op_out[i];
ce518a5f
L
13334 op_ad = MAX_OPERANDS - 1 - i;
13335 if (dp->op[i].rtn)
13336 (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
43234a1e
L
13337 /* For EVEX instruction after the last operand masking
13338 should be printed. */
13339 if (i == 0 && vex.evex)
13340 {
13341 /* Don't print {%k0}. */
13342 if (vex.mask_register_specifier)
13343 {
13344 oappend ("{");
13345 oappend (names_mask[vex.mask_register_specifier]);
13346 oappend ("}");
13347 }
13348 if (vex.zeroing)
13349 oappend ("{z}");
13350 }
ce518a5f 13351 }
6439fc28 13352 }
252b5132
RH
13353 }
13354
d869730d 13355 /* Check if the REX prefix is used. */
e2e6193d 13356 if (rex_ignored == 0 && (rex ^ rex_used) == 0 && last_rex_prefix >= 0)
f16cd0d5
L
13357 all_prefixes[last_rex_prefix] = 0;
13358
5e6718e4 13359 /* Check if the SEG prefix is used. */
f16cd0d5
L
13360 if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
13361 | PREFIX_FS | PREFIX_GS)) != 0
285ca992 13362 && (used_prefixes & active_seg_prefix) != 0)
f16cd0d5
L
13363 all_prefixes[last_seg_prefix] = 0;
13364
5e6718e4 13365 /* Check if the ADDR prefix is used. */
f16cd0d5
L
13366 if ((prefixes & PREFIX_ADDR) != 0
13367 && (used_prefixes & PREFIX_ADDR) != 0)
13368 all_prefixes[last_addr_prefix] = 0;
13369
df18fdba
L
13370 /* Check if the DATA prefix is used. */
13371 if ((prefixes & PREFIX_DATA) != 0
13372 && (used_prefixes & PREFIX_DATA) != 0)
13373 all_prefixes[last_data_prefix] = 0;
f16cd0d5 13374
df18fdba 13375 /* Print the extra prefixes. */
f16cd0d5 13376 prefix_length = 0;
f310f33d 13377 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
f16cd0d5
L
13378 if (all_prefixes[i])
13379 {
13380 const char *name;
df18fdba 13381 name = prefix_name (all_prefixes[i], orig_sizeflag);
f16cd0d5
L
13382 if (name == NULL)
13383 abort ();
13384 prefix_length += strlen (name) + 1;
13385 (*info->fprintf_func) (info->stream, "%s ", name);
13386 }
b844680a 13387
285ca992
L
13388 /* If the mandatory PREFIX_REPZ/PREFIX_REPNZ/PREFIX_DATA prefix is
13389 unused, opcode is invalid. Since the PREFIX_DATA prefix may be
13390 used by putop and MMX/SSE operand and may be overriden by the
13391 PREFIX_REPZ/PREFIX_REPNZ fix, we check the PREFIX_DATA prefix
13392 separately. */
3888916d 13393 if (dp->prefix_requirement == PREFIX_OPCODE
285ca992
L
13394 && dp != &bad_opcode
13395 && (((prefixes
13396 & (PREFIX_REPZ | PREFIX_REPNZ)) != 0
13397 && (used_prefixes
13398 & (PREFIX_REPZ | PREFIX_REPNZ)) == 0)
13399 || ((((prefixes
13400 & (PREFIX_REPZ | PREFIX_REPNZ | PREFIX_DATA))
13401 == PREFIX_DATA)
13402 && (used_prefixes & PREFIX_DATA) == 0))))
13403 {
13404 (*info->fprintf_func) (info->stream, "(bad)");
13405 return end_codep - priv.the_buffer;
13406 }
13407
f16cd0d5
L
13408 /* Check maximum code length. */
13409 if ((codep - start_codep) > MAX_CODE_LENGTH)
13410 {
13411 (*info->fprintf_func) (info->stream, "(bad)");
13412 return MAX_CODE_LENGTH;
13413 }
b844680a 13414
ea397f5b 13415 obufp = mnemonicendp;
f16cd0d5 13416 for (i = strlen (obuf) + prefix_length; i < 6; i++)
252b5132
RH
13417 oappend (" ");
13418 oappend (" ");
13419 (*info->fprintf_func) (info->stream, "%s", obuf);
13420
13421 /* The enter and bound instructions are printed with operands in the same
13422 order as the intel book; everything else is printed in reverse order. */
2da11e11 13423 if (intel_syntax || two_source_ops)
252b5132 13424 {
185b1163
L
13425 bfd_vma riprel;
13426
ce518a5f 13427 for (i = 0; i < MAX_OPERANDS; ++i)
6c067bbb 13428 op_txt[i] = op_out[i];
246c51aa 13429
3a8547d2
JB
13430 if (intel_syntax && dp && dp->op[2].rtn == OP_Rounding
13431 && dp->op[3].rtn == OP_E && dp->op[4].rtn == NULL)
13432 {
13433 op_txt[2] = op_out[3];
13434 op_txt[3] = op_out[2];
13435 }
13436
ce518a5f
L
13437 for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
13438 {
6c067bbb
RM
13439 op_ad = op_index[i];
13440 op_index[i] = op_index[MAX_OPERANDS - 1 - i];
13441 op_index[MAX_OPERANDS - 1 - i] = op_ad;
185b1163
L
13442 riprel = op_riprel[i];
13443 op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
13444 op_riprel[MAX_OPERANDS - 1 - i] = riprel;
ce518a5f 13445 }
252b5132
RH
13446 }
13447 else
13448 {
ce518a5f 13449 for (i = 0; i < MAX_OPERANDS; ++i)
6c067bbb 13450 op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
050dfa73
MM
13451 }
13452
ce518a5f
L
13453 needcomma = 0;
13454 for (i = 0; i < MAX_OPERANDS; ++i)
13455 if (*op_txt[i])
13456 {
13457 if (needcomma)
13458 (*info->fprintf_func) (info->stream, ",");
13459 if (op_index[i] != -1 && !op_riprel[i])
13460 (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
13461 else
13462 (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
13463 needcomma = 1;
13464 }
050dfa73 13465
ce518a5f 13466 for (i = 0; i < MAX_OPERANDS; i++)
52b15da3
JH
13467 if (op_index[i] != -1 && op_riprel[i])
13468 {
13469 (*info->fprintf_func) (info->stream, " # ");
4fd7268a 13470 (*info->print_address_func) ((bfd_vma) (start_pc + (codep - start_codep)
52b15da3 13471 + op_address[op_index[i]]), info);
185b1163 13472 break;
52b15da3 13473 }
e396998b 13474 return codep - priv.the_buffer;
252b5132
RH
13475}
13476
6439fc28 13477static const char *float_mem[] = {
252b5132 13478 /* d8 */
7c52e0e8
L
13479 "fadd{s|}",
13480 "fmul{s|}",
13481 "fcom{s|}",
13482 "fcomp{s|}",
13483 "fsub{s|}",
13484 "fsubr{s|}",
13485 "fdiv{s|}",
13486 "fdivr{s|}",
db6eb5be 13487 /* d9 */
7c52e0e8 13488 "fld{s|}",
252b5132 13489 "(bad)",
7c52e0e8
L
13490 "fst{s|}",
13491 "fstp{s|}",
9306ca4a 13492 "fldenvIC",
252b5132 13493 "fldcw",
9306ca4a 13494 "fNstenvIC",
252b5132
RH
13495 "fNstcw",
13496 /* da */
7c52e0e8
L
13497 "fiadd{l|}",
13498 "fimul{l|}",
13499 "ficom{l|}",
13500 "ficomp{l|}",
13501 "fisub{l|}",
13502 "fisubr{l|}",
13503 "fidiv{l|}",
13504 "fidivr{l|}",
252b5132 13505 /* db */
7c52e0e8
L
13506 "fild{l|}",
13507 "fisttp{l|}",
13508 "fist{l|}",
13509 "fistp{l|}",
252b5132 13510 "(bad)",
6439fc28 13511 "fld{t||t|}",
252b5132 13512 "(bad)",
6439fc28 13513 "fstp{t||t|}",
252b5132 13514 /* dc */
7c52e0e8
L
13515 "fadd{l|}",
13516 "fmul{l|}",
13517 "fcom{l|}",
13518 "fcomp{l|}",
13519 "fsub{l|}",
13520 "fsubr{l|}",
13521 "fdiv{l|}",
13522 "fdivr{l|}",
252b5132 13523 /* dd */
7c52e0e8
L
13524 "fld{l|}",
13525 "fisttp{ll|}",
13526 "fst{l||}",
13527 "fstp{l|}",
9306ca4a 13528 "frstorIC",
252b5132 13529 "(bad)",
9306ca4a 13530 "fNsaveIC",
252b5132
RH
13531 "fNstsw",
13532 /* de */
13533 "fiadd",
13534 "fimul",
13535 "ficom",
13536 "ficomp",
13537 "fisub",
13538 "fisubr",
13539 "fidiv",
13540 "fidivr",
13541 /* df */
13542 "fild",
ca164297 13543 "fisttp",
252b5132
RH
13544 "fist",
13545 "fistp",
13546 "fbld",
7c52e0e8 13547 "fild{ll|}",
252b5132 13548 "fbstp",
7c52e0e8 13549 "fistp{ll|}",
1d9f512f
AM
13550};
13551
13552static const unsigned char float_mem_mode[] = {
13553 /* d8 */
13554 d_mode,
13555 d_mode,
13556 d_mode,
13557 d_mode,
13558 d_mode,
13559 d_mode,
13560 d_mode,
13561 d_mode,
13562 /* d9 */
13563 d_mode,
13564 0,
13565 d_mode,
13566 d_mode,
13567 0,
13568 w_mode,
13569 0,
13570 w_mode,
13571 /* da */
13572 d_mode,
13573 d_mode,
13574 d_mode,
13575 d_mode,
13576 d_mode,
13577 d_mode,
13578 d_mode,
13579 d_mode,
13580 /* db */
13581 d_mode,
13582 d_mode,
13583 d_mode,
13584 d_mode,
13585 0,
9306ca4a 13586 t_mode,
1d9f512f 13587 0,
9306ca4a 13588 t_mode,
1d9f512f
AM
13589 /* dc */
13590 q_mode,
13591 q_mode,
13592 q_mode,
13593 q_mode,
13594 q_mode,
13595 q_mode,
13596 q_mode,
13597 q_mode,
13598 /* dd */
13599 q_mode,
13600 q_mode,
13601 q_mode,
13602 q_mode,
13603 0,
13604 0,
13605 0,
13606 w_mode,
13607 /* de */
13608 w_mode,
13609 w_mode,
13610 w_mode,
13611 w_mode,
13612 w_mode,
13613 w_mode,
13614 w_mode,
13615 w_mode,
13616 /* df */
13617 w_mode,
13618 w_mode,
13619 w_mode,
13620 w_mode,
9306ca4a 13621 t_mode,
1d9f512f 13622 q_mode,
9306ca4a 13623 t_mode,
1d9f512f 13624 q_mode
252b5132
RH
13625};
13626
ce518a5f
L
13627#define ST { OP_ST, 0 }
13628#define STi { OP_STi, 0 }
252b5132 13629
48c97fa1
L
13630#define FGRPd9_2 NULL, { { NULL, 1 } }, 0
13631#define FGRPd9_4 NULL, { { NULL, 2 } }, 0
13632#define FGRPd9_5 NULL, { { NULL, 3 } }, 0
13633#define FGRPd9_6 NULL, { { NULL, 4 } }, 0
13634#define FGRPd9_7 NULL, { { NULL, 5 } }, 0
13635#define FGRPda_5 NULL, { { NULL, 6 } }, 0
13636#define FGRPdb_4 NULL, { { NULL, 7 } }, 0
13637#define FGRPde_3 NULL, { { NULL, 8 } }, 0
13638#define FGRPdf_4 NULL, { { NULL, 9 } }, 0
252b5132 13639
2da11e11 13640static const struct dis386 float_reg[][8] = {
252b5132
RH
13641 /* d8 */
13642 {
bf890a93
IT
13643 { "fadd", { ST, STi }, 0 },
13644 { "fmul", { ST, STi }, 0 },
13645 { "fcom", { STi }, 0 },
13646 { "fcomp", { STi }, 0 },
13647 { "fsub", { ST, STi }, 0 },
13648 { "fsubr", { ST, STi }, 0 },
13649 { "fdiv", { ST, STi }, 0 },
13650 { "fdivr", { ST, STi }, 0 },
252b5132
RH
13651 },
13652 /* d9 */
13653 {
bf890a93
IT
13654 { "fld", { STi }, 0 },
13655 { "fxch", { STi }, 0 },
252b5132 13656 { FGRPd9_2 },
592d1631 13657 { Bad_Opcode },
252b5132
RH
13658 { FGRPd9_4 },
13659 { FGRPd9_5 },
13660 { FGRPd9_6 },
13661 { FGRPd9_7 },
13662 },
13663 /* da */
13664 {
bf890a93
IT
13665 { "fcmovb", { ST, STi }, 0 },
13666 { "fcmove", { ST, STi }, 0 },
13667 { "fcmovbe",{ ST, STi }, 0 },
13668 { "fcmovu", { ST, STi }, 0 },
592d1631 13669 { Bad_Opcode },
252b5132 13670 { FGRPda_5 },
592d1631
L
13671 { Bad_Opcode },
13672 { Bad_Opcode },
252b5132
RH
13673 },
13674 /* db */
13675 {
bf890a93
IT
13676 { "fcmovnb",{ ST, STi }, 0 },
13677 { "fcmovne",{ ST, STi }, 0 },
13678 { "fcmovnbe",{ ST, STi }, 0 },
13679 { "fcmovnu",{ ST, STi }, 0 },
252b5132 13680 { FGRPdb_4 },
bf890a93
IT
13681 { "fucomi", { ST, STi }, 0 },
13682 { "fcomi", { ST, STi }, 0 },
592d1631 13683 { Bad_Opcode },
252b5132
RH
13684 },
13685 /* dc */
13686 {
bf890a93
IT
13687 { "fadd", { STi, ST }, 0 },
13688 { "fmul", { STi, ST }, 0 },
592d1631
L
13689 { Bad_Opcode },
13690 { Bad_Opcode },
bf890a93
IT
13691 { "fsub!M", { STi, ST }, 0 },
13692 { "fsubM", { STi, ST }, 0 },
13693 { "fdiv!M", { STi, ST }, 0 },
13694 { "fdivM", { STi, ST }, 0 },
252b5132
RH
13695 },
13696 /* dd */
13697 {
bf890a93 13698 { "ffree", { STi }, 0 },
592d1631 13699 { Bad_Opcode },
bf890a93
IT
13700 { "fst", { STi }, 0 },
13701 { "fstp", { STi }, 0 },
13702 { "fucom", { STi }, 0 },
13703 { "fucomp", { STi }, 0 },
592d1631
L
13704 { Bad_Opcode },
13705 { Bad_Opcode },
252b5132
RH
13706 },
13707 /* de */
13708 {
bf890a93
IT
13709 { "faddp", { STi, ST }, 0 },
13710 { "fmulp", { STi, ST }, 0 },
592d1631 13711 { Bad_Opcode },
252b5132 13712 { FGRPde_3 },
bf890a93
IT
13713 { "fsub!Mp", { STi, ST }, 0 },
13714 { "fsubMp", { STi, ST }, 0 },
13715 { "fdiv!Mp", { STi, ST }, 0 },
13716 { "fdivMp", { STi, ST }, 0 },
252b5132
RH
13717 },
13718 /* df */
13719 {
bf890a93 13720 { "ffreep", { STi }, 0 },
592d1631
L
13721 { Bad_Opcode },
13722 { Bad_Opcode },
13723 { Bad_Opcode },
252b5132 13724 { FGRPdf_4 },
bf890a93
IT
13725 { "fucomip", { ST, STi }, 0 },
13726 { "fcomip", { ST, STi }, 0 },
592d1631 13727 { Bad_Opcode },
252b5132
RH
13728 },
13729};
13730
252b5132 13731static char *fgrps[][8] = {
48c97fa1
L
13732 /* Bad opcode 0 */
13733 {
13734 "(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13735 },
13736
13737 /* d9_2 1 */
252b5132
RH
13738 {
13739 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13740 },
13741
48c97fa1 13742 /* d9_4 2 */
252b5132
RH
13743 {
13744 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
13745 },
13746
48c97fa1 13747 /* d9_5 3 */
252b5132
RH
13748 {
13749 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
13750 },
13751
48c97fa1 13752 /* d9_6 4 */
252b5132
RH
13753 {
13754 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
13755 },
13756
48c97fa1 13757 /* d9_7 5 */
252b5132
RH
13758 {
13759 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
13760 },
13761
48c97fa1 13762 /* da_5 6 */
252b5132
RH
13763 {
13764 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13765 },
13766
48c97fa1 13767 /* db_4 7 */
252b5132 13768 {
309d3373
JB
13769 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
13770 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
252b5132
RH
13771 },
13772
48c97fa1 13773 /* de_3 8 */
252b5132
RH
13774 {
13775 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13776 },
13777
48c97fa1 13778 /* df_4 9 */
252b5132
RH
13779 {
13780 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13781 },
13782};
13783
b6169b20
L
13784static void
13785swap_operand (void)
13786{
13787 mnemonicendp[0] = '.';
13788 mnemonicendp[1] = 's';
13789 mnemonicendp += 2;
13790}
13791
b844680a
L
13792static void
13793OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
13794 int sizeflag ATTRIBUTE_UNUSED)
13795{
13796 /* Skip mod/rm byte. */
13797 MODRM_CHECK;
13798 codep++;
13799}
13800
252b5132 13801static void
26ca5450 13802dofloat (int sizeflag)
252b5132 13803{
2da11e11 13804 const struct dis386 *dp;
252b5132
RH
13805 unsigned char floatop;
13806
13807 floatop = codep[-1];
13808
7967e09e 13809 if (modrm.mod != 3)
252b5132 13810 {
7967e09e 13811 int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
1d9f512f
AM
13812
13813 putop (float_mem[fp_indx], sizeflag);
ce518a5f 13814 obufp = op_out[0];
6e50d963 13815 op_ad = 2;
1d9f512f 13816 OP_E (float_mem_mode[fp_indx], sizeflag);
252b5132
RH
13817 return;
13818 }
6608db57 13819 /* Skip mod/rm byte. */
4bba6815 13820 MODRM_CHECK;
252b5132
RH
13821 codep++;
13822
7967e09e 13823 dp = &float_reg[floatop - 0xd8][modrm.reg];
252b5132
RH
13824 if (dp->name == NULL)
13825 {
7967e09e 13826 putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
252b5132 13827
6608db57 13828 /* Instruction fnstsw is only one with strange arg. */
252b5132 13829 if (floatop == 0xdf && codep[-1] == 0xe0)
ce518a5f 13830 strcpy (op_out[0], names16[0]);
252b5132
RH
13831 }
13832 else
13833 {
13834 putop (dp->name, sizeflag);
13835
ce518a5f 13836 obufp = op_out[0];
6e50d963 13837 op_ad = 2;
ce518a5f
L
13838 if (dp->op[0].rtn)
13839 (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
6e50d963 13840
ce518a5f 13841 obufp = op_out[1];
6e50d963 13842 op_ad = 1;
ce518a5f
L
13843 if (dp->op[1].rtn)
13844 (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
252b5132
RH
13845 }
13846}
13847
9ce09ba2
RM
13848/* Like oappend (below), but S is a string starting with '%'.
13849 In Intel syntax, the '%' is elided. */
13850static void
13851oappend_maybe_intel (const char *s)
13852{
13853 oappend (s + intel_syntax);
13854}
13855
252b5132 13856static void
26ca5450 13857OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 13858{
9ce09ba2 13859 oappend_maybe_intel ("%st");
252b5132
RH
13860}
13861
252b5132 13862static void
26ca5450 13863OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 13864{
7967e09e 13865 sprintf (scratchbuf, "%%st(%d)", modrm.rm);
9ce09ba2 13866 oappend_maybe_intel (scratchbuf);
252b5132
RH
13867}
13868
6608db57 13869/* Capital letters in template are macros. */
6439fc28 13870static int
d3ce72d0 13871putop (const char *in_template, int sizeflag)
252b5132 13872{
2da11e11 13873 const char *p;
9306ca4a 13874 int alt = 0;
9d141669 13875 int cond = 1;
98b528ac
L
13876 unsigned int l = 0, len = 1;
13877 char last[4];
13878
13879#define SAVE_LAST(c) \
13880 if (l < len && l < sizeof (last)) \
13881 last[l++] = c; \
13882 else \
13883 abort ();
252b5132 13884
d3ce72d0 13885 for (p = in_template; *p; p++)
252b5132
RH
13886 {
13887 switch (*p)
13888 {
13889 default:
13890 *obufp++ = *p;
13891 break;
98b528ac
L
13892 case '%':
13893 len++;
13894 break;
9d141669
L
13895 case '!':
13896 cond = 0;
13897 break;
6439fc28 13898 case '{':
6439fc28 13899 if (intel_syntax)
6439fc28
AM
13900 {
13901 while (*++p != '|')
7c52e0e8
L
13902 if (*p == '}' || *p == '\0')
13903 abort ();
6439fc28 13904 }
9306ca4a
JB
13905 /* Fall through. */
13906 case 'I':
13907 alt = 1;
13908 continue;
6439fc28
AM
13909 case '|':
13910 while (*++p != '}')
13911 {
13912 if (*p == '\0')
13913 abort ();
13914 }
13915 break;
13916 case '}':
13917 break;
252b5132 13918 case 'A':
db6eb5be
AM
13919 if (intel_syntax)
13920 break;
7967e09e 13921 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
252b5132
RH
13922 *obufp++ = 'b';
13923 break;
13924 case 'B':
4b06377f
L
13925 if (l == 0 && len == 1)
13926 {
13927case_B:
13928 if (intel_syntax)
13929 break;
13930 if (sizeflag & SUFFIX_ALWAYS)
13931 *obufp++ = 'b';
13932 }
13933 else
13934 {
13935 if (l != 1
13936 || len != 2
13937 || last[0] != 'L')
13938 {
13939 SAVE_LAST (*p);
13940 break;
13941 }
13942
13943 if (address_mode == mode_64bit
13944 && !(prefixes & PREFIX_ADDR))
13945 {
13946 *obufp++ = 'a';
13947 *obufp++ = 'b';
13948 *obufp++ = 's';
13949 }
13950
13951 goto case_B;
13952 }
252b5132 13953 break;
9306ca4a
JB
13954 case 'C':
13955 if (intel_syntax && !alt)
13956 break;
13957 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
13958 {
13959 if (sizeflag & DFLAG)
13960 *obufp++ = intel_syntax ? 'd' : 'l';
13961 else
13962 *obufp++ = intel_syntax ? 'w' : 's';
13963 used_prefixes |= (prefixes & PREFIX_DATA);
13964 }
13965 break;
ed7841b3
JB
13966 case 'D':
13967 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
13968 break;
161a04f6 13969 USED_REX (REX_W);
7967e09e 13970 if (modrm.mod == 3)
ed7841b3 13971 {
161a04f6 13972 if (rex & REX_W)
ed7841b3 13973 *obufp++ = 'q';
ed7841b3 13974 else
f16cd0d5
L
13975 {
13976 if (sizeflag & DFLAG)
13977 *obufp++ = intel_syntax ? 'd' : 'l';
13978 else
13979 *obufp++ = 'w';
13980 used_prefixes |= (prefixes & PREFIX_DATA);
13981 }
ed7841b3
JB
13982 }
13983 else
13984 *obufp++ = 'w';
13985 break;
252b5132 13986 case 'E': /* For jcxz/jecxz */
cb712a9e 13987 if (address_mode == mode_64bit)
c1a64871
JH
13988 {
13989 if (sizeflag & AFLAG)
13990 *obufp++ = 'r';
13991 else
13992 *obufp++ = 'e';
13993 }
13994 else
13995 if (sizeflag & AFLAG)
13996 *obufp++ = 'e';
3ffd33cf
AM
13997 used_prefixes |= (prefixes & PREFIX_ADDR);
13998 break;
13999 case 'F':
db6eb5be
AM
14000 if (intel_syntax)
14001 break;
e396998b 14002 if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
3ffd33cf
AM
14003 {
14004 if (sizeflag & AFLAG)
cb712a9e 14005 *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
3ffd33cf 14006 else
cb712a9e 14007 *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
3ffd33cf
AM
14008 used_prefixes |= (prefixes & PREFIX_ADDR);
14009 }
252b5132 14010 break;
52fd6d94
JB
14011 case 'G':
14012 if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
14013 break;
161a04f6 14014 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
14015 *obufp++ = 'l';
14016 else
14017 *obufp++ = 'w';
161a04f6 14018 if (!(rex & REX_W))
52fd6d94
JB
14019 used_prefixes |= (prefixes & PREFIX_DATA);
14020 break;
5dd0794d 14021 case 'H':
db6eb5be
AM
14022 if (intel_syntax)
14023 break;
5dd0794d
AM
14024 if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
14025 || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
14026 {
14027 used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
14028 *obufp++ = ',';
14029 *obufp++ = 'p';
14030 if (prefixes & PREFIX_DS)
14031 *obufp++ = 't';
14032 else
14033 *obufp++ = 'n';
14034 }
14035 break;
9306ca4a
JB
14036 case 'J':
14037 if (intel_syntax)
14038 break;
14039 *obufp++ = 'l';
14040 break;
42903f7f
L
14041 case 'K':
14042 USED_REX (REX_W);
14043 if (rex & REX_W)
14044 *obufp++ = 'q';
14045 else
14046 *obufp++ = 'd';
14047 break;
6dd5059a 14048 case 'Z':
04d824a4
JB
14049 if (l != 0 || len != 1)
14050 {
14051 if (l != 1 || len != 2 || last[0] != 'X')
14052 {
14053 SAVE_LAST (*p);
14054 break;
14055 }
14056 if (!need_vex || !vex.evex)
14057 abort ();
14058 if (intel_syntax
14059 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
14060 break;
14061 switch (vex.length)
14062 {
14063 case 128:
14064 *obufp++ = 'x';
14065 break;
14066 case 256:
14067 *obufp++ = 'y';
14068 break;
14069 case 512:
14070 *obufp++ = 'z';
14071 break;
14072 default:
14073 abort ();
14074 }
14075 break;
14076 }
6dd5059a
L
14077 if (intel_syntax)
14078 break;
14079 if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
14080 {
14081 *obufp++ = 'q';
14082 break;
14083 }
14084 /* Fall through. */
98b528ac 14085 goto case_L;
252b5132 14086 case 'L':
98b528ac
L
14087 if (l != 0 || len != 1)
14088 {
14089 SAVE_LAST (*p);
14090 break;
14091 }
14092case_L:
db6eb5be
AM
14093 if (intel_syntax)
14094 break;
252b5132
RH
14095 if (sizeflag & SUFFIX_ALWAYS)
14096 *obufp++ = 'l';
252b5132 14097 break;
9d141669
L
14098 case 'M':
14099 if (intel_mnemonic != cond)
14100 *obufp++ = 'r';
14101 break;
252b5132
RH
14102 case 'N':
14103 if ((prefixes & PREFIX_FWAIT) == 0)
14104 *obufp++ = 'n';
7d421014
ILT
14105 else
14106 used_prefixes |= PREFIX_FWAIT;
252b5132 14107 break;
52b15da3 14108 case 'O':
161a04f6
L
14109 USED_REX (REX_W);
14110 if (rex & REX_W)
6439fc28 14111 *obufp++ = 'o';
a35ca55a
JB
14112 else if (intel_syntax && (sizeflag & DFLAG))
14113 *obufp++ = 'q';
52b15da3
JH
14114 else
14115 *obufp++ = 'd';
161a04f6 14116 if (!(rex & REX_W))
a35ca55a 14117 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 14118 break;
07f5af7d
L
14119 case '&':
14120 if (!intel_syntax
14121 && address_mode == mode_64bit
14122 && isa64 == intel64)
14123 {
14124 *obufp++ = 'q';
14125 break;
14126 }
14127 /* Fall through. */
6439fc28 14128 case 'T':
d9e3625e
L
14129 if (!intel_syntax
14130 && address_mode == mode_64bit
7bb15c6f 14131 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28
AM
14132 {
14133 *obufp++ = 'q';
14134 break;
14135 }
6608db57 14136 /* Fall through. */
4b4c407a 14137 goto case_P;
252b5132 14138 case 'P':
4b4c407a 14139 if (l == 0 && len == 1)
d9e3625e 14140 {
4b4c407a
L
14141case_P:
14142 if (intel_syntax)
d9e3625e 14143 {
4b4c407a
L
14144 if ((rex & REX_W) == 0
14145 && (prefixes & PREFIX_DATA))
14146 {
14147 if ((sizeflag & DFLAG) == 0)
14148 *obufp++ = 'w';
14149 used_prefixes |= (prefixes & PREFIX_DATA);
14150 }
14151 break;
14152 }
14153 if ((prefixes & PREFIX_DATA)
14154 || (rex & REX_W)
14155 || (sizeflag & SUFFIX_ALWAYS))
14156 {
14157 USED_REX (REX_W);
14158 if (rex & REX_W)
14159 *obufp++ = 'q';
14160 else
14161 {
14162 if (sizeflag & DFLAG)
14163 *obufp++ = 'l';
14164 else
14165 *obufp++ = 'w';
14166 used_prefixes |= (prefixes & PREFIX_DATA);
14167 }
d9e3625e 14168 }
d9e3625e 14169 }
4b4c407a 14170 else
252b5132 14171 {
4b4c407a
L
14172 if (l != 1 || len != 2 || last[0] != 'L')
14173 {
14174 SAVE_LAST (*p);
14175 break;
14176 }
14177
14178 if ((prefixes & PREFIX_DATA)
14179 || (rex & REX_W)
14180 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 14181 {
4b4c407a
L
14182 USED_REX (REX_W);
14183 if (rex & REX_W)
14184 *obufp++ = 'q';
14185 else
14186 {
14187 if (sizeflag & DFLAG)
14188 *obufp++ = intel_syntax ? 'd' : 'l';
14189 else
14190 *obufp++ = 'w';
14191 used_prefixes |= (prefixes & PREFIX_DATA);
14192 }
52b15da3 14193 }
252b5132
RH
14194 }
14195 break;
6439fc28 14196 case 'U':
db6eb5be
AM
14197 if (intel_syntax)
14198 break;
7bb15c6f 14199 if (address_mode == mode_64bit
6c067bbb 14200 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28 14201 {
7967e09e 14202 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
1a114b12 14203 *obufp++ = 'q';
6439fc28
AM
14204 break;
14205 }
6608db57 14206 /* Fall through. */
98b528ac 14207 goto case_Q;
252b5132 14208 case 'Q':
98b528ac 14209 if (l == 0 && len == 1)
252b5132 14210 {
98b528ac
L
14211case_Q:
14212 if (intel_syntax && !alt)
14213 break;
14214 USED_REX (REX_W);
14215 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 14216 {
98b528ac
L
14217 if (rex & REX_W)
14218 *obufp++ = 'q';
52b15da3 14219 else
98b528ac
L
14220 {
14221 if (sizeflag & DFLAG)
14222 *obufp++ = intel_syntax ? 'd' : 'l';
14223 else
14224 *obufp++ = 'w';
f16cd0d5 14225 used_prefixes |= (prefixes & PREFIX_DATA);
98b528ac 14226 }
52b15da3 14227 }
98b528ac
L
14228 }
14229 else
14230 {
14231 if (l != 1 || len != 2 || last[0] != 'L')
14232 {
14233 SAVE_LAST (*p);
14234 break;
14235 }
14236 if (intel_syntax
14237 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
14238 break;
14239 if ((rex & REX_W))
14240 {
14241 USED_REX (REX_W);
14242 *obufp++ = 'q';
14243 }
14244 else
14245 *obufp++ = 'l';
252b5132
RH
14246 }
14247 break;
14248 case 'R':
161a04f6
L
14249 USED_REX (REX_W);
14250 if (rex & REX_W)
a35ca55a
JB
14251 *obufp++ = 'q';
14252 else if (sizeflag & DFLAG)
c608c12e 14253 {
a35ca55a 14254 if (intel_syntax)
c608c12e 14255 *obufp++ = 'd';
c608c12e 14256 else
a35ca55a 14257 *obufp++ = 'l';
c608c12e 14258 }
252b5132 14259 else
a35ca55a
JB
14260 *obufp++ = 'w';
14261 if (intel_syntax && !p[1]
161a04f6 14262 && ((rex & REX_W) || (sizeflag & DFLAG)))
a35ca55a 14263 *obufp++ = 'e';
161a04f6 14264 if (!(rex & REX_W))
52b15da3 14265 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132 14266 break;
1a114b12 14267 case 'V':
4b06377f 14268 if (l == 0 && len == 1)
1a114b12 14269 {
4b06377f
L
14270 if (intel_syntax)
14271 break;
7bb15c6f 14272 if (address_mode == mode_64bit
6c067bbb 14273 && ((sizeflag & DFLAG) || (rex & REX_W)))
4b06377f
L
14274 {
14275 if (sizeflag & SUFFIX_ALWAYS)
14276 *obufp++ = 'q';
14277 break;
14278 }
14279 }
14280 else
14281 {
14282 if (l != 1
14283 || len != 2
14284 || last[0] != 'L')
14285 {
14286 SAVE_LAST (*p);
14287 break;
14288 }
14289
14290 if (rex & REX_W)
14291 {
14292 *obufp++ = 'a';
14293 *obufp++ = 'b';
14294 *obufp++ = 's';
14295 }
1a114b12
JB
14296 }
14297 /* Fall through. */
4b06377f 14298 goto case_S;
252b5132 14299 case 'S':
4b06377f 14300 if (l == 0 && len == 1)
252b5132 14301 {
4b06377f
L
14302case_S:
14303 if (intel_syntax)
14304 break;
14305 if (sizeflag & SUFFIX_ALWAYS)
52b15da3 14306 {
4b06377f
L
14307 if (rex & REX_W)
14308 *obufp++ = 'q';
52b15da3 14309 else
4b06377f
L
14310 {
14311 if (sizeflag & DFLAG)
14312 *obufp++ = 'l';
14313 else
14314 *obufp++ = 'w';
14315 used_prefixes |= (prefixes & PREFIX_DATA);
14316 }
14317 }
14318 }
14319 else
14320 {
14321 if (l != 1
14322 || len != 2
14323 || last[0] != 'L')
14324 {
14325 SAVE_LAST (*p);
14326 break;
52b15da3 14327 }
4b06377f
L
14328
14329 if (address_mode == mode_64bit
14330 && !(prefixes & PREFIX_ADDR))
14331 {
14332 *obufp++ = 'a';
14333 *obufp++ = 'b';
14334 *obufp++ = 's';
14335 }
14336
14337 goto case_S;
252b5132 14338 }
252b5132 14339 break;
041bd2e0 14340 case 'X':
c0f3af97
L
14341 if (l != 0 || len != 1)
14342 {
14343 SAVE_LAST (*p);
14344 break;
14345 }
14346 if (need_vex && vex.prefix)
14347 {
14348 if (vex.prefix == DATA_PREFIX_OPCODE)
14349 *obufp++ = 'd';
14350 else
14351 *obufp++ = 's';
14352 }
041bd2e0 14353 else
f16cd0d5
L
14354 {
14355 if (prefixes & PREFIX_DATA)
14356 *obufp++ = 'd';
14357 else
14358 *obufp++ = 's';
14359 used_prefixes |= (prefixes & PREFIX_DATA);
14360 }
041bd2e0 14361 break;
76f227a5 14362 case 'Y':
c0f3af97 14363 if (l == 0 && len == 1)
76f227a5 14364 {
c0f3af97
L
14365 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
14366 break;
14367 if (rex & REX_W)
14368 {
14369 USED_REX (REX_W);
14370 *obufp++ = 'q';
14371 }
14372 break;
14373 }
14374 else
14375 {
14376 if (l != 1 || len != 2 || last[0] != 'X')
14377 {
14378 SAVE_LAST (*p);
14379 break;
14380 }
14381 if (!need_vex)
14382 abort ();
14383 if (intel_syntax
04d824a4 14384 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
c0f3af97
L
14385 break;
14386 switch (vex.length)
14387 {
14388 case 128:
14389 *obufp++ = 'x';
14390 break;
14391 case 256:
14392 *obufp++ = 'y';
14393 break;
04d824a4
JB
14394 case 512:
14395 if (!vex.evex)
c0f3af97 14396 default:
04d824a4 14397 abort ();
c0f3af97 14398 }
76f227a5
JH
14399 }
14400 break;
252b5132 14401 case 'W':
0bfee649 14402 if (l == 0 && len == 1)
a35ca55a 14403 {
0bfee649
L
14404 /* operand size flag for cwtl, cbtw */
14405 USED_REX (REX_W);
14406 if (rex & REX_W)
14407 {
14408 if (intel_syntax)
14409 *obufp++ = 'd';
14410 else
14411 *obufp++ = 'l';
14412 }
14413 else if (sizeflag & DFLAG)
14414 *obufp++ = 'w';
a35ca55a 14415 else
0bfee649
L
14416 *obufp++ = 'b';
14417 if (!(rex & REX_W))
14418 used_prefixes |= (prefixes & PREFIX_DATA);
a35ca55a 14419 }
252b5132 14420 else
0bfee649 14421 {
6c30d220
L
14422 if (l != 1
14423 || len != 2
14424 || (last[0] != 'X'
14425 && last[0] != 'L'))
0bfee649
L
14426 {
14427 SAVE_LAST (*p);
14428 break;
14429 }
14430 if (!need_vex)
14431 abort ();
6c30d220
L
14432 if (last[0] == 'X')
14433 *obufp++ = vex.w ? 'd': 's';
14434 else
14435 *obufp++ = vex.w ? 'q': 'd';
0bfee649 14436 }
252b5132 14437 break;
a72d2af2
L
14438 case '^':
14439 if (intel_syntax)
14440 break;
14441 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
14442 {
14443 if (sizeflag & DFLAG)
14444 *obufp++ = 'l';
14445 else
14446 *obufp++ = 'w';
14447 used_prefixes |= (prefixes & PREFIX_DATA);
14448 }
14449 break;
5db04b09
L
14450 case '@':
14451 if (intel_syntax)
14452 break;
14453 if (address_mode == mode_64bit
14454 && (isa64 == intel64
14455 || ((sizeflag & DFLAG) || (rex & REX_W))))
14456 *obufp++ = 'q';
14457 else if ((prefixes & PREFIX_DATA))
14458 {
14459 if (!(sizeflag & DFLAG))
14460 *obufp++ = 'w';
14461 used_prefixes |= (prefixes & PREFIX_DATA);
14462 }
14463 break;
252b5132 14464 }
9306ca4a 14465 alt = 0;
252b5132
RH
14466 }
14467 *obufp = 0;
ea397f5b 14468 mnemonicendp = obufp;
6439fc28 14469 return 0;
252b5132
RH
14470}
14471
14472static void
26ca5450 14473oappend (const char *s)
252b5132 14474{
ea397f5b 14475 obufp = stpcpy (obufp, s);
252b5132
RH
14476}
14477
14478static void
26ca5450 14479append_seg (void)
252b5132 14480{
285ca992
L
14481 /* Only print the active segment register. */
14482 if (!active_seg_prefix)
14483 return;
14484
14485 used_prefixes |= active_seg_prefix;
14486 switch (active_seg_prefix)
7d421014 14487 {
285ca992 14488 case PREFIX_CS:
9ce09ba2 14489 oappend_maybe_intel ("%cs:");
285ca992
L
14490 break;
14491 case PREFIX_DS:
9ce09ba2 14492 oappend_maybe_intel ("%ds:");
285ca992
L
14493 break;
14494 case PREFIX_SS:
9ce09ba2 14495 oappend_maybe_intel ("%ss:");
285ca992
L
14496 break;
14497 case PREFIX_ES:
9ce09ba2 14498 oappend_maybe_intel ("%es:");
285ca992
L
14499 break;
14500 case PREFIX_FS:
9ce09ba2 14501 oappend_maybe_intel ("%fs:");
285ca992
L
14502 break;
14503 case PREFIX_GS:
9ce09ba2 14504 oappend_maybe_intel ("%gs:");
285ca992
L
14505 break;
14506 default:
14507 break;
7d421014 14508 }
252b5132
RH
14509}
14510
14511static void
26ca5450 14512OP_indirE (int bytemode, int sizeflag)
252b5132
RH
14513{
14514 if (!intel_syntax)
14515 oappend ("*");
14516 OP_E (bytemode, sizeflag);
14517}
14518
52b15da3 14519static void
26ca5450 14520print_operand_value (char *buf, int hex, bfd_vma disp)
52b15da3 14521{
cb712a9e 14522 if (address_mode == mode_64bit)
52b15da3
JH
14523 {
14524 if (hex)
14525 {
14526 char tmp[30];
14527 int i;
14528 buf[0] = '0';
14529 buf[1] = 'x';
14530 sprintf_vma (tmp, disp);
6608db57 14531 for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
52b15da3
JH
14532 strcpy (buf + 2, tmp + i);
14533 }
14534 else
14535 {
14536 bfd_signed_vma v = disp;
14537 char tmp[30];
14538 int i;
14539 if (v < 0)
14540 {
14541 *(buf++) = '-';
14542 v = -disp;
6608db57 14543 /* Check for possible overflow on 0x8000000000000000. */
52b15da3
JH
14544 if (v < 0)
14545 {
14546 strcpy (buf, "9223372036854775808");
14547 return;
14548 }
14549 }
14550 if (!v)
14551 {
14552 strcpy (buf, "0");
14553 return;
14554 }
14555
14556 i = 0;
14557 tmp[29] = 0;
14558 while (v)
14559 {
6608db57 14560 tmp[28 - i] = (v % 10) + '0';
52b15da3
JH
14561 v /= 10;
14562 i++;
14563 }
14564 strcpy (buf, tmp + 29 - i);
14565 }
14566 }
14567 else
14568 {
14569 if (hex)
14570 sprintf (buf, "0x%x", (unsigned int) disp);
14571 else
14572 sprintf (buf, "%d", (int) disp);
14573 }
14574}
14575
5d669648
L
14576/* Put DISP in BUF as signed hex number. */
14577
14578static void
14579print_displacement (char *buf, bfd_vma disp)
14580{
14581 bfd_signed_vma val = disp;
14582 char tmp[30];
14583 int i, j = 0;
14584
14585 if (val < 0)
14586 {
14587 buf[j++] = '-';
14588 val = -disp;
14589
14590 /* Check for possible overflow. */
14591 if (val < 0)
14592 {
14593 switch (address_mode)
14594 {
14595 case mode_64bit:
14596 strcpy (buf + j, "0x8000000000000000");
14597 break;
14598 case mode_32bit:
14599 strcpy (buf + j, "0x80000000");
14600 break;
14601 case mode_16bit:
14602 strcpy (buf + j, "0x8000");
14603 break;
14604 }
14605 return;
14606 }
14607 }
14608
14609 buf[j++] = '0';
14610 buf[j++] = 'x';
14611
0af1713e 14612 sprintf_vma (tmp, (bfd_vma) val);
5d669648
L
14613 for (i = 0; tmp[i] == '0'; i++)
14614 continue;
14615 if (tmp[i] == '\0')
14616 i--;
14617 strcpy (buf + j, tmp + i);
14618}
14619
3f31e633
JB
14620static void
14621intel_operand_size (int bytemode, int sizeflag)
14622{
43234a1e
L
14623 if (vex.evex
14624 && vex.b
14625 && (bytemode == x_mode
14626 || bytemode == evex_half_bcst_xmmq_mode))
14627 {
14628 if (vex.w)
14629 oappend ("QWORD PTR ");
14630 else
14631 oappend ("DWORD PTR ");
14632 return;
14633 }
3f31e633
JB
14634 switch (bytemode)
14635 {
14636 case b_mode:
b6169b20 14637 case b_swap_mode:
42903f7f 14638 case dqb_mode:
1ba585e8 14639 case db_mode:
3f31e633
JB
14640 oappend ("BYTE PTR ");
14641 break;
14642 case w_mode:
1ba585e8 14643 case dw_mode:
3f31e633
JB
14644 case dqw_mode:
14645 oappend ("WORD PTR ");
14646 break;
07f5af7d
L
14647 case indir_v_mode:
14648 if (address_mode == mode_64bit && isa64 == intel64)
14649 {
14650 oappend ("QWORD PTR ");
14651 break;
14652 }
1a0670f3 14653 /* Fall through. */
1a114b12 14654 case stack_v_mode:
7bb15c6f 14655 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
3f31e633
JB
14656 {
14657 oappend ("QWORD PTR ");
3f31e633
JB
14658 break;
14659 }
1a0670f3 14660 /* Fall through. */
3f31e633 14661 case v_mode:
b6169b20 14662 case v_swap_mode:
3f31e633 14663 case dq_mode:
161a04f6
L
14664 USED_REX (REX_W);
14665 if (rex & REX_W)
3f31e633 14666 oappend ("QWORD PTR ");
3f31e633 14667 else
f16cd0d5
L
14668 {
14669 if ((sizeflag & DFLAG) || bytemode == dq_mode)
14670 oappend ("DWORD PTR ");
14671 else
14672 oappend ("WORD PTR ");
14673 used_prefixes |= (prefixes & PREFIX_DATA);
14674 }
3f31e633 14675 break;
52fd6d94 14676 case z_mode:
161a04f6 14677 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
14678 *obufp++ = 'D';
14679 oappend ("WORD PTR ");
161a04f6 14680 if (!(rex & REX_W))
52fd6d94
JB
14681 used_prefixes |= (prefixes & PREFIX_DATA);
14682 break;
34b772a6
JB
14683 case a_mode:
14684 if (sizeflag & DFLAG)
14685 oappend ("QWORD PTR ");
14686 else
14687 oappend ("DWORD PTR ");
14688 used_prefixes |= (prefixes & PREFIX_DATA);
14689 break;
3f31e633 14690 case d_mode:
539f890d
L
14691 case d_scalar_mode:
14692 case d_scalar_swap_mode:
fa99fab2 14693 case d_swap_mode:
42903f7f 14694 case dqd_mode:
3f31e633
JB
14695 oappend ("DWORD PTR ");
14696 break;
14697 case q_mode:
539f890d
L
14698 case q_scalar_mode:
14699 case q_scalar_swap_mode:
b6169b20 14700 case q_swap_mode:
3f31e633
JB
14701 oappend ("QWORD PTR ");
14702 break;
14703 case m_mode:
cb712a9e 14704 if (address_mode == mode_64bit)
3f31e633
JB
14705 oappend ("QWORD PTR ");
14706 else
14707 oappend ("DWORD PTR ");
14708 break;
14709 case f_mode:
14710 if (sizeflag & DFLAG)
14711 oappend ("FWORD PTR ");
14712 else
14713 oappend ("DWORD PTR ");
14714 used_prefixes |= (prefixes & PREFIX_DATA);
14715 break;
14716 case t_mode:
14717 oappend ("TBYTE PTR ");
14718 break;
14719 case x_mode:
b6169b20 14720 case x_swap_mode:
43234a1e
L
14721 case evex_x_gscat_mode:
14722 case evex_x_nobcst_mode:
c0f3af97
L
14723 if (need_vex)
14724 {
14725 switch (vex.length)
14726 {
14727 case 128:
14728 oappend ("XMMWORD PTR ");
14729 break;
14730 case 256:
14731 oappend ("YMMWORD PTR ");
14732 break;
43234a1e
L
14733 case 512:
14734 oappend ("ZMMWORD PTR ");
14735 break;
c0f3af97
L
14736 default:
14737 abort ();
14738 }
14739 }
14740 else
14741 oappend ("XMMWORD PTR ");
14742 break;
14743 case xmm_mode:
3f31e633
JB
14744 oappend ("XMMWORD PTR ");
14745 break;
43234a1e
L
14746 case ymm_mode:
14747 oappend ("YMMWORD PTR ");
14748 break;
c0f3af97 14749 case xmmq_mode:
43234a1e 14750 case evex_half_bcst_xmmq_mode:
c0f3af97
L
14751 if (!need_vex)
14752 abort ();
14753
14754 switch (vex.length)
14755 {
14756 case 128:
14757 oappend ("QWORD PTR ");
14758 break;
14759 case 256:
14760 oappend ("XMMWORD PTR ");
14761 break;
43234a1e
L
14762 case 512:
14763 oappend ("YMMWORD PTR ");
14764 break;
c0f3af97
L
14765 default:
14766 abort ();
14767 }
14768 break;
6c30d220
L
14769 case xmm_mb_mode:
14770 if (!need_vex)
14771 abort ();
14772
14773 switch (vex.length)
14774 {
14775 case 128:
14776 case 256:
43234a1e 14777 case 512:
6c30d220
L
14778 oappend ("BYTE PTR ");
14779 break;
14780 default:
14781 abort ();
14782 }
14783 break;
14784 case xmm_mw_mode:
14785 if (!need_vex)
14786 abort ();
14787
14788 switch (vex.length)
14789 {
14790 case 128:
14791 case 256:
43234a1e 14792 case 512:
6c30d220
L
14793 oappend ("WORD PTR ");
14794 break;
14795 default:
14796 abort ();
14797 }
14798 break;
14799 case xmm_md_mode:
14800 if (!need_vex)
14801 abort ();
14802
14803 switch (vex.length)
14804 {
14805 case 128:
14806 case 256:
43234a1e 14807 case 512:
6c30d220
L
14808 oappend ("DWORD PTR ");
14809 break;
14810 default:
14811 abort ();
14812 }
14813 break;
14814 case xmm_mq_mode:
14815 if (!need_vex)
14816 abort ();
14817
14818 switch (vex.length)
14819 {
14820 case 128:
14821 case 256:
43234a1e 14822 case 512:
6c30d220
L
14823 oappend ("QWORD PTR ");
14824 break;
14825 default:
14826 abort ();
14827 }
14828 break;
14829 case xmmdw_mode:
14830 if (!need_vex)
14831 abort ();
14832
14833 switch (vex.length)
14834 {
14835 case 128:
14836 oappend ("WORD PTR ");
14837 break;
14838 case 256:
14839 oappend ("DWORD PTR ");
14840 break;
43234a1e
L
14841 case 512:
14842 oappend ("QWORD PTR ");
14843 break;
6c30d220
L
14844 default:
14845 abort ();
14846 }
14847 break;
14848 case xmmqd_mode:
14849 if (!need_vex)
14850 abort ();
14851
14852 switch (vex.length)
14853 {
14854 case 128:
14855 oappend ("DWORD PTR ");
14856 break;
14857 case 256:
14858 oappend ("QWORD PTR ");
14859 break;
43234a1e
L
14860 case 512:
14861 oappend ("XMMWORD PTR ");
14862 break;
6c30d220
L
14863 default:
14864 abort ();
14865 }
14866 break;
c0f3af97
L
14867 case ymmq_mode:
14868 if (!need_vex)
14869 abort ();
14870
14871 switch (vex.length)
14872 {
14873 case 128:
14874 oappend ("QWORD PTR ");
14875 break;
14876 case 256:
14877 oappend ("YMMWORD PTR ");
14878 break;
43234a1e
L
14879 case 512:
14880 oappend ("ZMMWORD PTR ");
14881 break;
c0f3af97
L
14882 default:
14883 abort ();
14884 }
14885 break;
6c30d220
L
14886 case ymmxmm_mode:
14887 if (!need_vex)
14888 abort ();
14889
14890 switch (vex.length)
14891 {
14892 case 128:
14893 case 256:
14894 oappend ("XMMWORD PTR ");
14895 break;
14896 default:
14897 abort ();
14898 }
14899 break;
fb9c77c7
L
14900 case o_mode:
14901 oappend ("OWORD PTR ");
14902 break;
43234a1e 14903 case xmm_mdq_mode:
0bfee649 14904 case vex_w_dq_mode:
1c480963 14905 case vex_scalar_w_dq_mode:
0bfee649
L
14906 if (!need_vex)
14907 abort ();
14908
14909 if (vex.w)
14910 oappend ("QWORD PTR ");
14911 else
14912 oappend ("DWORD PTR ");
14913 break;
43234a1e
L
14914 case vex_vsib_d_w_dq_mode:
14915 case vex_vsib_q_w_dq_mode:
14916 if (!need_vex)
14917 abort ();
14918
14919 if (!vex.evex)
14920 {
14921 if (vex.w)
14922 oappend ("QWORD PTR ");
14923 else
14924 oappend ("DWORD PTR ");
14925 }
14926 else
14927 {
b28d1bda
IT
14928 switch (vex.length)
14929 {
14930 case 128:
14931 oappend ("XMMWORD PTR ");
14932 break;
14933 case 256:
14934 oappend ("YMMWORD PTR ");
14935 break;
14936 case 512:
14937 oappend ("ZMMWORD PTR ");
14938 break;
14939 default:
14940 abort ();
14941 }
43234a1e
L
14942 }
14943 break;
5fc35d96
IT
14944 case vex_vsib_q_w_d_mode:
14945 case vex_vsib_d_w_d_mode:
b28d1bda 14946 if (!need_vex || !vex.evex)
5fc35d96
IT
14947 abort ();
14948
b28d1bda
IT
14949 switch (vex.length)
14950 {
14951 case 128:
14952 oappend ("QWORD PTR ");
14953 break;
14954 case 256:
14955 oappend ("XMMWORD PTR ");
14956 break;
14957 case 512:
14958 oappend ("YMMWORD PTR ");
14959 break;
14960 default:
14961 abort ();
14962 }
5fc35d96
IT
14963
14964 break;
1ba585e8
IT
14965 case mask_bd_mode:
14966 if (!need_vex || vex.length != 128)
14967 abort ();
14968 if (vex.w)
14969 oappend ("DWORD PTR ");
14970 else
14971 oappend ("BYTE PTR ");
14972 break;
43234a1e
L
14973 case mask_mode:
14974 if (!need_vex)
14975 abort ();
1ba585e8
IT
14976 if (vex.w)
14977 oappend ("QWORD PTR ");
14978 else
14979 oappend ("WORD PTR ");
43234a1e 14980 break;
6c75cc62 14981 case v_bnd_mode:
3f31e633
JB
14982 default:
14983 break;
14984 }
14985}
14986
252b5132 14987static void
c0f3af97 14988OP_E_register (int bytemode, int sizeflag)
252b5132 14989{
c0f3af97
L
14990 int reg = modrm.rm;
14991 const char **names;
252b5132 14992
c0f3af97
L
14993 USED_REX (REX_B);
14994 if ((rex & REX_B))
14995 reg += 8;
252b5132 14996
b6169b20 14997 if ((sizeflag & SUFFIX_ALWAYS)
1ba585e8 14998 && (bytemode == b_swap_mode
60227d64 14999 || bytemode == v_swap_mode))
b6169b20
L
15000 swap_operand ();
15001
c0f3af97 15002 switch (bytemode)
252b5132 15003 {
c0f3af97 15004 case b_mode:
b6169b20 15005 case b_swap_mode:
c0f3af97
L
15006 USED_REX (0);
15007 if (rex)
15008 names = names8rex;
15009 else
15010 names = names8;
15011 break;
15012 case w_mode:
15013 names = names16;
15014 break;
15015 case d_mode:
1ba585e8
IT
15016 case dw_mode:
15017 case db_mode:
c0f3af97
L
15018 names = names32;
15019 break;
15020 case q_mode:
15021 names = names64;
15022 break;
15023 case m_mode:
6c75cc62 15024 case v_bnd_mode:
c0f3af97
L
15025 names = address_mode == mode_64bit ? names64 : names32;
15026 break;
7e8b059b 15027 case bnd_mode:
0d96e4df
L
15028 if (reg > 0x3)
15029 {
15030 oappend ("(bad)");
15031 return;
15032 }
7e8b059b
L
15033 names = names_bnd;
15034 break;
07f5af7d
L
15035 case indir_v_mode:
15036 if (address_mode == mode_64bit && isa64 == intel64)
15037 {
15038 names = names64;
15039 break;
15040 }
1a0670f3 15041 /* Fall through. */
c0f3af97 15042 case stack_v_mode:
7bb15c6f 15043 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
252b5132 15044 {
c0f3af97 15045 names = names64;
252b5132 15046 break;
252b5132 15047 }
c0f3af97 15048 bytemode = v_mode;
1a0670f3 15049 /* Fall through. */
c0f3af97 15050 case v_mode:
b6169b20 15051 case v_swap_mode:
c0f3af97
L
15052 case dq_mode:
15053 case dqb_mode:
15054 case dqd_mode:
15055 case dqw_mode:
15056 USED_REX (REX_W);
15057 if (rex & REX_W)
15058 names = names64;
c0f3af97 15059 else
f16cd0d5 15060 {
7bb15c6f 15061 if ((sizeflag & DFLAG)
f16cd0d5
L
15062 || (bytemode != v_mode
15063 && bytemode != v_swap_mode))
15064 names = names32;
15065 else
15066 names = names16;
15067 used_prefixes |= (prefixes & PREFIX_DATA);
15068 }
c0f3af97 15069 break;
1ba585e8 15070 case mask_bd_mode:
43234a1e 15071 case mask_mode:
9889cbb1
L
15072 if (reg > 0x7)
15073 {
15074 oappend ("(bad)");
15075 return;
15076 }
43234a1e
L
15077 names = names_mask;
15078 break;
c0f3af97
L
15079 case 0:
15080 return;
15081 default:
15082 oappend (INTERNAL_DISASSEMBLER_ERROR);
252b5132
RH
15083 return;
15084 }
c0f3af97
L
15085 oappend (names[reg]);
15086}
15087
15088static void
c1e679ec 15089OP_E_memory (int bytemode, int sizeflag)
c0f3af97
L
15090{
15091 bfd_vma disp = 0;
15092 int add = (rex & REX_B) ? 8 : 0;
15093 int riprel = 0;
43234a1e
L
15094 int shift;
15095
15096 if (vex.evex)
15097 {
15098 /* In EVEX, if operand doesn't allow broadcast, vex.b should be 0. */
15099 if (vex.b
15100 && bytemode != x_mode
90a915bf 15101 && bytemode != xmmq_mode
43234a1e
L
15102 && bytemode != evex_half_bcst_xmmq_mode)
15103 {
15104 BadOp ();
15105 return;
15106 }
15107 switch (bytemode)
15108 {
1ba585e8
IT
15109 case dqw_mode:
15110 case dw_mode:
1ba585e8
IT
15111 shift = 1;
15112 break;
15113 case dqb_mode:
15114 case db_mode:
15115 shift = 0;
15116 break;
43234a1e 15117 case vex_vsib_d_w_dq_mode:
5fc35d96 15118 case vex_vsib_d_w_d_mode:
eaa9d1ad 15119 case vex_vsib_q_w_dq_mode:
5fc35d96 15120 case vex_vsib_q_w_d_mode:
43234a1e
L
15121 case evex_x_gscat_mode:
15122 case xmm_mdq_mode:
15123 shift = vex.w ? 3 : 2;
15124 break;
43234a1e
L
15125 case x_mode:
15126 case evex_half_bcst_xmmq_mode:
90a915bf 15127 case xmmq_mode:
43234a1e
L
15128 if (vex.b)
15129 {
15130 shift = vex.w ? 3 : 2;
15131 break;
15132 }
1a0670f3 15133 /* Fall through. */
43234a1e
L
15134 case xmmqd_mode:
15135 case xmmdw_mode:
43234a1e
L
15136 case ymmq_mode:
15137 case evex_x_nobcst_mode:
15138 case x_swap_mode:
15139 switch (vex.length)
15140 {
15141 case 128:
15142 shift = 4;
15143 break;
15144 case 256:
15145 shift = 5;
15146 break;
15147 case 512:
15148 shift = 6;
15149 break;
15150 default:
15151 abort ();
15152 }
15153 break;
15154 case ymm_mode:
15155 shift = 5;
15156 break;
15157 case xmm_mode:
15158 shift = 4;
15159 break;
15160 case xmm_mq_mode:
15161 case q_mode:
15162 case q_scalar_mode:
15163 case q_swap_mode:
15164 case q_scalar_swap_mode:
15165 shift = 3;
15166 break;
15167 case dqd_mode:
15168 case xmm_md_mode:
15169 case d_mode:
15170 case d_scalar_mode:
15171 case d_swap_mode:
15172 case d_scalar_swap_mode:
15173 shift = 2;
15174 break;
15175 case xmm_mw_mode:
15176 shift = 1;
15177 break;
15178 case xmm_mb_mode:
15179 shift = 0;
15180 break;
15181 default:
15182 abort ();
15183 }
15184 /* Make necessary corrections to shift for modes that need it.
15185 For these modes we currently have shift 4, 5 or 6 depending on
15186 vex.length (it corresponds to xmmword, ymmword or zmmword
15187 operand). We might want to make it 3, 4 or 5 (e.g. for
15188 xmmq_mode). In case of broadcast enabled the corrections
15189 aren't needed, as element size is always 32 or 64 bits. */
90a915bf
IT
15190 if (!vex.b
15191 && (bytemode == xmmq_mode
15192 || bytemode == evex_half_bcst_xmmq_mode))
43234a1e
L
15193 shift -= 1;
15194 else if (bytemode == xmmqd_mode)
15195 shift -= 2;
15196 else if (bytemode == xmmdw_mode)
15197 shift -= 3;
b28d1bda
IT
15198 else if (bytemode == ymmq_mode && vex.length == 128)
15199 shift -= 1;
43234a1e
L
15200 }
15201 else
15202 shift = 0;
252b5132 15203
c0f3af97 15204 USED_REX (REX_B);
3f31e633
JB
15205 if (intel_syntax)
15206 intel_operand_size (bytemode, sizeflag);
252b5132
RH
15207 append_seg ();
15208
5d669648 15209 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132 15210 {
5d669648
L
15211 /* 32/64 bit address mode */
15212 int havedisp;
252b5132
RH
15213 int havesib;
15214 int havebase;
0f7da397 15215 int haveindex;
20afcfb7 15216 int needindex;
82c18208 15217 int base, rbase;
91d6fa6a 15218 int vindex = 0;
252b5132 15219 int scale = 0;
7e8b059b
L
15220 int addr32flag = !((sizeflag & AFLAG)
15221 || bytemode == v_bnd_mode
15222 || bytemode == bnd_mode);
6c30d220
L
15223 const char **indexes64 = names64;
15224 const char **indexes32 = names32;
252b5132
RH
15225
15226 havesib = 0;
15227 havebase = 1;
0f7da397 15228 haveindex = 0;
7967e09e 15229 base = modrm.rm;
252b5132
RH
15230
15231 if (base == 4)
15232 {
15233 havesib = 1;
dfc8cf43 15234 vindex = sib.index;
161a04f6
L
15235 USED_REX (REX_X);
15236 if (rex & REX_X)
91d6fa6a 15237 vindex += 8;
6c30d220
L
15238 switch (bytemode)
15239 {
15240 case vex_vsib_d_w_dq_mode:
5fc35d96 15241 case vex_vsib_d_w_d_mode:
6c30d220 15242 case vex_vsib_q_w_dq_mode:
5fc35d96 15243 case vex_vsib_q_w_d_mode:
6c30d220
L
15244 if (!need_vex)
15245 abort ();
43234a1e
L
15246 if (vex.evex)
15247 {
15248 if (!vex.v)
15249 vindex += 16;
15250 }
6c30d220
L
15251
15252 haveindex = 1;
15253 switch (vex.length)
15254 {
15255 case 128:
7bb15c6f 15256 indexes64 = indexes32 = names_xmm;
6c30d220
L
15257 break;
15258 case 256:
5fc35d96
IT
15259 if (!vex.w
15260 || bytemode == vex_vsib_q_w_dq_mode
15261 || bytemode == vex_vsib_q_w_d_mode)
7bb15c6f 15262 indexes64 = indexes32 = names_ymm;
6c30d220 15263 else
7bb15c6f 15264 indexes64 = indexes32 = names_xmm;
6c30d220 15265 break;
43234a1e 15266 case 512:
5fc35d96
IT
15267 if (!vex.w
15268 || bytemode == vex_vsib_q_w_dq_mode
15269 || bytemode == vex_vsib_q_w_d_mode)
43234a1e
L
15270 indexes64 = indexes32 = names_zmm;
15271 else
15272 indexes64 = indexes32 = names_ymm;
15273 break;
6c30d220
L
15274 default:
15275 abort ();
15276 }
15277 break;
15278 default:
15279 haveindex = vindex != 4;
15280 break;
15281 }
15282 scale = sib.scale;
15283 base = sib.base;
252b5132
RH
15284 codep++;
15285 }
82c18208 15286 rbase = base + add;
252b5132 15287
7967e09e 15288 switch (modrm.mod)
252b5132
RH
15289 {
15290 case 0:
82c18208 15291 if (base == 5)
252b5132
RH
15292 {
15293 havebase = 0;
cb712a9e 15294 if (address_mode == mode_64bit && !havesib)
52b15da3
JH
15295 riprel = 1;
15296 disp = get32s ();
252b5132
RH
15297 }
15298 break;
15299 case 1:
15300 FETCH_DATA (the_info, codep + 1);
15301 disp = *codep++;
15302 if ((disp & 0x80) != 0)
15303 disp -= 0x100;
43234a1e
L
15304 if (vex.evex && shift > 0)
15305 disp <<= shift;
252b5132
RH
15306 break;
15307 case 2:
52b15da3 15308 disp = get32s ();
252b5132
RH
15309 break;
15310 }
15311
20afcfb7
L
15312 /* In 32bit mode, we need index register to tell [offset] from
15313 [eiz*1 + offset]. */
15314 needindex = (havesib
15315 && !havebase
15316 && !haveindex
15317 && address_mode == mode_32bit);
15318 havedisp = (havebase
15319 || needindex
15320 || (havesib && (haveindex || scale != 0)));
5d669648 15321
252b5132 15322 if (!intel_syntax)
82c18208 15323 if (modrm.mod != 0 || base == 5)
db6eb5be 15324 {
5d669648
L
15325 if (havedisp || riprel)
15326 print_displacement (scratchbuf, disp);
15327 else
15328 print_operand_value (scratchbuf, 1, disp);
db6eb5be 15329 oappend (scratchbuf);
52b15da3
JH
15330 if (riprel)
15331 {
15332 set_op (disp, 1);
28596323 15333 oappend (!addr32flag ? "(%rip)" : "(%eip)");
52b15da3 15334 }
db6eb5be 15335 }
2da11e11 15336
7e8b059b
L
15337 if ((havebase || haveindex || riprel)
15338 && (bytemode != v_bnd_mode)
15339 && (bytemode != bnd_mode))
87767711
JB
15340 used_prefixes |= PREFIX_ADDR;
15341
5d669648 15342 if (havedisp || (intel_syntax && riprel))
252b5132 15343 {
252b5132 15344 *obufp++ = open_char;
52b15da3 15345 if (intel_syntax && riprel)
185b1163
L
15346 {
15347 set_op (disp, 1);
28596323 15348 oappend (!addr32flag ? "rip" : "eip");
185b1163 15349 }
db6eb5be 15350 *obufp = '\0';
252b5132 15351 if (havebase)
7e8b059b 15352 oappend (address_mode == mode_64bit && !addr32flag
82c18208 15353 ? names64[rbase] : names32[rbase]);
252b5132
RH
15354 if (havesib)
15355 {
db51cc60
L
15356 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
15357 print index to tell base + index from base. */
15358 if (scale != 0
20afcfb7 15359 || needindex
db51cc60
L
15360 || haveindex
15361 || (havebase && base != ESP_REG_NUM))
252b5132 15362 {
9306ca4a 15363 if (!intel_syntax || havebase)
db6eb5be 15364 {
9306ca4a
JB
15365 *obufp++ = separator_char;
15366 *obufp = '\0';
db6eb5be 15367 }
db51cc60 15368 if (haveindex)
7e8b059b 15369 oappend (address_mode == mode_64bit && !addr32flag
6c30d220 15370 ? indexes64[vindex] : indexes32[vindex]);
db51cc60 15371 else
7e8b059b 15372 oappend (address_mode == mode_64bit && !addr32flag
db51cc60
L
15373 ? index64 : index32);
15374
db6eb5be
AM
15375 *obufp++ = scale_char;
15376 *obufp = '\0';
15377 sprintf (scratchbuf, "%d", 1 << scale);
15378 oappend (scratchbuf);
15379 }
252b5132 15380 }
185b1163 15381 if (intel_syntax
82c18208 15382 && (disp || modrm.mod != 0 || base == 5))
3d456fa1 15383 {
db51cc60 15384 if (!havedisp || (bfd_signed_vma) disp >= 0)
3d456fa1
JB
15385 {
15386 *obufp++ = '+';
15387 *obufp = '\0';
15388 }
05203043 15389 else if (modrm.mod != 1 && disp != -disp)
3d456fa1
JB
15390 {
15391 *obufp++ = '-';
15392 *obufp = '\0';
15393 disp = - (bfd_signed_vma) disp;
15394 }
15395
db51cc60
L
15396 if (havedisp)
15397 print_displacement (scratchbuf, disp);
15398 else
15399 print_operand_value (scratchbuf, 1, disp);
3d456fa1
JB
15400 oappend (scratchbuf);
15401 }
252b5132
RH
15402
15403 *obufp++ = close_char;
db6eb5be 15404 *obufp = '\0';
252b5132
RH
15405 }
15406 else if (intel_syntax)
db6eb5be 15407 {
82c18208 15408 if (modrm.mod != 0 || base == 5)
db6eb5be 15409 {
285ca992 15410 if (!active_seg_prefix)
252b5132 15411 {
d708bcba 15412 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
15413 oappend (":");
15414 }
52b15da3 15415 print_operand_value (scratchbuf, 1, disp);
db6eb5be
AM
15416 oappend (scratchbuf);
15417 }
15418 }
252b5132
RH
15419 }
15420 else
f16cd0d5
L
15421 {
15422 /* 16 bit address mode */
15423 used_prefixes |= prefixes & PREFIX_ADDR;
7967e09e 15424 switch (modrm.mod)
252b5132
RH
15425 {
15426 case 0:
7967e09e 15427 if (modrm.rm == 6)
252b5132
RH
15428 {
15429 disp = get16 ();
15430 if ((disp & 0x8000) != 0)
15431 disp -= 0x10000;
15432 }
15433 break;
15434 case 1:
15435 FETCH_DATA (the_info, codep + 1);
15436 disp = *codep++;
15437 if ((disp & 0x80) != 0)
15438 disp -= 0x100;
15439 break;
15440 case 2:
15441 disp = get16 ();
15442 if ((disp & 0x8000) != 0)
15443 disp -= 0x10000;
15444 break;
15445 }
15446
15447 if (!intel_syntax)
7967e09e 15448 if (modrm.mod != 0 || modrm.rm == 6)
db6eb5be 15449 {
5d669648 15450 print_displacement (scratchbuf, disp);
db6eb5be
AM
15451 oappend (scratchbuf);
15452 }
252b5132 15453
7967e09e 15454 if (modrm.mod != 0 || modrm.rm != 6)
252b5132
RH
15455 {
15456 *obufp++ = open_char;
db6eb5be 15457 *obufp = '\0';
7967e09e 15458 oappend (index16[modrm.rm]);
5d669648
L
15459 if (intel_syntax
15460 && (disp || modrm.mod != 0 || modrm.rm == 6))
3d456fa1 15461 {
5d669648 15462 if ((bfd_signed_vma) disp >= 0)
3d456fa1
JB
15463 {
15464 *obufp++ = '+';
15465 *obufp = '\0';
15466 }
7967e09e 15467 else if (modrm.mod != 1)
3d456fa1
JB
15468 {
15469 *obufp++ = '-';
15470 *obufp = '\0';
15471 disp = - (bfd_signed_vma) disp;
15472 }
15473
5d669648 15474 print_displacement (scratchbuf, disp);
3d456fa1
JB
15475 oappend (scratchbuf);
15476 }
15477
db6eb5be
AM
15478 *obufp++ = close_char;
15479 *obufp = '\0';
252b5132 15480 }
3d456fa1
JB
15481 else if (intel_syntax)
15482 {
285ca992 15483 if (!active_seg_prefix)
3d456fa1
JB
15484 {
15485 oappend (names_seg[ds_reg - es_reg]);
15486 oappend (":");
15487 }
15488 print_operand_value (scratchbuf, 1, disp & 0xffff);
15489 oappend (scratchbuf);
15490 }
252b5132 15491 }
43234a1e
L
15492 if (vex.evex && vex.b
15493 && (bytemode == x_mode
90a915bf 15494 || bytemode == xmmq_mode
43234a1e
L
15495 || bytemode == evex_half_bcst_xmmq_mode))
15496 {
90a915bf
IT
15497 if (vex.w
15498 || bytemode == xmmq_mode
15499 || bytemode == evex_half_bcst_xmmq_mode)
b28d1bda
IT
15500 {
15501 switch (vex.length)
15502 {
15503 case 128:
15504 oappend ("{1to2}");
15505 break;
15506 case 256:
15507 oappend ("{1to4}");
15508 break;
15509 case 512:
15510 oappend ("{1to8}");
15511 break;
15512 default:
15513 abort ();
15514 }
15515 }
43234a1e 15516 else
b28d1bda
IT
15517 {
15518 switch (vex.length)
15519 {
15520 case 128:
15521 oappend ("{1to4}");
15522 break;
15523 case 256:
15524 oappend ("{1to8}");
15525 break;
15526 case 512:
15527 oappend ("{1to16}");
15528 break;
15529 default:
15530 abort ();
15531 }
15532 }
43234a1e 15533 }
252b5132
RH
15534}
15535
c0f3af97 15536static void
8b3f93e7 15537OP_E (int bytemode, int sizeflag)
c0f3af97
L
15538{
15539 /* Skip mod/rm byte. */
15540 MODRM_CHECK;
15541 codep++;
15542
15543 if (modrm.mod == 3)
15544 OP_E_register (bytemode, sizeflag);
15545 else
c1e679ec 15546 OP_E_memory (bytemode, sizeflag);
c0f3af97
L
15547}
15548
252b5132 15549static void
26ca5450 15550OP_G (int bytemode, int sizeflag)
252b5132 15551{
52b15da3 15552 int add = 0;
161a04f6
L
15553 USED_REX (REX_R);
15554 if (rex & REX_R)
52b15da3 15555 add += 8;
252b5132
RH
15556 switch (bytemode)
15557 {
15558 case b_mode:
52b15da3
JH
15559 USED_REX (0);
15560 if (rex)
7967e09e 15561 oappend (names8rex[modrm.reg + add]);
52b15da3 15562 else
7967e09e 15563 oappend (names8[modrm.reg + add]);
252b5132
RH
15564 break;
15565 case w_mode:
7967e09e 15566 oappend (names16[modrm.reg + add]);
252b5132
RH
15567 break;
15568 case d_mode:
1ba585e8
IT
15569 case db_mode:
15570 case dw_mode:
7967e09e 15571 oappend (names32[modrm.reg + add]);
52b15da3
JH
15572 break;
15573 case q_mode:
7967e09e 15574 oappend (names64[modrm.reg + add]);
252b5132 15575 break;
7e8b059b 15576 case bnd_mode:
0d96e4df
L
15577 if (modrm.reg > 0x3)
15578 {
15579 oappend ("(bad)");
15580 return;
15581 }
7e8b059b
L
15582 oappend (names_bnd[modrm.reg]);
15583 break;
252b5132 15584 case v_mode:
9306ca4a 15585 case dq_mode:
42903f7f
L
15586 case dqb_mode:
15587 case dqd_mode:
9306ca4a 15588 case dqw_mode:
161a04f6
L
15589 USED_REX (REX_W);
15590 if (rex & REX_W)
7967e09e 15591 oappend (names64[modrm.reg + add]);
252b5132 15592 else
f16cd0d5
L
15593 {
15594 if ((sizeflag & DFLAG) || bytemode != v_mode)
15595 oappend (names32[modrm.reg + add]);
15596 else
15597 oappend (names16[modrm.reg + add]);
15598 used_prefixes |= (prefixes & PREFIX_DATA);
15599 }
252b5132 15600 break;
90700ea2 15601 case m_mode:
cb712a9e 15602 if (address_mode == mode_64bit)
7967e09e 15603 oappend (names64[modrm.reg + add]);
90700ea2 15604 else
7967e09e 15605 oappend (names32[modrm.reg + add]);
90700ea2 15606 break;
1ba585e8 15607 case mask_bd_mode:
43234a1e 15608 case mask_mode:
9889cbb1
L
15609 if ((modrm.reg + add) > 0x7)
15610 {
15611 oappend ("(bad)");
15612 return;
15613 }
43234a1e
L
15614 oappend (names_mask[modrm.reg + add]);
15615 break;
252b5132
RH
15616 default:
15617 oappend (INTERNAL_DISASSEMBLER_ERROR);
15618 break;
15619 }
15620}
15621
52b15da3 15622static bfd_vma
26ca5450 15623get64 (void)
52b15da3 15624{
5dd0794d 15625 bfd_vma x;
52b15da3 15626#ifdef BFD64
5dd0794d
AM
15627 unsigned int a;
15628 unsigned int b;
15629
52b15da3
JH
15630 FETCH_DATA (the_info, codep + 8);
15631 a = *codep++ & 0xff;
15632 a |= (*codep++ & 0xff) << 8;
15633 a |= (*codep++ & 0xff) << 16;
070fe95d 15634 a |= (*codep++ & 0xffu) << 24;
5dd0794d 15635 b = *codep++ & 0xff;
52b15da3
JH
15636 b |= (*codep++ & 0xff) << 8;
15637 b |= (*codep++ & 0xff) << 16;
070fe95d 15638 b |= (*codep++ & 0xffu) << 24;
52b15da3
JH
15639 x = a + ((bfd_vma) b << 32);
15640#else
6608db57 15641 abort ();
5dd0794d 15642 x = 0;
52b15da3
JH
15643#endif
15644 return x;
15645}
15646
15647static bfd_signed_vma
26ca5450 15648get32 (void)
252b5132 15649{
52b15da3 15650 bfd_signed_vma x = 0;
252b5132
RH
15651
15652 FETCH_DATA (the_info, codep + 4);
52b15da3
JH
15653 x = *codep++ & (bfd_signed_vma) 0xff;
15654 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
15655 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
15656 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
15657 return x;
15658}
15659
15660static bfd_signed_vma
26ca5450 15661get32s (void)
52b15da3
JH
15662{
15663 bfd_signed_vma x = 0;
15664
15665 FETCH_DATA (the_info, codep + 4);
15666 x = *codep++ & (bfd_signed_vma) 0xff;
15667 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
15668 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
15669 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
15670
15671 x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
15672
252b5132
RH
15673 return x;
15674}
15675
15676static int
26ca5450 15677get16 (void)
252b5132
RH
15678{
15679 int x = 0;
15680
15681 FETCH_DATA (the_info, codep + 2);
15682 x = *codep++ & 0xff;
15683 x |= (*codep++ & 0xff) << 8;
15684 return x;
15685}
15686
15687static void
26ca5450 15688set_op (bfd_vma op, int riprel)
252b5132
RH
15689{
15690 op_index[op_ad] = op_ad;
cb712a9e 15691 if (address_mode == mode_64bit)
7081ff04
AJ
15692 {
15693 op_address[op_ad] = op;
15694 op_riprel[op_ad] = riprel;
15695 }
15696 else
15697 {
15698 /* Mask to get a 32-bit address. */
15699 op_address[op_ad] = op & 0xffffffff;
15700 op_riprel[op_ad] = riprel & 0xffffffff;
15701 }
252b5132
RH
15702}
15703
15704static void
26ca5450 15705OP_REG (int code, int sizeflag)
252b5132 15706{
2da11e11 15707 const char *s;
9b60702d 15708 int add;
de882298
RM
15709
15710 switch (code)
15711 {
15712 case es_reg: case ss_reg: case cs_reg:
15713 case ds_reg: case fs_reg: case gs_reg:
15714 oappend (names_seg[code - es_reg]);
15715 return;
15716 }
15717
161a04f6
L
15718 USED_REX (REX_B);
15719 if (rex & REX_B)
52b15da3 15720 add = 8;
9b60702d
L
15721 else
15722 add = 0;
52b15da3
JH
15723
15724 switch (code)
15725 {
52b15da3
JH
15726 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
15727 case sp_reg: case bp_reg: case si_reg: case di_reg:
15728 s = names16[code - ax_reg + add];
15729 break;
52b15da3
JH
15730 case al_reg: case ah_reg: case cl_reg: case ch_reg:
15731 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
15732 USED_REX (0);
15733 if (rex)
15734 s = names8rex[code - al_reg + add];
15735 else
15736 s = names8[code - al_reg];
15737 break;
6439fc28
AM
15738 case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
15739 case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
7bb15c6f 15740 if (address_mode == mode_64bit
6c067bbb 15741 && ((sizeflag & DFLAG) || (rex & REX_W)))
6439fc28
AM
15742 {
15743 s = names64[code - rAX_reg + add];
15744 break;
15745 }
15746 code += eAX_reg - rAX_reg;
6608db57 15747 /* Fall through. */
52b15da3
JH
15748 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
15749 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
15750 USED_REX (REX_W);
15751 if (rex & REX_W)
52b15da3 15752 s = names64[code - eAX_reg + add];
52b15da3 15753 else
f16cd0d5
L
15754 {
15755 if (sizeflag & DFLAG)
15756 s = names32[code - eAX_reg + add];
15757 else
15758 s = names16[code - eAX_reg + add];
15759 used_prefixes |= (prefixes & PREFIX_DATA);
15760 }
52b15da3 15761 break;
52b15da3
JH
15762 default:
15763 s = INTERNAL_DISASSEMBLER_ERROR;
15764 break;
15765 }
15766 oappend (s);
15767}
15768
15769static void
26ca5450 15770OP_IMREG (int code, int sizeflag)
52b15da3
JH
15771{
15772 const char *s;
252b5132
RH
15773
15774 switch (code)
15775 {
15776 case indir_dx_reg:
d708bcba 15777 if (intel_syntax)
52fd6d94 15778 s = "dx";
d708bcba 15779 else
db6eb5be 15780 s = "(%dx)";
252b5132
RH
15781 break;
15782 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
15783 case sp_reg: case bp_reg: case si_reg: case di_reg:
15784 s = names16[code - ax_reg];
15785 break;
15786 case es_reg: case ss_reg: case cs_reg:
15787 case ds_reg: case fs_reg: case gs_reg:
15788 s = names_seg[code - es_reg];
15789 break;
15790 case al_reg: case ah_reg: case cl_reg: case ch_reg:
15791 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
52b15da3
JH
15792 USED_REX (0);
15793 if (rex)
15794 s = names8rex[code - al_reg];
15795 else
15796 s = names8[code - al_reg];
252b5132
RH
15797 break;
15798 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
15799 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
15800 USED_REX (REX_W);
15801 if (rex & REX_W)
52b15da3 15802 s = names64[code - eAX_reg];
252b5132 15803 else
f16cd0d5
L
15804 {
15805 if (sizeflag & DFLAG)
15806 s = names32[code - eAX_reg];
15807 else
15808 s = names16[code - eAX_reg];
15809 used_prefixes |= (prefixes & PREFIX_DATA);
15810 }
252b5132 15811 break;
52fd6d94 15812 case z_mode_ax_reg:
161a04f6 15813 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
15814 s = *names32;
15815 else
15816 s = *names16;
161a04f6 15817 if (!(rex & REX_W))
52fd6d94
JB
15818 used_prefixes |= (prefixes & PREFIX_DATA);
15819 break;
252b5132
RH
15820 default:
15821 s = INTERNAL_DISASSEMBLER_ERROR;
15822 break;
15823 }
15824 oappend (s);
15825}
15826
15827static void
26ca5450 15828OP_I (int bytemode, int sizeflag)
252b5132 15829{
52b15da3
JH
15830 bfd_signed_vma op;
15831 bfd_signed_vma mask = -1;
252b5132
RH
15832
15833 switch (bytemode)
15834 {
15835 case b_mode:
15836 FETCH_DATA (the_info, codep + 1);
52b15da3
JH
15837 op = *codep++;
15838 mask = 0xff;
15839 break;
15840 case q_mode:
cb712a9e 15841 if (address_mode == mode_64bit)
6439fc28
AM
15842 {
15843 op = get32s ();
15844 break;
15845 }
6608db57 15846 /* Fall through. */
252b5132 15847 case v_mode:
161a04f6
L
15848 USED_REX (REX_W);
15849 if (rex & REX_W)
52b15da3 15850 op = get32s ();
252b5132 15851 else
52b15da3 15852 {
f16cd0d5
L
15853 if (sizeflag & DFLAG)
15854 {
15855 op = get32 ();
15856 mask = 0xffffffff;
15857 }
15858 else
15859 {
15860 op = get16 ();
15861 mask = 0xfffff;
15862 }
15863 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 15864 }
252b5132
RH
15865 break;
15866 case w_mode:
52b15da3 15867 mask = 0xfffff;
252b5132
RH
15868 op = get16 ();
15869 break;
9306ca4a
JB
15870 case const_1_mode:
15871 if (intel_syntax)
6c067bbb 15872 oappend ("1");
9306ca4a 15873 return;
252b5132
RH
15874 default:
15875 oappend (INTERNAL_DISASSEMBLER_ERROR);
15876 return;
15877 }
15878
52b15da3
JH
15879 op &= mask;
15880 scratchbuf[0] = '$';
d708bcba 15881 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 15882 oappend_maybe_intel (scratchbuf);
52b15da3
JH
15883 scratchbuf[0] = '\0';
15884}
15885
15886static void
26ca5450 15887OP_I64 (int bytemode, int sizeflag)
52b15da3
JH
15888{
15889 bfd_signed_vma op;
15890 bfd_signed_vma mask = -1;
15891
cb712a9e 15892 if (address_mode != mode_64bit)
6439fc28
AM
15893 {
15894 OP_I (bytemode, sizeflag);
15895 return;
15896 }
15897
52b15da3
JH
15898 switch (bytemode)
15899 {
15900 case b_mode:
15901 FETCH_DATA (the_info, codep + 1);
15902 op = *codep++;
15903 mask = 0xff;
15904 break;
15905 case v_mode:
161a04f6
L
15906 USED_REX (REX_W);
15907 if (rex & REX_W)
52b15da3 15908 op = get64 ();
52b15da3
JH
15909 else
15910 {
f16cd0d5
L
15911 if (sizeflag & DFLAG)
15912 {
15913 op = get32 ();
15914 mask = 0xffffffff;
15915 }
15916 else
15917 {
15918 op = get16 ();
15919 mask = 0xfffff;
15920 }
15921 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 15922 }
52b15da3
JH
15923 break;
15924 case w_mode:
15925 mask = 0xfffff;
15926 op = get16 ();
15927 break;
15928 default:
15929 oappend (INTERNAL_DISASSEMBLER_ERROR);
15930 return;
15931 }
15932
15933 op &= mask;
15934 scratchbuf[0] = '$';
d708bcba 15935 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 15936 oappend_maybe_intel (scratchbuf);
252b5132
RH
15937 scratchbuf[0] = '\0';
15938}
15939
15940static void
26ca5450 15941OP_sI (int bytemode, int sizeflag)
252b5132 15942{
52b15da3 15943 bfd_signed_vma op;
252b5132
RH
15944
15945 switch (bytemode)
15946 {
15947 case b_mode:
e3949f17 15948 case b_T_mode:
252b5132
RH
15949 FETCH_DATA (the_info, codep + 1);
15950 op = *codep++;
15951 if ((op & 0x80) != 0)
15952 op -= 0x100;
e3949f17
L
15953 if (bytemode == b_T_mode)
15954 {
15955 if (address_mode != mode_64bit
7bb15c6f 15956 || !((sizeflag & DFLAG) || (rex & REX_W)))
e3949f17 15957 {
6c067bbb
RM
15958 /* The operand-size prefix is overridden by a REX prefix. */
15959 if ((sizeflag & DFLAG) || (rex & REX_W))
e3949f17
L
15960 op &= 0xffffffff;
15961 else
15962 op &= 0xffff;
15963 }
15964 }
15965 else
15966 {
15967 if (!(rex & REX_W))
15968 {
15969 if (sizeflag & DFLAG)
15970 op &= 0xffffffff;
15971 else
15972 op &= 0xffff;
15973 }
15974 }
252b5132
RH
15975 break;
15976 case v_mode:
7bb15c6f
RM
15977 /* The operand-size prefix is overridden by a REX prefix. */
15978 if ((sizeflag & DFLAG) || (rex & REX_W))
52b15da3 15979 op = get32s ();
252b5132 15980 else
d9e3625e 15981 op = get16 ();
252b5132
RH
15982 break;
15983 default:
15984 oappend (INTERNAL_DISASSEMBLER_ERROR);
15985 return;
15986 }
52b15da3
JH
15987
15988 scratchbuf[0] = '$';
15989 print_operand_value (scratchbuf + 1, 1, op);
9ce09ba2 15990 oappend_maybe_intel (scratchbuf);
252b5132
RH
15991}
15992
15993static void
26ca5450 15994OP_J (int bytemode, int sizeflag)
252b5132 15995{
52b15da3 15996 bfd_vma disp;
7081ff04 15997 bfd_vma mask = -1;
65ca155d 15998 bfd_vma segment = 0;
252b5132
RH
15999
16000 switch (bytemode)
16001 {
16002 case b_mode:
16003 FETCH_DATA (the_info, codep + 1);
16004 disp = *codep++;
16005 if ((disp & 0x80) != 0)
16006 disp -= 0x100;
16007 break;
16008 case v_mode:
5db04b09
L
16009 if (isa64 == amd64)
16010 USED_REX (REX_W);
16011 if ((sizeflag & DFLAG)
16012 || (address_mode == mode_64bit
16013 && (isa64 != amd64 || (rex & REX_W))))
52b15da3 16014 disp = get32s ();
252b5132
RH
16015 else
16016 {
16017 disp = get16 ();
206717e8
L
16018 if ((disp & 0x8000) != 0)
16019 disp -= 0x10000;
65ca155d
L
16020 /* In 16bit mode, address is wrapped around at 64k within
16021 the same segment. Otherwise, a data16 prefix on a jump
16022 instruction means that the pc is masked to 16 bits after
16023 the displacement is added! */
16024 mask = 0xffff;
16025 if ((prefixes & PREFIX_DATA) == 0)
4fd7268a 16026 segment = ((start_pc + (codep - start_codep))
65ca155d 16027 & ~((bfd_vma) 0xffff));
252b5132 16028 }
5db04b09
L
16029 if (address_mode != mode_64bit
16030 || (isa64 == amd64 && !(rex & REX_W)))
f16cd0d5 16031 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132
RH
16032 break;
16033 default:
16034 oappend (INTERNAL_DISASSEMBLER_ERROR);
16035 return;
16036 }
42d5f9c6 16037 disp = ((start_pc + (codep - start_codep) + disp) & mask) | segment;
52b15da3
JH
16038 set_op (disp, 0);
16039 print_operand_value (scratchbuf, 1, disp);
252b5132
RH
16040 oappend (scratchbuf);
16041}
16042
252b5132 16043static void
ed7841b3 16044OP_SEG (int bytemode, int sizeflag)
252b5132 16045{
ed7841b3 16046 if (bytemode == w_mode)
7967e09e 16047 oappend (names_seg[modrm.reg]);
ed7841b3 16048 else
7967e09e 16049 OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
252b5132
RH
16050}
16051
16052static void
26ca5450 16053OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
252b5132
RH
16054{
16055 int seg, offset;
16056
c608c12e 16057 if (sizeflag & DFLAG)
252b5132 16058 {
c608c12e
AM
16059 offset = get32 ();
16060 seg = get16 ();
252b5132 16061 }
c608c12e
AM
16062 else
16063 {
16064 offset = get16 ();
16065 seg = get16 ();
16066 }
7d421014 16067 used_prefixes |= (prefixes & PREFIX_DATA);
d708bcba 16068 if (intel_syntax)
3f31e633 16069 sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
d708bcba
AM
16070 else
16071 sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
c608c12e 16072 oappend (scratchbuf);
252b5132
RH
16073}
16074
252b5132 16075static void
3f31e633 16076OP_OFF (int bytemode, int sizeflag)
252b5132 16077{
52b15da3 16078 bfd_vma off;
252b5132 16079
3f31e633
JB
16080 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
16081 intel_operand_size (bytemode, sizeflag);
252b5132
RH
16082 append_seg ();
16083
cb712a9e 16084 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132
RH
16085 off = get32 ();
16086 else
16087 off = get16 ();
16088
16089 if (intel_syntax)
16090 {
285ca992 16091 if (!active_seg_prefix)
252b5132 16092 {
d708bcba 16093 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
16094 oappend (":");
16095 }
16096 }
52b15da3
JH
16097 print_operand_value (scratchbuf, 1, off);
16098 oappend (scratchbuf);
16099}
6439fc28 16100
52b15da3 16101static void
3f31e633 16102OP_OFF64 (int bytemode, int sizeflag)
52b15da3
JH
16103{
16104 bfd_vma off;
16105
539e75ad
L
16106 if (address_mode != mode_64bit
16107 || (prefixes & PREFIX_ADDR))
6439fc28
AM
16108 {
16109 OP_OFF (bytemode, sizeflag);
16110 return;
16111 }
16112
3f31e633
JB
16113 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
16114 intel_operand_size (bytemode, sizeflag);
52b15da3
JH
16115 append_seg ();
16116
6608db57 16117 off = get64 ();
52b15da3
JH
16118
16119 if (intel_syntax)
16120 {
285ca992 16121 if (!active_seg_prefix)
52b15da3 16122 {
d708bcba 16123 oappend (names_seg[ds_reg - es_reg]);
52b15da3
JH
16124 oappend (":");
16125 }
16126 }
16127 print_operand_value (scratchbuf, 1, off);
252b5132
RH
16128 oappend (scratchbuf);
16129}
16130
16131static void
26ca5450 16132ptr_reg (int code, int sizeflag)
252b5132 16133{
2da11e11 16134 const char *s;
d708bcba 16135
1d9f512f 16136 *obufp++ = open_char;
20f0a1fc 16137 used_prefixes |= (prefixes & PREFIX_ADDR);
cb712a9e 16138 if (address_mode == mode_64bit)
c1a64871
JH
16139 {
16140 if (!(sizeflag & AFLAG))
db6eb5be 16141 s = names32[code - eAX_reg];
c1a64871 16142 else
db6eb5be 16143 s = names64[code - eAX_reg];
c1a64871 16144 }
52b15da3 16145 else if (sizeflag & AFLAG)
252b5132
RH
16146 s = names32[code - eAX_reg];
16147 else
16148 s = names16[code - eAX_reg];
16149 oappend (s);
1d9f512f
AM
16150 *obufp++ = close_char;
16151 *obufp = 0;
252b5132
RH
16152}
16153
16154static void
26ca5450 16155OP_ESreg (int code, int sizeflag)
252b5132 16156{
9306ca4a 16157 if (intel_syntax)
52fd6d94
JB
16158 {
16159 switch (codep[-1])
16160 {
16161 case 0x6d: /* insw/insl */
16162 intel_operand_size (z_mode, sizeflag);
16163 break;
16164 case 0xa5: /* movsw/movsl/movsq */
16165 case 0xa7: /* cmpsw/cmpsl/cmpsq */
16166 case 0xab: /* stosw/stosl */
16167 case 0xaf: /* scasw/scasl */
16168 intel_operand_size (v_mode, sizeflag);
16169 break;
16170 default:
16171 intel_operand_size (b_mode, sizeflag);
16172 }
16173 }
9ce09ba2 16174 oappend_maybe_intel ("%es:");
252b5132
RH
16175 ptr_reg (code, sizeflag);
16176}
16177
16178static void
26ca5450 16179OP_DSreg (int code, int sizeflag)
252b5132 16180{
9306ca4a 16181 if (intel_syntax)
52fd6d94
JB
16182 {
16183 switch (codep[-1])
16184 {
16185 case 0x6f: /* outsw/outsl */
16186 intel_operand_size (z_mode, sizeflag);
16187 break;
16188 case 0xa5: /* movsw/movsl/movsq */
16189 case 0xa7: /* cmpsw/cmpsl/cmpsq */
16190 case 0xad: /* lodsw/lodsl/lodsq */
16191 intel_operand_size (v_mode, sizeflag);
16192 break;
16193 default:
16194 intel_operand_size (b_mode, sizeflag);
16195 }
16196 }
285ca992
L
16197 /* Set active_seg_prefix to PREFIX_DS if it is unset so that the
16198 default segment register DS is printed. */
16199 if (!active_seg_prefix)
16200 active_seg_prefix = PREFIX_DS;
6608db57 16201 append_seg ();
252b5132
RH
16202 ptr_reg (code, sizeflag);
16203}
16204
252b5132 16205static void
26ca5450 16206OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 16207{
9b60702d 16208 int add;
161a04f6 16209 if (rex & REX_R)
c4a530c5 16210 {
161a04f6 16211 USED_REX (REX_R);
c4a530c5
JB
16212 add = 8;
16213 }
cb712a9e 16214 else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
c4a530c5 16215 {
f16cd0d5 16216 all_prefixes[last_lock_prefix] = 0;
c4a530c5
JB
16217 used_prefixes |= PREFIX_LOCK;
16218 add = 8;
16219 }
9b60702d
L
16220 else
16221 add = 0;
7967e09e 16222 sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
9ce09ba2 16223 oappend_maybe_intel (scratchbuf);
252b5132
RH
16224}
16225
252b5132 16226static void
26ca5450 16227OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 16228{
9b60702d 16229 int add;
161a04f6
L
16230 USED_REX (REX_R);
16231 if (rex & REX_R)
52b15da3 16232 add = 8;
9b60702d
L
16233 else
16234 add = 0;
d708bcba 16235 if (intel_syntax)
7967e09e 16236 sprintf (scratchbuf, "db%d", modrm.reg + add);
d708bcba 16237 else
7967e09e 16238 sprintf (scratchbuf, "%%db%d", modrm.reg + add);
252b5132
RH
16239 oappend (scratchbuf);
16240}
16241
252b5132 16242static void
26ca5450 16243OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 16244{
7967e09e 16245 sprintf (scratchbuf, "%%tr%d", modrm.reg);
9ce09ba2 16246 oappend_maybe_intel (scratchbuf);
252b5132
RH
16247}
16248
16249static void
6f74c397 16250OP_R (int bytemode, int sizeflag)
252b5132 16251{
68f34464
L
16252 /* Skip mod/rm byte. */
16253 MODRM_CHECK;
16254 codep++;
16255 OP_E_register (bytemode, sizeflag);
252b5132
RH
16256}
16257
16258static void
26ca5450 16259OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 16260{
b9733481
L
16261 int reg = modrm.reg;
16262 const char **names;
16263
041bd2e0
JH
16264 used_prefixes |= (prefixes & PREFIX_DATA);
16265 if (prefixes & PREFIX_DATA)
20f0a1fc 16266 {
b9733481 16267 names = names_xmm;
161a04f6
L
16268 USED_REX (REX_R);
16269 if (rex & REX_R)
b9733481 16270 reg += 8;
20f0a1fc 16271 }
041bd2e0 16272 else
b9733481
L
16273 names = names_mm;
16274 oappend (names[reg]);
252b5132
RH
16275}
16276
c608c12e 16277static void
c0f3af97 16278OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
c608c12e 16279{
b9733481
L
16280 int reg = modrm.reg;
16281 const char **names;
16282
161a04f6
L
16283 USED_REX (REX_R);
16284 if (rex & REX_R)
b9733481 16285 reg += 8;
43234a1e
L
16286 if (vex.evex)
16287 {
16288 if (!vex.r)
16289 reg += 16;
16290 }
16291
539f890d
L
16292 if (need_vex
16293 && bytemode != xmm_mode
43234a1e
L
16294 && bytemode != xmmq_mode
16295 && bytemode != evex_half_bcst_xmmq_mode
16296 && bytemode != ymm_mode
539f890d 16297 && bytemode != scalar_mode)
c0f3af97
L
16298 {
16299 switch (vex.length)
16300 {
16301 case 128:
b9733481 16302 names = names_xmm;
c0f3af97
L
16303 break;
16304 case 256:
5fc35d96
IT
16305 if (vex.w
16306 || (bytemode != vex_vsib_q_w_dq_mode
16307 && bytemode != vex_vsib_q_w_d_mode))
6c30d220
L
16308 names = names_ymm;
16309 else
16310 names = names_xmm;
c0f3af97 16311 break;
43234a1e
L
16312 case 512:
16313 names = names_zmm;
16314 break;
c0f3af97
L
16315 default:
16316 abort ();
16317 }
16318 }
43234a1e
L
16319 else if (bytemode == xmmq_mode
16320 || bytemode == evex_half_bcst_xmmq_mode)
16321 {
16322 switch (vex.length)
16323 {
16324 case 128:
16325 case 256:
16326 names = names_xmm;
16327 break;
16328 case 512:
16329 names = names_ymm;
16330 break;
16331 default:
16332 abort ();
16333 }
16334 }
16335 else if (bytemode == ymm_mode)
16336 names = names_ymm;
c0f3af97 16337 else
b9733481
L
16338 names = names_xmm;
16339 oappend (names[reg]);
c608c12e
AM
16340}
16341
252b5132 16342static void
26ca5450 16343OP_EM (int bytemode, int sizeflag)
252b5132 16344{
b9733481
L
16345 int reg;
16346 const char **names;
16347
7967e09e 16348 if (modrm.mod != 3)
252b5132 16349 {
b6169b20
L
16350 if (intel_syntax
16351 && (bytemode == v_mode || bytemode == v_swap_mode))
9306ca4a
JB
16352 {
16353 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
16354 used_prefixes |= (prefixes & PREFIX_DATA);
6c067bbb 16355 }
252b5132
RH
16356 OP_E (bytemode, sizeflag);
16357 return;
16358 }
16359
b6169b20
L
16360 if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
16361 swap_operand ();
16362
6608db57 16363 /* Skip mod/rm byte. */
4bba6815 16364 MODRM_CHECK;
252b5132 16365 codep++;
041bd2e0 16366 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 16367 reg = modrm.rm;
041bd2e0 16368 if (prefixes & PREFIX_DATA)
20f0a1fc 16369 {
b9733481 16370 names = names_xmm;
161a04f6
L
16371 USED_REX (REX_B);
16372 if (rex & REX_B)
b9733481 16373 reg += 8;
20f0a1fc 16374 }
041bd2e0 16375 else
b9733481
L
16376 names = names_mm;
16377 oappend (names[reg]);
252b5132
RH
16378}
16379
246c51aa
L
16380/* cvt* are the only instructions in sse2 which have
16381 both SSE and MMX operands and also have 0x66 prefix
16382 in their opcode. 0x66 was originally used to differentiate
16383 between SSE and MMX instruction(operands). So we have to handle the
4d9567e0
MM
16384 cvt* separately using OP_EMC and OP_MXC */
16385static void
16386OP_EMC (int bytemode, int sizeflag)
16387{
7967e09e 16388 if (modrm.mod != 3)
4d9567e0
MM
16389 {
16390 if (intel_syntax && bytemode == v_mode)
16391 {
16392 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
16393 used_prefixes |= (prefixes & PREFIX_DATA);
6c067bbb 16394 }
4d9567e0
MM
16395 OP_E (bytemode, sizeflag);
16396 return;
16397 }
246c51aa 16398
4d9567e0
MM
16399 /* Skip mod/rm byte. */
16400 MODRM_CHECK;
16401 codep++;
16402 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 16403 oappend (names_mm[modrm.rm]);
4d9567e0
MM
16404}
16405
16406static void
16407OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16408{
16409 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 16410 oappend (names_mm[modrm.reg]);
4d9567e0
MM
16411}
16412
c608c12e 16413static void
26ca5450 16414OP_EX (int bytemode, int sizeflag)
c608c12e 16415{
b9733481
L
16416 int reg;
16417 const char **names;
d6f574e0
L
16418
16419 /* Skip mod/rm byte. */
16420 MODRM_CHECK;
16421 codep++;
16422
7967e09e 16423 if (modrm.mod != 3)
c608c12e 16424 {
c1e679ec 16425 OP_E_memory (bytemode, sizeflag);
c608c12e
AM
16426 return;
16427 }
d6f574e0 16428
b9733481 16429 reg = modrm.rm;
161a04f6
L
16430 USED_REX (REX_B);
16431 if (rex & REX_B)
b9733481 16432 reg += 8;
43234a1e
L
16433 if (vex.evex)
16434 {
16435 USED_REX (REX_X);
16436 if ((rex & REX_X))
16437 reg += 16;
16438 }
c608c12e 16439
b6169b20 16440 if ((sizeflag & SUFFIX_ALWAYS)
fa99fab2
L
16441 && (bytemode == x_swap_mode
16442 || bytemode == d_swap_mode
7bb15c6f 16443 || bytemode == d_scalar_swap_mode
539f890d
L
16444 || bytemode == q_swap_mode
16445 || bytemode == q_scalar_swap_mode))
b6169b20
L
16446 swap_operand ();
16447
c0f3af97
L
16448 if (need_vex
16449 && bytemode != xmm_mode
6c30d220
L
16450 && bytemode != xmmdw_mode
16451 && bytemode != xmmqd_mode
16452 && bytemode != xmm_mb_mode
16453 && bytemode != xmm_mw_mode
16454 && bytemode != xmm_md_mode
16455 && bytemode != xmm_mq_mode
43234a1e 16456 && bytemode != xmm_mdq_mode
539f890d 16457 && bytemode != xmmq_mode
43234a1e
L
16458 && bytemode != evex_half_bcst_xmmq_mode
16459 && bytemode != ymm_mode
539f890d 16460 && bytemode != d_scalar_mode
7bb15c6f 16461 && bytemode != d_scalar_swap_mode
539f890d 16462 && bytemode != q_scalar_mode
1c480963
L
16463 && bytemode != q_scalar_swap_mode
16464 && bytemode != vex_scalar_w_dq_mode)
c0f3af97
L
16465 {
16466 switch (vex.length)
16467 {
16468 case 128:
b9733481 16469 names = names_xmm;
c0f3af97
L
16470 break;
16471 case 256:
b9733481 16472 names = names_ymm;
c0f3af97 16473 break;
43234a1e
L
16474 case 512:
16475 names = names_zmm;
16476 break;
c0f3af97
L
16477 default:
16478 abort ();
16479 }
16480 }
43234a1e
L
16481 else if (bytemode == xmmq_mode
16482 || bytemode == evex_half_bcst_xmmq_mode)
16483 {
16484 switch (vex.length)
16485 {
16486 case 128:
16487 case 256:
16488 names = names_xmm;
16489 break;
16490 case 512:
16491 names = names_ymm;
16492 break;
16493 default:
16494 abort ();
16495 }
16496 }
16497 else if (bytemode == ymm_mode)
16498 names = names_ymm;
c0f3af97 16499 else
b9733481
L
16500 names = names_xmm;
16501 oappend (names[reg]);
c608c12e
AM
16502}
16503
252b5132 16504static void
26ca5450 16505OP_MS (int bytemode, int sizeflag)
252b5132 16506{
7967e09e 16507 if (modrm.mod == 3)
2da11e11
AM
16508 OP_EM (bytemode, sizeflag);
16509 else
6608db57 16510 BadOp ();
252b5132
RH
16511}
16512
992aaec9 16513static void
26ca5450 16514OP_XS (int bytemode, int sizeflag)
992aaec9 16515{
7967e09e 16516 if (modrm.mod == 3)
992aaec9
AM
16517 OP_EX (bytemode, sizeflag);
16518 else
6608db57 16519 BadOp ();
992aaec9
AM
16520}
16521
cc0ec051
AM
16522static void
16523OP_M (int bytemode, int sizeflag)
16524{
7967e09e 16525 if (modrm.mod == 3)
75413a22
L
16526 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
16527 BadOp ();
cc0ec051
AM
16528 else
16529 OP_E (bytemode, sizeflag);
16530}
16531
16532static void
16533OP_0f07 (int bytemode, int sizeflag)
16534{
7967e09e 16535 if (modrm.mod != 3 || modrm.rm != 0)
cc0ec051
AM
16536 BadOp ();
16537 else
16538 OP_E (bytemode, sizeflag);
16539}
16540
46e883c5 16541/* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
246c51aa 16542 32bit mode and "xchg %rax,%rax" in 64bit mode. */
46e883c5 16543
cc0ec051 16544static void
46e883c5 16545NOP_Fixup1 (int bytemode, int sizeflag)
cc0ec051 16546{
8b38ad71
L
16547 if ((prefixes & PREFIX_DATA) != 0
16548 || (rex != 0
16549 && rex != 0x48
16550 && address_mode == mode_64bit))
46e883c5
L
16551 OP_REG (bytemode, sizeflag);
16552 else
16553 strcpy (obuf, "nop");
16554}
16555
16556static void
16557NOP_Fixup2 (int bytemode, int sizeflag)
16558{
8b38ad71
L
16559 if ((prefixes & PREFIX_DATA) != 0
16560 || (rex != 0
16561 && rex != 0x48
16562 && address_mode == mode_64bit))
46e883c5 16563 OP_IMREG (bytemode, sizeflag);
cc0ec051
AM
16564}
16565
84037f8c 16566static const char *const Suffix3DNow[] = {
252b5132
RH
16567/* 00 */ NULL, NULL, NULL, NULL,
16568/* 04 */ NULL, NULL, NULL, NULL,
16569/* 08 */ NULL, NULL, NULL, NULL,
9e525108 16570/* 0C */ "pi2fw", "pi2fd", NULL, NULL,
252b5132
RH
16571/* 10 */ NULL, NULL, NULL, NULL,
16572/* 14 */ NULL, NULL, NULL, NULL,
16573/* 18 */ NULL, NULL, NULL, NULL,
9e525108 16574/* 1C */ "pf2iw", "pf2id", NULL, NULL,
252b5132
RH
16575/* 20 */ NULL, NULL, NULL, NULL,
16576/* 24 */ NULL, NULL, NULL, NULL,
16577/* 28 */ NULL, NULL, NULL, NULL,
16578/* 2C */ NULL, NULL, NULL, NULL,
16579/* 30 */ NULL, NULL, NULL, NULL,
16580/* 34 */ NULL, NULL, NULL, NULL,
16581/* 38 */ NULL, NULL, NULL, NULL,
16582/* 3C */ NULL, NULL, NULL, NULL,
16583/* 40 */ NULL, NULL, NULL, NULL,
16584/* 44 */ NULL, NULL, NULL, NULL,
16585/* 48 */ NULL, NULL, NULL, NULL,
16586/* 4C */ NULL, NULL, NULL, NULL,
16587/* 50 */ NULL, NULL, NULL, NULL,
16588/* 54 */ NULL, NULL, NULL, NULL,
16589/* 58 */ NULL, NULL, NULL, NULL,
16590/* 5C */ NULL, NULL, NULL, NULL,
16591/* 60 */ NULL, NULL, NULL, NULL,
16592/* 64 */ NULL, NULL, NULL, NULL,
16593/* 68 */ NULL, NULL, NULL, NULL,
16594/* 6C */ NULL, NULL, NULL, NULL,
16595/* 70 */ NULL, NULL, NULL, NULL,
16596/* 74 */ NULL, NULL, NULL, NULL,
16597/* 78 */ NULL, NULL, NULL, NULL,
16598/* 7C */ NULL, NULL, NULL, NULL,
16599/* 80 */ NULL, NULL, NULL, NULL,
16600/* 84 */ NULL, NULL, NULL, NULL,
9e525108
AM
16601/* 88 */ NULL, NULL, "pfnacc", NULL,
16602/* 8C */ NULL, NULL, "pfpnacc", NULL,
252b5132
RH
16603/* 90 */ "pfcmpge", NULL, NULL, NULL,
16604/* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
16605/* 98 */ NULL, NULL, "pfsub", NULL,
16606/* 9C */ NULL, NULL, "pfadd", NULL,
16607/* A0 */ "pfcmpgt", NULL, NULL, NULL,
16608/* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
16609/* A8 */ NULL, NULL, "pfsubr", NULL,
16610/* AC */ NULL, NULL, "pfacc", NULL,
16611/* B0 */ "pfcmpeq", NULL, NULL, NULL,
9beff690 16612/* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
9e525108 16613/* B8 */ NULL, NULL, NULL, "pswapd",
252b5132
RH
16614/* BC */ NULL, NULL, NULL, "pavgusb",
16615/* C0 */ NULL, NULL, NULL, NULL,
16616/* C4 */ NULL, NULL, NULL, NULL,
16617/* C8 */ NULL, NULL, NULL, NULL,
16618/* CC */ NULL, NULL, NULL, NULL,
16619/* D0 */ NULL, NULL, NULL, NULL,
16620/* D4 */ NULL, NULL, NULL, NULL,
16621/* D8 */ NULL, NULL, NULL, NULL,
16622/* DC */ NULL, NULL, NULL, NULL,
16623/* E0 */ NULL, NULL, NULL, NULL,
16624/* E4 */ NULL, NULL, NULL, NULL,
16625/* E8 */ NULL, NULL, NULL, NULL,
16626/* EC */ NULL, NULL, NULL, NULL,
16627/* F0 */ NULL, NULL, NULL, NULL,
16628/* F4 */ NULL, NULL, NULL, NULL,
16629/* F8 */ NULL, NULL, NULL, NULL,
16630/* FC */ NULL, NULL, NULL, NULL,
16631};
16632
16633static void
26ca5450 16634OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132
RH
16635{
16636 const char *mnemonic;
16637
16638 FETCH_DATA (the_info, codep + 1);
16639 /* AMD 3DNow! instructions are specified by an opcode suffix in the
16640 place where an 8-bit immediate would normally go. ie. the last
16641 byte of the instruction. */
ea397f5b 16642 obufp = mnemonicendp;
c608c12e 16643 mnemonic = Suffix3DNow[*codep++ & 0xff];
252b5132 16644 if (mnemonic)
2da11e11 16645 oappend (mnemonic);
252b5132
RH
16646 else
16647 {
16648 /* Since a variable sized modrm/sib chunk is between the start
16649 of the opcode (0x0f0f) and the opcode suffix, we need to do
16650 all the modrm processing first, and don't know until now that
16651 we have a bad opcode. This necessitates some cleaning up. */
ce518a5f
L
16652 op_out[0][0] = '\0';
16653 op_out[1][0] = '\0';
6608db57 16654 BadOp ();
252b5132 16655 }
ea397f5b 16656 mnemonicendp = obufp;
252b5132 16657}
c608c12e 16658
ea397f5b
L
16659static struct op simd_cmp_op[] =
16660{
16661 { STRING_COMMA_LEN ("eq") },
16662 { STRING_COMMA_LEN ("lt") },
16663 { STRING_COMMA_LEN ("le") },
16664 { STRING_COMMA_LEN ("unord") },
16665 { STRING_COMMA_LEN ("neq") },
16666 { STRING_COMMA_LEN ("nlt") },
16667 { STRING_COMMA_LEN ("nle") },
16668 { STRING_COMMA_LEN ("ord") }
c608c12e
AM
16669};
16670
16671static void
ad19981d 16672CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
c608c12e
AM
16673{
16674 unsigned int cmp_type;
16675
16676 FETCH_DATA (the_info, codep + 1);
16677 cmp_type = *codep++ & 0xff;
c0f3af97 16678 if (cmp_type < ARRAY_SIZE (simd_cmp_op))
c608c12e 16679 {
ad19981d 16680 char suffix [3];
ea397f5b 16681 char *p = mnemonicendp - 2;
ad19981d
L
16682 suffix[0] = p[0];
16683 suffix[1] = p[1];
16684 suffix[2] = '\0';
ea397f5b
L
16685 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
16686 mnemonicendp += simd_cmp_op[cmp_type].len;
c608c12e
AM
16687 }
16688 else
16689 {
ad19981d
L
16690 /* We have a reserved extension byte. Output it directly. */
16691 scratchbuf[0] = '$';
16692 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 16693 oappend_maybe_intel (scratchbuf);
ad19981d 16694 scratchbuf[0] = '\0';
c608c12e
AM
16695 }
16696}
16697
9916071f
AP
16698static void
16699OP_Mwaitx (int bytemode ATTRIBUTE_UNUSED,
16700 int sizeflag ATTRIBUTE_UNUSED)
16701{
16702 /* mwaitx %eax,%ecx,%ebx */
16703 if (!intel_syntax)
16704 {
16705 const char **names = (address_mode == mode_64bit
16706 ? names64 : names32);
16707 strcpy (op_out[0], names[0]);
16708 strcpy (op_out[1], names[1]);
16709 strcpy (op_out[2], names[3]);
16710 two_source_ops = 1;
16711 }
16712 /* Skip mod/rm byte. */
16713 MODRM_CHECK;
16714 codep++;
16715}
16716
ca164297 16717static void
b844680a
L
16718OP_Mwait (int bytemode ATTRIBUTE_UNUSED,
16719 int sizeflag ATTRIBUTE_UNUSED)
16720{
16721 /* mwait %eax,%ecx */
16722 if (!intel_syntax)
16723 {
16724 const char **names = (address_mode == mode_64bit
16725 ? names64 : names32);
16726 strcpy (op_out[0], names[0]);
16727 strcpy (op_out[1], names[1]);
16728 two_source_ops = 1;
16729 }
16730 /* Skip mod/rm byte. */
16731 MODRM_CHECK;
16732 codep++;
16733}
16734
16735static void
16736OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
16737 int sizeflag ATTRIBUTE_UNUSED)
ca164297 16738{
b844680a
L
16739 /* monitor %eax,%ecx,%edx" */
16740 if (!intel_syntax)
ca164297 16741 {
b844680a 16742 const char **op1_names;
cb712a9e
L
16743 const char **names = (address_mode == mode_64bit
16744 ? names64 : names32);
1d9f512f 16745
b844680a
L
16746 if (!(prefixes & PREFIX_ADDR))
16747 op1_names = (address_mode == mode_16bit
16748 ? names16 : names);
ca164297
L
16749 else
16750 {
b844680a 16751 /* Remove "addr16/addr32". */
f16cd0d5 16752 all_prefixes[last_addr_prefix] = 0;
b844680a
L
16753 op1_names = (address_mode != mode_32bit
16754 ? names32 : names16);
16755 used_prefixes |= PREFIX_ADDR;
ca164297 16756 }
b844680a
L
16757 strcpy (op_out[0], op1_names[0]);
16758 strcpy (op_out[1], names[1]);
16759 strcpy (op_out[2], names[2]);
16760 two_source_ops = 1;
ca164297 16761 }
b844680a
L
16762 /* Skip mod/rm byte. */
16763 MODRM_CHECK;
16764 codep++;
30123838
JB
16765}
16766
6608db57
KH
16767static void
16768BadOp (void)
2da11e11 16769{
6608db57
KH
16770 /* Throw away prefixes and 1st. opcode byte. */
16771 codep = insn_codep + 1;
2da11e11
AM
16772 oappend ("(bad)");
16773}
4cc91dba 16774
35c52694
L
16775static void
16776REP_Fixup (int bytemode, int sizeflag)
16777{
16778 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
16779 lods and stos. */
35c52694 16780 if (prefixes & PREFIX_REPZ)
f16cd0d5 16781 all_prefixes[last_repz_prefix] = REP_PREFIX;
35c52694
L
16782
16783 switch (bytemode)
16784 {
16785 case al_reg:
16786 case eAX_reg:
16787 case indir_dx_reg:
16788 OP_IMREG (bytemode, sizeflag);
16789 break;
16790 case eDI_reg:
16791 OP_ESreg (bytemode, sizeflag);
16792 break;
16793 case eSI_reg:
16794 OP_DSreg (bytemode, sizeflag);
16795 break;
16796 default:
16797 abort ();
16798 break;
16799 }
16800}
f5804c90 16801
7e8b059b
L
16802/* For BND-prefixed instructions 0xF2 prefix should be displayed as
16803 "bnd". */
16804
16805static void
16806BND_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16807{
16808 if (prefixes & PREFIX_REPNZ)
16809 all_prefixes[last_repnz_prefix] = BND_PREFIX;
16810}
16811
04ef582a
L
16812/* For NOTRACK-prefixed instructions, 0x3E prefix should be displayed as
16813 "notrack". */
16814
16815static void
16816NOTRACK_Fixup (int bytemode ATTRIBUTE_UNUSED,
16817 int sizeflag ATTRIBUTE_UNUSED)
16818{
16819 if (modrm.mod == 3
16820 && active_seg_prefix == PREFIX_DS
16821 && (address_mode != mode_64bit || last_data_prefix < 0))
16822 {
16823 /* NOTRACK prefix is only valid on register indirect branch
16824 instructions and it must be the last prefix before REX
16825 prefix and opcode. NB: DATA prefix is unsupported for
16826 Intel64. */
16827 if (last_active_prefix >= 0)
16828 {
16829 int notrack_prefix = last_active_prefix;
16830 if (last_rex_prefix == last_active_prefix)
16831 notrack_prefix--;
16832 if (all_prefixes[notrack_prefix] != NOTRACK_PREFIX_OPCODE)
16833 return;
16834 }
16835 active_seg_prefix = 0;
16836 all_prefixes[last_seg_prefix] = NOTRACK_PREFIX;
16837 }
16838}
16839
42164a71
L
16840/* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
16841 "xacquire"/"xrelease" for memory operand if there is a LOCK prefix.
16842 */
16843
16844static void
16845HLE_Fixup1 (int bytemode, int sizeflag)
16846{
16847 if (modrm.mod != 3
16848 && (prefixes & PREFIX_LOCK) != 0)
16849 {
16850 if (prefixes & PREFIX_REPZ)
16851 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
16852 if (prefixes & PREFIX_REPNZ)
16853 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
16854 }
16855
16856 OP_E (bytemode, sizeflag);
16857}
16858
16859/* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
16860 "xacquire"/"xrelease" for memory operand. No check for LOCK prefix.
16861 */
16862
16863static void
16864HLE_Fixup2 (int bytemode, int sizeflag)
16865{
16866 if (modrm.mod != 3)
16867 {
16868 if (prefixes & PREFIX_REPZ)
16869 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
16870 if (prefixes & PREFIX_REPNZ)
16871 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
16872 }
16873
16874 OP_E (bytemode, sizeflag);
16875}
16876
16877/* Similar to OP_E. But the 0xf3 prefixes should be displayed as
16878 "xrelease" for memory operand. No check for LOCK prefix. */
16879
16880static void
16881HLE_Fixup3 (int bytemode, int sizeflag)
16882{
16883 if (modrm.mod != 3
16884 && last_repz_prefix > last_repnz_prefix
16885 && (prefixes & PREFIX_REPZ) != 0)
16886 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
16887
16888 OP_E (bytemode, sizeflag);
16889}
16890
f5804c90
L
16891static void
16892CMPXCHG8B_Fixup (int bytemode, int sizeflag)
16893{
161a04f6
L
16894 USED_REX (REX_W);
16895 if (rex & REX_W)
f5804c90
L
16896 {
16897 /* Change cmpxchg8b to cmpxchg16b. */
ea397f5b
L
16898 char *p = mnemonicendp - 2;
16899 mnemonicendp = stpcpy (p, "16b");
fb9c77c7 16900 bytemode = o_mode;
f5804c90 16901 }
42164a71
L
16902 else if ((prefixes & PREFIX_LOCK) != 0)
16903 {
16904 if (prefixes & PREFIX_REPZ)
16905 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
16906 if (prefixes & PREFIX_REPNZ)
16907 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
16908 }
16909
f5804c90
L
16910 OP_M (bytemode, sizeflag);
16911}
42903f7f
L
16912
16913static void
16914XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
16915{
b9733481
L
16916 const char **names;
16917
c0f3af97
L
16918 if (need_vex)
16919 {
16920 switch (vex.length)
16921 {
16922 case 128:
b9733481 16923 names = names_xmm;
c0f3af97
L
16924 break;
16925 case 256:
b9733481 16926 names = names_ymm;
c0f3af97
L
16927 break;
16928 default:
16929 abort ();
16930 }
16931 }
16932 else
b9733481
L
16933 names = names_xmm;
16934 oappend (names[reg]);
42903f7f 16935}
381d071f
L
16936
16937static void
16938CRC32_Fixup (int bytemode, int sizeflag)
16939{
16940 /* Add proper suffix to "crc32". */
ea397f5b 16941 char *p = mnemonicendp;
381d071f
L
16942
16943 switch (bytemode)
16944 {
16945 case b_mode:
20592a94 16946 if (intel_syntax)
ea397f5b 16947 goto skip;
20592a94 16948
381d071f
L
16949 *p++ = 'b';
16950 break;
16951 case v_mode:
20592a94 16952 if (intel_syntax)
ea397f5b 16953 goto skip;
20592a94 16954
381d071f
L
16955 USED_REX (REX_W);
16956 if (rex & REX_W)
16957 *p++ = 'q';
7bb15c6f 16958 else
f16cd0d5
L
16959 {
16960 if (sizeflag & DFLAG)
16961 *p++ = 'l';
16962 else
16963 *p++ = 'w';
16964 used_prefixes |= (prefixes & PREFIX_DATA);
16965 }
381d071f
L
16966 break;
16967 default:
16968 oappend (INTERNAL_DISASSEMBLER_ERROR);
16969 break;
16970 }
ea397f5b 16971 mnemonicendp = p;
381d071f
L
16972 *p = '\0';
16973
ea397f5b 16974skip:
381d071f
L
16975 if (modrm.mod == 3)
16976 {
16977 int add;
16978
16979 /* Skip mod/rm byte. */
16980 MODRM_CHECK;
16981 codep++;
16982
16983 USED_REX (REX_B);
16984 add = (rex & REX_B) ? 8 : 0;
16985 if (bytemode == b_mode)
16986 {
16987 USED_REX (0);
16988 if (rex)
16989 oappend (names8rex[modrm.rm + add]);
16990 else
16991 oappend (names8[modrm.rm + add]);
16992 }
16993 else
16994 {
16995 USED_REX (REX_W);
16996 if (rex & REX_W)
16997 oappend (names64[modrm.rm + add]);
16998 else if ((prefixes & PREFIX_DATA))
16999 oappend (names16[modrm.rm + add]);
17000 else
17001 oappend (names32[modrm.rm + add]);
17002 }
17003 }
17004 else
9344ff29 17005 OP_E (bytemode, sizeflag);
381d071f 17006}
85f10a01 17007
eacc9c89
L
17008static void
17009FXSAVE_Fixup (int bytemode, int sizeflag)
17010{
17011 /* Add proper suffix to "fxsave" and "fxrstor". */
17012 USED_REX (REX_W);
17013 if (rex & REX_W)
17014 {
17015 char *p = mnemonicendp;
17016 *p++ = '6';
17017 *p++ = '4';
17018 *p = '\0';
17019 mnemonicendp = p;
17020 }
17021 OP_M (bytemode, sizeflag);
17022}
17023
15c7c1d8
JB
17024static void
17025PCMPESTR_Fixup (int bytemode, int sizeflag)
17026{
17027 /* Add proper suffix to "{,v}pcmpestr{i,m}". */
17028 if (!intel_syntax)
17029 {
17030 char *p = mnemonicendp;
17031
17032 USED_REX (REX_W);
17033 if (rex & REX_W)
17034 *p++ = 'q';
17035 else if (sizeflag & SUFFIX_ALWAYS)
17036 *p++ = 'l';
17037
17038 *p = '\0';
17039 mnemonicendp = p;
17040 }
17041
17042 OP_EX (bytemode, sizeflag);
17043}
17044
c0f3af97
L
17045/* Display the destination register operand for instructions with
17046 VEX. */
17047
17048static void
17049OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17050{
539f890d 17051 int reg;
b9733481
L
17052 const char **names;
17053
c0f3af97
L
17054 if (!need_vex)
17055 abort ();
17056
17057 if (!need_vex_reg)
17058 return;
17059
539f890d 17060 reg = vex.register_specifier;
43234a1e
L
17061 if (vex.evex)
17062 {
17063 if (!vex.v)
17064 reg += 16;
17065 }
17066
539f890d
L
17067 if (bytemode == vex_scalar_mode)
17068 {
17069 oappend (names_xmm[reg]);
17070 return;
17071 }
17072
c0f3af97
L
17073 switch (vex.length)
17074 {
17075 case 128:
17076 switch (bytemode)
17077 {
17078 case vex_mode:
17079 case vex128_mode:
6c30d220 17080 case vex_vsib_q_w_dq_mode:
5fc35d96 17081 case vex_vsib_q_w_d_mode:
cb21baef
L
17082 names = names_xmm;
17083 break;
17084 case dq_mode:
17085 if (vex.w)
17086 names = names64;
17087 else
17088 names = names32;
c0f3af97 17089 break;
1ba585e8 17090 case mask_bd_mode:
43234a1e 17091 case mask_mode:
9889cbb1
L
17092 if (reg > 0x7)
17093 {
17094 oappend ("(bad)");
17095 return;
17096 }
43234a1e
L
17097 names = names_mask;
17098 break;
c0f3af97
L
17099 default:
17100 abort ();
17101 return;
17102 }
c0f3af97
L
17103 break;
17104 case 256:
17105 switch (bytemode)
17106 {
17107 case vex_mode:
17108 case vex256_mode:
6c30d220
L
17109 names = names_ymm;
17110 break;
17111 case vex_vsib_q_w_dq_mode:
5fc35d96 17112 case vex_vsib_q_w_d_mode:
6c30d220 17113 names = vex.w ? names_ymm : names_xmm;
c0f3af97 17114 break;
1ba585e8 17115 case mask_bd_mode:
43234a1e 17116 case mask_mode:
9889cbb1
L
17117 if (reg > 0x7)
17118 {
17119 oappend ("(bad)");
17120 return;
17121 }
43234a1e
L
17122 names = names_mask;
17123 break;
c0f3af97 17124 default:
a37a2806
NC
17125 /* See PR binutils/20893 for a reproducer. */
17126 oappend ("(bad)");
c0f3af97
L
17127 return;
17128 }
c0f3af97 17129 break;
43234a1e
L
17130 case 512:
17131 names = names_zmm;
17132 break;
c0f3af97
L
17133 default:
17134 abort ();
17135 break;
17136 }
539f890d 17137 oappend (names[reg]);
c0f3af97
L
17138}
17139
922d8de8
DR
17140/* Get the VEX immediate byte without moving codep. */
17141
17142static unsigned char
ccc5981b 17143get_vex_imm8 (int sizeflag, int opnum)
922d8de8
DR
17144{
17145 int bytes_before_imm = 0;
17146
922d8de8
DR
17147 if (modrm.mod != 3)
17148 {
17149 /* There are SIB/displacement bytes. */
17150 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
6c067bbb 17151 {
922d8de8 17152 /* 32/64 bit address mode */
6c067bbb 17153 int base = modrm.rm;
922d8de8
DR
17154
17155 /* Check SIB byte. */
6c067bbb
RM
17156 if (base == 4)
17157 {
17158 FETCH_DATA (the_info, codep + 1);
17159 base = *codep & 7;
17160 /* When decoding the third source, don't increase
17161 bytes_before_imm as this has already been incremented
17162 by one in OP_E_memory while decoding the second
17163 source operand. */
17164 if (opnum == 0)
17165 bytes_before_imm++;
17166 }
17167
17168 /* Don't increase bytes_before_imm when decoding the third source,
17169 it has already been incremented by OP_E_memory while decoding
17170 the second source operand. */
17171 if (opnum == 0)
17172 {
17173 switch (modrm.mod)
17174 {
17175 case 0:
17176 /* When modrm.rm == 5 or modrm.rm == 4 and base in
17177 SIB == 5, there is a 4 byte displacement. */
17178 if (base != 5)
17179 /* No displacement. */
17180 break;
1a0670f3 17181 /* Fall through. */
6c067bbb
RM
17182 case 2:
17183 /* 4 byte displacement. */
17184 bytes_before_imm += 4;
17185 break;
17186 case 1:
17187 /* 1 byte displacement. */
17188 bytes_before_imm++;
17189 break;
17190 }
17191 }
17192 }
922d8de8 17193 else
02e647f9
SP
17194 {
17195 /* 16 bit address mode */
6c067bbb
RM
17196 /* Don't increase bytes_before_imm when decoding the third source,
17197 it has already been incremented by OP_E_memory while decoding
17198 the second source operand. */
17199 if (opnum == 0)
17200 {
02e647f9
SP
17201 switch (modrm.mod)
17202 {
17203 case 0:
17204 /* When modrm.rm == 6, there is a 2 byte displacement. */
17205 if (modrm.rm != 6)
17206 /* No displacement. */
17207 break;
1a0670f3 17208 /* Fall through. */
02e647f9
SP
17209 case 2:
17210 /* 2 byte displacement. */
17211 bytes_before_imm += 2;
17212 break;
17213 case 1:
17214 /* 1 byte displacement: when decoding the third source,
17215 don't increase bytes_before_imm as this has already
17216 been incremented by one in OP_E_memory while decoding
17217 the second source operand. */
17218 if (opnum == 0)
17219 bytes_before_imm++;
ccc5981b 17220
02e647f9
SP
17221 break;
17222 }
922d8de8
DR
17223 }
17224 }
17225 }
17226
17227 FETCH_DATA (the_info, codep + bytes_before_imm + 1);
17228 return codep [bytes_before_imm];
17229}
17230
17231static void
17232OP_EX_VexReg (int bytemode, int sizeflag, int reg)
17233{
b9733481
L
17234 const char **names;
17235
922d8de8
DR
17236 if (reg == -1 && modrm.mod != 3)
17237 {
17238 OP_E_memory (bytemode, sizeflag);
17239 return;
17240 }
17241 else
17242 {
17243 if (reg == -1)
17244 {
17245 reg = modrm.rm;
17246 USED_REX (REX_B);
17247 if (rex & REX_B)
17248 reg += 8;
17249 }
17250 else if (reg > 7 && address_mode != mode_64bit)
17251 BadOp ();
17252 }
17253
17254 switch (vex.length)
17255 {
17256 case 128:
b9733481 17257 names = names_xmm;
922d8de8
DR
17258 break;
17259 case 256:
b9733481 17260 names = names_ymm;
922d8de8
DR
17261 break;
17262 default:
17263 abort ();
17264 }
b9733481 17265 oappend (names[reg]);
922d8de8
DR
17266}
17267
a683cc34
SP
17268static void
17269OP_EX_VexImmW (int bytemode, int sizeflag)
17270{
17271 int reg = -1;
17272 static unsigned char vex_imm8;
17273
17274 if (vex_w_done == 0)
17275 {
17276 vex_w_done = 1;
17277
17278 /* Skip mod/rm byte. */
17279 MODRM_CHECK;
17280 codep++;
17281
17282 vex_imm8 = get_vex_imm8 (sizeflag, 0);
17283
17284 if (vex.w)
17285 reg = vex_imm8 >> 4;
17286
17287 OP_EX_VexReg (bytemode, sizeflag, reg);
17288 }
17289 else if (vex_w_done == 1)
17290 {
17291 vex_w_done = 2;
17292
17293 if (!vex.w)
17294 reg = vex_imm8 >> 4;
17295
17296 OP_EX_VexReg (bytemode, sizeflag, reg);
17297 }
17298 else
17299 {
17300 /* Output the imm8 directly. */
17301 scratchbuf[0] = '$';
17302 print_operand_value (scratchbuf + 1, 1, vex_imm8 & 0xf);
9ce09ba2 17303 oappend_maybe_intel (scratchbuf);
a683cc34
SP
17304 scratchbuf[0] = '\0';
17305 codep++;
17306 }
17307}
17308
5dd85c99
SP
17309static void
17310OP_Vex_2src (int bytemode, int sizeflag)
17311{
17312 if (modrm.mod == 3)
17313 {
b9733481 17314 int reg = modrm.rm;
5dd85c99 17315 USED_REX (REX_B);
b9733481
L
17316 if (rex & REX_B)
17317 reg += 8;
17318 oappend (names_xmm[reg]);
5dd85c99
SP
17319 }
17320 else
17321 {
17322 if (intel_syntax
17323 && (bytemode == v_mode || bytemode == v_swap_mode))
17324 {
17325 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
17326 used_prefixes |= (prefixes & PREFIX_DATA);
17327 }
17328 OP_E (bytemode, sizeflag);
17329 }
17330}
17331
17332static void
17333OP_Vex_2src_1 (int bytemode, int sizeflag)
17334{
17335 if (modrm.mod == 3)
17336 {
17337 /* Skip mod/rm byte. */
17338 MODRM_CHECK;
17339 codep++;
17340 }
17341
17342 if (vex.w)
b9733481 17343 oappend (names_xmm[vex.register_specifier]);
5dd85c99
SP
17344 else
17345 OP_Vex_2src (bytemode, sizeflag);
17346}
17347
17348static void
17349OP_Vex_2src_2 (int bytemode, int sizeflag)
17350{
17351 if (vex.w)
17352 OP_Vex_2src (bytemode, sizeflag);
17353 else
b9733481 17354 oappend (names_xmm[vex.register_specifier]);
5dd85c99
SP
17355}
17356
922d8de8
DR
17357static void
17358OP_EX_VexW (int bytemode, int sizeflag)
17359{
17360 int reg = -1;
17361
17362 if (!vex_w_done)
17363 {
17364 vex_w_done = 1;
41effecb
SP
17365
17366 /* Skip mod/rm byte. */
17367 MODRM_CHECK;
17368 codep++;
17369
922d8de8 17370 if (vex.w)
ccc5981b 17371 reg = get_vex_imm8 (sizeflag, 0) >> 4;
922d8de8
DR
17372 }
17373 else
17374 {
17375 if (!vex.w)
ccc5981b 17376 reg = get_vex_imm8 (sizeflag, 1) >> 4;
922d8de8
DR
17377 }
17378
17379 OP_EX_VexReg (bytemode, sizeflag, reg);
17380}
17381
922d8de8
DR
17382static void
17383VEXI4_Fixup (int bytemode ATTRIBUTE_UNUSED,
17384 int sizeflag ATTRIBUTE_UNUSED)
17385{
17386 /* Skip the immediate byte and check for invalid bits. */
17387 FETCH_DATA (the_info, codep + 1);
17388 if (*codep++ & 0xf)
17389 BadOp ();
17390}
17391
c0f3af97
L
17392static void
17393OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17394{
17395 int reg;
b9733481
L
17396 const char **names;
17397
c0f3af97
L
17398 FETCH_DATA (the_info, codep + 1);
17399 reg = *codep++;
17400
17401 if (bytemode != x_mode)
17402 abort ();
17403
17404 if (reg & 0xf)
17405 BadOp ();
17406
17407 reg >>= 4;
dae39acc
L
17408 if (reg > 7 && address_mode != mode_64bit)
17409 BadOp ();
17410
c0f3af97
L
17411 switch (vex.length)
17412 {
17413 case 128:
b9733481 17414 names = names_xmm;
c0f3af97
L
17415 break;
17416 case 256:
b9733481 17417 names = names_ymm;
c0f3af97
L
17418 break;
17419 default:
17420 abort ();
17421 }
b9733481 17422 oappend (names[reg]);
c0f3af97
L
17423}
17424
922d8de8
DR
17425static void
17426OP_XMM_VexW (int bytemode, int sizeflag)
17427{
17428 /* Turn off the REX.W bit since it is used for swapping operands
17429 now. */
17430 rex &= ~REX_W;
17431 OP_XMM (bytemode, sizeflag);
17432}
17433
c0f3af97
L
17434static void
17435OP_EX_Vex (int bytemode, int sizeflag)
17436{
17437 if (modrm.mod != 3)
17438 {
17439 if (vex.register_specifier != 0)
17440 BadOp ();
17441 need_vex_reg = 0;
17442 }
17443 OP_EX (bytemode, sizeflag);
17444}
17445
17446static void
17447OP_XMM_Vex (int bytemode, int sizeflag)
17448{
17449 if (modrm.mod != 3)
17450 {
17451 if (vex.register_specifier != 0)
17452 BadOp ();
17453 need_vex_reg = 0;
17454 }
17455 OP_XMM (bytemode, sizeflag);
17456}
17457
17458static void
17459VZERO_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17460{
17461 switch (vex.length)
17462 {
17463 case 128:
ea397f5b 17464 mnemonicendp = stpcpy (obuf, "vzeroupper");
c0f3af97
L
17465 break;
17466 case 256:
ea397f5b 17467 mnemonicendp = stpcpy (obuf, "vzeroall");
c0f3af97
L
17468 break;
17469 default:
17470 abort ();
17471 }
17472}
17473
ea397f5b
L
17474static struct op vex_cmp_op[] =
17475{
17476 { STRING_COMMA_LEN ("eq") },
17477 { STRING_COMMA_LEN ("lt") },
17478 { STRING_COMMA_LEN ("le") },
17479 { STRING_COMMA_LEN ("unord") },
17480 { STRING_COMMA_LEN ("neq") },
17481 { STRING_COMMA_LEN ("nlt") },
17482 { STRING_COMMA_LEN ("nle") },
17483 { STRING_COMMA_LEN ("ord") },
17484 { STRING_COMMA_LEN ("eq_uq") },
17485 { STRING_COMMA_LEN ("nge") },
17486 { STRING_COMMA_LEN ("ngt") },
17487 { STRING_COMMA_LEN ("false") },
17488 { STRING_COMMA_LEN ("neq_oq") },
17489 { STRING_COMMA_LEN ("ge") },
17490 { STRING_COMMA_LEN ("gt") },
17491 { STRING_COMMA_LEN ("true") },
17492 { STRING_COMMA_LEN ("eq_os") },
17493 { STRING_COMMA_LEN ("lt_oq") },
17494 { STRING_COMMA_LEN ("le_oq") },
17495 { STRING_COMMA_LEN ("unord_s") },
17496 { STRING_COMMA_LEN ("neq_us") },
17497 { STRING_COMMA_LEN ("nlt_uq") },
17498 { STRING_COMMA_LEN ("nle_uq") },
17499 { STRING_COMMA_LEN ("ord_s") },
17500 { STRING_COMMA_LEN ("eq_us") },
17501 { STRING_COMMA_LEN ("nge_uq") },
17502 { STRING_COMMA_LEN ("ngt_uq") },
17503 { STRING_COMMA_LEN ("false_os") },
17504 { STRING_COMMA_LEN ("neq_os") },
17505 { STRING_COMMA_LEN ("ge_oq") },
17506 { STRING_COMMA_LEN ("gt_oq") },
17507 { STRING_COMMA_LEN ("true_us") },
c0f3af97
L
17508};
17509
17510static void
17511VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17512{
17513 unsigned int cmp_type;
17514
17515 FETCH_DATA (the_info, codep + 1);
17516 cmp_type = *codep++ & 0xff;
17517 if (cmp_type < ARRAY_SIZE (vex_cmp_op))
17518 {
17519 char suffix [3];
ea397f5b 17520 char *p = mnemonicendp - 2;
c0f3af97
L
17521 suffix[0] = p[0];
17522 suffix[1] = p[1];
17523 suffix[2] = '\0';
ea397f5b
L
17524 sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
17525 mnemonicendp += vex_cmp_op[cmp_type].len;
c0f3af97
L
17526 }
17527 else
17528 {
17529 /* We have a reserved extension byte. Output it directly. */
17530 scratchbuf[0] = '$';
17531 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 17532 oappend_maybe_intel (scratchbuf);
c0f3af97
L
17533 scratchbuf[0] = '\0';
17534 }
17535}
17536
43234a1e
L
17537static void
17538VPCMP_Fixup (int bytemode ATTRIBUTE_UNUSED,
17539 int sizeflag ATTRIBUTE_UNUSED)
17540{
17541 unsigned int cmp_type;
17542
17543 if (!vex.evex)
17544 abort ();
17545
17546 FETCH_DATA (the_info, codep + 1);
17547 cmp_type = *codep++ & 0xff;
17548 /* There are aliases for immediates 0, 1, 2, 4, 5, 6.
17549 If it's the case, print suffix, otherwise - print the immediate. */
17550 if (cmp_type < ARRAY_SIZE (simd_cmp_op)
17551 && cmp_type != 3
17552 && cmp_type != 7)
17553 {
17554 char suffix [3];
17555 char *p = mnemonicendp - 2;
17556
17557 /* vpcmp* can have both one- and two-lettered suffix. */
17558 if (p[0] == 'p')
17559 {
17560 p++;
17561 suffix[0] = p[0];
17562 suffix[1] = '\0';
17563 }
17564 else
17565 {
17566 suffix[0] = p[0];
17567 suffix[1] = p[1];
17568 suffix[2] = '\0';
17569 }
17570
17571 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
17572 mnemonicendp += simd_cmp_op[cmp_type].len;
17573 }
17574 else
17575 {
17576 /* We have a reserved extension byte. Output it directly. */
17577 scratchbuf[0] = '$';
17578 print_operand_value (scratchbuf + 1, 1, cmp_type);
9ce09ba2 17579 oappend_maybe_intel (scratchbuf);
43234a1e
L
17580 scratchbuf[0] = '\0';
17581 }
17582}
17583
ea397f5b
L
17584static const struct op pclmul_op[] =
17585{
17586 { STRING_COMMA_LEN ("lql") },
17587 { STRING_COMMA_LEN ("hql") },
17588 { STRING_COMMA_LEN ("lqh") },
17589 { STRING_COMMA_LEN ("hqh") }
c0f3af97
L
17590};
17591
17592static void
17593PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
17594 int sizeflag ATTRIBUTE_UNUSED)
17595{
17596 unsigned int pclmul_type;
17597
17598 FETCH_DATA (the_info, codep + 1);
17599 pclmul_type = *codep++ & 0xff;
17600 switch (pclmul_type)
17601 {
17602 case 0x10:
17603 pclmul_type = 2;
17604 break;
17605 case 0x11:
17606 pclmul_type = 3;
17607 break;
17608 default:
17609 break;
7bb15c6f 17610 }
c0f3af97
L
17611 if (pclmul_type < ARRAY_SIZE (pclmul_op))
17612 {
17613 char suffix [4];
ea397f5b 17614 char *p = mnemonicendp - 3;
c0f3af97
L
17615 suffix[0] = p[0];
17616 suffix[1] = p[1];
17617 suffix[2] = p[2];
17618 suffix[3] = '\0';
ea397f5b
L
17619 sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
17620 mnemonicendp += pclmul_op[pclmul_type].len;
c0f3af97
L
17621 }
17622 else
17623 {
17624 /* We have a reserved extension byte. Output it directly. */
17625 scratchbuf[0] = '$';
17626 print_operand_value (scratchbuf + 1, 1, pclmul_type);
9ce09ba2 17627 oappend_maybe_intel (scratchbuf);
c0f3af97
L
17628 scratchbuf[0] = '\0';
17629 }
17630}
17631
f1f8f695
L
17632static void
17633MOVBE_Fixup (int bytemode, int sizeflag)
17634{
17635 /* Add proper suffix to "movbe". */
ea397f5b 17636 char *p = mnemonicendp;
f1f8f695
L
17637
17638 switch (bytemode)
17639 {
17640 case v_mode:
17641 if (intel_syntax)
ea397f5b 17642 goto skip;
f1f8f695
L
17643
17644 USED_REX (REX_W);
17645 if (sizeflag & SUFFIX_ALWAYS)
17646 {
17647 if (rex & REX_W)
17648 *p++ = 'q';
f1f8f695 17649 else
f16cd0d5
L
17650 {
17651 if (sizeflag & DFLAG)
17652 *p++ = 'l';
17653 else
17654 *p++ = 'w';
17655 used_prefixes |= (prefixes & PREFIX_DATA);
17656 }
f1f8f695 17657 }
f1f8f695
L
17658 break;
17659 default:
17660 oappend (INTERNAL_DISASSEMBLER_ERROR);
17661 break;
17662 }
ea397f5b 17663 mnemonicendp = p;
f1f8f695
L
17664 *p = '\0';
17665
ea397f5b 17666skip:
f1f8f695
L
17667 OP_M (bytemode, sizeflag);
17668}
f88c9eb0
SP
17669
17670static void
17671OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17672{
17673 int reg;
17674 const char **names;
17675
17676 /* Skip mod/rm byte. */
17677 MODRM_CHECK;
17678 codep++;
17679
17680 if (vex.w)
17681 names = names64;
f88c9eb0 17682 else
ce7d077e 17683 names = names32;
f88c9eb0
SP
17684
17685 reg = modrm.rm;
17686 USED_REX (REX_B);
17687 if (rex & REX_B)
17688 reg += 8;
17689
17690 oappend (names[reg]);
17691}
17692
17693static void
17694OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17695{
17696 const char **names;
17697
17698 if (vex.w)
17699 names = names64;
f88c9eb0 17700 else
ce7d077e 17701 names = names32;
f88c9eb0
SP
17702
17703 oappend (names[vex.register_specifier]);
17704}
43234a1e
L
17705
17706static void
17707OP_Mask (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17708{
17709 if (!vex.evex
1ba585e8 17710 || (bytemode != mask_mode && bytemode != mask_bd_mode))
43234a1e
L
17711 abort ();
17712
17713 USED_REX (REX_R);
17714 if ((rex & REX_R) != 0 || !vex.r)
17715 {
17716 BadOp ();
17717 return;
17718 }
17719
17720 oappend (names_mask [modrm.reg]);
17721}
17722
17723static void
17724OP_Rounding (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17725{
17726 if (!vex.evex
17727 || (bytemode != evex_rounding_mode
17728 && bytemode != evex_sae_mode))
17729 abort ();
17730 if (modrm.mod == 3 && vex.b)
17731 switch (bytemode)
17732 {
17733 case evex_rounding_mode:
17734 oappend (names_rounding[vex.ll]);
17735 break;
17736 case evex_sae_mode:
17737 oappend ("{sae}");
17738 break;
17739 default:
17740 break;
17741 }
17742}
This page took 2.437817 seconds and 4 git commands to generate.