2011-03-16 Kai Tietz <ktietz@redhat.com>
[deliverable/binutils-gdb.git] / opcodes / i386-dis.c
CommitLineData
252b5132 1/* Print i386 instructions for GDB, the GNU debugger.
060d22b0 2 Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
42d5f9c6 3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
0af1713e 4 Free Software Foundation, Inc.
252b5132 5
9b201bb5 6 This file is part of the GNU opcodes library.
20f0a1fc 7
9b201bb5 8 This library is free software; you can redistribute it and/or modify
20f0a1fc 9 it under the terms of the GNU General Public License as published by
9b201bb5
NC
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
20f0a1fc 12
9b201bb5
NC
13 It is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
20f0a1fc
NC
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
9b201bb5
NC
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
22
20f0a1fc
NC
23
24/* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
25 July 1988
26 modified by John Hassey (hassey@dg-rtp.dg.com)
27 x86-64 support added by Jan Hubicka (jh@suse.cz)
28 VIA PadLock support by Michal Ludvig (mludvig@suse.cz). */
29
30/* The main tables describing the instructions is essentially a copy
31 of the "Opcode Map" chapter (Appendix A) of the Intel 80386
32 Programmers Manual. Usually, there is a capital letter, followed
33 by a small letter. The capital letter tell the addressing mode,
34 and the small letter tells about the operand size. Refer to
35 the Intel manual for details. */
252b5132 36
252b5132 37#include "sysdep.h"
dabbade6 38#include "dis-asm.h"
252b5132 39#include "opintl.h"
0b1cf022 40#include "opcode/i386.h"
85f10a01 41#include "libiberty.h"
252b5132
RH
42
43#include <setjmp.h>
44
26ca5450
AJ
45static int print_insn (bfd_vma, disassemble_info *);
46static void dofloat (int);
47static void OP_ST (int, int);
48static void OP_STi (int, int);
49static int putop (const char *, int);
50static void oappend (const char *);
51static void append_seg (void);
52static void OP_indirE (int, int);
53static void print_operand_value (char *, int, bfd_vma);
c0f3af97 54static void OP_E_register (int, int);
c1e679ec 55static void OP_E_memory (int, int);
5d669648 56static void print_displacement (char *, bfd_vma);
26ca5450
AJ
57static void OP_E (int, int);
58static void OP_G (int, int);
59static bfd_vma get64 (void);
60static bfd_signed_vma get32 (void);
61static bfd_signed_vma get32s (void);
62static int get16 (void);
63static void set_op (bfd_vma, int);
b844680a 64static void OP_Skip_MODRM (int, int);
26ca5450
AJ
65static void OP_REG (int, int);
66static void OP_IMREG (int, int);
67static void OP_I (int, int);
68static void OP_I64 (int, int);
69static void OP_sI (int, int);
70static void OP_J (int, int);
71static void OP_SEG (int, int);
72static void OP_DIR (int, int);
73static void OP_OFF (int, int);
74static void OP_OFF64 (int, int);
75static void ptr_reg (int, int);
76static void OP_ESreg (int, int);
77static void OP_DSreg (int, int);
78static void OP_C (int, int);
79static void OP_D (int, int);
80static void OP_T (int, int);
6f74c397 81static void OP_R (int, int);
26ca5450
AJ
82static void OP_MMX (int, int);
83static void OP_XMM (int, int);
84static void OP_EM (int, int);
85static void OP_EX (int, int);
4d9567e0
MM
86static void OP_EMC (int,int);
87static void OP_MXC (int,int);
26ca5450
AJ
88static void OP_MS (int, int);
89static void OP_XS (int, int);
cc0ec051 90static void OP_M (int, int);
c0f3af97
L
91static void OP_VEX (int, int);
92static void OP_EX_Vex (int, int);
922d8de8 93static void OP_EX_VexW (int, int);
a683cc34 94static void OP_EX_VexImmW (int, int);
c0f3af97 95static void OP_XMM_Vex (int, int);
922d8de8 96static void OP_XMM_VexW (int, int);
c0f3af97
L
97static void OP_REG_VexI4 (int, int);
98static void PCLMUL_Fixup (int, int);
922d8de8 99static void VEXI4_Fixup (int, int);
c0f3af97
L
100static void VZERO_Fixup (int, int);
101static void VCMP_Fixup (int, int);
cc0ec051 102static void OP_0f07 (int, int);
b844680a
L
103static void OP_Monitor (int, int);
104static void OP_Mwait (int, int);
46e883c5
L
105static void NOP_Fixup1 (int, int);
106static void NOP_Fixup2 (int, int);
26ca5450 107static void OP_3DNowSuffix (int, int);
ad19981d 108static void CMP_Fixup (int, int);
26ca5450 109static void BadOp (void);
35c52694 110static void REP_Fixup (int, int);
f5804c90 111static void CMPXCHG8B_Fixup (int, int);
42903f7f 112static void XMM_Fixup (int, int);
381d071f 113static void CRC32_Fixup (int, int);
eacc9c89 114static void FXSAVE_Fixup (int, int);
f88c9eb0
SP
115static void OP_LWPCB_E (int, int);
116static void OP_LWP_E (int, int);
5dd85c99
SP
117static void OP_Vex_2src_1 (int, int);
118static void OP_Vex_2src_2 (int, int);
c1e679ec 119
f1f8f695 120static void MOVBE_Fixup (int, int);
252b5132 121
6608db57 122struct dis_private {
252b5132
RH
123 /* Points to first byte not fetched. */
124 bfd_byte *max_fetched;
0b1cf022 125 bfd_byte the_buffer[MAX_MNEM_SIZE];
252b5132 126 bfd_vma insn_start;
e396998b 127 int orig_sizeflag;
252b5132
RH
128 jmp_buf bailout;
129};
130
cb712a9e
L
131enum address_mode
132{
133 mode_16bit,
134 mode_32bit,
135 mode_64bit
136};
137
138enum address_mode address_mode;
52b15da3 139
5076851f
ILT
140/* Flags for the prefixes for the current instruction. See below. */
141static int prefixes;
142
52b15da3
JH
143/* REX prefix the current instruction. See below. */
144static int rex;
145/* Bits of REX we've already used. */
146static int rex_used;
d869730d 147/* REX bits in original REX prefix ignored. */
c0f3af97 148static int rex_ignored;
52b15da3
JH
149/* Mark parts used in the REX prefix. When we are testing for
150 empty prefix (for 8bit register REX extension), just mask it
151 out. Otherwise test for REX bit is excuse for existence of REX
152 only in case value is nonzero. */
153#define USED_REX(value) \
154 { \
155 if (value) \
161a04f6
L
156 { \
157 if ((rex & value)) \
158 rex_used |= (value) | REX_OPCODE; \
159 } \
52b15da3 160 else \
161a04f6 161 rex_used |= REX_OPCODE; \
52b15da3
JH
162 }
163
7d421014
ILT
164/* Flags for prefixes which we somehow handled when printing the
165 current instruction. */
166static int used_prefixes;
167
5076851f
ILT
168/* Flags stored in PREFIXES. */
169#define PREFIX_REPZ 1
170#define PREFIX_REPNZ 2
171#define PREFIX_LOCK 4
172#define PREFIX_CS 8
173#define PREFIX_SS 0x10
174#define PREFIX_DS 0x20
175#define PREFIX_ES 0x40
176#define PREFIX_FS 0x80
177#define PREFIX_GS 0x100
178#define PREFIX_DATA 0x200
179#define PREFIX_ADDR 0x400
180#define PREFIX_FWAIT 0x800
181
252b5132
RH
182/* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
183 to ADDR (exclusive) are valid. Returns 1 for success, longjmps
184 on error. */
185#define FETCH_DATA(info, addr) \
6608db57 186 ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
252b5132
RH
187 ? 1 : fetch_data ((info), (addr)))
188
189static int
26ca5450 190fetch_data (struct disassemble_info *info, bfd_byte *addr)
252b5132
RH
191{
192 int status;
6608db57 193 struct dis_private *priv = (struct dis_private *) info->private_data;
252b5132
RH
194 bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
195
0b1cf022 196 if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
272c9217
JB
197 status = (*info->read_memory_func) (start,
198 priv->max_fetched,
199 addr - priv->max_fetched,
200 info);
201 else
202 status = -1;
252b5132
RH
203 if (status != 0)
204 {
7d421014 205 /* If we did manage to read at least one byte, then
db6eb5be
AM
206 print_insn_i386 will do something sensible. Otherwise, print
207 an error. We do that here because this is where we know
208 STATUS. */
7d421014 209 if (priv->max_fetched == priv->the_buffer)
5076851f 210 (*info->memory_error_func) (status, start, info);
252b5132
RH
211 longjmp (priv->bailout, 1);
212 }
213 else
214 priv->max_fetched = addr;
215 return 1;
216}
217
ce518a5f 218#define XX { NULL, 0 }
592d1631 219#define Bad_Opcode NULL, { { NULL, 0 } }
ce518a5f
L
220
221#define Eb { OP_E, b_mode }
b6169b20 222#define EbS { OP_E, b_swap_mode }
ce518a5f 223#define Ev { OP_E, v_mode }
b6169b20 224#define EvS { OP_E, v_swap_mode }
ce518a5f
L
225#define Ed { OP_E, d_mode }
226#define Edq { OP_E, dq_mode }
227#define Edqw { OP_E, dqw_mode }
42903f7f
L
228#define Edqb { OP_E, dqb_mode }
229#define Edqd { OP_E, dqd_mode }
09335d05 230#define Eq { OP_E, q_mode }
ce518a5f
L
231#define indirEv { OP_indirE, stack_v_mode }
232#define indirEp { OP_indirE, f_mode }
233#define stackEv { OP_E, stack_v_mode }
234#define Em { OP_E, m_mode }
235#define Ew { OP_E, w_mode }
236#define M { OP_M, 0 } /* lea, lgdt, etc. */
34b772a6 237#define Ma { OP_M, a_mode }
b844680a 238#define Mb { OP_M, b_mode }
d9a5e5e5 239#define Md { OP_M, d_mode }
f1f8f695 240#define Mo { OP_M, o_mode }
ce518a5f
L
241#define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
242#define Mq { OP_M, q_mode }
4ee52178 243#define Mx { OP_M, x_mode }
c0f3af97 244#define Mxmm { OP_M, xmm_mode }
ce518a5f
L
245#define Gb { OP_G, b_mode }
246#define Gv { OP_G, v_mode }
247#define Gd { OP_G, d_mode }
248#define Gdq { OP_G, dq_mode }
249#define Gm { OP_G, m_mode }
250#define Gw { OP_G, w_mode }
6f74c397
L
251#define Rd { OP_R, d_mode }
252#define Rm { OP_R, m_mode }
ce518a5f
L
253#define Ib { OP_I, b_mode }
254#define sIb { OP_sI, b_mode } /* sign extened byte */
e3949f17 255#define sIbT { OP_sI, b_T_mode } /* sign extened byte like 'T' */
ce518a5f 256#define Iv { OP_I, v_mode }
d9e3625e 257#define sIv { OP_sI, v_mode }
ce518a5f
L
258#define Iq { OP_I, q_mode }
259#define Iv64 { OP_I64, v_mode }
260#define Iw { OP_I, w_mode }
261#define I1 { OP_I, const_1_mode }
262#define Jb { OP_J, b_mode }
263#define Jv { OP_J, v_mode }
264#define Cm { OP_C, m_mode }
265#define Dm { OP_D, m_mode }
266#define Td { OP_T, d_mode }
b844680a 267#define Skip_MODRM { OP_Skip_MODRM, 0 }
ce518a5f
L
268
269#define RMeAX { OP_REG, eAX_reg }
270#define RMeBX { OP_REG, eBX_reg }
271#define RMeCX { OP_REG, eCX_reg }
272#define RMeDX { OP_REG, eDX_reg }
273#define RMeSP { OP_REG, eSP_reg }
274#define RMeBP { OP_REG, eBP_reg }
275#define RMeSI { OP_REG, eSI_reg }
276#define RMeDI { OP_REG, eDI_reg }
277#define RMrAX { OP_REG, rAX_reg }
278#define RMrBX { OP_REG, rBX_reg }
279#define RMrCX { OP_REG, rCX_reg }
280#define RMrDX { OP_REG, rDX_reg }
281#define RMrSP { OP_REG, rSP_reg }
282#define RMrBP { OP_REG, rBP_reg }
283#define RMrSI { OP_REG, rSI_reg }
284#define RMrDI { OP_REG, rDI_reg }
285#define RMAL { OP_REG, al_reg }
ce518a5f
L
286#define RMCL { OP_REG, cl_reg }
287#define RMDL { OP_REG, dl_reg }
288#define RMBL { OP_REG, bl_reg }
289#define RMAH { OP_REG, ah_reg }
290#define RMCH { OP_REG, ch_reg }
291#define RMDH { OP_REG, dh_reg }
292#define RMBH { OP_REG, bh_reg }
293#define RMAX { OP_REG, ax_reg }
294#define RMDX { OP_REG, dx_reg }
295
296#define eAX { OP_IMREG, eAX_reg }
297#define eBX { OP_IMREG, eBX_reg }
298#define eCX { OP_IMREG, eCX_reg }
299#define eDX { OP_IMREG, eDX_reg }
300#define eSP { OP_IMREG, eSP_reg }
301#define eBP { OP_IMREG, eBP_reg }
302#define eSI { OP_IMREG, eSI_reg }
303#define eDI { OP_IMREG, eDI_reg }
304#define AL { OP_IMREG, al_reg }
305#define CL { OP_IMREG, cl_reg }
306#define DL { OP_IMREG, dl_reg }
307#define BL { OP_IMREG, bl_reg }
308#define AH { OP_IMREG, ah_reg }
309#define CH { OP_IMREG, ch_reg }
310#define DH { OP_IMREG, dh_reg }
311#define BH { OP_IMREG, bh_reg }
312#define AX { OP_IMREG, ax_reg }
313#define DX { OP_IMREG, dx_reg }
314#define zAX { OP_IMREG, z_mode_ax_reg }
315#define indirDX { OP_IMREG, indir_dx_reg }
316
317#define Sw { OP_SEG, w_mode }
318#define Sv { OP_SEG, v_mode }
319#define Ap { OP_DIR, 0 }
320#define Ob { OP_OFF64, b_mode }
321#define Ov { OP_OFF64, v_mode }
322#define Xb { OP_DSreg, eSI_reg }
323#define Xv { OP_DSreg, eSI_reg }
324#define Xz { OP_DSreg, eSI_reg }
325#define Yb { OP_ESreg, eDI_reg }
326#define Yv { OP_ESreg, eDI_reg }
327#define DSBX { OP_DSreg, eBX_reg }
328
329#define es { OP_REG, es_reg }
330#define ss { OP_REG, ss_reg }
331#define cs { OP_REG, cs_reg }
332#define ds { OP_REG, ds_reg }
333#define fs { OP_REG, fs_reg }
334#define gs { OP_REG, gs_reg }
335
336#define MX { OP_MMX, 0 }
337#define XM { OP_XMM, 0 }
539f890d 338#define XMScalar { OP_XMM, scalar_mode }
c0f3af97 339#define XMM { OP_XMM, xmm_mode }
ce518a5f 340#define EM { OP_EM, v_mode }
b6169b20 341#define EMS { OP_EM, v_swap_mode }
09a2c6cf 342#define EMd { OP_EM, d_mode }
14051056 343#define EMx { OP_EM, x_mode }
8976381e 344#define EXw { OP_EX, w_mode }
09a2c6cf 345#define EXd { OP_EX, d_mode }
539f890d 346#define EXdScalar { OP_EX, d_scalar_mode }
fa99fab2 347#define EXdS { OP_EX, d_swap_mode }
09a2c6cf 348#define EXq { OP_EX, q_mode }
539f890d
L
349#define EXqScalar { OP_EX, q_scalar_mode }
350#define EXqScalarS { OP_EX, q_scalar_swap_mode }
b6169b20 351#define EXqS { OP_EX, q_swap_mode }
09a2c6cf 352#define EXx { OP_EX, x_mode }
b6169b20 353#define EXxS { OP_EX, x_swap_mode }
c0f3af97
L
354#define EXxmm { OP_EX, xmm_mode }
355#define EXxmmq { OP_EX, xmmq_mode }
356#define EXymmq { OP_EX, ymmq_mode }
0bfee649 357#define EXVexWdq { OP_EX, vex_w_dq_mode }
1c480963 358#define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
ce518a5f
L
359#define MS { OP_MS, v_mode }
360#define XS { OP_XS, v_mode }
09335d05 361#define EMCq { OP_EMC, q_mode }
ce518a5f 362#define MXC { OP_MXC, 0 }
ce518a5f 363#define OPSUF { OP_3DNowSuffix, 0 }
ad19981d 364#define CMP { CMP_Fixup, 0 }
42903f7f 365#define XMM0 { XMM_Fixup, 0 }
eacc9c89 366#define FXSAVE { FXSAVE_Fixup, 0 }
5dd85c99
SP
367#define Vex_2src_1 { OP_Vex_2src_1, 0 }
368#define Vex_2src_2 { OP_Vex_2src_2, 0 }
252b5132 369
c0f3af97 370#define Vex { OP_VEX, vex_mode }
539f890d 371#define VexScalar { OP_VEX, vex_scalar_mode }
c0f3af97
L
372#define Vex128 { OP_VEX, vex128_mode }
373#define Vex256 { OP_VEX, vex256_mode }
cb21baef 374#define VexGdq { OP_VEX, dq_mode }
922d8de8 375#define VexI4 { VEXI4_Fixup, 0}
c0f3af97 376#define EXdVex { OP_EX_Vex, d_mode }
fa99fab2 377#define EXdVexS { OP_EX_Vex, d_swap_mode }
539f890d 378#define EXdVexScalarS { OP_EX_Vex, d_scalar_swap_mode }
c0f3af97 379#define EXqVex { OP_EX_Vex, q_mode }
fa99fab2 380#define EXqVexS { OP_EX_Vex, q_swap_mode }
539f890d 381#define EXqVexScalarS { OP_EX_Vex, q_scalar_swap_mode }
922d8de8
DR
382#define EXVexW { OP_EX_VexW, x_mode }
383#define EXdVexW { OP_EX_VexW, d_mode }
384#define EXqVexW { OP_EX_VexW, q_mode }
a683cc34 385#define EXVexImmW { OP_EX_VexImmW, x_mode }
c0f3af97 386#define XMVex { OP_XMM_Vex, 0 }
539f890d 387#define XMVexScalar { OP_XMM_Vex, scalar_mode }
922d8de8 388#define XMVexW { OP_XMM_VexW, 0 }
c0f3af97
L
389#define XMVexI4 { OP_REG_VexI4, x_mode }
390#define PCLMUL { PCLMUL_Fixup, 0 }
391#define VZERO { VZERO_Fixup, 0 }
392#define VCMP { VCMP_Fixup, 0 }
c0f3af97 393
35c52694 394/* Used handle "rep" prefix for string instructions. */
ce518a5f
L
395#define Xbr { REP_Fixup, eSI_reg }
396#define Xvr { REP_Fixup, eSI_reg }
397#define Ybr { REP_Fixup, eDI_reg }
398#define Yvr { REP_Fixup, eDI_reg }
399#define Yzr { REP_Fixup, eDI_reg }
400#define indirDXr { REP_Fixup, indir_dx_reg }
401#define ALr { REP_Fixup, al_reg }
402#define eAXr { REP_Fixup, eAX_reg }
403
404#define cond_jump_flag { NULL, cond_jump_mode }
405#define loop_jcxz_flag { NULL, loop_jcxz_mode }
3ffd33cf 406
252b5132 407/* bits in sizeflag */
252b5132 408#define SUFFIX_ALWAYS 4
252b5132
RH
409#define AFLAG 2
410#define DFLAG 1
411
51e7da1b
L
412enum
413{
414 /* byte operand */
415 b_mode = 1,
416 /* byte operand with operand swapped */
3873ba12 417 b_swap_mode,
e3949f17
L
418 /* byte operand, sign extend like 'T' suffix */
419 b_T_mode,
51e7da1b 420 /* operand size depends on prefixes */
3873ba12 421 v_mode,
51e7da1b 422 /* operand size depends on prefixes with operand swapped */
3873ba12 423 v_swap_mode,
51e7da1b 424 /* word operand */
3873ba12 425 w_mode,
51e7da1b 426 /* double word operand */
3873ba12 427 d_mode,
51e7da1b 428 /* double word operand with operand swapped */
3873ba12 429 d_swap_mode,
51e7da1b 430 /* quad word operand */
3873ba12 431 q_mode,
51e7da1b 432 /* quad word operand with operand swapped */
3873ba12 433 q_swap_mode,
51e7da1b 434 /* ten-byte operand */
3873ba12 435 t_mode,
51e7da1b 436 /* 16-byte XMM or 32-byte YMM operand */
3873ba12 437 x_mode,
51e7da1b 438 /* 16-byte XMM or 32-byte YMM operand with operand swapped */
3873ba12 439 x_swap_mode,
51e7da1b 440 /* 16-byte XMM operand */
3873ba12 441 xmm_mode,
51e7da1b 442 /* 16-byte XMM or quad word operand */
3873ba12 443 xmmq_mode,
51e7da1b 444 /* 32-byte YMM or quad word operand */
3873ba12 445 ymmq_mode,
51e7da1b 446 /* d_mode in 32bit, q_mode in 64bit mode. */
3873ba12 447 m_mode,
51e7da1b 448 /* pair of v_mode operands */
3873ba12
L
449 a_mode,
450 cond_jump_mode,
451 loop_jcxz_mode,
51e7da1b 452 /* operand size depends on REX prefixes. */
3873ba12 453 dq_mode,
51e7da1b 454 /* registers like dq_mode, memory like w_mode. */
3873ba12 455 dqw_mode,
51e7da1b 456 /* 4- or 6-byte pointer operand */
3873ba12
L
457 f_mode,
458 const_1_mode,
51e7da1b 459 /* v_mode for stack-related opcodes. */
3873ba12 460 stack_v_mode,
51e7da1b 461 /* non-quad operand size depends on prefixes */
3873ba12 462 z_mode,
51e7da1b 463 /* 16-byte operand */
3873ba12 464 o_mode,
51e7da1b 465 /* registers like dq_mode, memory like b_mode. */
3873ba12 466 dqb_mode,
51e7da1b 467 /* registers like dq_mode, memory like d_mode. */
3873ba12 468 dqd_mode,
51e7da1b 469 /* normal vex mode */
3873ba12 470 vex_mode,
51e7da1b 471 /* 128bit vex mode */
3873ba12 472 vex128_mode,
51e7da1b 473 /* 256bit vex mode */
3873ba12 474 vex256_mode,
51e7da1b 475 /* operand size depends on the VEX.W bit. */
3873ba12 476 vex_w_dq_mode,
d55ee72f 477
539f890d
L
478 /* scalar, ignore vector length. */
479 scalar_mode,
480 /* like d_mode, ignore vector length. */
481 d_scalar_mode,
482 /* like d_swap_mode, ignore vector length. */
483 d_scalar_swap_mode,
484 /* like q_mode, ignore vector length. */
485 q_scalar_mode,
486 /* like q_swap_mode, ignore vector length. */
487 q_scalar_swap_mode,
488 /* like vex_mode, ignore vector length. */
489 vex_scalar_mode,
1c480963
L
490 /* like vex_w_dq_mode, ignore vector length. */
491 vex_scalar_w_dq_mode,
539f890d 492
3873ba12
L
493 es_reg,
494 cs_reg,
495 ss_reg,
496 ds_reg,
497 fs_reg,
498 gs_reg,
d55ee72f 499
3873ba12
L
500 eAX_reg,
501 eCX_reg,
502 eDX_reg,
503 eBX_reg,
504 eSP_reg,
505 eBP_reg,
506 eSI_reg,
507 eDI_reg,
d55ee72f 508
3873ba12
L
509 al_reg,
510 cl_reg,
511 dl_reg,
512 bl_reg,
513 ah_reg,
514 ch_reg,
515 dh_reg,
516 bh_reg,
d55ee72f 517
3873ba12
L
518 ax_reg,
519 cx_reg,
520 dx_reg,
521 bx_reg,
522 sp_reg,
523 bp_reg,
524 si_reg,
525 di_reg,
d55ee72f 526
3873ba12
L
527 rAX_reg,
528 rCX_reg,
529 rDX_reg,
530 rBX_reg,
531 rSP_reg,
532 rBP_reg,
533 rSI_reg,
534 rDI_reg,
d55ee72f 535
3873ba12
L
536 z_mode_ax_reg,
537 indir_dx_reg
51e7da1b 538};
252b5132 539
51e7da1b
L
540enum
541{
542 FLOATCODE = 1,
3873ba12
L
543 USE_REG_TABLE,
544 USE_MOD_TABLE,
545 USE_RM_TABLE,
546 USE_PREFIX_TABLE,
547 USE_X86_64_TABLE,
548 USE_3BYTE_TABLE,
f88c9eb0 549 USE_XOP_8F_TABLE,
3873ba12
L
550 USE_VEX_C4_TABLE,
551 USE_VEX_C5_TABLE,
9e30b8e0
L
552 USE_VEX_LEN_TABLE,
553 USE_VEX_W_TABLE
51e7da1b 554};
6439fc28 555
1ceb70f8 556#define FLOAT NULL, { { NULL, FLOATCODE } }
4efba78c 557
4e7d34a6 558#define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }
1ceb70f8
L
559#define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
560#define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
561#define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
562#define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
4e7d34a6
L
563#define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
564#define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
f88c9eb0 565#define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
c0f3af97
L
566#define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
567#define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
568#define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
9e30b8e0 569#define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
1ceb70f8 570
51e7da1b
L
571enum
572{
573 REG_80 = 0,
3873ba12
L
574 REG_81,
575 REG_82,
576 REG_8F,
577 REG_C0,
578 REG_C1,
579 REG_C6,
580 REG_C7,
581 REG_D0,
582 REG_D1,
583 REG_D2,
584 REG_D3,
585 REG_F6,
586 REG_F7,
587 REG_FE,
588 REG_FF,
589 REG_0F00,
590 REG_0F01,
591 REG_0F0D,
592 REG_0F18,
593 REG_0F71,
594 REG_0F72,
595 REG_0F73,
596 REG_0FA6,
597 REG_0FA7,
598 REG_0FAE,
599 REG_0FBA,
600 REG_0FC7,
592a252b
L
601 REG_VEX_0F71,
602 REG_VEX_0F72,
603 REG_VEX_0F73,
604 REG_VEX_0FAE,
f12dc422 605 REG_VEX_0F38F3,
f88c9eb0 606 REG_XOP_LWPCB,
2a2a0f38
QN
607 REG_XOP_LWP,
608 REG_XOP_TBM_01,
609 REG_XOP_TBM_02
51e7da1b 610};
1ceb70f8 611
51e7da1b
L
612enum
613{
614 MOD_8D = 0,
3873ba12
L
615 MOD_0F01_REG_0,
616 MOD_0F01_REG_1,
617 MOD_0F01_REG_2,
618 MOD_0F01_REG_3,
619 MOD_0F01_REG_7,
620 MOD_0F12_PREFIX_0,
621 MOD_0F13,
622 MOD_0F16_PREFIX_0,
623 MOD_0F17,
624 MOD_0F18_REG_0,
625 MOD_0F18_REG_1,
626 MOD_0F18_REG_2,
627 MOD_0F18_REG_3,
628 MOD_0F20,
629 MOD_0F21,
630 MOD_0F22,
631 MOD_0F23,
632 MOD_0F24,
633 MOD_0F26,
634 MOD_0F2B_PREFIX_0,
635 MOD_0F2B_PREFIX_1,
636 MOD_0F2B_PREFIX_2,
637 MOD_0F2B_PREFIX_3,
638 MOD_0F51,
639 MOD_0F71_REG_2,
640 MOD_0F71_REG_4,
641 MOD_0F71_REG_6,
642 MOD_0F72_REG_2,
643 MOD_0F72_REG_4,
644 MOD_0F72_REG_6,
645 MOD_0F73_REG_2,
646 MOD_0F73_REG_3,
647 MOD_0F73_REG_6,
648 MOD_0F73_REG_7,
649 MOD_0FAE_REG_0,
650 MOD_0FAE_REG_1,
651 MOD_0FAE_REG_2,
652 MOD_0FAE_REG_3,
653 MOD_0FAE_REG_4,
654 MOD_0FAE_REG_5,
655 MOD_0FAE_REG_6,
656 MOD_0FAE_REG_7,
657 MOD_0FB2,
658 MOD_0FB4,
659 MOD_0FB5,
660 MOD_0FC7_REG_6,
661 MOD_0FC7_REG_7,
662 MOD_0FD7,
663 MOD_0FE7_PREFIX_2,
664 MOD_0FF0_PREFIX_3,
665 MOD_0F382A_PREFIX_2,
666 MOD_62_32BIT,
667 MOD_C4_32BIT,
668 MOD_C5_32BIT,
592a252b
L
669 MOD_VEX_0F12_PREFIX_0,
670 MOD_VEX_0F13,
671 MOD_VEX_0F16_PREFIX_0,
672 MOD_VEX_0F17,
673 MOD_VEX_0F2B,
674 MOD_VEX_0F50,
675 MOD_VEX_0F71_REG_2,
676 MOD_VEX_0F71_REG_4,
677 MOD_VEX_0F71_REG_6,
678 MOD_VEX_0F72_REG_2,
679 MOD_VEX_0F72_REG_4,
680 MOD_VEX_0F72_REG_6,
681 MOD_VEX_0F73_REG_2,
682 MOD_VEX_0F73_REG_3,
683 MOD_VEX_0F73_REG_6,
684 MOD_VEX_0F73_REG_7,
685 MOD_VEX_0FAE_REG_2,
686 MOD_VEX_0FAE_REG_3,
687 MOD_VEX_0FD7_PREFIX_2,
688 MOD_VEX_0FE7_PREFIX_2,
689 MOD_VEX_0FF0_PREFIX_3,
690 MOD_VEX_0F3818_PREFIX_2,
691 MOD_VEX_0F3819_PREFIX_2,
692 MOD_VEX_0F381A_PREFIX_2,
693 MOD_VEX_0F382A_PREFIX_2,
694 MOD_VEX_0F382C_PREFIX_2,
695 MOD_VEX_0F382D_PREFIX_2,
696 MOD_VEX_0F382E_PREFIX_2,
697 MOD_VEX_0F382F_PREFIX_2
51e7da1b 698};
1ceb70f8 699
51e7da1b
L
700enum
701{
702 RM_0F01_REG_0 = 0,
3873ba12
L
703 RM_0F01_REG_1,
704 RM_0F01_REG_2,
705 RM_0F01_REG_3,
706 RM_0F01_REG_7,
707 RM_0FAE_REG_5,
708 RM_0FAE_REG_6,
709 RM_0FAE_REG_7
51e7da1b 710};
1ceb70f8 711
51e7da1b
L
712enum
713{
714 PREFIX_90 = 0,
3873ba12
L
715 PREFIX_0F10,
716 PREFIX_0F11,
717 PREFIX_0F12,
718 PREFIX_0F16,
719 PREFIX_0F2A,
720 PREFIX_0F2B,
721 PREFIX_0F2C,
722 PREFIX_0F2D,
723 PREFIX_0F2E,
724 PREFIX_0F2F,
725 PREFIX_0F51,
726 PREFIX_0F52,
727 PREFIX_0F53,
728 PREFIX_0F58,
729 PREFIX_0F59,
730 PREFIX_0F5A,
731 PREFIX_0F5B,
732 PREFIX_0F5C,
733 PREFIX_0F5D,
734 PREFIX_0F5E,
735 PREFIX_0F5F,
736 PREFIX_0F60,
737 PREFIX_0F61,
738 PREFIX_0F62,
739 PREFIX_0F6C,
740 PREFIX_0F6D,
741 PREFIX_0F6F,
742 PREFIX_0F70,
743 PREFIX_0F73_REG_3,
744 PREFIX_0F73_REG_7,
745 PREFIX_0F78,
746 PREFIX_0F79,
747 PREFIX_0F7C,
748 PREFIX_0F7D,
749 PREFIX_0F7E,
750 PREFIX_0F7F,
c7b8aa3a
L
751 PREFIX_0FAE_REG_0,
752 PREFIX_0FAE_REG_1,
753 PREFIX_0FAE_REG_2,
754 PREFIX_0FAE_REG_3,
3873ba12 755 PREFIX_0FB8,
f12dc422 756 PREFIX_0FBC,
3873ba12
L
757 PREFIX_0FBD,
758 PREFIX_0FC2,
759 PREFIX_0FC3,
760 PREFIX_0FC7_REG_6,
761 PREFIX_0FD0,
762 PREFIX_0FD6,
763 PREFIX_0FE6,
764 PREFIX_0FE7,
765 PREFIX_0FF0,
766 PREFIX_0FF7,
767 PREFIX_0F3810,
768 PREFIX_0F3814,
769 PREFIX_0F3815,
770 PREFIX_0F3817,
771 PREFIX_0F3820,
772 PREFIX_0F3821,
773 PREFIX_0F3822,
774 PREFIX_0F3823,
775 PREFIX_0F3824,
776 PREFIX_0F3825,
777 PREFIX_0F3828,
778 PREFIX_0F3829,
779 PREFIX_0F382A,
780 PREFIX_0F382B,
781 PREFIX_0F3830,
782 PREFIX_0F3831,
783 PREFIX_0F3832,
784 PREFIX_0F3833,
785 PREFIX_0F3834,
786 PREFIX_0F3835,
787 PREFIX_0F3837,
788 PREFIX_0F3838,
789 PREFIX_0F3839,
790 PREFIX_0F383A,
791 PREFIX_0F383B,
792 PREFIX_0F383C,
793 PREFIX_0F383D,
794 PREFIX_0F383E,
795 PREFIX_0F383F,
796 PREFIX_0F3840,
797 PREFIX_0F3841,
798 PREFIX_0F3880,
799 PREFIX_0F3881,
800 PREFIX_0F38DB,
801 PREFIX_0F38DC,
802 PREFIX_0F38DD,
803 PREFIX_0F38DE,
804 PREFIX_0F38DF,
805 PREFIX_0F38F0,
806 PREFIX_0F38F1,
807 PREFIX_0F3A08,
808 PREFIX_0F3A09,
809 PREFIX_0F3A0A,
810 PREFIX_0F3A0B,
811 PREFIX_0F3A0C,
812 PREFIX_0F3A0D,
813 PREFIX_0F3A0E,
814 PREFIX_0F3A14,
815 PREFIX_0F3A15,
816 PREFIX_0F3A16,
817 PREFIX_0F3A17,
818 PREFIX_0F3A20,
819 PREFIX_0F3A21,
820 PREFIX_0F3A22,
821 PREFIX_0F3A40,
822 PREFIX_0F3A41,
823 PREFIX_0F3A42,
824 PREFIX_0F3A44,
825 PREFIX_0F3A60,
826 PREFIX_0F3A61,
827 PREFIX_0F3A62,
828 PREFIX_0F3A63,
829 PREFIX_0F3ADF,
592a252b
L
830 PREFIX_VEX_0F10,
831 PREFIX_VEX_0F11,
832 PREFIX_VEX_0F12,
833 PREFIX_VEX_0F16,
834 PREFIX_VEX_0F2A,
835 PREFIX_VEX_0F2C,
836 PREFIX_VEX_0F2D,
837 PREFIX_VEX_0F2E,
838 PREFIX_VEX_0F2F,
839 PREFIX_VEX_0F51,
840 PREFIX_VEX_0F52,
841 PREFIX_VEX_0F53,
842 PREFIX_VEX_0F58,
843 PREFIX_VEX_0F59,
844 PREFIX_VEX_0F5A,
845 PREFIX_VEX_0F5B,
846 PREFIX_VEX_0F5C,
847 PREFIX_VEX_0F5D,
848 PREFIX_VEX_0F5E,
849 PREFIX_VEX_0F5F,
850 PREFIX_VEX_0F60,
851 PREFIX_VEX_0F61,
852 PREFIX_VEX_0F62,
853 PREFIX_VEX_0F63,
854 PREFIX_VEX_0F64,
855 PREFIX_VEX_0F65,
856 PREFIX_VEX_0F66,
857 PREFIX_VEX_0F67,
858 PREFIX_VEX_0F68,
859 PREFIX_VEX_0F69,
860 PREFIX_VEX_0F6A,
861 PREFIX_VEX_0F6B,
862 PREFIX_VEX_0F6C,
863 PREFIX_VEX_0F6D,
864 PREFIX_VEX_0F6E,
865 PREFIX_VEX_0F6F,
866 PREFIX_VEX_0F70,
867 PREFIX_VEX_0F71_REG_2,
868 PREFIX_VEX_0F71_REG_4,
869 PREFIX_VEX_0F71_REG_6,
870 PREFIX_VEX_0F72_REG_2,
871 PREFIX_VEX_0F72_REG_4,
872 PREFIX_VEX_0F72_REG_6,
873 PREFIX_VEX_0F73_REG_2,
874 PREFIX_VEX_0F73_REG_3,
875 PREFIX_VEX_0F73_REG_6,
876 PREFIX_VEX_0F73_REG_7,
877 PREFIX_VEX_0F74,
878 PREFIX_VEX_0F75,
879 PREFIX_VEX_0F76,
880 PREFIX_VEX_0F77,
881 PREFIX_VEX_0F7C,
882 PREFIX_VEX_0F7D,
883 PREFIX_VEX_0F7E,
884 PREFIX_VEX_0F7F,
885 PREFIX_VEX_0FC2,
886 PREFIX_VEX_0FC4,
887 PREFIX_VEX_0FC5,
888 PREFIX_VEX_0FD0,
889 PREFIX_VEX_0FD1,
890 PREFIX_VEX_0FD2,
891 PREFIX_VEX_0FD3,
892 PREFIX_VEX_0FD4,
893 PREFIX_VEX_0FD5,
894 PREFIX_VEX_0FD6,
895 PREFIX_VEX_0FD7,
896 PREFIX_VEX_0FD8,
897 PREFIX_VEX_0FD9,
898 PREFIX_VEX_0FDA,
899 PREFIX_VEX_0FDB,
900 PREFIX_VEX_0FDC,
901 PREFIX_VEX_0FDD,
902 PREFIX_VEX_0FDE,
903 PREFIX_VEX_0FDF,
904 PREFIX_VEX_0FE0,
905 PREFIX_VEX_0FE1,
906 PREFIX_VEX_0FE2,
907 PREFIX_VEX_0FE3,
908 PREFIX_VEX_0FE4,
909 PREFIX_VEX_0FE5,
910 PREFIX_VEX_0FE6,
911 PREFIX_VEX_0FE7,
912 PREFIX_VEX_0FE8,
913 PREFIX_VEX_0FE9,
914 PREFIX_VEX_0FEA,
915 PREFIX_VEX_0FEB,
916 PREFIX_VEX_0FEC,
917 PREFIX_VEX_0FED,
918 PREFIX_VEX_0FEE,
919 PREFIX_VEX_0FEF,
920 PREFIX_VEX_0FF0,
921 PREFIX_VEX_0FF1,
922 PREFIX_VEX_0FF2,
923 PREFIX_VEX_0FF3,
924 PREFIX_VEX_0FF4,
925 PREFIX_VEX_0FF5,
926 PREFIX_VEX_0FF6,
927 PREFIX_VEX_0FF7,
928 PREFIX_VEX_0FF8,
929 PREFIX_VEX_0FF9,
930 PREFIX_VEX_0FFA,
931 PREFIX_VEX_0FFB,
932 PREFIX_VEX_0FFC,
933 PREFIX_VEX_0FFD,
934 PREFIX_VEX_0FFE,
935 PREFIX_VEX_0F3800,
936 PREFIX_VEX_0F3801,
937 PREFIX_VEX_0F3802,
938 PREFIX_VEX_0F3803,
939 PREFIX_VEX_0F3804,
940 PREFIX_VEX_0F3805,
941 PREFIX_VEX_0F3806,
942 PREFIX_VEX_0F3807,
943 PREFIX_VEX_0F3808,
944 PREFIX_VEX_0F3809,
945 PREFIX_VEX_0F380A,
946 PREFIX_VEX_0F380B,
947 PREFIX_VEX_0F380C,
948 PREFIX_VEX_0F380D,
949 PREFIX_VEX_0F380E,
950 PREFIX_VEX_0F380F,
951 PREFIX_VEX_0F3813,
952 PREFIX_VEX_0F3817,
953 PREFIX_VEX_0F3818,
954 PREFIX_VEX_0F3819,
955 PREFIX_VEX_0F381A,
956 PREFIX_VEX_0F381C,
957 PREFIX_VEX_0F381D,
958 PREFIX_VEX_0F381E,
959 PREFIX_VEX_0F3820,
960 PREFIX_VEX_0F3821,
961 PREFIX_VEX_0F3822,
962 PREFIX_VEX_0F3823,
963 PREFIX_VEX_0F3824,
964 PREFIX_VEX_0F3825,
965 PREFIX_VEX_0F3828,
966 PREFIX_VEX_0F3829,
967 PREFIX_VEX_0F382A,
968 PREFIX_VEX_0F382B,
969 PREFIX_VEX_0F382C,
970 PREFIX_VEX_0F382D,
971 PREFIX_VEX_0F382E,
972 PREFIX_VEX_0F382F,
973 PREFIX_VEX_0F3830,
974 PREFIX_VEX_0F3831,
975 PREFIX_VEX_0F3832,
976 PREFIX_VEX_0F3833,
977 PREFIX_VEX_0F3834,
978 PREFIX_VEX_0F3835,
979 PREFIX_VEX_0F3837,
980 PREFIX_VEX_0F3838,
981 PREFIX_VEX_0F3839,
982 PREFIX_VEX_0F383A,
983 PREFIX_VEX_0F383B,
984 PREFIX_VEX_0F383C,
985 PREFIX_VEX_0F383D,
986 PREFIX_VEX_0F383E,
987 PREFIX_VEX_0F383F,
988 PREFIX_VEX_0F3840,
989 PREFIX_VEX_0F3841,
990 PREFIX_VEX_0F3896,
991 PREFIX_VEX_0F3897,
992 PREFIX_VEX_0F3898,
993 PREFIX_VEX_0F3899,
994 PREFIX_VEX_0F389A,
995 PREFIX_VEX_0F389B,
996 PREFIX_VEX_0F389C,
997 PREFIX_VEX_0F389D,
998 PREFIX_VEX_0F389E,
999 PREFIX_VEX_0F389F,
1000 PREFIX_VEX_0F38A6,
1001 PREFIX_VEX_0F38A7,
1002 PREFIX_VEX_0F38A8,
1003 PREFIX_VEX_0F38A9,
1004 PREFIX_VEX_0F38AA,
1005 PREFIX_VEX_0F38AB,
1006 PREFIX_VEX_0F38AC,
1007 PREFIX_VEX_0F38AD,
1008 PREFIX_VEX_0F38AE,
1009 PREFIX_VEX_0F38AF,
1010 PREFIX_VEX_0F38B6,
1011 PREFIX_VEX_0F38B7,
1012 PREFIX_VEX_0F38B8,
1013 PREFIX_VEX_0F38B9,
1014 PREFIX_VEX_0F38BA,
1015 PREFIX_VEX_0F38BB,
1016 PREFIX_VEX_0F38BC,
1017 PREFIX_VEX_0F38BD,
1018 PREFIX_VEX_0F38BE,
1019 PREFIX_VEX_0F38BF,
1020 PREFIX_VEX_0F38DB,
1021 PREFIX_VEX_0F38DC,
1022 PREFIX_VEX_0F38DD,
1023 PREFIX_VEX_0F38DE,
1024 PREFIX_VEX_0F38DF,
f12dc422
L
1025 PREFIX_VEX_0F38F2,
1026 PREFIX_VEX_0F38F3_REG_1,
1027 PREFIX_VEX_0F38F3_REG_2,
1028 PREFIX_VEX_0F38F3_REG_3,
1029 PREFIX_VEX_0F38F7,
592a252b
L
1030 PREFIX_VEX_0F3A04,
1031 PREFIX_VEX_0F3A05,
1032 PREFIX_VEX_0F3A06,
1033 PREFIX_VEX_0F3A08,
1034 PREFIX_VEX_0F3A09,
1035 PREFIX_VEX_0F3A0A,
1036 PREFIX_VEX_0F3A0B,
1037 PREFIX_VEX_0F3A0C,
1038 PREFIX_VEX_0F3A0D,
1039 PREFIX_VEX_0F3A0E,
1040 PREFIX_VEX_0F3A0F,
1041 PREFIX_VEX_0F3A14,
1042 PREFIX_VEX_0F3A15,
1043 PREFIX_VEX_0F3A16,
1044 PREFIX_VEX_0F3A17,
1045 PREFIX_VEX_0F3A18,
1046 PREFIX_VEX_0F3A19,
1047 PREFIX_VEX_0F3A1D,
1048 PREFIX_VEX_0F3A20,
1049 PREFIX_VEX_0F3A21,
1050 PREFIX_VEX_0F3A22,
1051 PREFIX_VEX_0F3A40,
1052 PREFIX_VEX_0F3A41,
1053 PREFIX_VEX_0F3A42,
1054 PREFIX_VEX_0F3A44,
1055 PREFIX_VEX_0F3A48,
1056 PREFIX_VEX_0F3A49,
1057 PREFIX_VEX_0F3A4A,
1058 PREFIX_VEX_0F3A4B,
1059 PREFIX_VEX_0F3A4C,
1060 PREFIX_VEX_0F3A5C,
1061 PREFIX_VEX_0F3A5D,
1062 PREFIX_VEX_0F3A5E,
1063 PREFIX_VEX_0F3A5F,
1064 PREFIX_VEX_0F3A60,
1065 PREFIX_VEX_0F3A61,
1066 PREFIX_VEX_0F3A62,
1067 PREFIX_VEX_0F3A63,
1068 PREFIX_VEX_0F3A68,
1069 PREFIX_VEX_0F3A69,
1070 PREFIX_VEX_0F3A6A,
1071 PREFIX_VEX_0F3A6B,
1072 PREFIX_VEX_0F3A6C,
1073 PREFIX_VEX_0F3A6D,
1074 PREFIX_VEX_0F3A6E,
1075 PREFIX_VEX_0F3A6F,
1076 PREFIX_VEX_0F3A78,
1077 PREFIX_VEX_0F3A79,
1078 PREFIX_VEX_0F3A7A,
1079 PREFIX_VEX_0F3A7B,
1080 PREFIX_VEX_0F3A7C,
1081 PREFIX_VEX_0F3A7D,
1082 PREFIX_VEX_0F3A7E,
1083 PREFIX_VEX_0F3A7F,
1084 PREFIX_VEX_0F3ADF
51e7da1b 1085};
4e7d34a6 1086
51e7da1b
L
1087enum
1088{
1089 X86_64_06 = 0,
3873ba12
L
1090 X86_64_07,
1091 X86_64_0D,
1092 X86_64_16,
1093 X86_64_17,
1094 X86_64_1E,
1095 X86_64_1F,
1096 X86_64_27,
1097 X86_64_2F,
1098 X86_64_37,
1099 X86_64_3F,
1100 X86_64_60,
1101 X86_64_61,
1102 X86_64_62,
1103 X86_64_63,
1104 X86_64_6D,
1105 X86_64_6F,
1106 X86_64_9A,
1107 X86_64_C4,
1108 X86_64_C5,
1109 X86_64_CE,
1110 X86_64_D4,
1111 X86_64_D5,
1112 X86_64_EA,
1113 X86_64_0F01_REG_0,
1114 X86_64_0F01_REG_1,
1115 X86_64_0F01_REG_2,
1116 X86_64_0F01_REG_3
51e7da1b 1117};
4e7d34a6 1118
51e7da1b
L
1119enum
1120{
1121 THREE_BYTE_0F38 = 0,
3873ba12
L
1122 THREE_BYTE_0F3A,
1123 THREE_BYTE_0F7A
51e7da1b 1124};
4e7d34a6 1125
f88c9eb0
SP
1126enum
1127{
5dd85c99
SP
1128 XOP_08 = 0,
1129 XOP_09,
f88c9eb0
SP
1130 XOP_0A
1131};
1132
51e7da1b
L
1133enum
1134{
1135 VEX_0F = 0,
3873ba12
L
1136 VEX_0F38,
1137 VEX_0F3A
51e7da1b 1138};
c0f3af97 1139
51e7da1b
L
1140enum
1141{
592a252b
L
1142 VEX_LEN_0F10_P_1 = 0,
1143 VEX_LEN_0F10_P_3,
1144 VEX_LEN_0F11_P_1,
1145 VEX_LEN_0F11_P_3,
1146 VEX_LEN_0F12_P_0_M_0,
1147 VEX_LEN_0F12_P_0_M_1,
1148 VEX_LEN_0F12_P_2,
1149 VEX_LEN_0F13_M_0,
1150 VEX_LEN_0F16_P_0_M_0,
1151 VEX_LEN_0F16_P_0_M_1,
1152 VEX_LEN_0F16_P_2,
1153 VEX_LEN_0F17_M_0,
1154 VEX_LEN_0F2A_P_1,
1155 VEX_LEN_0F2A_P_3,
1156 VEX_LEN_0F2C_P_1,
1157 VEX_LEN_0F2C_P_3,
1158 VEX_LEN_0F2D_P_1,
1159 VEX_LEN_0F2D_P_3,
1160 VEX_LEN_0F2E_P_0,
1161 VEX_LEN_0F2E_P_2,
1162 VEX_LEN_0F2F_P_0,
1163 VEX_LEN_0F2F_P_2,
1164 VEX_LEN_0F51_P_1,
1165 VEX_LEN_0F51_P_3,
1166 VEX_LEN_0F52_P_1,
1167 VEX_LEN_0F53_P_1,
1168 VEX_LEN_0F58_P_1,
1169 VEX_LEN_0F58_P_3,
1170 VEX_LEN_0F59_P_1,
1171 VEX_LEN_0F59_P_3,
1172 VEX_LEN_0F5A_P_1,
1173 VEX_LEN_0F5A_P_3,
1174 VEX_LEN_0F5C_P_1,
1175 VEX_LEN_0F5C_P_3,
1176 VEX_LEN_0F5D_P_1,
1177 VEX_LEN_0F5D_P_3,
1178 VEX_LEN_0F5E_P_1,
1179 VEX_LEN_0F5E_P_3,
1180 VEX_LEN_0F5F_P_1,
1181 VEX_LEN_0F5F_P_3,
1182 VEX_LEN_0F60_P_2,
1183 VEX_LEN_0F61_P_2,
1184 VEX_LEN_0F62_P_2,
1185 VEX_LEN_0F63_P_2,
1186 VEX_LEN_0F64_P_2,
1187 VEX_LEN_0F65_P_2,
1188 VEX_LEN_0F66_P_2,
1189 VEX_LEN_0F67_P_2,
1190 VEX_LEN_0F68_P_2,
1191 VEX_LEN_0F69_P_2,
1192 VEX_LEN_0F6A_P_2,
1193 VEX_LEN_0F6B_P_2,
1194 VEX_LEN_0F6C_P_2,
1195 VEX_LEN_0F6D_P_2,
1196 VEX_LEN_0F6E_P_2,
1197 VEX_LEN_0F70_P_1,
1198 VEX_LEN_0F70_P_2,
1199 VEX_LEN_0F70_P_3,
1200 VEX_LEN_0F71_R_2_P_2,
1201 VEX_LEN_0F71_R_4_P_2,
1202 VEX_LEN_0F71_R_6_P_2,
1203 VEX_LEN_0F72_R_2_P_2,
1204 VEX_LEN_0F72_R_4_P_2,
1205 VEX_LEN_0F72_R_6_P_2,
1206 VEX_LEN_0F73_R_2_P_2,
1207 VEX_LEN_0F73_R_3_P_2,
1208 VEX_LEN_0F73_R_6_P_2,
1209 VEX_LEN_0F73_R_7_P_2,
1210 VEX_LEN_0F74_P_2,
1211 VEX_LEN_0F75_P_2,
1212 VEX_LEN_0F76_P_2,
1213 VEX_LEN_0F7E_P_1,
1214 VEX_LEN_0F7E_P_2,
1215 VEX_LEN_0FAE_R_2_M_0,
1216 VEX_LEN_0FAE_R_3_M_0,
1217 VEX_LEN_0FC2_P_1,
1218 VEX_LEN_0FC2_P_3,
1219 VEX_LEN_0FC4_P_2,
1220 VEX_LEN_0FC5_P_2,
1221 VEX_LEN_0FD1_P_2,
1222 VEX_LEN_0FD2_P_2,
1223 VEX_LEN_0FD3_P_2,
1224 VEX_LEN_0FD4_P_2,
1225 VEX_LEN_0FD5_P_2,
1226 VEX_LEN_0FD6_P_2,
1227 VEX_LEN_0FD7_P_2_M_1,
1228 VEX_LEN_0FD8_P_2,
1229 VEX_LEN_0FD9_P_2,
1230 VEX_LEN_0FDA_P_2,
1231 VEX_LEN_0FDB_P_2,
1232 VEX_LEN_0FDC_P_2,
1233 VEX_LEN_0FDD_P_2,
1234 VEX_LEN_0FDE_P_2,
1235 VEX_LEN_0FDF_P_2,
1236 VEX_LEN_0FE0_P_2,
1237 VEX_LEN_0FE1_P_2,
1238 VEX_LEN_0FE2_P_2,
1239 VEX_LEN_0FE3_P_2,
1240 VEX_LEN_0FE4_P_2,
1241 VEX_LEN_0FE5_P_2,
1242 VEX_LEN_0FE8_P_2,
1243 VEX_LEN_0FE9_P_2,
1244 VEX_LEN_0FEA_P_2,
1245 VEX_LEN_0FEB_P_2,
1246 VEX_LEN_0FEC_P_2,
1247 VEX_LEN_0FED_P_2,
1248 VEX_LEN_0FEE_P_2,
1249 VEX_LEN_0FEF_P_2,
1250 VEX_LEN_0FF1_P_2,
1251 VEX_LEN_0FF2_P_2,
1252 VEX_LEN_0FF3_P_2,
1253 VEX_LEN_0FF4_P_2,
1254 VEX_LEN_0FF5_P_2,
1255 VEX_LEN_0FF6_P_2,
1256 VEX_LEN_0FF7_P_2,
1257 VEX_LEN_0FF8_P_2,
1258 VEX_LEN_0FF9_P_2,
1259 VEX_LEN_0FFA_P_2,
1260 VEX_LEN_0FFB_P_2,
1261 VEX_LEN_0FFC_P_2,
1262 VEX_LEN_0FFD_P_2,
1263 VEX_LEN_0FFE_P_2,
1264 VEX_LEN_0F3800_P_2,
1265 VEX_LEN_0F3801_P_2,
1266 VEX_LEN_0F3802_P_2,
1267 VEX_LEN_0F3803_P_2,
1268 VEX_LEN_0F3804_P_2,
1269 VEX_LEN_0F3805_P_2,
1270 VEX_LEN_0F3806_P_2,
1271 VEX_LEN_0F3807_P_2,
1272 VEX_LEN_0F3808_P_2,
1273 VEX_LEN_0F3809_P_2,
1274 VEX_LEN_0F380A_P_2,
1275 VEX_LEN_0F380B_P_2,
1276 VEX_LEN_0F3819_P_2_M_0,
1277 VEX_LEN_0F381A_P_2_M_0,
1278 VEX_LEN_0F381C_P_2,
1279 VEX_LEN_0F381D_P_2,
1280 VEX_LEN_0F381E_P_2,
1281 VEX_LEN_0F3820_P_2,
1282 VEX_LEN_0F3821_P_2,
1283 VEX_LEN_0F3822_P_2,
1284 VEX_LEN_0F3823_P_2,
1285 VEX_LEN_0F3824_P_2,
1286 VEX_LEN_0F3825_P_2,
1287 VEX_LEN_0F3828_P_2,
1288 VEX_LEN_0F3829_P_2,
1289 VEX_LEN_0F382A_P_2_M_0,
1290 VEX_LEN_0F382B_P_2,
1291 VEX_LEN_0F3830_P_2,
1292 VEX_LEN_0F3831_P_2,
1293 VEX_LEN_0F3832_P_2,
1294 VEX_LEN_0F3833_P_2,
1295 VEX_LEN_0F3834_P_2,
1296 VEX_LEN_0F3835_P_2,
1297 VEX_LEN_0F3837_P_2,
1298 VEX_LEN_0F3838_P_2,
1299 VEX_LEN_0F3839_P_2,
1300 VEX_LEN_0F383A_P_2,
1301 VEX_LEN_0F383B_P_2,
1302 VEX_LEN_0F383C_P_2,
1303 VEX_LEN_0F383D_P_2,
1304 VEX_LEN_0F383E_P_2,
1305 VEX_LEN_0F383F_P_2,
1306 VEX_LEN_0F3840_P_2,
1307 VEX_LEN_0F3841_P_2,
1308 VEX_LEN_0F38DB_P_2,
1309 VEX_LEN_0F38DC_P_2,
1310 VEX_LEN_0F38DD_P_2,
1311 VEX_LEN_0F38DE_P_2,
1312 VEX_LEN_0F38DF_P_2,
f12dc422
L
1313 VEX_LEN_0F38F2_P_0,
1314 VEX_LEN_0F38F3_R_1_P_0,
1315 VEX_LEN_0F38F3_R_2_P_0,
1316 VEX_LEN_0F38F3_R_3_P_0,
1317 VEX_LEN_0F38F7_P_0,
592a252b
L
1318 VEX_LEN_0F3A06_P_2,
1319 VEX_LEN_0F3A0A_P_2,
1320 VEX_LEN_0F3A0B_P_2,
1321 VEX_LEN_0F3A0E_P_2,
1322 VEX_LEN_0F3A0F_P_2,
1323 VEX_LEN_0F3A14_P_2,
1324 VEX_LEN_0F3A15_P_2,
1325 VEX_LEN_0F3A16_P_2,
1326 VEX_LEN_0F3A17_P_2,
1327 VEX_LEN_0F3A18_P_2,
1328 VEX_LEN_0F3A19_P_2,
1329 VEX_LEN_0F3A20_P_2,
1330 VEX_LEN_0F3A21_P_2,
1331 VEX_LEN_0F3A22_P_2,
1332 VEX_LEN_0F3A41_P_2,
1333 VEX_LEN_0F3A42_P_2,
1334 VEX_LEN_0F3A44_P_2,
1335 VEX_LEN_0F3A4C_P_2,
1336 VEX_LEN_0F3A60_P_2,
1337 VEX_LEN_0F3A61_P_2,
1338 VEX_LEN_0F3A62_P_2,
1339 VEX_LEN_0F3A63_P_2,
1340 VEX_LEN_0F3A6A_P_2,
1341 VEX_LEN_0F3A6B_P_2,
1342 VEX_LEN_0F3A6E_P_2,
1343 VEX_LEN_0F3A6F_P_2,
1344 VEX_LEN_0F3A7A_P_2,
1345 VEX_LEN_0F3A7B_P_2,
1346 VEX_LEN_0F3A7E_P_2,
1347 VEX_LEN_0F3A7F_P_2,
1348 VEX_LEN_0F3ADF_P_2,
1349 VEX_LEN_0FXOP_09_80,
1350 VEX_LEN_0FXOP_09_81
51e7da1b 1351};
c0f3af97 1352
9e30b8e0
L
1353enum
1354{
592a252b
L
1355 VEX_W_0F10_P_0 = 0,
1356 VEX_W_0F10_P_1,
1357 VEX_W_0F10_P_2,
1358 VEX_W_0F10_P_3,
1359 VEX_W_0F11_P_0,
1360 VEX_W_0F11_P_1,
1361 VEX_W_0F11_P_2,
1362 VEX_W_0F11_P_3,
1363 VEX_W_0F12_P_0_M_0,
1364 VEX_W_0F12_P_0_M_1,
1365 VEX_W_0F12_P_1,
1366 VEX_W_0F12_P_2,
1367 VEX_W_0F12_P_3,
1368 VEX_W_0F13_M_0,
1369 VEX_W_0F14,
1370 VEX_W_0F15,
1371 VEX_W_0F16_P_0_M_0,
1372 VEX_W_0F16_P_0_M_1,
1373 VEX_W_0F16_P_1,
1374 VEX_W_0F16_P_2,
1375 VEX_W_0F17_M_0,
1376 VEX_W_0F28,
1377 VEX_W_0F29,
1378 VEX_W_0F2B_M_0,
1379 VEX_W_0F2E_P_0,
1380 VEX_W_0F2E_P_2,
1381 VEX_W_0F2F_P_0,
1382 VEX_W_0F2F_P_2,
1383 VEX_W_0F50_M_0,
1384 VEX_W_0F51_P_0,
1385 VEX_W_0F51_P_1,
1386 VEX_W_0F51_P_2,
1387 VEX_W_0F51_P_3,
1388 VEX_W_0F52_P_0,
1389 VEX_W_0F52_P_1,
1390 VEX_W_0F53_P_0,
1391 VEX_W_0F53_P_1,
1392 VEX_W_0F58_P_0,
1393 VEX_W_0F58_P_1,
1394 VEX_W_0F58_P_2,
1395 VEX_W_0F58_P_3,
1396 VEX_W_0F59_P_0,
1397 VEX_W_0F59_P_1,
1398 VEX_W_0F59_P_2,
1399 VEX_W_0F59_P_3,
1400 VEX_W_0F5A_P_0,
1401 VEX_W_0F5A_P_1,
1402 VEX_W_0F5A_P_3,
1403 VEX_W_0F5B_P_0,
1404 VEX_W_0F5B_P_1,
1405 VEX_W_0F5B_P_2,
1406 VEX_W_0F5C_P_0,
1407 VEX_W_0F5C_P_1,
1408 VEX_W_0F5C_P_2,
1409 VEX_W_0F5C_P_3,
1410 VEX_W_0F5D_P_0,
1411 VEX_W_0F5D_P_1,
1412 VEX_W_0F5D_P_2,
1413 VEX_W_0F5D_P_3,
1414 VEX_W_0F5E_P_0,
1415 VEX_W_0F5E_P_1,
1416 VEX_W_0F5E_P_2,
1417 VEX_W_0F5E_P_3,
1418 VEX_W_0F5F_P_0,
1419 VEX_W_0F5F_P_1,
1420 VEX_W_0F5F_P_2,
1421 VEX_W_0F5F_P_3,
1422 VEX_W_0F60_P_2,
1423 VEX_W_0F61_P_2,
1424 VEX_W_0F62_P_2,
1425 VEX_W_0F63_P_2,
1426 VEX_W_0F64_P_2,
1427 VEX_W_0F65_P_2,
1428 VEX_W_0F66_P_2,
1429 VEX_W_0F67_P_2,
1430 VEX_W_0F68_P_2,
1431 VEX_W_0F69_P_2,
1432 VEX_W_0F6A_P_2,
1433 VEX_W_0F6B_P_2,
1434 VEX_W_0F6C_P_2,
1435 VEX_W_0F6D_P_2,
1436 VEX_W_0F6F_P_1,
1437 VEX_W_0F6F_P_2,
1438 VEX_W_0F70_P_1,
1439 VEX_W_0F70_P_2,
1440 VEX_W_0F70_P_3,
1441 VEX_W_0F71_R_2_P_2,
1442 VEX_W_0F71_R_4_P_2,
1443 VEX_W_0F71_R_6_P_2,
1444 VEX_W_0F72_R_2_P_2,
1445 VEX_W_0F72_R_4_P_2,
1446 VEX_W_0F72_R_6_P_2,
1447 VEX_W_0F73_R_2_P_2,
1448 VEX_W_0F73_R_3_P_2,
1449 VEX_W_0F73_R_6_P_2,
1450 VEX_W_0F73_R_7_P_2,
1451 VEX_W_0F74_P_2,
1452 VEX_W_0F75_P_2,
1453 VEX_W_0F76_P_2,
1454 VEX_W_0F77_P_0,
1455 VEX_W_0F7C_P_2,
1456 VEX_W_0F7C_P_3,
1457 VEX_W_0F7D_P_2,
1458 VEX_W_0F7D_P_3,
1459 VEX_W_0F7E_P_1,
1460 VEX_W_0F7F_P_1,
1461 VEX_W_0F7F_P_2,
1462 VEX_W_0FAE_R_2_M_0,
1463 VEX_W_0FAE_R_3_M_0,
1464 VEX_W_0FC2_P_0,
1465 VEX_W_0FC2_P_1,
1466 VEX_W_0FC2_P_2,
1467 VEX_W_0FC2_P_3,
1468 VEX_W_0FC4_P_2,
1469 VEX_W_0FC5_P_2,
1470 VEX_W_0FD0_P_2,
1471 VEX_W_0FD0_P_3,
1472 VEX_W_0FD1_P_2,
1473 VEX_W_0FD2_P_2,
1474 VEX_W_0FD3_P_2,
1475 VEX_W_0FD4_P_2,
1476 VEX_W_0FD5_P_2,
1477 VEX_W_0FD6_P_2,
1478 VEX_W_0FD7_P_2_M_1,
1479 VEX_W_0FD8_P_2,
1480 VEX_W_0FD9_P_2,
1481 VEX_W_0FDA_P_2,
1482 VEX_W_0FDB_P_2,
1483 VEX_W_0FDC_P_2,
1484 VEX_W_0FDD_P_2,
1485 VEX_W_0FDE_P_2,
1486 VEX_W_0FDF_P_2,
1487 VEX_W_0FE0_P_2,
1488 VEX_W_0FE1_P_2,
1489 VEX_W_0FE2_P_2,
1490 VEX_W_0FE3_P_2,
1491 VEX_W_0FE4_P_2,
1492 VEX_W_0FE5_P_2,
1493 VEX_W_0FE6_P_1,
1494 VEX_W_0FE6_P_2,
1495 VEX_W_0FE6_P_3,
1496 VEX_W_0FE7_P_2_M_0,
1497 VEX_W_0FE8_P_2,
1498 VEX_W_0FE9_P_2,
1499 VEX_W_0FEA_P_2,
1500 VEX_W_0FEB_P_2,
1501 VEX_W_0FEC_P_2,
1502 VEX_W_0FED_P_2,
1503 VEX_W_0FEE_P_2,
1504 VEX_W_0FEF_P_2,
1505 VEX_W_0FF0_P_3_M_0,
1506 VEX_W_0FF1_P_2,
1507 VEX_W_0FF2_P_2,
1508 VEX_W_0FF3_P_2,
1509 VEX_W_0FF4_P_2,
1510 VEX_W_0FF5_P_2,
1511 VEX_W_0FF6_P_2,
1512 VEX_W_0FF7_P_2,
1513 VEX_W_0FF8_P_2,
1514 VEX_W_0FF9_P_2,
1515 VEX_W_0FFA_P_2,
1516 VEX_W_0FFB_P_2,
1517 VEX_W_0FFC_P_2,
1518 VEX_W_0FFD_P_2,
1519 VEX_W_0FFE_P_2,
1520 VEX_W_0F3800_P_2,
1521 VEX_W_0F3801_P_2,
1522 VEX_W_0F3802_P_2,
1523 VEX_W_0F3803_P_2,
1524 VEX_W_0F3804_P_2,
1525 VEX_W_0F3805_P_2,
1526 VEX_W_0F3806_P_2,
1527 VEX_W_0F3807_P_2,
1528 VEX_W_0F3808_P_2,
1529 VEX_W_0F3809_P_2,
1530 VEX_W_0F380A_P_2,
1531 VEX_W_0F380B_P_2,
1532 VEX_W_0F380C_P_2,
1533 VEX_W_0F380D_P_2,
1534 VEX_W_0F380E_P_2,
1535 VEX_W_0F380F_P_2,
1536 VEX_W_0F3817_P_2,
1537 VEX_W_0F3818_P_2_M_0,
1538 VEX_W_0F3819_P_2_M_0,
1539 VEX_W_0F381A_P_2_M_0,
1540 VEX_W_0F381C_P_2,
1541 VEX_W_0F381D_P_2,
1542 VEX_W_0F381E_P_2,
1543 VEX_W_0F3820_P_2,
1544 VEX_W_0F3821_P_2,
1545 VEX_W_0F3822_P_2,
1546 VEX_W_0F3823_P_2,
1547 VEX_W_0F3824_P_2,
1548 VEX_W_0F3825_P_2,
1549 VEX_W_0F3828_P_2,
1550 VEX_W_0F3829_P_2,
1551 VEX_W_0F382A_P_2_M_0,
1552 VEX_W_0F382B_P_2,
1553 VEX_W_0F382C_P_2_M_0,
1554 VEX_W_0F382D_P_2_M_0,
1555 VEX_W_0F382E_P_2_M_0,
1556 VEX_W_0F382F_P_2_M_0,
1557 VEX_W_0F3830_P_2,
1558 VEX_W_0F3831_P_2,
1559 VEX_W_0F3832_P_2,
1560 VEX_W_0F3833_P_2,
1561 VEX_W_0F3834_P_2,
1562 VEX_W_0F3835_P_2,
1563 VEX_W_0F3837_P_2,
1564 VEX_W_0F3838_P_2,
1565 VEX_W_0F3839_P_2,
1566 VEX_W_0F383A_P_2,
1567 VEX_W_0F383B_P_2,
1568 VEX_W_0F383C_P_2,
1569 VEX_W_0F383D_P_2,
1570 VEX_W_0F383E_P_2,
1571 VEX_W_0F383F_P_2,
1572 VEX_W_0F3840_P_2,
1573 VEX_W_0F3841_P_2,
1574 VEX_W_0F38DB_P_2,
1575 VEX_W_0F38DC_P_2,
1576 VEX_W_0F38DD_P_2,
1577 VEX_W_0F38DE_P_2,
1578 VEX_W_0F38DF_P_2,
1579 VEX_W_0F3A04_P_2,
1580 VEX_W_0F3A05_P_2,
1581 VEX_W_0F3A06_P_2,
1582 VEX_W_0F3A08_P_2,
1583 VEX_W_0F3A09_P_2,
1584 VEX_W_0F3A0A_P_2,
1585 VEX_W_0F3A0B_P_2,
1586 VEX_W_0F3A0C_P_2,
1587 VEX_W_0F3A0D_P_2,
1588 VEX_W_0F3A0E_P_2,
1589 VEX_W_0F3A0F_P_2,
1590 VEX_W_0F3A14_P_2,
1591 VEX_W_0F3A15_P_2,
1592 VEX_W_0F3A18_P_2,
1593 VEX_W_0F3A19_P_2,
1594 VEX_W_0F3A20_P_2,
1595 VEX_W_0F3A21_P_2,
1596 VEX_W_0F3A40_P_2,
1597 VEX_W_0F3A41_P_2,
1598 VEX_W_0F3A42_P_2,
1599 VEX_W_0F3A44_P_2,
1600 VEX_W_0F3A48_P_2,
1601 VEX_W_0F3A49_P_2,
1602 VEX_W_0F3A4A_P_2,
1603 VEX_W_0F3A4B_P_2,
1604 VEX_W_0F3A4C_P_2,
1605 VEX_W_0F3A60_P_2,
1606 VEX_W_0F3A61_P_2,
1607 VEX_W_0F3A62_P_2,
1608 VEX_W_0F3A63_P_2,
1609 VEX_W_0F3ADF_P_2
9e30b8e0
L
1610};
1611
26ca5450 1612typedef void (*op_rtn) (int bytemode, int sizeflag);
252b5132
RH
1613
1614struct dis386 {
2da11e11 1615 const char *name;
ce518a5f
L
1616 struct
1617 {
1618 op_rtn rtn;
1619 int bytemode;
1620 } op[MAX_OPERANDS];
252b5132
RH
1621};
1622
1623/* Upper case letters in the instruction names here are macros.
1624 'A' => print 'b' if no register operands or suffix_always is true
1625 'B' => print 'b' if suffix_always is true
9306ca4a 1626 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
98b528ac 1627 size prefix
ed7841b3 1628 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
98b528ac 1629 suffix_always is true
252b5132 1630 'E' => print 'e' if 32-bit form of jcxz
3ffd33cf 1631 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
52fd6d94 1632 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
5dd0794d 1633 'H' => print ",pt" or ",pn" branch hint
9306ca4a 1634 'I' => honor following macro letter even in Intel mode (implemented only
98b528ac 1635 for some of the macro letters)
9306ca4a 1636 'J' => print 'l'
42903f7f 1637 'K' => print 'd' or 'q' if rex prefix is present.
252b5132 1638 'L' => print 'l' if suffix_always is true
9d141669 1639 'M' => print 'r' if intel_mnemonic is false.
252b5132 1640 'N' => print 'n' if instruction has no wait "prefix"
a35ca55a 1641 'O' => print 'd' or 'o' (or 'q' in Intel mode)
52b15da3 1642 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
98b528ac
L
1643 or suffix_always is true. print 'q' if rex prefix is present.
1644 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
1645 is true
a35ca55a 1646 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
52b15da3 1647 'S' => print 'w', 'l' or 'q' if suffix_always is true
6439fc28
AM
1648 'T' => print 'q' in 64bit mode and behave as 'P' otherwise
1649 'U' => print 'q' in 64bit mode and behave as 'Q' otherwise
1a114b12 1650 'V' => print 'q' in 64bit mode and behave as 'S' otherwise
a35ca55a 1651 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
9306ca4a 1652 'X' => print 's', 'd' depending on data16 prefix (for XMM)
8a72226a
L
1653 'Y' => 'q' if instruction has an REX 64bit overwrite prefix and
1654 suffix_always is true.
6dd5059a 1655 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
9d141669 1656 '!' => change condition from true to false or from false to true.
98b528ac
L
1657 '%' => add 1 upper case letter to the macro.
1658
1659 2 upper case letter macros:
c0f3af97
L
1660 "XY" => print 'x' or 'y' if no register operands or suffix_always
1661 is true.
4b06377f
L
1662 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
1663 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
98b528ac 1664 or suffix_always is true
4b06377f
L
1665 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
1666 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
1667 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
52b15da3 1668
6439fc28
AM
1669 Many of the above letters print nothing in Intel mode. See "putop"
1670 for the details.
52b15da3 1671
6439fc28 1672 Braces '{' and '}', and vertical bars '|', indicate alternative
7c52e0e8 1673 mnemonic strings for AT&T and Intel. */
252b5132 1674
6439fc28 1675static const struct dis386 dis386[] = {
252b5132 1676 /* 00 */
ce518a5f
L
1677 { "addB", { Eb, Gb } },
1678 { "addS", { Ev, Gv } },
c7532693
L
1679 { "addB", { Gb, EbS } },
1680 { "addS", { Gv, EvS } },
ce518a5f
L
1681 { "addB", { AL, Ib } },
1682 { "addS", { eAX, Iv } },
4e7d34a6
L
1683 { X86_64_TABLE (X86_64_06) },
1684 { X86_64_TABLE (X86_64_07) },
252b5132 1685 /* 08 */
ce518a5f
L
1686 { "orB", { Eb, Gb } },
1687 { "orS", { Ev, Gv } },
c7532693
L
1688 { "orB", { Gb, EbS } },
1689 { "orS", { Gv, EvS } },
ce518a5f
L
1690 { "orB", { AL, Ib } },
1691 { "orS", { eAX, Iv } },
4e7d34a6 1692 { X86_64_TABLE (X86_64_0D) },
592d1631 1693 { Bad_Opcode }, /* 0x0f extended opcode escape */
252b5132 1694 /* 10 */
ce518a5f
L
1695 { "adcB", { Eb, Gb } },
1696 { "adcS", { Ev, Gv } },
c7532693
L
1697 { "adcB", { Gb, EbS } },
1698 { "adcS", { Gv, EvS } },
ce518a5f
L
1699 { "adcB", { AL, Ib } },
1700 { "adcS", { eAX, Iv } },
4e7d34a6
L
1701 { X86_64_TABLE (X86_64_16) },
1702 { X86_64_TABLE (X86_64_17) },
252b5132 1703 /* 18 */
ce518a5f
L
1704 { "sbbB", { Eb, Gb } },
1705 { "sbbS", { Ev, Gv } },
c7532693
L
1706 { "sbbB", { Gb, EbS } },
1707 { "sbbS", { Gv, EvS } },
ce518a5f
L
1708 { "sbbB", { AL, Ib } },
1709 { "sbbS", { eAX, Iv } },
4e7d34a6
L
1710 { X86_64_TABLE (X86_64_1E) },
1711 { X86_64_TABLE (X86_64_1F) },
252b5132 1712 /* 20 */
ce518a5f
L
1713 { "andB", { Eb, Gb } },
1714 { "andS", { Ev, Gv } },
c7532693
L
1715 { "andB", { Gb, EbS } },
1716 { "andS", { Gv, EvS } },
ce518a5f
L
1717 { "andB", { AL, Ib } },
1718 { "andS", { eAX, Iv } },
592d1631 1719 { Bad_Opcode }, /* SEG ES prefix */
4e7d34a6 1720 { X86_64_TABLE (X86_64_27) },
252b5132 1721 /* 28 */
ce518a5f
L
1722 { "subB", { Eb, Gb } },
1723 { "subS", { Ev, Gv } },
c7532693
L
1724 { "subB", { Gb, EbS } },
1725 { "subS", { Gv, EvS } },
ce518a5f
L
1726 { "subB", { AL, Ib } },
1727 { "subS", { eAX, Iv } },
592d1631 1728 { Bad_Opcode }, /* SEG CS prefix */
4e7d34a6 1729 { X86_64_TABLE (X86_64_2F) },
252b5132 1730 /* 30 */
ce518a5f
L
1731 { "xorB", { Eb, Gb } },
1732 { "xorS", { Ev, Gv } },
c7532693
L
1733 { "xorB", { Gb, EbS } },
1734 { "xorS", { Gv, EvS } },
ce518a5f
L
1735 { "xorB", { AL, Ib } },
1736 { "xorS", { eAX, Iv } },
592d1631 1737 { Bad_Opcode }, /* SEG SS prefix */
4e7d34a6 1738 { X86_64_TABLE (X86_64_37) },
252b5132 1739 /* 38 */
ce518a5f
L
1740 { "cmpB", { Eb, Gb } },
1741 { "cmpS", { Ev, Gv } },
c7532693
L
1742 { "cmpB", { Gb, EbS } },
1743 { "cmpS", { Gv, EvS } },
ce518a5f
L
1744 { "cmpB", { AL, Ib } },
1745 { "cmpS", { eAX, Iv } },
592d1631 1746 { Bad_Opcode }, /* SEG DS prefix */
4e7d34a6 1747 { X86_64_TABLE (X86_64_3F) },
252b5132 1748 /* 40 */
ce518a5f
L
1749 { "inc{S|}", { RMeAX } },
1750 { "inc{S|}", { RMeCX } },
1751 { "inc{S|}", { RMeDX } },
1752 { "inc{S|}", { RMeBX } },
1753 { "inc{S|}", { RMeSP } },
1754 { "inc{S|}", { RMeBP } },
1755 { "inc{S|}", { RMeSI } },
1756 { "inc{S|}", { RMeDI } },
252b5132 1757 /* 48 */
ce518a5f
L
1758 { "dec{S|}", { RMeAX } },
1759 { "dec{S|}", { RMeCX } },
1760 { "dec{S|}", { RMeDX } },
1761 { "dec{S|}", { RMeBX } },
1762 { "dec{S|}", { RMeSP } },
1763 { "dec{S|}", { RMeBP } },
1764 { "dec{S|}", { RMeSI } },
1765 { "dec{S|}", { RMeDI } },
252b5132 1766 /* 50 */
ce518a5f
L
1767 { "pushV", { RMrAX } },
1768 { "pushV", { RMrCX } },
1769 { "pushV", { RMrDX } },
1770 { "pushV", { RMrBX } },
1771 { "pushV", { RMrSP } },
1772 { "pushV", { RMrBP } },
1773 { "pushV", { RMrSI } },
1774 { "pushV", { RMrDI } },
252b5132 1775 /* 58 */
ce518a5f
L
1776 { "popV", { RMrAX } },
1777 { "popV", { RMrCX } },
1778 { "popV", { RMrDX } },
1779 { "popV", { RMrBX } },
1780 { "popV", { RMrSP } },
1781 { "popV", { RMrBP } },
1782 { "popV", { RMrSI } },
1783 { "popV", { RMrDI } },
252b5132 1784 /* 60 */
4e7d34a6
L
1785 { X86_64_TABLE (X86_64_60) },
1786 { X86_64_TABLE (X86_64_61) },
1787 { X86_64_TABLE (X86_64_62) },
1788 { X86_64_TABLE (X86_64_63) },
592d1631
L
1789 { Bad_Opcode }, /* seg fs */
1790 { Bad_Opcode }, /* seg gs */
1791 { Bad_Opcode }, /* op size prefix */
1792 { Bad_Opcode }, /* adr size prefix */
252b5132 1793 /* 68 */
d9e3625e 1794 { "pushT", { sIv } },
ce518a5f 1795 { "imulS", { Gv, Ev, Iv } },
e3949f17 1796 { "pushT", { sIbT } },
ce518a5f 1797 { "imulS", { Gv, Ev, sIb } },
7c52e0e8 1798 { "ins{b|}", { Ybr, indirDX } },
4e7d34a6 1799 { X86_64_TABLE (X86_64_6D) },
7c52e0e8 1800 { "outs{b|}", { indirDXr, Xb } },
4e7d34a6 1801 { X86_64_TABLE (X86_64_6F) },
252b5132 1802 /* 70 */
ce518a5f
L
1803 { "joH", { Jb, XX, cond_jump_flag } },
1804 { "jnoH", { Jb, XX, cond_jump_flag } },
1805 { "jbH", { Jb, XX, cond_jump_flag } },
1806 { "jaeH", { Jb, XX, cond_jump_flag } },
1807 { "jeH", { Jb, XX, cond_jump_flag } },
1808 { "jneH", { Jb, XX, cond_jump_flag } },
1809 { "jbeH", { Jb, XX, cond_jump_flag } },
1810 { "jaH", { Jb, XX, cond_jump_flag } },
252b5132 1811 /* 78 */
ce518a5f
L
1812 { "jsH", { Jb, XX, cond_jump_flag } },
1813 { "jnsH", { Jb, XX, cond_jump_flag } },
1814 { "jpH", { Jb, XX, cond_jump_flag } },
1815 { "jnpH", { Jb, XX, cond_jump_flag } },
1816 { "jlH", { Jb, XX, cond_jump_flag } },
1817 { "jgeH", { Jb, XX, cond_jump_flag } },
1818 { "jleH", { Jb, XX, cond_jump_flag } },
1819 { "jgH", { Jb, XX, cond_jump_flag } },
252b5132 1820 /* 80 */
1ceb70f8
L
1821 { REG_TABLE (REG_80) },
1822 { REG_TABLE (REG_81) },
592d1631 1823 { Bad_Opcode },
1ceb70f8 1824 { REG_TABLE (REG_82) },
ce518a5f
L
1825 { "testB", { Eb, Gb } },
1826 { "testS", { Ev, Gv } },
1827 { "xchgB", { Eb, Gb } },
1828 { "xchgS", { Ev, Gv } },
252b5132 1829 /* 88 */
ce518a5f
L
1830 { "movB", { Eb, Gb } },
1831 { "movS", { Ev, Gv } },
b6169b20
L
1832 { "movB", { Gb, EbS } },
1833 { "movS", { Gv, EvS } },
ce518a5f 1834 { "movD", { Sv, Sw } },
1ceb70f8 1835 { MOD_TABLE (MOD_8D) },
ce518a5f 1836 { "movD", { Sw, Sv } },
1ceb70f8 1837 { REG_TABLE (REG_8F) },
252b5132 1838 /* 90 */
1ceb70f8 1839 { PREFIX_TABLE (PREFIX_90) },
ce518a5f
L
1840 { "xchgS", { RMeCX, eAX } },
1841 { "xchgS", { RMeDX, eAX } },
1842 { "xchgS", { RMeBX, eAX } },
1843 { "xchgS", { RMeSP, eAX } },
1844 { "xchgS", { RMeBP, eAX } },
1845 { "xchgS", { RMeSI, eAX } },
1846 { "xchgS", { RMeDI, eAX } },
252b5132 1847 /* 98 */
7c52e0e8
L
1848 { "cW{t|}R", { XX } },
1849 { "cR{t|}O", { XX } },
4e7d34a6 1850 { X86_64_TABLE (X86_64_9A) },
592d1631 1851 { Bad_Opcode }, /* fwait */
ce518a5f
L
1852 { "pushfT", { XX } },
1853 { "popfT", { XX } },
7c52e0e8
L
1854 { "sahf", { XX } },
1855 { "lahf", { XX } },
252b5132 1856 /* a0 */
4b06377f
L
1857 { "mov%LB", { AL, Ob } },
1858 { "mov%LS", { eAX, Ov } },
1859 { "mov%LB", { Ob, AL } },
1860 { "mov%LS", { Ov, eAX } },
7c52e0e8
L
1861 { "movs{b|}", { Ybr, Xb } },
1862 { "movs{R|}", { Yvr, Xv } },
1863 { "cmps{b|}", { Xb, Yb } },
1864 { "cmps{R|}", { Xv, Yv } },
252b5132 1865 /* a8 */
ce518a5f
L
1866 { "testB", { AL, Ib } },
1867 { "testS", { eAX, Iv } },
1868 { "stosB", { Ybr, AL } },
1869 { "stosS", { Yvr, eAX } },
1870 { "lodsB", { ALr, Xb } },
1871 { "lodsS", { eAXr, Xv } },
1872 { "scasB", { AL, Yb } },
1873 { "scasS", { eAX, Yv } },
252b5132 1874 /* b0 */
ce518a5f
L
1875 { "movB", { RMAL, Ib } },
1876 { "movB", { RMCL, Ib } },
1877 { "movB", { RMDL, Ib } },
1878 { "movB", { RMBL, Ib } },
1879 { "movB", { RMAH, Ib } },
1880 { "movB", { RMCH, Ib } },
1881 { "movB", { RMDH, Ib } },
1882 { "movB", { RMBH, Ib } },
252b5132 1883 /* b8 */
4b06377f
L
1884 { "mov%LV", { RMeAX, Iv64 } },
1885 { "mov%LV", { RMeCX, Iv64 } },
1886 { "mov%LV", { RMeDX, Iv64 } },
1887 { "mov%LV", { RMeBX, Iv64 } },
1888 { "mov%LV", { RMeSP, Iv64 } },
1889 { "mov%LV", { RMeBP, Iv64 } },
1890 { "mov%LV", { RMeSI, Iv64 } },
1891 { "mov%LV", { RMeDI, Iv64 } },
252b5132 1892 /* c0 */
1ceb70f8
L
1893 { REG_TABLE (REG_C0) },
1894 { REG_TABLE (REG_C1) },
ce518a5f
L
1895 { "retT", { Iw } },
1896 { "retT", { XX } },
4e7d34a6
L
1897 { X86_64_TABLE (X86_64_C4) },
1898 { X86_64_TABLE (X86_64_C5) },
1ceb70f8
L
1899 { REG_TABLE (REG_C6) },
1900 { REG_TABLE (REG_C7) },
252b5132 1901 /* c8 */
ce518a5f
L
1902 { "enterT", { Iw, Ib } },
1903 { "leaveT", { XX } },
ddab3d59
JB
1904 { "Jret{|f}P", { Iw } },
1905 { "Jret{|f}P", { XX } },
ce518a5f
L
1906 { "int3", { XX } },
1907 { "int", { Ib } },
4e7d34a6 1908 { X86_64_TABLE (X86_64_CE) },
ce518a5f 1909 { "iretP", { XX } },
252b5132 1910 /* d0 */
1ceb70f8
L
1911 { REG_TABLE (REG_D0) },
1912 { REG_TABLE (REG_D1) },
1913 { REG_TABLE (REG_D2) },
1914 { REG_TABLE (REG_D3) },
4e7d34a6
L
1915 { X86_64_TABLE (X86_64_D4) },
1916 { X86_64_TABLE (X86_64_D5) },
592d1631 1917 { Bad_Opcode },
ce518a5f 1918 { "xlat", { DSBX } },
252b5132
RH
1919 /* d8 */
1920 { FLOAT },
1921 { FLOAT },
1922 { FLOAT },
1923 { FLOAT },
1924 { FLOAT },
1925 { FLOAT },
1926 { FLOAT },
1927 { FLOAT },
1928 /* e0 */
ce518a5f
L
1929 { "loopneFH", { Jb, XX, loop_jcxz_flag } },
1930 { "loopeFH", { Jb, XX, loop_jcxz_flag } },
1931 { "loopFH", { Jb, XX, loop_jcxz_flag } },
1932 { "jEcxzH", { Jb, XX, loop_jcxz_flag } },
1933 { "inB", { AL, Ib } },
1934 { "inG", { zAX, Ib } },
1935 { "outB", { Ib, AL } },
1936 { "outG", { Ib, zAX } },
252b5132 1937 /* e8 */
ce518a5f
L
1938 { "callT", { Jv } },
1939 { "jmpT", { Jv } },
4e7d34a6 1940 { X86_64_TABLE (X86_64_EA) },
ce518a5f
L
1941 { "jmp", { Jb } },
1942 { "inB", { AL, indirDX } },
1943 { "inG", { zAX, indirDX } },
1944 { "outB", { indirDX, AL } },
1945 { "outG", { indirDX, zAX } },
252b5132 1946 /* f0 */
592d1631 1947 { Bad_Opcode }, /* lock prefix */
ce518a5f 1948 { "icebp", { XX } },
592d1631
L
1949 { Bad_Opcode }, /* repne */
1950 { Bad_Opcode }, /* repz */
ce518a5f
L
1951 { "hlt", { XX } },
1952 { "cmc", { XX } },
1ceb70f8
L
1953 { REG_TABLE (REG_F6) },
1954 { REG_TABLE (REG_F7) },
252b5132 1955 /* f8 */
ce518a5f
L
1956 { "clc", { XX } },
1957 { "stc", { XX } },
1958 { "cli", { XX } },
1959 { "sti", { XX } },
1960 { "cld", { XX } },
1961 { "std", { XX } },
1ceb70f8
L
1962 { REG_TABLE (REG_FE) },
1963 { REG_TABLE (REG_FF) },
252b5132
RH
1964};
1965
6439fc28 1966static const struct dis386 dis386_twobyte[] = {
252b5132 1967 /* 00 */
1ceb70f8
L
1968 { REG_TABLE (REG_0F00 ) },
1969 { REG_TABLE (REG_0F01 ) },
ce518a5f
L
1970 { "larS", { Gv, Ew } },
1971 { "lslS", { Gv, Ew } },
592d1631 1972 { Bad_Opcode },
ce518a5f
L
1973 { "syscall", { XX } },
1974 { "clts", { XX } },
1975 { "sysretP", { XX } },
252b5132 1976 /* 08 */
ce518a5f
L
1977 { "invd", { XX } },
1978 { "wbinvd", { XX } },
592d1631 1979 { Bad_Opcode },
b414985b 1980 { "ud2", { XX } },
592d1631 1981 { Bad_Opcode },
b5b1fc4f 1982 { REG_TABLE (REG_0F0D) },
ce518a5f
L
1983 { "femms", { XX } },
1984 { "", { MX, EM, OPSUF } }, /* See OP_3DNowSuffix. */
252b5132 1985 /* 10 */
1ceb70f8
L
1986 { PREFIX_TABLE (PREFIX_0F10) },
1987 { PREFIX_TABLE (PREFIX_0F11) },
1988 { PREFIX_TABLE (PREFIX_0F12) },
1989 { MOD_TABLE (MOD_0F13) },
f2a421c4
L
1990 { "unpcklpX", { XM, EXx } },
1991 { "unpckhpX", { XM, EXx } },
1ceb70f8
L
1992 { PREFIX_TABLE (PREFIX_0F16) },
1993 { MOD_TABLE (MOD_0F17) },
252b5132 1994 /* 18 */
1ceb70f8 1995 { REG_TABLE (REG_0F18) },
b5b1fc4f
L
1996 { "nopQ", { Ev } },
1997 { "nopQ", { Ev } },
1998 { "nopQ", { Ev } },
1999 { "nopQ", { Ev } },
2000 { "nopQ", { Ev } },
2001 { "nopQ", { Ev } },
ce518a5f 2002 { "nopQ", { Ev } },
252b5132 2003 /* 20 */
1ceb70f8
L
2004 { MOD_TABLE (MOD_0F20) },
2005 { MOD_TABLE (MOD_0F21) },
2006 { MOD_TABLE (MOD_0F22) },
2007 { MOD_TABLE (MOD_0F23) },
2008 { MOD_TABLE (MOD_0F24) },
592d1631 2009 { Bad_Opcode },
1ceb70f8 2010 { MOD_TABLE (MOD_0F26) },
592d1631 2011 { Bad_Opcode },
252b5132 2012 /* 28 */
09a2c6cf 2013 { "movapX", { XM, EXx } },
b6169b20 2014 { "movapX", { EXxS, XM } },
1ceb70f8
L
2015 { PREFIX_TABLE (PREFIX_0F2A) },
2016 { PREFIX_TABLE (PREFIX_0F2B) },
2017 { PREFIX_TABLE (PREFIX_0F2C) },
2018 { PREFIX_TABLE (PREFIX_0F2D) },
2019 { PREFIX_TABLE (PREFIX_0F2E) },
2020 { PREFIX_TABLE (PREFIX_0F2F) },
252b5132 2021 /* 30 */
ce518a5f
L
2022 { "wrmsr", { XX } },
2023 { "rdtsc", { XX } },
2024 { "rdmsr", { XX } },
2025 { "rdpmc", { XX } },
2026 { "sysenter", { XX } },
2027 { "sysexit", { XX } },
592d1631 2028 { Bad_Opcode },
47dd174c 2029 { "getsec", { XX } },
252b5132 2030 /* 38 */
4e7d34a6 2031 { THREE_BYTE_TABLE (THREE_BYTE_0F38) },
592d1631 2032 { Bad_Opcode },
4e7d34a6 2033 { THREE_BYTE_TABLE (THREE_BYTE_0F3A) },
592d1631
L
2034 { Bad_Opcode },
2035 { Bad_Opcode },
2036 { Bad_Opcode },
2037 { Bad_Opcode },
2038 { Bad_Opcode },
252b5132 2039 /* 40 */
b19d5385
JB
2040 { "cmovoS", { Gv, Ev } },
2041 { "cmovnoS", { Gv, Ev } },
2042 { "cmovbS", { Gv, Ev } },
2043 { "cmovaeS", { Gv, Ev } },
2044 { "cmoveS", { Gv, Ev } },
2045 { "cmovneS", { Gv, Ev } },
2046 { "cmovbeS", { Gv, Ev } },
2047 { "cmovaS", { Gv, Ev } },
252b5132 2048 /* 48 */
b19d5385
JB
2049 { "cmovsS", { Gv, Ev } },
2050 { "cmovnsS", { Gv, Ev } },
2051 { "cmovpS", { Gv, Ev } },
2052 { "cmovnpS", { Gv, Ev } },
2053 { "cmovlS", { Gv, Ev } },
2054 { "cmovgeS", { Gv, Ev } },
2055 { "cmovleS", { Gv, Ev } },
2056 { "cmovgS", { Gv, Ev } },
252b5132 2057 /* 50 */
75c135a8 2058 { MOD_TABLE (MOD_0F51) },
1ceb70f8
L
2059 { PREFIX_TABLE (PREFIX_0F51) },
2060 { PREFIX_TABLE (PREFIX_0F52) },
2061 { PREFIX_TABLE (PREFIX_0F53) },
09a2c6cf
L
2062 { "andpX", { XM, EXx } },
2063 { "andnpX", { XM, EXx } },
2064 { "orpX", { XM, EXx } },
2065 { "xorpX", { XM, EXx } },
252b5132 2066 /* 58 */
1ceb70f8
L
2067 { PREFIX_TABLE (PREFIX_0F58) },
2068 { PREFIX_TABLE (PREFIX_0F59) },
2069 { PREFIX_TABLE (PREFIX_0F5A) },
2070 { PREFIX_TABLE (PREFIX_0F5B) },
2071 { PREFIX_TABLE (PREFIX_0F5C) },
2072 { PREFIX_TABLE (PREFIX_0F5D) },
2073 { PREFIX_TABLE (PREFIX_0F5E) },
2074 { PREFIX_TABLE (PREFIX_0F5F) },
252b5132 2075 /* 60 */
1ceb70f8
L
2076 { PREFIX_TABLE (PREFIX_0F60) },
2077 { PREFIX_TABLE (PREFIX_0F61) },
2078 { PREFIX_TABLE (PREFIX_0F62) },
ce518a5f
L
2079 { "packsswb", { MX, EM } },
2080 { "pcmpgtb", { MX, EM } },
2081 { "pcmpgtw", { MX, EM } },
2082 { "pcmpgtd", { MX, EM } },
2083 { "packuswb", { MX, EM } },
252b5132 2084 /* 68 */
ce518a5f
L
2085 { "punpckhbw", { MX, EM } },
2086 { "punpckhwd", { MX, EM } },
2087 { "punpckhdq", { MX, EM } },
2088 { "packssdw", { MX, EM } },
1ceb70f8
L
2089 { PREFIX_TABLE (PREFIX_0F6C) },
2090 { PREFIX_TABLE (PREFIX_0F6D) },
231af070 2091 { "movK", { MX, Edq } },
1ceb70f8 2092 { PREFIX_TABLE (PREFIX_0F6F) },
252b5132 2093 /* 70 */
1ceb70f8
L
2094 { PREFIX_TABLE (PREFIX_0F70) },
2095 { REG_TABLE (REG_0F71) },
2096 { REG_TABLE (REG_0F72) },
2097 { REG_TABLE (REG_0F73) },
ce518a5f
L
2098 { "pcmpeqb", { MX, EM } },
2099 { "pcmpeqw", { MX, EM } },
2100 { "pcmpeqd", { MX, EM } },
2101 { "emms", { XX } },
252b5132 2102 /* 78 */
1ceb70f8
L
2103 { PREFIX_TABLE (PREFIX_0F78) },
2104 { PREFIX_TABLE (PREFIX_0F79) },
4e7d34a6 2105 { THREE_BYTE_TABLE (THREE_BYTE_0F7A) },
592d1631 2106 { Bad_Opcode },
1ceb70f8
L
2107 { PREFIX_TABLE (PREFIX_0F7C) },
2108 { PREFIX_TABLE (PREFIX_0F7D) },
2109 { PREFIX_TABLE (PREFIX_0F7E) },
2110 { PREFIX_TABLE (PREFIX_0F7F) },
252b5132 2111 /* 80 */
ce518a5f
L
2112 { "joH", { Jv, XX, cond_jump_flag } },
2113 { "jnoH", { Jv, XX, cond_jump_flag } },
2114 { "jbH", { Jv, XX, cond_jump_flag } },
2115 { "jaeH", { Jv, XX, cond_jump_flag } },
2116 { "jeH", { Jv, XX, cond_jump_flag } },
2117 { "jneH", { Jv, XX, cond_jump_flag } },
2118 { "jbeH", { Jv, XX, cond_jump_flag } },
2119 { "jaH", { Jv, XX, cond_jump_flag } },
252b5132 2120 /* 88 */
ce518a5f
L
2121 { "jsH", { Jv, XX, cond_jump_flag } },
2122 { "jnsH", { Jv, XX, cond_jump_flag } },
2123 { "jpH", { Jv, XX, cond_jump_flag } },
2124 { "jnpH", { Jv, XX, cond_jump_flag } },
2125 { "jlH", { Jv, XX, cond_jump_flag } },
2126 { "jgeH", { Jv, XX, cond_jump_flag } },
2127 { "jleH", { Jv, XX, cond_jump_flag } },
2128 { "jgH", { Jv, XX, cond_jump_flag } },
252b5132 2129 /* 90 */
ce518a5f
L
2130 { "seto", { Eb } },
2131 { "setno", { Eb } },
2132 { "setb", { Eb } },
2133 { "setae", { Eb } },
2134 { "sete", { Eb } },
2135 { "setne", { Eb } },
2136 { "setbe", { Eb } },
2137 { "seta", { Eb } },
252b5132 2138 /* 98 */
ce518a5f
L
2139 { "sets", { Eb } },
2140 { "setns", { Eb } },
2141 { "setp", { Eb } },
2142 { "setnp", { Eb } },
2143 { "setl", { Eb } },
2144 { "setge", { Eb } },
2145 { "setle", { Eb } },
2146 { "setg", { Eb } },
252b5132 2147 /* a0 */
ce518a5f
L
2148 { "pushT", { fs } },
2149 { "popT", { fs } },
2150 { "cpuid", { XX } },
2151 { "btS", { Ev, Gv } },
2152 { "shldS", { Ev, Gv, Ib } },
2153 { "shldS", { Ev, Gv, CL } },
1ceb70f8
L
2154 { REG_TABLE (REG_0FA6) },
2155 { REG_TABLE (REG_0FA7) },
252b5132 2156 /* a8 */
ce518a5f
L
2157 { "pushT", { gs } },
2158 { "popT", { gs } },
2159 { "rsm", { XX } },
2160 { "btsS", { Ev, Gv } },
2161 { "shrdS", { Ev, Gv, Ib } },
2162 { "shrdS", { Ev, Gv, CL } },
1ceb70f8 2163 { REG_TABLE (REG_0FAE) },
ce518a5f 2164 { "imulS", { Gv, Ev } },
252b5132 2165 /* b0 */
ce518a5f
L
2166 { "cmpxchgB", { Eb, Gb } },
2167 { "cmpxchgS", { Ev, Gv } },
1ceb70f8 2168 { MOD_TABLE (MOD_0FB2) },
ce518a5f 2169 { "btrS", { Ev, Gv } },
1ceb70f8
L
2170 { MOD_TABLE (MOD_0FB4) },
2171 { MOD_TABLE (MOD_0FB5) },
7c52e0e8
L
2172 { "movz{bR|x}", { Gv, Eb } },
2173 { "movz{wR|x}", { Gv, Ew } }, /* yes, there really is movzww ! */
252b5132 2174 /* b8 */
1ceb70f8 2175 { PREFIX_TABLE (PREFIX_0FB8) },
b414985b 2176 { "ud1", { XX } },
1ceb70f8 2177 { REG_TABLE (REG_0FBA) },
ce518a5f 2178 { "btcS", { Ev, Gv } },
f12dc422 2179 { PREFIX_TABLE (PREFIX_0FBC) },
1ceb70f8 2180 { PREFIX_TABLE (PREFIX_0FBD) },
7c52e0e8
L
2181 { "movs{bR|x}", { Gv, Eb } },
2182 { "movs{wR|x}", { Gv, Ew } }, /* yes, there really is movsww ! */
252b5132 2183 /* c0 */
ce518a5f
L
2184 { "xaddB", { Eb, Gb } },
2185 { "xaddS", { Ev, Gv } },
1ceb70f8 2186 { PREFIX_TABLE (PREFIX_0FC2) },
4ee52178 2187 { PREFIX_TABLE (PREFIX_0FC3) },
ce518a5f
L
2188 { "pinsrw", { MX, Edqw, Ib } },
2189 { "pextrw", { Gdq, MS, Ib } },
09a2c6cf 2190 { "shufpX", { XM, EXx, Ib } },
1ceb70f8 2191 { REG_TABLE (REG_0FC7) },
252b5132 2192 /* c8 */
ce518a5f
L
2193 { "bswap", { RMeAX } },
2194 { "bswap", { RMeCX } },
2195 { "bswap", { RMeDX } },
2196 { "bswap", { RMeBX } },
2197 { "bswap", { RMeSP } },
2198 { "bswap", { RMeBP } },
2199 { "bswap", { RMeSI } },
2200 { "bswap", { RMeDI } },
252b5132 2201 /* d0 */
1ceb70f8 2202 { PREFIX_TABLE (PREFIX_0FD0) },
ce518a5f
L
2203 { "psrlw", { MX, EM } },
2204 { "psrld", { MX, EM } },
2205 { "psrlq", { MX, EM } },
2206 { "paddq", { MX, EM } },
2207 { "pmullw", { MX, EM } },
1ceb70f8 2208 { PREFIX_TABLE (PREFIX_0FD6) },
75c135a8 2209 { MOD_TABLE (MOD_0FD7) },
252b5132 2210 /* d8 */
ce518a5f
L
2211 { "psubusb", { MX, EM } },
2212 { "psubusw", { MX, EM } },
2213 { "pminub", { MX, EM } },
2214 { "pand", { MX, EM } },
2215 { "paddusb", { MX, EM } },
2216 { "paddusw", { MX, EM } },
2217 { "pmaxub", { MX, EM } },
2218 { "pandn", { MX, EM } },
252b5132 2219 /* e0 */
ce518a5f
L
2220 { "pavgb", { MX, EM } },
2221 { "psraw", { MX, EM } },
2222 { "psrad", { MX, EM } },
2223 { "pavgw", { MX, EM } },
2224 { "pmulhuw", { MX, EM } },
2225 { "pmulhw", { MX, EM } },
1ceb70f8
L
2226 { PREFIX_TABLE (PREFIX_0FE6) },
2227 { PREFIX_TABLE (PREFIX_0FE7) },
252b5132 2228 /* e8 */
ce518a5f
L
2229 { "psubsb", { MX, EM } },
2230 { "psubsw", { MX, EM } },
2231 { "pminsw", { MX, EM } },
2232 { "por", { MX, EM } },
2233 { "paddsb", { MX, EM } },
2234 { "paddsw", { MX, EM } },
2235 { "pmaxsw", { MX, EM } },
2236 { "pxor", { MX, EM } },
252b5132 2237 /* f0 */
1ceb70f8 2238 { PREFIX_TABLE (PREFIX_0FF0) },
ce518a5f
L
2239 { "psllw", { MX, EM } },
2240 { "pslld", { MX, EM } },
2241 { "psllq", { MX, EM } },
2242 { "pmuludq", { MX, EM } },
2243 { "pmaddwd", { MX, EM } },
2244 { "psadbw", { MX, EM } },
1ceb70f8 2245 { PREFIX_TABLE (PREFIX_0FF7) },
252b5132 2246 /* f8 */
ce518a5f
L
2247 { "psubb", { MX, EM } },
2248 { "psubw", { MX, EM } },
2249 { "psubd", { MX, EM } },
2250 { "psubq", { MX, EM } },
2251 { "paddb", { MX, EM } },
2252 { "paddw", { MX, EM } },
2253 { "paddd", { MX, EM } },
592d1631 2254 { Bad_Opcode },
252b5132
RH
2255};
2256
2257static const unsigned char onebyte_has_modrm[256] = {
c608c12e
AM
2258 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2259 /* ------------------------------- */
2260 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
2261 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
2262 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
2263 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
2264 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
2265 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
2266 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
2267 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
2268 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
2269 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
2270 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
2271 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
2272 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
2273 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
2274 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
2275 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
2276 /* ------------------------------- */
2277 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
252b5132
RH
2278};
2279
2280static const unsigned char twobyte_has_modrm[256] = {
c608c12e
AM
2281 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2282 /* ------------------------------- */
252b5132 2283 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
b5b1fc4f 2284 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
85f10a01 2285 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
331d2d0d 2286 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
252b5132 2287 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
4bba6815
AM
2288 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
2289 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
85f10a01 2290 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
252b5132
RH
2291 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
2292 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
30d1c836 2293 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
050dfa73 2294 /* b0 */ 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, /* bf */
252b5132 2295 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
ca164297 2296 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
4bba6815 2297 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
ca164297 2298 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
c608c12e
AM
2299 /* ------------------------------- */
2300 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2301};
2302
252b5132
RH
2303static char obuf[100];
2304static char *obufp;
ea397f5b 2305static char *mnemonicendp;
252b5132
RH
2306static char scratchbuf[100];
2307static unsigned char *start_codep;
2308static unsigned char *insn_codep;
2309static unsigned char *codep;
f16cd0d5
L
2310static int last_lock_prefix;
2311static int last_repz_prefix;
2312static int last_repnz_prefix;
2313static int last_data_prefix;
2314static int last_addr_prefix;
2315static int last_rex_prefix;
2316static int last_seg_prefix;
2317#define MAX_CODE_LENGTH 15
2318/* We can up to 14 prefixes since the maximum instruction length is
2319 15bytes. */
2320static int all_prefixes[MAX_CODE_LENGTH - 1];
252b5132 2321static disassemble_info *the_info;
7967e09e
L
2322static struct
2323 {
2324 int mod;
7967e09e 2325 int reg;
484c222e 2326 int rm;
7967e09e
L
2327 }
2328modrm;
4bba6815 2329static unsigned char need_modrm;
dfc8cf43
L
2330static struct
2331 {
2332 int scale;
2333 int index;
2334 int base;
2335 }
2336sib;
c0f3af97
L
2337static struct
2338 {
2339 int register_specifier;
2340 int length;
2341 int prefix;
2342 int w;
2343 }
2344vex;
2345static unsigned char need_vex;
2346static unsigned char need_vex_reg;
dae39acc 2347static unsigned char vex_w_done;
252b5132 2348
ea397f5b
L
2349struct op
2350 {
2351 const char *name;
2352 unsigned int len;
2353 };
2354
4bba6815
AM
2355/* If we are accessing mod/rm/reg without need_modrm set, then the
2356 values are stale. Hitting this abort likely indicates that you
2357 need to update onebyte_has_modrm or twobyte_has_modrm. */
2358#define MODRM_CHECK if (!need_modrm) abort ()
2359
d708bcba
AM
2360static const char **names64;
2361static const char **names32;
2362static const char **names16;
2363static const char **names8;
2364static const char **names8rex;
2365static const char **names_seg;
db51cc60
L
2366static const char *index64;
2367static const char *index32;
d708bcba
AM
2368static const char **index16;
2369
2370static const char *intel_names64[] = {
2371 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
2372 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
2373};
2374static const char *intel_names32[] = {
2375 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
2376 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
2377};
2378static const char *intel_names16[] = {
2379 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
2380 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
2381};
2382static const char *intel_names8[] = {
2383 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
2384};
2385static const char *intel_names8rex[] = {
2386 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
2387 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
2388};
2389static const char *intel_names_seg[] = {
2390 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
2391};
db51cc60
L
2392static const char *intel_index64 = "riz";
2393static const char *intel_index32 = "eiz";
d708bcba
AM
2394static const char *intel_index16[] = {
2395 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
2396};
2397
2398static const char *att_names64[] = {
2399 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
52b15da3
JH
2400 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
2401};
d708bcba
AM
2402static const char *att_names32[] = {
2403 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
52b15da3 2404 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
252b5132 2405};
d708bcba
AM
2406static const char *att_names16[] = {
2407 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
52b15da3 2408 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
252b5132 2409};
d708bcba
AM
2410static const char *att_names8[] = {
2411 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
252b5132 2412};
d708bcba
AM
2413static const char *att_names8rex[] = {
2414 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
52b15da3
JH
2415 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
2416};
d708bcba
AM
2417static const char *att_names_seg[] = {
2418 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
252b5132 2419};
db51cc60
L
2420static const char *att_index64 = "%riz";
2421static const char *att_index32 = "%eiz";
d708bcba
AM
2422static const char *att_index16[] = {
2423 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
252b5132
RH
2424};
2425
b9733481
L
2426static const char **names_mm;
2427static const char *intel_names_mm[] = {
2428 "mm0", "mm1", "mm2", "mm3",
2429 "mm4", "mm5", "mm6", "mm7"
2430};
2431static const char *att_names_mm[] = {
2432 "%mm0", "%mm1", "%mm2", "%mm3",
2433 "%mm4", "%mm5", "%mm6", "%mm7"
2434};
2435
2436static const char **names_xmm;
2437static const char *intel_names_xmm[] = {
2438 "xmm0", "xmm1", "xmm2", "xmm3",
2439 "xmm4", "xmm5", "xmm6", "xmm7",
2440 "xmm8", "xmm9", "xmm10", "xmm11",
2441 "xmm12", "xmm13", "xmm14", "xmm15"
2442};
2443static const char *att_names_xmm[] = {
2444 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
2445 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
2446 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
2447 "%xmm12", "%xmm13", "%xmm14", "%xmm15"
2448};
2449
2450static const char **names_ymm;
2451static const char *intel_names_ymm[] = {
2452 "ymm0", "ymm1", "ymm2", "ymm3",
2453 "ymm4", "ymm5", "ymm6", "ymm7",
2454 "ymm8", "ymm9", "ymm10", "ymm11",
2455 "ymm12", "ymm13", "ymm14", "ymm15"
2456};
2457static const char *att_names_ymm[] = {
2458 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
2459 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
2460 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
2461 "%ymm12", "%ymm13", "%ymm14", "%ymm15"
2462};
2463
1ceb70f8
L
2464static const struct dis386 reg_table[][8] = {
2465 /* REG_80 */
252b5132 2466 {
ce518a5f
L
2467 { "addA", { Eb, Ib } },
2468 { "orA", { Eb, Ib } },
2469 { "adcA", { Eb, Ib } },
2470 { "sbbA", { Eb, Ib } },
2471 { "andA", { Eb, Ib } },
2472 { "subA", { Eb, Ib } },
2473 { "xorA", { Eb, Ib } },
2474 { "cmpA", { Eb, Ib } },
252b5132 2475 },
1ceb70f8 2476 /* REG_81 */
252b5132 2477 {
ce518a5f
L
2478 { "addQ", { Ev, Iv } },
2479 { "orQ", { Ev, Iv } },
2480 { "adcQ", { Ev, Iv } },
2481 { "sbbQ", { Ev, Iv } },
2482 { "andQ", { Ev, Iv } },
2483 { "subQ", { Ev, Iv } },
2484 { "xorQ", { Ev, Iv } },
2485 { "cmpQ", { Ev, Iv } },
252b5132 2486 },
1ceb70f8 2487 /* REG_82 */
252b5132 2488 {
ce518a5f
L
2489 { "addQ", { Ev, sIb } },
2490 { "orQ", { Ev, sIb } },
2491 { "adcQ", { Ev, sIb } },
2492 { "sbbQ", { Ev, sIb } },
2493 { "andQ", { Ev, sIb } },
2494 { "subQ", { Ev, sIb } },
2495 { "xorQ", { Ev, sIb } },
2496 { "cmpQ", { Ev, sIb } },
252b5132 2497 },
1ceb70f8 2498 /* REG_8F */
4e7d34a6
L
2499 {
2500 { "popU", { stackEv } },
c48244a5 2501 { XOP_8F_TABLE (XOP_09) },
592d1631
L
2502 { Bad_Opcode },
2503 { Bad_Opcode },
2504 { Bad_Opcode },
f88c9eb0 2505 { XOP_8F_TABLE (XOP_09) },
4e7d34a6 2506 },
1ceb70f8 2507 /* REG_C0 */
252b5132 2508 {
ce518a5f
L
2509 { "rolA", { Eb, Ib } },
2510 { "rorA", { Eb, Ib } },
2511 { "rclA", { Eb, Ib } },
2512 { "rcrA", { Eb, Ib } },
2513 { "shlA", { Eb, Ib } },
2514 { "shrA", { Eb, Ib } },
592d1631 2515 { Bad_Opcode },
ce518a5f 2516 { "sarA", { Eb, Ib } },
252b5132 2517 },
1ceb70f8 2518 /* REG_C1 */
252b5132 2519 {
ce518a5f
L
2520 { "rolQ", { Ev, Ib } },
2521 { "rorQ", { Ev, Ib } },
2522 { "rclQ", { Ev, Ib } },
2523 { "rcrQ", { Ev, Ib } },
2524 { "shlQ", { Ev, Ib } },
2525 { "shrQ", { Ev, Ib } },
592d1631 2526 { Bad_Opcode },
ce518a5f 2527 { "sarQ", { Ev, Ib } },
252b5132 2528 },
1ceb70f8 2529 /* REG_C6 */
4e7d34a6
L
2530 {
2531 { "movA", { Eb, Ib } },
4e7d34a6 2532 },
1ceb70f8 2533 /* REG_C7 */
4e7d34a6
L
2534 {
2535 { "movQ", { Ev, Iv } },
4e7d34a6 2536 },
1ceb70f8 2537 /* REG_D0 */
252b5132 2538 {
ce518a5f
L
2539 { "rolA", { Eb, I1 } },
2540 { "rorA", { Eb, I1 } },
2541 { "rclA", { Eb, I1 } },
2542 { "rcrA", { Eb, I1 } },
2543 { "shlA", { Eb, I1 } },
2544 { "shrA", { Eb, I1 } },
592d1631 2545 { Bad_Opcode },
ce518a5f 2546 { "sarA", { Eb, I1 } },
252b5132 2547 },
1ceb70f8 2548 /* REG_D1 */
252b5132 2549 {
ce518a5f
L
2550 { "rolQ", { Ev, I1 } },
2551 { "rorQ", { Ev, I1 } },
2552 { "rclQ", { Ev, I1 } },
2553 { "rcrQ", { Ev, I1 } },
2554 { "shlQ", { Ev, I1 } },
2555 { "shrQ", { Ev, I1 } },
592d1631 2556 { Bad_Opcode },
ce518a5f 2557 { "sarQ", { Ev, I1 } },
252b5132 2558 },
1ceb70f8 2559 /* REG_D2 */
252b5132 2560 {
ce518a5f
L
2561 { "rolA", { Eb, CL } },
2562 { "rorA", { Eb, CL } },
2563 { "rclA", { Eb, CL } },
2564 { "rcrA", { Eb, CL } },
2565 { "shlA", { Eb, CL } },
2566 { "shrA", { Eb, CL } },
592d1631 2567 { Bad_Opcode },
ce518a5f 2568 { "sarA", { Eb, CL } },
252b5132 2569 },
1ceb70f8 2570 /* REG_D3 */
252b5132 2571 {
ce518a5f
L
2572 { "rolQ", { Ev, CL } },
2573 { "rorQ", { Ev, CL } },
2574 { "rclQ", { Ev, CL } },
2575 { "rcrQ", { Ev, CL } },
2576 { "shlQ", { Ev, CL } },
2577 { "shrQ", { Ev, CL } },
592d1631 2578 { Bad_Opcode },
ce518a5f 2579 { "sarQ", { Ev, CL } },
252b5132 2580 },
1ceb70f8 2581 /* REG_F6 */
252b5132 2582 {
ce518a5f 2583 { "testA", { Eb, Ib } },
592d1631 2584 { Bad_Opcode },
ce518a5f
L
2585 { "notA", { Eb } },
2586 { "negA", { Eb } },
2587 { "mulA", { Eb } }, /* Don't print the implicit %al register, */
2588 { "imulA", { Eb } }, /* to distinguish these opcodes from other */
2589 { "divA", { Eb } }, /* mul/imul opcodes. Do the same for div */
2590 { "idivA", { Eb } }, /* and idiv for consistency. */
252b5132 2591 },
1ceb70f8 2592 /* REG_F7 */
252b5132 2593 {
ce518a5f 2594 { "testQ", { Ev, Iv } },
592d1631 2595 { Bad_Opcode },
ce518a5f
L
2596 { "notQ", { Ev } },
2597 { "negQ", { Ev } },
2598 { "mulQ", { Ev } }, /* Don't print the implicit register. */
2599 { "imulQ", { Ev } },
2600 { "divQ", { Ev } },
2601 { "idivQ", { Ev } },
252b5132 2602 },
1ceb70f8 2603 /* REG_FE */
252b5132 2604 {
ce518a5f
L
2605 { "incA", { Eb } },
2606 { "decA", { Eb } },
252b5132 2607 },
1ceb70f8 2608 /* REG_FF */
252b5132 2609 {
ce518a5f
L
2610 { "incQ", { Ev } },
2611 { "decQ", { Ev } },
d9e3625e
L
2612 { "call{T|}", { indirEv } },
2613 { "Jcall{T|}", { indirEp } },
2614 { "jmp{T|}", { indirEv } },
2615 { "Jjmp{T|}", { indirEp } },
ce518a5f 2616 { "pushU", { stackEv } },
592d1631 2617 { Bad_Opcode },
252b5132 2618 },
1ceb70f8 2619 /* REG_0F00 */
252b5132 2620 {
ce518a5f
L
2621 { "sldtD", { Sv } },
2622 { "strD", { Sv } },
2623 { "lldt", { Ew } },
2624 { "ltr", { Ew } },
2625 { "verr", { Ew } },
2626 { "verw", { Ew } },
592d1631
L
2627 { Bad_Opcode },
2628 { Bad_Opcode },
252b5132 2629 },
1ceb70f8 2630 /* REG_0F01 */
252b5132 2631 {
1ceb70f8
L
2632 { MOD_TABLE (MOD_0F01_REG_0) },
2633 { MOD_TABLE (MOD_0F01_REG_1) },
2634 { MOD_TABLE (MOD_0F01_REG_2) },
2635 { MOD_TABLE (MOD_0F01_REG_3) },
ce518a5f 2636 { "smswD", { Sv } },
592d1631 2637 { Bad_Opcode },
ce518a5f 2638 { "lmsw", { Ew } },
1ceb70f8 2639 { MOD_TABLE (MOD_0F01_REG_7) },
252b5132 2640 },
b5b1fc4f 2641 /* REG_0F0D */
252b5132 2642 {
1ab03f4b
L
2643 { "prefetch", { Mb } },
2644 { "prefetchw", { Mb } },
252b5132 2645 },
1ceb70f8 2646 /* REG_0F18 */
252b5132 2647 {
1ceb70f8
L
2648 { MOD_TABLE (MOD_0F18_REG_0) },
2649 { MOD_TABLE (MOD_0F18_REG_1) },
2650 { MOD_TABLE (MOD_0F18_REG_2) },
2651 { MOD_TABLE (MOD_0F18_REG_3) },
252b5132 2652 },
1ceb70f8 2653 /* REG_0F71 */
a6bd098c 2654 {
592d1631
L
2655 { Bad_Opcode },
2656 { Bad_Opcode },
1ceb70f8 2657 { MOD_TABLE (MOD_0F71_REG_2) },
592d1631 2658 { Bad_Opcode },
1ceb70f8 2659 { MOD_TABLE (MOD_0F71_REG_4) },
592d1631 2660 { Bad_Opcode },
1ceb70f8 2661 { MOD_TABLE (MOD_0F71_REG_6) },
a6bd098c 2662 },
1ceb70f8 2663 /* REG_0F72 */
a6bd098c 2664 {
592d1631
L
2665 { Bad_Opcode },
2666 { Bad_Opcode },
1ceb70f8 2667 { MOD_TABLE (MOD_0F72_REG_2) },
592d1631 2668 { Bad_Opcode },
1ceb70f8 2669 { MOD_TABLE (MOD_0F72_REG_4) },
592d1631 2670 { Bad_Opcode },
1ceb70f8 2671 { MOD_TABLE (MOD_0F72_REG_6) },
a6bd098c 2672 },
1ceb70f8 2673 /* REG_0F73 */
252b5132 2674 {
592d1631
L
2675 { Bad_Opcode },
2676 { Bad_Opcode },
1ceb70f8
L
2677 { MOD_TABLE (MOD_0F73_REG_2) },
2678 { MOD_TABLE (MOD_0F73_REG_3) },
592d1631
L
2679 { Bad_Opcode },
2680 { Bad_Opcode },
1ceb70f8
L
2681 { MOD_TABLE (MOD_0F73_REG_6) },
2682 { MOD_TABLE (MOD_0F73_REG_7) },
252b5132 2683 },
1ceb70f8 2684 /* REG_0FA6 */
252b5132 2685 {
4e7d34a6
L
2686 { "montmul", { { OP_0f07, 0 } } },
2687 { "xsha1", { { OP_0f07, 0 } } },
2688 { "xsha256", { { OP_0f07, 0 } } },
4e7d34a6 2689 },
1ceb70f8 2690 /* REG_0FA7 */
4e7d34a6
L
2691 {
2692 { "xstore-rng", { { OP_0f07, 0 } } },
2693 { "xcrypt-ecb", { { OP_0f07, 0 } } },
2694 { "xcrypt-cbc", { { OP_0f07, 0 } } },
2695 { "xcrypt-ctr", { { OP_0f07, 0 } } },
2696 { "xcrypt-cfb", { { OP_0f07, 0 } } },
2697 { "xcrypt-ofb", { { OP_0f07, 0 } } },
4e7d34a6 2698 },
1ceb70f8 2699 /* REG_0FAE */
4e7d34a6 2700 {
1ceb70f8
L
2701 { MOD_TABLE (MOD_0FAE_REG_0) },
2702 { MOD_TABLE (MOD_0FAE_REG_1) },
2703 { MOD_TABLE (MOD_0FAE_REG_2) },
2704 { MOD_TABLE (MOD_0FAE_REG_3) },
475a2301 2705 { MOD_TABLE (MOD_0FAE_REG_4) },
1ceb70f8
L
2706 { MOD_TABLE (MOD_0FAE_REG_5) },
2707 { MOD_TABLE (MOD_0FAE_REG_6) },
2708 { MOD_TABLE (MOD_0FAE_REG_7) },
252b5132 2709 },
1ceb70f8 2710 /* REG_0FBA */
252b5132 2711 {
592d1631
L
2712 { Bad_Opcode },
2713 { Bad_Opcode },
2714 { Bad_Opcode },
2715 { Bad_Opcode },
4e7d34a6
L
2716 { "btQ", { Ev, Ib } },
2717 { "btsQ", { Ev, Ib } },
2718 { "btrQ", { Ev, Ib } },
2719 { "btcQ", { Ev, Ib } },
c608c12e 2720 },
1ceb70f8 2721 /* REG_0FC7 */
c608c12e 2722 {
592d1631 2723 { Bad_Opcode },
4e7d34a6 2724 { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } } },
592d1631
L
2725 { Bad_Opcode },
2726 { Bad_Opcode },
2727 { Bad_Opcode },
2728 { Bad_Opcode },
1ceb70f8
L
2729 { MOD_TABLE (MOD_0FC7_REG_6) },
2730 { MOD_TABLE (MOD_0FC7_REG_7) },
252b5132 2731 },
592a252b 2732 /* REG_VEX_0F71 */
c0f3af97 2733 {
592d1631
L
2734 { Bad_Opcode },
2735 { Bad_Opcode },
592a252b 2736 { MOD_TABLE (MOD_VEX_0F71_REG_2) },
592d1631 2737 { Bad_Opcode },
592a252b 2738 { MOD_TABLE (MOD_VEX_0F71_REG_4) },
592d1631 2739 { Bad_Opcode },
592a252b 2740 { MOD_TABLE (MOD_VEX_0F71_REG_6) },
c0f3af97 2741 },
592a252b 2742 /* REG_VEX_0F72 */
c0f3af97 2743 {
592d1631
L
2744 { Bad_Opcode },
2745 { Bad_Opcode },
592a252b 2746 { MOD_TABLE (MOD_VEX_0F72_REG_2) },
592d1631 2747 { Bad_Opcode },
592a252b 2748 { MOD_TABLE (MOD_VEX_0F72_REG_4) },
592d1631 2749 { Bad_Opcode },
592a252b 2750 { MOD_TABLE (MOD_VEX_0F72_REG_6) },
c0f3af97 2751 },
592a252b 2752 /* REG_VEX_0F73 */
c0f3af97 2753 {
592d1631
L
2754 { Bad_Opcode },
2755 { Bad_Opcode },
592a252b
L
2756 { MOD_TABLE (MOD_VEX_0F73_REG_2) },
2757 { MOD_TABLE (MOD_VEX_0F73_REG_3) },
592d1631
L
2758 { Bad_Opcode },
2759 { Bad_Opcode },
592a252b
L
2760 { MOD_TABLE (MOD_VEX_0F73_REG_6) },
2761 { MOD_TABLE (MOD_VEX_0F73_REG_7) },
c0f3af97 2762 },
592a252b 2763 /* REG_VEX_0FAE */
c0f3af97 2764 {
592d1631
L
2765 { Bad_Opcode },
2766 { Bad_Opcode },
592a252b
L
2767 { MOD_TABLE (MOD_VEX_0FAE_REG_2) },
2768 { MOD_TABLE (MOD_VEX_0FAE_REG_3) },
c0f3af97 2769 },
f12dc422
L
2770 /* REG_VEX_0F38F3 */
2771 {
2772 { Bad_Opcode },
2773 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1) },
2774 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2) },
2775 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3) },
2776 },
f88c9eb0
SP
2777 /* REG_XOP_LWPCB */
2778 {
2779 { "llwpcb", { { OP_LWPCB_E, 0 } } },
2780 { "slwpcb", { { OP_LWPCB_E, 0 } } },
f88c9eb0
SP
2781 },
2782 /* REG_XOP_LWP */
2783 {
ce7d077e
SP
2784 { "lwpins", { { OP_LWP_E, 0 }, Ed, Iq } },
2785 { "lwpval", { { OP_LWP_E, 0 }, Ed, Iq } },
f88c9eb0 2786 },
2a2a0f38
QN
2787 /* REG_XOP_TBM_01 */
2788 {
2789 { Bad_Opcode },
2790 { "blcfill", { { OP_LWP_E, 0 }, Ev } },
2791 { "blsfill", { { OP_LWP_E, 0 }, Ev } },
2792 { "blcs", { { OP_LWP_E, 0 }, Ev } },
2793 { "tzmsk", { { OP_LWP_E, 0 }, Ev } },
2794 { "blcic", { { OP_LWP_E, 0 }, Ev } },
2795 { "blsic", { { OP_LWP_E, 0 }, Ev } },
2796 { "t1mskc", { { OP_LWP_E, 0 }, Ev } },
2797 },
2798 /* REG_XOP_TBM_02 */
2799 {
2800 { Bad_Opcode },
2801 { "blcmsk", { { OP_LWP_E, 0 }, Ev } },
2802 { Bad_Opcode },
2803 { Bad_Opcode },
2804 { Bad_Opcode },
2805 { Bad_Opcode },
2806 { "blci", { { OP_LWP_E, 0 }, Ev } },
2807 },
4e7d34a6
L
2808};
2809
1ceb70f8
L
2810static const struct dis386 prefix_table[][4] = {
2811 /* PREFIX_90 */
252b5132 2812 {
4e7d34a6
L
2813 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
2814 { "pause", { XX } },
2815 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
0f10071e 2816 },
4e7d34a6 2817
1ceb70f8 2818 /* PREFIX_0F10 */
cc0ec051 2819 {
4e7d34a6
L
2820 { "movups", { XM, EXx } },
2821 { "movss", { XM, EXd } },
2822 { "movupd", { XM, EXx } },
2823 { "movsd", { XM, EXq } },
30d1c836 2824 },
4e7d34a6 2825
1ceb70f8 2826 /* PREFIX_0F11 */
30d1c836 2827 {
b6169b20 2828 { "movups", { EXxS, XM } },
fa99fab2 2829 { "movss", { EXdS, XM } },
b6169b20 2830 { "movupd", { EXxS, XM } },
fa99fab2 2831 { "movsd", { EXqS, XM } },
4e7d34a6 2832 },
252b5132 2833
1ceb70f8 2834 /* PREFIX_0F12 */
c608c12e 2835 {
1ceb70f8 2836 { MOD_TABLE (MOD_0F12_PREFIX_0) },
4e7d34a6
L
2837 { "movsldup", { XM, EXx } },
2838 { "movlpd", { XM, EXq } },
2839 { "movddup", { XM, EXq } },
c608c12e 2840 },
4e7d34a6 2841
1ceb70f8 2842 /* PREFIX_0F16 */
c608c12e 2843 {
1ceb70f8 2844 { MOD_TABLE (MOD_0F16_PREFIX_0) },
4e7d34a6
L
2845 { "movshdup", { XM, EXx } },
2846 { "movhpd", { XM, EXq } },
c608c12e 2847 },
4e7d34a6 2848
1ceb70f8 2849 /* PREFIX_0F2A */
c608c12e 2850 {
09335d05 2851 { "cvtpi2ps", { XM, EMCq } },
98b528ac 2852 { "cvtsi2ss%LQ", { XM, Ev } },
09335d05 2853 { "cvtpi2pd", { XM, EMCq } },
98b528ac 2854 { "cvtsi2sd%LQ", { XM, Ev } },
c608c12e 2855 },
4e7d34a6 2856
1ceb70f8 2857 /* PREFIX_0F2B */
c608c12e 2858 {
75c135a8
L
2859 { MOD_TABLE (MOD_0F2B_PREFIX_0) },
2860 { MOD_TABLE (MOD_0F2B_PREFIX_1) },
2861 { MOD_TABLE (MOD_0F2B_PREFIX_2) },
2862 { MOD_TABLE (MOD_0F2B_PREFIX_3) },
c608c12e 2863 },
4e7d34a6 2864
1ceb70f8 2865 /* PREFIX_0F2C */
c608c12e 2866 {
09335d05
L
2867 { "cvttps2pi", { MXC, EXq } },
2868 { "cvttss2siY", { Gv, EXd } },
09a2c6cf 2869 { "cvttpd2pi", { MXC, EXx } },
09335d05 2870 { "cvttsd2siY", { Gv, EXq } },
c608c12e 2871 },
4e7d34a6 2872
1ceb70f8 2873 /* PREFIX_0F2D */
c608c12e 2874 {
4e7d34a6
L
2875 { "cvtps2pi", { MXC, EXq } },
2876 { "cvtss2siY", { Gv, EXd } },
2877 { "cvtpd2pi", { MXC, EXx } },
2878 { "cvtsd2siY", { Gv, EXq } },
c608c12e 2879 },
4e7d34a6 2880
1ceb70f8 2881 /* PREFIX_0F2E */
c608c12e 2882 {
4e7d34a6 2883 { "ucomiss",{ XM, EXd } },
592d1631 2884 { Bad_Opcode },
4e7d34a6 2885 { "ucomisd",{ XM, EXq } },
c608c12e 2886 },
4e7d34a6 2887
1ceb70f8 2888 /* PREFIX_0F2F */
c608c12e 2889 {
4e7d34a6 2890 { "comiss", { XM, EXd } },
592d1631 2891 { Bad_Opcode },
4e7d34a6 2892 { "comisd", { XM, EXq } },
c608c12e 2893 },
4e7d34a6 2894
1ceb70f8 2895 /* PREFIX_0F51 */
c608c12e 2896 {
4e7d34a6
L
2897 { "sqrtps", { XM, EXx } },
2898 { "sqrtss", { XM, EXd } },
2899 { "sqrtpd", { XM, EXx } },
2900 { "sqrtsd", { XM, EXq } },
c608c12e 2901 },
4e7d34a6 2902
1ceb70f8 2903 /* PREFIX_0F52 */
c608c12e 2904 {
4e7d34a6
L
2905 { "rsqrtps",{ XM, EXx } },
2906 { "rsqrtss",{ XM, EXd } },
c608c12e 2907 },
4e7d34a6 2908
1ceb70f8 2909 /* PREFIX_0F53 */
c608c12e 2910 {
4e7d34a6
L
2911 { "rcpps", { XM, EXx } },
2912 { "rcpss", { XM, EXd } },
c608c12e 2913 },
4e7d34a6 2914
1ceb70f8 2915 /* PREFIX_0F58 */
c608c12e 2916 {
4e7d34a6
L
2917 { "addps", { XM, EXx } },
2918 { "addss", { XM, EXd } },
2919 { "addpd", { XM, EXx } },
2920 { "addsd", { XM, EXq } },
c608c12e 2921 },
4e7d34a6 2922
1ceb70f8 2923 /* PREFIX_0F59 */
c608c12e 2924 {
4e7d34a6
L
2925 { "mulps", { XM, EXx } },
2926 { "mulss", { XM, EXd } },
2927 { "mulpd", { XM, EXx } },
2928 { "mulsd", { XM, EXq } },
041bd2e0 2929 },
4e7d34a6 2930
1ceb70f8 2931 /* PREFIX_0F5A */
041bd2e0 2932 {
4e7d34a6
L
2933 { "cvtps2pd", { XM, EXq } },
2934 { "cvtss2sd", { XM, EXd } },
2935 { "cvtpd2ps", { XM, EXx } },
2936 { "cvtsd2ss", { XM, EXq } },
041bd2e0 2937 },
4e7d34a6 2938
1ceb70f8 2939 /* PREFIX_0F5B */
041bd2e0 2940 {
09a2c6cf
L
2941 { "cvtdq2ps", { XM, EXx } },
2942 { "cvttps2dq", { XM, EXx } },
2943 { "cvtps2dq", { XM, EXx } },
041bd2e0 2944 },
4e7d34a6 2945
1ceb70f8 2946 /* PREFIX_0F5C */
041bd2e0 2947 {
4e7d34a6
L
2948 { "subps", { XM, EXx } },
2949 { "subss", { XM, EXd } },
2950 { "subpd", { XM, EXx } },
2951 { "subsd", { XM, EXq } },
041bd2e0 2952 },
4e7d34a6 2953
1ceb70f8 2954 /* PREFIX_0F5D */
041bd2e0 2955 {
4e7d34a6
L
2956 { "minps", { XM, EXx } },
2957 { "minss", { XM, EXd } },
2958 { "minpd", { XM, EXx } },
2959 { "minsd", { XM, EXq } },
041bd2e0 2960 },
4e7d34a6 2961
1ceb70f8 2962 /* PREFIX_0F5E */
041bd2e0 2963 {
4e7d34a6
L
2964 { "divps", { XM, EXx } },
2965 { "divss", { XM, EXd } },
2966 { "divpd", { XM, EXx } },
2967 { "divsd", { XM, EXq } },
041bd2e0 2968 },
4e7d34a6 2969
1ceb70f8 2970 /* PREFIX_0F5F */
041bd2e0 2971 {
4e7d34a6
L
2972 { "maxps", { XM, EXx } },
2973 { "maxss", { XM, EXd } },
2974 { "maxpd", { XM, EXx } },
2975 { "maxsd", { XM, EXq } },
041bd2e0 2976 },
4e7d34a6 2977
1ceb70f8 2978 /* PREFIX_0F60 */
041bd2e0 2979 {
4e7d34a6 2980 { "punpcklbw",{ MX, EMd } },
592d1631 2981 { Bad_Opcode },
4e7d34a6 2982 { "punpcklbw",{ MX, EMx } },
041bd2e0 2983 },
4e7d34a6 2984
1ceb70f8 2985 /* PREFIX_0F61 */
041bd2e0 2986 {
4e7d34a6 2987 { "punpcklwd",{ MX, EMd } },
592d1631 2988 { Bad_Opcode },
4e7d34a6 2989 { "punpcklwd",{ MX, EMx } },
041bd2e0 2990 },
4e7d34a6 2991
1ceb70f8 2992 /* PREFIX_0F62 */
041bd2e0 2993 {
4e7d34a6 2994 { "punpckldq",{ MX, EMd } },
592d1631 2995 { Bad_Opcode },
4e7d34a6 2996 { "punpckldq",{ MX, EMx } },
041bd2e0 2997 },
4e7d34a6 2998
1ceb70f8 2999 /* PREFIX_0F6C */
041bd2e0 3000 {
592d1631
L
3001 { Bad_Opcode },
3002 { Bad_Opcode },
4e7d34a6 3003 { "punpcklqdq", { XM, EXx } },
0f17484f 3004 },
4e7d34a6 3005
1ceb70f8 3006 /* PREFIX_0F6D */
0f17484f 3007 {
592d1631
L
3008 { Bad_Opcode },
3009 { Bad_Opcode },
4e7d34a6 3010 { "punpckhqdq", { XM, EXx } },
041bd2e0 3011 },
4e7d34a6 3012
1ceb70f8 3013 /* PREFIX_0F6F */
ca164297 3014 {
4e7d34a6
L
3015 { "movq", { MX, EM } },
3016 { "movdqu", { XM, EXx } },
3017 { "movdqa", { XM, EXx } },
ca164297 3018 },
4e7d34a6 3019
1ceb70f8 3020 /* PREFIX_0F70 */
4e7d34a6
L
3021 {
3022 { "pshufw", { MX, EM, Ib } },
3023 { "pshufhw",{ XM, EXx, Ib } },
3024 { "pshufd", { XM, EXx, Ib } },
3025 { "pshuflw",{ XM, EXx, Ib } },
3026 },
3027
92fddf8e
L
3028 /* PREFIX_0F73_REG_3 */
3029 {
592d1631
L
3030 { Bad_Opcode },
3031 { Bad_Opcode },
92fddf8e 3032 { "psrldq", { XS, Ib } },
92fddf8e
L
3033 },
3034
3035 /* PREFIX_0F73_REG_7 */
3036 {
592d1631
L
3037 { Bad_Opcode },
3038 { Bad_Opcode },
92fddf8e 3039 { "pslldq", { XS, Ib } },
92fddf8e
L
3040 },
3041
1ceb70f8 3042 /* PREFIX_0F78 */
4e7d34a6
L
3043 {
3044 {"vmread", { Em, Gm } },
592d1631 3045 { Bad_Opcode },
4e7d34a6
L
3046 {"extrq", { XS, Ib, Ib } },
3047 {"insertq", { XM, XS, Ib, Ib } },
3048 },
3049
1ceb70f8 3050 /* PREFIX_0F79 */
4e7d34a6
L
3051 {
3052 {"vmwrite", { Gm, Em } },
592d1631 3053 { Bad_Opcode },
4e7d34a6
L
3054 {"extrq", { XM, XS } },
3055 {"insertq", { XM, XS } },
3056 },
3057
1ceb70f8 3058 /* PREFIX_0F7C */
ca164297 3059 {
592d1631
L
3060 { Bad_Opcode },
3061 { Bad_Opcode },
09a2c6cf
L
3062 { "haddpd", { XM, EXx } },
3063 { "haddps", { XM, EXx } },
ca164297 3064 },
4e7d34a6 3065
1ceb70f8 3066 /* PREFIX_0F7D */
ca164297 3067 {
592d1631
L
3068 { Bad_Opcode },
3069 { Bad_Opcode },
09a2c6cf
L
3070 { "hsubpd", { XM, EXx } },
3071 { "hsubps", { XM, EXx } },
ca164297 3072 },
4e7d34a6 3073
1ceb70f8 3074 /* PREFIX_0F7E */
ca164297 3075 {
4e7d34a6
L
3076 { "movK", { Edq, MX } },
3077 { "movq", { XM, EXq } },
3078 { "movK", { Edq, XM } },
ca164297 3079 },
4e7d34a6 3080
1ceb70f8 3081 /* PREFIX_0F7F */
ca164297 3082 {
b6169b20
L
3083 { "movq", { EMS, MX } },
3084 { "movdqu", { EXxS, XM } },
3085 { "movdqa", { EXxS, XM } },
ca164297 3086 },
4e7d34a6 3087
c7b8aa3a
L
3088 /* PREFIX_0FAE_REG_0 */
3089 {
3090 { Bad_Opcode },
3091 { "rdfsbase", { Ev } },
3092 },
3093
3094 /* PREFIX_0FAE_REG_1 */
3095 {
3096 { Bad_Opcode },
3097 { "rdgsbase", { Ev } },
3098 },
3099
3100 /* PREFIX_0FAE_REG_2 */
3101 {
3102 { Bad_Opcode },
3103 { "wrfsbase", { Ev } },
3104 },
3105
3106 /* PREFIX_0FAE_REG_3 */
3107 {
3108 { Bad_Opcode },
3109 { "wrgsbase", { Ev } },
3110 },
3111
1ceb70f8 3112 /* PREFIX_0FB8 */
ca164297 3113 {
592d1631 3114 { Bad_Opcode },
4e7d34a6 3115 { "popcntS", { Gv, Ev } },
ca164297 3116 },
4e7d34a6 3117
f12dc422
L
3118 /* PREFIX_0FBC */
3119 {
3120 { "bsfS", { Gv, Ev } },
3121 { "tzcntS", { Gv, Ev } },
3122 { "bsfS", { Gv, Ev } },
3123 },
3124
1ceb70f8 3125 /* PREFIX_0FBD */
050dfa73 3126 {
4e7d34a6
L
3127 { "bsrS", { Gv, Ev } },
3128 { "lzcntS", { Gv, Ev } },
3129 { "bsrS", { Gv, Ev } },
050dfa73
MM
3130 },
3131
1ceb70f8 3132 /* PREFIX_0FC2 */
050dfa73 3133 {
ad19981d
L
3134 { "cmpps", { XM, EXx, CMP } },
3135 { "cmpss", { XM, EXd, CMP } },
3136 { "cmppd", { XM, EXx, CMP } },
3137 { "cmpsd", { XM, EXq, CMP } },
050dfa73 3138 },
246c51aa 3139
4ee52178
L
3140 /* PREFIX_0FC3 */
3141 {
3142 { "movntiS", { Ma, Gv } },
4ee52178
L
3143 },
3144
92fddf8e
L
3145 /* PREFIX_0FC7_REG_6 */
3146 {
3147 { "vmptrld",{ Mq } },
3148 { "vmxon", { Mq } },
3149 { "vmclear",{ Mq } },
92fddf8e
L
3150 },
3151
1ceb70f8 3152 /* PREFIX_0FD0 */
050dfa73 3153 {
592d1631
L
3154 { Bad_Opcode },
3155 { Bad_Opcode },
4e7d34a6
L
3156 { "addsubpd", { XM, EXx } },
3157 { "addsubps", { XM, EXx } },
246c51aa 3158 },
050dfa73 3159
1ceb70f8 3160 /* PREFIX_0FD6 */
050dfa73 3161 {
592d1631 3162 { Bad_Opcode },
4e7d34a6 3163 { "movq2dq",{ XM, MS } },
b6169b20 3164 { "movq", { EXqS, XM } },
4e7d34a6 3165 { "movdq2q",{ MX, XS } },
050dfa73
MM
3166 },
3167
1ceb70f8 3168 /* PREFIX_0FE6 */
7918206c 3169 {
592d1631 3170 { Bad_Opcode },
4e7d34a6
L
3171 { "cvtdq2pd", { XM, EXq } },
3172 { "cvttpd2dq", { XM, EXx } },
3173 { "cvtpd2dq", { XM, EXx } },
7918206c 3174 },
8b38ad71 3175
1ceb70f8 3176 /* PREFIX_0FE7 */
8b38ad71 3177 {
4ee52178 3178 { "movntq", { Mq, MX } },
592d1631 3179 { Bad_Opcode },
75c135a8 3180 { MOD_TABLE (MOD_0FE7_PREFIX_2) },
4e7d34a6
L
3181 },
3182
1ceb70f8 3183 /* PREFIX_0FF0 */
4e7d34a6 3184 {
592d1631
L
3185 { Bad_Opcode },
3186 { Bad_Opcode },
3187 { Bad_Opcode },
1ceb70f8 3188 { MOD_TABLE (MOD_0FF0_PREFIX_3) },
4e7d34a6
L
3189 },
3190
1ceb70f8 3191 /* PREFIX_0FF7 */
4e7d34a6
L
3192 {
3193 { "maskmovq", { MX, MS } },
592d1631 3194 { Bad_Opcode },
4e7d34a6 3195 { "maskmovdqu", { XM, XS } },
8b38ad71 3196 },
42903f7f 3197
1ceb70f8 3198 /* PREFIX_0F3810 */
42903f7f 3199 {
592d1631
L
3200 { Bad_Opcode },
3201 { Bad_Opcode },
88a94849 3202 { "pblendvb", { XM, EXx, XMM0 } },
42903f7f
L
3203 },
3204
1ceb70f8 3205 /* PREFIX_0F3814 */
42903f7f 3206 {
592d1631
L
3207 { Bad_Opcode },
3208 { Bad_Opcode },
88a94849 3209 { "blendvps", { XM, EXx, XMM0 } },
42903f7f
L
3210 },
3211
1ceb70f8 3212 /* PREFIX_0F3815 */
42903f7f 3213 {
592d1631
L
3214 { Bad_Opcode },
3215 { Bad_Opcode },
09a2c6cf 3216 { "blendvpd", { XM, EXx, XMM0 } },
42903f7f
L
3217 },
3218
1ceb70f8 3219 /* PREFIX_0F3817 */
42903f7f 3220 {
592d1631
L
3221 { Bad_Opcode },
3222 { Bad_Opcode },
09a2c6cf 3223 { "ptest", { XM, EXx } },
42903f7f
L
3224 },
3225
1ceb70f8 3226 /* PREFIX_0F3820 */
42903f7f 3227 {
592d1631
L
3228 { Bad_Opcode },
3229 { Bad_Opcode },
8976381e 3230 { "pmovsxbw", { XM, EXq } },
42903f7f
L
3231 },
3232
1ceb70f8 3233 /* PREFIX_0F3821 */
42903f7f 3234 {
592d1631
L
3235 { Bad_Opcode },
3236 { Bad_Opcode },
8976381e 3237 { "pmovsxbd", { XM, EXd } },
42903f7f
L
3238 },
3239
1ceb70f8 3240 /* PREFIX_0F3822 */
42903f7f 3241 {
592d1631
L
3242 { Bad_Opcode },
3243 { Bad_Opcode },
8976381e 3244 { "pmovsxbq", { XM, EXw } },
42903f7f
L
3245 },
3246
1ceb70f8 3247 /* PREFIX_0F3823 */
42903f7f 3248 {
592d1631
L
3249 { Bad_Opcode },
3250 { Bad_Opcode },
8976381e 3251 { "pmovsxwd", { XM, EXq } },
42903f7f
L
3252 },
3253
1ceb70f8 3254 /* PREFIX_0F3824 */
42903f7f 3255 {
592d1631
L
3256 { Bad_Opcode },
3257 { Bad_Opcode },
8976381e 3258 { "pmovsxwq", { XM, EXd } },
42903f7f
L
3259 },
3260
1ceb70f8 3261 /* PREFIX_0F3825 */
42903f7f 3262 {
592d1631
L
3263 { Bad_Opcode },
3264 { Bad_Opcode },
8976381e 3265 { "pmovsxdq", { XM, EXq } },
42903f7f
L
3266 },
3267
1ceb70f8 3268 /* PREFIX_0F3828 */
42903f7f 3269 {
592d1631
L
3270 { Bad_Opcode },
3271 { Bad_Opcode },
09a2c6cf 3272 { "pmuldq", { XM, EXx } },
42903f7f
L
3273 },
3274
1ceb70f8 3275 /* PREFIX_0F3829 */
42903f7f 3276 {
592d1631
L
3277 { Bad_Opcode },
3278 { Bad_Opcode },
09a2c6cf 3279 { "pcmpeqq", { XM, EXx } },
42903f7f
L
3280 },
3281
1ceb70f8 3282 /* PREFIX_0F382A */
42903f7f 3283 {
592d1631
L
3284 { Bad_Opcode },
3285 { Bad_Opcode },
75c135a8 3286 { MOD_TABLE (MOD_0F382A_PREFIX_2) },
42903f7f
L
3287 },
3288
1ceb70f8 3289 /* PREFIX_0F382B */
42903f7f 3290 {
592d1631
L
3291 { Bad_Opcode },
3292 { Bad_Opcode },
09a2c6cf 3293 { "packusdw", { XM, EXx } },
42903f7f
L
3294 },
3295
1ceb70f8 3296 /* PREFIX_0F3830 */
42903f7f 3297 {
592d1631
L
3298 { Bad_Opcode },
3299 { Bad_Opcode },
8976381e 3300 { "pmovzxbw", { XM, EXq } },
42903f7f
L
3301 },
3302
1ceb70f8 3303 /* PREFIX_0F3831 */
42903f7f 3304 {
592d1631
L
3305 { Bad_Opcode },
3306 { Bad_Opcode },
8976381e 3307 { "pmovzxbd", { XM, EXd } },
42903f7f
L
3308 },
3309
1ceb70f8 3310 /* PREFIX_0F3832 */
42903f7f 3311 {
592d1631
L
3312 { Bad_Opcode },
3313 { Bad_Opcode },
8976381e 3314 { "pmovzxbq", { XM, EXw } },
42903f7f
L
3315 },
3316
1ceb70f8 3317 /* PREFIX_0F3833 */
42903f7f 3318 {
592d1631
L
3319 { Bad_Opcode },
3320 { Bad_Opcode },
8976381e 3321 { "pmovzxwd", { XM, EXq } },
42903f7f
L
3322 },
3323
1ceb70f8 3324 /* PREFIX_0F3834 */
42903f7f 3325 {
592d1631
L
3326 { Bad_Opcode },
3327 { Bad_Opcode },
8976381e 3328 { "pmovzxwq", { XM, EXd } },
42903f7f
L
3329 },
3330
1ceb70f8 3331 /* PREFIX_0F3835 */
42903f7f 3332 {
592d1631
L
3333 { Bad_Opcode },
3334 { Bad_Opcode },
8976381e 3335 { "pmovzxdq", { XM, EXq } },
42903f7f
L
3336 },
3337
1ceb70f8 3338 /* PREFIX_0F3837 */
4e7d34a6 3339 {
592d1631
L
3340 { Bad_Opcode },
3341 { Bad_Opcode },
4e7d34a6 3342 { "pcmpgtq", { XM, EXx } },
4e7d34a6
L
3343 },
3344
1ceb70f8 3345 /* PREFIX_0F3838 */
42903f7f 3346 {
592d1631
L
3347 { Bad_Opcode },
3348 { Bad_Opcode },
09a2c6cf 3349 { "pminsb", { XM, EXx } },
42903f7f
L
3350 },
3351
1ceb70f8 3352 /* PREFIX_0F3839 */
42903f7f 3353 {
592d1631
L
3354 { Bad_Opcode },
3355 { Bad_Opcode },
09a2c6cf 3356 { "pminsd", { XM, EXx } },
42903f7f
L
3357 },
3358
1ceb70f8 3359 /* PREFIX_0F383A */
42903f7f 3360 {
592d1631
L
3361 { Bad_Opcode },
3362 { Bad_Opcode },
09a2c6cf 3363 { "pminuw", { XM, EXx } },
42903f7f
L
3364 },
3365
1ceb70f8 3366 /* PREFIX_0F383B */
42903f7f 3367 {
592d1631
L
3368 { Bad_Opcode },
3369 { Bad_Opcode },
09a2c6cf 3370 { "pminud", { XM, EXx } },
42903f7f
L
3371 },
3372
1ceb70f8 3373 /* PREFIX_0F383C */
42903f7f 3374 {
592d1631
L
3375 { Bad_Opcode },
3376 { Bad_Opcode },
09a2c6cf 3377 { "pmaxsb", { XM, EXx } },
42903f7f
L
3378 },
3379
1ceb70f8 3380 /* PREFIX_0F383D */
42903f7f 3381 {
592d1631
L
3382 { Bad_Opcode },
3383 { Bad_Opcode },
09a2c6cf 3384 { "pmaxsd", { XM, EXx } },
42903f7f
L
3385 },
3386
1ceb70f8 3387 /* PREFIX_0F383E */
42903f7f 3388 {
592d1631
L
3389 { Bad_Opcode },
3390 { Bad_Opcode },
09a2c6cf 3391 { "pmaxuw", { XM, EXx } },
42903f7f
L
3392 },
3393
1ceb70f8 3394 /* PREFIX_0F383F */
42903f7f 3395 {
592d1631
L
3396 { Bad_Opcode },
3397 { Bad_Opcode },
09a2c6cf 3398 { "pmaxud", { XM, EXx } },
42903f7f
L
3399 },
3400
1ceb70f8 3401 /* PREFIX_0F3840 */
42903f7f 3402 {
592d1631
L
3403 { Bad_Opcode },
3404 { Bad_Opcode },
09a2c6cf 3405 { "pmulld", { XM, EXx } },
42903f7f
L
3406 },
3407
1ceb70f8 3408 /* PREFIX_0F3841 */
42903f7f 3409 {
592d1631
L
3410 { Bad_Opcode },
3411 { Bad_Opcode },
09a2c6cf 3412 { "phminposuw", { XM, EXx } },
42903f7f
L
3413 },
3414
f1f8f695
L
3415 /* PREFIX_0F3880 */
3416 {
592d1631
L
3417 { Bad_Opcode },
3418 { Bad_Opcode },
f1f8f695 3419 { "invept", { Gm, Mo } },
f1f8f695
L
3420 },
3421
3422 /* PREFIX_0F3881 */
3423 {
592d1631
L
3424 { Bad_Opcode },
3425 { Bad_Opcode },
f1f8f695 3426 { "invvpid", { Gm, Mo } },
f1f8f695
L
3427 },
3428
c0f3af97
L
3429 /* PREFIX_0F38DB */
3430 {
592d1631
L
3431 { Bad_Opcode },
3432 { Bad_Opcode },
c0f3af97 3433 { "aesimc", { XM, EXx } },
c0f3af97
L
3434 },
3435
3436 /* PREFIX_0F38DC */
3437 {
592d1631
L
3438 { Bad_Opcode },
3439 { Bad_Opcode },
c0f3af97 3440 { "aesenc", { XM, EXx } },
c0f3af97
L
3441 },
3442
3443 /* PREFIX_0F38DD */
3444 {
592d1631
L
3445 { Bad_Opcode },
3446 { Bad_Opcode },
c0f3af97 3447 { "aesenclast", { XM, EXx } },
c0f3af97
L
3448 },
3449
3450 /* PREFIX_0F38DE */
3451 {
592d1631
L
3452 { Bad_Opcode },
3453 { Bad_Opcode },
c0f3af97 3454 { "aesdec", { XM, EXx } },
c0f3af97
L
3455 },
3456
3457 /* PREFIX_0F38DF */
3458 {
592d1631
L
3459 { Bad_Opcode },
3460 { Bad_Opcode },
c0f3af97 3461 { "aesdeclast", { XM, EXx } },
c0f3af97
L
3462 },
3463
1ceb70f8 3464 /* PREFIX_0F38F0 */
4e7d34a6 3465 {
f1f8f695 3466 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
592d1631 3467 { Bad_Opcode },
f1f8f695 3468 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
4e7d34a6
L
3469 { "crc32", { Gdq, { CRC32_Fixup, b_mode } } },
3470 },
3471
1ceb70f8 3472 /* PREFIX_0F38F1 */
4e7d34a6 3473 {
f1f8f695 3474 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
592d1631 3475 { Bad_Opcode },
f1f8f695 3476 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
4e7d34a6
L
3477 { "crc32", { Gdq, { CRC32_Fixup, v_mode } } },
3478 },
3479
1ceb70f8 3480 /* PREFIX_0F3A08 */
42903f7f 3481 {
592d1631
L
3482 { Bad_Opcode },
3483 { Bad_Opcode },
09a2c6cf 3484 { "roundps", { XM, EXx, Ib } },
42903f7f
L
3485 },
3486
1ceb70f8 3487 /* PREFIX_0F3A09 */
42903f7f 3488 {
592d1631
L
3489 { Bad_Opcode },
3490 { Bad_Opcode },
09a2c6cf 3491 { "roundpd", { XM, EXx, Ib } },
42903f7f
L
3492 },
3493
1ceb70f8 3494 /* PREFIX_0F3A0A */
42903f7f 3495 {
592d1631
L
3496 { Bad_Opcode },
3497 { Bad_Opcode },
09335d05 3498 { "roundss", { XM, EXd, Ib } },
42903f7f
L
3499 },
3500
1ceb70f8 3501 /* PREFIX_0F3A0B */
42903f7f 3502 {
592d1631
L
3503 { Bad_Opcode },
3504 { Bad_Opcode },
09335d05 3505 { "roundsd", { XM, EXq, Ib } },
42903f7f
L
3506 },
3507
1ceb70f8 3508 /* PREFIX_0F3A0C */
42903f7f 3509 {
592d1631
L
3510 { Bad_Opcode },
3511 { Bad_Opcode },
09a2c6cf 3512 { "blendps", { XM, EXx, Ib } },
42903f7f
L
3513 },
3514
1ceb70f8 3515 /* PREFIX_0F3A0D */
42903f7f 3516 {
592d1631
L
3517 { Bad_Opcode },
3518 { Bad_Opcode },
09a2c6cf 3519 { "blendpd", { XM, EXx, Ib } },
42903f7f
L
3520 },
3521
1ceb70f8 3522 /* PREFIX_0F3A0E */
42903f7f 3523 {
592d1631
L
3524 { Bad_Opcode },
3525 { Bad_Opcode },
09a2c6cf 3526 { "pblendw", { XM, EXx, Ib } },
42903f7f
L
3527 },
3528
1ceb70f8 3529 /* PREFIX_0F3A14 */
42903f7f 3530 {
592d1631
L
3531 { Bad_Opcode },
3532 { Bad_Opcode },
42903f7f 3533 { "pextrb", { Edqb, XM, Ib } },
42903f7f
L
3534 },
3535
1ceb70f8 3536 /* PREFIX_0F3A15 */
42903f7f 3537 {
592d1631
L
3538 { Bad_Opcode },
3539 { Bad_Opcode },
42903f7f 3540 { "pextrw", { Edqw, XM, Ib } },
42903f7f
L
3541 },
3542
1ceb70f8 3543 /* PREFIX_0F3A16 */
42903f7f 3544 {
592d1631
L
3545 { Bad_Opcode },
3546 { Bad_Opcode },
42903f7f 3547 { "pextrK", { Edq, XM, Ib } },
42903f7f
L
3548 },
3549
1ceb70f8 3550 /* PREFIX_0F3A17 */
42903f7f 3551 {
592d1631
L
3552 { Bad_Opcode },
3553 { Bad_Opcode },
42903f7f 3554 { "extractps", { Edqd, XM, Ib } },
42903f7f
L
3555 },
3556
1ceb70f8 3557 /* PREFIX_0F3A20 */
42903f7f 3558 {
592d1631
L
3559 { Bad_Opcode },
3560 { Bad_Opcode },
42903f7f 3561 { "pinsrb", { XM, Edqb, Ib } },
42903f7f
L
3562 },
3563
1ceb70f8 3564 /* PREFIX_0F3A21 */
42903f7f 3565 {
592d1631
L
3566 { Bad_Opcode },
3567 { Bad_Opcode },
8976381e 3568 { "insertps", { XM, EXd, Ib } },
42903f7f
L
3569 },
3570
1ceb70f8 3571 /* PREFIX_0F3A22 */
42903f7f 3572 {
592d1631
L
3573 { Bad_Opcode },
3574 { Bad_Opcode },
42903f7f 3575 { "pinsrK", { XM, Edq, Ib } },
42903f7f
L
3576 },
3577
1ceb70f8 3578 /* PREFIX_0F3A40 */
42903f7f 3579 {
592d1631
L
3580 { Bad_Opcode },
3581 { Bad_Opcode },
09a2c6cf 3582 { "dpps", { XM, EXx, Ib } },
42903f7f
L
3583 },
3584
1ceb70f8 3585 /* PREFIX_0F3A41 */
42903f7f 3586 {
592d1631
L
3587 { Bad_Opcode },
3588 { Bad_Opcode },
09a2c6cf 3589 { "dppd", { XM, EXx, Ib } },
42903f7f
L
3590 },
3591
1ceb70f8 3592 /* PREFIX_0F3A42 */
42903f7f 3593 {
592d1631
L
3594 { Bad_Opcode },
3595 { Bad_Opcode },
09a2c6cf 3596 { "mpsadbw", { XM, EXx, Ib } },
42903f7f 3597 },
381d071f 3598
c0f3af97
L
3599 /* PREFIX_0F3A44 */
3600 {
592d1631
L
3601 { Bad_Opcode },
3602 { Bad_Opcode },
c0f3af97 3603 { "pclmulqdq", { XM, EXx, PCLMUL } },
c0f3af97
L
3604 },
3605
1ceb70f8 3606 /* PREFIX_0F3A60 */
381d071f 3607 {
592d1631
L
3608 { Bad_Opcode },
3609 { Bad_Opcode },
4e7d34a6 3610 { "pcmpestrm", { XM, EXx, Ib } },
381d071f
L
3611 },
3612
1ceb70f8 3613 /* PREFIX_0F3A61 */
381d071f 3614 {
592d1631
L
3615 { Bad_Opcode },
3616 { Bad_Opcode },
4e7d34a6 3617 { "pcmpestri", { XM, EXx, Ib } },
381d071f
L
3618 },
3619
1ceb70f8 3620 /* PREFIX_0F3A62 */
381d071f 3621 {
592d1631
L
3622 { Bad_Opcode },
3623 { Bad_Opcode },
4e7d34a6 3624 { "pcmpistrm", { XM, EXx, Ib } },
381d071f
L
3625 },
3626
1ceb70f8 3627 /* PREFIX_0F3A63 */
381d071f 3628 {
592d1631
L
3629 { Bad_Opcode },
3630 { Bad_Opcode },
4e7d34a6 3631 { "pcmpistri", { XM, EXx, Ib } },
381d071f 3632 },
09a2c6cf 3633
c0f3af97 3634 /* PREFIX_0F3ADF */
09a2c6cf 3635 {
592d1631
L
3636 { Bad_Opcode },
3637 { Bad_Opcode },
c0f3af97 3638 { "aeskeygenassist", { XM, EXx, Ib } },
09a2c6cf
L
3639 },
3640
592a252b 3641 /* PREFIX_VEX_0F10 */
09a2c6cf 3642 {
592a252b
L
3643 { VEX_W_TABLE (VEX_W_0F10_P_0) },
3644 { VEX_LEN_TABLE (VEX_LEN_0F10_P_1) },
3645 { VEX_W_TABLE (VEX_W_0F10_P_2) },
3646 { VEX_LEN_TABLE (VEX_LEN_0F10_P_3) },
09a2c6cf
L
3647 },
3648
592a252b 3649 /* PREFIX_VEX_0F11 */
09a2c6cf 3650 {
592a252b
L
3651 { VEX_W_TABLE (VEX_W_0F11_P_0) },
3652 { VEX_LEN_TABLE (VEX_LEN_0F11_P_1) },
3653 { VEX_W_TABLE (VEX_W_0F11_P_2) },
3654 { VEX_LEN_TABLE (VEX_LEN_0F11_P_3) },
09a2c6cf
L
3655 },
3656
592a252b 3657 /* PREFIX_VEX_0F12 */
09a2c6cf 3658 {
592a252b
L
3659 { MOD_TABLE (MOD_VEX_0F12_PREFIX_0) },
3660 { VEX_W_TABLE (VEX_W_0F12_P_1) },
3661 { VEX_LEN_TABLE (VEX_LEN_0F12_P_2) },
3662 { VEX_W_TABLE (VEX_W_0F12_P_3) },
09a2c6cf
L
3663 },
3664
592a252b 3665 /* PREFIX_VEX_0F16 */
09a2c6cf 3666 {
592a252b
L
3667 { MOD_TABLE (MOD_VEX_0F16_PREFIX_0) },
3668 { VEX_W_TABLE (VEX_W_0F16_P_1) },
3669 { VEX_LEN_TABLE (VEX_LEN_0F16_P_2) },
5f754f58 3670 },
7c52e0e8 3671
592a252b 3672 /* PREFIX_VEX_0F2A */
5f754f58 3673 {
592d1631 3674 { Bad_Opcode },
592a252b 3675 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_1) },
592d1631 3676 { Bad_Opcode },
592a252b 3677 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_3) },
5f754f58 3678 },
7c52e0e8 3679
592a252b 3680 /* PREFIX_VEX_0F2C */
5f754f58 3681 {
592d1631 3682 { Bad_Opcode },
592a252b 3683 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_1) },
592d1631 3684 { Bad_Opcode },
592a252b 3685 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_3) },
5f754f58 3686 },
7c52e0e8 3687
592a252b 3688 /* PREFIX_VEX_0F2D */
7c52e0e8 3689 {
592d1631 3690 { Bad_Opcode },
592a252b 3691 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_1) },
592d1631 3692 { Bad_Opcode },
592a252b 3693 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_3) },
7c52e0e8
L
3694 },
3695
592a252b 3696 /* PREFIX_VEX_0F2E */
7c52e0e8 3697 {
592a252b 3698 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_0) },
592d1631 3699 { Bad_Opcode },
592a252b 3700 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_2) },
7c52e0e8
L
3701 },
3702
592a252b 3703 /* PREFIX_VEX_0F2F */
7c52e0e8 3704 {
592a252b 3705 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_0) },
592d1631 3706 { Bad_Opcode },
592a252b 3707 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_2) },
7c52e0e8
L
3708 },
3709
592a252b 3710 /* PREFIX_VEX_0F51 */
7c52e0e8 3711 {
592a252b
L
3712 { VEX_W_TABLE (VEX_W_0F51_P_0) },
3713 { VEX_LEN_TABLE (VEX_LEN_0F51_P_1) },
3714 { VEX_W_TABLE (VEX_W_0F51_P_2) },
3715 { VEX_LEN_TABLE (VEX_LEN_0F51_P_3) },
7c52e0e8
L
3716 },
3717
592a252b 3718 /* PREFIX_VEX_0F52 */
7c52e0e8 3719 {
592a252b
L
3720 { VEX_W_TABLE (VEX_W_0F52_P_0) },
3721 { VEX_LEN_TABLE (VEX_LEN_0F52_P_1) },
7c52e0e8
L
3722 },
3723
592a252b 3724 /* PREFIX_VEX_0F53 */
7c52e0e8 3725 {
592a252b
L
3726 { VEX_W_TABLE (VEX_W_0F53_P_0) },
3727 { VEX_LEN_TABLE (VEX_LEN_0F53_P_1) },
7c52e0e8
L
3728 },
3729
592a252b 3730 /* PREFIX_VEX_0F58 */
7c52e0e8 3731 {
592a252b
L
3732 { VEX_W_TABLE (VEX_W_0F58_P_0) },
3733 { VEX_LEN_TABLE (VEX_LEN_0F58_P_1) },
3734 { VEX_W_TABLE (VEX_W_0F58_P_2) },
3735 { VEX_LEN_TABLE (VEX_LEN_0F58_P_3) },
7c52e0e8
L
3736 },
3737
592a252b 3738 /* PREFIX_VEX_0F59 */
7c52e0e8 3739 {
592a252b
L
3740 { VEX_W_TABLE (VEX_W_0F59_P_0) },
3741 { VEX_LEN_TABLE (VEX_LEN_0F59_P_1) },
3742 { VEX_W_TABLE (VEX_W_0F59_P_2) },
3743 { VEX_LEN_TABLE (VEX_LEN_0F59_P_3) },
7c52e0e8
L
3744 },
3745
592a252b 3746 /* PREFIX_VEX_0F5A */
7c52e0e8 3747 {
592a252b
L
3748 { VEX_W_TABLE (VEX_W_0F5A_P_0) },
3749 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_1) },
c0f3af97 3750 { "vcvtpd2ps%XY", { XMM, EXx } },
592a252b 3751 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_3) },
7c52e0e8
L
3752 },
3753
592a252b 3754 /* PREFIX_VEX_0F5B */
7c52e0e8 3755 {
592a252b
L
3756 { VEX_W_TABLE (VEX_W_0F5B_P_0) },
3757 { VEX_W_TABLE (VEX_W_0F5B_P_1) },
3758 { VEX_W_TABLE (VEX_W_0F5B_P_2) },
7c52e0e8
L
3759 },
3760
592a252b 3761 /* PREFIX_VEX_0F5C */
7c52e0e8 3762 {
592a252b
L
3763 { VEX_W_TABLE (VEX_W_0F5C_P_0) },
3764 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_1) },
3765 { VEX_W_TABLE (VEX_W_0F5C_P_2) },
3766 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_3) },
7c52e0e8
L
3767 },
3768
592a252b 3769 /* PREFIX_VEX_0F5D */
7c52e0e8 3770 {
592a252b
L
3771 { VEX_W_TABLE (VEX_W_0F5D_P_0) },
3772 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_1) },
3773 { VEX_W_TABLE (VEX_W_0F5D_P_2) },
3774 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_3) },
7c52e0e8
L
3775 },
3776
592a252b 3777 /* PREFIX_VEX_0F5E */
7c52e0e8 3778 {
592a252b
L
3779 { VEX_W_TABLE (VEX_W_0F5E_P_0) },
3780 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_1) },
3781 { VEX_W_TABLE (VEX_W_0F5E_P_2) },
3782 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_3) },
7c52e0e8
L
3783 },
3784
592a252b 3785 /* PREFIX_VEX_0F5F */
7c52e0e8 3786 {
592a252b
L
3787 { VEX_W_TABLE (VEX_W_0F5F_P_0) },
3788 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_1) },
3789 { VEX_W_TABLE (VEX_W_0F5F_P_2) },
3790 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_3) },
7c52e0e8
L
3791 },
3792
592a252b 3793 /* PREFIX_VEX_0F60 */
7c52e0e8 3794 {
592d1631
L
3795 { Bad_Opcode },
3796 { Bad_Opcode },
592a252b 3797 { VEX_LEN_TABLE (VEX_LEN_0F60_P_2) },
7c52e0e8
L
3798 },
3799
592a252b 3800 /* PREFIX_VEX_0F61 */
7c52e0e8 3801 {
592d1631
L
3802 { Bad_Opcode },
3803 { Bad_Opcode },
592a252b 3804 { VEX_LEN_TABLE (VEX_LEN_0F61_P_2) },
7c52e0e8
L
3805 },
3806
592a252b 3807 /* PREFIX_VEX_0F62 */
7c52e0e8 3808 {
592d1631
L
3809 { Bad_Opcode },
3810 { Bad_Opcode },
592a252b 3811 { VEX_LEN_TABLE (VEX_LEN_0F62_P_2) },
7c52e0e8
L
3812 },
3813
592a252b 3814 /* PREFIX_VEX_0F63 */
7c52e0e8 3815 {
592d1631
L
3816 { Bad_Opcode },
3817 { Bad_Opcode },
592a252b 3818 { VEX_LEN_TABLE (VEX_LEN_0F63_P_2) },
7c52e0e8
L
3819 },
3820
592a252b 3821 /* PREFIX_VEX_0F64 */
7c52e0e8 3822 {
592d1631
L
3823 { Bad_Opcode },
3824 { Bad_Opcode },
592a252b 3825 { VEX_LEN_TABLE (VEX_LEN_0F64_P_2) },
7c52e0e8
L
3826 },
3827
592a252b 3828 /* PREFIX_VEX_0F65 */
7c52e0e8 3829 {
592d1631
L
3830 { Bad_Opcode },
3831 { Bad_Opcode },
592a252b 3832 { VEX_LEN_TABLE (VEX_LEN_0F65_P_2) },
7c52e0e8
L
3833 },
3834
592a252b 3835 /* PREFIX_VEX_0F66 */
7c52e0e8 3836 {
592d1631
L
3837 { Bad_Opcode },
3838 { Bad_Opcode },
592a252b 3839 { VEX_LEN_TABLE (VEX_LEN_0F66_P_2) },
7c52e0e8 3840 },
6439fc28 3841
592a252b 3842 /* PREFIX_VEX_0F67 */
331d2d0d 3843 {
592d1631
L
3844 { Bad_Opcode },
3845 { Bad_Opcode },
592a252b 3846 { VEX_LEN_TABLE (VEX_LEN_0F67_P_2) },
c0f3af97
L
3847 },
3848
592a252b 3849 /* PREFIX_VEX_0F68 */
c0f3af97 3850 {
592d1631
L
3851 { Bad_Opcode },
3852 { Bad_Opcode },
592a252b 3853 { VEX_LEN_TABLE (VEX_LEN_0F68_P_2) },
c0f3af97
L
3854 },
3855
592a252b 3856 /* PREFIX_VEX_0F69 */
c0f3af97 3857 {
592d1631
L
3858 { Bad_Opcode },
3859 { Bad_Opcode },
592a252b 3860 { VEX_LEN_TABLE (VEX_LEN_0F69_P_2) },
c0f3af97
L
3861 },
3862
592a252b 3863 /* PREFIX_VEX_0F6A */
c0f3af97 3864 {
592d1631
L
3865 { Bad_Opcode },
3866 { Bad_Opcode },
592a252b 3867 { VEX_LEN_TABLE (VEX_LEN_0F6A_P_2) },
c0f3af97
L
3868 },
3869
592a252b 3870 /* PREFIX_VEX_0F6B */
c0f3af97 3871 {
592d1631
L
3872 { Bad_Opcode },
3873 { Bad_Opcode },
592a252b 3874 { VEX_LEN_TABLE (VEX_LEN_0F6B_P_2) },
c0f3af97
L
3875 },
3876
592a252b 3877 /* PREFIX_VEX_0F6C */
c0f3af97 3878 {
592d1631
L
3879 { Bad_Opcode },
3880 { Bad_Opcode },
592a252b 3881 { VEX_LEN_TABLE (VEX_LEN_0F6C_P_2) },
c0f3af97
L
3882 },
3883
592a252b 3884 /* PREFIX_VEX_0F6D */
c0f3af97 3885 {
592d1631
L
3886 { Bad_Opcode },
3887 { Bad_Opcode },
592a252b 3888 { VEX_LEN_TABLE (VEX_LEN_0F6D_P_2) },
c0f3af97
L
3889 },
3890
592a252b 3891 /* PREFIX_VEX_0F6E */
c0f3af97 3892 {
592d1631
L
3893 { Bad_Opcode },
3894 { Bad_Opcode },
592a252b 3895 { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2) },
c0f3af97
L
3896 },
3897
592a252b 3898 /* PREFIX_VEX_0F6F */
c0f3af97 3899 {
592d1631 3900 { Bad_Opcode },
592a252b
L
3901 { VEX_W_TABLE (VEX_W_0F6F_P_1) },
3902 { VEX_W_TABLE (VEX_W_0F6F_P_2) },
c0f3af97
L
3903 },
3904
592a252b 3905 /* PREFIX_VEX_0F70 */
c0f3af97 3906 {
592d1631 3907 { Bad_Opcode },
592a252b
L
3908 { VEX_LEN_TABLE (VEX_LEN_0F70_P_1) },
3909 { VEX_LEN_TABLE (VEX_LEN_0F70_P_2) },
3910 { VEX_LEN_TABLE (VEX_LEN_0F70_P_3) },
c0f3af97
L
3911 },
3912
592a252b 3913 /* PREFIX_VEX_0F71_REG_2 */
c0f3af97 3914 {
592d1631
L
3915 { Bad_Opcode },
3916 { Bad_Opcode },
592a252b 3917 { VEX_LEN_TABLE (VEX_LEN_0F71_R_2_P_2) },
c0f3af97
L
3918 },
3919
592a252b 3920 /* PREFIX_VEX_0F71_REG_4 */
c0f3af97 3921 {
592d1631
L
3922 { Bad_Opcode },
3923 { Bad_Opcode },
592a252b 3924 { VEX_LEN_TABLE (VEX_LEN_0F71_R_4_P_2) },
c0f3af97
L
3925 },
3926
592a252b 3927 /* PREFIX_VEX_0F71_REG_6 */
c0f3af97 3928 {
592d1631
L
3929 { Bad_Opcode },
3930 { Bad_Opcode },
592a252b 3931 { VEX_LEN_TABLE (VEX_LEN_0F71_R_6_P_2) },
c0f3af97
L
3932 },
3933
592a252b 3934 /* PREFIX_VEX_0F72_REG_2 */
c0f3af97 3935 {
592d1631
L
3936 { Bad_Opcode },
3937 { Bad_Opcode },
592a252b 3938 { VEX_LEN_TABLE (VEX_LEN_0F72_R_2_P_2) },
c0f3af97
L
3939 },
3940
592a252b 3941 /* PREFIX_VEX_0F72_REG_4 */
c0f3af97 3942 {
592d1631
L
3943 { Bad_Opcode },
3944 { Bad_Opcode },
592a252b 3945 { VEX_LEN_TABLE (VEX_LEN_0F72_R_4_P_2) },
c0f3af97
L
3946 },
3947
592a252b 3948 /* PREFIX_VEX_0F72_REG_6 */
c0f3af97 3949 {
592d1631
L
3950 { Bad_Opcode },
3951 { Bad_Opcode },
592a252b 3952 { VEX_LEN_TABLE (VEX_LEN_0F72_R_6_P_2) },
c0f3af97
L
3953 },
3954
592a252b 3955 /* PREFIX_VEX_0F73_REG_2 */
c0f3af97 3956 {
592d1631
L
3957 { Bad_Opcode },
3958 { Bad_Opcode },
592a252b 3959 { VEX_LEN_TABLE (VEX_LEN_0F73_R_2_P_2) },
c0f3af97
L
3960 },
3961
592a252b 3962 /* PREFIX_VEX_0F73_REG_3 */
c0f3af97 3963 {
592d1631
L
3964 { Bad_Opcode },
3965 { Bad_Opcode },
592a252b 3966 { VEX_LEN_TABLE (VEX_LEN_0F73_R_3_P_2) },
c0f3af97
L
3967 },
3968
592a252b 3969 /* PREFIX_VEX_0F73_REG_6 */
c0f3af97 3970 {
592d1631
L
3971 { Bad_Opcode },
3972 { Bad_Opcode },
592a252b 3973 { VEX_LEN_TABLE (VEX_LEN_0F73_R_6_P_2) },
c0f3af97
L
3974 },
3975
592a252b 3976 /* PREFIX_VEX_0F73_REG_7 */
c0f3af97 3977 {
592d1631
L
3978 { Bad_Opcode },
3979 { Bad_Opcode },
592a252b 3980 { VEX_LEN_TABLE (VEX_LEN_0F73_R_7_P_2) },
c0f3af97
L
3981 },
3982
592a252b 3983 /* PREFIX_VEX_0F74 */
c0f3af97 3984 {
592d1631
L
3985 { Bad_Opcode },
3986 { Bad_Opcode },
592a252b 3987 { VEX_LEN_TABLE (VEX_LEN_0F74_P_2) },
c0f3af97
L
3988 },
3989
592a252b 3990 /* PREFIX_VEX_0F75 */
c0f3af97 3991 {
592d1631
L
3992 { Bad_Opcode },
3993 { Bad_Opcode },
592a252b 3994 { VEX_LEN_TABLE (VEX_LEN_0F75_P_2) },
c0f3af97
L
3995 },
3996
592a252b 3997 /* PREFIX_VEX_0F76 */
c0f3af97 3998 {
592d1631
L
3999 { Bad_Opcode },
4000 { Bad_Opcode },
592a252b 4001 { VEX_LEN_TABLE (VEX_LEN_0F76_P_2) },
c0f3af97
L
4002 },
4003
592a252b 4004 /* PREFIX_VEX_0F77 */
c0f3af97 4005 {
592a252b 4006 { VEX_W_TABLE (VEX_W_0F77_P_0) },
c0f3af97
L
4007 },
4008
592a252b 4009 /* PREFIX_VEX_0F7C */
c0f3af97 4010 {
592d1631
L
4011 { Bad_Opcode },
4012 { Bad_Opcode },
592a252b
L
4013 { VEX_W_TABLE (VEX_W_0F7C_P_2) },
4014 { VEX_W_TABLE (VEX_W_0F7C_P_3) },
c0f3af97
L
4015 },
4016
592a252b 4017 /* PREFIX_VEX_0F7D */
c0f3af97 4018 {
592d1631
L
4019 { Bad_Opcode },
4020 { Bad_Opcode },
592a252b
L
4021 { VEX_W_TABLE (VEX_W_0F7D_P_2) },
4022 { VEX_W_TABLE (VEX_W_0F7D_P_3) },
c0f3af97
L
4023 },
4024
592a252b 4025 /* PREFIX_VEX_0F7E */
c0f3af97 4026 {
592d1631 4027 { Bad_Opcode },
592a252b
L
4028 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1) },
4029 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2) },
c0f3af97
L
4030 },
4031
592a252b 4032 /* PREFIX_VEX_0F7F */
c0f3af97 4033 {
592d1631 4034 { Bad_Opcode },
592a252b
L
4035 { VEX_W_TABLE (VEX_W_0F7F_P_1) },
4036 { VEX_W_TABLE (VEX_W_0F7F_P_2) },
c0f3af97
L
4037 },
4038
592a252b 4039 /* PREFIX_VEX_0FC2 */
c0f3af97 4040 {
592a252b
L
4041 { VEX_W_TABLE (VEX_W_0FC2_P_0) },
4042 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_1) },
4043 { VEX_W_TABLE (VEX_W_0FC2_P_2) },
4044 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_3) },
c0f3af97
L
4045 },
4046
592a252b 4047 /* PREFIX_VEX_0FC4 */
c0f3af97 4048 {
592d1631
L
4049 { Bad_Opcode },
4050 { Bad_Opcode },
592a252b 4051 { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2) },
c0f3af97
L
4052 },
4053
592a252b 4054 /* PREFIX_VEX_0FC5 */
c0f3af97 4055 {
592d1631
L
4056 { Bad_Opcode },
4057 { Bad_Opcode },
592a252b 4058 { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2) },
c0f3af97
L
4059 },
4060
592a252b 4061 /* PREFIX_VEX_0FD0 */
c0f3af97 4062 {
592d1631
L
4063 { Bad_Opcode },
4064 { Bad_Opcode },
592a252b
L
4065 { VEX_W_TABLE (VEX_W_0FD0_P_2) },
4066 { VEX_W_TABLE (VEX_W_0FD0_P_3) },
c0f3af97
L
4067 },
4068
592a252b 4069 /* PREFIX_VEX_0FD1 */
c0f3af97 4070 {
592d1631
L
4071 { Bad_Opcode },
4072 { Bad_Opcode },
592a252b 4073 { VEX_LEN_TABLE (VEX_LEN_0FD1_P_2) },
c0f3af97
L
4074 },
4075
592a252b 4076 /* PREFIX_VEX_0FD2 */
c0f3af97 4077 {
592d1631
L
4078 { Bad_Opcode },
4079 { Bad_Opcode },
592a252b 4080 { VEX_LEN_TABLE (VEX_LEN_0FD2_P_2) },
c0f3af97
L
4081 },
4082
592a252b 4083 /* PREFIX_VEX_0FD3 */
c0f3af97 4084 {
592d1631
L
4085 { Bad_Opcode },
4086 { Bad_Opcode },
592a252b 4087 { VEX_LEN_TABLE (VEX_LEN_0FD3_P_2) },
c0f3af97
L
4088 },
4089
592a252b 4090 /* PREFIX_VEX_0FD4 */
c0f3af97 4091 {
592d1631
L
4092 { Bad_Opcode },
4093 { Bad_Opcode },
592a252b 4094 { VEX_LEN_TABLE (VEX_LEN_0FD4_P_2) },
c0f3af97
L
4095 },
4096
592a252b 4097 /* PREFIX_VEX_0FD5 */
c0f3af97 4098 {
592d1631
L
4099 { Bad_Opcode },
4100 { Bad_Opcode },
592a252b 4101 { VEX_LEN_TABLE (VEX_LEN_0FD5_P_2) },
c0f3af97
L
4102 },
4103
592a252b 4104 /* PREFIX_VEX_0FD6 */
c0f3af97 4105 {
592d1631
L
4106 { Bad_Opcode },
4107 { Bad_Opcode },
592a252b 4108 { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2) },
c0f3af97
L
4109 },
4110
592a252b 4111 /* PREFIX_VEX_0FD7 */
c0f3af97 4112 {
592d1631
L
4113 { Bad_Opcode },
4114 { Bad_Opcode },
592a252b 4115 { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2) },
c0f3af97
L
4116 },
4117
592a252b 4118 /* PREFIX_VEX_0FD8 */
c0f3af97 4119 {
592d1631
L
4120 { Bad_Opcode },
4121 { Bad_Opcode },
592a252b 4122 { VEX_LEN_TABLE (VEX_LEN_0FD8_P_2) },
c0f3af97
L
4123 },
4124
592a252b 4125 /* PREFIX_VEX_0FD9 */
c0f3af97 4126 {
592d1631
L
4127 { Bad_Opcode },
4128 { Bad_Opcode },
592a252b 4129 { VEX_LEN_TABLE (VEX_LEN_0FD9_P_2) },
c0f3af97
L
4130 },
4131
592a252b 4132 /* PREFIX_VEX_0FDA */
c0f3af97 4133 {
592d1631
L
4134 { Bad_Opcode },
4135 { Bad_Opcode },
592a252b 4136 { VEX_LEN_TABLE (VEX_LEN_0FDA_P_2) },
c0f3af97
L
4137 },
4138
592a252b 4139 /* PREFIX_VEX_0FDB */
c0f3af97 4140 {
592d1631
L
4141 { Bad_Opcode },
4142 { Bad_Opcode },
592a252b 4143 { VEX_LEN_TABLE (VEX_LEN_0FDB_P_2) },
c0f3af97
L
4144 },
4145
592a252b 4146 /* PREFIX_VEX_0FDC */
c0f3af97 4147 {
592d1631
L
4148 { Bad_Opcode },
4149 { Bad_Opcode },
592a252b 4150 { VEX_LEN_TABLE (VEX_LEN_0FDC_P_2) },
c0f3af97
L
4151 },
4152
592a252b 4153 /* PREFIX_VEX_0FDD */
c0f3af97 4154 {
592d1631
L
4155 { Bad_Opcode },
4156 { Bad_Opcode },
592a252b 4157 { VEX_LEN_TABLE (VEX_LEN_0FDD_P_2) },
c0f3af97
L
4158 },
4159
592a252b 4160 /* PREFIX_VEX_0FDE */
c0f3af97 4161 {
592d1631
L
4162 { Bad_Opcode },
4163 { Bad_Opcode },
592a252b 4164 { VEX_LEN_TABLE (VEX_LEN_0FDE_P_2) },
c0f3af97
L
4165 },
4166
592a252b 4167 /* PREFIX_VEX_0FDF */
c0f3af97 4168 {
592d1631
L
4169 { Bad_Opcode },
4170 { Bad_Opcode },
592a252b 4171 { VEX_LEN_TABLE (VEX_LEN_0FDF_P_2) },
c0f3af97
L
4172 },
4173
592a252b 4174 /* PREFIX_VEX_0FE0 */
c0f3af97 4175 {
592d1631
L
4176 { Bad_Opcode },
4177 { Bad_Opcode },
592a252b 4178 { VEX_LEN_TABLE (VEX_LEN_0FE0_P_2) },
c0f3af97
L
4179 },
4180
592a252b 4181 /* PREFIX_VEX_0FE1 */
c0f3af97 4182 {
592d1631
L
4183 { Bad_Opcode },
4184 { Bad_Opcode },
592a252b 4185 { VEX_LEN_TABLE (VEX_LEN_0FE1_P_2) },
c0f3af97
L
4186 },
4187
592a252b 4188 /* PREFIX_VEX_0FE2 */
c0f3af97 4189 {
592d1631
L
4190 { Bad_Opcode },
4191 { Bad_Opcode },
592a252b 4192 { VEX_LEN_TABLE (VEX_LEN_0FE2_P_2) },
c0f3af97
L
4193 },
4194
592a252b 4195 /* PREFIX_VEX_0FE3 */
c0f3af97 4196 {
592d1631
L
4197 { Bad_Opcode },
4198 { Bad_Opcode },
592a252b 4199 { VEX_LEN_TABLE (VEX_LEN_0FE3_P_2) },
c0f3af97
L
4200 },
4201
592a252b 4202 /* PREFIX_VEX_0FE4 */
c0f3af97 4203 {
592d1631
L
4204 { Bad_Opcode },
4205 { Bad_Opcode },
592a252b 4206 { VEX_LEN_TABLE (VEX_LEN_0FE4_P_2) },
c0f3af97
L
4207 },
4208
592a252b 4209 /* PREFIX_VEX_0FE5 */
c0f3af97 4210 {
592d1631
L
4211 { Bad_Opcode },
4212 { Bad_Opcode },
592a252b 4213 { VEX_LEN_TABLE (VEX_LEN_0FE5_P_2) },
c0f3af97
L
4214 },
4215
592a252b 4216 /* PREFIX_VEX_0FE6 */
c0f3af97 4217 {
592d1631 4218 { Bad_Opcode },
592a252b
L
4219 { VEX_W_TABLE (VEX_W_0FE6_P_1) },
4220 { VEX_W_TABLE (VEX_W_0FE6_P_2) },
4221 { VEX_W_TABLE (VEX_W_0FE6_P_3) },
c0f3af97
L
4222 },
4223
592a252b 4224 /* PREFIX_VEX_0FE7 */
c0f3af97 4225 {
592d1631
L
4226 { Bad_Opcode },
4227 { Bad_Opcode },
592a252b 4228 { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2) },
c0f3af97
L
4229 },
4230
592a252b 4231 /* PREFIX_VEX_0FE8 */
c0f3af97 4232 {
592d1631
L
4233 { Bad_Opcode },
4234 { Bad_Opcode },
592a252b 4235 { VEX_LEN_TABLE (VEX_LEN_0FE8_P_2) },
c0f3af97
L
4236 },
4237
592a252b 4238 /* PREFIX_VEX_0FE9 */
c0f3af97 4239 {
592d1631
L
4240 { Bad_Opcode },
4241 { Bad_Opcode },
592a252b 4242 { VEX_LEN_TABLE (VEX_LEN_0FE9_P_2) },
c0f3af97
L
4243 },
4244
592a252b 4245 /* PREFIX_VEX_0FEA */
c0f3af97 4246 {
592d1631
L
4247 { Bad_Opcode },
4248 { Bad_Opcode },
592a252b 4249 { VEX_LEN_TABLE (VEX_LEN_0FEA_P_2) },
c0f3af97
L
4250 },
4251
592a252b 4252 /* PREFIX_VEX_0FEB */
c0f3af97 4253 {
592d1631
L
4254 { Bad_Opcode },
4255 { Bad_Opcode },
592a252b 4256 { VEX_LEN_TABLE (VEX_LEN_0FEB_P_2) },
c0f3af97
L
4257 },
4258
592a252b 4259 /* PREFIX_VEX_0FEC */
c0f3af97 4260 {
592d1631
L
4261 { Bad_Opcode },
4262 { Bad_Opcode },
592a252b 4263 { VEX_LEN_TABLE (VEX_LEN_0FEC_P_2) },
c0f3af97
L
4264 },
4265
592a252b 4266 /* PREFIX_VEX_0FED */
c0f3af97 4267 {
592d1631
L
4268 { Bad_Opcode },
4269 { Bad_Opcode },
592a252b 4270 { VEX_LEN_TABLE (VEX_LEN_0FED_P_2) },
c0f3af97
L
4271 },
4272
592a252b 4273 /* PREFIX_VEX_0FEE */
c0f3af97 4274 {
592d1631
L
4275 { Bad_Opcode },
4276 { Bad_Opcode },
592a252b 4277 { VEX_LEN_TABLE (VEX_LEN_0FEE_P_2) },
c0f3af97
L
4278 },
4279
592a252b 4280 /* PREFIX_VEX_0FEF */
c0f3af97 4281 {
592d1631
L
4282 { Bad_Opcode },
4283 { Bad_Opcode },
592a252b 4284 { VEX_LEN_TABLE (VEX_LEN_0FEF_P_2) },
c0f3af97
L
4285 },
4286
592a252b 4287 /* PREFIX_VEX_0FF0 */
c0f3af97 4288 {
592d1631
L
4289 { Bad_Opcode },
4290 { Bad_Opcode },
4291 { Bad_Opcode },
592a252b 4292 { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3) },
c0f3af97
L
4293 },
4294
592a252b 4295 /* PREFIX_VEX_0FF1 */
c0f3af97 4296 {
592d1631
L
4297 { Bad_Opcode },
4298 { Bad_Opcode },
592a252b 4299 { VEX_LEN_TABLE (VEX_LEN_0FF1_P_2) },
c0f3af97
L
4300 },
4301
592a252b 4302 /* PREFIX_VEX_0FF2 */
c0f3af97 4303 {
592d1631
L
4304 { Bad_Opcode },
4305 { Bad_Opcode },
592a252b 4306 { VEX_LEN_TABLE (VEX_LEN_0FF2_P_2) },
c0f3af97
L
4307 },
4308
592a252b 4309 /* PREFIX_VEX_0FF3 */
c0f3af97 4310 {
592d1631
L
4311 { Bad_Opcode },
4312 { Bad_Opcode },
592a252b 4313 { VEX_LEN_TABLE (VEX_LEN_0FF3_P_2) },
c0f3af97
L
4314 },
4315
592a252b 4316 /* PREFIX_VEX_0FF4 */
c0f3af97 4317 {
592d1631
L
4318 { Bad_Opcode },
4319 { Bad_Opcode },
592a252b 4320 { VEX_LEN_TABLE (VEX_LEN_0FF4_P_2) },
c0f3af97
L
4321 },
4322
592a252b 4323 /* PREFIX_VEX_0FF5 */
c0f3af97 4324 {
592d1631
L
4325 { Bad_Opcode },
4326 { Bad_Opcode },
592a252b 4327 { VEX_LEN_TABLE (VEX_LEN_0FF5_P_2) },
c0f3af97
L
4328 },
4329
592a252b 4330 /* PREFIX_VEX_0FF6 */
c0f3af97 4331 {
592d1631
L
4332 { Bad_Opcode },
4333 { Bad_Opcode },
592a252b 4334 { VEX_LEN_TABLE (VEX_LEN_0FF6_P_2) },
c0f3af97
L
4335 },
4336
592a252b 4337 /* PREFIX_VEX_0FF7 */
c0f3af97 4338 {
592d1631
L
4339 { Bad_Opcode },
4340 { Bad_Opcode },
592a252b 4341 { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2) },
c0f3af97
L
4342 },
4343
592a252b 4344 /* PREFIX_VEX_0FF8 */
c0f3af97 4345 {
592d1631
L
4346 { Bad_Opcode },
4347 { Bad_Opcode },
592a252b 4348 { VEX_LEN_TABLE (VEX_LEN_0FF8_P_2) },
c0f3af97
L
4349 },
4350
592a252b 4351 /* PREFIX_VEX_0FF9 */
c0f3af97 4352 {
592d1631
L
4353 { Bad_Opcode },
4354 { Bad_Opcode },
592a252b 4355 { VEX_LEN_TABLE (VEX_LEN_0FF9_P_2) },
c0f3af97
L
4356 },
4357
592a252b 4358 /* PREFIX_VEX_0FFA */
c0f3af97 4359 {
592d1631
L
4360 { Bad_Opcode },
4361 { Bad_Opcode },
592a252b 4362 { VEX_LEN_TABLE (VEX_LEN_0FFA_P_2) },
c0f3af97
L
4363 },
4364
592a252b 4365 /* PREFIX_VEX_0FFB */
c0f3af97 4366 {
592d1631
L
4367 { Bad_Opcode },
4368 { Bad_Opcode },
592a252b 4369 { VEX_LEN_TABLE (VEX_LEN_0FFB_P_2) },
c0f3af97
L
4370 },
4371
592a252b 4372 /* PREFIX_VEX_0FFC */
c0f3af97 4373 {
592d1631
L
4374 { Bad_Opcode },
4375 { Bad_Opcode },
592a252b 4376 { VEX_LEN_TABLE (VEX_LEN_0FFC_P_2) },
c0f3af97
L
4377 },
4378
592a252b 4379 /* PREFIX_VEX_0FFD */
c0f3af97 4380 {
592d1631
L
4381 { Bad_Opcode },
4382 { Bad_Opcode },
592a252b 4383 { VEX_LEN_TABLE (VEX_LEN_0FFD_P_2) },
c0f3af97
L
4384 },
4385
592a252b 4386 /* PREFIX_VEX_0FFE */
c0f3af97 4387 {
592d1631
L
4388 { Bad_Opcode },
4389 { Bad_Opcode },
592a252b 4390 { VEX_LEN_TABLE (VEX_LEN_0FFE_P_2) },
c0f3af97
L
4391 },
4392
592a252b 4393 /* PREFIX_VEX_0F3800 */
c0f3af97 4394 {
592d1631
L
4395 { Bad_Opcode },
4396 { Bad_Opcode },
592a252b 4397 { VEX_LEN_TABLE (VEX_LEN_0F3800_P_2) },
c0f3af97
L
4398 },
4399
592a252b 4400 /* PREFIX_VEX_0F3801 */
c0f3af97 4401 {
592d1631
L
4402 { Bad_Opcode },
4403 { Bad_Opcode },
592a252b 4404 { VEX_LEN_TABLE (VEX_LEN_0F3801_P_2) },
c0f3af97
L
4405 },
4406
592a252b 4407 /* PREFIX_VEX_0F3802 */
c0f3af97 4408 {
592d1631
L
4409 { Bad_Opcode },
4410 { Bad_Opcode },
592a252b 4411 { VEX_LEN_TABLE (VEX_LEN_0F3802_P_2) },
c0f3af97
L
4412 },
4413
592a252b 4414 /* PREFIX_VEX_0F3803 */
c0f3af97 4415 {
592d1631
L
4416 { Bad_Opcode },
4417 { Bad_Opcode },
592a252b 4418 { VEX_LEN_TABLE (VEX_LEN_0F3803_P_2) },
c0f3af97
L
4419 },
4420
592a252b 4421 /* PREFIX_VEX_0F3804 */
c0f3af97 4422 {
592d1631
L
4423 { Bad_Opcode },
4424 { Bad_Opcode },
592a252b 4425 { VEX_LEN_TABLE (VEX_LEN_0F3804_P_2) },
c0f3af97
L
4426 },
4427
592a252b 4428 /* PREFIX_VEX_0F3805 */
c0f3af97 4429 {
592d1631
L
4430 { Bad_Opcode },
4431 { Bad_Opcode },
592a252b 4432 { VEX_LEN_TABLE (VEX_LEN_0F3805_P_2) },
c0f3af97
L
4433 },
4434
592a252b 4435 /* PREFIX_VEX_0F3806 */
c0f3af97 4436 {
592d1631
L
4437 { Bad_Opcode },
4438 { Bad_Opcode },
592a252b 4439 { VEX_LEN_TABLE (VEX_LEN_0F3806_P_2) },
c0f3af97
L
4440 },
4441
592a252b 4442 /* PREFIX_VEX_0F3807 */
c0f3af97 4443 {
592d1631
L
4444 { Bad_Opcode },
4445 { Bad_Opcode },
592a252b 4446 { VEX_LEN_TABLE (VEX_LEN_0F3807_P_2) },
c0f3af97
L
4447 },
4448
592a252b 4449 /* PREFIX_VEX_0F3808 */
c0f3af97 4450 {
592d1631
L
4451 { Bad_Opcode },
4452 { Bad_Opcode },
592a252b 4453 { VEX_LEN_TABLE (VEX_LEN_0F3808_P_2) },
c0f3af97
L
4454 },
4455
592a252b 4456 /* PREFIX_VEX_0F3809 */
c0f3af97 4457 {
592d1631
L
4458 { Bad_Opcode },
4459 { Bad_Opcode },
592a252b 4460 { VEX_LEN_TABLE (VEX_LEN_0F3809_P_2) },
c0f3af97
L
4461 },
4462
592a252b 4463 /* PREFIX_VEX_0F380A */
c0f3af97 4464 {
592d1631
L
4465 { Bad_Opcode },
4466 { Bad_Opcode },
592a252b 4467 { VEX_LEN_TABLE (VEX_LEN_0F380A_P_2) },
c0f3af97
L
4468 },
4469
592a252b 4470 /* PREFIX_VEX_0F380B */
c0f3af97 4471 {
592d1631
L
4472 { Bad_Opcode },
4473 { Bad_Opcode },
592a252b 4474 { VEX_LEN_TABLE (VEX_LEN_0F380B_P_2) },
c0f3af97
L
4475 },
4476
592a252b 4477 /* PREFIX_VEX_0F380C */
c0f3af97 4478 {
592d1631
L
4479 { Bad_Opcode },
4480 { Bad_Opcode },
592a252b 4481 { VEX_W_TABLE (VEX_W_0F380C_P_2) },
c0f3af97
L
4482 },
4483
592a252b 4484 /* PREFIX_VEX_0F380D */
c0f3af97 4485 {
592d1631
L
4486 { Bad_Opcode },
4487 { Bad_Opcode },
592a252b 4488 { VEX_W_TABLE (VEX_W_0F380D_P_2) },
c0f3af97
L
4489 },
4490
592a252b 4491 /* PREFIX_VEX_0F380E */
c0f3af97 4492 {
592d1631
L
4493 { Bad_Opcode },
4494 { Bad_Opcode },
592a252b 4495 { VEX_W_TABLE (VEX_W_0F380E_P_2) },
c0f3af97
L
4496 },
4497
592a252b 4498 /* PREFIX_VEX_0F380F */
c0f3af97 4499 {
592d1631
L
4500 { Bad_Opcode },
4501 { Bad_Opcode },
592a252b 4502 { VEX_W_TABLE (VEX_W_0F380F_P_2) },
c0f3af97
L
4503 },
4504
592a252b 4505 /* PREFIX_VEX_0F3813 */
c7b8aa3a
L
4506 {
4507 { Bad_Opcode },
4508 { Bad_Opcode },
4509 { "vcvtph2ps", { XM, EXxmmq } },
4510 },
4511
592a252b 4512 /* PREFIX_VEX_0F3817 */
c0f3af97 4513 {
592d1631
L
4514 { Bad_Opcode },
4515 { Bad_Opcode },
592a252b 4516 { VEX_W_TABLE (VEX_W_0F3817_P_2) },
c0f3af97
L
4517 },
4518
592a252b 4519 /* PREFIX_VEX_0F3818 */
c0f3af97 4520 {
592d1631
L
4521 { Bad_Opcode },
4522 { Bad_Opcode },
592a252b 4523 { MOD_TABLE (MOD_VEX_0F3818_PREFIX_2) },
c0f3af97
L
4524 },
4525
592a252b 4526 /* PREFIX_VEX_0F3819 */
c0f3af97 4527 {
592d1631
L
4528 { Bad_Opcode },
4529 { Bad_Opcode },
592a252b 4530 { MOD_TABLE (MOD_VEX_0F3819_PREFIX_2) },
c0f3af97
L
4531 },
4532
592a252b 4533 /* PREFIX_VEX_0F381A */
c0f3af97 4534 {
592d1631
L
4535 { Bad_Opcode },
4536 { Bad_Opcode },
592a252b 4537 { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2) },
c0f3af97
L
4538 },
4539
592a252b 4540 /* PREFIX_VEX_0F381C */
c0f3af97 4541 {
592d1631
L
4542 { Bad_Opcode },
4543 { Bad_Opcode },
592a252b 4544 { VEX_LEN_TABLE (VEX_LEN_0F381C_P_2) },
c0f3af97
L
4545 },
4546
592a252b 4547 /* PREFIX_VEX_0F381D */
c0f3af97 4548 {
592d1631
L
4549 { Bad_Opcode },
4550 { Bad_Opcode },
592a252b 4551 { VEX_LEN_TABLE (VEX_LEN_0F381D_P_2) },
c0f3af97
L
4552 },
4553
592a252b 4554 /* PREFIX_VEX_0F381E */
c0f3af97 4555 {
592d1631
L
4556 { Bad_Opcode },
4557 { Bad_Opcode },
592a252b 4558 { VEX_LEN_TABLE (VEX_LEN_0F381E_P_2) },
c0f3af97
L
4559 },
4560
592a252b 4561 /* PREFIX_VEX_0F3820 */
c0f3af97 4562 {
592d1631
L
4563 { Bad_Opcode },
4564 { Bad_Opcode },
592a252b 4565 { VEX_LEN_TABLE (VEX_LEN_0F3820_P_2) },
c0f3af97
L
4566 },
4567
592a252b 4568 /* PREFIX_VEX_0F3821 */
c0f3af97 4569 {
592d1631
L
4570 { Bad_Opcode },
4571 { Bad_Opcode },
592a252b 4572 { VEX_LEN_TABLE (VEX_LEN_0F3821_P_2) },
c0f3af97
L
4573 },
4574
592a252b 4575 /* PREFIX_VEX_0F3822 */
c0f3af97 4576 {
592d1631
L
4577 { Bad_Opcode },
4578 { Bad_Opcode },
592a252b 4579 { VEX_LEN_TABLE (VEX_LEN_0F3822_P_2) },
c0f3af97
L
4580 },
4581
592a252b 4582 /* PREFIX_VEX_0F3823 */
c0f3af97 4583 {
592d1631
L
4584 { Bad_Opcode },
4585 { Bad_Opcode },
592a252b 4586 { VEX_LEN_TABLE (VEX_LEN_0F3823_P_2) },
c0f3af97
L
4587 },
4588
592a252b 4589 /* PREFIX_VEX_0F3824 */
c0f3af97 4590 {
592d1631
L
4591 { Bad_Opcode },
4592 { Bad_Opcode },
592a252b 4593 { VEX_LEN_TABLE (VEX_LEN_0F3824_P_2) },
c0f3af97
L
4594 },
4595
592a252b 4596 /* PREFIX_VEX_0F3825 */
c0f3af97 4597 {
592d1631
L
4598 { Bad_Opcode },
4599 { Bad_Opcode },
592a252b 4600 { VEX_LEN_TABLE (VEX_LEN_0F3825_P_2) },
c0f3af97
L
4601 },
4602
592a252b 4603 /* PREFIX_VEX_0F3828 */
c0f3af97 4604 {
592d1631
L
4605 { Bad_Opcode },
4606 { Bad_Opcode },
592a252b 4607 { VEX_LEN_TABLE (VEX_LEN_0F3828_P_2) },
c0f3af97
L
4608 },
4609
592a252b 4610 /* PREFIX_VEX_0F3829 */
c0f3af97 4611 {
592d1631
L
4612 { Bad_Opcode },
4613 { Bad_Opcode },
592a252b 4614 { VEX_LEN_TABLE (VEX_LEN_0F3829_P_2) },
c0f3af97
L
4615 },
4616
592a252b 4617 /* PREFIX_VEX_0F382A */
c0f3af97 4618 {
592d1631
L
4619 { Bad_Opcode },
4620 { Bad_Opcode },
592a252b 4621 { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2) },
c0f3af97
L
4622 },
4623
592a252b 4624 /* PREFIX_VEX_0F382B */
c0f3af97 4625 {
592d1631
L
4626 { Bad_Opcode },
4627 { Bad_Opcode },
592a252b 4628 { VEX_LEN_TABLE (VEX_LEN_0F382B_P_2) },
c0f3af97
L
4629 },
4630
592a252b 4631 /* PREFIX_VEX_0F382C */
c0f3af97 4632 {
592d1631
L
4633 { Bad_Opcode },
4634 { Bad_Opcode },
592a252b 4635 { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2) },
c0f3af97
L
4636 },
4637
592a252b 4638 /* PREFIX_VEX_0F382D */
c0f3af97 4639 {
592d1631
L
4640 { Bad_Opcode },
4641 { Bad_Opcode },
592a252b 4642 { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2) },
c0f3af97
L
4643 },
4644
592a252b 4645 /* PREFIX_VEX_0F382E */
c0f3af97 4646 {
592d1631
L
4647 { Bad_Opcode },
4648 { Bad_Opcode },
592a252b 4649 { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2) },
c0f3af97
L
4650 },
4651
592a252b 4652 /* PREFIX_VEX_0F382F */
c0f3af97 4653 {
592d1631
L
4654 { Bad_Opcode },
4655 { Bad_Opcode },
592a252b 4656 { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2) },
c0f3af97
L
4657 },
4658
592a252b 4659 /* PREFIX_VEX_0F3830 */
c0f3af97 4660 {
592d1631
L
4661 { Bad_Opcode },
4662 { Bad_Opcode },
592a252b 4663 { VEX_LEN_TABLE (VEX_LEN_0F3830_P_2) },
c0f3af97
L
4664 },
4665
592a252b 4666 /* PREFIX_VEX_0F3831 */
c0f3af97 4667 {
592d1631
L
4668 { Bad_Opcode },
4669 { Bad_Opcode },
592a252b 4670 { VEX_LEN_TABLE (VEX_LEN_0F3831_P_2) },
c0f3af97
L
4671 },
4672
592a252b 4673 /* PREFIX_VEX_0F3832 */
c0f3af97 4674 {
592d1631
L
4675 { Bad_Opcode },
4676 { Bad_Opcode },
592a252b 4677 { VEX_LEN_TABLE (VEX_LEN_0F3832_P_2) },
c0f3af97
L
4678 },
4679
592a252b 4680 /* PREFIX_VEX_0F3833 */
c0f3af97 4681 {
592d1631
L
4682 { Bad_Opcode },
4683 { Bad_Opcode },
592a252b 4684 { VEX_LEN_TABLE (VEX_LEN_0F3833_P_2) },
c0f3af97
L
4685 },
4686
592a252b 4687 /* PREFIX_VEX_0F3834 */
c0f3af97 4688 {
592d1631
L
4689 { Bad_Opcode },
4690 { Bad_Opcode },
592a252b 4691 { VEX_LEN_TABLE (VEX_LEN_0F3834_P_2) },
c0f3af97
L
4692 },
4693
592a252b 4694 /* PREFIX_VEX_0F3835 */
c0f3af97 4695 {
592d1631
L
4696 { Bad_Opcode },
4697 { Bad_Opcode },
592a252b 4698 { VEX_LEN_TABLE (VEX_LEN_0F3835_P_2) },
c0f3af97
L
4699 },
4700
592a252b 4701 /* PREFIX_VEX_0F3837 */
c0f3af97 4702 {
592d1631
L
4703 { Bad_Opcode },
4704 { Bad_Opcode },
592a252b 4705 { VEX_LEN_TABLE (VEX_LEN_0F3837_P_2) },
c0f3af97
L
4706 },
4707
592a252b 4708 /* PREFIX_VEX_0F3838 */
c0f3af97 4709 {
592d1631
L
4710 { Bad_Opcode },
4711 { Bad_Opcode },
592a252b 4712 { VEX_LEN_TABLE (VEX_LEN_0F3838_P_2) },
c0f3af97
L
4713 },
4714
592a252b 4715 /* PREFIX_VEX_0F3839 */
c0f3af97 4716 {
592d1631
L
4717 { Bad_Opcode },
4718 { Bad_Opcode },
592a252b 4719 { VEX_LEN_TABLE (VEX_LEN_0F3839_P_2) },
c0f3af97
L
4720 },
4721
592a252b 4722 /* PREFIX_VEX_0F383A */
c0f3af97 4723 {
592d1631
L
4724 { Bad_Opcode },
4725 { Bad_Opcode },
592a252b 4726 { VEX_LEN_TABLE (VEX_LEN_0F383A_P_2) },
c0f3af97
L
4727 },
4728
592a252b 4729 /* PREFIX_VEX_0F383B */
c0f3af97 4730 {
592d1631
L
4731 { Bad_Opcode },
4732 { Bad_Opcode },
592a252b 4733 { VEX_LEN_TABLE (VEX_LEN_0F383B_P_2) },
c0f3af97
L
4734 },
4735
592a252b 4736 /* PREFIX_VEX_0F383C */
c0f3af97 4737 {
592d1631
L
4738 { Bad_Opcode },
4739 { Bad_Opcode },
592a252b 4740 { VEX_LEN_TABLE (VEX_LEN_0F383C_P_2) },
c0f3af97
L
4741 },
4742
592a252b 4743 /* PREFIX_VEX_0F383D */
c0f3af97 4744 {
592d1631
L
4745 { Bad_Opcode },
4746 { Bad_Opcode },
592a252b 4747 { VEX_LEN_TABLE (VEX_LEN_0F383D_P_2) },
c0f3af97
L
4748 },
4749
592a252b 4750 /* PREFIX_VEX_0F383E */
c0f3af97 4751 {
592d1631
L
4752 { Bad_Opcode },
4753 { Bad_Opcode },
592a252b 4754 { VEX_LEN_TABLE (VEX_LEN_0F383E_P_2) },
c0f3af97
L
4755 },
4756
592a252b 4757 /* PREFIX_VEX_0F383F */
c0f3af97 4758 {
592d1631
L
4759 { Bad_Opcode },
4760 { Bad_Opcode },
592a252b 4761 { VEX_LEN_TABLE (VEX_LEN_0F383F_P_2) },
c0f3af97
L
4762 },
4763
592a252b 4764 /* PREFIX_VEX_0F3840 */
c0f3af97 4765 {
592d1631
L
4766 { Bad_Opcode },
4767 { Bad_Opcode },
592a252b 4768 { VEX_LEN_TABLE (VEX_LEN_0F3840_P_2) },
c0f3af97
L
4769 },
4770
592a252b 4771 /* PREFIX_VEX_0F3841 */
c0f3af97 4772 {
592d1631
L
4773 { Bad_Opcode },
4774 { Bad_Opcode },
592a252b 4775 { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2) },
c0f3af97
L
4776 },
4777
592a252b 4778 /* PREFIX_VEX_0F3896 */
a5ff0eb2 4779 {
592d1631
L
4780 { Bad_Opcode },
4781 { Bad_Opcode },
0bfee649 4782 { "vfmaddsub132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4783 },
4784
592a252b 4785 /* PREFIX_VEX_0F3897 */
a5ff0eb2 4786 {
592d1631
L
4787 { Bad_Opcode },
4788 { Bad_Opcode },
0bfee649 4789 { "vfmsubadd132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4790 },
4791
592a252b 4792 /* PREFIX_VEX_0F3898 */
a5ff0eb2 4793 {
592d1631
L
4794 { Bad_Opcode },
4795 { Bad_Opcode },
0bfee649 4796 { "vfmadd132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4797 },
4798
592a252b 4799 /* PREFIX_VEX_0F3899 */
a5ff0eb2 4800 {
592d1631
L
4801 { Bad_Opcode },
4802 { Bad_Opcode },
1c480963 4803 { "vfmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
a5ff0eb2
L
4804 },
4805
592a252b 4806 /* PREFIX_VEX_0F389A */
a5ff0eb2 4807 {
592d1631
L
4808 { Bad_Opcode },
4809 { Bad_Opcode },
0bfee649 4810 { "vfmsub132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4811 },
4812
592a252b 4813 /* PREFIX_VEX_0F389B */
c0f3af97 4814 {
592d1631
L
4815 { Bad_Opcode },
4816 { Bad_Opcode },
1c480963 4817 { "vfmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4818 },
4819
592a252b 4820 /* PREFIX_VEX_0F389C */
c0f3af97 4821 {
592d1631
L
4822 { Bad_Opcode },
4823 { Bad_Opcode },
0bfee649 4824 { "vfnmadd132p%XW", { XM, Vex, EXx } },
c0f3af97
L
4825 },
4826
592a252b 4827 /* PREFIX_VEX_0F389D */
c0f3af97 4828 {
592d1631
L
4829 { Bad_Opcode },
4830 { Bad_Opcode },
1c480963 4831 { "vfnmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4832 },
4833
592a252b 4834 /* PREFIX_VEX_0F389E */
c0f3af97 4835 {
592d1631
L
4836 { Bad_Opcode },
4837 { Bad_Opcode },
0bfee649 4838 { "vfnmsub132p%XW", { XM, Vex, EXx } },
c0f3af97
L
4839 },
4840
592a252b 4841 /* PREFIX_VEX_0F389F */
c0f3af97 4842 {
592d1631
L
4843 { Bad_Opcode },
4844 { Bad_Opcode },
1c480963 4845 { "vfnmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4846 },
4847
592a252b 4848 /* PREFIX_VEX_0F38A6 */
c0f3af97 4849 {
592d1631
L
4850 { Bad_Opcode },
4851 { Bad_Opcode },
0bfee649 4852 { "vfmaddsub213p%XW", { XM, Vex, EXx } },
592d1631 4853 { Bad_Opcode },
c0f3af97
L
4854 },
4855
592a252b 4856 /* PREFIX_VEX_0F38A7 */
c0f3af97 4857 {
592d1631
L
4858 { Bad_Opcode },
4859 { Bad_Opcode },
0bfee649 4860 { "vfmsubadd213p%XW", { XM, Vex, EXx } },
c0f3af97
L
4861 },
4862
592a252b 4863 /* PREFIX_VEX_0F38A8 */
c0f3af97 4864 {
592d1631
L
4865 { Bad_Opcode },
4866 { Bad_Opcode },
0bfee649 4867 { "vfmadd213p%XW", { XM, Vex, EXx } },
c0f3af97
L
4868 },
4869
592a252b 4870 /* PREFIX_VEX_0F38A9 */
c0f3af97 4871 {
592d1631
L
4872 { Bad_Opcode },
4873 { Bad_Opcode },
1c480963 4874 { "vfmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4875 },
4876
592a252b 4877 /* PREFIX_VEX_0F38AA */
c0f3af97 4878 {
592d1631
L
4879 { Bad_Opcode },
4880 { Bad_Opcode },
0bfee649 4881 { "vfmsub213p%XW", { XM, Vex, EXx } },
c0f3af97
L
4882 },
4883
592a252b 4884 /* PREFIX_VEX_0F38AB */
c0f3af97 4885 {
592d1631
L
4886 { Bad_Opcode },
4887 { Bad_Opcode },
1c480963 4888 { "vfmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4889 },
4890
592a252b 4891 /* PREFIX_VEX_0F38AC */
c0f3af97 4892 {
592d1631
L
4893 { Bad_Opcode },
4894 { Bad_Opcode },
0bfee649 4895 { "vfnmadd213p%XW", { XM, Vex, EXx } },
c0f3af97
L
4896 },
4897
592a252b 4898 /* PREFIX_VEX_0F38AD */
c0f3af97 4899 {
592d1631
L
4900 { Bad_Opcode },
4901 { Bad_Opcode },
1c480963 4902 { "vfnmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4903 },
4904
592a252b 4905 /* PREFIX_VEX_0F38AE */
c0f3af97 4906 {
592d1631
L
4907 { Bad_Opcode },
4908 { Bad_Opcode },
0bfee649 4909 { "vfnmsub213p%XW", { XM, Vex, EXx } },
c0f3af97
L
4910 },
4911
592a252b 4912 /* PREFIX_VEX_0F38AF */
c0f3af97 4913 {
592d1631
L
4914 { Bad_Opcode },
4915 { Bad_Opcode },
1c480963 4916 { "vfnmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4917 },
4918
592a252b 4919 /* PREFIX_VEX_0F38B6 */
c0f3af97 4920 {
592d1631
L
4921 { Bad_Opcode },
4922 { Bad_Opcode },
0bfee649 4923 { "vfmaddsub231p%XW", { XM, Vex, EXx } },
c0f3af97
L
4924 },
4925
592a252b 4926 /* PREFIX_VEX_0F38B7 */
c0f3af97 4927 {
592d1631
L
4928 { Bad_Opcode },
4929 { Bad_Opcode },
0bfee649 4930 { "vfmsubadd231p%XW", { XM, Vex, EXx } },
c0f3af97
L
4931 },
4932
592a252b 4933 /* PREFIX_VEX_0F38B8 */
c0f3af97 4934 {
592d1631
L
4935 { Bad_Opcode },
4936 { Bad_Opcode },
0bfee649 4937 { "vfmadd231p%XW", { XM, Vex, EXx } },
c0f3af97
L
4938 },
4939
592a252b 4940 /* PREFIX_VEX_0F38B9 */
c0f3af97 4941 {
592d1631
L
4942 { Bad_Opcode },
4943 { Bad_Opcode },
1c480963 4944 { "vfmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4945 },
4946
592a252b 4947 /* PREFIX_VEX_0F38BA */
c0f3af97 4948 {
592d1631
L
4949 { Bad_Opcode },
4950 { Bad_Opcode },
0bfee649 4951 { "vfmsub231p%XW", { XM, Vex, EXx } },
c0f3af97
L
4952 },
4953
592a252b 4954 /* PREFIX_VEX_0F38BB */
c0f3af97 4955 {
592d1631
L
4956 { Bad_Opcode },
4957 { Bad_Opcode },
1c480963 4958 { "vfmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4959 },
4960
592a252b 4961 /* PREFIX_VEX_0F38BC */
c0f3af97 4962 {
592d1631
L
4963 { Bad_Opcode },
4964 { Bad_Opcode },
0bfee649 4965 { "vfnmadd231p%XW", { XM, Vex, EXx } },
c0f3af97
L
4966 },
4967
592a252b 4968 /* PREFIX_VEX_0F38BD */
c0f3af97 4969 {
592d1631
L
4970 { Bad_Opcode },
4971 { Bad_Opcode },
1c480963 4972 { "vfnmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4973 },
4974
592a252b 4975 /* PREFIX_VEX_0F38BE */
c0f3af97 4976 {
592d1631
L
4977 { Bad_Opcode },
4978 { Bad_Opcode },
0bfee649 4979 { "vfnmsub231p%XW", { XM, Vex, EXx } },
c0f3af97
L
4980 },
4981
592a252b 4982 /* PREFIX_VEX_0F38BF */
c0f3af97 4983 {
592d1631
L
4984 { Bad_Opcode },
4985 { Bad_Opcode },
1c480963 4986 { "vfnmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
c0f3af97
L
4987 },
4988
592a252b 4989 /* PREFIX_VEX_0F38DB */
c0f3af97 4990 {
592d1631
L
4991 { Bad_Opcode },
4992 { Bad_Opcode },
592a252b 4993 { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2) },
c0f3af97
L
4994 },
4995
592a252b 4996 /* PREFIX_VEX_0F38DC */
c0f3af97 4997 {
592d1631
L
4998 { Bad_Opcode },
4999 { Bad_Opcode },
592a252b 5000 { VEX_LEN_TABLE (VEX_LEN_0F38DC_P_2) },
c0f3af97
L
5001 },
5002
592a252b 5003 /* PREFIX_VEX_0F38DD */
c0f3af97 5004 {
592d1631
L
5005 { Bad_Opcode },
5006 { Bad_Opcode },
592a252b 5007 { VEX_LEN_TABLE (VEX_LEN_0F38DD_P_2) },
c0f3af97
L
5008 },
5009
592a252b 5010 /* PREFIX_VEX_0F38DE */
c0f3af97 5011 {
592d1631
L
5012 { Bad_Opcode },
5013 { Bad_Opcode },
592a252b 5014 { VEX_LEN_TABLE (VEX_LEN_0F38DE_P_2) },
c0f3af97
L
5015 },
5016
592a252b 5017 /* PREFIX_VEX_0F38DF */
c0f3af97 5018 {
592d1631
L
5019 { Bad_Opcode },
5020 { Bad_Opcode },
592a252b 5021 { VEX_LEN_TABLE (VEX_LEN_0F38DF_P_2) },
c0f3af97
L
5022 },
5023
f12dc422
L
5024 /* PREFIX_VEX_0F38F2 */
5025 {
5026 { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0) },
5027 },
5028
5029 /* PREFIX_VEX_0F38F3_REG_1 */
5030 {
5031 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0) },
5032 },
5033
5034 /* PREFIX_VEX_0F38F3_REG_2 */
5035 {
5036 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0) },
5037 },
5038
5039 /* PREFIX_VEX_0F38F3_REG_3 */
5040 {
5041 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0) },
5042 },
5043
5044 /* PREFIX_VEX_0F38F7 */
5045 {
5046 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0) },
5047 },
5048
592a252b 5049 /* PREFIX_VEX_0F3A04 */
c0f3af97 5050 {
592d1631
L
5051 { Bad_Opcode },
5052 { Bad_Opcode },
592a252b 5053 { VEX_W_TABLE (VEX_W_0F3A04_P_2) },
c0f3af97
L
5054 },
5055
592a252b 5056 /* PREFIX_VEX_0F3A05 */
c0f3af97 5057 {
592d1631
L
5058 { Bad_Opcode },
5059 { Bad_Opcode },
592a252b 5060 { VEX_W_TABLE (VEX_W_0F3A05_P_2) },
c0f3af97
L
5061 },
5062
592a252b 5063 /* PREFIX_VEX_0F3A06 */
c0f3af97 5064 {
592d1631
L
5065 { Bad_Opcode },
5066 { Bad_Opcode },
592a252b 5067 { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2) },
c0f3af97
L
5068 },
5069
592a252b 5070 /* PREFIX_VEX_0F3A08 */
c0f3af97 5071 {
592d1631
L
5072 { Bad_Opcode },
5073 { Bad_Opcode },
592a252b 5074 { VEX_W_TABLE (VEX_W_0F3A08_P_2) },
c0f3af97
L
5075 },
5076
592a252b 5077 /* PREFIX_VEX_0F3A09 */
c0f3af97 5078 {
592d1631
L
5079 { Bad_Opcode },
5080 { Bad_Opcode },
592a252b 5081 { VEX_W_TABLE (VEX_W_0F3A09_P_2) },
c0f3af97
L
5082 },
5083
592a252b 5084 /* PREFIX_VEX_0F3A0A */
c0f3af97 5085 {
592d1631
L
5086 { Bad_Opcode },
5087 { Bad_Opcode },
592a252b 5088 { VEX_LEN_TABLE (VEX_LEN_0F3A0A_P_2) },
0bfee649
L
5089 },
5090
592a252b 5091 /* PREFIX_VEX_0F3A0B */
0bfee649 5092 {
592d1631
L
5093 { Bad_Opcode },
5094 { Bad_Opcode },
592a252b 5095 { VEX_LEN_TABLE (VEX_LEN_0F3A0B_P_2) },
0bfee649
L
5096 },
5097
592a252b 5098 /* PREFIX_VEX_0F3A0C */
0bfee649 5099 {
592d1631
L
5100 { Bad_Opcode },
5101 { Bad_Opcode },
592a252b 5102 { VEX_W_TABLE (VEX_W_0F3A0C_P_2) },
0bfee649
L
5103 },
5104
592a252b 5105 /* PREFIX_VEX_0F3A0D */
0bfee649 5106 {
592d1631
L
5107 { Bad_Opcode },
5108 { Bad_Opcode },
592a252b 5109 { VEX_W_TABLE (VEX_W_0F3A0D_P_2) },
c0f3af97
L
5110 },
5111
592a252b 5112 /* PREFIX_VEX_0F3A0E */
0bfee649 5113 {
592d1631
L
5114 { Bad_Opcode },
5115 { Bad_Opcode },
592a252b 5116 { VEX_LEN_TABLE (VEX_LEN_0F3A0E_P_2) },
0bfee649
L
5117 },
5118
592a252b 5119 /* PREFIX_VEX_0F3A0F */
0bfee649 5120 {
592d1631
L
5121 { Bad_Opcode },
5122 { Bad_Opcode },
592a252b 5123 { VEX_LEN_TABLE (VEX_LEN_0F3A0F_P_2) },
0bfee649
L
5124 },
5125
592a252b 5126 /* PREFIX_VEX_0F3A14 */
0bfee649 5127 {
592d1631
L
5128 { Bad_Opcode },
5129 { Bad_Opcode },
592a252b 5130 { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2) },
0bfee649
L
5131 },
5132
592a252b 5133 /* PREFIX_VEX_0F3A15 */
0bfee649 5134 {
592d1631
L
5135 { Bad_Opcode },
5136 { Bad_Opcode },
592a252b 5137 { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2) },
0bfee649
L
5138 },
5139
592a252b 5140 /* PREFIX_VEX_0F3A16 */
c0f3af97 5141 {
592d1631
L
5142 { Bad_Opcode },
5143 { Bad_Opcode },
592a252b 5144 { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2) },
c0f3af97
L
5145 },
5146
592a252b 5147 /* PREFIX_VEX_0F3A17 */
c0f3af97 5148 {
592d1631
L
5149 { Bad_Opcode },
5150 { Bad_Opcode },
592a252b 5151 { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2) },
c0f3af97
L
5152 },
5153
592a252b 5154 /* PREFIX_VEX_0F3A18 */
c0f3af97 5155 {
592d1631
L
5156 { Bad_Opcode },
5157 { Bad_Opcode },
592a252b 5158 { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2) },
c0f3af97
L
5159 },
5160
592a252b 5161 /* PREFIX_VEX_0F3A19 */
c0f3af97 5162 {
592d1631
L
5163 { Bad_Opcode },
5164 { Bad_Opcode },
592a252b 5165 { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2) },
c0f3af97
L
5166 },
5167
592a252b 5168 /* PREFIX_VEX_0F3A1D */
c7b8aa3a
L
5169 {
5170 { Bad_Opcode },
5171 { Bad_Opcode },
5172 { "vcvtps2ph", { EXxmmq, XM, Ib } },
5173 },
5174
592a252b 5175 /* PREFIX_VEX_0F3A20 */
c0f3af97 5176 {
592d1631
L
5177 { Bad_Opcode },
5178 { Bad_Opcode },
592a252b 5179 { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2) },
c0f3af97
L
5180 },
5181
592a252b 5182 /* PREFIX_VEX_0F3A21 */
c0f3af97 5183 {
592d1631
L
5184 { Bad_Opcode },
5185 { Bad_Opcode },
592a252b 5186 { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2) },
c0f3af97
L
5187 },
5188
592a252b 5189 /* PREFIX_VEX_0F3A22 */
0bfee649 5190 {
592d1631
L
5191 { Bad_Opcode },
5192 { Bad_Opcode },
592a252b 5193 { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2) },
0bfee649
L
5194 },
5195
592a252b 5196 /* PREFIX_VEX_0F3A40 */
c0f3af97 5197 {
592d1631
L
5198 { Bad_Opcode },
5199 { Bad_Opcode },
592a252b 5200 { VEX_W_TABLE (VEX_W_0F3A40_P_2) },
c0f3af97
L
5201 },
5202
592a252b 5203 /* PREFIX_VEX_0F3A41 */
c0f3af97 5204 {
592d1631
L
5205 { Bad_Opcode },
5206 { Bad_Opcode },
592a252b 5207 { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2) },
c0f3af97
L
5208 },
5209
592a252b 5210 /* PREFIX_VEX_0F3A42 */
c0f3af97 5211 {
592d1631
L
5212 { Bad_Opcode },
5213 { Bad_Opcode },
592a252b 5214 { VEX_LEN_TABLE (VEX_LEN_0F3A42_P_2) },
c0f3af97
L
5215 },
5216
592a252b 5217 /* PREFIX_VEX_0F3A44 */
ce2f5b3c 5218 {
592d1631
L
5219 { Bad_Opcode },
5220 { Bad_Opcode },
592a252b 5221 { VEX_LEN_TABLE (VEX_LEN_0F3A44_P_2) },
ce2f5b3c
L
5222 },
5223
592a252b 5224 /* PREFIX_VEX_0F3A48 */
a683cc34
SP
5225 {
5226 { Bad_Opcode },
5227 { Bad_Opcode },
592a252b 5228 { VEX_W_TABLE (VEX_W_0F3A48_P_2) },
a683cc34
SP
5229 },
5230
592a252b 5231 /* PREFIX_VEX_0F3A49 */
a683cc34
SP
5232 {
5233 { Bad_Opcode },
5234 { Bad_Opcode },
592a252b 5235 { VEX_W_TABLE (VEX_W_0F3A49_P_2) },
a683cc34
SP
5236 },
5237
592a252b 5238 /* PREFIX_VEX_0F3A4A */
c0f3af97 5239 {
592d1631
L
5240 { Bad_Opcode },
5241 { Bad_Opcode },
592a252b 5242 { VEX_W_TABLE (VEX_W_0F3A4A_P_2) },
c0f3af97
L
5243 },
5244
592a252b 5245 /* PREFIX_VEX_0F3A4B */
c0f3af97 5246 {
592d1631
L
5247 { Bad_Opcode },
5248 { Bad_Opcode },
592a252b 5249 { VEX_W_TABLE (VEX_W_0F3A4B_P_2) },
c0f3af97
L
5250 },
5251
592a252b 5252 /* PREFIX_VEX_0F3A4C */
c0f3af97 5253 {
592d1631
L
5254 { Bad_Opcode },
5255 { Bad_Opcode },
592a252b 5256 { VEX_LEN_TABLE (VEX_LEN_0F3A4C_P_2) },
c0f3af97
L
5257 },
5258
592a252b 5259 /* PREFIX_VEX_0F3A5C */
922d8de8 5260 {
592d1631
L
5261 { Bad_Opcode },
5262 { Bad_Opcode },
206c2556 5263 { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5264 },
5265
592a252b 5266 /* PREFIX_VEX_0F3A5D */
922d8de8 5267 {
592d1631
L
5268 { Bad_Opcode },
5269 { Bad_Opcode },
206c2556 5270 { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5271 },
5272
592a252b 5273 /* PREFIX_VEX_0F3A5E */
922d8de8 5274 {
592d1631
L
5275 { Bad_Opcode },
5276 { Bad_Opcode },
206c2556 5277 { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5278 },
5279
592a252b 5280 /* PREFIX_VEX_0F3A5F */
922d8de8 5281 {
592d1631
L
5282 { Bad_Opcode },
5283 { Bad_Opcode },
206c2556 5284 { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5285 },
5286
592a252b 5287 /* PREFIX_VEX_0F3A60 */
c0f3af97 5288 {
592d1631
L
5289 { Bad_Opcode },
5290 { Bad_Opcode },
592a252b 5291 { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2) },
592d1631 5292 { Bad_Opcode },
c0f3af97
L
5293 },
5294
592a252b 5295 /* PREFIX_VEX_0F3A61 */
c0f3af97 5296 {
592d1631
L
5297 { Bad_Opcode },
5298 { Bad_Opcode },
592a252b 5299 { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2) },
c0f3af97
L
5300 },
5301
592a252b 5302 /* PREFIX_VEX_0F3A62 */
c0f3af97 5303 {
592d1631
L
5304 { Bad_Opcode },
5305 { Bad_Opcode },
592a252b 5306 { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2) },
c0f3af97
L
5307 },
5308
592a252b 5309 /* PREFIX_VEX_0F3A63 */
c0f3af97 5310 {
592d1631
L
5311 { Bad_Opcode },
5312 { Bad_Opcode },
592a252b 5313 { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2) },
c0f3af97 5314 },
a5ff0eb2 5315
592a252b 5316 /* PREFIX_VEX_0F3A68 */
922d8de8 5317 {
592d1631
L
5318 { Bad_Opcode },
5319 { Bad_Opcode },
206c2556 5320 { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5321 },
5322
592a252b 5323 /* PREFIX_VEX_0F3A69 */
922d8de8 5324 {
592d1631
L
5325 { Bad_Opcode },
5326 { Bad_Opcode },
206c2556 5327 { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5328 },
5329
592a252b 5330 /* PREFIX_VEX_0F3A6A */
922d8de8 5331 {
592d1631
L
5332 { Bad_Opcode },
5333 { Bad_Opcode },
592a252b 5334 { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2) },
922d8de8
DR
5335 },
5336
592a252b 5337 /* PREFIX_VEX_0F3A6B */
922d8de8 5338 {
592d1631
L
5339 { Bad_Opcode },
5340 { Bad_Opcode },
592a252b 5341 { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2) },
922d8de8
DR
5342 },
5343
592a252b 5344 /* PREFIX_VEX_0F3A6C */
922d8de8 5345 {
592d1631
L
5346 { Bad_Opcode },
5347 { Bad_Opcode },
206c2556 5348 { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5349 },
5350
592a252b 5351 /* PREFIX_VEX_0F3A6D */
922d8de8 5352 {
592d1631
L
5353 { Bad_Opcode },
5354 { Bad_Opcode },
206c2556 5355 { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5356 },
5357
592a252b 5358 /* PREFIX_VEX_0F3A6E */
922d8de8 5359 {
592d1631
L
5360 { Bad_Opcode },
5361 { Bad_Opcode },
592a252b 5362 { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2) },
922d8de8
DR
5363 },
5364
592a252b 5365 /* PREFIX_VEX_0F3A6F */
922d8de8 5366 {
592d1631
L
5367 { Bad_Opcode },
5368 { Bad_Opcode },
592a252b 5369 { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2) },
922d8de8
DR
5370 },
5371
592a252b 5372 /* PREFIX_VEX_0F3A78 */
922d8de8 5373 {
592d1631
L
5374 { Bad_Opcode },
5375 { Bad_Opcode },
206c2556 5376 { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5377 },
5378
592a252b 5379 /* PREFIX_VEX_0F3A79 */
922d8de8 5380 {
592d1631
L
5381 { Bad_Opcode },
5382 { Bad_Opcode },
206c2556 5383 { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5384 },
5385
592a252b 5386 /* PREFIX_VEX_0F3A7A */
922d8de8 5387 {
592d1631
L
5388 { Bad_Opcode },
5389 { Bad_Opcode },
592a252b 5390 { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2) },
922d8de8
DR
5391 },
5392
592a252b 5393 /* PREFIX_VEX_0F3A7B */
922d8de8 5394 {
592d1631
L
5395 { Bad_Opcode },
5396 { Bad_Opcode },
592a252b 5397 { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2) },
922d8de8
DR
5398 },
5399
592a252b 5400 /* PREFIX_VEX_0F3A7C */
922d8de8 5401 {
592d1631
L
5402 { Bad_Opcode },
5403 { Bad_Opcode },
206c2556 5404 { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
592d1631 5405 { Bad_Opcode },
922d8de8
DR
5406 },
5407
592a252b 5408 /* PREFIX_VEX_0F3A7D */
922d8de8 5409 {
592d1631
L
5410 { Bad_Opcode },
5411 { Bad_Opcode },
206c2556 5412 { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5413 },
5414
592a252b 5415 /* PREFIX_VEX_0F3A7E */
922d8de8 5416 {
592d1631
L
5417 { Bad_Opcode },
5418 { Bad_Opcode },
592a252b 5419 { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2) },
922d8de8
DR
5420 },
5421
592a252b 5422 /* PREFIX_VEX_0F3A7F */
922d8de8 5423 {
592d1631
L
5424 { Bad_Opcode },
5425 { Bad_Opcode },
592a252b 5426 { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2) },
922d8de8
DR
5427 },
5428
592a252b 5429 /* PREFIX_VEX_0F3ADF */
a5ff0eb2 5430 {
592d1631
L
5431 { Bad_Opcode },
5432 { Bad_Opcode },
592a252b 5433 { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2) },
a5ff0eb2 5434 },
c0f3af97
L
5435};
5436
5437static const struct dis386 x86_64_table[][2] = {
5438 /* X86_64_06 */
5439 {
d9e3625e 5440 { "pushP", { es } },
c0f3af97
L
5441 },
5442
5443 /* X86_64_07 */
5444 {
d9e3625e 5445 { "popP", { es } },
c0f3af97
L
5446 },
5447
5448 /* X86_64_0D */
5449 {
d9e3625e 5450 { "pushP", { cs } },
c0f3af97
L
5451 },
5452
5453 /* X86_64_16 */
5454 {
d9e3625e 5455 { "pushP", { ss } },
c0f3af97
L
5456 },
5457
5458 /* X86_64_17 */
5459 {
d9e3625e 5460 { "popP", { ss } },
c0f3af97
L
5461 },
5462
5463 /* X86_64_1E */
5464 {
d9e3625e 5465 { "pushP", { ds } },
c0f3af97
L
5466 },
5467
5468 /* X86_64_1F */
5469 {
d9e3625e 5470 { "popP", { ds } },
c0f3af97
L
5471 },
5472
5473 /* X86_64_27 */
5474 {
5475 { "daa", { XX } },
c0f3af97
L
5476 },
5477
5478 /* X86_64_2F */
5479 {
5480 { "das", { XX } },
c0f3af97
L
5481 },
5482
5483 /* X86_64_37 */
5484 {
5485 { "aaa", { XX } },
c0f3af97
L
5486 },
5487
5488 /* X86_64_3F */
5489 {
5490 { "aas", { XX } },
c0f3af97
L
5491 },
5492
5493 /* X86_64_60 */
5494 {
d9e3625e 5495 { "pushaP", { XX } },
c0f3af97
L
5496 },
5497
5498 /* X86_64_61 */
5499 {
d9e3625e 5500 { "popaP", { XX } },
c0f3af97
L
5501 },
5502
5503 /* X86_64_62 */
5504 {
5505 { MOD_TABLE (MOD_62_32BIT) },
c0f3af97
L
5506 },
5507
5508 /* X86_64_63 */
5509 {
5510 { "arpl", { Ew, Gw } },
5511 { "movs{lq|xd}", { Gv, Ed } },
5512 },
5513
5514 /* X86_64_6D */
5515 {
5516 { "ins{R|}", { Yzr, indirDX } },
5517 { "ins{G|}", { Yzr, indirDX } },
5518 },
5519
5520 /* X86_64_6F */
5521 {
5522 { "outs{R|}", { indirDXr, Xz } },
5523 { "outs{G|}", { indirDXr, Xz } },
5524 },
5525
5526 /* X86_64_9A */
5527 {
5528 { "Jcall{T|}", { Ap } },
c0f3af97
L
5529 },
5530
5531 /* X86_64_C4 */
5532 {
5533 { MOD_TABLE (MOD_C4_32BIT) },
5534 { VEX_C4_TABLE (VEX_0F) },
5535 },
5536
5537 /* X86_64_C5 */
5538 {
5539 { MOD_TABLE (MOD_C5_32BIT) },
5540 { VEX_C5_TABLE (VEX_0F) },
5541 },
5542
5543 /* X86_64_CE */
5544 {
5545 { "into", { XX } },
c0f3af97
L
5546 },
5547
5548 /* X86_64_D4 */
5549 {
e3949f17 5550 { "aam", { Ib } },
c0f3af97
L
5551 },
5552
5553 /* X86_64_D5 */
5554 {
e3949f17 5555 { "aad", { Ib } },
c0f3af97
L
5556 },
5557
5558 /* X86_64_EA */
5559 {
5560 { "Jjmp{T|}", { Ap } },
c0f3af97
L
5561 },
5562
5563 /* X86_64_0F01_REG_0 */
5564 {
5565 { "sgdt{Q|IQ}", { M } },
5566 { "sgdt", { M } },
5567 },
5568
5569 /* X86_64_0F01_REG_1 */
5570 {
5571 { "sidt{Q|IQ}", { M } },
5572 { "sidt", { M } },
5573 },
5574
5575 /* X86_64_0F01_REG_2 */
5576 {
5577 { "lgdt{Q|Q}", { M } },
5578 { "lgdt", { M } },
5579 },
5580
5581 /* X86_64_0F01_REG_3 */
5582 {
5583 { "lidt{Q|Q}", { M } },
5584 { "lidt", { M } },
5585 },
5586};
5587
5588static const struct dis386 three_byte_table[][256] = {
c1e679ec
DR
5589
5590 /* THREE_BYTE_0F38 */
c0f3af97
L
5591 {
5592 /* 00 */
c1e679ec
DR
5593 { "pshufb", { MX, EM } },
5594 { "phaddw", { MX, EM } },
5595 { "phaddd", { MX, EM } },
5596 { "phaddsw", { MX, EM } },
5597 { "pmaddubsw", { MX, EM } },
5598 { "phsubw", { MX, EM } },
5599 { "phsubd", { MX, EM } },
5600 { "phsubsw", { MX, EM } },
c0f3af97 5601 /* 08 */
c1e679ec
DR
5602 { "psignb", { MX, EM } },
5603 { "psignw", { MX, EM } },
5604 { "psignd", { MX, EM } },
5605 { "pmulhrsw", { MX, EM } },
592d1631
L
5606 { Bad_Opcode },
5607 { Bad_Opcode },
5608 { Bad_Opcode },
5609 { Bad_Opcode },
f88c9eb0
SP
5610 /* 10 */
5611 { PREFIX_TABLE (PREFIX_0F3810) },
592d1631
L
5612 { Bad_Opcode },
5613 { Bad_Opcode },
5614 { Bad_Opcode },
f88c9eb0
SP
5615 { PREFIX_TABLE (PREFIX_0F3814) },
5616 { PREFIX_TABLE (PREFIX_0F3815) },
592d1631 5617 { Bad_Opcode },
f88c9eb0
SP
5618 { PREFIX_TABLE (PREFIX_0F3817) },
5619 /* 18 */
592d1631
L
5620 { Bad_Opcode },
5621 { Bad_Opcode },
5622 { Bad_Opcode },
5623 { Bad_Opcode },
f88c9eb0
SP
5624 { "pabsb", { MX, EM } },
5625 { "pabsw", { MX, EM } },
5626 { "pabsd", { MX, EM } },
592d1631 5627 { Bad_Opcode },
f88c9eb0
SP
5628 /* 20 */
5629 { PREFIX_TABLE (PREFIX_0F3820) },
5630 { PREFIX_TABLE (PREFIX_0F3821) },
5631 { PREFIX_TABLE (PREFIX_0F3822) },
5632 { PREFIX_TABLE (PREFIX_0F3823) },
5633 { PREFIX_TABLE (PREFIX_0F3824) },
5634 { PREFIX_TABLE (PREFIX_0F3825) },
592d1631
L
5635 { Bad_Opcode },
5636 { Bad_Opcode },
f88c9eb0
SP
5637 /* 28 */
5638 { PREFIX_TABLE (PREFIX_0F3828) },
5639 { PREFIX_TABLE (PREFIX_0F3829) },
5640 { PREFIX_TABLE (PREFIX_0F382A) },
5641 { PREFIX_TABLE (PREFIX_0F382B) },
592d1631
L
5642 { Bad_Opcode },
5643 { Bad_Opcode },
5644 { Bad_Opcode },
5645 { Bad_Opcode },
f88c9eb0
SP
5646 /* 30 */
5647 { PREFIX_TABLE (PREFIX_0F3830) },
5648 { PREFIX_TABLE (PREFIX_0F3831) },
5649 { PREFIX_TABLE (PREFIX_0F3832) },
5650 { PREFIX_TABLE (PREFIX_0F3833) },
5651 { PREFIX_TABLE (PREFIX_0F3834) },
5652 { PREFIX_TABLE (PREFIX_0F3835) },
592d1631 5653 { Bad_Opcode },
f88c9eb0
SP
5654 { PREFIX_TABLE (PREFIX_0F3837) },
5655 /* 38 */
5656 { PREFIX_TABLE (PREFIX_0F3838) },
5657 { PREFIX_TABLE (PREFIX_0F3839) },
5658 { PREFIX_TABLE (PREFIX_0F383A) },
5659 { PREFIX_TABLE (PREFIX_0F383B) },
5660 { PREFIX_TABLE (PREFIX_0F383C) },
5661 { PREFIX_TABLE (PREFIX_0F383D) },
5662 { PREFIX_TABLE (PREFIX_0F383E) },
5663 { PREFIX_TABLE (PREFIX_0F383F) },
5664 /* 40 */
5665 { PREFIX_TABLE (PREFIX_0F3840) },
5666 { PREFIX_TABLE (PREFIX_0F3841) },
592d1631
L
5667 { Bad_Opcode },
5668 { Bad_Opcode },
5669 { Bad_Opcode },
5670 { Bad_Opcode },
5671 { Bad_Opcode },
5672 { Bad_Opcode },
f88c9eb0 5673 /* 48 */
592d1631
L
5674 { Bad_Opcode },
5675 { Bad_Opcode },
5676 { Bad_Opcode },
5677 { Bad_Opcode },
5678 { Bad_Opcode },
5679 { Bad_Opcode },
5680 { Bad_Opcode },
5681 { Bad_Opcode },
f88c9eb0 5682 /* 50 */
592d1631
L
5683 { Bad_Opcode },
5684 { Bad_Opcode },
5685 { Bad_Opcode },
5686 { Bad_Opcode },
5687 { Bad_Opcode },
5688 { Bad_Opcode },
5689 { Bad_Opcode },
5690 { Bad_Opcode },
f88c9eb0 5691 /* 58 */
592d1631
L
5692 { Bad_Opcode },
5693 { Bad_Opcode },
5694 { Bad_Opcode },
5695 { Bad_Opcode },
5696 { Bad_Opcode },
5697 { Bad_Opcode },
5698 { Bad_Opcode },
5699 { Bad_Opcode },
f88c9eb0 5700 /* 60 */
592d1631
L
5701 { Bad_Opcode },
5702 { Bad_Opcode },
5703 { Bad_Opcode },
5704 { Bad_Opcode },
5705 { Bad_Opcode },
5706 { Bad_Opcode },
5707 { Bad_Opcode },
5708 { Bad_Opcode },
f88c9eb0 5709 /* 68 */
592d1631
L
5710 { Bad_Opcode },
5711 { Bad_Opcode },
5712 { Bad_Opcode },
5713 { Bad_Opcode },
5714 { Bad_Opcode },
5715 { Bad_Opcode },
5716 { Bad_Opcode },
5717 { Bad_Opcode },
f88c9eb0 5718 /* 70 */
592d1631
L
5719 { Bad_Opcode },
5720 { Bad_Opcode },
5721 { Bad_Opcode },
5722 { Bad_Opcode },
5723 { Bad_Opcode },
5724 { Bad_Opcode },
5725 { Bad_Opcode },
5726 { Bad_Opcode },
f88c9eb0 5727 /* 78 */
592d1631
L
5728 { Bad_Opcode },
5729 { Bad_Opcode },
5730 { Bad_Opcode },
5731 { Bad_Opcode },
5732 { Bad_Opcode },
5733 { Bad_Opcode },
5734 { Bad_Opcode },
5735 { Bad_Opcode },
f88c9eb0
SP
5736 /* 80 */
5737 { PREFIX_TABLE (PREFIX_0F3880) },
5738 { PREFIX_TABLE (PREFIX_0F3881) },
592d1631
L
5739 { Bad_Opcode },
5740 { Bad_Opcode },
5741 { Bad_Opcode },
5742 { Bad_Opcode },
5743 { Bad_Opcode },
5744 { Bad_Opcode },
f88c9eb0 5745 /* 88 */
592d1631
L
5746 { Bad_Opcode },
5747 { Bad_Opcode },
5748 { Bad_Opcode },
5749 { Bad_Opcode },
5750 { Bad_Opcode },
5751 { Bad_Opcode },
5752 { Bad_Opcode },
5753 { Bad_Opcode },
f88c9eb0 5754 /* 90 */
592d1631
L
5755 { Bad_Opcode },
5756 { Bad_Opcode },
5757 { Bad_Opcode },
5758 { Bad_Opcode },
5759 { Bad_Opcode },
5760 { Bad_Opcode },
5761 { Bad_Opcode },
5762 { Bad_Opcode },
f88c9eb0 5763 /* 98 */
592d1631
L
5764 { Bad_Opcode },
5765 { Bad_Opcode },
5766 { Bad_Opcode },
5767 { Bad_Opcode },
5768 { Bad_Opcode },
5769 { Bad_Opcode },
5770 { Bad_Opcode },
5771 { Bad_Opcode },
f88c9eb0 5772 /* a0 */
592d1631
L
5773 { Bad_Opcode },
5774 { Bad_Opcode },
5775 { Bad_Opcode },
5776 { Bad_Opcode },
5777 { Bad_Opcode },
5778 { Bad_Opcode },
5779 { Bad_Opcode },
5780 { Bad_Opcode },
f88c9eb0 5781 /* a8 */
592d1631
L
5782 { Bad_Opcode },
5783 { Bad_Opcode },
5784 { Bad_Opcode },
5785 { Bad_Opcode },
5786 { Bad_Opcode },
5787 { Bad_Opcode },
5788 { Bad_Opcode },
5789 { Bad_Opcode },
f88c9eb0 5790 /* b0 */
592d1631
L
5791 { Bad_Opcode },
5792 { Bad_Opcode },
5793 { Bad_Opcode },
5794 { Bad_Opcode },
5795 { Bad_Opcode },
5796 { Bad_Opcode },
5797 { Bad_Opcode },
5798 { Bad_Opcode },
f88c9eb0 5799 /* b8 */
592d1631
L
5800 { Bad_Opcode },
5801 { Bad_Opcode },
5802 { Bad_Opcode },
5803 { Bad_Opcode },
5804 { Bad_Opcode },
5805 { Bad_Opcode },
5806 { Bad_Opcode },
5807 { Bad_Opcode },
f88c9eb0 5808 /* c0 */
592d1631
L
5809 { Bad_Opcode },
5810 { Bad_Opcode },
5811 { Bad_Opcode },
5812 { Bad_Opcode },
5813 { Bad_Opcode },
5814 { Bad_Opcode },
5815 { Bad_Opcode },
5816 { Bad_Opcode },
f88c9eb0 5817 /* c8 */
592d1631
L
5818 { Bad_Opcode },
5819 { Bad_Opcode },
5820 { Bad_Opcode },
5821 { Bad_Opcode },
5822 { Bad_Opcode },
5823 { Bad_Opcode },
5824 { Bad_Opcode },
5825 { Bad_Opcode },
f88c9eb0 5826 /* d0 */
592d1631
L
5827 { Bad_Opcode },
5828 { Bad_Opcode },
5829 { Bad_Opcode },
5830 { Bad_Opcode },
5831 { Bad_Opcode },
5832 { Bad_Opcode },
5833 { Bad_Opcode },
5834 { Bad_Opcode },
f88c9eb0 5835 /* d8 */
592d1631
L
5836 { Bad_Opcode },
5837 { Bad_Opcode },
5838 { Bad_Opcode },
f88c9eb0
SP
5839 { PREFIX_TABLE (PREFIX_0F38DB) },
5840 { PREFIX_TABLE (PREFIX_0F38DC) },
5841 { PREFIX_TABLE (PREFIX_0F38DD) },
5842 { PREFIX_TABLE (PREFIX_0F38DE) },
5843 { PREFIX_TABLE (PREFIX_0F38DF) },
5844 /* e0 */
592d1631
L
5845 { Bad_Opcode },
5846 { Bad_Opcode },
5847 { Bad_Opcode },
5848 { Bad_Opcode },
5849 { Bad_Opcode },
5850 { Bad_Opcode },
5851 { Bad_Opcode },
5852 { Bad_Opcode },
f88c9eb0 5853 /* e8 */
592d1631
L
5854 { Bad_Opcode },
5855 { Bad_Opcode },
5856 { Bad_Opcode },
5857 { Bad_Opcode },
5858 { Bad_Opcode },
5859 { Bad_Opcode },
5860 { Bad_Opcode },
5861 { Bad_Opcode },
f88c9eb0
SP
5862 /* f0 */
5863 { PREFIX_TABLE (PREFIX_0F38F0) },
5864 { PREFIX_TABLE (PREFIX_0F38F1) },
592d1631
L
5865 { Bad_Opcode },
5866 { Bad_Opcode },
5867 { Bad_Opcode },
5868 { Bad_Opcode },
5869 { Bad_Opcode },
5870 { Bad_Opcode },
f88c9eb0 5871 /* f8 */
592d1631
L
5872 { Bad_Opcode },
5873 { Bad_Opcode },
5874 { Bad_Opcode },
5875 { Bad_Opcode },
5876 { Bad_Opcode },
5877 { Bad_Opcode },
5878 { Bad_Opcode },
5879 { Bad_Opcode },
f88c9eb0
SP
5880 },
5881 /* THREE_BYTE_0F3A */
5882 {
5883 /* 00 */
592d1631
L
5884 { Bad_Opcode },
5885 { Bad_Opcode },
5886 { Bad_Opcode },
5887 { Bad_Opcode },
5888 { Bad_Opcode },
5889 { Bad_Opcode },
5890 { Bad_Opcode },
5891 { Bad_Opcode },
f88c9eb0
SP
5892 /* 08 */
5893 { PREFIX_TABLE (PREFIX_0F3A08) },
5894 { PREFIX_TABLE (PREFIX_0F3A09) },
5895 { PREFIX_TABLE (PREFIX_0F3A0A) },
5896 { PREFIX_TABLE (PREFIX_0F3A0B) },
5897 { PREFIX_TABLE (PREFIX_0F3A0C) },
5898 { PREFIX_TABLE (PREFIX_0F3A0D) },
5899 { PREFIX_TABLE (PREFIX_0F3A0E) },
5900 { "palignr", { MX, EM, Ib } },
5901 /* 10 */
592d1631
L
5902 { Bad_Opcode },
5903 { Bad_Opcode },
5904 { Bad_Opcode },
5905 { Bad_Opcode },
f88c9eb0
SP
5906 { PREFIX_TABLE (PREFIX_0F3A14) },
5907 { PREFIX_TABLE (PREFIX_0F3A15) },
5908 { PREFIX_TABLE (PREFIX_0F3A16) },
5909 { PREFIX_TABLE (PREFIX_0F3A17) },
5910 /* 18 */
592d1631
L
5911 { Bad_Opcode },
5912 { Bad_Opcode },
5913 { Bad_Opcode },
5914 { Bad_Opcode },
5915 { Bad_Opcode },
5916 { Bad_Opcode },
5917 { Bad_Opcode },
5918 { Bad_Opcode },
f88c9eb0
SP
5919 /* 20 */
5920 { PREFIX_TABLE (PREFIX_0F3A20) },
5921 { PREFIX_TABLE (PREFIX_0F3A21) },
5922 { PREFIX_TABLE (PREFIX_0F3A22) },
592d1631
L
5923 { Bad_Opcode },
5924 { Bad_Opcode },
5925 { Bad_Opcode },
5926 { Bad_Opcode },
5927 { Bad_Opcode },
f88c9eb0 5928 /* 28 */
592d1631
L
5929 { Bad_Opcode },
5930 { Bad_Opcode },
5931 { Bad_Opcode },
5932 { Bad_Opcode },
5933 { Bad_Opcode },
5934 { Bad_Opcode },
5935 { Bad_Opcode },
5936 { Bad_Opcode },
f88c9eb0 5937 /* 30 */
592d1631
L
5938 { Bad_Opcode },
5939 { Bad_Opcode },
5940 { Bad_Opcode },
5941 { Bad_Opcode },
5942 { Bad_Opcode },
5943 { Bad_Opcode },
5944 { Bad_Opcode },
5945 { Bad_Opcode },
f88c9eb0 5946 /* 38 */
592d1631
L
5947 { Bad_Opcode },
5948 { Bad_Opcode },
5949 { Bad_Opcode },
5950 { Bad_Opcode },
5951 { Bad_Opcode },
5952 { Bad_Opcode },
5953 { Bad_Opcode },
5954 { Bad_Opcode },
f88c9eb0
SP
5955 /* 40 */
5956 { PREFIX_TABLE (PREFIX_0F3A40) },
5957 { PREFIX_TABLE (PREFIX_0F3A41) },
5958 { PREFIX_TABLE (PREFIX_0F3A42) },
592d1631 5959 { Bad_Opcode },
f88c9eb0 5960 { PREFIX_TABLE (PREFIX_0F3A44) },
592d1631
L
5961 { Bad_Opcode },
5962 { Bad_Opcode },
5963 { Bad_Opcode },
f88c9eb0 5964 /* 48 */
592d1631
L
5965 { Bad_Opcode },
5966 { Bad_Opcode },
5967 { Bad_Opcode },
5968 { Bad_Opcode },
5969 { Bad_Opcode },
5970 { Bad_Opcode },
5971 { Bad_Opcode },
5972 { Bad_Opcode },
f88c9eb0 5973 /* 50 */
592d1631
L
5974 { Bad_Opcode },
5975 { Bad_Opcode },
5976 { Bad_Opcode },
5977 { Bad_Opcode },
5978 { Bad_Opcode },
5979 { Bad_Opcode },
5980 { Bad_Opcode },
5981 { Bad_Opcode },
f88c9eb0 5982 /* 58 */
592d1631
L
5983 { Bad_Opcode },
5984 { Bad_Opcode },
5985 { Bad_Opcode },
5986 { Bad_Opcode },
5987 { Bad_Opcode },
5988 { Bad_Opcode },
5989 { Bad_Opcode },
5990 { Bad_Opcode },
f88c9eb0
SP
5991 /* 60 */
5992 { PREFIX_TABLE (PREFIX_0F3A60) },
5993 { PREFIX_TABLE (PREFIX_0F3A61) },
5994 { PREFIX_TABLE (PREFIX_0F3A62) },
5995 { PREFIX_TABLE (PREFIX_0F3A63) },
592d1631
L
5996 { Bad_Opcode },
5997 { Bad_Opcode },
5998 { Bad_Opcode },
5999 { Bad_Opcode },
f88c9eb0 6000 /* 68 */
592d1631
L
6001 { Bad_Opcode },
6002 { Bad_Opcode },
6003 { Bad_Opcode },
6004 { Bad_Opcode },
6005 { Bad_Opcode },
6006 { Bad_Opcode },
6007 { Bad_Opcode },
6008 { Bad_Opcode },
f88c9eb0 6009 /* 70 */
592d1631
L
6010 { Bad_Opcode },
6011 { Bad_Opcode },
6012 { Bad_Opcode },
6013 { Bad_Opcode },
6014 { Bad_Opcode },
6015 { Bad_Opcode },
6016 { Bad_Opcode },
6017 { Bad_Opcode },
f88c9eb0 6018 /* 78 */
592d1631
L
6019 { Bad_Opcode },
6020 { Bad_Opcode },
6021 { Bad_Opcode },
6022 { Bad_Opcode },
6023 { Bad_Opcode },
6024 { Bad_Opcode },
6025 { Bad_Opcode },
6026 { Bad_Opcode },
f88c9eb0 6027 /* 80 */
592d1631
L
6028 { Bad_Opcode },
6029 { Bad_Opcode },
6030 { Bad_Opcode },
6031 { Bad_Opcode },
6032 { Bad_Opcode },
6033 { Bad_Opcode },
6034 { Bad_Opcode },
6035 { Bad_Opcode },
f88c9eb0 6036 /* 88 */
592d1631
L
6037 { Bad_Opcode },
6038 { Bad_Opcode },
6039 { Bad_Opcode },
6040 { Bad_Opcode },
6041 { Bad_Opcode },
6042 { Bad_Opcode },
6043 { Bad_Opcode },
6044 { Bad_Opcode },
f88c9eb0 6045 /* 90 */
592d1631
L
6046 { Bad_Opcode },
6047 { Bad_Opcode },
6048 { Bad_Opcode },
6049 { Bad_Opcode },
6050 { Bad_Opcode },
6051 { Bad_Opcode },
6052 { Bad_Opcode },
6053 { Bad_Opcode },
f88c9eb0 6054 /* 98 */
592d1631
L
6055 { Bad_Opcode },
6056 { Bad_Opcode },
6057 { Bad_Opcode },
6058 { Bad_Opcode },
6059 { Bad_Opcode },
6060 { Bad_Opcode },
6061 { Bad_Opcode },
6062 { Bad_Opcode },
f88c9eb0 6063 /* a0 */
592d1631
L
6064 { Bad_Opcode },
6065 { Bad_Opcode },
6066 { Bad_Opcode },
6067 { Bad_Opcode },
6068 { Bad_Opcode },
6069 { Bad_Opcode },
6070 { Bad_Opcode },
6071 { Bad_Opcode },
f88c9eb0 6072 /* a8 */
592d1631
L
6073 { Bad_Opcode },
6074 { Bad_Opcode },
6075 { Bad_Opcode },
6076 { Bad_Opcode },
6077 { Bad_Opcode },
6078 { Bad_Opcode },
6079 { Bad_Opcode },
6080 { Bad_Opcode },
f88c9eb0 6081 /* b0 */
592d1631
L
6082 { Bad_Opcode },
6083 { Bad_Opcode },
6084 { Bad_Opcode },
6085 { Bad_Opcode },
6086 { Bad_Opcode },
6087 { Bad_Opcode },
6088 { Bad_Opcode },
6089 { Bad_Opcode },
f88c9eb0 6090 /* b8 */
592d1631
L
6091 { Bad_Opcode },
6092 { Bad_Opcode },
6093 { Bad_Opcode },
6094 { Bad_Opcode },
6095 { Bad_Opcode },
6096 { Bad_Opcode },
6097 { Bad_Opcode },
6098 { Bad_Opcode },
f88c9eb0 6099 /* c0 */
592d1631
L
6100 { Bad_Opcode },
6101 { Bad_Opcode },
6102 { Bad_Opcode },
6103 { Bad_Opcode },
6104 { Bad_Opcode },
6105 { Bad_Opcode },
6106 { Bad_Opcode },
6107 { Bad_Opcode },
f88c9eb0 6108 /* c8 */
592d1631
L
6109 { Bad_Opcode },
6110 { Bad_Opcode },
6111 { Bad_Opcode },
6112 { Bad_Opcode },
6113 { Bad_Opcode },
6114 { Bad_Opcode },
6115 { Bad_Opcode },
6116 { Bad_Opcode },
f88c9eb0 6117 /* d0 */
592d1631
L
6118 { Bad_Opcode },
6119 { Bad_Opcode },
6120 { Bad_Opcode },
6121 { Bad_Opcode },
6122 { Bad_Opcode },
6123 { Bad_Opcode },
6124 { Bad_Opcode },
6125 { Bad_Opcode },
f88c9eb0 6126 /* d8 */
592d1631
L
6127 { Bad_Opcode },
6128 { Bad_Opcode },
6129 { Bad_Opcode },
6130 { Bad_Opcode },
6131 { Bad_Opcode },
6132 { Bad_Opcode },
6133 { Bad_Opcode },
f88c9eb0
SP
6134 { PREFIX_TABLE (PREFIX_0F3ADF) },
6135 /* e0 */
592d1631
L
6136 { Bad_Opcode },
6137 { Bad_Opcode },
6138 { Bad_Opcode },
6139 { Bad_Opcode },
6140 { Bad_Opcode },
6141 { Bad_Opcode },
6142 { Bad_Opcode },
6143 { Bad_Opcode },
f88c9eb0 6144 /* e8 */
592d1631
L
6145 { Bad_Opcode },
6146 { Bad_Opcode },
6147 { Bad_Opcode },
6148 { Bad_Opcode },
6149 { Bad_Opcode },
6150 { Bad_Opcode },
6151 { Bad_Opcode },
6152 { Bad_Opcode },
f88c9eb0 6153 /* f0 */
592d1631
L
6154 { Bad_Opcode },
6155 { Bad_Opcode },
6156 { Bad_Opcode },
6157 { Bad_Opcode },
6158 { Bad_Opcode },
6159 { Bad_Opcode },
6160 { Bad_Opcode },
6161 { Bad_Opcode },
f88c9eb0 6162 /* f8 */
592d1631
L
6163 { Bad_Opcode },
6164 { Bad_Opcode },
6165 { Bad_Opcode },
6166 { Bad_Opcode },
6167 { Bad_Opcode },
6168 { Bad_Opcode },
6169 { Bad_Opcode },
6170 { Bad_Opcode },
f88c9eb0
SP
6171 },
6172
6173 /* THREE_BYTE_0F7A */
6174 {
6175 /* 00 */
592d1631
L
6176 { Bad_Opcode },
6177 { Bad_Opcode },
6178 { Bad_Opcode },
6179 { Bad_Opcode },
6180 { Bad_Opcode },
6181 { Bad_Opcode },
6182 { Bad_Opcode },
6183 { Bad_Opcode },
f88c9eb0 6184 /* 08 */
592d1631
L
6185 { Bad_Opcode },
6186 { Bad_Opcode },
6187 { Bad_Opcode },
6188 { Bad_Opcode },
6189 { Bad_Opcode },
6190 { Bad_Opcode },
6191 { Bad_Opcode },
6192 { Bad_Opcode },
f88c9eb0 6193 /* 10 */
592d1631
L
6194 { Bad_Opcode },
6195 { Bad_Opcode },
6196 { Bad_Opcode },
6197 { Bad_Opcode },
6198 { Bad_Opcode },
6199 { Bad_Opcode },
6200 { Bad_Opcode },
6201 { Bad_Opcode },
f88c9eb0 6202 /* 18 */
592d1631
L
6203 { Bad_Opcode },
6204 { Bad_Opcode },
6205 { Bad_Opcode },
6206 { Bad_Opcode },
6207 { Bad_Opcode },
6208 { Bad_Opcode },
6209 { Bad_Opcode },
6210 { Bad_Opcode },
f88c9eb0
SP
6211 /* 20 */
6212 { "ptest", { XX } },
592d1631
L
6213 { Bad_Opcode },
6214 { Bad_Opcode },
6215 { Bad_Opcode },
6216 { Bad_Opcode },
6217 { Bad_Opcode },
6218 { Bad_Opcode },
6219 { Bad_Opcode },
f88c9eb0 6220 /* 28 */
592d1631
L
6221 { Bad_Opcode },
6222 { Bad_Opcode },
6223 { Bad_Opcode },
6224 { Bad_Opcode },
6225 { Bad_Opcode },
6226 { Bad_Opcode },
6227 { Bad_Opcode },
6228 { Bad_Opcode },
f88c9eb0 6229 /* 30 */
592d1631
L
6230 { Bad_Opcode },
6231 { Bad_Opcode },
6232 { Bad_Opcode },
6233 { Bad_Opcode },
6234 { Bad_Opcode },
6235 { Bad_Opcode },
6236 { Bad_Opcode },
6237 { Bad_Opcode },
f88c9eb0 6238 /* 38 */
592d1631
L
6239 { Bad_Opcode },
6240 { Bad_Opcode },
6241 { Bad_Opcode },
6242 { Bad_Opcode },
6243 { Bad_Opcode },
6244 { Bad_Opcode },
6245 { Bad_Opcode },
6246 { Bad_Opcode },
f88c9eb0 6247 /* 40 */
592d1631 6248 { Bad_Opcode },
f88c9eb0
SP
6249 { "phaddbw", { XM, EXq } },
6250 { "phaddbd", { XM, EXq } },
6251 { "phaddbq", { XM, EXq } },
592d1631
L
6252 { Bad_Opcode },
6253 { Bad_Opcode },
f88c9eb0
SP
6254 { "phaddwd", { XM, EXq } },
6255 { "phaddwq", { XM, EXq } },
6256 /* 48 */
592d1631
L
6257 { Bad_Opcode },
6258 { Bad_Opcode },
6259 { Bad_Opcode },
f88c9eb0 6260 { "phadddq", { XM, EXq } },
592d1631
L
6261 { Bad_Opcode },
6262 { Bad_Opcode },
6263 { Bad_Opcode },
6264 { Bad_Opcode },
f88c9eb0 6265 /* 50 */
592d1631 6266 { Bad_Opcode },
f88c9eb0
SP
6267 { "phaddubw", { XM, EXq } },
6268 { "phaddubd", { XM, EXq } },
6269 { "phaddubq", { XM, EXq } },
592d1631
L
6270 { Bad_Opcode },
6271 { Bad_Opcode },
f88c9eb0
SP
6272 { "phadduwd", { XM, EXq } },
6273 { "phadduwq", { XM, EXq } },
6274 /* 58 */
592d1631
L
6275 { Bad_Opcode },
6276 { Bad_Opcode },
6277 { Bad_Opcode },
f88c9eb0 6278 { "phaddudq", { XM, EXq } },
592d1631
L
6279 { Bad_Opcode },
6280 { Bad_Opcode },
6281 { Bad_Opcode },
6282 { Bad_Opcode },
f88c9eb0 6283 /* 60 */
592d1631 6284 { Bad_Opcode },
f88c9eb0
SP
6285 { "phsubbw", { XM, EXq } },
6286 { "phsubbd", { XM, EXq } },
6287 { "phsubbq", { XM, EXq } },
592d1631
L
6288 { Bad_Opcode },
6289 { Bad_Opcode },
6290 { Bad_Opcode },
6291 { Bad_Opcode },
4e7d34a6 6292 /* 68 */
592d1631
L
6293 { Bad_Opcode },
6294 { Bad_Opcode },
6295 { Bad_Opcode },
6296 { Bad_Opcode },
6297 { Bad_Opcode },
6298 { Bad_Opcode },
6299 { Bad_Opcode },
6300 { Bad_Opcode },
85f10a01 6301 /* 70 */
592d1631
L
6302 { Bad_Opcode },
6303 { Bad_Opcode },
6304 { Bad_Opcode },
6305 { Bad_Opcode },
6306 { Bad_Opcode },
6307 { Bad_Opcode },
6308 { Bad_Opcode },
6309 { Bad_Opcode },
85f10a01 6310 /* 78 */
592d1631
L
6311 { Bad_Opcode },
6312 { Bad_Opcode },
6313 { Bad_Opcode },
6314 { Bad_Opcode },
6315 { Bad_Opcode },
6316 { Bad_Opcode },
6317 { Bad_Opcode },
6318 { Bad_Opcode },
85f10a01 6319 /* 80 */
592d1631
L
6320 { Bad_Opcode },
6321 { Bad_Opcode },
6322 { Bad_Opcode },
6323 { Bad_Opcode },
6324 { Bad_Opcode },
6325 { Bad_Opcode },
6326 { Bad_Opcode },
6327 { Bad_Opcode },
85f10a01 6328 /* 88 */
592d1631
L
6329 { Bad_Opcode },
6330 { Bad_Opcode },
6331 { Bad_Opcode },
6332 { Bad_Opcode },
6333 { Bad_Opcode },
6334 { Bad_Opcode },
6335 { Bad_Opcode },
6336 { Bad_Opcode },
85f10a01 6337 /* 90 */
592d1631
L
6338 { Bad_Opcode },
6339 { Bad_Opcode },
6340 { Bad_Opcode },
6341 { Bad_Opcode },
6342 { Bad_Opcode },
6343 { Bad_Opcode },
6344 { Bad_Opcode },
6345 { Bad_Opcode },
85f10a01 6346 /* 98 */
592d1631
L
6347 { Bad_Opcode },
6348 { Bad_Opcode },
6349 { Bad_Opcode },
6350 { Bad_Opcode },
6351 { Bad_Opcode },
6352 { Bad_Opcode },
6353 { Bad_Opcode },
6354 { Bad_Opcode },
85f10a01 6355 /* a0 */
592d1631
L
6356 { Bad_Opcode },
6357 { Bad_Opcode },
6358 { Bad_Opcode },
6359 { Bad_Opcode },
6360 { Bad_Opcode },
6361 { Bad_Opcode },
6362 { Bad_Opcode },
6363 { Bad_Opcode },
85f10a01 6364 /* a8 */
592d1631
L
6365 { Bad_Opcode },
6366 { Bad_Opcode },
6367 { Bad_Opcode },
6368 { Bad_Opcode },
6369 { Bad_Opcode },
6370 { Bad_Opcode },
6371 { Bad_Opcode },
6372 { Bad_Opcode },
85f10a01 6373 /* b0 */
592d1631
L
6374 { Bad_Opcode },
6375 { Bad_Opcode },
6376 { Bad_Opcode },
6377 { Bad_Opcode },
6378 { Bad_Opcode },
6379 { Bad_Opcode },
6380 { Bad_Opcode },
6381 { Bad_Opcode },
85f10a01 6382 /* b8 */
592d1631
L
6383 { Bad_Opcode },
6384 { Bad_Opcode },
6385 { Bad_Opcode },
6386 { Bad_Opcode },
6387 { Bad_Opcode },
6388 { Bad_Opcode },
6389 { Bad_Opcode },
6390 { Bad_Opcode },
85f10a01 6391 /* c0 */
592d1631
L
6392 { Bad_Opcode },
6393 { Bad_Opcode },
6394 { Bad_Opcode },
6395 { Bad_Opcode },
6396 { Bad_Opcode },
6397 { Bad_Opcode },
6398 { Bad_Opcode },
6399 { Bad_Opcode },
85f10a01 6400 /* c8 */
592d1631
L
6401 { Bad_Opcode },
6402 { Bad_Opcode },
6403 { Bad_Opcode },
6404 { Bad_Opcode },
6405 { Bad_Opcode },
6406 { Bad_Opcode },
6407 { Bad_Opcode },
6408 { Bad_Opcode },
85f10a01 6409 /* d0 */
592d1631
L
6410 { Bad_Opcode },
6411 { Bad_Opcode },
6412 { Bad_Opcode },
6413 { Bad_Opcode },
6414 { Bad_Opcode },
6415 { Bad_Opcode },
6416 { Bad_Opcode },
6417 { Bad_Opcode },
85f10a01 6418 /* d8 */
592d1631
L
6419 { Bad_Opcode },
6420 { Bad_Opcode },
6421 { Bad_Opcode },
6422 { Bad_Opcode },
6423 { Bad_Opcode },
6424 { Bad_Opcode },
6425 { Bad_Opcode },
6426 { Bad_Opcode },
85f10a01 6427 /* e0 */
592d1631
L
6428 { Bad_Opcode },
6429 { Bad_Opcode },
6430 { Bad_Opcode },
6431 { Bad_Opcode },
6432 { Bad_Opcode },
6433 { Bad_Opcode },
6434 { Bad_Opcode },
6435 { Bad_Opcode },
85f10a01 6436 /* e8 */
592d1631
L
6437 { Bad_Opcode },
6438 { Bad_Opcode },
6439 { Bad_Opcode },
6440 { Bad_Opcode },
6441 { Bad_Opcode },
6442 { Bad_Opcode },
6443 { Bad_Opcode },
6444 { Bad_Opcode },
85f10a01 6445 /* f0 */
592d1631
L
6446 { Bad_Opcode },
6447 { Bad_Opcode },
6448 { Bad_Opcode },
6449 { Bad_Opcode },
6450 { Bad_Opcode },
6451 { Bad_Opcode },
6452 { Bad_Opcode },
6453 { Bad_Opcode },
85f10a01 6454 /* f8 */
592d1631
L
6455 { Bad_Opcode },
6456 { Bad_Opcode },
6457 { Bad_Opcode },
6458 { Bad_Opcode },
6459 { Bad_Opcode },
6460 { Bad_Opcode },
6461 { Bad_Opcode },
6462 { Bad_Opcode },
85f10a01 6463 },
f88c9eb0
SP
6464};
6465
6466static const struct dis386 xop_table[][256] = {
5dd85c99 6467 /* XOP_08 */
85f10a01
MM
6468 {
6469 /* 00 */
592d1631
L
6470 { Bad_Opcode },
6471 { Bad_Opcode },
6472 { Bad_Opcode },
6473 { Bad_Opcode },
6474 { Bad_Opcode },
6475 { Bad_Opcode },
6476 { Bad_Opcode },
6477 { Bad_Opcode },
85f10a01 6478 /* 08 */
592d1631
L
6479 { Bad_Opcode },
6480 { Bad_Opcode },
6481 { Bad_Opcode },
6482 { Bad_Opcode },
6483 { Bad_Opcode },
6484 { Bad_Opcode },
6485 { Bad_Opcode },
6486 { Bad_Opcode },
85f10a01 6487 /* 10 */
2a2a0f38 6488 { "bextr", { Gv, Ev, Iq } },
592d1631
L
6489 { Bad_Opcode },
6490 { Bad_Opcode },
6491 { Bad_Opcode },
6492 { Bad_Opcode },
6493 { Bad_Opcode },
6494 { Bad_Opcode },
6495 { Bad_Opcode },
85f10a01 6496 /* 18 */
592d1631
L
6497 { Bad_Opcode },
6498 { Bad_Opcode },
6499 { Bad_Opcode },
6500 { Bad_Opcode },
6501 { Bad_Opcode },
6502 { Bad_Opcode },
6503 { Bad_Opcode },
6504 { Bad_Opcode },
85f10a01 6505 /* 20 */
592d1631
L
6506 { Bad_Opcode },
6507 { Bad_Opcode },
6508 { Bad_Opcode },
6509 { Bad_Opcode },
6510 { Bad_Opcode },
6511 { Bad_Opcode },
6512 { Bad_Opcode },
6513 { Bad_Opcode },
85f10a01 6514 /* 28 */
592d1631
L
6515 { Bad_Opcode },
6516 { Bad_Opcode },
6517 { Bad_Opcode },
6518 { Bad_Opcode },
6519 { Bad_Opcode },
6520 { Bad_Opcode },
6521 { Bad_Opcode },
6522 { Bad_Opcode },
c0f3af97 6523 /* 30 */
592d1631
L
6524 { Bad_Opcode },
6525 { Bad_Opcode },
6526 { Bad_Opcode },
6527 { Bad_Opcode },
6528 { Bad_Opcode },
6529 { Bad_Opcode },
6530 { Bad_Opcode },
6531 { Bad_Opcode },
c0f3af97 6532 /* 38 */
592d1631
L
6533 { Bad_Opcode },
6534 { Bad_Opcode },
6535 { Bad_Opcode },
6536 { Bad_Opcode },
6537 { Bad_Opcode },
6538 { Bad_Opcode },
6539 { Bad_Opcode },
6540 { Bad_Opcode },
c0f3af97 6541 /* 40 */
592d1631
L
6542 { Bad_Opcode },
6543 { Bad_Opcode },
6544 { Bad_Opcode },
6545 { Bad_Opcode },
6546 { Bad_Opcode },
6547 { Bad_Opcode },
6548 { Bad_Opcode },
6549 { Bad_Opcode },
85f10a01 6550 /* 48 */
592d1631
L
6551 { Bad_Opcode },
6552 { Bad_Opcode },
6553 { Bad_Opcode },
6554 { Bad_Opcode },
6555 { Bad_Opcode },
6556 { Bad_Opcode },
6557 { Bad_Opcode },
6558 { Bad_Opcode },
c0f3af97 6559 /* 50 */
592d1631
L
6560 { Bad_Opcode },
6561 { Bad_Opcode },
6562 { Bad_Opcode },
6563 { Bad_Opcode },
6564 { Bad_Opcode },
6565 { Bad_Opcode },
6566 { Bad_Opcode },
6567 { Bad_Opcode },
85f10a01 6568 /* 58 */
592d1631
L
6569 { Bad_Opcode },
6570 { Bad_Opcode },
6571 { Bad_Opcode },
6572 { Bad_Opcode },
6573 { Bad_Opcode },
6574 { Bad_Opcode },
6575 { Bad_Opcode },
6576 { Bad_Opcode },
c1e679ec 6577 /* 60 */
592d1631
L
6578 { Bad_Opcode },
6579 { Bad_Opcode },
6580 { Bad_Opcode },
6581 { Bad_Opcode },
6582 { Bad_Opcode },
6583 { Bad_Opcode },
6584 { Bad_Opcode },
6585 { Bad_Opcode },
c0f3af97 6586 /* 68 */
592d1631
L
6587 { Bad_Opcode },
6588 { Bad_Opcode },
6589 { Bad_Opcode },
6590 { Bad_Opcode },
6591 { Bad_Opcode },
6592 { Bad_Opcode },
6593 { Bad_Opcode },
6594 { Bad_Opcode },
85f10a01 6595 /* 70 */
592d1631
L
6596 { Bad_Opcode },
6597 { Bad_Opcode },
6598 { Bad_Opcode },
6599 { Bad_Opcode },
6600 { Bad_Opcode },
6601 { Bad_Opcode },
6602 { Bad_Opcode },
6603 { Bad_Opcode },
85f10a01 6604 /* 78 */
592d1631
L
6605 { Bad_Opcode },
6606 { Bad_Opcode },
6607 { Bad_Opcode },
6608 { Bad_Opcode },
6609 { Bad_Opcode },
6610 { Bad_Opcode },
6611 { Bad_Opcode },
6612 { Bad_Opcode },
85f10a01 6613 /* 80 */
592d1631
L
6614 { Bad_Opcode },
6615 { Bad_Opcode },
6616 { Bad_Opcode },
6617 { Bad_Opcode },
6618 { Bad_Opcode },
5dd85c99
SP
6619 { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6620 { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6621 { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6622 /* 88 */
592d1631
L
6623 { Bad_Opcode },
6624 { Bad_Opcode },
6625 { Bad_Opcode },
6626 { Bad_Opcode },
6627 { Bad_Opcode },
6628 { Bad_Opcode },
5dd85c99
SP
6629 { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6630 { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6631 /* 90 */
592d1631
L
6632 { Bad_Opcode },
6633 { Bad_Opcode },
6634 { Bad_Opcode },
6635 { Bad_Opcode },
6636 { Bad_Opcode },
5dd85c99
SP
6637 { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6638 { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6639 { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6640 /* 98 */
592d1631
L
6641 { Bad_Opcode },
6642 { Bad_Opcode },
6643 { Bad_Opcode },
6644 { Bad_Opcode },
6645 { Bad_Opcode },
6646 { Bad_Opcode },
5dd85c99
SP
6647 { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6648 { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6649 /* a0 */
592d1631
L
6650 { Bad_Opcode },
6651 { Bad_Opcode },
5dd85c99
SP
6652 { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6653 { "vpperm", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
592d1631
L
6654 { Bad_Opcode },
6655 { Bad_Opcode },
5dd85c99 6656 { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
592d1631 6657 { Bad_Opcode },
5dd85c99 6658 /* a8 */
592d1631
L
6659 { Bad_Opcode },
6660 { Bad_Opcode },
6661 { Bad_Opcode },
6662 { Bad_Opcode },
6663 { Bad_Opcode },
6664 { Bad_Opcode },
6665 { Bad_Opcode },
6666 { Bad_Opcode },
5dd85c99 6667 /* b0 */
592d1631
L
6668 { Bad_Opcode },
6669 { Bad_Opcode },
6670 { Bad_Opcode },
6671 { Bad_Opcode },
6672 { Bad_Opcode },
6673 { Bad_Opcode },
5dd85c99 6674 { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
592d1631 6675 { Bad_Opcode },
5dd85c99 6676 /* b8 */
592d1631
L
6677 { Bad_Opcode },
6678 { Bad_Opcode },
6679 { Bad_Opcode },
6680 { Bad_Opcode },
6681 { Bad_Opcode },
6682 { Bad_Opcode },
6683 { Bad_Opcode },
6684 { Bad_Opcode },
5dd85c99
SP
6685 /* c0 */
6686 { "vprotb", { XM, Vex_2src_1, Ib } },
6687 { "vprotw", { XM, Vex_2src_1, Ib } },
6688 { "vprotd", { XM, Vex_2src_1, Ib } },
6689 { "vprotq", { XM, Vex_2src_1, Ib } },
592d1631
L
6690 { Bad_Opcode },
6691 { Bad_Opcode },
6692 { Bad_Opcode },
6693 { Bad_Opcode },
5dd85c99 6694 /* c8 */
592d1631
L
6695 { Bad_Opcode },
6696 { Bad_Opcode },
6697 { Bad_Opcode },
6698 { Bad_Opcode },
5dd85c99
SP
6699 { "vpcomb", { XM, Vex128, EXx, Ib } },
6700 { "vpcomw", { XM, Vex128, EXx, Ib } },
6701 { "vpcomd", { XM, Vex128, EXx, Ib } },
6702 { "vpcomq", { XM, Vex128, EXx, Ib } },
6703 /* d0 */
592d1631
L
6704 { Bad_Opcode },
6705 { Bad_Opcode },
6706 { Bad_Opcode },
6707 { Bad_Opcode },
6708 { Bad_Opcode },
6709 { Bad_Opcode },
6710 { Bad_Opcode },
6711 { Bad_Opcode },
5dd85c99 6712 /* d8 */
592d1631
L
6713 { Bad_Opcode },
6714 { Bad_Opcode },
6715 { Bad_Opcode },
6716 { Bad_Opcode },
6717 { Bad_Opcode },
6718 { Bad_Opcode },
6719 { Bad_Opcode },
6720 { Bad_Opcode },
5dd85c99 6721 /* e0 */
592d1631
L
6722 { Bad_Opcode },
6723 { Bad_Opcode },
6724 { Bad_Opcode },
6725 { Bad_Opcode },
6726 { Bad_Opcode },
6727 { Bad_Opcode },
6728 { Bad_Opcode },
6729 { Bad_Opcode },
5dd85c99 6730 /* e8 */
592d1631
L
6731 { Bad_Opcode },
6732 { Bad_Opcode },
6733 { Bad_Opcode },
6734 { Bad_Opcode },
5dd85c99
SP
6735 { "vpcomub", { XM, Vex128, EXx, Ib } },
6736 { "vpcomuw", { XM, Vex128, EXx, Ib } },
6737 { "vpcomud", { XM, Vex128, EXx, Ib } },
6738 { "vpcomuq", { XM, Vex128, EXx, Ib } },
6739 /* f0 */
592d1631
L
6740 { Bad_Opcode },
6741 { Bad_Opcode },
6742 { Bad_Opcode },
6743 { Bad_Opcode },
6744 { Bad_Opcode },
6745 { Bad_Opcode },
6746 { Bad_Opcode },
6747 { Bad_Opcode },
5dd85c99 6748 /* f8 */
592d1631
L
6749 { Bad_Opcode },
6750 { Bad_Opcode },
6751 { Bad_Opcode },
6752 { Bad_Opcode },
6753 { Bad_Opcode },
6754 { Bad_Opcode },
6755 { Bad_Opcode },
6756 { Bad_Opcode },
5dd85c99
SP
6757 },
6758 /* XOP_09 */
6759 {
6760 /* 00 */
592d1631 6761 { Bad_Opcode },
2a2a0f38
QN
6762 { REG_TABLE (REG_XOP_TBM_01) },
6763 { REG_TABLE (REG_XOP_TBM_02) },
592d1631
L
6764 { Bad_Opcode },
6765 { Bad_Opcode },
6766 { Bad_Opcode },
6767 { Bad_Opcode },
6768 { Bad_Opcode },
5dd85c99 6769 /* 08 */
592d1631
L
6770 { Bad_Opcode },
6771 { Bad_Opcode },
6772 { Bad_Opcode },
6773 { Bad_Opcode },
6774 { Bad_Opcode },
6775 { Bad_Opcode },
6776 { Bad_Opcode },
6777 { Bad_Opcode },
5dd85c99 6778 /* 10 */
592d1631
L
6779 { Bad_Opcode },
6780 { Bad_Opcode },
5dd85c99 6781 { REG_TABLE (REG_XOP_LWPCB) },
592d1631
L
6782 { Bad_Opcode },
6783 { Bad_Opcode },
6784 { Bad_Opcode },
6785 { Bad_Opcode },
6786 { Bad_Opcode },
5dd85c99 6787 /* 18 */
592d1631
L
6788 { Bad_Opcode },
6789 { Bad_Opcode },
6790 { Bad_Opcode },
6791 { Bad_Opcode },
6792 { Bad_Opcode },
6793 { Bad_Opcode },
6794 { Bad_Opcode },
6795 { Bad_Opcode },
5dd85c99 6796 /* 20 */
592d1631
L
6797 { Bad_Opcode },
6798 { Bad_Opcode },
6799 { Bad_Opcode },
6800 { Bad_Opcode },
6801 { Bad_Opcode },
6802 { Bad_Opcode },
6803 { Bad_Opcode },
6804 { Bad_Opcode },
5dd85c99 6805 /* 28 */
592d1631
L
6806 { Bad_Opcode },
6807 { Bad_Opcode },
6808 { Bad_Opcode },
6809 { Bad_Opcode },
6810 { Bad_Opcode },
6811 { Bad_Opcode },
6812 { Bad_Opcode },
6813 { Bad_Opcode },
5dd85c99 6814 /* 30 */
592d1631
L
6815 { Bad_Opcode },
6816 { Bad_Opcode },
6817 { Bad_Opcode },
6818 { Bad_Opcode },
6819 { Bad_Opcode },
6820 { Bad_Opcode },
6821 { Bad_Opcode },
6822 { Bad_Opcode },
5dd85c99 6823 /* 38 */
592d1631
L
6824 { Bad_Opcode },
6825 { Bad_Opcode },
6826 { Bad_Opcode },
6827 { Bad_Opcode },
6828 { Bad_Opcode },
6829 { Bad_Opcode },
6830 { Bad_Opcode },
6831 { Bad_Opcode },
5dd85c99 6832 /* 40 */
592d1631
L
6833 { Bad_Opcode },
6834 { Bad_Opcode },
6835 { Bad_Opcode },
6836 { Bad_Opcode },
6837 { Bad_Opcode },
6838 { Bad_Opcode },
6839 { Bad_Opcode },
6840 { Bad_Opcode },
5dd85c99 6841 /* 48 */
592d1631
L
6842 { Bad_Opcode },
6843 { Bad_Opcode },
6844 { Bad_Opcode },
6845 { Bad_Opcode },
6846 { Bad_Opcode },
6847 { Bad_Opcode },
6848 { Bad_Opcode },
6849 { Bad_Opcode },
5dd85c99 6850 /* 50 */
592d1631
L
6851 { Bad_Opcode },
6852 { Bad_Opcode },
6853 { Bad_Opcode },
6854 { Bad_Opcode },
6855 { Bad_Opcode },
6856 { Bad_Opcode },
6857 { Bad_Opcode },
6858 { Bad_Opcode },
5dd85c99 6859 /* 58 */
592d1631
L
6860 { Bad_Opcode },
6861 { Bad_Opcode },
6862 { Bad_Opcode },
6863 { Bad_Opcode },
6864 { Bad_Opcode },
6865 { Bad_Opcode },
6866 { Bad_Opcode },
6867 { Bad_Opcode },
5dd85c99 6868 /* 60 */
592d1631
L
6869 { Bad_Opcode },
6870 { Bad_Opcode },
6871 { Bad_Opcode },
6872 { Bad_Opcode },
6873 { Bad_Opcode },
6874 { Bad_Opcode },
6875 { Bad_Opcode },
6876 { Bad_Opcode },
5dd85c99 6877 /* 68 */
592d1631
L
6878 { Bad_Opcode },
6879 { Bad_Opcode },
6880 { Bad_Opcode },
6881 { Bad_Opcode },
6882 { Bad_Opcode },
6883 { Bad_Opcode },
6884 { Bad_Opcode },
6885 { Bad_Opcode },
5dd85c99 6886 /* 70 */
592d1631
L
6887 { Bad_Opcode },
6888 { Bad_Opcode },
6889 { Bad_Opcode },
6890 { Bad_Opcode },
6891 { Bad_Opcode },
6892 { Bad_Opcode },
6893 { Bad_Opcode },
6894 { Bad_Opcode },
5dd85c99 6895 /* 78 */
592d1631
L
6896 { Bad_Opcode },
6897 { Bad_Opcode },
6898 { Bad_Opcode },
6899 { Bad_Opcode },
6900 { Bad_Opcode },
6901 { Bad_Opcode },
6902 { Bad_Opcode },
6903 { Bad_Opcode },
5dd85c99 6904 /* 80 */
592a252b
L
6905 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80) },
6906 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81) },
5dd85c99
SP
6907 { "vfrczss", { XM, EXd } },
6908 { "vfrczsd", { XM, EXq } },
592d1631
L
6909 { Bad_Opcode },
6910 { Bad_Opcode },
6911 { Bad_Opcode },
6912 { Bad_Opcode },
5dd85c99 6913 /* 88 */
592d1631
L
6914 { Bad_Opcode },
6915 { Bad_Opcode },
6916 { Bad_Opcode },
6917 { Bad_Opcode },
6918 { Bad_Opcode },
6919 { Bad_Opcode },
6920 { Bad_Opcode },
6921 { Bad_Opcode },
5dd85c99
SP
6922 /* 90 */
6923 { "vprotb", { XM, Vex_2src_1, Vex_2src_2 } },
6924 { "vprotw", { XM, Vex_2src_1, Vex_2src_2 } },
6925 { "vprotd", { XM, Vex_2src_1, Vex_2src_2 } },
6926 { "vprotq", { XM, Vex_2src_1, Vex_2src_2 } },
6927 { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 } },
6928 { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 } },
6929 { "vpshld", { XM, Vex_2src_1, Vex_2src_2 } },
6930 { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 } },
6931 /* 98 */
6932 { "vpshab", { XM, Vex_2src_1, Vex_2src_2 } },
6933 { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 } },
6934 { "vpshad", { XM, Vex_2src_1, Vex_2src_2 } },
6935 { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 } },
592d1631
L
6936 { Bad_Opcode },
6937 { Bad_Opcode },
6938 { Bad_Opcode },
6939 { Bad_Opcode },
5dd85c99 6940 /* a0 */
592d1631
L
6941 { Bad_Opcode },
6942 { Bad_Opcode },
6943 { Bad_Opcode },
6944 { Bad_Opcode },
6945 { Bad_Opcode },
6946 { Bad_Opcode },
6947 { Bad_Opcode },
6948 { Bad_Opcode },
5dd85c99 6949 /* a8 */
592d1631
L
6950 { Bad_Opcode },
6951 { Bad_Opcode },
6952 { Bad_Opcode },
6953 { Bad_Opcode },
6954 { Bad_Opcode },
6955 { Bad_Opcode },
6956 { Bad_Opcode },
6957 { Bad_Opcode },
5dd85c99 6958 /* b0 */
592d1631
L
6959 { Bad_Opcode },
6960 { Bad_Opcode },
6961 { Bad_Opcode },
6962 { Bad_Opcode },
6963 { Bad_Opcode },
6964 { Bad_Opcode },
6965 { Bad_Opcode },
6966 { Bad_Opcode },
5dd85c99 6967 /* b8 */
592d1631
L
6968 { Bad_Opcode },
6969 { Bad_Opcode },
6970 { Bad_Opcode },
6971 { Bad_Opcode },
6972 { Bad_Opcode },
6973 { Bad_Opcode },
6974 { Bad_Opcode },
6975 { Bad_Opcode },
5dd85c99 6976 /* c0 */
592d1631 6977 { Bad_Opcode },
5dd85c99
SP
6978 { "vphaddbw", { XM, EXxmm } },
6979 { "vphaddbd", { XM, EXxmm } },
6980 { "vphaddbq", { XM, EXxmm } },
592d1631
L
6981 { Bad_Opcode },
6982 { Bad_Opcode },
5dd85c99
SP
6983 { "vphaddwd", { XM, EXxmm } },
6984 { "vphaddwq", { XM, EXxmm } },
6985 /* c8 */
592d1631
L
6986 { Bad_Opcode },
6987 { Bad_Opcode },
6988 { Bad_Opcode },
5dd85c99 6989 { "vphadddq", { XM, EXxmm } },
592d1631
L
6990 { Bad_Opcode },
6991 { Bad_Opcode },
6992 { Bad_Opcode },
6993 { Bad_Opcode },
5dd85c99 6994 /* d0 */
592d1631 6995 { Bad_Opcode },
5dd85c99
SP
6996 { "vphaddubw", { XM, EXxmm } },
6997 { "vphaddubd", { XM, EXxmm } },
6998 { "vphaddubq", { XM, EXxmm } },
592d1631
L
6999 { Bad_Opcode },
7000 { Bad_Opcode },
5dd85c99
SP
7001 { "vphadduwd", { XM, EXxmm } },
7002 { "vphadduwq", { XM, EXxmm } },
7003 /* d8 */
592d1631
L
7004 { Bad_Opcode },
7005 { Bad_Opcode },
7006 { Bad_Opcode },
5dd85c99 7007 { "vphaddudq", { XM, EXxmm } },
592d1631
L
7008 { Bad_Opcode },
7009 { Bad_Opcode },
7010 { Bad_Opcode },
7011 { Bad_Opcode },
5dd85c99 7012 /* e0 */
592d1631 7013 { Bad_Opcode },
5dd85c99
SP
7014 { "vphsubbw", { XM, EXxmm } },
7015 { "vphsubwd", { XM, EXxmm } },
7016 { "vphsubdq", { XM, EXxmm } },
592d1631
L
7017 { Bad_Opcode },
7018 { Bad_Opcode },
7019 { Bad_Opcode },
7020 { Bad_Opcode },
4e7d34a6 7021 /* e8 */
592d1631
L
7022 { Bad_Opcode },
7023 { Bad_Opcode },
7024 { Bad_Opcode },
7025 { Bad_Opcode },
7026 { Bad_Opcode },
7027 { Bad_Opcode },
7028 { Bad_Opcode },
7029 { Bad_Opcode },
4e7d34a6 7030 /* f0 */
592d1631
L
7031 { Bad_Opcode },
7032 { Bad_Opcode },
7033 { Bad_Opcode },
7034 { Bad_Opcode },
7035 { Bad_Opcode },
7036 { Bad_Opcode },
7037 { Bad_Opcode },
7038 { Bad_Opcode },
4e7d34a6 7039 /* f8 */
592d1631
L
7040 { Bad_Opcode },
7041 { Bad_Opcode },
7042 { Bad_Opcode },
7043 { Bad_Opcode },
7044 { Bad_Opcode },
7045 { Bad_Opcode },
7046 { Bad_Opcode },
7047 { Bad_Opcode },
4e7d34a6 7048 },
f88c9eb0 7049 /* XOP_0A */
4e7d34a6
L
7050 {
7051 /* 00 */
592d1631
L
7052 { Bad_Opcode },
7053 { Bad_Opcode },
7054 { Bad_Opcode },
7055 { Bad_Opcode },
7056 { Bad_Opcode },
7057 { Bad_Opcode },
7058 { Bad_Opcode },
7059 { Bad_Opcode },
4e7d34a6 7060 /* 08 */
592d1631
L
7061 { Bad_Opcode },
7062 { Bad_Opcode },
7063 { Bad_Opcode },
7064 { Bad_Opcode },
7065 { Bad_Opcode },
7066 { Bad_Opcode },
7067 { Bad_Opcode },
7068 { Bad_Opcode },
4e7d34a6 7069 /* 10 */
2a2a0f38 7070 { "bextr", { Gv, Ev, Iq } },
592d1631 7071 { Bad_Opcode },
f88c9eb0 7072 { REG_TABLE (REG_XOP_LWP) },
592d1631
L
7073 { Bad_Opcode },
7074 { Bad_Opcode },
7075 { Bad_Opcode },
7076 { Bad_Opcode },
7077 { Bad_Opcode },
4e7d34a6 7078 /* 18 */
592d1631
L
7079 { Bad_Opcode },
7080 { Bad_Opcode },
7081 { Bad_Opcode },
7082 { Bad_Opcode },
7083 { Bad_Opcode },
7084 { Bad_Opcode },
7085 { Bad_Opcode },
7086 { Bad_Opcode },
4e7d34a6 7087 /* 20 */
592d1631
L
7088 { Bad_Opcode },
7089 { Bad_Opcode },
7090 { Bad_Opcode },
7091 { Bad_Opcode },
7092 { Bad_Opcode },
7093 { Bad_Opcode },
7094 { Bad_Opcode },
7095 { Bad_Opcode },
4e7d34a6 7096 /* 28 */
592d1631
L
7097 { Bad_Opcode },
7098 { Bad_Opcode },
7099 { Bad_Opcode },
7100 { Bad_Opcode },
7101 { Bad_Opcode },
7102 { Bad_Opcode },
7103 { Bad_Opcode },
7104 { Bad_Opcode },
4e7d34a6 7105 /* 30 */
592d1631
L
7106 { Bad_Opcode },
7107 { Bad_Opcode },
7108 { Bad_Opcode },
7109 { Bad_Opcode },
7110 { Bad_Opcode },
7111 { Bad_Opcode },
7112 { Bad_Opcode },
7113 { Bad_Opcode },
c0f3af97 7114 /* 38 */
592d1631
L
7115 { Bad_Opcode },
7116 { Bad_Opcode },
7117 { Bad_Opcode },
7118 { Bad_Opcode },
7119 { Bad_Opcode },
7120 { Bad_Opcode },
7121 { Bad_Opcode },
7122 { Bad_Opcode },
c0f3af97 7123 /* 40 */
592d1631
L
7124 { Bad_Opcode },
7125 { Bad_Opcode },
7126 { Bad_Opcode },
7127 { Bad_Opcode },
7128 { Bad_Opcode },
7129 { Bad_Opcode },
7130 { Bad_Opcode },
7131 { Bad_Opcode },
c1e679ec 7132 /* 48 */
592d1631
L
7133 { Bad_Opcode },
7134 { Bad_Opcode },
7135 { Bad_Opcode },
7136 { Bad_Opcode },
7137 { Bad_Opcode },
7138 { Bad_Opcode },
7139 { Bad_Opcode },
7140 { Bad_Opcode },
c1e679ec 7141 /* 50 */
592d1631
L
7142 { Bad_Opcode },
7143 { Bad_Opcode },
7144 { Bad_Opcode },
7145 { Bad_Opcode },
7146 { Bad_Opcode },
7147 { Bad_Opcode },
7148 { Bad_Opcode },
7149 { Bad_Opcode },
4e7d34a6 7150 /* 58 */
592d1631
L
7151 { Bad_Opcode },
7152 { Bad_Opcode },
7153 { Bad_Opcode },
7154 { Bad_Opcode },
7155 { Bad_Opcode },
7156 { Bad_Opcode },
7157 { Bad_Opcode },
7158 { Bad_Opcode },
4e7d34a6 7159 /* 60 */
592d1631
L
7160 { Bad_Opcode },
7161 { Bad_Opcode },
7162 { Bad_Opcode },
7163 { Bad_Opcode },
7164 { Bad_Opcode },
7165 { Bad_Opcode },
7166 { Bad_Opcode },
7167 { Bad_Opcode },
4e7d34a6 7168 /* 68 */
592d1631
L
7169 { Bad_Opcode },
7170 { Bad_Opcode },
7171 { Bad_Opcode },
7172 { Bad_Opcode },
7173 { Bad_Opcode },
7174 { Bad_Opcode },
7175 { Bad_Opcode },
7176 { Bad_Opcode },
4e7d34a6 7177 /* 70 */
592d1631
L
7178 { Bad_Opcode },
7179 { Bad_Opcode },
7180 { Bad_Opcode },
7181 { Bad_Opcode },
7182 { Bad_Opcode },
7183 { Bad_Opcode },
7184 { Bad_Opcode },
7185 { Bad_Opcode },
4e7d34a6 7186 /* 78 */
592d1631
L
7187 { Bad_Opcode },
7188 { Bad_Opcode },
7189 { Bad_Opcode },
7190 { Bad_Opcode },
7191 { Bad_Opcode },
7192 { Bad_Opcode },
7193 { Bad_Opcode },
7194 { Bad_Opcode },
4e7d34a6 7195 /* 80 */
592d1631
L
7196 { Bad_Opcode },
7197 { Bad_Opcode },
7198 { Bad_Opcode },
7199 { Bad_Opcode },
7200 { Bad_Opcode },
7201 { Bad_Opcode },
7202 { Bad_Opcode },
7203 { Bad_Opcode },
4e7d34a6 7204 /* 88 */
592d1631
L
7205 { Bad_Opcode },
7206 { Bad_Opcode },
7207 { Bad_Opcode },
7208 { Bad_Opcode },
7209 { Bad_Opcode },
7210 { Bad_Opcode },
7211 { Bad_Opcode },
7212 { Bad_Opcode },
4e7d34a6 7213 /* 90 */
592d1631
L
7214 { Bad_Opcode },
7215 { Bad_Opcode },
7216 { Bad_Opcode },
7217 { Bad_Opcode },
7218 { Bad_Opcode },
7219 { Bad_Opcode },
7220 { Bad_Opcode },
7221 { Bad_Opcode },
4e7d34a6 7222 /* 98 */
592d1631
L
7223 { Bad_Opcode },
7224 { Bad_Opcode },
7225 { Bad_Opcode },
7226 { Bad_Opcode },
7227 { Bad_Opcode },
7228 { Bad_Opcode },
7229 { Bad_Opcode },
7230 { Bad_Opcode },
4e7d34a6 7231 /* a0 */
592d1631
L
7232 { Bad_Opcode },
7233 { Bad_Opcode },
7234 { Bad_Opcode },
7235 { Bad_Opcode },
7236 { Bad_Opcode },
7237 { Bad_Opcode },
7238 { Bad_Opcode },
7239 { Bad_Opcode },
4e7d34a6 7240 /* a8 */
592d1631
L
7241 { Bad_Opcode },
7242 { Bad_Opcode },
7243 { Bad_Opcode },
7244 { Bad_Opcode },
7245 { Bad_Opcode },
7246 { Bad_Opcode },
7247 { Bad_Opcode },
7248 { Bad_Opcode },
d5d7db8e 7249 /* b0 */
592d1631
L
7250 { Bad_Opcode },
7251 { Bad_Opcode },
7252 { Bad_Opcode },
7253 { Bad_Opcode },
7254 { Bad_Opcode },
7255 { Bad_Opcode },
7256 { Bad_Opcode },
7257 { Bad_Opcode },
85f10a01 7258 /* b8 */
592d1631
L
7259 { Bad_Opcode },
7260 { Bad_Opcode },
7261 { Bad_Opcode },
7262 { Bad_Opcode },
7263 { Bad_Opcode },
7264 { Bad_Opcode },
7265 { Bad_Opcode },
7266 { Bad_Opcode },
85f10a01 7267 /* c0 */
592d1631
L
7268 { Bad_Opcode },
7269 { Bad_Opcode },
7270 { Bad_Opcode },
7271 { Bad_Opcode },
7272 { Bad_Opcode },
7273 { Bad_Opcode },
7274 { Bad_Opcode },
7275 { Bad_Opcode },
85f10a01 7276 /* c8 */
592d1631
L
7277 { Bad_Opcode },
7278 { Bad_Opcode },
7279 { Bad_Opcode },
7280 { Bad_Opcode },
7281 { Bad_Opcode },
7282 { Bad_Opcode },
7283 { Bad_Opcode },
7284 { Bad_Opcode },
85f10a01 7285 /* d0 */
592d1631
L
7286 { Bad_Opcode },
7287 { Bad_Opcode },
7288 { Bad_Opcode },
7289 { Bad_Opcode },
7290 { Bad_Opcode },
7291 { Bad_Opcode },
7292 { Bad_Opcode },
7293 { Bad_Opcode },
85f10a01 7294 /* d8 */
592d1631
L
7295 { Bad_Opcode },
7296 { Bad_Opcode },
7297 { Bad_Opcode },
7298 { Bad_Opcode },
7299 { Bad_Opcode },
7300 { Bad_Opcode },
7301 { Bad_Opcode },
7302 { Bad_Opcode },
85f10a01 7303 /* e0 */
592d1631
L
7304 { Bad_Opcode },
7305 { Bad_Opcode },
7306 { Bad_Opcode },
7307 { Bad_Opcode },
7308 { Bad_Opcode },
7309 { Bad_Opcode },
7310 { Bad_Opcode },
7311 { Bad_Opcode },
85f10a01 7312 /* e8 */
592d1631
L
7313 { Bad_Opcode },
7314 { Bad_Opcode },
7315 { Bad_Opcode },
7316 { Bad_Opcode },
7317 { Bad_Opcode },
7318 { Bad_Opcode },
7319 { Bad_Opcode },
7320 { Bad_Opcode },
85f10a01 7321 /* f0 */
592d1631
L
7322 { Bad_Opcode },
7323 { Bad_Opcode },
7324 { Bad_Opcode },
7325 { Bad_Opcode },
7326 { Bad_Opcode },
7327 { Bad_Opcode },
7328 { Bad_Opcode },
7329 { Bad_Opcode },
85f10a01 7330 /* f8 */
592d1631
L
7331 { Bad_Opcode },
7332 { Bad_Opcode },
7333 { Bad_Opcode },
7334 { Bad_Opcode },
7335 { Bad_Opcode },
7336 { Bad_Opcode },
7337 { Bad_Opcode },
7338 { Bad_Opcode },
85f10a01 7339 },
c0f3af97
L
7340};
7341
7342static const struct dis386 vex_table[][256] = {
7343 /* VEX_0F */
85f10a01
MM
7344 {
7345 /* 00 */
592d1631
L
7346 { Bad_Opcode },
7347 { Bad_Opcode },
7348 { Bad_Opcode },
7349 { Bad_Opcode },
7350 { Bad_Opcode },
7351 { Bad_Opcode },
7352 { Bad_Opcode },
7353 { Bad_Opcode },
85f10a01 7354 /* 08 */
592d1631
L
7355 { Bad_Opcode },
7356 { Bad_Opcode },
7357 { Bad_Opcode },
7358 { Bad_Opcode },
7359 { Bad_Opcode },
7360 { Bad_Opcode },
7361 { Bad_Opcode },
7362 { Bad_Opcode },
c0f3af97 7363 /* 10 */
592a252b
L
7364 { PREFIX_TABLE (PREFIX_VEX_0F10) },
7365 { PREFIX_TABLE (PREFIX_VEX_0F11) },
7366 { PREFIX_TABLE (PREFIX_VEX_0F12) },
7367 { MOD_TABLE (MOD_VEX_0F13) },
7368 { VEX_W_TABLE (VEX_W_0F14) },
7369 { VEX_W_TABLE (VEX_W_0F15) },
7370 { PREFIX_TABLE (PREFIX_VEX_0F16) },
7371 { MOD_TABLE (MOD_VEX_0F17) },
c0f3af97 7372 /* 18 */
592d1631
L
7373 { Bad_Opcode },
7374 { Bad_Opcode },
7375 { Bad_Opcode },
7376 { Bad_Opcode },
7377 { Bad_Opcode },
7378 { Bad_Opcode },
7379 { Bad_Opcode },
7380 { Bad_Opcode },
c0f3af97 7381 /* 20 */
592d1631
L
7382 { Bad_Opcode },
7383 { Bad_Opcode },
7384 { Bad_Opcode },
7385 { Bad_Opcode },
7386 { Bad_Opcode },
7387 { Bad_Opcode },
7388 { Bad_Opcode },
7389 { Bad_Opcode },
c0f3af97 7390 /* 28 */
592a252b
L
7391 { VEX_W_TABLE (VEX_W_0F28) },
7392 { VEX_W_TABLE (VEX_W_0F29) },
7393 { PREFIX_TABLE (PREFIX_VEX_0F2A) },
7394 { MOD_TABLE (MOD_VEX_0F2B) },
7395 { PREFIX_TABLE (PREFIX_VEX_0F2C) },
7396 { PREFIX_TABLE (PREFIX_VEX_0F2D) },
7397 { PREFIX_TABLE (PREFIX_VEX_0F2E) },
7398 { PREFIX_TABLE (PREFIX_VEX_0F2F) },
85f10a01 7399 /* 30 */
592d1631
L
7400 { Bad_Opcode },
7401 { Bad_Opcode },
7402 { Bad_Opcode },
7403 { Bad_Opcode },
7404 { Bad_Opcode },
7405 { Bad_Opcode },
7406 { Bad_Opcode },
7407 { Bad_Opcode },
4e7d34a6 7408 /* 38 */
592d1631
L
7409 { Bad_Opcode },
7410 { Bad_Opcode },
7411 { Bad_Opcode },
7412 { Bad_Opcode },
7413 { Bad_Opcode },
7414 { Bad_Opcode },
7415 { Bad_Opcode },
7416 { Bad_Opcode },
d5d7db8e 7417 /* 40 */
592d1631
L
7418 { Bad_Opcode },
7419 { Bad_Opcode },
7420 { Bad_Opcode },
7421 { Bad_Opcode },
7422 { Bad_Opcode },
7423 { Bad_Opcode },
7424 { Bad_Opcode },
7425 { Bad_Opcode },
85f10a01 7426 /* 48 */
592d1631
L
7427 { Bad_Opcode },
7428 { Bad_Opcode },
7429 { Bad_Opcode },
7430 { Bad_Opcode },
7431 { Bad_Opcode },
7432 { Bad_Opcode },
7433 { Bad_Opcode },
7434 { Bad_Opcode },
d5d7db8e 7435 /* 50 */
592a252b
L
7436 { MOD_TABLE (MOD_VEX_0F50) },
7437 { PREFIX_TABLE (PREFIX_VEX_0F51) },
7438 { PREFIX_TABLE (PREFIX_VEX_0F52) },
7439 { PREFIX_TABLE (PREFIX_VEX_0F53) },
c0f3af97
L
7440 { "vandpX", { XM, Vex, EXx } },
7441 { "vandnpX", { XM, Vex, EXx } },
7442 { "vorpX", { XM, Vex, EXx } },
7443 { "vxorpX", { XM, Vex, EXx } },
7444 /* 58 */
592a252b
L
7445 { PREFIX_TABLE (PREFIX_VEX_0F58) },
7446 { PREFIX_TABLE (PREFIX_VEX_0F59) },
7447 { PREFIX_TABLE (PREFIX_VEX_0F5A) },
7448 { PREFIX_TABLE (PREFIX_VEX_0F5B) },
7449 { PREFIX_TABLE (PREFIX_VEX_0F5C) },
7450 { PREFIX_TABLE (PREFIX_VEX_0F5D) },
7451 { PREFIX_TABLE (PREFIX_VEX_0F5E) },
7452 { PREFIX_TABLE (PREFIX_VEX_0F5F) },
c0f3af97 7453 /* 60 */
592a252b
L
7454 { PREFIX_TABLE (PREFIX_VEX_0F60) },
7455 { PREFIX_TABLE (PREFIX_VEX_0F61) },
7456 { PREFIX_TABLE (PREFIX_VEX_0F62) },
7457 { PREFIX_TABLE (PREFIX_VEX_0F63) },
7458 { PREFIX_TABLE (PREFIX_VEX_0F64) },
7459 { PREFIX_TABLE (PREFIX_VEX_0F65) },
7460 { PREFIX_TABLE (PREFIX_VEX_0F66) },
7461 { PREFIX_TABLE (PREFIX_VEX_0F67) },
c0f3af97 7462 /* 68 */
592a252b
L
7463 { PREFIX_TABLE (PREFIX_VEX_0F68) },
7464 { PREFIX_TABLE (PREFIX_VEX_0F69) },
7465 { PREFIX_TABLE (PREFIX_VEX_0F6A) },
7466 { PREFIX_TABLE (PREFIX_VEX_0F6B) },
7467 { PREFIX_TABLE (PREFIX_VEX_0F6C) },
7468 { PREFIX_TABLE (PREFIX_VEX_0F6D) },
7469 { PREFIX_TABLE (PREFIX_VEX_0F6E) },
7470 { PREFIX_TABLE (PREFIX_VEX_0F6F) },
c0f3af97 7471 /* 70 */
592a252b
L
7472 { PREFIX_TABLE (PREFIX_VEX_0F70) },
7473 { REG_TABLE (REG_VEX_0F71) },
7474 { REG_TABLE (REG_VEX_0F72) },
7475 { REG_TABLE (REG_VEX_0F73) },
7476 { PREFIX_TABLE (PREFIX_VEX_0F74) },
7477 { PREFIX_TABLE (PREFIX_VEX_0F75) },
7478 { PREFIX_TABLE (PREFIX_VEX_0F76) },
7479 { PREFIX_TABLE (PREFIX_VEX_0F77) },
c0f3af97 7480 /* 78 */
592d1631
L
7481 { Bad_Opcode },
7482 { Bad_Opcode },
7483 { Bad_Opcode },
7484 { Bad_Opcode },
592a252b
L
7485 { PREFIX_TABLE (PREFIX_VEX_0F7C) },
7486 { PREFIX_TABLE (PREFIX_VEX_0F7D) },
7487 { PREFIX_TABLE (PREFIX_VEX_0F7E) },
7488 { PREFIX_TABLE (PREFIX_VEX_0F7F) },
c0f3af97 7489 /* 80 */
592d1631
L
7490 { Bad_Opcode },
7491 { Bad_Opcode },
7492 { Bad_Opcode },
7493 { Bad_Opcode },
7494 { Bad_Opcode },
7495 { Bad_Opcode },
7496 { Bad_Opcode },
7497 { Bad_Opcode },
c0f3af97 7498 /* 88 */
592d1631
L
7499 { Bad_Opcode },
7500 { Bad_Opcode },
7501 { Bad_Opcode },
7502 { Bad_Opcode },
7503 { Bad_Opcode },
7504 { Bad_Opcode },
7505 { Bad_Opcode },
7506 { Bad_Opcode },
c0f3af97 7507 /* 90 */
592d1631
L
7508 { Bad_Opcode },
7509 { Bad_Opcode },
7510 { Bad_Opcode },
7511 { Bad_Opcode },
7512 { Bad_Opcode },
7513 { Bad_Opcode },
7514 { Bad_Opcode },
7515 { Bad_Opcode },
c0f3af97 7516 /* 98 */
592d1631
L
7517 { Bad_Opcode },
7518 { Bad_Opcode },
7519 { Bad_Opcode },
7520 { Bad_Opcode },
7521 { Bad_Opcode },
7522 { Bad_Opcode },
7523 { Bad_Opcode },
7524 { Bad_Opcode },
c0f3af97 7525 /* a0 */
592d1631
L
7526 { Bad_Opcode },
7527 { Bad_Opcode },
7528 { Bad_Opcode },
7529 { Bad_Opcode },
7530 { Bad_Opcode },
7531 { Bad_Opcode },
7532 { Bad_Opcode },
7533 { Bad_Opcode },
c0f3af97 7534 /* a8 */
592d1631
L
7535 { Bad_Opcode },
7536 { Bad_Opcode },
7537 { Bad_Opcode },
7538 { Bad_Opcode },
7539 { Bad_Opcode },
7540 { Bad_Opcode },
592a252b 7541 { REG_TABLE (REG_VEX_0FAE) },
592d1631 7542 { Bad_Opcode },
c0f3af97 7543 /* b0 */
592d1631
L
7544 { Bad_Opcode },
7545 { Bad_Opcode },
7546 { Bad_Opcode },
7547 { Bad_Opcode },
7548 { Bad_Opcode },
7549 { Bad_Opcode },
7550 { Bad_Opcode },
7551 { Bad_Opcode },
c0f3af97 7552 /* b8 */
592d1631
L
7553 { Bad_Opcode },
7554 { Bad_Opcode },
7555 { Bad_Opcode },
7556 { Bad_Opcode },
7557 { Bad_Opcode },
7558 { Bad_Opcode },
7559 { Bad_Opcode },
7560 { Bad_Opcode },
c0f3af97 7561 /* c0 */
592d1631
L
7562 { Bad_Opcode },
7563 { Bad_Opcode },
592a252b 7564 { PREFIX_TABLE (PREFIX_VEX_0FC2) },
592d1631 7565 { Bad_Opcode },
592a252b
L
7566 { PREFIX_TABLE (PREFIX_VEX_0FC4) },
7567 { PREFIX_TABLE (PREFIX_VEX_0FC5) },
c0f3af97 7568 { "vshufpX", { XM, Vex, EXx, Ib } },
592d1631 7569 { Bad_Opcode },
c0f3af97 7570 /* c8 */
592d1631
L
7571 { Bad_Opcode },
7572 { Bad_Opcode },
7573 { Bad_Opcode },
7574 { Bad_Opcode },
7575 { Bad_Opcode },
7576 { Bad_Opcode },
7577 { Bad_Opcode },
7578 { Bad_Opcode },
c0f3af97 7579 /* d0 */
592a252b
L
7580 { PREFIX_TABLE (PREFIX_VEX_0FD0) },
7581 { PREFIX_TABLE (PREFIX_VEX_0FD1) },
7582 { PREFIX_TABLE (PREFIX_VEX_0FD2) },
7583 { PREFIX_TABLE (PREFIX_VEX_0FD3) },
7584 { PREFIX_TABLE (PREFIX_VEX_0FD4) },
7585 { PREFIX_TABLE (PREFIX_VEX_0FD5) },
7586 { PREFIX_TABLE (PREFIX_VEX_0FD6) },
7587 { PREFIX_TABLE (PREFIX_VEX_0FD7) },
c0f3af97 7588 /* d8 */
592a252b
L
7589 { PREFIX_TABLE (PREFIX_VEX_0FD8) },
7590 { PREFIX_TABLE (PREFIX_VEX_0FD9) },
7591 { PREFIX_TABLE (PREFIX_VEX_0FDA) },
7592 { PREFIX_TABLE (PREFIX_VEX_0FDB) },
7593 { PREFIX_TABLE (PREFIX_VEX_0FDC) },
7594 { PREFIX_TABLE (PREFIX_VEX_0FDD) },
7595 { PREFIX_TABLE (PREFIX_VEX_0FDE) },
7596 { PREFIX_TABLE (PREFIX_VEX_0FDF) },
c0f3af97 7597 /* e0 */
592a252b
L
7598 { PREFIX_TABLE (PREFIX_VEX_0FE0) },
7599 { PREFIX_TABLE (PREFIX_VEX_0FE1) },
7600 { PREFIX_TABLE (PREFIX_VEX_0FE2) },
7601 { PREFIX_TABLE (PREFIX_VEX_0FE3) },
7602 { PREFIX_TABLE (PREFIX_VEX_0FE4) },
7603 { PREFIX_TABLE (PREFIX_VEX_0FE5) },
7604 { PREFIX_TABLE (PREFIX_VEX_0FE6) },
7605 { PREFIX_TABLE (PREFIX_VEX_0FE7) },
c0f3af97 7606 /* e8 */
592a252b
L
7607 { PREFIX_TABLE (PREFIX_VEX_0FE8) },
7608 { PREFIX_TABLE (PREFIX_VEX_0FE9) },
7609 { PREFIX_TABLE (PREFIX_VEX_0FEA) },
7610 { PREFIX_TABLE (PREFIX_VEX_0FEB) },
7611 { PREFIX_TABLE (PREFIX_VEX_0FEC) },
7612 { PREFIX_TABLE (PREFIX_VEX_0FED) },
7613 { PREFIX_TABLE (PREFIX_VEX_0FEE) },
7614 { PREFIX_TABLE (PREFIX_VEX_0FEF) },
c0f3af97 7615 /* f0 */
592a252b
L
7616 { PREFIX_TABLE (PREFIX_VEX_0FF0) },
7617 { PREFIX_TABLE (PREFIX_VEX_0FF1) },
7618 { PREFIX_TABLE (PREFIX_VEX_0FF2) },
7619 { PREFIX_TABLE (PREFIX_VEX_0FF3) },
7620 { PREFIX_TABLE (PREFIX_VEX_0FF4) },
7621 { PREFIX_TABLE (PREFIX_VEX_0FF5) },
7622 { PREFIX_TABLE (PREFIX_VEX_0FF6) },
7623 { PREFIX_TABLE (PREFIX_VEX_0FF7) },
c0f3af97 7624 /* f8 */
592a252b
L
7625 { PREFIX_TABLE (PREFIX_VEX_0FF8) },
7626 { PREFIX_TABLE (PREFIX_VEX_0FF9) },
7627 { PREFIX_TABLE (PREFIX_VEX_0FFA) },
7628 { PREFIX_TABLE (PREFIX_VEX_0FFB) },
7629 { PREFIX_TABLE (PREFIX_VEX_0FFC) },
7630 { PREFIX_TABLE (PREFIX_VEX_0FFD) },
7631 { PREFIX_TABLE (PREFIX_VEX_0FFE) },
592d1631 7632 { Bad_Opcode },
c0f3af97
L
7633 },
7634 /* VEX_0F38 */
7635 {
7636 /* 00 */
592a252b
L
7637 { PREFIX_TABLE (PREFIX_VEX_0F3800) },
7638 { PREFIX_TABLE (PREFIX_VEX_0F3801) },
7639 { PREFIX_TABLE (PREFIX_VEX_0F3802) },
7640 { PREFIX_TABLE (PREFIX_VEX_0F3803) },
7641 { PREFIX_TABLE (PREFIX_VEX_0F3804) },
7642 { PREFIX_TABLE (PREFIX_VEX_0F3805) },
7643 { PREFIX_TABLE (PREFIX_VEX_0F3806) },
7644 { PREFIX_TABLE (PREFIX_VEX_0F3807) },
c0f3af97 7645 /* 08 */
592a252b
L
7646 { PREFIX_TABLE (PREFIX_VEX_0F3808) },
7647 { PREFIX_TABLE (PREFIX_VEX_0F3809) },
7648 { PREFIX_TABLE (PREFIX_VEX_0F380A) },
7649 { PREFIX_TABLE (PREFIX_VEX_0F380B) },
7650 { PREFIX_TABLE (PREFIX_VEX_0F380C) },
7651 { PREFIX_TABLE (PREFIX_VEX_0F380D) },
7652 { PREFIX_TABLE (PREFIX_VEX_0F380E) },
7653 { PREFIX_TABLE (PREFIX_VEX_0F380F) },
c0f3af97 7654 /* 10 */
592d1631
L
7655 { Bad_Opcode },
7656 { Bad_Opcode },
7657 { Bad_Opcode },
592a252b 7658 { PREFIX_TABLE (PREFIX_VEX_0F3813) },
592d1631
L
7659 { Bad_Opcode },
7660 { Bad_Opcode },
7661 { Bad_Opcode },
592a252b 7662 { PREFIX_TABLE (PREFIX_VEX_0F3817) },
c0f3af97 7663 /* 18 */
592a252b
L
7664 { PREFIX_TABLE (PREFIX_VEX_0F3818) },
7665 { PREFIX_TABLE (PREFIX_VEX_0F3819) },
7666 { PREFIX_TABLE (PREFIX_VEX_0F381A) },
592d1631 7667 { Bad_Opcode },
592a252b
L
7668 { PREFIX_TABLE (PREFIX_VEX_0F381C) },
7669 { PREFIX_TABLE (PREFIX_VEX_0F381D) },
7670 { PREFIX_TABLE (PREFIX_VEX_0F381E) },
592d1631 7671 { Bad_Opcode },
c0f3af97 7672 /* 20 */
592a252b
L
7673 { PREFIX_TABLE (PREFIX_VEX_0F3820) },
7674 { PREFIX_TABLE (PREFIX_VEX_0F3821) },
7675 { PREFIX_TABLE (PREFIX_VEX_0F3822) },
7676 { PREFIX_TABLE (PREFIX_VEX_0F3823) },
7677 { PREFIX_TABLE (PREFIX_VEX_0F3824) },
7678 { PREFIX_TABLE (PREFIX_VEX_0F3825) },
592d1631
L
7679 { Bad_Opcode },
7680 { Bad_Opcode },
c0f3af97 7681 /* 28 */
592a252b
L
7682 { PREFIX_TABLE (PREFIX_VEX_0F3828) },
7683 { PREFIX_TABLE (PREFIX_VEX_0F3829) },
7684 { PREFIX_TABLE (PREFIX_VEX_0F382A) },
7685 { PREFIX_TABLE (PREFIX_VEX_0F382B) },
7686 { PREFIX_TABLE (PREFIX_VEX_0F382C) },
7687 { PREFIX_TABLE (PREFIX_VEX_0F382D) },
7688 { PREFIX_TABLE (PREFIX_VEX_0F382E) },
7689 { PREFIX_TABLE (PREFIX_VEX_0F382F) },
c0f3af97 7690 /* 30 */
592a252b
L
7691 { PREFIX_TABLE (PREFIX_VEX_0F3830) },
7692 { PREFIX_TABLE (PREFIX_VEX_0F3831) },
7693 { PREFIX_TABLE (PREFIX_VEX_0F3832) },
7694 { PREFIX_TABLE (PREFIX_VEX_0F3833) },
7695 { PREFIX_TABLE (PREFIX_VEX_0F3834) },
7696 { PREFIX_TABLE (PREFIX_VEX_0F3835) },
7697 { Bad_Opcode },
7698 { PREFIX_TABLE (PREFIX_VEX_0F3837) },
c0f3af97 7699 /* 38 */
592a252b
L
7700 { PREFIX_TABLE (PREFIX_VEX_0F3838) },
7701 { PREFIX_TABLE (PREFIX_VEX_0F3839) },
7702 { PREFIX_TABLE (PREFIX_VEX_0F383A) },
7703 { PREFIX_TABLE (PREFIX_VEX_0F383B) },
7704 { PREFIX_TABLE (PREFIX_VEX_0F383C) },
7705 { PREFIX_TABLE (PREFIX_VEX_0F383D) },
7706 { PREFIX_TABLE (PREFIX_VEX_0F383E) },
7707 { PREFIX_TABLE (PREFIX_VEX_0F383F) },
c0f3af97 7708 /* 40 */
592a252b
L
7709 { PREFIX_TABLE (PREFIX_VEX_0F3840) },
7710 { PREFIX_TABLE (PREFIX_VEX_0F3841) },
592d1631
L
7711 { Bad_Opcode },
7712 { Bad_Opcode },
7713 { Bad_Opcode },
7714 { Bad_Opcode },
7715 { Bad_Opcode },
7716 { Bad_Opcode },
c0f3af97 7717 /* 48 */
592d1631
L
7718 { Bad_Opcode },
7719 { Bad_Opcode },
7720 { Bad_Opcode },
7721 { Bad_Opcode },
7722 { Bad_Opcode },
7723 { Bad_Opcode },
7724 { Bad_Opcode },
7725 { Bad_Opcode },
c0f3af97 7726 /* 50 */
592d1631
L
7727 { Bad_Opcode },
7728 { Bad_Opcode },
7729 { Bad_Opcode },
7730 { Bad_Opcode },
7731 { Bad_Opcode },
7732 { Bad_Opcode },
7733 { Bad_Opcode },
7734 { Bad_Opcode },
c0f3af97 7735 /* 58 */
592d1631
L
7736 { Bad_Opcode },
7737 { Bad_Opcode },
7738 { Bad_Opcode },
7739 { Bad_Opcode },
7740 { Bad_Opcode },
7741 { Bad_Opcode },
7742 { Bad_Opcode },
7743 { Bad_Opcode },
c0f3af97 7744 /* 60 */
592d1631
L
7745 { Bad_Opcode },
7746 { Bad_Opcode },
7747 { Bad_Opcode },
7748 { Bad_Opcode },
7749 { Bad_Opcode },
7750 { Bad_Opcode },
7751 { Bad_Opcode },
7752 { Bad_Opcode },
c0f3af97 7753 /* 68 */
592d1631
L
7754 { Bad_Opcode },
7755 { Bad_Opcode },
7756 { Bad_Opcode },
7757 { Bad_Opcode },
7758 { Bad_Opcode },
7759 { Bad_Opcode },
7760 { Bad_Opcode },
7761 { Bad_Opcode },
c0f3af97 7762 /* 70 */
592d1631
L
7763 { Bad_Opcode },
7764 { Bad_Opcode },
7765 { Bad_Opcode },
7766 { Bad_Opcode },
7767 { Bad_Opcode },
7768 { Bad_Opcode },
7769 { Bad_Opcode },
7770 { Bad_Opcode },
c0f3af97 7771 /* 78 */
592d1631
L
7772 { Bad_Opcode },
7773 { Bad_Opcode },
7774 { Bad_Opcode },
7775 { Bad_Opcode },
7776 { Bad_Opcode },
7777 { Bad_Opcode },
7778 { Bad_Opcode },
7779 { Bad_Opcode },
c0f3af97 7780 /* 80 */
592d1631
L
7781 { Bad_Opcode },
7782 { Bad_Opcode },
7783 { Bad_Opcode },
7784 { Bad_Opcode },
7785 { Bad_Opcode },
7786 { Bad_Opcode },
7787 { Bad_Opcode },
7788 { Bad_Opcode },
c0f3af97 7789 /* 88 */
592d1631
L
7790 { Bad_Opcode },
7791 { Bad_Opcode },
7792 { Bad_Opcode },
7793 { Bad_Opcode },
7794 { Bad_Opcode },
7795 { Bad_Opcode },
7796 { Bad_Opcode },
7797 { Bad_Opcode },
c0f3af97 7798 /* 90 */
592d1631
L
7799 { Bad_Opcode },
7800 { Bad_Opcode },
7801 { Bad_Opcode },
7802 { Bad_Opcode },
7803 { Bad_Opcode },
7804 { Bad_Opcode },
592a252b
L
7805 { PREFIX_TABLE (PREFIX_VEX_0F3896) },
7806 { PREFIX_TABLE (PREFIX_VEX_0F3897) },
c0f3af97 7807 /* 98 */
592a252b
L
7808 { PREFIX_TABLE (PREFIX_VEX_0F3898) },
7809 { PREFIX_TABLE (PREFIX_VEX_0F3899) },
7810 { PREFIX_TABLE (PREFIX_VEX_0F389A) },
7811 { PREFIX_TABLE (PREFIX_VEX_0F389B) },
7812 { PREFIX_TABLE (PREFIX_VEX_0F389C) },
7813 { PREFIX_TABLE (PREFIX_VEX_0F389D) },
7814 { PREFIX_TABLE (PREFIX_VEX_0F389E) },
7815 { PREFIX_TABLE (PREFIX_VEX_0F389F) },
c0f3af97 7816 /* a0 */
592d1631
L
7817 { Bad_Opcode },
7818 { Bad_Opcode },
7819 { Bad_Opcode },
7820 { Bad_Opcode },
7821 { Bad_Opcode },
7822 { Bad_Opcode },
592a252b
L
7823 { PREFIX_TABLE (PREFIX_VEX_0F38A6) },
7824 { PREFIX_TABLE (PREFIX_VEX_0F38A7) },
c0f3af97 7825 /* a8 */
592a252b
L
7826 { PREFIX_TABLE (PREFIX_VEX_0F38A8) },
7827 { PREFIX_TABLE (PREFIX_VEX_0F38A9) },
7828 { PREFIX_TABLE (PREFIX_VEX_0F38AA) },
7829 { PREFIX_TABLE (PREFIX_VEX_0F38AB) },
7830 { PREFIX_TABLE (PREFIX_VEX_0F38AC) },
7831 { PREFIX_TABLE (PREFIX_VEX_0F38AD) },
7832 { PREFIX_TABLE (PREFIX_VEX_0F38AE) },
7833 { PREFIX_TABLE (PREFIX_VEX_0F38AF) },
c0f3af97 7834 /* b0 */
592d1631
L
7835 { Bad_Opcode },
7836 { Bad_Opcode },
7837 { Bad_Opcode },
7838 { Bad_Opcode },
7839 { Bad_Opcode },
7840 { Bad_Opcode },
592a252b
L
7841 { PREFIX_TABLE (PREFIX_VEX_0F38B6) },
7842 { PREFIX_TABLE (PREFIX_VEX_0F38B7) },
c0f3af97 7843 /* b8 */
592a252b
L
7844 { PREFIX_TABLE (PREFIX_VEX_0F38B8) },
7845 { PREFIX_TABLE (PREFIX_VEX_0F38B9) },
7846 { PREFIX_TABLE (PREFIX_VEX_0F38BA) },
7847 { PREFIX_TABLE (PREFIX_VEX_0F38BB) },
7848 { PREFIX_TABLE (PREFIX_VEX_0F38BC) },
7849 { PREFIX_TABLE (PREFIX_VEX_0F38BD) },
7850 { PREFIX_TABLE (PREFIX_VEX_0F38BE) },
7851 { PREFIX_TABLE (PREFIX_VEX_0F38BF) },
c0f3af97 7852 /* c0 */
592d1631
L
7853 { Bad_Opcode },
7854 { Bad_Opcode },
7855 { Bad_Opcode },
7856 { Bad_Opcode },
7857 { Bad_Opcode },
7858 { Bad_Opcode },
7859 { Bad_Opcode },
7860 { Bad_Opcode },
c0f3af97 7861 /* c8 */
592d1631
L
7862 { Bad_Opcode },
7863 { Bad_Opcode },
7864 { Bad_Opcode },
7865 { Bad_Opcode },
7866 { Bad_Opcode },
7867 { Bad_Opcode },
7868 { Bad_Opcode },
7869 { Bad_Opcode },
c0f3af97 7870 /* d0 */
592d1631
L
7871 { Bad_Opcode },
7872 { Bad_Opcode },
7873 { Bad_Opcode },
7874 { Bad_Opcode },
7875 { Bad_Opcode },
7876 { Bad_Opcode },
7877 { Bad_Opcode },
7878 { Bad_Opcode },
c0f3af97 7879 /* d8 */
592d1631
L
7880 { Bad_Opcode },
7881 { Bad_Opcode },
7882 { Bad_Opcode },
592a252b
L
7883 { PREFIX_TABLE (PREFIX_VEX_0F38DB) },
7884 { PREFIX_TABLE (PREFIX_VEX_0F38DC) },
7885 { PREFIX_TABLE (PREFIX_VEX_0F38DD) },
7886 { PREFIX_TABLE (PREFIX_VEX_0F38DE) },
7887 { PREFIX_TABLE (PREFIX_VEX_0F38DF) },
c0f3af97 7888 /* e0 */
592d1631
L
7889 { Bad_Opcode },
7890 { Bad_Opcode },
7891 { Bad_Opcode },
7892 { Bad_Opcode },
7893 { Bad_Opcode },
7894 { Bad_Opcode },
7895 { Bad_Opcode },
7896 { Bad_Opcode },
c0f3af97 7897 /* e8 */
592d1631
L
7898 { Bad_Opcode },
7899 { Bad_Opcode },
7900 { Bad_Opcode },
7901 { Bad_Opcode },
7902 { Bad_Opcode },
7903 { Bad_Opcode },
7904 { Bad_Opcode },
7905 { Bad_Opcode },
c0f3af97 7906 /* f0 */
592d1631
L
7907 { Bad_Opcode },
7908 { Bad_Opcode },
f12dc422
L
7909 { PREFIX_TABLE (PREFIX_VEX_0F38F2) },
7910 { REG_TABLE (REG_VEX_0F38F3) },
592d1631
L
7911 { Bad_Opcode },
7912 { Bad_Opcode },
7913 { Bad_Opcode },
f12dc422 7914 { PREFIX_TABLE (PREFIX_VEX_0F38F7) },
c0f3af97 7915 /* f8 */
592d1631
L
7916 { Bad_Opcode },
7917 { Bad_Opcode },
7918 { Bad_Opcode },
7919 { Bad_Opcode },
7920 { Bad_Opcode },
7921 { Bad_Opcode },
7922 { Bad_Opcode },
7923 { Bad_Opcode },
c0f3af97
L
7924 },
7925 /* VEX_0F3A */
7926 {
7927 /* 00 */
592d1631
L
7928 { Bad_Opcode },
7929 { Bad_Opcode },
7930 { Bad_Opcode },
7931 { Bad_Opcode },
592a252b
L
7932 { PREFIX_TABLE (PREFIX_VEX_0F3A04) },
7933 { PREFIX_TABLE (PREFIX_VEX_0F3A05) },
7934 { PREFIX_TABLE (PREFIX_VEX_0F3A06) },
592d1631 7935 { Bad_Opcode },
c0f3af97 7936 /* 08 */
592a252b
L
7937 { PREFIX_TABLE (PREFIX_VEX_0F3A08) },
7938 { PREFIX_TABLE (PREFIX_VEX_0F3A09) },
7939 { PREFIX_TABLE (PREFIX_VEX_0F3A0A) },
7940 { PREFIX_TABLE (PREFIX_VEX_0F3A0B) },
7941 { PREFIX_TABLE (PREFIX_VEX_0F3A0C) },
7942 { PREFIX_TABLE (PREFIX_VEX_0F3A0D) },
7943 { PREFIX_TABLE (PREFIX_VEX_0F3A0E) },
7944 { PREFIX_TABLE (PREFIX_VEX_0F3A0F) },
c0f3af97 7945 /* 10 */
592d1631
L
7946 { Bad_Opcode },
7947 { Bad_Opcode },
7948 { Bad_Opcode },
7949 { Bad_Opcode },
592a252b
L
7950 { PREFIX_TABLE (PREFIX_VEX_0F3A14) },
7951 { PREFIX_TABLE (PREFIX_VEX_0F3A15) },
7952 { PREFIX_TABLE (PREFIX_VEX_0F3A16) },
7953 { PREFIX_TABLE (PREFIX_VEX_0F3A17) },
c0f3af97 7954 /* 18 */
592a252b
L
7955 { PREFIX_TABLE (PREFIX_VEX_0F3A18) },
7956 { PREFIX_TABLE (PREFIX_VEX_0F3A19) },
592d1631
L
7957 { Bad_Opcode },
7958 { Bad_Opcode },
7959 { Bad_Opcode },
592a252b 7960 { PREFIX_TABLE (PREFIX_VEX_0F3A1D) },
592d1631
L
7961 { Bad_Opcode },
7962 { Bad_Opcode },
c0f3af97 7963 /* 20 */
592a252b
L
7964 { PREFIX_TABLE (PREFIX_VEX_0F3A20) },
7965 { PREFIX_TABLE (PREFIX_VEX_0F3A21) },
7966 { PREFIX_TABLE (PREFIX_VEX_0F3A22) },
592d1631
L
7967 { Bad_Opcode },
7968 { Bad_Opcode },
7969 { Bad_Opcode },
7970 { Bad_Opcode },
7971 { Bad_Opcode },
c0f3af97 7972 /* 28 */
592d1631
L
7973 { Bad_Opcode },
7974 { Bad_Opcode },
7975 { Bad_Opcode },
7976 { Bad_Opcode },
7977 { Bad_Opcode },
7978 { Bad_Opcode },
7979 { Bad_Opcode },
7980 { Bad_Opcode },
c0f3af97 7981 /* 30 */
592d1631
L
7982 { Bad_Opcode },
7983 { Bad_Opcode },
7984 { Bad_Opcode },
7985 { Bad_Opcode },
7986 { Bad_Opcode },
7987 { Bad_Opcode },
7988 { Bad_Opcode },
7989 { Bad_Opcode },
c0f3af97 7990 /* 38 */
592d1631
L
7991 { Bad_Opcode },
7992 { Bad_Opcode },
7993 { Bad_Opcode },
7994 { Bad_Opcode },
7995 { Bad_Opcode },
7996 { Bad_Opcode },
7997 { Bad_Opcode },
7998 { Bad_Opcode },
c0f3af97 7999 /* 40 */
592a252b
L
8000 { PREFIX_TABLE (PREFIX_VEX_0F3A40) },
8001 { PREFIX_TABLE (PREFIX_VEX_0F3A41) },
8002 { PREFIX_TABLE (PREFIX_VEX_0F3A42) },
592d1631 8003 { Bad_Opcode },
592a252b 8004 { PREFIX_TABLE (PREFIX_VEX_0F3A44) },
592d1631
L
8005 { Bad_Opcode },
8006 { Bad_Opcode },
8007 { Bad_Opcode },
c0f3af97 8008 /* 48 */
592a252b
L
8009 { PREFIX_TABLE (PREFIX_VEX_0F3A48) },
8010 { PREFIX_TABLE (PREFIX_VEX_0F3A49) },
8011 { PREFIX_TABLE (PREFIX_VEX_0F3A4A) },
8012 { PREFIX_TABLE (PREFIX_VEX_0F3A4B) },
8013 { PREFIX_TABLE (PREFIX_VEX_0F3A4C) },
592d1631
L
8014 { Bad_Opcode },
8015 { Bad_Opcode },
8016 { Bad_Opcode },
c0f3af97 8017 /* 50 */
592d1631
L
8018 { Bad_Opcode },
8019 { Bad_Opcode },
8020 { Bad_Opcode },
8021 { Bad_Opcode },
8022 { Bad_Opcode },
8023 { Bad_Opcode },
8024 { Bad_Opcode },
8025 { Bad_Opcode },
c0f3af97 8026 /* 58 */
592d1631
L
8027 { Bad_Opcode },
8028 { Bad_Opcode },
8029 { Bad_Opcode },
8030 { Bad_Opcode },
592a252b
L
8031 { PREFIX_TABLE (PREFIX_VEX_0F3A5C) },
8032 { PREFIX_TABLE (PREFIX_VEX_0F3A5D) },
8033 { PREFIX_TABLE (PREFIX_VEX_0F3A5E) },
8034 { PREFIX_TABLE (PREFIX_VEX_0F3A5F) },
c0f3af97 8035 /* 60 */
592a252b
L
8036 { PREFIX_TABLE (PREFIX_VEX_0F3A60) },
8037 { PREFIX_TABLE (PREFIX_VEX_0F3A61) },
8038 { PREFIX_TABLE (PREFIX_VEX_0F3A62) },
8039 { PREFIX_TABLE (PREFIX_VEX_0F3A63) },
592d1631
L
8040 { Bad_Opcode },
8041 { Bad_Opcode },
8042 { Bad_Opcode },
8043 { Bad_Opcode },
c0f3af97 8044 /* 68 */
592a252b
L
8045 { PREFIX_TABLE (PREFIX_VEX_0F3A68) },
8046 { PREFIX_TABLE (PREFIX_VEX_0F3A69) },
8047 { PREFIX_TABLE (PREFIX_VEX_0F3A6A) },
8048 { PREFIX_TABLE (PREFIX_VEX_0F3A6B) },
8049 { PREFIX_TABLE (PREFIX_VEX_0F3A6C) },
8050 { PREFIX_TABLE (PREFIX_VEX_0F3A6D) },
8051 { PREFIX_TABLE (PREFIX_VEX_0F3A6E) },
8052 { PREFIX_TABLE (PREFIX_VEX_0F3A6F) },
c0f3af97 8053 /* 70 */
592d1631
L
8054 { Bad_Opcode },
8055 { Bad_Opcode },
8056 { Bad_Opcode },
8057 { Bad_Opcode },
8058 { Bad_Opcode },
8059 { Bad_Opcode },
8060 { Bad_Opcode },
8061 { Bad_Opcode },
c0f3af97 8062 /* 78 */
592a252b
L
8063 { PREFIX_TABLE (PREFIX_VEX_0F3A78) },
8064 { PREFIX_TABLE (PREFIX_VEX_0F3A79) },
8065 { PREFIX_TABLE (PREFIX_VEX_0F3A7A) },
8066 { PREFIX_TABLE (PREFIX_VEX_0F3A7B) },
8067 { PREFIX_TABLE (PREFIX_VEX_0F3A7C) },
8068 { PREFIX_TABLE (PREFIX_VEX_0F3A7D) },
8069 { PREFIX_TABLE (PREFIX_VEX_0F3A7E) },
8070 { PREFIX_TABLE (PREFIX_VEX_0F3A7F) },
c0f3af97 8071 /* 80 */
592d1631
L
8072 { Bad_Opcode },
8073 { Bad_Opcode },
8074 { Bad_Opcode },
8075 { Bad_Opcode },
8076 { Bad_Opcode },
8077 { Bad_Opcode },
8078 { Bad_Opcode },
8079 { Bad_Opcode },
c0f3af97 8080 /* 88 */
592d1631
L
8081 { Bad_Opcode },
8082 { Bad_Opcode },
8083 { Bad_Opcode },
8084 { Bad_Opcode },
8085 { Bad_Opcode },
8086 { Bad_Opcode },
8087 { Bad_Opcode },
8088 { Bad_Opcode },
c0f3af97 8089 /* 90 */
592d1631
L
8090 { Bad_Opcode },
8091 { Bad_Opcode },
8092 { Bad_Opcode },
8093 { Bad_Opcode },
8094 { Bad_Opcode },
8095 { Bad_Opcode },
8096 { Bad_Opcode },
8097 { Bad_Opcode },
c0f3af97 8098 /* 98 */
592d1631
L
8099 { Bad_Opcode },
8100 { Bad_Opcode },
8101 { Bad_Opcode },
8102 { Bad_Opcode },
8103 { Bad_Opcode },
8104 { Bad_Opcode },
8105 { Bad_Opcode },
8106 { Bad_Opcode },
c0f3af97 8107 /* a0 */
592d1631
L
8108 { Bad_Opcode },
8109 { Bad_Opcode },
8110 { Bad_Opcode },
8111 { Bad_Opcode },
8112 { Bad_Opcode },
8113 { Bad_Opcode },
8114 { Bad_Opcode },
8115 { Bad_Opcode },
c0f3af97 8116 /* a8 */
592d1631
L
8117 { Bad_Opcode },
8118 { Bad_Opcode },
8119 { Bad_Opcode },
8120 { Bad_Opcode },
8121 { Bad_Opcode },
8122 { Bad_Opcode },
8123 { Bad_Opcode },
8124 { Bad_Opcode },
c0f3af97 8125 /* b0 */
592d1631
L
8126 { Bad_Opcode },
8127 { Bad_Opcode },
8128 { Bad_Opcode },
8129 { Bad_Opcode },
8130 { Bad_Opcode },
8131 { Bad_Opcode },
8132 { Bad_Opcode },
8133 { Bad_Opcode },
c0f3af97 8134 /* b8 */
592d1631
L
8135 { Bad_Opcode },
8136 { Bad_Opcode },
8137 { Bad_Opcode },
8138 { Bad_Opcode },
8139 { Bad_Opcode },
8140 { Bad_Opcode },
8141 { Bad_Opcode },
8142 { Bad_Opcode },
c0f3af97 8143 /* c0 */
592d1631
L
8144 { Bad_Opcode },
8145 { Bad_Opcode },
8146 { Bad_Opcode },
8147 { Bad_Opcode },
8148 { Bad_Opcode },
8149 { Bad_Opcode },
8150 { Bad_Opcode },
8151 { Bad_Opcode },
c0f3af97 8152 /* c8 */
592d1631
L
8153 { Bad_Opcode },
8154 { Bad_Opcode },
8155 { Bad_Opcode },
8156 { Bad_Opcode },
8157 { Bad_Opcode },
8158 { Bad_Opcode },
8159 { Bad_Opcode },
8160 { Bad_Opcode },
c0f3af97 8161 /* d0 */
592d1631
L
8162 { Bad_Opcode },
8163 { Bad_Opcode },
8164 { Bad_Opcode },
8165 { Bad_Opcode },
8166 { Bad_Opcode },
8167 { Bad_Opcode },
8168 { Bad_Opcode },
8169 { Bad_Opcode },
c0f3af97 8170 /* d8 */
592d1631
L
8171 { Bad_Opcode },
8172 { Bad_Opcode },
8173 { Bad_Opcode },
8174 { Bad_Opcode },
8175 { Bad_Opcode },
8176 { Bad_Opcode },
8177 { Bad_Opcode },
592a252b 8178 { PREFIX_TABLE (PREFIX_VEX_0F3ADF) },
c0f3af97 8179 /* e0 */
592d1631
L
8180 { Bad_Opcode },
8181 { Bad_Opcode },
8182 { Bad_Opcode },
8183 { Bad_Opcode },
8184 { Bad_Opcode },
8185 { Bad_Opcode },
8186 { Bad_Opcode },
8187 { Bad_Opcode },
c0f3af97 8188 /* e8 */
592d1631
L
8189 { Bad_Opcode },
8190 { Bad_Opcode },
8191 { Bad_Opcode },
8192 { Bad_Opcode },
8193 { Bad_Opcode },
8194 { Bad_Opcode },
8195 { Bad_Opcode },
8196 { Bad_Opcode },
c0f3af97 8197 /* f0 */
592d1631
L
8198 { Bad_Opcode },
8199 { Bad_Opcode },
8200 { Bad_Opcode },
8201 { Bad_Opcode },
8202 { Bad_Opcode },
8203 { Bad_Opcode },
8204 { Bad_Opcode },
8205 { Bad_Opcode },
c0f3af97 8206 /* f8 */
592d1631
L
8207 { Bad_Opcode },
8208 { Bad_Opcode },
8209 { Bad_Opcode },
8210 { Bad_Opcode },
8211 { Bad_Opcode },
8212 { Bad_Opcode },
8213 { Bad_Opcode },
8214 { Bad_Opcode },
c0f3af97
L
8215 },
8216};
8217
8218static const struct dis386 vex_len_table[][2] = {
592a252b 8219 /* VEX_LEN_0F10_P_1 */
c0f3af97 8220 {
592a252b
L
8221 { VEX_W_TABLE (VEX_W_0F10_P_1) },
8222 { VEX_W_TABLE (VEX_W_0F10_P_1) },
c0f3af97
L
8223 },
8224
592a252b 8225 /* VEX_LEN_0F10_P_3 */
c0f3af97 8226 {
592a252b
L
8227 { VEX_W_TABLE (VEX_W_0F10_P_3) },
8228 { VEX_W_TABLE (VEX_W_0F10_P_3) },
c0f3af97
L
8229 },
8230
592a252b 8231 /* VEX_LEN_0F11_P_1 */
c0f3af97 8232 {
592a252b
L
8233 { VEX_W_TABLE (VEX_W_0F11_P_1) },
8234 { VEX_W_TABLE (VEX_W_0F11_P_1) },
c0f3af97
L
8235 },
8236
592a252b 8237 /* VEX_LEN_0F11_P_3 */
c0f3af97 8238 {
592a252b
L
8239 { VEX_W_TABLE (VEX_W_0F11_P_3) },
8240 { VEX_W_TABLE (VEX_W_0F11_P_3) },
c0f3af97
L
8241 },
8242
592a252b 8243 /* VEX_LEN_0F12_P_0_M_0 */
c0f3af97 8244 {
592a252b 8245 { VEX_W_TABLE (VEX_W_0F12_P_0_M_0) },
c0f3af97
L
8246 },
8247
592a252b 8248 /* VEX_LEN_0F12_P_0_M_1 */
c0f3af97 8249 {
592a252b 8250 { VEX_W_TABLE (VEX_W_0F12_P_0_M_1) },
c0f3af97
L
8251 },
8252
592a252b 8253 /* VEX_LEN_0F12_P_2 */
c0f3af97 8254 {
592a252b 8255 { VEX_W_TABLE (VEX_W_0F12_P_2) },
c0f3af97
L
8256 },
8257
592a252b 8258 /* VEX_LEN_0F13_M_0 */
c0f3af97 8259 {
592a252b 8260 { VEX_W_TABLE (VEX_W_0F13_M_0) },
c0f3af97
L
8261 },
8262
592a252b 8263 /* VEX_LEN_0F16_P_0_M_0 */
c0f3af97 8264 {
592a252b 8265 { VEX_W_TABLE (VEX_W_0F16_P_0_M_0) },
c0f3af97
L
8266 },
8267
592a252b 8268 /* VEX_LEN_0F16_P_0_M_1 */
c0f3af97 8269 {
592a252b 8270 { VEX_W_TABLE (VEX_W_0F16_P_0_M_1) },
c0f3af97
L
8271 },
8272
592a252b 8273 /* VEX_LEN_0F16_P_2 */
c0f3af97 8274 {
592a252b 8275 { VEX_W_TABLE (VEX_W_0F16_P_2) },
c0f3af97
L
8276 },
8277
592a252b 8278 /* VEX_LEN_0F17_M_0 */
c0f3af97 8279 {
592a252b 8280 { VEX_W_TABLE (VEX_W_0F17_M_0) },
c0f3af97
L
8281 },
8282
592a252b 8283 /* VEX_LEN_0F2A_P_1 */
c0f3af97 8284 {
539f890d
L
8285 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev } },
8286 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev } },
c0f3af97
L
8287 },
8288
592a252b 8289 /* VEX_LEN_0F2A_P_3 */
c0f3af97 8290 {
539f890d
L
8291 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev } },
8292 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev } },
c0f3af97
L
8293 },
8294
592a252b 8295 /* VEX_LEN_0F2C_P_1 */
c0f3af97 8296 {
539f890d
L
8297 { "vcvttss2siY", { Gv, EXdScalar } },
8298 { "vcvttss2siY", { Gv, EXdScalar } },
c0f3af97
L
8299 },
8300
592a252b 8301 /* VEX_LEN_0F2C_P_3 */
c0f3af97 8302 {
539f890d
L
8303 { "vcvttsd2siY", { Gv, EXqScalar } },
8304 { "vcvttsd2siY", { Gv, EXqScalar } },
c0f3af97
L
8305 },
8306
592a252b 8307 /* VEX_LEN_0F2D_P_1 */
c0f3af97 8308 {
539f890d
L
8309 { "vcvtss2siY", { Gv, EXdScalar } },
8310 { "vcvtss2siY", { Gv, EXdScalar } },
c0f3af97
L
8311 },
8312
592a252b 8313 /* VEX_LEN_0F2D_P_3 */
c0f3af97 8314 {
539f890d
L
8315 { "vcvtsd2siY", { Gv, EXqScalar } },
8316 { "vcvtsd2siY", { Gv, EXqScalar } },
c0f3af97
L
8317 },
8318
592a252b 8319 /* VEX_LEN_0F2E_P_0 */
c0f3af97 8320 {
592a252b
L
8321 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
8322 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
c0f3af97
L
8323 },
8324
592a252b 8325 /* VEX_LEN_0F2E_P_2 */
c0f3af97 8326 {
592a252b
L
8327 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
8328 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
c0f3af97
L
8329 },
8330
592a252b 8331 /* VEX_LEN_0F2F_P_0 */
c0f3af97 8332 {
592a252b
L
8333 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
8334 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
c0f3af97
L
8335 },
8336
592a252b 8337 /* VEX_LEN_0F2F_P_2 */
c0f3af97 8338 {
592a252b
L
8339 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
8340 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
c0f3af97
L
8341 },
8342
592a252b 8343 /* VEX_LEN_0F51_P_1 */
c0f3af97 8344 {
592a252b
L
8345 { VEX_W_TABLE (VEX_W_0F51_P_1) },
8346 { VEX_W_TABLE (VEX_W_0F51_P_1) },
c0f3af97
L
8347 },
8348
592a252b 8349 /* VEX_LEN_0F51_P_3 */
c0f3af97 8350 {
592a252b
L
8351 { VEX_W_TABLE (VEX_W_0F51_P_3) },
8352 { VEX_W_TABLE (VEX_W_0F51_P_3) },
c0f3af97
L
8353 },
8354
592a252b 8355 /* VEX_LEN_0F52_P_1 */
c0f3af97 8356 {
592a252b
L
8357 { VEX_W_TABLE (VEX_W_0F52_P_1) },
8358 { VEX_W_TABLE (VEX_W_0F52_P_1) },
c0f3af97
L
8359 },
8360
592a252b 8361 /* VEX_LEN_0F53_P_1 */
c0f3af97 8362 {
592a252b
L
8363 { VEX_W_TABLE (VEX_W_0F53_P_1) },
8364 { VEX_W_TABLE (VEX_W_0F53_P_1) },
c0f3af97
L
8365 },
8366
592a252b 8367 /* VEX_LEN_0F58_P_1 */
c0f3af97 8368 {
592a252b
L
8369 { VEX_W_TABLE (VEX_W_0F58_P_1) },
8370 { VEX_W_TABLE (VEX_W_0F58_P_1) },
c0f3af97
L
8371 },
8372
592a252b 8373 /* VEX_LEN_0F58_P_3 */
c0f3af97 8374 {
592a252b
L
8375 { VEX_W_TABLE (VEX_W_0F58_P_3) },
8376 { VEX_W_TABLE (VEX_W_0F58_P_3) },
c0f3af97
L
8377 },
8378
592a252b 8379 /* VEX_LEN_0F59_P_1 */
c0f3af97 8380 {
592a252b
L
8381 { VEX_W_TABLE (VEX_W_0F59_P_1) },
8382 { VEX_W_TABLE (VEX_W_0F59_P_1) },
c0f3af97
L
8383 },
8384
592a252b 8385 /* VEX_LEN_0F59_P_3 */
c0f3af97 8386 {
592a252b
L
8387 { VEX_W_TABLE (VEX_W_0F59_P_3) },
8388 { VEX_W_TABLE (VEX_W_0F59_P_3) },
c0f3af97
L
8389 },
8390
592a252b 8391 /* VEX_LEN_0F5A_P_1 */
c0f3af97 8392 {
592a252b
L
8393 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
8394 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
c0f3af97
L
8395 },
8396
592a252b 8397 /* VEX_LEN_0F5A_P_3 */
c0f3af97 8398 {
592a252b
L
8399 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
8400 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
c0f3af97
L
8401 },
8402
592a252b 8403 /* VEX_LEN_0F5C_P_1 */
c0f3af97 8404 {
592a252b
L
8405 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
8406 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
c0f3af97
L
8407 },
8408
592a252b 8409 /* VEX_LEN_0F5C_P_3 */
c0f3af97 8410 {
592a252b
L
8411 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
8412 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
c0f3af97
L
8413 },
8414
592a252b 8415 /* VEX_LEN_0F5D_P_1 */
c0f3af97 8416 {
592a252b
L
8417 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
8418 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
c0f3af97
L
8419 },
8420
592a252b 8421 /* VEX_LEN_0F5D_P_3 */
c0f3af97 8422 {
592a252b
L
8423 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
8424 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
c0f3af97
L
8425 },
8426
592a252b 8427 /* VEX_LEN_0F5E_P_1 */
c0f3af97 8428 {
592a252b
L
8429 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
8430 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
c0f3af97
L
8431 },
8432
592a252b 8433 /* VEX_LEN_0F5E_P_3 */
c0f3af97 8434 {
592a252b
L
8435 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
8436 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
c0f3af97
L
8437 },
8438
592a252b 8439 /* VEX_LEN_0F5F_P_1 */
c0f3af97 8440 {
592a252b
L
8441 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
8442 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
c0f3af97
L
8443 },
8444
592a252b 8445 /* VEX_LEN_0F5F_P_3 */
c0f3af97 8446 {
592a252b
L
8447 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
8448 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
c0f3af97
L
8449 },
8450
592a252b 8451 /* VEX_LEN_0F60_P_2 */
c0f3af97 8452 {
592a252b 8453 { VEX_W_TABLE (VEX_W_0F60_P_2) },
c0f3af97
L
8454 },
8455
592a252b 8456 /* VEX_LEN_0F61_P_2 */
c0f3af97 8457 {
592a252b 8458 { VEX_W_TABLE (VEX_W_0F61_P_2) },
c0f3af97
L
8459 },
8460
592a252b 8461 /* VEX_LEN_0F62_P_2 */
c0f3af97 8462 {
592a252b 8463 { VEX_W_TABLE (VEX_W_0F62_P_2) },
c0f3af97
L
8464 },
8465
592a252b 8466 /* VEX_LEN_0F63_P_2 */
c0f3af97 8467 {
592a252b 8468 { VEX_W_TABLE (VEX_W_0F63_P_2) },
c0f3af97
L
8469 },
8470
592a252b 8471 /* VEX_LEN_0F64_P_2 */
c0f3af97 8472 {
592a252b 8473 { VEX_W_TABLE (VEX_W_0F64_P_2) },
c0f3af97
L
8474 },
8475
592a252b 8476 /* VEX_LEN_0F65_P_2 */
c0f3af97 8477 {
592a252b 8478 { VEX_W_TABLE (VEX_W_0F65_P_2) },
c0f3af97
L
8479 },
8480
592a252b 8481 /* VEX_LEN_0F66_P_2 */
c0f3af97 8482 {
592a252b 8483 { VEX_W_TABLE (VEX_W_0F66_P_2) },
c0f3af97
L
8484 },
8485
592a252b 8486 /* VEX_LEN_0F67_P_2 */
c0f3af97 8487 {
592a252b 8488 { VEX_W_TABLE (VEX_W_0F67_P_2) },
c0f3af97
L
8489 },
8490
592a252b 8491 /* VEX_LEN_0F68_P_2 */
c0f3af97 8492 {
592a252b 8493 { VEX_W_TABLE (VEX_W_0F68_P_2) },
c0f3af97
L
8494 },
8495
592a252b 8496 /* VEX_LEN_0F69_P_2 */
c0f3af97 8497 {
592a252b 8498 { VEX_W_TABLE (VEX_W_0F69_P_2) },
c0f3af97
L
8499 },
8500
592a252b 8501 /* VEX_LEN_0F6A_P_2 */
c0f3af97 8502 {
592a252b 8503 { VEX_W_TABLE (VEX_W_0F6A_P_2) },
c0f3af97
L
8504 },
8505
592a252b 8506 /* VEX_LEN_0F6B_P_2 */
c0f3af97 8507 {
592a252b 8508 { VEX_W_TABLE (VEX_W_0F6B_P_2) },
c0f3af97
L
8509 },
8510
592a252b 8511 /* VEX_LEN_0F6C_P_2 */
c0f3af97 8512 {
592a252b 8513 { VEX_W_TABLE (VEX_W_0F6C_P_2) },
c0f3af97
L
8514 },
8515
592a252b 8516 /* VEX_LEN_0F6D_P_2 */
c0f3af97 8517 {
592a252b 8518 { VEX_W_TABLE (VEX_W_0F6D_P_2) },
c0f3af97
L
8519 },
8520
592a252b 8521 /* VEX_LEN_0F6E_P_2 */
c0f3af97 8522 {
539f890d
L
8523 { "vmovK", { XMScalar, Edq } },
8524 { "vmovK", { XMScalar, Edq } },
c0f3af97
L
8525 },
8526
592a252b 8527 /* VEX_LEN_0F70_P_1 */
c0f3af97 8528 {
592a252b 8529 { VEX_W_TABLE (VEX_W_0F70_P_1) },
c0f3af97
L
8530 },
8531
592a252b 8532 /* VEX_LEN_0F70_P_2 */
c0f3af97 8533 {
592a252b 8534 { VEX_W_TABLE (VEX_W_0F70_P_2) },
c0f3af97
L
8535 },
8536
592a252b 8537 /* VEX_LEN_0F70_P_3 */
c0f3af97 8538 {
592a252b 8539 { VEX_W_TABLE (VEX_W_0F70_P_3) },
c0f3af97
L
8540 },
8541
592a252b 8542 /* VEX_LEN_0F71_R_2_P_2 */
c0f3af97 8543 {
592a252b 8544 { VEX_W_TABLE (VEX_W_0F71_R_2_P_2) },
c0f3af97
L
8545 },
8546
592a252b 8547 /* VEX_LEN_0F71_R_4_P_2 */
c0f3af97 8548 {
592a252b 8549 { VEX_W_TABLE (VEX_W_0F71_R_4_P_2) },
c0f3af97
L
8550 },
8551
592a252b 8552 /* VEX_LEN_0F71_R_6_P_2 */
c0f3af97 8553 {
592a252b 8554 { VEX_W_TABLE (VEX_W_0F71_R_6_P_2) },
c0f3af97
L
8555 },
8556
592a252b 8557 /* VEX_LEN_0F72_R_2_P_2 */
c0f3af97 8558 {
592a252b 8559 { VEX_W_TABLE (VEX_W_0F72_R_2_P_2) },
c0f3af97
L
8560 },
8561
592a252b 8562 /* VEX_LEN_0F72_R_4_P_2 */
c0f3af97 8563 {
592a252b 8564 { VEX_W_TABLE (VEX_W_0F72_R_4_P_2) },
c0f3af97
L
8565 },
8566
592a252b 8567 /* VEX_LEN_0F72_R_6_P_2 */
c0f3af97 8568 {
592a252b 8569 { VEX_W_TABLE (VEX_W_0F72_R_6_P_2) },
c0f3af97
L
8570 },
8571
592a252b 8572 /* VEX_LEN_0F73_R_2_P_2 */
c0f3af97 8573 {
592a252b 8574 { VEX_W_TABLE (VEX_W_0F73_R_2_P_2) },
c0f3af97
L
8575 },
8576
592a252b 8577 /* VEX_LEN_0F73_R_3_P_2 */
c0f3af97 8578 {
592a252b 8579 { VEX_W_TABLE (VEX_W_0F73_R_3_P_2) },
c0f3af97
L
8580 },
8581
592a252b 8582 /* VEX_LEN_0F73_R_6_P_2 */
c0f3af97 8583 {
592a252b 8584 { VEX_W_TABLE (VEX_W_0F73_R_6_P_2) },
c0f3af97
L
8585 },
8586
592a252b 8587 /* VEX_LEN_0F73_R_7_P_2 */
c0f3af97 8588 {
592a252b 8589 { VEX_W_TABLE (VEX_W_0F73_R_7_P_2) },
c0f3af97
L
8590 },
8591
592a252b 8592 /* VEX_LEN_0F74_P_2 */
c0f3af97 8593 {
592a252b 8594 { VEX_W_TABLE (VEX_W_0F74_P_2) },
c0f3af97
L
8595 },
8596
592a252b 8597 /* VEX_LEN_0F75_P_2 */
c0f3af97 8598 {
592a252b 8599 { VEX_W_TABLE (VEX_W_0F75_P_2) },
c0f3af97
L
8600 },
8601
592a252b 8602 /* VEX_LEN_0F76_P_2 */
c0f3af97 8603 {
592a252b 8604 { VEX_W_TABLE (VEX_W_0F76_P_2) },
c0f3af97
L
8605 },
8606
592a252b 8607 /* VEX_LEN_0F7E_P_1 */
c0f3af97 8608 {
592a252b
L
8609 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
8610 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
c0f3af97
L
8611 },
8612
592a252b 8613 /* VEX_LEN_0F7E_P_2 */
c0f3af97 8614 {
539f890d
L
8615 { "vmovK", { Edq, XMScalar } },
8616 { "vmovK", { Edq, XMScalar } },
c0f3af97
L
8617 },
8618
592a252b 8619 /* VEX_LEN_0FAE_R_2_M_0 */
c0f3af97 8620 {
592a252b 8621 { VEX_W_TABLE (VEX_W_0FAE_R_2_M_0) },
c0f3af97
L
8622 },
8623
592a252b 8624 /* VEX_LEN_0FAE_R_3_M_0 */
c0f3af97 8625 {
592a252b 8626 { VEX_W_TABLE (VEX_W_0FAE_R_3_M_0) },
c0f3af97
L
8627 },
8628
592a252b 8629 /* VEX_LEN_0FC2_P_1 */
c0f3af97 8630 {
592a252b
L
8631 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
8632 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
c0f3af97
L
8633 },
8634
592a252b 8635 /* VEX_LEN_0FC2_P_3 */
c0f3af97 8636 {
592a252b
L
8637 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
8638 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
c0f3af97
L
8639 },
8640
592a252b 8641 /* VEX_LEN_0FC4_P_2 */
c0f3af97 8642 {
592a252b 8643 { VEX_W_TABLE (VEX_W_0FC4_P_2) },
c0f3af97
L
8644 },
8645
592a252b 8646 /* VEX_LEN_0FC5_P_2 */
c0f3af97 8647 {
592a252b 8648 { VEX_W_TABLE (VEX_W_0FC5_P_2) },
c0f3af97
L
8649 },
8650
592a252b 8651 /* VEX_LEN_0FD1_P_2 */
c0f3af97 8652 {
592a252b 8653 { VEX_W_TABLE (VEX_W_0FD1_P_2) },
c0f3af97
L
8654 },
8655
592a252b 8656 /* VEX_LEN_0FD2_P_2 */
c0f3af97 8657 {
592a252b 8658 { VEX_W_TABLE (VEX_W_0FD2_P_2) },
c0f3af97
L
8659 },
8660
592a252b 8661 /* VEX_LEN_0FD3_P_2 */
c0f3af97 8662 {
592a252b 8663 { VEX_W_TABLE (VEX_W_0FD3_P_2) },
c0f3af97
L
8664 },
8665
592a252b 8666 /* VEX_LEN_0FD4_P_2 */
c0f3af97 8667 {
592a252b 8668 { VEX_W_TABLE (VEX_W_0FD4_P_2) },
c0f3af97
L
8669 },
8670
592a252b 8671 /* VEX_LEN_0FD5_P_2 */
c0f3af97 8672 {
592a252b 8673 { VEX_W_TABLE (VEX_W_0FD5_P_2) },
c0f3af97
L
8674 },
8675
592a252b 8676 /* VEX_LEN_0FD6_P_2 */
c0f3af97 8677 {
592a252b
L
8678 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
8679 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
c0f3af97
L
8680 },
8681
592a252b 8682 /* VEX_LEN_0FD7_P_2_M_1 */
c0f3af97 8683 {
592a252b 8684 { VEX_W_TABLE (VEX_W_0FD7_P_2_M_1) },
c0f3af97
L
8685 },
8686
592a252b 8687 /* VEX_LEN_0FD8_P_2 */
c0f3af97 8688 {
592a252b 8689 { VEX_W_TABLE (VEX_W_0FD8_P_2) },
c0f3af97
L
8690 },
8691
592a252b 8692 /* VEX_LEN_0FD9_P_2 */
c0f3af97 8693 {
592a252b 8694 { VEX_W_TABLE (VEX_W_0FD9_P_2) },
c0f3af97
L
8695 },
8696
592a252b 8697 /* VEX_LEN_0FDA_P_2 */
c0f3af97 8698 {
592a252b 8699 { VEX_W_TABLE (VEX_W_0FDA_P_2) },
c0f3af97
L
8700 },
8701
592a252b 8702 /* VEX_LEN_0FDB_P_2 */
c0f3af97 8703 {
592a252b 8704 { VEX_W_TABLE (VEX_W_0FDB_P_2) },
c0f3af97
L
8705 },
8706
592a252b 8707 /* VEX_LEN_0FDC_P_2 */
c0f3af97 8708 {
592a252b 8709 { VEX_W_TABLE (VEX_W_0FDC_P_2) },
c0f3af97
L
8710 },
8711
592a252b 8712 /* VEX_LEN_0FDD_P_2 */
c0f3af97 8713 {
592a252b 8714 { VEX_W_TABLE (VEX_W_0FDD_P_2) },
c0f3af97
L
8715 },
8716
592a252b 8717 /* VEX_LEN_0FDE_P_2 */
c0f3af97 8718 {
592a252b 8719 { VEX_W_TABLE (VEX_W_0FDE_P_2) },
c0f3af97
L
8720 },
8721
592a252b 8722 /* VEX_LEN_0FDF_P_2 */
c0f3af97 8723 {
592a252b 8724 { VEX_W_TABLE (VEX_W_0FDF_P_2) },
c0f3af97
L
8725 },
8726
592a252b 8727 /* VEX_LEN_0FE0_P_2 */
c0f3af97 8728 {
592a252b 8729 { VEX_W_TABLE (VEX_W_0FE0_P_2) },
c0f3af97
L
8730 },
8731
592a252b 8732 /* VEX_LEN_0FE1_P_2 */
c0f3af97 8733 {
592a252b 8734 { VEX_W_TABLE (VEX_W_0FE1_P_2) },
c0f3af97
L
8735 },
8736
592a252b 8737 /* VEX_LEN_0FE2_P_2 */
c0f3af97 8738 {
592a252b 8739 { VEX_W_TABLE (VEX_W_0FE2_P_2) },
c0f3af97
L
8740 },
8741
592a252b 8742 /* VEX_LEN_0FE3_P_2 */
c0f3af97 8743 {
592a252b 8744 { VEX_W_TABLE (VEX_W_0FE3_P_2) },
c0f3af97
L
8745 },
8746
592a252b 8747 /* VEX_LEN_0FE4_P_2 */
c0f3af97 8748 {
592a252b 8749 { VEX_W_TABLE (VEX_W_0FE4_P_2) },
c0f3af97
L
8750 },
8751
592a252b 8752 /* VEX_LEN_0FE5_P_2 */
c0f3af97 8753 {
592a252b 8754 { VEX_W_TABLE (VEX_W_0FE5_P_2) },
c0f3af97
L
8755 },
8756
592a252b 8757 /* VEX_LEN_0FE8_P_2 */
c0f3af97 8758 {
592a252b 8759 { VEX_W_TABLE (VEX_W_0FE8_P_2) },
c0f3af97
L
8760 },
8761
592a252b 8762 /* VEX_LEN_0FE9_P_2 */
c0f3af97 8763 {
592a252b 8764 { VEX_W_TABLE (VEX_W_0FE9_P_2) },
c0f3af97
L
8765 },
8766
592a252b 8767 /* VEX_LEN_0FEA_P_2 */
c0f3af97 8768 {
592a252b 8769 { VEX_W_TABLE (VEX_W_0FEA_P_2) },
c0f3af97
L
8770 },
8771
592a252b 8772 /* VEX_LEN_0FEB_P_2 */
c0f3af97 8773 {
592a252b 8774 { VEX_W_TABLE (VEX_W_0FEB_P_2) },
c0f3af97
L
8775 },
8776
592a252b 8777 /* VEX_LEN_0FEC_P_2 */
c0f3af97 8778 {
592a252b 8779 { VEX_W_TABLE (VEX_W_0FEC_P_2) },
c0f3af97
L
8780 },
8781
592a252b 8782 /* VEX_LEN_0FED_P_2 */
c0f3af97 8783 {
592a252b 8784 { VEX_W_TABLE (VEX_W_0FED_P_2) },
c0f3af97
L
8785 },
8786
592a252b 8787 /* VEX_LEN_0FEE_P_2 */
c0f3af97 8788 {
592a252b 8789 { VEX_W_TABLE (VEX_W_0FEE_P_2) },
c0f3af97
L
8790 },
8791
592a252b 8792 /* VEX_LEN_0FEF_P_2 */
c0f3af97 8793 {
592a252b 8794 { VEX_W_TABLE (VEX_W_0FEF_P_2) },
c0f3af97
L
8795 },
8796
592a252b 8797 /* VEX_LEN_0FF1_P_2 */
c0f3af97 8798 {
592a252b 8799 { VEX_W_TABLE (VEX_W_0FF1_P_2) },
c0f3af97
L
8800 },
8801
592a252b 8802 /* VEX_LEN_0FF2_P_2 */
c0f3af97 8803 {
592a252b 8804 { VEX_W_TABLE (VEX_W_0FF2_P_2) },
c0f3af97
L
8805 },
8806
592a252b 8807 /* VEX_LEN_0FF3_P_2 */
c0f3af97 8808 {
592a252b 8809 { VEX_W_TABLE (VEX_W_0FF3_P_2) },
c0f3af97
L
8810 },
8811
592a252b 8812 /* VEX_LEN_0FF4_P_2 */
c0f3af97 8813 {
592a252b 8814 { VEX_W_TABLE (VEX_W_0FF4_P_2) },
c0f3af97
L
8815 },
8816
592a252b 8817 /* VEX_LEN_0FF5_P_2 */
c0f3af97 8818 {
592a252b 8819 { VEX_W_TABLE (VEX_W_0FF5_P_2) },
c0f3af97
L
8820 },
8821
592a252b 8822 /* VEX_LEN_0FF6_P_2 */
c0f3af97 8823 {
592a252b 8824 { VEX_W_TABLE (VEX_W_0FF6_P_2) },
c0f3af97
L
8825 },
8826
592a252b 8827 /* VEX_LEN_0FF7_P_2 */
c0f3af97 8828 {
592a252b 8829 { VEX_W_TABLE (VEX_W_0FF7_P_2) },
c0f3af97
L
8830 },
8831
592a252b 8832 /* VEX_LEN_0FF8_P_2 */
c0f3af97 8833 {
592a252b 8834 { VEX_W_TABLE (VEX_W_0FF8_P_2) },
c0f3af97
L
8835 },
8836
592a252b 8837 /* VEX_LEN_0FF9_P_2 */
c0f3af97 8838 {
592a252b 8839 { VEX_W_TABLE (VEX_W_0FF9_P_2) },
c0f3af97
L
8840 },
8841
592a252b 8842 /* VEX_LEN_0FFA_P_2 */
c0f3af97 8843 {
592a252b 8844 { VEX_W_TABLE (VEX_W_0FFA_P_2) },
c0f3af97
L
8845 },
8846
592a252b 8847 /* VEX_LEN_0FFB_P_2 */
c0f3af97 8848 {
592a252b 8849 { VEX_W_TABLE (VEX_W_0FFB_P_2) },
c0f3af97
L
8850 },
8851
592a252b 8852 /* VEX_LEN_0FFC_P_2 */
c0f3af97 8853 {
592a252b 8854 { VEX_W_TABLE (VEX_W_0FFC_P_2) },
c0f3af97
L
8855 },
8856
592a252b 8857 /* VEX_LEN_0FFD_P_2 */
c0f3af97 8858 {
592a252b 8859 { VEX_W_TABLE (VEX_W_0FFD_P_2) },
c0f3af97
L
8860 },
8861
592a252b 8862 /* VEX_LEN_0FFE_P_2 */
c0f3af97 8863 {
592a252b 8864 { VEX_W_TABLE (VEX_W_0FFE_P_2) },
c0f3af97
L
8865 },
8866
592a252b 8867 /* VEX_LEN_0F3800_P_2 */
c0f3af97 8868 {
592a252b 8869 { VEX_W_TABLE (VEX_W_0F3800_P_2) },
c0f3af97
L
8870 },
8871
592a252b 8872 /* VEX_LEN_0F3801_P_2 */
c0f3af97 8873 {
592a252b 8874 { VEX_W_TABLE (VEX_W_0F3801_P_2) },
c0f3af97
L
8875 },
8876
592a252b 8877 /* VEX_LEN_0F3802_P_2 */
c0f3af97 8878 {
592a252b 8879 { VEX_W_TABLE (VEX_W_0F3802_P_2) },
c0f3af97
L
8880 },
8881
592a252b 8882 /* VEX_LEN_0F3803_P_2 */
c0f3af97 8883 {
592a252b 8884 { VEX_W_TABLE (VEX_W_0F3803_P_2) },
c0f3af97
L
8885 },
8886
592a252b 8887 /* VEX_LEN_0F3804_P_2 */
c0f3af97 8888 {
592a252b 8889 { VEX_W_TABLE (VEX_W_0F3804_P_2) },
c0f3af97
L
8890 },
8891
592a252b 8892 /* VEX_LEN_0F3805_P_2 */
c0f3af97 8893 {
592a252b 8894 { VEX_W_TABLE (VEX_W_0F3805_P_2) },
c0f3af97
L
8895 },
8896
592a252b 8897 /* VEX_LEN_0F3806_P_2 */
c0f3af97 8898 {
592a252b 8899 { VEX_W_TABLE (VEX_W_0F3806_P_2) },
c0f3af97
L
8900 },
8901
592a252b 8902 /* VEX_LEN_0F3807_P_2 */
c0f3af97 8903 {
592a252b 8904 { VEX_W_TABLE (VEX_W_0F3807_P_2) },
c0f3af97
L
8905 },
8906
592a252b 8907 /* VEX_LEN_0F3808_P_2 */
c0f3af97 8908 {
592a252b 8909 { VEX_W_TABLE (VEX_W_0F3808_P_2) },
c0f3af97
L
8910 },
8911
592a252b 8912 /* VEX_LEN_0F3809_P_2 */
c0f3af97 8913 {
592a252b 8914 { VEX_W_TABLE (VEX_W_0F3809_P_2) },
c0f3af97
L
8915 },
8916
592a252b 8917 /* VEX_LEN_0F380A_P_2 */
c0f3af97 8918 {
592a252b 8919 { VEX_W_TABLE (VEX_W_0F380A_P_2) },
c0f3af97
L
8920 },
8921
592a252b 8922 /* VEX_LEN_0F380B_P_2 */
c0f3af97 8923 {
592a252b 8924 { VEX_W_TABLE (VEX_W_0F380B_P_2) },
c0f3af97
L
8925 },
8926
592a252b 8927 /* VEX_LEN_0F3819_P_2_M_0 */
c0f3af97 8928 {
592d1631 8929 { Bad_Opcode },
592a252b 8930 { VEX_W_TABLE (VEX_W_0F3819_P_2_M_0) },
c0f3af97
L
8931 },
8932
592a252b 8933 /* VEX_LEN_0F381A_P_2_M_0 */
c0f3af97 8934 {
592d1631 8935 { Bad_Opcode },
592a252b 8936 { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0) },
c0f3af97
L
8937 },
8938
592a252b 8939 /* VEX_LEN_0F381C_P_2 */
c0f3af97 8940 {
592a252b 8941 { VEX_W_TABLE (VEX_W_0F381C_P_2) },
c0f3af97
L
8942 },
8943
592a252b 8944 /* VEX_LEN_0F381D_P_2 */
c0f3af97 8945 {
592a252b 8946 { VEX_W_TABLE (VEX_W_0F381D_P_2) },
c0f3af97
L
8947 },
8948
592a252b 8949 /* VEX_LEN_0F381E_P_2 */
c0f3af97 8950 {
592a252b 8951 { VEX_W_TABLE (VEX_W_0F381E_P_2) },
c0f3af97
L
8952 },
8953
592a252b 8954 /* VEX_LEN_0F3820_P_2 */
c0f3af97 8955 {
592a252b 8956 { VEX_W_TABLE (VEX_W_0F3820_P_2) },
c0f3af97
L
8957 },
8958
592a252b 8959 /* VEX_LEN_0F3821_P_2 */
c0f3af97 8960 {
592a252b 8961 { VEX_W_TABLE (VEX_W_0F3821_P_2) },
c0f3af97
L
8962 },
8963
592a252b 8964 /* VEX_LEN_0F3822_P_2 */
c0f3af97 8965 {
592a252b 8966 { VEX_W_TABLE (VEX_W_0F3822_P_2) },
c0f3af97
L
8967 },
8968
592a252b 8969 /* VEX_LEN_0F3823_P_2 */
c0f3af97 8970 {
592a252b 8971 { VEX_W_TABLE (VEX_W_0F3823_P_2) },
c0f3af97
L
8972 },
8973
592a252b 8974 /* VEX_LEN_0F3824_P_2 */
c0f3af97 8975 {
592a252b 8976 { VEX_W_TABLE (VEX_W_0F3824_P_2) },
c0f3af97
L
8977 },
8978
592a252b 8979 /* VEX_LEN_0F3825_P_2 */
c0f3af97 8980 {
592a252b 8981 { VEX_W_TABLE (VEX_W_0F3825_P_2) },
c0f3af97
L
8982 },
8983
592a252b 8984 /* VEX_LEN_0F3828_P_2 */
c0f3af97 8985 {
592a252b 8986 { VEX_W_TABLE (VEX_W_0F3828_P_2) },
c0f3af97
L
8987 },
8988
592a252b 8989 /* VEX_LEN_0F3829_P_2 */
c0f3af97 8990 {
592a252b 8991 { VEX_W_TABLE (VEX_W_0F3829_P_2) },
c0f3af97
L
8992 },
8993
592a252b 8994 /* VEX_LEN_0F382A_P_2_M_0 */
c0f3af97 8995 {
592a252b 8996 { VEX_W_TABLE (VEX_W_0F382A_P_2_M_0) },
c0f3af97
L
8997 },
8998
592a252b 8999 /* VEX_LEN_0F382B_P_2 */
c0f3af97 9000 {
592a252b 9001 { VEX_W_TABLE (VEX_W_0F382B_P_2) },
c0f3af97
L
9002 },
9003
592a252b 9004 /* VEX_LEN_0F3830_P_2 */
c0f3af97 9005 {
592a252b 9006 { VEX_W_TABLE (VEX_W_0F3830_P_2) },
c0f3af97
L
9007 },
9008
592a252b 9009 /* VEX_LEN_0F3831_P_2 */
c0f3af97 9010 {
592a252b 9011 { VEX_W_TABLE (VEX_W_0F3831_P_2) },
c0f3af97
L
9012 },
9013
592a252b 9014 /* VEX_LEN_0F3832_P_2 */
c0f3af97 9015 {
592a252b 9016 { VEX_W_TABLE (VEX_W_0F3832_P_2) },
c0f3af97
L
9017 },
9018
592a252b 9019 /* VEX_LEN_0F3833_P_2 */
c0f3af97 9020 {
592a252b 9021 { VEX_W_TABLE (VEX_W_0F3833_P_2) },
c0f3af97
L
9022 },
9023
592a252b 9024 /* VEX_LEN_0F3834_P_2 */
c0f3af97 9025 {
592a252b 9026 { VEX_W_TABLE (VEX_W_0F3834_P_2) },
c0f3af97
L
9027 },
9028
592a252b 9029 /* VEX_LEN_0F3835_P_2 */
c0f3af97 9030 {
592a252b 9031 { VEX_W_TABLE (VEX_W_0F3835_P_2) },
c0f3af97
L
9032 },
9033
592a252b 9034 /* VEX_LEN_0F3837_P_2 */
c0f3af97 9035 {
592a252b 9036 { VEX_W_TABLE (VEX_W_0F3837_P_2) },
c0f3af97
L
9037 },
9038
592a252b 9039 /* VEX_LEN_0F3838_P_2 */
c0f3af97 9040 {
592a252b 9041 { VEX_W_TABLE (VEX_W_0F3838_P_2) },
c0f3af97
L
9042 },
9043
592a252b 9044 /* VEX_LEN_0F3839_P_2 */
c0f3af97 9045 {
592a252b 9046 { VEX_W_TABLE (VEX_W_0F3839_P_2) },
c0f3af97
L
9047 },
9048
592a252b 9049 /* VEX_LEN_0F383A_P_2 */
c0f3af97 9050 {
592a252b 9051 { VEX_W_TABLE (VEX_W_0F383A_P_2) },
c0f3af97
L
9052 },
9053
592a252b 9054 /* VEX_LEN_0F383B_P_2 */
c0f3af97 9055 {
592a252b 9056 { VEX_W_TABLE (VEX_W_0F383B_P_2) },
c0f3af97
L
9057 },
9058
592a252b 9059 /* VEX_LEN_0F383C_P_2 */
c0f3af97 9060 {
592a252b 9061 { VEX_W_TABLE (VEX_W_0F383C_P_2) },
c0f3af97
L
9062 },
9063
592a252b 9064 /* VEX_LEN_0F383D_P_2 */
c0f3af97 9065 {
592a252b 9066 { VEX_W_TABLE (VEX_W_0F383D_P_2) },
c0f3af97
L
9067 },
9068
592a252b 9069 /* VEX_LEN_0F383E_P_2 */
c0f3af97 9070 {
592a252b 9071 { VEX_W_TABLE (VEX_W_0F383E_P_2) },
c0f3af97
L
9072 },
9073
592a252b 9074 /* VEX_LEN_0F383F_P_2 */
c0f3af97 9075 {
592a252b 9076 { VEX_W_TABLE (VEX_W_0F383F_P_2) },
c0f3af97
L
9077 },
9078
592a252b 9079 /* VEX_LEN_0F3840_P_2 */
c0f3af97 9080 {
592a252b 9081 { VEX_W_TABLE (VEX_W_0F3840_P_2) },
c0f3af97
L
9082 },
9083
592a252b 9084 /* VEX_LEN_0F3841_P_2 */
c0f3af97 9085 {
592a252b 9086 { VEX_W_TABLE (VEX_W_0F3841_P_2) },
c0f3af97
L
9087 },
9088
592a252b 9089 /* VEX_LEN_0F38DB_P_2 */
a5ff0eb2 9090 {
592a252b 9091 { VEX_W_TABLE (VEX_W_0F38DB_P_2) },
a5ff0eb2
L
9092 },
9093
592a252b 9094 /* VEX_LEN_0F38DC_P_2 */
a5ff0eb2 9095 {
592a252b 9096 { VEX_W_TABLE (VEX_W_0F38DC_P_2) },
a5ff0eb2
L
9097 },
9098
592a252b 9099 /* VEX_LEN_0F38DD_P_2 */
a5ff0eb2 9100 {
592a252b 9101 { VEX_W_TABLE (VEX_W_0F38DD_P_2) },
a5ff0eb2
L
9102 },
9103
592a252b 9104 /* VEX_LEN_0F38DE_P_2 */
a5ff0eb2 9105 {
592a252b 9106 { VEX_W_TABLE (VEX_W_0F38DE_P_2) },
a5ff0eb2
L
9107 },
9108
592a252b 9109 /* VEX_LEN_0F38DF_P_2 */
a5ff0eb2 9110 {
592a252b 9111 { VEX_W_TABLE (VEX_W_0F38DF_P_2) },
a5ff0eb2
L
9112 },
9113
f12dc422
L
9114 /* VEX_LEN_0F38F2_P_0 */
9115 {
9116 { "andnS", { Gdq, VexGdq, Edq } },
9117 },
9118
9119 /* VEX_LEN_0F38F3_R_1_P_0 */
9120 {
9121 { "blsrS", { VexGdq, Edq } },
9122 },
9123
9124 /* VEX_LEN_0F38F3_R_2_P_0 */
9125 {
9126 { "blsmskS", { VexGdq, Edq } },
9127 },
9128
9129 /* VEX_LEN_0F38F3_R_3_P_0 */
9130 {
9131 { "blsiS", { VexGdq, Edq } },
9132 },
9133
9134 /* VEX_LEN_0F38F7_P_0 */
9135 {
9136 { "bextrS", { Gdq, Edq, VexGdq } },
9137 },
9138
592a252b 9139 /* VEX_LEN_0F3A06_P_2 */
c0f3af97 9140 {
592d1631 9141 { Bad_Opcode },
592a252b 9142 { VEX_W_TABLE (VEX_W_0F3A06_P_2) },
c0f3af97
L
9143 },
9144
592a252b 9145 /* VEX_LEN_0F3A0A_P_2 */
c0f3af97 9146 {
592a252b
L
9147 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
9148 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
c0f3af97
L
9149 },
9150
592a252b 9151 /* VEX_LEN_0F3A0B_P_2 */
c0f3af97 9152 {
592a252b
L
9153 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
9154 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
c0f3af97
L
9155 },
9156
592a252b 9157 /* VEX_LEN_0F3A0E_P_2 */
c0f3af97 9158 {
592a252b 9159 { VEX_W_TABLE (VEX_W_0F3A0E_P_2) },
c0f3af97
L
9160 },
9161
592a252b 9162 /* VEX_LEN_0F3A0F_P_2 */
c0f3af97 9163 {
592a252b 9164 { VEX_W_TABLE (VEX_W_0F3A0F_P_2) },
c0f3af97
L
9165 },
9166
592a252b 9167 /* VEX_LEN_0F3A14_P_2 */
c0f3af97 9168 {
592a252b 9169 { VEX_W_TABLE (VEX_W_0F3A14_P_2) },
c0f3af97
L
9170 },
9171
592a252b 9172 /* VEX_LEN_0F3A15_P_2 */
c0f3af97 9173 {
592a252b 9174 { VEX_W_TABLE (VEX_W_0F3A15_P_2) },
c0f3af97
L
9175 },
9176
592a252b 9177 /* VEX_LEN_0F3A16_P_2 */
c0f3af97
L
9178 {
9179 { "vpextrK", { Edq, XM, Ib } },
c0f3af97
L
9180 },
9181
592a252b 9182 /* VEX_LEN_0F3A17_P_2 */
c0f3af97
L
9183 {
9184 { "vextractps", { Edqd, XM, Ib } },
c0f3af97
L
9185 },
9186
592a252b 9187 /* VEX_LEN_0F3A18_P_2 */
c0f3af97 9188 {
592d1631 9189 { Bad_Opcode },
592a252b 9190 { VEX_W_TABLE (VEX_W_0F3A18_P_2) },
c0f3af97
L
9191 },
9192
592a252b 9193 /* VEX_LEN_0F3A19_P_2 */
c0f3af97 9194 {
592d1631 9195 { Bad_Opcode },
592a252b 9196 { VEX_W_TABLE (VEX_W_0F3A19_P_2) },
c0f3af97
L
9197 },
9198
592a252b 9199 /* VEX_LEN_0F3A20_P_2 */
c0f3af97 9200 {
592a252b 9201 { VEX_W_TABLE (VEX_W_0F3A20_P_2) },
c0f3af97
L
9202 },
9203
592a252b 9204 /* VEX_LEN_0F3A21_P_2 */
c0f3af97 9205 {
592a252b 9206 { VEX_W_TABLE (VEX_W_0F3A21_P_2) },
c0f3af97
L
9207 },
9208
592a252b 9209 /* VEX_LEN_0F3A22_P_2 */
c0f3af97
L
9210 {
9211 { "vpinsrK", { XM, Vex128, Edq, Ib } },
c0f3af97
L
9212 },
9213
592a252b 9214 /* VEX_LEN_0F3A41_P_2 */
c0f3af97 9215 {
592a252b 9216 { VEX_W_TABLE (VEX_W_0F3A41_P_2) },
c0f3af97
L
9217 },
9218
592a252b 9219 /* VEX_LEN_0F3A42_P_2 */
c0f3af97 9220 {
592a252b 9221 { VEX_W_TABLE (VEX_W_0F3A42_P_2) },
c0f3af97
L
9222 },
9223
592a252b 9224 /* VEX_LEN_0F3A44_P_2 */
ce2f5b3c 9225 {
592a252b 9226 { VEX_W_TABLE (VEX_W_0F3A44_P_2) },
ce2f5b3c
L
9227 },
9228
592a252b 9229 /* VEX_LEN_0F3A4C_P_2 */
c0f3af97 9230 {
592a252b 9231 { VEX_W_TABLE (VEX_W_0F3A4C_P_2) },
c0f3af97
L
9232 },
9233
592a252b 9234 /* VEX_LEN_0F3A60_P_2 */
c0f3af97 9235 {
592a252b 9236 { VEX_W_TABLE (VEX_W_0F3A60_P_2) },
c0f3af97
L
9237 },
9238
592a252b 9239 /* VEX_LEN_0F3A61_P_2 */
c0f3af97 9240 {
592a252b 9241 { VEX_W_TABLE (VEX_W_0F3A61_P_2) },
c0f3af97
L
9242 },
9243
592a252b 9244 /* VEX_LEN_0F3A62_P_2 */
c0f3af97 9245 {
592a252b 9246 { VEX_W_TABLE (VEX_W_0F3A62_P_2) },
c0f3af97
L
9247 },
9248
592a252b 9249 /* VEX_LEN_0F3A63_P_2 */
c0f3af97 9250 {
592a252b 9251 { VEX_W_TABLE (VEX_W_0F3A63_P_2) },
c0f3af97
L
9252 },
9253
592a252b 9254 /* VEX_LEN_0F3A6A_P_2 */
922d8de8 9255 {
206c2556 9256 { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9257 },
9258
592a252b 9259 /* VEX_LEN_0F3A6B_P_2 */
922d8de8 9260 {
206c2556 9261 { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9262 },
9263
592a252b 9264 /* VEX_LEN_0F3A6E_P_2 */
922d8de8 9265 {
206c2556 9266 { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9267 },
9268
592a252b 9269 /* VEX_LEN_0F3A6F_P_2 */
922d8de8 9270 {
206c2556 9271 { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9272 },
9273
592a252b 9274 /* VEX_LEN_0F3A7A_P_2 */
922d8de8 9275 {
206c2556 9276 { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9277 },
9278
592a252b 9279 /* VEX_LEN_0F3A7B_P_2 */
922d8de8 9280 {
206c2556 9281 { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9282 },
9283
592a252b 9284 /* VEX_LEN_0F3A7E_P_2 */
922d8de8 9285 {
206c2556 9286 { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9287 },
9288
592a252b 9289 /* VEX_LEN_0F3A7F_P_2 */
922d8de8 9290 {
206c2556 9291 { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9292 },
9293
592a252b 9294 /* VEX_LEN_0F3ADF_P_2 */
a5ff0eb2 9295 {
592a252b 9296 { VEX_W_TABLE (VEX_W_0F3ADF_P_2) },
a5ff0eb2 9297 },
4c807e72 9298
592a252b 9299 /* VEX_LEN_0FXOP_09_80 */
5dd85c99 9300 {
4c807e72
L
9301 { "vfrczps", { XM, EXxmm } },
9302 { "vfrczps", { XM, EXymmq } },
5dd85c99 9303 },
4c807e72 9304
592a252b 9305 /* VEX_LEN_0FXOP_09_81 */
5dd85c99 9306 {
4c807e72
L
9307 { "vfrczpd", { XM, EXxmm } },
9308 { "vfrczpd", { XM, EXymmq } },
5dd85c99 9309 },
331d2d0d
L
9310};
9311
9e30b8e0 9312static const struct dis386 vex_w_table[][2] = {
b844680a 9313 {
592a252b 9314 /* VEX_W_0F10_P_0 */
9e30b8e0 9315 { "vmovups", { XM, EXx } },
d8faab4e
L
9316 },
9317 {
592a252b 9318 /* VEX_W_0F10_P_1 */
539f890d 9319 { "vmovss", { XMVexScalar, VexScalar, EXdScalar } },
d8faab4e
L
9320 },
9321 {
592a252b 9322 /* VEX_W_0F10_P_2 */
9e30b8e0 9323 { "vmovupd", { XM, EXx } },
d8faab4e
L
9324 },
9325 {
592a252b 9326 /* VEX_W_0F10_P_3 */
539f890d 9327 { "vmovsd", { XMVexScalar, VexScalar, EXqScalar } },
d8faab4e
L
9328 },
9329 {
592a252b 9330 /* VEX_W_0F11_P_0 */
9e30b8e0 9331 { "vmovups", { EXxS, XM } },
d8faab4e
L
9332 },
9333 {
592a252b 9334 /* VEX_W_0F11_P_1 */
539f890d 9335 { "vmovss", { EXdVexScalarS, VexScalar, XMScalar } },
b844680a
L
9336 },
9337 {
592a252b 9338 /* VEX_W_0F11_P_2 */
9e30b8e0 9339 { "vmovupd", { EXxS, XM } },
b844680a
L
9340 },
9341 {
592a252b 9342 /* VEX_W_0F11_P_3 */
539f890d 9343 { "vmovsd", { EXqVexScalarS, VexScalar, XMScalar } },
d8faab4e
L
9344 },
9345 {
592a252b 9346 /* VEX_W_0F12_P_0_M_0 */
9e30b8e0 9347 { "vmovlps", { XM, Vex128, EXq } },
b844680a
L
9348 },
9349 {
592a252b 9350 /* VEX_W_0F12_P_0_M_1 */
9e30b8e0 9351 { "vmovhlps", { XM, Vex128, EXq } },
b844680a
L
9352 },
9353 {
592a252b 9354 /* VEX_W_0F12_P_1 */
9e30b8e0 9355 { "vmovsldup", { XM, EXx } },
b844680a
L
9356 },
9357 {
592a252b 9358 /* VEX_W_0F12_P_2 */
9e30b8e0 9359 { "vmovlpd", { XM, Vex128, EXq } },
b844680a
L
9360 },
9361 {
592a252b 9362 /* VEX_W_0F12_P_3 */
9e30b8e0 9363 { "vmovddup", { XM, EXymmq } },
b844680a
L
9364 },
9365 {
592a252b 9366 /* VEX_W_0F13_M_0 */
9e30b8e0 9367 { "vmovlpX", { EXq, XM } },
b844680a
L
9368 },
9369 {
592a252b 9370 /* VEX_W_0F14 */
9e30b8e0 9371 { "vunpcklpX", { XM, Vex, EXx } },
b844680a
L
9372 },
9373 {
592a252b 9374 /* VEX_W_0F15 */
9e30b8e0 9375 { "vunpckhpX", { XM, Vex, EXx } },
b844680a
L
9376 },
9377 {
592a252b 9378 /* VEX_W_0F16_P_0_M_0 */
9e30b8e0 9379 { "vmovhps", { XM, Vex128, EXq } },
9e30b8e0
L
9380 },
9381 {
592a252b 9382 /* VEX_W_0F16_P_0_M_1 */
9e30b8e0 9383 { "vmovlhps", { XM, Vex128, EXq } },
9e30b8e0
L
9384 },
9385 {
592a252b 9386 /* VEX_W_0F16_P_1 */
9e30b8e0 9387 { "vmovshdup", { XM, EXx } },
9e30b8e0
L
9388 },
9389 {
592a252b 9390 /* VEX_W_0F16_P_2 */
9e30b8e0 9391 { "vmovhpd", { XM, Vex128, EXq } },
9e30b8e0
L
9392 },
9393 {
592a252b 9394 /* VEX_W_0F17_M_0 */
9e30b8e0 9395 { "vmovhpX", { EXq, XM } },
9e30b8e0
L
9396 },
9397 {
592a252b 9398 /* VEX_W_0F28 */
9e30b8e0 9399 { "vmovapX", { XM, EXx } },
9e30b8e0
L
9400 },
9401 {
592a252b 9402 /* VEX_W_0F29 */
9e30b8e0 9403 { "vmovapX", { EXxS, XM } },
9e30b8e0
L
9404 },
9405 {
592a252b 9406 /* VEX_W_0F2B_M_0 */
9e30b8e0 9407 { "vmovntpX", { Mx, XM } },
9e30b8e0
L
9408 },
9409 {
592a252b 9410 /* VEX_W_0F2E_P_0 */
539f890d 9411 { "vucomiss", { XMScalar, EXdScalar } },
9e30b8e0
L
9412 },
9413 {
592a252b 9414 /* VEX_W_0F2E_P_2 */
539f890d 9415 { "vucomisd", { XMScalar, EXqScalar } },
9e30b8e0
L
9416 },
9417 {
592a252b 9418 /* VEX_W_0F2F_P_0 */
539f890d 9419 { "vcomiss", { XMScalar, EXdScalar } },
9e30b8e0
L
9420 },
9421 {
592a252b 9422 /* VEX_W_0F2F_P_2 */
539f890d 9423 { "vcomisd", { XMScalar, EXqScalar } },
9e30b8e0
L
9424 },
9425 {
592a252b 9426 /* VEX_W_0F50_M_0 */
9e30b8e0 9427 { "vmovmskpX", { Gdq, XS } },
9e30b8e0
L
9428 },
9429 {
592a252b 9430 /* VEX_W_0F51_P_0 */
9e30b8e0 9431 { "vsqrtps", { XM, EXx } },
9e30b8e0
L
9432 },
9433 {
592a252b 9434 /* VEX_W_0F51_P_1 */
539f890d 9435 { "vsqrtss", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9436 },
9437 {
592a252b 9438 /* VEX_W_0F51_P_2 */
9e30b8e0 9439 { "vsqrtpd", { XM, EXx } },
9e30b8e0
L
9440 },
9441 {
592a252b 9442 /* VEX_W_0F51_P_3 */
539f890d 9443 { "vsqrtsd", { XMScalar, VexScalar, EXqScalar } },
9e30b8e0
L
9444 },
9445 {
592a252b 9446 /* VEX_W_0F52_P_0 */
9e30b8e0 9447 { "vrsqrtps", { XM, EXx } },
9e30b8e0
L
9448 },
9449 {
592a252b 9450 /* VEX_W_0F52_P_1 */
539f890d 9451 { "vrsqrtss", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9452 },
9453 {
592a252b 9454 /* VEX_W_0F53_P_0 */
9e30b8e0 9455 { "vrcpps", { XM, EXx } },
9e30b8e0
L
9456 },
9457 {
592a252b 9458 /* VEX_W_0F53_P_1 */
539f890d 9459 { "vrcpss", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9460 },
9461 {
592a252b 9462 /* VEX_W_0F58_P_0 */
9e30b8e0 9463 { "vaddps", { XM, Vex, EXx } },
9e30b8e0
L
9464 },
9465 {
592a252b 9466 /* VEX_W_0F58_P_1 */
539f890d 9467 { "vaddss", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9468 },
9469 {
592a252b 9470 /* VEX_W_0F58_P_2 */
9e30b8e0 9471 { "vaddpd", { XM, Vex, EXx } },
9e30b8e0
L
9472 },
9473 {
592a252b 9474 /* VEX_W_0F58_P_3 */
539f890d 9475 { "vaddsd", { XMScalar, VexScalar, EXqScalar } },
9e30b8e0
L
9476 },
9477 {
592a252b 9478 /* VEX_W_0F59_P_0 */
9e30b8e0 9479 { "vmulps", { XM, Vex, EXx } },
9e30b8e0
L
9480 },
9481 {
592a252b 9482 /* VEX_W_0F59_P_1 */
539f890d 9483 { "vmulss", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9484 },
9485 {
592a252b 9486 /* VEX_W_0F59_P_2 */
9e30b8e0 9487 { "vmulpd", { XM, Vex, EXx } },
9e30b8e0
L
9488 },
9489 {
592a252b 9490 /* VEX_W_0F59_P_3 */
539f890d 9491 { "vmulsd", { XMScalar, VexScalar, EXqScalar } },
9e30b8e0
L
9492 },
9493 {
592a252b 9494 /* VEX_W_0F5A_P_0 */
9e30b8e0 9495 { "vcvtps2pd", { XM, EXxmmq } },
9e30b8e0
L
9496 },
9497 {
592a252b 9498 /* VEX_W_0F5A_P_1 */
539f890d 9499 { "vcvtss2sd", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9500 },
9501 {
592a252b 9502 /* VEX_W_0F5A_P_3 */
539f890d 9503 { "vcvtsd2ss", { XMScalar, VexScalar, EXqScalar } },
9e30b8e0
L
9504 },
9505 {
592a252b 9506 /* VEX_W_0F5B_P_0 */
9e30b8e0 9507 { "vcvtdq2ps", { XM, EXx } },
9e30b8e0
L
9508 },
9509 {
592a252b 9510 /* VEX_W_0F5B_P_1 */
9e30b8e0 9511 { "vcvttps2dq", { XM, EXx } },
9e30b8e0
L
9512 },
9513 {
592a252b 9514 /* VEX_W_0F5B_P_2 */
9e30b8e0 9515 { "vcvtps2dq", { XM, EXx } },
9e30b8e0
L
9516 },
9517 {
592a252b 9518 /* VEX_W_0F5C_P_0 */
9e30b8e0 9519 { "vsubps", { XM, Vex, EXx } },
9e30b8e0
L
9520 },
9521 {
592a252b 9522 /* VEX_W_0F5C_P_1 */
539f890d 9523 { "vsubss", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9524 },
9525 {
592a252b 9526 /* VEX_W_0F5C_P_2 */
9e30b8e0 9527 { "vsubpd", { XM, Vex, EXx } },
9e30b8e0
L
9528 },
9529 {
592a252b 9530 /* VEX_W_0F5C_P_3 */
539f890d 9531 { "vsubsd", { XMScalar, VexScalar, EXqScalar } },
9e30b8e0
L
9532 },
9533 {
592a252b 9534 /* VEX_W_0F5D_P_0 */
9e30b8e0 9535 { "vminps", { XM, Vex, EXx } },
9e30b8e0
L
9536 },
9537 {
592a252b 9538 /* VEX_W_0F5D_P_1 */
539f890d 9539 { "vminss", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9540 },
9541 {
592a252b 9542 /* VEX_W_0F5D_P_2 */
9e30b8e0 9543 { "vminpd", { XM, Vex, EXx } },
9e30b8e0
L
9544 },
9545 {
592a252b 9546 /* VEX_W_0F5D_P_3 */
539f890d 9547 { "vminsd", { XMScalar, VexScalar, EXqScalar } },
9e30b8e0
L
9548 },
9549 {
592a252b 9550 /* VEX_W_0F5E_P_0 */
9e30b8e0 9551 { "vdivps", { XM, Vex, EXx } },
9e30b8e0
L
9552 },
9553 {
592a252b 9554 /* VEX_W_0F5E_P_1 */
539f890d 9555 { "vdivss", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9556 },
9557 {
592a252b 9558 /* VEX_W_0F5E_P_2 */
9e30b8e0 9559 { "vdivpd", { XM, Vex, EXx } },
9e30b8e0
L
9560 },
9561 {
592a252b 9562 /* VEX_W_0F5E_P_3 */
539f890d 9563 { "vdivsd", { XMScalar, VexScalar, EXqScalar } },
9e30b8e0
L
9564 },
9565 {
592a252b 9566 /* VEX_W_0F5F_P_0 */
9e30b8e0 9567 { "vmaxps", { XM, Vex, EXx } },
9e30b8e0
L
9568 },
9569 {
592a252b 9570 /* VEX_W_0F5F_P_1 */
539f890d 9571 { "vmaxss", { XMScalar, VexScalar, EXdScalar } },
9e30b8e0
L
9572 },
9573 {
592a252b 9574 /* VEX_W_0F5F_P_2 */
9e30b8e0 9575 { "vmaxpd", { XM, Vex, EXx } },
9e30b8e0
L
9576 },
9577 {
592a252b 9578 /* VEX_W_0F5F_P_3 */
539f890d 9579 { "vmaxsd", { XMScalar, VexScalar, EXqScalar } },
9e30b8e0
L
9580 },
9581 {
592a252b 9582 /* VEX_W_0F60_P_2 */
9e30b8e0 9583 { "vpunpcklbw", { XM, Vex128, EXx } },
9e30b8e0
L
9584 },
9585 {
592a252b 9586 /* VEX_W_0F61_P_2 */
9e30b8e0 9587 { "vpunpcklwd", { XM, Vex128, EXx } },
9e30b8e0
L
9588 },
9589 {
592a252b 9590 /* VEX_W_0F62_P_2 */
9e30b8e0 9591 { "vpunpckldq", { XM, Vex128, EXx } },
9e30b8e0
L
9592 },
9593 {
592a252b 9594 /* VEX_W_0F63_P_2 */
9e30b8e0 9595 { "vpacksswb", { XM, Vex128, EXx } },
9e30b8e0
L
9596 },
9597 {
592a252b 9598 /* VEX_W_0F64_P_2 */
9e30b8e0 9599 { "vpcmpgtb", { XM, Vex128, EXx } },
9e30b8e0
L
9600 },
9601 {
592a252b 9602 /* VEX_W_0F65_P_2 */
9e30b8e0 9603 { "vpcmpgtw", { XM, Vex128, EXx } },
9e30b8e0
L
9604 },
9605 {
592a252b 9606 /* VEX_W_0F66_P_2 */
9e30b8e0 9607 { "vpcmpgtd", { XM, Vex128, EXx } },
9e30b8e0
L
9608 },
9609 {
592a252b 9610 /* VEX_W_0F67_P_2 */
9e30b8e0 9611 { "vpackuswb", { XM, Vex128, EXx } },
9e30b8e0
L
9612 },
9613 {
592a252b 9614 /* VEX_W_0F68_P_2 */
9e30b8e0 9615 { "vpunpckhbw", { XM, Vex128, EXx } },
9e30b8e0
L
9616 },
9617 {
592a252b 9618 /* VEX_W_0F69_P_2 */
9e30b8e0 9619 { "vpunpckhwd", { XM, Vex128, EXx } },
9e30b8e0
L
9620 },
9621 {
592a252b 9622 /* VEX_W_0F6A_P_2 */
9e30b8e0 9623 { "vpunpckhdq", { XM, Vex128, EXx } },
9e30b8e0
L
9624 },
9625 {
592a252b 9626 /* VEX_W_0F6B_P_2 */
9e30b8e0 9627 { "vpackssdw", { XM, Vex128, EXx } },
9e30b8e0
L
9628 },
9629 {
592a252b 9630 /* VEX_W_0F6C_P_2 */
9e30b8e0 9631 { "vpunpcklqdq", { XM, Vex128, EXx } },
9e30b8e0
L
9632 },
9633 {
592a252b 9634 /* VEX_W_0F6D_P_2 */
9e30b8e0 9635 { "vpunpckhqdq", { XM, Vex128, EXx } },
9e30b8e0
L
9636 },
9637 {
592a252b 9638 /* VEX_W_0F6F_P_1 */
efdb52b7 9639 { "vmovdqu", { XM, EXx } },
9e30b8e0
L
9640 },
9641 {
592a252b 9642 /* VEX_W_0F6F_P_2 */
efdb52b7 9643 { "vmovdqa", { XM, EXx } },
9e30b8e0
L
9644 },
9645 {
592a252b 9646 /* VEX_W_0F70_P_1 */
9e30b8e0 9647 { "vpshufhw", { XM, EXx, Ib } },
9e30b8e0
L
9648 },
9649 {
592a252b 9650 /* VEX_W_0F70_P_2 */
9e30b8e0 9651 { "vpshufd", { XM, EXx, Ib } },
9e30b8e0
L
9652 },
9653 {
592a252b 9654 /* VEX_W_0F70_P_3 */
9e30b8e0 9655 { "vpshuflw", { XM, EXx, Ib } },
9e30b8e0
L
9656 },
9657 {
592a252b 9658 /* VEX_W_0F71_R_2_P_2 */
9e30b8e0 9659 { "vpsrlw", { Vex128, XS, Ib } },
9e30b8e0
L
9660 },
9661 {
592a252b 9662 /* VEX_W_0F71_R_4_P_2 */
9e30b8e0 9663 { "vpsraw", { Vex128, XS, Ib } },
9e30b8e0
L
9664 },
9665 {
592a252b 9666 /* VEX_W_0F71_R_6_P_2 */
9e30b8e0 9667 { "vpsllw", { Vex128, XS, Ib } },
9e30b8e0
L
9668 },
9669 {
592a252b 9670 /* VEX_W_0F72_R_2_P_2 */
9e30b8e0 9671 { "vpsrld", { Vex128, XS, Ib } },
9e30b8e0
L
9672 },
9673 {
592a252b 9674 /* VEX_W_0F72_R_4_P_2 */
9e30b8e0 9675 { "vpsrad", { Vex128, XS, Ib } },
9e30b8e0
L
9676 },
9677 {
592a252b 9678 /* VEX_W_0F72_R_6_P_2 */
9e30b8e0 9679 { "vpslld", { Vex128, XS, Ib } },
9e30b8e0
L
9680 },
9681 {
592a252b 9682 /* VEX_W_0F73_R_2_P_2 */
9e30b8e0 9683 { "vpsrlq", { Vex128, XS, Ib } },
9e30b8e0
L
9684 },
9685 {
592a252b 9686 /* VEX_W_0F73_R_3_P_2 */
9e30b8e0 9687 { "vpsrldq", { Vex128, XS, Ib } },
9e30b8e0
L
9688 },
9689 {
592a252b 9690 /* VEX_W_0F73_R_6_P_2 */
9e30b8e0 9691 { "vpsllq", { Vex128, XS, Ib } },
9e30b8e0
L
9692 },
9693 {
592a252b 9694 /* VEX_W_0F73_R_7_P_2 */
9e30b8e0 9695 { "vpslldq", { Vex128, XS, Ib } },
9e30b8e0
L
9696 },
9697 {
592a252b 9698 /* VEX_W_0F74_P_2 */
9e30b8e0 9699 { "vpcmpeqb", { XM, Vex128, EXx } },
9e30b8e0
L
9700 },
9701 {
592a252b 9702 /* VEX_W_0F75_P_2 */
9e30b8e0 9703 { "vpcmpeqw", { XM, Vex128, EXx } },
9e30b8e0
L
9704 },
9705 {
592a252b 9706 /* VEX_W_0F76_P_2 */
9e30b8e0 9707 { "vpcmpeqd", { XM, Vex128, EXx } },
9e30b8e0
L
9708 },
9709 {
592a252b 9710 /* VEX_W_0F77_P_0 */
9e30b8e0 9711 { "", { VZERO } },
9e30b8e0
L
9712 },
9713 {
592a252b 9714 /* VEX_W_0F7C_P_2 */
9e30b8e0 9715 { "vhaddpd", { XM, Vex, EXx } },
9e30b8e0
L
9716 },
9717 {
592a252b 9718 /* VEX_W_0F7C_P_3 */
9e30b8e0 9719 { "vhaddps", { XM, Vex, EXx } },
9e30b8e0
L
9720 },
9721 {
592a252b 9722 /* VEX_W_0F7D_P_2 */
9e30b8e0 9723 { "vhsubpd", { XM, Vex, EXx } },
9e30b8e0
L
9724 },
9725 {
592a252b 9726 /* VEX_W_0F7D_P_3 */
9e30b8e0 9727 { "vhsubps", { XM, Vex, EXx } },
9e30b8e0
L
9728 },
9729 {
592a252b 9730 /* VEX_W_0F7E_P_1 */
539f890d 9731 { "vmovq", { XMScalar, EXqScalar } },
9e30b8e0
L
9732 },
9733 {
592a252b 9734 /* VEX_W_0F7F_P_1 */
9e30b8e0 9735 { "vmovdqu", { EXxS, XM } },
9e30b8e0
L
9736 },
9737 {
592a252b 9738 /* VEX_W_0F7F_P_2 */
9e30b8e0 9739 { "vmovdqa", { EXxS, XM } },
9e30b8e0
L
9740 },
9741 {
592a252b 9742 /* VEX_W_0FAE_R_2_M_0 */
9e30b8e0 9743 { "vldmxcsr", { Md } },
9e30b8e0
L
9744 },
9745 {
592a252b 9746 /* VEX_W_0FAE_R_3_M_0 */
9e30b8e0 9747 { "vstmxcsr", { Md } },
9e30b8e0
L
9748 },
9749 {
592a252b 9750 /* VEX_W_0FC2_P_0 */
9e30b8e0 9751 { "vcmpps", { XM, Vex, EXx, VCMP } },
9e30b8e0
L
9752 },
9753 {
592a252b 9754 /* VEX_W_0FC2_P_1 */
539f890d 9755 { "vcmpss", { XMScalar, VexScalar, EXdScalar, VCMP } },
9e30b8e0
L
9756 },
9757 {
592a252b 9758 /* VEX_W_0FC2_P_2 */
9e30b8e0 9759 { "vcmppd", { XM, Vex, EXx, VCMP } },
9e30b8e0
L
9760 },
9761 {
592a252b 9762 /* VEX_W_0FC2_P_3 */
539f890d 9763 { "vcmpsd", { XMScalar, VexScalar, EXqScalar, VCMP } },
9e30b8e0
L
9764 },
9765 {
592a252b 9766 /* VEX_W_0FC4_P_2 */
9e30b8e0 9767 { "vpinsrw", { XM, Vex128, Edqw, Ib } },
9e30b8e0
L
9768 },
9769 {
592a252b 9770 /* VEX_W_0FC5_P_2 */
9e30b8e0 9771 { "vpextrw", { Gdq, XS, Ib } },
9e30b8e0
L
9772 },
9773 {
592a252b 9774 /* VEX_W_0FD0_P_2 */
9e30b8e0 9775 { "vaddsubpd", { XM, Vex, EXx } },
9e30b8e0
L
9776 },
9777 {
592a252b 9778 /* VEX_W_0FD0_P_3 */
9e30b8e0 9779 { "vaddsubps", { XM, Vex, EXx } },
9e30b8e0
L
9780 },
9781 {
592a252b 9782 /* VEX_W_0FD1_P_2 */
9e30b8e0 9783 { "vpsrlw", { XM, Vex128, EXx } },
9e30b8e0
L
9784 },
9785 {
592a252b 9786 /* VEX_W_0FD2_P_2 */
9e30b8e0 9787 { "vpsrld", { XM, Vex128, EXx } },
9e30b8e0
L
9788 },
9789 {
592a252b 9790 /* VEX_W_0FD3_P_2 */
9e30b8e0 9791 { "vpsrlq", { XM, Vex128, EXx } },
9e30b8e0
L
9792 },
9793 {
592a252b 9794 /* VEX_W_0FD4_P_2 */
9e30b8e0 9795 { "vpaddq", { XM, Vex128, EXx } },
9e30b8e0
L
9796 },
9797 {
592a252b 9798 /* VEX_W_0FD5_P_2 */
9e30b8e0 9799 { "vpmullw", { XM, Vex128, EXx } },
9e30b8e0
L
9800 },
9801 {
592a252b 9802 /* VEX_W_0FD6_P_2 */
539f890d 9803 { "vmovq", { EXqScalarS, XMScalar } },
9e30b8e0
L
9804 },
9805 {
592a252b 9806 /* VEX_W_0FD7_P_2_M_1 */
9e30b8e0 9807 { "vpmovmskb", { Gdq, XS } },
9e30b8e0
L
9808 },
9809 {
592a252b 9810 /* VEX_W_0FD8_P_2 */
9e30b8e0 9811 { "vpsubusb", { XM, Vex128, EXx } },
9e30b8e0
L
9812 },
9813 {
592a252b 9814 /* VEX_W_0FD9_P_2 */
9e30b8e0 9815 { "vpsubusw", { XM, Vex128, EXx } },
9e30b8e0
L
9816 },
9817 {
592a252b 9818 /* VEX_W_0FDA_P_2 */
9e30b8e0 9819 { "vpminub", { XM, Vex128, EXx } },
9e30b8e0
L
9820 },
9821 {
592a252b 9822 /* VEX_W_0FDB_P_2 */
9e30b8e0 9823 { "vpand", { XM, Vex128, EXx } },
9e30b8e0
L
9824 },
9825 {
592a252b 9826 /* VEX_W_0FDC_P_2 */
9e30b8e0 9827 { "vpaddusb", { XM, Vex128, EXx } },
9e30b8e0
L
9828 },
9829 {
592a252b 9830 /* VEX_W_0FDD_P_2 */
9e30b8e0 9831 { "vpaddusw", { XM, Vex128, EXx } },
9e30b8e0
L
9832 },
9833 {
592a252b 9834 /* VEX_W_0FDE_P_2 */
9e30b8e0 9835 { "vpmaxub", { XM, Vex128, EXx } },
9e30b8e0
L
9836 },
9837 {
592a252b 9838 /* VEX_W_0FDF_P_2 */
9e30b8e0 9839 { "vpandn", { XM, Vex128, EXx } },
9e30b8e0
L
9840 },
9841 {
592a252b 9842 /* VEX_W_0FE0_P_2 */
9e30b8e0 9843 { "vpavgb", { XM, Vex128, EXx } },
9e30b8e0
L
9844 },
9845 {
592a252b 9846 /* VEX_W_0FE1_P_2 */
9e30b8e0 9847 { "vpsraw", { XM, Vex128, EXx } },
9e30b8e0
L
9848 },
9849 {
592a252b 9850 /* VEX_W_0FE2_P_2 */
9e30b8e0 9851 { "vpsrad", { XM, Vex128, EXx } },
9e30b8e0
L
9852 },
9853 {
592a252b 9854 /* VEX_W_0FE3_P_2 */
9e30b8e0 9855 { "vpavgw", { XM, Vex128, EXx } },
9e30b8e0
L
9856 },
9857 {
592a252b 9858 /* VEX_W_0FE4_P_2 */
9e30b8e0 9859 { "vpmulhuw", { XM, Vex128, EXx } },
9e30b8e0
L
9860 },
9861 {
592a252b 9862 /* VEX_W_0FE5_P_2 */
9e30b8e0 9863 { "vpmulhw", { XM, Vex128, EXx } },
9e30b8e0
L
9864 },
9865 {
592a252b 9866 /* VEX_W_0FE6_P_1 */
efdb52b7 9867 { "vcvtdq2pd", { XM, EXxmmq } },
9e30b8e0
L
9868 },
9869 {
592a252b 9870 /* VEX_W_0FE6_P_2 */
a179a9fd 9871 { "vcvttpd2dq%XY", { XMM, EXx } },
9e30b8e0
L
9872 },
9873 {
592a252b 9874 /* VEX_W_0FE6_P_3 */
a179a9fd 9875 { "vcvtpd2dq%XY", { XMM, EXx } },
9e30b8e0
L
9876 },
9877 {
592a252b 9878 /* VEX_W_0FE7_P_2_M_0 */
9e30b8e0 9879 { "vmovntdq", { Mx, XM } },
9e30b8e0
L
9880 },
9881 {
592a252b 9882 /* VEX_W_0FE8_P_2 */
9e30b8e0 9883 { "vpsubsb", { XM, Vex128, EXx } },
9e30b8e0
L
9884 },
9885 {
592a252b 9886 /* VEX_W_0FE9_P_2 */
9e30b8e0 9887 { "vpsubsw", { XM, Vex128, EXx } },
9e30b8e0
L
9888 },
9889 {
592a252b 9890 /* VEX_W_0FEA_P_2 */
9e30b8e0 9891 { "vpminsw", { XM, Vex128, EXx } },
9e30b8e0
L
9892 },
9893 {
592a252b 9894 /* VEX_W_0FEB_P_2 */
9e30b8e0 9895 { "vpor", { XM, Vex128, EXx } },
9e30b8e0
L
9896 },
9897 {
592a252b 9898 /* VEX_W_0FEC_P_2 */
9e30b8e0 9899 { "vpaddsb", { XM, Vex128, EXx } },
9e30b8e0
L
9900 },
9901 {
592a252b 9902 /* VEX_W_0FED_P_2 */
9e30b8e0 9903 { "vpaddsw", { XM, Vex128, EXx } },
9e30b8e0
L
9904 },
9905 {
592a252b 9906 /* VEX_W_0FEE_P_2 */
9e30b8e0 9907 { "vpmaxsw", { XM, Vex128, EXx } },
9e30b8e0
L
9908 },
9909 {
592a252b 9910 /* VEX_W_0FEF_P_2 */
9e30b8e0 9911 { "vpxor", { XM, Vex128, EXx } },
9e30b8e0
L
9912 },
9913 {
592a252b 9914 /* VEX_W_0FF0_P_3_M_0 */
9e30b8e0 9915 { "vlddqu", { XM, M } },
9e30b8e0
L
9916 },
9917 {
592a252b 9918 /* VEX_W_0FF1_P_2 */
9e30b8e0 9919 { "vpsllw", { XM, Vex128, EXx } },
9e30b8e0
L
9920 },
9921 {
592a252b 9922 /* VEX_W_0FF2_P_2 */
9e30b8e0 9923 { "vpslld", { XM, Vex128, EXx } },
9e30b8e0
L
9924 },
9925 {
592a252b 9926 /* VEX_W_0FF3_P_2 */
9e30b8e0 9927 { "vpsllq", { XM, Vex128, EXx } },
9e30b8e0
L
9928 },
9929 {
592a252b 9930 /* VEX_W_0FF4_P_2 */
9e30b8e0 9931 { "vpmuludq", { XM, Vex128, EXx } },
9e30b8e0
L
9932 },
9933 {
592a252b 9934 /* VEX_W_0FF5_P_2 */
9e30b8e0 9935 { "vpmaddwd", { XM, Vex128, EXx } },
9e30b8e0
L
9936 },
9937 {
592a252b 9938 /* VEX_W_0FF6_P_2 */
9e30b8e0 9939 { "vpsadbw", { XM, Vex128, EXx } },
9e30b8e0
L
9940 },
9941 {
592a252b 9942 /* VEX_W_0FF7_P_2 */
9e30b8e0 9943 { "vmaskmovdqu", { XM, XS } },
9e30b8e0
L
9944 },
9945 {
592a252b 9946 /* VEX_W_0FF8_P_2 */
9e30b8e0 9947 { "vpsubb", { XM, Vex128, EXx } },
9e30b8e0
L
9948 },
9949 {
592a252b 9950 /* VEX_W_0FF9_P_2 */
9e30b8e0 9951 { "vpsubw", { XM, Vex128, EXx } },
9e30b8e0
L
9952 },
9953 {
592a252b 9954 /* VEX_W_0FFA_P_2 */
9e30b8e0 9955 { "vpsubd", { XM, Vex128, EXx } },
9e30b8e0
L
9956 },
9957 {
592a252b 9958 /* VEX_W_0FFB_P_2 */
9e30b8e0 9959 { "vpsubq", { XM, Vex128, EXx } },
9e30b8e0
L
9960 },
9961 {
592a252b 9962 /* VEX_W_0FFC_P_2 */
9e30b8e0 9963 { "vpaddb", { XM, Vex128, EXx } },
9e30b8e0
L
9964 },
9965 {
592a252b 9966 /* VEX_W_0FFD_P_2 */
9e30b8e0 9967 { "vpaddw", { XM, Vex128, EXx } },
9e30b8e0
L
9968 },
9969 {
592a252b 9970 /* VEX_W_0FFE_P_2 */
9e30b8e0 9971 { "vpaddd", { XM, Vex128, EXx } },
9e30b8e0
L
9972 },
9973 {
592a252b 9974 /* VEX_W_0F3800_P_2 */
9e30b8e0 9975 { "vpshufb", { XM, Vex128, EXx } },
9e30b8e0
L
9976 },
9977 {
592a252b 9978 /* VEX_W_0F3801_P_2 */
9e30b8e0 9979 { "vphaddw", { XM, Vex128, EXx } },
9e30b8e0
L
9980 },
9981 {
592a252b 9982 /* VEX_W_0F3802_P_2 */
9e30b8e0 9983 { "vphaddd", { XM, Vex128, EXx } },
9e30b8e0
L
9984 },
9985 {
592a252b 9986 /* VEX_W_0F3803_P_2 */
9e30b8e0 9987 { "vphaddsw", { XM, Vex128, EXx } },
9e30b8e0
L
9988 },
9989 {
592a252b 9990 /* VEX_W_0F3804_P_2 */
9e30b8e0 9991 { "vpmaddubsw", { XM, Vex128, EXx } },
9e30b8e0
L
9992 },
9993 {
592a252b 9994 /* VEX_W_0F3805_P_2 */
9e30b8e0 9995 { "vphsubw", { XM, Vex128, EXx } },
9e30b8e0
L
9996 },
9997 {
592a252b 9998 /* VEX_W_0F3806_P_2 */
9e30b8e0 9999 { "vphsubd", { XM, Vex128, EXx } },
9e30b8e0
L
10000 },
10001 {
592a252b 10002 /* VEX_W_0F3807_P_2 */
9e30b8e0 10003 { "vphsubsw", { XM, Vex128, EXx } },
9e30b8e0
L
10004 },
10005 {
592a252b 10006 /* VEX_W_0F3808_P_2 */
9e30b8e0 10007 { "vpsignb", { XM, Vex128, EXx } },
9e30b8e0
L
10008 },
10009 {
592a252b 10010 /* VEX_W_0F3809_P_2 */
9e30b8e0 10011 { "vpsignw", { XM, Vex128, EXx } },
9e30b8e0
L
10012 },
10013 {
592a252b 10014 /* VEX_W_0F380A_P_2 */
9e30b8e0 10015 { "vpsignd", { XM, Vex128, EXx } },
9e30b8e0
L
10016 },
10017 {
592a252b 10018 /* VEX_W_0F380B_P_2 */
9e30b8e0 10019 { "vpmulhrsw", { XM, Vex128, EXx } },
9e30b8e0
L
10020 },
10021 {
592a252b 10022 /* VEX_W_0F380C_P_2 */
9e30b8e0 10023 { "vpermilps", { XM, Vex, EXx } },
9e30b8e0
L
10024 },
10025 {
592a252b 10026 /* VEX_W_0F380D_P_2 */
9e30b8e0 10027 { "vpermilpd", { XM, Vex, EXx } },
9e30b8e0
L
10028 },
10029 {
592a252b 10030 /* VEX_W_0F380E_P_2 */
9e30b8e0 10031 { "vtestps", { XM, EXx } },
9e30b8e0
L
10032 },
10033 {
592a252b 10034 /* VEX_W_0F380F_P_2 */
9e30b8e0 10035 { "vtestpd", { XM, EXx } },
9e30b8e0
L
10036 },
10037 {
592a252b 10038 /* VEX_W_0F3817_P_2 */
9e30b8e0 10039 { "vptest", { XM, EXx } },
9e30b8e0 10040 },
bcf2684f 10041 {
592a252b 10042 /* VEX_W_0F3818_P_2_M_0 */
bcf2684f 10043 { "vbroadcastss", { XM, Md } },
bcf2684f 10044 },
9e30b8e0 10045 {
592a252b 10046 /* VEX_W_0F3819_P_2_M_0 */
9e30b8e0 10047 { "vbroadcastsd", { XM, Mq } },
9e30b8e0
L
10048 },
10049 {
592a252b 10050 /* VEX_W_0F381A_P_2_M_0 */
9e30b8e0 10051 { "vbroadcastf128", { XM, Mxmm } },
9e30b8e0
L
10052 },
10053 {
592a252b 10054 /* VEX_W_0F381C_P_2 */
9e30b8e0 10055 { "vpabsb", { XM, EXx } },
9e30b8e0
L
10056 },
10057 {
592a252b 10058 /* VEX_W_0F381D_P_2 */
9e30b8e0 10059 { "vpabsw", { XM, EXx } },
9e30b8e0
L
10060 },
10061 {
592a252b 10062 /* VEX_W_0F381E_P_2 */
9e30b8e0 10063 { "vpabsd", { XM, EXx } },
9e30b8e0
L
10064 },
10065 {
592a252b 10066 /* VEX_W_0F3820_P_2 */
9e30b8e0 10067 { "vpmovsxbw", { XM, EXq } },
9e30b8e0
L
10068 },
10069 {
592a252b 10070 /* VEX_W_0F3821_P_2 */
9e30b8e0 10071 { "vpmovsxbd", { XM, EXd } },
9e30b8e0
L
10072 },
10073 {
592a252b 10074 /* VEX_W_0F3822_P_2 */
9e30b8e0 10075 { "vpmovsxbq", { XM, EXw } },
9e30b8e0
L
10076 },
10077 {
592a252b 10078 /* VEX_W_0F3823_P_2 */
9e30b8e0 10079 { "vpmovsxwd", { XM, EXq } },
9e30b8e0
L
10080 },
10081 {
592a252b 10082 /* VEX_W_0F3824_P_2 */
9e30b8e0 10083 { "vpmovsxwq", { XM, EXd } },
9e30b8e0
L
10084 },
10085 {
592a252b 10086 /* VEX_W_0F3825_P_2 */
9e30b8e0 10087 { "vpmovsxdq", { XM, EXq } },
9e30b8e0
L
10088 },
10089 {
592a252b 10090 /* VEX_W_0F3828_P_2 */
9e30b8e0 10091 { "vpmuldq", { XM, Vex128, EXx } },
9e30b8e0
L
10092 },
10093 {
592a252b 10094 /* VEX_W_0F3829_P_2 */
9e30b8e0 10095 { "vpcmpeqq", { XM, Vex128, EXx } },
9e30b8e0
L
10096 },
10097 {
592a252b 10098 /* VEX_W_0F382A_P_2_M_0 */
9e30b8e0 10099 { "vmovntdqa", { XM, Mx } },
9e30b8e0
L
10100 },
10101 {
592a252b 10102 /* VEX_W_0F382B_P_2 */
9e30b8e0 10103 { "vpackusdw", { XM, Vex128, EXx } },
9e30b8e0 10104 },
53aa04a0 10105 {
592a252b 10106 /* VEX_W_0F382C_P_2_M_0 */
53aa04a0 10107 { "vmaskmovps", { XM, Vex, Mx } },
53aa04a0
L
10108 },
10109 {
592a252b 10110 /* VEX_W_0F382D_P_2_M_0 */
53aa04a0 10111 { "vmaskmovpd", { XM, Vex, Mx } },
53aa04a0
L
10112 },
10113 {
592a252b 10114 /* VEX_W_0F382E_P_2_M_0 */
53aa04a0 10115 { "vmaskmovps", { Mx, Vex, XM } },
53aa04a0
L
10116 },
10117 {
592a252b 10118 /* VEX_W_0F382F_P_2_M_0 */
53aa04a0 10119 { "vmaskmovpd", { Mx, Vex, XM } },
53aa04a0 10120 },
9e30b8e0 10121 {
592a252b 10122 /* VEX_W_0F3830_P_2 */
9e30b8e0 10123 { "vpmovzxbw", { XM, EXq } },
9e30b8e0
L
10124 },
10125 {
592a252b 10126 /* VEX_W_0F3831_P_2 */
9e30b8e0 10127 { "vpmovzxbd", { XM, EXd } },
9e30b8e0
L
10128 },
10129 {
592a252b 10130 /* VEX_W_0F3832_P_2 */
9e30b8e0 10131 { "vpmovzxbq", { XM, EXw } },
9e30b8e0
L
10132 },
10133 {
592a252b 10134 /* VEX_W_0F3833_P_2 */
9e30b8e0 10135 { "vpmovzxwd", { XM, EXq } },
9e30b8e0
L
10136 },
10137 {
592a252b 10138 /* VEX_W_0F3834_P_2 */
9e30b8e0 10139 { "vpmovzxwq", { XM, EXd } },
9e30b8e0
L
10140 },
10141 {
592a252b 10142 /* VEX_W_0F3835_P_2 */
9e30b8e0 10143 { "vpmovzxdq", { XM, EXq } },
9e30b8e0
L
10144 },
10145 {
592a252b 10146 /* VEX_W_0F3837_P_2 */
9e30b8e0 10147 { "vpcmpgtq", { XM, Vex128, EXx } },
9e30b8e0
L
10148 },
10149 {
592a252b 10150 /* VEX_W_0F3838_P_2 */
9e30b8e0 10151 { "vpminsb", { XM, Vex128, EXx } },
9e30b8e0
L
10152 },
10153 {
592a252b 10154 /* VEX_W_0F3839_P_2 */
9e30b8e0 10155 { "vpminsd", { XM, Vex128, EXx } },
9e30b8e0
L
10156 },
10157 {
592a252b 10158 /* VEX_W_0F383A_P_2 */
9e30b8e0 10159 { "vpminuw", { XM, Vex128, EXx } },
9e30b8e0
L
10160 },
10161 {
592a252b 10162 /* VEX_W_0F383B_P_2 */
9e30b8e0 10163 { "vpminud", { XM, Vex128, EXx } },
9e30b8e0
L
10164 },
10165 {
592a252b 10166 /* VEX_W_0F383C_P_2 */
9e30b8e0 10167 { "vpmaxsb", { XM, Vex128, EXx } },
9e30b8e0
L
10168 },
10169 {
592a252b 10170 /* VEX_W_0F383D_P_2 */
9e30b8e0 10171 { "vpmaxsd", { XM, Vex128, EXx } },
9e30b8e0
L
10172 },
10173 {
592a252b 10174 /* VEX_W_0F383E_P_2 */
9e30b8e0 10175 { "vpmaxuw", { XM, Vex128, EXx } },
9e30b8e0
L
10176 },
10177 {
592a252b 10178 /* VEX_W_0F383F_P_2 */
9e30b8e0 10179 { "vpmaxud", { XM, Vex128, EXx } },
9e30b8e0
L
10180 },
10181 {
592a252b 10182 /* VEX_W_0F3840_P_2 */
9e30b8e0 10183 { "vpmulld", { XM, Vex128, EXx } },
9e30b8e0
L
10184 },
10185 {
592a252b 10186 /* VEX_W_0F3841_P_2 */
9e30b8e0 10187 { "vphminposuw", { XM, EXx } },
9e30b8e0
L
10188 },
10189 {
592a252b 10190 /* VEX_W_0F38DB_P_2 */
9e30b8e0 10191 { "vaesimc", { XM, EXx } },
9e30b8e0
L
10192 },
10193 {
592a252b 10194 /* VEX_W_0F38DC_P_2 */
9e30b8e0 10195 { "vaesenc", { XM, Vex128, EXx } },
9e30b8e0
L
10196 },
10197 {
592a252b 10198 /* VEX_W_0F38DD_P_2 */
9e30b8e0 10199 { "vaesenclast", { XM, Vex128, EXx } },
9e30b8e0
L
10200 },
10201 {
592a252b 10202 /* VEX_W_0F38DE_P_2 */
9e30b8e0 10203 { "vaesdec", { XM, Vex128, EXx } },
9e30b8e0
L
10204 },
10205 {
592a252b 10206 /* VEX_W_0F38DF_P_2 */
9e30b8e0 10207 { "vaesdeclast", { XM, Vex128, EXx } },
9e30b8e0
L
10208 },
10209 {
592a252b 10210 /* VEX_W_0F3A04_P_2 */
9e30b8e0 10211 { "vpermilps", { XM, EXx, Ib } },
9e30b8e0
L
10212 },
10213 {
592a252b 10214 /* VEX_W_0F3A05_P_2 */
9e30b8e0 10215 { "vpermilpd", { XM, EXx, Ib } },
9e30b8e0
L
10216 },
10217 {
592a252b 10218 /* VEX_W_0F3A06_P_2 */
9e30b8e0 10219 { "vperm2f128", { XM, Vex256, EXx, Ib } },
9e30b8e0
L
10220 },
10221 {
592a252b 10222 /* VEX_W_0F3A08_P_2 */
9e30b8e0 10223 { "vroundps", { XM, EXx, Ib } },
9e30b8e0
L
10224 },
10225 {
592a252b 10226 /* VEX_W_0F3A09_P_2 */
9e30b8e0 10227 { "vroundpd", { XM, EXx, Ib } },
9e30b8e0
L
10228 },
10229 {
592a252b 10230 /* VEX_W_0F3A0A_P_2 */
539f890d 10231 { "vroundss", { XMScalar, VexScalar, EXdScalar, Ib } },
9e30b8e0
L
10232 },
10233 {
592a252b 10234 /* VEX_W_0F3A0B_P_2 */
539f890d 10235 { "vroundsd", { XMScalar, VexScalar, EXqScalar, Ib } },
9e30b8e0
L
10236 },
10237 {
592a252b 10238 /* VEX_W_0F3A0C_P_2 */
9e30b8e0 10239 { "vblendps", { XM, Vex, EXx, Ib } },
9e30b8e0
L
10240 },
10241 {
592a252b 10242 /* VEX_W_0F3A0D_P_2 */
9e30b8e0 10243 { "vblendpd", { XM, Vex, EXx, Ib } },
9e30b8e0
L
10244 },
10245 {
592a252b 10246 /* VEX_W_0F3A0E_P_2 */
9e30b8e0 10247 { "vpblendw", { XM, Vex128, EXx, Ib } },
9e30b8e0
L
10248 },
10249 {
592a252b 10250 /* VEX_W_0F3A0F_P_2 */
9e30b8e0 10251 { "vpalignr", { XM, Vex128, EXx, Ib } },
9e30b8e0
L
10252 },
10253 {
592a252b 10254 /* VEX_W_0F3A14_P_2 */
9e30b8e0 10255 { "vpextrb", { Edqb, XM, Ib } },
9e30b8e0
L
10256 },
10257 {
592a252b 10258 /* VEX_W_0F3A15_P_2 */
9e30b8e0 10259 { "vpextrw", { Edqw, XM, Ib } },
9e30b8e0
L
10260 },
10261 {
592a252b 10262 /* VEX_W_0F3A18_P_2 */
9e30b8e0 10263 { "vinsertf128", { XM, Vex256, EXxmm, Ib } },
9e30b8e0
L
10264 },
10265 {
592a252b 10266 /* VEX_W_0F3A19_P_2 */
9e30b8e0 10267 { "vextractf128", { EXxmm, XM, Ib } },
9e30b8e0
L
10268 },
10269 {
592a252b 10270 /* VEX_W_0F3A20_P_2 */
9e30b8e0 10271 { "vpinsrb", { XM, Vex128, Edqb, Ib } },
9e30b8e0
L
10272 },
10273 {
592a252b 10274 /* VEX_W_0F3A21_P_2 */
9e30b8e0 10275 { "vinsertps", { XM, Vex128, EXd, Ib } },
9e30b8e0
L
10276 },
10277 {
592a252b 10278 /* VEX_W_0F3A40_P_2 */
9e30b8e0 10279 { "vdpps", { XM, Vex, EXx, Ib } },
9e30b8e0
L
10280 },
10281 {
592a252b 10282 /* VEX_W_0F3A41_P_2 */
9e30b8e0 10283 { "vdppd", { XM, Vex128, EXx, Ib } },
9e30b8e0
L
10284 },
10285 {
592a252b 10286 /* VEX_W_0F3A42_P_2 */
9e30b8e0 10287 { "vmpsadbw", { XM, Vex128, EXx, Ib } },
9e30b8e0
L
10288 },
10289 {
592a252b 10290 /* VEX_W_0F3A44_P_2 */
9e30b8e0 10291 { "vpclmulqdq", { XM, Vex128, EXx, PCLMUL } },
9e30b8e0 10292 },
a683cc34 10293 {
592a252b 10294 /* VEX_W_0F3A48_P_2 */
a683cc34
SP
10295 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
10296 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
10297 },
10298 {
592a252b 10299 /* VEX_W_0F3A49_P_2 */
a683cc34
SP
10300 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
10301 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
10302 },
9e30b8e0 10303 {
592a252b 10304 /* VEX_W_0F3A4A_P_2 */
9e30b8e0 10305 { "vblendvps", { XM, Vex, EXx, XMVexI4 } },
9e30b8e0
L
10306 },
10307 {
592a252b 10308 /* VEX_W_0F3A4B_P_2 */
9e30b8e0 10309 { "vblendvpd", { XM, Vex, EXx, XMVexI4 } },
9e30b8e0
L
10310 },
10311 {
592a252b 10312 /* VEX_W_0F3A4C_P_2 */
9e30b8e0 10313 { "vpblendvb", { XM, Vex128, EXx, XMVexI4 } },
9e30b8e0
L
10314 },
10315 {
592a252b 10316 /* VEX_W_0F3A60_P_2 */
9e30b8e0 10317 { "vpcmpestrm", { XM, EXx, Ib } },
9e30b8e0
L
10318 },
10319 {
592a252b 10320 /* VEX_W_0F3A61_P_2 */
9e30b8e0 10321 { "vpcmpestri", { XM, EXx, Ib } },
9e30b8e0
L
10322 },
10323 {
592a252b 10324 /* VEX_W_0F3A62_P_2 */
9e30b8e0 10325 { "vpcmpistrm", { XM, EXx, Ib } },
9e30b8e0
L
10326 },
10327 {
592a252b 10328 /* VEX_W_0F3A63_P_2 */
9e30b8e0 10329 { "vpcmpistri", { XM, EXx, Ib } },
9e30b8e0
L
10330 },
10331 {
592a252b 10332 /* VEX_W_0F3ADF_P_2 */
9e30b8e0 10333 { "vaeskeygenassist", { XM, EXx, Ib } },
9e30b8e0
L
10334 },
10335};
10336
10337static const struct dis386 mod_table[][2] = {
10338 {
10339 /* MOD_8D */
10340 { "leaS", { Gv, M } },
9e30b8e0
L
10341 },
10342 {
10343 /* MOD_0F01_REG_0 */
10344 { X86_64_TABLE (X86_64_0F01_REG_0) },
10345 { RM_TABLE (RM_0F01_REG_0) },
10346 },
10347 {
10348 /* MOD_0F01_REG_1 */
10349 { X86_64_TABLE (X86_64_0F01_REG_1) },
10350 { RM_TABLE (RM_0F01_REG_1) },
10351 },
10352 {
10353 /* MOD_0F01_REG_2 */
10354 { X86_64_TABLE (X86_64_0F01_REG_2) },
10355 { RM_TABLE (RM_0F01_REG_2) },
10356 },
10357 {
10358 /* MOD_0F01_REG_3 */
10359 { X86_64_TABLE (X86_64_0F01_REG_3) },
10360 { RM_TABLE (RM_0F01_REG_3) },
10361 },
10362 {
10363 /* MOD_0F01_REG_7 */
10364 { "invlpg", { Mb } },
10365 { RM_TABLE (RM_0F01_REG_7) },
10366 },
10367 {
10368 /* MOD_0F12_PREFIX_0 */
10369 { "movlps", { XM, EXq } },
10370 { "movhlps", { XM, EXq } },
10371 },
10372 {
10373 /* MOD_0F13 */
10374 { "movlpX", { EXq, XM } },
9e30b8e0
L
10375 },
10376 {
10377 /* MOD_0F16_PREFIX_0 */
10378 { "movhps", { XM, EXq } },
10379 { "movlhps", { XM, EXq } },
10380 },
10381 {
10382 /* MOD_0F17 */
10383 { "movhpX", { EXq, XM } },
9e30b8e0
L
10384 },
10385 {
10386 /* MOD_0F18_REG_0 */
10387 { "prefetchnta", { Mb } },
9e30b8e0
L
10388 },
10389 {
10390 /* MOD_0F18_REG_1 */
10391 { "prefetcht0", { Mb } },
9e30b8e0
L
10392 },
10393 {
10394 /* MOD_0F18_REG_2 */
10395 { "prefetcht1", { Mb } },
9e30b8e0
L
10396 },
10397 {
10398 /* MOD_0F18_REG_3 */
10399 { "prefetcht2", { Mb } },
9e30b8e0
L
10400 },
10401 {
10402 /* MOD_0F20 */
592d1631 10403 { Bad_Opcode },
9e30b8e0
L
10404 { "movZ", { Rm, Cm } },
10405 },
10406 {
10407 /* MOD_0F21 */
592d1631 10408 { Bad_Opcode },
9e30b8e0
L
10409 { "movZ", { Rm, Dm } },
10410 },
10411 {
10412 /* MOD_0F22 */
592d1631 10413 { Bad_Opcode },
9e30b8e0 10414 { "movZ", { Cm, Rm } },
b844680a
L
10415 },
10416 {
92fddf8e 10417 /* MOD_0F23 */
592d1631 10418 { Bad_Opcode },
92fddf8e 10419 { "movZ", { Dm, Rm } },
b844680a
L
10420 },
10421 {
92fddf8e 10422 /* MOD_0F24 */
592d1631 10423 { Bad_Opcode },
92fddf8e 10424 { "movL", { Rd, Td } },
b844680a
L
10425 },
10426 {
92fddf8e 10427 /* MOD_0F26 */
592d1631 10428 { Bad_Opcode },
92fddf8e 10429 { "movL", { Td, Rd } },
b844680a 10430 },
75c135a8
L
10431 {
10432 /* MOD_0F2B_PREFIX_0 */
4ee52178 10433 {"movntps", { Mx, XM } },
75c135a8
L
10434 },
10435 {
10436 /* MOD_0F2B_PREFIX_1 */
4ee52178 10437 {"movntss", { Md, XM } },
75c135a8
L
10438 },
10439 {
10440 /* MOD_0F2B_PREFIX_2 */
4ee52178 10441 {"movntpd", { Mx, XM } },
75c135a8
L
10442 },
10443 {
10444 /* MOD_0F2B_PREFIX_3 */
4ee52178 10445 {"movntsd", { Mq, XM } },
75c135a8
L
10446 },
10447 {
10448 /* MOD_0F51 */
592d1631 10449 { Bad_Opcode },
75c135a8
L
10450 { "movmskpX", { Gdq, XS } },
10451 },
b844680a 10452 {
1ceb70f8 10453 /* MOD_0F71_REG_2 */
592d1631 10454 { Bad_Opcode },
4e7d34a6 10455 { "psrlw", { MS, Ib } },
b844680a
L
10456 },
10457 {
1ceb70f8 10458 /* MOD_0F71_REG_4 */
592d1631 10459 { Bad_Opcode },
4e7d34a6 10460 { "psraw", { MS, Ib } },
b844680a
L
10461 },
10462 {
1ceb70f8 10463 /* MOD_0F71_REG_6 */
592d1631 10464 { Bad_Opcode },
4e7d34a6 10465 { "psllw", { MS, Ib } },
b844680a
L
10466 },
10467 {
1ceb70f8 10468 /* MOD_0F72_REG_2 */
592d1631 10469 { Bad_Opcode },
4e7d34a6 10470 { "psrld", { MS, Ib } },
b844680a
L
10471 },
10472 {
1ceb70f8 10473 /* MOD_0F72_REG_4 */
592d1631 10474 { Bad_Opcode },
4e7d34a6 10475 { "psrad", { MS, Ib } },
b844680a
L
10476 },
10477 {
1ceb70f8 10478 /* MOD_0F72_REG_6 */
592d1631 10479 { Bad_Opcode },
4e7d34a6 10480 { "pslld", { MS, Ib } },
b844680a
L
10481 },
10482 {
1ceb70f8 10483 /* MOD_0F73_REG_2 */
592d1631 10484 { Bad_Opcode },
4e7d34a6 10485 { "psrlq", { MS, Ib } },
b844680a
L
10486 },
10487 {
1ceb70f8 10488 /* MOD_0F73_REG_3 */
592d1631 10489 { Bad_Opcode },
c0f3af97
L
10490 { PREFIX_TABLE (PREFIX_0F73_REG_3) },
10491 },
10492 {
10493 /* MOD_0F73_REG_6 */
592d1631 10494 { Bad_Opcode },
c0f3af97
L
10495 { "psllq", { MS, Ib } },
10496 },
10497 {
10498 /* MOD_0F73_REG_7 */
592d1631 10499 { Bad_Opcode },
c0f3af97
L
10500 { PREFIX_TABLE (PREFIX_0F73_REG_7) },
10501 },
10502 {
10503 /* MOD_0FAE_REG_0 */
eacc9c89 10504 { "fxsave", { FXSAVE } },
c7b8aa3a 10505 { PREFIX_TABLE (PREFIX_0FAE_REG_0) },
c0f3af97
L
10506 },
10507 {
10508 /* MOD_0FAE_REG_1 */
eacc9c89 10509 { "fxrstor", { FXSAVE } },
c7b8aa3a 10510 { PREFIX_TABLE (PREFIX_0FAE_REG_1) },
c0f3af97
L
10511 },
10512 {
10513 /* MOD_0FAE_REG_2 */
10514 { "ldmxcsr", { Md } },
c7b8aa3a 10515 { PREFIX_TABLE (PREFIX_0FAE_REG_2) },
c0f3af97
L
10516 },
10517 {
10518 /* MOD_0FAE_REG_3 */
10519 { "stmxcsr", { Md } },
c7b8aa3a 10520 { PREFIX_TABLE (PREFIX_0FAE_REG_3) },
c0f3af97
L
10521 },
10522 {
10523 /* MOD_0FAE_REG_4 */
73bb6729 10524 { "xsave", { FXSAVE } },
c0f3af97
L
10525 },
10526 {
10527 /* MOD_0FAE_REG_5 */
73bb6729 10528 { "xrstor", { FXSAVE } },
c0f3af97
L
10529 { RM_TABLE (RM_0FAE_REG_5) },
10530 },
10531 {
10532 /* MOD_0FAE_REG_6 */
c7b8aa3a 10533 { "xsaveopt", { FXSAVE } },
c0f3af97
L
10534 { RM_TABLE (RM_0FAE_REG_6) },
10535 },
10536 {
10537 /* MOD_0FAE_REG_7 */
10538 { "clflush", { Mb } },
10539 { RM_TABLE (RM_0FAE_REG_7) },
10540 },
10541 {
10542 /* MOD_0FB2 */
10543 { "lssS", { Gv, Mp } },
c0f3af97
L
10544 },
10545 {
10546 /* MOD_0FB4 */
10547 { "lfsS", { Gv, Mp } },
c0f3af97
L
10548 },
10549 {
10550 /* MOD_0FB5 */
10551 { "lgsS", { Gv, Mp } },
c0f3af97
L
10552 },
10553 {
10554 /* MOD_0FC7_REG_6 */
10555 { PREFIX_TABLE (PREFIX_0FC7_REG_6) },
d7d9a9f8 10556 { "rdrand", { Ev } },
c0f3af97
L
10557 },
10558 {
10559 /* MOD_0FC7_REG_7 */
10560 { "vmptrst", { Mq } },
c0f3af97
L
10561 },
10562 {
10563 /* MOD_0FD7 */
592d1631 10564 { Bad_Opcode },
c0f3af97
L
10565 { "pmovmskb", { Gdq, MS } },
10566 },
10567 {
10568 /* MOD_0FE7_PREFIX_2 */
10569 { "movntdq", { Mx, XM } },
c0f3af97
L
10570 },
10571 {
10572 /* MOD_0FF0_PREFIX_3 */
10573 { "lddqu", { XM, M } },
c0f3af97
L
10574 },
10575 {
10576 /* MOD_0F382A_PREFIX_2 */
10577 { "movntdqa", { XM, Mx } },
c0f3af97
L
10578 },
10579 {
10580 /* MOD_62_32BIT */
10581 { "bound{S|}", { Gv, Ma } },
c0f3af97
L
10582 },
10583 {
10584 /* MOD_C4_32BIT */
10585 { "lesS", { Gv, Mp } },
10586 { VEX_C4_TABLE (VEX_0F) },
10587 },
10588 {
10589 /* MOD_C5_32BIT */
10590 { "ldsS", { Gv, Mp } },
10591 { VEX_C5_TABLE (VEX_0F) },
10592 },
10593 {
592a252b
L
10594 /* MOD_VEX_0F12_PREFIX_0 */
10595 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0) },
10596 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1) },
c0f3af97
L
10597 },
10598 {
592a252b
L
10599 /* MOD_VEX_0F13 */
10600 { VEX_LEN_TABLE (VEX_LEN_0F13_M_0) },
c0f3af97
L
10601 },
10602 {
592a252b
L
10603 /* MOD_VEX_0F16_PREFIX_0 */
10604 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0) },
10605 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1) },
c0f3af97
L
10606 },
10607 {
592a252b
L
10608 /* MOD_VEX_0F17 */
10609 { VEX_LEN_TABLE (VEX_LEN_0F17_M_0) },
c0f3af97
L
10610 },
10611 {
592a252b
L
10612 /* MOD_VEX_0F2B */
10613 { VEX_W_TABLE (VEX_W_0F2B_M_0) },
c0f3af97
L
10614 },
10615 {
592a252b 10616 /* MOD_VEX_0F50 */
592d1631 10617 { Bad_Opcode },
592a252b 10618 { VEX_W_TABLE (VEX_W_0F50_M_0) },
c0f3af97
L
10619 },
10620 {
592a252b 10621 /* MOD_VEX_0F71_REG_2 */
592d1631 10622 { Bad_Opcode },
592a252b 10623 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2) },
b844680a
L
10624 },
10625 {
592a252b 10626 /* MOD_VEX_0F71_REG_4 */
592d1631 10627 { Bad_Opcode },
592a252b 10628 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4) },
b844680a
L
10629 },
10630 {
592a252b 10631 /* MOD_VEX_0F71_REG_6 */
592d1631 10632 { Bad_Opcode },
592a252b 10633 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6) },
b844680a
L
10634 },
10635 {
592a252b 10636 /* MOD_VEX_0F72_REG_2 */
592d1631 10637 { Bad_Opcode },
592a252b 10638 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2) },
b844680a 10639 },
d8faab4e 10640 {
592a252b 10641 /* MOD_VEX_0F72_REG_4 */
592d1631 10642 { Bad_Opcode },
592a252b 10643 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4) },
d8faab4e
L
10644 },
10645 {
592a252b 10646 /* MOD_VEX_0F72_REG_6 */
592d1631 10647 { Bad_Opcode },
592a252b 10648 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6) },
d8faab4e 10649 },
876d4bfa 10650 {
592a252b 10651 /* MOD_VEX_0F73_REG_2 */
592d1631 10652 { Bad_Opcode },
592a252b 10653 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2) },
876d4bfa
L
10654 },
10655 {
592a252b 10656 /* MOD_VEX_0F73_REG_3 */
592d1631 10657 { Bad_Opcode },
592a252b 10658 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3) },
475a2301
L
10659 },
10660 {
592a252b 10661 /* MOD_VEX_0F73_REG_6 */
592d1631 10662 { Bad_Opcode },
592a252b 10663 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6) },
876d4bfa
L
10664 },
10665 {
592a252b 10666 /* MOD_VEX_0F73_REG_7 */
592d1631 10667 { Bad_Opcode },
592a252b 10668 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7) },
876d4bfa
L
10669 },
10670 {
592a252b
L
10671 /* MOD_VEX_0FAE_REG_2 */
10672 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0) },
876d4bfa 10673 },
bbedc832 10674 {
592a252b
L
10675 /* MOD_VEX_0FAE_REG_3 */
10676 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0) },
bbedc832 10677 },
144c41d9 10678 {
592a252b 10679 /* MOD_VEX_0FD7_PREFIX_2 */
592d1631 10680 { Bad_Opcode },
592a252b 10681 { VEX_LEN_TABLE (VEX_LEN_0FD7_P_2_M_1) },
144c41d9 10682 },
1afd85e3 10683 {
592a252b
L
10684 /* MOD_VEX_0FE7_PREFIX_2 */
10685 { VEX_W_TABLE (VEX_W_0FE7_P_2_M_0) },
1afd85e3
L
10686 },
10687 {
592a252b
L
10688 /* MOD_VEX_0FF0_PREFIX_3 */
10689 { VEX_W_TABLE (VEX_W_0FF0_P_3_M_0) },
92fddf8e
L
10690 },
10691 {
592a252b
L
10692 /* MOD_VEX_0F3818_PREFIX_2 */
10693 { VEX_W_TABLE (VEX_W_0F3818_P_2_M_0) },
1afd85e3 10694 },
75c135a8 10695 {
592a252b
L
10696 /* MOD_VEX_0F3819_PREFIX_2 */
10697 { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2_M_0) },
75c135a8
L
10698 },
10699 {
592a252b
L
10700 /* MOD_VEX_0F381A_PREFIX_2 */
10701 { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0) },
75c135a8 10702 },
1afd85e3 10703 {
592a252b
L
10704 /* MOD_VEX_0F382A_PREFIX_2 */
10705 { VEX_LEN_TABLE (VEX_LEN_0F382A_P_2_M_0) },
1afd85e3 10706 },
75c135a8 10707 {
592a252b
L
10708 /* MOD_VEX_0F382C_PREFIX_2 */
10709 { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0) },
75c135a8 10710 },
1afd85e3 10711 {
592a252b
L
10712 /* MOD_VEX_0F382D_PREFIX_2 */
10713 { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0) },
1afd85e3
L
10714 },
10715 {
592a252b
L
10716 /* MOD_VEX_0F382E_PREFIX_2 */
10717 { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0) },
1afd85e3
L
10718 },
10719 {
592a252b
L
10720 /* MOD_VEX_0F382F_PREFIX_2 */
10721 { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0) },
1afd85e3 10722 },
b844680a
L
10723};
10724
1ceb70f8 10725static const struct dis386 rm_table[][8] = {
b844680a 10726 {
1ceb70f8 10727 /* RM_0F01_REG_0 */
592d1631 10728 { Bad_Opcode },
b844680a
L
10729 { "vmcall", { Skip_MODRM } },
10730 { "vmlaunch", { Skip_MODRM } },
10731 { "vmresume", { Skip_MODRM } },
10732 { "vmxoff", { Skip_MODRM } },
b844680a
L
10733 },
10734 {
1ceb70f8 10735 /* RM_0F01_REG_1 */
b844680a
L
10736 { "monitor", { { OP_Monitor, 0 } } },
10737 { "mwait", { { OP_Mwait, 0 } } },
b844680a 10738 },
475a2301
L
10739 {
10740 /* RM_0F01_REG_2 */
10741 { "xgetbv", { Skip_MODRM } },
10742 { "xsetbv", { Skip_MODRM } },
475a2301 10743 },
b844680a 10744 {
1ceb70f8 10745 /* RM_0F01_REG_3 */
4e7d34a6
L
10746 { "vmrun", { Skip_MODRM } },
10747 { "vmmcall", { Skip_MODRM } },
10748 { "vmload", { Skip_MODRM } },
10749 { "vmsave", { Skip_MODRM } },
10750 { "stgi", { Skip_MODRM } },
10751 { "clgi", { Skip_MODRM } },
10752 { "skinit", { Skip_MODRM } },
10753 { "invlpga", { Skip_MODRM } },
10754 },
10755 {
1ceb70f8 10756 /* RM_0F01_REG_7 */
4e7d34a6
L
10757 { "swapgs", { Skip_MODRM } },
10758 { "rdtscp", { Skip_MODRM } },
b844680a
L
10759 },
10760 {
1ceb70f8 10761 /* RM_0FAE_REG_5 */
4e7d34a6 10762 { "lfence", { Skip_MODRM } },
b844680a
L
10763 },
10764 {
1ceb70f8 10765 /* RM_0FAE_REG_6 */
4e7d34a6 10766 { "mfence", { Skip_MODRM } },
b844680a 10767 },
bbedc832 10768 {
1ceb70f8 10769 /* RM_0FAE_REG_7 */
4e7d34a6 10770 { "sfence", { Skip_MODRM } },
144c41d9 10771 },
b844680a
L
10772};
10773
c608c12e
AM
10774#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
10775
f16cd0d5
L
10776/* We use the high bit to indicate different name for the same
10777 prefix. */
10778#define ADDR16_PREFIX (0x67 | 0x100)
10779#define ADDR32_PREFIX (0x67 | 0x200)
10780#define DATA16_PREFIX (0x66 | 0x100)
10781#define DATA32_PREFIX (0x66 | 0x200)
10782#define REP_PREFIX (0xf3 | 0x100)
10783
10784static int
26ca5450 10785ckprefix (void)
252b5132 10786{
f16cd0d5 10787 int newrex, i, length;
52b15da3 10788 rex = 0;
c0f3af97 10789 rex_ignored = 0;
252b5132 10790 prefixes = 0;
7d421014 10791 used_prefixes = 0;
52b15da3 10792 rex_used = 0;
f16cd0d5
L
10793 last_lock_prefix = -1;
10794 last_repz_prefix = -1;
10795 last_repnz_prefix = -1;
10796 last_data_prefix = -1;
10797 last_addr_prefix = -1;
10798 last_rex_prefix = -1;
10799 last_seg_prefix = -1;
f310f33d
L
10800 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
10801 all_prefixes[i] = 0;
10802 i = 0;
f16cd0d5
L
10803 length = 0;
10804 /* The maximum instruction length is 15bytes. */
10805 while (length < MAX_CODE_LENGTH - 1)
252b5132
RH
10806 {
10807 FETCH_DATA (the_info, codep + 1);
52b15da3 10808 newrex = 0;
252b5132
RH
10809 switch (*codep)
10810 {
52b15da3
JH
10811 /* REX prefixes family. */
10812 case 0x40:
10813 case 0x41:
10814 case 0x42:
10815 case 0x43:
10816 case 0x44:
10817 case 0x45:
10818 case 0x46:
10819 case 0x47:
10820 case 0x48:
10821 case 0x49:
10822 case 0x4a:
10823 case 0x4b:
10824 case 0x4c:
10825 case 0x4d:
10826 case 0x4e:
10827 case 0x4f:
f16cd0d5
L
10828 if (address_mode == mode_64bit)
10829 newrex = *codep;
10830 else
10831 return 1;
10832 last_rex_prefix = i;
52b15da3 10833 break;
252b5132
RH
10834 case 0xf3:
10835 prefixes |= PREFIX_REPZ;
f16cd0d5 10836 last_repz_prefix = i;
252b5132
RH
10837 break;
10838 case 0xf2:
10839 prefixes |= PREFIX_REPNZ;
f16cd0d5 10840 last_repnz_prefix = i;
252b5132
RH
10841 break;
10842 case 0xf0:
10843 prefixes |= PREFIX_LOCK;
f16cd0d5 10844 last_lock_prefix = i;
252b5132
RH
10845 break;
10846 case 0x2e:
10847 prefixes |= PREFIX_CS;
f16cd0d5 10848 last_seg_prefix = i;
252b5132
RH
10849 break;
10850 case 0x36:
10851 prefixes |= PREFIX_SS;
f16cd0d5 10852 last_seg_prefix = i;
252b5132
RH
10853 break;
10854 case 0x3e:
10855 prefixes |= PREFIX_DS;
f16cd0d5 10856 last_seg_prefix = i;
252b5132
RH
10857 break;
10858 case 0x26:
10859 prefixes |= PREFIX_ES;
f16cd0d5 10860 last_seg_prefix = i;
252b5132
RH
10861 break;
10862 case 0x64:
10863 prefixes |= PREFIX_FS;
f16cd0d5 10864 last_seg_prefix = i;
252b5132
RH
10865 break;
10866 case 0x65:
10867 prefixes |= PREFIX_GS;
f16cd0d5 10868 last_seg_prefix = i;
252b5132
RH
10869 break;
10870 case 0x66:
10871 prefixes |= PREFIX_DATA;
f16cd0d5 10872 last_data_prefix = i;
252b5132
RH
10873 break;
10874 case 0x67:
10875 prefixes |= PREFIX_ADDR;
f16cd0d5 10876 last_addr_prefix = i;
252b5132 10877 break;
5076851f 10878 case FWAIT_OPCODE:
252b5132
RH
10879 /* fwait is really an instruction. If there are prefixes
10880 before the fwait, they belong to the fwait, *not* to the
10881 following instruction. */
3e7d61b2 10882 if (prefixes || rex)
252b5132
RH
10883 {
10884 prefixes |= PREFIX_FWAIT;
10885 codep++;
f16cd0d5 10886 return 1;
252b5132
RH
10887 }
10888 prefixes = PREFIX_FWAIT;
10889 break;
10890 default:
f16cd0d5 10891 return 1;
252b5132 10892 }
52b15da3
JH
10893 /* Rex is ignored when followed by another prefix. */
10894 if (rex)
10895 {
3e7d61b2 10896 rex_used = rex;
f16cd0d5 10897 return 1;
52b15da3 10898 }
f16cd0d5
L
10899 if (*codep != FWAIT_OPCODE)
10900 all_prefixes[i++] = *codep;
52b15da3 10901 rex = newrex;
252b5132 10902 codep++;
f16cd0d5
L
10903 length++;
10904 }
10905 return 0;
10906}
10907
10908static int
10909seg_prefix (int pref)
10910{
10911 switch (pref)
10912 {
10913 case 0x2e:
10914 return PREFIX_CS;
10915 case 0x36:
10916 return PREFIX_SS;
10917 case 0x3e:
10918 return PREFIX_DS;
10919 case 0x26:
10920 return PREFIX_ES;
10921 case 0x64:
10922 return PREFIX_FS;
10923 case 0x65:
10924 return PREFIX_GS;
10925 default:
10926 return 0;
252b5132
RH
10927 }
10928}
10929
7d421014
ILT
10930/* Return the name of the prefix byte PREF, or NULL if PREF is not a
10931 prefix byte. */
10932
10933static const char *
26ca5450 10934prefix_name (int pref, int sizeflag)
7d421014 10935{
0003779b
L
10936 static const char *rexes [16] =
10937 {
10938 "rex", /* 0x40 */
10939 "rex.B", /* 0x41 */
10940 "rex.X", /* 0x42 */
10941 "rex.XB", /* 0x43 */
10942 "rex.R", /* 0x44 */
10943 "rex.RB", /* 0x45 */
10944 "rex.RX", /* 0x46 */
10945 "rex.RXB", /* 0x47 */
10946 "rex.W", /* 0x48 */
10947 "rex.WB", /* 0x49 */
10948 "rex.WX", /* 0x4a */
10949 "rex.WXB", /* 0x4b */
10950 "rex.WR", /* 0x4c */
10951 "rex.WRB", /* 0x4d */
10952 "rex.WRX", /* 0x4e */
10953 "rex.WRXB", /* 0x4f */
10954 };
10955
7d421014
ILT
10956 switch (pref)
10957 {
52b15da3
JH
10958 /* REX prefixes family. */
10959 case 0x40:
52b15da3 10960 case 0x41:
52b15da3 10961 case 0x42:
52b15da3 10962 case 0x43:
52b15da3 10963 case 0x44:
52b15da3 10964 case 0x45:
52b15da3 10965 case 0x46:
52b15da3 10966 case 0x47:
52b15da3 10967 case 0x48:
52b15da3 10968 case 0x49:
52b15da3 10969 case 0x4a:
52b15da3 10970 case 0x4b:
52b15da3 10971 case 0x4c:
52b15da3 10972 case 0x4d:
52b15da3 10973 case 0x4e:
52b15da3 10974 case 0x4f:
0003779b 10975 return rexes [pref - 0x40];
7d421014
ILT
10976 case 0xf3:
10977 return "repz";
10978 case 0xf2:
10979 return "repnz";
10980 case 0xf0:
10981 return "lock";
10982 case 0x2e:
10983 return "cs";
10984 case 0x36:
10985 return "ss";
10986 case 0x3e:
10987 return "ds";
10988 case 0x26:
10989 return "es";
10990 case 0x64:
10991 return "fs";
10992 case 0x65:
10993 return "gs";
10994 case 0x66:
10995 return (sizeflag & DFLAG) ? "data16" : "data32";
10996 case 0x67:
cb712a9e 10997 if (address_mode == mode_64bit)
db6eb5be 10998 return (sizeflag & AFLAG) ? "addr32" : "addr64";
c1a64871 10999 else
2888cb7a 11000 return (sizeflag & AFLAG) ? "addr16" : "addr32";
7d421014
ILT
11001 case FWAIT_OPCODE:
11002 return "fwait";
f16cd0d5
L
11003 case ADDR16_PREFIX:
11004 return "addr16";
11005 case ADDR32_PREFIX:
11006 return "addr32";
11007 case DATA16_PREFIX:
11008 return "data16";
11009 case DATA32_PREFIX:
11010 return "data32";
11011 case REP_PREFIX:
11012 return "rep";
7d421014
ILT
11013 default:
11014 return NULL;
11015 }
11016}
11017
ce518a5f
L
11018static char op_out[MAX_OPERANDS][100];
11019static int op_ad, op_index[MAX_OPERANDS];
1d9f512f 11020static int two_source_ops;
ce518a5f
L
11021static bfd_vma op_address[MAX_OPERANDS];
11022static bfd_vma op_riprel[MAX_OPERANDS];
52b15da3 11023static bfd_vma start_pc;
ce518a5f 11024
252b5132
RH
11025/*
11026 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
11027 * (see topic "Redundant prefixes" in the "Differences from 8086"
11028 * section of the "Virtual 8086 Mode" chapter.)
11029 * 'pc' should be the address of this instruction, it will
11030 * be used to print the target address if this is a relative jump or call
11031 * The function returns the length of this instruction in bytes.
11032 */
11033
252b5132 11034static char intel_syntax;
9d141669 11035static char intel_mnemonic = !SYSV386_COMPAT;
252b5132
RH
11036static char open_char;
11037static char close_char;
11038static char separator_char;
11039static char scale_char;
11040
e396998b
AM
11041/* Here for backwards compatibility. When gdb stops using
11042 print_insn_i386_att and print_insn_i386_intel these functions can
11043 disappear, and print_insn_i386 be merged into print_insn. */
252b5132 11044int
26ca5450 11045print_insn_i386_att (bfd_vma pc, disassemble_info *info)
252b5132
RH
11046{
11047 intel_syntax = 0;
e396998b
AM
11048
11049 return print_insn (pc, info);
252b5132
RH
11050}
11051
11052int
26ca5450 11053print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
252b5132
RH
11054{
11055 intel_syntax = 1;
e396998b
AM
11056
11057 return print_insn (pc, info);
252b5132
RH
11058}
11059
e396998b 11060int
26ca5450 11061print_insn_i386 (bfd_vma pc, disassemble_info *info)
e396998b
AM
11062{
11063 intel_syntax = -1;
11064
11065 return print_insn (pc, info);
11066}
11067
f59a29b9
L
11068void
11069print_i386_disassembler_options (FILE *stream)
11070{
11071 fprintf (stream, _("\n\
11072The following i386/x86-64 specific disassembler options are supported for use\n\
11073with the -M switch (multiple options should be separated by commas):\n"));
11074
11075 fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
11076 fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
11077 fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
11078 fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
11079 fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
9d141669
L
11080 fprintf (stream, _(" att-mnemonic\n"
11081 " Display instruction in AT&T mnemonic\n"));
11082 fprintf (stream, _(" intel-mnemonic\n"
11083 " Display instruction in Intel mnemonic\n"));
f59a29b9
L
11084 fprintf (stream, _(" addr64 Assume 64bit address size\n"));
11085 fprintf (stream, _(" addr32 Assume 32bit address size\n"));
11086 fprintf (stream, _(" addr16 Assume 16bit address size\n"));
11087 fprintf (stream, _(" data32 Assume 32bit data size\n"));
11088 fprintf (stream, _(" data16 Assume 16bit data size\n"));
11089 fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
11090}
11091
592d1631
L
11092/* Bad opcode. */
11093static const struct dis386 bad_opcode = { "(bad)", { XX } };
11094
b844680a
L
11095/* Get a pointer to struct dis386 with a valid name. */
11096
11097static const struct dis386 *
8bb15339 11098get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
b844680a 11099{
91d6fa6a 11100 int vindex, vex_table_index;
b844680a
L
11101
11102 if (dp->name != NULL)
11103 return dp;
11104
11105 switch (dp->op[0].bytemode)
11106 {
1ceb70f8
L
11107 case USE_REG_TABLE:
11108 dp = &reg_table[dp->op[1].bytemode][modrm.reg];
11109 break;
11110
11111 case USE_MOD_TABLE:
91d6fa6a
NC
11112 vindex = modrm.mod == 0x3 ? 1 : 0;
11113 dp = &mod_table[dp->op[1].bytemode][vindex];
1ceb70f8
L
11114 break;
11115
11116 case USE_RM_TABLE:
11117 dp = &rm_table[dp->op[1].bytemode][modrm.rm];
b844680a
L
11118 break;
11119
4e7d34a6 11120 case USE_PREFIX_TABLE:
c0f3af97 11121 if (need_vex)
b844680a 11122 {
c0f3af97
L
11123 /* The prefix in VEX is implicit. */
11124 switch (vex.prefix)
11125 {
11126 case 0:
91d6fa6a 11127 vindex = 0;
c0f3af97
L
11128 break;
11129 case REPE_PREFIX_OPCODE:
91d6fa6a 11130 vindex = 1;
c0f3af97
L
11131 break;
11132 case DATA_PREFIX_OPCODE:
91d6fa6a 11133 vindex = 2;
c0f3af97
L
11134 break;
11135 case REPNE_PREFIX_OPCODE:
91d6fa6a 11136 vindex = 3;
c0f3af97
L
11137 break;
11138 default:
11139 abort ();
11140 break;
11141 }
b844680a 11142 }
c0f3af97 11143 else
b844680a 11144 {
91d6fa6a 11145 vindex = 0;
c0f3af97
L
11146 used_prefixes |= (prefixes & PREFIX_REPZ);
11147 if (prefixes & PREFIX_REPZ)
b844680a 11148 {
91d6fa6a 11149 vindex = 1;
f16cd0d5 11150 all_prefixes[last_repz_prefix] = 0;
b844680a
L
11151 }
11152 else
11153 {
c0f3af97
L
11154 /* We should check PREFIX_REPNZ and PREFIX_REPZ before
11155 PREFIX_DATA. */
11156 used_prefixes |= (prefixes & PREFIX_REPNZ);
11157 if (prefixes & PREFIX_REPNZ)
11158 {
91d6fa6a 11159 vindex = 3;
f16cd0d5 11160 all_prefixes[last_repnz_prefix] = 0;
c0f3af97
L
11161 }
11162 else
b844680a 11163 {
c0f3af97
L
11164 used_prefixes |= (prefixes & PREFIX_DATA);
11165 if (prefixes & PREFIX_DATA)
11166 {
91d6fa6a 11167 vindex = 2;
f16cd0d5 11168 all_prefixes[last_data_prefix] = 0;
c0f3af97 11169 }
b844680a
L
11170 }
11171 }
11172 }
91d6fa6a 11173 dp = &prefix_table[dp->op[1].bytemode][vindex];
b844680a
L
11174 break;
11175
4e7d34a6 11176 case USE_X86_64_TABLE:
91d6fa6a
NC
11177 vindex = address_mode == mode_64bit ? 1 : 0;
11178 dp = &x86_64_table[dp->op[1].bytemode][vindex];
b844680a
L
11179 break;
11180
4e7d34a6 11181 case USE_3BYTE_TABLE:
8bb15339 11182 FETCH_DATA (info, codep + 2);
91d6fa6a
NC
11183 vindex = *codep++;
11184 dp = &three_byte_table[dp->op[1].bytemode][vindex];
8bb15339
L
11185 modrm.mod = (*codep >> 6) & 3;
11186 modrm.reg = (*codep >> 3) & 7;
11187 modrm.rm = *codep & 7;
11188 break;
11189
c0f3af97
L
11190 case USE_VEX_LEN_TABLE:
11191 if (!need_vex)
11192 abort ();
11193
11194 switch (vex.length)
11195 {
11196 case 128:
91d6fa6a 11197 vindex = 0;
c0f3af97
L
11198 break;
11199 case 256:
91d6fa6a 11200 vindex = 1;
c0f3af97
L
11201 break;
11202 default:
11203 abort ();
11204 break;
11205 }
11206
91d6fa6a 11207 dp = &vex_len_table[dp->op[1].bytemode][vindex];
c0f3af97
L
11208 break;
11209
f88c9eb0
SP
11210 case USE_XOP_8F_TABLE:
11211 FETCH_DATA (info, codep + 3);
11212 /* All bits in the REX prefix are ignored. */
11213 rex_ignored = rex;
11214 rex = ~(*codep >> 5) & 0x7;
11215
11216 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
11217 switch ((*codep & 0x1f))
11218 {
11219 default:
f07af43e
L
11220 dp = &bad_opcode;
11221 return dp;
5dd85c99
SP
11222 case 0x8:
11223 vex_table_index = XOP_08;
11224 break;
f88c9eb0
SP
11225 case 0x9:
11226 vex_table_index = XOP_09;
11227 break;
11228 case 0xa:
11229 vex_table_index = XOP_0A;
11230 break;
11231 }
11232 codep++;
11233 vex.w = *codep & 0x80;
11234 if (vex.w && address_mode == mode_64bit)
11235 rex |= REX_W;
11236
11237 vex.register_specifier = (~(*codep >> 3)) & 0xf;
11238 if (address_mode != mode_64bit
11239 && vex.register_specifier > 0x7)
f07af43e
L
11240 {
11241 dp = &bad_opcode;
11242 return dp;
11243 }
f88c9eb0
SP
11244
11245 vex.length = (*codep & 0x4) ? 256 : 128;
11246 switch ((*codep & 0x3))
11247 {
11248 case 0:
11249 vex.prefix = 0;
11250 break;
11251 case 1:
11252 vex.prefix = DATA_PREFIX_OPCODE;
11253 break;
11254 case 2:
11255 vex.prefix = REPE_PREFIX_OPCODE;
11256 break;
11257 case 3:
11258 vex.prefix = REPNE_PREFIX_OPCODE;
11259 break;
11260 }
11261 need_vex = 1;
11262 need_vex_reg = 1;
11263 codep++;
91d6fa6a
NC
11264 vindex = *codep++;
11265 dp = &xop_table[vex_table_index][vindex];
c48244a5
SP
11266
11267 FETCH_DATA (info, codep + 1);
11268 modrm.mod = (*codep >> 6) & 3;
11269 modrm.reg = (*codep >> 3) & 7;
11270 modrm.rm = *codep & 7;
f88c9eb0
SP
11271 break;
11272
c0f3af97
L
11273 case USE_VEX_C4_TABLE:
11274 FETCH_DATA (info, codep + 3);
11275 /* All bits in the REX prefix are ignored. */
11276 rex_ignored = rex;
11277 rex = ~(*codep >> 5) & 0x7;
11278 switch ((*codep & 0x1f))
11279 {
11280 default:
f07af43e
L
11281 dp = &bad_opcode;
11282 return dp;
c0f3af97 11283 case 0x1:
f88c9eb0 11284 vex_table_index = VEX_0F;
c0f3af97
L
11285 break;
11286 case 0x2:
f88c9eb0 11287 vex_table_index = VEX_0F38;
c0f3af97
L
11288 break;
11289 case 0x3:
f88c9eb0 11290 vex_table_index = VEX_0F3A;
c0f3af97
L
11291 break;
11292 }
11293 codep++;
11294 vex.w = *codep & 0x80;
11295 if (vex.w && address_mode == mode_64bit)
11296 rex |= REX_W;
11297
11298 vex.register_specifier = (~(*codep >> 3)) & 0xf;
11299 if (address_mode != mode_64bit
11300 && vex.register_specifier > 0x7)
f07af43e
L
11301 {
11302 dp = &bad_opcode;
11303 return dp;
11304 }
c0f3af97
L
11305
11306 vex.length = (*codep & 0x4) ? 256 : 128;
11307 switch ((*codep & 0x3))
11308 {
11309 case 0:
11310 vex.prefix = 0;
11311 break;
11312 case 1:
11313 vex.prefix = DATA_PREFIX_OPCODE;
11314 break;
11315 case 2:
11316 vex.prefix = REPE_PREFIX_OPCODE;
11317 break;
11318 case 3:
11319 vex.prefix = REPNE_PREFIX_OPCODE;
11320 break;
11321 }
11322 need_vex = 1;
11323 need_vex_reg = 1;
11324 codep++;
91d6fa6a
NC
11325 vindex = *codep++;
11326 dp = &vex_table[vex_table_index][vindex];
c0f3af97 11327 /* There is no MODRM byte for VEX [82|77]. */
91d6fa6a 11328 if (vindex != 0x77 && vindex != 0x82)
c0f3af97
L
11329 {
11330 FETCH_DATA (info, codep + 1);
11331 modrm.mod = (*codep >> 6) & 3;
11332 modrm.reg = (*codep >> 3) & 7;
11333 modrm.rm = *codep & 7;
11334 }
11335 break;
11336
11337 case USE_VEX_C5_TABLE:
11338 FETCH_DATA (info, codep + 2);
11339 /* All bits in the REX prefix are ignored. */
11340 rex_ignored = rex;
11341 rex = (*codep & 0x80) ? 0 : REX_R;
11342
11343 vex.register_specifier = (~(*codep >> 3)) & 0xf;
11344 if (address_mode != mode_64bit
11345 && vex.register_specifier > 0x7)
f07af43e
L
11346 {
11347 dp = &bad_opcode;
11348 return dp;
11349 }
c0f3af97 11350
759a05ce
L
11351 vex.w = 0;
11352
c0f3af97
L
11353 vex.length = (*codep & 0x4) ? 256 : 128;
11354 switch ((*codep & 0x3))
11355 {
11356 case 0:
11357 vex.prefix = 0;
11358 break;
11359 case 1:
11360 vex.prefix = DATA_PREFIX_OPCODE;
11361 break;
11362 case 2:
11363 vex.prefix = REPE_PREFIX_OPCODE;
11364 break;
11365 case 3:
11366 vex.prefix = REPNE_PREFIX_OPCODE;
11367 break;
11368 }
11369 need_vex = 1;
11370 need_vex_reg = 1;
11371 codep++;
91d6fa6a
NC
11372 vindex = *codep++;
11373 dp = &vex_table[dp->op[1].bytemode][vindex];
c0f3af97 11374 /* There is no MODRM byte for VEX [82|77]. */
91d6fa6a 11375 if (vindex != 0x77 && vindex != 0x82)
c0f3af97
L
11376 {
11377 FETCH_DATA (info, codep + 1);
11378 modrm.mod = (*codep >> 6) & 3;
11379 modrm.reg = (*codep >> 3) & 7;
11380 modrm.rm = *codep & 7;
11381 }
11382 break;
11383
9e30b8e0
L
11384 case USE_VEX_W_TABLE:
11385 if (!need_vex)
11386 abort ();
11387
11388 dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
11389 break;
11390
592d1631
L
11391 case 0:
11392 dp = &bad_opcode;
11393 break;
11394
b844680a 11395 default:
d34b5006 11396 abort ();
b844680a
L
11397 }
11398
11399 if (dp->name != NULL)
11400 return dp;
11401 else
8bb15339 11402 return get_valid_dis386 (dp, info);
b844680a
L
11403}
11404
dfc8cf43
L
11405static void
11406get_sib (disassemble_info *info)
11407{
11408 /* If modrm.mod == 3, operand must be register. */
11409 if (need_modrm
11410 && address_mode != mode_16bit
11411 && modrm.mod != 3
11412 && modrm.rm == 4)
11413 {
11414 FETCH_DATA (info, codep + 2);
11415 sib.index = (codep [1] >> 3) & 7;
11416 sib.scale = (codep [1] >> 6) & 3;
11417 sib.base = codep [1] & 7;
11418 }
11419}
11420
e396998b 11421static int
26ca5450 11422print_insn (bfd_vma pc, disassemble_info *info)
252b5132 11423{
2da11e11 11424 const struct dis386 *dp;
252b5132 11425 int i;
ce518a5f 11426 char *op_txt[MAX_OPERANDS];
252b5132 11427 int needcomma;
e396998b
AM
11428 int sizeflag;
11429 const char *p;
252b5132 11430 struct dis_private priv;
f16cd0d5
L
11431 int prefix_length;
11432 int default_prefixes;
252b5132 11433
cb712a9e 11434 if (info->mach == bfd_mach_x86_64_intel_syntax
8a9036a4 11435 || info->mach == bfd_mach_x86_64
351f65ca
L
11436 || info->mach == bfd_mach_x64_32_intel_syntax
11437 || info->mach == bfd_mach_x64_32
8a9036a4
L
11438 || info->mach == bfd_mach_l1om
11439 || info->mach == bfd_mach_l1om_intel_syntax)
cb712a9e
L
11440 address_mode = mode_64bit;
11441 else
11442 address_mode = mode_32bit;
52b15da3 11443
8373f971 11444 if (intel_syntax == (char) -1)
e396998b 11445 intel_syntax = (info->mach == bfd_mach_i386_i386_intel_syntax
8a9036a4 11446 || info->mach == bfd_mach_x86_64_intel_syntax
351f65ca 11447 || info->mach == bfd_mach_x64_32_intel_syntax
8a9036a4 11448 || info->mach == bfd_mach_l1om_intel_syntax);
e396998b 11449
2da11e11 11450 if (info->mach == bfd_mach_i386_i386
52b15da3 11451 || info->mach == bfd_mach_x86_64
351f65ca 11452 || info->mach == bfd_mach_x64_32
8a9036a4 11453 || info->mach == bfd_mach_l1om
52b15da3 11454 || info->mach == bfd_mach_i386_i386_intel_syntax
8a9036a4 11455 || info->mach == bfd_mach_x86_64_intel_syntax
351f65ca 11456 || info->mach == bfd_mach_x64_32_intel_syntax
8a9036a4 11457 || info->mach == bfd_mach_l1om_intel_syntax)
e396998b 11458 priv.orig_sizeflag = AFLAG | DFLAG;
2da11e11 11459 else if (info->mach == bfd_mach_i386_i8086)
e396998b 11460 priv.orig_sizeflag = 0;
2da11e11
AM
11461 else
11462 abort ();
e396998b
AM
11463
11464 for (p = info->disassembler_options; p != NULL; )
11465 {
0112cd26 11466 if (CONST_STRNEQ (p, "x86-64"))
e396998b 11467 {
cb712a9e 11468 address_mode = mode_64bit;
e396998b
AM
11469 priv.orig_sizeflag = AFLAG | DFLAG;
11470 }
0112cd26 11471 else if (CONST_STRNEQ (p, "i386"))
e396998b 11472 {
cb712a9e 11473 address_mode = mode_32bit;
e396998b
AM
11474 priv.orig_sizeflag = AFLAG | DFLAG;
11475 }
0112cd26 11476 else if (CONST_STRNEQ (p, "i8086"))
e396998b 11477 {
cb712a9e 11478 address_mode = mode_16bit;
e396998b
AM
11479 priv.orig_sizeflag = 0;
11480 }
0112cd26 11481 else if (CONST_STRNEQ (p, "intel"))
e396998b
AM
11482 {
11483 intel_syntax = 1;
9d141669
L
11484 if (CONST_STRNEQ (p + 5, "-mnemonic"))
11485 intel_mnemonic = 1;
e396998b 11486 }
0112cd26 11487 else if (CONST_STRNEQ (p, "att"))
e396998b
AM
11488 {
11489 intel_syntax = 0;
9d141669
L
11490 if (CONST_STRNEQ (p + 3, "-mnemonic"))
11491 intel_mnemonic = 0;
e396998b 11492 }
0112cd26 11493 else if (CONST_STRNEQ (p, "addr"))
e396998b 11494 {
f59a29b9
L
11495 if (address_mode == mode_64bit)
11496 {
11497 if (p[4] == '3' && p[5] == '2')
11498 priv.orig_sizeflag &= ~AFLAG;
11499 else if (p[4] == '6' && p[5] == '4')
11500 priv.orig_sizeflag |= AFLAG;
11501 }
11502 else
11503 {
11504 if (p[4] == '1' && p[5] == '6')
11505 priv.orig_sizeflag &= ~AFLAG;
11506 else if (p[4] == '3' && p[5] == '2')
11507 priv.orig_sizeflag |= AFLAG;
11508 }
e396998b 11509 }
0112cd26 11510 else if (CONST_STRNEQ (p, "data"))
e396998b
AM
11511 {
11512 if (p[4] == '1' && p[5] == '6')
11513 priv.orig_sizeflag &= ~DFLAG;
11514 else if (p[4] == '3' && p[5] == '2')
11515 priv.orig_sizeflag |= DFLAG;
11516 }
0112cd26 11517 else if (CONST_STRNEQ (p, "suffix"))
e396998b
AM
11518 priv.orig_sizeflag |= SUFFIX_ALWAYS;
11519
11520 p = strchr (p, ',');
11521 if (p != NULL)
11522 p++;
11523 }
11524
11525 if (intel_syntax)
11526 {
11527 names64 = intel_names64;
11528 names32 = intel_names32;
11529 names16 = intel_names16;
11530 names8 = intel_names8;
11531 names8rex = intel_names8rex;
11532 names_seg = intel_names_seg;
b9733481
L
11533 names_mm = intel_names_mm;
11534 names_xmm = intel_names_xmm;
11535 names_ymm = intel_names_ymm;
db51cc60
L
11536 index64 = intel_index64;
11537 index32 = intel_index32;
e396998b
AM
11538 index16 = intel_index16;
11539 open_char = '[';
11540 close_char = ']';
11541 separator_char = '+';
11542 scale_char = '*';
11543 }
11544 else
11545 {
11546 names64 = att_names64;
11547 names32 = att_names32;
11548 names16 = att_names16;
11549 names8 = att_names8;
11550 names8rex = att_names8rex;
11551 names_seg = att_names_seg;
b9733481
L
11552 names_mm = att_names_mm;
11553 names_xmm = att_names_xmm;
11554 names_ymm = att_names_ymm;
db51cc60
L
11555 index64 = att_index64;
11556 index32 = att_index32;
e396998b
AM
11557 index16 = att_index16;
11558 open_char = '(';
11559 close_char = ')';
11560 separator_char = ',';
11561 scale_char = ',';
11562 }
2da11e11 11563
4fe53c98 11564 /* The output looks better if we put 7 bytes on a line, since that
8a9036a4
L
11565 puts most long word instructions on a single line. Use 8 bytes
11566 for Intel L1OM. */
11567 if (info->mach == bfd_mach_l1om
11568 || info->mach == bfd_mach_l1om_intel_syntax)
11569 info->bytes_per_line = 8;
11570 else
11571 info->bytes_per_line = 7;
252b5132 11572
26ca5450 11573 info->private_data = &priv;
252b5132
RH
11574 priv.max_fetched = priv.the_buffer;
11575 priv.insn_start = pc;
252b5132
RH
11576
11577 obuf[0] = 0;
ce518a5f
L
11578 for (i = 0; i < MAX_OPERANDS; ++i)
11579 {
11580 op_out[i][0] = 0;
11581 op_index[i] = -1;
11582 }
252b5132
RH
11583
11584 the_info = info;
11585 start_pc = pc;
e396998b
AM
11586 start_codep = priv.the_buffer;
11587 codep = priv.the_buffer;
252b5132 11588
5076851f
ILT
11589 if (setjmp (priv.bailout) != 0)
11590 {
7d421014
ILT
11591 const char *name;
11592
5076851f 11593 /* Getting here means we tried for data but didn't get it. That
e396998b
AM
11594 means we have an incomplete instruction of some sort. Just
11595 print the first byte as a prefix or a .byte pseudo-op. */
11596 if (codep > priv.the_buffer)
5076851f 11597 {
e396998b 11598 name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
7d421014
ILT
11599 if (name != NULL)
11600 (*info->fprintf_func) (info->stream, "%s", name);
11601 else
5076851f 11602 {
7d421014
ILT
11603 /* Just print the first byte as a .byte instruction. */
11604 (*info->fprintf_func) (info->stream, ".byte 0x%x",
e396998b 11605 (unsigned int) priv.the_buffer[0]);
5076851f 11606 }
5076851f 11607
7d421014 11608 return 1;
5076851f
ILT
11609 }
11610
11611 return -1;
11612 }
11613
52b15da3 11614 obufp = obuf;
f16cd0d5
L
11615 sizeflag = priv.orig_sizeflag;
11616
11617 if (!ckprefix () || rex_used)
11618 {
11619 /* Too many prefixes or unused REX prefixes. */
11620 for (i = 0;
11621 all_prefixes[i] && i < (int) ARRAY_SIZE (all_prefixes);
11622 i++)
11623 (*info->fprintf_func) (info->stream, "%s",
11624 prefix_name (all_prefixes[i], sizeflag));
11625 return 1;
11626 }
252b5132
RH
11627
11628 insn_codep = codep;
11629
11630 FETCH_DATA (info, codep + 1);
11631 two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
11632
3e7d61b2 11633 if (((prefixes & PREFIX_FWAIT)
f16cd0d5 11634 && ((*codep < 0xd8) || (*codep > 0xdf))))
252b5132 11635 {
f16cd0d5 11636 (*info->fprintf_func) (info->stream, "fwait");
7d421014 11637 return 1;
252b5132
RH
11638 }
11639
252b5132
RH
11640 if (*codep == 0x0f)
11641 {
eec0f4ca 11642 unsigned char threebyte;
252b5132 11643 FETCH_DATA (info, codep + 2);
eec0f4ca
L
11644 threebyte = *++codep;
11645 dp = &dis386_twobyte[threebyte];
252b5132 11646 need_modrm = twobyte_has_modrm[*codep];
eec0f4ca 11647 codep++;
252b5132
RH
11648 }
11649 else
11650 {
6439fc28 11651 dp = &dis386[*codep];
252b5132 11652 need_modrm = onebyte_has_modrm[*codep];
eec0f4ca 11653 codep++;
252b5132 11654 }
246c51aa 11655
b844680a 11656 if ((prefixes & PREFIX_REPZ))
f16cd0d5 11657 used_prefixes |= PREFIX_REPZ;
b844680a 11658 if ((prefixes & PREFIX_REPNZ))
f16cd0d5 11659 used_prefixes |= PREFIX_REPNZ;
b844680a 11660 if ((prefixes & PREFIX_LOCK))
f16cd0d5 11661 used_prefixes |= PREFIX_LOCK;
c608c12e 11662
f16cd0d5 11663 default_prefixes = 0;
c608c12e
AM
11664 if (prefixes & PREFIX_ADDR)
11665 {
11666 sizeflag ^= AFLAG;
ce518a5f 11667 if (dp->op[2].bytemode != loop_jcxz_mode || intel_syntax)
3ffd33cf 11668 {
cb712a9e 11669 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
f16cd0d5 11670 all_prefixes[last_addr_prefix] = ADDR32_PREFIX;
3ffd33cf 11671 else
f16cd0d5
L
11672 all_prefixes[last_addr_prefix] = ADDR16_PREFIX;
11673 default_prefixes |= PREFIX_ADDR;
3ffd33cf
AM
11674 }
11675 }
11676
b844680a 11677 if ((prefixes & PREFIX_DATA))
3ffd33cf
AM
11678 {
11679 sizeflag ^= DFLAG;
ce518a5f
L
11680 if (dp->op[2].bytemode == cond_jump_mode
11681 && dp->op[0].bytemode == v_mode
6439fc28 11682 && !intel_syntax)
3ffd33cf
AM
11683 {
11684 if (sizeflag & DFLAG)
f16cd0d5 11685 all_prefixes[last_data_prefix] = DATA32_PREFIX;
3ffd33cf 11686 else
f16cd0d5
L
11687 all_prefixes[last_data_prefix] = DATA16_PREFIX;
11688 default_prefixes |= PREFIX_DATA;
11689 }
11690 else if (rex & REX_W)
11691 {
11692 /* REX_W will override PREFIX_DATA. */
11693 default_prefixes |= PREFIX_DATA;
3ffd33cf
AM
11694 }
11695 }
11696
8bb15339 11697 if (need_modrm)
252b5132
RH
11698 {
11699 FETCH_DATA (info, codep + 1);
7967e09e
L
11700 modrm.mod = (*codep >> 6) & 3;
11701 modrm.reg = (*codep >> 3) & 7;
11702 modrm.rm = *codep & 7;
252b5132
RH
11703 }
11704
42d5f9c6
MS
11705 need_vex = 0;
11706 need_vex_reg = 0;
11707 vex_w_done = 0;
55b126d4 11708
ce518a5f 11709 if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
252b5132 11710 {
dfc8cf43 11711 get_sib (info);
252b5132
RH
11712 dofloat (sizeflag);
11713 }
11714 else
11715 {
8bb15339 11716 dp = get_valid_dis386 (dp, info);
b844680a 11717 if (dp != NULL && putop (dp->name, sizeflag) == 0)
ce518a5f 11718 {
dfc8cf43 11719 get_sib (info);
ce518a5f
L
11720 for (i = 0; i < MAX_OPERANDS; ++i)
11721 {
246c51aa 11722 obufp = op_out[i];
ce518a5f
L
11723 op_ad = MAX_OPERANDS - 1 - i;
11724 if (dp->op[i].rtn)
11725 (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
11726 }
6439fc28 11727 }
252b5132
RH
11728 }
11729
7d421014
ILT
11730 /* See if any prefixes were not used. If so, print the first one
11731 separately. If we don't do this, we'll wind up printing an
11732 instruction stream which does not precisely correspond to the
11733 bytes we are disassembling. */
f16cd0d5 11734 if ((prefixes & ~(used_prefixes | default_prefixes)) != 0)
7d421014 11735 {
f16cd0d5
L
11736 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
11737 if (all_prefixes[i])
11738 {
11739 const char *name;
11740 name = prefix_name (all_prefixes[i], priv.orig_sizeflag);
11741 if (name == NULL)
11742 name = INTERNAL_DISASSEMBLER_ERROR;
11743 (*info->fprintf_func) (info->stream, "%s", name);
11744 return 1;
11745 }
52b15da3 11746 }
7d421014 11747
d869730d 11748 /* Check if the REX prefix is used. */
2a70cca4 11749 if (rex_ignored == 0 && (rex ^ rex_used) == 0)
f16cd0d5
L
11750 all_prefixes[last_rex_prefix] = 0;
11751
5e6718e4 11752 /* Check if the SEG prefix is used. */
f16cd0d5
L
11753 if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
11754 | PREFIX_FS | PREFIX_GS)) != 0
11755 && (used_prefixes
11756 & seg_prefix (all_prefixes[last_seg_prefix])) != 0)
11757 all_prefixes[last_seg_prefix] = 0;
11758
5e6718e4 11759 /* Check if the ADDR prefix is used. */
f16cd0d5
L
11760 if ((prefixes & PREFIX_ADDR) != 0
11761 && (used_prefixes & PREFIX_ADDR) != 0)
11762 all_prefixes[last_addr_prefix] = 0;
11763
5e6718e4 11764 /* Check if the DATA prefix is used. */
f16cd0d5
L
11765 if ((prefixes & PREFIX_DATA) != 0
11766 && (used_prefixes & PREFIX_DATA) != 0)
11767 all_prefixes[last_data_prefix] = 0;
11768
11769 prefix_length = 0;
f310f33d 11770 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
f16cd0d5
L
11771 if (all_prefixes[i])
11772 {
11773 const char *name;
11774 name = prefix_name (all_prefixes[i], sizeflag);
11775 if (name == NULL)
11776 abort ();
11777 prefix_length += strlen (name) + 1;
11778 (*info->fprintf_func) (info->stream, "%s ", name);
11779 }
b844680a 11780
f16cd0d5
L
11781 /* Check maximum code length. */
11782 if ((codep - start_codep) > MAX_CODE_LENGTH)
11783 {
11784 (*info->fprintf_func) (info->stream, "(bad)");
11785 return MAX_CODE_LENGTH;
11786 }
b844680a 11787
ea397f5b 11788 obufp = mnemonicendp;
f16cd0d5 11789 for (i = strlen (obuf) + prefix_length; i < 6; i++)
252b5132
RH
11790 oappend (" ");
11791 oappend (" ");
11792 (*info->fprintf_func) (info->stream, "%s", obuf);
11793
11794 /* The enter and bound instructions are printed with operands in the same
11795 order as the intel book; everything else is printed in reverse order. */
2da11e11 11796 if (intel_syntax || two_source_ops)
252b5132 11797 {
185b1163
L
11798 bfd_vma riprel;
11799
ce518a5f
L
11800 for (i = 0; i < MAX_OPERANDS; ++i)
11801 op_txt[i] = op_out[i];
246c51aa 11802
ce518a5f
L
11803 for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
11804 {
11805 op_ad = op_index[i];
11806 op_index[i] = op_index[MAX_OPERANDS - 1 - i];
11807 op_index[MAX_OPERANDS - 1 - i] = op_ad;
185b1163
L
11808 riprel = op_riprel[i];
11809 op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
11810 op_riprel[MAX_OPERANDS - 1 - i] = riprel;
ce518a5f 11811 }
252b5132
RH
11812 }
11813 else
11814 {
ce518a5f
L
11815 for (i = 0; i < MAX_OPERANDS; ++i)
11816 op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
050dfa73
MM
11817 }
11818
ce518a5f
L
11819 needcomma = 0;
11820 for (i = 0; i < MAX_OPERANDS; ++i)
11821 if (*op_txt[i])
11822 {
11823 if (needcomma)
11824 (*info->fprintf_func) (info->stream, ",");
11825 if (op_index[i] != -1 && !op_riprel[i])
11826 (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
11827 else
11828 (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
11829 needcomma = 1;
11830 }
050dfa73 11831
ce518a5f 11832 for (i = 0; i < MAX_OPERANDS; i++)
52b15da3
JH
11833 if (op_index[i] != -1 && op_riprel[i])
11834 {
11835 (*info->fprintf_func) (info->stream, " # ");
11836 (*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
11837 + op_address[op_index[i]]), info);
185b1163 11838 break;
52b15da3 11839 }
e396998b 11840 return codep - priv.the_buffer;
252b5132
RH
11841}
11842
6439fc28 11843static const char *float_mem[] = {
252b5132 11844 /* d8 */
7c52e0e8
L
11845 "fadd{s|}",
11846 "fmul{s|}",
11847 "fcom{s|}",
11848 "fcomp{s|}",
11849 "fsub{s|}",
11850 "fsubr{s|}",
11851 "fdiv{s|}",
11852 "fdivr{s|}",
db6eb5be 11853 /* d9 */
7c52e0e8 11854 "fld{s|}",
252b5132 11855 "(bad)",
7c52e0e8
L
11856 "fst{s|}",
11857 "fstp{s|}",
9306ca4a 11858 "fldenvIC",
252b5132 11859 "fldcw",
9306ca4a 11860 "fNstenvIC",
252b5132
RH
11861 "fNstcw",
11862 /* da */
7c52e0e8
L
11863 "fiadd{l|}",
11864 "fimul{l|}",
11865 "ficom{l|}",
11866 "ficomp{l|}",
11867 "fisub{l|}",
11868 "fisubr{l|}",
11869 "fidiv{l|}",
11870 "fidivr{l|}",
252b5132 11871 /* db */
7c52e0e8
L
11872 "fild{l|}",
11873 "fisttp{l|}",
11874 "fist{l|}",
11875 "fistp{l|}",
252b5132 11876 "(bad)",
6439fc28 11877 "fld{t||t|}",
252b5132 11878 "(bad)",
6439fc28 11879 "fstp{t||t|}",
252b5132 11880 /* dc */
7c52e0e8
L
11881 "fadd{l|}",
11882 "fmul{l|}",
11883 "fcom{l|}",
11884 "fcomp{l|}",
11885 "fsub{l|}",
11886 "fsubr{l|}",
11887 "fdiv{l|}",
11888 "fdivr{l|}",
252b5132 11889 /* dd */
7c52e0e8
L
11890 "fld{l|}",
11891 "fisttp{ll|}",
11892 "fst{l||}",
11893 "fstp{l|}",
9306ca4a 11894 "frstorIC",
252b5132 11895 "(bad)",
9306ca4a 11896 "fNsaveIC",
252b5132
RH
11897 "fNstsw",
11898 /* de */
11899 "fiadd",
11900 "fimul",
11901 "ficom",
11902 "ficomp",
11903 "fisub",
11904 "fisubr",
11905 "fidiv",
11906 "fidivr",
11907 /* df */
11908 "fild",
ca164297 11909 "fisttp",
252b5132
RH
11910 "fist",
11911 "fistp",
11912 "fbld",
7c52e0e8 11913 "fild{ll|}",
252b5132 11914 "fbstp",
7c52e0e8 11915 "fistp{ll|}",
1d9f512f
AM
11916};
11917
11918static const unsigned char float_mem_mode[] = {
11919 /* d8 */
11920 d_mode,
11921 d_mode,
11922 d_mode,
11923 d_mode,
11924 d_mode,
11925 d_mode,
11926 d_mode,
11927 d_mode,
11928 /* d9 */
11929 d_mode,
11930 0,
11931 d_mode,
11932 d_mode,
11933 0,
11934 w_mode,
11935 0,
11936 w_mode,
11937 /* da */
11938 d_mode,
11939 d_mode,
11940 d_mode,
11941 d_mode,
11942 d_mode,
11943 d_mode,
11944 d_mode,
11945 d_mode,
11946 /* db */
11947 d_mode,
11948 d_mode,
11949 d_mode,
11950 d_mode,
11951 0,
9306ca4a 11952 t_mode,
1d9f512f 11953 0,
9306ca4a 11954 t_mode,
1d9f512f
AM
11955 /* dc */
11956 q_mode,
11957 q_mode,
11958 q_mode,
11959 q_mode,
11960 q_mode,
11961 q_mode,
11962 q_mode,
11963 q_mode,
11964 /* dd */
11965 q_mode,
11966 q_mode,
11967 q_mode,
11968 q_mode,
11969 0,
11970 0,
11971 0,
11972 w_mode,
11973 /* de */
11974 w_mode,
11975 w_mode,
11976 w_mode,
11977 w_mode,
11978 w_mode,
11979 w_mode,
11980 w_mode,
11981 w_mode,
11982 /* df */
11983 w_mode,
11984 w_mode,
11985 w_mode,
11986 w_mode,
9306ca4a 11987 t_mode,
1d9f512f 11988 q_mode,
9306ca4a 11989 t_mode,
1d9f512f 11990 q_mode
252b5132
RH
11991};
11992
ce518a5f
L
11993#define ST { OP_ST, 0 }
11994#define STi { OP_STi, 0 }
252b5132 11995
4efba78c
L
11996#define FGRPd9_2 NULL, { { NULL, 0 } }
11997#define FGRPd9_4 NULL, { { NULL, 1 } }
11998#define FGRPd9_5 NULL, { { NULL, 2 } }
11999#define FGRPd9_6 NULL, { { NULL, 3 } }
12000#define FGRPd9_7 NULL, { { NULL, 4 } }
12001#define FGRPda_5 NULL, { { NULL, 5 } }
12002#define FGRPdb_4 NULL, { { NULL, 6 } }
12003#define FGRPde_3 NULL, { { NULL, 7 } }
12004#define FGRPdf_4 NULL, { { NULL, 8 } }
252b5132 12005
2da11e11 12006static const struct dis386 float_reg[][8] = {
252b5132
RH
12007 /* d8 */
12008 {
ce518a5f
L
12009 { "fadd", { ST, STi } },
12010 { "fmul", { ST, STi } },
12011 { "fcom", { STi } },
12012 { "fcomp", { STi } },
12013 { "fsub", { ST, STi } },
12014 { "fsubr", { ST, STi } },
12015 { "fdiv", { ST, STi } },
12016 { "fdivr", { ST, STi } },
252b5132
RH
12017 },
12018 /* d9 */
12019 {
ce518a5f
L
12020 { "fld", { STi } },
12021 { "fxch", { STi } },
252b5132 12022 { FGRPd9_2 },
592d1631 12023 { Bad_Opcode },
252b5132
RH
12024 { FGRPd9_4 },
12025 { FGRPd9_5 },
12026 { FGRPd9_6 },
12027 { FGRPd9_7 },
12028 },
12029 /* da */
12030 {
ce518a5f
L
12031 { "fcmovb", { ST, STi } },
12032 { "fcmove", { ST, STi } },
12033 { "fcmovbe",{ ST, STi } },
12034 { "fcmovu", { ST, STi } },
592d1631 12035 { Bad_Opcode },
252b5132 12036 { FGRPda_5 },
592d1631
L
12037 { Bad_Opcode },
12038 { Bad_Opcode },
252b5132
RH
12039 },
12040 /* db */
12041 {
ce518a5f
L
12042 { "fcmovnb",{ ST, STi } },
12043 { "fcmovne",{ ST, STi } },
12044 { "fcmovnbe",{ ST, STi } },
12045 { "fcmovnu",{ ST, STi } },
252b5132 12046 { FGRPdb_4 },
ce518a5f
L
12047 { "fucomi", { ST, STi } },
12048 { "fcomi", { ST, STi } },
592d1631 12049 { Bad_Opcode },
252b5132
RH
12050 },
12051 /* dc */
12052 {
ce518a5f
L
12053 { "fadd", { STi, ST } },
12054 { "fmul", { STi, ST } },
592d1631
L
12055 { Bad_Opcode },
12056 { Bad_Opcode },
9d141669
L
12057 { "fsub!M", { STi, ST } },
12058 { "fsubM", { STi, ST } },
12059 { "fdiv!M", { STi, ST } },
12060 { "fdivM", { STi, ST } },
252b5132
RH
12061 },
12062 /* dd */
12063 {
ce518a5f 12064 { "ffree", { STi } },
592d1631 12065 { Bad_Opcode },
ce518a5f
L
12066 { "fst", { STi } },
12067 { "fstp", { STi } },
12068 { "fucom", { STi } },
12069 { "fucomp", { STi } },
592d1631
L
12070 { Bad_Opcode },
12071 { Bad_Opcode },
252b5132
RH
12072 },
12073 /* de */
12074 {
ce518a5f
L
12075 { "faddp", { STi, ST } },
12076 { "fmulp", { STi, ST } },
592d1631 12077 { Bad_Opcode },
252b5132 12078 { FGRPde_3 },
9d141669
L
12079 { "fsub!Mp", { STi, ST } },
12080 { "fsubMp", { STi, ST } },
12081 { "fdiv!Mp", { STi, ST } },
12082 { "fdivMp", { STi, ST } },
252b5132
RH
12083 },
12084 /* df */
12085 {
ce518a5f 12086 { "ffreep", { STi } },
592d1631
L
12087 { Bad_Opcode },
12088 { Bad_Opcode },
12089 { Bad_Opcode },
252b5132 12090 { FGRPdf_4 },
ce518a5f
L
12091 { "fucomip", { ST, STi } },
12092 { "fcomip", { ST, STi } },
592d1631 12093 { Bad_Opcode },
252b5132
RH
12094 },
12095};
12096
252b5132
RH
12097static char *fgrps[][8] = {
12098 /* d9_2 0 */
12099 {
12100 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12101 },
12102
12103 /* d9_4 1 */
12104 {
12105 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
12106 },
12107
12108 /* d9_5 2 */
12109 {
12110 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
12111 },
12112
12113 /* d9_6 3 */
12114 {
12115 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
12116 },
12117
12118 /* d9_7 4 */
12119 {
12120 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
12121 },
12122
12123 /* da_5 5 */
12124 {
12125 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12126 },
12127
12128 /* db_4 6 */
12129 {
309d3373
JB
12130 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
12131 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
252b5132
RH
12132 },
12133
12134 /* de_3 7 */
12135 {
12136 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12137 },
12138
12139 /* df_4 8 */
12140 {
12141 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12142 },
12143};
12144
b6169b20
L
12145static void
12146swap_operand (void)
12147{
12148 mnemonicendp[0] = '.';
12149 mnemonicendp[1] = 's';
12150 mnemonicendp += 2;
12151}
12152
b844680a
L
12153static void
12154OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
12155 int sizeflag ATTRIBUTE_UNUSED)
12156{
12157 /* Skip mod/rm byte. */
12158 MODRM_CHECK;
12159 codep++;
12160}
12161
252b5132 12162static void
26ca5450 12163dofloat (int sizeflag)
252b5132 12164{
2da11e11 12165 const struct dis386 *dp;
252b5132
RH
12166 unsigned char floatop;
12167
12168 floatop = codep[-1];
12169
7967e09e 12170 if (modrm.mod != 3)
252b5132 12171 {
7967e09e 12172 int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
1d9f512f
AM
12173
12174 putop (float_mem[fp_indx], sizeflag);
ce518a5f 12175 obufp = op_out[0];
6e50d963 12176 op_ad = 2;
1d9f512f 12177 OP_E (float_mem_mode[fp_indx], sizeflag);
252b5132
RH
12178 return;
12179 }
6608db57 12180 /* Skip mod/rm byte. */
4bba6815 12181 MODRM_CHECK;
252b5132
RH
12182 codep++;
12183
7967e09e 12184 dp = &float_reg[floatop - 0xd8][modrm.reg];
252b5132
RH
12185 if (dp->name == NULL)
12186 {
7967e09e 12187 putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
252b5132 12188
6608db57 12189 /* Instruction fnstsw is only one with strange arg. */
252b5132 12190 if (floatop == 0xdf && codep[-1] == 0xe0)
ce518a5f 12191 strcpy (op_out[0], names16[0]);
252b5132
RH
12192 }
12193 else
12194 {
12195 putop (dp->name, sizeflag);
12196
ce518a5f 12197 obufp = op_out[0];
6e50d963 12198 op_ad = 2;
ce518a5f
L
12199 if (dp->op[0].rtn)
12200 (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
6e50d963 12201
ce518a5f 12202 obufp = op_out[1];
6e50d963 12203 op_ad = 1;
ce518a5f
L
12204 if (dp->op[1].rtn)
12205 (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
252b5132
RH
12206 }
12207}
12208
252b5132 12209static void
26ca5450 12210OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12211{
422673a9 12212 oappend ("%st" + intel_syntax);
252b5132
RH
12213}
12214
252b5132 12215static void
26ca5450 12216OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12217{
7967e09e 12218 sprintf (scratchbuf, "%%st(%d)", modrm.rm);
d708bcba 12219 oappend (scratchbuf + intel_syntax);
252b5132
RH
12220}
12221
6608db57 12222/* Capital letters in template are macros. */
6439fc28 12223static int
d3ce72d0 12224putop (const char *in_template, int sizeflag)
252b5132 12225{
2da11e11 12226 const char *p;
9306ca4a 12227 int alt = 0;
9d141669 12228 int cond = 1;
98b528ac
L
12229 unsigned int l = 0, len = 1;
12230 char last[4];
12231
12232#define SAVE_LAST(c) \
12233 if (l < len && l < sizeof (last)) \
12234 last[l++] = c; \
12235 else \
12236 abort ();
252b5132 12237
d3ce72d0 12238 for (p = in_template; *p; p++)
252b5132
RH
12239 {
12240 switch (*p)
12241 {
12242 default:
12243 *obufp++ = *p;
12244 break;
98b528ac
L
12245 case '%':
12246 len++;
12247 break;
9d141669
L
12248 case '!':
12249 cond = 0;
12250 break;
6439fc28
AM
12251 case '{':
12252 alt = 0;
12253 if (intel_syntax)
6439fc28
AM
12254 {
12255 while (*++p != '|')
7c52e0e8
L
12256 if (*p == '}' || *p == '\0')
12257 abort ();
6439fc28 12258 }
9306ca4a
JB
12259 /* Fall through. */
12260 case 'I':
12261 alt = 1;
12262 continue;
6439fc28
AM
12263 case '|':
12264 while (*++p != '}')
12265 {
12266 if (*p == '\0')
12267 abort ();
12268 }
12269 break;
12270 case '}':
12271 break;
252b5132 12272 case 'A':
db6eb5be
AM
12273 if (intel_syntax)
12274 break;
7967e09e 12275 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
252b5132
RH
12276 *obufp++ = 'b';
12277 break;
12278 case 'B':
4b06377f
L
12279 if (l == 0 && len == 1)
12280 {
12281case_B:
12282 if (intel_syntax)
12283 break;
12284 if (sizeflag & SUFFIX_ALWAYS)
12285 *obufp++ = 'b';
12286 }
12287 else
12288 {
12289 if (l != 1
12290 || len != 2
12291 || last[0] != 'L')
12292 {
12293 SAVE_LAST (*p);
12294 break;
12295 }
12296
12297 if (address_mode == mode_64bit
12298 && !(prefixes & PREFIX_ADDR))
12299 {
12300 *obufp++ = 'a';
12301 *obufp++ = 'b';
12302 *obufp++ = 's';
12303 }
12304
12305 goto case_B;
12306 }
252b5132 12307 break;
9306ca4a
JB
12308 case 'C':
12309 if (intel_syntax && !alt)
12310 break;
12311 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
12312 {
12313 if (sizeflag & DFLAG)
12314 *obufp++ = intel_syntax ? 'd' : 'l';
12315 else
12316 *obufp++ = intel_syntax ? 'w' : 's';
12317 used_prefixes |= (prefixes & PREFIX_DATA);
12318 }
12319 break;
ed7841b3
JB
12320 case 'D':
12321 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
12322 break;
161a04f6 12323 USED_REX (REX_W);
7967e09e 12324 if (modrm.mod == 3)
ed7841b3 12325 {
161a04f6 12326 if (rex & REX_W)
ed7841b3 12327 *obufp++ = 'q';
ed7841b3 12328 else
f16cd0d5
L
12329 {
12330 if (sizeflag & DFLAG)
12331 *obufp++ = intel_syntax ? 'd' : 'l';
12332 else
12333 *obufp++ = 'w';
12334 used_prefixes |= (prefixes & PREFIX_DATA);
12335 }
ed7841b3
JB
12336 }
12337 else
12338 *obufp++ = 'w';
12339 break;
252b5132 12340 case 'E': /* For jcxz/jecxz */
cb712a9e 12341 if (address_mode == mode_64bit)
c1a64871
JH
12342 {
12343 if (sizeflag & AFLAG)
12344 *obufp++ = 'r';
12345 else
12346 *obufp++ = 'e';
12347 }
12348 else
12349 if (sizeflag & AFLAG)
12350 *obufp++ = 'e';
3ffd33cf
AM
12351 used_prefixes |= (prefixes & PREFIX_ADDR);
12352 break;
12353 case 'F':
db6eb5be
AM
12354 if (intel_syntax)
12355 break;
e396998b 12356 if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
3ffd33cf
AM
12357 {
12358 if (sizeflag & AFLAG)
cb712a9e 12359 *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
3ffd33cf 12360 else
cb712a9e 12361 *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
3ffd33cf
AM
12362 used_prefixes |= (prefixes & PREFIX_ADDR);
12363 }
252b5132 12364 break;
52fd6d94
JB
12365 case 'G':
12366 if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
12367 break;
161a04f6 12368 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
12369 *obufp++ = 'l';
12370 else
12371 *obufp++ = 'w';
161a04f6 12372 if (!(rex & REX_W))
52fd6d94
JB
12373 used_prefixes |= (prefixes & PREFIX_DATA);
12374 break;
5dd0794d 12375 case 'H':
db6eb5be
AM
12376 if (intel_syntax)
12377 break;
5dd0794d
AM
12378 if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
12379 || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
12380 {
12381 used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
12382 *obufp++ = ',';
12383 *obufp++ = 'p';
12384 if (prefixes & PREFIX_DS)
12385 *obufp++ = 't';
12386 else
12387 *obufp++ = 'n';
12388 }
12389 break;
9306ca4a
JB
12390 case 'J':
12391 if (intel_syntax)
12392 break;
12393 *obufp++ = 'l';
12394 break;
42903f7f
L
12395 case 'K':
12396 USED_REX (REX_W);
12397 if (rex & REX_W)
12398 *obufp++ = 'q';
12399 else
12400 *obufp++ = 'd';
12401 break;
6dd5059a
L
12402 case 'Z':
12403 if (intel_syntax)
12404 break;
12405 if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
12406 {
12407 *obufp++ = 'q';
12408 break;
12409 }
12410 /* Fall through. */
98b528ac 12411 goto case_L;
252b5132 12412 case 'L':
98b528ac
L
12413 if (l != 0 || len != 1)
12414 {
12415 SAVE_LAST (*p);
12416 break;
12417 }
12418case_L:
db6eb5be
AM
12419 if (intel_syntax)
12420 break;
252b5132
RH
12421 if (sizeflag & SUFFIX_ALWAYS)
12422 *obufp++ = 'l';
252b5132 12423 break;
9d141669
L
12424 case 'M':
12425 if (intel_mnemonic != cond)
12426 *obufp++ = 'r';
12427 break;
252b5132
RH
12428 case 'N':
12429 if ((prefixes & PREFIX_FWAIT) == 0)
12430 *obufp++ = 'n';
7d421014
ILT
12431 else
12432 used_prefixes |= PREFIX_FWAIT;
252b5132 12433 break;
52b15da3 12434 case 'O':
161a04f6
L
12435 USED_REX (REX_W);
12436 if (rex & REX_W)
6439fc28 12437 *obufp++ = 'o';
a35ca55a
JB
12438 else if (intel_syntax && (sizeflag & DFLAG))
12439 *obufp++ = 'q';
52b15da3
JH
12440 else
12441 *obufp++ = 'd';
161a04f6 12442 if (!(rex & REX_W))
a35ca55a 12443 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 12444 break;
6439fc28 12445 case 'T':
d9e3625e
L
12446 if (!intel_syntax
12447 && address_mode == mode_64bit
12448 && (sizeflag & DFLAG))
6439fc28
AM
12449 {
12450 *obufp++ = 'q';
12451 break;
12452 }
6608db57 12453 /* Fall through. */
252b5132 12454 case 'P':
db6eb5be 12455 if (intel_syntax)
d9e3625e
L
12456 {
12457 if ((rex & REX_W) == 0
12458 && (prefixes & PREFIX_DATA))
12459 {
12460 if ((sizeflag & DFLAG) == 0)
12461 *obufp++ = 'w';
12462 used_prefixes |= (prefixes & PREFIX_DATA);
12463 }
12464 break;
12465 }
252b5132 12466 if ((prefixes & PREFIX_DATA)
161a04f6 12467 || (rex & REX_W)
e396998b 12468 || (sizeflag & SUFFIX_ALWAYS))
252b5132 12469 {
161a04f6
L
12470 USED_REX (REX_W);
12471 if (rex & REX_W)
52b15da3 12472 *obufp++ = 'q';
c2419411 12473 else
52b15da3
JH
12474 {
12475 if (sizeflag & DFLAG)
12476 *obufp++ = 'l';
12477 else
12478 *obufp++ = 'w';
f16cd0d5 12479 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 12480 }
252b5132
RH
12481 }
12482 break;
6439fc28 12483 case 'U':
db6eb5be
AM
12484 if (intel_syntax)
12485 break;
cb712a9e 12486 if (address_mode == mode_64bit && (sizeflag & DFLAG))
6439fc28 12487 {
7967e09e 12488 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
1a114b12 12489 *obufp++ = 'q';
6439fc28
AM
12490 break;
12491 }
6608db57 12492 /* Fall through. */
98b528ac 12493 goto case_Q;
252b5132 12494 case 'Q':
98b528ac 12495 if (l == 0 && len == 1)
252b5132 12496 {
98b528ac
L
12497case_Q:
12498 if (intel_syntax && !alt)
12499 break;
12500 USED_REX (REX_W);
12501 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 12502 {
98b528ac
L
12503 if (rex & REX_W)
12504 *obufp++ = 'q';
52b15da3 12505 else
98b528ac
L
12506 {
12507 if (sizeflag & DFLAG)
12508 *obufp++ = intel_syntax ? 'd' : 'l';
12509 else
12510 *obufp++ = 'w';
f16cd0d5 12511 used_prefixes |= (prefixes & PREFIX_DATA);
98b528ac 12512 }
52b15da3 12513 }
98b528ac
L
12514 }
12515 else
12516 {
12517 if (l != 1 || len != 2 || last[0] != 'L')
12518 {
12519 SAVE_LAST (*p);
12520 break;
12521 }
12522 if (intel_syntax
12523 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
12524 break;
12525 if ((rex & REX_W))
12526 {
12527 USED_REX (REX_W);
12528 *obufp++ = 'q';
12529 }
12530 else
12531 *obufp++ = 'l';
252b5132
RH
12532 }
12533 break;
12534 case 'R':
161a04f6
L
12535 USED_REX (REX_W);
12536 if (rex & REX_W)
a35ca55a
JB
12537 *obufp++ = 'q';
12538 else if (sizeflag & DFLAG)
c608c12e 12539 {
a35ca55a 12540 if (intel_syntax)
c608c12e 12541 *obufp++ = 'd';
c608c12e 12542 else
a35ca55a 12543 *obufp++ = 'l';
c608c12e 12544 }
252b5132 12545 else
a35ca55a
JB
12546 *obufp++ = 'w';
12547 if (intel_syntax && !p[1]
161a04f6 12548 && ((rex & REX_W) || (sizeflag & DFLAG)))
a35ca55a 12549 *obufp++ = 'e';
161a04f6 12550 if (!(rex & REX_W))
52b15da3 12551 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132 12552 break;
1a114b12 12553 case 'V':
4b06377f 12554 if (l == 0 && len == 1)
1a114b12 12555 {
4b06377f
L
12556 if (intel_syntax)
12557 break;
12558 if (address_mode == mode_64bit && (sizeflag & DFLAG))
12559 {
12560 if (sizeflag & SUFFIX_ALWAYS)
12561 *obufp++ = 'q';
12562 break;
12563 }
12564 }
12565 else
12566 {
12567 if (l != 1
12568 || len != 2
12569 || last[0] != 'L')
12570 {
12571 SAVE_LAST (*p);
12572 break;
12573 }
12574
12575 if (rex & REX_W)
12576 {
12577 *obufp++ = 'a';
12578 *obufp++ = 'b';
12579 *obufp++ = 's';
12580 }
1a114b12
JB
12581 }
12582 /* Fall through. */
4b06377f 12583 goto case_S;
252b5132 12584 case 'S':
4b06377f 12585 if (l == 0 && len == 1)
252b5132 12586 {
4b06377f
L
12587case_S:
12588 if (intel_syntax)
12589 break;
12590 if (sizeflag & SUFFIX_ALWAYS)
52b15da3 12591 {
4b06377f
L
12592 if (rex & REX_W)
12593 *obufp++ = 'q';
52b15da3 12594 else
4b06377f
L
12595 {
12596 if (sizeflag & DFLAG)
12597 *obufp++ = 'l';
12598 else
12599 *obufp++ = 'w';
12600 used_prefixes |= (prefixes & PREFIX_DATA);
12601 }
12602 }
12603 }
12604 else
12605 {
12606 if (l != 1
12607 || len != 2
12608 || last[0] != 'L')
12609 {
12610 SAVE_LAST (*p);
12611 break;
52b15da3 12612 }
4b06377f
L
12613
12614 if (address_mode == mode_64bit
12615 && !(prefixes & PREFIX_ADDR))
12616 {
12617 *obufp++ = 'a';
12618 *obufp++ = 'b';
12619 *obufp++ = 's';
12620 }
12621
12622 goto case_S;
252b5132 12623 }
252b5132 12624 break;
041bd2e0 12625 case 'X':
c0f3af97
L
12626 if (l != 0 || len != 1)
12627 {
12628 SAVE_LAST (*p);
12629 break;
12630 }
12631 if (need_vex && vex.prefix)
12632 {
12633 if (vex.prefix == DATA_PREFIX_OPCODE)
12634 *obufp++ = 'd';
12635 else
12636 *obufp++ = 's';
12637 }
041bd2e0 12638 else
f16cd0d5
L
12639 {
12640 if (prefixes & PREFIX_DATA)
12641 *obufp++ = 'd';
12642 else
12643 *obufp++ = 's';
12644 used_prefixes |= (prefixes & PREFIX_DATA);
12645 }
041bd2e0 12646 break;
76f227a5 12647 case 'Y':
c0f3af97 12648 if (l == 0 && len == 1)
76f227a5 12649 {
c0f3af97
L
12650 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
12651 break;
12652 if (rex & REX_W)
12653 {
12654 USED_REX (REX_W);
12655 *obufp++ = 'q';
12656 }
12657 break;
12658 }
12659 else
12660 {
12661 if (l != 1 || len != 2 || last[0] != 'X')
12662 {
12663 SAVE_LAST (*p);
12664 break;
12665 }
12666 if (!need_vex)
12667 abort ();
12668 if (intel_syntax
12669 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
12670 break;
12671 switch (vex.length)
12672 {
12673 case 128:
12674 *obufp++ = 'x';
12675 break;
12676 case 256:
12677 *obufp++ = 'y';
12678 break;
12679 default:
12680 abort ();
12681 }
76f227a5
JH
12682 }
12683 break;
252b5132 12684 case 'W':
0bfee649 12685 if (l == 0 && len == 1)
a35ca55a 12686 {
0bfee649
L
12687 /* operand size flag for cwtl, cbtw */
12688 USED_REX (REX_W);
12689 if (rex & REX_W)
12690 {
12691 if (intel_syntax)
12692 *obufp++ = 'd';
12693 else
12694 *obufp++ = 'l';
12695 }
12696 else if (sizeflag & DFLAG)
12697 *obufp++ = 'w';
a35ca55a 12698 else
0bfee649
L
12699 *obufp++ = 'b';
12700 if (!(rex & REX_W))
12701 used_prefixes |= (prefixes & PREFIX_DATA);
a35ca55a 12702 }
252b5132 12703 else
0bfee649
L
12704 {
12705 if (l != 1 || len != 2 || last[0] != 'X')
12706 {
12707 SAVE_LAST (*p);
12708 break;
12709 }
12710 if (!need_vex)
12711 abort ();
12712 *obufp++ = vex.w ? 'd': 's';
12713 }
252b5132
RH
12714 break;
12715 }
9306ca4a 12716 alt = 0;
252b5132
RH
12717 }
12718 *obufp = 0;
ea397f5b 12719 mnemonicendp = obufp;
6439fc28 12720 return 0;
252b5132
RH
12721}
12722
12723static void
26ca5450 12724oappend (const char *s)
252b5132 12725{
ea397f5b 12726 obufp = stpcpy (obufp, s);
252b5132
RH
12727}
12728
12729static void
26ca5450 12730append_seg (void)
252b5132
RH
12731{
12732 if (prefixes & PREFIX_CS)
7d421014 12733 {
7d421014 12734 used_prefixes |= PREFIX_CS;
d708bcba 12735 oappend ("%cs:" + intel_syntax);
7d421014 12736 }
252b5132 12737 if (prefixes & PREFIX_DS)
7d421014 12738 {
7d421014 12739 used_prefixes |= PREFIX_DS;
d708bcba 12740 oappend ("%ds:" + intel_syntax);
7d421014 12741 }
252b5132 12742 if (prefixes & PREFIX_SS)
7d421014 12743 {
7d421014 12744 used_prefixes |= PREFIX_SS;
d708bcba 12745 oappend ("%ss:" + intel_syntax);
7d421014 12746 }
252b5132 12747 if (prefixes & PREFIX_ES)
7d421014 12748 {
7d421014 12749 used_prefixes |= PREFIX_ES;
d708bcba 12750 oappend ("%es:" + intel_syntax);
7d421014 12751 }
252b5132 12752 if (prefixes & PREFIX_FS)
7d421014 12753 {
7d421014 12754 used_prefixes |= PREFIX_FS;
d708bcba 12755 oappend ("%fs:" + intel_syntax);
7d421014 12756 }
252b5132 12757 if (prefixes & PREFIX_GS)
7d421014 12758 {
7d421014 12759 used_prefixes |= PREFIX_GS;
d708bcba 12760 oappend ("%gs:" + intel_syntax);
7d421014 12761 }
252b5132
RH
12762}
12763
12764static void
26ca5450 12765OP_indirE (int bytemode, int sizeflag)
252b5132
RH
12766{
12767 if (!intel_syntax)
12768 oappend ("*");
12769 OP_E (bytemode, sizeflag);
12770}
12771
52b15da3 12772static void
26ca5450 12773print_operand_value (char *buf, int hex, bfd_vma disp)
52b15da3 12774{
cb712a9e 12775 if (address_mode == mode_64bit)
52b15da3
JH
12776 {
12777 if (hex)
12778 {
12779 char tmp[30];
12780 int i;
12781 buf[0] = '0';
12782 buf[1] = 'x';
12783 sprintf_vma (tmp, disp);
6608db57 12784 for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
52b15da3
JH
12785 strcpy (buf + 2, tmp + i);
12786 }
12787 else
12788 {
12789 bfd_signed_vma v = disp;
12790 char tmp[30];
12791 int i;
12792 if (v < 0)
12793 {
12794 *(buf++) = '-';
12795 v = -disp;
6608db57 12796 /* Check for possible overflow on 0x8000000000000000. */
52b15da3
JH
12797 if (v < 0)
12798 {
12799 strcpy (buf, "9223372036854775808");
12800 return;
12801 }
12802 }
12803 if (!v)
12804 {
12805 strcpy (buf, "0");
12806 return;
12807 }
12808
12809 i = 0;
12810 tmp[29] = 0;
12811 while (v)
12812 {
6608db57 12813 tmp[28 - i] = (v % 10) + '0';
52b15da3
JH
12814 v /= 10;
12815 i++;
12816 }
12817 strcpy (buf, tmp + 29 - i);
12818 }
12819 }
12820 else
12821 {
12822 if (hex)
12823 sprintf (buf, "0x%x", (unsigned int) disp);
12824 else
12825 sprintf (buf, "%d", (int) disp);
12826 }
12827}
12828
5d669648
L
12829/* Put DISP in BUF as signed hex number. */
12830
12831static void
12832print_displacement (char *buf, bfd_vma disp)
12833{
12834 bfd_signed_vma val = disp;
12835 char tmp[30];
12836 int i, j = 0;
12837
12838 if (val < 0)
12839 {
12840 buf[j++] = '-';
12841 val = -disp;
12842
12843 /* Check for possible overflow. */
12844 if (val < 0)
12845 {
12846 switch (address_mode)
12847 {
12848 case mode_64bit:
12849 strcpy (buf + j, "0x8000000000000000");
12850 break;
12851 case mode_32bit:
12852 strcpy (buf + j, "0x80000000");
12853 break;
12854 case mode_16bit:
12855 strcpy (buf + j, "0x8000");
12856 break;
12857 }
12858 return;
12859 }
12860 }
12861
12862 buf[j++] = '0';
12863 buf[j++] = 'x';
12864
0af1713e 12865 sprintf_vma (tmp, (bfd_vma) val);
5d669648
L
12866 for (i = 0; tmp[i] == '0'; i++)
12867 continue;
12868 if (tmp[i] == '\0')
12869 i--;
12870 strcpy (buf + j, tmp + i);
12871}
12872
3f31e633
JB
12873static void
12874intel_operand_size (int bytemode, int sizeflag)
12875{
12876 switch (bytemode)
12877 {
12878 case b_mode:
b6169b20 12879 case b_swap_mode:
42903f7f 12880 case dqb_mode:
3f31e633
JB
12881 oappend ("BYTE PTR ");
12882 break;
12883 case w_mode:
12884 case dqw_mode:
12885 oappend ("WORD PTR ");
12886 break;
1a114b12 12887 case stack_v_mode:
cb712a9e 12888 if (address_mode == mode_64bit && (sizeflag & DFLAG))
3f31e633
JB
12889 {
12890 oappend ("QWORD PTR ");
3f31e633
JB
12891 break;
12892 }
12893 /* FALLTHRU */
12894 case v_mode:
b6169b20 12895 case v_swap_mode:
3f31e633 12896 case dq_mode:
161a04f6
L
12897 USED_REX (REX_W);
12898 if (rex & REX_W)
3f31e633 12899 oappend ("QWORD PTR ");
3f31e633 12900 else
f16cd0d5
L
12901 {
12902 if ((sizeflag & DFLAG) || bytemode == dq_mode)
12903 oappend ("DWORD PTR ");
12904 else
12905 oappend ("WORD PTR ");
12906 used_prefixes |= (prefixes & PREFIX_DATA);
12907 }
3f31e633 12908 break;
52fd6d94 12909 case z_mode:
161a04f6 12910 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
12911 *obufp++ = 'D';
12912 oappend ("WORD PTR ");
161a04f6 12913 if (!(rex & REX_W))
52fd6d94
JB
12914 used_prefixes |= (prefixes & PREFIX_DATA);
12915 break;
34b772a6
JB
12916 case a_mode:
12917 if (sizeflag & DFLAG)
12918 oappend ("QWORD PTR ");
12919 else
12920 oappend ("DWORD PTR ");
12921 used_prefixes |= (prefixes & PREFIX_DATA);
12922 break;
3f31e633 12923 case d_mode:
539f890d
L
12924 case d_scalar_mode:
12925 case d_scalar_swap_mode:
fa99fab2 12926 case d_swap_mode:
42903f7f 12927 case dqd_mode:
3f31e633
JB
12928 oappend ("DWORD PTR ");
12929 break;
12930 case q_mode:
539f890d
L
12931 case q_scalar_mode:
12932 case q_scalar_swap_mode:
b6169b20 12933 case q_swap_mode:
3f31e633
JB
12934 oappend ("QWORD PTR ");
12935 break;
12936 case m_mode:
cb712a9e 12937 if (address_mode == mode_64bit)
3f31e633
JB
12938 oappend ("QWORD PTR ");
12939 else
12940 oappend ("DWORD PTR ");
12941 break;
12942 case f_mode:
12943 if (sizeflag & DFLAG)
12944 oappend ("FWORD PTR ");
12945 else
12946 oappend ("DWORD PTR ");
12947 used_prefixes |= (prefixes & PREFIX_DATA);
12948 break;
12949 case t_mode:
12950 oappend ("TBYTE PTR ");
12951 break;
12952 case x_mode:
b6169b20 12953 case x_swap_mode:
c0f3af97
L
12954 if (need_vex)
12955 {
12956 switch (vex.length)
12957 {
12958 case 128:
12959 oappend ("XMMWORD PTR ");
12960 break;
12961 case 256:
12962 oappend ("YMMWORD PTR ");
12963 break;
12964 default:
12965 abort ();
12966 }
12967 }
12968 else
12969 oappend ("XMMWORD PTR ");
12970 break;
12971 case xmm_mode:
3f31e633
JB
12972 oappend ("XMMWORD PTR ");
12973 break;
c0f3af97
L
12974 case xmmq_mode:
12975 if (!need_vex)
12976 abort ();
12977
12978 switch (vex.length)
12979 {
12980 case 128:
12981 oappend ("QWORD PTR ");
12982 break;
12983 case 256:
12984 oappend ("XMMWORD PTR ");
12985 break;
12986 default:
12987 abort ();
12988 }
12989 break;
12990 case ymmq_mode:
12991 if (!need_vex)
12992 abort ();
12993
12994 switch (vex.length)
12995 {
12996 case 128:
12997 oappend ("QWORD PTR ");
12998 break;
12999 case 256:
13000 oappend ("YMMWORD PTR ");
13001 break;
13002 default:
13003 abort ();
13004 }
13005 break;
fb9c77c7
L
13006 case o_mode:
13007 oappend ("OWORD PTR ");
13008 break;
0bfee649 13009 case vex_w_dq_mode:
1c480963 13010 case vex_scalar_w_dq_mode:
0bfee649
L
13011 if (!need_vex)
13012 abort ();
13013
13014 if (vex.w)
13015 oappend ("QWORD PTR ");
13016 else
13017 oappend ("DWORD PTR ");
13018 break;
3f31e633
JB
13019 default:
13020 break;
13021 }
13022}
13023
252b5132 13024static void
c0f3af97 13025OP_E_register (int bytemode, int sizeflag)
252b5132 13026{
c0f3af97
L
13027 int reg = modrm.rm;
13028 const char **names;
252b5132 13029
c0f3af97
L
13030 USED_REX (REX_B);
13031 if ((rex & REX_B))
13032 reg += 8;
252b5132 13033
b6169b20
L
13034 if ((sizeflag & SUFFIX_ALWAYS)
13035 && (bytemode == b_swap_mode || bytemode == v_swap_mode))
13036 swap_operand ();
13037
c0f3af97 13038 switch (bytemode)
252b5132 13039 {
c0f3af97 13040 case b_mode:
b6169b20 13041 case b_swap_mode:
c0f3af97
L
13042 USED_REX (0);
13043 if (rex)
13044 names = names8rex;
13045 else
13046 names = names8;
13047 break;
13048 case w_mode:
13049 names = names16;
13050 break;
13051 case d_mode:
13052 names = names32;
13053 break;
13054 case q_mode:
13055 names = names64;
13056 break;
13057 case m_mode:
13058 names = address_mode == mode_64bit ? names64 : names32;
13059 break;
13060 case stack_v_mode:
13061 if (address_mode == mode_64bit && (sizeflag & DFLAG))
252b5132 13062 {
c0f3af97 13063 names = names64;
252b5132 13064 break;
252b5132 13065 }
c0f3af97
L
13066 bytemode = v_mode;
13067 /* FALLTHRU */
13068 case v_mode:
b6169b20 13069 case v_swap_mode:
c0f3af97
L
13070 case dq_mode:
13071 case dqb_mode:
13072 case dqd_mode:
13073 case dqw_mode:
13074 USED_REX (REX_W);
13075 if (rex & REX_W)
13076 names = names64;
c0f3af97 13077 else
f16cd0d5
L
13078 {
13079 if ((sizeflag & DFLAG)
13080 || (bytemode != v_mode
13081 && bytemode != v_swap_mode))
13082 names = names32;
13083 else
13084 names = names16;
13085 used_prefixes |= (prefixes & PREFIX_DATA);
13086 }
c0f3af97
L
13087 break;
13088 case 0:
13089 return;
13090 default:
13091 oappend (INTERNAL_DISASSEMBLER_ERROR);
252b5132
RH
13092 return;
13093 }
c0f3af97
L
13094 oappend (names[reg]);
13095}
13096
13097static void
c1e679ec 13098OP_E_memory (int bytemode, int sizeflag)
c0f3af97
L
13099{
13100 bfd_vma disp = 0;
13101 int add = (rex & REX_B) ? 8 : 0;
13102 int riprel = 0;
252b5132 13103
c0f3af97 13104 USED_REX (REX_B);
3f31e633
JB
13105 if (intel_syntax)
13106 intel_operand_size (bytemode, sizeflag);
252b5132
RH
13107 append_seg ();
13108
5d669648 13109 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132 13110 {
5d669648
L
13111 /* 32/64 bit address mode */
13112 int havedisp;
252b5132
RH
13113 int havesib;
13114 int havebase;
0f7da397 13115 int haveindex;
20afcfb7 13116 int needindex;
82c18208 13117 int base, rbase;
91d6fa6a 13118 int vindex = 0;
252b5132
RH
13119 int scale = 0;
13120
13121 havesib = 0;
13122 havebase = 1;
0f7da397 13123 haveindex = 0;
7967e09e 13124 base = modrm.rm;
252b5132
RH
13125
13126 if (base == 4)
13127 {
13128 havesib = 1;
dfc8cf43
L
13129 vindex = sib.index;
13130 scale = sib.scale;
13131 base = sib.base;
161a04f6
L
13132 USED_REX (REX_X);
13133 if (rex & REX_X)
91d6fa6a
NC
13134 vindex += 8;
13135 haveindex = vindex != 4;
252b5132
RH
13136 codep++;
13137 }
82c18208 13138 rbase = base + add;
252b5132 13139
7967e09e 13140 switch (modrm.mod)
252b5132
RH
13141 {
13142 case 0:
82c18208 13143 if (base == 5)
252b5132
RH
13144 {
13145 havebase = 0;
cb712a9e 13146 if (address_mode == mode_64bit && !havesib)
52b15da3
JH
13147 riprel = 1;
13148 disp = get32s ();
252b5132
RH
13149 }
13150 break;
13151 case 1:
13152 FETCH_DATA (the_info, codep + 1);
13153 disp = *codep++;
13154 if ((disp & 0x80) != 0)
13155 disp -= 0x100;
13156 break;
13157 case 2:
52b15da3 13158 disp = get32s ();
252b5132
RH
13159 break;
13160 }
13161
20afcfb7
L
13162 /* In 32bit mode, we need index register to tell [offset] from
13163 [eiz*1 + offset]. */
13164 needindex = (havesib
13165 && !havebase
13166 && !haveindex
13167 && address_mode == mode_32bit);
13168 havedisp = (havebase
13169 || needindex
13170 || (havesib && (haveindex || scale != 0)));
5d669648 13171
252b5132 13172 if (!intel_syntax)
82c18208 13173 if (modrm.mod != 0 || base == 5)
db6eb5be 13174 {
5d669648
L
13175 if (havedisp || riprel)
13176 print_displacement (scratchbuf, disp);
13177 else
13178 print_operand_value (scratchbuf, 1, disp);
db6eb5be 13179 oappend (scratchbuf);
52b15da3
JH
13180 if (riprel)
13181 {
13182 set_op (disp, 1);
87767711 13183 oappend (sizeflag & AFLAG ? "(%rip)" : "(%eip)");
52b15da3 13184 }
db6eb5be 13185 }
2da11e11 13186
87767711
JB
13187 if (havebase || haveindex || riprel)
13188 used_prefixes |= PREFIX_ADDR;
13189
5d669648 13190 if (havedisp || (intel_syntax && riprel))
252b5132 13191 {
252b5132 13192 *obufp++ = open_char;
52b15da3 13193 if (intel_syntax && riprel)
185b1163
L
13194 {
13195 set_op (disp, 1);
87767711 13196 oappend (sizeflag & AFLAG ? "rip" : "eip");
185b1163 13197 }
db6eb5be 13198 *obufp = '\0';
252b5132 13199 if (havebase)
cb712a9e 13200 oappend (address_mode == mode_64bit && (sizeflag & AFLAG)
82c18208 13201 ? names64[rbase] : names32[rbase]);
252b5132
RH
13202 if (havesib)
13203 {
db51cc60
L
13204 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
13205 print index to tell base + index from base. */
13206 if (scale != 0
20afcfb7 13207 || needindex
db51cc60
L
13208 || haveindex
13209 || (havebase && base != ESP_REG_NUM))
252b5132 13210 {
9306ca4a 13211 if (!intel_syntax || havebase)
db6eb5be 13212 {
9306ca4a
JB
13213 *obufp++ = separator_char;
13214 *obufp = '\0';
db6eb5be 13215 }
db51cc60
L
13216 if (haveindex)
13217 oappend (address_mode == mode_64bit
13218 && (sizeflag & AFLAG)
91d6fa6a 13219 ? names64[vindex] : names32[vindex]);
db51cc60
L
13220 else
13221 oappend (address_mode == mode_64bit
13222 && (sizeflag & AFLAG)
13223 ? index64 : index32);
13224
db6eb5be
AM
13225 *obufp++ = scale_char;
13226 *obufp = '\0';
13227 sprintf (scratchbuf, "%d", 1 << scale);
13228 oappend (scratchbuf);
13229 }
252b5132 13230 }
185b1163 13231 if (intel_syntax
82c18208 13232 && (disp || modrm.mod != 0 || base == 5))
3d456fa1 13233 {
db51cc60 13234 if (!havedisp || (bfd_signed_vma) disp >= 0)
3d456fa1
JB
13235 {
13236 *obufp++ = '+';
13237 *obufp = '\0';
13238 }
05203043 13239 else if (modrm.mod != 1 && disp != -disp)
3d456fa1
JB
13240 {
13241 *obufp++ = '-';
13242 *obufp = '\0';
13243 disp = - (bfd_signed_vma) disp;
13244 }
13245
db51cc60
L
13246 if (havedisp)
13247 print_displacement (scratchbuf, disp);
13248 else
13249 print_operand_value (scratchbuf, 1, disp);
3d456fa1
JB
13250 oappend (scratchbuf);
13251 }
252b5132
RH
13252
13253 *obufp++ = close_char;
db6eb5be 13254 *obufp = '\0';
252b5132
RH
13255 }
13256 else if (intel_syntax)
db6eb5be 13257 {
82c18208 13258 if (modrm.mod != 0 || base == 5)
db6eb5be 13259 {
252b5132
RH
13260 if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
13261 | PREFIX_ES | PREFIX_FS | PREFIX_GS))
13262 ;
13263 else
13264 {
d708bcba 13265 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
13266 oappend (":");
13267 }
52b15da3 13268 print_operand_value (scratchbuf, 1, disp);
db6eb5be
AM
13269 oappend (scratchbuf);
13270 }
13271 }
252b5132
RH
13272 }
13273 else
f16cd0d5
L
13274 {
13275 /* 16 bit address mode */
13276 used_prefixes |= prefixes & PREFIX_ADDR;
7967e09e 13277 switch (modrm.mod)
252b5132
RH
13278 {
13279 case 0:
7967e09e 13280 if (modrm.rm == 6)
252b5132
RH
13281 {
13282 disp = get16 ();
13283 if ((disp & 0x8000) != 0)
13284 disp -= 0x10000;
13285 }
13286 break;
13287 case 1:
13288 FETCH_DATA (the_info, codep + 1);
13289 disp = *codep++;
13290 if ((disp & 0x80) != 0)
13291 disp -= 0x100;
13292 break;
13293 case 2:
13294 disp = get16 ();
13295 if ((disp & 0x8000) != 0)
13296 disp -= 0x10000;
13297 break;
13298 }
13299
13300 if (!intel_syntax)
7967e09e 13301 if (modrm.mod != 0 || modrm.rm == 6)
db6eb5be 13302 {
5d669648 13303 print_displacement (scratchbuf, disp);
db6eb5be
AM
13304 oappend (scratchbuf);
13305 }
252b5132 13306
7967e09e 13307 if (modrm.mod != 0 || modrm.rm != 6)
252b5132
RH
13308 {
13309 *obufp++ = open_char;
db6eb5be 13310 *obufp = '\0';
7967e09e 13311 oappend (index16[modrm.rm]);
5d669648
L
13312 if (intel_syntax
13313 && (disp || modrm.mod != 0 || modrm.rm == 6))
3d456fa1 13314 {
5d669648 13315 if ((bfd_signed_vma) disp >= 0)
3d456fa1
JB
13316 {
13317 *obufp++ = '+';
13318 *obufp = '\0';
13319 }
7967e09e 13320 else if (modrm.mod != 1)
3d456fa1
JB
13321 {
13322 *obufp++ = '-';
13323 *obufp = '\0';
13324 disp = - (bfd_signed_vma) disp;
13325 }
13326
5d669648 13327 print_displacement (scratchbuf, disp);
3d456fa1
JB
13328 oappend (scratchbuf);
13329 }
13330
db6eb5be
AM
13331 *obufp++ = close_char;
13332 *obufp = '\0';
252b5132 13333 }
3d456fa1
JB
13334 else if (intel_syntax)
13335 {
13336 if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
13337 | PREFIX_ES | PREFIX_FS | PREFIX_GS))
13338 ;
13339 else
13340 {
13341 oappend (names_seg[ds_reg - es_reg]);
13342 oappend (":");
13343 }
13344 print_operand_value (scratchbuf, 1, disp & 0xffff);
13345 oappend (scratchbuf);
13346 }
252b5132
RH
13347 }
13348}
13349
c0f3af97 13350static void
8b3f93e7 13351OP_E (int bytemode, int sizeflag)
c0f3af97
L
13352{
13353 /* Skip mod/rm byte. */
13354 MODRM_CHECK;
13355 codep++;
13356
13357 if (modrm.mod == 3)
13358 OP_E_register (bytemode, sizeflag);
13359 else
c1e679ec 13360 OP_E_memory (bytemode, sizeflag);
c0f3af97
L
13361}
13362
252b5132 13363static void
26ca5450 13364OP_G (int bytemode, int sizeflag)
252b5132 13365{
52b15da3 13366 int add = 0;
161a04f6
L
13367 USED_REX (REX_R);
13368 if (rex & REX_R)
52b15da3 13369 add += 8;
252b5132
RH
13370 switch (bytemode)
13371 {
13372 case b_mode:
52b15da3
JH
13373 USED_REX (0);
13374 if (rex)
7967e09e 13375 oappend (names8rex[modrm.reg + add]);
52b15da3 13376 else
7967e09e 13377 oappend (names8[modrm.reg + add]);
252b5132
RH
13378 break;
13379 case w_mode:
7967e09e 13380 oappend (names16[modrm.reg + add]);
252b5132
RH
13381 break;
13382 case d_mode:
7967e09e 13383 oappend (names32[modrm.reg + add]);
52b15da3
JH
13384 break;
13385 case q_mode:
7967e09e 13386 oappend (names64[modrm.reg + add]);
252b5132
RH
13387 break;
13388 case v_mode:
9306ca4a 13389 case dq_mode:
42903f7f
L
13390 case dqb_mode:
13391 case dqd_mode:
9306ca4a 13392 case dqw_mode:
161a04f6
L
13393 USED_REX (REX_W);
13394 if (rex & REX_W)
7967e09e 13395 oappend (names64[modrm.reg + add]);
252b5132 13396 else
f16cd0d5
L
13397 {
13398 if ((sizeflag & DFLAG) || bytemode != v_mode)
13399 oappend (names32[modrm.reg + add]);
13400 else
13401 oappend (names16[modrm.reg + add]);
13402 used_prefixes |= (prefixes & PREFIX_DATA);
13403 }
252b5132 13404 break;
90700ea2 13405 case m_mode:
cb712a9e 13406 if (address_mode == mode_64bit)
7967e09e 13407 oappend (names64[modrm.reg + add]);
90700ea2 13408 else
7967e09e 13409 oappend (names32[modrm.reg + add]);
90700ea2 13410 break;
252b5132
RH
13411 default:
13412 oappend (INTERNAL_DISASSEMBLER_ERROR);
13413 break;
13414 }
13415}
13416
52b15da3 13417static bfd_vma
26ca5450 13418get64 (void)
52b15da3 13419{
5dd0794d 13420 bfd_vma x;
52b15da3 13421#ifdef BFD64
5dd0794d
AM
13422 unsigned int a;
13423 unsigned int b;
13424
52b15da3
JH
13425 FETCH_DATA (the_info, codep + 8);
13426 a = *codep++ & 0xff;
13427 a |= (*codep++ & 0xff) << 8;
13428 a |= (*codep++ & 0xff) << 16;
13429 a |= (*codep++ & 0xff) << 24;
5dd0794d 13430 b = *codep++ & 0xff;
52b15da3
JH
13431 b |= (*codep++ & 0xff) << 8;
13432 b |= (*codep++ & 0xff) << 16;
13433 b |= (*codep++ & 0xff) << 24;
13434 x = a + ((bfd_vma) b << 32);
13435#else
6608db57 13436 abort ();
5dd0794d 13437 x = 0;
52b15da3
JH
13438#endif
13439 return x;
13440}
13441
13442static bfd_signed_vma
26ca5450 13443get32 (void)
252b5132 13444{
52b15da3 13445 bfd_signed_vma x = 0;
252b5132
RH
13446
13447 FETCH_DATA (the_info, codep + 4);
52b15da3
JH
13448 x = *codep++ & (bfd_signed_vma) 0xff;
13449 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
13450 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
13451 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
13452 return x;
13453}
13454
13455static bfd_signed_vma
26ca5450 13456get32s (void)
52b15da3
JH
13457{
13458 bfd_signed_vma x = 0;
13459
13460 FETCH_DATA (the_info, codep + 4);
13461 x = *codep++ & (bfd_signed_vma) 0xff;
13462 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
13463 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
13464 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
13465
13466 x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
13467
252b5132
RH
13468 return x;
13469}
13470
13471static int
26ca5450 13472get16 (void)
252b5132
RH
13473{
13474 int x = 0;
13475
13476 FETCH_DATA (the_info, codep + 2);
13477 x = *codep++ & 0xff;
13478 x |= (*codep++ & 0xff) << 8;
13479 return x;
13480}
13481
13482static void
26ca5450 13483set_op (bfd_vma op, int riprel)
252b5132
RH
13484{
13485 op_index[op_ad] = op_ad;
cb712a9e 13486 if (address_mode == mode_64bit)
7081ff04
AJ
13487 {
13488 op_address[op_ad] = op;
13489 op_riprel[op_ad] = riprel;
13490 }
13491 else
13492 {
13493 /* Mask to get a 32-bit address. */
13494 op_address[op_ad] = op & 0xffffffff;
13495 op_riprel[op_ad] = riprel & 0xffffffff;
13496 }
252b5132
RH
13497}
13498
13499static void
26ca5450 13500OP_REG (int code, int sizeflag)
252b5132 13501{
2da11e11 13502 const char *s;
9b60702d 13503 int add;
161a04f6
L
13504 USED_REX (REX_B);
13505 if (rex & REX_B)
52b15da3 13506 add = 8;
9b60702d
L
13507 else
13508 add = 0;
52b15da3
JH
13509
13510 switch (code)
13511 {
52b15da3
JH
13512 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
13513 case sp_reg: case bp_reg: case si_reg: case di_reg:
13514 s = names16[code - ax_reg + add];
13515 break;
13516 case es_reg: case ss_reg: case cs_reg:
13517 case ds_reg: case fs_reg: case gs_reg:
13518 s = names_seg[code - es_reg + add];
13519 break;
13520 case al_reg: case ah_reg: case cl_reg: case ch_reg:
13521 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
13522 USED_REX (0);
13523 if (rex)
13524 s = names8rex[code - al_reg + add];
13525 else
13526 s = names8[code - al_reg];
13527 break;
6439fc28
AM
13528 case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
13529 case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
cb712a9e 13530 if (address_mode == mode_64bit && (sizeflag & DFLAG))
6439fc28
AM
13531 {
13532 s = names64[code - rAX_reg + add];
13533 break;
13534 }
13535 code += eAX_reg - rAX_reg;
6608db57 13536 /* Fall through. */
52b15da3
JH
13537 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
13538 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
13539 USED_REX (REX_W);
13540 if (rex & REX_W)
52b15da3 13541 s = names64[code - eAX_reg + add];
52b15da3 13542 else
f16cd0d5
L
13543 {
13544 if (sizeflag & DFLAG)
13545 s = names32[code - eAX_reg + add];
13546 else
13547 s = names16[code - eAX_reg + add];
13548 used_prefixes |= (prefixes & PREFIX_DATA);
13549 }
52b15da3 13550 break;
52b15da3
JH
13551 default:
13552 s = INTERNAL_DISASSEMBLER_ERROR;
13553 break;
13554 }
13555 oappend (s);
13556}
13557
13558static void
26ca5450 13559OP_IMREG (int code, int sizeflag)
52b15da3
JH
13560{
13561 const char *s;
252b5132
RH
13562
13563 switch (code)
13564 {
13565 case indir_dx_reg:
d708bcba 13566 if (intel_syntax)
52fd6d94 13567 s = "dx";
d708bcba 13568 else
db6eb5be 13569 s = "(%dx)";
252b5132
RH
13570 break;
13571 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
13572 case sp_reg: case bp_reg: case si_reg: case di_reg:
13573 s = names16[code - ax_reg];
13574 break;
13575 case es_reg: case ss_reg: case cs_reg:
13576 case ds_reg: case fs_reg: case gs_reg:
13577 s = names_seg[code - es_reg];
13578 break;
13579 case al_reg: case ah_reg: case cl_reg: case ch_reg:
13580 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
52b15da3
JH
13581 USED_REX (0);
13582 if (rex)
13583 s = names8rex[code - al_reg];
13584 else
13585 s = names8[code - al_reg];
252b5132
RH
13586 break;
13587 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
13588 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
13589 USED_REX (REX_W);
13590 if (rex & REX_W)
52b15da3 13591 s = names64[code - eAX_reg];
252b5132 13592 else
f16cd0d5
L
13593 {
13594 if (sizeflag & DFLAG)
13595 s = names32[code - eAX_reg];
13596 else
13597 s = names16[code - eAX_reg];
13598 used_prefixes |= (prefixes & PREFIX_DATA);
13599 }
252b5132 13600 break;
52fd6d94 13601 case z_mode_ax_reg:
161a04f6 13602 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
13603 s = *names32;
13604 else
13605 s = *names16;
161a04f6 13606 if (!(rex & REX_W))
52fd6d94
JB
13607 used_prefixes |= (prefixes & PREFIX_DATA);
13608 break;
252b5132
RH
13609 default:
13610 s = INTERNAL_DISASSEMBLER_ERROR;
13611 break;
13612 }
13613 oappend (s);
13614}
13615
13616static void
26ca5450 13617OP_I (int bytemode, int sizeflag)
252b5132 13618{
52b15da3
JH
13619 bfd_signed_vma op;
13620 bfd_signed_vma mask = -1;
252b5132
RH
13621
13622 switch (bytemode)
13623 {
13624 case b_mode:
13625 FETCH_DATA (the_info, codep + 1);
52b15da3
JH
13626 op = *codep++;
13627 mask = 0xff;
13628 break;
13629 case q_mode:
cb712a9e 13630 if (address_mode == mode_64bit)
6439fc28
AM
13631 {
13632 op = get32s ();
13633 break;
13634 }
6608db57 13635 /* Fall through. */
252b5132 13636 case v_mode:
161a04f6
L
13637 USED_REX (REX_W);
13638 if (rex & REX_W)
52b15da3 13639 op = get32s ();
252b5132 13640 else
52b15da3 13641 {
f16cd0d5
L
13642 if (sizeflag & DFLAG)
13643 {
13644 op = get32 ();
13645 mask = 0xffffffff;
13646 }
13647 else
13648 {
13649 op = get16 ();
13650 mask = 0xfffff;
13651 }
13652 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 13653 }
252b5132
RH
13654 break;
13655 case w_mode:
52b15da3 13656 mask = 0xfffff;
252b5132
RH
13657 op = get16 ();
13658 break;
9306ca4a
JB
13659 case const_1_mode:
13660 if (intel_syntax)
13661 oappend ("1");
13662 return;
252b5132
RH
13663 default:
13664 oappend (INTERNAL_DISASSEMBLER_ERROR);
13665 return;
13666 }
13667
52b15da3
JH
13668 op &= mask;
13669 scratchbuf[0] = '$';
d708bcba
AM
13670 print_operand_value (scratchbuf + 1, 1, op);
13671 oappend (scratchbuf + intel_syntax);
52b15da3
JH
13672 scratchbuf[0] = '\0';
13673}
13674
13675static void
26ca5450 13676OP_I64 (int bytemode, int sizeflag)
52b15da3
JH
13677{
13678 bfd_signed_vma op;
13679 bfd_signed_vma mask = -1;
13680
cb712a9e 13681 if (address_mode != mode_64bit)
6439fc28
AM
13682 {
13683 OP_I (bytemode, sizeflag);
13684 return;
13685 }
13686
52b15da3
JH
13687 switch (bytemode)
13688 {
13689 case b_mode:
13690 FETCH_DATA (the_info, codep + 1);
13691 op = *codep++;
13692 mask = 0xff;
13693 break;
13694 case v_mode:
161a04f6
L
13695 USED_REX (REX_W);
13696 if (rex & REX_W)
52b15da3 13697 op = get64 ();
52b15da3
JH
13698 else
13699 {
f16cd0d5
L
13700 if (sizeflag & DFLAG)
13701 {
13702 op = get32 ();
13703 mask = 0xffffffff;
13704 }
13705 else
13706 {
13707 op = get16 ();
13708 mask = 0xfffff;
13709 }
13710 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 13711 }
52b15da3
JH
13712 break;
13713 case w_mode:
13714 mask = 0xfffff;
13715 op = get16 ();
13716 break;
13717 default:
13718 oappend (INTERNAL_DISASSEMBLER_ERROR);
13719 return;
13720 }
13721
13722 op &= mask;
13723 scratchbuf[0] = '$';
d708bcba
AM
13724 print_operand_value (scratchbuf + 1, 1, op);
13725 oappend (scratchbuf + intel_syntax);
252b5132
RH
13726 scratchbuf[0] = '\0';
13727}
13728
13729static void
26ca5450 13730OP_sI (int bytemode, int sizeflag)
252b5132 13731{
52b15da3 13732 bfd_signed_vma op;
252b5132
RH
13733
13734 switch (bytemode)
13735 {
13736 case b_mode:
e3949f17 13737 case b_T_mode:
252b5132
RH
13738 FETCH_DATA (the_info, codep + 1);
13739 op = *codep++;
13740 if ((op & 0x80) != 0)
13741 op -= 0x100;
e3949f17
L
13742 if (bytemode == b_T_mode)
13743 {
13744 if (address_mode != mode_64bit
13745 || !(sizeflag & DFLAG))
13746 {
13747 if (sizeflag & DFLAG)
13748 op &= 0xffffffff;
13749 else
13750 op &= 0xffff;
13751 }
13752 }
13753 else
13754 {
13755 if (!(rex & REX_W))
13756 {
13757 if (sizeflag & DFLAG)
13758 op &= 0xffffffff;
13759 else
13760 op &= 0xffff;
13761 }
13762 }
252b5132
RH
13763 break;
13764 case v_mode:
d9e3625e 13765 if (sizeflag & DFLAG)
52b15da3 13766 op = get32s ();
252b5132 13767 else
d9e3625e 13768 op = get16 ();
252b5132
RH
13769 break;
13770 default:
13771 oappend (INTERNAL_DISASSEMBLER_ERROR);
13772 return;
13773 }
52b15da3
JH
13774
13775 scratchbuf[0] = '$';
13776 print_operand_value (scratchbuf + 1, 1, op);
d708bcba 13777 oappend (scratchbuf + intel_syntax);
252b5132
RH
13778}
13779
13780static void
26ca5450 13781OP_J (int bytemode, int sizeflag)
252b5132 13782{
52b15da3 13783 bfd_vma disp;
7081ff04 13784 bfd_vma mask = -1;
65ca155d 13785 bfd_vma segment = 0;
252b5132
RH
13786
13787 switch (bytemode)
13788 {
13789 case b_mode:
13790 FETCH_DATA (the_info, codep + 1);
13791 disp = *codep++;
13792 if ((disp & 0x80) != 0)
13793 disp -= 0x100;
13794 break;
13795 case v_mode:
f16cd0d5 13796 USED_REX (REX_W);
161a04f6 13797 if ((sizeflag & DFLAG) || (rex & REX_W))
52b15da3 13798 disp = get32s ();
252b5132
RH
13799 else
13800 {
13801 disp = get16 ();
206717e8
L
13802 if ((disp & 0x8000) != 0)
13803 disp -= 0x10000;
65ca155d
L
13804 /* In 16bit mode, address is wrapped around at 64k within
13805 the same segment. Otherwise, a data16 prefix on a jump
13806 instruction means that the pc is masked to 16 bits after
13807 the displacement is added! */
13808 mask = 0xffff;
13809 if ((prefixes & PREFIX_DATA) == 0)
13810 segment = ((start_pc + codep - start_codep)
13811 & ~((bfd_vma) 0xffff));
252b5132 13812 }
f16cd0d5
L
13813 if (!(rex & REX_W))
13814 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132
RH
13815 break;
13816 default:
13817 oappend (INTERNAL_DISASSEMBLER_ERROR);
13818 return;
13819 }
42d5f9c6 13820 disp = ((start_pc + (codep - start_codep) + disp) & mask) | segment;
52b15da3
JH
13821 set_op (disp, 0);
13822 print_operand_value (scratchbuf, 1, disp);
252b5132
RH
13823 oappend (scratchbuf);
13824}
13825
252b5132 13826static void
ed7841b3 13827OP_SEG (int bytemode, int sizeflag)
252b5132 13828{
ed7841b3 13829 if (bytemode == w_mode)
7967e09e 13830 oappend (names_seg[modrm.reg]);
ed7841b3 13831 else
7967e09e 13832 OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
252b5132
RH
13833}
13834
13835static void
26ca5450 13836OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
252b5132
RH
13837{
13838 int seg, offset;
13839
c608c12e 13840 if (sizeflag & DFLAG)
252b5132 13841 {
c608c12e
AM
13842 offset = get32 ();
13843 seg = get16 ();
252b5132 13844 }
c608c12e
AM
13845 else
13846 {
13847 offset = get16 ();
13848 seg = get16 ();
13849 }
7d421014 13850 used_prefixes |= (prefixes & PREFIX_DATA);
d708bcba 13851 if (intel_syntax)
3f31e633 13852 sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
d708bcba
AM
13853 else
13854 sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
c608c12e 13855 oappend (scratchbuf);
252b5132
RH
13856}
13857
252b5132 13858static void
3f31e633 13859OP_OFF (int bytemode, int sizeflag)
252b5132 13860{
52b15da3 13861 bfd_vma off;
252b5132 13862
3f31e633
JB
13863 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
13864 intel_operand_size (bytemode, sizeflag);
252b5132
RH
13865 append_seg ();
13866
cb712a9e 13867 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132
RH
13868 off = get32 ();
13869 else
13870 off = get16 ();
13871
13872 if (intel_syntax)
13873 {
13874 if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
db6eb5be 13875 | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
252b5132 13876 {
d708bcba 13877 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
13878 oappend (":");
13879 }
13880 }
52b15da3
JH
13881 print_operand_value (scratchbuf, 1, off);
13882 oappend (scratchbuf);
13883}
6439fc28 13884
52b15da3 13885static void
3f31e633 13886OP_OFF64 (int bytemode, int sizeflag)
52b15da3
JH
13887{
13888 bfd_vma off;
13889
539e75ad
L
13890 if (address_mode != mode_64bit
13891 || (prefixes & PREFIX_ADDR))
6439fc28
AM
13892 {
13893 OP_OFF (bytemode, sizeflag);
13894 return;
13895 }
13896
3f31e633
JB
13897 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
13898 intel_operand_size (bytemode, sizeflag);
52b15da3
JH
13899 append_seg ();
13900
6608db57 13901 off = get64 ();
52b15da3
JH
13902
13903 if (intel_syntax)
13904 {
13905 if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
db6eb5be 13906 | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
52b15da3 13907 {
d708bcba 13908 oappend (names_seg[ds_reg - es_reg]);
52b15da3
JH
13909 oappend (":");
13910 }
13911 }
13912 print_operand_value (scratchbuf, 1, off);
252b5132
RH
13913 oappend (scratchbuf);
13914}
13915
13916static void
26ca5450 13917ptr_reg (int code, int sizeflag)
252b5132 13918{
2da11e11 13919 const char *s;
d708bcba 13920
1d9f512f 13921 *obufp++ = open_char;
20f0a1fc 13922 used_prefixes |= (prefixes & PREFIX_ADDR);
cb712a9e 13923 if (address_mode == mode_64bit)
c1a64871
JH
13924 {
13925 if (!(sizeflag & AFLAG))
db6eb5be 13926 s = names32[code - eAX_reg];
c1a64871 13927 else
db6eb5be 13928 s = names64[code - eAX_reg];
c1a64871 13929 }
52b15da3 13930 else if (sizeflag & AFLAG)
252b5132
RH
13931 s = names32[code - eAX_reg];
13932 else
13933 s = names16[code - eAX_reg];
13934 oappend (s);
1d9f512f
AM
13935 *obufp++ = close_char;
13936 *obufp = 0;
252b5132
RH
13937}
13938
13939static void
26ca5450 13940OP_ESreg (int code, int sizeflag)
252b5132 13941{
9306ca4a 13942 if (intel_syntax)
52fd6d94
JB
13943 {
13944 switch (codep[-1])
13945 {
13946 case 0x6d: /* insw/insl */
13947 intel_operand_size (z_mode, sizeflag);
13948 break;
13949 case 0xa5: /* movsw/movsl/movsq */
13950 case 0xa7: /* cmpsw/cmpsl/cmpsq */
13951 case 0xab: /* stosw/stosl */
13952 case 0xaf: /* scasw/scasl */
13953 intel_operand_size (v_mode, sizeflag);
13954 break;
13955 default:
13956 intel_operand_size (b_mode, sizeflag);
13957 }
13958 }
d708bcba 13959 oappend ("%es:" + intel_syntax);
252b5132
RH
13960 ptr_reg (code, sizeflag);
13961}
13962
13963static void
26ca5450 13964OP_DSreg (int code, int sizeflag)
252b5132 13965{
9306ca4a 13966 if (intel_syntax)
52fd6d94
JB
13967 {
13968 switch (codep[-1])
13969 {
13970 case 0x6f: /* outsw/outsl */
13971 intel_operand_size (z_mode, sizeflag);
13972 break;
13973 case 0xa5: /* movsw/movsl/movsq */
13974 case 0xa7: /* cmpsw/cmpsl/cmpsq */
13975 case 0xad: /* lodsw/lodsl/lodsq */
13976 intel_operand_size (v_mode, sizeflag);
13977 break;
13978 default:
13979 intel_operand_size (b_mode, sizeflag);
13980 }
13981 }
252b5132
RH
13982 if ((prefixes
13983 & (PREFIX_CS
13984 | PREFIX_DS
13985 | PREFIX_SS
13986 | PREFIX_ES
13987 | PREFIX_FS
13988 | PREFIX_GS)) == 0)
13989 prefixes |= PREFIX_DS;
6608db57 13990 append_seg ();
252b5132
RH
13991 ptr_reg (code, sizeflag);
13992}
13993
252b5132 13994static void
26ca5450 13995OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 13996{
9b60702d 13997 int add;
161a04f6 13998 if (rex & REX_R)
c4a530c5 13999 {
161a04f6 14000 USED_REX (REX_R);
c4a530c5
JB
14001 add = 8;
14002 }
cb712a9e 14003 else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
c4a530c5 14004 {
f16cd0d5 14005 all_prefixes[last_lock_prefix] = 0;
c4a530c5
JB
14006 used_prefixes |= PREFIX_LOCK;
14007 add = 8;
14008 }
9b60702d
L
14009 else
14010 add = 0;
7967e09e 14011 sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
d708bcba 14012 oappend (scratchbuf + intel_syntax);
252b5132
RH
14013}
14014
252b5132 14015static void
26ca5450 14016OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14017{
9b60702d 14018 int add;
161a04f6
L
14019 USED_REX (REX_R);
14020 if (rex & REX_R)
52b15da3 14021 add = 8;
9b60702d
L
14022 else
14023 add = 0;
d708bcba 14024 if (intel_syntax)
7967e09e 14025 sprintf (scratchbuf, "db%d", modrm.reg + add);
d708bcba 14026 else
7967e09e 14027 sprintf (scratchbuf, "%%db%d", modrm.reg + add);
252b5132
RH
14028 oappend (scratchbuf);
14029}
14030
252b5132 14031static void
26ca5450 14032OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14033{
7967e09e 14034 sprintf (scratchbuf, "%%tr%d", modrm.reg);
d708bcba 14035 oappend (scratchbuf + intel_syntax);
252b5132
RH
14036}
14037
14038static void
6f74c397 14039OP_R (int bytemode, int sizeflag)
252b5132 14040{
7967e09e 14041 if (modrm.mod == 3)
2da11e11
AM
14042 OP_E (bytemode, sizeflag);
14043 else
6608db57 14044 BadOp ();
252b5132
RH
14045}
14046
14047static void
26ca5450 14048OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14049{
b9733481
L
14050 int reg = modrm.reg;
14051 const char **names;
14052
041bd2e0
JH
14053 used_prefixes |= (prefixes & PREFIX_DATA);
14054 if (prefixes & PREFIX_DATA)
20f0a1fc 14055 {
b9733481 14056 names = names_xmm;
161a04f6
L
14057 USED_REX (REX_R);
14058 if (rex & REX_R)
b9733481 14059 reg += 8;
20f0a1fc 14060 }
041bd2e0 14061 else
b9733481
L
14062 names = names_mm;
14063 oappend (names[reg]);
252b5132
RH
14064}
14065
c608c12e 14066static void
c0f3af97 14067OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
c608c12e 14068{
b9733481
L
14069 int reg = modrm.reg;
14070 const char **names;
14071
161a04f6
L
14072 USED_REX (REX_R);
14073 if (rex & REX_R)
b9733481 14074 reg += 8;
539f890d
L
14075 if (need_vex
14076 && bytemode != xmm_mode
14077 && bytemode != scalar_mode)
c0f3af97
L
14078 {
14079 switch (vex.length)
14080 {
14081 case 128:
b9733481 14082 names = names_xmm;
c0f3af97
L
14083 break;
14084 case 256:
b9733481 14085 names = names_ymm;
c0f3af97
L
14086 break;
14087 default:
14088 abort ();
14089 }
14090 }
14091 else
b9733481
L
14092 names = names_xmm;
14093 oappend (names[reg]);
c608c12e
AM
14094}
14095
252b5132 14096static void
26ca5450 14097OP_EM (int bytemode, int sizeflag)
252b5132 14098{
b9733481
L
14099 int reg;
14100 const char **names;
14101
7967e09e 14102 if (modrm.mod != 3)
252b5132 14103 {
b6169b20
L
14104 if (intel_syntax
14105 && (bytemode == v_mode || bytemode == v_swap_mode))
9306ca4a
JB
14106 {
14107 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
14108 used_prefixes |= (prefixes & PREFIX_DATA);
14109 }
252b5132
RH
14110 OP_E (bytemode, sizeflag);
14111 return;
14112 }
14113
b6169b20
L
14114 if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
14115 swap_operand ();
14116
6608db57 14117 /* Skip mod/rm byte. */
4bba6815 14118 MODRM_CHECK;
252b5132 14119 codep++;
041bd2e0 14120 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 14121 reg = modrm.rm;
041bd2e0 14122 if (prefixes & PREFIX_DATA)
20f0a1fc 14123 {
b9733481 14124 names = names_xmm;
161a04f6
L
14125 USED_REX (REX_B);
14126 if (rex & REX_B)
b9733481 14127 reg += 8;
20f0a1fc 14128 }
041bd2e0 14129 else
b9733481
L
14130 names = names_mm;
14131 oappend (names[reg]);
252b5132
RH
14132}
14133
246c51aa
L
14134/* cvt* are the only instructions in sse2 which have
14135 both SSE and MMX operands and also have 0x66 prefix
14136 in their opcode. 0x66 was originally used to differentiate
14137 between SSE and MMX instruction(operands). So we have to handle the
4d9567e0
MM
14138 cvt* separately using OP_EMC and OP_MXC */
14139static void
14140OP_EMC (int bytemode, int sizeflag)
14141{
7967e09e 14142 if (modrm.mod != 3)
4d9567e0
MM
14143 {
14144 if (intel_syntax && bytemode == v_mode)
14145 {
14146 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
14147 used_prefixes |= (prefixes & PREFIX_DATA);
14148 }
14149 OP_E (bytemode, sizeflag);
14150 return;
14151 }
246c51aa 14152
4d9567e0
MM
14153 /* Skip mod/rm byte. */
14154 MODRM_CHECK;
14155 codep++;
14156 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 14157 oappend (names_mm[modrm.rm]);
4d9567e0
MM
14158}
14159
14160static void
14161OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
14162{
14163 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 14164 oappend (names_mm[modrm.reg]);
4d9567e0
MM
14165}
14166
c608c12e 14167static void
26ca5450 14168OP_EX (int bytemode, int sizeflag)
c608c12e 14169{
b9733481
L
14170 int reg;
14171 const char **names;
d6f574e0
L
14172
14173 /* Skip mod/rm byte. */
14174 MODRM_CHECK;
14175 codep++;
14176
7967e09e 14177 if (modrm.mod != 3)
c608c12e 14178 {
c1e679ec 14179 OP_E_memory (bytemode, sizeflag);
c608c12e
AM
14180 return;
14181 }
d6f574e0 14182
b9733481 14183 reg = modrm.rm;
161a04f6
L
14184 USED_REX (REX_B);
14185 if (rex & REX_B)
b9733481 14186 reg += 8;
c608c12e 14187
b6169b20 14188 if ((sizeflag & SUFFIX_ALWAYS)
fa99fab2
L
14189 && (bytemode == x_swap_mode
14190 || bytemode == d_swap_mode
539f890d
L
14191 || bytemode == d_scalar_swap_mode
14192 || bytemode == q_swap_mode
14193 || bytemode == q_scalar_swap_mode))
b6169b20
L
14194 swap_operand ();
14195
c0f3af97
L
14196 if (need_vex
14197 && bytemode != xmm_mode
539f890d
L
14198 && bytemode != xmmq_mode
14199 && bytemode != d_scalar_mode
14200 && bytemode != d_scalar_swap_mode
14201 && bytemode != q_scalar_mode
1c480963
L
14202 && bytemode != q_scalar_swap_mode
14203 && bytemode != vex_scalar_w_dq_mode)
c0f3af97
L
14204 {
14205 switch (vex.length)
14206 {
14207 case 128:
b9733481 14208 names = names_xmm;
c0f3af97
L
14209 break;
14210 case 256:
b9733481 14211 names = names_ymm;
c0f3af97
L
14212 break;
14213 default:
14214 abort ();
14215 }
14216 }
14217 else
b9733481
L
14218 names = names_xmm;
14219 oappend (names[reg]);
c608c12e
AM
14220}
14221
252b5132 14222static void
26ca5450 14223OP_MS (int bytemode, int sizeflag)
252b5132 14224{
7967e09e 14225 if (modrm.mod == 3)
2da11e11
AM
14226 OP_EM (bytemode, sizeflag);
14227 else
6608db57 14228 BadOp ();
252b5132
RH
14229}
14230
992aaec9 14231static void
26ca5450 14232OP_XS (int bytemode, int sizeflag)
992aaec9 14233{
7967e09e 14234 if (modrm.mod == 3)
992aaec9
AM
14235 OP_EX (bytemode, sizeflag);
14236 else
6608db57 14237 BadOp ();
992aaec9
AM
14238}
14239
cc0ec051
AM
14240static void
14241OP_M (int bytemode, int sizeflag)
14242{
7967e09e 14243 if (modrm.mod == 3)
75413a22
L
14244 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
14245 BadOp ();
cc0ec051
AM
14246 else
14247 OP_E (bytemode, sizeflag);
14248}
14249
14250static void
14251OP_0f07 (int bytemode, int sizeflag)
14252{
7967e09e 14253 if (modrm.mod != 3 || modrm.rm != 0)
cc0ec051
AM
14254 BadOp ();
14255 else
14256 OP_E (bytemode, sizeflag);
14257}
14258
46e883c5 14259/* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
246c51aa 14260 32bit mode and "xchg %rax,%rax" in 64bit mode. */
46e883c5 14261
cc0ec051 14262static void
46e883c5 14263NOP_Fixup1 (int bytemode, int sizeflag)
cc0ec051 14264{
8b38ad71
L
14265 if ((prefixes & PREFIX_DATA) != 0
14266 || (rex != 0
14267 && rex != 0x48
14268 && address_mode == mode_64bit))
46e883c5
L
14269 OP_REG (bytemode, sizeflag);
14270 else
14271 strcpy (obuf, "nop");
14272}
14273
14274static void
14275NOP_Fixup2 (int bytemode, int sizeflag)
14276{
8b38ad71
L
14277 if ((prefixes & PREFIX_DATA) != 0
14278 || (rex != 0
14279 && rex != 0x48
14280 && address_mode == mode_64bit))
46e883c5 14281 OP_IMREG (bytemode, sizeflag);
cc0ec051
AM
14282}
14283
84037f8c 14284static const char *const Suffix3DNow[] = {
252b5132
RH
14285/* 00 */ NULL, NULL, NULL, NULL,
14286/* 04 */ NULL, NULL, NULL, NULL,
14287/* 08 */ NULL, NULL, NULL, NULL,
9e525108 14288/* 0C */ "pi2fw", "pi2fd", NULL, NULL,
252b5132
RH
14289/* 10 */ NULL, NULL, NULL, NULL,
14290/* 14 */ NULL, NULL, NULL, NULL,
14291/* 18 */ NULL, NULL, NULL, NULL,
9e525108 14292/* 1C */ "pf2iw", "pf2id", NULL, NULL,
252b5132
RH
14293/* 20 */ NULL, NULL, NULL, NULL,
14294/* 24 */ NULL, NULL, NULL, NULL,
14295/* 28 */ NULL, NULL, NULL, NULL,
14296/* 2C */ NULL, NULL, NULL, NULL,
14297/* 30 */ NULL, NULL, NULL, NULL,
14298/* 34 */ NULL, NULL, NULL, NULL,
14299/* 38 */ NULL, NULL, NULL, NULL,
14300/* 3C */ NULL, NULL, NULL, NULL,
14301/* 40 */ NULL, NULL, NULL, NULL,
14302/* 44 */ NULL, NULL, NULL, NULL,
14303/* 48 */ NULL, NULL, NULL, NULL,
14304/* 4C */ NULL, NULL, NULL, NULL,
14305/* 50 */ NULL, NULL, NULL, NULL,
14306/* 54 */ NULL, NULL, NULL, NULL,
14307/* 58 */ NULL, NULL, NULL, NULL,
14308/* 5C */ NULL, NULL, NULL, NULL,
14309/* 60 */ NULL, NULL, NULL, NULL,
14310/* 64 */ NULL, NULL, NULL, NULL,
14311/* 68 */ NULL, NULL, NULL, NULL,
14312/* 6C */ NULL, NULL, NULL, NULL,
14313/* 70 */ NULL, NULL, NULL, NULL,
14314/* 74 */ NULL, NULL, NULL, NULL,
14315/* 78 */ NULL, NULL, NULL, NULL,
14316/* 7C */ NULL, NULL, NULL, NULL,
14317/* 80 */ NULL, NULL, NULL, NULL,
14318/* 84 */ NULL, NULL, NULL, NULL,
9e525108
AM
14319/* 88 */ NULL, NULL, "pfnacc", NULL,
14320/* 8C */ NULL, NULL, "pfpnacc", NULL,
252b5132
RH
14321/* 90 */ "pfcmpge", NULL, NULL, NULL,
14322/* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
14323/* 98 */ NULL, NULL, "pfsub", NULL,
14324/* 9C */ NULL, NULL, "pfadd", NULL,
14325/* A0 */ "pfcmpgt", NULL, NULL, NULL,
14326/* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
14327/* A8 */ NULL, NULL, "pfsubr", NULL,
14328/* AC */ NULL, NULL, "pfacc", NULL,
14329/* B0 */ "pfcmpeq", NULL, NULL, NULL,
9beff690 14330/* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
9e525108 14331/* B8 */ NULL, NULL, NULL, "pswapd",
252b5132
RH
14332/* BC */ NULL, NULL, NULL, "pavgusb",
14333/* C0 */ NULL, NULL, NULL, NULL,
14334/* C4 */ NULL, NULL, NULL, NULL,
14335/* C8 */ NULL, NULL, NULL, NULL,
14336/* CC */ NULL, NULL, NULL, NULL,
14337/* D0 */ NULL, NULL, NULL, NULL,
14338/* D4 */ NULL, NULL, NULL, NULL,
14339/* D8 */ NULL, NULL, NULL, NULL,
14340/* DC */ NULL, NULL, NULL, NULL,
14341/* E0 */ NULL, NULL, NULL, NULL,
14342/* E4 */ NULL, NULL, NULL, NULL,
14343/* E8 */ NULL, NULL, NULL, NULL,
14344/* EC */ NULL, NULL, NULL, NULL,
14345/* F0 */ NULL, NULL, NULL, NULL,
14346/* F4 */ NULL, NULL, NULL, NULL,
14347/* F8 */ NULL, NULL, NULL, NULL,
14348/* FC */ NULL, NULL, NULL, NULL,
14349};
14350
14351static void
26ca5450 14352OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132
RH
14353{
14354 const char *mnemonic;
14355
14356 FETCH_DATA (the_info, codep + 1);
14357 /* AMD 3DNow! instructions are specified by an opcode suffix in the
14358 place where an 8-bit immediate would normally go. ie. the last
14359 byte of the instruction. */
ea397f5b 14360 obufp = mnemonicendp;
c608c12e 14361 mnemonic = Suffix3DNow[*codep++ & 0xff];
252b5132 14362 if (mnemonic)
2da11e11 14363 oappend (mnemonic);
252b5132
RH
14364 else
14365 {
14366 /* Since a variable sized modrm/sib chunk is between the start
14367 of the opcode (0x0f0f) and the opcode suffix, we need to do
14368 all the modrm processing first, and don't know until now that
14369 we have a bad opcode. This necessitates some cleaning up. */
ce518a5f
L
14370 op_out[0][0] = '\0';
14371 op_out[1][0] = '\0';
6608db57 14372 BadOp ();
252b5132 14373 }
ea397f5b 14374 mnemonicendp = obufp;
252b5132 14375}
c608c12e 14376
ea397f5b
L
14377static struct op simd_cmp_op[] =
14378{
14379 { STRING_COMMA_LEN ("eq") },
14380 { STRING_COMMA_LEN ("lt") },
14381 { STRING_COMMA_LEN ("le") },
14382 { STRING_COMMA_LEN ("unord") },
14383 { STRING_COMMA_LEN ("neq") },
14384 { STRING_COMMA_LEN ("nlt") },
14385 { STRING_COMMA_LEN ("nle") },
14386 { STRING_COMMA_LEN ("ord") }
c608c12e
AM
14387};
14388
14389static void
ad19981d 14390CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
c608c12e
AM
14391{
14392 unsigned int cmp_type;
14393
14394 FETCH_DATA (the_info, codep + 1);
14395 cmp_type = *codep++ & 0xff;
c0f3af97 14396 if (cmp_type < ARRAY_SIZE (simd_cmp_op))
c608c12e 14397 {
ad19981d 14398 char suffix [3];
ea397f5b 14399 char *p = mnemonicendp - 2;
ad19981d
L
14400 suffix[0] = p[0];
14401 suffix[1] = p[1];
14402 suffix[2] = '\0';
ea397f5b
L
14403 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
14404 mnemonicendp += simd_cmp_op[cmp_type].len;
c608c12e
AM
14405 }
14406 else
14407 {
ad19981d
L
14408 /* We have a reserved extension byte. Output it directly. */
14409 scratchbuf[0] = '$';
14410 print_operand_value (scratchbuf + 1, 1, cmp_type);
14411 oappend (scratchbuf + intel_syntax);
14412 scratchbuf[0] = '\0';
c608c12e
AM
14413 }
14414}
14415
ca164297 14416static void
b844680a
L
14417OP_Mwait (int bytemode ATTRIBUTE_UNUSED,
14418 int sizeflag ATTRIBUTE_UNUSED)
14419{
14420 /* mwait %eax,%ecx */
14421 if (!intel_syntax)
14422 {
14423 const char **names = (address_mode == mode_64bit
14424 ? names64 : names32);
14425 strcpy (op_out[0], names[0]);
14426 strcpy (op_out[1], names[1]);
14427 two_source_ops = 1;
14428 }
14429 /* Skip mod/rm byte. */
14430 MODRM_CHECK;
14431 codep++;
14432}
14433
14434static void
14435OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
14436 int sizeflag ATTRIBUTE_UNUSED)
ca164297 14437{
b844680a
L
14438 /* monitor %eax,%ecx,%edx" */
14439 if (!intel_syntax)
ca164297 14440 {
b844680a 14441 const char **op1_names;
cb712a9e
L
14442 const char **names = (address_mode == mode_64bit
14443 ? names64 : names32);
1d9f512f 14444
b844680a
L
14445 if (!(prefixes & PREFIX_ADDR))
14446 op1_names = (address_mode == mode_16bit
14447 ? names16 : names);
ca164297
L
14448 else
14449 {
b844680a 14450 /* Remove "addr16/addr32". */
f16cd0d5 14451 all_prefixes[last_addr_prefix] = 0;
b844680a
L
14452 op1_names = (address_mode != mode_32bit
14453 ? names32 : names16);
14454 used_prefixes |= PREFIX_ADDR;
ca164297 14455 }
b844680a
L
14456 strcpy (op_out[0], op1_names[0]);
14457 strcpy (op_out[1], names[1]);
14458 strcpy (op_out[2], names[2]);
14459 two_source_ops = 1;
ca164297 14460 }
b844680a
L
14461 /* Skip mod/rm byte. */
14462 MODRM_CHECK;
14463 codep++;
30123838
JB
14464}
14465
6608db57
KH
14466static void
14467BadOp (void)
2da11e11 14468{
6608db57
KH
14469 /* Throw away prefixes and 1st. opcode byte. */
14470 codep = insn_codep + 1;
2da11e11
AM
14471 oappend ("(bad)");
14472}
4cc91dba 14473
35c52694
L
14474static void
14475REP_Fixup (int bytemode, int sizeflag)
14476{
14477 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
14478 lods and stos. */
35c52694 14479 if (prefixes & PREFIX_REPZ)
f16cd0d5 14480 all_prefixes[last_repz_prefix] = REP_PREFIX;
35c52694
L
14481
14482 switch (bytemode)
14483 {
14484 case al_reg:
14485 case eAX_reg:
14486 case indir_dx_reg:
14487 OP_IMREG (bytemode, sizeflag);
14488 break;
14489 case eDI_reg:
14490 OP_ESreg (bytemode, sizeflag);
14491 break;
14492 case eSI_reg:
14493 OP_DSreg (bytemode, sizeflag);
14494 break;
14495 default:
14496 abort ();
14497 break;
14498 }
14499}
f5804c90
L
14500
14501static void
14502CMPXCHG8B_Fixup (int bytemode, int sizeflag)
14503{
161a04f6
L
14504 USED_REX (REX_W);
14505 if (rex & REX_W)
f5804c90
L
14506 {
14507 /* Change cmpxchg8b to cmpxchg16b. */
ea397f5b
L
14508 char *p = mnemonicendp - 2;
14509 mnemonicendp = stpcpy (p, "16b");
fb9c77c7 14510 bytemode = o_mode;
f5804c90
L
14511 }
14512 OP_M (bytemode, sizeflag);
14513}
42903f7f
L
14514
14515static void
14516XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
14517{
b9733481
L
14518 const char **names;
14519
c0f3af97
L
14520 if (need_vex)
14521 {
14522 switch (vex.length)
14523 {
14524 case 128:
b9733481 14525 names = names_xmm;
c0f3af97
L
14526 break;
14527 case 256:
b9733481 14528 names = names_ymm;
c0f3af97
L
14529 break;
14530 default:
14531 abort ();
14532 }
14533 }
14534 else
b9733481
L
14535 names = names_xmm;
14536 oappend (names[reg]);
42903f7f 14537}
381d071f
L
14538
14539static void
14540CRC32_Fixup (int bytemode, int sizeflag)
14541{
14542 /* Add proper suffix to "crc32". */
ea397f5b 14543 char *p = mnemonicendp;
381d071f
L
14544
14545 switch (bytemode)
14546 {
14547 case b_mode:
20592a94 14548 if (intel_syntax)
ea397f5b 14549 goto skip;
20592a94 14550
381d071f
L
14551 *p++ = 'b';
14552 break;
14553 case v_mode:
20592a94 14554 if (intel_syntax)
ea397f5b 14555 goto skip;
20592a94 14556
381d071f
L
14557 USED_REX (REX_W);
14558 if (rex & REX_W)
14559 *p++ = 'q';
f16cd0d5
L
14560 else
14561 {
14562 if (sizeflag & DFLAG)
14563 *p++ = 'l';
14564 else
14565 *p++ = 'w';
14566 used_prefixes |= (prefixes & PREFIX_DATA);
14567 }
381d071f
L
14568 break;
14569 default:
14570 oappend (INTERNAL_DISASSEMBLER_ERROR);
14571 break;
14572 }
ea397f5b 14573 mnemonicendp = p;
381d071f
L
14574 *p = '\0';
14575
ea397f5b 14576skip:
381d071f
L
14577 if (modrm.mod == 3)
14578 {
14579 int add;
14580
14581 /* Skip mod/rm byte. */
14582 MODRM_CHECK;
14583 codep++;
14584
14585 USED_REX (REX_B);
14586 add = (rex & REX_B) ? 8 : 0;
14587 if (bytemode == b_mode)
14588 {
14589 USED_REX (0);
14590 if (rex)
14591 oappend (names8rex[modrm.rm + add]);
14592 else
14593 oappend (names8[modrm.rm + add]);
14594 }
14595 else
14596 {
14597 USED_REX (REX_W);
14598 if (rex & REX_W)
14599 oappend (names64[modrm.rm + add]);
14600 else if ((prefixes & PREFIX_DATA))
14601 oappend (names16[modrm.rm + add]);
14602 else
14603 oappend (names32[modrm.rm + add]);
14604 }
14605 }
14606 else
9344ff29 14607 OP_E (bytemode, sizeflag);
381d071f 14608}
85f10a01 14609
eacc9c89
L
14610static void
14611FXSAVE_Fixup (int bytemode, int sizeflag)
14612{
14613 /* Add proper suffix to "fxsave" and "fxrstor". */
14614 USED_REX (REX_W);
14615 if (rex & REX_W)
14616 {
14617 char *p = mnemonicendp;
14618 *p++ = '6';
14619 *p++ = '4';
14620 *p = '\0';
14621 mnemonicendp = p;
14622 }
14623 OP_M (bytemode, sizeflag);
14624}
14625
c0f3af97
L
14626/* Display the destination register operand for instructions with
14627 VEX. */
14628
14629static void
14630OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
14631{
539f890d 14632 int reg;
b9733481
L
14633 const char **names;
14634
c0f3af97
L
14635 if (!need_vex)
14636 abort ();
14637
14638 if (!need_vex_reg)
14639 return;
14640
539f890d
L
14641 reg = vex.register_specifier;
14642 if (bytemode == vex_scalar_mode)
14643 {
14644 oappend (names_xmm[reg]);
14645 return;
14646 }
14647
c0f3af97
L
14648 switch (vex.length)
14649 {
14650 case 128:
14651 switch (bytemode)
14652 {
14653 case vex_mode:
14654 case vex128_mode:
cb21baef
L
14655 names = names_xmm;
14656 break;
14657 case dq_mode:
14658 if (vex.w)
14659 names = names64;
14660 else
14661 names = names32;
c0f3af97
L
14662 break;
14663 default:
14664 abort ();
14665 return;
14666 }
c0f3af97
L
14667 break;
14668 case 256:
14669 switch (bytemode)
14670 {
14671 case vex_mode:
14672 case vex256_mode:
14673 break;
14674 default:
14675 abort ();
14676 return;
14677 }
14678
b9733481 14679 names = names_ymm;
c0f3af97
L
14680 break;
14681 default:
14682 abort ();
14683 break;
14684 }
539f890d 14685 oappend (names[reg]);
c0f3af97
L
14686}
14687
922d8de8
DR
14688/* Get the VEX immediate byte without moving codep. */
14689
14690static unsigned char
ccc5981b 14691get_vex_imm8 (int sizeflag, int opnum)
922d8de8
DR
14692{
14693 int bytes_before_imm = 0;
14694
922d8de8
DR
14695 if (modrm.mod != 3)
14696 {
14697 /* There are SIB/displacement bytes. */
14698 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
02e647f9 14699 {
922d8de8 14700 /* 32/64 bit address mode */
02e647f9 14701 int base = modrm.rm;
922d8de8
DR
14702
14703 /* Check SIB byte. */
02e647f9
SP
14704 if (base == 4)
14705 {
14706 FETCH_DATA (the_info, codep + 1);
14707 base = *codep & 7;
14708 /* When decoding the third source, don't increase
14709 bytes_before_imm as this has already been incremented
14710 by one in OP_E_memory while decoding the second
14711 source operand. */
ccc5981b
SP
14712 if (opnum == 0)
14713 bytes_before_imm++;
02e647f9
SP
14714 }
14715
14716 /* Don't increase bytes_before_imm when decoding the third source,
14717 it has already been incremented by OP_E_memory while decoding
14718 the second source operand. */
14719 if (opnum == 0)
14720 {
14721 switch (modrm.mod)
14722 {
14723 case 0:
14724 /* When modrm.rm == 5 or modrm.rm == 4 and base in
14725 SIB == 5, there is a 4 byte displacement. */
14726 if (base != 5)
14727 /* No displacement. */
14728 break;
14729 case 2:
14730 /* 4 byte displacement. */
14731 bytes_before_imm += 4;
14732 break;
14733 case 1:
14734 /* 1 byte displacement. */
14735 bytes_before_imm++;
14736 break;
14737 }
14738 }
14739 }
922d8de8 14740 else
02e647f9
SP
14741 {
14742 /* 16 bit address mode */
14743 /* Don't increase bytes_before_imm when decoding the third source,
14744 it has already been incremented by OP_E_memory while decoding
14745 the second source operand. */
14746 if (opnum == 0)
14747 {
14748 switch (modrm.mod)
14749 {
14750 case 0:
14751 /* When modrm.rm == 6, there is a 2 byte displacement. */
14752 if (modrm.rm != 6)
14753 /* No displacement. */
14754 break;
14755 case 2:
14756 /* 2 byte displacement. */
14757 bytes_before_imm += 2;
14758 break;
14759 case 1:
14760 /* 1 byte displacement: when decoding the third source,
14761 don't increase bytes_before_imm as this has already
14762 been incremented by one in OP_E_memory while decoding
14763 the second source operand. */
14764 if (opnum == 0)
14765 bytes_before_imm++;
ccc5981b 14766
02e647f9
SP
14767 break;
14768 }
922d8de8
DR
14769 }
14770 }
14771 }
14772
14773 FETCH_DATA (the_info, codep + bytes_before_imm + 1);
14774 return codep [bytes_before_imm];
14775}
14776
14777static void
14778OP_EX_VexReg (int bytemode, int sizeflag, int reg)
14779{
b9733481
L
14780 const char **names;
14781
922d8de8
DR
14782 if (reg == -1 && modrm.mod != 3)
14783 {
14784 OP_E_memory (bytemode, sizeflag);
14785 return;
14786 }
14787 else
14788 {
14789 if (reg == -1)
14790 {
14791 reg = modrm.rm;
14792 USED_REX (REX_B);
14793 if (rex & REX_B)
14794 reg += 8;
14795 }
14796 else if (reg > 7 && address_mode != mode_64bit)
14797 BadOp ();
14798 }
14799
14800 switch (vex.length)
14801 {
14802 case 128:
b9733481 14803 names = names_xmm;
922d8de8
DR
14804 break;
14805 case 256:
b9733481 14806 names = names_ymm;
922d8de8
DR
14807 break;
14808 default:
14809 abort ();
14810 }
b9733481 14811 oappend (names[reg]);
922d8de8
DR
14812}
14813
a683cc34
SP
14814static void
14815OP_EX_VexImmW (int bytemode, int sizeflag)
14816{
14817 int reg = -1;
14818 static unsigned char vex_imm8;
14819
14820 if (vex_w_done == 0)
14821 {
14822 vex_w_done = 1;
14823
14824 /* Skip mod/rm byte. */
14825 MODRM_CHECK;
14826 codep++;
14827
14828 vex_imm8 = get_vex_imm8 (sizeflag, 0);
14829
14830 if (vex.w)
14831 reg = vex_imm8 >> 4;
14832
14833 OP_EX_VexReg (bytemode, sizeflag, reg);
14834 }
14835 else if (vex_w_done == 1)
14836 {
14837 vex_w_done = 2;
14838
14839 if (!vex.w)
14840 reg = vex_imm8 >> 4;
14841
14842 OP_EX_VexReg (bytemode, sizeflag, reg);
14843 }
14844 else
14845 {
14846 /* Output the imm8 directly. */
14847 scratchbuf[0] = '$';
14848 print_operand_value (scratchbuf + 1, 1, vex_imm8 & 0xf);
14849 oappend (scratchbuf + intel_syntax);
14850 scratchbuf[0] = '\0';
14851 codep++;
14852 }
14853}
14854
5dd85c99
SP
14855static void
14856OP_Vex_2src (int bytemode, int sizeflag)
14857{
14858 if (modrm.mod == 3)
14859 {
b9733481 14860 int reg = modrm.rm;
5dd85c99 14861 USED_REX (REX_B);
b9733481
L
14862 if (rex & REX_B)
14863 reg += 8;
14864 oappend (names_xmm[reg]);
5dd85c99
SP
14865 }
14866 else
14867 {
14868 if (intel_syntax
14869 && (bytemode == v_mode || bytemode == v_swap_mode))
14870 {
14871 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
14872 used_prefixes |= (prefixes & PREFIX_DATA);
14873 }
14874 OP_E (bytemode, sizeflag);
14875 }
14876}
14877
14878static void
14879OP_Vex_2src_1 (int bytemode, int sizeflag)
14880{
14881 if (modrm.mod == 3)
14882 {
14883 /* Skip mod/rm byte. */
14884 MODRM_CHECK;
14885 codep++;
14886 }
14887
14888 if (vex.w)
b9733481 14889 oappend (names_xmm[vex.register_specifier]);
5dd85c99
SP
14890 else
14891 OP_Vex_2src (bytemode, sizeflag);
14892}
14893
14894static void
14895OP_Vex_2src_2 (int bytemode, int sizeflag)
14896{
14897 if (vex.w)
14898 OP_Vex_2src (bytemode, sizeflag);
14899 else
b9733481 14900 oappend (names_xmm[vex.register_specifier]);
5dd85c99
SP
14901}
14902
922d8de8
DR
14903static void
14904OP_EX_VexW (int bytemode, int sizeflag)
14905{
14906 int reg = -1;
14907
14908 if (!vex_w_done)
14909 {
14910 vex_w_done = 1;
41effecb
SP
14911
14912 /* Skip mod/rm byte. */
14913 MODRM_CHECK;
14914 codep++;
14915
922d8de8 14916 if (vex.w)
ccc5981b 14917 reg = get_vex_imm8 (sizeflag, 0) >> 4;
922d8de8
DR
14918 }
14919 else
14920 {
14921 if (!vex.w)
ccc5981b 14922 reg = get_vex_imm8 (sizeflag, 1) >> 4;
922d8de8
DR
14923 }
14924
14925 OP_EX_VexReg (bytemode, sizeflag, reg);
14926}
14927
922d8de8
DR
14928static void
14929VEXI4_Fixup (int bytemode ATTRIBUTE_UNUSED,
14930 int sizeflag ATTRIBUTE_UNUSED)
14931{
14932 /* Skip the immediate byte and check for invalid bits. */
14933 FETCH_DATA (the_info, codep + 1);
14934 if (*codep++ & 0xf)
14935 BadOp ();
14936}
14937
c0f3af97
L
14938static void
14939OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
14940{
14941 int reg;
b9733481
L
14942 const char **names;
14943
c0f3af97
L
14944 FETCH_DATA (the_info, codep + 1);
14945 reg = *codep++;
14946
14947 if (bytemode != x_mode)
14948 abort ();
14949
14950 if (reg & 0xf)
14951 BadOp ();
14952
14953 reg >>= 4;
dae39acc
L
14954 if (reg > 7 && address_mode != mode_64bit)
14955 BadOp ();
14956
c0f3af97
L
14957 switch (vex.length)
14958 {
14959 case 128:
b9733481 14960 names = names_xmm;
c0f3af97
L
14961 break;
14962 case 256:
b9733481 14963 names = names_ymm;
c0f3af97
L
14964 break;
14965 default:
14966 abort ();
14967 }
b9733481 14968 oappend (names[reg]);
c0f3af97
L
14969}
14970
922d8de8
DR
14971static void
14972OP_XMM_VexW (int bytemode, int sizeflag)
14973{
14974 /* Turn off the REX.W bit since it is used for swapping operands
14975 now. */
14976 rex &= ~REX_W;
14977 OP_XMM (bytemode, sizeflag);
14978}
14979
c0f3af97
L
14980static void
14981OP_EX_Vex (int bytemode, int sizeflag)
14982{
14983 if (modrm.mod != 3)
14984 {
14985 if (vex.register_specifier != 0)
14986 BadOp ();
14987 need_vex_reg = 0;
14988 }
14989 OP_EX (bytemode, sizeflag);
14990}
14991
14992static void
14993OP_XMM_Vex (int bytemode, int sizeflag)
14994{
14995 if (modrm.mod != 3)
14996 {
14997 if (vex.register_specifier != 0)
14998 BadOp ();
14999 need_vex_reg = 0;
15000 }
15001 OP_XMM (bytemode, sizeflag);
15002}
15003
15004static void
15005VZERO_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15006{
15007 switch (vex.length)
15008 {
15009 case 128:
ea397f5b 15010 mnemonicendp = stpcpy (obuf, "vzeroupper");
c0f3af97
L
15011 break;
15012 case 256:
ea397f5b 15013 mnemonicendp = stpcpy (obuf, "vzeroall");
c0f3af97
L
15014 break;
15015 default:
15016 abort ();
15017 }
15018}
15019
ea397f5b
L
15020static struct op vex_cmp_op[] =
15021{
15022 { STRING_COMMA_LEN ("eq") },
15023 { STRING_COMMA_LEN ("lt") },
15024 { STRING_COMMA_LEN ("le") },
15025 { STRING_COMMA_LEN ("unord") },
15026 { STRING_COMMA_LEN ("neq") },
15027 { STRING_COMMA_LEN ("nlt") },
15028 { STRING_COMMA_LEN ("nle") },
15029 { STRING_COMMA_LEN ("ord") },
15030 { STRING_COMMA_LEN ("eq_uq") },
15031 { STRING_COMMA_LEN ("nge") },
15032 { STRING_COMMA_LEN ("ngt") },
15033 { STRING_COMMA_LEN ("false") },
15034 { STRING_COMMA_LEN ("neq_oq") },
15035 { STRING_COMMA_LEN ("ge") },
15036 { STRING_COMMA_LEN ("gt") },
15037 { STRING_COMMA_LEN ("true") },
15038 { STRING_COMMA_LEN ("eq_os") },
15039 { STRING_COMMA_LEN ("lt_oq") },
15040 { STRING_COMMA_LEN ("le_oq") },
15041 { STRING_COMMA_LEN ("unord_s") },
15042 { STRING_COMMA_LEN ("neq_us") },
15043 { STRING_COMMA_LEN ("nlt_uq") },
15044 { STRING_COMMA_LEN ("nle_uq") },
15045 { STRING_COMMA_LEN ("ord_s") },
15046 { STRING_COMMA_LEN ("eq_us") },
15047 { STRING_COMMA_LEN ("nge_uq") },
15048 { STRING_COMMA_LEN ("ngt_uq") },
15049 { STRING_COMMA_LEN ("false_os") },
15050 { STRING_COMMA_LEN ("neq_os") },
15051 { STRING_COMMA_LEN ("ge_oq") },
15052 { STRING_COMMA_LEN ("gt_oq") },
15053 { STRING_COMMA_LEN ("true_us") },
c0f3af97
L
15054};
15055
15056static void
15057VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15058{
15059 unsigned int cmp_type;
15060
15061 FETCH_DATA (the_info, codep + 1);
15062 cmp_type = *codep++ & 0xff;
15063 if (cmp_type < ARRAY_SIZE (vex_cmp_op))
15064 {
15065 char suffix [3];
ea397f5b 15066 char *p = mnemonicendp - 2;
c0f3af97
L
15067 suffix[0] = p[0];
15068 suffix[1] = p[1];
15069 suffix[2] = '\0';
ea397f5b
L
15070 sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
15071 mnemonicendp += vex_cmp_op[cmp_type].len;
c0f3af97
L
15072 }
15073 else
15074 {
15075 /* We have a reserved extension byte. Output it directly. */
15076 scratchbuf[0] = '$';
15077 print_operand_value (scratchbuf + 1, 1, cmp_type);
15078 oappend (scratchbuf + intel_syntax);
15079 scratchbuf[0] = '\0';
15080 }
15081}
15082
ea397f5b
L
15083static const struct op pclmul_op[] =
15084{
15085 { STRING_COMMA_LEN ("lql") },
15086 { STRING_COMMA_LEN ("hql") },
15087 { STRING_COMMA_LEN ("lqh") },
15088 { STRING_COMMA_LEN ("hqh") }
c0f3af97
L
15089};
15090
15091static void
15092PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
15093 int sizeflag ATTRIBUTE_UNUSED)
15094{
15095 unsigned int pclmul_type;
15096
15097 FETCH_DATA (the_info, codep + 1);
15098 pclmul_type = *codep++ & 0xff;
15099 switch (pclmul_type)
15100 {
15101 case 0x10:
15102 pclmul_type = 2;
15103 break;
15104 case 0x11:
15105 pclmul_type = 3;
15106 break;
15107 default:
15108 break;
15109 }
15110 if (pclmul_type < ARRAY_SIZE (pclmul_op))
15111 {
15112 char suffix [4];
ea397f5b 15113 char *p = mnemonicendp - 3;
c0f3af97
L
15114 suffix[0] = p[0];
15115 suffix[1] = p[1];
15116 suffix[2] = p[2];
15117 suffix[3] = '\0';
ea397f5b
L
15118 sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
15119 mnemonicendp += pclmul_op[pclmul_type].len;
c0f3af97
L
15120 }
15121 else
15122 {
15123 /* We have a reserved extension byte. Output it directly. */
15124 scratchbuf[0] = '$';
15125 print_operand_value (scratchbuf + 1, 1, pclmul_type);
15126 oappend (scratchbuf + intel_syntax);
15127 scratchbuf[0] = '\0';
15128 }
15129}
15130
f1f8f695
L
15131static void
15132MOVBE_Fixup (int bytemode, int sizeflag)
15133{
15134 /* Add proper suffix to "movbe". */
ea397f5b 15135 char *p = mnemonicendp;
f1f8f695
L
15136
15137 switch (bytemode)
15138 {
15139 case v_mode:
15140 if (intel_syntax)
ea397f5b 15141 goto skip;
f1f8f695
L
15142
15143 USED_REX (REX_W);
15144 if (sizeflag & SUFFIX_ALWAYS)
15145 {
15146 if (rex & REX_W)
15147 *p++ = 'q';
f1f8f695 15148 else
f16cd0d5
L
15149 {
15150 if (sizeflag & DFLAG)
15151 *p++ = 'l';
15152 else
15153 *p++ = 'w';
15154 used_prefixes |= (prefixes & PREFIX_DATA);
15155 }
f1f8f695 15156 }
f1f8f695
L
15157 break;
15158 default:
15159 oappend (INTERNAL_DISASSEMBLER_ERROR);
15160 break;
15161 }
ea397f5b 15162 mnemonicendp = p;
f1f8f695
L
15163 *p = '\0';
15164
ea397f5b 15165skip:
f1f8f695
L
15166 OP_M (bytemode, sizeflag);
15167}
f88c9eb0
SP
15168
15169static void
15170OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15171{
15172 int reg;
15173 const char **names;
15174
15175 /* Skip mod/rm byte. */
15176 MODRM_CHECK;
15177 codep++;
15178
15179 if (vex.w)
15180 names = names64;
f88c9eb0 15181 else
ce7d077e 15182 names = names32;
f88c9eb0
SP
15183
15184 reg = modrm.rm;
15185 USED_REX (REX_B);
15186 if (rex & REX_B)
15187 reg += 8;
15188
15189 oappend (names[reg]);
15190}
15191
15192static void
15193OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15194{
15195 const char **names;
15196
15197 if (vex.w)
15198 names = names64;
f88c9eb0 15199 else
ce7d077e 15200 names = names32;
f88c9eb0
SP
15201
15202 oappend (names[vex.register_specifier]);
15203}
15204
This page took 1.891304 seconds and 4 git commands to generate.