Add VEX_W_3818_P_2_M_0.
[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,
0bfee649 3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
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);
c0f3af97 94static void OP_XMM_Vex (int, int);
922d8de8 95static void OP_XMM_VexW (int, int);
c0f3af97
L
96static void OP_REG_VexI4 (int, int);
97static void PCLMUL_Fixup (int, int);
922d8de8 98static void VEXI4_Fixup (int, int);
c0f3af97
L
99static void VZERO_Fixup (int, int);
100static void VCMP_Fixup (int, int);
cc0ec051 101static void OP_0f07 (int, int);
b844680a
L
102static void OP_Monitor (int, int);
103static void OP_Mwait (int, int);
46e883c5
L
104static void NOP_Fixup1 (int, int);
105static void NOP_Fixup2 (int, int);
26ca5450 106static void OP_3DNowSuffix (int, int);
ad19981d 107static void CMP_Fixup (int, int);
26ca5450 108static void BadOp (void);
35c52694 109static void REP_Fixup (int, int);
f5804c90 110static void CMPXCHG8B_Fixup (int, int);
42903f7f 111static void XMM_Fixup (int, int);
381d071f 112static void CRC32_Fixup (int, int);
eacc9c89 113static void FXSAVE_Fixup (int, int);
f88c9eb0
SP
114static void OP_LWPCB_E (int, int);
115static void OP_LWP_E (int, int);
116static void OP_LWP_I (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;
c0f3af97
L
147/* Original REX prefix. */
148static int rex_original;
149/* REX bits in original REX prefix ignored. It may not be the same
150 as rex_original since some bits may not be ignored. */
151static int rex_ignored;
52b15da3
JH
152/* Mark parts used in the REX prefix. When we are testing for
153 empty prefix (for 8bit register REX extension), just mask it
154 out. Otherwise test for REX bit is excuse for existence of REX
155 only in case value is nonzero. */
156#define USED_REX(value) \
157 { \
158 if (value) \
161a04f6
L
159 { \
160 if ((rex & value)) \
161 rex_used |= (value) | REX_OPCODE; \
162 } \
52b15da3 163 else \
161a04f6 164 rex_used |= REX_OPCODE; \
52b15da3
JH
165 }
166
7d421014
ILT
167/* Flags for prefixes which we somehow handled when printing the
168 current instruction. */
169static int used_prefixes;
170
5076851f
ILT
171/* Flags stored in PREFIXES. */
172#define PREFIX_REPZ 1
173#define PREFIX_REPNZ 2
174#define PREFIX_LOCK 4
175#define PREFIX_CS 8
176#define PREFIX_SS 0x10
177#define PREFIX_DS 0x20
178#define PREFIX_ES 0x40
179#define PREFIX_FS 0x80
180#define PREFIX_GS 0x100
181#define PREFIX_DATA 0x200
182#define PREFIX_ADDR 0x400
183#define PREFIX_FWAIT 0x800
184
252b5132
RH
185/* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
186 to ADDR (exclusive) are valid. Returns 1 for success, longjmps
187 on error. */
188#define FETCH_DATA(info, addr) \
6608db57 189 ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
252b5132
RH
190 ? 1 : fetch_data ((info), (addr)))
191
192static int
26ca5450 193fetch_data (struct disassemble_info *info, bfd_byte *addr)
252b5132
RH
194{
195 int status;
6608db57 196 struct dis_private *priv = (struct dis_private *) info->private_data;
252b5132
RH
197 bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
198
0b1cf022 199 if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
272c9217
JB
200 status = (*info->read_memory_func) (start,
201 priv->max_fetched,
202 addr - priv->max_fetched,
203 info);
204 else
205 status = -1;
252b5132
RH
206 if (status != 0)
207 {
7d421014 208 /* If we did manage to read at least one byte, then
db6eb5be
AM
209 print_insn_i386 will do something sensible. Otherwise, print
210 an error. We do that here because this is where we know
211 STATUS. */
7d421014 212 if (priv->max_fetched == priv->the_buffer)
5076851f 213 (*info->memory_error_func) (status, start, info);
252b5132
RH
214 longjmp (priv->bailout, 1);
215 }
216 else
217 priv->max_fetched = addr;
218 return 1;
219}
220
ce518a5f
L
221#define XX { NULL, 0 }
222
223#define Eb { OP_E, b_mode }
b6169b20 224#define EbS { OP_E, b_swap_mode }
ce518a5f 225#define Ev { OP_E, v_mode }
b6169b20 226#define EvS { OP_E, v_swap_mode }
ce518a5f
L
227#define Ed { OP_E, d_mode }
228#define Edq { OP_E, dq_mode }
229#define Edqw { OP_E, dqw_mode }
42903f7f
L
230#define Edqb { OP_E, dqb_mode }
231#define Edqd { OP_E, dqd_mode }
09335d05 232#define Eq { OP_E, q_mode }
ce518a5f
L
233#define indirEv { OP_indirE, stack_v_mode }
234#define indirEp { OP_indirE, f_mode }
235#define stackEv { OP_E, stack_v_mode }
236#define Em { OP_E, m_mode }
237#define Ew { OP_E, w_mode }
238#define M { OP_M, 0 } /* lea, lgdt, etc. */
34b772a6 239#define Ma { OP_M, a_mode }
b844680a 240#define Mb { OP_M, b_mode }
d9a5e5e5 241#define Md { OP_M, d_mode }
f1f8f695 242#define Mo { OP_M, o_mode }
ce518a5f
L
243#define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
244#define Mq { OP_M, q_mode }
4ee52178 245#define Mx { OP_M, x_mode }
c0f3af97 246#define Mxmm { OP_M, xmm_mode }
ce518a5f
L
247#define Gb { OP_G, b_mode }
248#define Gv { OP_G, v_mode }
249#define Gd { OP_G, d_mode }
250#define Gdq { OP_G, dq_mode }
251#define Gm { OP_G, m_mode }
252#define Gw { OP_G, w_mode }
6f74c397
L
253#define Rd { OP_R, d_mode }
254#define Rm { OP_R, m_mode }
ce518a5f
L
255#define Ib { OP_I, b_mode }
256#define sIb { OP_sI, b_mode } /* sign extened byte */
257#define Iv { OP_I, v_mode }
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 }
286#define RMAL { OP_REG, al_reg }
287#define RMCL { OP_REG, cl_reg }
288#define RMDL { OP_REG, dl_reg }
289#define RMBL { OP_REG, bl_reg }
290#define RMAH { OP_REG, ah_reg }
291#define RMCH { OP_REG, ch_reg }
292#define RMDH { OP_REG, dh_reg }
293#define RMBH { OP_REG, bh_reg }
294#define RMAX { OP_REG, ax_reg }
295#define RMDX { OP_REG, dx_reg }
296
297#define eAX { OP_IMREG, eAX_reg }
298#define eBX { OP_IMREG, eBX_reg }
299#define eCX { OP_IMREG, eCX_reg }
300#define eDX { OP_IMREG, eDX_reg }
301#define eSP { OP_IMREG, eSP_reg }
302#define eBP { OP_IMREG, eBP_reg }
303#define eSI { OP_IMREG, eSI_reg }
304#define eDI { OP_IMREG, eDI_reg }
305#define AL { OP_IMREG, al_reg }
306#define CL { OP_IMREG, cl_reg }
307#define DL { OP_IMREG, dl_reg }
308#define BL { OP_IMREG, bl_reg }
309#define AH { OP_IMREG, ah_reg }
310#define CH { OP_IMREG, ch_reg }
311#define DH { OP_IMREG, dh_reg }
312#define BH { OP_IMREG, bh_reg }
313#define AX { OP_IMREG, ax_reg }
314#define DX { OP_IMREG, dx_reg }
315#define zAX { OP_IMREG, z_mode_ax_reg }
316#define indirDX { OP_IMREG, indir_dx_reg }
317
318#define Sw { OP_SEG, w_mode }
319#define Sv { OP_SEG, v_mode }
320#define Ap { OP_DIR, 0 }
321#define Ob { OP_OFF64, b_mode }
322#define Ov { OP_OFF64, v_mode }
323#define Xb { OP_DSreg, eSI_reg }
324#define Xv { OP_DSreg, eSI_reg }
325#define Xz { OP_DSreg, eSI_reg }
326#define Yb { OP_ESreg, eDI_reg }
327#define Yv { OP_ESreg, eDI_reg }
328#define DSBX { OP_DSreg, eBX_reg }
329
330#define es { OP_REG, es_reg }
331#define ss { OP_REG, ss_reg }
332#define cs { OP_REG, cs_reg }
333#define ds { OP_REG, ds_reg }
334#define fs { OP_REG, fs_reg }
335#define gs { OP_REG, gs_reg }
336
337#define MX { OP_MMX, 0 }
338#define XM { OP_XMM, 0 }
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 }
fa99fab2 346#define EXdS { OP_EX, d_swap_mode }
09a2c6cf 347#define EXq { OP_EX, q_mode }
b6169b20 348#define EXqS { OP_EX, q_swap_mode }
09a2c6cf 349#define EXx { OP_EX, x_mode }
b6169b20 350#define EXxS { OP_EX, x_swap_mode }
c0f3af97
L
351#define EXxmm { OP_EX, xmm_mode }
352#define EXxmmq { OP_EX, xmmq_mode }
353#define EXymmq { OP_EX, ymmq_mode }
0bfee649 354#define EXVexWdq { OP_EX, vex_w_dq_mode }
ce518a5f
L
355#define MS { OP_MS, v_mode }
356#define XS { OP_XS, v_mode }
09335d05 357#define EMCq { OP_EMC, q_mode }
ce518a5f 358#define MXC { OP_MXC, 0 }
ce518a5f 359#define OPSUF { OP_3DNowSuffix, 0 }
ad19981d 360#define CMP { CMP_Fixup, 0 }
42903f7f 361#define XMM0 { XMM_Fixup, 0 }
eacc9c89 362#define FXSAVE { FXSAVE_Fixup, 0 }
5dd85c99
SP
363#define Vex_2src_1 { OP_Vex_2src_1, 0 }
364#define Vex_2src_2 { OP_Vex_2src_2, 0 }
252b5132 365
c0f3af97
L
366#define Vex { OP_VEX, vex_mode }
367#define Vex128 { OP_VEX, vex128_mode }
368#define Vex256 { OP_VEX, vex256_mode }
922d8de8 369#define VexI4 { VEXI4_Fixup, 0}
c0f3af97 370#define EXdVex { OP_EX_Vex, d_mode }
fa99fab2 371#define EXdVexS { OP_EX_Vex, d_swap_mode }
c0f3af97 372#define EXqVex { OP_EX_Vex, q_mode }
fa99fab2 373#define EXqVexS { OP_EX_Vex, q_swap_mode }
922d8de8
DR
374#define EXVexW { OP_EX_VexW, x_mode }
375#define EXdVexW { OP_EX_VexW, d_mode }
376#define EXqVexW { OP_EX_VexW, q_mode }
c0f3af97 377#define XMVex { OP_XMM_Vex, 0 }
922d8de8 378#define XMVexW { OP_XMM_VexW, 0 }
c0f3af97
L
379#define XMVexI4 { OP_REG_VexI4, x_mode }
380#define PCLMUL { PCLMUL_Fixup, 0 }
381#define VZERO { VZERO_Fixup, 0 }
382#define VCMP { VCMP_Fixup, 0 }
c0f3af97 383
35c52694 384/* Used handle "rep" prefix for string instructions. */
ce518a5f
L
385#define Xbr { REP_Fixup, eSI_reg }
386#define Xvr { REP_Fixup, eSI_reg }
387#define Ybr { REP_Fixup, eDI_reg }
388#define Yvr { REP_Fixup, eDI_reg }
389#define Yzr { REP_Fixup, eDI_reg }
390#define indirDXr { REP_Fixup, indir_dx_reg }
391#define ALr { REP_Fixup, al_reg }
392#define eAXr { REP_Fixup, eAX_reg }
393
394#define cond_jump_flag { NULL, cond_jump_mode }
395#define loop_jcxz_flag { NULL, loop_jcxz_mode }
3ffd33cf 396
252b5132 397/* bits in sizeflag */
252b5132 398#define SUFFIX_ALWAYS 4
252b5132
RH
399#define AFLAG 2
400#define DFLAG 1
401
51e7da1b
L
402enum
403{
404 /* byte operand */
405 b_mode = 1,
406 /* byte operand with operand swapped */
3873ba12 407 b_swap_mode,
51e7da1b 408 /* operand size depends on prefixes */
3873ba12 409 v_mode,
51e7da1b 410 /* operand size depends on prefixes with operand swapped */
3873ba12 411 v_swap_mode,
51e7da1b 412 /* word operand */
3873ba12 413 w_mode,
51e7da1b 414 /* double word operand */
3873ba12 415 d_mode,
51e7da1b 416 /* double word operand with operand swapped */
3873ba12 417 d_swap_mode,
51e7da1b 418 /* quad word operand */
3873ba12 419 q_mode,
51e7da1b 420 /* quad word operand with operand swapped */
3873ba12 421 q_swap_mode,
51e7da1b 422 /* ten-byte operand */
3873ba12 423 t_mode,
51e7da1b 424 /* 16-byte XMM or 32-byte YMM operand */
3873ba12 425 x_mode,
51e7da1b 426 /* 16-byte XMM or 32-byte YMM operand with operand swapped */
3873ba12 427 x_swap_mode,
51e7da1b 428 /* 16-byte XMM operand */
3873ba12 429 xmm_mode,
51e7da1b 430 /* 16-byte XMM or quad word operand */
3873ba12 431 xmmq_mode,
51e7da1b 432 /* 32-byte YMM or quad word operand */
3873ba12 433 ymmq_mode,
51e7da1b 434 /* d_mode in 32bit, q_mode in 64bit mode. */
3873ba12 435 m_mode,
51e7da1b 436 /* pair of v_mode operands */
3873ba12
L
437 a_mode,
438 cond_jump_mode,
439 loop_jcxz_mode,
51e7da1b 440 /* operand size depends on REX prefixes. */
3873ba12 441 dq_mode,
51e7da1b 442 /* registers like dq_mode, memory like w_mode. */
3873ba12 443 dqw_mode,
51e7da1b 444 /* 4- or 6-byte pointer operand */
3873ba12
L
445 f_mode,
446 const_1_mode,
51e7da1b 447 /* v_mode for stack-related opcodes. */
3873ba12 448 stack_v_mode,
51e7da1b 449 /* non-quad operand size depends on prefixes */
3873ba12 450 z_mode,
51e7da1b 451 /* 16-byte operand */
3873ba12 452 o_mode,
51e7da1b 453 /* registers like dq_mode, memory like b_mode. */
3873ba12 454 dqb_mode,
51e7da1b 455 /* registers like dq_mode, memory like d_mode. */
3873ba12 456 dqd_mode,
51e7da1b 457 /* normal vex mode */
3873ba12 458 vex_mode,
51e7da1b 459 /* 128bit vex mode */
3873ba12 460 vex128_mode,
51e7da1b 461 /* 256bit vex mode */
3873ba12 462 vex256_mode,
51e7da1b 463 /* operand size depends on the VEX.W bit. */
3873ba12 464 vex_w_dq_mode,
d55ee72f 465
3873ba12
L
466 es_reg,
467 cs_reg,
468 ss_reg,
469 ds_reg,
470 fs_reg,
471 gs_reg,
d55ee72f 472
3873ba12
L
473 eAX_reg,
474 eCX_reg,
475 eDX_reg,
476 eBX_reg,
477 eSP_reg,
478 eBP_reg,
479 eSI_reg,
480 eDI_reg,
d55ee72f 481
3873ba12
L
482 al_reg,
483 cl_reg,
484 dl_reg,
485 bl_reg,
486 ah_reg,
487 ch_reg,
488 dh_reg,
489 bh_reg,
d55ee72f 490
3873ba12
L
491 ax_reg,
492 cx_reg,
493 dx_reg,
494 bx_reg,
495 sp_reg,
496 bp_reg,
497 si_reg,
498 di_reg,
d55ee72f 499
3873ba12
L
500 rAX_reg,
501 rCX_reg,
502 rDX_reg,
503 rBX_reg,
504 rSP_reg,
505 rBP_reg,
506 rSI_reg,
507 rDI_reg,
d55ee72f 508
3873ba12
L
509 z_mode_ax_reg,
510 indir_dx_reg
51e7da1b 511};
252b5132 512
51e7da1b
L
513enum
514{
515 FLOATCODE = 1,
3873ba12
L
516 USE_REG_TABLE,
517 USE_MOD_TABLE,
518 USE_RM_TABLE,
519 USE_PREFIX_TABLE,
520 USE_X86_64_TABLE,
521 USE_3BYTE_TABLE,
f88c9eb0 522 USE_XOP_8F_TABLE,
3873ba12
L
523 USE_VEX_C4_TABLE,
524 USE_VEX_C5_TABLE,
9e30b8e0
L
525 USE_VEX_LEN_TABLE,
526 USE_VEX_W_TABLE
51e7da1b 527};
6439fc28 528
1ceb70f8 529#define FLOAT NULL, { { NULL, FLOATCODE } }
4efba78c 530
4e7d34a6 531#define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }
1ceb70f8
L
532#define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
533#define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
534#define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
535#define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
4e7d34a6
L
536#define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
537#define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
f88c9eb0 538#define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
c0f3af97
L
539#define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
540#define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
541#define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
9e30b8e0 542#define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
1ceb70f8 543
51e7da1b
L
544enum
545{
546 REG_80 = 0,
3873ba12
L
547 REG_81,
548 REG_82,
549 REG_8F,
550 REG_C0,
551 REG_C1,
552 REG_C6,
553 REG_C7,
554 REG_D0,
555 REG_D1,
556 REG_D2,
557 REG_D3,
558 REG_F6,
559 REG_F7,
560 REG_FE,
561 REG_FF,
562 REG_0F00,
563 REG_0F01,
564 REG_0F0D,
565 REG_0F18,
566 REG_0F71,
567 REG_0F72,
568 REG_0F73,
569 REG_0FA6,
570 REG_0FA7,
571 REG_0FAE,
572 REG_0FBA,
573 REG_0FC7,
574 REG_VEX_71,
575 REG_VEX_72,
576 REG_VEX_73,
f88c9eb0
SP
577 REG_VEX_AE,
578 REG_XOP_LWPCB,
579 REG_XOP_LWP
51e7da1b 580};
1ceb70f8 581
51e7da1b
L
582enum
583{
584 MOD_8D = 0,
3873ba12
L
585 MOD_0F01_REG_0,
586 MOD_0F01_REG_1,
587 MOD_0F01_REG_2,
588 MOD_0F01_REG_3,
589 MOD_0F01_REG_7,
590 MOD_0F12_PREFIX_0,
591 MOD_0F13,
592 MOD_0F16_PREFIX_0,
593 MOD_0F17,
594 MOD_0F18_REG_0,
595 MOD_0F18_REG_1,
596 MOD_0F18_REG_2,
597 MOD_0F18_REG_3,
598 MOD_0F20,
599 MOD_0F21,
600 MOD_0F22,
601 MOD_0F23,
602 MOD_0F24,
603 MOD_0F26,
604 MOD_0F2B_PREFIX_0,
605 MOD_0F2B_PREFIX_1,
606 MOD_0F2B_PREFIX_2,
607 MOD_0F2B_PREFIX_3,
608 MOD_0F51,
609 MOD_0F71_REG_2,
610 MOD_0F71_REG_4,
611 MOD_0F71_REG_6,
612 MOD_0F72_REG_2,
613 MOD_0F72_REG_4,
614 MOD_0F72_REG_6,
615 MOD_0F73_REG_2,
616 MOD_0F73_REG_3,
617 MOD_0F73_REG_6,
618 MOD_0F73_REG_7,
619 MOD_0FAE_REG_0,
620 MOD_0FAE_REG_1,
621 MOD_0FAE_REG_2,
622 MOD_0FAE_REG_3,
623 MOD_0FAE_REG_4,
624 MOD_0FAE_REG_5,
625 MOD_0FAE_REG_6,
626 MOD_0FAE_REG_7,
627 MOD_0FB2,
628 MOD_0FB4,
629 MOD_0FB5,
630 MOD_0FC7_REG_6,
631 MOD_0FC7_REG_7,
632 MOD_0FD7,
633 MOD_0FE7_PREFIX_2,
634 MOD_0FF0_PREFIX_3,
635 MOD_0F382A_PREFIX_2,
636 MOD_62_32BIT,
637 MOD_C4_32BIT,
638 MOD_C5_32BIT,
639 MOD_VEX_12_PREFIX_0,
640 MOD_VEX_13,
641 MOD_VEX_16_PREFIX_0,
642 MOD_VEX_17,
643 MOD_VEX_2B,
976f1fde 644 MOD_VEX_50,
3873ba12
L
645 MOD_VEX_71_REG_2,
646 MOD_VEX_71_REG_4,
647 MOD_VEX_71_REG_6,
648 MOD_VEX_72_REG_2,
649 MOD_VEX_72_REG_4,
650 MOD_VEX_72_REG_6,
651 MOD_VEX_73_REG_2,
652 MOD_VEX_73_REG_3,
653 MOD_VEX_73_REG_6,
654 MOD_VEX_73_REG_7,
655 MOD_VEX_AE_REG_2,
656 MOD_VEX_AE_REG_3,
657 MOD_VEX_D7_PREFIX_2,
658 MOD_VEX_E7_PREFIX_2,
659 MOD_VEX_F0_PREFIX_3,
660 MOD_VEX_3818_PREFIX_2,
661 MOD_VEX_3819_PREFIX_2,
662 MOD_VEX_381A_PREFIX_2,
663 MOD_VEX_382A_PREFIX_2,
664 MOD_VEX_382C_PREFIX_2,
665 MOD_VEX_382D_PREFIX_2,
666 MOD_VEX_382E_PREFIX_2,
667 MOD_VEX_382F_PREFIX_2
51e7da1b 668};
1ceb70f8 669
51e7da1b
L
670enum
671{
672 RM_0F01_REG_0 = 0,
3873ba12
L
673 RM_0F01_REG_1,
674 RM_0F01_REG_2,
675 RM_0F01_REG_3,
676 RM_0F01_REG_7,
677 RM_0FAE_REG_5,
678 RM_0FAE_REG_6,
679 RM_0FAE_REG_7
51e7da1b 680};
1ceb70f8 681
51e7da1b
L
682enum
683{
684 PREFIX_90 = 0,
3873ba12
L
685 PREFIX_0F10,
686 PREFIX_0F11,
687 PREFIX_0F12,
688 PREFIX_0F16,
689 PREFIX_0F2A,
690 PREFIX_0F2B,
691 PREFIX_0F2C,
692 PREFIX_0F2D,
693 PREFIX_0F2E,
694 PREFIX_0F2F,
695 PREFIX_0F51,
696 PREFIX_0F52,
697 PREFIX_0F53,
698 PREFIX_0F58,
699 PREFIX_0F59,
700 PREFIX_0F5A,
701 PREFIX_0F5B,
702 PREFIX_0F5C,
703 PREFIX_0F5D,
704 PREFIX_0F5E,
705 PREFIX_0F5F,
706 PREFIX_0F60,
707 PREFIX_0F61,
708 PREFIX_0F62,
709 PREFIX_0F6C,
710 PREFIX_0F6D,
711 PREFIX_0F6F,
712 PREFIX_0F70,
713 PREFIX_0F73_REG_3,
714 PREFIX_0F73_REG_7,
715 PREFIX_0F78,
716 PREFIX_0F79,
717 PREFIX_0F7C,
718 PREFIX_0F7D,
719 PREFIX_0F7E,
720 PREFIX_0F7F,
721 PREFIX_0FB8,
722 PREFIX_0FBD,
723 PREFIX_0FC2,
724 PREFIX_0FC3,
725 PREFIX_0FC7_REG_6,
726 PREFIX_0FD0,
727 PREFIX_0FD6,
728 PREFIX_0FE6,
729 PREFIX_0FE7,
730 PREFIX_0FF0,
731 PREFIX_0FF7,
732 PREFIX_0F3810,
733 PREFIX_0F3814,
734 PREFIX_0F3815,
735 PREFIX_0F3817,
736 PREFIX_0F3820,
737 PREFIX_0F3821,
738 PREFIX_0F3822,
739 PREFIX_0F3823,
740 PREFIX_0F3824,
741 PREFIX_0F3825,
742 PREFIX_0F3828,
743 PREFIX_0F3829,
744 PREFIX_0F382A,
745 PREFIX_0F382B,
746 PREFIX_0F3830,
747 PREFIX_0F3831,
748 PREFIX_0F3832,
749 PREFIX_0F3833,
750 PREFIX_0F3834,
751 PREFIX_0F3835,
752 PREFIX_0F3837,
753 PREFIX_0F3838,
754 PREFIX_0F3839,
755 PREFIX_0F383A,
756 PREFIX_0F383B,
757 PREFIX_0F383C,
758 PREFIX_0F383D,
759 PREFIX_0F383E,
760 PREFIX_0F383F,
761 PREFIX_0F3840,
762 PREFIX_0F3841,
763 PREFIX_0F3880,
764 PREFIX_0F3881,
765 PREFIX_0F38DB,
766 PREFIX_0F38DC,
767 PREFIX_0F38DD,
768 PREFIX_0F38DE,
769 PREFIX_0F38DF,
770 PREFIX_0F38F0,
771 PREFIX_0F38F1,
772 PREFIX_0F3A08,
773 PREFIX_0F3A09,
774 PREFIX_0F3A0A,
775 PREFIX_0F3A0B,
776 PREFIX_0F3A0C,
777 PREFIX_0F3A0D,
778 PREFIX_0F3A0E,
779 PREFIX_0F3A14,
780 PREFIX_0F3A15,
781 PREFIX_0F3A16,
782 PREFIX_0F3A17,
783 PREFIX_0F3A20,
784 PREFIX_0F3A21,
785 PREFIX_0F3A22,
786 PREFIX_0F3A40,
787 PREFIX_0F3A41,
788 PREFIX_0F3A42,
789 PREFIX_0F3A44,
790 PREFIX_0F3A60,
791 PREFIX_0F3A61,
792 PREFIX_0F3A62,
793 PREFIX_0F3A63,
794 PREFIX_0F3ADF,
795 PREFIX_VEX_10,
796 PREFIX_VEX_11,
797 PREFIX_VEX_12,
798 PREFIX_VEX_16,
799 PREFIX_VEX_2A,
800 PREFIX_VEX_2C,
801 PREFIX_VEX_2D,
802 PREFIX_VEX_2E,
803 PREFIX_VEX_2F,
804 PREFIX_VEX_51,
805 PREFIX_VEX_52,
806 PREFIX_VEX_53,
807 PREFIX_VEX_58,
808 PREFIX_VEX_59,
809 PREFIX_VEX_5A,
810 PREFIX_VEX_5B,
811 PREFIX_VEX_5C,
812 PREFIX_VEX_5D,
813 PREFIX_VEX_5E,
814 PREFIX_VEX_5F,
815 PREFIX_VEX_60,
816 PREFIX_VEX_61,
817 PREFIX_VEX_62,
818 PREFIX_VEX_63,
819 PREFIX_VEX_64,
820 PREFIX_VEX_65,
821 PREFIX_VEX_66,
822 PREFIX_VEX_67,
823 PREFIX_VEX_68,
824 PREFIX_VEX_69,
825 PREFIX_VEX_6A,
826 PREFIX_VEX_6B,
827 PREFIX_VEX_6C,
828 PREFIX_VEX_6D,
829 PREFIX_VEX_6E,
830 PREFIX_VEX_6F,
831 PREFIX_VEX_70,
832 PREFIX_VEX_71_REG_2,
833 PREFIX_VEX_71_REG_4,
834 PREFIX_VEX_71_REG_6,
835 PREFIX_VEX_72_REG_2,
836 PREFIX_VEX_72_REG_4,
837 PREFIX_VEX_72_REG_6,
838 PREFIX_VEX_73_REG_2,
839 PREFIX_VEX_73_REG_3,
840 PREFIX_VEX_73_REG_6,
841 PREFIX_VEX_73_REG_7,
842 PREFIX_VEX_74,
843 PREFIX_VEX_75,
844 PREFIX_VEX_76,
845 PREFIX_VEX_77,
846 PREFIX_VEX_7C,
847 PREFIX_VEX_7D,
848 PREFIX_VEX_7E,
849 PREFIX_VEX_7F,
850 PREFIX_VEX_C2,
851 PREFIX_VEX_C4,
852 PREFIX_VEX_C5,
853 PREFIX_VEX_D0,
854 PREFIX_VEX_D1,
855 PREFIX_VEX_D2,
856 PREFIX_VEX_D3,
857 PREFIX_VEX_D4,
858 PREFIX_VEX_D5,
859 PREFIX_VEX_D6,
860 PREFIX_VEX_D7,
861 PREFIX_VEX_D8,
862 PREFIX_VEX_D9,
863 PREFIX_VEX_DA,
864 PREFIX_VEX_DB,
865 PREFIX_VEX_DC,
866 PREFIX_VEX_DD,
867 PREFIX_VEX_DE,
868 PREFIX_VEX_DF,
869 PREFIX_VEX_E0,
870 PREFIX_VEX_E1,
871 PREFIX_VEX_E2,
872 PREFIX_VEX_E3,
873 PREFIX_VEX_E4,
874 PREFIX_VEX_E5,
875 PREFIX_VEX_E6,
876 PREFIX_VEX_E7,
877 PREFIX_VEX_E8,
878 PREFIX_VEX_E9,
879 PREFIX_VEX_EA,
880 PREFIX_VEX_EB,
881 PREFIX_VEX_EC,
882 PREFIX_VEX_ED,
883 PREFIX_VEX_EE,
884 PREFIX_VEX_EF,
885 PREFIX_VEX_F0,
886 PREFIX_VEX_F1,
887 PREFIX_VEX_F2,
888 PREFIX_VEX_F3,
889 PREFIX_VEX_F4,
890 PREFIX_VEX_F5,
891 PREFIX_VEX_F6,
892 PREFIX_VEX_F7,
893 PREFIX_VEX_F8,
894 PREFIX_VEX_F9,
895 PREFIX_VEX_FA,
896 PREFIX_VEX_FB,
897 PREFIX_VEX_FC,
898 PREFIX_VEX_FD,
899 PREFIX_VEX_FE,
900 PREFIX_VEX_3800,
901 PREFIX_VEX_3801,
902 PREFIX_VEX_3802,
903 PREFIX_VEX_3803,
904 PREFIX_VEX_3804,
905 PREFIX_VEX_3805,
906 PREFIX_VEX_3806,
907 PREFIX_VEX_3807,
908 PREFIX_VEX_3808,
909 PREFIX_VEX_3809,
910 PREFIX_VEX_380A,
911 PREFIX_VEX_380B,
912 PREFIX_VEX_380C,
913 PREFIX_VEX_380D,
914 PREFIX_VEX_380E,
915 PREFIX_VEX_380F,
916 PREFIX_VEX_3817,
917 PREFIX_VEX_3818,
918 PREFIX_VEX_3819,
919 PREFIX_VEX_381A,
920 PREFIX_VEX_381C,
921 PREFIX_VEX_381D,
922 PREFIX_VEX_381E,
923 PREFIX_VEX_3820,
924 PREFIX_VEX_3821,
925 PREFIX_VEX_3822,
926 PREFIX_VEX_3823,
927 PREFIX_VEX_3824,
928 PREFIX_VEX_3825,
929 PREFIX_VEX_3828,
930 PREFIX_VEX_3829,
931 PREFIX_VEX_382A,
932 PREFIX_VEX_382B,
933 PREFIX_VEX_382C,
934 PREFIX_VEX_382D,
935 PREFIX_VEX_382E,
936 PREFIX_VEX_382F,
937 PREFIX_VEX_3830,
938 PREFIX_VEX_3831,
939 PREFIX_VEX_3832,
940 PREFIX_VEX_3833,
941 PREFIX_VEX_3834,
942 PREFIX_VEX_3835,
943 PREFIX_VEX_3837,
944 PREFIX_VEX_3838,
945 PREFIX_VEX_3839,
946 PREFIX_VEX_383A,
947 PREFIX_VEX_383B,
948 PREFIX_VEX_383C,
949 PREFIX_VEX_383D,
950 PREFIX_VEX_383E,
951 PREFIX_VEX_383F,
952 PREFIX_VEX_3840,
953 PREFIX_VEX_3841,
954 PREFIX_VEX_3896,
955 PREFIX_VEX_3897,
956 PREFIX_VEX_3898,
957 PREFIX_VEX_3899,
958 PREFIX_VEX_389A,
959 PREFIX_VEX_389B,
960 PREFIX_VEX_389C,
961 PREFIX_VEX_389D,
962 PREFIX_VEX_389E,
963 PREFIX_VEX_389F,
964 PREFIX_VEX_38A6,
965 PREFIX_VEX_38A7,
966 PREFIX_VEX_38A8,
967 PREFIX_VEX_38A9,
968 PREFIX_VEX_38AA,
969 PREFIX_VEX_38AB,
970 PREFIX_VEX_38AC,
971 PREFIX_VEX_38AD,
972 PREFIX_VEX_38AE,
973 PREFIX_VEX_38AF,
974 PREFIX_VEX_38B6,
975 PREFIX_VEX_38B7,
976 PREFIX_VEX_38B8,
977 PREFIX_VEX_38B9,
978 PREFIX_VEX_38BA,
979 PREFIX_VEX_38BB,
980 PREFIX_VEX_38BC,
981 PREFIX_VEX_38BD,
982 PREFIX_VEX_38BE,
983 PREFIX_VEX_38BF,
984 PREFIX_VEX_38DB,
985 PREFIX_VEX_38DC,
986 PREFIX_VEX_38DD,
987 PREFIX_VEX_38DE,
988 PREFIX_VEX_38DF,
989 PREFIX_VEX_3A04,
990 PREFIX_VEX_3A05,
991 PREFIX_VEX_3A06,
992 PREFIX_VEX_3A08,
993 PREFIX_VEX_3A09,
994 PREFIX_VEX_3A0A,
995 PREFIX_VEX_3A0B,
996 PREFIX_VEX_3A0C,
997 PREFIX_VEX_3A0D,
998 PREFIX_VEX_3A0E,
999 PREFIX_VEX_3A0F,
1000 PREFIX_VEX_3A14,
1001 PREFIX_VEX_3A15,
1002 PREFIX_VEX_3A16,
1003 PREFIX_VEX_3A17,
1004 PREFIX_VEX_3A18,
1005 PREFIX_VEX_3A19,
1006 PREFIX_VEX_3A20,
1007 PREFIX_VEX_3A21,
1008 PREFIX_VEX_3A22,
1009 PREFIX_VEX_3A40,
1010 PREFIX_VEX_3A41,
1011 PREFIX_VEX_3A42,
1012 PREFIX_VEX_3A44,
1013 PREFIX_VEX_3A4A,
1014 PREFIX_VEX_3A4B,
1015 PREFIX_VEX_3A4C,
1016 PREFIX_VEX_3A5C,
1017 PREFIX_VEX_3A5D,
1018 PREFIX_VEX_3A5E,
1019 PREFIX_VEX_3A5F,
1020 PREFIX_VEX_3A60,
1021 PREFIX_VEX_3A61,
1022 PREFIX_VEX_3A62,
1023 PREFIX_VEX_3A63,
1024 PREFIX_VEX_3A68,
1025 PREFIX_VEX_3A69,
1026 PREFIX_VEX_3A6A,
1027 PREFIX_VEX_3A6B,
1028 PREFIX_VEX_3A6C,
1029 PREFIX_VEX_3A6D,
1030 PREFIX_VEX_3A6E,
1031 PREFIX_VEX_3A6F,
1032 PREFIX_VEX_3A78,
1033 PREFIX_VEX_3A79,
1034 PREFIX_VEX_3A7A,
1035 PREFIX_VEX_3A7B,
1036 PREFIX_VEX_3A7C,
1037 PREFIX_VEX_3A7D,
1038 PREFIX_VEX_3A7E,
1039 PREFIX_VEX_3A7F,
1040 PREFIX_VEX_3ADF
51e7da1b 1041};
4e7d34a6 1042
51e7da1b
L
1043enum
1044{
1045 X86_64_06 = 0,
3873ba12
L
1046 X86_64_07,
1047 X86_64_0D,
1048 X86_64_16,
1049 X86_64_17,
1050 X86_64_1E,
1051 X86_64_1F,
1052 X86_64_27,
1053 X86_64_2F,
1054 X86_64_37,
1055 X86_64_3F,
1056 X86_64_60,
1057 X86_64_61,
1058 X86_64_62,
1059 X86_64_63,
1060 X86_64_6D,
1061 X86_64_6F,
1062 X86_64_9A,
1063 X86_64_C4,
1064 X86_64_C5,
1065 X86_64_CE,
1066 X86_64_D4,
1067 X86_64_D5,
1068 X86_64_EA,
1069 X86_64_0F01_REG_0,
1070 X86_64_0F01_REG_1,
1071 X86_64_0F01_REG_2,
1072 X86_64_0F01_REG_3
51e7da1b 1073};
4e7d34a6 1074
51e7da1b
L
1075enum
1076{
1077 THREE_BYTE_0F38 = 0,
3873ba12
L
1078 THREE_BYTE_0F3A,
1079 THREE_BYTE_0F7A
51e7da1b 1080};
4e7d34a6 1081
f88c9eb0
SP
1082enum
1083{
5dd85c99
SP
1084 XOP_08 = 0,
1085 XOP_09,
f88c9eb0
SP
1086 XOP_0A
1087};
1088
51e7da1b
L
1089enum
1090{
1091 VEX_0F = 0,
3873ba12
L
1092 VEX_0F38,
1093 VEX_0F3A
51e7da1b 1094};
c0f3af97 1095
51e7da1b
L
1096enum
1097{
1098 VEX_LEN_10_P_1 = 0,
3873ba12
L
1099 VEX_LEN_10_P_3,
1100 VEX_LEN_11_P_1,
1101 VEX_LEN_11_P_3,
1102 VEX_LEN_12_P_0_M_0,
1103 VEX_LEN_12_P_0_M_1,
1104 VEX_LEN_12_P_2,
1105 VEX_LEN_13_M_0,
1106 VEX_LEN_16_P_0_M_0,
1107 VEX_LEN_16_P_0_M_1,
1108 VEX_LEN_16_P_2,
1109 VEX_LEN_17_M_0,
1110 VEX_LEN_2A_P_1,
1111 VEX_LEN_2A_P_3,
1112 VEX_LEN_2C_P_1,
1113 VEX_LEN_2C_P_3,
1114 VEX_LEN_2D_P_1,
1115 VEX_LEN_2D_P_3,
1116 VEX_LEN_2E_P_0,
1117 VEX_LEN_2E_P_2,
1118 VEX_LEN_2F_P_0,
1119 VEX_LEN_2F_P_2,
1120 VEX_LEN_51_P_1,
1121 VEX_LEN_51_P_3,
1122 VEX_LEN_52_P_1,
1123 VEX_LEN_53_P_1,
1124 VEX_LEN_58_P_1,
1125 VEX_LEN_58_P_3,
1126 VEX_LEN_59_P_1,
1127 VEX_LEN_59_P_3,
1128 VEX_LEN_5A_P_1,
1129 VEX_LEN_5A_P_3,
1130 VEX_LEN_5C_P_1,
1131 VEX_LEN_5C_P_3,
1132 VEX_LEN_5D_P_1,
1133 VEX_LEN_5D_P_3,
1134 VEX_LEN_5E_P_1,
1135 VEX_LEN_5E_P_3,
1136 VEX_LEN_5F_P_1,
1137 VEX_LEN_5F_P_3,
1138 VEX_LEN_60_P_2,
1139 VEX_LEN_61_P_2,
1140 VEX_LEN_62_P_2,
1141 VEX_LEN_63_P_2,
1142 VEX_LEN_64_P_2,
1143 VEX_LEN_65_P_2,
1144 VEX_LEN_66_P_2,
1145 VEX_LEN_67_P_2,
1146 VEX_LEN_68_P_2,
1147 VEX_LEN_69_P_2,
1148 VEX_LEN_6A_P_2,
1149 VEX_LEN_6B_P_2,
1150 VEX_LEN_6C_P_2,
1151 VEX_LEN_6D_P_2,
1152 VEX_LEN_6E_P_2,
1153 VEX_LEN_70_P_1,
1154 VEX_LEN_70_P_2,
1155 VEX_LEN_70_P_3,
1156 VEX_LEN_71_R_2_P_2,
1157 VEX_LEN_71_R_4_P_2,
1158 VEX_LEN_71_R_6_P_2,
1159 VEX_LEN_72_R_2_P_2,
1160 VEX_LEN_72_R_4_P_2,
1161 VEX_LEN_72_R_6_P_2,
1162 VEX_LEN_73_R_2_P_2,
1163 VEX_LEN_73_R_3_P_2,
1164 VEX_LEN_73_R_6_P_2,
1165 VEX_LEN_73_R_7_P_2,
1166 VEX_LEN_74_P_2,
1167 VEX_LEN_75_P_2,
1168 VEX_LEN_76_P_2,
1169 VEX_LEN_7E_P_1,
1170 VEX_LEN_7E_P_2,
1171 VEX_LEN_AE_R_2_M_0,
1172 VEX_LEN_AE_R_3_M_0,
1173 VEX_LEN_C2_P_1,
1174 VEX_LEN_C2_P_3,
1175 VEX_LEN_C4_P_2,
1176 VEX_LEN_C5_P_2,
1177 VEX_LEN_D1_P_2,
1178 VEX_LEN_D2_P_2,
1179 VEX_LEN_D3_P_2,
1180 VEX_LEN_D4_P_2,
1181 VEX_LEN_D5_P_2,
1182 VEX_LEN_D6_P_2,
1183 VEX_LEN_D7_P_2_M_1,
1184 VEX_LEN_D8_P_2,
1185 VEX_LEN_D9_P_2,
1186 VEX_LEN_DA_P_2,
1187 VEX_LEN_DB_P_2,
1188 VEX_LEN_DC_P_2,
1189 VEX_LEN_DD_P_2,
1190 VEX_LEN_DE_P_2,
1191 VEX_LEN_DF_P_2,
1192 VEX_LEN_E0_P_2,
1193 VEX_LEN_E1_P_2,
1194 VEX_LEN_E2_P_2,
1195 VEX_LEN_E3_P_2,
1196 VEX_LEN_E4_P_2,
1197 VEX_LEN_E5_P_2,
1198 VEX_LEN_E8_P_2,
1199 VEX_LEN_E9_P_2,
1200 VEX_LEN_EA_P_2,
1201 VEX_LEN_EB_P_2,
1202 VEX_LEN_EC_P_2,
1203 VEX_LEN_ED_P_2,
1204 VEX_LEN_EE_P_2,
1205 VEX_LEN_EF_P_2,
1206 VEX_LEN_F1_P_2,
1207 VEX_LEN_F2_P_2,
1208 VEX_LEN_F3_P_2,
1209 VEX_LEN_F4_P_2,
1210 VEX_LEN_F5_P_2,
1211 VEX_LEN_F6_P_2,
1212 VEX_LEN_F7_P_2,
1213 VEX_LEN_F8_P_2,
1214 VEX_LEN_F9_P_2,
1215 VEX_LEN_FA_P_2,
1216 VEX_LEN_FB_P_2,
1217 VEX_LEN_FC_P_2,
1218 VEX_LEN_FD_P_2,
1219 VEX_LEN_FE_P_2,
1220 VEX_LEN_3800_P_2,
1221 VEX_LEN_3801_P_2,
1222 VEX_LEN_3802_P_2,
1223 VEX_LEN_3803_P_2,
1224 VEX_LEN_3804_P_2,
1225 VEX_LEN_3805_P_2,
1226 VEX_LEN_3806_P_2,
1227 VEX_LEN_3807_P_2,
1228 VEX_LEN_3808_P_2,
1229 VEX_LEN_3809_P_2,
1230 VEX_LEN_380A_P_2,
1231 VEX_LEN_380B_P_2,
1232 VEX_LEN_3819_P_2_M_0,
1233 VEX_LEN_381A_P_2_M_0,
1234 VEX_LEN_381C_P_2,
1235 VEX_LEN_381D_P_2,
1236 VEX_LEN_381E_P_2,
1237 VEX_LEN_3820_P_2,
1238 VEX_LEN_3821_P_2,
1239 VEX_LEN_3822_P_2,
1240 VEX_LEN_3823_P_2,
1241 VEX_LEN_3824_P_2,
1242 VEX_LEN_3825_P_2,
1243 VEX_LEN_3828_P_2,
1244 VEX_LEN_3829_P_2,
1245 VEX_LEN_382A_P_2_M_0,
1246 VEX_LEN_382B_P_2,
1247 VEX_LEN_3830_P_2,
1248 VEX_LEN_3831_P_2,
1249 VEX_LEN_3832_P_2,
1250 VEX_LEN_3833_P_2,
1251 VEX_LEN_3834_P_2,
1252 VEX_LEN_3835_P_2,
1253 VEX_LEN_3837_P_2,
1254 VEX_LEN_3838_P_2,
1255 VEX_LEN_3839_P_2,
1256 VEX_LEN_383A_P_2,
1257 VEX_LEN_383B_P_2,
1258 VEX_LEN_383C_P_2,
1259 VEX_LEN_383D_P_2,
1260 VEX_LEN_383E_P_2,
1261 VEX_LEN_383F_P_2,
1262 VEX_LEN_3840_P_2,
1263 VEX_LEN_3841_P_2,
1264 VEX_LEN_38DB_P_2,
1265 VEX_LEN_38DC_P_2,
1266 VEX_LEN_38DD_P_2,
1267 VEX_LEN_38DE_P_2,
1268 VEX_LEN_38DF_P_2,
1269 VEX_LEN_3A06_P_2,
1270 VEX_LEN_3A0A_P_2,
1271 VEX_LEN_3A0B_P_2,
1272 VEX_LEN_3A0E_P_2,
1273 VEX_LEN_3A0F_P_2,
1274 VEX_LEN_3A14_P_2,
1275 VEX_LEN_3A15_P_2,
1276 VEX_LEN_3A16_P_2,
1277 VEX_LEN_3A17_P_2,
1278 VEX_LEN_3A18_P_2,
1279 VEX_LEN_3A19_P_2,
1280 VEX_LEN_3A20_P_2,
1281 VEX_LEN_3A21_P_2,
1282 VEX_LEN_3A22_P_2,
1283 VEX_LEN_3A41_P_2,
1284 VEX_LEN_3A42_P_2,
1285 VEX_LEN_3A44_P_2,
1286 VEX_LEN_3A4C_P_2,
1287 VEX_LEN_3A60_P_2,
1288 VEX_LEN_3A61_P_2,
1289 VEX_LEN_3A62_P_2,
1290 VEX_LEN_3A63_P_2,
1291 VEX_LEN_3A6A_P_2,
1292 VEX_LEN_3A6B_P_2,
1293 VEX_LEN_3A6E_P_2,
1294 VEX_LEN_3A6F_P_2,
1295 VEX_LEN_3A7A_P_2,
1296 VEX_LEN_3A7B_P_2,
1297 VEX_LEN_3A7E_P_2,
1298 VEX_LEN_3A7F_P_2,
5dd85c99 1299 VEX_LEN_3ADF_P_2,
5dd85c99
SP
1300 VEX_LEN_XOP_09_80,
1301 VEX_LEN_XOP_09_81
51e7da1b 1302};
c0f3af97 1303
9e30b8e0
L
1304enum
1305{
1306 VEX_W_10_P_0 = 0,
1307 VEX_W_10_P_1,
1308 VEX_W_10_P_2,
1309 VEX_W_10_P_3,
1310 VEX_W_11_P_0,
1311 VEX_W_11_P_1,
1312 VEX_W_11_P_2,
1313 VEX_W_11_P_3,
1314 VEX_W_12_P_0_M_0,
1315 VEX_W_12_P_0_M_1,
1316 VEX_W_12_P_1,
1317 VEX_W_12_P_2,
1318 VEX_W_12_P_3,
1319 VEX_W_13_M_0,
1320 VEX_W_14,
1321 VEX_W_15,
1322 VEX_W_16_P_0_M_0,
1323 VEX_W_16_P_0_M_1,
1324 VEX_W_16_P_1,
1325 VEX_W_16_P_2,
1326 VEX_W_17_M_0,
1327 VEX_W_28,
1328 VEX_W_29,
1329 VEX_W_2B_M_0,
1330 VEX_W_2E_P_0,
1331 VEX_W_2E_P_2,
1332 VEX_W_2F_P_0,
1333 VEX_W_2F_P_2,
1334 VEX_W_50_M_0,
1335 VEX_W_51_P_0,
1336 VEX_W_51_P_1,
1337 VEX_W_51_P_2,
1338 VEX_W_51_P_3,
1339 VEX_W_52_P_0,
1340 VEX_W_52_P_1,
1341 VEX_W_53_P_0,
1342 VEX_W_53_P_1,
1343 VEX_W_58_P_0,
1344 VEX_W_58_P_1,
1345 VEX_W_58_P_2,
1346 VEX_W_58_P_3,
1347 VEX_W_59_P_0,
1348 VEX_W_59_P_1,
1349 VEX_W_59_P_2,
1350 VEX_W_59_P_3,
1351 VEX_W_5A_P_0,
1352 VEX_W_5A_P_1,
1353 VEX_W_5A_P_3,
1354 VEX_W_5B_P_0,
1355 VEX_W_5B_P_1,
1356 VEX_W_5B_P_2,
1357 VEX_W_5C_P_0,
1358 VEX_W_5C_P_1,
1359 VEX_W_5C_P_2,
1360 VEX_W_5C_P_3,
1361 VEX_W_5D_P_0,
1362 VEX_W_5D_P_1,
1363 VEX_W_5D_P_2,
1364 VEX_W_5D_P_3,
1365 VEX_W_5E_P_0,
1366 VEX_W_5E_P_1,
1367 VEX_W_5E_P_2,
1368 VEX_W_5E_P_3,
1369 VEX_W_5F_P_0,
1370 VEX_W_5F_P_1,
1371 VEX_W_5F_P_2,
1372 VEX_W_5F_P_3,
1373 VEX_W_60_P_2,
1374 VEX_W_61_P_2,
1375 VEX_W_62_P_2,
1376 VEX_W_63_P_2,
1377 VEX_W_64_P_2,
1378 VEX_W_65_P_2,
1379 VEX_W_66_P_2,
1380 VEX_W_67_P_2,
1381 VEX_W_68_P_2,
1382 VEX_W_69_P_2,
1383 VEX_W_6A_P_2,
1384 VEX_W_6B_P_2,
1385 VEX_W_6C_P_2,
1386 VEX_W_6D_P_2,
1387 VEX_W_6F_P_1,
1388 VEX_W_6F_P_2,
1389 VEX_W_70_P_1,
1390 VEX_W_70_P_2,
1391 VEX_W_70_P_3,
1392 VEX_W_71_R_2_P_2,
1393 VEX_W_71_R_4_P_2,
1394 VEX_W_71_R_6_P_2,
1395 VEX_W_72_R_2_P_2,
1396 VEX_W_72_R_4_P_2,
1397 VEX_W_72_R_6_P_2,
1398 VEX_W_73_R_2_P_2,
1399 VEX_W_73_R_3_P_2,
1400 VEX_W_73_R_6_P_2,
1401 VEX_W_73_R_7_P_2,
1402 VEX_W_74_P_2,
1403 VEX_W_75_P_2,
1404 VEX_W_76_P_2,
1405 VEX_W_77_P_0,
1406 VEX_W_7C_P_2,
1407 VEX_W_7C_P_3,
1408 VEX_W_7D_P_2,
1409 VEX_W_7D_P_3,
1410 VEX_W_7E_P_1,
1411 VEX_W_7F_P_1,
1412 VEX_W_7F_P_2,
1413 VEX_W_AE_R_2_M_0,
1414 VEX_W_AE_R_3_M_0,
1415 VEX_W_C2_P_0,
1416 VEX_W_C2_P_1,
1417 VEX_W_C2_P_2,
1418 VEX_W_C2_P_3,
1419 VEX_W_C4_P_2,
1420 VEX_W_C5_P_2,
1421 VEX_W_D0_P_2,
1422 VEX_W_D0_P_3,
1423 VEX_W_D1_P_2,
1424 VEX_W_D2_P_2,
1425 VEX_W_D3_P_2,
1426 VEX_W_D4_P_2,
1427 VEX_W_D5_P_2,
1428 VEX_W_D6_P_2,
1429 VEX_W_D7_P_2_M_1,
1430 VEX_W_D8_P_2,
1431 VEX_W_D9_P_2,
1432 VEX_W_DA_P_2,
1433 VEX_W_DB_P_2,
1434 VEX_W_DC_P_2,
1435 VEX_W_DD_P_2,
1436 VEX_W_DE_P_2,
1437 VEX_W_DF_P_2,
1438 VEX_W_E0_P_2,
1439 VEX_W_E1_P_2,
1440 VEX_W_E2_P_2,
1441 VEX_W_E3_P_2,
1442 VEX_W_E4_P_2,
1443 VEX_W_E5_P_2,
1444 VEX_W_E6_P_1,
1445 VEX_W_E6_P_2,
1446 VEX_W_E6_P_3,
1447 VEX_W_E7_P_2_M_0,
1448 VEX_W_E8_P_2,
1449 VEX_W_E9_P_2,
1450 VEX_W_EA_P_2,
1451 VEX_W_EB_P_2,
1452 VEX_W_EC_P_2,
1453 VEX_W_ED_P_2,
1454 VEX_W_EE_P_2,
1455 VEX_W_EF_P_2,
1456 VEX_W_F0_P_3_M_0,
1457 VEX_W_F1_P_2,
1458 VEX_W_F2_P_2,
1459 VEX_W_F3_P_2,
1460 VEX_W_F4_P_2,
1461 VEX_W_F5_P_2,
1462 VEX_W_F6_P_2,
1463 VEX_W_F7_P_2,
1464 VEX_W_F8_P_2,
1465 VEX_W_F9_P_2,
1466 VEX_W_FA_P_2,
1467 VEX_W_FB_P_2,
1468 VEX_W_FC_P_2,
1469 VEX_W_FD_P_2,
1470 VEX_W_FE_P_2,
1471 VEX_W_3800_P_2,
1472 VEX_W_3801_P_2,
1473 VEX_W_3802_P_2,
1474 VEX_W_3803_P_2,
1475 VEX_W_3804_P_2,
1476 VEX_W_3805_P_2,
1477 VEX_W_3806_P_2,
1478 VEX_W_3807_P_2,
1479 VEX_W_3808_P_2,
1480 VEX_W_3809_P_2,
1481 VEX_W_380A_P_2,
1482 VEX_W_380B_P_2,
1483 VEX_W_380C_P_2,
1484 VEX_W_380D_P_2,
1485 VEX_W_380E_P_2,
1486 VEX_W_380F_P_2,
1487 VEX_W_3817_P_2,
bcf2684f 1488 VEX_W_3818_P_2_M_0,
9e30b8e0
L
1489 VEX_W_3819_P_2_M_0,
1490 VEX_W_381A_P_2_M_0,
1491 VEX_W_381C_P_2,
1492 VEX_W_381D_P_2,
1493 VEX_W_381E_P_2,
1494 VEX_W_3820_P_2,
1495 VEX_W_3821_P_2,
1496 VEX_W_3822_P_2,
1497 VEX_W_3823_P_2,
1498 VEX_W_3824_P_2,
1499 VEX_W_3825_P_2,
1500 VEX_W_3828_P_2,
1501 VEX_W_3829_P_2,
1502 VEX_W_382A_P_2_M_0,
1503 VEX_W_382B_P_2,
53aa04a0
L
1504 VEX_W_382C_P_2_M_0,
1505 VEX_W_382D_P_2_M_0,
1506 VEX_W_382E_P_2_M_0,
1507 VEX_W_382F_P_2_M_0,
9e30b8e0
L
1508 VEX_W_3830_P_2,
1509 VEX_W_3831_P_2,
1510 VEX_W_3832_P_2,
1511 VEX_W_3833_P_2,
1512 VEX_W_3834_P_2,
1513 VEX_W_3835_P_2,
1514 VEX_W_3837_P_2,
1515 VEX_W_3838_P_2,
1516 VEX_W_3839_P_2,
1517 VEX_W_383A_P_2,
1518 VEX_W_383B_P_2,
1519 VEX_W_383C_P_2,
1520 VEX_W_383D_P_2,
1521 VEX_W_383E_P_2,
1522 VEX_W_383F_P_2,
1523 VEX_W_3840_P_2,
1524 VEX_W_3841_P_2,
1525 VEX_W_38DB_P_2,
1526 VEX_W_38DC_P_2,
1527 VEX_W_38DD_P_2,
1528 VEX_W_38DE_P_2,
1529 VEX_W_38DF_P_2,
1530 VEX_W_3A04_P_2,
1531 VEX_W_3A05_P_2,
1532 VEX_W_3A06_P_2,
1533 VEX_W_3A08_P_2,
1534 VEX_W_3A09_P_2,
1535 VEX_W_3A0A_P_2,
1536 VEX_W_3A0B_P_2,
1537 VEX_W_3A0C_P_2,
1538 VEX_W_3A0D_P_2,
1539 VEX_W_3A0E_P_2,
1540 VEX_W_3A0F_P_2,
1541 VEX_W_3A14_P_2,
1542 VEX_W_3A15_P_2,
1543 VEX_W_3A18_P_2,
1544 VEX_W_3A19_P_2,
1545 VEX_W_3A20_P_2,
1546 VEX_W_3A21_P_2,
1547 VEX_W_3A40_P_2,
1548 VEX_W_3A41_P_2,
1549 VEX_W_3A42_P_2,
1550 VEX_W_3A44_P_2,
1551 VEX_W_3A4A_P_2,
1552 VEX_W_3A4B_P_2,
1553 VEX_W_3A4C_P_2,
1554 VEX_W_3A60_P_2,
1555 VEX_W_3A61_P_2,
1556 VEX_W_3A62_P_2,
1557 VEX_W_3A63_P_2,
1558 VEX_W_3ADF_P_2
1559};
1560
26ca5450 1561typedef void (*op_rtn) (int bytemode, int sizeflag);
252b5132
RH
1562
1563struct dis386 {
2da11e11 1564 const char *name;
ce518a5f
L
1565 struct
1566 {
1567 op_rtn rtn;
1568 int bytemode;
1569 } op[MAX_OPERANDS];
252b5132
RH
1570};
1571
1572/* Upper case letters in the instruction names here are macros.
1573 'A' => print 'b' if no register operands or suffix_always is true
1574 'B' => print 'b' if suffix_always is true
9306ca4a 1575 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
98b528ac 1576 size prefix
ed7841b3 1577 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
98b528ac 1578 suffix_always is true
252b5132 1579 'E' => print 'e' if 32-bit form of jcxz
3ffd33cf 1580 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
52fd6d94 1581 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
5dd0794d 1582 'H' => print ",pt" or ",pn" branch hint
9306ca4a 1583 'I' => honor following macro letter even in Intel mode (implemented only
98b528ac 1584 for some of the macro letters)
9306ca4a 1585 'J' => print 'l'
42903f7f 1586 'K' => print 'd' or 'q' if rex prefix is present.
252b5132 1587 'L' => print 'l' if suffix_always is true
9d141669 1588 'M' => print 'r' if intel_mnemonic is false.
252b5132 1589 'N' => print 'n' if instruction has no wait "prefix"
a35ca55a 1590 'O' => print 'd' or 'o' (or 'q' in Intel mode)
52b15da3 1591 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
98b528ac
L
1592 or suffix_always is true. print 'q' if rex prefix is present.
1593 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
1594 is true
a35ca55a 1595 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
52b15da3 1596 'S' => print 'w', 'l' or 'q' if suffix_always is true
6439fc28
AM
1597 'T' => print 'q' in 64bit mode and behave as 'P' otherwise
1598 'U' => print 'q' in 64bit mode and behave as 'Q' otherwise
1a114b12 1599 'V' => print 'q' in 64bit mode and behave as 'S' otherwise
a35ca55a 1600 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
9306ca4a 1601 'X' => print 's', 'd' depending on data16 prefix (for XMM)
8a72226a
L
1602 'Y' => 'q' if instruction has an REX 64bit overwrite prefix and
1603 suffix_always is true.
6dd5059a 1604 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
9d141669 1605 '!' => change condition from true to false or from false to true.
98b528ac
L
1606 '%' => add 1 upper case letter to the macro.
1607
1608 2 upper case letter macros:
c0f3af97
L
1609 "XY" => print 'x' or 'y' if no register operands or suffix_always
1610 is true.
4b06377f
L
1611 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
1612 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
98b528ac 1613 or suffix_always is true
4b06377f
L
1614 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
1615 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
1616 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
52b15da3 1617
6439fc28
AM
1618 Many of the above letters print nothing in Intel mode. See "putop"
1619 for the details.
52b15da3 1620
6439fc28 1621 Braces '{' and '}', and vertical bars '|', indicate alternative
7c52e0e8 1622 mnemonic strings for AT&T and Intel. */
252b5132 1623
6439fc28 1624static const struct dis386 dis386[] = {
252b5132 1625 /* 00 */
ce518a5f
L
1626 { "addB", { Eb, Gb } },
1627 { "addS", { Ev, Gv } },
c7532693
L
1628 { "addB", { Gb, EbS } },
1629 { "addS", { Gv, EvS } },
ce518a5f
L
1630 { "addB", { AL, Ib } },
1631 { "addS", { eAX, Iv } },
4e7d34a6
L
1632 { X86_64_TABLE (X86_64_06) },
1633 { X86_64_TABLE (X86_64_07) },
252b5132 1634 /* 08 */
ce518a5f
L
1635 { "orB", { Eb, Gb } },
1636 { "orS", { Ev, Gv } },
c7532693
L
1637 { "orB", { Gb, EbS } },
1638 { "orS", { Gv, EvS } },
ce518a5f
L
1639 { "orB", { AL, Ib } },
1640 { "orS", { eAX, Iv } },
4e7d34a6 1641 { X86_64_TABLE (X86_64_0D) },
ce518a5f 1642 { "(bad)", { XX } }, /* 0x0f extended opcode escape */
252b5132 1643 /* 10 */
ce518a5f
L
1644 { "adcB", { Eb, Gb } },
1645 { "adcS", { Ev, Gv } },
c7532693
L
1646 { "adcB", { Gb, EbS } },
1647 { "adcS", { Gv, EvS } },
ce518a5f
L
1648 { "adcB", { AL, Ib } },
1649 { "adcS", { eAX, Iv } },
4e7d34a6
L
1650 { X86_64_TABLE (X86_64_16) },
1651 { X86_64_TABLE (X86_64_17) },
252b5132 1652 /* 18 */
ce518a5f
L
1653 { "sbbB", { Eb, Gb } },
1654 { "sbbS", { Ev, Gv } },
c7532693
L
1655 { "sbbB", { Gb, EbS } },
1656 { "sbbS", { Gv, EvS } },
ce518a5f
L
1657 { "sbbB", { AL, Ib } },
1658 { "sbbS", { eAX, Iv } },
4e7d34a6
L
1659 { X86_64_TABLE (X86_64_1E) },
1660 { X86_64_TABLE (X86_64_1F) },
252b5132 1661 /* 20 */
ce518a5f
L
1662 { "andB", { Eb, Gb } },
1663 { "andS", { Ev, Gv } },
c7532693
L
1664 { "andB", { Gb, EbS } },
1665 { "andS", { Gv, EvS } },
ce518a5f
L
1666 { "andB", { AL, Ib } },
1667 { "andS", { eAX, Iv } },
1668 { "(bad)", { XX } }, /* SEG ES prefix */
4e7d34a6 1669 { X86_64_TABLE (X86_64_27) },
252b5132 1670 /* 28 */
ce518a5f
L
1671 { "subB", { Eb, Gb } },
1672 { "subS", { Ev, Gv } },
c7532693
L
1673 { "subB", { Gb, EbS } },
1674 { "subS", { Gv, EvS } },
ce518a5f
L
1675 { "subB", { AL, Ib } },
1676 { "subS", { eAX, Iv } },
1677 { "(bad)", { XX } }, /* SEG CS prefix */
4e7d34a6 1678 { X86_64_TABLE (X86_64_2F) },
252b5132 1679 /* 30 */
ce518a5f
L
1680 { "xorB", { Eb, Gb } },
1681 { "xorS", { Ev, Gv } },
c7532693
L
1682 { "xorB", { Gb, EbS } },
1683 { "xorS", { Gv, EvS } },
ce518a5f
L
1684 { "xorB", { AL, Ib } },
1685 { "xorS", { eAX, Iv } },
1686 { "(bad)", { XX } }, /* SEG SS prefix */
4e7d34a6 1687 { X86_64_TABLE (X86_64_37) },
252b5132 1688 /* 38 */
ce518a5f
L
1689 { "cmpB", { Eb, Gb } },
1690 { "cmpS", { Ev, Gv } },
c7532693
L
1691 { "cmpB", { Gb, EbS } },
1692 { "cmpS", { Gv, EvS } },
ce518a5f
L
1693 { "cmpB", { AL, Ib } },
1694 { "cmpS", { eAX, Iv } },
1695 { "(bad)", { XX } }, /* SEG DS prefix */
4e7d34a6 1696 { X86_64_TABLE (X86_64_3F) },
252b5132 1697 /* 40 */
ce518a5f
L
1698 { "inc{S|}", { RMeAX } },
1699 { "inc{S|}", { RMeCX } },
1700 { "inc{S|}", { RMeDX } },
1701 { "inc{S|}", { RMeBX } },
1702 { "inc{S|}", { RMeSP } },
1703 { "inc{S|}", { RMeBP } },
1704 { "inc{S|}", { RMeSI } },
1705 { "inc{S|}", { RMeDI } },
252b5132 1706 /* 48 */
ce518a5f
L
1707 { "dec{S|}", { RMeAX } },
1708 { "dec{S|}", { RMeCX } },
1709 { "dec{S|}", { RMeDX } },
1710 { "dec{S|}", { RMeBX } },
1711 { "dec{S|}", { RMeSP } },
1712 { "dec{S|}", { RMeBP } },
1713 { "dec{S|}", { RMeSI } },
1714 { "dec{S|}", { RMeDI } },
252b5132 1715 /* 50 */
ce518a5f
L
1716 { "pushV", { RMrAX } },
1717 { "pushV", { RMrCX } },
1718 { "pushV", { RMrDX } },
1719 { "pushV", { RMrBX } },
1720 { "pushV", { RMrSP } },
1721 { "pushV", { RMrBP } },
1722 { "pushV", { RMrSI } },
1723 { "pushV", { RMrDI } },
252b5132 1724 /* 58 */
ce518a5f
L
1725 { "popV", { RMrAX } },
1726 { "popV", { RMrCX } },
1727 { "popV", { RMrDX } },
1728 { "popV", { RMrBX } },
1729 { "popV", { RMrSP } },
1730 { "popV", { RMrBP } },
1731 { "popV", { RMrSI } },
1732 { "popV", { RMrDI } },
252b5132 1733 /* 60 */
4e7d34a6
L
1734 { X86_64_TABLE (X86_64_60) },
1735 { X86_64_TABLE (X86_64_61) },
1736 { X86_64_TABLE (X86_64_62) },
1737 { X86_64_TABLE (X86_64_63) },
ce518a5f
L
1738 { "(bad)", { XX } }, /* seg fs */
1739 { "(bad)", { XX } }, /* seg gs */
1740 { "(bad)", { XX } }, /* op size prefix */
1741 { "(bad)", { XX } }, /* adr size prefix */
252b5132 1742 /* 68 */
ce518a5f
L
1743 { "pushT", { Iq } },
1744 { "imulS", { Gv, Ev, Iv } },
1745 { "pushT", { sIb } },
1746 { "imulS", { Gv, Ev, sIb } },
7c52e0e8 1747 { "ins{b|}", { Ybr, indirDX } },
4e7d34a6 1748 { X86_64_TABLE (X86_64_6D) },
7c52e0e8 1749 { "outs{b|}", { indirDXr, Xb } },
4e7d34a6 1750 { X86_64_TABLE (X86_64_6F) },
252b5132 1751 /* 70 */
ce518a5f
L
1752 { "joH", { Jb, XX, cond_jump_flag } },
1753 { "jnoH", { Jb, XX, cond_jump_flag } },
1754 { "jbH", { Jb, XX, cond_jump_flag } },
1755 { "jaeH", { Jb, XX, cond_jump_flag } },
1756 { "jeH", { Jb, XX, cond_jump_flag } },
1757 { "jneH", { Jb, XX, cond_jump_flag } },
1758 { "jbeH", { Jb, XX, cond_jump_flag } },
1759 { "jaH", { Jb, XX, cond_jump_flag } },
252b5132 1760 /* 78 */
ce518a5f
L
1761 { "jsH", { Jb, XX, cond_jump_flag } },
1762 { "jnsH", { Jb, XX, cond_jump_flag } },
1763 { "jpH", { Jb, XX, cond_jump_flag } },
1764 { "jnpH", { Jb, XX, cond_jump_flag } },
1765 { "jlH", { Jb, XX, cond_jump_flag } },
1766 { "jgeH", { Jb, XX, cond_jump_flag } },
1767 { "jleH", { Jb, XX, cond_jump_flag } },
1768 { "jgH", { Jb, XX, cond_jump_flag } },
252b5132 1769 /* 80 */
1ceb70f8
L
1770 { REG_TABLE (REG_80) },
1771 { REG_TABLE (REG_81) },
ce518a5f 1772 { "(bad)", { XX } },
1ceb70f8 1773 { REG_TABLE (REG_82) },
ce518a5f
L
1774 { "testB", { Eb, Gb } },
1775 { "testS", { Ev, Gv } },
1776 { "xchgB", { Eb, Gb } },
1777 { "xchgS", { Ev, Gv } },
252b5132 1778 /* 88 */
ce518a5f
L
1779 { "movB", { Eb, Gb } },
1780 { "movS", { Ev, Gv } },
b6169b20
L
1781 { "movB", { Gb, EbS } },
1782 { "movS", { Gv, EvS } },
ce518a5f 1783 { "movD", { Sv, Sw } },
1ceb70f8 1784 { MOD_TABLE (MOD_8D) },
ce518a5f 1785 { "movD", { Sw, Sv } },
1ceb70f8 1786 { REG_TABLE (REG_8F) },
252b5132 1787 /* 90 */
1ceb70f8 1788 { PREFIX_TABLE (PREFIX_90) },
ce518a5f
L
1789 { "xchgS", { RMeCX, eAX } },
1790 { "xchgS", { RMeDX, eAX } },
1791 { "xchgS", { RMeBX, eAX } },
1792 { "xchgS", { RMeSP, eAX } },
1793 { "xchgS", { RMeBP, eAX } },
1794 { "xchgS", { RMeSI, eAX } },
1795 { "xchgS", { RMeDI, eAX } },
252b5132 1796 /* 98 */
7c52e0e8
L
1797 { "cW{t|}R", { XX } },
1798 { "cR{t|}O", { XX } },
4e7d34a6 1799 { X86_64_TABLE (X86_64_9A) },
ce518a5f
L
1800 { "(bad)", { XX } }, /* fwait */
1801 { "pushfT", { XX } },
1802 { "popfT", { XX } },
7c52e0e8
L
1803 { "sahf", { XX } },
1804 { "lahf", { XX } },
252b5132 1805 /* a0 */
4b06377f
L
1806 { "mov%LB", { AL, Ob } },
1807 { "mov%LS", { eAX, Ov } },
1808 { "mov%LB", { Ob, AL } },
1809 { "mov%LS", { Ov, eAX } },
7c52e0e8
L
1810 { "movs{b|}", { Ybr, Xb } },
1811 { "movs{R|}", { Yvr, Xv } },
1812 { "cmps{b|}", { Xb, Yb } },
1813 { "cmps{R|}", { Xv, Yv } },
252b5132 1814 /* a8 */
ce518a5f
L
1815 { "testB", { AL, Ib } },
1816 { "testS", { eAX, Iv } },
1817 { "stosB", { Ybr, AL } },
1818 { "stosS", { Yvr, eAX } },
1819 { "lodsB", { ALr, Xb } },
1820 { "lodsS", { eAXr, Xv } },
1821 { "scasB", { AL, Yb } },
1822 { "scasS", { eAX, Yv } },
252b5132 1823 /* b0 */
ce518a5f
L
1824 { "movB", { RMAL, Ib } },
1825 { "movB", { RMCL, Ib } },
1826 { "movB", { RMDL, Ib } },
1827 { "movB", { RMBL, Ib } },
1828 { "movB", { RMAH, Ib } },
1829 { "movB", { RMCH, Ib } },
1830 { "movB", { RMDH, Ib } },
1831 { "movB", { RMBH, Ib } },
252b5132 1832 /* b8 */
4b06377f
L
1833 { "mov%LV", { RMeAX, Iv64 } },
1834 { "mov%LV", { RMeCX, Iv64 } },
1835 { "mov%LV", { RMeDX, Iv64 } },
1836 { "mov%LV", { RMeBX, Iv64 } },
1837 { "mov%LV", { RMeSP, Iv64 } },
1838 { "mov%LV", { RMeBP, Iv64 } },
1839 { "mov%LV", { RMeSI, Iv64 } },
1840 { "mov%LV", { RMeDI, Iv64 } },
252b5132 1841 /* c0 */
1ceb70f8
L
1842 { REG_TABLE (REG_C0) },
1843 { REG_TABLE (REG_C1) },
ce518a5f
L
1844 { "retT", { Iw } },
1845 { "retT", { XX } },
4e7d34a6
L
1846 { X86_64_TABLE (X86_64_C4) },
1847 { X86_64_TABLE (X86_64_C5) },
1ceb70f8
L
1848 { REG_TABLE (REG_C6) },
1849 { REG_TABLE (REG_C7) },
252b5132 1850 /* c8 */
ce518a5f
L
1851 { "enterT", { Iw, Ib } },
1852 { "leaveT", { XX } },
ddab3d59
JB
1853 { "Jret{|f}P", { Iw } },
1854 { "Jret{|f}P", { XX } },
ce518a5f
L
1855 { "int3", { XX } },
1856 { "int", { Ib } },
4e7d34a6 1857 { X86_64_TABLE (X86_64_CE) },
ce518a5f 1858 { "iretP", { XX } },
252b5132 1859 /* d0 */
1ceb70f8
L
1860 { REG_TABLE (REG_D0) },
1861 { REG_TABLE (REG_D1) },
1862 { REG_TABLE (REG_D2) },
1863 { REG_TABLE (REG_D3) },
4e7d34a6
L
1864 { X86_64_TABLE (X86_64_D4) },
1865 { X86_64_TABLE (X86_64_D5) },
ce518a5f
L
1866 { "(bad)", { XX } },
1867 { "xlat", { DSBX } },
252b5132
RH
1868 /* d8 */
1869 { FLOAT },
1870 { FLOAT },
1871 { FLOAT },
1872 { FLOAT },
1873 { FLOAT },
1874 { FLOAT },
1875 { FLOAT },
1876 { FLOAT },
1877 /* e0 */
ce518a5f
L
1878 { "loopneFH", { Jb, XX, loop_jcxz_flag } },
1879 { "loopeFH", { Jb, XX, loop_jcxz_flag } },
1880 { "loopFH", { Jb, XX, loop_jcxz_flag } },
1881 { "jEcxzH", { Jb, XX, loop_jcxz_flag } },
1882 { "inB", { AL, Ib } },
1883 { "inG", { zAX, Ib } },
1884 { "outB", { Ib, AL } },
1885 { "outG", { Ib, zAX } },
252b5132 1886 /* e8 */
ce518a5f
L
1887 { "callT", { Jv } },
1888 { "jmpT", { Jv } },
4e7d34a6 1889 { X86_64_TABLE (X86_64_EA) },
ce518a5f
L
1890 { "jmp", { Jb } },
1891 { "inB", { AL, indirDX } },
1892 { "inG", { zAX, indirDX } },
1893 { "outB", { indirDX, AL } },
1894 { "outG", { indirDX, zAX } },
252b5132 1895 /* f0 */
ce518a5f
L
1896 { "(bad)", { XX } }, /* lock prefix */
1897 { "icebp", { XX } },
1898 { "(bad)", { XX } }, /* repne */
1899 { "(bad)", { XX } }, /* repz */
1900 { "hlt", { XX } },
1901 { "cmc", { XX } },
1ceb70f8
L
1902 { REG_TABLE (REG_F6) },
1903 { REG_TABLE (REG_F7) },
252b5132 1904 /* f8 */
ce518a5f
L
1905 { "clc", { XX } },
1906 { "stc", { XX } },
1907 { "cli", { XX } },
1908 { "sti", { XX } },
1909 { "cld", { XX } },
1910 { "std", { XX } },
1ceb70f8
L
1911 { REG_TABLE (REG_FE) },
1912 { REG_TABLE (REG_FF) },
252b5132
RH
1913};
1914
6439fc28 1915static const struct dis386 dis386_twobyte[] = {
252b5132 1916 /* 00 */
1ceb70f8
L
1917 { REG_TABLE (REG_0F00 ) },
1918 { REG_TABLE (REG_0F01 ) },
ce518a5f
L
1919 { "larS", { Gv, Ew } },
1920 { "lslS", { Gv, Ew } },
1921 { "(bad)", { XX } },
1922 { "syscall", { XX } },
1923 { "clts", { XX } },
1924 { "sysretP", { XX } },
252b5132 1925 /* 08 */
ce518a5f
L
1926 { "invd", { XX } },
1927 { "wbinvd", { XX } },
1928 { "(bad)", { XX } },
1929 { "ud2a", { XX } },
1930 { "(bad)", { XX } },
b5b1fc4f 1931 { REG_TABLE (REG_0F0D) },
ce518a5f
L
1932 { "femms", { XX } },
1933 { "", { MX, EM, OPSUF } }, /* See OP_3DNowSuffix. */
252b5132 1934 /* 10 */
1ceb70f8
L
1935 { PREFIX_TABLE (PREFIX_0F10) },
1936 { PREFIX_TABLE (PREFIX_0F11) },
1937 { PREFIX_TABLE (PREFIX_0F12) },
1938 { MOD_TABLE (MOD_0F13) },
f2a421c4
L
1939 { "unpcklpX", { XM, EXx } },
1940 { "unpckhpX", { XM, EXx } },
1ceb70f8
L
1941 { PREFIX_TABLE (PREFIX_0F16) },
1942 { MOD_TABLE (MOD_0F17) },
252b5132 1943 /* 18 */
1ceb70f8 1944 { REG_TABLE (REG_0F18) },
b5b1fc4f
L
1945 { "nopQ", { Ev } },
1946 { "nopQ", { Ev } },
1947 { "nopQ", { Ev } },
1948 { "nopQ", { Ev } },
1949 { "nopQ", { Ev } },
1950 { "nopQ", { Ev } },
ce518a5f 1951 { "nopQ", { Ev } },
252b5132 1952 /* 20 */
1ceb70f8
L
1953 { MOD_TABLE (MOD_0F20) },
1954 { MOD_TABLE (MOD_0F21) },
1955 { MOD_TABLE (MOD_0F22) },
1956 { MOD_TABLE (MOD_0F23) },
1957 { MOD_TABLE (MOD_0F24) },
c1e679ec 1958 { "(bad)", { XX } },
1ceb70f8 1959 { MOD_TABLE (MOD_0F26) },
ce518a5f 1960 { "(bad)", { XX } },
252b5132 1961 /* 28 */
09a2c6cf 1962 { "movapX", { XM, EXx } },
b6169b20 1963 { "movapX", { EXxS, XM } },
1ceb70f8
L
1964 { PREFIX_TABLE (PREFIX_0F2A) },
1965 { PREFIX_TABLE (PREFIX_0F2B) },
1966 { PREFIX_TABLE (PREFIX_0F2C) },
1967 { PREFIX_TABLE (PREFIX_0F2D) },
1968 { PREFIX_TABLE (PREFIX_0F2E) },
1969 { PREFIX_TABLE (PREFIX_0F2F) },
252b5132 1970 /* 30 */
ce518a5f
L
1971 { "wrmsr", { XX } },
1972 { "rdtsc", { XX } },
1973 { "rdmsr", { XX } },
1974 { "rdpmc", { XX } },
1975 { "sysenter", { XX } },
1976 { "sysexit", { XX } },
1977 { "(bad)", { XX } },
47dd174c 1978 { "getsec", { XX } },
252b5132 1979 /* 38 */
4e7d34a6 1980 { THREE_BYTE_TABLE (THREE_BYTE_0F38) },
ce518a5f 1981 { "(bad)", { XX } },
4e7d34a6 1982 { THREE_BYTE_TABLE (THREE_BYTE_0F3A) },
ce518a5f
L
1983 { "(bad)", { XX } },
1984 { "(bad)", { XX } },
1985 { "(bad)", { XX } },
1986 { "(bad)", { XX } },
1987 { "(bad)", { XX } },
252b5132 1988 /* 40 */
b19d5385
JB
1989 { "cmovoS", { Gv, Ev } },
1990 { "cmovnoS", { Gv, Ev } },
1991 { "cmovbS", { Gv, Ev } },
1992 { "cmovaeS", { Gv, Ev } },
1993 { "cmoveS", { Gv, Ev } },
1994 { "cmovneS", { Gv, Ev } },
1995 { "cmovbeS", { Gv, Ev } },
1996 { "cmovaS", { Gv, Ev } },
252b5132 1997 /* 48 */
b19d5385
JB
1998 { "cmovsS", { Gv, Ev } },
1999 { "cmovnsS", { Gv, Ev } },
2000 { "cmovpS", { Gv, Ev } },
2001 { "cmovnpS", { Gv, Ev } },
2002 { "cmovlS", { Gv, Ev } },
2003 { "cmovgeS", { Gv, Ev } },
2004 { "cmovleS", { Gv, Ev } },
2005 { "cmovgS", { Gv, Ev } },
252b5132 2006 /* 50 */
75c135a8 2007 { MOD_TABLE (MOD_0F51) },
1ceb70f8
L
2008 { PREFIX_TABLE (PREFIX_0F51) },
2009 { PREFIX_TABLE (PREFIX_0F52) },
2010 { PREFIX_TABLE (PREFIX_0F53) },
09a2c6cf
L
2011 { "andpX", { XM, EXx } },
2012 { "andnpX", { XM, EXx } },
2013 { "orpX", { XM, EXx } },
2014 { "xorpX", { XM, EXx } },
252b5132 2015 /* 58 */
1ceb70f8
L
2016 { PREFIX_TABLE (PREFIX_0F58) },
2017 { PREFIX_TABLE (PREFIX_0F59) },
2018 { PREFIX_TABLE (PREFIX_0F5A) },
2019 { PREFIX_TABLE (PREFIX_0F5B) },
2020 { PREFIX_TABLE (PREFIX_0F5C) },
2021 { PREFIX_TABLE (PREFIX_0F5D) },
2022 { PREFIX_TABLE (PREFIX_0F5E) },
2023 { PREFIX_TABLE (PREFIX_0F5F) },
252b5132 2024 /* 60 */
1ceb70f8
L
2025 { PREFIX_TABLE (PREFIX_0F60) },
2026 { PREFIX_TABLE (PREFIX_0F61) },
2027 { PREFIX_TABLE (PREFIX_0F62) },
ce518a5f
L
2028 { "packsswb", { MX, EM } },
2029 { "pcmpgtb", { MX, EM } },
2030 { "pcmpgtw", { MX, EM } },
2031 { "pcmpgtd", { MX, EM } },
2032 { "packuswb", { MX, EM } },
252b5132 2033 /* 68 */
ce518a5f
L
2034 { "punpckhbw", { MX, EM } },
2035 { "punpckhwd", { MX, EM } },
2036 { "punpckhdq", { MX, EM } },
2037 { "packssdw", { MX, EM } },
1ceb70f8
L
2038 { PREFIX_TABLE (PREFIX_0F6C) },
2039 { PREFIX_TABLE (PREFIX_0F6D) },
231af070 2040 { "movK", { MX, Edq } },
1ceb70f8 2041 { PREFIX_TABLE (PREFIX_0F6F) },
252b5132 2042 /* 70 */
1ceb70f8
L
2043 { PREFIX_TABLE (PREFIX_0F70) },
2044 { REG_TABLE (REG_0F71) },
2045 { REG_TABLE (REG_0F72) },
2046 { REG_TABLE (REG_0F73) },
ce518a5f
L
2047 { "pcmpeqb", { MX, EM } },
2048 { "pcmpeqw", { MX, EM } },
2049 { "pcmpeqd", { MX, EM } },
2050 { "emms", { XX } },
252b5132 2051 /* 78 */
1ceb70f8
L
2052 { PREFIX_TABLE (PREFIX_0F78) },
2053 { PREFIX_TABLE (PREFIX_0F79) },
4e7d34a6 2054 { THREE_BYTE_TABLE (THREE_BYTE_0F7A) },
c1e679ec 2055 { "(bad)", { XX } },
1ceb70f8
L
2056 { PREFIX_TABLE (PREFIX_0F7C) },
2057 { PREFIX_TABLE (PREFIX_0F7D) },
2058 { PREFIX_TABLE (PREFIX_0F7E) },
2059 { PREFIX_TABLE (PREFIX_0F7F) },
252b5132 2060 /* 80 */
ce518a5f
L
2061 { "joH", { Jv, XX, cond_jump_flag } },
2062 { "jnoH", { Jv, XX, cond_jump_flag } },
2063 { "jbH", { Jv, XX, cond_jump_flag } },
2064 { "jaeH", { Jv, XX, cond_jump_flag } },
2065 { "jeH", { Jv, XX, cond_jump_flag } },
2066 { "jneH", { Jv, XX, cond_jump_flag } },
2067 { "jbeH", { Jv, XX, cond_jump_flag } },
2068 { "jaH", { Jv, XX, cond_jump_flag } },
252b5132 2069 /* 88 */
ce518a5f
L
2070 { "jsH", { Jv, XX, cond_jump_flag } },
2071 { "jnsH", { Jv, XX, cond_jump_flag } },
2072 { "jpH", { Jv, XX, cond_jump_flag } },
2073 { "jnpH", { Jv, XX, cond_jump_flag } },
2074 { "jlH", { Jv, XX, cond_jump_flag } },
2075 { "jgeH", { Jv, XX, cond_jump_flag } },
2076 { "jleH", { Jv, XX, cond_jump_flag } },
2077 { "jgH", { Jv, XX, cond_jump_flag } },
252b5132 2078 /* 90 */
ce518a5f
L
2079 { "seto", { Eb } },
2080 { "setno", { Eb } },
2081 { "setb", { Eb } },
2082 { "setae", { Eb } },
2083 { "sete", { Eb } },
2084 { "setne", { Eb } },
2085 { "setbe", { Eb } },
2086 { "seta", { Eb } },
252b5132 2087 /* 98 */
ce518a5f
L
2088 { "sets", { Eb } },
2089 { "setns", { Eb } },
2090 { "setp", { Eb } },
2091 { "setnp", { Eb } },
2092 { "setl", { Eb } },
2093 { "setge", { Eb } },
2094 { "setle", { Eb } },
2095 { "setg", { Eb } },
252b5132 2096 /* a0 */
ce518a5f
L
2097 { "pushT", { fs } },
2098 { "popT", { fs } },
2099 { "cpuid", { XX } },
2100 { "btS", { Ev, Gv } },
2101 { "shldS", { Ev, Gv, Ib } },
2102 { "shldS", { Ev, Gv, CL } },
1ceb70f8
L
2103 { REG_TABLE (REG_0FA6) },
2104 { REG_TABLE (REG_0FA7) },
252b5132 2105 /* a8 */
ce518a5f
L
2106 { "pushT", { gs } },
2107 { "popT", { gs } },
2108 { "rsm", { XX } },
2109 { "btsS", { Ev, Gv } },
2110 { "shrdS", { Ev, Gv, Ib } },
2111 { "shrdS", { Ev, Gv, CL } },
1ceb70f8 2112 { REG_TABLE (REG_0FAE) },
ce518a5f 2113 { "imulS", { Gv, Ev } },
252b5132 2114 /* b0 */
ce518a5f
L
2115 { "cmpxchgB", { Eb, Gb } },
2116 { "cmpxchgS", { Ev, Gv } },
1ceb70f8 2117 { MOD_TABLE (MOD_0FB2) },
ce518a5f 2118 { "btrS", { Ev, Gv } },
1ceb70f8
L
2119 { MOD_TABLE (MOD_0FB4) },
2120 { MOD_TABLE (MOD_0FB5) },
7c52e0e8
L
2121 { "movz{bR|x}", { Gv, Eb } },
2122 { "movz{wR|x}", { Gv, Ew } }, /* yes, there really is movzww ! */
252b5132 2123 /* b8 */
1ceb70f8 2124 { PREFIX_TABLE (PREFIX_0FB8) },
ce518a5f 2125 { "ud2b", { XX } },
1ceb70f8 2126 { REG_TABLE (REG_0FBA) },
ce518a5f
L
2127 { "btcS", { Ev, Gv } },
2128 { "bsfS", { Gv, Ev } },
1ceb70f8 2129 { PREFIX_TABLE (PREFIX_0FBD) },
7c52e0e8
L
2130 { "movs{bR|x}", { Gv, Eb } },
2131 { "movs{wR|x}", { Gv, Ew } }, /* yes, there really is movsww ! */
252b5132 2132 /* c0 */
ce518a5f
L
2133 { "xaddB", { Eb, Gb } },
2134 { "xaddS", { Ev, Gv } },
1ceb70f8 2135 { PREFIX_TABLE (PREFIX_0FC2) },
4ee52178 2136 { PREFIX_TABLE (PREFIX_0FC3) },
ce518a5f
L
2137 { "pinsrw", { MX, Edqw, Ib } },
2138 { "pextrw", { Gdq, MS, Ib } },
09a2c6cf 2139 { "shufpX", { XM, EXx, Ib } },
1ceb70f8 2140 { REG_TABLE (REG_0FC7) },
252b5132 2141 /* c8 */
ce518a5f
L
2142 { "bswap", { RMeAX } },
2143 { "bswap", { RMeCX } },
2144 { "bswap", { RMeDX } },
2145 { "bswap", { RMeBX } },
2146 { "bswap", { RMeSP } },
2147 { "bswap", { RMeBP } },
2148 { "bswap", { RMeSI } },
2149 { "bswap", { RMeDI } },
252b5132 2150 /* d0 */
1ceb70f8 2151 { PREFIX_TABLE (PREFIX_0FD0) },
ce518a5f
L
2152 { "psrlw", { MX, EM } },
2153 { "psrld", { MX, EM } },
2154 { "psrlq", { MX, EM } },
2155 { "paddq", { MX, EM } },
2156 { "pmullw", { MX, EM } },
1ceb70f8 2157 { PREFIX_TABLE (PREFIX_0FD6) },
75c135a8 2158 { MOD_TABLE (MOD_0FD7) },
252b5132 2159 /* d8 */
ce518a5f
L
2160 { "psubusb", { MX, EM } },
2161 { "psubusw", { MX, EM } },
2162 { "pminub", { MX, EM } },
2163 { "pand", { MX, EM } },
2164 { "paddusb", { MX, EM } },
2165 { "paddusw", { MX, EM } },
2166 { "pmaxub", { MX, EM } },
2167 { "pandn", { MX, EM } },
252b5132 2168 /* e0 */
ce518a5f
L
2169 { "pavgb", { MX, EM } },
2170 { "psraw", { MX, EM } },
2171 { "psrad", { MX, EM } },
2172 { "pavgw", { MX, EM } },
2173 { "pmulhuw", { MX, EM } },
2174 { "pmulhw", { MX, EM } },
1ceb70f8
L
2175 { PREFIX_TABLE (PREFIX_0FE6) },
2176 { PREFIX_TABLE (PREFIX_0FE7) },
252b5132 2177 /* e8 */
ce518a5f
L
2178 { "psubsb", { MX, EM } },
2179 { "psubsw", { MX, EM } },
2180 { "pminsw", { MX, EM } },
2181 { "por", { MX, EM } },
2182 { "paddsb", { MX, EM } },
2183 { "paddsw", { MX, EM } },
2184 { "pmaxsw", { MX, EM } },
2185 { "pxor", { MX, EM } },
252b5132 2186 /* f0 */
1ceb70f8 2187 { PREFIX_TABLE (PREFIX_0FF0) },
ce518a5f
L
2188 { "psllw", { MX, EM } },
2189 { "pslld", { MX, EM } },
2190 { "psllq", { MX, EM } },
2191 { "pmuludq", { MX, EM } },
2192 { "pmaddwd", { MX, EM } },
2193 { "psadbw", { MX, EM } },
1ceb70f8 2194 { PREFIX_TABLE (PREFIX_0FF7) },
252b5132 2195 /* f8 */
ce518a5f
L
2196 { "psubb", { MX, EM } },
2197 { "psubw", { MX, EM } },
2198 { "psubd", { MX, EM } },
2199 { "psubq", { MX, EM } },
2200 { "paddb", { MX, EM } },
2201 { "paddw", { MX, EM } },
2202 { "paddd", { MX, EM } },
2203 { "(bad)", { XX } },
252b5132
RH
2204};
2205
2206static const unsigned char onebyte_has_modrm[256] = {
c608c12e
AM
2207 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2208 /* ------------------------------- */
2209 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
2210 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
2211 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
2212 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
2213 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
2214 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
2215 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
2216 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
2217 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
2218 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
2219 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
2220 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
2221 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
2222 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
2223 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
2224 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
2225 /* ------------------------------- */
2226 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
252b5132
RH
2227};
2228
2229static const unsigned char twobyte_has_modrm[256] = {
c608c12e
AM
2230 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2231 /* ------------------------------- */
252b5132 2232 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
b5b1fc4f 2233 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
85f10a01 2234 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
331d2d0d 2235 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
252b5132 2236 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
4bba6815
AM
2237 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
2238 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
85f10a01 2239 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
252b5132
RH
2240 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
2241 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
30d1c836 2242 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
050dfa73 2243 /* b0 */ 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, /* bf */
252b5132 2244 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
ca164297 2245 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
4bba6815 2246 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
ca164297 2247 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
c608c12e
AM
2248 /* ------------------------------- */
2249 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2250};
2251
252b5132
RH
2252static char obuf[100];
2253static char *obufp;
ea397f5b 2254static char *mnemonicendp;
252b5132
RH
2255static char scratchbuf[100];
2256static unsigned char *start_codep;
2257static unsigned char *insn_codep;
2258static unsigned char *codep;
f16cd0d5
L
2259static int last_lock_prefix;
2260static int last_repz_prefix;
2261static int last_repnz_prefix;
2262static int last_data_prefix;
2263static int last_addr_prefix;
2264static int last_rex_prefix;
2265static int last_seg_prefix;
2266#define MAX_CODE_LENGTH 15
2267/* We can up to 14 prefixes since the maximum instruction length is
2268 15bytes. */
2269static int all_prefixes[MAX_CODE_LENGTH - 1];
252b5132 2270static disassemble_info *the_info;
7967e09e
L
2271static struct
2272 {
2273 int mod;
7967e09e 2274 int reg;
484c222e 2275 int rm;
7967e09e
L
2276 }
2277modrm;
4bba6815 2278static unsigned char need_modrm;
c0f3af97
L
2279static struct
2280 {
2281 int register_specifier;
2282 int length;
2283 int prefix;
2284 int w;
2285 }
2286vex;
2287static unsigned char need_vex;
2288static unsigned char need_vex_reg;
dae39acc 2289static unsigned char vex_w_done;
252b5132 2290
ea397f5b
L
2291struct op
2292 {
2293 const char *name;
2294 unsigned int len;
2295 };
2296
4bba6815
AM
2297/* If we are accessing mod/rm/reg without need_modrm set, then the
2298 values are stale. Hitting this abort likely indicates that you
2299 need to update onebyte_has_modrm or twobyte_has_modrm. */
2300#define MODRM_CHECK if (!need_modrm) abort ()
2301
d708bcba
AM
2302static const char **names64;
2303static const char **names32;
2304static const char **names16;
2305static const char **names8;
2306static const char **names8rex;
2307static const char **names_seg;
db51cc60
L
2308static const char *index64;
2309static const char *index32;
d708bcba
AM
2310static const char **index16;
2311
2312static const char *intel_names64[] = {
2313 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
2314 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
2315};
2316static const char *intel_names32[] = {
2317 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
2318 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
2319};
2320static const char *intel_names16[] = {
2321 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
2322 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
2323};
2324static const char *intel_names8[] = {
2325 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
2326};
2327static const char *intel_names8rex[] = {
2328 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
2329 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
2330};
2331static const char *intel_names_seg[] = {
2332 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
2333};
db51cc60
L
2334static const char *intel_index64 = "riz";
2335static const char *intel_index32 = "eiz";
d708bcba
AM
2336static const char *intel_index16[] = {
2337 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
2338};
2339
2340static const char *att_names64[] = {
2341 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
52b15da3
JH
2342 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
2343};
d708bcba
AM
2344static const char *att_names32[] = {
2345 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
52b15da3 2346 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
252b5132 2347};
d708bcba
AM
2348static const char *att_names16[] = {
2349 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
52b15da3 2350 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
252b5132 2351};
d708bcba
AM
2352static const char *att_names8[] = {
2353 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
252b5132 2354};
d708bcba
AM
2355static const char *att_names8rex[] = {
2356 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
52b15da3
JH
2357 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
2358};
d708bcba
AM
2359static const char *att_names_seg[] = {
2360 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
252b5132 2361};
db51cc60
L
2362static const char *att_index64 = "%riz";
2363static const char *att_index32 = "%eiz";
d708bcba
AM
2364static const char *att_index16[] = {
2365 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
252b5132
RH
2366};
2367
1ceb70f8
L
2368static const struct dis386 reg_table[][8] = {
2369 /* REG_80 */
252b5132 2370 {
ce518a5f
L
2371 { "addA", { Eb, Ib } },
2372 { "orA", { Eb, Ib } },
2373 { "adcA", { Eb, Ib } },
2374 { "sbbA", { Eb, Ib } },
2375 { "andA", { Eb, Ib } },
2376 { "subA", { Eb, Ib } },
2377 { "xorA", { Eb, Ib } },
2378 { "cmpA", { Eb, Ib } },
252b5132 2379 },
1ceb70f8 2380 /* REG_81 */
252b5132 2381 {
ce518a5f
L
2382 { "addQ", { Ev, Iv } },
2383 { "orQ", { Ev, Iv } },
2384 { "adcQ", { Ev, Iv } },
2385 { "sbbQ", { Ev, Iv } },
2386 { "andQ", { Ev, Iv } },
2387 { "subQ", { Ev, Iv } },
2388 { "xorQ", { Ev, Iv } },
2389 { "cmpQ", { Ev, Iv } },
252b5132 2390 },
1ceb70f8 2391 /* REG_82 */
252b5132 2392 {
ce518a5f
L
2393 { "addQ", { Ev, sIb } },
2394 { "orQ", { Ev, sIb } },
2395 { "adcQ", { Ev, sIb } },
2396 { "sbbQ", { Ev, sIb } },
2397 { "andQ", { Ev, sIb } },
2398 { "subQ", { Ev, sIb } },
2399 { "xorQ", { Ev, sIb } },
2400 { "cmpQ", { Ev, sIb } },
252b5132 2401 },
1ceb70f8 2402 /* REG_8F */
4e7d34a6
L
2403 {
2404 { "popU", { stackEv } },
c48244a5 2405 { XOP_8F_TABLE (XOP_09) },
4e7d34a6
L
2406 { "(bad)", { XX } },
2407 { "(bad)", { XX } },
2408 { "(bad)", { XX } },
f88c9eb0 2409 { XOP_8F_TABLE (XOP_09) },
4e7d34a6
L
2410 { "(bad)", { XX } },
2411 { "(bad)", { XX } },
2412 },
1ceb70f8 2413 /* REG_C0 */
252b5132 2414 {
ce518a5f
L
2415 { "rolA", { Eb, Ib } },
2416 { "rorA", { Eb, Ib } },
2417 { "rclA", { Eb, Ib } },
2418 { "rcrA", { Eb, Ib } },
2419 { "shlA", { Eb, Ib } },
2420 { "shrA", { Eb, Ib } },
2421 { "(bad)", { XX } },
2422 { "sarA", { Eb, Ib } },
252b5132 2423 },
1ceb70f8 2424 /* REG_C1 */
252b5132 2425 {
ce518a5f
L
2426 { "rolQ", { Ev, Ib } },
2427 { "rorQ", { Ev, Ib } },
2428 { "rclQ", { Ev, Ib } },
2429 { "rcrQ", { Ev, Ib } },
2430 { "shlQ", { Ev, Ib } },
2431 { "shrQ", { Ev, Ib } },
2432 { "(bad)", { XX } },
2433 { "sarQ", { Ev, Ib } },
252b5132 2434 },
1ceb70f8 2435 /* REG_C6 */
4e7d34a6
L
2436 {
2437 { "movA", { Eb, Ib } },
2438 { "(bad)", { XX } },
2439 { "(bad)", { XX } },
2440 { "(bad)", { XX } },
2441 { "(bad)", { XX } },
2442 { "(bad)", { XX } },
2443 { "(bad)", { XX } },
2444 { "(bad)", { XX } },
2445 },
1ceb70f8 2446 /* REG_C7 */
4e7d34a6
L
2447 {
2448 { "movQ", { Ev, Iv } },
2449 { "(bad)", { XX } },
2450 { "(bad)", { XX } },
2451 { "(bad)", { XX } },
2452 { "(bad)", { XX } },
2453 { "(bad)", { XX } },
2454 { "(bad)", { XX } },
2455 { "(bad)", { XX } },
2456 },
1ceb70f8 2457 /* REG_D0 */
252b5132 2458 {
ce518a5f
L
2459 { "rolA", { Eb, I1 } },
2460 { "rorA", { Eb, I1 } },
2461 { "rclA", { Eb, I1 } },
2462 { "rcrA", { Eb, I1 } },
2463 { "shlA", { Eb, I1 } },
2464 { "shrA", { Eb, I1 } },
2465 { "(bad)", { XX } },
2466 { "sarA", { Eb, I1 } },
252b5132 2467 },
1ceb70f8 2468 /* REG_D1 */
252b5132 2469 {
ce518a5f
L
2470 { "rolQ", { Ev, I1 } },
2471 { "rorQ", { Ev, I1 } },
2472 { "rclQ", { Ev, I1 } },
2473 { "rcrQ", { Ev, I1 } },
2474 { "shlQ", { Ev, I1 } },
2475 { "shrQ", { Ev, I1 } },
2476 { "(bad)", { XX } },
2477 { "sarQ", { Ev, I1 } },
252b5132 2478 },
1ceb70f8 2479 /* REG_D2 */
252b5132 2480 {
ce518a5f
L
2481 { "rolA", { Eb, CL } },
2482 { "rorA", { Eb, CL } },
2483 { "rclA", { Eb, CL } },
2484 { "rcrA", { Eb, CL } },
2485 { "shlA", { Eb, CL } },
2486 { "shrA", { Eb, CL } },
2487 { "(bad)", { XX } },
2488 { "sarA", { Eb, CL } },
252b5132 2489 },
1ceb70f8 2490 /* REG_D3 */
252b5132 2491 {
ce518a5f
L
2492 { "rolQ", { Ev, CL } },
2493 { "rorQ", { Ev, CL } },
2494 { "rclQ", { Ev, CL } },
2495 { "rcrQ", { Ev, CL } },
2496 { "shlQ", { Ev, CL } },
2497 { "shrQ", { Ev, CL } },
2498 { "(bad)", { XX } },
2499 { "sarQ", { Ev, CL } },
252b5132 2500 },
1ceb70f8 2501 /* REG_F6 */
252b5132 2502 {
ce518a5f 2503 { "testA", { Eb, Ib } },
058f233b 2504 { "(bad)", { XX } },
ce518a5f
L
2505 { "notA", { Eb } },
2506 { "negA", { Eb } },
2507 { "mulA", { Eb } }, /* Don't print the implicit %al register, */
2508 { "imulA", { Eb } }, /* to distinguish these opcodes from other */
2509 { "divA", { Eb } }, /* mul/imul opcodes. Do the same for div */
2510 { "idivA", { Eb } }, /* and idiv for consistency. */
252b5132 2511 },
1ceb70f8 2512 /* REG_F7 */
252b5132 2513 {
ce518a5f
L
2514 { "testQ", { Ev, Iv } },
2515 { "(bad)", { XX } },
2516 { "notQ", { Ev } },
2517 { "negQ", { Ev } },
2518 { "mulQ", { Ev } }, /* Don't print the implicit register. */
2519 { "imulQ", { Ev } },
2520 { "divQ", { Ev } },
2521 { "idivQ", { Ev } },
252b5132 2522 },
1ceb70f8 2523 /* REG_FE */
252b5132 2524 {
ce518a5f
L
2525 { "incA", { Eb } },
2526 { "decA", { Eb } },
2527 { "(bad)", { XX } },
2528 { "(bad)", { XX } },
2529 { "(bad)", { XX } },
2530 { "(bad)", { XX } },
2531 { "(bad)", { XX } },
2532 { "(bad)", { XX } },
252b5132 2533 },
1ceb70f8 2534 /* REG_FF */
252b5132 2535 {
ce518a5f
L
2536 { "incQ", { Ev } },
2537 { "decQ", { Ev } },
2538 { "callT", { indirEv } },
2539 { "JcallT", { indirEp } },
2540 { "jmpT", { indirEv } },
2541 { "JjmpT", { indirEp } },
2542 { "pushU", { stackEv } },
2543 { "(bad)", { XX } },
252b5132 2544 },
1ceb70f8 2545 /* REG_0F00 */
252b5132 2546 {
ce518a5f
L
2547 { "sldtD", { Sv } },
2548 { "strD", { Sv } },
2549 { "lldt", { Ew } },
2550 { "ltr", { Ew } },
2551 { "verr", { Ew } },
2552 { "verw", { Ew } },
2553 { "(bad)", { XX } },
2554 { "(bad)", { XX } },
252b5132 2555 },
1ceb70f8 2556 /* REG_0F01 */
252b5132 2557 {
1ceb70f8
L
2558 { MOD_TABLE (MOD_0F01_REG_0) },
2559 { MOD_TABLE (MOD_0F01_REG_1) },
2560 { MOD_TABLE (MOD_0F01_REG_2) },
2561 { MOD_TABLE (MOD_0F01_REG_3) },
ce518a5f
L
2562 { "smswD", { Sv } },
2563 { "(bad)", { XX } },
2564 { "lmsw", { Ew } },
1ceb70f8 2565 { MOD_TABLE (MOD_0F01_REG_7) },
252b5132 2566 },
b5b1fc4f 2567 /* REG_0F0D */
252b5132 2568 {
4e7d34a6
L
2569 { "prefetch", { Eb } },
2570 { "prefetchw", { Eb } },
2571 { "(bad)", { XX } },
2572 { "(bad)", { XX } },
2573 { "(bad)", { XX } },
2574 { "(bad)", { XX } },
2575 { "(bad)", { XX } },
2576 { "(bad)", { XX } },
252b5132 2577 },
1ceb70f8 2578 /* REG_0F18 */
252b5132 2579 {
1ceb70f8
L
2580 { MOD_TABLE (MOD_0F18_REG_0) },
2581 { MOD_TABLE (MOD_0F18_REG_1) },
2582 { MOD_TABLE (MOD_0F18_REG_2) },
2583 { MOD_TABLE (MOD_0F18_REG_3) },
ce518a5f
L
2584 { "(bad)", { XX } },
2585 { "(bad)", { XX } },
2586 { "(bad)", { XX } },
2587 { "(bad)", { XX } },
252b5132 2588 },
1ceb70f8 2589 /* REG_0F71 */
a6bd098c 2590 {
ce518a5f
L
2591 { "(bad)", { XX } },
2592 { "(bad)", { XX } },
1ceb70f8 2593 { MOD_TABLE (MOD_0F71_REG_2) },
ce518a5f 2594 { "(bad)", { XX } },
1ceb70f8 2595 { MOD_TABLE (MOD_0F71_REG_4) },
ce518a5f 2596 { "(bad)", { XX } },
1ceb70f8 2597 { MOD_TABLE (MOD_0F71_REG_6) },
ce518a5f 2598 { "(bad)", { XX } },
a6bd098c 2599 },
1ceb70f8 2600 /* REG_0F72 */
a6bd098c 2601 {
ce518a5f
L
2602 { "(bad)", { XX } },
2603 { "(bad)", { XX } },
1ceb70f8 2604 { MOD_TABLE (MOD_0F72_REG_2) },
ce518a5f 2605 { "(bad)", { XX } },
1ceb70f8 2606 { MOD_TABLE (MOD_0F72_REG_4) },
ce518a5f 2607 { "(bad)", { XX } },
1ceb70f8 2608 { MOD_TABLE (MOD_0F72_REG_6) },
ce518a5f 2609 { "(bad)", { XX } },
a6bd098c 2610 },
1ceb70f8 2611 /* REG_0F73 */
252b5132 2612 {
ce518a5f
L
2613 { "(bad)", { XX } },
2614 { "(bad)", { XX } },
1ceb70f8
L
2615 { MOD_TABLE (MOD_0F73_REG_2) },
2616 { MOD_TABLE (MOD_0F73_REG_3) },
ce518a5f 2617 { "(bad)", { XX } },
ce518a5f 2618 { "(bad)", { XX } },
1ceb70f8
L
2619 { MOD_TABLE (MOD_0F73_REG_6) },
2620 { MOD_TABLE (MOD_0F73_REG_7) },
252b5132 2621 },
1ceb70f8 2622 /* REG_0FA6 */
252b5132 2623 {
4e7d34a6
L
2624 { "montmul", { { OP_0f07, 0 } } },
2625 { "xsha1", { { OP_0f07, 0 } } },
2626 { "xsha256", { { OP_0f07, 0 } } },
2627 { "(bad)", { { OP_0f07, 0 } } },
2628 { "(bad)", { { OP_0f07, 0 } } },
2629 { "(bad)", { { OP_0f07, 0 } } },
2630 { "(bad)", { { OP_0f07, 0 } } },
2631 { "(bad)", { { OP_0f07, 0 } } },
2632 },
1ceb70f8 2633 /* REG_0FA7 */
4e7d34a6
L
2634 {
2635 { "xstore-rng", { { OP_0f07, 0 } } },
2636 { "xcrypt-ecb", { { OP_0f07, 0 } } },
2637 { "xcrypt-cbc", { { OP_0f07, 0 } } },
2638 { "xcrypt-ctr", { { OP_0f07, 0 } } },
2639 { "xcrypt-cfb", { { OP_0f07, 0 } } },
2640 { "xcrypt-ofb", { { OP_0f07, 0 } } },
2641 { "(bad)", { { OP_0f07, 0 } } },
2642 { "(bad)", { { OP_0f07, 0 } } },
2643 },
1ceb70f8 2644 /* REG_0FAE */
4e7d34a6 2645 {
1ceb70f8
L
2646 { MOD_TABLE (MOD_0FAE_REG_0) },
2647 { MOD_TABLE (MOD_0FAE_REG_1) },
2648 { MOD_TABLE (MOD_0FAE_REG_2) },
2649 { MOD_TABLE (MOD_0FAE_REG_3) },
475a2301 2650 { MOD_TABLE (MOD_0FAE_REG_4) },
1ceb70f8
L
2651 { MOD_TABLE (MOD_0FAE_REG_5) },
2652 { MOD_TABLE (MOD_0FAE_REG_6) },
2653 { MOD_TABLE (MOD_0FAE_REG_7) },
252b5132 2654 },
1ceb70f8 2655 /* REG_0FBA */
252b5132 2656 {
ce518a5f
L
2657 { "(bad)", { XX } },
2658 { "(bad)", { XX } },
d8faab4e
L
2659 { "(bad)", { XX } },
2660 { "(bad)", { XX } },
4e7d34a6
L
2661 { "btQ", { Ev, Ib } },
2662 { "btsQ", { Ev, Ib } },
2663 { "btrQ", { Ev, Ib } },
2664 { "btcQ", { Ev, Ib } },
c608c12e 2665 },
1ceb70f8 2666 /* REG_0FC7 */
c608c12e 2667 {
b844680a 2668 { "(bad)", { XX } },
4e7d34a6 2669 { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } } },
d8faab4e 2670 { "(bad)", { XX } },
b844680a
L
2671 { "(bad)", { XX } },
2672 { "(bad)", { XX } },
2673 { "(bad)", { XX } },
1ceb70f8
L
2674 { MOD_TABLE (MOD_0FC7_REG_6) },
2675 { MOD_TABLE (MOD_0FC7_REG_7) },
252b5132 2676 },
c0f3af97
L
2677 /* REG_VEX_71 */
2678 {
2679 { "(bad)", { XX } },
2680 { "(bad)", { XX } },
2681 { MOD_TABLE (MOD_VEX_71_REG_2) },
2682 { "(bad)", { XX } },
2683 { MOD_TABLE (MOD_VEX_71_REG_4) },
2684 { "(bad)", { XX } },
2685 { MOD_TABLE (MOD_VEX_71_REG_6) },
2686 { "(bad)", { XX } },
2687 },
2688 /* REG_VEX_72 */
2689 {
2690 { "(bad)", { XX } },
2691 { "(bad)", { XX } },
2692 { MOD_TABLE (MOD_VEX_72_REG_2) },
2693 { "(bad)", { XX } },
2694 { MOD_TABLE (MOD_VEX_72_REG_4) },
2695 { "(bad)", { XX } },
2696 { MOD_TABLE (MOD_VEX_72_REG_6) },
2697 { "(bad)", { XX } },
2698 },
2699 /* REG_VEX_73 */
2700 {
2701 { "(bad)", { XX } },
2702 { "(bad)", { XX } },
2703 { MOD_TABLE (MOD_VEX_73_REG_2) },
2704 { MOD_TABLE (MOD_VEX_73_REG_3) },
2705 { "(bad)", { XX } },
2706 { "(bad)", { XX } },
2707 { MOD_TABLE (MOD_VEX_73_REG_6) },
2708 { MOD_TABLE (MOD_VEX_73_REG_7) },
2709 },
2710 /* REG_VEX_AE */
2711 {
2712 { "(bad)", { XX } },
2713 { "(bad)", { XX } },
2714 { MOD_TABLE (MOD_VEX_AE_REG_2) },
2715 { MOD_TABLE (MOD_VEX_AE_REG_3) },
2716 { "(bad)", { XX } },
2717 { "(bad)", { XX } },
2718 { "(bad)", { XX } },
2719 { "(bad)", { XX } },
2720 },
f88c9eb0
SP
2721 /* REG_XOP_LWPCB */
2722 {
2723 { "llwpcb", { { OP_LWPCB_E, 0 } } },
2724 { "slwpcb", { { OP_LWPCB_E, 0 } } },
2725 { "(bad)", { XX } },
2726 { "(bad)", { XX } },
2727 { "(bad)", { XX } },
2728 { "(bad)", { XX } },
2729 { "(bad)", { XX } },
2730 { "(bad)", { XX } },
2731 },
2732 /* REG_XOP_LWP */
2733 {
2734 { "lwpins", { { OP_LWP_E, 0 }, Ed, { OP_LWP_I, 0 } } },
2735 { "lwpval", { { OP_LWP_E, 0 }, Ed, { OP_LWP_I, 0 } } },
2736 { "(bad)", { XX } },
2737 { "(bad)", { XX } },
2738 { "(bad)", { XX } },
2739 { "(bad)", { XX } },
2740 { "(bad)", { XX } },
2741 { "(bad)", { XX } },
2742 },
4e7d34a6
L
2743};
2744
1ceb70f8
L
2745static const struct dis386 prefix_table[][4] = {
2746 /* PREFIX_90 */
252b5132 2747 {
4e7d34a6
L
2748 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
2749 { "pause", { XX } },
2750 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
2751 { "(bad)", { XX } },
0f10071e 2752 },
4e7d34a6 2753
1ceb70f8 2754 /* PREFIX_0F10 */
cc0ec051 2755 {
4e7d34a6
L
2756 { "movups", { XM, EXx } },
2757 { "movss", { XM, EXd } },
2758 { "movupd", { XM, EXx } },
2759 { "movsd", { XM, EXq } },
30d1c836 2760 },
4e7d34a6 2761
1ceb70f8 2762 /* PREFIX_0F11 */
30d1c836 2763 {
b6169b20 2764 { "movups", { EXxS, XM } },
fa99fab2 2765 { "movss", { EXdS, XM } },
b6169b20 2766 { "movupd", { EXxS, XM } },
fa99fab2 2767 { "movsd", { EXqS, XM } },
4e7d34a6 2768 },
252b5132 2769
1ceb70f8 2770 /* PREFIX_0F12 */
c608c12e 2771 {
1ceb70f8 2772 { MOD_TABLE (MOD_0F12_PREFIX_0) },
4e7d34a6
L
2773 { "movsldup", { XM, EXx } },
2774 { "movlpd", { XM, EXq } },
2775 { "movddup", { XM, EXq } },
c608c12e 2776 },
4e7d34a6 2777
1ceb70f8 2778 /* PREFIX_0F16 */
c608c12e 2779 {
1ceb70f8 2780 { MOD_TABLE (MOD_0F16_PREFIX_0) },
4e7d34a6
L
2781 { "movshdup", { XM, EXx } },
2782 { "movhpd", { XM, EXq } },
058f233b 2783 { "(bad)", { XX } },
c608c12e 2784 },
4e7d34a6 2785
1ceb70f8 2786 /* PREFIX_0F2A */
c608c12e 2787 {
09335d05 2788 { "cvtpi2ps", { XM, EMCq } },
98b528ac 2789 { "cvtsi2ss%LQ", { XM, Ev } },
09335d05 2790 { "cvtpi2pd", { XM, EMCq } },
98b528ac 2791 { "cvtsi2sd%LQ", { XM, Ev } },
c608c12e 2792 },
4e7d34a6 2793
1ceb70f8 2794 /* PREFIX_0F2B */
c608c12e 2795 {
75c135a8
L
2796 { MOD_TABLE (MOD_0F2B_PREFIX_0) },
2797 { MOD_TABLE (MOD_0F2B_PREFIX_1) },
2798 { MOD_TABLE (MOD_0F2B_PREFIX_2) },
2799 { MOD_TABLE (MOD_0F2B_PREFIX_3) },
c608c12e 2800 },
4e7d34a6 2801
1ceb70f8 2802 /* PREFIX_0F2C */
c608c12e 2803 {
09335d05
L
2804 { "cvttps2pi", { MXC, EXq } },
2805 { "cvttss2siY", { Gv, EXd } },
09a2c6cf 2806 { "cvttpd2pi", { MXC, EXx } },
09335d05 2807 { "cvttsd2siY", { Gv, EXq } },
c608c12e 2808 },
4e7d34a6 2809
1ceb70f8 2810 /* PREFIX_0F2D */
c608c12e 2811 {
4e7d34a6
L
2812 { "cvtps2pi", { MXC, EXq } },
2813 { "cvtss2siY", { Gv, EXd } },
2814 { "cvtpd2pi", { MXC, EXx } },
2815 { "cvtsd2siY", { Gv, EXq } },
c608c12e 2816 },
4e7d34a6 2817
1ceb70f8 2818 /* PREFIX_0F2E */
c608c12e 2819 {
4e7d34a6
L
2820 { "ucomiss",{ XM, EXd } },
2821 { "(bad)", { XX } },
2822 { "ucomisd",{ XM, EXq } },
2823 { "(bad)", { XX } },
c608c12e 2824 },
4e7d34a6 2825
1ceb70f8 2826 /* PREFIX_0F2F */
c608c12e 2827 {
4e7d34a6
L
2828 { "comiss", { XM, EXd } },
2829 { "(bad)", { XX } },
2830 { "comisd", { XM, EXq } },
2831 { "(bad)", { XX } },
c608c12e 2832 },
4e7d34a6 2833
1ceb70f8 2834 /* PREFIX_0F51 */
c608c12e 2835 {
4e7d34a6
L
2836 { "sqrtps", { XM, EXx } },
2837 { "sqrtss", { XM, EXd } },
2838 { "sqrtpd", { XM, EXx } },
2839 { "sqrtsd", { XM, EXq } },
c608c12e 2840 },
4e7d34a6 2841
1ceb70f8 2842 /* PREFIX_0F52 */
c608c12e 2843 {
4e7d34a6
L
2844 { "rsqrtps",{ XM, EXx } },
2845 { "rsqrtss",{ XM, EXd } },
058f233b
L
2846 { "(bad)", { XX } },
2847 { "(bad)", { XX } },
c608c12e 2848 },
4e7d34a6 2849
1ceb70f8 2850 /* PREFIX_0F53 */
c608c12e 2851 {
4e7d34a6
L
2852 { "rcpps", { XM, EXx } },
2853 { "rcpss", { XM, EXd } },
058f233b
L
2854 { "(bad)", { XX } },
2855 { "(bad)", { XX } },
c608c12e 2856 },
4e7d34a6 2857
1ceb70f8 2858 /* PREFIX_0F58 */
c608c12e 2859 {
4e7d34a6
L
2860 { "addps", { XM, EXx } },
2861 { "addss", { XM, EXd } },
2862 { "addpd", { XM, EXx } },
2863 { "addsd", { XM, EXq } },
c608c12e 2864 },
4e7d34a6 2865
1ceb70f8 2866 /* PREFIX_0F59 */
c608c12e 2867 {
4e7d34a6
L
2868 { "mulps", { XM, EXx } },
2869 { "mulss", { XM, EXd } },
2870 { "mulpd", { XM, EXx } },
2871 { "mulsd", { XM, EXq } },
041bd2e0 2872 },
4e7d34a6 2873
1ceb70f8 2874 /* PREFIX_0F5A */
041bd2e0 2875 {
4e7d34a6
L
2876 { "cvtps2pd", { XM, EXq } },
2877 { "cvtss2sd", { XM, EXd } },
2878 { "cvtpd2ps", { XM, EXx } },
2879 { "cvtsd2ss", { XM, EXq } },
041bd2e0 2880 },
4e7d34a6 2881
1ceb70f8 2882 /* PREFIX_0F5B */
041bd2e0 2883 {
09a2c6cf
L
2884 { "cvtdq2ps", { XM, EXx } },
2885 { "cvttps2dq", { XM, EXx } },
2886 { "cvtps2dq", { XM, EXx } },
058f233b 2887 { "(bad)", { XX } },
041bd2e0 2888 },
4e7d34a6 2889
1ceb70f8 2890 /* PREFIX_0F5C */
041bd2e0 2891 {
4e7d34a6
L
2892 { "subps", { XM, EXx } },
2893 { "subss", { XM, EXd } },
2894 { "subpd", { XM, EXx } },
2895 { "subsd", { XM, EXq } },
041bd2e0 2896 },
4e7d34a6 2897
1ceb70f8 2898 /* PREFIX_0F5D */
041bd2e0 2899 {
4e7d34a6
L
2900 { "minps", { XM, EXx } },
2901 { "minss", { XM, EXd } },
2902 { "minpd", { XM, EXx } },
2903 { "minsd", { XM, EXq } },
041bd2e0 2904 },
4e7d34a6 2905
1ceb70f8 2906 /* PREFIX_0F5E */
041bd2e0 2907 {
4e7d34a6
L
2908 { "divps", { XM, EXx } },
2909 { "divss", { XM, EXd } },
2910 { "divpd", { XM, EXx } },
2911 { "divsd", { XM, EXq } },
041bd2e0 2912 },
4e7d34a6 2913
1ceb70f8 2914 /* PREFIX_0F5F */
041bd2e0 2915 {
4e7d34a6
L
2916 { "maxps", { XM, EXx } },
2917 { "maxss", { XM, EXd } },
2918 { "maxpd", { XM, EXx } },
2919 { "maxsd", { XM, EXq } },
041bd2e0 2920 },
4e7d34a6 2921
1ceb70f8 2922 /* PREFIX_0F60 */
041bd2e0 2923 {
4e7d34a6
L
2924 { "punpcklbw",{ MX, EMd } },
2925 { "(bad)", { XX } },
2926 { "punpcklbw",{ MX, EMx } },
2927 { "(bad)", { XX } },
041bd2e0 2928 },
4e7d34a6 2929
1ceb70f8 2930 /* PREFIX_0F61 */
041bd2e0 2931 {
4e7d34a6
L
2932 { "punpcklwd",{ MX, EMd } },
2933 { "(bad)", { XX } },
2934 { "punpcklwd",{ MX, EMx } },
2935 { "(bad)", { XX } },
041bd2e0 2936 },
4e7d34a6 2937
1ceb70f8 2938 /* PREFIX_0F62 */
041bd2e0 2939 {
4e7d34a6
L
2940 { "punpckldq",{ MX, EMd } },
2941 { "(bad)", { XX } },
2942 { "punpckldq",{ MX, EMx } },
2943 { "(bad)", { XX } },
041bd2e0 2944 },
4e7d34a6 2945
1ceb70f8 2946 /* PREFIX_0F6C */
041bd2e0 2947 {
058f233b
L
2948 { "(bad)", { XX } },
2949 { "(bad)", { XX } },
4e7d34a6 2950 { "punpcklqdq", { XM, EXx } },
058f233b 2951 { "(bad)", { XX } },
0f17484f 2952 },
4e7d34a6 2953
1ceb70f8 2954 /* PREFIX_0F6D */
0f17484f 2955 {
058f233b
L
2956 { "(bad)", { XX } },
2957 { "(bad)", { XX } },
4e7d34a6 2958 { "punpckhqdq", { XM, EXx } },
058f233b 2959 { "(bad)", { XX } },
041bd2e0 2960 },
4e7d34a6 2961
1ceb70f8 2962 /* PREFIX_0F6F */
ca164297 2963 {
4e7d34a6
L
2964 { "movq", { MX, EM } },
2965 { "movdqu", { XM, EXx } },
2966 { "movdqa", { XM, EXx } },
058f233b 2967 { "(bad)", { XX } },
ca164297 2968 },
4e7d34a6 2969
1ceb70f8 2970 /* PREFIX_0F70 */
4e7d34a6
L
2971 {
2972 { "pshufw", { MX, EM, Ib } },
2973 { "pshufhw",{ XM, EXx, Ib } },
2974 { "pshufd", { XM, EXx, Ib } },
2975 { "pshuflw",{ XM, EXx, Ib } },
2976 },
2977
92fddf8e
L
2978 /* PREFIX_0F73_REG_3 */
2979 {
2980 { "(bad)", { XX } },
2981 { "(bad)", { XX } },
2982 { "psrldq", { XS, Ib } },
2983 { "(bad)", { XX } },
2984 },
2985
2986 /* PREFIX_0F73_REG_7 */
2987 {
2988 { "(bad)", { XX } },
2989 { "(bad)", { XX } },
2990 { "pslldq", { XS, Ib } },
2991 { "(bad)", { XX } },
2992 },
2993
1ceb70f8 2994 /* PREFIX_0F78 */
4e7d34a6
L
2995 {
2996 {"vmread", { Em, Gm } },
2997 {"(bad)", { XX } },
2998 {"extrq", { XS, Ib, Ib } },
2999 {"insertq", { XM, XS, Ib, Ib } },
3000 },
3001
1ceb70f8 3002 /* PREFIX_0F79 */
4e7d34a6
L
3003 {
3004 {"vmwrite", { Gm, Em } },
3005 {"(bad)", { XX } },
3006 {"extrq", { XM, XS } },
3007 {"insertq", { XM, XS } },
3008 },
3009
1ceb70f8 3010 /* PREFIX_0F7C */
ca164297 3011 {
058f233b
L
3012 { "(bad)", { XX } },
3013 { "(bad)", { XX } },
09a2c6cf
L
3014 { "haddpd", { XM, EXx } },
3015 { "haddps", { XM, EXx } },
ca164297 3016 },
4e7d34a6 3017
1ceb70f8 3018 /* PREFIX_0F7D */
ca164297 3019 {
058f233b
L
3020 { "(bad)", { XX } },
3021 { "(bad)", { XX } },
09a2c6cf
L
3022 { "hsubpd", { XM, EXx } },
3023 { "hsubps", { XM, EXx } },
ca164297 3024 },
4e7d34a6 3025
1ceb70f8 3026 /* PREFIX_0F7E */
ca164297 3027 {
4e7d34a6
L
3028 { "movK", { Edq, MX } },
3029 { "movq", { XM, EXq } },
3030 { "movK", { Edq, XM } },
058f233b 3031 { "(bad)", { XX } },
ca164297 3032 },
4e7d34a6 3033
1ceb70f8 3034 /* PREFIX_0F7F */
ca164297 3035 {
b6169b20
L
3036 { "movq", { EMS, MX } },
3037 { "movdqu", { EXxS, XM } },
3038 { "movdqa", { EXxS, XM } },
058f233b 3039 { "(bad)", { XX } },
ca164297 3040 },
4e7d34a6 3041
1ceb70f8 3042 /* PREFIX_0FB8 */
ca164297 3043 {
4e7d34a6
L
3044 { "(bad)", { XX } },
3045 { "popcntS", { Gv, Ev } },
3046 { "(bad)", { XX } },
3047 { "(bad)", { XX } },
ca164297 3048 },
4e7d34a6 3049
1ceb70f8 3050 /* PREFIX_0FBD */
050dfa73 3051 {
4e7d34a6
L
3052 { "bsrS", { Gv, Ev } },
3053 { "lzcntS", { Gv, Ev } },
3054 { "bsrS", { Gv, Ev } },
3055 { "(bad)", { XX } },
050dfa73
MM
3056 },
3057
1ceb70f8 3058 /* PREFIX_0FC2 */
050dfa73 3059 {
ad19981d
L
3060 { "cmpps", { XM, EXx, CMP } },
3061 { "cmpss", { XM, EXd, CMP } },
3062 { "cmppd", { XM, EXx, CMP } },
3063 { "cmpsd", { XM, EXq, CMP } },
050dfa73 3064 },
246c51aa 3065
4ee52178
L
3066 /* PREFIX_0FC3 */
3067 {
3068 { "movntiS", { Ma, Gv } },
3069 { "(bad)", { XX } },
3070 { "(bad)", { XX } },
3071 { "(bad)", { XX } },
3072 },
3073
92fddf8e
L
3074 /* PREFIX_0FC7_REG_6 */
3075 {
3076 { "vmptrld",{ Mq } },
3077 { "vmxon", { Mq } },
3078 { "vmclear",{ Mq } },
3079 { "(bad)", { XX } },
3080 },
3081
1ceb70f8 3082 /* PREFIX_0FD0 */
050dfa73 3083 {
058f233b
L
3084 { "(bad)", { XX } },
3085 { "(bad)", { XX } },
4e7d34a6
L
3086 { "addsubpd", { XM, EXx } },
3087 { "addsubps", { XM, EXx } },
246c51aa 3088 },
050dfa73 3089
1ceb70f8 3090 /* PREFIX_0FD6 */
050dfa73 3091 {
058f233b 3092 { "(bad)", { XX } },
4e7d34a6 3093 { "movq2dq",{ XM, MS } },
b6169b20 3094 { "movq", { EXqS, XM } },
4e7d34a6 3095 { "movdq2q",{ MX, XS } },
050dfa73
MM
3096 },
3097
1ceb70f8 3098 /* PREFIX_0FE6 */
7918206c 3099 {
058f233b 3100 { "(bad)", { XX } },
4e7d34a6
L
3101 { "cvtdq2pd", { XM, EXq } },
3102 { "cvttpd2dq", { XM, EXx } },
3103 { "cvtpd2dq", { XM, EXx } },
7918206c 3104 },
8b38ad71 3105
1ceb70f8 3106 /* PREFIX_0FE7 */
8b38ad71 3107 {
4ee52178 3108 { "movntq", { Mq, MX } },
058f233b 3109 { "(bad)", { XX } },
75c135a8 3110 { MOD_TABLE (MOD_0FE7_PREFIX_2) },
058f233b 3111 { "(bad)", { XX } },
4e7d34a6
L
3112 },
3113
1ceb70f8 3114 /* PREFIX_0FF0 */
4e7d34a6 3115 {
058f233b
L
3116 { "(bad)", { XX } },
3117 { "(bad)", { XX } },
3118 { "(bad)", { XX } },
1ceb70f8 3119 { MOD_TABLE (MOD_0FF0_PREFIX_3) },
4e7d34a6
L
3120 },
3121
1ceb70f8 3122 /* PREFIX_0FF7 */
4e7d34a6
L
3123 {
3124 { "maskmovq", { MX, MS } },
058f233b 3125 { "(bad)", { XX } },
4e7d34a6 3126 { "maskmovdqu", { XM, XS } },
058f233b 3127 { "(bad)", { XX } },
8b38ad71 3128 },
42903f7f 3129
1ceb70f8 3130 /* PREFIX_0F3810 */
42903f7f
L
3131 {
3132 { "(bad)", { XX } },
3133 { "(bad)", { XX } },
88a94849 3134 { "pblendvb", { XM, EXx, XMM0 } },
42903f7f
L
3135 { "(bad)", { XX } },
3136 },
3137
1ceb70f8 3138 /* PREFIX_0F3814 */
42903f7f
L
3139 {
3140 { "(bad)", { XX } },
3141 { "(bad)", { XX } },
88a94849 3142 { "blendvps", { XM, EXx, XMM0 } },
42903f7f
L
3143 { "(bad)", { XX } },
3144 },
3145
1ceb70f8 3146 /* PREFIX_0F3815 */
42903f7f
L
3147 {
3148 { "(bad)", { XX } },
3149 { "(bad)", { XX } },
09a2c6cf 3150 { "blendvpd", { XM, EXx, XMM0 } },
42903f7f
L
3151 { "(bad)", { XX } },
3152 },
3153
1ceb70f8 3154 /* PREFIX_0F3817 */
42903f7f
L
3155 {
3156 { "(bad)", { XX } },
3157 { "(bad)", { XX } },
09a2c6cf 3158 { "ptest", { XM, EXx } },
42903f7f
L
3159 { "(bad)", { XX } },
3160 },
3161
1ceb70f8 3162 /* PREFIX_0F3820 */
42903f7f
L
3163 {
3164 { "(bad)", { XX } },
3165 { "(bad)", { XX } },
8976381e 3166 { "pmovsxbw", { XM, EXq } },
42903f7f
L
3167 { "(bad)", { XX } },
3168 },
3169
1ceb70f8 3170 /* PREFIX_0F3821 */
42903f7f
L
3171 {
3172 { "(bad)", { XX } },
3173 { "(bad)", { XX } },
8976381e 3174 { "pmovsxbd", { XM, EXd } },
42903f7f
L
3175 { "(bad)", { XX } },
3176 },
3177
1ceb70f8 3178 /* PREFIX_0F3822 */
42903f7f
L
3179 {
3180 { "(bad)", { XX } },
3181 { "(bad)", { XX } },
8976381e 3182 { "pmovsxbq", { XM, EXw } },
42903f7f
L
3183 { "(bad)", { XX } },
3184 },
3185
1ceb70f8 3186 /* PREFIX_0F3823 */
42903f7f
L
3187 {
3188 { "(bad)", { XX } },
3189 { "(bad)", { XX } },
8976381e 3190 { "pmovsxwd", { XM, EXq } },
42903f7f
L
3191 { "(bad)", { XX } },
3192 },
3193
1ceb70f8 3194 /* PREFIX_0F3824 */
42903f7f
L
3195 {
3196 { "(bad)", { XX } },
3197 { "(bad)", { XX } },
8976381e 3198 { "pmovsxwq", { XM, EXd } },
42903f7f
L
3199 { "(bad)", { XX } },
3200 },
3201
1ceb70f8 3202 /* PREFIX_0F3825 */
42903f7f
L
3203 {
3204 { "(bad)", { XX } },
3205 { "(bad)", { XX } },
8976381e 3206 { "pmovsxdq", { XM, EXq } },
42903f7f
L
3207 { "(bad)", { XX } },
3208 },
3209
1ceb70f8 3210 /* PREFIX_0F3828 */
42903f7f
L
3211 {
3212 { "(bad)", { XX } },
3213 { "(bad)", { XX } },
09a2c6cf 3214 { "pmuldq", { XM, EXx } },
42903f7f
L
3215 { "(bad)", { XX } },
3216 },
3217
1ceb70f8 3218 /* PREFIX_0F3829 */
42903f7f
L
3219 {
3220 { "(bad)", { XX } },
3221 { "(bad)", { XX } },
09a2c6cf 3222 { "pcmpeqq", { XM, EXx } },
42903f7f
L
3223 { "(bad)", { XX } },
3224 },
3225
1ceb70f8 3226 /* PREFIX_0F382A */
42903f7f
L
3227 {
3228 { "(bad)", { XX } },
3229 { "(bad)", { XX } },
75c135a8 3230 { MOD_TABLE (MOD_0F382A_PREFIX_2) },
42903f7f
L
3231 { "(bad)", { XX } },
3232 },
3233
1ceb70f8 3234 /* PREFIX_0F382B */
42903f7f
L
3235 {
3236 { "(bad)", { XX } },
3237 { "(bad)", { XX } },
09a2c6cf 3238 { "packusdw", { XM, EXx } },
42903f7f
L
3239 { "(bad)", { XX } },
3240 },
3241
1ceb70f8 3242 /* PREFIX_0F3830 */
42903f7f
L
3243 {
3244 { "(bad)", { XX } },
3245 { "(bad)", { XX } },
8976381e 3246 { "pmovzxbw", { XM, EXq } },
42903f7f
L
3247 { "(bad)", { XX } },
3248 },
3249
1ceb70f8 3250 /* PREFIX_0F3831 */
42903f7f
L
3251 {
3252 { "(bad)", { XX } },
3253 { "(bad)", { XX } },
8976381e 3254 { "pmovzxbd", { XM, EXd } },
42903f7f
L
3255 { "(bad)", { XX } },
3256 },
3257
1ceb70f8 3258 /* PREFIX_0F3832 */
42903f7f
L
3259 {
3260 { "(bad)", { XX } },
3261 { "(bad)", { XX } },
8976381e 3262 { "pmovzxbq", { XM, EXw } },
42903f7f
L
3263 { "(bad)", { XX } },
3264 },
3265
1ceb70f8 3266 /* PREFIX_0F3833 */
42903f7f
L
3267 {
3268 { "(bad)", { XX } },
3269 { "(bad)", { XX } },
8976381e 3270 { "pmovzxwd", { XM, EXq } },
42903f7f
L
3271 { "(bad)", { XX } },
3272 },
3273
1ceb70f8 3274 /* PREFIX_0F3834 */
42903f7f
L
3275 {
3276 { "(bad)", { XX } },
3277 { "(bad)", { XX } },
8976381e 3278 { "pmovzxwq", { XM, EXd } },
42903f7f
L
3279 { "(bad)", { XX } },
3280 },
3281
1ceb70f8 3282 /* PREFIX_0F3835 */
42903f7f
L
3283 {
3284 { "(bad)", { XX } },
3285 { "(bad)", { XX } },
8976381e 3286 { "pmovzxdq", { XM, EXq } },
42903f7f
L
3287 { "(bad)", { XX } },
3288 },
3289
1ceb70f8 3290 /* PREFIX_0F3837 */
4e7d34a6
L
3291 {
3292 { "(bad)", { XX } },
3293 { "(bad)", { XX } },
3294 { "pcmpgtq", { XM, EXx } },
3295 { "(bad)", { XX } },
3296 },
3297
1ceb70f8 3298 /* PREFIX_0F3838 */
42903f7f
L
3299 {
3300 { "(bad)", { XX } },
3301 { "(bad)", { XX } },
09a2c6cf 3302 { "pminsb", { XM, EXx } },
42903f7f
L
3303 { "(bad)", { XX } },
3304 },
3305
1ceb70f8 3306 /* PREFIX_0F3839 */
42903f7f
L
3307 {
3308 { "(bad)", { XX } },
3309 { "(bad)", { XX } },
09a2c6cf 3310 { "pminsd", { XM, EXx } },
42903f7f
L
3311 { "(bad)", { XX } },
3312 },
3313
1ceb70f8 3314 /* PREFIX_0F383A */
42903f7f
L
3315 {
3316 { "(bad)", { XX } },
3317 { "(bad)", { XX } },
09a2c6cf 3318 { "pminuw", { XM, EXx } },
42903f7f
L
3319 { "(bad)", { XX } },
3320 },
3321
1ceb70f8 3322 /* PREFIX_0F383B */
42903f7f
L
3323 {
3324 { "(bad)", { XX } },
3325 { "(bad)", { XX } },
09a2c6cf 3326 { "pminud", { XM, EXx } },
42903f7f
L
3327 { "(bad)", { XX } },
3328 },
3329
1ceb70f8 3330 /* PREFIX_0F383C */
42903f7f
L
3331 {
3332 { "(bad)", { XX } },
3333 { "(bad)", { XX } },
09a2c6cf 3334 { "pmaxsb", { XM, EXx } },
42903f7f
L
3335 { "(bad)", { XX } },
3336 },
3337
1ceb70f8 3338 /* PREFIX_0F383D */
42903f7f
L
3339 {
3340 { "(bad)", { XX } },
3341 { "(bad)", { XX } },
09a2c6cf 3342 { "pmaxsd", { XM, EXx } },
42903f7f
L
3343 { "(bad)", { XX } },
3344 },
3345
1ceb70f8 3346 /* PREFIX_0F383E */
42903f7f
L
3347 {
3348 { "(bad)", { XX } },
3349 { "(bad)", { XX } },
09a2c6cf 3350 { "pmaxuw", { XM, EXx } },
42903f7f
L
3351 { "(bad)", { XX } },
3352 },
3353
1ceb70f8 3354 /* PREFIX_0F383F */
42903f7f
L
3355 {
3356 { "(bad)", { XX } },
3357 { "(bad)", { XX } },
09a2c6cf 3358 { "pmaxud", { XM, EXx } },
42903f7f
L
3359 { "(bad)", { XX } },
3360 },
3361
1ceb70f8 3362 /* PREFIX_0F3840 */
42903f7f
L
3363 {
3364 { "(bad)", { XX } },
3365 { "(bad)", { XX } },
09a2c6cf 3366 { "pmulld", { XM, EXx } },
42903f7f
L
3367 { "(bad)", { XX } },
3368 },
3369
1ceb70f8 3370 /* PREFIX_0F3841 */
42903f7f
L
3371 {
3372 { "(bad)", { XX } },
3373 { "(bad)", { XX } },
09a2c6cf 3374 { "phminposuw", { XM, EXx } },
42903f7f
L
3375 { "(bad)", { XX } },
3376 },
3377
f1f8f695
L
3378 /* PREFIX_0F3880 */
3379 {
3380 { "(bad)", { XX } },
3381 { "(bad)", { XX } },
3382 { "invept", { Gm, Mo } },
3383 { "(bad)", { XX } },
3384 },
3385
3386 /* PREFIX_0F3881 */
3387 {
3388 { "(bad)", { XX } },
3389 { "(bad)", { XX } },
3390 { "invvpid", { Gm, Mo } },
3391 { "(bad)", { XX } },
3392 },
3393
c0f3af97
L
3394 /* PREFIX_0F38DB */
3395 {
3396 { "(bad)", { XX } },
3397 { "(bad)", { XX } },
3398 { "aesimc", { XM, EXx } },
3399 { "(bad)", { XX } },
3400 },
3401
3402 /* PREFIX_0F38DC */
3403 {
3404 { "(bad)", { XX } },
3405 { "(bad)", { XX } },
3406 { "aesenc", { XM, EXx } },
3407 { "(bad)", { XX } },
3408 },
3409
3410 /* PREFIX_0F38DD */
3411 {
3412 { "(bad)", { XX } },
3413 { "(bad)", { XX } },
3414 { "aesenclast", { XM, EXx } },
3415 { "(bad)", { XX } },
3416 },
3417
3418 /* PREFIX_0F38DE */
3419 {
3420 { "(bad)", { XX } },
3421 { "(bad)", { XX } },
3422 { "aesdec", { XM, EXx } },
3423 { "(bad)", { XX } },
3424 },
3425
3426 /* PREFIX_0F38DF */
3427 {
3428 { "(bad)", { XX } },
3429 { "(bad)", { XX } },
3430 { "aesdeclast", { XM, EXx } },
3431 { "(bad)", { XX } },
3432 },
3433
1ceb70f8 3434 /* PREFIX_0F38F0 */
4e7d34a6 3435 {
f1f8f695 3436 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
4e7d34a6 3437 { "(bad)", { XX } },
f1f8f695 3438 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
4e7d34a6
L
3439 { "crc32", { Gdq, { CRC32_Fixup, b_mode } } },
3440 },
3441
1ceb70f8 3442 /* PREFIX_0F38F1 */
4e7d34a6 3443 {
f1f8f695 3444 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
4e7d34a6 3445 { "(bad)", { XX } },
f1f8f695 3446 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
4e7d34a6
L
3447 { "crc32", { Gdq, { CRC32_Fixup, v_mode } } },
3448 },
3449
1ceb70f8 3450 /* PREFIX_0F3A08 */
42903f7f
L
3451 {
3452 { "(bad)", { XX } },
3453 { "(bad)", { XX } },
09a2c6cf 3454 { "roundps", { XM, EXx, Ib } },
42903f7f
L
3455 { "(bad)", { XX } },
3456 },
3457
1ceb70f8 3458 /* PREFIX_0F3A09 */
42903f7f
L
3459 {
3460 { "(bad)", { XX } },
3461 { "(bad)", { XX } },
09a2c6cf 3462 { "roundpd", { XM, EXx, Ib } },
42903f7f
L
3463 { "(bad)", { XX } },
3464 },
3465
1ceb70f8 3466 /* PREFIX_0F3A0A */
42903f7f
L
3467 {
3468 { "(bad)", { XX } },
3469 { "(bad)", { XX } },
09335d05 3470 { "roundss", { XM, EXd, Ib } },
42903f7f
L
3471 { "(bad)", { XX } },
3472 },
3473
1ceb70f8 3474 /* PREFIX_0F3A0B */
42903f7f
L
3475 {
3476 { "(bad)", { XX } },
3477 { "(bad)", { XX } },
09335d05 3478 { "roundsd", { XM, EXq, Ib } },
42903f7f
L
3479 { "(bad)", { XX } },
3480 },
3481
1ceb70f8 3482 /* PREFIX_0F3A0C */
42903f7f
L
3483 {
3484 { "(bad)", { XX } },
3485 { "(bad)", { XX } },
09a2c6cf 3486 { "blendps", { XM, EXx, Ib } },
42903f7f
L
3487 { "(bad)", { XX } },
3488 },
3489
1ceb70f8 3490 /* PREFIX_0F3A0D */
42903f7f
L
3491 {
3492 { "(bad)", { XX } },
3493 { "(bad)", { XX } },
09a2c6cf 3494 { "blendpd", { XM, EXx, Ib } },
42903f7f
L
3495 { "(bad)", { XX } },
3496 },
3497
1ceb70f8 3498 /* PREFIX_0F3A0E */
42903f7f
L
3499 {
3500 { "(bad)", { XX } },
3501 { "(bad)", { XX } },
09a2c6cf 3502 { "pblendw", { XM, EXx, Ib } },
42903f7f
L
3503 { "(bad)", { XX } },
3504 },
3505
1ceb70f8 3506 /* PREFIX_0F3A14 */
42903f7f
L
3507 {
3508 { "(bad)", { XX } },
3509 { "(bad)", { XX } },
3510 { "pextrb", { Edqb, XM, Ib } },
3511 { "(bad)", { XX } },
3512 },
3513
1ceb70f8 3514 /* PREFIX_0F3A15 */
42903f7f
L
3515 {
3516 { "(bad)", { XX } },
3517 { "(bad)", { XX } },
3518 { "pextrw", { Edqw, XM, Ib } },
3519 { "(bad)", { XX } },
3520 },
3521
1ceb70f8 3522 /* PREFIX_0F3A16 */
42903f7f
L
3523 {
3524 { "(bad)", { XX } },
3525 { "(bad)", { XX } },
3526 { "pextrK", { Edq, XM, Ib } },
3527 { "(bad)", { XX } },
3528 },
3529
1ceb70f8 3530 /* PREFIX_0F3A17 */
42903f7f
L
3531 {
3532 { "(bad)", { XX } },
3533 { "(bad)", { XX } },
3534 { "extractps", { Edqd, XM, Ib } },
3535 { "(bad)", { XX } },
3536 },
3537
1ceb70f8 3538 /* PREFIX_0F3A20 */
42903f7f
L
3539 {
3540 { "(bad)", { XX } },
3541 { "(bad)", { XX } },
3542 { "pinsrb", { XM, Edqb, Ib } },
3543 { "(bad)", { XX } },
3544 },
3545
1ceb70f8 3546 /* PREFIX_0F3A21 */
42903f7f
L
3547 {
3548 { "(bad)", { XX } },
3549 { "(bad)", { XX } },
8976381e 3550 { "insertps", { XM, EXd, Ib } },
42903f7f
L
3551 { "(bad)", { XX } },
3552 },
3553
1ceb70f8 3554 /* PREFIX_0F3A22 */
42903f7f
L
3555 {
3556 { "(bad)", { XX } },
3557 { "(bad)", { XX } },
3558 { "pinsrK", { XM, Edq, Ib } },
3559 { "(bad)", { XX } },
3560 },
3561
1ceb70f8 3562 /* PREFIX_0F3A40 */
42903f7f
L
3563 {
3564 { "(bad)", { XX } },
3565 { "(bad)", { XX } },
09a2c6cf 3566 { "dpps", { XM, EXx, Ib } },
42903f7f
L
3567 { "(bad)", { XX } },
3568 },
3569
1ceb70f8 3570 /* PREFIX_0F3A41 */
42903f7f
L
3571 {
3572 { "(bad)", { XX } },
3573 { "(bad)", { XX } },
09a2c6cf 3574 { "dppd", { XM, EXx, Ib } },
42903f7f
L
3575 { "(bad)", { XX } },
3576 },
3577
1ceb70f8 3578 /* PREFIX_0F3A42 */
42903f7f
L
3579 {
3580 { "(bad)", { XX } },
3581 { "(bad)", { XX } },
09a2c6cf 3582 { "mpsadbw", { XM, EXx, Ib } },
42903f7f
L
3583 { "(bad)", { XX } },
3584 },
381d071f 3585
c0f3af97
L
3586 /* PREFIX_0F3A44 */
3587 {
3588 { "(bad)", { XX } },
3589 { "(bad)", { XX } },
3590 { "pclmulqdq", { XM, EXx, PCLMUL } },
3591 { "(bad)", { XX } },
3592 },
3593
1ceb70f8 3594 /* PREFIX_0F3A60 */
381d071f
L
3595 {
3596 { "(bad)", { XX } },
3597 { "(bad)", { XX } },
4e7d34a6 3598 { "pcmpestrm", { XM, EXx, Ib } },
381d071f
L
3599 { "(bad)", { XX } },
3600 },
3601
1ceb70f8 3602 /* PREFIX_0F3A61 */
381d071f
L
3603 {
3604 { "(bad)", { XX } },
3605 { "(bad)", { XX } },
4e7d34a6 3606 { "pcmpestri", { XM, EXx, Ib } },
381d071f 3607 { "(bad)", { XX } },
381d071f
L
3608 },
3609
1ceb70f8 3610 /* PREFIX_0F3A62 */
381d071f
L
3611 {
3612 { "(bad)", { XX } },
3613 { "(bad)", { XX } },
4e7d34a6 3614 { "pcmpistrm", { XM, EXx, Ib } },
381d071f 3615 { "(bad)", { XX } },
381d071f
L
3616 },
3617
1ceb70f8 3618 /* PREFIX_0F3A63 */
381d071f
L
3619 {
3620 { "(bad)", { XX } },
3621 { "(bad)", { XX } },
4e7d34a6 3622 { "pcmpistri", { XM, EXx, Ib } },
381d071f
L
3623 { "(bad)", { XX } },
3624 },
09a2c6cf 3625
c0f3af97 3626 /* PREFIX_0F3ADF */
09a2c6cf 3627 {
c0f3af97
L
3628 { "(bad)", { XX } },
3629 { "(bad)", { XX } },
3630 { "aeskeygenassist", { XM, EXx, Ib } },
3631 { "(bad)", { XX } },
09a2c6cf
L
3632 },
3633
c0f3af97 3634 /* PREFIX_VEX_10 */
09a2c6cf 3635 {
9e30b8e0 3636 { VEX_W_TABLE (VEX_W_10_P_0) },
c0f3af97 3637 { VEX_LEN_TABLE (VEX_LEN_10_P_1) },
9e30b8e0 3638 { VEX_W_TABLE (VEX_W_10_P_2) },
c0f3af97 3639 { VEX_LEN_TABLE (VEX_LEN_10_P_3) },
09a2c6cf
L
3640 },
3641
c0f3af97 3642 /* PREFIX_VEX_11 */
09a2c6cf 3643 {
9e30b8e0 3644 { VEX_W_TABLE (VEX_W_11_P_0) },
c0f3af97 3645 { VEX_LEN_TABLE (VEX_LEN_11_P_1) },
9e30b8e0 3646 { VEX_W_TABLE (VEX_W_11_P_2) },
c0f3af97 3647 { VEX_LEN_TABLE (VEX_LEN_11_P_3) },
09a2c6cf
L
3648 },
3649
c0f3af97 3650 /* PREFIX_VEX_12 */
09a2c6cf 3651 {
c0f3af97 3652 { MOD_TABLE (MOD_VEX_12_PREFIX_0) },
9e30b8e0 3653 { VEX_W_TABLE (VEX_W_12_P_1) },
c0f3af97 3654 { VEX_LEN_TABLE (VEX_LEN_12_P_2) },
9e30b8e0 3655 { VEX_W_TABLE (VEX_W_12_P_3) },
09a2c6cf
L
3656 },
3657
c0f3af97 3658 /* PREFIX_VEX_16 */
09a2c6cf 3659 {
c0f3af97 3660 { MOD_TABLE (MOD_VEX_16_PREFIX_0) },
9e30b8e0 3661 { VEX_W_TABLE (VEX_W_16_P_1) },
c0f3af97
L
3662 { VEX_LEN_TABLE (VEX_LEN_16_P_2) },
3663 { "(bad)", { XX } },
5f754f58 3664 },
7c52e0e8 3665
c0f3af97 3666 /* PREFIX_VEX_2A */
5f754f58 3667 {
c0f3af97
L
3668 { "(bad)", { XX } },
3669 { VEX_LEN_TABLE (VEX_LEN_2A_P_1) },
3670 { "(bad)", { XX } },
3671 { VEX_LEN_TABLE (VEX_LEN_2A_P_3) },
5f754f58 3672 },
7c52e0e8 3673
c0f3af97 3674 /* PREFIX_VEX_2C */
5f754f58 3675 {
c0f3af97
L
3676 { "(bad)", { XX } },
3677 { VEX_LEN_TABLE (VEX_LEN_2C_P_1) },
3678 { "(bad)", { XX } },
3679 { VEX_LEN_TABLE (VEX_LEN_2C_P_3) },
5f754f58 3680 },
7c52e0e8 3681
c0f3af97 3682 /* PREFIX_VEX_2D */
7c52e0e8 3683 {
c0f3af97
L
3684 { "(bad)", { XX } },
3685 { VEX_LEN_TABLE (VEX_LEN_2D_P_1) },
3686 { "(bad)", { XX } },
3687 { VEX_LEN_TABLE (VEX_LEN_2D_P_3) },
7c52e0e8
L
3688 },
3689
c0f3af97 3690 /* PREFIX_VEX_2E */
7c52e0e8 3691 {
c0f3af97
L
3692 { VEX_LEN_TABLE (VEX_LEN_2E_P_0) },
3693 { "(bad)", { XX } },
3694 { VEX_LEN_TABLE (VEX_LEN_2E_P_2) },
3695 { "(bad)", { XX } },
7c52e0e8
L
3696 },
3697
c0f3af97 3698 /* PREFIX_VEX_2F */
7c52e0e8 3699 {
c0f3af97
L
3700 { VEX_LEN_TABLE (VEX_LEN_2F_P_0) },
3701 { "(bad)", { XX } },
3702 { VEX_LEN_TABLE (VEX_LEN_2F_P_2) },
3703 { "(bad)", { XX } },
7c52e0e8
L
3704 },
3705
c0f3af97 3706 /* PREFIX_VEX_51 */
7c52e0e8 3707 {
9e30b8e0 3708 { VEX_W_TABLE (VEX_W_51_P_0) },
c0f3af97 3709 { VEX_LEN_TABLE (VEX_LEN_51_P_1) },
9e30b8e0 3710 { VEX_W_TABLE (VEX_W_51_P_2) },
c0f3af97 3711 { VEX_LEN_TABLE (VEX_LEN_51_P_3) },
7c52e0e8
L
3712 },
3713
c0f3af97 3714 /* PREFIX_VEX_52 */
7c52e0e8 3715 {
9e30b8e0 3716 { VEX_W_TABLE (VEX_W_52_P_0) },
c0f3af97
L
3717 { VEX_LEN_TABLE (VEX_LEN_52_P_1) },
3718 { "(bad)", { XX } },
3719 { "(bad)", { XX } },
7c52e0e8
L
3720 },
3721
c0f3af97 3722 /* PREFIX_VEX_53 */
7c52e0e8 3723 {
9e30b8e0 3724 { VEX_W_TABLE (VEX_W_53_P_0) },
c0f3af97
L
3725 { VEX_LEN_TABLE (VEX_LEN_53_P_1) },
3726 { "(bad)", { XX } },
3727 { "(bad)", { XX } },
7c52e0e8
L
3728 },
3729
c0f3af97 3730 /* PREFIX_VEX_58 */
7c52e0e8 3731 {
9e30b8e0 3732 { VEX_W_TABLE (VEX_W_58_P_0) },
c0f3af97 3733 { VEX_LEN_TABLE (VEX_LEN_58_P_1) },
9e30b8e0 3734 { VEX_W_TABLE (VEX_W_58_P_2) },
c0f3af97 3735 { VEX_LEN_TABLE (VEX_LEN_58_P_3) },
7c52e0e8
L
3736 },
3737
c0f3af97 3738 /* PREFIX_VEX_59 */
7c52e0e8 3739 {
9e30b8e0 3740 { VEX_W_TABLE (VEX_W_59_P_0) },
c0f3af97 3741 { VEX_LEN_TABLE (VEX_LEN_59_P_1) },
9e30b8e0 3742 { VEX_W_TABLE (VEX_W_59_P_2) },
c0f3af97 3743 { VEX_LEN_TABLE (VEX_LEN_59_P_3) },
7c52e0e8
L
3744 },
3745
c0f3af97 3746 /* PREFIX_VEX_5A */
7c52e0e8 3747 {
9e30b8e0 3748 { VEX_W_TABLE (VEX_W_5A_P_0) },
c0f3af97
L
3749 { VEX_LEN_TABLE (VEX_LEN_5A_P_1) },
3750 { "vcvtpd2ps%XY", { XMM, EXx } },
3751 { VEX_LEN_TABLE (VEX_LEN_5A_P_3) },
7c52e0e8
L
3752 },
3753
c0f3af97 3754 /* PREFIX_VEX_5B */
7c52e0e8 3755 {
9e30b8e0
L
3756 { VEX_W_TABLE (VEX_W_5B_P_0) },
3757 { VEX_W_TABLE (VEX_W_5B_P_1) },
3758 { VEX_W_TABLE (VEX_W_5B_P_2) },
c0f3af97 3759 { "(bad)", { XX } },
7c52e0e8
L
3760 },
3761
c0f3af97 3762 /* PREFIX_VEX_5C */
7c52e0e8 3763 {
9e30b8e0 3764 { VEX_W_TABLE (VEX_W_5C_P_0) },
c0f3af97 3765 { VEX_LEN_TABLE (VEX_LEN_5C_P_1) },
9e30b8e0 3766 { VEX_W_TABLE (VEX_W_5C_P_2) },
c0f3af97 3767 { VEX_LEN_TABLE (VEX_LEN_5C_P_3) },
7c52e0e8
L
3768 },
3769
c0f3af97 3770 /* PREFIX_VEX_5D */
7c52e0e8 3771 {
9e30b8e0 3772 { VEX_W_TABLE (VEX_W_5D_P_0) },
c0f3af97 3773 { VEX_LEN_TABLE (VEX_LEN_5D_P_1) },
9e30b8e0 3774 { VEX_W_TABLE (VEX_W_5D_P_2) },
c0f3af97 3775 { VEX_LEN_TABLE (VEX_LEN_5D_P_3) },
7c52e0e8
L
3776 },
3777
c0f3af97 3778 /* PREFIX_VEX_5E */
7c52e0e8 3779 {
9e30b8e0 3780 { VEX_W_TABLE (VEX_W_5E_P_0) },
c0f3af97 3781 { VEX_LEN_TABLE (VEX_LEN_5E_P_1) },
9e30b8e0 3782 { VEX_W_TABLE (VEX_W_5E_P_2) },
c0f3af97 3783 { VEX_LEN_TABLE (VEX_LEN_5E_P_3) },
7c52e0e8
L
3784 },
3785
c0f3af97 3786 /* PREFIX_VEX_5F */
7c52e0e8 3787 {
9e30b8e0 3788 { VEX_W_TABLE (VEX_W_5F_P_0) },
c0f3af97 3789 { VEX_LEN_TABLE (VEX_LEN_5F_P_1) },
9e30b8e0 3790 { VEX_W_TABLE (VEX_W_5F_P_2) },
c0f3af97 3791 { VEX_LEN_TABLE (VEX_LEN_5F_P_3) },
7c52e0e8
L
3792 },
3793
c0f3af97 3794 /* PREFIX_VEX_60 */
7c52e0e8 3795 {
c0f3af97
L
3796 { "(bad)", { XX } },
3797 { "(bad)", { XX } },
3798 { VEX_LEN_TABLE (VEX_LEN_60_P_2) },
3799 { "(bad)", { XX } },
7c52e0e8
L
3800 },
3801
c0f3af97 3802 /* PREFIX_VEX_61 */
7c52e0e8 3803 {
c0f3af97
L
3804 { "(bad)", { XX } },
3805 { "(bad)", { XX } },
3806 { VEX_LEN_TABLE (VEX_LEN_61_P_2) },
3807 { "(bad)", { XX } },
7c52e0e8
L
3808 },
3809
c0f3af97 3810 /* PREFIX_VEX_62 */
7c52e0e8 3811 {
c0f3af97
L
3812 { "(bad)", { XX } },
3813 { "(bad)", { XX } },
3814 { VEX_LEN_TABLE (VEX_LEN_62_P_2) },
3815 { "(bad)", { XX } },
7c52e0e8
L
3816 },
3817
c0f3af97 3818 /* PREFIX_VEX_63 */
7c52e0e8 3819 {
c0f3af97
L
3820 { "(bad)", { XX } },
3821 { "(bad)", { XX } },
3822 { VEX_LEN_TABLE (VEX_LEN_63_P_2) },
3823 { "(bad)", { XX } },
7c52e0e8
L
3824 },
3825
c0f3af97 3826 /* PREFIX_VEX_64 */
7c52e0e8 3827 {
c0f3af97
L
3828 { "(bad)", { XX } },
3829 { "(bad)", { XX } },
3830 { VEX_LEN_TABLE (VEX_LEN_64_P_2) },
3831 { "(bad)", { XX } },
7c52e0e8
L
3832 },
3833
c0f3af97 3834 /* PREFIX_VEX_65 */
7c52e0e8 3835 {
c0f3af97
L
3836 { "(bad)", { XX } },
3837 { "(bad)", { XX } },
3838 { VEX_LEN_TABLE (VEX_LEN_65_P_2) },
3839 { "(bad)", { XX } },
7c52e0e8
L
3840 },
3841
c0f3af97 3842 /* PREFIX_VEX_66 */
7c52e0e8 3843 {
c0f3af97
L
3844 { "(bad)", { XX } },
3845 { "(bad)", { XX } },
3846 { VEX_LEN_TABLE (VEX_LEN_66_P_2) },
3847 { "(bad)", { XX } },
7c52e0e8 3848 },
6439fc28 3849
c0f3af97 3850 /* PREFIX_VEX_67 */
331d2d0d 3851 {
c0f3af97
L
3852 { "(bad)", { XX } },
3853 { "(bad)", { XX } },
3854 { VEX_LEN_TABLE (VEX_LEN_67_P_2) },
3855 { "(bad)", { XX } },
3856 },
3857
3858 /* PREFIX_VEX_68 */
3859 {
3860 { "(bad)", { XX } },
3861 { "(bad)", { XX } },
3862 { VEX_LEN_TABLE (VEX_LEN_68_P_2) },
3863 { "(bad)", { XX } },
3864 },
3865
3866 /* PREFIX_VEX_69 */
3867 {
3868 { "(bad)", { XX } },
3869 { "(bad)", { XX } },
3870 { VEX_LEN_TABLE (VEX_LEN_69_P_2) },
3871 { "(bad)", { XX } },
3872 },
3873
3874 /* PREFIX_VEX_6A */
3875 {
3876 { "(bad)", { XX } },
3877 { "(bad)", { XX } },
3878 { VEX_LEN_TABLE (VEX_LEN_6A_P_2) },
3879 { "(bad)", { XX } },
3880 },
3881
3882 /* PREFIX_VEX_6B */
3883 {
3884 { "(bad)", { XX } },
3885 { "(bad)", { XX } },
3886 { VEX_LEN_TABLE (VEX_LEN_6B_P_2) },
3887 { "(bad)", { XX } },
3888 },
3889
3890 /* PREFIX_VEX_6C */
3891 {
3892 { "(bad)", { XX } },
3893 { "(bad)", { XX } },
3894 { VEX_LEN_TABLE (VEX_LEN_6C_P_2) },
3895 { "(bad)", { XX } },
3896 },
3897
3898 /* PREFIX_VEX_6D */
3899 {
3900 { "(bad)", { XX } },
3901 { "(bad)", { XX } },
3902 { VEX_LEN_TABLE (VEX_LEN_6D_P_2) },
3903 { "(bad)", { XX } },
3904 },
3905
3906 /* PREFIX_VEX_6E */
3907 {
3908 { "(bad)", { XX } },
3909 { "(bad)", { XX } },
3910 { VEX_LEN_TABLE (VEX_LEN_6E_P_2) },
3911 { "(bad)", { XX } },
3912 },
3913
3914 /* PREFIX_VEX_6F */
3915 {
3916 { "(bad)", { XX } },
9e30b8e0
L
3917 { VEX_W_TABLE (VEX_W_6F_P_1) },
3918 { VEX_W_TABLE (VEX_W_6F_P_2) },
c0f3af97
L
3919 { "(bad)", { XX } },
3920 },
3921
3922 /* PREFIX_VEX_70 */
3923 {
3924 { "(bad)", { XX } },
3925 { VEX_LEN_TABLE (VEX_LEN_70_P_1) },
3926 { VEX_LEN_TABLE (VEX_LEN_70_P_2) },
3927 { VEX_LEN_TABLE (VEX_LEN_70_P_3) },
3928 },
3929
3930 /* PREFIX_VEX_71_REG_2 */
3931 {
3932 { "(bad)", { XX } },
3933 { "(bad)", { XX } },
3934 { VEX_LEN_TABLE (VEX_LEN_71_R_2_P_2) },
3935 { "(bad)", { XX } },
3936 },
3937
3938 /* PREFIX_VEX_71_REG_4 */
3939 {
3940 { "(bad)", { XX } },
3941 { "(bad)", { XX } },
3942 { VEX_LEN_TABLE (VEX_LEN_71_R_4_P_2) },
3943 { "(bad)", { XX } },
3944 },
3945
3946 /* PREFIX_VEX_71_REG_6 */
3947 {
3948 { "(bad)", { XX } },
3949 { "(bad)", { XX } },
3950 { VEX_LEN_TABLE (VEX_LEN_71_R_6_P_2) },
3951 { "(bad)", { XX } },
3952 },
3953
3954 /* PREFIX_VEX_72_REG_2 */
3955 {
3956 { "(bad)", { XX } },
3957 { "(bad)", { XX } },
3958 { VEX_LEN_TABLE (VEX_LEN_72_R_2_P_2) },
3959 { "(bad)", { XX } },
3960 },
3961
3962 /* PREFIX_VEX_72_REG_4 */
3963 {
3964 { "(bad)", { XX } },
3965 { "(bad)", { XX } },
3966 { VEX_LEN_TABLE (VEX_LEN_72_R_4_P_2) },
3967 { "(bad)", { XX } },
3968 },
3969
3970 /* PREFIX_VEX_72_REG_6 */
3971 {
3972 { "(bad)", { XX } },
3973 { "(bad)", { XX } },
3974 { VEX_LEN_TABLE (VEX_LEN_72_R_6_P_2) },
3975 { "(bad)", { XX } },
3976 },
3977
3978 /* PREFIX_VEX_73_REG_2 */
3979 {
3980 { "(bad)", { XX } },
3981 { "(bad)", { XX } },
3982 { VEX_LEN_TABLE (VEX_LEN_73_R_2_P_2) },
3983 { "(bad)", { XX } },
3984 },
3985
3986 /* PREFIX_VEX_73_REG_3 */
3987 {
3988 { "(bad)", { XX } },
3989 { "(bad)", { XX } },
3990 { VEX_LEN_TABLE (VEX_LEN_73_R_3_P_2) },
3991 { "(bad)", { XX } },
3992 },
3993
3994 /* PREFIX_VEX_73_REG_6 */
3995 {
3996 { "(bad)", { XX } },
3997 { "(bad)", { XX } },
3998 { VEX_LEN_TABLE (VEX_LEN_73_R_6_P_2) },
3999 { "(bad)", { XX } },
4000 },
4001
4002 /* PREFIX_VEX_73_REG_7 */
4003 {
4004 { "(bad)", { XX } },
4005 { "(bad)", { XX } },
4006 { VEX_LEN_TABLE (VEX_LEN_73_R_7_P_2) },
4007 { "(bad)", { XX } },
4008 },
4009
4010 /* PREFIX_VEX_74 */
4011 {
4012 { "(bad)", { XX } },
4013 { "(bad)", { XX } },
4014 { VEX_LEN_TABLE (VEX_LEN_74_P_2) },
4015 { "(bad)", { XX } },
4016 },
4017
4018 /* PREFIX_VEX_75 */
4019 {
4020 { "(bad)", { XX } },
4021 { "(bad)", { XX } },
4022 { VEX_LEN_TABLE (VEX_LEN_75_P_2) },
4023 { "(bad)", { XX } },
4024 },
4025
4026 /* PREFIX_VEX_76 */
4027 {
4028 { "(bad)", { XX } },
4029 { "(bad)", { XX } },
4030 { VEX_LEN_TABLE (VEX_LEN_76_P_2) },
4031 { "(bad)", { XX } },
4032 },
4033
4034 /* PREFIX_VEX_77 */
4035 {
9e30b8e0 4036 { VEX_W_TABLE (VEX_W_77_P_0) },
c0f3af97
L
4037 { "(bad)", { XX } },
4038 { "(bad)", { XX } },
4039 { "(bad)", { XX } },
4040 },
4041
4042 /* PREFIX_VEX_7C */
4043 {
4044 { "(bad)", { XX } },
4045 { "(bad)", { XX } },
9e30b8e0
L
4046 { VEX_W_TABLE (VEX_W_7C_P_2) },
4047 { VEX_W_TABLE (VEX_W_7C_P_3) },
c0f3af97
L
4048 },
4049
4050 /* PREFIX_VEX_7D */
4051 {
4052 { "(bad)", { XX } },
4053 { "(bad)", { XX } },
9e30b8e0
L
4054 { VEX_W_TABLE (VEX_W_7D_P_2) },
4055 { VEX_W_TABLE (VEX_W_7D_P_3) },
c0f3af97
L
4056 },
4057
4058 /* PREFIX_VEX_7E */
4059 {
4060 { "(bad)", { XX } },
4061 { VEX_LEN_TABLE (VEX_LEN_7E_P_1) },
4062 { VEX_LEN_TABLE (VEX_LEN_7E_P_2) },
4063 { "(bad)", { XX } },
4064 },
4065
4066 /* PREFIX_VEX_7F */
4067 {
4068 { "(bad)", { XX } },
9e30b8e0
L
4069 { VEX_W_TABLE (VEX_W_7F_P_1) },
4070 { VEX_W_TABLE (VEX_W_7F_P_2) },
c0f3af97
L
4071 { "(bad)", { XX } },
4072 },
4073
4074 /* PREFIX_VEX_C2 */
4075 {
9e30b8e0 4076 { VEX_W_TABLE (VEX_W_C2_P_0) },
c0f3af97 4077 { VEX_LEN_TABLE (VEX_LEN_C2_P_1) },
9e30b8e0 4078 { VEX_W_TABLE (VEX_W_C2_P_2) },
c0f3af97
L
4079 { VEX_LEN_TABLE (VEX_LEN_C2_P_3) },
4080 },
4081
4082 /* PREFIX_VEX_C4 */
4083 {
4084 { "(bad)", { XX } },
4085 { "(bad)", { XX } },
4086 { VEX_LEN_TABLE (VEX_LEN_C4_P_2) },
4087 { "(bad)", { XX } },
4088 },
4089
4090 /* PREFIX_VEX_C5 */
4091 {
4092 { "(bad)", { XX } },
4093 { "(bad)", { XX } },
4094 { VEX_LEN_TABLE (VEX_LEN_C5_P_2) },
4095 { "(bad)", { XX } },
4096 },
4097
4098 /* PREFIX_VEX_D0 */
4099 {
4100 { "(bad)", { XX } },
4101 { "(bad)", { XX } },
9e30b8e0
L
4102 { VEX_W_TABLE (VEX_W_D0_P_2) },
4103 { VEX_W_TABLE (VEX_W_D0_P_3) },
c0f3af97
L
4104 },
4105
4106 /* PREFIX_VEX_D1 */
4107 {
4108 { "(bad)", { XX } },
4109 { "(bad)", { XX } },
4110 { VEX_LEN_TABLE (VEX_LEN_D1_P_2) },
4111 { "(bad)", { XX } },
4112 },
4113
4114 /* PREFIX_VEX_D2 */
4115 {
4116 { "(bad)", { XX } },
4117 { "(bad)", { XX } },
4118 { VEX_LEN_TABLE (VEX_LEN_D2_P_2) },
4119 { "(bad)", { XX } },
4120 },
4121
4122 /* PREFIX_VEX_D3 */
4123 {
4124 { "(bad)", { XX } },
4125 { "(bad)", { XX } },
4126 { VEX_LEN_TABLE (VEX_LEN_D3_P_2) },
4127 { "(bad)", { XX } },
4128 },
4129
4130 /* PREFIX_VEX_D4 */
4131 {
4132 { "(bad)", { XX } },
4133 { "(bad)", { XX } },
4134 { VEX_LEN_TABLE (VEX_LEN_D4_P_2) },
4135 { "(bad)", { XX } },
4136 },
4137
4138 /* PREFIX_VEX_D5 */
4139 {
4140 { "(bad)", { XX } },
4141 { "(bad)", { XX } },
4142 { VEX_LEN_TABLE (VEX_LEN_D5_P_2) },
4143 { "(bad)", { XX } },
4144 },
4145
4146 /* PREFIX_VEX_D6 */
4147 {
4148 { "(bad)", { XX } },
4149 { "(bad)", { XX } },
4150 { VEX_LEN_TABLE (VEX_LEN_D6_P_2) },
4151 { "(bad)", { XX } },
4152 },
4153
4154 /* PREFIX_VEX_D7 */
4155 {
4156 { "(bad)", { XX } },
4157 { "(bad)", { XX } },
4158 { MOD_TABLE (MOD_VEX_D7_PREFIX_2) },
4159 { "(bad)", { XX } },
4160 },
4161
4162 /* PREFIX_VEX_D8 */
4163 {
4164 { "(bad)", { XX } },
4165 { "(bad)", { XX } },
4166 { VEX_LEN_TABLE (VEX_LEN_D8_P_2) },
4167 { "(bad)", { XX } },
4168 },
4169
4170 /* PREFIX_VEX_D9 */
4171 {
4172 { "(bad)", { XX } },
4173 { "(bad)", { XX } },
4174 { VEX_LEN_TABLE (VEX_LEN_D9_P_2) },
4175 { "(bad)", { XX } },
4176 },
4177
4178 /* PREFIX_VEX_DA */
4179 {
4180 { "(bad)", { XX } },
4181 { "(bad)", { XX } },
4182 { VEX_LEN_TABLE (VEX_LEN_DA_P_2) },
4183 { "(bad)", { XX } },
4184 },
4185
4186 /* PREFIX_VEX_DB */
4187 {
4188 { "(bad)", { XX } },
4189 { "(bad)", { XX } },
4190 { VEX_LEN_TABLE (VEX_LEN_DB_P_2) },
4191 { "(bad)", { XX } },
4192 },
4193
4194 /* PREFIX_VEX_DC */
4195 {
4196 { "(bad)", { XX } },
4197 { "(bad)", { XX } },
4198 { VEX_LEN_TABLE (VEX_LEN_DC_P_2) },
4199 { "(bad)", { XX } },
4200 },
4201
4202 /* PREFIX_VEX_DD */
4203 {
4204 { "(bad)", { XX } },
4205 { "(bad)", { XX } },
4206 { VEX_LEN_TABLE (VEX_LEN_DD_P_2) },
4207 { "(bad)", { XX } },
4208 },
4209
4210 /* PREFIX_VEX_DE */
4211 {
4212 { "(bad)", { XX } },
4213 { "(bad)", { XX } },
4214 { VEX_LEN_TABLE (VEX_LEN_DE_P_2) },
4215 { "(bad)", { XX } },
4216 },
4217
4218 /* PREFIX_VEX_DF */
4219 {
4220 { "(bad)", { XX } },
4221 { "(bad)", { XX } },
4222 { VEX_LEN_TABLE (VEX_LEN_DF_P_2) },
4223 { "(bad)", { XX } },
4224 },
4225
4226 /* PREFIX_VEX_E0 */
4227 {
4228 { "(bad)", { XX } },
4229 { "(bad)", { XX } },
4230 { VEX_LEN_TABLE (VEX_LEN_E0_P_2) },
4231 { "(bad)", { XX } },
4232 },
4233
4234 /* PREFIX_VEX_E1 */
4235 {
4236 { "(bad)", { XX } },
4237 { "(bad)", { XX } },
4238 { VEX_LEN_TABLE (VEX_LEN_E1_P_2) },
4239 { "(bad)", { XX } },
4240 },
4241
4242 /* PREFIX_VEX_E2 */
4243 {
4244 { "(bad)", { XX } },
4245 { "(bad)", { XX } },
4246 { VEX_LEN_TABLE (VEX_LEN_E2_P_2) },
4247 { "(bad)", { XX } },
4248 },
4249
4250 /* PREFIX_VEX_E3 */
4251 {
4252 { "(bad)", { XX } },
4253 { "(bad)", { XX } },
4254 { VEX_LEN_TABLE (VEX_LEN_E3_P_2) },
4255 { "(bad)", { XX } },
4256 },
4257
4258 /* PREFIX_VEX_E4 */
4259 {
4260 { "(bad)", { XX } },
4261 { "(bad)", { XX } },
4262 { VEX_LEN_TABLE (VEX_LEN_E4_P_2) },
4263 { "(bad)", { XX } },
4264 },
4265
4266 /* PREFIX_VEX_E5 */
4267 {
4268 { "(bad)", { XX } },
4269 { "(bad)", { XX } },
4270 { VEX_LEN_TABLE (VEX_LEN_E5_P_2) },
4271 { "(bad)", { XX } },
4272 },
4273
4274 /* PREFIX_VEX_E6 */
4275 {
4276 { "(bad)", { XX } },
9e30b8e0
L
4277 { VEX_W_TABLE (VEX_W_E6_P_1) },
4278 { VEX_W_TABLE (VEX_W_E6_P_2) },
4279 { VEX_W_TABLE (VEX_W_E6_P_3) },
c0f3af97
L
4280 },
4281
4282 /* PREFIX_VEX_E7 */
4283 {
4284 { "(bad)", { XX } },
4285 { "(bad)", { XX } },
4286 { MOD_TABLE (MOD_VEX_E7_PREFIX_2) },
4287 { "(bad)", { XX } },
4288 },
4289
4290 /* PREFIX_VEX_E8 */
4291 {
4292 { "(bad)", { XX } },
4293 { "(bad)", { XX } },
4294 { VEX_LEN_TABLE (VEX_LEN_E8_P_2) },
4295 { "(bad)", { XX } },
4296 },
4297
4298 /* PREFIX_VEX_E9 */
4299 {
4300 { "(bad)", { XX } },
4301 { "(bad)", { XX } },
4302 { VEX_LEN_TABLE (VEX_LEN_E9_P_2) },
4303 { "(bad)", { XX } },
4304 },
4305
4306 /* PREFIX_VEX_EA */
4307 {
4308 { "(bad)", { XX } },
4309 { "(bad)", { XX } },
4310 { VEX_LEN_TABLE (VEX_LEN_EA_P_2) },
4311 { "(bad)", { XX } },
4312 },
4313
4314 /* PREFIX_VEX_EB */
4315 {
4316 { "(bad)", { XX } },
4317 { "(bad)", { XX } },
4318 { VEX_LEN_TABLE (VEX_LEN_EB_P_2) },
4319 { "(bad)", { XX } },
4320 },
4321
4322 /* PREFIX_VEX_EC */
4323 {
4324 { "(bad)", { XX } },
4325 { "(bad)", { XX } },
4326 { VEX_LEN_TABLE (VEX_LEN_EC_P_2) },
4327 { "(bad)", { XX } },
4328 },
4329
4330 /* PREFIX_VEX_ED */
4331 {
4332 { "(bad)", { XX } },
4333 { "(bad)", { XX } },
4334 { VEX_LEN_TABLE (VEX_LEN_ED_P_2) },
4335 { "(bad)", { XX } },
4336 },
4337
4338 /* PREFIX_VEX_EE */
4339 {
4340 { "(bad)", { XX } },
4341 { "(bad)", { XX } },
4342 { VEX_LEN_TABLE (VEX_LEN_EE_P_2) },
4343 { "(bad)", { XX } },
4344 },
4345
4346 /* PREFIX_VEX_EF */
4347 {
4348 { "(bad)", { XX } },
4349 { "(bad)", { XX } },
4350 { VEX_LEN_TABLE (VEX_LEN_EF_P_2) },
4351 { "(bad)", { XX } },
4352 },
4353
4354 /* PREFIX_VEX_F0 */
4355 {
4356 { "(bad)", { XX } },
4357 { "(bad)", { XX } },
4358 { "(bad)", { XX } },
4359 { MOD_TABLE (MOD_VEX_F0_PREFIX_3) },
4360 },
4361
4362 /* PREFIX_VEX_F1 */
4363 {
4364 { "(bad)", { XX } },
4365 { "(bad)", { XX } },
4366 { VEX_LEN_TABLE (VEX_LEN_F1_P_2) },
4367 { "(bad)", { XX } },
4368 },
4369
4370 /* PREFIX_VEX_F2 */
4371 {
4372 { "(bad)", { XX } },
4373 { "(bad)", { XX } },
4374 { VEX_LEN_TABLE (VEX_LEN_F2_P_2) },
4375 { "(bad)", { XX } },
4376 },
4377
4378 /* PREFIX_VEX_F3 */
4379 {
4380 { "(bad)", { XX } },
4381 { "(bad)", { XX } },
4382 { VEX_LEN_TABLE (VEX_LEN_F3_P_2) },
4383 { "(bad)", { XX } },
4384 },
4385
4386 /* PREFIX_VEX_F4 */
4387 {
4388 { "(bad)", { XX } },
4389 { "(bad)", { XX } },
4390 { VEX_LEN_TABLE (VEX_LEN_F4_P_2) },
4391 { "(bad)", { XX } },
4392 },
4393
4394 /* PREFIX_VEX_F5 */
4395 {
4396 { "(bad)", { XX } },
4397 { "(bad)", { XX } },
4398 { VEX_LEN_TABLE (VEX_LEN_F5_P_2) },
4399 { "(bad)", { XX } },
4400 },
4401
4402 /* PREFIX_VEX_F6 */
4403 {
4404 { "(bad)", { XX } },
4405 { "(bad)", { XX } },
4406 { VEX_LEN_TABLE (VEX_LEN_F6_P_2) },
4407 { "(bad)", { XX } },
4408 },
4409
4410 /* PREFIX_VEX_F7 */
4411 {
4412 { "(bad)", { XX } },
4413 { "(bad)", { XX } },
4414 { VEX_LEN_TABLE (VEX_LEN_F7_P_2) },
4415 { "(bad)", { XX } },
4416 },
4417
4418 /* PREFIX_VEX_F8 */
4419 {
4420 { "(bad)", { XX } },
4421 { "(bad)", { XX } },
4422 { VEX_LEN_TABLE (VEX_LEN_F8_P_2) },
4423 { "(bad)", { XX } },
4424 },
4425
4426 /* PREFIX_VEX_F9 */
4427 {
4428 { "(bad)", { XX } },
4429 { "(bad)", { XX } },
4430 { VEX_LEN_TABLE (VEX_LEN_F9_P_2) },
4431 { "(bad)", { XX } },
4432 },
4433
4434 /* PREFIX_VEX_FA */
4435 {
4436 { "(bad)", { XX } },
4437 { "(bad)", { XX } },
4438 { VEX_LEN_TABLE (VEX_LEN_FA_P_2) },
4439 { "(bad)", { XX } },
4440 },
4441
4442 /* PREFIX_VEX_FB */
4443 {
4444 { "(bad)", { XX } },
4445 { "(bad)", { XX } },
4446 { VEX_LEN_TABLE (VEX_LEN_FB_P_2) },
4447 { "(bad)", { XX } },
4448 },
4449
4450 /* PREFIX_VEX_FC */
4451 {
4452 { "(bad)", { XX } },
4453 { "(bad)", { XX } },
4454 { VEX_LEN_TABLE (VEX_LEN_FC_P_2) },
4455 { "(bad)", { XX } },
4456 },
4457
4458 /* PREFIX_VEX_FD */
4459 {
4460 { "(bad)", { XX } },
4461 { "(bad)", { XX } },
4462 { VEX_LEN_TABLE (VEX_LEN_FD_P_2) },
4463 { "(bad)", { XX } },
4464 },
4465
4466 /* PREFIX_VEX_FE */
4467 {
4468 { "(bad)", { XX } },
4469 { "(bad)", { XX } },
4470 { VEX_LEN_TABLE (VEX_LEN_FE_P_2) },
4471 { "(bad)", { XX } },
4472 },
4473
4474 /* PREFIX_VEX_3800 */
4475 {
4476 { "(bad)", { XX } },
4477 { "(bad)", { XX } },
4478 { VEX_LEN_TABLE (VEX_LEN_3800_P_2) },
4479 { "(bad)", { XX } },
4480 },
4481
4482 /* PREFIX_VEX_3801 */
4483 {
4484 { "(bad)", { XX } },
4485 { "(bad)", { XX } },
4486 { VEX_LEN_TABLE (VEX_LEN_3801_P_2) },
4487 { "(bad)", { XX } },
4488 },
4489
4490 /* PREFIX_VEX_3802 */
4491 {
4492 { "(bad)", { XX } },
4493 { "(bad)", { XX } },
4494 { VEX_LEN_TABLE (VEX_LEN_3802_P_2) },
4495 { "(bad)", { XX } },
4496 },
4497
4498 /* PREFIX_VEX_3803 */
4499 {
4500 { "(bad)", { XX } },
4501 { "(bad)", { XX } },
4502 { VEX_LEN_TABLE (VEX_LEN_3803_P_2) },
4503 { "(bad)", { XX } },
4504 },
4505
4506 /* PREFIX_VEX_3804 */
4507 {
4508 { "(bad)", { XX } },
4509 { "(bad)", { XX } },
4510 { VEX_LEN_TABLE (VEX_LEN_3804_P_2) },
4511 { "(bad)", { XX } },
4512 },
4513
4514 /* PREFIX_VEX_3805 */
4515 {
4516 { "(bad)", { XX } },
4517 { "(bad)", { XX } },
4518 { VEX_LEN_TABLE (VEX_LEN_3805_P_2) },
4519 { "(bad)", { XX } },
4520 },
4521
4522 /* PREFIX_VEX_3806 */
4523 {
4524 { "(bad)", { XX } },
4525 { "(bad)", { XX } },
4526 { VEX_LEN_TABLE (VEX_LEN_3806_P_2) },
4527 { "(bad)", { XX } },
4528 },
4529
4530 /* PREFIX_VEX_3807 */
4531 {
4532 { "(bad)", { XX } },
4533 { "(bad)", { XX } },
4534 { VEX_LEN_TABLE (VEX_LEN_3807_P_2) },
4535 { "(bad)", { XX } },
4536 },
4537
4538 /* PREFIX_VEX_3808 */
4539 {
4540 { "(bad)", { XX } },
4541 { "(bad)", { XX } },
4542 { VEX_LEN_TABLE (VEX_LEN_3808_P_2) },
4543 { "(bad)", { XX } },
4544 },
4545
4546 /* PREFIX_VEX_3809 */
4547 {
4548 { "(bad)", { XX } },
4549 { "(bad)", { XX } },
4550 { VEX_LEN_TABLE (VEX_LEN_3809_P_2) },
4551 { "(bad)", { XX } },
4552 },
4553
4554 /* PREFIX_VEX_380A */
4555 {
4556 { "(bad)", { XX } },
4557 { "(bad)", { XX } },
4558 { VEX_LEN_TABLE (VEX_LEN_380A_P_2) },
4559 { "(bad)", { XX } },
4560 },
4561
4562 /* PREFIX_VEX_380B */
4563 {
4564 { "(bad)", { XX } },
4565 { "(bad)", { XX } },
4566 { VEX_LEN_TABLE (VEX_LEN_380B_P_2) },
4567 { "(bad)", { XX } },
4568 },
4569
4570 /* PREFIX_VEX_380C */
4571 {
4572 { "(bad)", { XX } },
4573 { "(bad)", { XX } },
9e30b8e0 4574 { VEX_W_TABLE (VEX_W_380C_P_2) },
c0f3af97
L
4575 { "(bad)", { XX } },
4576 },
4577
4578 /* PREFIX_VEX_380D */
4579 {
4580 { "(bad)", { XX } },
4581 { "(bad)", { XX } },
9e30b8e0 4582 { VEX_W_TABLE (VEX_W_380D_P_2) },
c0f3af97
L
4583 { "(bad)", { XX } },
4584 },
4585
4586 /* PREFIX_VEX_380E */
4587 {
4588 { "(bad)", { XX } },
4589 { "(bad)", { XX } },
9e30b8e0 4590 { VEX_W_TABLE (VEX_W_380E_P_2) },
c0f3af97
L
4591 { "(bad)", { XX } },
4592 },
4593
4594 /* PREFIX_VEX_380F */
4595 {
4596 { "(bad)", { XX } },
4597 { "(bad)", { XX } },
9e30b8e0 4598 { VEX_W_TABLE (VEX_W_380F_P_2) },
c0f3af97
L
4599 { "(bad)", { XX } },
4600 },
4601
4602 /* PREFIX_VEX_3817 */
4603 {
4604 { "(bad)", { XX } },
4605 { "(bad)", { XX } },
9e30b8e0 4606 { VEX_W_TABLE (VEX_W_3817_P_2) },
c0f3af97
L
4607 { "(bad)", { XX } },
4608 },
4609
4610 /* PREFIX_VEX_3818 */
4611 {
4612 { "(bad)", { XX } },
4613 { "(bad)", { XX } },
4614 { MOD_TABLE (MOD_VEX_3818_PREFIX_2) },
4615 { "(bad)", { XX } },
4616 },
4617
4618 /* PREFIX_VEX_3819 */
4619 {
4620 { "(bad)", { XX } },
4621 { "(bad)", { XX } },
4622 { MOD_TABLE (MOD_VEX_3819_PREFIX_2) },
4623 { "(bad)", { XX } },
4624 },
4625
4626 /* PREFIX_VEX_381A */
4627 {
4628 { "(bad)", { XX } },
4629 { "(bad)", { XX } },
4630 { MOD_TABLE (MOD_VEX_381A_PREFIX_2) },
4631 { "(bad)", { XX } },
4632 },
4633
4634 /* PREFIX_VEX_381C */
4635 {
4636 { "(bad)", { XX } },
4637 { "(bad)", { XX } },
4638 { VEX_LEN_TABLE (VEX_LEN_381C_P_2) },
4639 { "(bad)", { XX } },
4640 },
4641
4642 /* PREFIX_VEX_381D */
4643 {
4644 { "(bad)", { XX } },
4645 { "(bad)", { XX } },
4646 { VEX_LEN_TABLE (VEX_LEN_381D_P_2) },
4647 { "(bad)", { XX } },
4648 },
4649
4650 /* PREFIX_VEX_381E */
4651 {
4652 { "(bad)", { XX } },
4653 { "(bad)", { XX } },
4654 { VEX_LEN_TABLE (VEX_LEN_381E_P_2) },
4655 { "(bad)", { XX } },
4656 },
4657
4658 /* PREFIX_VEX_3820 */
4659 {
4660 { "(bad)", { XX } },
4661 { "(bad)", { XX } },
4662 { VEX_LEN_TABLE (VEX_LEN_3820_P_2) },
4663 { "(bad)", { XX } },
4664 },
4665
4666 /* PREFIX_VEX_3821 */
4667 {
4668 { "(bad)", { XX } },
4669 { "(bad)", { XX } },
4670 { VEX_LEN_TABLE (VEX_LEN_3821_P_2) },
4671 { "(bad)", { XX } },
4672 },
4673
4674 /* PREFIX_VEX_3822 */
4675 {
4676 { "(bad)", { XX } },
4677 { "(bad)", { XX } },
4678 { VEX_LEN_TABLE (VEX_LEN_3822_P_2) },
4679 { "(bad)", { XX } },
4680 },
4681
4682 /* PREFIX_VEX_3823 */
4683 {
4684 { "(bad)", { XX } },
4685 { "(bad)", { XX } },
4686 { VEX_LEN_TABLE (VEX_LEN_3823_P_2) },
4687 { "(bad)", { XX } },
4688 },
4689
4690 /* PREFIX_VEX_3824 */
4691 {
4692 { "(bad)", { XX } },
4693 { "(bad)", { XX } },
4694 { VEX_LEN_TABLE (VEX_LEN_3824_P_2) },
4695 { "(bad)", { XX } },
4696 },
4697
4698 /* PREFIX_VEX_3825 */
4699 {
4700 { "(bad)", { XX } },
4701 { "(bad)", { XX } },
4702 { VEX_LEN_TABLE (VEX_LEN_3825_P_2) },
4703 { "(bad)", { XX } },
4704 },
4705
4706 /* PREFIX_VEX_3828 */
4707 {
4708 { "(bad)", { XX } },
4709 { "(bad)", { XX } },
4710 { VEX_LEN_TABLE (VEX_LEN_3828_P_2) },
4711 { "(bad)", { XX } },
4712 },
4713
4714 /* PREFIX_VEX_3829 */
4715 {
4716 { "(bad)", { XX } },
4717 { "(bad)", { XX } },
4718 { VEX_LEN_TABLE (VEX_LEN_3829_P_2) },
4719 { "(bad)", { XX } },
4720 },
4721
4722 /* PREFIX_VEX_382A */
4723 {
4724 { "(bad)", { XX } },
4725 { "(bad)", { XX } },
4726 { MOD_TABLE (MOD_VEX_382A_PREFIX_2) },
4727 { "(bad)", { XX } },
4728 },
4729
4730 /* PREFIX_VEX_382B */
4731 {
4732 { "(bad)", { XX } },
4733 { "(bad)", { XX } },
4734 { VEX_LEN_TABLE (VEX_LEN_382B_P_2) },
4735 { "(bad)", { XX } },
4736 },
4737
4738 /* PREFIX_VEX_382C */
4739 {
4740 { "(bad)", { XX } },
4741 { "(bad)", { XX } },
4742 { MOD_TABLE (MOD_VEX_382C_PREFIX_2) },
4743 { "(bad)", { XX } },
4744 },
4745
4746 /* PREFIX_VEX_382D */
4747 {
4748 { "(bad)", { XX } },
4749 { "(bad)", { XX } },
4750 { MOD_TABLE (MOD_VEX_382D_PREFIX_2) },
4751 { "(bad)", { XX } },
4752 },
4753
4754 /* PREFIX_VEX_382E */
4755 {
4756 { "(bad)", { XX } },
4757 { "(bad)", { XX } },
4758 { MOD_TABLE (MOD_VEX_382E_PREFIX_2) },
4759 { "(bad)", { XX } },
4760 },
4761
4762 /* PREFIX_VEX_382F */
4763 {
4764 { "(bad)", { XX } },
4765 { "(bad)", { XX } },
4766 { MOD_TABLE (MOD_VEX_382F_PREFIX_2) },
4767 { "(bad)", { XX } },
4768 },
4769
4770 /* PREFIX_VEX_3830 */
4771 {
4772 { "(bad)", { XX } },
4773 { "(bad)", { XX } },
4774 { VEX_LEN_TABLE (VEX_LEN_3830_P_2) },
4775 { "(bad)", { XX } },
4776 },
4777
4778 /* PREFIX_VEX_3831 */
4779 {
4780 { "(bad)", { XX } },
4781 { "(bad)", { XX } },
4782 { VEX_LEN_TABLE (VEX_LEN_3831_P_2) },
4783 { "(bad)", { XX } },
4784 },
4785
4786 /* PREFIX_VEX_3832 */
4787 {
4788 { "(bad)", { XX } },
4789 { "(bad)", { XX } },
4790 { VEX_LEN_TABLE (VEX_LEN_3832_P_2) },
4791 { "(bad)", { XX } },
4792 },
4793
4794 /* PREFIX_VEX_3833 */
4795 {
4796 { "(bad)", { XX } },
4797 { "(bad)", { XX } },
4798 { VEX_LEN_TABLE (VEX_LEN_3833_P_2) },
4799 { "(bad)", { XX } },
4800 },
4801
4802 /* PREFIX_VEX_3834 */
4803 {
4804 { "(bad)", { XX } },
4805 { "(bad)", { XX } },
4806 { VEX_LEN_TABLE (VEX_LEN_3834_P_2) },
4807 { "(bad)", { XX } },
4808 },
4809
4810 /* PREFIX_VEX_3835 */
4811 {
4812 { "(bad)", { XX } },
4813 { "(bad)", { XX } },
4814 { VEX_LEN_TABLE (VEX_LEN_3835_P_2) },
4815 { "(bad)", { XX } },
4816 },
4817
4818 /* PREFIX_VEX_3837 */
4819 {
4820 { "(bad)", { XX } },
4821 { "(bad)", { XX } },
4822 { VEX_LEN_TABLE (VEX_LEN_3837_P_2) },
4823 { "(bad)", { XX } },
4824 },
4825
4826 /* PREFIX_VEX_3838 */
4827 {
4828 { "(bad)", { XX } },
4829 { "(bad)", { XX } },
4830 { VEX_LEN_TABLE (VEX_LEN_3838_P_2) },
4831 { "(bad)", { XX } },
4832 },
4833
4834 /* PREFIX_VEX_3839 */
4835 {
4836 { "(bad)", { XX } },
4837 { "(bad)", { XX } },
4838 { VEX_LEN_TABLE (VEX_LEN_3839_P_2) },
4839 { "(bad)", { XX } },
4840 },
4841
4842 /* PREFIX_VEX_383A */
4843 {
4844 { "(bad)", { XX } },
4845 { "(bad)", { XX } },
4846 { VEX_LEN_TABLE (VEX_LEN_383A_P_2) },
4847 { "(bad)", { XX } },
4848 },
4849
4850 /* PREFIX_VEX_383B */
4851 {
4852 { "(bad)", { XX } },
4853 { "(bad)", { XX } },
4854 { VEX_LEN_TABLE (VEX_LEN_383B_P_2) },
4855 { "(bad)", { XX } },
4856 },
4857
4858 /* PREFIX_VEX_383C */
4859 {
4860 { "(bad)", { XX } },
4861 { "(bad)", { XX } },
4862 { VEX_LEN_TABLE (VEX_LEN_383C_P_2) },
4863 { "(bad)", { XX } },
4864 },
4865
4866 /* PREFIX_VEX_383D */
4867 {
4868 { "(bad)", { XX } },
4869 { "(bad)", { XX } },
4870 { VEX_LEN_TABLE (VEX_LEN_383D_P_2) },
4871 { "(bad)", { XX } },
4872 },
4873
4874 /* PREFIX_VEX_383E */
4875 {
4876 { "(bad)", { XX } },
4877 { "(bad)", { XX } },
4878 { VEX_LEN_TABLE (VEX_LEN_383E_P_2) },
4879 { "(bad)", { XX } },
4880 },
4881
4882 /* PREFIX_VEX_383F */
4883 {
4884 { "(bad)", { XX } },
4885 { "(bad)", { XX } },
4886 { VEX_LEN_TABLE (VEX_LEN_383F_P_2) },
4887 { "(bad)", { XX } },
4888 },
4889
4890 /* PREFIX_VEX_3840 */
4891 {
4892 { "(bad)", { XX } },
4893 { "(bad)", { XX } },
4894 { VEX_LEN_TABLE (VEX_LEN_3840_P_2) },
4895 { "(bad)", { XX } },
4896 },
4897
4898 /* PREFIX_VEX_3841 */
4899 {
4900 { "(bad)", { XX } },
4901 { "(bad)", { XX } },
4902 { VEX_LEN_TABLE (VEX_LEN_3841_P_2) },
4903 { "(bad)", { XX } },
4904 },
4905
0bfee649 4906 /* PREFIX_VEX_3896 */
a5ff0eb2
L
4907 {
4908 { "(bad)", { XX } },
4909 { "(bad)", { XX } },
0bfee649 4910 { "vfmaddsub132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4911 { "(bad)", { XX } },
4912 },
4913
0bfee649 4914 /* PREFIX_VEX_3897 */
a5ff0eb2
L
4915 {
4916 { "(bad)", { XX } },
4917 { "(bad)", { XX } },
0bfee649 4918 { "vfmsubadd132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4919 { "(bad)", { XX } },
4920 },
4921
0bfee649 4922 /* PREFIX_VEX_3898 */
a5ff0eb2
L
4923 {
4924 { "(bad)", { XX } },
4925 { "(bad)", { XX } },
0bfee649 4926 { "vfmadd132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4927 { "(bad)", { XX } },
4928 },
4929
0bfee649 4930 /* PREFIX_VEX_3899 */
a5ff0eb2
L
4931 {
4932 { "(bad)", { XX } },
4933 { "(bad)", { XX } },
0bfee649 4934 { "vfmadd132s%XW", { XM, Vex, EXVexWdq } },
a5ff0eb2
L
4935 { "(bad)", { XX } },
4936 },
4937
0bfee649 4938 /* PREFIX_VEX_389A */
a5ff0eb2
L
4939 {
4940 { "(bad)", { XX } },
4941 { "(bad)", { XX } },
0bfee649 4942 { "vfmsub132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4943 { "(bad)", { XX } },
4944 },
4945
0bfee649 4946 /* PREFIX_VEX_389B */
c0f3af97
L
4947 {
4948 { "(bad)", { XX } },
4949 { "(bad)", { XX } },
0bfee649 4950 { "vfmsub132s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
4951 { "(bad)", { XX } },
4952 },
4953
0bfee649 4954 /* PREFIX_VEX_389C */
c0f3af97
L
4955 {
4956 { "(bad)", { XX } },
4957 { "(bad)", { XX } },
0bfee649 4958 { "vfnmadd132p%XW", { XM, Vex, EXx } },
c0f3af97
L
4959 { "(bad)", { XX } },
4960 },
4961
0bfee649 4962 /* PREFIX_VEX_389D */
c0f3af97
L
4963 {
4964 { "(bad)", { XX } },
4965 { "(bad)", { XX } },
0bfee649 4966 { "vfnmadd132s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
4967 { "(bad)", { XX } },
4968 },
4969
0bfee649 4970 /* PREFIX_VEX_389E */
c0f3af97
L
4971 {
4972 { "(bad)", { XX } },
4973 { "(bad)", { XX } },
0bfee649 4974 { "vfnmsub132p%XW", { XM, Vex, EXx } },
c0f3af97
L
4975 { "(bad)", { XX } },
4976 },
4977
0bfee649 4978 /* PREFIX_VEX_389F */
c0f3af97
L
4979 {
4980 { "(bad)", { XX } },
4981 { "(bad)", { XX } },
0bfee649 4982 { "vfnmsub132s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
4983 { "(bad)", { XX } },
4984 },
4985
0bfee649 4986 /* PREFIX_VEX_38A6 */
c0f3af97
L
4987 {
4988 { "(bad)", { XX } },
4989 { "(bad)", { XX } },
0bfee649 4990 { "vfmaddsub213p%XW", { XM, Vex, EXx } },
c0f3af97
L
4991 { "(bad)", { XX } },
4992 },
4993
0bfee649 4994 /* PREFIX_VEX_38A7 */
c0f3af97
L
4995 {
4996 { "(bad)", { XX } },
4997 { "(bad)", { XX } },
0bfee649 4998 { "vfmsubadd213p%XW", { XM, Vex, EXx } },
c0f3af97
L
4999 { "(bad)", { XX } },
5000 },
5001
0bfee649 5002 /* PREFIX_VEX_38A8 */
c0f3af97
L
5003 {
5004 { "(bad)", { XX } },
5005 { "(bad)", { XX } },
0bfee649 5006 { "vfmadd213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5007 { "(bad)", { XX } },
5008 },
5009
0bfee649 5010 /* PREFIX_VEX_38A9 */
c0f3af97
L
5011 {
5012 { "(bad)", { XX } },
5013 { "(bad)", { XX } },
0bfee649 5014 { "vfmadd213s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5015 { "(bad)", { XX } },
5016 },
5017
0bfee649 5018 /* PREFIX_VEX_38AA */
c0f3af97
L
5019 {
5020 { "(bad)", { XX } },
5021 { "(bad)", { XX } },
0bfee649 5022 { "vfmsub213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5023 { "(bad)", { XX } },
5024 },
5025
0bfee649 5026 /* PREFIX_VEX_38AB */
c0f3af97
L
5027 {
5028 { "(bad)", { XX } },
5029 { "(bad)", { XX } },
0bfee649 5030 { "vfmsub213s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5031 { "(bad)", { XX } },
5032 },
5033
0bfee649 5034 /* PREFIX_VEX_38AC */
c0f3af97
L
5035 {
5036 { "(bad)", { XX } },
5037 { "(bad)", { XX } },
0bfee649 5038 { "vfnmadd213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5039 { "(bad)", { XX } },
5040 },
5041
0bfee649 5042 /* PREFIX_VEX_38AD */
c0f3af97
L
5043 {
5044 { "(bad)", { XX } },
5045 { "(bad)", { XX } },
0bfee649 5046 { "vfnmadd213s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5047 { "(bad)", { XX } },
5048 },
5049
0bfee649 5050 /* PREFIX_VEX_38AE */
c0f3af97
L
5051 {
5052 { "(bad)", { XX } },
5053 { "(bad)", { XX } },
0bfee649 5054 { "vfnmsub213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5055 { "(bad)", { XX } },
5056 },
5057
0bfee649 5058 /* PREFIX_VEX_38AF */
c0f3af97
L
5059 {
5060 { "(bad)", { XX } },
5061 { "(bad)", { XX } },
0bfee649 5062 { "vfnmsub213s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5063 { "(bad)", { XX } },
5064 },
5065
0bfee649 5066 /* PREFIX_VEX_38B6 */
c0f3af97
L
5067 {
5068 { "(bad)", { XX } },
5069 { "(bad)", { XX } },
0bfee649 5070 { "vfmaddsub231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5071 { "(bad)", { XX } },
5072 },
5073
0bfee649 5074 /* PREFIX_VEX_38B7 */
c0f3af97
L
5075 {
5076 { "(bad)", { XX } },
5077 { "(bad)", { XX } },
0bfee649 5078 { "vfmsubadd231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5079 { "(bad)", { XX } },
5080 },
5081
0bfee649 5082 /* PREFIX_VEX_38B8 */
c0f3af97
L
5083 {
5084 { "(bad)", { XX } },
5085 { "(bad)", { XX } },
0bfee649 5086 { "vfmadd231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5087 { "(bad)", { XX } },
5088 },
5089
0bfee649 5090 /* PREFIX_VEX_38B9 */
c0f3af97
L
5091 {
5092 { "(bad)", { XX } },
5093 { "(bad)", { XX } },
0bfee649 5094 { "vfmadd231s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5095 { "(bad)", { XX } },
5096 },
5097
0bfee649 5098 /* PREFIX_VEX_38BA */
c0f3af97
L
5099 {
5100 { "(bad)", { XX } },
5101 { "(bad)", { XX } },
0bfee649 5102 { "vfmsub231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5103 { "(bad)", { XX } },
5104 },
5105
0bfee649 5106 /* PREFIX_VEX_38BB */
c0f3af97
L
5107 {
5108 { "(bad)", { XX } },
5109 { "(bad)", { XX } },
0bfee649 5110 { "vfmsub231s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5111 { "(bad)", { XX } },
5112 },
5113
0bfee649 5114 /* PREFIX_VEX_38BC */
c0f3af97
L
5115 {
5116 { "(bad)", { XX } },
5117 { "(bad)", { XX } },
0bfee649 5118 { "vfnmadd231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5119 { "(bad)", { XX } },
5120 },
5121
0bfee649 5122 /* PREFIX_VEX_38BD */
c0f3af97
L
5123 {
5124 { "(bad)", { XX } },
5125 { "(bad)", { XX } },
0bfee649 5126 { "vfnmadd231s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5127 { "(bad)", { XX } },
5128 },
5129
0bfee649 5130 /* PREFIX_VEX_38BE */
c0f3af97
L
5131 {
5132 { "(bad)", { XX } },
5133 { "(bad)", { XX } },
0bfee649 5134 { "vfnmsub231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5135 { "(bad)", { XX } },
5136 },
5137
0bfee649 5138 /* PREFIX_VEX_38BF */
c0f3af97
L
5139 {
5140 { "(bad)", { XX } },
5141 { "(bad)", { XX } },
0bfee649 5142 { "vfnmsub231s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5143 { "(bad)", { XX } },
5144 },
5145
0bfee649 5146 /* PREFIX_VEX_38DB */
c0f3af97
L
5147 {
5148 { "(bad)", { XX } },
5149 { "(bad)", { XX } },
0bfee649 5150 { VEX_LEN_TABLE (VEX_LEN_38DB_P_2) },
c0f3af97
L
5151 { "(bad)", { XX } },
5152 },
5153
0bfee649 5154 /* PREFIX_VEX_38DC */
c0f3af97
L
5155 {
5156 { "(bad)", { XX } },
5157 { "(bad)", { XX } },
0bfee649 5158 { VEX_LEN_TABLE (VEX_LEN_38DC_P_2) },
c0f3af97
L
5159 { "(bad)", { XX } },
5160 },
5161
0bfee649 5162 /* PREFIX_VEX_38DD */
c0f3af97
L
5163 {
5164 { "(bad)", { XX } },
5165 { "(bad)", { XX } },
0bfee649 5166 { VEX_LEN_TABLE (VEX_LEN_38DD_P_2) },
c0f3af97
L
5167 { "(bad)", { XX } },
5168 },
5169
0bfee649 5170 /* PREFIX_VEX_38DE */
c0f3af97
L
5171 {
5172 { "(bad)", { XX } },
5173 { "(bad)", { XX } },
0bfee649 5174 { VEX_LEN_TABLE (VEX_LEN_38DE_P_2) },
c0f3af97
L
5175 { "(bad)", { XX } },
5176 },
5177
0bfee649 5178 /* PREFIX_VEX_38DF */
c0f3af97
L
5179 {
5180 { "(bad)", { XX } },
5181 { "(bad)", { XX } },
0bfee649 5182 { VEX_LEN_TABLE (VEX_LEN_38DF_P_2) },
c0f3af97
L
5183 { "(bad)", { XX } },
5184 },
5185
0bfee649 5186 /* PREFIX_VEX_3A04 */
c0f3af97
L
5187 {
5188 { "(bad)", { XX } },
5189 { "(bad)", { XX } },
9e30b8e0 5190 { VEX_W_TABLE (VEX_W_3A04_P_2) },
c0f3af97
L
5191 { "(bad)", { XX } },
5192 },
5193
0bfee649 5194 /* PREFIX_VEX_3A05 */
c0f3af97
L
5195 {
5196 { "(bad)", { XX } },
5197 { "(bad)", { XX } },
9e30b8e0 5198 { VEX_W_TABLE (VEX_W_3A05_P_2) },
c0f3af97
L
5199 { "(bad)", { XX } },
5200 },
5201
0bfee649 5202 /* PREFIX_VEX_3A06 */
c0f3af97
L
5203 {
5204 { "(bad)", { XX } },
5205 { "(bad)", { XX } },
0bfee649 5206 { VEX_LEN_TABLE (VEX_LEN_3A06_P_2) },
c0f3af97
L
5207 { "(bad)", { XX } },
5208 },
5209
0bfee649 5210 /* PREFIX_VEX_3A08 */
c0f3af97
L
5211 {
5212 { "(bad)", { XX } },
5213 { "(bad)", { XX } },
9e30b8e0 5214 { VEX_W_TABLE (VEX_W_3A08_P_2) },
c0f3af97
L
5215 { "(bad)", { XX } },
5216 },
5217
0bfee649 5218 /* PREFIX_VEX_3A09 */
c0f3af97
L
5219 {
5220 { "(bad)", { XX } },
5221 { "(bad)", { XX } },
9e30b8e0 5222 { VEX_W_TABLE (VEX_W_3A09_P_2) },
c0f3af97
L
5223 { "(bad)", { XX } },
5224 },
5225
0bfee649 5226 /* PREFIX_VEX_3A0A */
c0f3af97
L
5227 {
5228 { "(bad)", { XX } },
5229 { "(bad)", { XX } },
0bfee649
L
5230 { VEX_LEN_TABLE (VEX_LEN_3A0A_P_2) },
5231 { "(bad)", { XX } },
5232 },
5233
5234 /* PREFIX_VEX_3A0B */
5235 {
5236 { "(bad)", { XX } },
5237 { "(bad)", { XX } },
5238 { VEX_LEN_TABLE (VEX_LEN_3A0B_P_2) },
5239 { "(bad)", { XX } },
5240 },
5241
5242 /* PREFIX_VEX_3A0C */
5243 {
5244 { "(bad)", { XX } },
5245 { "(bad)", { XX } },
9e30b8e0 5246 { VEX_W_TABLE (VEX_W_3A0C_P_2) },
0bfee649
L
5247 { "(bad)", { XX } },
5248 },
5249
5250 /* PREFIX_VEX_3A0D */
5251 {
5252 { "(bad)", { XX } },
5253 { "(bad)", { XX } },
9e30b8e0 5254 { VEX_W_TABLE (VEX_W_3A0D_P_2) },
c0f3af97
L
5255 { "(bad)", { XX } },
5256 },
5257
0bfee649
L
5258 /* PREFIX_VEX_3A0E */
5259 {
5260 { "(bad)", { XX } },
5261 { "(bad)", { XX } },
5262 { VEX_LEN_TABLE (VEX_LEN_3A0E_P_2) },
5263 { "(bad)", { XX } },
5264 },
5265
5266 /* PREFIX_VEX_3A0F */
5267 {
5268 { "(bad)", { XX } },
5269 { "(bad)", { XX } },
5270 { VEX_LEN_TABLE (VEX_LEN_3A0F_P_2) },
5271 { "(bad)", { XX } },
5272 },
5273
5274 /* PREFIX_VEX_3A14 */
5275 {
5276 { "(bad)", { XX } },
5277 { "(bad)", { XX } },
5278 { VEX_LEN_TABLE (VEX_LEN_3A14_P_2) },
5279 { "(bad)", { XX } },
5280 },
5281
5282 /* PREFIX_VEX_3A15 */
5283 {
5284 { "(bad)", { XX } },
5285 { "(bad)", { XX } },
5286 { VEX_LEN_TABLE (VEX_LEN_3A15_P_2) },
5287 { "(bad)", { XX } },
5288 },
5289
5290 /* PREFIX_VEX_3A16 */
c0f3af97
L
5291 {
5292 { "(bad)", { XX } },
5293 { "(bad)", { XX } },
0bfee649 5294 { VEX_LEN_TABLE (VEX_LEN_3A16_P_2) },
c0f3af97
L
5295 { "(bad)", { XX } },
5296 },
5297
0bfee649 5298 /* PREFIX_VEX_3A17 */
c0f3af97
L
5299 {
5300 { "(bad)", { XX } },
5301 { "(bad)", { XX } },
0bfee649 5302 { VEX_LEN_TABLE (VEX_LEN_3A17_P_2) },
c0f3af97
L
5303 { "(bad)", { XX } },
5304 },
5305
0bfee649 5306 /* PREFIX_VEX_3A18 */
c0f3af97
L
5307 {
5308 { "(bad)", { XX } },
5309 { "(bad)", { XX } },
0bfee649 5310 { VEX_LEN_TABLE (VEX_LEN_3A18_P_2) },
c0f3af97
L
5311 { "(bad)", { XX } },
5312 },
5313
0bfee649 5314 /* PREFIX_VEX_3A19 */
c0f3af97
L
5315 {
5316 { "(bad)", { XX } },
5317 { "(bad)", { XX } },
0bfee649 5318 { VEX_LEN_TABLE (VEX_LEN_3A19_P_2) },
c0f3af97
L
5319 { "(bad)", { XX } },
5320 },
5321
0bfee649 5322 /* PREFIX_VEX_3A20 */
c0f3af97
L
5323 {
5324 { "(bad)", { XX } },
5325 { "(bad)", { XX } },
0bfee649 5326 { VEX_LEN_TABLE (VEX_LEN_3A20_P_2) },
c0f3af97
L
5327 { "(bad)", { XX } },
5328 },
5329
0bfee649 5330 /* PREFIX_VEX_3A21 */
c0f3af97
L
5331 {
5332 { "(bad)", { XX } },
5333 { "(bad)", { XX } },
0bfee649 5334 { VEX_LEN_TABLE (VEX_LEN_3A21_P_2) },
c0f3af97
L
5335 { "(bad)", { XX } },
5336 },
5337
0bfee649
L
5338 /* PREFIX_VEX_3A22 */
5339 {
5340 { "(bad)", { XX } },
5341 { "(bad)", { XX } },
5342 { VEX_LEN_TABLE (VEX_LEN_3A22_P_2) },
5343 { "(bad)", { XX } },
5344 },
5345
5346 /* PREFIX_VEX_3A40 */
c0f3af97
L
5347 {
5348 { "(bad)", { XX } },
5349 { "(bad)", { XX } },
9e30b8e0 5350 { VEX_W_TABLE (VEX_W_3A40_P_2) },
c0f3af97
L
5351 { "(bad)", { XX } },
5352 },
5353
0bfee649 5354 /* PREFIX_VEX_3A41 */
c0f3af97
L
5355 {
5356 { "(bad)", { XX } },
5357 { "(bad)", { XX } },
0bfee649 5358 { VEX_LEN_TABLE (VEX_LEN_3A41_P_2) },
c0f3af97
L
5359 { "(bad)", { XX } },
5360 },
5361
0bfee649 5362 /* PREFIX_VEX_3A42 */
c0f3af97
L
5363 {
5364 { "(bad)", { XX } },
5365 { "(bad)", { XX } },
0bfee649 5366 { VEX_LEN_TABLE (VEX_LEN_3A42_P_2) },
c0f3af97
L
5367 { "(bad)", { XX } },
5368 },
5369
ce2f5b3c
L
5370 /* PREFIX_VEX_3A44 */
5371 {
5372 { "(bad)", { XX } },
5373 { "(bad)", { XX } },
5374 { VEX_LEN_TABLE (VEX_LEN_3A44_P_2) },
5375 { "(bad)", { XX } },
5376 },
5377
0bfee649 5378 /* PREFIX_VEX_3A4A */
c0f3af97
L
5379 {
5380 { "(bad)", { XX } },
5381 { "(bad)", { XX } },
9e30b8e0 5382 { VEX_W_TABLE (VEX_W_3A4A_P_2) },
c0f3af97
L
5383 { "(bad)", { XX } },
5384 },
5385
0bfee649 5386 /* PREFIX_VEX_3A4B */
c0f3af97
L
5387 {
5388 { "(bad)", { XX } },
5389 { "(bad)", { XX } },
9e30b8e0 5390 { VEX_W_TABLE (VEX_W_3A4B_P_2) },
c0f3af97
L
5391 { "(bad)", { XX } },
5392 },
5393
0bfee649 5394 /* PREFIX_VEX_3A4C */
c0f3af97
L
5395 {
5396 { "(bad)", { XX } },
5397 { "(bad)", { XX } },
0bfee649 5398 { VEX_LEN_TABLE (VEX_LEN_3A4C_P_2) },
c0f3af97
L
5399 { "(bad)", { XX } },
5400 },
5401
922d8de8
DR
5402 /* PREFIX_VEX_3A5C */
5403 {
5404 { "(bad)", { XX } },
5405 { "(bad)", { XX } },
206c2556 5406 { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5407 { "(bad)", { XX } },
5408 },
5409
5410 /* PREFIX_VEX_3A5D */
5411 {
5412 { "(bad)", { XX } },
5413 { "(bad)", { XX } },
206c2556 5414 { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5415 { "(bad)", { XX } },
5416 },
5417
5418 /* PREFIX_VEX_3A5E */
5419 {
5420 { "(bad)", { XX } },
5421 { "(bad)", { XX } },
206c2556 5422 { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5423 { "(bad)", { XX } },
5424 },
5425
5426 /* PREFIX_VEX_3A5F */
5427 {
5428 { "(bad)", { XX } },
5429 { "(bad)", { XX } },
206c2556 5430 { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5431 { "(bad)", { XX } },
5432 },
5433
0bfee649 5434 /* PREFIX_VEX_3A60 */
c0f3af97
L
5435 {
5436 { "(bad)", { XX } },
5437 { "(bad)", { XX } },
0bfee649 5438 { VEX_LEN_TABLE (VEX_LEN_3A60_P_2) },
c0f3af97
L
5439 { "(bad)", { XX } },
5440 },
5441
0bfee649 5442 /* PREFIX_VEX_3A61 */
c0f3af97
L
5443 {
5444 { "(bad)", { XX } },
5445 { "(bad)", { XX } },
0bfee649 5446 { VEX_LEN_TABLE (VEX_LEN_3A61_P_2) },
c0f3af97
L
5447 { "(bad)", { XX } },
5448 },
5449
0bfee649 5450 /* PREFIX_VEX_3A62 */
c0f3af97
L
5451 {
5452 { "(bad)", { XX } },
5453 { "(bad)", { XX } },
0bfee649 5454 { VEX_LEN_TABLE (VEX_LEN_3A62_P_2) },
c0f3af97
L
5455 { "(bad)", { XX } },
5456 },
5457
0bfee649 5458 /* PREFIX_VEX_3A63 */
c0f3af97
L
5459 {
5460 { "(bad)", { XX } },
5461 { "(bad)", { XX } },
0bfee649 5462 { VEX_LEN_TABLE (VEX_LEN_3A63_P_2) },
c0f3af97
L
5463 { "(bad)", { XX } },
5464 },
a5ff0eb2 5465
922d8de8
DR
5466 /* PREFIX_VEX_3A68 */
5467 {
5468 { "(bad)", { XX } },
5469 { "(bad)", { XX } },
206c2556 5470 { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5471 { "(bad)", { XX } },
5472 },
5473
5474 /* PREFIX_VEX_3A69 */
5475 {
5476 { "(bad)", { XX } },
5477 { "(bad)", { XX } },
206c2556 5478 { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5479 { "(bad)", { XX } },
5480 },
5481
5482 /* PREFIX_VEX_3A6A */
5483 {
5484 { "(bad)", { XX } },
5485 { "(bad)", { XX } },
5486 { VEX_LEN_TABLE (VEX_LEN_3A6A_P_2) },
5487 { "(bad)", { XX } },
5488 },
5489
5490 /* PREFIX_VEX_3A6B */
5491 {
5492 { "(bad)", { XX } },
5493 { "(bad)", { XX } },
5494 { VEX_LEN_TABLE (VEX_LEN_3A6B_P_2) },
5495 { "(bad)", { XX } },
5496 },
5497
5498 /* PREFIX_VEX_3A6C */
5499 {
5500 { "(bad)", { XX } },
5501 { "(bad)", { XX } },
206c2556 5502 { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5503 { "(bad)", { XX } },
5504 },
5505
5506 /* PREFIX_VEX_3A6D */
5507 {
5508 { "(bad)", { XX } },
5509 { "(bad)", { XX } },
206c2556 5510 { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5511 { "(bad)", { XX } },
5512 },
5513
5514 /* PREFIX_VEX_3A6E */
5515 {
5516 { "(bad)", { XX } },
5517 { "(bad)", { XX } },
5518 { VEX_LEN_TABLE (VEX_LEN_3A6E_P_2) },
5519 { "(bad)", { XX } },
5520 },
5521
5522 /* PREFIX_VEX_3A6F */
5523 {
5524 { "(bad)", { XX } },
5525 { "(bad)", { XX } },
5526 { VEX_LEN_TABLE (VEX_LEN_3A6F_P_2) },
5527 { "(bad)", { XX } },
5528 },
5529
5530 /* PREFIX_VEX_3A78 */
5531 {
5532 { "(bad)", { XX } },
5533 { "(bad)", { XX } },
206c2556 5534 { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5535 { "(bad)", { XX } },
5536 },
5537
5538 /* PREFIX_VEX_3A79 */
5539 {
5540 { "(bad)", { XX } },
5541 { "(bad)", { XX } },
206c2556 5542 { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5543 { "(bad)", { XX } },
5544 },
5545
5546 /* PREFIX_VEX_3A7A */
5547 {
5548 { "(bad)", { XX } },
5549 { "(bad)", { XX } },
5550 { VEX_LEN_TABLE (VEX_LEN_3A7A_P_2) },
5551 { "(bad)", { XX } },
5552 },
5553
5554 /* PREFIX_VEX_3A7B */
5555 {
5556 { "(bad)", { XX } },
5557 { "(bad)", { XX } },
5558 { VEX_LEN_TABLE (VEX_LEN_3A7B_P_2) },
5559 { "(bad)", { XX } },
5560 },
5561
5562 /* PREFIX_VEX_3A7C */
5563 {
5564 { "(bad)", { XX } },
5565 { "(bad)", { XX } },
206c2556 5566 { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5567 { "(bad)", { XX } },
5568 },
5569
5570 /* PREFIX_VEX_3A7D */
5571 {
5572 { "(bad)", { XX } },
5573 { "(bad)", { XX } },
206c2556 5574 { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5575 { "(bad)", { XX } },
5576 },
5577
5578 /* PREFIX_VEX_3A7E */
5579 {
5580 { "(bad)", { XX } },
5581 { "(bad)", { XX } },
5582 { VEX_LEN_TABLE (VEX_LEN_3A7E_P_2) },
5583 { "(bad)", { XX } },
5584 },
5585
5586 /* PREFIX_VEX_3A7F */
5587 {
5588 { "(bad)", { XX } },
5589 { "(bad)", { XX } },
5590 { VEX_LEN_TABLE (VEX_LEN_3A7F_P_2) },
5591 { "(bad)", { XX } },
5592 },
5593
a5ff0eb2
L
5594 /* PREFIX_VEX_3ADF */
5595 {
5596 { "(bad)", { XX } },
5597 { "(bad)", { XX } },
5598 { VEX_LEN_TABLE (VEX_LEN_3ADF_P_2) },
5599 { "(bad)", { XX } },
5600 },
c0f3af97
L
5601};
5602
5603static const struct dis386 x86_64_table[][2] = {
5604 /* X86_64_06 */
5605 {
5606 { "push{T|}", { es } },
5607 { "(bad)", { XX } },
5608 },
5609
5610 /* X86_64_07 */
5611 {
5612 { "pop{T|}", { es } },
5613 { "(bad)", { XX } },
5614 },
5615
5616 /* X86_64_0D */
5617 {
5618 { "push{T|}", { cs } },
5619 { "(bad)", { XX } },
5620 },
5621
5622 /* X86_64_16 */
5623 {
5624 { "push{T|}", { ss } },
5625 { "(bad)", { XX } },
5626 },
5627
5628 /* X86_64_17 */
5629 {
5630 { "pop{T|}", { ss } },
5631 { "(bad)", { XX } },
5632 },
5633
5634 /* X86_64_1E */
5635 {
5636 { "push{T|}", { ds } },
5637 { "(bad)", { XX } },
5638 },
5639
5640 /* X86_64_1F */
5641 {
5642 { "pop{T|}", { ds } },
5643 { "(bad)", { XX } },
5644 },
5645
5646 /* X86_64_27 */
5647 {
5648 { "daa", { XX } },
5649 { "(bad)", { XX } },
5650 },
5651
5652 /* X86_64_2F */
5653 {
5654 { "das", { XX } },
5655 { "(bad)", { XX } },
5656 },
5657
5658 /* X86_64_37 */
5659 {
5660 { "aaa", { XX } },
5661 { "(bad)", { XX } },
5662 },
5663
5664 /* X86_64_3F */
5665 {
5666 { "aas", { XX } },
5667 { "(bad)", { XX } },
5668 },
5669
5670 /* X86_64_60 */
5671 {
5672 { "pusha{P|}", { XX } },
5673 { "(bad)", { XX } },
5674 },
5675
5676 /* X86_64_61 */
5677 {
5678 { "popa{P|}", { XX } },
5679 { "(bad)", { XX } },
5680 },
5681
5682 /* X86_64_62 */
5683 {
5684 { MOD_TABLE (MOD_62_32BIT) },
5685 { "(bad)", { XX } },
5686 },
5687
5688 /* X86_64_63 */
5689 {
5690 { "arpl", { Ew, Gw } },
5691 { "movs{lq|xd}", { Gv, Ed } },
5692 },
5693
5694 /* X86_64_6D */
5695 {
5696 { "ins{R|}", { Yzr, indirDX } },
5697 { "ins{G|}", { Yzr, indirDX } },
5698 },
5699
5700 /* X86_64_6F */
5701 {
5702 { "outs{R|}", { indirDXr, Xz } },
5703 { "outs{G|}", { indirDXr, Xz } },
5704 },
5705
5706 /* X86_64_9A */
5707 {
5708 { "Jcall{T|}", { Ap } },
5709 { "(bad)", { XX } },
5710 },
5711
5712 /* X86_64_C4 */
5713 {
5714 { MOD_TABLE (MOD_C4_32BIT) },
5715 { VEX_C4_TABLE (VEX_0F) },
5716 },
5717
5718 /* X86_64_C5 */
5719 {
5720 { MOD_TABLE (MOD_C5_32BIT) },
5721 { VEX_C5_TABLE (VEX_0F) },
5722 },
5723
5724 /* X86_64_CE */
5725 {
5726 { "into", { XX } },
5727 { "(bad)", { XX } },
5728 },
5729
5730 /* X86_64_D4 */
5731 {
5732 { "aam", { sIb } },
5733 { "(bad)", { XX } },
5734 },
5735
5736 /* X86_64_D5 */
5737 {
5738 { "aad", { sIb } },
5739 { "(bad)", { XX } },
5740 },
5741
5742 /* X86_64_EA */
5743 {
5744 { "Jjmp{T|}", { Ap } },
5745 { "(bad)", { XX } },
5746 },
5747
5748 /* X86_64_0F01_REG_0 */
5749 {
5750 { "sgdt{Q|IQ}", { M } },
5751 { "sgdt", { M } },
5752 },
5753
5754 /* X86_64_0F01_REG_1 */
5755 {
5756 { "sidt{Q|IQ}", { M } },
5757 { "sidt", { M } },
5758 },
5759
5760 /* X86_64_0F01_REG_2 */
5761 {
5762 { "lgdt{Q|Q}", { M } },
5763 { "lgdt", { M } },
5764 },
5765
5766 /* X86_64_0F01_REG_3 */
5767 {
5768 { "lidt{Q|Q}", { M } },
5769 { "lidt", { M } },
5770 },
5771};
5772
5773static const struct dis386 three_byte_table[][256] = {
c1e679ec
DR
5774
5775 /* THREE_BYTE_0F38 */
c0f3af97
L
5776 {
5777 /* 00 */
c1e679ec
DR
5778 { "pshufb", { MX, EM } },
5779 { "phaddw", { MX, EM } },
5780 { "phaddd", { MX, EM } },
5781 { "phaddsw", { MX, EM } },
5782 { "pmaddubsw", { MX, EM } },
5783 { "phsubw", { MX, EM } },
5784 { "phsubd", { MX, EM } },
5785 { "phsubsw", { MX, EM } },
c0f3af97 5786 /* 08 */
c1e679ec
DR
5787 { "psignb", { MX, EM } },
5788 { "psignw", { MX, EM } },
5789 { "psignd", { MX, EM } },
5790 { "pmulhrsw", { MX, EM } },
c0f3af97
L
5791 { "(bad)", { XX } },
5792 { "(bad)", { XX } },
5793 { "(bad)", { XX } },
5794 { "(bad)", { XX } },
f88c9eb0
SP
5795 /* 10 */
5796 { PREFIX_TABLE (PREFIX_0F3810) },
5797 { "(bad)", { XX } },
5798 { "(bad)", { XX } },
5799 { "(bad)", { XX } },
5800 { PREFIX_TABLE (PREFIX_0F3814) },
5801 { PREFIX_TABLE (PREFIX_0F3815) },
5802 { "(bad)", { XX } },
5803 { PREFIX_TABLE (PREFIX_0F3817) },
5804 /* 18 */
5805 { "(bad)", { XX } },
5806 { "(bad)", { XX } },
5807 { "(bad)", { XX } },
5808 { "(bad)", { XX } },
5809 { "pabsb", { MX, EM } },
5810 { "pabsw", { MX, EM } },
5811 { "pabsd", { MX, EM } },
5812 { "(bad)", { XX } },
5813 /* 20 */
5814 { PREFIX_TABLE (PREFIX_0F3820) },
5815 { PREFIX_TABLE (PREFIX_0F3821) },
5816 { PREFIX_TABLE (PREFIX_0F3822) },
5817 { PREFIX_TABLE (PREFIX_0F3823) },
5818 { PREFIX_TABLE (PREFIX_0F3824) },
5819 { PREFIX_TABLE (PREFIX_0F3825) },
5820 { "(bad)", { XX } },
5821 { "(bad)", { XX } },
5822 /* 28 */
5823 { PREFIX_TABLE (PREFIX_0F3828) },
5824 { PREFIX_TABLE (PREFIX_0F3829) },
5825 { PREFIX_TABLE (PREFIX_0F382A) },
5826 { PREFIX_TABLE (PREFIX_0F382B) },
5827 { "(bad)", { XX } },
5828 { "(bad)", { XX } },
5829 { "(bad)", { XX } },
5830 { "(bad)", { XX } },
5831 /* 30 */
5832 { PREFIX_TABLE (PREFIX_0F3830) },
5833 { PREFIX_TABLE (PREFIX_0F3831) },
5834 { PREFIX_TABLE (PREFIX_0F3832) },
5835 { PREFIX_TABLE (PREFIX_0F3833) },
5836 { PREFIX_TABLE (PREFIX_0F3834) },
5837 { PREFIX_TABLE (PREFIX_0F3835) },
5838 { "(bad)", { XX } },
5839 { PREFIX_TABLE (PREFIX_0F3837) },
5840 /* 38 */
5841 { PREFIX_TABLE (PREFIX_0F3838) },
5842 { PREFIX_TABLE (PREFIX_0F3839) },
5843 { PREFIX_TABLE (PREFIX_0F383A) },
5844 { PREFIX_TABLE (PREFIX_0F383B) },
5845 { PREFIX_TABLE (PREFIX_0F383C) },
5846 { PREFIX_TABLE (PREFIX_0F383D) },
5847 { PREFIX_TABLE (PREFIX_0F383E) },
5848 { PREFIX_TABLE (PREFIX_0F383F) },
5849 /* 40 */
5850 { PREFIX_TABLE (PREFIX_0F3840) },
5851 { PREFIX_TABLE (PREFIX_0F3841) },
5852 { "(bad)", { XX } },
5853 { "(bad)", { XX } },
5854 { "(bad)", { XX } },
5855 { "(bad)", { XX } },
5856 { "(bad)", { XX } },
5857 { "(bad)", { XX } },
5858 /* 48 */
5859 { "(bad)", { XX } },
5860 { "(bad)", { XX } },
5861 { "(bad)", { XX } },
5862 { "(bad)", { XX } },
5863 { "(bad)", { XX } },
5864 { "(bad)", { XX } },
5865 { "(bad)", { XX } },
5866 { "(bad)", { XX } },
5867 /* 50 */
5868 { "(bad)", { XX } },
5869 { "(bad)", { XX } },
5870 { "(bad)", { XX } },
5871 { "(bad)", { XX } },
5872 { "(bad)", { XX } },
5873 { "(bad)", { XX } },
5874 { "(bad)", { XX } },
5875 { "(bad)", { XX } },
5876 /* 58 */
5877 { "(bad)", { XX } },
5878 { "(bad)", { XX } },
5879 { "(bad)", { XX } },
5880 { "(bad)", { XX } },
5881 { "(bad)", { XX } },
5882 { "(bad)", { XX } },
5883 { "(bad)", { XX } },
5884 { "(bad)", { XX } },
5885 /* 60 */
5886 { "(bad)", { XX } },
5887 { "(bad)", { XX } },
5888 { "(bad)", { XX } },
5889 { "(bad)", { XX } },
5890 { "(bad)", { XX } },
5891 { "(bad)", { XX } },
5892 { "(bad)", { XX } },
5893 { "(bad)", { XX } },
5894 /* 68 */
5895 { "(bad)", { XX } },
5896 { "(bad)", { XX } },
5897 { "(bad)", { XX } },
5898 { "(bad)", { XX } },
5899 { "(bad)", { XX } },
5900 { "(bad)", { XX } },
5901 { "(bad)", { XX } },
5902 { "(bad)", { XX } },
5903 /* 70 */
5904 { "(bad)", { XX } },
5905 { "(bad)", { XX } },
5906 { "(bad)", { XX } },
5907 { "(bad)", { XX } },
5908 { "(bad)", { XX } },
5909 { "(bad)", { XX } },
5910 { "(bad)", { XX } },
5911 { "(bad)", { XX } },
5912 /* 78 */
5913 { "(bad)", { XX } },
5914 { "(bad)", { XX } },
5915 { "(bad)", { XX } },
5916 { "(bad)", { XX } },
5917 { "(bad)", { XX } },
5918 { "(bad)", { XX } },
5919 { "(bad)", { XX } },
5920 { "(bad)", { XX } },
5921 /* 80 */
5922 { PREFIX_TABLE (PREFIX_0F3880) },
5923 { PREFIX_TABLE (PREFIX_0F3881) },
5924 { "(bad)", { XX } },
5925 { "(bad)", { XX } },
5926 { "(bad)", { XX } },
5927 { "(bad)", { XX } },
5928 { "(bad)", { XX } },
5929 { "(bad)", { XX } },
5930 /* 88 */
5931 { "(bad)", { XX } },
5932 { "(bad)", { XX } },
5933 { "(bad)", { XX } },
5934 { "(bad)", { XX } },
5935 { "(bad)", { XX } },
5936 { "(bad)", { XX } },
5937 { "(bad)", { XX } },
5938 { "(bad)", { XX } },
5939 /* 90 */
5940 { "(bad)", { XX } },
5941 { "(bad)", { XX } },
5942 { "(bad)", { XX } },
5943 { "(bad)", { XX } },
5944 { "(bad)", { XX } },
5945 { "(bad)", { XX } },
5946 { "(bad)", { XX } },
5947 { "(bad)", { XX } },
5948 /* 98 */
5949 { "(bad)", { XX } },
5950 { "(bad)", { XX } },
5951 { "(bad)", { XX } },
5952 { "(bad)", { XX } },
5953 { "(bad)", { XX } },
5954 { "(bad)", { XX } },
5955 { "(bad)", { XX } },
5956 { "(bad)", { XX } },
5957 /* a0 */
5958 { "(bad)", { XX } },
5959 { "(bad)", { XX } },
5960 { "(bad)", { XX } },
5961 { "(bad)", { XX } },
5962 { "(bad)", { XX } },
5963 { "(bad)", { XX } },
5964 { "(bad)", { XX } },
5965 { "(bad)", { XX } },
5966 /* a8 */
5967 { "(bad)", { XX } },
5968 { "(bad)", { XX } },
5969 { "(bad)", { XX } },
5970 { "(bad)", { XX } },
5971 { "(bad)", { XX } },
5972 { "(bad)", { XX } },
5973 { "(bad)", { XX } },
5974 { "(bad)", { XX } },
5975 /* b0 */
5976 { "(bad)", { XX } },
5977 { "(bad)", { XX } },
5978 { "(bad)", { XX } },
5979 { "(bad)", { XX } },
5980 { "(bad)", { XX } },
5981 { "(bad)", { XX } },
5982 { "(bad)", { XX } },
5983 { "(bad)", { XX } },
5984 /* b8 */
5985 { "(bad)", { XX } },
5986 { "(bad)", { XX } },
5987 { "(bad)", { XX } },
5988 { "(bad)", { XX } },
5989 { "(bad)", { XX } },
5990 { "(bad)", { XX } },
5991 { "(bad)", { XX } },
5992 { "(bad)", { XX } },
5993 /* c0 */
5994 { "(bad)", { XX } },
5995 { "(bad)", { XX } },
5996 { "(bad)", { XX } },
5997 { "(bad)", { XX } },
5998 { "(bad)", { XX } },
5999 { "(bad)", { XX } },
6000 { "(bad)", { XX } },
6001 { "(bad)", { XX } },
6002 /* c8 */
6003 { "(bad)", { XX } },
6004 { "(bad)", { XX } },
6005 { "(bad)", { XX } },
6006 { "(bad)", { XX } },
6007 { "(bad)", { XX } },
6008 { "(bad)", { XX } },
6009 { "(bad)", { XX } },
6010 { "(bad)", { XX } },
6011 /* d0 */
6012 { "(bad)", { XX } },
6013 { "(bad)", { XX } },
6014 { "(bad)", { XX } },
6015 { "(bad)", { XX } },
6016 { "(bad)", { XX } },
6017 { "(bad)", { XX } },
6018 { "(bad)", { XX } },
6019 { "(bad)", { XX } },
6020 /* d8 */
6021 { "(bad)", { XX } },
6022 { "(bad)", { XX } },
6023 { "(bad)", { XX } },
6024 { PREFIX_TABLE (PREFIX_0F38DB) },
6025 { PREFIX_TABLE (PREFIX_0F38DC) },
6026 { PREFIX_TABLE (PREFIX_0F38DD) },
6027 { PREFIX_TABLE (PREFIX_0F38DE) },
6028 { PREFIX_TABLE (PREFIX_0F38DF) },
6029 /* e0 */
6030 { "(bad)", { XX } },
6031 { "(bad)", { XX } },
6032 { "(bad)", { XX } },
6033 { "(bad)", { XX } },
6034 { "(bad)", { XX } },
6035 { "(bad)", { XX } },
6036 { "(bad)", { XX } },
6037 { "(bad)", { XX } },
6038 /* e8 */
6039 { "(bad)", { XX } },
6040 { "(bad)", { XX } },
6041 { "(bad)", { XX } },
6042 { "(bad)", { XX } },
6043 { "(bad)", { XX } },
6044 { "(bad)", { XX } },
6045 { "(bad)", { XX } },
6046 { "(bad)", { XX } },
6047 /* f0 */
6048 { PREFIX_TABLE (PREFIX_0F38F0) },
6049 { PREFIX_TABLE (PREFIX_0F38F1) },
6050 { "(bad)", { XX } },
6051 { "(bad)", { XX } },
6052 { "(bad)", { XX } },
6053 { "(bad)", { XX } },
6054 { "(bad)", { XX } },
6055 { "(bad)", { XX } },
6056 /* f8 */
6057 { "(bad)", { XX } },
6058 { "(bad)", { XX } },
6059 { "(bad)", { XX } },
6060 { "(bad)", { XX } },
6061 { "(bad)", { XX } },
6062 { "(bad)", { XX } },
6063 { "(bad)", { XX } },
6064 { "(bad)", { XX } },
6065 },
6066 /* THREE_BYTE_0F3A */
6067 {
6068 /* 00 */
6069 { "(bad)", { XX } },
6070 { "(bad)", { XX } },
6071 { "(bad)", { XX } },
6072 { "(bad)", { XX } },
6073 { "(bad)", { XX } },
6074 { "(bad)", { XX } },
6075 { "(bad)", { XX } },
6076 { "(bad)", { XX } },
6077 /* 08 */
6078 { PREFIX_TABLE (PREFIX_0F3A08) },
6079 { PREFIX_TABLE (PREFIX_0F3A09) },
6080 { PREFIX_TABLE (PREFIX_0F3A0A) },
6081 { PREFIX_TABLE (PREFIX_0F3A0B) },
6082 { PREFIX_TABLE (PREFIX_0F3A0C) },
6083 { PREFIX_TABLE (PREFIX_0F3A0D) },
6084 { PREFIX_TABLE (PREFIX_0F3A0E) },
6085 { "palignr", { MX, EM, Ib } },
6086 /* 10 */
6087 { "(bad)", { XX } },
6088 { "(bad)", { XX } },
6089 { "(bad)", { XX } },
6090 { "(bad)", { XX } },
6091 { PREFIX_TABLE (PREFIX_0F3A14) },
6092 { PREFIX_TABLE (PREFIX_0F3A15) },
6093 { PREFIX_TABLE (PREFIX_0F3A16) },
6094 { PREFIX_TABLE (PREFIX_0F3A17) },
6095 /* 18 */
6096 { "(bad)", { XX } },
6097 { "(bad)", { XX } },
6098 { "(bad)", { XX } },
6099 { "(bad)", { XX } },
6100 { "(bad)", { XX } },
6101 { "(bad)", { XX } },
6102 { "(bad)", { XX } },
6103 { "(bad)", { XX } },
6104 /* 20 */
6105 { PREFIX_TABLE (PREFIX_0F3A20) },
6106 { PREFIX_TABLE (PREFIX_0F3A21) },
6107 { PREFIX_TABLE (PREFIX_0F3A22) },
6108 { "(bad)", { XX } },
6109 { "(bad)", { XX } },
6110 { "(bad)", { XX } },
6111 { "(bad)", { XX } },
6112 { "(bad)", { XX } },
6113 /* 28 */
6114 { "(bad)", { XX } },
6115 { "(bad)", { XX } },
6116 { "(bad)", { XX } },
6117 { "(bad)", { XX } },
6118 { "(bad)", { XX } },
6119 { "(bad)", { XX } },
6120 { "(bad)", { XX } },
6121 { "(bad)", { XX } },
6122 /* 30 */
6123 { "(bad)", { XX } },
6124 { "(bad)", { XX } },
6125 { "(bad)", { XX } },
6126 { "(bad)", { XX } },
6127 { "(bad)", { XX } },
6128 { "(bad)", { XX } },
6129 { "(bad)", { XX } },
6130 { "(bad)", { XX } },
6131 /* 38 */
6132 { "(bad)", { XX } },
6133 { "(bad)", { XX } },
6134 { "(bad)", { XX } },
6135 { "(bad)", { XX } },
6136 { "(bad)", { XX } },
6137 { "(bad)", { XX } },
6138 { "(bad)", { XX } },
6139 { "(bad)", { XX } },
6140 /* 40 */
6141 { PREFIX_TABLE (PREFIX_0F3A40) },
6142 { PREFIX_TABLE (PREFIX_0F3A41) },
6143 { PREFIX_TABLE (PREFIX_0F3A42) },
6144 { "(bad)", { XX } },
6145 { PREFIX_TABLE (PREFIX_0F3A44) },
6146 { "(bad)", { XX } },
6147 { "(bad)", { XX } },
6148 { "(bad)", { XX } },
6149 /* 48 */
6150 { "(bad)", { XX } },
6151 { "(bad)", { XX } },
6152 { "(bad)", { XX } },
6153 { "(bad)", { XX } },
6154 { "(bad)", { XX } },
6155 { "(bad)", { XX } },
6156 { "(bad)", { XX } },
6157 { "(bad)", { XX } },
6158 /* 50 */
6159 { "(bad)", { XX } },
6160 { "(bad)", { XX } },
6161 { "(bad)", { XX } },
6162 { "(bad)", { XX } },
6163 { "(bad)", { XX } },
6164 { "(bad)", { XX } },
6165 { "(bad)", { XX } },
6166 { "(bad)", { XX } },
6167 /* 58 */
6168 { "(bad)", { XX } },
6169 { "(bad)", { XX } },
6170 { "(bad)", { XX } },
6171 { "(bad)", { XX } },
6172 { "(bad)", { XX } },
6173 { "(bad)", { XX } },
6174 { "(bad)", { XX } },
6175 { "(bad)", { XX } },
6176 /* 60 */
6177 { PREFIX_TABLE (PREFIX_0F3A60) },
6178 { PREFIX_TABLE (PREFIX_0F3A61) },
6179 { PREFIX_TABLE (PREFIX_0F3A62) },
6180 { PREFIX_TABLE (PREFIX_0F3A63) },
6181 { "(bad)", { XX } },
6182 { "(bad)", { XX } },
6183 { "(bad)", { XX } },
6184 { "(bad)", { XX } },
6185 /* 68 */
6186 { "(bad)", { XX } },
6187 { "(bad)", { XX } },
6188 { "(bad)", { XX } },
6189 { "(bad)", { XX } },
6190 { "(bad)", { XX } },
6191 { "(bad)", { XX } },
6192 { "(bad)", { XX } },
6193 { "(bad)", { XX } },
6194 /* 70 */
6195 { "(bad)", { XX } },
6196 { "(bad)", { XX } },
6197 { "(bad)", { XX } },
6198 { "(bad)", { XX } },
6199 { "(bad)", { XX } },
6200 { "(bad)", { XX } },
6201 { "(bad)", { XX } },
6202 { "(bad)", { XX } },
6203 /* 78 */
6204 { "(bad)", { XX } },
6205 { "(bad)", { XX } },
6206 { "(bad)", { XX } },
6207 { "(bad)", { XX } },
6208 { "(bad)", { XX } },
6209 { "(bad)", { XX } },
6210 { "(bad)", { XX } },
6211 { "(bad)", { XX } },
6212 /* 80 */
6213 { "(bad)", { XX } },
6214 { "(bad)", { XX } },
6215 { "(bad)", { XX } },
6216 { "(bad)", { XX } },
6217 { "(bad)", { XX } },
6218 { "(bad)", { XX } },
6219 { "(bad)", { XX } },
6220 { "(bad)", { XX } },
6221 /* 88 */
6222 { "(bad)", { XX } },
6223 { "(bad)", { XX } },
6224 { "(bad)", { XX } },
6225 { "(bad)", { XX } },
6226 { "(bad)", { XX } },
6227 { "(bad)", { XX } },
6228 { "(bad)", { XX } },
6229 { "(bad)", { XX } },
6230 /* 90 */
6231 { "(bad)", { XX } },
6232 { "(bad)", { XX } },
6233 { "(bad)", { XX } },
6234 { "(bad)", { XX } },
6235 { "(bad)", { XX } },
6236 { "(bad)", { XX } },
6237 { "(bad)", { XX } },
6238 { "(bad)", { XX } },
6239 /* 98 */
6240 { "(bad)", { XX } },
6241 { "(bad)", { XX } },
6242 { "(bad)", { XX } },
6243 { "(bad)", { XX } },
6244 { "(bad)", { XX } },
6245 { "(bad)", { XX } },
6246 { "(bad)", { XX } },
6247 { "(bad)", { XX } },
6248 /* a0 */
6249 { "(bad)", { XX } },
6250 { "(bad)", { XX } },
6251 { "(bad)", { XX } },
6252 { "(bad)", { XX } },
6253 { "(bad)", { XX } },
6254 { "(bad)", { XX } },
6255 { "(bad)", { XX } },
6256 { "(bad)", { XX } },
6257 /* a8 */
6258 { "(bad)", { XX } },
6259 { "(bad)", { XX } },
6260 { "(bad)", { XX } },
6261 { "(bad)", { XX } },
6262 { "(bad)", { XX } },
6263 { "(bad)", { XX } },
6264 { "(bad)", { XX } },
6265 { "(bad)", { XX } },
6266 /* b0 */
6267 { "(bad)", { XX } },
6268 { "(bad)", { XX } },
6269 { "(bad)", { XX } },
6270 { "(bad)", { XX } },
6271 { "(bad)", { XX } },
6272 { "(bad)", { XX } },
6273 { "(bad)", { XX } },
6274 { "(bad)", { XX } },
6275 /* b8 */
6276 { "(bad)", { XX } },
6277 { "(bad)", { XX } },
6278 { "(bad)", { XX } },
6279 { "(bad)", { XX } },
6280 { "(bad)", { XX } },
6281 { "(bad)", { XX } },
6282 { "(bad)", { XX } },
6283 { "(bad)", { XX } },
6284 /* c0 */
6285 { "(bad)", { XX } },
6286 { "(bad)", { XX } },
6287 { "(bad)", { XX } },
6288 { "(bad)", { XX } },
6289 { "(bad)", { XX } },
6290 { "(bad)", { XX } },
6291 { "(bad)", { XX } },
6292 { "(bad)", { XX } },
6293 /* c8 */
6294 { "(bad)", { XX } },
6295 { "(bad)", { XX } },
6296 { "(bad)", { XX } },
6297 { "(bad)", { XX } },
6298 { "(bad)", { XX } },
6299 { "(bad)", { XX } },
6300 { "(bad)", { XX } },
6301 { "(bad)", { XX } },
6302 /* d0 */
6303 { "(bad)", { XX } },
6304 { "(bad)", { XX } },
6305 { "(bad)", { XX } },
6306 { "(bad)", { XX } },
6307 { "(bad)", { XX } },
6308 { "(bad)", { XX } },
6309 { "(bad)", { XX } },
6310 { "(bad)", { XX } },
6311 /* d8 */
6312 { "(bad)", { XX } },
6313 { "(bad)", { XX } },
6314 { "(bad)", { XX } },
6315 { "(bad)", { XX } },
6316 { "(bad)", { XX } },
6317 { "(bad)", { XX } },
6318 { "(bad)", { XX } },
6319 { PREFIX_TABLE (PREFIX_0F3ADF) },
6320 /* e0 */
6321 { "(bad)", { XX } },
6322 { "(bad)", { XX } },
6323 { "(bad)", { XX } },
6324 { "(bad)", { XX } },
6325 { "(bad)", { XX } },
6326 { "(bad)", { XX } },
6327 { "(bad)", { XX } },
6328 { "(bad)", { XX } },
6329 /* e8 */
6330 { "(bad)", { XX } },
6331 { "(bad)", { XX } },
6332 { "(bad)", { XX } },
6333 { "(bad)", { XX } },
6334 { "(bad)", { XX } },
6335 { "(bad)", { XX } },
6336 { "(bad)", { XX } },
6337 { "(bad)", { XX } },
6338 /* f0 */
6339 { "(bad)", { XX } },
6340 { "(bad)", { XX } },
6341 { "(bad)", { XX } },
6342 { "(bad)", { XX } },
6343 { "(bad)", { XX } },
6344 { "(bad)", { XX } },
6345 { "(bad)", { XX } },
6346 { "(bad)", { XX } },
6347 /* f8 */
6348 { "(bad)", { XX } },
6349 { "(bad)", { XX } },
6350 { "(bad)", { XX } },
6351 { "(bad)", { XX } },
6352 { "(bad)", { XX } },
6353 { "(bad)", { XX } },
6354 { "(bad)", { XX } },
6355 { "(bad)", { XX } },
6356 },
6357
6358 /* THREE_BYTE_0F7A */
6359 {
6360 /* 00 */
6361 { "(bad)", { XX } },
6362 { "(bad)", { XX } },
6363 { "(bad)", { XX } },
6364 { "(bad)", { XX } },
6365 { "(bad)", { XX } },
6366 { "(bad)", { XX } },
6367 { "(bad)", { XX } },
6368 { "(bad)", { XX } },
6369 /* 08 */
6370 { "(bad)", { XX } },
6371 { "(bad)", { XX } },
6372 { "(bad)", { XX } },
6373 { "(bad)", { XX } },
6374 { "(bad)", { XX } },
6375 { "(bad)", { XX } },
6376 { "(bad)", { XX } },
6377 { "(bad)", { XX } },
6378 /* 10 */
6379 { "(bad)", { XX } },
6380 { "(bad)", { XX } },
6381 { "(bad)", { XX } },
6382 { "(bad)", { XX } },
6383 { "(bad)", { XX } },
6384 { "(bad)", { XX } },
6385 { "(bad)", { XX } },
6386 { "(bad)", { XX } },
6387 /* 18 */
6388 { "(bad)", { XX } },
6389 { "(bad)", { XX } },
6390 { "(bad)", { XX } },
6391 { "(bad)", { XX } },
6392 { "(bad)", { XX } },
6393 { "(bad)", { XX } },
6394 { "(bad)", { XX } },
6395 { "(bad)", { XX } },
6396 /* 20 */
6397 { "ptest", { XX } },
6398 { "(bad)", { XX } },
6399 { "(bad)", { XX } },
c0f3af97
L
6400 { "(bad)", { XX } },
6401 { "(bad)", { XX } },
6402 { "(bad)", { XX } },
6403 { "(bad)", { XX } },
6404 { "(bad)", { XX } },
f88c9eb0 6405 /* 28 */
c0f3af97
L
6406 { "(bad)", { XX } },
6407 { "(bad)", { XX } },
6408 { "(bad)", { XX } },
c0f3af97
L
6409 { "(bad)", { XX } },
6410 { "(bad)", { XX } },
6411 { "(bad)", { XX } },
6412 { "(bad)", { XX } },
6413 { "(bad)", { XX } },
f88c9eb0 6414 /* 30 */
c0f3af97
L
6415 { "(bad)", { XX } },
6416 { "(bad)", { XX } },
6417 { "(bad)", { XX } },
4e7d34a6
L
6418 { "(bad)", { XX } },
6419 { "(bad)", { XX } },
c0f3af97 6420 { "(bad)", { XX } },
c0f3af97
L
6421 { "(bad)", { XX } },
6422 { "(bad)", { XX } },
f88c9eb0 6423 /* 38 */
c0f3af97 6424 { "(bad)", { XX } },
4e7d34a6
L
6425 { "(bad)", { XX } },
6426 { "(bad)", { XX } },
6427 { "(bad)", { XX } },
6428 { "(bad)", { XX } },
4e7d34a6
L
6429 { "(bad)", { XX } },
6430 { "(bad)", { XX } },
6431 { "(bad)", { XX } },
f88c9eb0 6432 /* 40 */
4e7d34a6 6433 { "(bad)", { XX } },
f88c9eb0
SP
6434 { "phaddbw", { XM, EXq } },
6435 { "phaddbd", { XM, EXq } },
6436 { "phaddbq", { XM, EXq } },
4e7d34a6
L
6437 { "(bad)", { XX } },
6438 { "(bad)", { XX } },
f88c9eb0
SP
6439 { "phaddwd", { XM, EXq } },
6440 { "phaddwq", { XM, EXq } },
6441 /* 48 */
4e7d34a6
L
6442 { "(bad)", { XX } },
6443 { "(bad)", { XX } },
4e7d34a6 6444 { "(bad)", { XX } },
f88c9eb0 6445 { "phadddq", { XM, EXq } },
4e7d34a6
L
6446 { "(bad)", { XX } },
6447 { "(bad)", { XX } },
6448 { "(bad)", { XX } },
6449 { "(bad)", { XX } },
f88c9eb0 6450 /* 50 */
4e7d34a6 6451 { "(bad)", { XX } },
f88c9eb0
SP
6452 { "phaddubw", { XM, EXq } },
6453 { "phaddubd", { XM, EXq } },
6454 { "phaddubq", { XM, EXq } },
4e7d34a6
L
6455 { "(bad)", { XX } },
6456 { "(bad)", { XX } },
f88c9eb0
SP
6457 { "phadduwd", { XM, EXq } },
6458 { "phadduwq", { XM, EXq } },
6459 /* 58 */
4e7d34a6
L
6460 { "(bad)", { XX } },
6461 { "(bad)", { XX } },
6462 { "(bad)", { XX } },
f88c9eb0 6463 { "phaddudq", { XM, EXq } },
4e7d34a6 6464 { "(bad)", { XX } },
c1e679ec
DR
6465 { "(bad)", { XX } },
6466 { "(bad)", { XX } },
6467 { "(bad)", { XX } },
f88c9eb0 6468 /* 60 */
c1e679ec 6469 { "(bad)", { XX } },
f88c9eb0
SP
6470 { "phsubbw", { XM, EXq } },
6471 { "phsubbd", { XM, EXq } },
6472 { "phsubbq", { XM, EXq } },
4e7d34a6
L
6473 { "(bad)", { XX } },
6474 { "(bad)", { XX } },
6475 { "(bad)", { XX } },
6476 { "(bad)", { XX } },
6477 /* 68 */
6478 { "(bad)", { XX } },
6479 { "(bad)", { XX } },
6480 { "(bad)", { XX } },
6481 { "(bad)", { XX } },
6482 { "(bad)", { XX } },
6483 { "(bad)", { XX } },
6484 { "(bad)", { XX } },
6485 { "(bad)", { XX } },
85f10a01 6486 /* 70 */
4e7d34a6
L
6487 { "(bad)", { XX } },
6488 { "(bad)", { XX } },
6489 { "(bad)", { XX } },
6490 { "(bad)", { XX } },
6491 { "(bad)", { XX } },
6492 { "(bad)", { XX } },
6493 { "(bad)", { XX } },
6494 { "(bad)", { XX } },
85f10a01 6495 /* 78 */
4e7d34a6
L
6496 { "(bad)", { XX } },
6497 { "(bad)", { XX } },
6498 { "(bad)", { XX } },
6499 { "(bad)", { XX } },
6500 { "(bad)", { XX } },
6501 { "(bad)", { XX } },
6502 { "(bad)", { XX } },
6503 { "(bad)", { XX } },
85f10a01 6504 /* 80 */
f88c9eb0
SP
6505 { "(bad)", { XX } },
6506 { "(bad)", { XX } },
4e7d34a6
L
6507 { "(bad)", { XX } },
6508 { "(bad)", { XX } },
6509 { "(bad)", { XX } },
c0f3af97
L
6510 { "(bad)", { XX } },
6511 { "(bad)", { XX } },
6512 { "(bad)", { XX } },
85f10a01 6513 /* 88 */
4e7d34a6
L
6514 { "(bad)", { XX } },
6515 { "(bad)", { XX } },
6516 { "(bad)", { XX } },
6517 { "(bad)", { XX } },
6518 { "(bad)", { XX } },
6519 { "(bad)", { XX } },
c0f3af97
L
6520 { "(bad)", { XX } },
6521 { "(bad)", { XX } },
85f10a01 6522 /* 90 */
4e7d34a6
L
6523 { "(bad)", { XX } },
6524 { "(bad)", { XX } },
6525 { "(bad)", { XX } },
6526 { "(bad)", { XX } },
6527 { "(bad)", { XX } },
c0f3af97
L
6528 { "(bad)", { XX } },
6529 { "(bad)", { XX } },
6530 { "(bad)", { XX } },
85f10a01 6531 /* 98 */
4e7d34a6
L
6532 { "(bad)", { XX } },
6533 { "(bad)", { XX } },
6534 { "(bad)", { XX } },
6535 { "(bad)", { XX } },
6536 { "(bad)", { XX } },
6537 { "(bad)", { XX } },
c0f3af97
L
6538 { "(bad)", { XX } },
6539 { "(bad)", { XX } },
85f10a01 6540 /* a0 */
4e7d34a6
L
6541 { "(bad)", { XX } },
6542 { "(bad)", { XX } },
6543 { "(bad)", { XX } },
6544 { "(bad)", { XX } },
6545 { "(bad)", { XX } },
6546 { "(bad)", { XX } },
c0f3af97 6547 { "(bad)", { XX } },
4e7d34a6 6548 { "(bad)", { XX } },
85f10a01 6549 /* a8 */
4e7d34a6
L
6550 { "(bad)", { XX } },
6551 { "(bad)", { XX } },
6552 { "(bad)", { XX } },
6553 { "(bad)", { XX } },
6554 { "(bad)", { XX } },
6555 { "(bad)", { XX } },
6556 { "(bad)", { XX } },
6557 { "(bad)", { XX } },
85f10a01 6558 /* b0 */
4e7d34a6
L
6559 { "(bad)", { XX } },
6560 { "(bad)", { XX } },
6561 { "(bad)", { XX } },
6562 { "(bad)", { XX } },
6563 { "(bad)", { XX } },
6564 { "(bad)", { XX } },
c0f3af97 6565 { "(bad)", { XX } },
4e7d34a6 6566 { "(bad)", { XX } },
85f10a01 6567 /* b8 */
4e7d34a6
L
6568 { "(bad)", { XX } },
6569 { "(bad)", { XX } },
6570 { "(bad)", { XX } },
6571 { "(bad)", { XX } },
6572 { "(bad)", { XX } },
6573 { "(bad)", { XX } },
6574 { "(bad)", { XX } },
6575 { "(bad)", { XX } },
85f10a01 6576 /* c0 */
4e7d34a6
L
6577 { "(bad)", { XX } },
6578 { "(bad)", { XX } },
6579 { "(bad)", { XX } },
6580 { "(bad)", { XX } },
6581 { "(bad)", { XX } },
6582 { "(bad)", { XX } },
6583 { "(bad)", { XX } },
6584 { "(bad)", { XX } },
85f10a01 6585 /* c8 */
4e7d34a6
L
6586 { "(bad)", { XX } },
6587 { "(bad)", { XX } },
6588 { "(bad)", { XX } },
6589 { "(bad)", { XX } },
6590 { "(bad)", { XX } },
6591 { "(bad)", { XX } },
6592 { "(bad)", { XX } },
6593 { "(bad)", { XX } },
85f10a01 6594 /* d0 */
4e7d34a6
L
6595 { "(bad)", { XX } },
6596 { "(bad)", { XX } },
6597 { "(bad)", { XX } },
6598 { "(bad)", { XX } },
6599 { "(bad)", { XX } },
6600 { "(bad)", { XX } },
6601 { "(bad)", { XX } },
6602 { "(bad)", { XX } },
85f10a01 6603 /* d8 */
4e7d34a6
L
6604 { "(bad)", { XX } },
6605 { "(bad)", { XX } },
6606 { "(bad)", { XX } },
f88c9eb0
SP
6607 { "(bad)", { XX } },
6608 { "(bad)", { XX } },
6609 { "(bad)", { XX } },
6610 { "(bad)", { XX } },
6611 { "(bad)", { XX } },
85f10a01 6612 /* e0 */
4e7d34a6
L
6613 { "(bad)", { XX } },
6614 { "(bad)", { XX } },
6615 { "(bad)", { XX } },
6616 { "(bad)", { XX } },
6617 { "(bad)", { XX } },
6618 { "(bad)", { XX } },
6619 { "(bad)", { XX } },
6620 { "(bad)", { XX } },
85f10a01 6621 /* e8 */
4e7d34a6
L
6622 { "(bad)", { XX } },
6623 { "(bad)", { XX } },
6624 { "(bad)", { XX } },
6625 { "(bad)", { XX } },
6626 { "(bad)", { XX } },
6627 { "(bad)", { XX } },
6628 { "(bad)", { XX } },
6629 { "(bad)", { XX } },
85f10a01 6630 /* f0 */
f88c9eb0
SP
6631 { "(bad)", { XX } },
6632 { "(bad)", { XX } },
4e7d34a6
L
6633 { "(bad)", { XX } },
6634 { "(bad)", { XX } },
6635 { "(bad)", { XX } },
6636 { "(bad)", { XX } },
6637 { "(bad)", { XX } },
6638 { "(bad)", { XX } },
85f10a01 6639 /* f8 */
4e7d34a6
L
6640 { "(bad)", { XX } },
6641 { "(bad)", { XX } },
6642 { "(bad)", { XX } },
6643 { "(bad)", { XX } },
6644 { "(bad)", { XX } },
6645 { "(bad)", { XX } },
6646 { "(bad)", { XX } },
6647 { "(bad)", { XX } },
85f10a01 6648 },
f88c9eb0
SP
6649};
6650
6651static const struct dis386 xop_table[][256] = {
5dd85c99 6652 /* XOP_08 */
85f10a01
MM
6653 {
6654 /* 00 */
4e7d34a6
L
6655 { "(bad)", { XX } },
6656 { "(bad)", { XX } },
6657 { "(bad)", { XX } },
6658 { "(bad)", { XX } },
6659 { "(bad)", { XX } },
6660 { "(bad)", { XX } },
6661 { "(bad)", { XX } },
6662 { "(bad)", { XX } },
85f10a01 6663 /* 08 */
f88c9eb0
SP
6664 { "(bad)", { XX } },
6665 { "(bad)", { XX } },
6666 { "(bad)", { XX } },
6667 { "(bad)", { XX } },
6668 { "(bad)", { XX } },
6669 { "(bad)", { XX } },
6670 { "(bad)", { XX } },
6671 { "(bad)", { XX } },
85f10a01 6672 /* 10 */
4e7d34a6
L
6673 { "(bad)", { XX } },
6674 { "(bad)", { XX } },
5dd85c99 6675 { "(bad)", { XX } },
f88c9eb0
SP
6676 { "(bad)", { XX } },
6677 { "(bad)", { XX } },
6678 { "(bad)", { XX } },
4e7d34a6
L
6679 { "(bad)", { XX } },
6680 { "(bad)", { XX } },
85f10a01 6681 /* 18 */
4e7d34a6
L
6682 { "(bad)", { XX } },
6683 { "(bad)", { XX } },
6684 { "(bad)", { XX } },
6685 { "(bad)", { XX } },
6686 { "(bad)", { XX } },
6687 { "(bad)", { XX } },
6688 { "(bad)", { XX } },
6689 { "(bad)", { XX } },
85f10a01 6690 /* 20 */
f88c9eb0
SP
6691 { "(bad)", { XX } },
6692 { "(bad)", { XX } },
6693 { "(bad)", { XX } },
4e7d34a6
L
6694 { "(bad)", { XX } },
6695 { "(bad)", { XX } },
6696 { "(bad)", { XX } },
6697 { "(bad)", { XX } },
6698 { "(bad)", { XX } },
85f10a01 6699 /* 28 */
4e7d34a6
L
6700 { "(bad)", { XX } },
6701 { "(bad)", { XX } },
6702 { "(bad)", { XX } },
6703 { "(bad)", { XX } },
4e7d34a6
L
6704 { "(bad)", { XX } },
6705 { "(bad)", { XX } },
6706 { "(bad)", { XX } },
6707 { "(bad)", { XX } },
c0f3af97 6708 /* 30 */
c1e679ec
DR
6709 { "(bad)", { XX } },
6710 { "(bad)", { XX } },
4e7d34a6 6711 { "(bad)", { XX } },
4e7d34a6
L
6712 { "(bad)", { XX } },
6713 { "(bad)", { XX } },
6714 { "(bad)", { XX } },
6715 { "(bad)", { XX } },
6716 { "(bad)", { XX } },
c0f3af97 6717 /* 38 */
4e7d34a6
L
6718 { "(bad)", { XX } },
6719 { "(bad)", { XX } },
6720 { "(bad)", { XX } },
4e7d34a6
L
6721 { "(bad)", { XX } },
6722 { "(bad)", { XX } },
6723 { "(bad)", { XX } },
6724 { "(bad)", { XX } },
6725 { "(bad)", { XX } },
c0f3af97 6726 /* 40 */
c1e679ec 6727 { "(bad)", { XX } },
f88c9eb0
SP
6728 { "(bad)", { XX } },
6729 { "(bad)", { XX } },
6730 { "(bad)", { XX } },
6731 { "(bad)", { XX } },
4e7d34a6
L
6732 { "(bad)", { XX } },
6733 { "(bad)", { XX } },
6734 { "(bad)", { XX } },
85f10a01 6735 /* 48 */
4e7d34a6
L
6736 { "(bad)", { XX } },
6737 { "(bad)", { XX } },
6738 { "(bad)", { XX } },
c1e679ec 6739 { "(bad)", { XX } },
4e7d34a6
L
6740 { "(bad)", { XX } },
6741 { "(bad)", { XX } },
6742 { "(bad)", { XX } },
6743 { "(bad)", { XX } },
c0f3af97 6744 /* 50 */
4e7d34a6
L
6745 { "(bad)", { XX } },
6746 { "(bad)", { XX } },
6747 { "(bad)", { XX } },
c1e679ec
DR
6748 { "(bad)", { XX } },
6749 { "(bad)", { XX } },
6750 { "(bad)", { XX } },
6751 { "(bad)", { XX } },
6752 { "(bad)", { XX } },
85f10a01 6753 /* 58 */
4e7d34a6
L
6754 { "(bad)", { XX } },
6755 { "(bad)", { XX } },
6756 { "(bad)", { XX } },
4e7d34a6
L
6757 { "(bad)", { XX } },
6758 { "(bad)", { XX } },
6759 { "(bad)", { XX } },
6760 { "(bad)", { XX } },
4e7d34a6 6761 { "(bad)", { XX } },
c1e679ec 6762 /* 60 */
f88c9eb0
SP
6763 { "(bad)", { XX } },
6764 { "(bad)", { XX } },
6765 { "(bad)", { XX } },
6766 { "(bad)", { XX } },
4e7d34a6
L
6767 { "(bad)", { XX } },
6768 { "(bad)", { XX } },
6769 { "(bad)", { XX } },
6770 { "(bad)", { XX } },
c0f3af97
L
6771 /* 68 */
6772 { "(bad)", { XX } },
4e7d34a6
L
6773 { "(bad)", { XX } },
6774 { "(bad)", { XX } },
6775 { "(bad)", { XX } },
4e7d34a6
L
6776 { "(bad)", { XX } },
6777 { "(bad)", { XX } },
6778 { "(bad)", { XX } },
6779 { "(bad)", { XX } },
85f10a01 6780 /* 70 */
4e7d34a6
L
6781 { "(bad)", { XX } },
6782 { "(bad)", { XX } },
6783 { "(bad)", { XX } },
6784 { "(bad)", { XX } },
6785 { "(bad)", { XX } },
6786 { "(bad)", { XX } },
6787 { "(bad)", { XX } },
6788 { "(bad)", { XX } },
85f10a01 6789 /* 78 */
4e7d34a6
L
6790 { "(bad)", { XX } },
6791 { "(bad)", { XX } },
6792 { "(bad)", { XX } },
6793 { "(bad)", { XX } },
6794 { "(bad)", { XX } },
6795 { "(bad)", { XX } },
6796 { "(bad)", { XX } },
6797 { "(bad)", { XX } },
85f10a01 6798 /* 80 */
4e7d34a6
L
6799 { "(bad)", { XX } },
6800 { "(bad)", { XX } },
6801 { "(bad)", { XX } },
6802 { "(bad)", { XX } },
6803 { "(bad)", { XX } },
5dd85c99
SP
6804 { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6805 { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6806 { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6807 /* 88 */
4e7d34a6
L
6808 { "(bad)", { XX } },
6809 { "(bad)", { XX } },
6810 { "(bad)", { XX } },
4e7d34a6
L
6811 { "(bad)", { XX } },
6812 { "(bad)", { XX } },
6813 { "(bad)", { XX } },
5dd85c99
SP
6814 { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6815 { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6816 /* 90 */
4e7d34a6
L
6817 { "(bad)", { XX } },
6818 { "(bad)", { XX } },
6819 { "(bad)", { XX } },
6820 { "(bad)", { XX } },
6821 { "(bad)", { XX } },
5dd85c99
SP
6822 { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6823 { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6824 { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6825 /* 98 */
4e7d34a6
L
6826 { "(bad)", { XX } },
6827 { "(bad)", { XX } },
6828 { "(bad)", { XX } },
6829 { "(bad)", { XX } },
6830 { "(bad)", { XX } },
6831 { "(bad)", { XX } },
5dd85c99
SP
6832 { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6833 { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6834 /* a0 */
f0ae4a24
SP
6835 { "(bad)", { XX } },
6836 { "(bad)", { XX } },
5dd85c99
SP
6837 { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6838 { "vpperm", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
4e7d34a6
L
6839 { "(bad)", { XX } },
6840 { "(bad)", { XX } },
5dd85c99 6841 { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
4e7d34a6 6842 { "(bad)", { XX } },
5dd85c99 6843 /* a8 */
4e7d34a6
L
6844 { "(bad)", { XX } },
6845 { "(bad)", { XX } },
6846 { "(bad)", { XX } },
6847 { "(bad)", { XX } },
6848 { "(bad)", { XX } },
6849 { "(bad)", { XX } },
6850 { "(bad)", { XX } },
4e7d34a6 6851 { "(bad)", { XX } },
5dd85c99 6852 /* b0 */
4e7d34a6
L
6853 { "(bad)", { XX } },
6854 { "(bad)", { XX } },
6855 { "(bad)", { XX } },
6856 { "(bad)", { XX } },
6857 { "(bad)", { XX } },
6858 { "(bad)", { XX } },
5dd85c99 6859 { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
4e7d34a6 6860 { "(bad)", { XX } },
5dd85c99 6861 /* b8 */
4e7d34a6
L
6862 { "(bad)", { XX } },
6863 { "(bad)", { XX } },
6864 { "(bad)", { XX } },
6865 { "(bad)", { XX } },
6866 { "(bad)", { XX } },
6867 { "(bad)", { XX } },
6868 { "(bad)", { XX } },
6869 { "(bad)", { XX } },
5dd85c99
SP
6870 /* c0 */
6871 { "vprotb", { XM, Vex_2src_1, Ib } },
6872 { "vprotw", { XM, Vex_2src_1, Ib } },
6873 { "vprotd", { XM, Vex_2src_1, Ib } },
6874 { "vprotq", { XM, Vex_2src_1, Ib } },
4e7d34a6
L
6875 { "(bad)", { XX } },
6876 { "(bad)", { XX } },
6877 { "(bad)", { XX } },
6878 { "(bad)", { XX } },
5dd85c99 6879 /* c8 */
4e7d34a6
L
6880 { "(bad)", { XX } },
6881 { "(bad)", { XX } },
6882 { "(bad)", { XX } },
6883 { "(bad)", { XX } },
5dd85c99
SP
6884 { "vpcomb", { XM, Vex128, EXx, Ib } },
6885 { "vpcomw", { XM, Vex128, EXx, Ib } },
6886 { "vpcomd", { XM, Vex128, EXx, Ib } },
6887 { "vpcomq", { XM, Vex128, EXx, Ib } },
6888 /* d0 */
4e7d34a6
L
6889 { "(bad)", { XX } },
6890 { "(bad)", { XX } },
6891 { "(bad)", { XX } },
6892 { "(bad)", { XX } },
6893 { "(bad)", { XX } },
6894 { "(bad)", { XX } },
6895 { "(bad)", { XX } },
6896 { "(bad)", { XX } },
5dd85c99 6897 /* d8 */
4e7d34a6
L
6898 { "(bad)", { XX } },
6899 { "(bad)", { XX } },
6900 { "(bad)", { XX } },
6901 { "(bad)", { XX } },
6902 { "(bad)", { XX } },
6903 { "(bad)", { XX } },
6904 { "(bad)", { XX } },
6905 { "(bad)", { XX } },
5dd85c99 6906 /* e0 */
4e7d34a6
L
6907 { "(bad)", { XX } },
6908 { "(bad)", { XX } },
6909 { "(bad)", { XX } },
6910 { "(bad)", { XX } },
6911 { "(bad)", { XX } },
6912 { "(bad)", { XX } },
6913 { "(bad)", { XX } },
6914 { "(bad)", { XX } },
5dd85c99 6915 /* e8 */
4e7d34a6
L
6916 { "(bad)", { XX } },
6917 { "(bad)", { XX } },
6918 { "(bad)", { XX } },
6919 { "(bad)", { XX } },
5dd85c99
SP
6920 { "vpcomub", { XM, Vex128, EXx, Ib } },
6921 { "vpcomuw", { XM, Vex128, EXx, Ib } },
6922 { "vpcomud", { XM, Vex128, EXx, Ib } },
6923 { "vpcomuq", { XM, Vex128, EXx, Ib } },
6924 /* f0 */
4e7d34a6
L
6925 { "(bad)", { XX } },
6926 { "(bad)", { XX } },
6927 { "(bad)", { XX } },
6928 { "(bad)", { XX } },
4e7d34a6
L
6929 { "(bad)", { XX } },
6930 { "(bad)", { XX } },
6931 { "(bad)", { XX } },
6932 { "(bad)", { XX } },
5dd85c99
SP
6933 /* f8 */
6934 { "(bad)", { XX } },
6935 { "(bad)", { XX } },
6936 { "(bad)", { XX } },
6937 { "(bad)", { XX } },
6938 { "(bad)", { XX } },
6939 { "(bad)", { XX } },
6940 { "(bad)", { XX } },
6941 { "(bad)", { XX } },
6942 },
6943 /* XOP_09 */
6944 {
6945 /* 00 */
6946 { "(bad)", { XX } },
6947 { "(bad)", { XX } },
6948 { "(bad)", { XX } },
6949 { "(bad)", { XX } },
6950 { "(bad)", { XX } },
6951 { "(bad)", { XX } },
6952 { "(bad)", { XX } },
6953 { "(bad)", { XX } },
6954 /* 08 */
6955 { "(bad)", { XX } },
6956 { "(bad)", { XX } },
6957 { "(bad)", { XX } },
6958 { "(bad)", { XX } },
6959 { "(bad)", { XX } },
6960 { "(bad)", { XX } },
6961 { "(bad)", { XX } },
6962 { "(bad)", { XX } },
6963 /* 10 */
6964 { "(bad)", { XX } },
6965 { "(bad)", { XX } },
6966 { REG_TABLE (REG_XOP_LWPCB) },
6967 { "(bad)", { XX } },
6968 { "(bad)", { XX } },
6969 { "(bad)", { XX } },
6970 { "(bad)", { XX } },
6971 { "(bad)", { XX } },
6972 /* 18 */
6973 { "(bad)", { XX } },
6974 { "(bad)", { XX } },
6975 { "(bad)", { XX } },
6976 { "(bad)", { XX } },
6977 { "(bad)", { XX } },
6978 { "(bad)", { XX } },
6979 { "(bad)", { XX } },
6980 { "(bad)", { XX } },
6981 /* 20 */
4e7d34a6
L
6982 { "(bad)", { XX } },
6983 { "(bad)", { XX } },
6984 { "(bad)", { XX } },
f88c9eb0 6985 { "(bad)", { XX } },
4e7d34a6
L
6986 { "(bad)", { XX } },
6987 { "(bad)", { XX } },
6988 { "(bad)", { XX } },
6989 { "(bad)", { XX } },
5dd85c99
SP
6990 /* 28 */
6991 { "(bad)", { XX } },
6992 { "(bad)", { XX } },
6993 { "(bad)", { XX } },
6994 { "(bad)", { XX } },
6995 { "(bad)", { XX } },
6996 { "(bad)", { XX } },
6997 { "(bad)", { XX } },
6998 { "(bad)", { XX } },
6999 /* 30 */
7000 { "(bad)", { XX } },
7001 { "(bad)", { XX } },
7002 { "(bad)", { XX } },
7003 { "(bad)", { XX } },
7004 { "(bad)", { XX } },
7005 { "(bad)", { XX } },
7006 { "(bad)", { XX } },
7007 { "(bad)", { XX } },
7008 /* 38 */
7009 { "(bad)", { XX } },
7010 { "(bad)", { XX } },
7011 { "(bad)", { XX } },
7012 { "(bad)", { XX } },
7013 { "(bad)", { XX } },
7014 { "(bad)", { XX } },
7015 { "(bad)", { XX } },
7016 { "(bad)", { XX } },
7017 /* 40 */
7018 { "(bad)", { XX } },
7019 { "(bad)", { XX } },
7020 { "(bad)", { XX } },
7021 { "(bad)", { XX } },
7022 { "(bad)", { XX } },
7023 { "(bad)", { XX } },
7024 { "(bad)", { XX } },
7025 { "(bad)", { XX } },
7026 /* 48 */
7027 { "(bad)", { XX } },
7028 { "(bad)", { XX } },
7029 { "(bad)", { XX } },
7030 { "(bad)", { XX } },
7031 { "(bad)", { XX } },
7032 { "(bad)", { XX } },
7033 { "(bad)", { XX } },
7034 { "(bad)", { XX } },
7035 /* 50 */
7036 { "(bad)", { XX } },
7037 { "(bad)", { XX } },
7038 { "(bad)", { XX } },
7039 { "(bad)", { XX } },
7040 { "(bad)", { XX } },
7041 { "(bad)", { XX } },
7042 { "(bad)", { XX } },
7043 { "(bad)", { XX } },
7044 /* 58 */
7045 { "(bad)", { XX } },
7046 { "(bad)", { XX } },
7047 { "(bad)", { XX } },
7048 { "(bad)", { XX } },
7049 { "(bad)", { XX } },
7050 { "(bad)", { XX } },
7051 { "(bad)", { XX } },
7052 { "(bad)", { XX } },
7053 /* 60 */
7054 { "(bad)", { XX } },
7055 { "(bad)", { XX } },
7056 { "(bad)", { XX } },
7057 { "(bad)", { XX } },
7058 { "(bad)", { XX } },
7059 { "(bad)", { XX } },
7060 { "(bad)", { XX } },
7061 { "(bad)", { XX } },
7062 /* 68 */
7063 { "(bad)", { XX } },
7064 { "(bad)", { XX } },
7065 { "(bad)", { XX } },
7066 { "(bad)", { XX } },
7067 { "(bad)", { XX } },
7068 { "(bad)", { XX } },
7069 { "(bad)", { XX } },
7070 { "(bad)", { XX } },
7071 /* 70 */
7072 { "(bad)", { XX } },
7073 { "(bad)", { XX } },
7074 { "(bad)", { XX } },
7075 { "(bad)", { XX } },
7076 { "(bad)", { XX } },
7077 { "(bad)", { XX } },
7078 { "(bad)", { XX } },
7079 { "(bad)", { XX } },
7080 /* 78 */
7081 { "(bad)", { XX } },
7082 { "(bad)", { XX } },
7083 { "(bad)", { XX } },
7084 { "(bad)", { XX } },
7085 { "(bad)", { XX } },
7086 { "(bad)", { XX } },
7087 { "(bad)", { XX } },
7088 { "(bad)", { XX } },
7089 /* 80 */
7090 { VEX_LEN_TABLE (VEX_LEN_XOP_09_80) },
7091 { VEX_LEN_TABLE (VEX_LEN_XOP_09_81) },
7092 { "vfrczss", { XM, EXd } },
7093 { "vfrczsd", { XM, EXq } },
7094 { "(bad)", { XX } },
7095 { "(bad)", { XX } },
7096 { "(bad)", { XX } },
7097 { "(bad)", { XX } },
7098 /* 88 */
7099 { "(bad)", { XX } },
7100 { "(bad)", { XX } },
7101 { "(bad)", { XX } },
7102 { "(bad)", { XX } },
7103 { "(bad)", { XX } },
7104 { "(bad)", { XX } },
7105 { "(bad)", { XX } },
7106 { "(bad)", { XX } },
7107 /* 90 */
7108 { "vprotb", { XM, Vex_2src_1, Vex_2src_2 } },
7109 { "vprotw", { XM, Vex_2src_1, Vex_2src_2 } },
7110 { "vprotd", { XM, Vex_2src_1, Vex_2src_2 } },
7111 { "vprotq", { XM, Vex_2src_1, Vex_2src_2 } },
7112 { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 } },
7113 { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 } },
7114 { "vpshld", { XM, Vex_2src_1, Vex_2src_2 } },
7115 { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 } },
7116 /* 98 */
7117 { "vpshab", { XM, Vex_2src_1, Vex_2src_2 } },
7118 { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 } },
7119 { "vpshad", { XM, Vex_2src_1, Vex_2src_2 } },
7120 { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 } },
7121 { "(bad)", { XX } },
7122 { "(bad)", { XX } },
7123 { "(bad)", { XX } },
7124 { "(bad)", { XX } },
7125 /* a0 */
7126 { "(bad)", { XX } },
7127 { "(bad)", { XX } },
7128 { "(bad)", { XX } },
7129 { "(bad)", { XX } },
7130 { "(bad)", { XX } },
7131 { "(bad)", { XX } },
7132 { "(bad)", { XX } },
7133 { "(bad)", { XX } },
7134 /* a8 */
7135 { "(bad)", { XX } },
7136 { "(bad)", { XX } },
7137 { "(bad)", { XX } },
7138 { "(bad)", { XX } },
7139 { "(bad)", { XX } },
7140 { "(bad)", { XX } },
7141 { "(bad)", { XX } },
7142 { "(bad)", { XX } },
7143 /* b0 */
7144 { "(bad)", { XX } },
7145 { "(bad)", { XX } },
7146 { "(bad)", { XX } },
7147 { "(bad)", { XX } },
7148 { "(bad)", { XX } },
7149 { "(bad)", { XX } },
7150 { "(bad)", { XX } },
7151 { "(bad)", { XX } },
7152 /* b8 */
7153 { "(bad)", { XX } },
7154 { "(bad)", { XX } },
7155 { "(bad)", { XX } },
7156 { "(bad)", { XX } },
7157 { "(bad)", { XX } },
7158 { "(bad)", { XX } },
7159 { "(bad)", { XX } },
7160 { "(bad)", { XX } },
7161 /* c0 */
7162 { "(bad)", { XX } },
7163 { "vphaddbw", { XM, EXxmm } },
7164 { "vphaddbd", { XM, EXxmm } },
7165 { "vphaddbq", { XM, EXxmm } },
7166 { "(bad)", { XX } },
7167 { "(bad)", { XX } },
7168 { "vphaddwd", { XM, EXxmm } },
7169 { "vphaddwq", { XM, EXxmm } },
7170 /* c8 */
7171 { "(bad)", { XX } },
7172 { "(bad)", { XX } },
7173 { "(bad)", { XX } },
7174 { "vphadddq", { XM, EXxmm } },
7175 { "(bad)", { XX } },
7176 { "(bad)", { XX } },
7177 { "(bad)", { XX } },
7178 { "(bad)", { XX } },
7179 /* d0 */
7180 { "(bad)", { XX } },
7181 { "vphaddubw", { XM, EXxmm } },
7182 { "vphaddubd", { XM, EXxmm } },
7183 { "vphaddubq", { XM, EXxmm } },
7184 { "(bad)", { XX } },
7185 { "(bad)", { XX } },
7186 { "vphadduwd", { XM, EXxmm } },
7187 { "vphadduwq", { XM, EXxmm } },
7188 /* d8 */
7189 { "(bad)", { XX } },
7190 { "(bad)", { XX } },
7191 { "(bad)", { XX } },
7192 { "vphaddudq", { XM, EXxmm } },
7193 { "(bad)", { XX } },
7194 { "(bad)", { XX } },
7195 { "(bad)", { XX } },
7196 { "(bad)", { XX } },
7197 /* e0 */
7198 { "(bad)", { XX } },
7199 { "vphsubbw", { XM, EXxmm } },
7200 { "vphsubwd", { XM, EXxmm } },
7201 { "vphsubdq", { XM, EXxmm } },
4e7d34a6
L
7202 { "(bad)", { XX } },
7203 { "(bad)", { XX } },
7204 { "(bad)", { XX } },
7205 { "(bad)", { XX } },
7206 /* e8 */
7207 { "(bad)", { XX } },
7208 { "(bad)", { XX } },
7209 { "(bad)", { XX } },
7210 { "(bad)", { XX } },
7211 { "(bad)", { XX } },
7212 { "(bad)", { XX } },
7213 { "(bad)", { XX } },
7214 { "(bad)", { XX } },
7215 /* f0 */
7216 { "(bad)", { XX } },
7217 { "(bad)", { XX } },
7218 { "(bad)", { XX } },
7219 { "(bad)", { XX } },
7220 { "(bad)", { XX } },
7221 { "(bad)", { XX } },
7222 { "(bad)", { XX } },
7223 { "(bad)", { XX } },
7224 /* f8 */
7225 { "(bad)", { XX } },
7226 { "(bad)", { XX } },
7227 { "(bad)", { XX } },
7228 { "(bad)", { XX } },
7229 { "(bad)", { XX } },
7230 { "(bad)", { XX } },
7231 { "(bad)", { XX } },
7232 { "(bad)", { XX } },
7233 },
f88c9eb0 7234 /* XOP_0A */
4e7d34a6
L
7235 {
7236 /* 00 */
c0f3af97
L
7237 { "(bad)", { XX } },
7238 { "(bad)", { XX } },
7239 { "(bad)", { XX } },
7240 { "(bad)", { XX } },
7241 { "(bad)", { XX } },
7242 { "(bad)", { XX } },
7243 { "(bad)", { XX } },
7244 { "(bad)", { XX } },
4e7d34a6 7245 /* 08 */
c0f3af97
L
7246 { "(bad)", { XX } },
7247 { "(bad)", { XX } },
7248 { "(bad)", { XX } },
7249 { "(bad)", { XX } },
d5d7db8e
L
7250 { "(bad)", { XX } },
7251 { "(bad)", { XX } },
7252 { "(bad)", { XX } },
7253 { "(bad)", { XX } },
4e7d34a6 7254 /* 10 */
d5d7db8e
L
7255 { "(bad)", { XX } },
7256 { "(bad)", { XX } },
f88c9eb0 7257 { REG_TABLE (REG_XOP_LWP) },
d5d7db8e 7258 { "(bad)", { XX } },
c0f3af97
L
7259 { "(bad)", { XX } },
7260 { "(bad)", { XX } },
7261 { "(bad)", { XX } },
7262 { "(bad)", { XX } },
4e7d34a6 7263 /* 18 */
d5d7db8e
L
7264 { "(bad)", { XX } },
7265 { "(bad)", { XX } },
7266 { "(bad)", { XX } },
7267 { "(bad)", { XX } },
c0f3af97
L
7268 { "(bad)", { XX } },
7269 { "(bad)", { XX } },
7270 { "(bad)", { XX } },
d5d7db8e 7271 { "(bad)", { XX } },
4e7d34a6 7272 /* 20 */
f88c9eb0 7273 { "(bad)", { XX } },
c0f3af97
L
7274 { "(bad)", { XX } },
7275 { "(bad)", { XX } },
7276 { "(bad)", { XX } },
7277 { "(bad)", { XX } },
7278 { "(bad)", { XX } },
d5d7db8e
L
7279 { "(bad)", { XX } },
7280 { "(bad)", { XX } },
4e7d34a6 7281 /* 28 */
c0f3af97
L
7282 { "(bad)", { XX } },
7283 { "(bad)", { XX } },
7284 { "(bad)", { XX } },
7285 { "(bad)", { XX } },
d5d7db8e
L
7286 { "(bad)", { XX } },
7287 { "(bad)", { XX } },
7288 { "(bad)", { XX } },
7289 { "(bad)", { XX } },
4e7d34a6 7290 /* 30 */
d5d7db8e 7291 { "(bad)", { XX } },
d5d7db8e
L
7292 { "(bad)", { XX } },
7293 { "(bad)", { XX } },
7294 { "(bad)", { XX } },
7295 { "(bad)", { XX } },
7296 { "(bad)", { XX } },
7297 { "(bad)", { XX } },
c0f3af97
L
7298 { "(bad)", { XX } },
7299 /* 38 */
7300 { "(bad)", { XX } },
7301 { "(bad)", { XX } },
7302 { "(bad)", { XX } },
7303 { "(bad)", { XX } },
d5d7db8e
L
7304 { "(bad)", { XX } },
7305 { "(bad)", { XX } },
7306 { "(bad)", { XX } },
7307 { "(bad)", { XX } },
c0f3af97 7308 /* 40 */
c1e679ec 7309 { "(bad)", { XX } },
d5d7db8e
L
7310 { "(bad)", { XX } },
7311 { "(bad)", { XX } },
f88c9eb0
SP
7312 { "(bad)", { XX } },
7313 { "(bad)", { XX } },
7314 { "(bad)", { XX } },
7315 { "(bad)", { XX } },
7316 { "(bad)", { XX } },
c1e679ec 7317 /* 48 */
d5d7db8e
L
7318 { "(bad)", { XX } },
7319 { "(bad)", { XX } },
d5d7db8e 7320 { "(bad)", { XX } },
f88c9eb0 7321 { "(bad)", { XX } },
d5d7db8e
L
7322 { "(bad)", { XX } },
7323 { "(bad)", { XX } },
7324 { "(bad)", { XX } },
7325 { "(bad)", { XX } },
c1e679ec 7326 /* 50 */
d5d7db8e
L
7327 { "(bad)", { XX } },
7328 { "(bad)", { XX } },
7329 { "(bad)", { XX } },
f88c9eb0
SP
7330 { "(bad)", { XX } },
7331 { "(bad)", { XX } },
7332 { "(bad)", { XX } },
7333 { "(bad)", { XX } },
7334 { "(bad)", { XX } },
4e7d34a6 7335 /* 58 */
d5d7db8e
L
7336 { "(bad)", { XX } },
7337 { "(bad)", { XX } },
7338 { "(bad)", { XX } },
f88c9eb0 7339 { "(bad)", { XX } },
d5d7db8e
L
7340 { "(bad)", { XX } },
7341 { "(bad)", { XX } },
7342 { "(bad)", { XX } },
7343 { "(bad)", { XX } },
4e7d34a6 7344 /* 60 */
d5d7db8e 7345 { "(bad)", { XX } },
f88c9eb0
SP
7346 { "(bad)", { XX } },
7347 { "(bad)", { XX } },
7348 { "(bad)", { XX } },
d5d7db8e
L
7349 { "(bad)", { XX } },
7350 { "(bad)", { XX } },
7351 { "(bad)", { XX } },
7352 { "(bad)", { XX } },
4e7d34a6 7353 /* 68 */
d5d7db8e
L
7354 { "(bad)", { XX } },
7355 { "(bad)", { XX } },
7356 { "(bad)", { XX } },
7357 { "(bad)", { XX } },
7358 { "(bad)", { XX } },
7359 { "(bad)", { XX } },
7360 { "(bad)", { XX } },
7361 { "(bad)", { XX } },
4e7d34a6 7362 /* 70 */
d5d7db8e
L
7363 { "(bad)", { XX } },
7364 { "(bad)", { XX } },
7365 { "(bad)", { XX } },
7366 { "(bad)", { XX } },
7367 { "(bad)", { XX } },
7368 { "(bad)", { XX } },
7369 { "(bad)", { XX } },
7370 { "(bad)", { XX } },
4e7d34a6 7371 /* 78 */
d5d7db8e
L
7372 { "(bad)", { XX } },
7373 { "(bad)", { XX } },
7374 { "(bad)", { XX } },
7375 { "(bad)", { XX } },
7376 { "(bad)", { XX } },
7377 { "(bad)", { XX } },
7378 { "(bad)", { XX } },
7379 { "(bad)", { XX } },
4e7d34a6 7380 /* 80 */
d5d7db8e
L
7381 { "(bad)", { XX } },
7382 { "(bad)", { XX } },
7383 { "(bad)", { XX } },
7384 { "(bad)", { XX } },
7385 { "(bad)", { XX } },
7386 { "(bad)", { XX } },
7387 { "(bad)", { XX } },
7388 { "(bad)", { XX } },
4e7d34a6 7389 /* 88 */
d5d7db8e
L
7390 { "(bad)", { XX } },
7391 { "(bad)", { XX } },
7392 { "(bad)", { XX } },
7393 { "(bad)", { XX } },
7394 { "(bad)", { XX } },
7395 { "(bad)", { XX } },
7396 { "(bad)", { XX } },
7397 { "(bad)", { XX } },
4e7d34a6 7398 /* 90 */
d5d7db8e
L
7399 { "(bad)", { XX } },
7400 { "(bad)", { XX } },
7401 { "(bad)", { XX } },
7402 { "(bad)", { XX } },
7403 { "(bad)", { XX } },
7404 { "(bad)", { XX } },
7405 { "(bad)", { XX } },
7406 { "(bad)", { XX } },
4e7d34a6 7407 /* 98 */
d5d7db8e
L
7408 { "(bad)", { XX } },
7409 { "(bad)", { XX } },
7410 { "(bad)", { XX } },
7411 { "(bad)", { XX } },
7412 { "(bad)", { XX } },
7413 { "(bad)", { XX } },
7414 { "(bad)", { XX } },
7415 { "(bad)", { XX } },
4e7d34a6 7416 /* a0 */
d5d7db8e
L
7417 { "(bad)", { XX } },
7418 { "(bad)", { XX } },
7419 { "(bad)", { XX } },
7420 { "(bad)", { XX } },
7421 { "(bad)", { XX } },
7422 { "(bad)", { XX } },
7423 { "(bad)", { XX } },
7424 { "(bad)", { XX } },
4e7d34a6 7425 /* a8 */
d5d7db8e
L
7426 { "(bad)", { XX } },
7427 { "(bad)", { XX } },
7428 { "(bad)", { XX } },
7429 { "(bad)", { XX } },
7430 { "(bad)", { XX } },
7431 { "(bad)", { XX } },
7432 { "(bad)", { XX } },
7433 { "(bad)", { XX } },
7434 /* b0 */
7435 { "(bad)", { XX } },
7436 { "(bad)", { XX } },
7437 { "(bad)", { XX } },
7438 { "(bad)", { XX } },
7439 { "(bad)", { XX } },
7440 { "(bad)", { XX } },
7441 { "(bad)", { XX } },
7442 { "(bad)", { XX } },
85f10a01 7443 /* b8 */
d5d7db8e
L
7444 { "(bad)", { XX } },
7445 { "(bad)", { XX } },
7446 { "(bad)", { XX } },
7447 { "(bad)", { XX } },
7448 { "(bad)", { XX } },
7449 { "(bad)", { XX } },
7450 { "(bad)", { XX } },
7451 { "(bad)", { XX } },
85f10a01 7452 /* c0 */
d5d7db8e
L
7453 { "(bad)", { XX } },
7454 { "(bad)", { XX } },
7455 { "(bad)", { XX } },
7456 { "(bad)", { XX } },
7457 { "(bad)", { XX } },
7458 { "(bad)", { XX } },
7459 { "(bad)", { XX } },
7460 { "(bad)", { XX } },
85f10a01 7461 /* c8 */
d5d7db8e
L
7462 { "(bad)", { XX } },
7463 { "(bad)", { XX } },
7464 { "(bad)", { XX } },
7465 { "(bad)", { XX } },
7466 { "(bad)", { XX } },
7467 { "(bad)", { XX } },
7468 { "(bad)", { XX } },
7469 { "(bad)", { XX } },
85f10a01 7470 /* d0 */
d5d7db8e
L
7471 { "(bad)", { XX } },
7472 { "(bad)", { XX } },
7473 { "(bad)", { XX } },
7474 { "(bad)", { XX } },
7475 { "(bad)", { XX } },
7476 { "(bad)", { XX } },
7477 { "(bad)", { XX } },
7478 { "(bad)", { XX } },
85f10a01 7479 /* d8 */
d5d7db8e
L
7480 { "(bad)", { XX } },
7481 { "(bad)", { XX } },
7482 { "(bad)", { XX } },
7483 { "(bad)", { XX } },
7484 { "(bad)", { XX } },
7485 { "(bad)", { XX } },
7486 { "(bad)", { XX } },
7487 { "(bad)", { XX } },
85f10a01 7488 /* e0 */
d5d7db8e
L
7489 { "(bad)", { XX } },
7490 { "(bad)", { XX } },
7491 { "(bad)", { XX } },
7492 { "(bad)", { XX } },
7493 { "(bad)", { XX } },
7494 { "(bad)", { XX } },
7495 { "(bad)", { XX } },
7496 { "(bad)", { XX } },
85f10a01 7497 /* e8 */
d5d7db8e
L
7498 { "(bad)", { XX } },
7499 { "(bad)", { XX } },
7500 { "(bad)", { XX } },
7501 { "(bad)", { XX } },
7502 { "(bad)", { XX } },
7503 { "(bad)", { XX } },
7504 { "(bad)", { XX } },
7505 { "(bad)", { XX } },
85f10a01 7506 /* f0 */
c0f3af97
L
7507 { "(bad)", { XX } },
7508 { "(bad)", { XX } },
d5d7db8e
L
7509 { "(bad)", { XX } },
7510 { "(bad)", { XX } },
7511 { "(bad)", { XX } },
7512 { "(bad)", { XX } },
7513 { "(bad)", { XX } },
7514 { "(bad)", { XX } },
85f10a01 7515 /* f8 */
d5d7db8e
L
7516 { "(bad)", { XX } },
7517 { "(bad)", { XX } },
7518 { "(bad)", { XX } },
7519 { "(bad)", { XX } },
7520 { "(bad)", { XX } },
7521 { "(bad)", { XX } },
7522 { "(bad)", { XX } },
7523 { "(bad)", { XX } },
85f10a01 7524 },
c0f3af97
L
7525};
7526
7527static const struct dis386 vex_table[][256] = {
7528 /* VEX_0F */
85f10a01
MM
7529 {
7530 /* 00 */
d5d7db8e
L
7531 { "(bad)", { XX } },
7532 { "(bad)", { XX } },
7533 { "(bad)", { XX } },
7534 { "(bad)", { XX } },
7535 { "(bad)", { XX } },
7536 { "(bad)", { XX } },
7537 { "(bad)", { XX } },
7538 { "(bad)", { XX } },
85f10a01 7539 /* 08 */
d5d7db8e
L
7540 { "(bad)", { XX } },
7541 { "(bad)", { XX } },
7542 { "(bad)", { XX } },
7543 { "(bad)", { XX } },
d5d7db8e
L
7544 { "(bad)", { XX } },
7545 { "(bad)", { XX } },
7546 { "(bad)", { XX } },
7547 { "(bad)", { XX } },
c0f3af97
L
7548 /* 10 */
7549 { PREFIX_TABLE (PREFIX_VEX_10) },
7550 { PREFIX_TABLE (PREFIX_VEX_11) },
7551 { PREFIX_TABLE (PREFIX_VEX_12) },
7552 { MOD_TABLE (MOD_VEX_13) },
9e30b8e0
L
7553 { VEX_W_TABLE (VEX_W_14) },
7554 { VEX_W_TABLE (VEX_W_15) },
c0f3af97
L
7555 { PREFIX_TABLE (PREFIX_VEX_16) },
7556 { MOD_TABLE (MOD_VEX_17) },
7557 /* 18 */
d5d7db8e
L
7558 { "(bad)", { XX } },
7559 { "(bad)", { XX } },
7560 { "(bad)", { XX } },
d5d7db8e
L
7561 { "(bad)", { XX } },
7562 { "(bad)", { XX } },
7563 { "(bad)", { XX } },
7564 { "(bad)", { XX } },
7565 { "(bad)", { XX } },
c0f3af97 7566 /* 20 */
d5d7db8e
L
7567 { "(bad)", { XX } },
7568 { "(bad)", { XX } },
7569 { "(bad)", { XX } },
7570 { "(bad)", { XX } },
7571 { "(bad)", { XX } },
7572 { "(bad)", { XX } },
7573 { "(bad)", { XX } },
7574 { "(bad)", { XX } },
c0f3af97 7575 /* 28 */
9e30b8e0
L
7576 { VEX_W_TABLE (VEX_W_28) },
7577 { VEX_W_TABLE (VEX_W_29) },
c0f3af97
L
7578 { PREFIX_TABLE (PREFIX_VEX_2A) },
7579 { MOD_TABLE (MOD_VEX_2B) },
7580 { PREFIX_TABLE (PREFIX_VEX_2C) },
7581 { PREFIX_TABLE (PREFIX_VEX_2D) },
7582 { PREFIX_TABLE (PREFIX_VEX_2E) },
7583 { PREFIX_TABLE (PREFIX_VEX_2F) },
85f10a01 7584 /* 30 */
d5d7db8e
L
7585 { "(bad)", { XX } },
7586 { "(bad)", { XX } },
7587 { "(bad)", { XX } },
7588 { "(bad)", { XX } },
7589 { "(bad)", { XX } },
7590 { "(bad)", { XX } },
7591 { "(bad)", { XX } },
7592 { "(bad)", { XX } },
4e7d34a6 7593 /* 38 */
d5d7db8e
L
7594 { "(bad)", { XX } },
7595 { "(bad)", { XX } },
7596 { "(bad)", { XX } },
7597 { "(bad)", { XX } },
7598 { "(bad)", { XX } },
7599 { "(bad)", { XX } },
7600 { "(bad)", { XX } },
7601 { "(bad)", { XX } },
7602 /* 40 */
c0f3af97
L
7603 { "(bad)", { XX } },
7604 { "(bad)", { XX } },
7605 { "(bad)", { XX } },
d5d7db8e
L
7606 { "(bad)", { XX } },
7607 { "(bad)", { XX } },
7608 { "(bad)", { XX } },
7609 { "(bad)", { XX } },
7610 { "(bad)", { XX } },
85f10a01 7611 /* 48 */
85f10a01
MM
7612 { "(bad)", { XX } },
7613 { "(bad)", { XX } },
7614 { "(bad)", { XX } },
7615 { "(bad)", { XX } },
7616 { "(bad)", { XX } },
7617 { "(bad)", { XX } },
7618 { "(bad)", { XX } },
7619 { "(bad)", { XX } },
d5d7db8e 7620 /* 50 */
976f1fde 7621 { MOD_TABLE (MOD_VEX_50) },
c0f3af97
L
7622 { PREFIX_TABLE (PREFIX_VEX_51) },
7623 { PREFIX_TABLE (PREFIX_VEX_52) },
7624 { PREFIX_TABLE (PREFIX_VEX_53) },
7625 { "vandpX", { XM, Vex, EXx } },
7626 { "vandnpX", { XM, Vex, EXx } },
7627 { "vorpX", { XM, Vex, EXx } },
7628 { "vxorpX", { XM, Vex, EXx } },
7629 /* 58 */
7630 { PREFIX_TABLE (PREFIX_VEX_58) },
7631 { PREFIX_TABLE (PREFIX_VEX_59) },
7632 { PREFIX_TABLE (PREFIX_VEX_5A) },
7633 { PREFIX_TABLE (PREFIX_VEX_5B) },
7634 { PREFIX_TABLE (PREFIX_VEX_5C) },
7635 { PREFIX_TABLE (PREFIX_VEX_5D) },
7636 { PREFIX_TABLE (PREFIX_VEX_5E) },
7637 { PREFIX_TABLE (PREFIX_VEX_5F) },
7638 /* 60 */
7639 { PREFIX_TABLE (PREFIX_VEX_60) },
7640 { PREFIX_TABLE (PREFIX_VEX_61) },
7641 { PREFIX_TABLE (PREFIX_VEX_62) },
7642 { PREFIX_TABLE (PREFIX_VEX_63) },
7643 { PREFIX_TABLE (PREFIX_VEX_64) },
7644 { PREFIX_TABLE (PREFIX_VEX_65) },
7645 { PREFIX_TABLE (PREFIX_VEX_66) },
7646 { PREFIX_TABLE (PREFIX_VEX_67) },
7647 /* 68 */
7648 { PREFIX_TABLE (PREFIX_VEX_68) },
7649 { PREFIX_TABLE (PREFIX_VEX_69) },
7650 { PREFIX_TABLE (PREFIX_VEX_6A) },
7651 { PREFIX_TABLE (PREFIX_VEX_6B) },
7652 { PREFIX_TABLE (PREFIX_VEX_6C) },
7653 { PREFIX_TABLE (PREFIX_VEX_6D) },
7654 { PREFIX_TABLE (PREFIX_VEX_6E) },
7655 { PREFIX_TABLE (PREFIX_VEX_6F) },
7656 /* 70 */
7657 { PREFIX_TABLE (PREFIX_VEX_70) },
7658 { REG_TABLE (REG_VEX_71) },
7659 { REG_TABLE (REG_VEX_72) },
7660 { REG_TABLE (REG_VEX_73) },
7661 { PREFIX_TABLE (PREFIX_VEX_74) },
7662 { PREFIX_TABLE (PREFIX_VEX_75) },
7663 { PREFIX_TABLE (PREFIX_VEX_76) },
7664 { PREFIX_TABLE (PREFIX_VEX_77) },
7665 /* 78 */
85f10a01
MM
7666 { "(bad)", { XX } },
7667 { "(bad)", { XX } },
7668 { "(bad)", { XX } },
7669 { "(bad)", { XX } },
c0f3af97
L
7670 { PREFIX_TABLE (PREFIX_VEX_7C) },
7671 { PREFIX_TABLE (PREFIX_VEX_7D) },
7672 { PREFIX_TABLE (PREFIX_VEX_7E) },
7673 { PREFIX_TABLE (PREFIX_VEX_7F) },
7674 /* 80 */
85f10a01
MM
7675 { "(bad)", { XX } },
7676 { "(bad)", { XX } },
7677 { "(bad)", { XX } },
7678 { "(bad)", { XX } },
85f10a01
MM
7679 { "(bad)", { XX } },
7680 { "(bad)", { XX } },
7681 { "(bad)", { XX } },
7682 { "(bad)", { XX } },
c0f3af97 7683 /* 88 */
85f10a01
MM
7684 { "(bad)", { XX } },
7685 { "(bad)", { XX } },
7686 { "(bad)", { XX } },
7687 { "(bad)", { XX } },
7688 { "(bad)", { XX } },
7689 { "(bad)", { XX } },
7690 { "(bad)", { XX } },
7691 { "(bad)", { XX } },
c0f3af97 7692 /* 90 */
85f10a01
MM
7693 { "(bad)", { XX } },
7694 { "(bad)", { XX } },
7695 { "(bad)", { XX } },
7696 { "(bad)", { XX } },
7697 { "(bad)", { XX } },
7698 { "(bad)", { XX } },
7699 { "(bad)", { XX } },
85f10a01 7700 { "(bad)", { XX } },
c0f3af97 7701 /* 98 */
85f10a01
MM
7702 { "(bad)", { XX } },
7703 { "(bad)", { XX } },
7704 { "(bad)", { XX } },
d5d7db8e
L
7705 { "(bad)", { XX } },
7706 { "(bad)", { XX } },
7707 { "(bad)", { XX } },
7708 { "(bad)", { XX } },
7709 { "(bad)", { XX } },
c0f3af97 7710 /* a0 */
d5d7db8e
L
7711 { "(bad)", { XX } },
7712 { "(bad)", { XX } },
7713 { "(bad)", { XX } },
7714 { "(bad)", { XX } },
7715 { "(bad)", { XX } },
7716 { "(bad)", { XX } },
7717 { "(bad)", { XX } },
7718 { "(bad)", { XX } },
c0f3af97 7719 /* a8 */
d5d7db8e
L
7720 { "(bad)", { XX } },
7721 { "(bad)", { XX } },
7722 { "(bad)", { XX } },
7723 { "(bad)", { XX } },
7724 { "(bad)", { XX } },
7725 { "(bad)", { XX } },
c0f3af97 7726 { REG_TABLE (REG_VEX_AE) },
d5d7db8e 7727 { "(bad)", { XX } },
c0f3af97 7728 /* b0 */
d5d7db8e 7729 { "(bad)", { XX } },
d5d7db8e
L
7730 { "(bad)", { XX } },
7731 { "(bad)", { XX } },
7732 { "(bad)", { XX } },
7733 { "(bad)", { XX } },
7734 { "(bad)", { XX } },
7735 { "(bad)", { XX } },
7736 { "(bad)", { XX } },
c0f3af97 7737 /* b8 */
d5d7db8e 7738 { "(bad)", { XX } },
d5d7db8e
L
7739 { "(bad)", { XX } },
7740 { "(bad)", { XX } },
7741 { "(bad)", { XX } },
7742 { "(bad)", { XX } },
7743 { "(bad)", { XX } },
7744 { "(bad)", { XX } },
7745 { "(bad)", { XX } },
c0f3af97 7746 /* c0 */
d5d7db8e 7747 { "(bad)", { XX } },
d5d7db8e 7748 { "(bad)", { XX } },
c0f3af97 7749 { PREFIX_TABLE (PREFIX_VEX_C2) },
d5d7db8e 7750 { "(bad)", { XX } },
c0f3af97
L
7751 { PREFIX_TABLE (PREFIX_VEX_C4) },
7752 { PREFIX_TABLE (PREFIX_VEX_C5) },
7753 { "vshufpX", { XM, Vex, EXx, Ib } },
d5d7db8e 7754 { "(bad)", { XX } },
c0f3af97 7755 /* c8 */
d5d7db8e
L
7756 { "(bad)", { XX } },
7757 { "(bad)", { XX } },
7758 { "(bad)", { XX } },
7759 { "(bad)", { XX } },
7760 { "(bad)", { XX } },
d5d7db8e
L
7761 { "(bad)", { XX } },
7762 { "(bad)", { XX } },
7763 { "(bad)", { XX } },
c0f3af97
L
7764 /* d0 */
7765 { PREFIX_TABLE (PREFIX_VEX_D0) },
7766 { PREFIX_TABLE (PREFIX_VEX_D1) },
7767 { PREFIX_TABLE (PREFIX_VEX_D2) },
7768 { PREFIX_TABLE (PREFIX_VEX_D3) },
7769 { PREFIX_TABLE (PREFIX_VEX_D4) },
7770 { PREFIX_TABLE (PREFIX_VEX_D5) },
7771 { PREFIX_TABLE (PREFIX_VEX_D6) },
7772 { PREFIX_TABLE (PREFIX_VEX_D7) },
7773 /* d8 */
7774 { PREFIX_TABLE (PREFIX_VEX_D8) },
7775 { PREFIX_TABLE (PREFIX_VEX_D9) },
7776 { PREFIX_TABLE (PREFIX_VEX_DA) },
7777 { PREFIX_TABLE (PREFIX_VEX_DB) },
7778 { PREFIX_TABLE (PREFIX_VEX_DC) },
7779 { PREFIX_TABLE (PREFIX_VEX_DD) },
7780 { PREFIX_TABLE (PREFIX_VEX_DE) },
7781 { PREFIX_TABLE (PREFIX_VEX_DF) },
7782 /* e0 */
7783 { PREFIX_TABLE (PREFIX_VEX_E0) },
7784 { PREFIX_TABLE (PREFIX_VEX_E1) },
7785 { PREFIX_TABLE (PREFIX_VEX_E2) },
7786 { PREFIX_TABLE (PREFIX_VEX_E3) },
7787 { PREFIX_TABLE (PREFIX_VEX_E4) },
7788 { PREFIX_TABLE (PREFIX_VEX_E5) },
7789 { PREFIX_TABLE (PREFIX_VEX_E6) },
7790 { PREFIX_TABLE (PREFIX_VEX_E7) },
7791 /* e8 */
7792 { PREFIX_TABLE (PREFIX_VEX_E8) },
7793 { PREFIX_TABLE (PREFIX_VEX_E9) },
7794 { PREFIX_TABLE (PREFIX_VEX_EA) },
7795 { PREFIX_TABLE (PREFIX_VEX_EB) },
7796 { PREFIX_TABLE (PREFIX_VEX_EC) },
7797 { PREFIX_TABLE (PREFIX_VEX_ED) },
7798 { PREFIX_TABLE (PREFIX_VEX_EE) },
7799 { PREFIX_TABLE (PREFIX_VEX_EF) },
7800 /* f0 */
7801 { PREFIX_TABLE (PREFIX_VEX_F0) },
7802 { PREFIX_TABLE (PREFIX_VEX_F1) },
7803 { PREFIX_TABLE (PREFIX_VEX_F2) },
7804 { PREFIX_TABLE (PREFIX_VEX_F3) },
7805 { PREFIX_TABLE (PREFIX_VEX_F4) },
7806 { PREFIX_TABLE (PREFIX_VEX_F5) },
7807 { PREFIX_TABLE (PREFIX_VEX_F6) },
7808 { PREFIX_TABLE (PREFIX_VEX_F7) },
7809 /* f8 */
7810 { PREFIX_TABLE (PREFIX_VEX_F8) },
7811 { PREFIX_TABLE (PREFIX_VEX_F9) },
7812 { PREFIX_TABLE (PREFIX_VEX_FA) },
7813 { PREFIX_TABLE (PREFIX_VEX_FB) },
7814 { PREFIX_TABLE (PREFIX_VEX_FC) },
7815 { PREFIX_TABLE (PREFIX_VEX_FD) },
7816 { PREFIX_TABLE (PREFIX_VEX_FE) },
d5d7db8e 7817 { "(bad)", { XX } },
c0f3af97
L
7818 },
7819 /* VEX_0F38 */
7820 {
7821 /* 00 */
7822 { PREFIX_TABLE (PREFIX_VEX_3800) },
7823 { PREFIX_TABLE (PREFIX_VEX_3801) },
7824 { PREFIX_TABLE (PREFIX_VEX_3802) },
7825 { PREFIX_TABLE (PREFIX_VEX_3803) },
7826 { PREFIX_TABLE (PREFIX_VEX_3804) },
7827 { PREFIX_TABLE (PREFIX_VEX_3805) },
7828 { PREFIX_TABLE (PREFIX_VEX_3806) },
7829 { PREFIX_TABLE (PREFIX_VEX_3807) },
7830 /* 08 */
7831 { PREFIX_TABLE (PREFIX_VEX_3808) },
7832 { PREFIX_TABLE (PREFIX_VEX_3809) },
7833 { PREFIX_TABLE (PREFIX_VEX_380A) },
7834 { PREFIX_TABLE (PREFIX_VEX_380B) },
7835 { PREFIX_TABLE (PREFIX_VEX_380C) },
7836 { PREFIX_TABLE (PREFIX_VEX_380D) },
7837 { PREFIX_TABLE (PREFIX_VEX_380E) },
7838 { PREFIX_TABLE (PREFIX_VEX_380F) },
7839 /* 10 */
d5d7db8e
L
7840 { "(bad)", { XX } },
7841 { "(bad)", { XX } },
7842 { "(bad)", { XX } },
7843 { "(bad)", { XX } },
d5d7db8e
L
7844 { "(bad)", { XX } },
7845 { "(bad)", { XX } },
7846 { "(bad)", { XX } },
c0f3af97
L
7847 { PREFIX_TABLE (PREFIX_VEX_3817) },
7848 /* 18 */
7849 { PREFIX_TABLE (PREFIX_VEX_3818) },
7850 { PREFIX_TABLE (PREFIX_VEX_3819) },
7851 { PREFIX_TABLE (PREFIX_VEX_381A) },
d5d7db8e 7852 { "(bad)", { XX } },
c0f3af97
L
7853 { PREFIX_TABLE (PREFIX_VEX_381C) },
7854 { PREFIX_TABLE (PREFIX_VEX_381D) },
7855 { PREFIX_TABLE (PREFIX_VEX_381E) },
d5d7db8e 7856 { "(bad)", { XX } },
c0f3af97
L
7857 /* 20 */
7858 { PREFIX_TABLE (PREFIX_VEX_3820) },
7859 { PREFIX_TABLE (PREFIX_VEX_3821) },
7860 { PREFIX_TABLE (PREFIX_VEX_3822) },
7861 { PREFIX_TABLE (PREFIX_VEX_3823) },
7862 { PREFIX_TABLE (PREFIX_VEX_3824) },
7863 { PREFIX_TABLE (PREFIX_VEX_3825) },
d5d7db8e
L
7864 { "(bad)", { XX } },
7865 { "(bad)", { XX } },
c0f3af97
L
7866 /* 28 */
7867 { PREFIX_TABLE (PREFIX_VEX_3828) },
7868 { PREFIX_TABLE (PREFIX_VEX_3829) },
7869 { PREFIX_TABLE (PREFIX_VEX_382A) },
7870 { PREFIX_TABLE (PREFIX_VEX_382B) },
7871 { PREFIX_TABLE (PREFIX_VEX_382C) },
7872 { PREFIX_TABLE (PREFIX_VEX_382D) },
7873 { PREFIX_TABLE (PREFIX_VEX_382E) },
7874 { PREFIX_TABLE (PREFIX_VEX_382F) },
7875 /* 30 */
7876 { PREFIX_TABLE (PREFIX_VEX_3830) },
7877 { PREFIX_TABLE (PREFIX_VEX_3831) },
7878 { PREFIX_TABLE (PREFIX_VEX_3832) },
7879 { PREFIX_TABLE (PREFIX_VEX_3833) },
7880 { PREFIX_TABLE (PREFIX_VEX_3834) },
7881 { PREFIX_TABLE (PREFIX_VEX_3835) },
7882 { "(bad)", { XX } },
7883 { PREFIX_TABLE (PREFIX_VEX_3837) },
7884 /* 38 */
7885 { PREFIX_TABLE (PREFIX_VEX_3838) },
7886 { PREFIX_TABLE (PREFIX_VEX_3839) },
7887 { PREFIX_TABLE (PREFIX_VEX_383A) },
7888 { PREFIX_TABLE (PREFIX_VEX_383B) },
7889 { PREFIX_TABLE (PREFIX_VEX_383C) },
7890 { PREFIX_TABLE (PREFIX_VEX_383D) },
7891 { PREFIX_TABLE (PREFIX_VEX_383E) },
7892 { PREFIX_TABLE (PREFIX_VEX_383F) },
7893 /* 40 */
7894 { PREFIX_TABLE (PREFIX_VEX_3840) },
7895 { PREFIX_TABLE (PREFIX_VEX_3841) },
d5d7db8e 7896 { "(bad)", { XX } },
d5d7db8e
L
7897 { "(bad)", { XX } },
7898 { "(bad)", { XX } },
7899 { "(bad)", { XX } },
7900 { "(bad)", { XX } },
7901 { "(bad)", { XX } },
c0f3af97 7902 /* 48 */
d5d7db8e
L
7903 { "(bad)", { XX } },
7904 { "(bad)", { XX } },
7905 { "(bad)", { XX } },
d5d7db8e
L
7906 { "(bad)", { XX } },
7907 { "(bad)", { XX } },
7908 { "(bad)", { XX } },
7909 { "(bad)", { XX } },
7910 { "(bad)", { XX } },
c0f3af97 7911 /* 50 */
d5d7db8e
L
7912 { "(bad)", { XX } },
7913 { "(bad)", { XX } },
7914 { "(bad)", { XX } },
d5d7db8e
L
7915 { "(bad)", { XX } },
7916 { "(bad)", { XX } },
7917 { "(bad)", { XX } },
7918 { "(bad)", { XX } },
7919 { "(bad)", { XX } },
c0f3af97 7920 /* 58 */
d5d7db8e
L
7921 { "(bad)", { XX } },
7922 { "(bad)", { XX } },
7923 { "(bad)", { XX } },
d5d7db8e
L
7924 { "(bad)", { XX } },
7925 { "(bad)", { XX } },
7926 { "(bad)", { XX } },
7927 { "(bad)", { XX } },
7928 { "(bad)", { XX } },
c0f3af97 7929 /* 60 */
d5d7db8e
L
7930 { "(bad)", { XX } },
7931 { "(bad)", { XX } },
7932 { "(bad)", { XX } },
d5d7db8e
L
7933 { "(bad)", { XX } },
7934 { "(bad)", { XX } },
7935 { "(bad)", { XX } },
7936 { "(bad)", { XX } },
7937 { "(bad)", { XX } },
c0f3af97 7938 /* 68 */
d5d7db8e
L
7939 { "(bad)", { XX } },
7940 { "(bad)", { XX } },
7941 { "(bad)", { XX } },
d5d7db8e
L
7942 { "(bad)", { XX } },
7943 { "(bad)", { XX } },
7944 { "(bad)", { XX } },
7945 { "(bad)", { XX } },
7946 { "(bad)", { XX } },
c0f3af97 7947 /* 70 */
d5d7db8e
L
7948 { "(bad)", { XX } },
7949 { "(bad)", { XX } },
7950 { "(bad)", { XX } },
d5d7db8e
L
7951 { "(bad)", { XX } },
7952 { "(bad)", { XX } },
7953 { "(bad)", { XX } },
7954 { "(bad)", { XX } },
7955 { "(bad)", { XX } },
c0f3af97 7956 /* 78 */
d5d7db8e
L
7957 { "(bad)", { XX } },
7958 { "(bad)", { XX } },
7959 { "(bad)", { XX } },
d5d7db8e
L
7960 { "(bad)", { XX } },
7961 { "(bad)", { XX } },
7962 { "(bad)", { XX } },
7963 { "(bad)", { XX } },
7964 { "(bad)", { XX } },
c0f3af97 7965 /* 80 */
d5d7db8e
L
7966 { "(bad)", { XX } },
7967 { "(bad)", { XX } },
7968 { "(bad)", { XX } },
d5d7db8e
L
7969 { "(bad)", { XX } },
7970 { "(bad)", { XX } },
7971 { "(bad)", { XX } },
7972 { "(bad)", { XX } },
7973 { "(bad)", { XX } },
c0f3af97 7974 /* 88 */
d5d7db8e
L
7975 { "(bad)", { XX } },
7976 { "(bad)", { XX } },
7977 { "(bad)", { XX } },
d5d7db8e
L
7978 { "(bad)", { XX } },
7979 { "(bad)", { XX } },
7980 { "(bad)", { XX } },
7981 { "(bad)", { XX } },
7982 { "(bad)", { XX } },
c0f3af97 7983 /* 90 */
d5d7db8e
L
7984 { "(bad)", { XX } },
7985 { "(bad)", { XX } },
7986 { "(bad)", { XX } },
d5d7db8e
L
7987 { "(bad)", { XX } },
7988 { "(bad)", { XX } },
7989 { "(bad)", { XX } },
0bfee649
L
7990 { PREFIX_TABLE (PREFIX_VEX_3896) },
7991 { PREFIX_TABLE (PREFIX_VEX_3897) },
c0f3af97 7992 /* 98 */
0bfee649
L
7993 { PREFIX_TABLE (PREFIX_VEX_3898) },
7994 { PREFIX_TABLE (PREFIX_VEX_3899) },
7995 { PREFIX_TABLE (PREFIX_VEX_389A) },
7996 { PREFIX_TABLE (PREFIX_VEX_389B) },
7997 { PREFIX_TABLE (PREFIX_VEX_389C) },
7998 { PREFIX_TABLE (PREFIX_VEX_389D) },
7999 { PREFIX_TABLE (PREFIX_VEX_389E) },
8000 { PREFIX_TABLE (PREFIX_VEX_389F) },
c0f3af97 8001 /* a0 */
d5d7db8e
L
8002 { "(bad)", { XX } },
8003 { "(bad)", { XX } },
8004 { "(bad)", { XX } },
d5d7db8e
L
8005 { "(bad)", { XX } },
8006 { "(bad)", { XX } },
8007 { "(bad)", { XX } },
0bfee649
L
8008 { PREFIX_TABLE (PREFIX_VEX_38A6) },
8009 { PREFIX_TABLE (PREFIX_VEX_38A7) },
c0f3af97 8010 /* a8 */
0bfee649
L
8011 { PREFIX_TABLE (PREFIX_VEX_38A8) },
8012 { PREFIX_TABLE (PREFIX_VEX_38A9) },
8013 { PREFIX_TABLE (PREFIX_VEX_38AA) },
8014 { PREFIX_TABLE (PREFIX_VEX_38AB) },
8015 { PREFIX_TABLE (PREFIX_VEX_38AC) },
8016 { PREFIX_TABLE (PREFIX_VEX_38AD) },
8017 { PREFIX_TABLE (PREFIX_VEX_38AE) },
8018 { PREFIX_TABLE (PREFIX_VEX_38AF) },
c0f3af97 8019 /* b0 */
d5d7db8e
L
8020 { "(bad)", { XX } },
8021 { "(bad)", { XX } },
8022 { "(bad)", { XX } },
8023 { "(bad)", { XX } },
8024 { "(bad)", { XX } },
8025 { "(bad)", { XX } },
0bfee649
L
8026 { PREFIX_TABLE (PREFIX_VEX_38B6) },
8027 { PREFIX_TABLE (PREFIX_VEX_38B7) },
c0f3af97 8028 /* b8 */
0bfee649
L
8029 { PREFIX_TABLE (PREFIX_VEX_38B8) },
8030 { PREFIX_TABLE (PREFIX_VEX_38B9) },
8031 { PREFIX_TABLE (PREFIX_VEX_38BA) },
8032 { PREFIX_TABLE (PREFIX_VEX_38BB) },
8033 { PREFIX_TABLE (PREFIX_VEX_38BC) },
8034 { PREFIX_TABLE (PREFIX_VEX_38BD) },
8035 { PREFIX_TABLE (PREFIX_VEX_38BE) },
8036 { PREFIX_TABLE (PREFIX_VEX_38BF) },
c0f3af97 8037 /* c0 */
d5d7db8e
L
8038 { "(bad)", { XX } },
8039 { "(bad)", { XX } },
8040 { "(bad)", { XX } },
8041 { "(bad)", { XX } },
d5d7db8e
L
8042 { "(bad)", { XX } },
8043 { "(bad)", { XX } },
8044 { "(bad)", { XX } },
8045 { "(bad)", { XX } },
c0f3af97 8046 /* c8 */
d5d7db8e
L
8047 { "(bad)", { XX } },
8048 { "(bad)", { XX } },
8049 { "(bad)", { XX } },
8050 { "(bad)", { XX } },
d5d7db8e 8051 { "(bad)", { XX } },
d5d7db8e
L
8052 { "(bad)", { XX } },
8053 { "(bad)", { XX } },
d5d7db8e 8054 { "(bad)", { XX } },
c0f3af97 8055 /* d0 */
d5d7db8e
L
8056 { "(bad)", { XX } },
8057 { "(bad)", { XX } },
d5d7db8e
L
8058 { "(bad)", { XX } },
8059 { "(bad)", { XX } },
8060 { "(bad)", { XX } },
8061 { "(bad)", { XX } },
d5d7db8e 8062 { "(bad)", { XX } },
d5d7db8e 8063 { "(bad)", { XX } },
c0f3af97 8064 /* d8 */
d5d7db8e 8065 { "(bad)", { XX } },
d5d7db8e
L
8066 { "(bad)", { XX } },
8067 { "(bad)", { XX } },
a5ff0eb2
L
8068 { PREFIX_TABLE (PREFIX_VEX_38DB) },
8069 { PREFIX_TABLE (PREFIX_VEX_38DC) },
8070 { PREFIX_TABLE (PREFIX_VEX_38DD) },
8071 { PREFIX_TABLE (PREFIX_VEX_38DE) },
8072 { PREFIX_TABLE (PREFIX_VEX_38DF) },
c0f3af97 8073 /* e0 */
d5d7db8e 8074 { "(bad)", { XX } },
d5d7db8e
L
8075 { "(bad)", { XX } },
8076 { "(bad)", { XX } },
8077 { "(bad)", { XX } },
8078 { "(bad)", { XX } },
d5d7db8e
L
8079 { "(bad)", { XX } },
8080 { "(bad)", { XX } },
8081 { "(bad)", { XX } },
c0f3af97 8082 /* e8 */
d5d7db8e
L
8083 { "(bad)", { XX } },
8084 { "(bad)", { XX } },
8085 { "(bad)", { XX } },
8086 { "(bad)", { XX } },
8087 { "(bad)", { XX } },
d5d7db8e
L
8088 { "(bad)", { XX } },
8089 { "(bad)", { XX } },
8090 { "(bad)", { XX } },
c0f3af97 8091 /* f0 */
d5d7db8e
L
8092 { "(bad)", { XX } },
8093 { "(bad)", { XX } },
8094 { "(bad)", { XX } },
8095 { "(bad)", { XX } },
8096 { "(bad)", { XX } },
d5d7db8e
L
8097 { "(bad)", { XX } },
8098 { "(bad)", { XX } },
8099 { "(bad)", { XX } },
c0f3af97 8100 /* f8 */
d5d7db8e
L
8101 { "(bad)", { XX } },
8102 { "(bad)", { XX } },
8103 { "(bad)", { XX } },
8104 { "(bad)", { XX } },
8105 { "(bad)", { XX } },
d5d7db8e
L
8106 { "(bad)", { XX } },
8107 { "(bad)", { XX } },
8108 { "(bad)", { XX } },
c0f3af97
L
8109 },
8110 /* VEX_0F3A */
8111 {
8112 /* 00 */
d5d7db8e
L
8113 { "(bad)", { XX } },
8114 { "(bad)", { XX } },
8115 { "(bad)", { XX } },
8116 { "(bad)", { XX } },
c0f3af97
L
8117 { PREFIX_TABLE (PREFIX_VEX_3A04) },
8118 { PREFIX_TABLE (PREFIX_VEX_3A05) },
8119 { PREFIX_TABLE (PREFIX_VEX_3A06) },
d5d7db8e 8120 { "(bad)", { XX } },
c0f3af97
L
8121 /* 08 */
8122 { PREFIX_TABLE (PREFIX_VEX_3A08) },
8123 { PREFIX_TABLE (PREFIX_VEX_3A09) },
8124 { PREFIX_TABLE (PREFIX_VEX_3A0A) },
8125 { PREFIX_TABLE (PREFIX_VEX_3A0B) },
8126 { PREFIX_TABLE (PREFIX_VEX_3A0C) },
8127 { PREFIX_TABLE (PREFIX_VEX_3A0D) },
8128 { PREFIX_TABLE (PREFIX_VEX_3A0E) },
8129 { PREFIX_TABLE (PREFIX_VEX_3A0F) },
8130 /* 10 */
d5d7db8e
L
8131 { "(bad)", { XX } },
8132 { "(bad)", { XX } },
8133 { "(bad)", { XX } },
8134 { "(bad)", { XX } },
c0f3af97
L
8135 { PREFIX_TABLE (PREFIX_VEX_3A14) },
8136 { PREFIX_TABLE (PREFIX_VEX_3A15) },
8137 { PREFIX_TABLE (PREFIX_VEX_3A16) },
8138 { PREFIX_TABLE (PREFIX_VEX_3A17) },
8139 /* 18 */
8140 { PREFIX_TABLE (PREFIX_VEX_3A18) },
8141 { PREFIX_TABLE (PREFIX_VEX_3A19) },
d5d7db8e
L
8142 { "(bad)", { XX } },
8143 { "(bad)", { XX } },
8144 { "(bad)", { XX } },
8145 { "(bad)", { XX } },
d5d7db8e
L
8146 { "(bad)", { XX } },
8147 { "(bad)", { XX } },
c0f3af97
L
8148 /* 20 */
8149 { PREFIX_TABLE (PREFIX_VEX_3A20) },
8150 { PREFIX_TABLE (PREFIX_VEX_3A21) },
8151 { PREFIX_TABLE (PREFIX_VEX_3A22) },
d5d7db8e
L
8152 { "(bad)", { XX } },
8153 { "(bad)", { XX } },
8154 { "(bad)", { XX } },
8155 { "(bad)", { XX } },
8156 { "(bad)", { XX } },
c0f3af97 8157 /* 28 */
d5d7db8e 8158 { "(bad)", { XX } },
d5d7db8e
L
8159 { "(bad)", { XX } },
8160 { "(bad)", { XX } },
8161 { "(bad)", { XX } },
8162 { "(bad)", { XX } },
8163 { "(bad)", { XX } },
8164 { "(bad)", { XX } },
8165 { "(bad)", { XX } },
c0f3af97 8166 /* 30 */
d5d7db8e 8167 { "(bad)", { XX } },
d5d7db8e
L
8168 { "(bad)", { XX } },
8169 { "(bad)", { XX } },
8170 { "(bad)", { XX } },
8171 { "(bad)", { XX } },
8172 { "(bad)", { XX } },
8173 { "(bad)", { XX } },
8174 { "(bad)", { XX } },
c0f3af97 8175 /* 38 */
d5d7db8e 8176 { "(bad)", { XX } },
d5d7db8e
L
8177 { "(bad)", { XX } },
8178 { "(bad)", { XX } },
8179 { "(bad)", { XX } },
8180 { "(bad)", { XX } },
8181 { "(bad)", { XX } },
8182 { "(bad)", { XX } },
8183 { "(bad)", { XX } },
c0f3af97
L
8184 /* 40 */
8185 { PREFIX_TABLE (PREFIX_VEX_3A40) },
8186 { PREFIX_TABLE (PREFIX_VEX_3A41) },
8187 { PREFIX_TABLE (PREFIX_VEX_3A42) },
d5d7db8e 8188 { "(bad)", { XX } },
ce2f5b3c 8189 { PREFIX_TABLE (PREFIX_VEX_3A44) },
d5d7db8e
L
8190 { "(bad)", { XX } },
8191 { "(bad)", { XX } },
8192 { "(bad)", { XX } },
c0f3af97 8193 /* 48 */
0bfee649
L
8194 { "(bad)", { XX } },
8195 { "(bad)", { XX } },
c0f3af97
L
8196 { PREFIX_TABLE (PREFIX_VEX_3A4A) },
8197 { PREFIX_TABLE (PREFIX_VEX_3A4B) },
8198 { PREFIX_TABLE (PREFIX_VEX_3A4C) },
d5d7db8e
L
8199 { "(bad)", { XX } },
8200 { "(bad)", { XX } },
8201 { "(bad)", { XX } },
c0f3af97 8202 /* 50 */
d5d7db8e 8203 { "(bad)", { XX } },
d5d7db8e
L
8204 { "(bad)", { XX } },
8205 { "(bad)", { XX } },
8206 { "(bad)", { XX } },
8207 { "(bad)", { XX } },
8208 { "(bad)", { XX } },
8209 { "(bad)", { XX } },
8210 { "(bad)", { XX } },
c0f3af97 8211 /* 58 */
d5d7db8e 8212 { "(bad)", { XX } },
d5d7db8e
L
8213 { "(bad)", { XX } },
8214 { "(bad)", { XX } },
8215 { "(bad)", { XX } },
922d8de8
DR
8216 { PREFIX_TABLE (PREFIX_VEX_3A5C) },
8217 { PREFIX_TABLE (PREFIX_VEX_3A5D) },
8218 { PREFIX_TABLE (PREFIX_VEX_3A5E) },
8219 { PREFIX_TABLE (PREFIX_VEX_3A5F) },
c0f3af97
L
8220 /* 60 */
8221 { PREFIX_TABLE (PREFIX_VEX_3A60) },
8222 { PREFIX_TABLE (PREFIX_VEX_3A61) },
8223 { PREFIX_TABLE (PREFIX_VEX_3A62) },
8224 { PREFIX_TABLE (PREFIX_VEX_3A63) },
d5d7db8e
L
8225 { "(bad)", { XX } },
8226 { "(bad)", { XX } },
8227 { "(bad)", { XX } },
8228 { "(bad)", { XX } },
c0f3af97 8229 /* 68 */
922d8de8
DR
8230 { PREFIX_TABLE (PREFIX_VEX_3A68) },
8231 { PREFIX_TABLE (PREFIX_VEX_3A69) },
8232 { PREFIX_TABLE (PREFIX_VEX_3A6A) },
8233 { PREFIX_TABLE (PREFIX_VEX_3A6B) },
8234 { PREFIX_TABLE (PREFIX_VEX_3A6C) },
8235 { PREFIX_TABLE (PREFIX_VEX_3A6D) },
8236 { PREFIX_TABLE (PREFIX_VEX_3A6E) },
8237 { PREFIX_TABLE (PREFIX_VEX_3A6F) },
c0f3af97 8238 /* 70 */
d5d7db8e 8239 { "(bad)", { XX } },
d5d7db8e
L
8240 { "(bad)", { XX } },
8241 { "(bad)", { XX } },
8242 { "(bad)", { XX } },
8243 { "(bad)", { XX } },
8244 { "(bad)", { XX } },
8245 { "(bad)", { XX } },
8246 { "(bad)", { XX } },
c0f3af97 8247 /* 78 */
922d8de8
DR
8248 { PREFIX_TABLE (PREFIX_VEX_3A78) },
8249 { PREFIX_TABLE (PREFIX_VEX_3A79) },
8250 { PREFIX_TABLE (PREFIX_VEX_3A7A) },
8251 { PREFIX_TABLE (PREFIX_VEX_3A7B) },
8252 { PREFIX_TABLE (PREFIX_VEX_3A7C) },
8253 { PREFIX_TABLE (PREFIX_VEX_3A7D) },
8254 { PREFIX_TABLE (PREFIX_VEX_3A7E) },
8255 { PREFIX_TABLE (PREFIX_VEX_3A7F) },
c0f3af97 8256 /* 80 */
d5d7db8e 8257 { "(bad)", { XX } },
d5d7db8e
L
8258 { "(bad)", { XX } },
8259 { "(bad)", { XX } },
8260 { "(bad)", { XX } },
8261 { "(bad)", { XX } },
8262 { "(bad)", { XX } },
8263 { "(bad)", { XX } },
8264 { "(bad)", { XX } },
c0f3af97 8265 /* 88 */
d5d7db8e 8266 { "(bad)", { XX } },
d5d7db8e
L
8267 { "(bad)", { XX } },
8268 { "(bad)", { XX } },
8269 { "(bad)", { XX } },
8270 { "(bad)", { XX } },
8271 { "(bad)", { XX } },
8272 { "(bad)", { XX } },
8273 { "(bad)", { XX } },
c0f3af97 8274 /* 90 */
d5d7db8e 8275 { "(bad)", { XX } },
d5d7db8e
L
8276 { "(bad)", { XX } },
8277 { "(bad)", { XX } },
8278 { "(bad)", { XX } },
8279 { "(bad)", { XX } },
8280 { "(bad)", { XX } },
8281 { "(bad)", { XX } },
8282 { "(bad)", { XX } },
c0f3af97 8283 /* 98 */
d5d7db8e 8284 { "(bad)", { XX } },
d5d7db8e
L
8285 { "(bad)", { XX } },
8286 { "(bad)", { XX } },
8287 { "(bad)", { XX } },
8288 { "(bad)", { XX } },
8289 { "(bad)", { XX } },
8290 { "(bad)", { XX } },
8291 { "(bad)", { XX } },
c0f3af97 8292 /* a0 */
d5d7db8e 8293 { "(bad)", { XX } },
85f10a01
MM
8294 { "(bad)", { XX } },
8295 { "(bad)", { XX } },
d5d7db8e
L
8296 { "(bad)", { XX } },
8297 { "(bad)", { XX } },
8298 { "(bad)", { XX } },
8299 { "(bad)", { XX } },
8300 { "(bad)", { XX } },
c0f3af97 8301 /* a8 */
d5d7db8e 8302 { "(bad)", { XX } },
d5d7db8e
L
8303 { "(bad)", { XX } },
8304 { "(bad)", { XX } },
8305 { "(bad)", { XX } },
8306 { "(bad)", { XX } },
8307 { "(bad)", { XX } },
8308 { "(bad)", { XX } },
8309 { "(bad)", { XX } },
c0f3af97
L
8310 /* b0 */
8311 { "(bad)", { XX } },
8312 { "(bad)", { XX } },
8313 { "(bad)", { XX } },
8314 { "(bad)", { XX } },
8315 { "(bad)", { XX } },
8316 { "(bad)", { XX } },
8317 { "(bad)", { XX } },
8318 { "(bad)", { XX } },
8319 /* b8 */
8320 { "(bad)", { XX } },
8321 { "(bad)", { XX } },
8322 { "(bad)", { XX } },
8323 { "(bad)", { XX } },
8324 { "(bad)", { XX } },
8325 { "(bad)", { XX } },
8326 { "(bad)", { XX } },
8327 { "(bad)", { XX } },
8328 /* c0 */
8329 { "(bad)", { XX } },
8330 { "(bad)", { XX } },
8331 { "(bad)", { XX } },
8332 { "(bad)", { XX } },
8333 { "(bad)", { XX } },
8334 { "(bad)", { XX } },
8335 { "(bad)", { XX } },
8336 { "(bad)", { XX } },
8337 /* c8 */
8338 { "(bad)", { XX } },
8339 { "(bad)", { XX } },
d5d7db8e 8340 { "(bad)", { XX } },
d5d7db8e
L
8341 { "(bad)", { XX } },
8342 { "(bad)", { XX } },
8343 { "(bad)", { XX } },
8344 { "(bad)", { XX } },
8345 { "(bad)", { XX } },
c0f3af97
L
8346 /* d0 */
8347 { "(bad)", { XX } },
8348 { "(bad)", { XX } },
8349 { "(bad)", { XX } },
d5d7db8e
L
8350 { "(bad)", { XX } },
8351 { "(bad)", { XX } },
8352 { "(bad)", { XX } },
c0f3af97
L
8353 { "(bad)", { XX } },
8354 { "(bad)", { XX } },
8355 /* d8 */
8356 { "(bad)", { XX } },
d5d7db8e
L
8357 { "(bad)", { XX } },
8358 { "(bad)", { XX } },
8359 { "(bad)", { XX } },
8360 { "(bad)", { XX } },
8361 { "(bad)", { XX } },
8362 { "(bad)", { XX } },
a5ff0eb2 8363 { PREFIX_TABLE (PREFIX_VEX_3ADF) },
c0f3af97 8364 /* e0 */
d5d7db8e 8365 { "(bad)", { XX } },
d5d7db8e
L
8366 { "(bad)", { XX } },
8367 { "(bad)", { XX } },
8368 { "(bad)", { XX } },
8369 { "(bad)", { XX } },
8370 { "(bad)", { XX } },
8371 { "(bad)", { XX } },
8372 { "(bad)", { XX } },
c0f3af97 8373 /* e8 */
d5d7db8e 8374 { "(bad)", { XX } },
d5d7db8e
L
8375 { "(bad)", { XX } },
8376 { "(bad)", { XX } },
8377 { "(bad)", { XX } },
8378 { "(bad)", { XX } },
8379 { "(bad)", { XX } },
8380 { "(bad)", { XX } },
8381 { "(bad)", { XX } },
c0f3af97 8382 /* f0 */
d5d7db8e 8383 { "(bad)", { XX } },
d5d7db8e
L
8384 { "(bad)", { XX } },
8385 { "(bad)", { XX } },
8386 { "(bad)", { XX } },
8387 { "(bad)", { XX } },
8388 { "(bad)", { XX } },
8389 { "(bad)", { XX } },
8390 { "(bad)", { XX } },
c0f3af97 8391 /* f8 */
d5d7db8e 8392 { "(bad)", { XX } },
d5d7db8e
L
8393 { "(bad)", { XX } },
8394 { "(bad)", { XX } },
8395 { "(bad)", { XX } },
8396 { "(bad)", { XX } },
8397 { "(bad)", { XX } },
8398 { "(bad)", { XX } },
8399 { "(bad)", { XX } },
c0f3af97
L
8400 },
8401};
8402
8403static const struct dis386 vex_len_table[][2] = {
8404 /* VEX_LEN_10_P_1 */
8405 {
9e30b8e0 8406 { VEX_W_TABLE (VEX_W_10_P_1) },
d5d7db8e 8407 { "(bad)", { XX } },
c0f3af97
L
8408 },
8409
8410 /* VEX_LEN_10_P_3 */
8411 {
9e30b8e0 8412 { VEX_W_TABLE (VEX_W_10_P_3) },
d5d7db8e 8413 { "(bad)", { XX } },
c0f3af97
L
8414 },
8415
8416 /* VEX_LEN_11_P_1 */
8417 {
9e30b8e0 8418 { VEX_W_TABLE (VEX_W_11_P_1) },
d5d7db8e 8419 { "(bad)", { XX } },
c0f3af97
L
8420 },
8421
8422 /* VEX_LEN_11_P_3 */
8423 {
9e30b8e0 8424 { VEX_W_TABLE (VEX_W_11_P_3) },
d5d7db8e 8425 { "(bad)", { XX } },
c0f3af97
L
8426 },
8427
8428 /* VEX_LEN_12_P_0_M_0 */
8429 {
9e30b8e0 8430 { VEX_W_TABLE (VEX_W_12_P_0_M_0) },
d5d7db8e 8431 { "(bad)", { XX } },
c0f3af97
L
8432 },
8433
8434 /* VEX_LEN_12_P_0_M_1 */
8435 {
9e30b8e0 8436 { VEX_W_TABLE (VEX_W_12_P_0_M_1) },
d5d7db8e 8437 { "(bad)", { XX } },
c0f3af97
L
8438 },
8439
8440 /* VEX_LEN_12_P_2 */
8441 {
9e30b8e0 8442 { VEX_W_TABLE (VEX_W_12_P_2) },
d5d7db8e 8443 { "(bad)", { XX } },
c0f3af97
L
8444 },
8445
8446 /* VEX_LEN_13_M_0 */
8447 {
9e30b8e0 8448 { VEX_W_TABLE (VEX_W_13_M_0) },
85f10a01 8449 { "(bad)", { XX } },
c0f3af97
L
8450 },
8451
8452 /* VEX_LEN_16_P_0_M_0 */
8453 {
9e30b8e0 8454 { VEX_W_TABLE (VEX_W_16_P_0_M_0) },
85f10a01 8455 { "(bad)", { XX } },
c0f3af97
L
8456 },
8457
8458 /* VEX_LEN_16_P_0_M_1 */
8459 {
9e30b8e0 8460 { VEX_W_TABLE (VEX_W_16_P_0_M_1) },
85f10a01 8461 { "(bad)", { XX } },
c0f3af97
L
8462 },
8463
8464 /* VEX_LEN_16_P_2 */
8465 {
9e30b8e0 8466 { VEX_W_TABLE (VEX_W_16_P_2) },
85f10a01 8467 { "(bad)", { XX } },
c0f3af97
L
8468 },
8469
8470 /* VEX_LEN_17_M_0 */
8471 {
9e30b8e0 8472 { VEX_W_TABLE (VEX_W_17_M_0) },
85f10a01 8473 { "(bad)", { XX } },
c0f3af97
L
8474 },
8475
8476 /* VEX_LEN_2A_P_1 */
8477 {
8478 { "vcvtsi2ss%LQ", { XM, Vex128, Ev } },
d5d7db8e 8479 { "(bad)", { XX } },
c0f3af97
L
8480 },
8481
8482 /* VEX_LEN_2A_P_3 */
8483 {
8484 { "vcvtsi2sd%LQ", { XM, Vex128, Ev } },
d5d7db8e 8485 { "(bad)", { XX } },
c0f3af97
L
8486 },
8487
c0f3af97
L
8488 /* VEX_LEN_2C_P_1 */
8489 {
8490 { "vcvttss2siY", { Gv, EXd } },
d5d7db8e 8491 { "(bad)", { XX } },
c0f3af97
L
8492 },
8493
8494 /* VEX_LEN_2C_P_3 */
8495 {
8496 { "vcvttsd2siY", { Gv, EXq } },
d5d7db8e 8497 { "(bad)", { XX } },
c0f3af97
L
8498 },
8499
8500 /* VEX_LEN_2D_P_1 */
8501 {
8502 { "vcvtss2siY", { Gv, EXd } },
85f10a01 8503 { "(bad)", { XX } },
c0f3af97
L
8504 },
8505
8506 /* VEX_LEN_2D_P_3 */
8507 {
8508 { "vcvtsd2siY", { Gv, EXq } },
d5d7db8e 8509 { "(bad)", { XX } },
c0f3af97
L
8510 },
8511
8512 /* VEX_LEN_2E_P_0 */
8513 {
9e30b8e0 8514 { VEX_W_TABLE (VEX_W_2E_P_0) },
d5d7db8e 8515 { "(bad)", { XX } },
c0f3af97
L
8516 },
8517
8518 /* VEX_LEN_2E_P_2 */
8519 {
9e30b8e0 8520 { VEX_W_TABLE (VEX_W_2E_P_2) },
d5d7db8e 8521 { "(bad)", { XX } },
c0f3af97
L
8522 },
8523
8524 /* VEX_LEN_2F_P_0 */
8525 {
9e30b8e0 8526 { VEX_W_TABLE (VEX_W_2F_P_0) },
d5d7db8e 8527 { "(bad)", { XX } },
c0f3af97
L
8528 },
8529
8530 /* VEX_LEN_2F_P_2 */
8531 {
9e30b8e0 8532 { VEX_W_TABLE (VEX_W_2F_P_2) },
d5d7db8e 8533 { "(bad)", { XX } },
c0f3af97
L
8534 },
8535
8536 /* VEX_LEN_51_P_1 */
8537 {
9e30b8e0 8538 { VEX_W_TABLE (VEX_W_51_P_1) },
d5d7db8e 8539 { "(bad)", { XX } },
c0f3af97
L
8540 },
8541
8542 /* VEX_LEN_51_P_3 */
8543 {
9e30b8e0 8544 { VEX_W_TABLE (VEX_W_51_P_3) },
d5d7db8e 8545 { "(bad)", { XX } },
c0f3af97
L
8546 },
8547
8548 /* VEX_LEN_52_P_1 */
8549 {
9e30b8e0 8550 { VEX_W_TABLE (VEX_W_52_P_1) },
d5d7db8e 8551 { "(bad)", { XX } },
c0f3af97
L
8552 },
8553
8554 /* VEX_LEN_53_P_1 */
8555 {
9e30b8e0 8556 { VEX_W_TABLE (VEX_W_53_P_1) },
d5d7db8e 8557 { "(bad)", { XX } },
c0f3af97
L
8558 },
8559
8560 /* VEX_LEN_58_P_1 */
8561 {
9e30b8e0 8562 { VEX_W_TABLE (VEX_W_58_P_1) },
d5d7db8e 8563 { "(bad)", { XX } },
c0f3af97
L
8564 },
8565
8566 /* VEX_LEN_58_P_3 */
8567 {
9e30b8e0 8568 { VEX_W_TABLE (VEX_W_58_P_3) },
d5d7db8e 8569 { "(bad)", { XX } },
c0f3af97
L
8570 },
8571
8572 /* VEX_LEN_59_P_1 */
8573 {
9e30b8e0 8574 { VEX_W_TABLE (VEX_W_59_P_1) },
d5d7db8e 8575 { "(bad)", { XX } },
c0f3af97
L
8576 },
8577
8578 /* VEX_LEN_59_P_3 */
8579 {
9e30b8e0 8580 { VEX_W_TABLE (VEX_W_59_P_3) },
d5d7db8e 8581 { "(bad)", { XX } },
c0f3af97
L
8582 },
8583
8584 /* VEX_LEN_5A_P_1 */
8585 {
9e30b8e0 8586 { VEX_W_TABLE (VEX_W_5A_P_1) },
d5d7db8e 8587 { "(bad)", { XX } },
c0f3af97
L
8588 },
8589
8590 /* VEX_LEN_5A_P_3 */
8591 {
9e30b8e0 8592 { VEX_W_TABLE (VEX_W_5A_P_3) },
d5d7db8e 8593 { "(bad)", { XX } },
c0f3af97
L
8594 },
8595
8596 /* VEX_LEN_5C_P_1 */
8597 {
9e30b8e0 8598 { VEX_W_TABLE (VEX_W_5C_P_1) },
d5d7db8e 8599 { "(bad)", { XX } },
c0f3af97
L
8600 },
8601
8602 /* VEX_LEN_5C_P_3 */
8603 {
9e30b8e0 8604 { VEX_W_TABLE (VEX_W_5C_P_3) },
d5d7db8e 8605 { "(bad)", { XX } },
c0f3af97
L
8606 },
8607
8608 /* VEX_LEN_5D_P_1 */
8609 {
9e30b8e0 8610 { VEX_W_TABLE (VEX_W_5D_P_1) },
d5d7db8e 8611 { "(bad)", { XX } },
c0f3af97
L
8612 },
8613
8614 /* VEX_LEN_5D_P_3 */
8615 {
9e30b8e0 8616 { VEX_W_TABLE (VEX_W_5D_P_3) },
d5d7db8e 8617 { "(bad)", { XX } },
c0f3af97
L
8618 },
8619
8620 /* VEX_LEN_5E_P_1 */
8621 {
9e30b8e0 8622 { VEX_W_TABLE (VEX_W_5E_P_1) },
85f10a01 8623 { "(bad)", { XX } },
c0f3af97
L
8624 },
8625
8626 /* VEX_LEN_5E_P_3 */
8627 {
9e30b8e0 8628 { VEX_W_TABLE (VEX_W_5E_P_3) },
85f10a01 8629 { "(bad)", { XX } },
c0f3af97
L
8630 },
8631
8632 /* VEX_LEN_5F_P_1 */
8633 {
9e30b8e0 8634 { VEX_W_TABLE (VEX_W_5F_P_1) },
85f10a01 8635 { "(bad)", { XX } },
c0f3af97
L
8636 },
8637
8638 /* VEX_LEN_5F_P_3 */
8639 {
9e30b8e0 8640 { VEX_W_TABLE (VEX_W_5F_P_3) },
85f10a01 8641 { "(bad)", { XX } },
c0f3af97
L
8642 },
8643
8644 /* VEX_LEN_60_P_2 */
8645 {
9e30b8e0 8646 { VEX_W_TABLE (VEX_W_60_P_2) },
d5d7db8e 8647 { "(bad)", { XX } },
c0f3af97
L
8648 },
8649
8650 /* VEX_LEN_61_P_2 */
8651 {
9e30b8e0 8652 { VEX_W_TABLE (VEX_W_61_P_2) },
d5d7db8e 8653 { "(bad)", { XX } },
c0f3af97
L
8654 },
8655
8656 /* VEX_LEN_62_P_2 */
8657 {
9e30b8e0 8658 { VEX_W_TABLE (VEX_W_62_P_2) },
d5d7db8e 8659 { "(bad)", { XX } },
c0f3af97
L
8660 },
8661
8662 /* VEX_LEN_63_P_2 */
8663 {
9e30b8e0 8664 { VEX_W_TABLE (VEX_W_63_P_2) },
d5d7db8e 8665 { "(bad)", { XX } },
c0f3af97
L
8666 },
8667
8668 /* VEX_LEN_64_P_2 */
8669 {
9e30b8e0 8670 { VEX_W_TABLE (VEX_W_64_P_2) },
d5d7db8e 8671 { "(bad)", { XX } },
c0f3af97
L
8672 },
8673
8674 /* VEX_LEN_65_P_2 */
8675 {
9e30b8e0 8676 { VEX_W_TABLE (VEX_W_65_P_2) },
d5d7db8e 8677 { "(bad)", { XX } },
c0f3af97
L
8678 },
8679
8680 /* VEX_LEN_66_P_2 */
8681 {
9e30b8e0 8682 { VEX_W_TABLE (VEX_W_66_P_2) },
d5d7db8e 8683 { "(bad)", { XX } },
c0f3af97
L
8684 },
8685
8686 /* VEX_LEN_67_P_2 */
8687 {
9e30b8e0 8688 { VEX_W_TABLE (VEX_W_67_P_2) },
d5d7db8e 8689 { "(bad)", { XX } },
c0f3af97
L
8690 },
8691
8692 /* VEX_LEN_68_P_2 */
8693 {
9e30b8e0 8694 { VEX_W_TABLE (VEX_W_68_P_2) },
d5d7db8e 8695 { "(bad)", { XX } },
c0f3af97
L
8696 },
8697
8698 /* VEX_LEN_69_P_2 */
8699 {
9e30b8e0 8700 { VEX_W_TABLE (VEX_W_69_P_2) },
d5d7db8e 8701 { "(bad)", { XX } },
c0f3af97
L
8702 },
8703
8704 /* VEX_LEN_6A_P_2 */
8705 {
9e30b8e0 8706 { VEX_W_TABLE (VEX_W_6A_P_2) },
d5d7db8e 8707 { "(bad)", { XX } },
c0f3af97
L
8708 },
8709
8710 /* VEX_LEN_6B_P_2 */
8711 {
9e30b8e0 8712 { VEX_W_TABLE (VEX_W_6B_P_2) },
d5d7db8e 8713 { "(bad)", { XX } },
c0f3af97
L
8714 },
8715
8716 /* VEX_LEN_6C_P_2 */
8717 {
9e30b8e0 8718 { VEX_W_TABLE (VEX_W_6C_P_2) },
d5d7db8e 8719 { "(bad)", { XX } },
c0f3af97
L
8720 },
8721
8722 /* VEX_LEN_6D_P_2 */
8723 {
9e30b8e0 8724 { VEX_W_TABLE (VEX_W_6D_P_2) },
d5d7db8e 8725 { "(bad)", { XX } },
c0f3af97
L
8726 },
8727
8728 /* VEX_LEN_6E_P_2 */
8729 {
8730 { "vmovK", { XM, Edq } },
d5d7db8e 8731 { "(bad)", { XX } },
c0f3af97
L
8732 },
8733
8734 /* VEX_LEN_70_P_1 */
8735 {
9e30b8e0 8736 { VEX_W_TABLE (VEX_W_70_P_1) },
d5d7db8e 8737 { "(bad)", { XX } },
c0f3af97
L
8738 },
8739
8740 /* VEX_LEN_70_P_2 */
8741 {
9e30b8e0 8742 { VEX_W_TABLE (VEX_W_70_P_2) },
d5d7db8e 8743 { "(bad)", { XX } },
c0f3af97
L
8744 },
8745
8746 /* VEX_LEN_70_P_3 */
8747 {
9e30b8e0 8748 { VEX_W_TABLE (VEX_W_70_P_3) },
d5d7db8e 8749 { "(bad)", { XX } },
c0f3af97
L
8750 },
8751
8752 /* VEX_LEN_71_R_2_P_2 */
8753 {
9e30b8e0 8754 { VEX_W_TABLE (VEX_W_71_R_2_P_2) },
d5d7db8e 8755 { "(bad)", { XX } },
c0f3af97
L
8756 },
8757
8758 /* VEX_LEN_71_R_4_P_2 */
8759 {
9e30b8e0 8760 { VEX_W_TABLE (VEX_W_71_R_4_P_2) },
d5d7db8e 8761 { "(bad)", { XX } },
c0f3af97
L
8762 },
8763
8764 /* VEX_LEN_71_R_6_P_2 */
8765 {
9e30b8e0 8766 { VEX_W_TABLE (VEX_W_71_R_6_P_2) },
d5d7db8e 8767 { "(bad)", { XX } },
c0f3af97
L
8768 },
8769
8770 /* VEX_LEN_72_R_2_P_2 */
8771 {
9e30b8e0 8772 { VEX_W_TABLE (VEX_W_72_R_2_P_2) },
d5d7db8e 8773 { "(bad)", { XX } },
c0f3af97
L
8774 },
8775
8776 /* VEX_LEN_72_R_4_P_2 */
8777 {
9e30b8e0 8778 { VEX_W_TABLE (VEX_W_72_R_4_P_2) },
d5d7db8e 8779 { "(bad)", { XX } },
c0f3af97
L
8780 },
8781
8782 /* VEX_LEN_72_R_6_P_2 */
8783 {
9e30b8e0 8784 { VEX_W_TABLE (VEX_W_72_R_6_P_2) },
d5d7db8e 8785 { "(bad)", { XX } },
c0f3af97
L
8786 },
8787
8788 /* VEX_LEN_73_R_2_P_2 */
8789 {
9e30b8e0 8790 { VEX_W_TABLE (VEX_W_73_R_2_P_2) },
d5d7db8e 8791 { "(bad)", { XX } },
c0f3af97
L
8792 },
8793
8794 /* VEX_LEN_73_R_3_P_2 */
8795 {
9e30b8e0 8796 { VEX_W_TABLE (VEX_W_73_R_3_P_2) },
d5d7db8e 8797 { "(bad)", { XX } },
c0f3af97
L
8798 },
8799
8800 /* VEX_LEN_73_R_6_P_2 */
8801 {
9e30b8e0 8802 { VEX_W_TABLE (VEX_W_73_R_6_P_2) },
d5d7db8e 8803 { "(bad)", { XX } },
c0f3af97
L
8804 },
8805
8806 /* VEX_LEN_73_R_7_P_2 */
8807 {
9e30b8e0 8808 { VEX_W_TABLE (VEX_W_73_R_7_P_2) },
d5d7db8e 8809 { "(bad)", { XX } },
c0f3af97
L
8810 },
8811
8812 /* VEX_LEN_74_P_2 */
8813 {
9e30b8e0 8814 { VEX_W_TABLE (VEX_W_74_P_2) },
d5d7db8e 8815 { "(bad)", { XX } },
c0f3af97
L
8816 },
8817
8818 /* VEX_LEN_75_P_2 */
8819 {
9e30b8e0 8820 { VEX_W_TABLE (VEX_W_75_P_2) },
d5d7db8e 8821 { "(bad)", { XX } },
c0f3af97
L
8822 },
8823
8824 /* VEX_LEN_76_P_2 */
8825 {
9e30b8e0 8826 { VEX_W_TABLE (VEX_W_76_P_2) },
d5d7db8e 8827 { "(bad)", { XX } },
c0f3af97
L
8828 },
8829
8830 /* VEX_LEN_7E_P_1 */
8831 {
9e30b8e0 8832 { VEX_W_TABLE (VEX_W_7E_P_1) },
d5d7db8e 8833 { "(bad)", { XX } },
c0f3af97
L
8834 },
8835
8836 /* VEX_LEN_7E_P_2 */
8837 {
8838 { "vmovK", { Edq, XM } },
d5d7db8e 8839 { "(bad)", { XX } },
c0f3af97
L
8840 },
8841
9daa0d29 8842 /* VEX_LEN_AE_R_2_M_0 */
c0f3af97 8843 {
9e30b8e0 8844 { VEX_W_TABLE (VEX_W_AE_R_2_M_0) },
d5d7db8e 8845 { "(bad)", { XX } },
c0f3af97
L
8846 },
8847
9daa0d29 8848 /* VEX_LEN_AE_R_3_M_0 */
c0f3af97 8849 {
9e30b8e0 8850 { VEX_W_TABLE (VEX_W_AE_R_3_M_0) },
d5d7db8e 8851 { "(bad)", { XX } },
c0f3af97
L
8852 },
8853
8854 /* VEX_LEN_C2_P_1 */
8855 {
9e30b8e0 8856 { VEX_W_TABLE (VEX_W_C2_P_1) },
d5d7db8e 8857 { "(bad)", { XX } },
c0f3af97
L
8858 },
8859
8860 /* VEX_LEN_C2_P_3 */
8861 {
9e30b8e0 8862 { VEX_W_TABLE (VEX_W_C2_P_3) },
d5d7db8e 8863 { "(bad)", { XX } },
c0f3af97
L
8864 },
8865
8866 /* VEX_LEN_C4_P_2 */
8867 {
9e30b8e0 8868 { VEX_W_TABLE (VEX_W_C4_P_2) },
d5d7db8e 8869 { "(bad)", { XX } },
c0f3af97
L
8870 },
8871
8872 /* VEX_LEN_C5_P_2 */
8873 {
9e30b8e0 8874 { VEX_W_TABLE (VEX_W_C5_P_2) },
d5d7db8e 8875 { "(bad)", { XX } },
c0f3af97
L
8876 },
8877
8878 /* VEX_LEN_D1_P_2 */
8879 {
9e30b8e0 8880 { VEX_W_TABLE (VEX_W_D1_P_2) },
d5d7db8e 8881 { "(bad)", { XX } },
c0f3af97
L
8882 },
8883
8884 /* VEX_LEN_D2_P_2 */
8885 {
9e30b8e0 8886 { VEX_W_TABLE (VEX_W_D2_P_2) },
d5d7db8e 8887 { "(bad)", { XX } },
c0f3af97
L
8888 },
8889
8890 /* VEX_LEN_D3_P_2 */
8891 {
9e30b8e0 8892 { VEX_W_TABLE (VEX_W_D3_P_2) },
d5d7db8e 8893 { "(bad)", { XX } },
c0f3af97
L
8894 },
8895
8896 /* VEX_LEN_D4_P_2 */
8897 {
9e30b8e0 8898 { VEX_W_TABLE (VEX_W_D4_P_2) },
d5d7db8e 8899 { "(bad)", { XX } },
c0f3af97
L
8900 },
8901
8902 /* VEX_LEN_D5_P_2 */
8903 {
9e30b8e0 8904 { VEX_W_TABLE (VEX_W_D5_P_2) },
d5d7db8e 8905 { "(bad)", { XX } },
c0f3af97
L
8906 },
8907
8908 /* VEX_LEN_D6_P_2 */
8909 {
9e30b8e0 8910 { VEX_W_TABLE (VEX_W_D6_P_2) },
d5d7db8e 8911 { "(bad)", { XX } },
c0f3af97
L
8912 },
8913
8914 /* VEX_LEN_D7_P_2_M_1 */
8915 {
9e30b8e0 8916 { VEX_W_TABLE (VEX_W_D7_P_2_M_1) },
d5d7db8e 8917 { "(bad)", { XX } },
c0f3af97
L
8918 },
8919
8920 /* VEX_LEN_D8_P_2 */
8921 {
9e30b8e0 8922 { VEX_W_TABLE (VEX_W_D8_P_2) },
d5d7db8e 8923 { "(bad)", { XX } },
c0f3af97
L
8924 },
8925
8926 /* VEX_LEN_D9_P_2 */
8927 {
9e30b8e0 8928 { VEX_W_TABLE (VEX_W_D9_P_2) },
d5d7db8e 8929 { "(bad)", { XX } },
c0f3af97
L
8930 },
8931
8932 /* VEX_LEN_DA_P_2 */
8933 {
9e30b8e0 8934 { VEX_W_TABLE (VEX_W_DA_P_2) },
d5d7db8e 8935 { "(bad)", { XX } },
c0f3af97
L
8936 },
8937
8938 /* VEX_LEN_DB_P_2 */
8939 {
9e30b8e0 8940 { VEX_W_TABLE (VEX_W_DB_P_2) },
d5d7db8e 8941 { "(bad)", { XX } },
c0f3af97
L
8942 },
8943
8944 /* VEX_LEN_DC_P_2 */
8945 {
9e30b8e0 8946 { VEX_W_TABLE (VEX_W_DC_P_2) },
d5d7db8e 8947 { "(bad)", { XX } },
c0f3af97
L
8948 },
8949
8950 /* VEX_LEN_DD_P_2 */
8951 {
9e30b8e0 8952 { VEX_W_TABLE (VEX_W_DD_P_2) },
d5d7db8e 8953 { "(bad)", { XX } },
c0f3af97
L
8954 },
8955
8956 /* VEX_LEN_DE_P_2 */
8957 {
9e30b8e0 8958 { VEX_W_TABLE (VEX_W_DE_P_2) },
d5d7db8e 8959 { "(bad)", { XX } },
c0f3af97
L
8960 },
8961
8962 /* VEX_LEN_DF_P_2 */
8963 {
9e30b8e0 8964 { VEX_W_TABLE (VEX_W_DF_P_2) },
d5d7db8e 8965 { "(bad)", { XX } },
c0f3af97
L
8966 },
8967
8968 /* VEX_LEN_E0_P_2 */
8969 {
9e30b8e0 8970 { VEX_W_TABLE (VEX_W_E0_P_2) },
d5d7db8e 8971 { "(bad)", { XX } },
c0f3af97
L
8972 },
8973
8974 /* VEX_LEN_E1_P_2 */
8975 {
9e30b8e0 8976 { VEX_W_TABLE (VEX_W_E1_P_2) },
d5d7db8e 8977 { "(bad)", { XX } },
c0f3af97
L
8978 },
8979
8980 /* VEX_LEN_E2_P_2 */
8981 {
9e30b8e0 8982 { VEX_W_TABLE (VEX_W_E2_P_2) },
d5d7db8e 8983 { "(bad)", { XX } },
c0f3af97
L
8984 },
8985
8986 /* VEX_LEN_E3_P_2 */
8987 {
9e30b8e0 8988 { VEX_W_TABLE (VEX_W_E3_P_2) },
d5d7db8e 8989 { "(bad)", { XX } },
c0f3af97
L
8990 },
8991
8992 /* VEX_LEN_E4_P_2 */
8993 {
9e30b8e0 8994 { VEX_W_TABLE (VEX_W_E4_P_2) },
d5d7db8e 8995 { "(bad)", { XX } },
c0f3af97
L
8996 },
8997
8998 /* VEX_LEN_E5_P_2 */
8999 {
9e30b8e0 9000 { VEX_W_TABLE (VEX_W_E5_P_2) },
d5d7db8e 9001 { "(bad)", { XX } },
c0f3af97
L
9002 },
9003
c0f3af97
L
9004 /* VEX_LEN_E8_P_2 */
9005 {
9e30b8e0 9006 { VEX_W_TABLE (VEX_W_E8_P_2) },
d5d7db8e 9007 { "(bad)", { XX } },
c0f3af97
L
9008 },
9009
9010 /* VEX_LEN_E9_P_2 */
9011 {
9e30b8e0 9012 { VEX_W_TABLE (VEX_W_E9_P_2) },
d5d7db8e 9013 { "(bad)", { XX } },
c0f3af97
L
9014 },
9015
9016 /* VEX_LEN_EA_P_2 */
9017 {
9e30b8e0 9018 { VEX_W_TABLE (VEX_W_EA_P_2) },
d5d7db8e 9019 { "(bad)", { XX } },
c0f3af97
L
9020 },
9021
9022 /* VEX_LEN_EB_P_2 */
9023 {
9e30b8e0 9024 { VEX_W_TABLE (VEX_W_EB_P_2) },
d5d7db8e 9025 { "(bad)", { XX } },
c0f3af97
L
9026 },
9027
9028 /* VEX_LEN_EC_P_2 */
9029 {
9e30b8e0 9030 { VEX_W_TABLE (VEX_W_EC_P_2) },
d5d7db8e 9031 { "(bad)", { XX } },
c0f3af97
L
9032 },
9033
9034 /* VEX_LEN_ED_P_2 */
9035 {
9e30b8e0 9036 { VEX_W_TABLE (VEX_W_ED_P_2) },
d5d7db8e 9037 { "(bad)", { XX } },
c0f3af97
L
9038 },
9039
9040 /* VEX_LEN_EE_P_2 */
9041 {
9e30b8e0 9042 { VEX_W_TABLE (VEX_W_EE_P_2) },
d5d7db8e 9043 { "(bad)", { XX } },
c0f3af97
L
9044 },
9045
9046 /* VEX_LEN_EF_P_2 */
9047 {
9e30b8e0 9048 { VEX_W_TABLE (VEX_W_EF_P_2) },
d5d7db8e 9049 { "(bad)", { XX } },
c0f3af97
L
9050 },
9051
9052 /* VEX_LEN_F1_P_2 */
9053 {
9e30b8e0 9054 { VEX_W_TABLE (VEX_W_F1_P_2) },
d5d7db8e 9055 { "(bad)", { XX } },
c0f3af97
L
9056 },
9057
9058 /* VEX_LEN_F2_P_2 */
9059 {
9e30b8e0 9060 { VEX_W_TABLE (VEX_W_F2_P_2) },
d5d7db8e 9061 { "(bad)", { XX } },
c0f3af97
L
9062 },
9063
9064 /* VEX_LEN_F3_P_2 */
9065 {
9e30b8e0 9066 { VEX_W_TABLE (VEX_W_F3_P_2) },
d5d7db8e 9067 { "(bad)", { XX } },
c0f3af97
L
9068 },
9069
9070 /* VEX_LEN_F4_P_2 */
9071 {
9e30b8e0 9072 { VEX_W_TABLE (VEX_W_F4_P_2) },
d5d7db8e 9073 { "(bad)", { XX } },
c0f3af97
L
9074 },
9075
9076 /* VEX_LEN_F5_P_2 */
9077 {
9e30b8e0 9078 { VEX_W_TABLE (VEX_W_F5_P_2) },
d5d7db8e 9079 { "(bad)", { XX } },
c0f3af97
L
9080 },
9081
9082 /* VEX_LEN_F6_P_2 */
9083 {
9e30b8e0 9084 { VEX_W_TABLE (VEX_W_F6_P_2) },
d5d7db8e 9085 { "(bad)", { XX } },
c0f3af97
L
9086 },
9087
9088 /* VEX_LEN_F7_P_2 */
9089 {
9e30b8e0 9090 { VEX_W_TABLE (VEX_W_F7_P_2) },
d5d7db8e 9091 { "(bad)", { XX } },
c0f3af97
L
9092 },
9093
9094 /* VEX_LEN_F8_P_2 */
9095 {
9e30b8e0 9096 { VEX_W_TABLE (VEX_W_F8_P_2) },
d5d7db8e 9097 { "(bad)", { XX } },
c0f3af97
L
9098 },
9099
9100 /* VEX_LEN_F9_P_2 */
9101 {
9e30b8e0 9102 { VEX_W_TABLE (VEX_W_F9_P_2) },
d5d7db8e 9103 { "(bad)", { XX } },
c0f3af97
L
9104 },
9105
9106 /* VEX_LEN_FA_P_2 */
9107 {
9e30b8e0 9108 { VEX_W_TABLE (VEX_W_FA_P_2) },
d5d7db8e 9109 { "(bad)", { XX } },
c0f3af97
L
9110 },
9111
9112 /* VEX_LEN_FB_P_2 */
9113 {
9e30b8e0 9114 { VEX_W_TABLE (VEX_W_FB_P_2) },
d5d7db8e 9115 { "(bad)", { XX } },
c0f3af97
L
9116 },
9117
9118 /* VEX_LEN_FC_P_2 */
9119 {
9e30b8e0 9120 { VEX_W_TABLE (VEX_W_FC_P_2) },
d5d7db8e 9121 { "(bad)", { XX } },
c0f3af97
L
9122 },
9123
9124 /* VEX_LEN_FD_P_2 */
9125 {
9e30b8e0 9126 { VEX_W_TABLE (VEX_W_FD_P_2) },
d5d7db8e 9127 { "(bad)", { XX } },
c0f3af97
L
9128 },
9129
9130 /* VEX_LEN_FE_P_2 */
9131 {
9e30b8e0 9132 { VEX_W_TABLE (VEX_W_FE_P_2) },
d5d7db8e 9133 { "(bad)", { XX } },
c0f3af97
L
9134 },
9135
9136 /* VEX_LEN_3800_P_2 */
9137 {
9e30b8e0 9138 { VEX_W_TABLE (VEX_W_3800_P_2) },
d5d7db8e 9139 { "(bad)", { XX } },
c0f3af97
L
9140 },
9141
9142 /* VEX_LEN_3801_P_2 */
9143 {
9e30b8e0 9144 { VEX_W_TABLE (VEX_W_3801_P_2) },
d5d7db8e 9145 { "(bad)", { XX } },
c0f3af97
L
9146 },
9147
9148 /* VEX_LEN_3802_P_2 */
9149 {
9e30b8e0 9150 { VEX_W_TABLE (VEX_W_3802_P_2) },
d5d7db8e 9151 { "(bad)", { XX } },
c0f3af97
L
9152 },
9153
9154 /* VEX_LEN_3803_P_2 */
9155 {
9e30b8e0 9156 { VEX_W_TABLE (VEX_W_3803_P_2) },
d5d7db8e 9157 { "(bad)", { XX } },
c0f3af97
L
9158 },
9159
9160 /* VEX_LEN_3804_P_2 */
9161 {
9e30b8e0 9162 { VEX_W_TABLE (VEX_W_3804_P_2) },
d5d7db8e 9163 { "(bad)", { XX } },
c0f3af97
L
9164 },
9165
9166 /* VEX_LEN_3805_P_2 */
9167 {
9e30b8e0 9168 { VEX_W_TABLE (VEX_W_3805_P_2) },
d5d7db8e 9169 { "(bad)", { XX } },
c0f3af97
L
9170 },
9171
9172 /* VEX_LEN_3806_P_2 */
9173 {
9e30b8e0 9174 { VEX_W_TABLE (VEX_W_3806_P_2) },
d5d7db8e 9175 { "(bad)", { XX } },
c0f3af97
L
9176 },
9177
9178 /* VEX_LEN_3807_P_2 */
9179 {
9e30b8e0 9180 { VEX_W_TABLE (VEX_W_3807_P_2) },
d5d7db8e 9181 { "(bad)", { XX } },
c0f3af97
L
9182 },
9183
9184 /* VEX_LEN_3808_P_2 */
9185 {
9e30b8e0 9186 { VEX_W_TABLE (VEX_W_3808_P_2) },
d5d7db8e 9187 { "(bad)", { XX } },
c0f3af97
L
9188 },
9189
9190 /* VEX_LEN_3809_P_2 */
9191 {
9e30b8e0 9192 { VEX_W_TABLE (VEX_W_3809_P_2) },
d5d7db8e 9193 { "(bad)", { XX } },
c0f3af97
L
9194 },
9195
9196 /* VEX_LEN_380A_P_2 */
9197 {
9e30b8e0 9198 { VEX_W_TABLE (VEX_W_380A_P_2) },
d5d7db8e 9199 { "(bad)", { XX } },
c0f3af97
L
9200 },
9201
9202 /* VEX_LEN_380B_P_2 */
9203 {
9e30b8e0 9204 { VEX_W_TABLE (VEX_W_380B_P_2) },
d5d7db8e 9205 { "(bad)", { XX } },
c0f3af97
L
9206 },
9207
9208 /* VEX_LEN_3819_P_2_M_0 */
9209 {
d5d7db8e 9210 { "(bad)", { XX } },
9e30b8e0 9211 { VEX_W_TABLE (VEX_W_3819_P_2_M_0) },
c0f3af97
L
9212 },
9213
9214 /* VEX_LEN_381A_P_2_M_0 */
9215 {
d5d7db8e 9216 { "(bad)", { XX } },
9e30b8e0 9217 { VEX_W_TABLE (VEX_W_381A_P_2_M_0) },
c0f3af97
L
9218 },
9219
9220 /* VEX_LEN_381C_P_2 */
9221 {
9e30b8e0 9222 { VEX_W_TABLE (VEX_W_381C_P_2) },
d5d7db8e 9223 { "(bad)", { XX } },
c0f3af97
L
9224 },
9225
9226 /* VEX_LEN_381D_P_2 */
9227 {
9e30b8e0 9228 { VEX_W_TABLE (VEX_W_381D_P_2) },
d5d7db8e 9229 { "(bad)", { XX } },
c0f3af97
L
9230 },
9231
9232 /* VEX_LEN_381E_P_2 */
9233 {
9e30b8e0 9234 { VEX_W_TABLE (VEX_W_381E_P_2) },
d5d7db8e 9235 { "(bad)", { XX } },
c0f3af97
L
9236 },
9237
9238 /* VEX_LEN_3820_P_2 */
9239 {
9e30b8e0 9240 { VEX_W_TABLE (VEX_W_3820_P_2) },
d5d7db8e 9241 { "(bad)", { XX } },
c0f3af97
L
9242 },
9243
9244 /* VEX_LEN_3821_P_2 */
9245 {
9e30b8e0 9246 { VEX_W_TABLE (VEX_W_3821_P_2) },
d5d7db8e 9247 { "(bad)", { XX } },
c0f3af97
L
9248 },
9249
9250 /* VEX_LEN_3822_P_2 */
9251 {
9e30b8e0 9252 { VEX_W_TABLE (VEX_W_3822_P_2) },
d5d7db8e 9253 { "(bad)", { XX } },
c0f3af97
L
9254 },
9255
9256 /* VEX_LEN_3823_P_2 */
9257 {
9e30b8e0 9258 { VEX_W_TABLE (VEX_W_3823_P_2) },
d5d7db8e 9259 { "(bad)", { XX } },
c0f3af97
L
9260 },
9261
9262 /* VEX_LEN_3824_P_2 */
9263 {
9e30b8e0 9264 { VEX_W_TABLE (VEX_W_3824_P_2) },
d5d7db8e 9265 { "(bad)", { XX } },
c0f3af97
L
9266 },
9267
9268 /* VEX_LEN_3825_P_2 */
9269 {
9e30b8e0 9270 { VEX_W_TABLE (VEX_W_3825_P_2) },
d5d7db8e 9271 { "(bad)", { XX } },
c0f3af97
L
9272 },
9273
9274 /* VEX_LEN_3828_P_2 */
9275 {
9e30b8e0 9276 { VEX_W_TABLE (VEX_W_3828_P_2) },
d5d7db8e 9277 { "(bad)", { XX } },
c0f3af97
L
9278 },
9279
9280 /* VEX_LEN_3829_P_2 */
9281 {
9e30b8e0 9282 { VEX_W_TABLE (VEX_W_3829_P_2) },
d5d7db8e 9283 { "(bad)", { XX } },
c0f3af97
L
9284 },
9285
9286 /* VEX_LEN_382A_P_2_M_0 */
9287 {
9e30b8e0 9288 { VEX_W_TABLE (VEX_W_382A_P_2_M_0) },
d5d7db8e 9289 { "(bad)", { XX } },
c0f3af97
L
9290 },
9291
9292 /* VEX_LEN_382B_P_2 */
9293 {
9e30b8e0 9294 { VEX_W_TABLE (VEX_W_382B_P_2) },
d5d7db8e 9295 { "(bad)", { XX } },
c0f3af97
L
9296 },
9297
9298 /* VEX_LEN_3830_P_2 */
9299 {
9e30b8e0 9300 { VEX_W_TABLE (VEX_W_3830_P_2) },
d5d7db8e 9301 { "(bad)", { XX } },
c0f3af97
L
9302 },
9303
9304 /* VEX_LEN_3831_P_2 */
9305 {
9e30b8e0 9306 { VEX_W_TABLE (VEX_W_3831_P_2) },
d5d7db8e 9307 { "(bad)", { XX } },
c0f3af97
L
9308 },
9309
9310 /* VEX_LEN_3832_P_2 */
9311 {
9e30b8e0 9312 { VEX_W_TABLE (VEX_W_3832_P_2) },
d5d7db8e 9313 { "(bad)", { XX } },
c0f3af97
L
9314 },
9315
9316 /* VEX_LEN_3833_P_2 */
9317 {
9e30b8e0 9318 { VEX_W_TABLE (VEX_W_3833_P_2) },
d5d7db8e 9319 { "(bad)", { XX } },
c0f3af97
L
9320 },
9321
9322 /* VEX_LEN_3834_P_2 */
9323 {
9e30b8e0 9324 { VEX_W_TABLE (VEX_W_3834_P_2) },
d5d7db8e 9325 { "(bad)", { XX } },
c0f3af97
L
9326 },
9327
9328 /* VEX_LEN_3835_P_2 */
9329 {
9e30b8e0 9330 { VEX_W_TABLE (VEX_W_3835_P_2) },
d5d7db8e 9331 { "(bad)", { XX } },
c0f3af97
L
9332 },
9333
9334 /* VEX_LEN_3837_P_2 */
9335 {
9e30b8e0 9336 { VEX_W_TABLE (VEX_W_3837_P_2) },
d5d7db8e 9337 { "(bad)", { XX } },
c0f3af97
L
9338 },
9339
9340 /* VEX_LEN_3838_P_2 */
9341 {
9e30b8e0 9342 { VEX_W_TABLE (VEX_W_3838_P_2) },
d5d7db8e 9343 { "(bad)", { XX } },
c0f3af97
L
9344 },
9345
9346 /* VEX_LEN_3839_P_2 */
9347 {
9e30b8e0 9348 { VEX_W_TABLE (VEX_W_3839_P_2) },
d5d7db8e 9349 { "(bad)", { XX } },
c0f3af97
L
9350 },
9351
9352 /* VEX_LEN_383A_P_2 */
9353 {
9e30b8e0 9354 { VEX_W_TABLE (VEX_W_383A_P_2) },
d5d7db8e 9355 { "(bad)", { XX } },
c0f3af97
L
9356 },
9357
9358 /* VEX_LEN_383B_P_2 */
9359 {
9e30b8e0 9360 { VEX_W_TABLE (VEX_W_383B_P_2) },
d5d7db8e 9361 { "(bad)", { XX } },
c0f3af97
L
9362 },
9363
9364 /* VEX_LEN_383C_P_2 */
9365 {
9e30b8e0 9366 { VEX_W_TABLE (VEX_W_383C_P_2) },
d5d7db8e 9367 { "(bad)", { XX } },
c0f3af97
L
9368 },
9369
9370 /* VEX_LEN_383D_P_2 */
9371 {
9e30b8e0 9372 { VEX_W_TABLE (VEX_W_383D_P_2) },
d5d7db8e 9373 { "(bad)", { XX } },
c0f3af97
L
9374 },
9375
9376 /* VEX_LEN_383E_P_2 */
9377 {
9e30b8e0 9378 { VEX_W_TABLE (VEX_W_383E_P_2) },
d5d7db8e 9379 { "(bad)", { XX } },
c0f3af97
L
9380 },
9381
9382 /* VEX_LEN_383F_P_2 */
9383 {
9e30b8e0 9384 { VEX_W_TABLE (VEX_W_383F_P_2) },
d5d7db8e 9385 { "(bad)", { XX } },
c0f3af97
L
9386 },
9387
9388 /* VEX_LEN_3840_P_2 */
9389 {
9e30b8e0 9390 { VEX_W_TABLE (VEX_W_3840_P_2) },
d5d7db8e 9391 { "(bad)", { XX } },
c0f3af97
L
9392 },
9393
9394 /* VEX_LEN_3841_P_2 */
9395 {
9e30b8e0 9396 { VEX_W_TABLE (VEX_W_3841_P_2) },
d5d7db8e 9397 { "(bad)", { XX } },
c0f3af97
L
9398 },
9399
a5ff0eb2
L
9400 /* VEX_LEN_38DB_P_2 */
9401 {
9e30b8e0 9402 { VEX_W_TABLE (VEX_W_38DB_P_2) },
a5ff0eb2
L
9403 { "(bad)", { XX } },
9404 },
9405
9406 /* VEX_LEN_38DC_P_2 */
9407 {
9e30b8e0 9408 { VEX_W_TABLE (VEX_W_38DC_P_2) },
a5ff0eb2
L
9409 { "(bad)", { XX } },
9410 },
9411
9412 /* VEX_LEN_38DD_P_2 */
9413 {
9e30b8e0 9414 { VEX_W_TABLE (VEX_W_38DD_P_2) },
a5ff0eb2
L
9415 { "(bad)", { XX } },
9416 },
9417
9418 /* VEX_LEN_38DE_P_2 */
9419 {
9e30b8e0 9420 { VEX_W_TABLE (VEX_W_38DE_P_2) },
a5ff0eb2
L
9421 { "(bad)", { XX } },
9422 },
9423
9424 /* VEX_LEN_38DF_P_2 */
9425 {
9e30b8e0 9426 { VEX_W_TABLE (VEX_W_38DF_P_2) },
a5ff0eb2
L
9427 { "(bad)", { XX } },
9428 },
9429
c0f3af97
L
9430 /* VEX_LEN_3A06_P_2 */
9431 {
d5d7db8e 9432 { "(bad)", { XX } },
9e30b8e0 9433 { VEX_W_TABLE (VEX_W_3A06_P_2) },
c0f3af97
L
9434 },
9435
9436 /* VEX_LEN_3A0A_P_2 */
9437 {
9e30b8e0 9438 { VEX_W_TABLE (VEX_W_3A0A_P_2) },
d5d7db8e 9439 { "(bad)", { XX } },
c0f3af97
L
9440 },
9441
9442 /* VEX_LEN_3A0B_P_2 */
9443 {
9e30b8e0 9444 { VEX_W_TABLE (VEX_W_3A0B_P_2) },
d5d7db8e 9445 { "(bad)", { XX } },
c0f3af97
L
9446 },
9447
9448 /* VEX_LEN_3A0E_P_2 */
9449 {
9e30b8e0 9450 { VEX_W_TABLE (VEX_W_3A0E_P_2) },
d5d7db8e 9451 { "(bad)", { XX } },
c0f3af97
L
9452 },
9453
9454 /* VEX_LEN_3A0F_P_2 */
9455 {
9e30b8e0 9456 { VEX_W_TABLE (VEX_W_3A0F_P_2) },
d5d7db8e 9457 { "(bad)", { XX } },
c0f3af97
L
9458 },
9459
9460 /* VEX_LEN_3A14_P_2 */
9461 {
9e30b8e0 9462 { VEX_W_TABLE (VEX_W_3A14_P_2) },
d5d7db8e 9463 { "(bad)", { XX } },
c0f3af97
L
9464 },
9465
9466 /* VEX_LEN_3A15_P_2 */
9467 {
9e30b8e0 9468 { VEX_W_TABLE (VEX_W_3A15_P_2) },
d5d7db8e 9469 { "(bad)", { XX } },
c0f3af97
L
9470 },
9471
9472 /* VEX_LEN_3A16_P_2 */
9473 {
9474 { "vpextrK", { Edq, XM, Ib } },
d5d7db8e 9475 { "(bad)", { XX } },
c0f3af97
L
9476 },
9477
9478 /* VEX_LEN_3A17_P_2 */
9479 {
9480 { "vextractps", { Edqd, XM, Ib } },
d5d7db8e 9481 { "(bad)", { XX } },
c0f3af97
L
9482 },
9483
9484 /* VEX_LEN_3A18_P_2 */
9485 {
d5d7db8e 9486 { "(bad)", { XX } },
9e30b8e0 9487 { VEX_W_TABLE (VEX_W_3A18_P_2) },
c0f3af97
L
9488 },
9489
9490 /* VEX_LEN_3A19_P_2 */
9491 {
d5d7db8e 9492 { "(bad)", { XX } },
9e30b8e0 9493 { VEX_W_TABLE (VEX_W_3A19_P_2) },
c0f3af97
L
9494 },
9495
9496 /* VEX_LEN_3A20_P_2 */
9497 {
9e30b8e0 9498 { VEX_W_TABLE (VEX_W_3A20_P_2) },
d5d7db8e 9499 { "(bad)", { XX } },
c0f3af97
L
9500 },
9501
9502 /* VEX_LEN_3A21_P_2 */
9503 {
9e30b8e0 9504 { VEX_W_TABLE (VEX_W_3A21_P_2) },
d5d7db8e 9505 { "(bad)", { XX } },
c0f3af97
L
9506 },
9507
9508 /* VEX_LEN_3A22_P_2 */
9509 {
9510 { "vpinsrK", { XM, Vex128, Edq, Ib } },
d5d7db8e 9511 { "(bad)", { XX } },
c0f3af97
L
9512 },
9513
9514 /* VEX_LEN_3A41_P_2 */
9515 {
9e30b8e0 9516 { VEX_W_TABLE (VEX_W_3A41_P_2) },
d5d7db8e 9517 { "(bad)", { XX } },
c0f3af97
L
9518 },
9519
9520 /* VEX_LEN_3A42_P_2 */
9521 {
9e30b8e0 9522 { VEX_W_TABLE (VEX_W_3A42_P_2) },
d5d7db8e 9523 { "(bad)", { XX } },
c0f3af97
L
9524 },
9525
ce2f5b3c
L
9526 /* VEX_LEN_3A44_P_2 */
9527 {
9e30b8e0 9528 { VEX_W_TABLE (VEX_W_3A44_P_2) },
ce2f5b3c
L
9529 { "(bad)", { XX } },
9530 },
9531
c0f3af97
L
9532 /* VEX_LEN_3A4C_P_2 */
9533 {
9e30b8e0 9534 { VEX_W_TABLE (VEX_W_3A4C_P_2) },
d5d7db8e 9535 { "(bad)", { XX } },
c0f3af97
L
9536 },
9537
9538 /* VEX_LEN_3A60_P_2 */
9539 {
9e30b8e0 9540 { VEX_W_TABLE (VEX_W_3A60_P_2) },
d5d7db8e 9541 { "(bad)", { XX } },
c0f3af97
L
9542 },
9543
9544 /* VEX_LEN_3A61_P_2 */
9545 {
9e30b8e0 9546 { VEX_W_TABLE (VEX_W_3A61_P_2) },
d5d7db8e 9547 { "(bad)", { XX } },
c0f3af97
L
9548 },
9549
9550 /* VEX_LEN_3A62_P_2 */
9551 {
9e30b8e0 9552 { VEX_W_TABLE (VEX_W_3A62_P_2) },
d5d7db8e 9553 { "(bad)", { XX } },
c0f3af97
L
9554 },
9555
9556 /* VEX_LEN_3A63_P_2 */
9557 {
9e30b8e0 9558 { VEX_W_TABLE (VEX_W_3A63_P_2) },
d5d7db8e 9559 { "(bad)", { XX } },
c0f3af97
L
9560 },
9561
922d8de8
DR
9562 /* VEX_LEN_3A6A_P_2 */
9563 {
206c2556 9564 { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9565 { "(bad)", { XX } },
9566 },
9567
9568 /* VEX_LEN_3A6B_P_2 */
9569 {
206c2556 9570 { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9571 { "(bad)", { XX } },
9572 },
9573
9574 /* VEX_LEN_3A6E_P_2 */
9575 {
206c2556 9576 { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9577 { "(bad)", { XX } },
9578 },
9579
9580 /* VEX_LEN_3A6F_P_2 */
9581 {
206c2556 9582 { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9583 { "(bad)", { XX } },
9584 },
9585
9586 /* VEX_LEN_3A7A_P_2 */
9587 {
206c2556 9588 { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9589 { "(bad)", { XX } },
9590 },
9591
9592 /* VEX_LEN_3A7B_P_2 */
9593 {
206c2556 9594 { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9595 { "(bad)", { XX } },
9596 },
9597
9598 /* VEX_LEN_3A7E_P_2 */
9599 {
206c2556 9600 { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9601 { "(bad)", { XX } },
9602 },
9603
9604 /* VEX_LEN_3A7F_P_2 */
9605 {
206c2556 9606 { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9607 { "(bad)", { XX } },
9608 },
9609
a5ff0eb2
L
9610 /* VEX_LEN_3ADF_P_2 */
9611 {
9e30b8e0 9612 { VEX_W_TABLE (VEX_W_3ADF_P_2) },
a5ff0eb2
L
9613 { "(bad)", { XX } },
9614 },
4c807e72 9615
5dd85c99
SP
9616 /* VEX_LEN_XOP_09_80 */
9617 {
4c807e72
L
9618 { "vfrczps", { XM, EXxmm } },
9619 { "vfrczps", { XM, EXymmq } },
5dd85c99 9620 },
4c807e72 9621
5dd85c99
SP
9622 /* VEX_LEN_XOP_09_81 */
9623 {
4c807e72
L
9624 { "vfrczpd", { XM, EXxmm } },
9625 { "vfrczpd", { XM, EXymmq } },
5dd85c99 9626 },
331d2d0d
L
9627};
9628
9e30b8e0 9629static const struct dis386 vex_w_table[][2] = {
b844680a 9630 {
9e30b8e0
L
9631 /* VEX_W_10_P_0 */
9632 { "vmovups", { XM, EXx } },
d8faab4e
L
9633 { "(bad)", { XX } },
9634 },
9635 {
9e30b8e0
L
9636 /* VEX_W_10_P_1 */
9637 { "vmovss", { XMVex, Vex128, EXd } },
9638 { "(bad)", { XX } },
d8faab4e
L
9639 },
9640 {
9e30b8e0
L
9641 /* VEX_W_10_P_2 */
9642 { "vmovupd", { XM, EXx } },
9643 { "(bad)", { XX } },
d8faab4e
L
9644 },
9645 {
9e30b8e0
L
9646 /* VEX_W_10_P_3 */
9647 { "vmovsd", { XMVex, Vex128, EXq } },
9648 { "(bad)", { XX } },
d8faab4e
L
9649 },
9650 {
9e30b8e0
L
9651 /* VEX_W_11_P_0 */
9652 { "vmovups", { EXxS, XM } },
9653 { "(bad)", { XX } },
d8faab4e
L
9654 },
9655 {
9e30b8e0
L
9656 /* VEX_W_11_P_1 */
9657 { "vmovss", { EXdVexS, Vex128, XM } },
9658 { "(bad)", { XX } },
b844680a
L
9659 },
9660 {
9e30b8e0
L
9661 /* VEX_W_11_P_2 */
9662 { "vmovupd", { EXxS, XM } },
9663 { "(bad)", { XX } },
b844680a
L
9664 },
9665 {
9e30b8e0
L
9666 /* VEX_W_11_P_3 */
9667 { "vmovsd", { EXqVexS, Vex128, XM } },
d8faab4e
L
9668 { "(bad)", { XX } },
9669 },
9670 {
9e30b8e0
L
9671 /* VEX_W_12_P_0_M_0 */
9672 { "vmovlps", { XM, Vex128, EXq } },
9673 { "(bad)", { XX } },
b844680a
L
9674 },
9675 {
9e30b8e0
L
9676 /* VEX_W_12_P_0_M_1 */
9677 { "vmovhlps", { XM, Vex128, EXq } },
b844680a
L
9678 { "(bad)", { XX } },
9679 },
9680 {
9e30b8e0
L
9681 /* VEX_W_12_P_1 */
9682 { "vmovsldup", { XM, EXx } },
b844680a 9683 { "(bad)", { XX } },
b844680a
L
9684 },
9685 {
9e30b8e0
L
9686 /* VEX_W_12_P_2 */
9687 { "vmovlpd", { XM, Vex128, EXq } },
92fddf8e 9688 { "(bad)", { XX } },
b844680a
L
9689 },
9690 {
9e30b8e0
L
9691 /* VEX_W_12_P_3 */
9692 { "vmovddup", { XM, EXymmq } },
92fddf8e 9693 { "(bad)", { XX } },
b844680a
L
9694 },
9695 {
9e30b8e0
L
9696 /* VEX_W_13_M_0 */
9697 { "vmovlpX", { EXq, XM } },
b844680a 9698 { "(bad)", { XX } },
b844680a
L
9699 },
9700 {
9e30b8e0
L
9701 /* VEX_W_14 */
9702 { "vunpcklpX", { XM, Vex, EXx } },
92fddf8e 9703 { "(bad)", { XX } },
b844680a
L
9704 },
9705 {
9e30b8e0
L
9706 /* VEX_W_15 */
9707 { "vunpckhpX", { XM, Vex, EXx } },
92fddf8e 9708 { "(bad)", { XX } },
b844680a
L
9709 },
9710 {
9e30b8e0
L
9711 /* VEX_W_16_P_0_M_0 */
9712 { "vmovhps", { XM, Vex128, EXq } },
b844680a 9713 { "(bad)", { XX } },
9e30b8e0
L
9714 },
9715 {
9716 /* VEX_W_16_P_0_M_1 */
9717 { "vmovlhps", { XM, Vex128, EXq } },
9718 { "(bad)", { XX } },
9719 },
9720 {
9721 /* VEX_W_16_P_1 */
9722 { "vmovshdup", { XM, EXx } },
9723 { "(bad)", { XX } },
9724 },
9725 {
9726 /* VEX_W_16_P_2 */
9727 { "vmovhpd", { XM, Vex128, EXq } },
9728 { "(bad)", { XX } },
9729 },
9730 {
9731 /* VEX_W_17_M_0 */
9732 { "vmovhpX", { EXq, XM } },
9733 { "(bad)", { XX } },
9734 },
9735 {
9736 /* VEX_W_28 */
9737 { "vmovapX", { XM, EXx } },
9738 { "(bad)", { XX } },
9739 },
9740 {
9741 /* VEX_W_29 */
9742 { "vmovapX", { EXxS, XM } },
9743 { "(bad)", { XX } },
9744 },
9745 {
9746 /* VEX_W_2B_M_0 */
9747 { "vmovntpX", { Mx, XM } },
9748 { "(bad)", { XX } },
9749 },
9750 {
9751 /* VEX_W_2E_P_0 */
9752 { "vucomiss", { XM, EXd } },
9753 { "(bad)", { XX } },
9754 },
9755 {
9756 /* VEX_W_2E_P_2 */
9757 { "vucomisd", { XM, EXq } },
9758 { "(bad)", { XX } },
9759 },
9760 {
9761 /* VEX_W_2F_P_0 */
9762 { "vcomiss", { XM, EXd } },
9763 { "(bad)", { XX } },
9764 },
9765 {
9766 /* VEX_W_2F_P_2 */
9767 { "vcomisd", { XM, EXq } },
9768 { "(bad)", { XX } },
9769 },
9770 {
9771 /* VEX_W_50_M_0 */
9772 { "vmovmskpX", { Gdq, XS } },
9773 { "(bad)", { XX } },
9774 },
9775 {
9776 /* VEX_W_51_P_0 */
9777 { "vsqrtps", { XM, EXx } },
9778 { "(bad)", { XX } },
9779 },
9780 {
9781 /* VEX_W_51_P_1 */
9782 { "vsqrtss", { XM, Vex128, EXd } },
9783 { "(bad)", { XX } },
9784 },
9785 {
9786 /* VEX_W_51_P_2 */
9787 { "vsqrtpd", { XM, EXx } },
9788 { "(bad)", { XX } },
9789 },
9790 {
9791 /* VEX_W_51_P_3 */
9792 { "vsqrtsd", { XM, Vex128, EXq } },
9793 { "(bad)", { XX } },
9794 },
9795 {
9796 /* VEX_W_52_P_0 */
9797 { "vrsqrtps", { XM, EXx } },
9798 { "(bad)", { XX } },
9799 },
9800 {
9801 /* VEX_W_52_P_1 */
9802 { "vrsqrtss", { XM, Vex128, EXd } },
9803 { "(bad)", { XX } },
9804 },
9805 {
9806 /* VEX_W_53_P_0 */
9807 { "vrcpps", { XM, EXx } },
9808 { "(bad)", { XX } },
9809 },
9810 {
9811 /* VEX_W_53_P_1 */
9812 { "vrcpss", { XM, Vex128, EXd } },
9813 { "(bad)", { XX } },
9814 },
9815 {
9816 /* VEX_W_58_P_0 */
9817 { "vaddps", { XM, Vex, EXx } },
9818 { "(bad)", { XX } },
9819 },
9820 {
9821 /* VEX_W_58_P_1 */
9822 { "vaddss", { XM, Vex128, EXd } },
9823 { "(bad)", { XX } },
9824 },
9825 {
9826 /* VEX_W_58_P_2 */
9827 { "vaddpd", { XM, Vex, EXx } },
9828 { "(bad)", { XX } },
9829 },
9830 {
9831 /* VEX_W_58_P_3 */
9832 { "vaddsd", { XM, Vex128, EXq } },
9833 { "(bad)", { XX } },
9834 },
9835 {
9836 /* VEX_W_59_P_0 */
9837 { "vmulps", { XM, Vex, EXx } },
9838 { "(bad)", { XX } },
9839 },
9840 {
9841 /* VEX_W_59_P_1 */
9842 { "vmulss", { XM, Vex128, EXd } },
9843 { "(bad)", { XX } },
9844 },
9845 {
9846 /* VEX_W_59_P_2 */
9847 { "vmulpd", { XM, Vex, EXx } },
9848 { "(bad)", { XX } },
9849 },
9850 {
9851 /* VEX_W_59_P_3 */
9852 { "vmulsd", { XM, Vex128, EXq } },
9853 { "(bad)", { XX } },
9854 },
9855 {
9856 /* VEX_W_5A_P_0 */
9857 { "vcvtps2pd", { XM, EXxmmq } },
9858 { "(bad)", { XX } },
9859 },
9860 {
9861 /* VEX_W_5A_P_1 */
9862 { "vcvtss2sd", { XM, Vex128, EXd } },
9863 { "(bad)", { XX } },
9864 },
9865 {
9866 /* VEX_W_5A_P_3 */
9867 { "vcvtsd2ss", { XM, Vex128, EXq } },
9868 { "(bad)", { XX } },
9869 },
9870 {
9871 /* VEX_W_5B_P_0 */
9872 { "vcvtdq2ps", { XM, EXx } },
9873 { "(bad)", { XX } },
9874 },
9875 {
9876 /* VEX_W_5B_P_1 */
9877 { "vcvttps2dq", { XM, EXx } },
9878 { "(bad)", { XX } },
9879 },
9880 {
9881 /* VEX_W_5B_P_2 */
9882 { "vcvtps2dq", { XM, EXx } },
9883 { "(bad)", { XX } },
9884 },
9885 {
9886 /* VEX_W_5C_P_0 */
9887 { "vsubps", { XM, Vex, EXx } },
9888 { "(bad)", { XX } },
9889 },
9890 {
9891 /* VEX_W_5C_P_1 */
9892 { "vsubss", { XM, Vex128, EXd } },
9893 { "(bad)", { XX } },
9894 },
9895 {
9896 /* VEX_W_5C_P_2 */
9897 { "vsubpd", { XM, Vex, EXx } },
9898 { "(bad)", { XX } },
9899 },
9900 {
9901 /* VEX_W_5C_P_3 */
9902 { "vsubsd", { XM, Vex128, EXq } },
9903 { "(bad)", { XX } },
9904 },
9905 {
9906 /* VEX_W_5D_P_0 */
9907 { "vminps", { XM, Vex, EXx } },
9908 { "(bad)", { XX } },
9909 },
9910 {
9911 /* VEX_W_5D_P_1 */
9912 { "vminss", { XM, Vex128, EXd } },
9913 { "(bad)", { XX } },
9914 },
9915 {
9916 /* VEX_W_5D_P_2 */
9917 { "vminpd", { XM, Vex, EXx } },
9918 { "(bad)", { XX } },
9919 },
9920 {
9921 /* VEX_W_5D_P_3 */
9922 { "vminsd", { XM, Vex128, EXq } },
9923 { "(bad)", { XX } },
9924 },
9925 {
9926 /* VEX_W_5E_P_0 */
9927 { "vdivps", { XM, Vex, EXx } },
9928 { "(bad)", { XX } },
9929 },
9930 {
9931 /* VEX_W_5E_P_1 */
9932 { "vdivss", { XM, Vex128, EXd } },
9933 { "(bad)", { XX } },
9934 },
9935 {
9936 /* VEX_W_5E_P_2 */
9937 { "vdivpd", { XM, Vex, EXx } },
9938 { "(bad)", { XX } },
9939 },
9940 {
9941 /* VEX_W_5E_P_3 */
9942 { "vdivsd", { XM, Vex128, EXq } },
9943 { "(bad)", { XX } },
9944 },
9945 {
9946 /* VEX_W_5F_P_0 */
9947 { "vmaxps", { XM, Vex, EXx } },
9948 { "(bad)", { XX } },
9949 },
9950 {
9951 /* VEX_W_5F_P_1 */
9952 { "vmaxss", { XM, Vex128, EXd } },
9953 { "(bad)", { XX } },
9954 },
9955 {
9956 /* VEX_W_5F_P_2 */
9957 { "vmaxpd", { XM, Vex, EXx } },
9958 { "(bad)", { XX } },
9959 },
9960 {
9961 /* VEX_W_5F_P_3 */
9962 { "vmaxsd", { XM, Vex128, EXq } },
9963 { "(bad)", { XX } },
9964 },
9965 {
9966 /* VEX_W_60_P_2 */
9967 { "vpunpcklbw", { XM, Vex128, EXx } },
9968 { "(bad)", { XX } },
9969 },
9970 {
9971 /* VEX_W_61_P_2 */
9972 { "vpunpcklwd", { XM, Vex128, EXx } },
9973 { "(bad)", { XX } },
9974 },
9975 {
9976 /* VEX_W_62_P_2 */
9977 { "vpunpckldq", { XM, Vex128, EXx } },
9978 { "(bad)", { XX } },
9979 },
9980 {
9981 /* VEX_W_63_P_2 */
9982 { "vpacksswb", { XM, Vex128, EXx } },
9983 { "(bad)", { XX } },
9984 },
9985 {
9986 /* VEX_W_64_P_2 */
9987 { "vpcmpgtb", { XM, Vex128, EXx } },
9988 { "(bad)", { XX } },
9989 },
9990 {
9991 /* VEX_W_65_P_2 */
9992 { "vpcmpgtw", { XM, Vex128, EXx } },
9993 { "(bad)", { XX } },
9994 },
9995 {
9996 /* VEX_W_66_P_2 */
9997 { "vpcmpgtd", { XM, Vex128, EXx } },
9998 { "(bad)", { XX } },
9999 },
10000 {
10001 /* VEX_W_67_P_2 */
10002 { "vpackuswb", { XM, Vex128, EXx } },
10003 { "(bad)", { XX } },
10004 },
10005 {
10006 /* VEX_W_68_P_2 */
10007 { "vpunpckhbw", { XM, Vex128, EXx } },
10008 { "(bad)", { XX } },
10009 },
10010 {
10011 /* VEX_W_69_P_2 */
10012 { "vpunpckhwd", { XM, Vex128, EXx } },
10013 { "(bad)", { XX } },
10014 },
10015 {
10016 /* VEX_W_6A_P_2 */
10017 { "vpunpckhdq", { XM, Vex128, EXx } },
10018 { "(bad)", { XX } },
10019 },
10020 {
10021 /* VEX_W_6B_P_2 */
10022 { "vpackssdw", { XM, Vex128, EXx } },
10023 { "(bad)", { XX } },
10024 },
10025 {
10026 /* VEX_W_6C_P_2 */
10027 { "vpunpcklqdq", { XM, Vex128, EXx } },
10028 { "(bad)", { XX } },
10029 },
10030 {
10031 /* VEX_W_6D_P_2 */
10032 { "vpunpckhqdq", { XM, Vex128, EXx } },
10033 { "(bad)", { XX } },
10034 },
10035 {
10036 /* VEX_W_6F_P_1 */
efdb52b7 10037 { "vmovdqu", { XM, EXx } },
9e30b8e0
L
10038 { "(bad)", { XX } },
10039 },
10040 {
10041 /* VEX_W_6F_P_2 */
efdb52b7 10042 { "vmovdqa", { XM, EXx } },
9e30b8e0
L
10043 { "(bad)", { XX } },
10044 },
10045 {
10046 /* VEX_W_70_P_1 */
10047 { "vpshufhw", { XM, EXx, Ib } },
10048 { "(bad)", { XX } },
10049 },
10050 {
10051 /* VEX_W_70_P_2 */
10052 { "vpshufd", { XM, EXx, Ib } },
10053 { "(bad)", { XX } },
10054 },
10055 {
10056 /* VEX_W_70_P_3 */
10057 { "vpshuflw", { XM, EXx, Ib } },
10058 { "(bad)", { XX } },
10059 },
10060 {
10061 /* VEX_W_71_R_2_P_2 */
10062 { "vpsrlw", { Vex128, XS, Ib } },
10063 { "(bad)", { XX } },
10064 },
10065 {
10066 /* VEX_W_71_R_4_P_2 */
10067 { "vpsraw", { Vex128, XS, Ib } },
10068 { "(bad)", { XX } },
10069 },
10070 {
10071 /* VEX_W_71_R_6_P_2 */
10072 { "vpsllw", { Vex128, XS, Ib } },
10073 { "(bad)", { XX } },
10074 },
10075 {
10076 /* VEX_W_72_R_2_P_2 */
10077 { "vpsrld", { Vex128, XS, Ib } },
10078 { "(bad)", { XX } },
10079 },
10080 {
10081 /* VEX_W_72_R_4_P_2 */
10082 { "vpsrad", { Vex128, XS, Ib } },
10083 { "(bad)", { XX } },
10084 },
10085 {
10086 /* VEX_W_72_R_6_P_2 */
10087 { "vpslld", { Vex128, XS, Ib } },
10088 { "(bad)", { XX } },
10089 },
10090 {
10091 /* VEX_W_73_R_2_P_2 */
10092 { "vpsrlq", { Vex128, XS, Ib } },
10093 { "(bad)", { XX } },
10094 },
10095 {
10096 /* VEX_W_73_R_3_P_2 */
10097 { "vpsrldq", { Vex128, XS, Ib } },
10098 { "(bad)", { XX } },
10099 },
10100 {
10101 /* VEX_W_73_R_6_P_2 */
10102 { "vpsllq", { Vex128, XS, Ib } },
10103 { "(bad)", { XX } },
10104 },
10105 {
10106 /* VEX_W_73_R_7_P_2 */
10107 { "vpslldq", { Vex128, XS, Ib } },
10108 { "(bad)", { XX } },
10109 },
10110 {
10111 /* VEX_W_74_P_2 */
10112 { "vpcmpeqb", { XM, Vex128, EXx } },
10113 { "(bad)", { XX } },
10114 },
10115 {
10116 /* VEX_W_75_P_2 */
10117 { "vpcmpeqw", { XM, Vex128, EXx } },
10118 { "(bad)", { XX } },
10119 },
10120 {
10121 /* VEX_W_76_P_2 */
10122 { "vpcmpeqd", { XM, Vex128, EXx } },
10123 { "(bad)", { XX } },
10124 },
10125 {
10126 /* VEX_W_77_P_0 */
10127 { "", { VZERO } },
10128 { "(bad)", { XX } },
10129 },
10130 {
10131 /* VEX_W_7C_P_2 */
10132 { "vhaddpd", { XM, Vex, EXx } },
10133 { "(bad)", { XX } },
10134 },
10135 {
10136 /* VEX_W_7C_P_3 */
10137 { "vhaddps", { XM, Vex, EXx } },
10138 { "(bad)", { XX } },
10139 },
10140 {
10141 /* VEX_W_7D_P_2 */
10142 { "vhsubpd", { XM, Vex, EXx } },
10143 { "(bad)", { XX } },
10144 },
10145 {
10146 /* VEX_W_7D_P_3 */
10147 { "vhsubps", { XM, Vex, EXx } },
10148 { "(bad)", { XX } },
10149 },
10150 {
10151 /* VEX_W_7E_P_1 */
10152 { "vmovq", { XM, EXq } },
10153 { "(bad)", { XX } },
10154 },
10155 {
10156 /* VEX_W_7F_P_1 */
10157 { "vmovdqu", { EXxS, XM } },
10158 { "(bad)", { XX } },
10159 },
10160 {
10161 /* VEX_W_7F_P_2 */
10162 { "vmovdqa", { EXxS, XM } },
10163 { "(bad)", { XX } },
10164 },
10165 {
10166 /* VEX_W_AE_R_2_M_0 */
10167 { "vldmxcsr", { Md } },
10168 { "(bad)", { XX } },
10169 },
10170 {
10171 /* VEX_W_AE_R_3_M_0 */
10172 { "vstmxcsr", { Md } },
10173 { "(bad)", { XX } },
10174 },
10175 {
10176 /* VEX_W_C2_P_0 */
10177 { "vcmpps", { XM, Vex, EXx, VCMP } },
10178 { "(bad)", { XX } },
10179 },
10180 {
10181 /* VEX_W_C2_P_1 */
10182 { "vcmpss", { XM, Vex128, EXd, VCMP } },
10183 { "(bad)", { XX } },
10184 },
10185 {
10186 /* VEX_W_C2_P_2 */
10187 { "vcmppd", { XM, Vex, EXx, VCMP } },
10188 { "(bad)", { XX } },
10189 },
10190 {
10191 /* VEX_W_C2_P_3 */
10192 { "vcmpsd", { XM, Vex128, EXq, VCMP } },
10193 { "(bad)", { XX } },
10194 },
10195 {
10196 /* VEX_W_C4_P_2 */
10197 { "vpinsrw", { XM, Vex128, Edqw, Ib } },
10198 { "(bad)", { XX } },
10199 },
10200 {
10201 /* VEX_W_C5_P_2 */
10202 { "vpextrw", { Gdq, XS, Ib } },
10203 { "(bad)", { XX } },
10204 },
10205 {
10206 /* VEX_W_D0_P_2 */
10207 { "vaddsubpd", { XM, Vex, EXx } },
10208 { "(bad)", { XX } },
10209 },
10210 {
10211 /* VEX_W_D0_P_3 */
10212 { "vaddsubps", { XM, Vex, EXx } },
10213 { "(bad)", { XX } },
10214 },
10215 {
10216 /* VEX_W_D1_P_2 */
10217 { "vpsrlw", { XM, Vex128, EXx } },
10218 { "(bad)", { XX } },
10219 },
10220 {
10221 /* VEX_W_D2_P_2 */
10222 { "vpsrld", { XM, Vex128, EXx } },
10223 { "(bad)", { XX } },
10224 },
10225 {
10226 /* VEX_W_D3_P_2 */
10227 { "vpsrlq", { XM, Vex128, EXx } },
10228 { "(bad)", { XX } },
10229 },
10230 {
10231 /* VEX_W_D4_P_2 */
10232 { "vpaddq", { XM, Vex128, EXx } },
10233 { "(bad)", { XX } },
10234 },
10235 {
10236 /* VEX_W_D5_P_2 */
10237 { "vpmullw", { XM, Vex128, EXx } },
10238 { "(bad)", { XX } },
10239 },
10240 {
10241 /* VEX_W_D6_P_2 */
10242 { "vmovq", { EXqS, XM } },
10243 { "(bad)", { XX } },
10244 },
10245 {
10246 /* VEX_W_D7_P_2_M_1 */
10247 { "vpmovmskb", { Gdq, XS } },
10248 { "(bad)", { XX } },
10249 },
10250 {
10251 /* VEX_W_D8_P_2 */
10252 { "vpsubusb", { XM, Vex128, EXx } },
10253 { "(bad)", { XX } },
10254 },
10255 {
10256 /* VEX_W_D9_P_2 */
10257 { "vpsubusw", { XM, Vex128, EXx } },
10258 { "(bad)", { XX } },
10259 },
10260 {
10261 /* VEX_W_DA_P_2 */
10262 { "vpminub", { XM, Vex128, EXx } },
10263 { "(bad)", { XX } },
10264 },
10265 {
10266 /* VEX_W_DB_P_2 */
10267 { "vpand", { XM, Vex128, EXx } },
10268 { "(bad)", { XX } },
10269 },
10270 {
10271 /* VEX_W_DC_P_2 */
10272 { "vpaddusb", { XM, Vex128, EXx } },
10273 { "(bad)", { XX } },
10274 },
10275 {
10276 /* VEX_W_DD_P_2 */
10277 { "vpaddusw", { XM, Vex128, EXx } },
10278 { "(bad)", { XX } },
10279 },
10280 {
10281 /* VEX_W_DE_P_2 */
10282 { "vpmaxub", { XM, Vex128, EXx } },
10283 { "(bad)", { XX } },
10284 },
10285 {
10286 /* VEX_W_DF_P_2 */
10287 { "vpandn", { XM, Vex128, EXx } },
10288 { "(bad)", { XX } },
10289 },
10290 {
10291 /* VEX_W_E0_P_2 */
10292 { "vpavgb", { XM, Vex128, EXx } },
10293 { "(bad)", { XX } },
10294 },
10295 {
10296 /* VEX_W_E1_P_2 */
10297 { "vpsraw", { XM, Vex128, EXx } },
10298 { "(bad)", { XX } },
10299 },
10300 {
10301 /* VEX_W_E2_P_2 */
10302 { "vpsrad", { XM, Vex128, EXx } },
10303 { "(bad)", { XX } },
10304 },
10305 {
10306 /* VEX_W_E3_P_2 */
10307 { "vpavgw", { XM, Vex128, EXx } },
10308 { "(bad)", { XX } },
10309 },
10310 {
10311 /* VEX_W_E4_P_2 */
10312 { "vpmulhuw", { XM, Vex128, EXx } },
10313 { "(bad)", { XX } },
10314 },
10315 {
10316 /* VEX_W_E5_P_2 */
10317 { "vpmulhw", { XM, Vex128, EXx } },
10318 { "(bad)", { XX } },
10319 },
10320 {
10321 /* VEX_W_E6_P_1 */
efdb52b7 10322 { "vcvtdq2pd", { XM, EXxmmq } },
9e30b8e0
L
10323 { "(bad)", { XX } },
10324 },
10325 {
10326 /* VEX_W_E6_P_2 */
a179a9fd 10327 { "vcvttpd2dq%XY", { XMM, EXx } },
9e30b8e0
L
10328 { "(bad)", { XX } },
10329 },
10330 {
10331 /* VEX_W_E6_P_3 */
a179a9fd 10332 { "vcvtpd2dq%XY", { XMM, EXx } },
9e30b8e0
L
10333 { "(bad)", { XX } },
10334 },
10335 {
10336 /* VEX_W_E7_P_2_M_0 */
10337 { "vmovntdq", { Mx, XM } },
10338 { "(bad)", { XX } },
10339 },
10340 {
10341 /* VEX_W_E8_P_2 */
10342 { "vpsubsb", { XM, Vex128, EXx } },
10343 { "(bad)", { XX } },
10344 },
10345 {
10346 /* VEX_W_E9_P_2 */
10347 { "vpsubsw", { XM, Vex128, EXx } },
10348 { "(bad)", { XX } },
10349 },
10350 {
10351 /* VEX_W_EA_P_2 */
10352 { "vpminsw", { XM, Vex128, EXx } },
10353 { "(bad)", { XX } },
10354 },
10355 {
10356 /* VEX_W_EB_P_2 */
10357 { "vpor", { XM, Vex128, EXx } },
10358 { "(bad)", { XX } },
10359 },
10360 {
10361 /* VEX_W_EC_P_2 */
10362 { "vpaddsb", { XM, Vex128, EXx } },
10363 { "(bad)", { XX } },
10364 },
10365 {
10366 /* VEX_W_ED_P_2 */
10367 { "vpaddsw", { XM, Vex128, EXx } },
10368 { "(bad)", { XX } },
10369 },
10370 {
10371 /* VEX_W_EE_P_2 */
10372 { "vpmaxsw", { XM, Vex128, EXx } },
10373 { "(bad)", { XX } },
10374 },
10375 {
10376 /* VEX_W_EF_P_2 */
10377 { "vpxor", { XM, Vex128, EXx } },
10378 { "(bad)", { XX } },
10379 },
10380 {
10381 /* VEX_W_F0_P_3_M_0 */
10382 { "vlddqu", { XM, M } },
10383 { "(bad)", { XX } },
10384 },
10385 {
10386 /* VEX_W_F1_P_2 */
10387 { "vpsllw", { XM, Vex128, EXx } },
10388 { "(bad)", { XX } },
10389 },
10390 {
10391 /* VEX_W_F2_P_2 */
10392 { "vpslld", { XM, Vex128, EXx } },
10393 { "(bad)", { XX } },
10394 },
10395 {
10396 /* VEX_W_F3_P_2 */
10397 { "vpsllq", { XM, Vex128, EXx } },
10398 { "(bad)", { XX } },
10399 },
10400 {
10401 /* VEX_W_F4_P_2 */
10402 { "vpmuludq", { XM, Vex128, EXx } },
10403 { "(bad)", { XX } },
10404 },
10405 {
10406 /* VEX_W_F5_P_2 */
10407 { "vpmaddwd", { XM, Vex128, EXx } },
10408 { "(bad)", { XX } },
10409 },
10410 {
10411 /* VEX_W_F6_P_2 */
10412 { "vpsadbw", { XM, Vex128, EXx } },
10413 { "(bad)", { XX } },
10414 },
10415 {
10416 /* VEX_W_F7_P_2 */
10417 { "vmaskmovdqu", { XM, XS } },
10418 { "(bad)", { XX } },
10419 },
10420 {
10421 /* VEX_W_F8_P_2 */
10422 { "vpsubb", { XM, Vex128, EXx } },
10423 { "(bad)", { XX } },
10424 },
10425 {
10426 /* VEX_W_F9_P_2 */
10427 { "vpsubw", { XM, Vex128, EXx } },
10428 { "(bad)", { XX } },
10429 },
10430 {
10431 /* VEX_W_FA_P_2 */
10432 { "vpsubd", { XM, Vex128, EXx } },
10433 { "(bad)", { XX } },
10434 },
10435 {
10436 /* VEX_W_FB_P_2 */
10437 { "vpsubq", { XM, Vex128, EXx } },
10438 { "(bad)", { XX } },
10439 },
10440 {
10441 /* VEX_W_FC_P_2 */
10442 { "vpaddb", { XM, Vex128, EXx } },
10443 { "(bad)", { XX } },
10444 },
10445 {
10446 /* VEX_W_FD_P_2 */
10447 { "vpaddw", { XM, Vex128, EXx } },
10448 { "(bad)", { XX } },
10449 },
10450 {
10451 /* VEX_W_FE_P_2 */
10452 { "vpaddd", { XM, Vex128, EXx } },
10453 { "(bad)", { XX } },
10454 },
10455 {
10456 /* VEX_W_3800_P_2 */
10457 { "vpshufb", { XM, Vex128, EXx } },
10458 { "(bad)", { XX } },
10459 },
10460 {
10461 /* VEX_W_3801_P_2 */
10462 { "vphaddw", { XM, Vex128, EXx } },
10463 { "(bad)", { XX } },
10464 },
10465 {
10466 /* VEX_W_3802_P_2 */
10467 { "vphaddd", { XM, Vex128, EXx } },
10468 { "(bad)", { XX } },
10469 },
10470 {
10471 /* VEX_W_3803_P_2 */
10472 { "vphaddsw", { XM, Vex128, EXx } },
10473 { "(bad)", { XX } },
10474 },
10475 {
10476 /* VEX_W_3804_P_2 */
10477 { "vpmaddubsw", { XM, Vex128, EXx } },
10478 { "(bad)", { XX } },
10479 },
10480 {
10481 /* VEX_W_3805_P_2 */
10482 { "vphsubw", { XM, Vex128, EXx } },
10483 { "(bad)", { XX } },
10484 },
10485 {
10486 /* VEX_W_3806_P_2 */
10487 { "vphsubd", { XM, Vex128, EXx } },
10488 { "(bad)", { XX } },
10489 },
10490 {
10491 /* VEX_W_3807_P_2 */
10492 { "vphsubsw", { XM, Vex128, EXx } },
10493 { "(bad)", { XX } },
10494 },
10495 {
10496 /* VEX_W_3808_P_2 */
10497 { "vpsignb", { XM, Vex128, EXx } },
10498 { "(bad)", { XX } },
10499 },
10500 {
10501 /* VEX_W_3809_P_2 */
10502 { "vpsignw", { XM, Vex128, EXx } },
10503 { "(bad)", { XX } },
10504 },
10505 {
10506 /* VEX_W_380A_P_2 */
10507 { "vpsignd", { XM, Vex128, EXx } },
10508 { "(bad)", { XX } },
10509 },
10510 {
10511 /* VEX_W_380B_P_2 */
10512 { "vpmulhrsw", { XM, Vex128, EXx } },
10513 { "(bad)", { XX } },
10514 },
10515 {
10516 /* VEX_W_380C_P_2 */
10517 { "vpermilps", { XM, Vex, EXx } },
10518 { "(bad)", { XX } },
10519 },
10520 {
10521 /* VEX_W_380D_P_2 */
10522 { "vpermilpd", { XM, Vex, EXx } },
10523 { "(bad)", { XX } },
10524 },
10525 {
10526 /* VEX_W_380E_P_2 */
10527 { "vtestps", { XM, EXx } },
10528 { "(bad)", { XX } },
10529 },
10530 {
10531 /* VEX_W_380F_P_2 */
10532 { "vtestpd", { XM, EXx } },
10533 { "(bad)", { XX } },
10534 },
10535 {
10536 /* VEX_W_3817_P_2 */
10537 { "vptest", { XM, EXx } },
10538 { "(bad)", { XX } },
10539 },
bcf2684f
L
10540 {
10541 /* VEX_W_3818_P_2_M_0 */
10542 { "vbroadcastss", { XM, Md } },
10543 { "(bad)", { XX } },
10544 },
9e30b8e0
L
10545 {
10546 /* VEX_W_3819_P_2_M_0 */
10547 { "vbroadcastsd", { XM, Mq } },
10548 { "(bad)", { XX } },
10549 },
10550 {
10551 /* VEX_W_381A_P_2_M_0 */
10552 { "vbroadcastf128", { XM, Mxmm } },
10553 { "(bad)", { XX } },
10554 },
10555 {
10556 /* VEX_W_381C_P_2 */
10557 { "vpabsb", { XM, EXx } },
10558 { "(bad)", { XX } },
10559 },
10560 {
10561 /* VEX_W_381D_P_2 */
10562 { "vpabsw", { XM, EXx } },
10563 { "(bad)", { XX } },
10564 },
10565 {
10566 /* VEX_W_381E_P_2 */
10567 { "vpabsd", { XM, EXx } },
10568 { "(bad)", { XX } },
10569 },
10570 {
10571 /* VEX_W_3820_P_2 */
10572 { "vpmovsxbw", { XM, EXq } },
10573 { "(bad)", { XX } },
10574 },
10575 {
10576 /* VEX_W_3821_P_2 */
10577 { "vpmovsxbd", { XM, EXd } },
10578 { "(bad)", { XX } },
10579 },
10580 {
10581 /* VEX_W_3822_P_2 */
10582 { "vpmovsxbq", { XM, EXw } },
10583 { "(bad)", { XX } },
10584 },
10585 {
10586 /* VEX_W_3823_P_2 */
10587 { "vpmovsxwd", { XM, EXq } },
10588 { "(bad)", { XX } },
10589 },
10590 {
10591 /* VEX_W_3824_P_2 */
10592 { "vpmovsxwq", { XM, EXd } },
10593 { "(bad)", { XX } },
10594 },
10595 {
10596 /* VEX_W_3825_P_2 */
10597 { "vpmovsxdq", { XM, EXq } },
10598 { "(bad)", { XX } },
10599 },
10600 {
10601 /* VEX_W_3828_P_2 */
10602 { "vpmuldq", { XM, Vex128, EXx } },
10603 { "(bad)", { XX } },
10604 },
10605 {
10606 /* VEX_W_3829_P_2 */
10607 { "vpcmpeqq", { XM, Vex128, EXx } },
10608 { "(bad)", { XX } },
10609 },
10610 {
10611 /* VEX_W_382A_P_2_M_0 */
10612 { "vmovntdqa", { XM, Mx } },
10613 { "(bad)", { XX } },
10614 },
10615 {
10616 /* VEX_W_382B_P_2 */
10617 { "vpackusdw", { XM, Vex128, EXx } },
10618 { "(bad)", { XX } },
10619 },
53aa04a0
L
10620 {
10621 /* VEX_W_382C_P_2_M_0 */
10622 { "vmaskmovps", { XM, Vex, Mx } },
10623 { "(bad)", { XX } },
10624 },
10625 {
10626 /* VEX_W_382D_P_2_M_0 */
10627 { "vmaskmovpd", { XM, Vex, Mx } },
10628 { "(bad)", { XX } },
10629 },
10630 {
10631 /* VEX_W_382E_P_2_M_0 */
10632 { "vmaskmovps", { Mx, Vex, XM } },
10633 { "(bad)", { XX } },
10634 },
10635 {
10636 /* VEX_W_382F_P_2_M_0 */
10637 { "vmaskmovpd", { Mx, Vex, XM } },
10638 { "(bad)", { XX } },
10639 },
9e30b8e0
L
10640 {
10641 /* VEX_W_3830_P_2 */
10642 { "vpmovzxbw", { XM, EXq } },
10643 { "(bad)", { XX } },
10644 },
10645 {
10646 /* VEX_W_3831_P_2 */
10647 { "vpmovzxbd", { XM, EXd } },
10648 { "(bad)", { XX } },
10649 },
10650 {
10651 /* VEX_W_3832_P_2 */
10652 { "vpmovzxbq", { XM, EXw } },
10653 { "(bad)", { XX } },
10654 },
10655 {
10656 /* VEX_W_3833_P_2 */
10657 { "vpmovzxwd", { XM, EXq } },
10658 { "(bad)", { XX } },
10659 },
10660 {
10661 /* VEX_W_3834_P_2 */
10662 { "vpmovzxwq", { XM, EXd } },
10663 { "(bad)", { XX } },
10664 },
10665 {
10666 /* VEX_W_3835_P_2 */
10667 { "vpmovzxdq", { XM, EXq } },
10668 { "(bad)", { XX } },
10669 },
10670 {
10671 /* VEX_W_3837_P_2 */
10672 { "vpcmpgtq", { XM, Vex128, EXx } },
10673 { "(bad)", { XX } },
10674 },
10675 {
10676 /* VEX_W_3838_P_2 */
10677 { "vpminsb", { XM, Vex128, EXx } },
10678 { "(bad)", { XX } },
10679 },
10680 {
10681 /* VEX_W_3839_P_2 */
10682 { "vpminsd", { XM, Vex128, EXx } },
10683 { "(bad)", { XX } },
10684 },
10685 {
10686 /* VEX_W_383A_P_2 */
10687 { "vpminuw", { XM, Vex128, EXx } },
10688 { "(bad)", { XX } },
10689 },
10690 {
10691 /* VEX_W_383B_P_2 */
10692 { "vpminud", { XM, Vex128, EXx } },
10693 { "(bad)", { XX } },
10694 },
10695 {
10696 /* VEX_W_383C_P_2 */
10697 { "vpmaxsb", { XM, Vex128, EXx } },
10698 { "(bad)", { XX } },
10699 },
10700 {
10701 /* VEX_W_383D_P_2 */
10702 { "vpmaxsd", { XM, Vex128, EXx } },
10703 { "(bad)", { XX } },
10704 },
10705 {
10706 /* VEX_W_383E_P_2 */
10707 { "vpmaxuw", { XM, Vex128, EXx } },
10708 { "(bad)", { XX } },
10709 },
10710 {
10711 /* VEX_W_383F_P_2 */
10712 { "vpmaxud", { XM, Vex128, EXx } },
10713 { "(bad)", { XX } },
10714 },
10715 {
10716 /* VEX_W_3840_P_2 */
10717 { "vpmulld", { XM, Vex128, EXx } },
10718 { "(bad)", { XX } },
10719 },
10720 {
10721 /* VEX_W_3841_P_2 */
10722 { "vphminposuw", { XM, EXx } },
10723 { "(bad)", { XX } },
10724 },
10725 {
10726 /* VEX_W_38DB_P_2 */
10727 { "vaesimc", { XM, EXx } },
10728 { "(bad)", { XX } },
10729 },
10730 {
10731 /* VEX_W_38DC_P_2 */
10732 { "vaesenc", { XM, Vex128, EXx } },
10733 { "(bad)", { XX } },
10734 },
10735 {
10736 /* VEX_W_38DD_P_2 */
10737 { "vaesenclast", { XM, Vex128, EXx } },
10738 { "(bad)", { XX } },
10739 },
10740 {
10741 /* VEX_W_38DE_P_2 */
10742 { "vaesdec", { XM, Vex128, EXx } },
10743 { "(bad)", { XX } },
10744 },
10745 {
10746 /* VEX_W_38DF_P_2 */
10747 { "vaesdeclast", { XM, Vex128, EXx } },
10748 { "(bad)", { XX } },
10749 },
10750 {
10751 /* VEX_W_3A04_P_2 */
10752 { "vpermilps", { XM, EXx, Ib } },
10753 { "(bad)", { XX } },
10754 },
10755 {
10756 /* VEX_W_3A05_P_2 */
10757 { "vpermilpd", { XM, EXx, Ib } },
10758 { "(bad)", { XX } },
10759 },
10760 {
10761 /* VEX_W_3A06_P_2 */
10762 { "vperm2f128", { XM, Vex256, EXx, Ib } },
10763 { "(bad)", { XX } },
10764 },
10765 {
10766 /* VEX_W_3A08_P_2 */
10767 { "vroundps", { XM, EXx, Ib } },
10768 { "(bad)", { XX } },
10769 },
10770 {
10771 /* VEX_W_3A09_P_2 */
10772 { "vroundpd", { XM, EXx, Ib } },
10773 { "(bad)", { XX } },
10774 },
10775 {
10776 /* VEX_W_3A0A_P_2 */
10777 { "vroundss", { XM, Vex128, EXd, Ib } },
10778 { "(bad)", { XX } },
10779 },
10780 {
10781 /* VEX_W_3A0B_P_2 */
10782 { "vroundsd", { XM, Vex128, EXq, Ib } },
10783 { "(bad)", { XX } },
10784 },
10785 {
10786 /* VEX_W_3A0C_P_2 */
10787 { "vblendps", { XM, Vex, EXx, Ib } },
10788 { "(bad)", { XX } },
10789 },
10790 {
10791 /* VEX_W_3A0D_P_2 */
10792 { "vblendpd", { XM, Vex, EXx, Ib } },
10793 { "(bad)", { XX } },
10794 },
10795 {
10796 /* VEX_W_3A0E_P_2 */
10797 { "vpblendw", { XM, Vex128, EXx, Ib } },
10798 { "(bad)", { XX } },
10799 },
10800 {
10801 /* VEX_W_3A0F_P_2 */
10802 { "vpalignr", { XM, Vex128, EXx, Ib } },
10803 { "(bad)", { XX } },
10804 },
10805 {
10806 /* VEX_W_3A14_P_2 */
10807 { "vpextrb", { Edqb, XM, Ib } },
10808 { "(bad)", { XX } },
10809 },
10810 {
10811 /* VEX_W_3A15_P_2 */
10812 { "vpextrw", { Edqw, XM, Ib } },
10813 { "(bad)", { XX } },
10814 },
10815 {
10816 /* VEX_W_3A18_P_2 */
10817 { "vinsertf128", { XM, Vex256, EXxmm, Ib } },
10818 { "(bad)", { XX } },
10819 },
10820 {
10821 /* VEX_W_3A19_P_2 */
10822 { "vextractf128", { EXxmm, XM, Ib } },
10823 { "(bad)", { XX } },
10824 },
10825 {
10826 /* VEX_W_3A20_P_2 */
10827 { "vpinsrb", { XM, Vex128, Edqb, Ib } },
10828 { "(bad)", { XX } },
10829 },
10830 {
10831 /* VEX_W_3A21_P_2 */
10832 { "vinsertps", { XM, Vex128, EXd, Ib } },
10833 { "(bad)", { XX } },
10834 },
10835 {
10836 /* VEX_W_3A40_P_2 */
10837 { "vdpps", { XM, Vex, EXx, Ib } },
10838 { "(bad)", { XX } },
10839 },
10840 {
10841 /* VEX_W_3A41_P_2 */
10842 { "vdppd", { XM, Vex128, EXx, Ib } },
10843 { "(bad)", { XX } },
10844 },
10845 {
10846 /* VEX_W_3A42_P_2 */
10847 { "vmpsadbw", { XM, Vex128, EXx, Ib } },
10848 { "(bad)", { XX } },
10849 },
10850 {
10851 /* VEX_W_3A44_P_2 */
10852 { "vpclmulqdq", { XM, Vex128, EXx, PCLMUL } },
10853 { "(bad)", { XX } },
10854 },
10855 {
10856 /* VEX_W_3A4A_P_2 */
10857 { "vblendvps", { XM, Vex, EXx, XMVexI4 } },
10858 { "(bad)", { XX } },
10859 },
10860 {
10861 /* VEX_W_3A4B_P_2 */
10862 { "vblendvpd", { XM, Vex, EXx, XMVexI4 } },
10863 { "(bad)", { XX } },
10864 },
10865 {
10866 /* VEX_W_3A4C_P_2 */
10867 { "vpblendvb", { XM, Vex128, EXx, XMVexI4 } },
10868 { "(bad)", { XX } },
10869 },
10870 {
10871 /* VEX_W_3A60_P_2 */
10872 { "vpcmpestrm", { XM, EXx, Ib } },
10873 { "(bad)", { XX } },
10874 },
10875 {
10876 /* VEX_W_3A61_P_2 */
10877 { "vpcmpestri", { XM, EXx, Ib } },
10878 { "(bad)", { XX } },
10879 },
10880 {
10881 /* VEX_W_3A62_P_2 */
10882 { "vpcmpistrm", { XM, EXx, Ib } },
10883 { "(bad)", { XX } },
10884 },
10885 {
10886 /* VEX_W_3A63_P_2 */
10887 { "vpcmpistri", { XM, EXx, Ib } },
10888 { "(bad)", { XX } },
10889 },
10890 {
10891 /* VEX_W_3ADF_P_2 */
10892 { "vaeskeygenassist", { XM, EXx, Ib } },
10893 { "(bad)", { XX } },
10894 },
10895};
10896
10897static const struct dis386 mod_table[][2] = {
10898 {
10899 /* MOD_8D */
10900 { "leaS", { Gv, M } },
10901 { "(bad)", { XX } },
10902 },
10903 {
10904 /* MOD_0F01_REG_0 */
10905 { X86_64_TABLE (X86_64_0F01_REG_0) },
10906 { RM_TABLE (RM_0F01_REG_0) },
10907 },
10908 {
10909 /* MOD_0F01_REG_1 */
10910 { X86_64_TABLE (X86_64_0F01_REG_1) },
10911 { RM_TABLE (RM_0F01_REG_1) },
10912 },
10913 {
10914 /* MOD_0F01_REG_2 */
10915 { X86_64_TABLE (X86_64_0F01_REG_2) },
10916 { RM_TABLE (RM_0F01_REG_2) },
10917 },
10918 {
10919 /* MOD_0F01_REG_3 */
10920 { X86_64_TABLE (X86_64_0F01_REG_3) },
10921 { RM_TABLE (RM_0F01_REG_3) },
10922 },
10923 {
10924 /* MOD_0F01_REG_7 */
10925 { "invlpg", { Mb } },
10926 { RM_TABLE (RM_0F01_REG_7) },
10927 },
10928 {
10929 /* MOD_0F12_PREFIX_0 */
10930 { "movlps", { XM, EXq } },
10931 { "movhlps", { XM, EXq } },
10932 },
10933 {
10934 /* MOD_0F13 */
10935 { "movlpX", { EXq, XM } },
10936 { "(bad)", { XX } },
10937 },
10938 {
10939 /* MOD_0F16_PREFIX_0 */
10940 { "movhps", { XM, EXq } },
10941 { "movlhps", { XM, EXq } },
10942 },
10943 {
10944 /* MOD_0F17 */
10945 { "movhpX", { EXq, XM } },
10946 { "(bad)", { XX } },
10947 },
10948 {
10949 /* MOD_0F18_REG_0 */
10950 { "prefetchnta", { Mb } },
10951 { "(bad)", { XX } },
10952 },
10953 {
10954 /* MOD_0F18_REG_1 */
10955 { "prefetcht0", { Mb } },
10956 { "(bad)", { XX } },
10957 },
10958 {
10959 /* MOD_0F18_REG_2 */
10960 { "prefetcht1", { Mb } },
10961 { "(bad)", { XX } },
10962 },
10963 {
10964 /* MOD_0F18_REG_3 */
10965 { "prefetcht2", { Mb } },
10966 { "(bad)", { XX } },
10967 },
10968 {
10969 /* MOD_0F20 */
10970 { "(bad)", { XX } },
10971 { "movZ", { Rm, Cm } },
10972 },
10973 {
10974 /* MOD_0F21 */
10975 { "(bad)", { XX } },
10976 { "movZ", { Rm, Dm } },
10977 },
10978 {
10979 /* MOD_0F22 */
10980 { "(bad)", { XX } },
10981 { "movZ", { Cm, Rm } },
b844680a
L
10982 },
10983 {
92fddf8e 10984 /* MOD_0F23 */
b844680a 10985 { "(bad)", { XX } },
92fddf8e 10986 { "movZ", { Dm, Rm } },
b844680a
L
10987 },
10988 {
92fddf8e 10989 /* MOD_0F24 */
c1e679ec 10990 { "(bad)", { XX } },
92fddf8e 10991 { "movL", { Rd, Td } },
b844680a
L
10992 },
10993 {
92fddf8e 10994 /* MOD_0F26 */
b844680a 10995 { "(bad)", { XX } },
92fddf8e 10996 { "movL", { Td, Rd } },
b844680a 10997 },
75c135a8
L
10998 {
10999 /* MOD_0F2B_PREFIX_0 */
4ee52178 11000 {"movntps", { Mx, XM } },
75c135a8
L
11001 { "(bad)", { XX } },
11002 },
11003 {
11004 /* MOD_0F2B_PREFIX_1 */
4ee52178 11005 {"movntss", { Md, XM } },
75c135a8
L
11006 { "(bad)", { XX } },
11007 },
11008 {
11009 /* MOD_0F2B_PREFIX_2 */
4ee52178 11010 {"movntpd", { Mx, XM } },
75c135a8
L
11011 { "(bad)", { XX } },
11012 },
11013 {
11014 /* MOD_0F2B_PREFIX_3 */
4ee52178 11015 {"movntsd", { Mq, XM } },
75c135a8
L
11016 { "(bad)", { XX } },
11017 },
11018 {
11019 /* MOD_0F51 */
11020 { "(bad)", { XX } },
11021 { "movmskpX", { Gdq, XS } },
11022 },
b844680a 11023 {
1ceb70f8 11024 /* MOD_0F71_REG_2 */
b844680a 11025 { "(bad)", { XX } },
4e7d34a6 11026 { "psrlw", { MS, Ib } },
b844680a
L
11027 },
11028 {
1ceb70f8 11029 /* MOD_0F71_REG_4 */
b844680a 11030 { "(bad)", { XX } },
4e7d34a6 11031 { "psraw", { MS, Ib } },
b844680a
L
11032 },
11033 {
1ceb70f8 11034 /* MOD_0F71_REG_6 */
b844680a 11035 { "(bad)", { XX } },
4e7d34a6 11036 { "psllw", { MS, Ib } },
b844680a
L
11037 },
11038 {
1ceb70f8 11039 /* MOD_0F72_REG_2 */
b844680a 11040 { "(bad)", { XX } },
4e7d34a6 11041 { "psrld", { MS, Ib } },
b844680a
L
11042 },
11043 {
1ceb70f8 11044 /* MOD_0F72_REG_4 */
b844680a 11045 { "(bad)", { XX } },
4e7d34a6 11046 { "psrad", { MS, Ib } },
b844680a
L
11047 },
11048 {
1ceb70f8 11049 /* MOD_0F72_REG_6 */
b844680a 11050 { "(bad)", { XX } },
4e7d34a6 11051 { "pslld", { MS, Ib } },
b844680a
L
11052 },
11053 {
1ceb70f8 11054 /* MOD_0F73_REG_2 */
4e7d34a6
L
11055 { "(bad)", { XX } },
11056 { "psrlq", { MS, Ib } },
b844680a
L
11057 },
11058 {
1ceb70f8 11059 /* MOD_0F73_REG_3 */
b844680a 11060 { "(bad)", { XX } },
c0f3af97
L
11061 { PREFIX_TABLE (PREFIX_0F73_REG_3) },
11062 },
11063 {
11064 /* MOD_0F73_REG_6 */
11065 { "(bad)", { XX } },
11066 { "psllq", { MS, Ib } },
11067 },
11068 {
11069 /* MOD_0F73_REG_7 */
11070 { "(bad)", { XX } },
11071 { PREFIX_TABLE (PREFIX_0F73_REG_7) },
11072 },
11073 {
11074 /* MOD_0FAE_REG_0 */
eacc9c89 11075 { "fxsave", { FXSAVE } },
c0f3af97
L
11076 { "(bad)", { XX } },
11077 },
11078 {
11079 /* MOD_0FAE_REG_1 */
eacc9c89 11080 { "fxrstor", { FXSAVE } },
c0f3af97
L
11081 { "(bad)", { XX } },
11082 },
11083 {
11084 /* MOD_0FAE_REG_2 */
11085 { "ldmxcsr", { Md } },
11086 { "(bad)", { XX } },
11087 },
11088 {
11089 /* MOD_0FAE_REG_3 */
11090 { "stmxcsr", { Md } },
11091 { "(bad)", { XX } },
11092 },
11093 {
11094 /* MOD_0FAE_REG_4 */
11095 { "xsave", { M } },
11096 { "(bad)", { XX } },
11097 },
11098 {
11099 /* MOD_0FAE_REG_5 */
11100 { "xrstor", { M } },
11101 { RM_TABLE (RM_0FAE_REG_5) },
11102 },
11103 {
11104 /* MOD_0FAE_REG_6 */
11105 { "xsaveopt", { M } },
11106 { RM_TABLE (RM_0FAE_REG_6) },
11107 },
11108 {
11109 /* MOD_0FAE_REG_7 */
11110 { "clflush", { Mb } },
11111 { RM_TABLE (RM_0FAE_REG_7) },
11112 },
11113 {
11114 /* MOD_0FB2 */
11115 { "lssS", { Gv, Mp } },
11116 { "(bad)", { XX } },
11117 },
11118 {
11119 /* MOD_0FB4 */
11120 { "lfsS", { Gv, Mp } },
11121 { "(bad)", { XX } },
11122 },
11123 {
11124 /* MOD_0FB5 */
11125 { "lgsS", { Gv, Mp } },
11126 { "(bad)", { XX } },
11127 },
11128 {
11129 /* MOD_0FC7_REG_6 */
11130 { PREFIX_TABLE (PREFIX_0FC7_REG_6) },
11131 { "(bad)", { XX } },
11132 },
11133 {
11134 /* MOD_0FC7_REG_7 */
11135 { "vmptrst", { Mq } },
11136 { "(bad)", { XX } },
11137 },
11138 {
11139 /* MOD_0FD7 */
11140 { "(bad)", { XX } },
11141 { "pmovmskb", { Gdq, MS } },
11142 },
11143 {
11144 /* MOD_0FE7_PREFIX_2 */
11145 { "movntdq", { Mx, XM } },
11146 { "(bad)", { XX } },
11147 },
11148 {
11149 /* MOD_0FF0_PREFIX_3 */
11150 { "lddqu", { XM, M } },
11151 { "(bad)", { XX } },
11152 },
11153 {
11154 /* MOD_0F382A_PREFIX_2 */
11155 { "movntdqa", { XM, Mx } },
11156 { "(bad)", { XX } },
11157 },
11158 {
11159 /* MOD_62_32BIT */
11160 { "bound{S|}", { Gv, Ma } },
11161 { "(bad)", { XX } },
11162 },
11163 {
11164 /* MOD_C4_32BIT */
11165 { "lesS", { Gv, Mp } },
11166 { VEX_C4_TABLE (VEX_0F) },
11167 },
11168 {
11169 /* MOD_C5_32BIT */
11170 { "ldsS", { Gv, Mp } },
11171 { VEX_C5_TABLE (VEX_0F) },
11172 },
11173 {
11174 /* MOD_VEX_12_PREFIX_0 */
11175 { VEX_LEN_TABLE (VEX_LEN_12_P_0_M_0) },
11176 { VEX_LEN_TABLE (VEX_LEN_12_P_0_M_1) },
11177 },
11178 {
11179 /* MOD_VEX_13 */
11180 { VEX_LEN_TABLE (VEX_LEN_13_M_0) },
11181 { "(bad)", { XX } },
11182 },
11183 {
11184 /* MOD_VEX_16_PREFIX_0 */
11185 { VEX_LEN_TABLE (VEX_LEN_16_P_0_M_0) },
11186 { VEX_LEN_TABLE (VEX_LEN_16_P_0_M_1) },
11187 },
11188 {
11189 /* MOD_VEX_17 */
11190 { VEX_LEN_TABLE (VEX_LEN_17_M_0) },
11191 { "(bad)", { XX } },
11192 },
11193 {
11194 /* MOD_VEX_2B */
9e30b8e0 11195 { VEX_W_TABLE (VEX_W_2B_M_0) },
c0f3af97
L
11196 { "(bad)", { XX } },
11197 },
11198 {
976f1fde 11199 /* MOD_VEX_50 */
c0f3af97 11200 { "(bad)", { XX } },
9e30b8e0 11201 { VEX_W_TABLE (VEX_W_50_M_0) },
c0f3af97
L
11202 },
11203 {
11204 /* MOD_VEX_71_REG_2 */
11205 { "(bad)", { XX } },
11206 { PREFIX_TABLE (PREFIX_VEX_71_REG_2) },
b844680a
L
11207 },
11208 {
c0f3af97 11209 /* MOD_VEX_71_REG_4 */
b844680a 11210 { "(bad)", { XX } },
c0f3af97 11211 { PREFIX_TABLE (PREFIX_VEX_71_REG_4) },
b844680a
L
11212 },
11213 {
c0f3af97 11214 /* MOD_VEX_71_REG_6 */
b844680a 11215 { "(bad)", { XX } },
c0f3af97 11216 { PREFIX_TABLE (PREFIX_VEX_71_REG_6) },
b844680a
L
11217 },
11218 {
c0f3af97 11219 /* MOD_VEX_72_REG_2 */
b844680a 11220 { "(bad)", { XX } },
c0f3af97 11221 { PREFIX_TABLE (PREFIX_VEX_72_REG_2) },
b844680a 11222 },
d8faab4e 11223 {
c0f3af97 11224 /* MOD_VEX_72_REG_4 */
d8faab4e 11225 { "(bad)", { XX } },
c0f3af97 11226 { PREFIX_TABLE (PREFIX_VEX_72_REG_4) },
d8faab4e
L
11227 },
11228 {
c0f3af97 11229 /* MOD_VEX_72_REG_6 */
d8faab4e 11230 { "(bad)", { XX } },
c0f3af97 11231 { PREFIX_TABLE (PREFIX_VEX_72_REG_6) },
d8faab4e 11232 },
876d4bfa 11233 {
c0f3af97 11234 /* MOD_VEX_73_REG_2 */
876d4bfa 11235 { "(bad)", { XX } },
c0f3af97 11236 { PREFIX_TABLE (PREFIX_VEX_73_REG_2) },
876d4bfa
L
11237 },
11238 {
c0f3af97 11239 /* MOD_VEX_73_REG_3 */
876d4bfa 11240 { "(bad)", { XX } },
c0f3af97 11241 { PREFIX_TABLE (PREFIX_VEX_73_REG_3) },
475a2301
L
11242 },
11243 {
c0f3af97
L
11244 /* MOD_VEX_73_REG_6 */
11245 { "(bad)", { XX } },
11246 { PREFIX_TABLE (PREFIX_VEX_73_REG_6) },
876d4bfa
L
11247 },
11248 {
c0f3af97 11249 /* MOD_VEX_73_REG_7 */
4e7d34a6 11250 { "(bad)", { XX } },
c0f3af97 11251 { PREFIX_TABLE (PREFIX_VEX_73_REG_7) },
876d4bfa
L
11252 },
11253 {
c0f3af97
L
11254 /* MOD_VEX_AE_REG_2 */
11255 { VEX_LEN_TABLE (VEX_LEN_AE_R_2_M_0) },
11256 { "(bad)", { XX } },
876d4bfa 11257 },
bbedc832 11258 {
c0f3af97
L
11259 /* MOD_VEX_AE_REG_3 */
11260 { VEX_LEN_TABLE (VEX_LEN_AE_R_3_M_0) },
4e7d34a6 11261 { "(bad)", { XX } },
bbedc832 11262 },
144c41d9 11263 {
c0f3af97 11264 /* MOD_VEX_D7_PREFIX_2 */
4e7d34a6 11265 { "(bad)", { XX } },
c0f3af97 11266 { VEX_LEN_TABLE (VEX_LEN_D7_P_2_M_1) },
144c41d9 11267 },
1afd85e3 11268 {
c0f3af97 11269 /* MOD_VEX_E7_PREFIX_2 */
9e30b8e0 11270 { VEX_W_TABLE (VEX_W_E7_P_2_M_0) },
92fddf8e 11271 { "(bad)", { XX } },
1afd85e3
L
11272 },
11273 {
c0f3af97 11274 /* MOD_VEX_F0_PREFIX_3 */
9e30b8e0 11275 { VEX_W_TABLE (VEX_W_F0_P_3_M_0) },
92fddf8e
L
11276 { "(bad)", { XX } },
11277 },
11278 {
c0f3af97 11279 /* MOD_VEX_3818_PREFIX_2 */
bcf2684f 11280 { VEX_W_TABLE (VEX_W_3818_P_2_M_0) },
92fddf8e 11281 { "(bad)", { XX } },
1afd85e3 11282 },
75c135a8 11283 {
c0f3af97
L
11284 /* MOD_VEX_3819_PREFIX_2 */
11285 { VEX_LEN_TABLE (VEX_LEN_3819_P_2_M_0) },
75c135a8 11286 { "(bad)", { XX } },
75c135a8
L
11287 },
11288 {
c0f3af97
L
11289 /* MOD_VEX_381A_PREFIX_2 */
11290 { VEX_LEN_TABLE (VEX_LEN_381A_P_2_M_0) },
75c135a8
L
11291 { "(bad)", { XX } },
11292 },
1afd85e3 11293 {
c0f3af97
L
11294 /* MOD_VEX_382A_PREFIX_2 */
11295 { VEX_LEN_TABLE (VEX_LEN_382A_P_2_M_0) },
1afd85e3 11296 { "(bad)", { XX } },
1afd85e3 11297 },
75c135a8 11298 {
c0f3af97 11299 /* MOD_VEX_382C_PREFIX_2 */
53aa04a0 11300 { VEX_W_TABLE (VEX_W_382C_P_2_M_0) },
75c135a8
L
11301 { "(bad)", { XX } },
11302 },
1afd85e3 11303 {
c0f3af97 11304 /* MOD_VEX_382D_PREFIX_2 */
53aa04a0 11305 { VEX_W_TABLE (VEX_W_382D_P_2_M_0) },
1afd85e3 11306 { "(bad)", { XX } },
1afd85e3
L
11307 },
11308 {
c0f3af97 11309 /* MOD_VEX_382E_PREFIX_2 */
53aa04a0 11310 { VEX_W_TABLE (VEX_W_382E_P_2_M_0) },
4e7d34a6 11311 { "(bad)", { XX } },
1afd85e3
L
11312 },
11313 {
c0f3af97 11314 /* MOD_VEX_382F_PREFIX_2 */
53aa04a0 11315 { VEX_W_TABLE (VEX_W_382F_P_2_M_0) },
1afd85e3 11316 { "(bad)", { XX } },
1afd85e3 11317 },
b844680a
L
11318};
11319
1ceb70f8 11320static const struct dis386 rm_table[][8] = {
b844680a 11321 {
1ceb70f8 11322 /* RM_0F01_REG_0 */
b844680a
L
11323 { "(bad)", { XX } },
11324 { "vmcall", { Skip_MODRM } },
11325 { "vmlaunch", { Skip_MODRM } },
11326 { "vmresume", { Skip_MODRM } },
11327 { "vmxoff", { Skip_MODRM } },
11328 { "(bad)", { XX } },
11329 { "(bad)", { XX } },
11330 { "(bad)", { XX } },
11331 },
11332 {
1ceb70f8 11333 /* RM_0F01_REG_1 */
b844680a
L
11334 { "monitor", { { OP_Monitor, 0 } } },
11335 { "mwait", { { OP_Mwait, 0 } } },
11336 { "(bad)", { XX } },
11337 { "(bad)", { XX } },
11338 { "(bad)", { XX } },
11339 { "(bad)", { XX } },
11340 { "(bad)", { XX } },
11341 { "(bad)", { XX } },
11342 },
475a2301
L
11343 {
11344 /* RM_0F01_REG_2 */
11345 { "xgetbv", { Skip_MODRM } },
11346 { "xsetbv", { Skip_MODRM } },
11347 { "(bad)", { XX } },
11348 { "(bad)", { XX } },
11349 { "(bad)", { XX } },
11350 { "(bad)", { XX } },
11351 { "(bad)", { XX } },
11352 { "(bad)", { XX } },
11353 },
b844680a 11354 {
1ceb70f8 11355 /* RM_0F01_REG_3 */
4e7d34a6
L
11356 { "vmrun", { Skip_MODRM } },
11357 { "vmmcall", { Skip_MODRM } },
11358 { "vmload", { Skip_MODRM } },
11359 { "vmsave", { Skip_MODRM } },
11360 { "stgi", { Skip_MODRM } },
11361 { "clgi", { Skip_MODRM } },
11362 { "skinit", { Skip_MODRM } },
11363 { "invlpga", { Skip_MODRM } },
11364 },
11365 {
1ceb70f8 11366 /* RM_0F01_REG_7 */
4e7d34a6
L
11367 { "swapgs", { Skip_MODRM } },
11368 { "rdtscp", { Skip_MODRM } },
b844680a
L
11369 { "(bad)", { XX } },
11370 { "(bad)", { XX } },
11371 { "(bad)", { XX } },
11372 { "(bad)", { XX } },
11373 { "(bad)", { XX } },
11374 { "(bad)", { XX } },
11375 },
11376 {
1ceb70f8 11377 /* RM_0FAE_REG_5 */
4e7d34a6 11378 { "lfence", { Skip_MODRM } },
b844680a
L
11379 { "(bad)", { XX } },
11380 { "(bad)", { XX } },
11381 { "(bad)", { XX } },
11382 { "(bad)", { XX } },
11383 { "(bad)", { XX } },
11384 { "(bad)", { XX } },
11385 { "(bad)", { XX } },
11386 },
11387 {
1ceb70f8 11388 /* RM_0FAE_REG_6 */
4e7d34a6 11389 { "mfence", { Skip_MODRM } },
b844680a
L
11390 { "(bad)", { XX } },
11391 { "(bad)", { XX } },
11392 { "(bad)", { XX } },
11393 { "(bad)", { XX } },
11394 { "(bad)", { XX } },
11395 { "(bad)", { XX } },
11396 { "(bad)", { XX } },
11397 },
bbedc832 11398 {
1ceb70f8 11399 /* RM_0FAE_REG_7 */
4e7d34a6
L
11400 { "sfence", { Skip_MODRM } },
11401 { "(bad)", { XX } },
bbedc832
L
11402 { "(bad)", { XX } },
11403 { "(bad)", { XX } },
11404 { "(bad)", { XX } },
11405 { "(bad)", { XX } },
11406 { "(bad)", { XX } },
11407 { "(bad)", { XX } },
144c41d9 11408 },
b844680a
L
11409};
11410
c608c12e
AM
11411#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
11412
f16cd0d5
L
11413/* We use the high bit to indicate different name for the same
11414 prefix. */
11415#define ADDR16_PREFIX (0x67 | 0x100)
11416#define ADDR32_PREFIX (0x67 | 0x200)
11417#define DATA16_PREFIX (0x66 | 0x100)
11418#define DATA32_PREFIX (0x66 | 0x200)
11419#define REP_PREFIX (0xf3 | 0x100)
11420
11421static int
26ca5450 11422ckprefix (void)
252b5132 11423{
f16cd0d5 11424 int newrex, i, length;
52b15da3 11425 rex = 0;
c0f3af97
L
11426 rex_original = 0;
11427 rex_ignored = 0;
252b5132 11428 prefixes = 0;
7d421014 11429 used_prefixes = 0;
52b15da3 11430 rex_used = 0;
f16cd0d5
L
11431 last_lock_prefix = -1;
11432 last_repz_prefix = -1;
11433 last_repnz_prefix = -1;
11434 last_data_prefix = -1;
11435 last_addr_prefix = -1;
11436 last_rex_prefix = -1;
11437 last_seg_prefix = -1;
f310f33d
L
11438 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
11439 all_prefixes[i] = 0;
11440 i = 0;
f16cd0d5
L
11441 length = 0;
11442 /* The maximum instruction length is 15bytes. */
11443 while (length < MAX_CODE_LENGTH - 1)
252b5132
RH
11444 {
11445 FETCH_DATA (the_info, codep + 1);
52b15da3 11446 newrex = 0;
252b5132
RH
11447 switch (*codep)
11448 {
52b15da3
JH
11449 /* REX prefixes family. */
11450 case 0x40:
11451 case 0x41:
11452 case 0x42:
11453 case 0x43:
11454 case 0x44:
11455 case 0x45:
11456 case 0x46:
11457 case 0x47:
11458 case 0x48:
11459 case 0x49:
11460 case 0x4a:
11461 case 0x4b:
11462 case 0x4c:
11463 case 0x4d:
11464 case 0x4e:
11465 case 0x4f:
f16cd0d5
L
11466 if (address_mode == mode_64bit)
11467 newrex = *codep;
11468 else
11469 return 1;
11470 last_rex_prefix = i;
52b15da3 11471 break;
252b5132
RH
11472 case 0xf3:
11473 prefixes |= PREFIX_REPZ;
f16cd0d5 11474 last_repz_prefix = i;
252b5132
RH
11475 break;
11476 case 0xf2:
11477 prefixes |= PREFIX_REPNZ;
f16cd0d5 11478 last_repnz_prefix = i;
252b5132
RH
11479 break;
11480 case 0xf0:
11481 prefixes |= PREFIX_LOCK;
f16cd0d5 11482 last_lock_prefix = i;
252b5132
RH
11483 break;
11484 case 0x2e:
11485 prefixes |= PREFIX_CS;
f16cd0d5 11486 last_seg_prefix = i;
252b5132
RH
11487 break;
11488 case 0x36:
11489 prefixes |= PREFIX_SS;
f16cd0d5 11490 last_seg_prefix = i;
252b5132
RH
11491 break;
11492 case 0x3e:
11493 prefixes |= PREFIX_DS;
f16cd0d5 11494 last_seg_prefix = i;
252b5132
RH
11495 break;
11496 case 0x26:
11497 prefixes |= PREFIX_ES;
f16cd0d5 11498 last_seg_prefix = i;
252b5132
RH
11499 break;
11500 case 0x64:
11501 prefixes |= PREFIX_FS;
f16cd0d5 11502 last_seg_prefix = i;
252b5132
RH
11503 break;
11504 case 0x65:
11505 prefixes |= PREFIX_GS;
f16cd0d5 11506 last_seg_prefix = i;
252b5132
RH
11507 break;
11508 case 0x66:
11509 prefixes |= PREFIX_DATA;
f16cd0d5 11510 last_data_prefix = i;
252b5132
RH
11511 break;
11512 case 0x67:
11513 prefixes |= PREFIX_ADDR;
f16cd0d5 11514 last_addr_prefix = i;
252b5132 11515 break;
5076851f 11516 case FWAIT_OPCODE:
252b5132
RH
11517 /* fwait is really an instruction. If there are prefixes
11518 before the fwait, they belong to the fwait, *not* to the
11519 following instruction. */
3e7d61b2 11520 if (prefixes || rex)
252b5132
RH
11521 {
11522 prefixes |= PREFIX_FWAIT;
11523 codep++;
f16cd0d5 11524 return 1;
252b5132
RH
11525 }
11526 prefixes = PREFIX_FWAIT;
11527 break;
11528 default:
f16cd0d5 11529 return 1;
252b5132 11530 }
52b15da3
JH
11531 /* Rex is ignored when followed by another prefix. */
11532 if (rex)
11533 {
3e7d61b2 11534 rex_used = rex;
f16cd0d5 11535 return 1;
52b15da3 11536 }
f16cd0d5
L
11537 if (*codep != FWAIT_OPCODE)
11538 all_prefixes[i++] = *codep;
52b15da3 11539 rex = newrex;
c0f3af97 11540 rex_original = rex;
252b5132 11541 codep++;
f16cd0d5
L
11542 length++;
11543 }
11544 return 0;
11545}
11546
11547static int
11548seg_prefix (int pref)
11549{
11550 switch (pref)
11551 {
11552 case 0x2e:
11553 return PREFIX_CS;
11554 case 0x36:
11555 return PREFIX_SS;
11556 case 0x3e:
11557 return PREFIX_DS;
11558 case 0x26:
11559 return PREFIX_ES;
11560 case 0x64:
11561 return PREFIX_FS;
11562 case 0x65:
11563 return PREFIX_GS;
11564 default:
11565 return 0;
252b5132
RH
11566 }
11567}
11568
7d421014
ILT
11569/* Return the name of the prefix byte PREF, or NULL if PREF is not a
11570 prefix byte. */
11571
11572static const char *
26ca5450 11573prefix_name (int pref, int sizeflag)
7d421014 11574{
0003779b
L
11575 static const char *rexes [16] =
11576 {
11577 "rex", /* 0x40 */
11578 "rex.B", /* 0x41 */
11579 "rex.X", /* 0x42 */
11580 "rex.XB", /* 0x43 */
11581 "rex.R", /* 0x44 */
11582 "rex.RB", /* 0x45 */
11583 "rex.RX", /* 0x46 */
11584 "rex.RXB", /* 0x47 */
11585 "rex.W", /* 0x48 */
11586 "rex.WB", /* 0x49 */
11587 "rex.WX", /* 0x4a */
11588 "rex.WXB", /* 0x4b */
11589 "rex.WR", /* 0x4c */
11590 "rex.WRB", /* 0x4d */
11591 "rex.WRX", /* 0x4e */
11592 "rex.WRXB", /* 0x4f */
11593 };
11594
7d421014
ILT
11595 switch (pref)
11596 {
52b15da3
JH
11597 /* REX prefixes family. */
11598 case 0x40:
52b15da3 11599 case 0x41:
52b15da3 11600 case 0x42:
52b15da3 11601 case 0x43:
52b15da3 11602 case 0x44:
52b15da3 11603 case 0x45:
52b15da3 11604 case 0x46:
52b15da3 11605 case 0x47:
52b15da3 11606 case 0x48:
52b15da3 11607 case 0x49:
52b15da3 11608 case 0x4a:
52b15da3 11609 case 0x4b:
52b15da3 11610 case 0x4c:
52b15da3 11611 case 0x4d:
52b15da3 11612 case 0x4e:
52b15da3 11613 case 0x4f:
0003779b 11614 return rexes [pref - 0x40];
7d421014
ILT
11615 case 0xf3:
11616 return "repz";
11617 case 0xf2:
11618 return "repnz";
11619 case 0xf0:
11620 return "lock";
11621 case 0x2e:
11622 return "cs";
11623 case 0x36:
11624 return "ss";
11625 case 0x3e:
11626 return "ds";
11627 case 0x26:
11628 return "es";
11629 case 0x64:
11630 return "fs";
11631 case 0x65:
11632 return "gs";
11633 case 0x66:
11634 return (sizeflag & DFLAG) ? "data16" : "data32";
11635 case 0x67:
cb712a9e 11636 if (address_mode == mode_64bit)
db6eb5be 11637 return (sizeflag & AFLAG) ? "addr32" : "addr64";
c1a64871 11638 else
2888cb7a 11639 return (sizeflag & AFLAG) ? "addr16" : "addr32";
7d421014
ILT
11640 case FWAIT_OPCODE:
11641 return "fwait";
f16cd0d5
L
11642 case ADDR16_PREFIX:
11643 return "addr16";
11644 case ADDR32_PREFIX:
11645 return "addr32";
11646 case DATA16_PREFIX:
11647 return "data16";
11648 case DATA32_PREFIX:
11649 return "data32";
11650 case REP_PREFIX:
11651 return "rep";
7d421014
ILT
11652 default:
11653 return NULL;
11654 }
11655}
11656
ce518a5f
L
11657static char op_out[MAX_OPERANDS][100];
11658static int op_ad, op_index[MAX_OPERANDS];
1d9f512f 11659static int two_source_ops;
ce518a5f
L
11660static bfd_vma op_address[MAX_OPERANDS];
11661static bfd_vma op_riprel[MAX_OPERANDS];
52b15da3 11662static bfd_vma start_pc;
ce518a5f 11663
252b5132
RH
11664/*
11665 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
11666 * (see topic "Redundant prefixes" in the "Differences from 8086"
11667 * section of the "Virtual 8086 Mode" chapter.)
11668 * 'pc' should be the address of this instruction, it will
11669 * be used to print the target address if this is a relative jump or call
11670 * The function returns the length of this instruction in bytes.
11671 */
11672
252b5132 11673static char intel_syntax;
9d141669 11674static char intel_mnemonic = !SYSV386_COMPAT;
252b5132
RH
11675static char open_char;
11676static char close_char;
11677static char separator_char;
11678static char scale_char;
11679
e396998b
AM
11680/* Here for backwards compatibility. When gdb stops using
11681 print_insn_i386_att and print_insn_i386_intel these functions can
11682 disappear, and print_insn_i386 be merged into print_insn. */
252b5132 11683int
26ca5450 11684print_insn_i386_att (bfd_vma pc, disassemble_info *info)
252b5132
RH
11685{
11686 intel_syntax = 0;
e396998b
AM
11687
11688 return print_insn (pc, info);
252b5132
RH
11689}
11690
11691int
26ca5450 11692print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
252b5132
RH
11693{
11694 intel_syntax = 1;
e396998b
AM
11695
11696 return print_insn (pc, info);
252b5132
RH
11697}
11698
e396998b 11699int
26ca5450 11700print_insn_i386 (bfd_vma pc, disassemble_info *info)
e396998b
AM
11701{
11702 intel_syntax = -1;
11703
11704 return print_insn (pc, info);
11705}
11706
f59a29b9
L
11707void
11708print_i386_disassembler_options (FILE *stream)
11709{
11710 fprintf (stream, _("\n\
11711The following i386/x86-64 specific disassembler options are supported for use\n\
11712with the -M switch (multiple options should be separated by commas):\n"));
11713
11714 fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
11715 fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
11716 fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
11717 fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
11718 fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
9d141669
L
11719 fprintf (stream, _(" att-mnemonic\n"
11720 " Display instruction in AT&T mnemonic\n"));
11721 fprintf (stream, _(" intel-mnemonic\n"
11722 " Display instruction in Intel mnemonic\n"));
f59a29b9
L
11723 fprintf (stream, _(" addr64 Assume 64bit address size\n"));
11724 fprintf (stream, _(" addr32 Assume 32bit address size\n"));
11725 fprintf (stream, _(" addr16 Assume 16bit address size\n"));
11726 fprintf (stream, _(" data32 Assume 32bit data size\n"));
11727 fprintf (stream, _(" data16 Assume 16bit data size\n"));
11728 fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
11729}
11730
b844680a
L
11731/* Get a pointer to struct dis386 with a valid name. */
11732
11733static const struct dis386 *
8bb15339 11734get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
b844680a 11735{
91d6fa6a 11736 int vindex, vex_table_index;
b844680a
L
11737
11738 if (dp->name != NULL)
11739 return dp;
11740
11741 switch (dp->op[0].bytemode)
11742 {
1ceb70f8
L
11743 case USE_REG_TABLE:
11744 dp = &reg_table[dp->op[1].bytemode][modrm.reg];
11745 break;
11746
11747 case USE_MOD_TABLE:
91d6fa6a
NC
11748 vindex = modrm.mod == 0x3 ? 1 : 0;
11749 dp = &mod_table[dp->op[1].bytemode][vindex];
1ceb70f8
L
11750 break;
11751
11752 case USE_RM_TABLE:
11753 dp = &rm_table[dp->op[1].bytemode][modrm.rm];
b844680a
L
11754 break;
11755
4e7d34a6 11756 case USE_PREFIX_TABLE:
c0f3af97 11757 if (need_vex)
b844680a 11758 {
c0f3af97
L
11759 /* The prefix in VEX is implicit. */
11760 switch (vex.prefix)
11761 {
11762 case 0:
91d6fa6a 11763 vindex = 0;
c0f3af97
L
11764 break;
11765 case REPE_PREFIX_OPCODE:
91d6fa6a 11766 vindex = 1;
c0f3af97
L
11767 break;
11768 case DATA_PREFIX_OPCODE:
91d6fa6a 11769 vindex = 2;
c0f3af97
L
11770 break;
11771 case REPNE_PREFIX_OPCODE:
91d6fa6a 11772 vindex = 3;
c0f3af97
L
11773 break;
11774 default:
11775 abort ();
11776 break;
11777 }
b844680a 11778 }
c0f3af97 11779 else
b844680a 11780 {
91d6fa6a 11781 vindex = 0;
c0f3af97
L
11782 used_prefixes |= (prefixes & PREFIX_REPZ);
11783 if (prefixes & PREFIX_REPZ)
b844680a 11784 {
91d6fa6a 11785 vindex = 1;
f16cd0d5 11786 all_prefixes[last_repz_prefix] = 0;
b844680a
L
11787 }
11788 else
11789 {
c0f3af97
L
11790 /* We should check PREFIX_REPNZ and PREFIX_REPZ before
11791 PREFIX_DATA. */
11792 used_prefixes |= (prefixes & PREFIX_REPNZ);
11793 if (prefixes & PREFIX_REPNZ)
11794 {
91d6fa6a 11795 vindex = 3;
f16cd0d5 11796 all_prefixes[last_repnz_prefix] = 0;
c0f3af97
L
11797 }
11798 else
b844680a 11799 {
c0f3af97
L
11800 used_prefixes |= (prefixes & PREFIX_DATA);
11801 if (prefixes & PREFIX_DATA)
11802 {
91d6fa6a 11803 vindex = 2;
f16cd0d5 11804 all_prefixes[last_data_prefix] = 0;
c0f3af97 11805 }
b844680a
L
11806 }
11807 }
11808 }
91d6fa6a 11809 dp = &prefix_table[dp->op[1].bytemode][vindex];
b844680a
L
11810 break;
11811
4e7d34a6 11812 case USE_X86_64_TABLE:
91d6fa6a
NC
11813 vindex = address_mode == mode_64bit ? 1 : 0;
11814 dp = &x86_64_table[dp->op[1].bytemode][vindex];
b844680a
L
11815 break;
11816
4e7d34a6 11817 case USE_3BYTE_TABLE:
8bb15339 11818 FETCH_DATA (info, codep + 2);
91d6fa6a
NC
11819 vindex = *codep++;
11820 dp = &three_byte_table[dp->op[1].bytemode][vindex];
8bb15339
L
11821 modrm.mod = (*codep >> 6) & 3;
11822 modrm.reg = (*codep >> 3) & 7;
11823 modrm.rm = *codep & 7;
11824 break;
11825
c0f3af97
L
11826 case USE_VEX_LEN_TABLE:
11827 if (!need_vex)
11828 abort ();
11829
11830 switch (vex.length)
11831 {
11832 case 128:
91d6fa6a 11833 vindex = 0;
c0f3af97
L
11834 break;
11835 case 256:
91d6fa6a 11836 vindex = 1;
c0f3af97
L
11837 break;
11838 default:
11839 abort ();
11840 break;
11841 }
11842
91d6fa6a 11843 dp = &vex_len_table[dp->op[1].bytemode][vindex];
c0f3af97
L
11844 break;
11845
f88c9eb0
SP
11846 case USE_XOP_8F_TABLE:
11847 FETCH_DATA (info, codep + 3);
11848 /* All bits in the REX prefix are ignored. */
11849 rex_ignored = rex;
11850 rex = ~(*codep >> 5) & 0x7;
11851
11852 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
11853 switch ((*codep & 0x1f))
11854 {
11855 default:
11856 BadOp ();
5dd85c99
SP
11857 case 0x8:
11858 vex_table_index = XOP_08;
11859 break;
f88c9eb0
SP
11860 case 0x9:
11861 vex_table_index = XOP_09;
11862 break;
11863 case 0xa:
11864 vex_table_index = XOP_0A;
11865 break;
11866 }
11867 codep++;
11868 vex.w = *codep & 0x80;
11869 if (vex.w && address_mode == mode_64bit)
11870 rex |= REX_W;
11871
11872 vex.register_specifier = (~(*codep >> 3)) & 0xf;
11873 if (address_mode != mode_64bit
11874 && vex.register_specifier > 0x7)
11875 BadOp ();
11876
11877 vex.length = (*codep & 0x4) ? 256 : 128;
11878 switch ((*codep & 0x3))
11879 {
11880 case 0:
11881 vex.prefix = 0;
11882 break;
11883 case 1:
11884 vex.prefix = DATA_PREFIX_OPCODE;
11885 break;
11886 case 2:
11887 vex.prefix = REPE_PREFIX_OPCODE;
11888 break;
11889 case 3:
11890 vex.prefix = REPNE_PREFIX_OPCODE;
11891 break;
11892 }
11893 need_vex = 1;
11894 need_vex_reg = 1;
11895 codep++;
91d6fa6a
NC
11896 vindex = *codep++;
11897 dp = &xop_table[vex_table_index][vindex];
c48244a5
SP
11898
11899 FETCH_DATA (info, codep + 1);
11900 modrm.mod = (*codep >> 6) & 3;
11901 modrm.reg = (*codep >> 3) & 7;
11902 modrm.rm = *codep & 7;
f88c9eb0
SP
11903 break;
11904
c0f3af97
L
11905 case USE_VEX_C4_TABLE:
11906 FETCH_DATA (info, codep + 3);
11907 /* All bits in the REX prefix are ignored. */
11908 rex_ignored = rex;
11909 rex = ~(*codep >> 5) & 0x7;
11910 switch ((*codep & 0x1f))
11911 {
11912 default:
11913 BadOp ();
11914 case 0x1:
f88c9eb0 11915 vex_table_index = VEX_0F;
c0f3af97
L
11916 break;
11917 case 0x2:
f88c9eb0 11918 vex_table_index = VEX_0F38;
c0f3af97
L
11919 break;
11920 case 0x3:
f88c9eb0 11921 vex_table_index = VEX_0F3A;
c0f3af97
L
11922 break;
11923 }
11924 codep++;
11925 vex.w = *codep & 0x80;
11926 if (vex.w && address_mode == mode_64bit)
11927 rex |= REX_W;
11928
11929 vex.register_specifier = (~(*codep >> 3)) & 0xf;
11930 if (address_mode != mode_64bit
11931 && vex.register_specifier > 0x7)
11932 BadOp ();
11933
11934 vex.length = (*codep & 0x4) ? 256 : 128;
11935 switch ((*codep & 0x3))
11936 {
11937 case 0:
11938 vex.prefix = 0;
11939 break;
11940 case 1:
11941 vex.prefix = DATA_PREFIX_OPCODE;
11942 break;
11943 case 2:
11944 vex.prefix = REPE_PREFIX_OPCODE;
11945 break;
11946 case 3:
11947 vex.prefix = REPNE_PREFIX_OPCODE;
11948 break;
11949 }
11950 need_vex = 1;
11951 need_vex_reg = 1;
11952 codep++;
91d6fa6a
NC
11953 vindex = *codep++;
11954 dp = &vex_table[vex_table_index][vindex];
c0f3af97 11955 /* There is no MODRM byte for VEX [82|77]. */
91d6fa6a 11956 if (vindex != 0x77 && vindex != 0x82)
c0f3af97
L
11957 {
11958 FETCH_DATA (info, codep + 1);
11959 modrm.mod = (*codep >> 6) & 3;
11960 modrm.reg = (*codep >> 3) & 7;
11961 modrm.rm = *codep & 7;
11962 }
11963 break;
11964
11965 case USE_VEX_C5_TABLE:
11966 FETCH_DATA (info, codep + 2);
11967 /* All bits in the REX prefix are ignored. */
11968 rex_ignored = rex;
11969 rex = (*codep & 0x80) ? 0 : REX_R;
11970
11971 vex.register_specifier = (~(*codep >> 3)) & 0xf;
11972 if (address_mode != mode_64bit
11973 && vex.register_specifier > 0x7)
11974 BadOp ();
11975
759a05ce
L
11976 vex.w = 0;
11977
c0f3af97
L
11978 vex.length = (*codep & 0x4) ? 256 : 128;
11979 switch ((*codep & 0x3))
11980 {
11981 case 0:
11982 vex.prefix = 0;
11983 break;
11984 case 1:
11985 vex.prefix = DATA_PREFIX_OPCODE;
11986 break;
11987 case 2:
11988 vex.prefix = REPE_PREFIX_OPCODE;
11989 break;
11990 case 3:
11991 vex.prefix = REPNE_PREFIX_OPCODE;
11992 break;
11993 }
11994 need_vex = 1;
11995 need_vex_reg = 1;
11996 codep++;
91d6fa6a
NC
11997 vindex = *codep++;
11998 dp = &vex_table[dp->op[1].bytemode][vindex];
c0f3af97 11999 /* There is no MODRM byte for VEX [82|77]. */
91d6fa6a 12000 if (vindex != 0x77 && vindex != 0x82)
c0f3af97
L
12001 {
12002 FETCH_DATA (info, codep + 1);
12003 modrm.mod = (*codep >> 6) & 3;
12004 modrm.reg = (*codep >> 3) & 7;
12005 modrm.rm = *codep & 7;
12006 }
12007 break;
12008
9e30b8e0
L
12009 case USE_VEX_W_TABLE:
12010 if (!need_vex)
12011 abort ();
12012
12013 dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
12014 break;
12015
b844680a 12016 default:
d34b5006 12017 abort ();
b844680a
L
12018 }
12019
12020 if (dp->name != NULL)
12021 return dp;
12022 else
8bb15339 12023 return get_valid_dis386 (dp, info);
b844680a
L
12024}
12025
e396998b 12026static int
26ca5450 12027print_insn (bfd_vma pc, disassemble_info *info)
252b5132 12028{
2da11e11 12029 const struct dis386 *dp;
252b5132 12030 int i;
ce518a5f 12031 char *op_txt[MAX_OPERANDS];
252b5132 12032 int needcomma;
e396998b
AM
12033 int sizeflag;
12034 const char *p;
252b5132 12035 struct dis_private priv;
eec0f4ca 12036 unsigned char op;
f16cd0d5
L
12037 int prefix_length;
12038 int default_prefixes;
252b5132 12039
cb712a9e 12040 if (info->mach == bfd_mach_x86_64_intel_syntax
8a9036a4
L
12041 || info->mach == bfd_mach_x86_64
12042 || info->mach == bfd_mach_l1om
12043 || info->mach == bfd_mach_l1om_intel_syntax)
cb712a9e
L
12044 address_mode = mode_64bit;
12045 else
12046 address_mode = mode_32bit;
52b15da3 12047
8373f971 12048 if (intel_syntax == (char) -1)
e396998b 12049 intel_syntax = (info->mach == bfd_mach_i386_i386_intel_syntax
8a9036a4
L
12050 || info->mach == bfd_mach_x86_64_intel_syntax
12051 || info->mach == bfd_mach_l1om_intel_syntax);
e396998b 12052
2da11e11 12053 if (info->mach == bfd_mach_i386_i386
52b15da3 12054 || info->mach == bfd_mach_x86_64
8a9036a4 12055 || info->mach == bfd_mach_l1om
52b15da3 12056 || info->mach == bfd_mach_i386_i386_intel_syntax
8a9036a4
L
12057 || info->mach == bfd_mach_x86_64_intel_syntax
12058 || info->mach == bfd_mach_l1om_intel_syntax)
e396998b 12059 priv.orig_sizeflag = AFLAG | DFLAG;
2da11e11 12060 else if (info->mach == bfd_mach_i386_i8086)
e396998b 12061 priv.orig_sizeflag = 0;
2da11e11
AM
12062 else
12063 abort ();
e396998b
AM
12064
12065 for (p = info->disassembler_options; p != NULL; )
12066 {
0112cd26 12067 if (CONST_STRNEQ (p, "x86-64"))
e396998b 12068 {
cb712a9e 12069 address_mode = mode_64bit;
e396998b
AM
12070 priv.orig_sizeflag = AFLAG | DFLAG;
12071 }
0112cd26 12072 else if (CONST_STRNEQ (p, "i386"))
e396998b 12073 {
cb712a9e 12074 address_mode = mode_32bit;
e396998b
AM
12075 priv.orig_sizeflag = AFLAG | DFLAG;
12076 }
0112cd26 12077 else if (CONST_STRNEQ (p, "i8086"))
e396998b 12078 {
cb712a9e 12079 address_mode = mode_16bit;
e396998b
AM
12080 priv.orig_sizeflag = 0;
12081 }
0112cd26 12082 else if (CONST_STRNEQ (p, "intel"))
e396998b
AM
12083 {
12084 intel_syntax = 1;
9d141669
L
12085 if (CONST_STRNEQ (p + 5, "-mnemonic"))
12086 intel_mnemonic = 1;
e396998b 12087 }
0112cd26 12088 else if (CONST_STRNEQ (p, "att"))
e396998b
AM
12089 {
12090 intel_syntax = 0;
9d141669
L
12091 if (CONST_STRNEQ (p + 3, "-mnemonic"))
12092 intel_mnemonic = 0;
e396998b 12093 }
0112cd26 12094 else if (CONST_STRNEQ (p, "addr"))
e396998b 12095 {
f59a29b9
L
12096 if (address_mode == mode_64bit)
12097 {
12098 if (p[4] == '3' && p[5] == '2')
12099 priv.orig_sizeflag &= ~AFLAG;
12100 else if (p[4] == '6' && p[5] == '4')
12101 priv.orig_sizeflag |= AFLAG;
12102 }
12103 else
12104 {
12105 if (p[4] == '1' && p[5] == '6')
12106 priv.orig_sizeflag &= ~AFLAG;
12107 else if (p[4] == '3' && p[5] == '2')
12108 priv.orig_sizeflag |= AFLAG;
12109 }
e396998b 12110 }
0112cd26 12111 else if (CONST_STRNEQ (p, "data"))
e396998b
AM
12112 {
12113 if (p[4] == '1' && p[5] == '6')
12114 priv.orig_sizeflag &= ~DFLAG;
12115 else if (p[4] == '3' && p[5] == '2')
12116 priv.orig_sizeflag |= DFLAG;
12117 }
0112cd26 12118 else if (CONST_STRNEQ (p, "suffix"))
e396998b
AM
12119 priv.orig_sizeflag |= SUFFIX_ALWAYS;
12120
12121 p = strchr (p, ',');
12122 if (p != NULL)
12123 p++;
12124 }
12125
12126 if (intel_syntax)
12127 {
12128 names64 = intel_names64;
12129 names32 = intel_names32;
12130 names16 = intel_names16;
12131 names8 = intel_names8;
12132 names8rex = intel_names8rex;
12133 names_seg = intel_names_seg;
db51cc60
L
12134 index64 = intel_index64;
12135 index32 = intel_index32;
e396998b
AM
12136 index16 = intel_index16;
12137 open_char = '[';
12138 close_char = ']';
12139 separator_char = '+';
12140 scale_char = '*';
12141 }
12142 else
12143 {
12144 names64 = att_names64;
12145 names32 = att_names32;
12146 names16 = att_names16;
12147 names8 = att_names8;
12148 names8rex = att_names8rex;
12149 names_seg = att_names_seg;
db51cc60
L
12150 index64 = att_index64;
12151 index32 = att_index32;
e396998b
AM
12152 index16 = att_index16;
12153 open_char = '(';
12154 close_char = ')';
12155 separator_char = ',';
12156 scale_char = ',';
12157 }
2da11e11 12158
4fe53c98 12159 /* The output looks better if we put 7 bytes on a line, since that
8a9036a4
L
12160 puts most long word instructions on a single line. Use 8 bytes
12161 for Intel L1OM. */
12162 if (info->mach == bfd_mach_l1om
12163 || info->mach == bfd_mach_l1om_intel_syntax)
12164 info->bytes_per_line = 8;
12165 else
12166 info->bytes_per_line = 7;
252b5132 12167
26ca5450 12168 info->private_data = &priv;
252b5132
RH
12169 priv.max_fetched = priv.the_buffer;
12170 priv.insn_start = pc;
252b5132
RH
12171
12172 obuf[0] = 0;
ce518a5f
L
12173 for (i = 0; i < MAX_OPERANDS; ++i)
12174 {
12175 op_out[i][0] = 0;
12176 op_index[i] = -1;
12177 }
252b5132
RH
12178
12179 the_info = info;
12180 start_pc = pc;
e396998b
AM
12181 start_codep = priv.the_buffer;
12182 codep = priv.the_buffer;
252b5132 12183
5076851f
ILT
12184 if (setjmp (priv.bailout) != 0)
12185 {
7d421014
ILT
12186 const char *name;
12187
5076851f 12188 /* Getting here means we tried for data but didn't get it. That
e396998b
AM
12189 means we have an incomplete instruction of some sort. Just
12190 print the first byte as a prefix or a .byte pseudo-op. */
12191 if (codep > priv.the_buffer)
5076851f 12192 {
e396998b 12193 name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
7d421014
ILT
12194 if (name != NULL)
12195 (*info->fprintf_func) (info->stream, "%s", name);
12196 else
5076851f 12197 {
7d421014
ILT
12198 /* Just print the first byte as a .byte instruction. */
12199 (*info->fprintf_func) (info->stream, ".byte 0x%x",
e396998b 12200 (unsigned int) priv.the_buffer[0]);
5076851f 12201 }
5076851f 12202
7d421014 12203 return 1;
5076851f
ILT
12204 }
12205
12206 return -1;
12207 }
12208
52b15da3 12209 obufp = obuf;
f16cd0d5
L
12210 sizeflag = priv.orig_sizeflag;
12211
12212 if (!ckprefix () || rex_used)
12213 {
12214 /* Too many prefixes or unused REX prefixes. */
12215 for (i = 0;
12216 all_prefixes[i] && i < (int) ARRAY_SIZE (all_prefixes);
12217 i++)
12218 (*info->fprintf_func) (info->stream, "%s",
12219 prefix_name (all_prefixes[i], sizeflag));
12220 return 1;
12221 }
252b5132
RH
12222
12223 insn_codep = codep;
12224
12225 FETCH_DATA (info, codep + 1);
12226 two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
12227
3e7d61b2 12228 if (((prefixes & PREFIX_FWAIT)
f16cd0d5 12229 && ((*codep < 0xd8) || (*codep > 0xdf))))
252b5132 12230 {
f16cd0d5 12231 (*info->fprintf_func) (info->stream, "fwait");
7d421014 12232 return 1;
252b5132
RH
12233 }
12234
eec0f4ca 12235 op = 0;
c1e679ec 12236
252b5132
RH
12237 if (*codep == 0x0f)
12238 {
eec0f4ca 12239 unsigned char threebyte;
252b5132 12240 FETCH_DATA (info, codep + 2);
eec0f4ca
L
12241 threebyte = *++codep;
12242 dp = &dis386_twobyte[threebyte];
252b5132 12243 need_modrm = twobyte_has_modrm[*codep];
eec0f4ca 12244 codep++;
252b5132
RH
12245 }
12246 else
12247 {
6439fc28 12248 dp = &dis386[*codep];
252b5132 12249 need_modrm = onebyte_has_modrm[*codep];
eec0f4ca 12250 codep++;
252b5132 12251 }
246c51aa 12252
b844680a 12253 if ((prefixes & PREFIX_REPZ))
f16cd0d5 12254 used_prefixes |= PREFIX_REPZ;
b844680a 12255 if ((prefixes & PREFIX_REPNZ))
f16cd0d5 12256 used_prefixes |= PREFIX_REPNZ;
b844680a 12257 if ((prefixes & PREFIX_LOCK))
f16cd0d5 12258 used_prefixes |= PREFIX_LOCK;
c608c12e 12259
f16cd0d5 12260 default_prefixes = 0;
c608c12e
AM
12261 if (prefixes & PREFIX_ADDR)
12262 {
12263 sizeflag ^= AFLAG;
ce518a5f 12264 if (dp->op[2].bytemode != loop_jcxz_mode || intel_syntax)
3ffd33cf 12265 {
cb712a9e 12266 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
f16cd0d5 12267 all_prefixes[last_addr_prefix] = ADDR32_PREFIX;
3ffd33cf 12268 else
f16cd0d5
L
12269 all_prefixes[last_addr_prefix] = ADDR16_PREFIX;
12270 default_prefixes |= PREFIX_ADDR;
3ffd33cf
AM
12271 }
12272 }
12273
b844680a 12274 if ((prefixes & PREFIX_DATA))
3ffd33cf
AM
12275 {
12276 sizeflag ^= DFLAG;
ce518a5f
L
12277 if (dp->op[2].bytemode == cond_jump_mode
12278 && dp->op[0].bytemode == v_mode
6439fc28 12279 && !intel_syntax)
3ffd33cf
AM
12280 {
12281 if (sizeflag & DFLAG)
f16cd0d5 12282 all_prefixes[last_data_prefix] = DATA32_PREFIX;
3ffd33cf 12283 else
f16cd0d5
L
12284 all_prefixes[last_data_prefix] = DATA16_PREFIX;
12285 default_prefixes |= PREFIX_DATA;
12286 }
12287 else if (rex & REX_W)
12288 {
12289 /* REX_W will override PREFIX_DATA. */
12290 default_prefixes |= PREFIX_DATA;
3ffd33cf
AM
12291 }
12292 }
12293
8bb15339 12294 if (need_modrm)
252b5132
RH
12295 {
12296 FETCH_DATA (info, codep + 1);
7967e09e
L
12297 modrm.mod = (*codep >> 6) & 3;
12298 modrm.reg = (*codep >> 3) & 7;
12299 modrm.rm = *codep & 7;
252b5132
RH
12300 }
12301
55b126d4
L
12302 need_vex = 0;
12303 need_vex_reg = 0;
12304 vex_w_done = 0;
12305
ce518a5f 12306 if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
252b5132
RH
12307 {
12308 dofloat (sizeflag);
12309 }
12310 else
12311 {
8bb15339 12312 dp = get_valid_dis386 (dp, info);
b844680a 12313 if (dp != NULL && putop (dp->name, sizeflag) == 0)
ce518a5f
L
12314 {
12315 for (i = 0; i < MAX_OPERANDS; ++i)
12316 {
246c51aa 12317 obufp = op_out[i];
ce518a5f
L
12318 op_ad = MAX_OPERANDS - 1 - i;
12319 if (dp->op[i].rtn)
12320 (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
12321 }
6439fc28 12322 }
252b5132
RH
12323 }
12324
7d421014
ILT
12325 /* See if any prefixes were not used. If so, print the first one
12326 separately. If we don't do this, we'll wind up printing an
12327 instruction stream which does not precisely correspond to the
12328 bytes we are disassembling. */
f16cd0d5 12329 if ((prefixes & ~(used_prefixes | default_prefixes)) != 0)
7d421014 12330 {
f16cd0d5
L
12331 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
12332 if (all_prefixes[i])
12333 {
12334 const char *name;
12335 name = prefix_name (all_prefixes[i], priv.orig_sizeflag);
12336 if (name == NULL)
12337 name = INTERNAL_DISASSEMBLER_ERROR;
12338 (*info->fprintf_func) (info->stream, "%s", name);
12339 return 1;
12340 }
52b15da3 12341 }
7d421014 12342
f16cd0d5 12343 /* Check if the REX prefix used. */
2a70cca4 12344 if (rex_ignored == 0 && (rex ^ rex_used) == 0)
f16cd0d5
L
12345 all_prefixes[last_rex_prefix] = 0;
12346
12347 /* Check if the SEG prefix used. */
12348 if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
12349 | PREFIX_FS | PREFIX_GS)) != 0
12350 && (used_prefixes
12351 & seg_prefix (all_prefixes[last_seg_prefix])) != 0)
12352 all_prefixes[last_seg_prefix] = 0;
12353
12354 /* Check if the ADDR prefix used. */
12355 if ((prefixes & PREFIX_ADDR) != 0
12356 && (used_prefixes & PREFIX_ADDR) != 0)
12357 all_prefixes[last_addr_prefix] = 0;
12358
12359 /* Check if the DATA prefix used. */
12360 if ((prefixes & PREFIX_DATA) != 0
12361 && (used_prefixes & PREFIX_DATA) != 0)
12362 all_prefixes[last_data_prefix] = 0;
12363
12364 prefix_length = 0;
f310f33d 12365 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
f16cd0d5
L
12366 if (all_prefixes[i])
12367 {
12368 const char *name;
12369 name = prefix_name (all_prefixes[i], sizeflag);
12370 if (name == NULL)
12371 abort ();
12372 prefix_length += strlen (name) + 1;
12373 (*info->fprintf_func) (info->stream, "%s ", name);
12374 }
b844680a 12375
f16cd0d5
L
12376 /* Check maximum code length. */
12377 if ((codep - start_codep) > MAX_CODE_LENGTH)
12378 {
12379 (*info->fprintf_func) (info->stream, "(bad)");
12380 return MAX_CODE_LENGTH;
12381 }
b844680a 12382
ea397f5b 12383 obufp = mnemonicendp;
f16cd0d5 12384 for (i = strlen (obuf) + prefix_length; i < 6; i++)
252b5132
RH
12385 oappend (" ");
12386 oappend (" ");
12387 (*info->fprintf_func) (info->stream, "%s", obuf);
12388
12389 /* The enter and bound instructions are printed with operands in the same
12390 order as the intel book; everything else is printed in reverse order. */
2da11e11 12391 if (intel_syntax || two_source_ops)
252b5132 12392 {
185b1163
L
12393 bfd_vma riprel;
12394
ce518a5f
L
12395 for (i = 0; i < MAX_OPERANDS; ++i)
12396 op_txt[i] = op_out[i];
246c51aa 12397
ce518a5f
L
12398 for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
12399 {
12400 op_ad = op_index[i];
12401 op_index[i] = op_index[MAX_OPERANDS - 1 - i];
12402 op_index[MAX_OPERANDS - 1 - i] = op_ad;
185b1163
L
12403 riprel = op_riprel[i];
12404 op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
12405 op_riprel[MAX_OPERANDS - 1 - i] = riprel;
ce518a5f 12406 }
252b5132
RH
12407 }
12408 else
12409 {
ce518a5f
L
12410 for (i = 0; i < MAX_OPERANDS; ++i)
12411 op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
050dfa73
MM
12412 }
12413
ce518a5f
L
12414 needcomma = 0;
12415 for (i = 0; i < MAX_OPERANDS; ++i)
12416 if (*op_txt[i])
12417 {
12418 if (needcomma)
12419 (*info->fprintf_func) (info->stream, ",");
12420 if (op_index[i] != -1 && !op_riprel[i])
12421 (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
12422 else
12423 (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
12424 needcomma = 1;
12425 }
050dfa73 12426
ce518a5f 12427 for (i = 0; i < MAX_OPERANDS; i++)
52b15da3
JH
12428 if (op_index[i] != -1 && op_riprel[i])
12429 {
12430 (*info->fprintf_func) (info->stream, " # ");
12431 (*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
12432 + op_address[op_index[i]]), info);
185b1163 12433 break;
52b15da3 12434 }
e396998b 12435 return codep - priv.the_buffer;
252b5132
RH
12436}
12437
6439fc28 12438static const char *float_mem[] = {
252b5132 12439 /* d8 */
7c52e0e8
L
12440 "fadd{s|}",
12441 "fmul{s|}",
12442 "fcom{s|}",
12443 "fcomp{s|}",
12444 "fsub{s|}",
12445 "fsubr{s|}",
12446 "fdiv{s|}",
12447 "fdivr{s|}",
db6eb5be 12448 /* d9 */
7c52e0e8 12449 "fld{s|}",
252b5132 12450 "(bad)",
7c52e0e8
L
12451 "fst{s|}",
12452 "fstp{s|}",
9306ca4a 12453 "fldenvIC",
252b5132 12454 "fldcw",
9306ca4a 12455 "fNstenvIC",
252b5132
RH
12456 "fNstcw",
12457 /* da */
7c52e0e8
L
12458 "fiadd{l|}",
12459 "fimul{l|}",
12460 "ficom{l|}",
12461 "ficomp{l|}",
12462 "fisub{l|}",
12463 "fisubr{l|}",
12464 "fidiv{l|}",
12465 "fidivr{l|}",
252b5132 12466 /* db */
7c52e0e8
L
12467 "fild{l|}",
12468 "fisttp{l|}",
12469 "fist{l|}",
12470 "fistp{l|}",
252b5132 12471 "(bad)",
6439fc28 12472 "fld{t||t|}",
252b5132 12473 "(bad)",
6439fc28 12474 "fstp{t||t|}",
252b5132 12475 /* dc */
7c52e0e8
L
12476 "fadd{l|}",
12477 "fmul{l|}",
12478 "fcom{l|}",
12479 "fcomp{l|}",
12480 "fsub{l|}",
12481 "fsubr{l|}",
12482 "fdiv{l|}",
12483 "fdivr{l|}",
252b5132 12484 /* dd */
7c52e0e8
L
12485 "fld{l|}",
12486 "fisttp{ll|}",
12487 "fst{l||}",
12488 "fstp{l|}",
9306ca4a 12489 "frstorIC",
252b5132 12490 "(bad)",
9306ca4a 12491 "fNsaveIC",
252b5132
RH
12492 "fNstsw",
12493 /* de */
12494 "fiadd",
12495 "fimul",
12496 "ficom",
12497 "ficomp",
12498 "fisub",
12499 "fisubr",
12500 "fidiv",
12501 "fidivr",
12502 /* df */
12503 "fild",
ca164297 12504 "fisttp",
252b5132
RH
12505 "fist",
12506 "fistp",
12507 "fbld",
7c52e0e8 12508 "fild{ll|}",
252b5132 12509 "fbstp",
7c52e0e8 12510 "fistp{ll|}",
1d9f512f
AM
12511};
12512
12513static const unsigned char float_mem_mode[] = {
12514 /* d8 */
12515 d_mode,
12516 d_mode,
12517 d_mode,
12518 d_mode,
12519 d_mode,
12520 d_mode,
12521 d_mode,
12522 d_mode,
12523 /* d9 */
12524 d_mode,
12525 0,
12526 d_mode,
12527 d_mode,
12528 0,
12529 w_mode,
12530 0,
12531 w_mode,
12532 /* da */
12533 d_mode,
12534 d_mode,
12535 d_mode,
12536 d_mode,
12537 d_mode,
12538 d_mode,
12539 d_mode,
12540 d_mode,
12541 /* db */
12542 d_mode,
12543 d_mode,
12544 d_mode,
12545 d_mode,
12546 0,
9306ca4a 12547 t_mode,
1d9f512f 12548 0,
9306ca4a 12549 t_mode,
1d9f512f
AM
12550 /* dc */
12551 q_mode,
12552 q_mode,
12553 q_mode,
12554 q_mode,
12555 q_mode,
12556 q_mode,
12557 q_mode,
12558 q_mode,
12559 /* dd */
12560 q_mode,
12561 q_mode,
12562 q_mode,
12563 q_mode,
12564 0,
12565 0,
12566 0,
12567 w_mode,
12568 /* de */
12569 w_mode,
12570 w_mode,
12571 w_mode,
12572 w_mode,
12573 w_mode,
12574 w_mode,
12575 w_mode,
12576 w_mode,
12577 /* df */
12578 w_mode,
12579 w_mode,
12580 w_mode,
12581 w_mode,
9306ca4a 12582 t_mode,
1d9f512f 12583 q_mode,
9306ca4a 12584 t_mode,
1d9f512f 12585 q_mode
252b5132
RH
12586};
12587
ce518a5f
L
12588#define ST { OP_ST, 0 }
12589#define STi { OP_STi, 0 }
252b5132 12590
4efba78c
L
12591#define FGRPd9_2 NULL, { { NULL, 0 } }
12592#define FGRPd9_4 NULL, { { NULL, 1 } }
12593#define FGRPd9_5 NULL, { { NULL, 2 } }
12594#define FGRPd9_6 NULL, { { NULL, 3 } }
12595#define FGRPd9_7 NULL, { { NULL, 4 } }
12596#define FGRPda_5 NULL, { { NULL, 5 } }
12597#define FGRPdb_4 NULL, { { NULL, 6 } }
12598#define FGRPde_3 NULL, { { NULL, 7 } }
12599#define FGRPdf_4 NULL, { { NULL, 8 } }
252b5132 12600
2da11e11 12601static const struct dis386 float_reg[][8] = {
252b5132
RH
12602 /* d8 */
12603 {
ce518a5f
L
12604 { "fadd", { ST, STi } },
12605 { "fmul", { ST, STi } },
12606 { "fcom", { STi } },
12607 { "fcomp", { STi } },
12608 { "fsub", { ST, STi } },
12609 { "fsubr", { ST, STi } },
12610 { "fdiv", { ST, STi } },
12611 { "fdivr", { ST, STi } },
252b5132
RH
12612 },
12613 /* d9 */
12614 {
ce518a5f
L
12615 { "fld", { STi } },
12616 { "fxch", { STi } },
252b5132 12617 { FGRPd9_2 },
ce518a5f 12618 { "(bad)", { XX } },
252b5132
RH
12619 { FGRPd9_4 },
12620 { FGRPd9_5 },
12621 { FGRPd9_6 },
12622 { FGRPd9_7 },
12623 },
12624 /* da */
12625 {
ce518a5f
L
12626 { "fcmovb", { ST, STi } },
12627 { "fcmove", { ST, STi } },
12628 { "fcmovbe",{ ST, STi } },
12629 { "fcmovu", { ST, STi } },
12630 { "(bad)", { XX } },
252b5132 12631 { FGRPda_5 },
ce518a5f
L
12632 { "(bad)", { XX } },
12633 { "(bad)", { XX } },
252b5132
RH
12634 },
12635 /* db */
12636 {
ce518a5f
L
12637 { "fcmovnb",{ ST, STi } },
12638 { "fcmovne",{ ST, STi } },
12639 { "fcmovnbe",{ ST, STi } },
12640 { "fcmovnu",{ ST, STi } },
252b5132 12641 { FGRPdb_4 },
ce518a5f
L
12642 { "fucomi", { ST, STi } },
12643 { "fcomi", { ST, STi } },
12644 { "(bad)", { XX } },
252b5132
RH
12645 },
12646 /* dc */
12647 {
ce518a5f
L
12648 { "fadd", { STi, ST } },
12649 { "fmul", { STi, ST } },
12650 { "(bad)", { XX } },
12651 { "(bad)", { XX } },
9d141669
L
12652 { "fsub!M", { STi, ST } },
12653 { "fsubM", { STi, ST } },
12654 { "fdiv!M", { STi, ST } },
12655 { "fdivM", { STi, ST } },
252b5132
RH
12656 },
12657 /* dd */
12658 {
ce518a5f
L
12659 { "ffree", { STi } },
12660 { "(bad)", { XX } },
12661 { "fst", { STi } },
12662 { "fstp", { STi } },
12663 { "fucom", { STi } },
12664 { "fucomp", { STi } },
12665 { "(bad)", { XX } },
12666 { "(bad)", { XX } },
252b5132
RH
12667 },
12668 /* de */
12669 {
ce518a5f
L
12670 { "faddp", { STi, ST } },
12671 { "fmulp", { STi, ST } },
12672 { "(bad)", { XX } },
252b5132 12673 { FGRPde_3 },
9d141669
L
12674 { "fsub!Mp", { STi, ST } },
12675 { "fsubMp", { STi, ST } },
12676 { "fdiv!Mp", { STi, ST } },
12677 { "fdivMp", { STi, ST } },
252b5132
RH
12678 },
12679 /* df */
12680 {
ce518a5f
L
12681 { "ffreep", { STi } },
12682 { "(bad)", { XX } },
12683 { "(bad)", { XX } },
12684 { "(bad)", { XX } },
252b5132 12685 { FGRPdf_4 },
ce518a5f
L
12686 { "fucomip", { ST, STi } },
12687 { "fcomip", { ST, STi } },
12688 { "(bad)", { XX } },
252b5132
RH
12689 },
12690};
12691
252b5132
RH
12692static char *fgrps[][8] = {
12693 /* d9_2 0 */
12694 {
12695 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12696 },
12697
12698 /* d9_4 1 */
12699 {
12700 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
12701 },
12702
12703 /* d9_5 2 */
12704 {
12705 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
12706 },
12707
12708 /* d9_6 3 */
12709 {
12710 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
12711 },
12712
12713 /* d9_7 4 */
12714 {
12715 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
12716 },
12717
12718 /* da_5 5 */
12719 {
12720 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12721 },
12722
12723 /* db_4 6 */
12724 {
309d3373
JB
12725 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
12726 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
252b5132
RH
12727 },
12728
12729 /* de_3 7 */
12730 {
12731 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12732 },
12733
12734 /* df_4 8 */
12735 {
12736 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12737 },
12738};
12739
b6169b20
L
12740static void
12741swap_operand (void)
12742{
12743 mnemonicendp[0] = '.';
12744 mnemonicendp[1] = 's';
12745 mnemonicendp += 2;
12746}
12747
b844680a
L
12748static void
12749OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
12750 int sizeflag ATTRIBUTE_UNUSED)
12751{
12752 /* Skip mod/rm byte. */
12753 MODRM_CHECK;
12754 codep++;
12755}
12756
252b5132 12757static void
26ca5450 12758dofloat (int sizeflag)
252b5132 12759{
2da11e11 12760 const struct dis386 *dp;
252b5132
RH
12761 unsigned char floatop;
12762
12763 floatop = codep[-1];
12764
7967e09e 12765 if (modrm.mod != 3)
252b5132 12766 {
7967e09e 12767 int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
1d9f512f
AM
12768
12769 putop (float_mem[fp_indx], sizeflag);
ce518a5f 12770 obufp = op_out[0];
6e50d963 12771 op_ad = 2;
1d9f512f 12772 OP_E (float_mem_mode[fp_indx], sizeflag);
252b5132
RH
12773 return;
12774 }
6608db57 12775 /* Skip mod/rm byte. */
4bba6815 12776 MODRM_CHECK;
252b5132
RH
12777 codep++;
12778
7967e09e 12779 dp = &float_reg[floatop - 0xd8][modrm.reg];
252b5132
RH
12780 if (dp->name == NULL)
12781 {
7967e09e 12782 putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
252b5132 12783
6608db57 12784 /* Instruction fnstsw is only one with strange arg. */
252b5132 12785 if (floatop == 0xdf && codep[-1] == 0xe0)
ce518a5f 12786 strcpy (op_out[0], names16[0]);
252b5132
RH
12787 }
12788 else
12789 {
12790 putop (dp->name, sizeflag);
12791
ce518a5f 12792 obufp = op_out[0];
6e50d963 12793 op_ad = 2;
ce518a5f
L
12794 if (dp->op[0].rtn)
12795 (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
6e50d963 12796
ce518a5f 12797 obufp = op_out[1];
6e50d963 12798 op_ad = 1;
ce518a5f
L
12799 if (dp->op[1].rtn)
12800 (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
252b5132
RH
12801 }
12802}
12803
252b5132 12804static void
26ca5450 12805OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12806{
422673a9 12807 oappend ("%st" + intel_syntax);
252b5132
RH
12808}
12809
252b5132 12810static void
26ca5450 12811OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12812{
7967e09e 12813 sprintf (scratchbuf, "%%st(%d)", modrm.rm);
d708bcba 12814 oappend (scratchbuf + intel_syntax);
252b5132
RH
12815}
12816
6608db57 12817/* Capital letters in template are macros. */
6439fc28 12818static int
d3ce72d0 12819putop (const char *in_template, int sizeflag)
252b5132 12820{
2da11e11 12821 const char *p;
9306ca4a 12822 int alt = 0;
9d141669 12823 int cond = 1;
98b528ac
L
12824 unsigned int l = 0, len = 1;
12825 char last[4];
12826
12827#define SAVE_LAST(c) \
12828 if (l < len && l < sizeof (last)) \
12829 last[l++] = c; \
12830 else \
12831 abort ();
252b5132 12832
d3ce72d0 12833 for (p = in_template; *p; p++)
252b5132
RH
12834 {
12835 switch (*p)
12836 {
12837 default:
12838 *obufp++ = *p;
12839 break;
98b528ac
L
12840 case '%':
12841 len++;
12842 break;
9d141669
L
12843 case '!':
12844 cond = 0;
12845 break;
6439fc28
AM
12846 case '{':
12847 alt = 0;
12848 if (intel_syntax)
6439fc28
AM
12849 {
12850 while (*++p != '|')
7c52e0e8
L
12851 if (*p == '}' || *p == '\0')
12852 abort ();
6439fc28 12853 }
9306ca4a
JB
12854 /* Fall through. */
12855 case 'I':
12856 alt = 1;
12857 continue;
6439fc28
AM
12858 case '|':
12859 while (*++p != '}')
12860 {
12861 if (*p == '\0')
12862 abort ();
12863 }
12864 break;
12865 case '}':
12866 break;
252b5132 12867 case 'A':
db6eb5be
AM
12868 if (intel_syntax)
12869 break;
7967e09e 12870 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
252b5132
RH
12871 *obufp++ = 'b';
12872 break;
12873 case 'B':
4b06377f
L
12874 if (l == 0 && len == 1)
12875 {
12876case_B:
12877 if (intel_syntax)
12878 break;
12879 if (sizeflag & SUFFIX_ALWAYS)
12880 *obufp++ = 'b';
12881 }
12882 else
12883 {
12884 if (l != 1
12885 || len != 2
12886 || last[0] != 'L')
12887 {
12888 SAVE_LAST (*p);
12889 break;
12890 }
12891
12892 if (address_mode == mode_64bit
12893 && !(prefixes & PREFIX_ADDR))
12894 {
12895 *obufp++ = 'a';
12896 *obufp++ = 'b';
12897 *obufp++ = 's';
12898 }
12899
12900 goto case_B;
12901 }
252b5132 12902 break;
9306ca4a
JB
12903 case 'C':
12904 if (intel_syntax && !alt)
12905 break;
12906 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
12907 {
12908 if (sizeflag & DFLAG)
12909 *obufp++ = intel_syntax ? 'd' : 'l';
12910 else
12911 *obufp++ = intel_syntax ? 'w' : 's';
12912 used_prefixes |= (prefixes & PREFIX_DATA);
12913 }
12914 break;
ed7841b3
JB
12915 case 'D':
12916 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
12917 break;
161a04f6 12918 USED_REX (REX_W);
7967e09e 12919 if (modrm.mod == 3)
ed7841b3 12920 {
161a04f6 12921 if (rex & REX_W)
ed7841b3 12922 *obufp++ = 'q';
ed7841b3 12923 else
f16cd0d5
L
12924 {
12925 if (sizeflag & DFLAG)
12926 *obufp++ = intel_syntax ? 'd' : 'l';
12927 else
12928 *obufp++ = 'w';
12929 used_prefixes |= (prefixes & PREFIX_DATA);
12930 }
ed7841b3
JB
12931 }
12932 else
12933 *obufp++ = 'w';
12934 break;
252b5132 12935 case 'E': /* For jcxz/jecxz */
cb712a9e 12936 if (address_mode == mode_64bit)
c1a64871
JH
12937 {
12938 if (sizeflag & AFLAG)
12939 *obufp++ = 'r';
12940 else
12941 *obufp++ = 'e';
12942 }
12943 else
12944 if (sizeflag & AFLAG)
12945 *obufp++ = 'e';
3ffd33cf
AM
12946 used_prefixes |= (prefixes & PREFIX_ADDR);
12947 break;
12948 case 'F':
db6eb5be
AM
12949 if (intel_syntax)
12950 break;
e396998b 12951 if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
3ffd33cf
AM
12952 {
12953 if (sizeflag & AFLAG)
cb712a9e 12954 *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
3ffd33cf 12955 else
cb712a9e 12956 *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
3ffd33cf
AM
12957 used_prefixes |= (prefixes & PREFIX_ADDR);
12958 }
252b5132 12959 break;
52fd6d94
JB
12960 case 'G':
12961 if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
12962 break;
161a04f6 12963 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
12964 *obufp++ = 'l';
12965 else
12966 *obufp++ = 'w';
161a04f6 12967 if (!(rex & REX_W))
52fd6d94
JB
12968 used_prefixes |= (prefixes & PREFIX_DATA);
12969 break;
5dd0794d 12970 case 'H':
db6eb5be
AM
12971 if (intel_syntax)
12972 break;
5dd0794d
AM
12973 if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
12974 || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
12975 {
12976 used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
12977 *obufp++ = ',';
12978 *obufp++ = 'p';
12979 if (prefixes & PREFIX_DS)
12980 *obufp++ = 't';
12981 else
12982 *obufp++ = 'n';
12983 }
12984 break;
9306ca4a
JB
12985 case 'J':
12986 if (intel_syntax)
12987 break;
12988 *obufp++ = 'l';
12989 break;
42903f7f
L
12990 case 'K':
12991 USED_REX (REX_W);
12992 if (rex & REX_W)
12993 *obufp++ = 'q';
12994 else
12995 *obufp++ = 'd';
12996 break;
6dd5059a
L
12997 case 'Z':
12998 if (intel_syntax)
12999 break;
13000 if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
13001 {
13002 *obufp++ = 'q';
13003 break;
13004 }
13005 /* Fall through. */
98b528ac 13006 goto case_L;
252b5132 13007 case 'L':
98b528ac
L
13008 if (l != 0 || len != 1)
13009 {
13010 SAVE_LAST (*p);
13011 break;
13012 }
13013case_L:
db6eb5be
AM
13014 if (intel_syntax)
13015 break;
252b5132
RH
13016 if (sizeflag & SUFFIX_ALWAYS)
13017 *obufp++ = 'l';
252b5132 13018 break;
9d141669
L
13019 case 'M':
13020 if (intel_mnemonic != cond)
13021 *obufp++ = 'r';
13022 break;
252b5132
RH
13023 case 'N':
13024 if ((prefixes & PREFIX_FWAIT) == 0)
13025 *obufp++ = 'n';
7d421014
ILT
13026 else
13027 used_prefixes |= PREFIX_FWAIT;
252b5132 13028 break;
52b15da3 13029 case 'O':
161a04f6
L
13030 USED_REX (REX_W);
13031 if (rex & REX_W)
6439fc28 13032 *obufp++ = 'o';
a35ca55a
JB
13033 else if (intel_syntax && (sizeflag & DFLAG))
13034 *obufp++ = 'q';
52b15da3
JH
13035 else
13036 *obufp++ = 'd';
161a04f6 13037 if (!(rex & REX_W))
a35ca55a 13038 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 13039 break;
6439fc28 13040 case 'T':
db6eb5be
AM
13041 if (intel_syntax)
13042 break;
cb712a9e 13043 if (address_mode == mode_64bit && (sizeflag & DFLAG))
6439fc28
AM
13044 {
13045 *obufp++ = 'q';
13046 break;
13047 }
6608db57 13048 /* Fall through. */
252b5132 13049 case 'P':
db6eb5be
AM
13050 if (intel_syntax)
13051 break;
252b5132 13052 if ((prefixes & PREFIX_DATA)
161a04f6 13053 || (rex & REX_W)
e396998b 13054 || (sizeflag & SUFFIX_ALWAYS))
252b5132 13055 {
161a04f6
L
13056 USED_REX (REX_W);
13057 if (rex & REX_W)
52b15da3 13058 *obufp++ = 'q';
c2419411 13059 else
52b15da3
JH
13060 {
13061 if (sizeflag & DFLAG)
13062 *obufp++ = 'l';
13063 else
13064 *obufp++ = 'w';
f16cd0d5 13065 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 13066 }
252b5132
RH
13067 }
13068 break;
6439fc28 13069 case 'U':
db6eb5be
AM
13070 if (intel_syntax)
13071 break;
cb712a9e 13072 if (address_mode == mode_64bit && (sizeflag & DFLAG))
6439fc28 13073 {
7967e09e 13074 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
1a114b12 13075 *obufp++ = 'q';
6439fc28
AM
13076 break;
13077 }
6608db57 13078 /* Fall through. */
98b528ac 13079 goto case_Q;
252b5132 13080 case 'Q':
98b528ac 13081 if (l == 0 && len == 1)
252b5132 13082 {
98b528ac
L
13083case_Q:
13084 if (intel_syntax && !alt)
13085 break;
13086 USED_REX (REX_W);
13087 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 13088 {
98b528ac
L
13089 if (rex & REX_W)
13090 *obufp++ = 'q';
52b15da3 13091 else
98b528ac
L
13092 {
13093 if (sizeflag & DFLAG)
13094 *obufp++ = intel_syntax ? 'd' : 'l';
13095 else
13096 *obufp++ = 'w';
f16cd0d5 13097 used_prefixes |= (prefixes & PREFIX_DATA);
98b528ac 13098 }
52b15da3 13099 }
98b528ac
L
13100 }
13101 else
13102 {
13103 if (l != 1 || len != 2 || last[0] != 'L')
13104 {
13105 SAVE_LAST (*p);
13106 break;
13107 }
13108 if (intel_syntax
13109 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
13110 break;
13111 if ((rex & REX_W))
13112 {
13113 USED_REX (REX_W);
13114 *obufp++ = 'q';
13115 }
13116 else
13117 *obufp++ = 'l';
252b5132
RH
13118 }
13119 break;
13120 case 'R':
161a04f6
L
13121 USED_REX (REX_W);
13122 if (rex & REX_W)
a35ca55a
JB
13123 *obufp++ = 'q';
13124 else if (sizeflag & DFLAG)
c608c12e 13125 {
a35ca55a 13126 if (intel_syntax)
c608c12e 13127 *obufp++ = 'd';
c608c12e 13128 else
a35ca55a 13129 *obufp++ = 'l';
c608c12e 13130 }
252b5132 13131 else
a35ca55a
JB
13132 *obufp++ = 'w';
13133 if (intel_syntax && !p[1]
161a04f6 13134 && ((rex & REX_W) || (sizeflag & DFLAG)))
a35ca55a 13135 *obufp++ = 'e';
161a04f6 13136 if (!(rex & REX_W))
52b15da3 13137 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132 13138 break;
1a114b12 13139 case 'V':
4b06377f 13140 if (l == 0 && len == 1)
1a114b12 13141 {
4b06377f
L
13142 if (intel_syntax)
13143 break;
13144 if (address_mode == mode_64bit && (sizeflag & DFLAG))
13145 {
13146 if (sizeflag & SUFFIX_ALWAYS)
13147 *obufp++ = 'q';
13148 break;
13149 }
13150 }
13151 else
13152 {
13153 if (l != 1
13154 || len != 2
13155 || last[0] != 'L')
13156 {
13157 SAVE_LAST (*p);
13158 break;
13159 }
13160
13161 if (rex & REX_W)
13162 {
13163 *obufp++ = 'a';
13164 *obufp++ = 'b';
13165 *obufp++ = 's';
13166 }
1a114b12
JB
13167 }
13168 /* Fall through. */
4b06377f 13169 goto case_S;
252b5132 13170 case 'S':
4b06377f 13171 if (l == 0 && len == 1)
252b5132 13172 {
4b06377f
L
13173case_S:
13174 if (intel_syntax)
13175 break;
13176 if (sizeflag & SUFFIX_ALWAYS)
52b15da3 13177 {
4b06377f
L
13178 if (rex & REX_W)
13179 *obufp++ = 'q';
52b15da3 13180 else
4b06377f
L
13181 {
13182 if (sizeflag & DFLAG)
13183 *obufp++ = 'l';
13184 else
13185 *obufp++ = 'w';
13186 used_prefixes |= (prefixes & PREFIX_DATA);
13187 }
13188 }
13189 }
13190 else
13191 {
13192 if (l != 1
13193 || len != 2
13194 || last[0] != 'L')
13195 {
13196 SAVE_LAST (*p);
13197 break;
52b15da3 13198 }
4b06377f
L
13199
13200 if (address_mode == mode_64bit
13201 && !(prefixes & PREFIX_ADDR))
13202 {
13203 *obufp++ = 'a';
13204 *obufp++ = 'b';
13205 *obufp++ = 's';
13206 }
13207
13208 goto case_S;
252b5132 13209 }
252b5132 13210 break;
041bd2e0 13211 case 'X':
c0f3af97
L
13212 if (l != 0 || len != 1)
13213 {
13214 SAVE_LAST (*p);
13215 break;
13216 }
13217 if (need_vex && vex.prefix)
13218 {
13219 if (vex.prefix == DATA_PREFIX_OPCODE)
13220 *obufp++ = 'd';
13221 else
13222 *obufp++ = 's';
13223 }
041bd2e0 13224 else
f16cd0d5
L
13225 {
13226 if (prefixes & PREFIX_DATA)
13227 *obufp++ = 'd';
13228 else
13229 *obufp++ = 's';
13230 used_prefixes |= (prefixes & PREFIX_DATA);
13231 }
041bd2e0 13232 break;
76f227a5 13233 case 'Y':
c0f3af97 13234 if (l == 0 && len == 1)
76f227a5 13235 {
c0f3af97
L
13236 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
13237 break;
13238 if (rex & REX_W)
13239 {
13240 USED_REX (REX_W);
13241 *obufp++ = 'q';
13242 }
13243 break;
13244 }
13245 else
13246 {
13247 if (l != 1 || len != 2 || last[0] != 'X')
13248 {
13249 SAVE_LAST (*p);
13250 break;
13251 }
13252 if (!need_vex)
13253 abort ();
13254 if (intel_syntax
13255 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
13256 break;
13257 switch (vex.length)
13258 {
13259 case 128:
13260 *obufp++ = 'x';
13261 break;
13262 case 256:
13263 *obufp++ = 'y';
13264 break;
13265 default:
13266 abort ();
13267 }
76f227a5
JH
13268 }
13269 break;
252b5132 13270 case 'W':
0bfee649 13271 if (l == 0 && len == 1)
a35ca55a 13272 {
0bfee649
L
13273 /* operand size flag for cwtl, cbtw */
13274 USED_REX (REX_W);
13275 if (rex & REX_W)
13276 {
13277 if (intel_syntax)
13278 *obufp++ = 'd';
13279 else
13280 *obufp++ = 'l';
13281 }
13282 else if (sizeflag & DFLAG)
13283 *obufp++ = 'w';
a35ca55a 13284 else
0bfee649
L
13285 *obufp++ = 'b';
13286 if (!(rex & REX_W))
13287 used_prefixes |= (prefixes & PREFIX_DATA);
a35ca55a 13288 }
252b5132 13289 else
0bfee649
L
13290 {
13291 if (l != 1 || len != 2 || last[0] != 'X')
13292 {
13293 SAVE_LAST (*p);
13294 break;
13295 }
13296 if (!need_vex)
13297 abort ();
13298 *obufp++ = vex.w ? 'd': 's';
13299 }
252b5132
RH
13300 break;
13301 }
9306ca4a 13302 alt = 0;
252b5132
RH
13303 }
13304 *obufp = 0;
ea397f5b 13305 mnemonicendp = obufp;
6439fc28 13306 return 0;
252b5132
RH
13307}
13308
13309static void
26ca5450 13310oappend (const char *s)
252b5132 13311{
ea397f5b 13312 obufp = stpcpy (obufp, s);
252b5132
RH
13313}
13314
13315static void
26ca5450 13316append_seg (void)
252b5132
RH
13317{
13318 if (prefixes & PREFIX_CS)
7d421014 13319 {
7d421014 13320 used_prefixes |= PREFIX_CS;
d708bcba 13321 oappend ("%cs:" + intel_syntax);
7d421014 13322 }
252b5132 13323 if (prefixes & PREFIX_DS)
7d421014 13324 {
7d421014 13325 used_prefixes |= PREFIX_DS;
d708bcba 13326 oappend ("%ds:" + intel_syntax);
7d421014 13327 }
252b5132 13328 if (prefixes & PREFIX_SS)
7d421014 13329 {
7d421014 13330 used_prefixes |= PREFIX_SS;
d708bcba 13331 oappend ("%ss:" + intel_syntax);
7d421014 13332 }
252b5132 13333 if (prefixes & PREFIX_ES)
7d421014 13334 {
7d421014 13335 used_prefixes |= PREFIX_ES;
d708bcba 13336 oappend ("%es:" + intel_syntax);
7d421014 13337 }
252b5132 13338 if (prefixes & PREFIX_FS)
7d421014 13339 {
7d421014 13340 used_prefixes |= PREFIX_FS;
d708bcba 13341 oappend ("%fs:" + intel_syntax);
7d421014 13342 }
252b5132 13343 if (prefixes & PREFIX_GS)
7d421014 13344 {
7d421014 13345 used_prefixes |= PREFIX_GS;
d708bcba 13346 oappend ("%gs:" + intel_syntax);
7d421014 13347 }
252b5132
RH
13348}
13349
13350static void
26ca5450 13351OP_indirE (int bytemode, int sizeflag)
252b5132
RH
13352{
13353 if (!intel_syntax)
13354 oappend ("*");
13355 OP_E (bytemode, sizeflag);
13356}
13357
52b15da3 13358static void
26ca5450 13359print_operand_value (char *buf, int hex, bfd_vma disp)
52b15da3 13360{
cb712a9e 13361 if (address_mode == mode_64bit)
52b15da3
JH
13362 {
13363 if (hex)
13364 {
13365 char tmp[30];
13366 int i;
13367 buf[0] = '0';
13368 buf[1] = 'x';
13369 sprintf_vma (tmp, disp);
6608db57 13370 for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
52b15da3
JH
13371 strcpy (buf + 2, tmp + i);
13372 }
13373 else
13374 {
13375 bfd_signed_vma v = disp;
13376 char tmp[30];
13377 int i;
13378 if (v < 0)
13379 {
13380 *(buf++) = '-';
13381 v = -disp;
6608db57 13382 /* Check for possible overflow on 0x8000000000000000. */
52b15da3
JH
13383 if (v < 0)
13384 {
13385 strcpy (buf, "9223372036854775808");
13386 return;
13387 }
13388 }
13389 if (!v)
13390 {
13391 strcpy (buf, "0");
13392 return;
13393 }
13394
13395 i = 0;
13396 tmp[29] = 0;
13397 while (v)
13398 {
6608db57 13399 tmp[28 - i] = (v % 10) + '0';
52b15da3
JH
13400 v /= 10;
13401 i++;
13402 }
13403 strcpy (buf, tmp + 29 - i);
13404 }
13405 }
13406 else
13407 {
13408 if (hex)
13409 sprintf (buf, "0x%x", (unsigned int) disp);
13410 else
13411 sprintf (buf, "%d", (int) disp);
13412 }
13413}
13414
5d669648
L
13415/* Put DISP in BUF as signed hex number. */
13416
13417static void
13418print_displacement (char *buf, bfd_vma disp)
13419{
13420 bfd_signed_vma val = disp;
13421 char tmp[30];
13422 int i, j = 0;
13423
13424 if (val < 0)
13425 {
13426 buf[j++] = '-';
13427 val = -disp;
13428
13429 /* Check for possible overflow. */
13430 if (val < 0)
13431 {
13432 switch (address_mode)
13433 {
13434 case mode_64bit:
13435 strcpy (buf + j, "0x8000000000000000");
13436 break;
13437 case mode_32bit:
13438 strcpy (buf + j, "0x80000000");
13439 break;
13440 case mode_16bit:
13441 strcpy (buf + j, "0x8000");
13442 break;
13443 }
13444 return;
13445 }
13446 }
13447
13448 buf[j++] = '0';
13449 buf[j++] = 'x';
13450
0af1713e 13451 sprintf_vma (tmp, (bfd_vma) val);
5d669648
L
13452 for (i = 0; tmp[i] == '0'; i++)
13453 continue;
13454 if (tmp[i] == '\0')
13455 i--;
13456 strcpy (buf + j, tmp + i);
13457}
13458
3f31e633
JB
13459static void
13460intel_operand_size (int bytemode, int sizeflag)
13461{
13462 switch (bytemode)
13463 {
13464 case b_mode:
b6169b20 13465 case b_swap_mode:
42903f7f 13466 case dqb_mode:
3f31e633
JB
13467 oappend ("BYTE PTR ");
13468 break;
13469 case w_mode:
13470 case dqw_mode:
13471 oappend ("WORD PTR ");
13472 break;
1a114b12 13473 case stack_v_mode:
cb712a9e 13474 if (address_mode == mode_64bit && (sizeflag & DFLAG))
3f31e633
JB
13475 {
13476 oappend ("QWORD PTR ");
3f31e633
JB
13477 break;
13478 }
13479 /* FALLTHRU */
13480 case v_mode:
b6169b20 13481 case v_swap_mode:
3f31e633 13482 case dq_mode:
161a04f6
L
13483 USED_REX (REX_W);
13484 if (rex & REX_W)
3f31e633 13485 oappend ("QWORD PTR ");
3f31e633 13486 else
f16cd0d5
L
13487 {
13488 if ((sizeflag & DFLAG) || bytemode == dq_mode)
13489 oappend ("DWORD PTR ");
13490 else
13491 oappend ("WORD PTR ");
13492 used_prefixes |= (prefixes & PREFIX_DATA);
13493 }
3f31e633 13494 break;
52fd6d94 13495 case z_mode:
161a04f6 13496 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
13497 *obufp++ = 'D';
13498 oappend ("WORD PTR ");
161a04f6 13499 if (!(rex & REX_W))
52fd6d94
JB
13500 used_prefixes |= (prefixes & PREFIX_DATA);
13501 break;
34b772a6
JB
13502 case a_mode:
13503 if (sizeflag & DFLAG)
13504 oappend ("QWORD PTR ");
13505 else
13506 oappend ("DWORD PTR ");
13507 used_prefixes |= (prefixes & PREFIX_DATA);
13508 break;
3f31e633 13509 case d_mode:
fa99fab2 13510 case d_swap_mode:
42903f7f 13511 case dqd_mode:
3f31e633
JB
13512 oappend ("DWORD PTR ");
13513 break;
13514 case q_mode:
b6169b20 13515 case q_swap_mode:
3f31e633
JB
13516 oappend ("QWORD PTR ");
13517 break;
13518 case m_mode:
cb712a9e 13519 if (address_mode == mode_64bit)
3f31e633
JB
13520 oappend ("QWORD PTR ");
13521 else
13522 oappend ("DWORD PTR ");
13523 break;
13524 case f_mode:
13525 if (sizeflag & DFLAG)
13526 oappend ("FWORD PTR ");
13527 else
13528 oappend ("DWORD PTR ");
13529 used_prefixes |= (prefixes & PREFIX_DATA);
13530 break;
13531 case t_mode:
13532 oappend ("TBYTE PTR ");
13533 break;
13534 case x_mode:
b6169b20 13535 case x_swap_mode:
c0f3af97
L
13536 if (need_vex)
13537 {
13538 switch (vex.length)
13539 {
13540 case 128:
13541 oappend ("XMMWORD PTR ");
13542 break;
13543 case 256:
13544 oappend ("YMMWORD PTR ");
13545 break;
13546 default:
13547 abort ();
13548 }
13549 }
13550 else
13551 oappend ("XMMWORD PTR ");
13552 break;
13553 case xmm_mode:
3f31e633
JB
13554 oappend ("XMMWORD PTR ");
13555 break;
c0f3af97
L
13556 case xmmq_mode:
13557 if (!need_vex)
13558 abort ();
13559
13560 switch (vex.length)
13561 {
13562 case 128:
13563 oappend ("QWORD PTR ");
13564 break;
13565 case 256:
13566 oappend ("XMMWORD PTR ");
13567 break;
13568 default:
13569 abort ();
13570 }
13571 break;
13572 case ymmq_mode:
13573 if (!need_vex)
13574 abort ();
13575
13576 switch (vex.length)
13577 {
13578 case 128:
13579 oappend ("QWORD PTR ");
13580 break;
13581 case 256:
13582 oappend ("YMMWORD PTR ");
13583 break;
13584 default:
13585 abort ();
13586 }
13587 break;
fb9c77c7
L
13588 case o_mode:
13589 oappend ("OWORD PTR ");
13590 break;
0bfee649
L
13591 case vex_w_dq_mode:
13592 if (!need_vex)
13593 abort ();
13594
13595 if (vex.w)
13596 oappend ("QWORD PTR ");
13597 else
13598 oappend ("DWORD PTR ");
13599 break;
3f31e633
JB
13600 default:
13601 break;
13602 }
13603}
13604
252b5132 13605static void
c0f3af97 13606OP_E_register (int bytemode, int sizeflag)
252b5132 13607{
c0f3af97
L
13608 int reg = modrm.rm;
13609 const char **names;
252b5132 13610
c0f3af97
L
13611 USED_REX (REX_B);
13612 if ((rex & REX_B))
13613 reg += 8;
252b5132 13614
b6169b20
L
13615 if ((sizeflag & SUFFIX_ALWAYS)
13616 && (bytemode == b_swap_mode || bytemode == v_swap_mode))
13617 swap_operand ();
13618
c0f3af97 13619 switch (bytemode)
252b5132 13620 {
c0f3af97 13621 case b_mode:
b6169b20 13622 case b_swap_mode:
c0f3af97
L
13623 USED_REX (0);
13624 if (rex)
13625 names = names8rex;
13626 else
13627 names = names8;
13628 break;
13629 case w_mode:
13630 names = names16;
13631 break;
13632 case d_mode:
13633 names = names32;
13634 break;
13635 case q_mode:
13636 names = names64;
13637 break;
13638 case m_mode:
13639 names = address_mode == mode_64bit ? names64 : names32;
13640 break;
13641 case stack_v_mode:
13642 if (address_mode == mode_64bit && (sizeflag & DFLAG))
252b5132 13643 {
c0f3af97 13644 names = names64;
252b5132 13645 break;
252b5132 13646 }
c0f3af97
L
13647 bytemode = v_mode;
13648 /* FALLTHRU */
13649 case v_mode:
b6169b20 13650 case v_swap_mode:
c0f3af97
L
13651 case dq_mode:
13652 case dqb_mode:
13653 case dqd_mode:
13654 case dqw_mode:
13655 USED_REX (REX_W);
13656 if (rex & REX_W)
13657 names = names64;
c0f3af97 13658 else
f16cd0d5
L
13659 {
13660 if ((sizeflag & DFLAG)
13661 || (bytemode != v_mode
13662 && bytemode != v_swap_mode))
13663 names = names32;
13664 else
13665 names = names16;
13666 used_prefixes |= (prefixes & PREFIX_DATA);
13667 }
c0f3af97
L
13668 break;
13669 case 0:
13670 return;
13671 default:
13672 oappend (INTERNAL_DISASSEMBLER_ERROR);
252b5132
RH
13673 return;
13674 }
c0f3af97
L
13675 oappend (names[reg]);
13676}
13677
13678static void
c1e679ec 13679OP_E_memory (int bytemode, int sizeflag)
c0f3af97
L
13680{
13681 bfd_vma disp = 0;
13682 int add = (rex & REX_B) ? 8 : 0;
13683 int riprel = 0;
252b5132 13684
c0f3af97 13685 USED_REX (REX_B);
3f31e633
JB
13686 if (intel_syntax)
13687 intel_operand_size (bytemode, sizeflag);
252b5132
RH
13688 append_seg ();
13689
5d669648 13690 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132 13691 {
5d669648
L
13692 /* 32/64 bit address mode */
13693 int havedisp;
252b5132
RH
13694 int havesib;
13695 int havebase;
0f7da397 13696 int haveindex;
20afcfb7 13697 int needindex;
82c18208 13698 int base, rbase;
91d6fa6a 13699 int vindex = 0;
252b5132
RH
13700 int scale = 0;
13701
13702 havesib = 0;
13703 havebase = 1;
0f7da397 13704 haveindex = 0;
7967e09e 13705 base = modrm.rm;
252b5132
RH
13706
13707 if (base == 4)
13708 {
13709 havesib = 1;
13710 FETCH_DATA (the_info, codep + 1);
91d6fa6a 13711 vindex = (*codep >> 3) & 7;
db51cc60 13712 scale = (*codep >> 6) & 3;
252b5132 13713 base = *codep & 7;
161a04f6
L
13714 USED_REX (REX_X);
13715 if (rex & REX_X)
91d6fa6a
NC
13716 vindex += 8;
13717 haveindex = vindex != 4;
252b5132
RH
13718 codep++;
13719 }
82c18208 13720 rbase = base + add;
252b5132 13721
7967e09e 13722 switch (modrm.mod)
252b5132
RH
13723 {
13724 case 0:
82c18208 13725 if (base == 5)
252b5132
RH
13726 {
13727 havebase = 0;
cb712a9e 13728 if (address_mode == mode_64bit && !havesib)
52b15da3
JH
13729 riprel = 1;
13730 disp = get32s ();
252b5132
RH
13731 }
13732 break;
13733 case 1:
13734 FETCH_DATA (the_info, codep + 1);
13735 disp = *codep++;
13736 if ((disp & 0x80) != 0)
13737 disp -= 0x100;
13738 break;
13739 case 2:
52b15da3 13740 disp = get32s ();
252b5132
RH
13741 break;
13742 }
13743
20afcfb7
L
13744 /* In 32bit mode, we need index register to tell [offset] from
13745 [eiz*1 + offset]. */
13746 needindex = (havesib
13747 && !havebase
13748 && !haveindex
13749 && address_mode == mode_32bit);
13750 havedisp = (havebase
13751 || needindex
13752 || (havesib && (haveindex || scale != 0)));
5d669648 13753
252b5132 13754 if (!intel_syntax)
82c18208 13755 if (modrm.mod != 0 || base == 5)
db6eb5be 13756 {
5d669648
L
13757 if (havedisp || riprel)
13758 print_displacement (scratchbuf, disp);
13759 else
13760 print_operand_value (scratchbuf, 1, disp);
db6eb5be 13761 oappend (scratchbuf);
52b15da3
JH
13762 if (riprel)
13763 {
13764 set_op (disp, 1);
87767711 13765 oappend (sizeflag & AFLAG ? "(%rip)" : "(%eip)");
52b15da3 13766 }
db6eb5be 13767 }
2da11e11 13768
87767711
JB
13769 if (havebase || haveindex || riprel)
13770 used_prefixes |= PREFIX_ADDR;
13771
5d669648 13772 if (havedisp || (intel_syntax && riprel))
252b5132 13773 {
252b5132 13774 *obufp++ = open_char;
52b15da3 13775 if (intel_syntax && riprel)
185b1163
L
13776 {
13777 set_op (disp, 1);
87767711 13778 oappend (sizeflag & AFLAG ? "rip" : "eip");
185b1163 13779 }
db6eb5be 13780 *obufp = '\0';
252b5132 13781 if (havebase)
cb712a9e 13782 oappend (address_mode == mode_64bit && (sizeflag & AFLAG)
82c18208 13783 ? names64[rbase] : names32[rbase]);
252b5132
RH
13784 if (havesib)
13785 {
db51cc60
L
13786 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
13787 print index to tell base + index from base. */
13788 if (scale != 0
20afcfb7 13789 || needindex
db51cc60
L
13790 || haveindex
13791 || (havebase && base != ESP_REG_NUM))
252b5132 13792 {
9306ca4a 13793 if (!intel_syntax || havebase)
db6eb5be 13794 {
9306ca4a
JB
13795 *obufp++ = separator_char;
13796 *obufp = '\0';
db6eb5be 13797 }
db51cc60
L
13798 if (haveindex)
13799 oappend (address_mode == mode_64bit
13800 && (sizeflag & AFLAG)
91d6fa6a 13801 ? names64[vindex] : names32[vindex]);
db51cc60
L
13802 else
13803 oappend (address_mode == mode_64bit
13804 && (sizeflag & AFLAG)
13805 ? index64 : index32);
13806
db6eb5be
AM
13807 *obufp++ = scale_char;
13808 *obufp = '\0';
13809 sprintf (scratchbuf, "%d", 1 << scale);
13810 oappend (scratchbuf);
13811 }
252b5132 13812 }
185b1163 13813 if (intel_syntax
82c18208 13814 && (disp || modrm.mod != 0 || base == 5))
3d456fa1 13815 {
db51cc60 13816 if (!havedisp || (bfd_signed_vma) disp >= 0)
3d456fa1
JB
13817 {
13818 *obufp++ = '+';
13819 *obufp = '\0';
13820 }
05203043 13821 else if (modrm.mod != 1 && disp != -disp)
3d456fa1
JB
13822 {
13823 *obufp++ = '-';
13824 *obufp = '\0';
13825 disp = - (bfd_signed_vma) disp;
13826 }
13827
db51cc60
L
13828 if (havedisp)
13829 print_displacement (scratchbuf, disp);
13830 else
13831 print_operand_value (scratchbuf, 1, disp);
3d456fa1
JB
13832 oappend (scratchbuf);
13833 }
252b5132
RH
13834
13835 *obufp++ = close_char;
db6eb5be 13836 *obufp = '\0';
252b5132
RH
13837 }
13838 else if (intel_syntax)
db6eb5be 13839 {
82c18208 13840 if (modrm.mod != 0 || base == 5)
db6eb5be 13841 {
252b5132
RH
13842 if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
13843 | PREFIX_ES | PREFIX_FS | PREFIX_GS))
13844 ;
13845 else
13846 {
d708bcba 13847 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
13848 oappend (":");
13849 }
52b15da3 13850 print_operand_value (scratchbuf, 1, disp);
db6eb5be
AM
13851 oappend (scratchbuf);
13852 }
13853 }
252b5132
RH
13854 }
13855 else
f16cd0d5
L
13856 {
13857 /* 16 bit address mode */
13858 used_prefixes |= prefixes & PREFIX_ADDR;
7967e09e 13859 switch (modrm.mod)
252b5132
RH
13860 {
13861 case 0:
7967e09e 13862 if (modrm.rm == 6)
252b5132
RH
13863 {
13864 disp = get16 ();
13865 if ((disp & 0x8000) != 0)
13866 disp -= 0x10000;
13867 }
13868 break;
13869 case 1:
13870 FETCH_DATA (the_info, codep + 1);
13871 disp = *codep++;
13872 if ((disp & 0x80) != 0)
13873 disp -= 0x100;
13874 break;
13875 case 2:
13876 disp = get16 ();
13877 if ((disp & 0x8000) != 0)
13878 disp -= 0x10000;
13879 break;
13880 }
13881
13882 if (!intel_syntax)
7967e09e 13883 if (modrm.mod != 0 || modrm.rm == 6)
db6eb5be 13884 {
5d669648 13885 print_displacement (scratchbuf, disp);
db6eb5be
AM
13886 oappend (scratchbuf);
13887 }
252b5132 13888
7967e09e 13889 if (modrm.mod != 0 || modrm.rm != 6)
252b5132
RH
13890 {
13891 *obufp++ = open_char;
db6eb5be 13892 *obufp = '\0';
7967e09e 13893 oappend (index16[modrm.rm]);
5d669648
L
13894 if (intel_syntax
13895 && (disp || modrm.mod != 0 || modrm.rm == 6))
3d456fa1 13896 {
5d669648 13897 if ((bfd_signed_vma) disp >= 0)
3d456fa1
JB
13898 {
13899 *obufp++ = '+';
13900 *obufp = '\0';
13901 }
7967e09e 13902 else if (modrm.mod != 1)
3d456fa1
JB
13903 {
13904 *obufp++ = '-';
13905 *obufp = '\0';
13906 disp = - (bfd_signed_vma) disp;
13907 }
13908
5d669648 13909 print_displacement (scratchbuf, disp);
3d456fa1
JB
13910 oappend (scratchbuf);
13911 }
13912
db6eb5be
AM
13913 *obufp++ = close_char;
13914 *obufp = '\0';
252b5132 13915 }
3d456fa1
JB
13916 else if (intel_syntax)
13917 {
13918 if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
13919 | PREFIX_ES | PREFIX_FS | PREFIX_GS))
13920 ;
13921 else
13922 {
13923 oappend (names_seg[ds_reg - es_reg]);
13924 oappend (":");
13925 }
13926 print_operand_value (scratchbuf, 1, disp & 0xffff);
13927 oappend (scratchbuf);
13928 }
252b5132
RH
13929 }
13930}
13931
c0f3af97 13932static void
8b3f93e7 13933OP_E (int bytemode, int sizeflag)
c0f3af97
L
13934{
13935 /* Skip mod/rm byte. */
13936 MODRM_CHECK;
13937 codep++;
13938
13939 if (modrm.mod == 3)
13940 OP_E_register (bytemode, sizeflag);
13941 else
c1e679ec 13942 OP_E_memory (bytemode, sizeflag);
c0f3af97
L
13943}
13944
252b5132 13945static void
26ca5450 13946OP_G (int bytemode, int sizeflag)
252b5132 13947{
52b15da3 13948 int add = 0;
161a04f6
L
13949 USED_REX (REX_R);
13950 if (rex & REX_R)
52b15da3 13951 add += 8;
252b5132
RH
13952 switch (bytemode)
13953 {
13954 case b_mode:
52b15da3
JH
13955 USED_REX (0);
13956 if (rex)
7967e09e 13957 oappend (names8rex[modrm.reg + add]);
52b15da3 13958 else
7967e09e 13959 oappend (names8[modrm.reg + add]);
252b5132
RH
13960 break;
13961 case w_mode:
7967e09e 13962 oappend (names16[modrm.reg + add]);
252b5132
RH
13963 break;
13964 case d_mode:
7967e09e 13965 oappend (names32[modrm.reg + add]);
52b15da3
JH
13966 break;
13967 case q_mode:
7967e09e 13968 oappend (names64[modrm.reg + add]);
252b5132
RH
13969 break;
13970 case v_mode:
9306ca4a 13971 case dq_mode:
42903f7f
L
13972 case dqb_mode:
13973 case dqd_mode:
9306ca4a 13974 case dqw_mode:
161a04f6
L
13975 USED_REX (REX_W);
13976 if (rex & REX_W)
7967e09e 13977 oappend (names64[modrm.reg + add]);
252b5132 13978 else
f16cd0d5
L
13979 {
13980 if ((sizeflag & DFLAG) || bytemode != v_mode)
13981 oappend (names32[modrm.reg + add]);
13982 else
13983 oappend (names16[modrm.reg + add]);
13984 used_prefixes |= (prefixes & PREFIX_DATA);
13985 }
252b5132 13986 break;
90700ea2 13987 case m_mode:
cb712a9e 13988 if (address_mode == mode_64bit)
7967e09e 13989 oappend (names64[modrm.reg + add]);
90700ea2 13990 else
7967e09e 13991 oappend (names32[modrm.reg + add]);
90700ea2 13992 break;
252b5132
RH
13993 default:
13994 oappend (INTERNAL_DISASSEMBLER_ERROR);
13995 break;
13996 }
13997}
13998
52b15da3 13999static bfd_vma
26ca5450 14000get64 (void)
52b15da3 14001{
5dd0794d 14002 bfd_vma x;
52b15da3 14003#ifdef BFD64
5dd0794d
AM
14004 unsigned int a;
14005 unsigned int b;
14006
52b15da3
JH
14007 FETCH_DATA (the_info, codep + 8);
14008 a = *codep++ & 0xff;
14009 a |= (*codep++ & 0xff) << 8;
14010 a |= (*codep++ & 0xff) << 16;
14011 a |= (*codep++ & 0xff) << 24;
5dd0794d 14012 b = *codep++ & 0xff;
52b15da3
JH
14013 b |= (*codep++ & 0xff) << 8;
14014 b |= (*codep++ & 0xff) << 16;
14015 b |= (*codep++ & 0xff) << 24;
14016 x = a + ((bfd_vma) b << 32);
14017#else
6608db57 14018 abort ();
5dd0794d 14019 x = 0;
52b15da3
JH
14020#endif
14021 return x;
14022}
14023
14024static bfd_signed_vma
26ca5450 14025get32 (void)
252b5132 14026{
52b15da3 14027 bfd_signed_vma x = 0;
252b5132
RH
14028
14029 FETCH_DATA (the_info, codep + 4);
52b15da3
JH
14030 x = *codep++ & (bfd_signed_vma) 0xff;
14031 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14032 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14033 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14034 return x;
14035}
14036
14037static bfd_signed_vma
26ca5450 14038get32s (void)
52b15da3
JH
14039{
14040 bfd_signed_vma x = 0;
14041
14042 FETCH_DATA (the_info, codep + 4);
14043 x = *codep++ & (bfd_signed_vma) 0xff;
14044 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14045 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14046 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14047
14048 x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
14049
252b5132
RH
14050 return x;
14051}
14052
14053static int
26ca5450 14054get16 (void)
252b5132
RH
14055{
14056 int x = 0;
14057
14058 FETCH_DATA (the_info, codep + 2);
14059 x = *codep++ & 0xff;
14060 x |= (*codep++ & 0xff) << 8;
14061 return x;
14062}
14063
14064static void
26ca5450 14065set_op (bfd_vma op, int riprel)
252b5132
RH
14066{
14067 op_index[op_ad] = op_ad;
cb712a9e 14068 if (address_mode == mode_64bit)
7081ff04
AJ
14069 {
14070 op_address[op_ad] = op;
14071 op_riprel[op_ad] = riprel;
14072 }
14073 else
14074 {
14075 /* Mask to get a 32-bit address. */
14076 op_address[op_ad] = op & 0xffffffff;
14077 op_riprel[op_ad] = riprel & 0xffffffff;
14078 }
252b5132
RH
14079}
14080
14081static void
26ca5450 14082OP_REG (int code, int sizeflag)
252b5132 14083{
2da11e11 14084 const char *s;
9b60702d 14085 int add;
161a04f6
L
14086 USED_REX (REX_B);
14087 if (rex & REX_B)
52b15da3 14088 add = 8;
9b60702d
L
14089 else
14090 add = 0;
52b15da3
JH
14091
14092 switch (code)
14093 {
52b15da3
JH
14094 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14095 case sp_reg: case bp_reg: case si_reg: case di_reg:
14096 s = names16[code - ax_reg + add];
14097 break;
14098 case es_reg: case ss_reg: case cs_reg:
14099 case ds_reg: case fs_reg: case gs_reg:
14100 s = names_seg[code - es_reg + add];
14101 break;
14102 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14103 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
14104 USED_REX (0);
14105 if (rex)
14106 s = names8rex[code - al_reg + add];
14107 else
14108 s = names8[code - al_reg];
14109 break;
6439fc28
AM
14110 case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
14111 case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
cb712a9e 14112 if (address_mode == mode_64bit && (sizeflag & DFLAG))
6439fc28
AM
14113 {
14114 s = names64[code - rAX_reg + add];
14115 break;
14116 }
14117 code += eAX_reg - rAX_reg;
6608db57 14118 /* Fall through. */
52b15da3
JH
14119 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14120 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
14121 USED_REX (REX_W);
14122 if (rex & REX_W)
52b15da3 14123 s = names64[code - eAX_reg + add];
52b15da3 14124 else
f16cd0d5
L
14125 {
14126 if (sizeflag & DFLAG)
14127 s = names32[code - eAX_reg + add];
14128 else
14129 s = names16[code - eAX_reg + add];
14130 used_prefixes |= (prefixes & PREFIX_DATA);
14131 }
52b15da3 14132 break;
52b15da3
JH
14133 default:
14134 s = INTERNAL_DISASSEMBLER_ERROR;
14135 break;
14136 }
14137 oappend (s);
14138}
14139
14140static void
26ca5450 14141OP_IMREG (int code, int sizeflag)
52b15da3
JH
14142{
14143 const char *s;
252b5132
RH
14144
14145 switch (code)
14146 {
14147 case indir_dx_reg:
d708bcba 14148 if (intel_syntax)
52fd6d94 14149 s = "dx";
d708bcba 14150 else
db6eb5be 14151 s = "(%dx)";
252b5132
RH
14152 break;
14153 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14154 case sp_reg: case bp_reg: case si_reg: case di_reg:
14155 s = names16[code - ax_reg];
14156 break;
14157 case es_reg: case ss_reg: case cs_reg:
14158 case ds_reg: case fs_reg: case gs_reg:
14159 s = names_seg[code - es_reg];
14160 break;
14161 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14162 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
52b15da3
JH
14163 USED_REX (0);
14164 if (rex)
14165 s = names8rex[code - al_reg];
14166 else
14167 s = names8[code - al_reg];
252b5132
RH
14168 break;
14169 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14170 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
14171 USED_REX (REX_W);
14172 if (rex & REX_W)
52b15da3 14173 s = names64[code - eAX_reg];
252b5132 14174 else
f16cd0d5
L
14175 {
14176 if (sizeflag & DFLAG)
14177 s = names32[code - eAX_reg];
14178 else
14179 s = names16[code - eAX_reg];
14180 used_prefixes |= (prefixes & PREFIX_DATA);
14181 }
252b5132 14182 break;
52fd6d94 14183 case z_mode_ax_reg:
161a04f6 14184 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
14185 s = *names32;
14186 else
14187 s = *names16;
161a04f6 14188 if (!(rex & REX_W))
52fd6d94
JB
14189 used_prefixes |= (prefixes & PREFIX_DATA);
14190 break;
252b5132
RH
14191 default:
14192 s = INTERNAL_DISASSEMBLER_ERROR;
14193 break;
14194 }
14195 oappend (s);
14196}
14197
14198static void
26ca5450 14199OP_I (int bytemode, int sizeflag)
252b5132 14200{
52b15da3
JH
14201 bfd_signed_vma op;
14202 bfd_signed_vma mask = -1;
252b5132
RH
14203
14204 switch (bytemode)
14205 {
14206 case b_mode:
14207 FETCH_DATA (the_info, codep + 1);
52b15da3
JH
14208 op = *codep++;
14209 mask = 0xff;
14210 break;
14211 case q_mode:
cb712a9e 14212 if (address_mode == mode_64bit)
6439fc28
AM
14213 {
14214 op = get32s ();
14215 break;
14216 }
6608db57 14217 /* Fall through. */
252b5132 14218 case v_mode:
161a04f6
L
14219 USED_REX (REX_W);
14220 if (rex & REX_W)
52b15da3 14221 op = get32s ();
252b5132 14222 else
52b15da3 14223 {
f16cd0d5
L
14224 if (sizeflag & DFLAG)
14225 {
14226 op = get32 ();
14227 mask = 0xffffffff;
14228 }
14229 else
14230 {
14231 op = get16 ();
14232 mask = 0xfffff;
14233 }
14234 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 14235 }
252b5132
RH
14236 break;
14237 case w_mode:
52b15da3 14238 mask = 0xfffff;
252b5132
RH
14239 op = get16 ();
14240 break;
9306ca4a
JB
14241 case const_1_mode:
14242 if (intel_syntax)
14243 oappend ("1");
14244 return;
252b5132
RH
14245 default:
14246 oappend (INTERNAL_DISASSEMBLER_ERROR);
14247 return;
14248 }
14249
52b15da3
JH
14250 op &= mask;
14251 scratchbuf[0] = '$';
d708bcba
AM
14252 print_operand_value (scratchbuf + 1, 1, op);
14253 oappend (scratchbuf + intel_syntax);
52b15da3
JH
14254 scratchbuf[0] = '\0';
14255}
14256
14257static void
26ca5450 14258OP_I64 (int bytemode, int sizeflag)
52b15da3
JH
14259{
14260 bfd_signed_vma op;
14261 bfd_signed_vma mask = -1;
14262
cb712a9e 14263 if (address_mode != mode_64bit)
6439fc28
AM
14264 {
14265 OP_I (bytemode, sizeflag);
14266 return;
14267 }
14268
52b15da3
JH
14269 switch (bytemode)
14270 {
14271 case b_mode:
14272 FETCH_DATA (the_info, codep + 1);
14273 op = *codep++;
14274 mask = 0xff;
14275 break;
14276 case v_mode:
161a04f6
L
14277 USED_REX (REX_W);
14278 if (rex & REX_W)
52b15da3 14279 op = get64 ();
52b15da3
JH
14280 else
14281 {
f16cd0d5
L
14282 if (sizeflag & DFLAG)
14283 {
14284 op = get32 ();
14285 mask = 0xffffffff;
14286 }
14287 else
14288 {
14289 op = get16 ();
14290 mask = 0xfffff;
14291 }
14292 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 14293 }
52b15da3
JH
14294 break;
14295 case w_mode:
14296 mask = 0xfffff;
14297 op = get16 ();
14298 break;
14299 default:
14300 oappend (INTERNAL_DISASSEMBLER_ERROR);
14301 return;
14302 }
14303
14304 op &= mask;
14305 scratchbuf[0] = '$';
d708bcba
AM
14306 print_operand_value (scratchbuf + 1, 1, op);
14307 oappend (scratchbuf + intel_syntax);
252b5132
RH
14308 scratchbuf[0] = '\0';
14309}
14310
14311static void
26ca5450 14312OP_sI (int bytemode, int sizeflag)
252b5132 14313{
52b15da3
JH
14314 bfd_signed_vma op;
14315 bfd_signed_vma mask = -1;
252b5132
RH
14316
14317 switch (bytemode)
14318 {
14319 case b_mode:
14320 FETCH_DATA (the_info, codep + 1);
14321 op = *codep++;
14322 if ((op & 0x80) != 0)
14323 op -= 0x100;
52b15da3 14324 mask = 0xffffffff;
252b5132
RH
14325 break;
14326 case v_mode:
161a04f6
L
14327 USED_REX (REX_W);
14328 if (rex & REX_W)
52b15da3 14329 op = get32s ();
252b5132
RH
14330 else
14331 {
f16cd0d5
L
14332 if (sizeflag & DFLAG)
14333 {
14334 op = get32s ();
14335 mask = 0xffffffff;
14336 }
14337 else
14338 {
14339 mask = 0xffffffff;
14340 op = get16 ();
14341 if ((op & 0x8000) != 0)
14342 op -= 0x10000;
14343 }
14344 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132
RH
14345 }
14346 break;
14347 case w_mode:
14348 op = get16 ();
52b15da3 14349 mask = 0xffffffff;
252b5132
RH
14350 if ((op & 0x8000) != 0)
14351 op -= 0x10000;
14352 break;
14353 default:
14354 oappend (INTERNAL_DISASSEMBLER_ERROR);
14355 return;
14356 }
52b15da3
JH
14357
14358 scratchbuf[0] = '$';
14359 print_operand_value (scratchbuf + 1, 1, op);
d708bcba 14360 oappend (scratchbuf + intel_syntax);
252b5132
RH
14361}
14362
14363static void
26ca5450 14364OP_J (int bytemode, int sizeflag)
252b5132 14365{
52b15da3 14366 bfd_vma disp;
7081ff04 14367 bfd_vma mask = -1;
65ca155d 14368 bfd_vma segment = 0;
252b5132
RH
14369
14370 switch (bytemode)
14371 {
14372 case b_mode:
14373 FETCH_DATA (the_info, codep + 1);
14374 disp = *codep++;
14375 if ((disp & 0x80) != 0)
14376 disp -= 0x100;
14377 break;
14378 case v_mode:
f16cd0d5 14379 USED_REX (REX_W);
161a04f6 14380 if ((sizeflag & DFLAG) || (rex & REX_W))
52b15da3 14381 disp = get32s ();
252b5132
RH
14382 else
14383 {
14384 disp = get16 ();
206717e8
L
14385 if ((disp & 0x8000) != 0)
14386 disp -= 0x10000;
65ca155d
L
14387 /* In 16bit mode, address is wrapped around at 64k within
14388 the same segment. Otherwise, a data16 prefix on a jump
14389 instruction means that the pc is masked to 16 bits after
14390 the displacement is added! */
14391 mask = 0xffff;
14392 if ((prefixes & PREFIX_DATA) == 0)
14393 segment = ((start_pc + codep - start_codep)
14394 & ~((bfd_vma) 0xffff));
252b5132 14395 }
f16cd0d5
L
14396 if (!(rex & REX_W))
14397 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132
RH
14398 break;
14399 default:
14400 oappend (INTERNAL_DISASSEMBLER_ERROR);
14401 return;
14402 }
65ca155d 14403 disp = ((start_pc + codep - start_codep + disp) & mask) | segment;
52b15da3
JH
14404 set_op (disp, 0);
14405 print_operand_value (scratchbuf, 1, disp);
252b5132
RH
14406 oappend (scratchbuf);
14407}
14408
252b5132 14409static void
ed7841b3 14410OP_SEG (int bytemode, int sizeflag)
252b5132 14411{
ed7841b3 14412 if (bytemode == w_mode)
7967e09e 14413 oappend (names_seg[modrm.reg]);
ed7841b3 14414 else
7967e09e 14415 OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
252b5132
RH
14416}
14417
14418static void
26ca5450 14419OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
252b5132
RH
14420{
14421 int seg, offset;
14422
c608c12e 14423 if (sizeflag & DFLAG)
252b5132 14424 {
c608c12e
AM
14425 offset = get32 ();
14426 seg = get16 ();
252b5132 14427 }
c608c12e
AM
14428 else
14429 {
14430 offset = get16 ();
14431 seg = get16 ();
14432 }
7d421014 14433 used_prefixes |= (prefixes & PREFIX_DATA);
d708bcba 14434 if (intel_syntax)
3f31e633 14435 sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
d708bcba
AM
14436 else
14437 sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
c608c12e 14438 oappend (scratchbuf);
252b5132
RH
14439}
14440
252b5132 14441static void
3f31e633 14442OP_OFF (int bytemode, int sizeflag)
252b5132 14443{
52b15da3 14444 bfd_vma off;
252b5132 14445
3f31e633
JB
14446 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
14447 intel_operand_size (bytemode, sizeflag);
252b5132
RH
14448 append_seg ();
14449
cb712a9e 14450 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132
RH
14451 off = get32 ();
14452 else
14453 off = get16 ();
14454
14455 if (intel_syntax)
14456 {
14457 if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
db6eb5be 14458 | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
252b5132 14459 {
d708bcba 14460 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
14461 oappend (":");
14462 }
14463 }
52b15da3
JH
14464 print_operand_value (scratchbuf, 1, off);
14465 oappend (scratchbuf);
14466}
6439fc28 14467
52b15da3 14468static void
3f31e633 14469OP_OFF64 (int bytemode, int sizeflag)
52b15da3
JH
14470{
14471 bfd_vma off;
14472
539e75ad
L
14473 if (address_mode != mode_64bit
14474 || (prefixes & PREFIX_ADDR))
6439fc28
AM
14475 {
14476 OP_OFF (bytemode, sizeflag);
14477 return;
14478 }
14479
3f31e633
JB
14480 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
14481 intel_operand_size (bytemode, sizeflag);
52b15da3
JH
14482 append_seg ();
14483
6608db57 14484 off = get64 ();
52b15da3
JH
14485
14486 if (intel_syntax)
14487 {
14488 if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
db6eb5be 14489 | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
52b15da3 14490 {
d708bcba 14491 oappend (names_seg[ds_reg - es_reg]);
52b15da3
JH
14492 oappend (":");
14493 }
14494 }
14495 print_operand_value (scratchbuf, 1, off);
252b5132
RH
14496 oappend (scratchbuf);
14497}
14498
14499static void
26ca5450 14500ptr_reg (int code, int sizeflag)
252b5132 14501{
2da11e11 14502 const char *s;
d708bcba 14503
1d9f512f 14504 *obufp++ = open_char;
20f0a1fc 14505 used_prefixes |= (prefixes & PREFIX_ADDR);
cb712a9e 14506 if (address_mode == mode_64bit)
c1a64871
JH
14507 {
14508 if (!(sizeflag & AFLAG))
db6eb5be 14509 s = names32[code - eAX_reg];
c1a64871 14510 else
db6eb5be 14511 s = names64[code - eAX_reg];
c1a64871 14512 }
52b15da3 14513 else if (sizeflag & AFLAG)
252b5132
RH
14514 s = names32[code - eAX_reg];
14515 else
14516 s = names16[code - eAX_reg];
14517 oappend (s);
1d9f512f
AM
14518 *obufp++ = close_char;
14519 *obufp = 0;
252b5132
RH
14520}
14521
14522static void
26ca5450 14523OP_ESreg (int code, int sizeflag)
252b5132 14524{
9306ca4a 14525 if (intel_syntax)
52fd6d94
JB
14526 {
14527 switch (codep[-1])
14528 {
14529 case 0x6d: /* insw/insl */
14530 intel_operand_size (z_mode, sizeflag);
14531 break;
14532 case 0xa5: /* movsw/movsl/movsq */
14533 case 0xa7: /* cmpsw/cmpsl/cmpsq */
14534 case 0xab: /* stosw/stosl */
14535 case 0xaf: /* scasw/scasl */
14536 intel_operand_size (v_mode, sizeflag);
14537 break;
14538 default:
14539 intel_operand_size (b_mode, sizeflag);
14540 }
14541 }
d708bcba 14542 oappend ("%es:" + intel_syntax);
252b5132
RH
14543 ptr_reg (code, sizeflag);
14544}
14545
14546static void
26ca5450 14547OP_DSreg (int code, int sizeflag)
252b5132 14548{
9306ca4a 14549 if (intel_syntax)
52fd6d94
JB
14550 {
14551 switch (codep[-1])
14552 {
14553 case 0x6f: /* outsw/outsl */
14554 intel_operand_size (z_mode, sizeflag);
14555 break;
14556 case 0xa5: /* movsw/movsl/movsq */
14557 case 0xa7: /* cmpsw/cmpsl/cmpsq */
14558 case 0xad: /* lodsw/lodsl/lodsq */
14559 intel_operand_size (v_mode, sizeflag);
14560 break;
14561 default:
14562 intel_operand_size (b_mode, sizeflag);
14563 }
14564 }
252b5132
RH
14565 if ((prefixes
14566 & (PREFIX_CS
14567 | PREFIX_DS
14568 | PREFIX_SS
14569 | PREFIX_ES
14570 | PREFIX_FS
14571 | PREFIX_GS)) == 0)
14572 prefixes |= PREFIX_DS;
6608db57 14573 append_seg ();
252b5132
RH
14574 ptr_reg (code, sizeflag);
14575}
14576
252b5132 14577static void
26ca5450 14578OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14579{
9b60702d 14580 int add;
161a04f6 14581 if (rex & REX_R)
c4a530c5 14582 {
161a04f6 14583 USED_REX (REX_R);
c4a530c5
JB
14584 add = 8;
14585 }
cb712a9e 14586 else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
c4a530c5 14587 {
f16cd0d5 14588 all_prefixes[last_lock_prefix] = 0;
c4a530c5
JB
14589 used_prefixes |= PREFIX_LOCK;
14590 add = 8;
14591 }
9b60702d
L
14592 else
14593 add = 0;
7967e09e 14594 sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
d708bcba 14595 oappend (scratchbuf + intel_syntax);
252b5132
RH
14596}
14597
252b5132 14598static void
26ca5450 14599OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14600{
9b60702d 14601 int add;
161a04f6
L
14602 USED_REX (REX_R);
14603 if (rex & REX_R)
52b15da3 14604 add = 8;
9b60702d
L
14605 else
14606 add = 0;
d708bcba 14607 if (intel_syntax)
7967e09e 14608 sprintf (scratchbuf, "db%d", modrm.reg + add);
d708bcba 14609 else
7967e09e 14610 sprintf (scratchbuf, "%%db%d", modrm.reg + add);
252b5132
RH
14611 oappend (scratchbuf);
14612}
14613
252b5132 14614static void
26ca5450 14615OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14616{
7967e09e 14617 sprintf (scratchbuf, "%%tr%d", modrm.reg);
d708bcba 14618 oappend (scratchbuf + intel_syntax);
252b5132
RH
14619}
14620
14621static void
6f74c397 14622OP_R (int bytemode, int sizeflag)
252b5132 14623{
7967e09e 14624 if (modrm.mod == 3)
2da11e11
AM
14625 OP_E (bytemode, sizeflag);
14626 else
6608db57 14627 BadOp ();
252b5132
RH
14628}
14629
14630static void
26ca5450 14631OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14632{
041bd2e0
JH
14633 used_prefixes |= (prefixes & PREFIX_DATA);
14634 if (prefixes & PREFIX_DATA)
20f0a1fc 14635 {
9b60702d 14636 int add;
161a04f6
L
14637 USED_REX (REX_R);
14638 if (rex & REX_R)
20f0a1fc 14639 add = 8;
9b60702d
L
14640 else
14641 add = 0;
7967e09e 14642 sprintf (scratchbuf, "%%xmm%d", modrm.reg + add);
20f0a1fc 14643 }
041bd2e0 14644 else
7967e09e 14645 sprintf (scratchbuf, "%%mm%d", modrm.reg);
d708bcba 14646 oappend (scratchbuf + intel_syntax);
252b5132
RH
14647}
14648
c608c12e 14649static void
c0f3af97 14650OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
c608c12e 14651{
9b60702d 14652 int add;
161a04f6
L
14653 USED_REX (REX_R);
14654 if (rex & REX_R)
041bd2e0 14655 add = 8;
9b60702d
L
14656 else
14657 add = 0;
c0f3af97
L
14658 if (need_vex && bytemode != xmm_mode)
14659 {
14660 switch (vex.length)
14661 {
14662 case 128:
14663 sprintf (scratchbuf, "%%xmm%d", modrm.reg + add);
14664 break;
14665 case 256:
14666 sprintf (scratchbuf, "%%ymm%d", modrm.reg + add);
14667 break;
14668 default:
14669 abort ();
14670 }
14671 }
14672 else
14673 sprintf (scratchbuf, "%%xmm%d", modrm.reg + add);
d708bcba 14674 oappend (scratchbuf + intel_syntax);
c608c12e
AM
14675}
14676
252b5132 14677static void
26ca5450 14678OP_EM (int bytemode, int sizeflag)
252b5132 14679{
7967e09e 14680 if (modrm.mod != 3)
252b5132 14681 {
b6169b20
L
14682 if (intel_syntax
14683 && (bytemode == v_mode || bytemode == v_swap_mode))
9306ca4a
JB
14684 {
14685 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
14686 used_prefixes |= (prefixes & PREFIX_DATA);
14687 }
252b5132
RH
14688 OP_E (bytemode, sizeflag);
14689 return;
14690 }
14691
b6169b20
L
14692 if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
14693 swap_operand ();
14694
6608db57 14695 /* Skip mod/rm byte. */
4bba6815 14696 MODRM_CHECK;
252b5132 14697 codep++;
041bd2e0
JH
14698 used_prefixes |= (prefixes & PREFIX_DATA);
14699 if (prefixes & PREFIX_DATA)
20f0a1fc 14700 {
9b60702d 14701 int add;
20f0a1fc 14702
161a04f6
L
14703 USED_REX (REX_B);
14704 if (rex & REX_B)
20f0a1fc 14705 add = 8;
9b60702d
L
14706 else
14707 add = 0;
7967e09e 14708 sprintf (scratchbuf, "%%xmm%d", modrm.rm + add);
20f0a1fc 14709 }
041bd2e0 14710 else
7967e09e 14711 sprintf (scratchbuf, "%%mm%d", modrm.rm);
d708bcba 14712 oappend (scratchbuf + intel_syntax);
252b5132
RH
14713}
14714
246c51aa
L
14715/* cvt* are the only instructions in sse2 which have
14716 both SSE and MMX operands and also have 0x66 prefix
14717 in their opcode. 0x66 was originally used to differentiate
14718 between SSE and MMX instruction(operands). So we have to handle the
4d9567e0
MM
14719 cvt* separately using OP_EMC and OP_MXC */
14720static void
14721OP_EMC (int bytemode, int sizeflag)
14722{
7967e09e 14723 if (modrm.mod != 3)
4d9567e0
MM
14724 {
14725 if (intel_syntax && bytemode == v_mode)
14726 {
14727 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
14728 used_prefixes |= (prefixes & PREFIX_DATA);
14729 }
14730 OP_E (bytemode, sizeflag);
14731 return;
14732 }
246c51aa 14733
4d9567e0
MM
14734 /* Skip mod/rm byte. */
14735 MODRM_CHECK;
14736 codep++;
14737 used_prefixes |= (prefixes & PREFIX_DATA);
7967e09e 14738 sprintf (scratchbuf, "%%mm%d", modrm.rm);
4d9567e0
MM
14739 oappend (scratchbuf + intel_syntax);
14740}
14741
14742static void
14743OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
14744{
14745 used_prefixes |= (prefixes & PREFIX_DATA);
7967e09e 14746 sprintf (scratchbuf, "%%mm%d", modrm.reg);
4d9567e0
MM
14747 oappend (scratchbuf + intel_syntax);
14748}
14749
c608c12e 14750static void
26ca5450 14751OP_EX (int bytemode, int sizeflag)
c608c12e 14752{
9b60702d 14753 int add;
d6f574e0
L
14754
14755 /* Skip mod/rm byte. */
14756 MODRM_CHECK;
14757 codep++;
14758
7967e09e 14759 if (modrm.mod != 3)
c608c12e 14760 {
c1e679ec 14761 OP_E_memory (bytemode, sizeflag);
c608c12e
AM
14762 return;
14763 }
d6f574e0 14764
161a04f6
L
14765 USED_REX (REX_B);
14766 if (rex & REX_B)
041bd2e0 14767 add = 8;
9b60702d
L
14768 else
14769 add = 0;
c608c12e 14770
b6169b20 14771 if ((sizeflag & SUFFIX_ALWAYS)
fa99fab2
L
14772 && (bytemode == x_swap_mode
14773 || bytemode == d_swap_mode
14774 || bytemode == q_swap_mode))
b6169b20
L
14775 swap_operand ();
14776
c0f3af97
L
14777 if (need_vex
14778 && bytemode != xmm_mode
14779 && bytemode != xmmq_mode)
14780 {
14781 switch (vex.length)
14782 {
14783 case 128:
14784 sprintf (scratchbuf, "%%xmm%d", modrm.rm + add);
14785 break;
14786 case 256:
14787 sprintf (scratchbuf, "%%ymm%d", modrm.rm + add);
14788 break;
14789 default:
14790 abort ();
14791 }
14792 }
14793 else
14794 sprintf (scratchbuf, "%%xmm%d", modrm.rm + add);
d708bcba 14795 oappend (scratchbuf + intel_syntax);
c608c12e
AM
14796}
14797
252b5132 14798static void
26ca5450 14799OP_MS (int bytemode, int sizeflag)
252b5132 14800{
7967e09e 14801 if (modrm.mod == 3)
2da11e11
AM
14802 OP_EM (bytemode, sizeflag);
14803 else
6608db57 14804 BadOp ();
252b5132
RH
14805}
14806
992aaec9 14807static void
26ca5450 14808OP_XS (int bytemode, int sizeflag)
992aaec9 14809{
7967e09e 14810 if (modrm.mod == 3)
992aaec9
AM
14811 OP_EX (bytemode, sizeflag);
14812 else
6608db57 14813 BadOp ();
992aaec9
AM
14814}
14815
cc0ec051
AM
14816static void
14817OP_M (int bytemode, int sizeflag)
14818{
7967e09e 14819 if (modrm.mod == 3)
75413a22
L
14820 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
14821 BadOp ();
cc0ec051
AM
14822 else
14823 OP_E (bytemode, sizeflag);
14824}
14825
14826static void
14827OP_0f07 (int bytemode, int sizeflag)
14828{
7967e09e 14829 if (modrm.mod != 3 || modrm.rm != 0)
cc0ec051
AM
14830 BadOp ();
14831 else
14832 OP_E (bytemode, sizeflag);
14833}
14834
46e883c5 14835/* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
246c51aa 14836 32bit mode and "xchg %rax,%rax" in 64bit mode. */
46e883c5 14837
cc0ec051 14838static void
46e883c5 14839NOP_Fixup1 (int bytemode, int sizeflag)
cc0ec051 14840{
8b38ad71
L
14841 if ((prefixes & PREFIX_DATA) != 0
14842 || (rex != 0
14843 && rex != 0x48
14844 && address_mode == mode_64bit))
46e883c5
L
14845 OP_REG (bytemode, sizeflag);
14846 else
14847 strcpy (obuf, "nop");
14848}
14849
14850static void
14851NOP_Fixup2 (int bytemode, int sizeflag)
14852{
8b38ad71
L
14853 if ((prefixes & PREFIX_DATA) != 0
14854 || (rex != 0
14855 && rex != 0x48
14856 && address_mode == mode_64bit))
46e883c5 14857 OP_IMREG (bytemode, sizeflag);
cc0ec051
AM
14858}
14859
84037f8c 14860static const char *const Suffix3DNow[] = {
252b5132
RH
14861/* 00 */ NULL, NULL, NULL, NULL,
14862/* 04 */ NULL, NULL, NULL, NULL,
14863/* 08 */ NULL, NULL, NULL, NULL,
9e525108 14864/* 0C */ "pi2fw", "pi2fd", NULL, NULL,
252b5132
RH
14865/* 10 */ NULL, NULL, NULL, NULL,
14866/* 14 */ NULL, NULL, NULL, NULL,
14867/* 18 */ NULL, NULL, NULL, NULL,
9e525108 14868/* 1C */ "pf2iw", "pf2id", NULL, NULL,
252b5132
RH
14869/* 20 */ NULL, NULL, NULL, NULL,
14870/* 24 */ NULL, NULL, NULL, NULL,
14871/* 28 */ NULL, NULL, NULL, NULL,
14872/* 2C */ NULL, NULL, NULL, NULL,
14873/* 30 */ NULL, NULL, NULL, NULL,
14874/* 34 */ NULL, NULL, NULL, NULL,
14875/* 38 */ NULL, NULL, NULL, NULL,
14876/* 3C */ NULL, NULL, NULL, NULL,
14877/* 40 */ NULL, NULL, NULL, NULL,
14878/* 44 */ NULL, NULL, NULL, NULL,
14879/* 48 */ NULL, NULL, NULL, NULL,
14880/* 4C */ NULL, NULL, NULL, NULL,
14881/* 50 */ NULL, NULL, NULL, NULL,
14882/* 54 */ NULL, NULL, NULL, NULL,
14883/* 58 */ NULL, NULL, NULL, NULL,
14884/* 5C */ NULL, NULL, NULL, NULL,
14885/* 60 */ NULL, NULL, NULL, NULL,
14886/* 64 */ NULL, NULL, NULL, NULL,
14887/* 68 */ NULL, NULL, NULL, NULL,
14888/* 6C */ NULL, NULL, NULL, NULL,
14889/* 70 */ NULL, NULL, NULL, NULL,
14890/* 74 */ NULL, NULL, NULL, NULL,
14891/* 78 */ NULL, NULL, NULL, NULL,
14892/* 7C */ NULL, NULL, NULL, NULL,
14893/* 80 */ NULL, NULL, NULL, NULL,
14894/* 84 */ NULL, NULL, NULL, NULL,
9e525108
AM
14895/* 88 */ NULL, NULL, "pfnacc", NULL,
14896/* 8C */ NULL, NULL, "pfpnacc", NULL,
252b5132
RH
14897/* 90 */ "pfcmpge", NULL, NULL, NULL,
14898/* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
14899/* 98 */ NULL, NULL, "pfsub", NULL,
14900/* 9C */ NULL, NULL, "pfadd", NULL,
14901/* A0 */ "pfcmpgt", NULL, NULL, NULL,
14902/* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
14903/* A8 */ NULL, NULL, "pfsubr", NULL,
14904/* AC */ NULL, NULL, "pfacc", NULL,
14905/* B0 */ "pfcmpeq", NULL, NULL, NULL,
9beff690 14906/* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
9e525108 14907/* B8 */ NULL, NULL, NULL, "pswapd",
252b5132
RH
14908/* BC */ NULL, NULL, NULL, "pavgusb",
14909/* C0 */ NULL, NULL, NULL, NULL,
14910/* C4 */ NULL, NULL, NULL, NULL,
14911/* C8 */ NULL, NULL, NULL, NULL,
14912/* CC */ NULL, NULL, NULL, NULL,
14913/* D0 */ NULL, NULL, NULL, NULL,
14914/* D4 */ NULL, NULL, NULL, NULL,
14915/* D8 */ NULL, NULL, NULL, NULL,
14916/* DC */ NULL, NULL, NULL, NULL,
14917/* E0 */ NULL, NULL, NULL, NULL,
14918/* E4 */ NULL, NULL, NULL, NULL,
14919/* E8 */ NULL, NULL, NULL, NULL,
14920/* EC */ NULL, NULL, NULL, NULL,
14921/* F0 */ NULL, NULL, NULL, NULL,
14922/* F4 */ NULL, NULL, NULL, NULL,
14923/* F8 */ NULL, NULL, NULL, NULL,
14924/* FC */ NULL, NULL, NULL, NULL,
14925};
14926
14927static void
26ca5450 14928OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132
RH
14929{
14930 const char *mnemonic;
14931
14932 FETCH_DATA (the_info, codep + 1);
14933 /* AMD 3DNow! instructions are specified by an opcode suffix in the
14934 place where an 8-bit immediate would normally go. ie. the last
14935 byte of the instruction. */
ea397f5b 14936 obufp = mnemonicendp;
c608c12e 14937 mnemonic = Suffix3DNow[*codep++ & 0xff];
252b5132 14938 if (mnemonic)
2da11e11 14939 oappend (mnemonic);
252b5132
RH
14940 else
14941 {
14942 /* Since a variable sized modrm/sib chunk is between the start
14943 of the opcode (0x0f0f) and the opcode suffix, we need to do
14944 all the modrm processing first, and don't know until now that
14945 we have a bad opcode. This necessitates some cleaning up. */
ce518a5f
L
14946 op_out[0][0] = '\0';
14947 op_out[1][0] = '\0';
6608db57 14948 BadOp ();
252b5132 14949 }
ea397f5b 14950 mnemonicendp = obufp;
252b5132 14951}
c608c12e 14952
ea397f5b
L
14953static struct op simd_cmp_op[] =
14954{
14955 { STRING_COMMA_LEN ("eq") },
14956 { STRING_COMMA_LEN ("lt") },
14957 { STRING_COMMA_LEN ("le") },
14958 { STRING_COMMA_LEN ("unord") },
14959 { STRING_COMMA_LEN ("neq") },
14960 { STRING_COMMA_LEN ("nlt") },
14961 { STRING_COMMA_LEN ("nle") },
14962 { STRING_COMMA_LEN ("ord") }
c608c12e
AM
14963};
14964
14965static void
ad19981d 14966CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
c608c12e
AM
14967{
14968 unsigned int cmp_type;
14969
14970 FETCH_DATA (the_info, codep + 1);
14971 cmp_type = *codep++ & 0xff;
c0f3af97 14972 if (cmp_type < ARRAY_SIZE (simd_cmp_op))
c608c12e 14973 {
ad19981d 14974 char suffix [3];
ea397f5b 14975 char *p = mnemonicendp - 2;
ad19981d
L
14976 suffix[0] = p[0];
14977 suffix[1] = p[1];
14978 suffix[2] = '\0';
ea397f5b
L
14979 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
14980 mnemonicendp += simd_cmp_op[cmp_type].len;
c608c12e
AM
14981 }
14982 else
14983 {
ad19981d
L
14984 /* We have a reserved extension byte. Output it directly. */
14985 scratchbuf[0] = '$';
14986 print_operand_value (scratchbuf + 1, 1, cmp_type);
14987 oappend (scratchbuf + intel_syntax);
14988 scratchbuf[0] = '\0';
c608c12e
AM
14989 }
14990}
14991
ca164297 14992static void
b844680a
L
14993OP_Mwait (int bytemode ATTRIBUTE_UNUSED,
14994 int sizeflag ATTRIBUTE_UNUSED)
14995{
14996 /* mwait %eax,%ecx */
14997 if (!intel_syntax)
14998 {
14999 const char **names = (address_mode == mode_64bit
15000 ? names64 : names32);
15001 strcpy (op_out[0], names[0]);
15002 strcpy (op_out[1], names[1]);
15003 two_source_ops = 1;
15004 }
15005 /* Skip mod/rm byte. */
15006 MODRM_CHECK;
15007 codep++;
15008}
15009
15010static void
15011OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
15012 int sizeflag ATTRIBUTE_UNUSED)
ca164297 15013{
b844680a
L
15014 /* monitor %eax,%ecx,%edx" */
15015 if (!intel_syntax)
ca164297 15016 {
b844680a 15017 const char **op1_names;
cb712a9e
L
15018 const char **names = (address_mode == mode_64bit
15019 ? names64 : names32);
1d9f512f 15020
b844680a
L
15021 if (!(prefixes & PREFIX_ADDR))
15022 op1_names = (address_mode == mode_16bit
15023 ? names16 : names);
ca164297
L
15024 else
15025 {
b844680a 15026 /* Remove "addr16/addr32". */
f16cd0d5 15027 all_prefixes[last_addr_prefix] = 0;
b844680a
L
15028 op1_names = (address_mode != mode_32bit
15029 ? names32 : names16);
15030 used_prefixes |= PREFIX_ADDR;
ca164297 15031 }
b844680a
L
15032 strcpy (op_out[0], op1_names[0]);
15033 strcpy (op_out[1], names[1]);
15034 strcpy (op_out[2], names[2]);
15035 two_source_ops = 1;
ca164297 15036 }
b844680a
L
15037 /* Skip mod/rm byte. */
15038 MODRM_CHECK;
15039 codep++;
30123838
JB
15040}
15041
6608db57
KH
15042static void
15043BadOp (void)
2da11e11 15044{
6608db57
KH
15045 /* Throw away prefixes and 1st. opcode byte. */
15046 codep = insn_codep + 1;
2da11e11
AM
15047 oappend ("(bad)");
15048}
4cc91dba 15049
35c52694
L
15050static void
15051REP_Fixup (int bytemode, int sizeflag)
15052{
15053 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
15054 lods and stos. */
35c52694 15055 if (prefixes & PREFIX_REPZ)
f16cd0d5 15056 all_prefixes[last_repz_prefix] = REP_PREFIX;
35c52694
L
15057
15058 switch (bytemode)
15059 {
15060 case al_reg:
15061 case eAX_reg:
15062 case indir_dx_reg:
15063 OP_IMREG (bytemode, sizeflag);
15064 break;
15065 case eDI_reg:
15066 OP_ESreg (bytemode, sizeflag);
15067 break;
15068 case eSI_reg:
15069 OP_DSreg (bytemode, sizeflag);
15070 break;
15071 default:
15072 abort ();
15073 break;
15074 }
15075}
f5804c90
L
15076
15077static void
15078CMPXCHG8B_Fixup (int bytemode, int sizeflag)
15079{
161a04f6
L
15080 USED_REX (REX_W);
15081 if (rex & REX_W)
f5804c90
L
15082 {
15083 /* Change cmpxchg8b to cmpxchg16b. */
ea397f5b
L
15084 char *p = mnemonicendp - 2;
15085 mnemonicendp = stpcpy (p, "16b");
fb9c77c7 15086 bytemode = o_mode;
f5804c90
L
15087 }
15088 OP_M (bytemode, sizeflag);
15089}
42903f7f
L
15090
15091static void
15092XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
15093{
c0f3af97
L
15094 if (need_vex)
15095 {
15096 switch (vex.length)
15097 {
15098 case 128:
15099 sprintf (scratchbuf, "%%xmm%d", reg);
15100 break;
15101 case 256:
15102 sprintf (scratchbuf, "%%ymm%d", reg);
15103 break;
15104 default:
15105 abort ();
15106 }
15107 }
15108 else
15109 sprintf (scratchbuf, "%%xmm%d", reg);
42903f7f
L
15110 oappend (scratchbuf + intel_syntax);
15111}
381d071f
L
15112
15113static void
15114CRC32_Fixup (int bytemode, int sizeflag)
15115{
15116 /* Add proper suffix to "crc32". */
ea397f5b 15117 char *p = mnemonicendp;
381d071f
L
15118
15119 switch (bytemode)
15120 {
15121 case b_mode:
20592a94 15122 if (intel_syntax)
ea397f5b 15123 goto skip;
20592a94 15124
381d071f
L
15125 *p++ = 'b';
15126 break;
15127 case v_mode:
20592a94 15128 if (intel_syntax)
ea397f5b 15129 goto skip;
20592a94 15130
381d071f
L
15131 USED_REX (REX_W);
15132 if (rex & REX_W)
15133 *p++ = 'q';
f16cd0d5
L
15134 else
15135 {
15136 if (sizeflag & DFLAG)
15137 *p++ = 'l';
15138 else
15139 *p++ = 'w';
15140 used_prefixes |= (prefixes & PREFIX_DATA);
15141 }
381d071f
L
15142 break;
15143 default:
15144 oappend (INTERNAL_DISASSEMBLER_ERROR);
15145 break;
15146 }
ea397f5b 15147 mnemonicendp = p;
381d071f
L
15148 *p = '\0';
15149
ea397f5b 15150skip:
381d071f
L
15151 if (modrm.mod == 3)
15152 {
15153 int add;
15154
15155 /* Skip mod/rm byte. */
15156 MODRM_CHECK;
15157 codep++;
15158
15159 USED_REX (REX_B);
15160 add = (rex & REX_B) ? 8 : 0;
15161 if (bytemode == b_mode)
15162 {
15163 USED_REX (0);
15164 if (rex)
15165 oappend (names8rex[modrm.rm + add]);
15166 else
15167 oappend (names8[modrm.rm + add]);
15168 }
15169 else
15170 {
15171 USED_REX (REX_W);
15172 if (rex & REX_W)
15173 oappend (names64[modrm.rm + add]);
15174 else if ((prefixes & PREFIX_DATA))
15175 oappend (names16[modrm.rm + add]);
15176 else
15177 oappend (names32[modrm.rm + add]);
15178 }
15179 }
15180 else
9344ff29 15181 OP_E (bytemode, sizeflag);
381d071f 15182}
85f10a01 15183
eacc9c89
L
15184static void
15185FXSAVE_Fixup (int bytemode, int sizeflag)
15186{
15187 /* Add proper suffix to "fxsave" and "fxrstor". */
15188 USED_REX (REX_W);
15189 if (rex & REX_W)
15190 {
15191 char *p = mnemonicendp;
15192 *p++ = '6';
15193 *p++ = '4';
15194 *p = '\0';
15195 mnemonicendp = p;
15196 }
15197 OP_M (bytemode, sizeflag);
15198}
15199
c0f3af97
L
15200/* Display the destination register operand for instructions with
15201 VEX. */
15202
15203static void
15204OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
15205{
15206 if (!need_vex)
15207 abort ();
15208
15209 if (!need_vex_reg)
15210 return;
15211
15212 switch (vex.length)
15213 {
15214 case 128:
15215 switch (bytemode)
15216 {
15217 case vex_mode:
15218 case vex128_mode:
15219 break;
15220 default:
15221 abort ();
15222 return;
15223 }
15224
15225 sprintf (scratchbuf, "%%xmm%d", vex.register_specifier);
15226 break;
15227 case 256:
15228 switch (bytemode)
15229 {
15230 case vex_mode:
15231 case vex256_mode:
15232 break;
15233 default:
15234 abort ();
15235 return;
15236 }
15237
15238 sprintf (scratchbuf, "%%ymm%d", vex.register_specifier);
15239 break;
15240 default:
15241 abort ();
15242 break;
15243 }
15244 oappend (scratchbuf + intel_syntax);
15245}
15246
922d8de8
DR
15247/* Get the VEX immediate byte without moving codep. */
15248
15249static unsigned char
ccc5981b 15250get_vex_imm8 (int sizeflag, int opnum)
922d8de8
DR
15251{
15252 int bytes_before_imm = 0;
15253
922d8de8
DR
15254 if (modrm.mod != 3)
15255 {
15256 /* There are SIB/displacement bytes. */
15257 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
02e647f9 15258 {
922d8de8 15259 /* 32/64 bit address mode */
02e647f9 15260 int base = modrm.rm;
922d8de8
DR
15261
15262 /* Check SIB byte. */
02e647f9
SP
15263 if (base == 4)
15264 {
15265 FETCH_DATA (the_info, codep + 1);
15266 base = *codep & 7;
15267 /* When decoding the third source, don't increase
15268 bytes_before_imm as this has already been incremented
15269 by one in OP_E_memory while decoding the second
15270 source operand. */
ccc5981b
SP
15271 if (opnum == 0)
15272 bytes_before_imm++;
02e647f9
SP
15273 }
15274
15275 /* Don't increase bytes_before_imm when decoding the third source,
15276 it has already been incremented by OP_E_memory while decoding
15277 the second source operand. */
15278 if (opnum == 0)
15279 {
15280 switch (modrm.mod)
15281 {
15282 case 0:
15283 /* When modrm.rm == 5 or modrm.rm == 4 and base in
15284 SIB == 5, there is a 4 byte displacement. */
15285 if (base != 5)
15286 /* No displacement. */
15287 break;
15288 case 2:
15289 /* 4 byte displacement. */
15290 bytes_before_imm += 4;
15291 break;
15292 case 1:
15293 /* 1 byte displacement. */
15294 bytes_before_imm++;
15295 break;
15296 }
15297 }
15298 }
922d8de8 15299 else
02e647f9
SP
15300 {
15301 /* 16 bit address mode */
15302 /* Don't increase bytes_before_imm when decoding the third source,
15303 it has already been incremented by OP_E_memory while decoding
15304 the second source operand. */
15305 if (opnum == 0)
15306 {
15307 switch (modrm.mod)
15308 {
15309 case 0:
15310 /* When modrm.rm == 6, there is a 2 byte displacement. */
15311 if (modrm.rm != 6)
15312 /* No displacement. */
15313 break;
15314 case 2:
15315 /* 2 byte displacement. */
15316 bytes_before_imm += 2;
15317 break;
15318 case 1:
15319 /* 1 byte displacement: when decoding the third source,
15320 don't increase bytes_before_imm as this has already
15321 been incremented by one in OP_E_memory while decoding
15322 the second source operand. */
15323 if (opnum == 0)
15324 bytes_before_imm++;
ccc5981b 15325
02e647f9
SP
15326 break;
15327 }
922d8de8
DR
15328 }
15329 }
15330 }
15331
15332 FETCH_DATA (the_info, codep + bytes_before_imm + 1);
15333 return codep [bytes_before_imm];
15334}
15335
15336static void
15337OP_EX_VexReg (int bytemode, int sizeflag, int reg)
15338{
15339 if (reg == -1 && modrm.mod != 3)
15340 {
15341 OP_E_memory (bytemode, sizeflag);
15342 return;
15343 }
15344 else
15345 {
15346 if (reg == -1)
15347 {
15348 reg = modrm.rm;
15349 USED_REX (REX_B);
15350 if (rex & REX_B)
15351 reg += 8;
15352 }
15353 else if (reg > 7 && address_mode != mode_64bit)
15354 BadOp ();
15355 }
15356
15357 switch (vex.length)
15358 {
15359 case 128:
15360 sprintf (scratchbuf, "%%xmm%d", reg);
15361 break;
15362 case 256:
15363 sprintf (scratchbuf, "%%ymm%d", reg);
15364 break;
15365 default:
15366 abort ();
15367 }
15368 oappend (scratchbuf + intel_syntax);
15369}
15370
5dd85c99
SP
15371static void
15372OP_Vex_2src (int bytemode, int sizeflag)
15373{
15374 if (modrm.mod == 3)
15375 {
15376 USED_REX (REX_B);
15377 sprintf (scratchbuf, "%%xmm%d", rex & REX_B ? modrm.rm + 8 : modrm.rm);
15378 oappend (scratchbuf + intel_syntax);
15379 }
15380 else
15381 {
15382 if (intel_syntax
15383 && (bytemode == v_mode || bytemode == v_swap_mode))
15384 {
15385 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
15386 used_prefixes |= (prefixes & PREFIX_DATA);
15387 }
15388 OP_E (bytemode, sizeflag);
15389 }
15390}
15391
15392static void
15393OP_Vex_2src_1 (int bytemode, int sizeflag)
15394{
15395 if (modrm.mod == 3)
15396 {
15397 /* Skip mod/rm byte. */
15398 MODRM_CHECK;
15399 codep++;
15400 }
15401
15402 if (vex.w)
15403 {
15404 sprintf (scratchbuf, "%%xmm%d", vex.register_specifier);
15405 oappend (scratchbuf + intel_syntax);
15406 }
15407 else
15408 OP_Vex_2src (bytemode, sizeflag);
15409}
15410
15411static void
15412OP_Vex_2src_2 (int bytemode, int sizeflag)
15413{
15414 if (vex.w)
15415 OP_Vex_2src (bytemode, sizeflag);
15416 else
15417 {
15418 sprintf (scratchbuf, "%%xmm%d", vex.register_specifier);
15419 oappend (scratchbuf + intel_syntax);
15420 }
15421}
15422
922d8de8
DR
15423static void
15424OP_EX_VexW (int bytemode, int sizeflag)
15425{
15426 int reg = -1;
15427
15428 if (!vex_w_done)
15429 {
15430 vex_w_done = 1;
41effecb
SP
15431
15432 /* Skip mod/rm byte. */
15433 MODRM_CHECK;
15434 codep++;
15435
922d8de8 15436 if (vex.w)
ccc5981b 15437 reg = get_vex_imm8 (sizeflag, 0) >> 4;
922d8de8
DR
15438 }
15439 else
15440 {
15441 if (!vex.w)
ccc5981b 15442 reg = get_vex_imm8 (sizeflag, 1) >> 4;
922d8de8
DR
15443 }
15444
15445 OP_EX_VexReg (bytemode, sizeflag, reg);
15446}
15447
922d8de8
DR
15448static void
15449VEXI4_Fixup (int bytemode ATTRIBUTE_UNUSED,
15450 int sizeflag ATTRIBUTE_UNUSED)
15451{
15452 /* Skip the immediate byte and check for invalid bits. */
15453 FETCH_DATA (the_info, codep + 1);
15454 if (*codep++ & 0xf)
15455 BadOp ();
15456}
15457
c0f3af97
L
15458static void
15459OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
15460{
15461 int reg;
15462 FETCH_DATA (the_info, codep + 1);
15463 reg = *codep++;
15464
15465 if (bytemode != x_mode)
15466 abort ();
15467
15468 if (reg & 0xf)
15469 BadOp ();
15470
15471 reg >>= 4;
dae39acc
L
15472 if (reg > 7 && address_mode != mode_64bit)
15473 BadOp ();
15474
c0f3af97
L
15475 switch (vex.length)
15476 {
15477 case 128:
15478 sprintf (scratchbuf, "%%xmm%d", reg);
15479 break;
15480 case 256:
15481 sprintf (scratchbuf, "%%ymm%d", reg);
15482 break;
15483 default:
15484 abort ();
15485 }
15486 oappend (scratchbuf + intel_syntax);
15487}
15488
922d8de8
DR
15489static void
15490OP_XMM_VexW (int bytemode, int sizeflag)
15491{
15492 /* Turn off the REX.W bit since it is used for swapping operands
15493 now. */
15494 rex &= ~REX_W;
15495 OP_XMM (bytemode, sizeflag);
15496}
15497
c0f3af97
L
15498static void
15499OP_EX_Vex (int bytemode, int sizeflag)
15500{
15501 if (modrm.mod != 3)
15502 {
15503 if (vex.register_specifier != 0)
15504 BadOp ();
15505 need_vex_reg = 0;
15506 }
15507 OP_EX (bytemode, sizeflag);
15508}
15509
15510static void
15511OP_XMM_Vex (int bytemode, int sizeflag)
15512{
15513 if (modrm.mod != 3)
15514 {
15515 if (vex.register_specifier != 0)
15516 BadOp ();
15517 need_vex_reg = 0;
15518 }
15519 OP_XMM (bytemode, sizeflag);
15520}
15521
15522static void
15523VZERO_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15524{
15525 switch (vex.length)
15526 {
15527 case 128:
ea397f5b 15528 mnemonicendp = stpcpy (obuf, "vzeroupper");
c0f3af97
L
15529 break;
15530 case 256:
ea397f5b 15531 mnemonicendp = stpcpy (obuf, "vzeroall");
c0f3af97
L
15532 break;
15533 default:
15534 abort ();
15535 }
15536}
15537
ea397f5b
L
15538static struct op vex_cmp_op[] =
15539{
15540 { STRING_COMMA_LEN ("eq") },
15541 { STRING_COMMA_LEN ("lt") },
15542 { STRING_COMMA_LEN ("le") },
15543 { STRING_COMMA_LEN ("unord") },
15544 { STRING_COMMA_LEN ("neq") },
15545 { STRING_COMMA_LEN ("nlt") },
15546 { STRING_COMMA_LEN ("nle") },
15547 { STRING_COMMA_LEN ("ord") },
15548 { STRING_COMMA_LEN ("eq_uq") },
15549 { STRING_COMMA_LEN ("nge") },
15550 { STRING_COMMA_LEN ("ngt") },
15551 { STRING_COMMA_LEN ("false") },
15552 { STRING_COMMA_LEN ("neq_oq") },
15553 { STRING_COMMA_LEN ("ge") },
15554 { STRING_COMMA_LEN ("gt") },
15555 { STRING_COMMA_LEN ("true") },
15556 { STRING_COMMA_LEN ("eq_os") },
15557 { STRING_COMMA_LEN ("lt_oq") },
15558 { STRING_COMMA_LEN ("le_oq") },
15559 { STRING_COMMA_LEN ("unord_s") },
15560 { STRING_COMMA_LEN ("neq_us") },
15561 { STRING_COMMA_LEN ("nlt_uq") },
15562 { STRING_COMMA_LEN ("nle_uq") },
15563 { STRING_COMMA_LEN ("ord_s") },
15564 { STRING_COMMA_LEN ("eq_us") },
15565 { STRING_COMMA_LEN ("nge_uq") },
15566 { STRING_COMMA_LEN ("ngt_uq") },
15567 { STRING_COMMA_LEN ("false_os") },
15568 { STRING_COMMA_LEN ("neq_os") },
15569 { STRING_COMMA_LEN ("ge_oq") },
15570 { STRING_COMMA_LEN ("gt_oq") },
15571 { STRING_COMMA_LEN ("true_us") },
c0f3af97
L
15572};
15573
15574static void
15575VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15576{
15577 unsigned int cmp_type;
15578
15579 FETCH_DATA (the_info, codep + 1);
15580 cmp_type = *codep++ & 0xff;
15581 if (cmp_type < ARRAY_SIZE (vex_cmp_op))
15582 {
15583 char suffix [3];
ea397f5b 15584 char *p = mnemonicendp - 2;
c0f3af97
L
15585 suffix[0] = p[0];
15586 suffix[1] = p[1];
15587 suffix[2] = '\0';
ea397f5b
L
15588 sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
15589 mnemonicendp += vex_cmp_op[cmp_type].len;
c0f3af97
L
15590 }
15591 else
15592 {
15593 /* We have a reserved extension byte. Output it directly. */
15594 scratchbuf[0] = '$';
15595 print_operand_value (scratchbuf + 1, 1, cmp_type);
15596 oappend (scratchbuf + intel_syntax);
15597 scratchbuf[0] = '\0';
15598 }
15599}
15600
ea397f5b
L
15601static const struct op pclmul_op[] =
15602{
15603 { STRING_COMMA_LEN ("lql") },
15604 { STRING_COMMA_LEN ("hql") },
15605 { STRING_COMMA_LEN ("lqh") },
15606 { STRING_COMMA_LEN ("hqh") }
c0f3af97
L
15607};
15608
15609static void
15610PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
15611 int sizeflag ATTRIBUTE_UNUSED)
15612{
15613 unsigned int pclmul_type;
15614
15615 FETCH_DATA (the_info, codep + 1);
15616 pclmul_type = *codep++ & 0xff;
15617 switch (pclmul_type)
15618 {
15619 case 0x10:
15620 pclmul_type = 2;
15621 break;
15622 case 0x11:
15623 pclmul_type = 3;
15624 break;
15625 default:
15626 break;
15627 }
15628 if (pclmul_type < ARRAY_SIZE (pclmul_op))
15629 {
15630 char suffix [4];
ea397f5b 15631 char *p = mnemonicendp - 3;
c0f3af97
L
15632 suffix[0] = p[0];
15633 suffix[1] = p[1];
15634 suffix[2] = p[2];
15635 suffix[3] = '\0';
ea397f5b
L
15636 sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
15637 mnemonicendp += pclmul_op[pclmul_type].len;
c0f3af97
L
15638 }
15639 else
15640 {
15641 /* We have a reserved extension byte. Output it directly. */
15642 scratchbuf[0] = '$';
15643 print_operand_value (scratchbuf + 1, 1, pclmul_type);
15644 oappend (scratchbuf + intel_syntax);
15645 scratchbuf[0] = '\0';
15646 }
15647}
15648
f1f8f695
L
15649static void
15650MOVBE_Fixup (int bytemode, int sizeflag)
15651{
15652 /* Add proper suffix to "movbe". */
ea397f5b 15653 char *p = mnemonicendp;
f1f8f695
L
15654
15655 switch (bytemode)
15656 {
15657 case v_mode:
15658 if (intel_syntax)
ea397f5b 15659 goto skip;
f1f8f695
L
15660
15661 USED_REX (REX_W);
15662 if (sizeflag & SUFFIX_ALWAYS)
15663 {
15664 if (rex & REX_W)
15665 *p++ = 'q';
f1f8f695 15666 else
f16cd0d5
L
15667 {
15668 if (sizeflag & DFLAG)
15669 *p++ = 'l';
15670 else
15671 *p++ = 'w';
15672 used_prefixes |= (prefixes & PREFIX_DATA);
15673 }
f1f8f695 15674 }
f1f8f695
L
15675 break;
15676 default:
15677 oappend (INTERNAL_DISASSEMBLER_ERROR);
15678 break;
15679 }
ea397f5b 15680 mnemonicendp = p;
f1f8f695
L
15681 *p = '\0';
15682
ea397f5b 15683skip:
f1f8f695
L
15684 OP_M (bytemode, sizeflag);
15685}
f88c9eb0
SP
15686
15687static void
15688OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15689{
15690 int reg;
15691 const char **names;
15692
15693 /* Skip mod/rm byte. */
15694 MODRM_CHECK;
15695 codep++;
15696
15697 if (vex.w)
15698 names = names64;
15699 else if (vex.length == 256)
15700 names = names32;
15701 else
15702 names = names16;
15703
15704 reg = modrm.rm;
15705 USED_REX (REX_B);
15706 if (rex & REX_B)
15707 reg += 8;
15708
15709 oappend (names[reg]);
15710}
15711
15712static void
15713OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15714{
15715 const char **names;
15716
15717 if (vex.w)
15718 names = names64;
15719 else if (vex.length == 256)
15720 names = names32;
15721 else
15722 names = names16;
15723
15724 oappend (names[vex.register_specifier]);
15725}
15726
15727static void
15728OP_LWP_I (int bytemode ATTRIBUTE_UNUSED, int sizeflag)
15729{
15730 if (vex.w || vex.length == 256)
15731 OP_I (q_mode, sizeflag);
15732 else
15733 OP_I (w_mode, sizeflag);
15734}
15735
This page took 2.226822 seconds and 4 git commands to generate.