Add names_mm, names_xmm and names_ymm.
[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;
d869730d 147/* REX bits in original REX prefix ignored. */
c0f3af97 148static int rex_ignored;
52b15da3
JH
149/* Mark parts used in the REX prefix. When we are testing for
150 empty prefix (for 8bit register REX extension), just mask it
151 out. Otherwise test for REX bit is excuse for existence of REX
152 only in case value is nonzero. */
153#define USED_REX(value) \
154 { \
155 if (value) \
161a04f6
L
156 { \
157 if ((rex & value)) \
158 rex_used |= (value) | REX_OPCODE; \
159 } \
52b15da3 160 else \
161a04f6 161 rex_used |= REX_OPCODE; \
52b15da3
JH
162 }
163
7d421014
ILT
164/* Flags for prefixes which we somehow handled when printing the
165 current instruction. */
166static int used_prefixes;
167
5076851f
ILT
168/* Flags stored in PREFIXES. */
169#define PREFIX_REPZ 1
170#define PREFIX_REPNZ 2
171#define PREFIX_LOCK 4
172#define PREFIX_CS 8
173#define PREFIX_SS 0x10
174#define PREFIX_DS 0x20
175#define PREFIX_ES 0x40
176#define PREFIX_FS 0x80
177#define PREFIX_GS 0x100
178#define PREFIX_DATA 0x200
179#define PREFIX_ADDR 0x400
180#define PREFIX_FWAIT 0x800
181
252b5132
RH
182/* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
183 to ADDR (exclusive) are valid. Returns 1 for success, longjmps
184 on error. */
185#define FETCH_DATA(info, addr) \
6608db57 186 ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
252b5132
RH
187 ? 1 : fetch_data ((info), (addr)))
188
189static int
26ca5450 190fetch_data (struct disassemble_info *info, bfd_byte *addr)
252b5132
RH
191{
192 int status;
6608db57 193 struct dis_private *priv = (struct dis_private *) info->private_data;
252b5132
RH
194 bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
195
0b1cf022 196 if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
272c9217
JB
197 status = (*info->read_memory_func) (start,
198 priv->max_fetched,
199 addr - priv->max_fetched,
200 info);
201 else
202 status = -1;
252b5132
RH
203 if (status != 0)
204 {
7d421014 205 /* If we did manage to read at least one byte, then
db6eb5be
AM
206 print_insn_i386 will do something sensible. Otherwise, print
207 an error. We do that here because this is where we know
208 STATUS. */
7d421014 209 if (priv->max_fetched == priv->the_buffer)
5076851f 210 (*info->memory_error_func) (status, start, info);
252b5132
RH
211 longjmp (priv->bailout, 1);
212 }
213 else
214 priv->max_fetched = addr;
215 return 1;
216}
217
ce518a5f
L
218#define XX { NULL, 0 }
219
220#define Eb { OP_E, b_mode }
b6169b20 221#define EbS { OP_E, b_swap_mode }
ce518a5f 222#define Ev { OP_E, v_mode }
b6169b20 223#define EvS { OP_E, v_swap_mode }
ce518a5f
L
224#define Ed { OP_E, d_mode }
225#define Edq { OP_E, dq_mode }
226#define Edqw { OP_E, dqw_mode }
42903f7f
L
227#define Edqb { OP_E, dqb_mode }
228#define Edqd { OP_E, dqd_mode }
09335d05 229#define Eq { OP_E, q_mode }
ce518a5f
L
230#define indirEv { OP_indirE, stack_v_mode }
231#define indirEp { OP_indirE, f_mode }
232#define stackEv { OP_E, stack_v_mode }
233#define Em { OP_E, m_mode }
234#define Ew { OP_E, w_mode }
235#define M { OP_M, 0 } /* lea, lgdt, etc. */
34b772a6 236#define Ma { OP_M, a_mode }
b844680a 237#define Mb { OP_M, b_mode }
d9a5e5e5 238#define Md { OP_M, d_mode }
f1f8f695 239#define Mo { OP_M, o_mode }
ce518a5f
L
240#define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
241#define Mq { OP_M, q_mode }
4ee52178 242#define Mx { OP_M, x_mode }
c0f3af97 243#define Mxmm { OP_M, xmm_mode }
ce518a5f
L
244#define Gb { OP_G, b_mode }
245#define Gv { OP_G, v_mode }
246#define Gd { OP_G, d_mode }
247#define Gdq { OP_G, dq_mode }
248#define Gm { OP_G, m_mode }
249#define Gw { OP_G, w_mode }
6f74c397
L
250#define Rd { OP_R, d_mode }
251#define Rm { OP_R, m_mode }
ce518a5f
L
252#define Ib { OP_I, b_mode }
253#define sIb { OP_sI, b_mode } /* sign extened byte */
254#define Iv { OP_I, v_mode }
255#define Iq { OP_I, q_mode }
256#define Iv64 { OP_I64, v_mode }
257#define Iw { OP_I, w_mode }
258#define I1 { OP_I, const_1_mode }
259#define Jb { OP_J, b_mode }
260#define Jv { OP_J, v_mode }
261#define Cm { OP_C, m_mode }
262#define Dm { OP_D, m_mode }
263#define Td { OP_T, d_mode }
b844680a 264#define Skip_MODRM { OP_Skip_MODRM, 0 }
ce518a5f
L
265
266#define RMeAX { OP_REG, eAX_reg }
267#define RMeBX { OP_REG, eBX_reg }
268#define RMeCX { OP_REG, eCX_reg }
269#define RMeDX { OP_REG, eDX_reg }
270#define RMeSP { OP_REG, eSP_reg }
271#define RMeBP { OP_REG, eBP_reg }
272#define RMeSI { OP_REG, eSI_reg }
273#define RMeDI { OP_REG, eDI_reg }
274#define RMrAX { OP_REG, rAX_reg }
275#define RMrBX { OP_REG, rBX_reg }
276#define RMrCX { OP_REG, rCX_reg }
277#define RMrDX { OP_REG, rDX_reg }
278#define RMrSP { OP_REG, rSP_reg }
279#define RMrBP { OP_REG, rBP_reg }
280#define RMrSI { OP_REG, rSI_reg }
281#define RMrDI { OP_REG, rDI_reg }
282#define RMAL { OP_REG, al_reg }
283#define RMAL { OP_REG, al_reg }
284#define RMCL { OP_REG, cl_reg }
285#define RMDL { OP_REG, dl_reg }
286#define RMBL { OP_REG, bl_reg }
287#define RMAH { OP_REG, ah_reg }
288#define RMCH { OP_REG, ch_reg }
289#define RMDH { OP_REG, dh_reg }
290#define RMBH { OP_REG, bh_reg }
291#define RMAX { OP_REG, ax_reg }
292#define RMDX { OP_REG, dx_reg }
293
294#define eAX { OP_IMREG, eAX_reg }
295#define eBX { OP_IMREG, eBX_reg }
296#define eCX { OP_IMREG, eCX_reg }
297#define eDX { OP_IMREG, eDX_reg }
298#define eSP { OP_IMREG, eSP_reg }
299#define eBP { OP_IMREG, eBP_reg }
300#define eSI { OP_IMREG, eSI_reg }
301#define eDI { OP_IMREG, eDI_reg }
302#define AL { OP_IMREG, al_reg }
303#define CL { OP_IMREG, cl_reg }
304#define DL { OP_IMREG, dl_reg }
305#define BL { OP_IMREG, bl_reg }
306#define AH { OP_IMREG, ah_reg }
307#define CH { OP_IMREG, ch_reg }
308#define DH { OP_IMREG, dh_reg }
309#define BH { OP_IMREG, bh_reg }
310#define AX { OP_IMREG, ax_reg }
311#define DX { OP_IMREG, dx_reg }
312#define zAX { OP_IMREG, z_mode_ax_reg }
313#define indirDX { OP_IMREG, indir_dx_reg }
314
315#define Sw { OP_SEG, w_mode }
316#define Sv { OP_SEG, v_mode }
317#define Ap { OP_DIR, 0 }
318#define Ob { OP_OFF64, b_mode }
319#define Ov { OP_OFF64, v_mode }
320#define Xb { OP_DSreg, eSI_reg }
321#define Xv { OP_DSreg, eSI_reg }
322#define Xz { OP_DSreg, eSI_reg }
323#define Yb { OP_ESreg, eDI_reg }
324#define Yv { OP_ESreg, eDI_reg }
325#define DSBX { OP_DSreg, eBX_reg }
326
327#define es { OP_REG, es_reg }
328#define ss { OP_REG, ss_reg }
329#define cs { OP_REG, cs_reg }
330#define ds { OP_REG, ds_reg }
331#define fs { OP_REG, fs_reg }
332#define gs { OP_REG, gs_reg }
333
334#define MX { OP_MMX, 0 }
335#define XM { OP_XMM, 0 }
c0f3af97 336#define XMM { OP_XMM, xmm_mode }
ce518a5f 337#define EM { OP_EM, v_mode }
b6169b20 338#define EMS { OP_EM, v_swap_mode }
09a2c6cf 339#define EMd { OP_EM, d_mode }
14051056 340#define EMx { OP_EM, x_mode }
8976381e 341#define EXw { OP_EX, w_mode }
09a2c6cf 342#define EXd { OP_EX, d_mode }
fa99fab2 343#define EXdS { OP_EX, d_swap_mode }
09a2c6cf 344#define EXq { OP_EX, q_mode }
b6169b20 345#define EXqS { OP_EX, q_swap_mode }
09a2c6cf 346#define EXx { OP_EX, x_mode }
b6169b20 347#define EXxS { OP_EX, x_swap_mode }
c0f3af97
L
348#define EXxmm { OP_EX, xmm_mode }
349#define EXxmmq { OP_EX, xmmq_mode }
350#define EXymmq { OP_EX, ymmq_mode }
0bfee649 351#define EXVexWdq { OP_EX, vex_w_dq_mode }
ce518a5f
L
352#define MS { OP_MS, v_mode }
353#define XS { OP_XS, v_mode }
09335d05 354#define EMCq { OP_EMC, q_mode }
ce518a5f 355#define MXC { OP_MXC, 0 }
ce518a5f 356#define OPSUF { OP_3DNowSuffix, 0 }
ad19981d 357#define CMP { CMP_Fixup, 0 }
42903f7f 358#define XMM0 { XMM_Fixup, 0 }
eacc9c89 359#define FXSAVE { FXSAVE_Fixup, 0 }
5dd85c99
SP
360#define Vex_2src_1 { OP_Vex_2src_1, 0 }
361#define Vex_2src_2 { OP_Vex_2src_2, 0 }
252b5132 362
c0f3af97
L
363#define Vex { OP_VEX, vex_mode }
364#define Vex128 { OP_VEX, vex128_mode }
365#define Vex256 { OP_VEX, vex256_mode }
922d8de8 366#define VexI4 { VEXI4_Fixup, 0}
c0f3af97 367#define EXdVex { OP_EX_Vex, d_mode }
fa99fab2 368#define EXdVexS { OP_EX_Vex, d_swap_mode }
c0f3af97 369#define EXqVex { OP_EX_Vex, q_mode }
fa99fab2 370#define EXqVexS { OP_EX_Vex, q_swap_mode }
922d8de8
DR
371#define EXVexW { OP_EX_VexW, x_mode }
372#define EXdVexW { OP_EX_VexW, d_mode }
373#define EXqVexW { OP_EX_VexW, q_mode }
c0f3af97 374#define XMVex { OP_XMM_Vex, 0 }
922d8de8 375#define XMVexW { OP_XMM_VexW, 0 }
c0f3af97
L
376#define XMVexI4 { OP_REG_VexI4, x_mode }
377#define PCLMUL { PCLMUL_Fixup, 0 }
378#define VZERO { VZERO_Fixup, 0 }
379#define VCMP { VCMP_Fixup, 0 }
c0f3af97 380
35c52694 381/* Used handle "rep" prefix for string instructions. */
ce518a5f
L
382#define Xbr { REP_Fixup, eSI_reg }
383#define Xvr { REP_Fixup, eSI_reg }
384#define Ybr { REP_Fixup, eDI_reg }
385#define Yvr { REP_Fixup, eDI_reg }
386#define Yzr { REP_Fixup, eDI_reg }
387#define indirDXr { REP_Fixup, indir_dx_reg }
388#define ALr { REP_Fixup, al_reg }
389#define eAXr { REP_Fixup, eAX_reg }
390
391#define cond_jump_flag { NULL, cond_jump_mode }
392#define loop_jcxz_flag { NULL, loop_jcxz_mode }
3ffd33cf 393
252b5132 394/* bits in sizeflag */
252b5132 395#define SUFFIX_ALWAYS 4
252b5132
RH
396#define AFLAG 2
397#define DFLAG 1
398
51e7da1b
L
399enum
400{
401 /* byte operand */
402 b_mode = 1,
403 /* byte operand with operand swapped */
3873ba12 404 b_swap_mode,
51e7da1b 405 /* operand size depends on prefixes */
3873ba12 406 v_mode,
51e7da1b 407 /* operand size depends on prefixes with operand swapped */
3873ba12 408 v_swap_mode,
51e7da1b 409 /* word operand */
3873ba12 410 w_mode,
51e7da1b 411 /* double word operand */
3873ba12 412 d_mode,
51e7da1b 413 /* double word operand with operand swapped */
3873ba12 414 d_swap_mode,
51e7da1b 415 /* quad word operand */
3873ba12 416 q_mode,
51e7da1b 417 /* quad word operand with operand swapped */
3873ba12 418 q_swap_mode,
51e7da1b 419 /* ten-byte operand */
3873ba12 420 t_mode,
51e7da1b 421 /* 16-byte XMM or 32-byte YMM operand */
3873ba12 422 x_mode,
51e7da1b 423 /* 16-byte XMM or 32-byte YMM operand with operand swapped */
3873ba12 424 x_swap_mode,
51e7da1b 425 /* 16-byte XMM operand */
3873ba12 426 xmm_mode,
51e7da1b 427 /* 16-byte XMM or quad word operand */
3873ba12 428 xmmq_mode,
51e7da1b 429 /* 32-byte YMM or quad word operand */
3873ba12 430 ymmq_mode,
51e7da1b 431 /* d_mode in 32bit, q_mode in 64bit mode. */
3873ba12 432 m_mode,
51e7da1b 433 /* pair of v_mode operands */
3873ba12
L
434 a_mode,
435 cond_jump_mode,
436 loop_jcxz_mode,
51e7da1b 437 /* operand size depends on REX prefixes. */
3873ba12 438 dq_mode,
51e7da1b 439 /* registers like dq_mode, memory like w_mode. */
3873ba12 440 dqw_mode,
51e7da1b 441 /* 4- or 6-byte pointer operand */
3873ba12
L
442 f_mode,
443 const_1_mode,
51e7da1b 444 /* v_mode for stack-related opcodes. */
3873ba12 445 stack_v_mode,
51e7da1b 446 /* non-quad operand size depends on prefixes */
3873ba12 447 z_mode,
51e7da1b 448 /* 16-byte operand */
3873ba12 449 o_mode,
51e7da1b 450 /* registers like dq_mode, memory like b_mode. */
3873ba12 451 dqb_mode,
51e7da1b 452 /* registers like dq_mode, memory like d_mode. */
3873ba12 453 dqd_mode,
51e7da1b 454 /* normal vex mode */
3873ba12 455 vex_mode,
51e7da1b 456 /* 128bit vex mode */
3873ba12 457 vex128_mode,
51e7da1b 458 /* 256bit vex mode */
3873ba12 459 vex256_mode,
51e7da1b 460 /* operand size depends on the VEX.W bit. */
3873ba12 461 vex_w_dq_mode,
d55ee72f 462
3873ba12
L
463 es_reg,
464 cs_reg,
465 ss_reg,
466 ds_reg,
467 fs_reg,
468 gs_reg,
d55ee72f 469
3873ba12
L
470 eAX_reg,
471 eCX_reg,
472 eDX_reg,
473 eBX_reg,
474 eSP_reg,
475 eBP_reg,
476 eSI_reg,
477 eDI_reg,
d55ee72f 478
3873ba12
L
479 al_reg,
480 cl_reg,
481 dl_reg,
482 bl_reg,
483 ah_reg,
484 ch_reg,
485 dh_reg,
486 bh_reg,
d55ee72f 487
3873ba12
L
488 ax_reg,
489 cx_reg,
490 dx_reg,
491 bx_reg,
492 sp_reg,
493 bp_reg,
494 si_reg,
495 di_reg,
d55ee72f 496
3873ba12
L
497 rAX_reg,
498 rCX_reg,
499 rDX_reg,
500 rBX_reg,
501 rSP_reg,
502 rBP_reg,
503 rSI_reg,
504 rDI_reg,
d55ee72f 505
3873ba12
L
506 z_mode_ax_reg,
507 indir_dx_reg
51e7da1b 508};
252b5132 509
51e7da1b
L
510enum
511{
512 FLOATCODE = 1,
3873ba12
L
513 USE_REG_TABLE,
514 USE_MOD_TABLE,
515 USE_RM_TABLE,
516 USE_PREFIX_TABLE,
517 USE_X86_64_TABLE,
518 USE_3BYTE_TABLE,
f88c9eb0 519 USE_XOP_8F_TABLE,
3873ba12
L
520 USE_VEX_C4_TABLE,
521 USE_VEX_C5_TABLE,
9e30b8e0
L
522 USE_VEX_LEN_TABLE,
523 USE_VEX_W_TABLE
51e7da1b 524};
6439fc28 525
1ceb70f8 526#define FLOAT NULL, { { NULL, FLOATCODE } }
4efba78c 527
4e7d34a6 528#define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }
1ceb70f8
L
529#define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
530#define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
531#define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
532#define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
4e7d34a6
L
533#define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
534#define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
f88c9eb0 535#define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
c0f3af97
L
536#define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
537#define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
538#define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
9e30b8e0 539#define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
1ceb70f8 540
51e7da1b
L
541enum
542{
543 REG_80 = 0,
3873ba12
L
544 REG_81,
545 REG_82,
546 REG_8F,
547 REG_C0,
548 REG_C1,
549 REG_C6,
550 REG_C7,
551 REG_D0,
552 REG_D1,
553 REG_D2,
554 REG_D3,
555 REG_F6,
556 REG_F7,
557 REG_FE,
558 REG_FF,
559 REG_0F00,
560 REG_0F01,
561 REG_0F0D,
562 REG_0F18,
563 REG_0F71,
564 REG_0F72,
565 REG_0F73,
566 REG_0FA6,
567 REG_0FA7,
568 REG_0FAE,
569 REG_0FBA,
570 REG_0FC7,
571 REG_VEX_71,
572 REG_VEX_72,
573 REG_VEX_73,
f88c9eb0
SP
574 REG_VEX_AE,
575 REG_XOP_LWPCB,
576 REG_XOP_LWP
51e7da1b 577};
1ceb70f8 578
51e7da1b
L
579enum
580{
581 MOD_8D = 0,
3873ba12
L
582 MOD_0F01_REG_0,
583 MOD_0F01_REG_1,
584 MOD_0F01_REG_2,
585 MOD_0F01_REG_3,
586 MOD_0F01_REG_7,
587 MOD_0F12_PREFIX_0,
588 MOD_0F13,
589 MOD_0F16_PREFIX_0,
590 MOD_0F17,
591 MOD_0F18_REG_0,
592 MOD_0F18_REG_1,
593 MOD_0F18_REG_2,
594 MOD_0F18_REG_3,
595 MOD_0F20,
596 MOD_0F21,
597 MOD_0F22,
598 MOD_0F23,
599 MOD_0F24,
600 MOD_0F26,
601 MOD_0F2B_PREFIX_0,
602 MOD_0F2B_PREFIX_1,
603 MOD_0F2B_PREFIX_2,
604 MOD_0F2B_PREFIX_3,
605 MOD_0F51,
606 MOD_0F71_REG_2,
607 MOD_0F71_REG_4,
608 MOD_0F71_REG_6,
609 MOD_0F72_REG_2,
610 MOD_0F72_REG_4,
611 MOD_0F72_REG_6,
612 MOD_0F73_REG_2,
613 MOD_0F73_REG_3,
614 MOD_0F73_REG_6,
615 MOD_0F73_REG_7,
616 MOD_0FAE_REG_0,
617 MOD_0FAE_REG_1,
618 MOD_0FAE_REG_2,
619 MOD_0FAE_REG_3,
620 MOD_0FAE_REG_4,
621 MOD_0FAE_REG_5,
622 MOD_0FAE_REG_6,
623 MOD_0FAE_REG_7,
624 MOD_0FB2,
625 MOD_0FB4,
626 MOD_0FB5,
627 MOD_0FC7_REG_6,
628 MOD_0FC7_REG_7,
629 MOD_0FD7,
630 MOD_0FE7_PREFIX_2,
631 MOD_0FF0_PREFIX_3,
632 MOD_0F382A_PREFIX_2,
633 MOD_62_32BIT,
634 MOD_C4_32BIT,
635 MOD_C5_32BIT,
636 MOD_VEX_12_PREFIX_0,
637 MOD_VEX_13,
638 MOD_VEX_16_PREFIX_0,
639 MOD_VEX_17,
640 MOD_VEX_2B,
976f1fde 641 MOD_VEX_50,
3873ba12
L
642 MOD_VEX_71_REG_2,
643 MOD_VEX_71_REG_4,
644 MOD_VEX_71_REG_6,
645 MOD_VEX_72_REG_2,
646 MOD_VEX_72_REG_4,
647 MOD_VEX_72_REG_6,
648 MOD_VEX_73_REG_2,
649 MOD_VEX_73_REG_3,
650 MOD_VEX_73_REG_6,
651 MOD_VEX_73_REG_7,
652 MOD_VEX_AE_REG_2,
653 MOD_VEX_AE_REG_3,
654 MOD_VEX_D7_PREFIX_2,
655 MOD_VEX_E7_PREFIX_2,
656 MOD_VEX_F0_PREFIX_3,
657 MOD_VEX_3818_PREFIX_2,
658 MOD_VEX_3819_PREFIX_2,
659 MOD_VEX_381A_PREFIX_2,
660 MOD_VEX_382A_PREFIX_2,
661 MOD_VEX_382C_PREFIX_2,
662 MOD_VEX_382D_PREFIX_2,
663 MOD_VEX_382E_PREFIX_2,
664 MOD_VEX_382F_PREFIX_2
51e7da1b 665};
1ceb70f8 666
51e7da1b
L
667enum
668{
669 RM_0F01_REG_0 = 0,
3873ba12
L
670 RM_0F01_REG_1,
671 RM_0F01_REG_2,
672 RM_0F01_REG_3,
673 RM_0F01_REG_7,
674 RM_0FAE_REG_5,
675 RM_0FAE_REG_6,
676 RM_0FAE_REG_7
51e7da1b 677};
1ceb70f8 678
51e7da1b
L
679enum
680{
681 PREFIX_90 = 0,
3873ba12
L
682 PREFIX_0F10,
683 PREFIX_0F11,
684 PREFIX_0F12,
685 PREFIX_0F16,
686 PREFIX_0F2A,
687 PREFIX_0F2B,
688 PREFIX_0F2C,
689 PREFIX_0F2D,
690 PREFIX_0F2E,
691 PREFIX_0F2F,
692 PREFIX_0F51,
693 PREFIX_0F52,
694 PREFIX_0F53,
695 PREFIX_0F58,
696 PREFIX_0F59,
697 PREFIX_0F5A,
698 PREFIX_0F5B,
699 PREFIX_0F5C,
700 PREFIX_0F5D,
701 PREFIX_0F5E,
702 PREFIX_0F5F,
703 PREFIX_0F60,
704 PREFIX_0F61,
705 PREFIX_0F62,
706 PREFIX_0F6C,
707 PREFIX_0F6D,
708 PREFIX_0F6F,
709 PREFIX_0F70,
710 PREFIX_0F73_REG_3,
711 PREFIX_0F73_REG_7,
712 PREFIX_0F78,
713 PREFIX_0F79,
714 PREFIX_0F7C,
715 PREFIX_0F7D,
716 PREFIX_0F7E,
717 PREFIX_0F7F,
718 PREFIX_0FB8,
719 PREFIX_0FBD,
720 PREFIX_0FC2,
721 PREFIX_0FC3,
722 PREFIX_0FC7_REG_6,
723 PREFIX_0FD0,
724 PREFIX_0FD6,
725 PREFIX_0FE6,
726 PREFIX_0FE7,
727 PREFIX_0FF0,
728 PREFIX_0FF7,
729 PREFIX_0F3810,
730 PREFIX_0F3814,
731 PREFIX_0F3815,
732 PREFIX_0F3817,
733 PREFIX_0F3820,
734 PREFIX_0F3821,
735 PREFIX_0F3822,
736 PREFIX_0F3823,
737 PREFIX_0F3824,
738 PREFIX_0F3825,
739 PREFIX_0F3828,
740 PREFIX_0F3829,
741 PREFIX_0F382A,
742 PREFIX_0F382B,
743 PREFIX_0F3830,
744 PREFIX_0F3831,
745 PREFIX_0F3832,
746 PREFIX_0F3833,
747 PREFIX_0F3834,
748 PREFIX_0F3835,
749 PREFIX_0F3837,
750 PREFIX_0F3838,
751 PREFIX_0F3839,
752 PREFIX_0F383A,
753 PREFIX_0F383B,
754 PREFIX_0F383C,
755 PREFIX_0F383D,
756 PREFIX_0F383E,
757 PREFIX_0F383F,
758 PREFIX_0F3840,
759 PREFIX_0F3841,
760 PREFIX_0F3880,
761 PREFIX_0F3881,
762 PREFIX_0F38DB,
763 PREFIX_0F38DC,
764 PREFIX_0F38DD,
765 PREFIX_0F38DE,
766 PREFIX_0F38DF,
767 PREFIX_0F38F0,
768 PREFIX_0F38F1,
769 PREFIX_0F3A08,
770 PREFIX_0F3A09,
771 PREFIX_0F3A0A,
772 PREFIX_0F3A0B,
773 PREFIX_0F3A0C,
774 PREFIX_0F3A0D,
775 PREFIX_0F3A0E,
776 PREFIX_0F3A14,
777 PREFIX_0F3A15,
778 PREFIX_0F3A16,
779 PREFIX_0F3A17,
780 PREFIX_0F3A20,
781 PREFIX_0F3A21,
782 PREFIX_0F3A22,
783 PREFIX_0F3A40,
784 PREFIX_0F3A41,
785 PREFIX_0F3A42,
786 PREFIX_0F3A44,
787 PREFIX_0F3A60,
788 PREFIX_0F3A61,
789 PREFIX_0F3A62,
790 PREFIX_0F3A63,
791 PREFIX_0F3ADF,
792 PREFIX_VEX_10,
793 PREFIX_VEX_11,
794 PREFIX_VEX_12,
795 PREFIX_VEX_16,
796 PREFIX_VEX_2A,
797 PREFIX_VEX_2C,
798 PREFIX_VEX_2D,
799 PREFIX_VEX_2E,
800 PREFIX_VEX_2F,
801 PREFIX_VEX_51,
802 PREFIX_VEX_52,
803 PREFIX_VEX_53,
804 PREFIX_VEX_58,
805 PREFIX_VEX_59,
806 PREFIX_VEX_5A,
807 PREFIX_VEX_5B,
808 PREFIX_VEX_5C,
809 PREFIX_VEX_5D,
810 PREFIX_VEX_5E,
811 PREFIX_VEX_5F,
812 PREFIX_VEX_60,
813 PREFIX_VEX_61,
814 PREFIX_VEX_62,
815 PREFIX_VEX_63,
816 PREFIX_VEX_64,
817 PREFIX_VEX_65,
818 PREFIX_VEX_66,
819 PREFIX_VEX_67,
820 PREFIX_VEX_68,
821 PREFIX_VEX_69,
822 PREFIX_VEX_6A,
823 PREFIX_VEX_6B,
824 PREFIX_VEX_6C,
825 PREFIX_VEX_6D,
826 PREFIX_VEX_6E,
827 PREFIX_VEX_6F,
828 PREFIX_VEX_70,
829 PREFIX_VEX_71_REG_2,
830 PREFIX_VEX_71_REG_4,
831 PREFIX_VEX_71_REG_6,
832 PREFIX_VEX_72_REG_2,
833 PREFIX_VEX_72_REG_4,
834 PREFIX_VEX_72_REG_6,
835 PREFIX_VEX_73_REG_2,
836 PREFIX_VEX_73_REG_3,
837 PREFIX_VEX_73_REG_6,
838 PREFIX_VEX_73_REG_7,
839 PREFIX_VEX_74,
840 PREFIX_VEX_75,
841 PREFIX_VEX_76,
842 PREFIX_VEX_77,
843 PREFIX_VEX_7C,
844 PREFIX_VEX_7D,
845 PREFIX_VEX_7E,
846 PREFIX_VEX_7F,
847 PREFIX_VEX_C2,
848 PREFIX_VEX_C4,
849 PREFIX_VEX_C5,
850 PREFIX_VEX_D0,
851 PREFIX_VEX_D1,
852 PREFIX_VEX_D2,
853 PREFIX_VEX_D3,
854 PREFIX_VEX_D4,
855 PREFIX_VEX_D5,
856 PREFIX_VEX_D6,
857 PREFIX_VEX_D7,
858 PREFIX_VEX_D8,
859 PREFIX_VEX_D9,
860 PREFIX_VEX_DA,
861 PREFIX_VEX_DB,
862 PREFIX_VEX_DC,
863 PREFIX_VEX_DD,
864 PREFIX_VEX_DE,
865 PREFIX_VEX_DF,
866 PREFIX_VEX_E0,
867 PREFIX_VEX_E1,
868 PREFIX_VEX_E2,
869 PREFIX_VEX_E3,
870 PREFIX_VEX_E4,
871 PREFIX_VEX_E5,
872 PREFIX_VEX_E6,
873 PREFIX_VEX_E7,
874 PREFIX_VEX_E8,
875 PREFIX_VEX_E9,
876 PREFIX_VEX_EA,
877 PREFIX_VEX_EB,
878 PREFIX_VEX_EC,
879 PREFIX_VEX_ED,
880 PREFIX_VEX_EE,
881 PREFIX_VEX_EF,
882 PREFIX_VEX_F0,
883 PREFIX_VEX_F1,
884 PREFIX_VEX_F2,
885 PREFIX_VEX_F3,
886 PREFIX_VEX_F4,
887 PREFIX_VEX_F5,
888 PREFIX_VEX_F6,
889 PREFIX_VEX_F7,
890 PREFIX_VEX_F8,
891 PREFIX_VEX_F9,
892 PREFIX_VEX_FA,
893 PREFIX_VEX_FB,
894 PREFIX_VEX_FC,
895 PREFIX_VEX_FD,
896 PREFIX_VEX_FE,
897 PREFIX_VEX_3800,
898 PREFIX_VEX_3801,
899 PREFIX_VEX_3802,
900 PREFIX_VEX_3803,
901 PREFIX_VEX_3804,
902 PREFIX_VEX_3805,
903 PREFIX_VEX_3806,
904 PREFIX_VEX_3807,
905 PREFIX_VEX_3808,
906 PREFIX_VEX_3809,
907 PREFIX_VEX_380A,
908 PREFIX_VEX_380B,
909 PREFIX_VEX_380C,
910 PREFIX_VEX_380D,
911 PREFIX_VEX_380E,
912 PREFIX_VEX_380F,
913 PREFIX_VEX_3817,
914 PREFIX_VEX_3818,
915 PREFIX_VEX_3819,
916 PREFIX_VEX_381A,
917 PREFIX_VEX_381C,
918 PREFIX_VEX_381D,
919 PREFIX_VEX_381E,
920 PREFIX_VEX_3820,
921 PREFIX_VEX_3821,
922 PREFIX_VEX_3822,
923 PREFIX_VEX_3823,
924 PREFIX_VEX_3824,
925 PREFIX_VEX_3825,
926 PREFIX_VEX_3828,
927 PREFIX_VEX_3829,
928 PREFIX_VEX_382A,
929 PREFIX_VEX_382B,
930 PREFIX_VEX_382C,
931 PREFIX_VEX_382D,
932 PREFIX_VEX_382E,
933 PREFIX_VEX_382F,
934 PREFIX_VEX_3830,
935 PREFIX_VEX_3831,
936 PREFIX_VEX_3832,
937 PREFIX_VEX_3833,
938 PREFIX_VEX_3834,
939 PREFIX_VEX_3835,
940 PREFIX_VEX_3837,
941 PREFIX_VEX_3838,
942 PREFIX_VEX_3839,
943 PREFIX_VEX_383A,
944 PREFIX_VEX_383B,
945 PREFIX_VEX_383C,
946 PREFIX_VEX_383D,
947 PREFIX_VEX_383E,
948 PREFIX_VEX_383F,
949 PREFIX_VEX_3840,
950 PREFIX_VEX_3841,
951 PREFIX_VEX_3896,
952 PREFIX_VEX_3897,
953 PREFIX_VEX_3898,
954 PREFIX_VEX_3899,
955 PREFIX_VEX_389A,
956 PREFIX_VEX_389B,
957 PREFIX_VEX_389C,
958 PREFIX_VEX_389D,
959 PREFIX_VEX_389E,
960 PREFIX_VEX_389F,
961 PREFIX_VEX_38A6,
962 PREFIX_VEX_38A7,
963 PREFIX_VEX_38A8,
964 PREFIX_VEX_38A9,
965 PREFIX_VEX_38AA,
966 PREFIX_VEX_38AB,
967 PREFIX_VEX_38AC,
968 PREFIX_VEX_38AD,
969 PREFIX_VEX_38AE,
970 PREFIX_VEX_38AF,
971 PREFIX_VEX_38B6,
972 PREFIX_VEX_38B7,
973 PREFIX_VEX_38B8,
974 PREFIX_VEX_38B9,
975 PREFIX_VEX_38BA,
976 PREFIX_VEX_38BB,
977 PREFIX_VEX_38BC,
978 PREFIX_VEX_38BD,
979 PREFIX_VEX_38BE,
980 PREFIX_VEX_38BF,
981 PREFIX_VEX_38DB,
982 PREFIX_VEX_38DC,
983 PREFIX_VEX_38DD,
984 PREFIX_VEX_38DE,
985 PREFIX_VEX_38DF,
986 PREFIX_VEX_3A04,
987 PREFIX_VEX_3A05,
988 PREFIX_VEX_3A06,
989 PREFIX_VEX_3A08,
990 PREFIX_VEX_3A09,
991 PREFIX_VEX_3A0A,
992 PREFIX_VEX_3A0B,
993 PREFIX_VEX_3A0C,
994 PREFIX_VEX_3A0D,
995 PREFIX_VEX_3A0E,
996 PREFIX_VEX_3A0F,
997 PREFIX_VEX_3A14,
998 PREFIX_VEX_3A15,
999 PREFIX_VEX_3A16,
1000 PREFIX_VEX_3A17,
1001 PREFIX_VEX_3A18,
1002 PREFIX_VEX_3A19,
1003 PREFIX_VEX_3A20,
1004 PREFIX_VEX_3A21,
1005 PREFIX_VEX_3A22,
1006 PREFIX_VEX_3A40,
1007 PREFIX_VEX_3A41,
1008 PREFIX_VEX_3A42,
1009 PREFIX_VEX_3A44,
1010 PREFIX_VEX_3A4A,
1011 PREFIX_VEX_3A4B,
1012 PREFIX_VEX_3A4C,
1013 PREFIX_VEX_3A5C,
1014 PREFIX_VEX_3A5D,
1015 PREFIX_VEX_3A5E,
1016 PREFIX_VEX_3A5F,
1017 PREFIX_VEX_3A60,
1018 PREFIX_VEX_3A61,
1019 PREFIX_VEX_3A62,
1020 PREFIX_VEX_3A63,
1021 PREFIX_VEX_3A68,
1022 PREFIX_VEX_3A69,
1023 PREFIX_VEX_3A6A,
1024 PREFIX_VEX_3A6B,
1025 PREFIX_VEX_3A6C,
1026 PREFIX_VEX_3A6D,
1027 PREFIX_VEX_3A6E,
1028 PREFIX_VEX_3A6F,
1029 PREFIX_VEX_3A78,
1030 PREFIX_VEX_3A79,
1031 PREFIX_VEX_3A7A,
1032 PREFIX_VEX_3A7B,
1033 PREFIX_VEX_3A7C,
1034 PREFIX_VEX_3A7D,
1035 PREFIX_VEX_3A7E,
1036 PREFIX_VEX_3A7F,
1037 PREFIX_VEX_3ADF
51e7da1b 1038};
4e7d34a6 1039
51e7da1b
L
1040enum
1041{
1042 X86_64_06 = 0,
3873ba12
L
1043 X86_64_07,
1044 X86_64_0D,
1045 X86_64_16,
1046 X86_64_17,
1047 X86_64_1E,
1048 X86_64_1F,
1049 X86_64_27,
1050 X86_64_2F,
1051 X86_64_37,
1052 X86_64_3F,
1053 X86_64_60,
1054 X86_64_61,
1055 X86_64_62,
1056 X86_64_63,
1057 X86_64_6D,
1058 X86_64_6F,
1059 X86_64_9A,
1060 X86_64_C4,
1061 X86_64_C5,
1062 X86_64_CE,
1063 X86_64_D4,
1064 X86_64_D5,
1065 X86_64_EA,
1066 X86_64_0F01_REG_0,
1067 X86_64_0F01_REG_1,
1068 X86_64_0F01_REG_2,
1069 X86_64_0F01_REG_3
51e7da1b 1070};
4e7d34a6 1071
51e7da1b
L
1072enum
1073{
1074 THREE_BYTE_0F38 = 0,
3873ba12
L
1075 THREE_BYTE_0F3A,
1076 THREE_BYTE_0F7A
51e7da1b 1077};
4e7d34a6 1078
f88c9eb0
SP
1079enum
1080{
5dd85c99
SP
1081 XOP_08 = 0,
1082 XOP_09,
f88c9eb0
SP
1083 XOP_0A
1084};
1085
51e7da1b
L
1086enum
1087{
1088 VEX_0F = 0,
3873ba12
L
1089 VEX_0F38,
1090 VEX_0F3A
51e7da1b 1091};
c0f3af97 1092
51e7da1b
L
1093enum
1094{
1095 VEX_LEN_10_P_1 = 0,
3873ba12
L
1096 VEX_LEN_10_P_3,
1097 VEX_LEN_11_P_1,
1098 VEX_LEN_11_P_3,
1099 VEX_LEN_12_P_0_M_0,
1100 VEX_LEN_12_P_0_M_1,
1101 VEX_LEN_12_P_2,
1102 VEX_LEN_13_M_0,
1103 VEX_LEN_16_P_0_M_0,
1104 VEX_LEN_16_P_0_M_1,
1105 VEX_LEN_16_P_2,
1106 VEX_LEN_17_M_0,
1107 VEX_LEN_2A_P_1,
1108 VEX_LEN_2A_P_3,
1109 VEX_LEN_2C_P_1,
1110 VEX_LEN_2C_P_3,
1111 VEX_LEN_2D_P_1,
1112 VEX_LEN_2D_P_3,
1113 VEX_LEN_2E_P_0,
1114 VEX_LEN_2E_P_2,
1115 VEX_LEN_2F_P_0,
1116 VEX_LEN_2F_P_2,
1117 VEX_LEN_51_P_1,
1118 VEX_LEN_51_P_3,
1119 VEX_LEN_52_P_1,
1120 VEX_LEN_53_P_1,
1121 VEX_LEN_58_P_1,
1122 VEX_LEN_58_P_3,
1123 VEX_LEN_59_P_1,
1124 VEX_LEN_59_P_3,
1125 VEX_LEN_5A_P_1,
1126 VEX_LEN_5A_P_3,
1127 VEX_LEN_5C_P_1,
1128 VEX_LEN_5C_P_3,
1129 VEX_LEN_5D_P_1,
1130 VEX_LEN_5D_P_3,
1131 VEX_LEN_5E_P_1,
1132 VEX_LEN_5E_P_3,
1133 VEX_LEN_5F_P_1,
1134 VEX_LEN_5F_P_3,
1135 VEX_LEN_60_P_2,
1136 VEX_LEN_61_P_2,
1137 VEX_LEN_62_P_2,
1138 VEX_LEN_63_P_2,
1139 VEX_LEN_64_P_2,
1140 VEX_LEN_65_P_2,
1141 VEX_LEN_66_P_2,
1142 VEX_LEN_67_P_2,
1143 VEX_LEN_68_P_2,
1144 VEX_LEN_69_P_2,
1145 VEX_LEN_6A_P_2,
1146 VEX_LEN_6B_P_2,
1147 VEX_LEN_6C_P_2,
1148 VEX_LEN_6D_P_2,
1149 VEX_LEN_6E_P_2,
1150 VEX_LEN_70_P_1,
1151 VEX_LEN_70_P_2,
1152 VEX_LEN_70_P_3,
1153 VEX_LEN_71_R_2_P_2,
1154 VEX_LEN_71_R_4_P_2,
1155 VEX_LEN_71_R_6_P_2,
1156 VEX_LEN_72_R_2_P_2,
1157 VEX_LEN_72_R_4_P_2,
1158 VEX_LEN_72_R_6_P_2,
1159 VEX_LEN_73_R_2_P_2,
1160 VEX_LEN_73_R_3_P_2,
1161 VEX_LEN_73_R_6_P_2,
1162 VEX_LEN_73_R_7_P_2,
1163 VEX_LEN_74_P_2,
1164 VEX_LEN_75_P_2,
1165 VEX_LEN_76_P_2,
1166 VEX_LEN_7E_P_1,
1167 VEX_LEN_7E_P_2,
1168 VEX_LEN_AE_R_2_M_0,
1169 VEX_LEN_AE_R_3_M_0,
1170 VEX_LEN_C2_P_1,
1171 VEX_LEN_C2_P_3,
1172 VEX_LEN_C4_P_2,
1173 VEX_LEN_C5_P_2,
1174 VEX_LEN_D1_P_2,
1175 VEX_LEN_D2_P_2,
1176 VEX_LEN_D3_P_2,
1177 VEX_LEN_D4_P_2,
1178 VEX_LEN_D5_P_2,
1179 VEX_LEN_D6_P_2,
1180 VEX_LEN_D7_P_2_M_1,
1181 VEX_LEN_D8_P_2,
1182 VEX_LEN_D9_P_2,
1183 VEX_LEN_DA_P_2,
1184 VEX_LEN_DB_P_2,
1185 VEX_LEN_DC_P_2,
1186 VEX_LEN_DD_P_2,
1187 VEX_LEN_DE_P_2,
1188 VEX_LEN_DF_P_2,
1189 VEX_LEN_E0_P_2,
1190 VEX_LEN_E1_P_2,
1191 VEX_LEN_E2_P_2,
1192 VEX_LEN_E3_P_2,
1193 VEX_LEN_E4_P_2,
1194 VEX_LEN_E5_P_2,
1195 VEX_LEN_E8_P_2,
1196 VEX_LEN_E9_P_2,
1197 VEX_LEN_EA_P_2,
1198 VEX_LEN_EB_P_2,
1199 VEX_LEN_EC_P_2,
1200 VEX_LEN_ED_P_2,
1201 VEX_LEN_EE_P_2,
1202 VEX_LEN_EF_P_2,
1203 VEX_LEN_F1_P_2,
1204 VEX_LEN_F2_P_2,
1205 VEX_LEN_F3_P_2,
1206 VEX_LEN_F4_P_2,
1207 VEX_LEN_F5_P_2,
1208 VEX_LEN_F6_P_2,
1209 VEX_LEN_F7_P_2,
1210 VEX_LEN_F8_P_2,
1211 VEX_LEN_F9_P_2,
1212 VEX_LEN_FA_P_2,
1213 VEX_LEN_FB_P_2,
1214 VEX_LEN_FC_P_2,
1215 VEX_LEN_FD_P_2,
1216 VEX_LEN_FE_P_2,
1217 VEX_LEN_3800_P_2,
1218 VEX_LEN_3801_P_2,
1219 VEX_LEN_3802_P_2,
1220 VEX_LEN_3803_P_2,
1221 VEX_LEN_3804_P_2,
1222 VEX_LEN_3805_P_2,
1223 VEX_LEN_3806_P_2,
1224 VEX_LEN_3807_P_2,
1225 VEX_LEN_3808_P_2,
1226 VEX_LEN_3809_P_2,
1227 VEX_LEN_380A_P_2,
1228 VEX_LEN_380B_P_2,
1229 VEX_LEN_3819_P_2_M_0,
1230 VEX_LEN_381A_P_2_M_0,
1231 VEX_LEN_381C_P_2,
1232 VEX_LEN_381D_P_2,
1233 VEX_LEN_381E_P_2,
1234 VEX_LEN_3820_P_2,
1235 VEX_LEN_3821_P_2,
1236 VEX_LEN_3822_P_2,
1237 VEX_LEN_3823_P_2,
1238 VEX_LEN_3824_P_2,
1239 VEX_LEN_3825_P_2,
1240 VEX_LEN_3828_P_2,
1241 VEX_LEN_3829_P_2,
1242 VEX_LEN_382A_P_2_M_0,
1243 VEX_LEN_382B_P_2,
1244 VEX_LEN_3830_P_2,
1245 VEX_LEN_3831_P_2,
1246 VEX_LEN_3832_P_2,
1247 VEX_LEN_3833_P_2,
1248 VEX_LEN_3834_P_2,
1249 VEX_LEN_3835_P_2,
1250 VEX_LEN_3837_P_2,
1251 VEX_LEN_3838_P_2,
1252 VEX_LEN_3839_P_2,
1253 VEX_LEN_383A_P_2,
1254 VEX_LEN_383B_P_2,
1255 VEX_LEN_383C_P_2,
1256 VEX_LEN_383D_P_2,
1257 VEX_LEN_383E_P_2,
1258 VEX_LEN_383F_P_2,
1259 VEX_LEN_3840_P_2,
1260 VEX_LEN_3841_P_2,
1261 VEX_LEN_38DB_P_2,
1262 VEX_LEN_38DC_P_2,
1263 VEX_LEN_38DD_P_2,
1264 VEX_LEN_38DE_P_2,
1265 VEX_LEN_38DF_P_2,
1266 VEX_LEN_3A06_P_2,
1267 VEX_LEN_3A0A_P_2,
1268 VEX_LEN_3A0B_P_2,
1269 VEX_LEN_3A0E_P_2,
1270 VEX_LEN_3A0F_P_2,
1271 VEX_LEN_3A14_P_2,
1272 VEX_LEN_3A15_P_2,
1273 VEX_LEN_3A16_P_2,
1274 VEX_LEN_3A17_P_2,
1275 VEX_LEN_3A18_P_2,
1276 VEX_LEN_3A19_P_2,
1277 VEX_LEN_3A20_P_2,
1278 VEX_LEN_3A21_P_2,
1279 VEX_LEN_3A22_P_2,
1280 VEX_LEN_3A41_P_2,
1281 VEX_LEN_3A42_P_2,
1282 VEX_LEN_3A44_P_2,
1283 VEX_LEN_3A4C_P_2,
1284 VEX_LEN_3A60_P_2,
1285 VEX_LEN_3A61_P_2,
1286 VEX_LEN_3A62_P_2,
1287 VEX_LEN_3A63_P_2,
1288 VEX_LEN_3A6A_P_2,
1289 VEX_LEN_3A6B_P_2,
1290 VEX_LEN_3A6E_P_2,
1291 VEX_LEN_3A6F_P_2,
1292 VEX_LEN_3A7A_P_2,
1293 VEX_LEN_3A7B_P_2,
1294 VEX_LEN_3A7E_P_2,
1295 VEX_LEN_3A7F_P_2,
5dd85c99 1296 VEX_LEN_3ADF_P_2,
5dd85c99
SP
1297 VEX_LEN_XOP_09_80,
1298 VEX_LEN_XOP_09_81
51e7da1b 1299};
c0f3af97 1300
9e30b8e0
L
1301enum
1302{
1303 VEX_W_10_P_0 = 0,
1304 VEX_W_10_P_1,
1305 VEX_W_10_P_2,
1306 VEX_W_10_P_3,
1307 VEX_W_11_P_0,
1308 VEX_W_11_P_1,
1309 VEX_W_11_P_2,
1310 VEX_W_11_P_3,
1311 VEX_W_12_P_0_M_0,
1312 VEX_W_12_P_0_M_1,
1313 VEX_W_12_P_1,
1314 VEX_W_12_P_2,
1315 VEX_W_12_P_3,
1316 VEX_W_13_M_0,
1317 VEX_W_14,
1318 VEX_W_15,
1319 VEX_W_16_P_0_M_0,
1320 VEX_W_16_P_0_M_1,
1321 VEX_W_16_P_1,
1322 VEX_W_16_P_2,
1323 VEX_W_17_M_0,
1324 VEX_W_28,
1325 VEX_W_29,
1326 VEX_W_2B_M_0,
1327 VEX_W_2E_P_0,
1328 VEX_W_2E_P_2,
1329 VEX_W_2F_P_0,
1330 VEX_W_2F_P_2,
1331 VEX_W_50_M_0,
1332 VEX_W_51_P_0,
1333 VEX_W_51_P_1,
1334 VEX_W_51_P_2,
1335 VEX_W_51_P_3,
1336 VEX_W_52_P_0,
1337 VEX_W_52_P_1,
1338 VEX_W_53_P_0,
1339 VEX_W_53_P_1,
1340 VEX_W_58_P_0,
1341 VEX_W_58_P_1,
1342 VEX_W_58_P_2,
1343 VEX_W_58_P_3,
1344 VEX_W_59_P_0,
1345 VEX_W_59_P_1,
1346 VEX_W_59_P_2,
1347 VEX_W_59_P_3,
1348 VEX_W_5A_P_0,
1349 VEX_W_5A_P_1,
1350 VEX_W_5A_P_3,
1351 VEX_W_5B_P_0,
1352 VEX_W_5B_P_1,
1353 VEX_W_5B_P_2,
1354 VEX_W_5C_P_0,
1355 VEX_W_5C_P_1,
1356 VEX_W_5C_P_2,
1357 VEX_W_5C_P_3,
1358 VEX_W_5D_P_0,
1359 VEX_W_5D_P_1,
1360 VEX_W_5D_P_2,
1361 VEX_W_5D_P_3,
1362 VEX_W_5E_P_0,
1363 VEX_W_5E_P_1,
1364 VEX_W_5E_P_2,
1365 VEX_W_5E_P_3,
1366 VEX_W_5F_P_0,
1367 VEX_W_5F_P_1,
1368 VEX_W_5F_P_2,
1369 VEX_W_5F_P_3,
1370 VEX_W_60_P_2,
1371 VEX_W_61_P_2,
1372 VEX_W_62_P_2,
1373 VEX_W_63_P_2,
1374 VEX_W_64_P_2,
1375 VEX_W_65_P_2,
1376 VEX_W_66_P_2,
1377 VEX_W_67_P_2,
1378 VEX_W_68_P_2,
1379 VEX_W_69_P_2,
1380 VEX_W_6A_P_2,
1381 VEX_W_6B_P_2,
1382 VEX_W_6C_P_2,
1383 VEX_W_6D_P_2,
1384 VEX_W_6F_P_1,
1385 VEX_W_6F_P_2,
1386 VEX_W_70_P_1,
1387 VEX_W_70_P_2,
1388 VEX_W_70_P_3,
1389 VEX_W_71_R_2_P_2,
1390 VEX_W_71_R_4_P_2,
1391 VEX_W_71_R_6_P_2,
1392 VEX_W_72_R_2_P_2,
1393 VEX_W_72_R_4_P_2,
1394 VEX_W_72_R_6_P_2,
1395 VEX_W_73_R_2_P_2,
1396 VEX_W_73_R_3_P_2,
1397 VEX_W_73_R_6_P_2,
1398 VEX_W_73_R_7_P_2,
1399 VEX_W_74_P_2,
1400 VEX_W_75_P_2,
1401 VEX_W_76_P_2,
1402 VEX_W_77_P_0,
1403 VEX_W_7C_P_2,
1404 VEX_W_7C_P_3,
1405 VEX_W_7D_P_2,
1406 VEX_W_7D_P_3,
1407 VEX_W_7E_P_1,
1408 VEX_W_7F_P_1,
1409 VEX_W_7F_P_2,
1410 VEX_W_AE_R_2_M_0,
1411 VEX_W_AE_R_3_M_0,
1412 VEX_W_C2_P_0,
1413 VEX_W_C2_P_1,
1414 VEX_W_C2_P_2,
1415 VEX_W_C2_P_3,
1416 VEX_W_C4_P_2,
1417 VEX_W_C5_P_2,
1418 VEX_W_D0_P_2,
1419 VEX_W_D0_P_3,
1420 VEX_W_D1_P_2,
1421 VEX_W_D2_P_2,
1422 VEX_W_D3_P_2,
1423 VEX_W_D4_P_2,
1424 VEX_W_D5_P_2,
1425 VEX_W_D6_P_2,
1426 VEX_W_D7_P_2_M_1,
1427 VEX_W_D8_P_2,
1428 VEX_W_D9_P_2,
1429 VEX_W_DA_P_2,
1430 VEX_W_DB_P_2,
1431 VEX_W_DC_P_2,
1432 VEX_W_DD_P_2,
1433 VEX_W_DE_P_2,
1434 VEX_W_DF_P_2,
1435 VEX_W_E0_P_2,
1436 VEX_W_E1_P_2,
1437 VEX_W_E2_P_2,
1438 VEX_W_E3_P_2,
1439 VEX_W_E4_P_2,
1440 VEX_W_E5_P_2,
1441 VEX_W_E6_P_1,
1442 VEX_W_E6_P_2,
1443 VEX_W_E6_P_3,
1444 VEX_W_E7_P_2_M_0,
1445 VEX_W_E8_P_2,
1446 VEX_W_E9_P_2,
1447 VEX_W_EA_P_2,
1448 VEX_W_EB_P_2,
1449 VEX_W_EC_P_2,
1450 VEX_W_ED_P_2,
1451 VEX_W_EE_P_2,
1452 VEX_W_EF_P_2,
1453 VEX_W_F0_P_3_M_0,
1454 VEX_W_F1_P_2,
1455 VEX_W_F2_P_2,
1456 VEX_W_F3_P_2,
1457 VEX_W_F4_P_2,
1458 VEX_W_F5_P_2,
1459 VEX_W_F6_P_2,
1460 VEX_W_F7_P_2,
1461 VEX_W_F8_P_2,
1462 VEX_W_F9_P_2,
1463 VEX_W_FA_P_2,
1464 VEX_W_FB_P_2,
1465 VEX_W_FC_P_2,
1466 VEX_W_FD_P_2,
1467 VEX_W_FE_P_2,
1468 VEX_W_3800_P_2,
1469 VEX_W_3801_P_2,
1470 VEX_W_3802_P_2,
1471 VEX_W_3803_P_2,
1472 VEX_W_3804_P_2,
1473 VEX_W_3805_P_2,
1474 VEX_W_3806_P_2,
1475 VEX_W_3807_P_2,
1476 VEX_W_3808_P_2,
1477 VEX_W_3809_P_2,
1478 VEX_W_380A_P_2,
1479 VEX_W_380B_P_2,
1480 VEX_W_380C_P_2,
1481 VEX_W_380D_P_2,
1482 VEX_W_380E_P_2,
1483 VEX_W_380F_P_2,
1484 VEX_W_3817_P_2,
bcf2684f 1485 VEX_W_3818_P_2_M_0,
9e30b8e0
L
1486 VEX_W_3819_P_2_M_0,
1487 VEX_W_381A_P_2_M_0,
1488 VEX_W_381C_P_2,
1489 VEX_W_381D_P_2,
1490 VEX_W_381E_P_2,
1491 VEX_W_3820_P_2,
1492 VEX_W_3821_P_2,
1493 VEX_W_3822_P_2,
1494 VEX_W_3823_P_2,
1495 VEX_W_3824_P_2,
1496 VEX_W_3825_P_2,
1497 VEX_W_3828_P_2,
1498 VEX_W_3829_P_2,
1499 VEX_W_382A_P_2_M_0,
1500 VEX_W_382B_P_2,
53aa04a0
L
1501 VEX_W_382C_P_2_M_0,
1502 VEX_W_382D_P_2_M_0,
1503 VEX_W_382E_P_2_M_0,
1504 VEX_W_382F_P_2_M_0,
9e30b8e0
L
1505 VEX_W_3830_P_2,
1506 VEX_W_3831_P_2,
1507 VEX_W_3832_P_2,
1508 VEX_W_3833_P_2,
1509 VEX_W_3834_P_2,
1510 VEX_W_3835_P_2,
1511 VEX_W_3837_P_2,
1512 VEX_W_3838_P_2,
1513 VEX_W_3839_P_2,
1514 VEX_W_383A_P_2,
1515 VEX_W_383B_P_2,
1516 VEX_W_383C_P_2,
1517 VEX_W_383D_P_2,
1518 VEX_W_383E_P_2,
1519 VEX_W_383F_P_2,
1520 VEX_W_3840_P_2,
1521 VEX_W_3841_P_2,
1522 VEX_W_38DB_P_2,
1523 VEX_W_38DC_P_2,
1524 VEX_W_38DD_P_2,
1525 VEX_W_38DE_P_2,
1526 VEX_W_38DF_P_2,
1527 VEX_W_3A04_P_2,
1528 VEX_W_3A05_P_2,
1529 VEX_W_3A06_P_2,
1530 VEX_W_3A08_P_2,
1531 VEX_W_3A09_P_2,
1532 VEX_W_3A0A_P_2,
1533 VEX_W_3A0B_P_2,
1534 VEX_W_3A0C_P_2,
1535 VEX_W_3A0D_P_2,
1536 VEX_W_3A0E_P_2,
1537 VEX_W_3A0F_P_2,
1538 VEX_W_3A14_P_2,
1539 VEX_W_3A15_P_2,
1540 VEX_W_3A18_P_2,
1541 VEX_W_3A19_P_2,
1542 VEX_W_3A20_P_2,
1543 VEX_W_3A21_P_2,
1544 VEX_W_3A40_P_2,
1545 VEX_W_3A41_P_2,
1546 VEX_W_3A42_P_2,
1547 VEX_W_3A44_P_2,
1548 VEX_W_3A4A_P_2,
1549 VEX_W_3A4B_P_2,
1550 VEX_W_3A4C_P_2,
1551 VEX_W_3A60_P_2,
1552 VEX_W_3A61_P_2,
1553 VEX_W_3A62_P_2,
1554 VEX_W_3A63_P_2,
1555 VEX_W_3ADF_P_2
1556};
1557
26ca5450 1558typedef void (*op_rtn) (int bytemode, int sizeflag);
252b5132
RH
1559
1560struct dis386 {
2da11e11 1561 const char *name;
ce518a5f
L
1562 struct
1563 {
1564 op_rtn rtn;
1565 int bytemode;
1566 } op[MAX_OPERANDS];
252b5132
RH
1567};
1568
1569/* Upper case letters in the instruction names here are macros.
1570 'A' => print 'b' if no register operands or suffix_always is true
1571 'B' => print 'b' if suffix_always is true
9306ca4a 1572 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
98b528ac 1573 size prefix
ed7841b3 1574 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
98b528ac 1575 suffix_always is true
252b5132 1576 'E' => print 'e' if 32-bit form of jcxz
3ffd33cf 1577 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
52fd6d94 1578 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
5dd0794d 1579 'H' => print ",pt" or ",pn" branch hint
9306ca4a 1580 'I' => honor following macro letter even in Intel mode (implemented only
98b528ac 1581 for some of the macro letters)
9306ca4a 1582 'J' => print 'l'
42903f7f 1583 'K' => print 'd' or 'q' if rex prefix is present.
252b5132 1584 'L' => print 'l' if suffix_always is true
9d141669 1585 'M' => print 'r' if intel_mnemonic is false.
252b5132 1586 'N' => print 'n' if instruction has no wait "prefix"
a35ca55a 1587 'O' => print 'd' or 'o' (or 'q' in Intel mode)
52b15da3 1588 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
98b528ac
L
1589 or suffix_always is true. print 'q' if rex prefix is present.
1590 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
1591 is true
a35ca55a 1592 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
52b15da3 1593 'S' => print 'w', 'l' or 'q' if suffix_always is true
6439fc28
AM
1594 'T' => print 'q' in 64bit mode and behave as 'P' otherwise
1595 'U' => print 'q' in 64bit mode and behave as 'Q' otherwise
1a114b12 1596 'V' => print 'q' in 64bit mode and behave as 'S' otherwise
a35ca55a 1597 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
9306ca4a 1598 'X' => print 's', 'd' depending on data16 prefix (for XMM)
8a72226a
L
1599 'Y' => 'q' if instruction has an REX 64bit overwrite prefix and
1600 suffix_always is true.
6dd5059a 1601 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
9d141669 1602 '!' => change condition from true to false or from false to true.
98b528ac
L
1603 '%' => add 1 upper case letter to the macro.
1604
1605 2 upper case letter macros:
c0f3af97
L
1606 "XY" => print 'x' or 'y' if no register operands or suffix_always
1607 is true.
4b06377f
L
1608 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
1609 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
98b528ac 1610 or suffix_always is true
4b06377f
L
1611 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
1612 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
1613 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
52b15da3 1614
6439fc28
AM
1615 Many of the above letters print nothing in Intel mode. See "putop"
1616 for the details.
52b15da3 1617
6439fc28 1618 Braces '{' and '}', and vertical bars '|', indicate alternative
7c52e0e8 1619 mnemonic strings for AT&T and Intel. */
252b5132 1620
6439fc28 1621static const struct dis386 dis386[] = {
252b5132 1622 /* 00 */
ce518a5f
L
1623 { "addB", { Eb, Gb } },
1624 { "addS", { Ev, Gv } },
c7532693
L
1625 { "addB", { Gb, EbS } },
1626 { "addS", { Gv, EvS } },
ce518a5f
L
1627 { "addB", { AL, Ib } },
1628 { "addS", { eAX, Iv } },
4e7d34a6
L
1629 { X86_64_TABLE (X86_64_06) },
1630 { X86_64_TABLE (X86_64_07) },
252b5132 1631 /* 08 */
ce518a5f
L
1632 { "orB", { Eb, Gb } },
1633 { "orS", { Ev, Gv } },
c7532693
L
1634 { "orB", { Gb, EbS } },
1635 { "orS", { Gv, EvS } },
ce518a5f
L
1636 { "orB", { AL, Ib } },
1637 { "orS", { eAX, Iv } },
4e7d34a6 1638 { X86_64_TABLE (X86_64_0D) },
ce518a5f 1639 { "(bad)", { XX } }, /* 0x0f extended opcode escape */
252b5132 1640 /* 10 */
ce518a5f
L
1641 { "adcB", { Eb, Gb } },
1642 { "adcS", { Ev, Gv } },
c7532693
L
1643 { "adcB", { Gb, EbS } },
1644 { "adcS", { Gv, EvS } },
ce518a5f
L
1645 { "adcB", { AL, Ib } },
1646 { "adcS", { eAX, Iv } },
4e7d34a6
L
1647 { X86_64_TABLE (X86_64_16) },
1648 { X86_64_TABLE (X86_64_17) },
252b5132 1649 /* 18 */
ce518a5f
L
1650 { "sbbB", { Eb, Gb } },
1651 { "sbbS", { Ev, Gv } },
c7532693
L
1652 { "sbbB", { Gb, EbS } },
1653 { "sbbS", { Gv, EvS } },
ce518a5f
L
1654 { "sbbB", { AL, Ib } },
1655 { "sbbS", { eAX, Iv } },
4e7d34a6
L
1656 { X86_64_TABLE (X86_64_1E) },
1657 { X86_64_TABLE (X86_64_1F) },
252b5132 1658 /* 20 */
ce518a5f
L
1659 { "andB", { Eb, Gb } },
1660 { "andS", { Ev, Gv } },
c7532693
L
1661 { "andB", { Gb, EbS } },
1662 { "andS", { Gv, EvS } },
ce518a5f
L
1663 { "andB", { AL, Ib } },
1664 { "andS", { eAX, Iv } },
1665 { "(bad)", { XX } }, /* SEG ES prefix */
4e7d34a6 1666 { X86_64_TABLE (X86_64_27) },
252b5132 1667 /* 28 */
ce518a5f
L
1668 { "subB", { Eb, Gb } },
1669 { "subS", { Ev, Gv } },
c7532693
L
1670 { "subB", { Gb, EbS } },
1671 { "subS", { Gv, EvS } },
ce518a5f
L
1672 { "subB", { AL, Ib } },
1673 { "subS", { eAX, Iv } },
1674 { "(bad)", { XX } }, /* SEG CS prefix */
4e7d34a6 1675 { X86_64_TABLE (X86_64_2F) },
252b5132 1676 /* 30 */
ce518a5f
L
1677 { "xorB", { Eb, Gb } },
1678 { "xorS", { Ev, Gv } },
c7532693
L
1679 { "xorB", { Gb, EbS } },
1680 { "xorS", { Gv, EvS } },
ce518a5f
L
1681 { "xorB", { AL, Ib } },
1682 { "xorS", { eAX, Iv } },
1683 { "(bad)", { XX } }, /* SEG SS prefix */
4e7d34a6 1684 { X86_64_TABLE (X86_64_37) },
252b5132 1685 /* 38 */
ce518a5f
L
1686 { "cmpB", { Eb, Gb } },
1687 { "cmpS", { Ev, Gv } },
c7532693
L
1688 { "cmpB", { Gb, EbS } },
1689 { "cmpS", { Gv, EvS } },
ce518a5f
L
1690 { "cmpB", { AL, Ib } },
1691 { "cmpS", { eAX, Iv } },
1692 { "(bad)", { XX } }, /* SEG DS prefix */
4e7d34a6 1693 { X86_64_TABLE (X86_64_3F) },
252b5132 1694 /* 40 */
ce518a5f
L
1695 { "inc{S|}", { RMeAX } },
1696 { "inc{S|}", { RMeCX } },
1697 { "inc{S|}", { RMeDX } },
1698 { "inc{S|}", { RMeBX } },
1699 { "inc{S|}", { RMeSP } },
1700 { "inc{S|}", { RMeBP } },
1701 { "inc{S|}", { RMeSI } },
1702 { "inc{S|}", { RMeDI } },
252b5132 1703 /* 48 */
ce518a5f
L
1704 { "dec{S|}", { RMeAX } },
1705 { "dec{S|}", { RMeCX } },
1706 { "dec{S|}", { RMeDX } },
1707 { "dec{S|}", { RMeBX } },
1708 { "dec{S|}", { RMeSP } },
1709 { "dec{S|}", { RMeBP } },
1710 { "dec{S|}", { RMeSI } },
1711 { "dec{S|}", { RMeDI } },
252b5132 1712 /* 50 */
ce518a5f
L
1713 { "pushV", { RMrAX } },
1714 { "pushV", { RMrCX } },
1715 { "pushV", { RMrDX } },
1716 { "pushV", { RMrBX } },
1717 { "pushV", { RMrSP } },
1718 { "pushV", { RMrBP } },
1719 { "pushV", { RMrSI } },
1720 { "pushV", { RMrDI } },
252b5132 1721 /* 58 */
ce518a5f
L
1722 { "popV", { RMrAX } },
1723 { "popV", { RMrCX } },
1724 { "popV", { RMrDX } },
1725 { "popV", { RMrBX } },
1726 { "popV", { RMrSP } },
1727 { "popV", { RMrBP } },
1728 { "popV", { RMrSI } },
1729 { "popV", { RMrDI } },
252b5132 1730 /* 60 */
4e7d34a6
L
1731 { X86_64_TABLE (X86_64_60) },
1732 { X86_64_TABLE (X86_64_61) },
1733 { X86_64_TABLE (X86_64_62) },
1734 { X86_64_TABLE (X86_64_63) },
ce518a5f
L
1735 { "(bad)", { XX } }, /* seg fs */
1736 { "(bad)", { XX } }, /* seg gs */
1737 { "(bad)", { XX } }, /* op size prefix */
1738 { "(bad)", { XX } }, /* adr size prefix */
252b5132 1739 /* 68 */
ce518a5f
L
1740 { "pushT", { Iq } },
1741 { "imulS", { Gv, Ev, Iv } },
1742 { "pushT", { sIb } },
1743 { "imulS", { Gv, Ev, sIb } },
7c52e0e8 1744 { "ins{b|}", { Ybr, indirDX } },
4e7d34a6 1745 { X86_64_TABLE (X86_64_6D) },
7c52e0e8 1746 { "outs{b|}", { indirDXr, Xb } },
4e7d34a6 1747 { X86_64_TABLE (X86_64_6F) },
252b5132 1748 /* 70 */
ce518a5f
L
1749 { "joH", { Jb, XX, cond_jump_flag } },
1750 { "jnoH", { Jb, XX, cond_jump_flag } },
1751 { "jbH", { Jb, XX, cond_jump_flag } },
1752 { "jaeH", { Jb, XX, cond_jump_flag } },
1753 { "jeH", { Jb, XX, cond_jump_flag } },
1754 { "jneH", { Jb, XX, cond_jump_flag } },
1755 { "jbeH", { Jb, XX, cond_jump_flag } },
1756 { "jaH", { Jb, XX, cond_jump_flag } },
252b5132 1757 /* 78 */
ce518a5f
L
1758 { "jsH", { Jb, XX, cond_jump_flag } },
1759 { "jnsH", { Jb, XX, cond_jump_flag } },
1760 { "jpH", { Jb, XX, cond_jump_flag } },
1761 { "jnpH", { Jb, XX, cond_jump_flag } },
1762 { "jlH", { Jb, XX, cond_jump_flag } },
1763 { "jgeH", { Jb, XX, cond_jump_flag } },
1764 { "jleH", { Jb, XX, cond_jump_flag } },
1765 { "jgH", { Jb, XX, cond_jump_flag } },
252b5132 1766 /* 80 */
1ceb70f8
L
1767 { REG_TABLE (REG_80) },
1768 { REG_TABLE (REG_81) },
ce518a5f 1769 { "(bad)", { XX } },
1ceb70f8 1770 { REG_TABLE (REG_82) },
ce518a5f
L
1771 { "testB", { Eb, Gb } },
1772 { "testS", { Ev, Gv } },
1773 { "xchgB", { Eb, Gb } },
1774 { "xchgS", { Ev, Gv } },
252b5132 1775 /* 88 */
ce518a5f
L
1776 { "movB", { Eb, Gb } },
1777 { "movS", { Ev, Gv } },
b6169b20
L
1778 { "movB", { Gb, EbS } },
1779 { "movS", { Gv, EvS } },
ce518a5f 1780 { "movD", { Sv, Sw } },
1ceb70f8 1781 { MOD_TABLE (MOD_8D) },
ce518a5f 1782 { "movD", { Sw, Sv } },
1ceb70f8 1783 { REG_TABLE (REG_8F) },
252b5132 1784 /* 90 */
1ceb70f8 1785 { PREFIX_TABLE (PREFIX_90) },
ce518a5f
L
1786 { "xchgS", { RMeCX, eAX } },
1787 { "xchgS", { RMeDX, eAX } },
1788 { "xchgS", { RMeBX, eAX } },
1789 { "xchgS", { RMeSP, eAX } },
1790 { "xchgS", { RMeBP, eAX } },
1791 { "xchgS", { RMeSI, eAX } },
1792 { "xchgS", { RMeDI, eAX } },
252b5132 1793 /* 98 */
7c52e0e8
L
1794 { "cW{t|}R", { XX } },
1795 { "cR{t|}O", { XX } },
4e7d34a6 1796 { X86_64_TABLE (X86_64_9A) },
ce518a5f
L
1797 { "(bad)", { XX } }, /* fwait */
1798 { "pushfT", { XX } },
1799 { "popfT", { XX } },
7c52e0e8
L
1800 { "sahf", { XX } },
1801 { "lahf", { XX } },
252b5132 1802 /* a0 */
4b06377f
L
1803 { "mov%LB", { AL, Ob } },
1804 { "mov%LS", { eAX, Ov } },
1805 { "mov%LB", { Ob, AL } },
1806 { "mov%LS", { Ov, eAX } },
7c52e0e8
L
1807 { "movs{b|}", { Ybr, Xb } },
1808 { "movs{R|}", { Yvr, Xv } },
1809 { "cmps{b|}", { Xb, Yb } },
1810 { "cmps{R|}", { Xv, Yv } },
252b5132 1811 /* a8 */
ce518a5f
L
1812 { "testB", { AL, Ib } },
1813 { "testS", { eAX, Iv } },
1814 { "stosB", { Ybr, AL } },
1815 { "stosS", { Yvr, eAX } },
1816 { "lodsB", { ALr, Xb } },
1817 { "lodsS", { eAXr, Xv } },
1818 { "scasB", { AL, Yb } },
1819 { "scasS", { eAX, Yv } },
252b5132 1820 /* b0 */
ce518a5f
L
1821 { "movB", { RMAL, Ib } },
1822 { "movB", { RMCL, Ib } },
1823 { "movB", { RMDL, Ib } },
1824 { "movB", { RMBL, Ib } },
1825 { "movB", { RMAH, Ib } },
1826 { "movB", { RMCH, Ib } },
1827 { "movB", { RMDH, Ib } },
1828 { "movB", { RMBH, Ib } },
252b5132 1829 /* b8 */
4b06377f
L
1830 { "mov%LV", { RMeAX, Iv64 } },
1831 { "mov%LV", { RMeCX, Iv64 } },
1832 { "mov%LV", { RMeDX, Iv64 } },
1833 { "mov%LV", { RMeBX, Iv64 } },
1834 { "mov%LV", { RMeSP, Iv64 } },
1835 { "mov%LV", { RMeBP, Iv64 } },
1836 { "mov%LV", { RMeSI, Iv64 } },
1837 { "mov%LV", { RMeDI, Iv64 } },
252b5132 1838 /* c0 */
1ceb70f8
L
1839 { REG_TABLE (REG_C0) },
1840 { REG_TABLE (REG_C1) },
ce518a5f
L
1841 { "retT", { Iw } },
1842 { "retT", { XX } },
4e7d34a6
L
1843 { X86_64_TABLE (X86_64_C4) },
1844 { X86_64_TABLE (X86_64_C5) },
1ceb70f8
L
1845 { REG_TABLE (REG_C6) },
1846 { REG_TABLE (REG_C7) },
252b5132 1847 /* c8 */
ce518a5f
L
1848 { "enterT", { Iw, Ib } },
1849 { "leaveT", { XX } },
ddab3d59
JB
1850 { "Jret{|f}P", { Iw } },
1851 { "Jret{|f}P", { XX } },
ce518a5f
L
1852 { "int3", { XX } },
1853 { "int", { Ib } },
4e7d34a6 1854 { X86_64_TABLE (X86_64_CE) },
ce518a5f 1855 { "iretP", { XX } },
252b5132 1856 /* d0 */
1ceb70f8
L
1857 { REG_TABLE (REG_D0) },
1858 { REG_TABLE (REG_D1) },
1859 { REG_TABLE (REG_D2) },
1860 { REG_TABLE (REG_D3) },
4e7d34a6
L
1861 { X86_64_TABLE (X86_64_D4) },
1862 { X86_64_TABLE (X86_64_D5) },
ce518a5f
L
1863 { "(bad)", { XX } },
1864 { "xlat", { DSBX } },
252b5132
RH
1865 /* d8 */
1866 { FLOAT },
1867 { FLOAT },
1868 { FLOAT },
1869 { FLOAT },
1870 { FLOAT },
1871 { FLOAT },
1872 { FLOAT },
1873 { FLOAT },
1874 /* e0 */
ce518a5f
L
1875 { "loopneFH", { Jb, XX, loop_jcxz_flag } },
1876 { "loopeFH", { Jb, XX, loop_jcxz_flag } },
1877 { "loopFH", { Jb, XX, loop_jcxz_flag } },
1878 { "jEcxzH", { Jb, XX, loop_jcxz_flag } },
1879 { "inB", { AL, Ib } },
1880 { "inG", { zAX, Ib } },
1881 { "outB", { Ib, AL } },
1882 { "outG", { Ib, zAX } },
252b5132 1883 /* e8 */
ce518a5f
L
1884 { "callT", { Jv } },
1885 { "jmpT", { Jv } },
4e7d34a6 1886 { X86_64_TABLE (X86_64_EA) },
ce518a5f
L
1887 { "jmp", { Jb } },
1888 { "inB", { AL, indirDX } },
1889 { "inG", { zAX, indirDX } },
1890 { "outB", { indirDX, AL } },
1891 { "outG", { indirDX, zAX } },
252b5132 1892 /* f0 */
ce518a5f
L
1893 { "(bad)", { XX } }, /* lock prefix */
1894 { "icebp", { XX } },
1895 { "(bad)", { XX } }, /* repne */
1896 { "(bad)", { XX } }, /* repz */
1897 { "hlt", { XX } },
1898 { "cmc", { XX } },
1ceb70f8
L
1899 { REG_TABLE (REG_F6) },
1900 { REG_TABLE (REG_F7) },
252b5132 1901 /* f8 */
ce518a5f
L
1902 { "clc", { XX } },
1903 { "stc", { XX } },
1904 { "cli", { XX } },
1905 { "sti", { XX } },
1906 { "cld", { XX } },
1907 { "std", { XX } },
1ceb70f8
L
1908 { REG_TABLE (REG_FE) },
1909 { REG_TABLE (REG_FF) },
252b5132
RH
1910};
1911
6439fc28 1912static const struct dis386 dis386_twobyte[] = {
252b5132 1913 /* 00 */
1ceb70f8
L
1914 { REG_TABLE (REG_0F00 ) },
1915 { REG_TABLE (REG_0F01 ) },
ce518a5f
L
1916 { "larS", { Gv, Ew } },
1917 { "lslS", { Gv, Ew } },
1918 { "(bad)", { XX } },
1919 { "syscall", { XX } },
1920 { "clts", { XX } },
1921 { "sysretP", { XX } },
252b5132 1922 /* 08 */
ce518a5f
L
1923 { "invd", { XX } },
1924 { "wbinvd", { XX } },
1925 { "(bad)", { XX } },
1926 { "ud2a", { XX } },
1927 { "(bad)", { XX } },
b5b1fc4f 1928 { REG_TABLE (REG_0F0D) },
ce518a5f
L
1929 { "femms", { XX } },
1930 { "", { MX, EM, OPSUF } }, /* See OP_3DNowSuffix. */
252b5132 1931 /* 10 */
1ceb70f8
L
1932 { PREFIX_TABLE (PREFIX_0F10) },
1933 { PREFIX_TABLE (PREFIX_0F11) },
1934 { PREFIX_TABLE (PREFIX_0F12) },
1935 { MOD_TABLE (MOD_0F13) },
f2a421c4
L
1936 { "unpcklpX", { XM, EXx } },
1937 { "unpckhpX", { XM, EXx } },
1ceb70f8
L
1938 { PREFIX_TABLE (PREFIX_0F16) },
1939 { MOD_TABLE (MOD_0F17) },
252b5132 1940 /* 18 */
1ceb70f8 1941 { REG_TABLE (REG_0F18) },
b5b1fc4f
L
1942 { "nopQ", { Ev } },
1943 { "nopQ", { Ev } },
1944 { "nopQ", { Ev } },
1945 { "nopQ", { Ev } },
1946 { "nopQ", { Ev } },
1947 { "nopQ", { Ev } },
ce518a5f 1948 { "nopQ", { Ev } },
252b5132 1949 /* 20 */
1ceb70f8
L
1950 { MOD_TABLE (MOD_0F20) },
1951 { MOD_TABLE (MOD_0F21) },
1952 { MOD_TABLE (MOD_0F22) },
1953 { MOD_TABLE (MOD_0F23) },
1954 { MOD_TABLE (MOD_0F24) },
c1e679ec 1955 { "(bad)", { XX } },
1ceb70f8 1956 { MOD_TABLE (MOD_0F26) },
ce518a5f 1957 { "(bad)", { XX } },
252b5132 1958 /* 28 */
09a2c6cf 1959 { "movapX", { XM, EXx } },
b6169b20 1960 { "movapX", { EXxS, XM } },
1ceb70f8
L
1961 { PREFIX_TABLE (PREFIX_0F2A) },
1962 { PREFIX_TABLE (PREFIX_0F2B) },
1963 { PREFIX_TABLE (PREFIX_0F2C) },
1964 { PREFIX_TABLE (PREFIX_0F2D) },
1965 { PREFIX_TABLE (PREFIX_0F2E) },
1966 { PREFIX_TABLE (PREFIX_0F2F) },
252b5132 1967 /* 30 */
ce518a5f
L
1968 { "wrmsr", { XX } },
1969 { "rdtsc", { XX } },
1970 { "rdmsr", { XX } },
1971 { "rdpmc", { XX } },
1972 { "sysenter", { XX } },
1973 { "sysexit", { XX } },
1974 { "(bad)", { XX } },
47dd174c 1975 { "getsec", { XX } },
252b5132 1976 /* 38 */
4e7d34a6 1977 { THREE_BYTE_TABLE (THREE_BYTE_0F38) },
ce518a5f 1978 { "(bad)", { XX } },
4e7d34a6 1979 { THREE_BYTE_TABLE (THREE_BYTE_0F3A) },
ce518a5f
L
1980 { "(bad)", { XX } },
1981 { "(bad)", { XX } },
1982 { "(bad)", { XX } },
1983 { "(bad)", { XX } },
1984 { "(bad)", { XX } },
252b5132 1985 /* 40 */
b19d5385
JB
1986 { "cmovoS", { Gv, Ev } },
1987 { "cmovnoS", { Gv, Ev } },
1988 { "cmovbS", { Gv, Ev } },
1989 { "cmovaeS", { Gv, Ev } },
1990 { "cmoveS", { Gv, Ev } },
1991 { "cmovneS", { Gv, Ev } },
1992 { "cmovbeS", { Gv, Ev } },
1993 { "cmovaS", { Gv, Ev } },
252b5132 1994 /* 48 */
b19d5385
JB
1995 { "cmovsS", { Gv, Ev } },
1996 { "cmovnsS", { Gv, Ev } },
1997 { "cmovpS", { Gv, Ev } },
1998 { "cmovnpS", { Gv, Ev } },
1999 { "cmovlS", { Gv, Ev } },
2000 { "cmovgeS", { Gv, Ev } },
2001 { "cmovleS", { Gv, Ev } },
2002 { "cmovgS", { Gv, Ev } },
252b5132 2003 /* 50 */
75c135a8 2004 { MOD_TABLE (MOD_0F51) },
1ceb70f8
L
2005 { PREFIX_TABLE (PREFIX_0F51) },
2006 { PREFIX_TABLE (PREFIX_0F52) },
2007 { PREFIX_TABLE (PREFIX_0F53) },
09a2c6cf
L
2008 { "andpX", { XM, EXx } },
2009 { "andnpX", { XM, EXx } },
2010 { "orpX", { XM, EXx } },
2011 { "xorpX", { XM, EXx } },
252b5132 2012 /* 58 */
1ceb70f8
L
2013 { PREFIX_TABLE (PREFIX_0F58) },
2014 { PREFIX_TABLE (PREFIX_0F59) },
2015 { PREFIX_TABLE (PREFIX_0F5A) },
2016 { PREFIX_TABLE (PREFIX_0F5B) },
2017 { PREFIX_TABLE (PREFIX_0F5C) },
2018 { PREFIX_TABLE (PREFIX_0F5D) },
2019 { PREFIX_TABLE (PREFIX_0F5E) },
2020 { PREFIX_TABLE (PREFIX_0F5F) },
252b5132 2021 /* 60 */
1ceb70f8
L
2022 { PREFIX_TABLE (PREFIX_0F60) },
2023 { PREFIX_TABLE (PREFIX_0F61) },
2024 { PREFIX_TABLE (PREFIX_0F62) },
ce518a5f
L
2025 { "packsswb", { MX, EM } },
2026 { "pcmpgtb", { MX, EM } },
2027 { "pcmpgtw", { MX, EM } },
2028 { "pcmpgtd", { MX, EM } },
2029 { "packuswb", { MX, EM } },
252b5132 2030 /* 68 */
ce518a5f
L
2031 { "punpckhbw", { MX, EM } },
2032 { "punpckhwd", { MX, EM } },
2033 { "punpckhdq", { MX, EM } },
2034 { "packssdw", { MX, EM } },
1ceb70f8
L
2035 { PREFIX_TABLE (PREFIX_0F6C) },
2036 { PREFIX_TABLE (PREFIX_0F6D) },
231af070 2037 { "movK", { MX, Edq } },
1ceb70f8 2038 { PREFIX_TABLE (PREFIX_0F6F) },
252b5132 2039 /* 70 */
1ceb70f8
L
2040 { PREFIX_TABLE (PREFIX_0F70) },
2041 { REG_TABLE (REG_0F71) },
2042 { REG_TABLE (REG_0F72) },
2043 { REG_TABLE (REG_0F73) },
ce518a5f
L
2044 { "pcmpeqb", { MX, EM } },
2045 { "pcmpeqw", { MX, EM } },
2046 { "pcmpeqd", { MX, EM } },
2047 { "emms", { XX } },
252b5132 2048 /* 78 */
1ceb70f8
L
2049 { PREFIX_TABLE (PREFIX_0F78) },
2050 { PREFIX_TABLE (PREFIX_0F79) },
4e7d34a6 2051 { THREE_BYTE_TABLE (THREE_BYTE_0F7A) },
c1e679ec 2052 { "(bad)", { XX } },
1ceb70f8
L
2053 { PREFIX_TABLE (PREFIX_0F7C) },
2054 { PREFIX_TABLE (PREFIX_0F7D) },
2055 { PREFIX_TABLE (PREFIX_0F7E) },
2056 { PREFIX_TABLE (PREFIX_0F7F) },
252b5132 2057 /* 80 */
ce518a5f
L
2058 { "joH", { Jv, XX, cond_jump_flag } },
2059 { "jnoH", { Jv, XX, cond_jump_flag } },
2060 { "jbH", { Jv, XX, cond_jump_flag } },
2061 { "jaeH", { Jv, XX, cond_jump_flag } },
2062 { "jeH", { Jv, XX, cond_jump_flag } },
2063 { "jneH", { Jv, XX, cond_jump_flag } },
2064 { "jbeH", { Jv, XX, cond_jump_flag } },
2065 { "jaH", { Jv, XX, cond_jump_flag } },
252b5132 2066 /* 88 */
ce518a5f
L
2067 { "jsH", { Jv, XX, cond_jump_flag } },
2068 { "jnsH", { Jv, XX, cond_jump_flag } },
2069 { "jpH", { Jv, XX, cond_jump_flag } },
2070 { "jnpH", { Jv, XX, cond_jump_flag } },
2071 { "jlH", { Jv, XX, cond_jump_flag } },
2072 { "jgeH", { Jv, XX, cond_jump_flag } },
2073 { "jleH", { Jv, XX, cond_jump_flag } },
2074 { "jgH", { Jv, XX, cond_jump_flag } },
252b5132 2075 /* 90 */
ce518a5f
L
2076 { "seto", { Eb } },
2077 { "setno", { Eb } },
2078 { "setb", { Eb } },
2079 { "setae", { Eb } },
2080 { "sete", { Eb } },
2081 { "setne", { Eb } },
2082 { "setbe", { Eb } },
2083 { "seta", { Eb } },
252b5132 2084 /* 98 */
ce518a5f
L
2085 { "sets", { Eb } },
2086 { "setns", { Eb } },
2087 { "setp", { Eb } },
2088 { "setnp", { Eb } },
2089 { "setl", { Eb } },
2090 { "setge", { Eb } },
2091 { "setle", { Eb } },
2092 { "setg", { Eb } },
252b5132 2093 /* a0 */
ce518a5f
L
2094 { "pushT", { fs } },
2095 { "popT", { fs } },
2096 { "cpuid", { XX } },
2097 { "btS", { Ev, Gv } },
2098 { "shldS", { Ev, Gv, Ib } },
2099 { "shldS", { Ev, Gv, CL } },
1ceb70f8
L
2100 { REG_TABLE (REG_0FA6) },
2101 { REG_TABLE (REG_0FA7) },
252b5132 2102 /* a8 */
ce518a5f
L
2103 { "pushT", { gs } },
2104 { "popT", { gs } },
2105 { "rsm", { XX } },
2106 { "btsS", { Ev, Gv } },
2107 { "shrdS", { Ev, Gv, Ib } },
2108 { "shrdS", { Ev, Gv, CL } },
1ceb70f8 2109 { REG_TABLE (REG_0FAE) },
ce518a5f 2110 { "imulS", { Gv, Ev } },
252b5132 2111 /* b0 */
ce518a5f
L
2112 { "cmpxchgB", { Eb, Gb } },
2113 { "cmpxchgS", { Ev, Gv } },
1ceb70f8 2114 { MOD_TABLE (MOD_0FB2) },
ce518a5f 2115 { "btrS", { Ev, Gv } },
1ceb70f8
L
2116 { MOD_TABLE (MOD_0FB4) },
2117 { MOD_TABLE (MOD_0FB5) },
7c52e0e8
L
2118 { "movz{bR|x}", { Gv, Eb } },
2119 { "movz{wR|x}", { Gv, Ew } }, /* yes, there really is movzww ! */
252b5132 2120 /* b8 */
1ceb70f8 2121 { PREFIX_TABLE (PREFIX_0FB8) },
ce518a5f 2122 { "ud2b", { XX } },
1ceb70f8 2123 { REG_TABLE (REG_0FBA) },
ce518a5f
L
2124 { "btcS", { Ev, Gv } },
2125 { "bsfS", { Gv, Ev } },
1ceb70f8 2126 { PREFIX_TABLE (PREFIX_0FBD) },
7c52e0e8
L
2127 { "movs{bR|x}", { Gv, Eb } },
2128 { "movs{wR|x}", { Gv, Ew } }, /* yes, there really is movsww ! */
252b5132 2129 /* c0 */
ce518a5f
L
2130 { "xaddB", { Eb, Gb } },
2131 { "xaddS", { Ev, Gv } },
1ceb70f8 2132 { PREFIX_TABLE (PREFIX_0FC2) },
4ee52178 2133 { PREFIX_TABLE (PREFIX_0FC3) },
ce518a5f
L
2134 { "pinsrw", { MX, Edqw, Ib } },
2135 { "pextrw", { Gdq, MS, Ib } },
09a2c6cf 2136 { "shufpX", { XM, EXx, Ib } },
1ceb70f8 2137 { REG_TABLE (REG_0FC7) },
252b5132 2138 /* c8 */
ce518a5f
L
2139 { "bswap", { RMeAX } },
2140 { "bswap", { RMeCX } },
2141 { "bswap", { RMeDX } },
2142 { "bswap", { RMeBX } },
2143 { "bswap", { RMeSP } },
2144 { "bswap", { RMeBP } },
2145 { "bswap", { RMeSI } },
2146 { "bswap", { RMeDI } },
252b5132 2147 /* d0 */
1ceb70f8 2148 { PREFIX_TABLE (PREFIX_0FD0) },
ce518a5f
L
2149 { "psrlw", { MX, EM } },
2150 { "psrld", { MX, EM } },
2151 { "psrlq", { MX, EM } },
2152 { "paddq", { MX, EM } },
2153 { "pmullw", { MX, EM } },
1ceb70f8 2154 { PREFIX_TABLE (PREFIX_0FD6) },
75c135a8 2155 { MOD_TABLE (MOD_0FD7) },
252b5132 2156 /* d8 */
ce518a5f
L
2157 { "psubusb", { MX, EM } },
2158 { "psubusw", { MX, EM } },
2159 { "pminub", { MX, EM } },
2160 { "pand", { MX, EM } },
2161 { "paddusb", { MX, EM } },
2162 { "paddusw", { MX, EM } },
2163 { "pmaxub", { MX, EM } },
2164 { "pandn", { MX, EM } },
252b5132 2165 /* e0 */
ce518a5f
L
2166 { "pavgb", { MX, EM } },
2167 { "psraw", { MX, EM } },
2168 { "psrad", { MX, EM } },
2169 { "pavgw", { MX, EM } },
2170 { "pmulhuw", { MX, EM } },
2171 { "pmulhw", { MX, EM } },
1ceb70f8
L
2172 { PREFIX_TABLE (PREFIX_0FE6) },
2173 { PREFIX_TABLE (PREFIX_0FE7) },
252b5132 2174 /* e8 */
ce518a5f
L
2175 { "psubsb", { MX, EM } },
2176 { "psubsw", { MX, EM } },
2177 { "pminsw", { MX, EM } },
2178 { "por", { MX, EM } },
2179 { "paddsb", { MX, EM } },
2180 { "paddsw", { MX, EM } },
2181 { "pmaxsw", { MX, EM } },
2182 { "pxor", { MX, EM } },
252b5132 2183 /* f0 */
1ceb70f8 2184 { PREFIX_TABLE (PREFIX_0FF0) },
ce518a5f
L
2185 { "psllw", { MX, EM } },
2186 { "pslld", { MX, EM } },
2187 { "psllq", { MX, EM } },
2188 { "pmuludq", { MX, EM } },
2189 { "pmaddwd", { MX, EM } },
2190 { "psadbw", { MX, EM } },
1ceb70f8 2191 { PREFIX_TABLE (PREFIX_0FF7) },
252b5132 2192 /* f8 */
ce518a5f
L
2193 { "psubb", { MX, EM } },
2194 { "psubw", { MX, EM } },
2195 { "psubd", { MX, EM } },
2196 { "psubq", { MX, EM } },
2197 { "paddb", { MX, EM } },
2198 { "paddw", { MX, EM } },
2199 { "paddd", { MX, EM } },
2200 { "(bad)", { XX } },
252b5132
RH
2201};
2202
2203static const unsigned char onebyte_has_modrm[256] = {
c608c12e
AM
2204 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2205 /* ------------------------------- */
2206 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
2207 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
2208 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
2209 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
2210 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
2211 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
2212 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
2213 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
2214 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
2215 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
2216 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
2217 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
2218 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
2219 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
2220 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
2221 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
2222 /* ------------------------------- */
2223 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
252b5132
RH
2224};
2225
2226static const unsigned char twobyte_has_modrm[256] = {
c608c12e
AM
2227 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2228 /* ------------------------------- */
252b5132 2229 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
b5b1fc4f 2230 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
85f10a01 2231 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
331d2d0d 2232 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
252b5132 2233 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
4bba6815
AM
2234 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
2235 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
85f10a01 2236 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
252b5132
RH
2237 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
2238 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
30d1c836 2239 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
050dfa73 2240 /* b0 */ 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, /* bf */
252b5132 2241 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
ca164297 2242 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
4bba6815 2243 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
ca164297 2244 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
c608c12e
AM
2245 /* ------------------------------- */
2246 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2247};
2248
252b5132
RH
2249static char obuf[100];
2250static char *obufp;
ea397f5b 2251static char *mnemonicendp;
252b5132
RH
2252static char scratchbuf[100];
2253static unsigned char *start_codep;
2254static unsigned char *insn_codep;
2255static unsigned char *codep;
f16cd0d5
L
2256static int last_lock_prefix;
2257static int last_repz_prefix;
2258static int last_repnz_prefix;
2259static int last_data_prefix;
2260static int last_addr_prefix;
2261static int last_rex_prefix;
2262static int last_seg_prefix;
2263#define MAX_CODE_LENGTH 15
2264/* We can up to 14 prefixes since the maximum instruction length is
2265 15bytes. */
2266static int all_prefixes[MAX_CODE_LENGTH - 1];
252b5132 2267static disassemble_info *the_info;
7967e09e
L
2268static struct
2269 {
2270 int mod;
7967e09e 2271 int reg;
484c222e 2272 int rm;
7967e09e
L
2273 }
2274modrm;
4bba6815 2275static unsigned char need_modrm;
c0f3af97
L
2276static struct
2277 {
2278 int register_specifier;
2279 int length;
2280 int prefix;
2281 int w;
2282 }
2283vex;
2284static unsigned char need_vex;
2285static unsigned char need_vex_reg;
dae39acc 2286static unsigned char vex_w_done;
252b5132 2287
ea397f5b
L
2288struct op
2289 {
2290 const char *name;
2291 unsigned int len;
2292 };
2293
4bba6815
AM
2294/* If we are accessing mod/rm/reg without need_modrm set, then the
2295 values are stale. Hitting this abort likely indicates that you
2296 need to update onebyte_has_modrm or twobyte_has_modrm. */
2297#define MODRM_CHECK if (!need_modrm) abort ()
2298
d708bcba
AM
2299static const char **names64;
2300static const char **names32;
2301static const char **names16;
2302static const char **names8;
2303static const char **names8rex;
2304static const char **names_seg;
db51cc60
L
2305static const char *index64;
2306static const char *index32;
d708bcba
AM
2307static const char **index16;
2308
2309static const char *intel_names64[] = {
2310 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
2311 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
2312};
2313static const char *intel_names32[] = {
2314 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
2315 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
2316};
2317static const char *intel_names16[] = {
2318 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
2319 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
2320};
2321static const char *intel_names8[] = {
2322 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
2323};
2324static const char *intel_names8rex[] = {
2325 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
2326 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
2327};
2328static const char *intel_names_seg[] = {
2329 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
2330};
db51cc60
L
2331static const char *intel_index64 = "riz";
2332static const char *intel_index32 = "eiz";
d708bcba
AM
2333static const char *intel_index16[] = {
2334 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
2335};
2336
2337static const char *att_names64[] = {
2338 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
52b15da3
JH
2339 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
2340};
d708bcba
AM
2341static const char *att_names32[] = {
2342 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
52b15da3 2343 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
252b5132 2344};
d708bcba
AM
2345static const char *att_names16[] = {
2346 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
52b15da3 2347 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
252b5132 2348};
d708bcba
AM
2349static const char *att_names8[] = {
2350 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
252b5132 2351};
d708bcba
AM
2352static const char *att_names8rex[] = {
2353 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
52b15da3
JH
2354 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
2355};
d708bcba
AM
2356static const char *att_names_seg[] = {
2357 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
252b5132 2358};
db51cc60
L
2359static const char *att_index64 = "%riz";
2360static const char *att_index32 = "%eiz";
d708bcba
AM
2361static const char *att_index16[] = {
2362 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
252b5132
RH
2363};
2364
b9733481
L
2365static const char **names_mm;
2366static const char *intel_names_mm[] = {
2367 "mm0", "mm1", "mm2", "mm3",
2368 "mm4", "mm5", "mm6", "mm7"
2369};
2370static const char *att_names_mm[] = {
2371 "%mm0", "%mm1", "%mm2", "%mm3",
2372 "%mm4", "%mm5", "%mm6", "%mm7"
2373};
2374
2375static const char **names_xmm;
2376static const char *intel_names_xmm[] = {
2377 "xmm0", "xmm1", "xmm2", "xmm3",
2378 "xmm4", "xmm5", "xmm6", "xmm7",
2379 "xmm8", "xmm9", "xmm10", "xmm11",
2380 "xmm12", "xmm13", "xmm14", "xmm15"
2381};
2382static const char *att_names_xmm[] = {
2383 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
2384 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
2385 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
2386 "%xmm12", "%xmm13", "%xmm14", "%xmm15"
2387};
2388
2389static const char **names_ymm;
2390static const char *intel_names_ymm[] = {
2391 "ymm0", "ymm1", "ymm2", "ymm3",
2392 "ymm4", "ymm5", "ymm6", "ymm7",
2393 "ymm8", "ymm9", "ymm10", "ymm11",
2394 "ymm12", "ymm13", "ymm14", "ymm15"
2395};
2396static const char *att_names_ymm[] = {
2397 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
2398 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
2399 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
2400 "%ymm12", "%ymm13", "%ymm14", "%ymm15"
2401};
2402
1ceb70f8
L
2403static const struct dis386 reg_table[][8] = {
2404 /* REG_80 */
252b5132 2405 {
ce518a5f
L
2406 { "addA", { Eb, Ib } },
2407 { "orA", { Eb, Ib } },
2408 { "adcA", { Eb, Ib } },
2409 { "sbbA", { Eb, Ib } },
2410 { "andA", { Eb, Ib } },
2411 { "subA", { Eb, Ib } },
2412 { "xorA", { Eb, Ib } },
2413 { "cmpA", { Eb, Ib } },
252b5132 2414 },
1ceb70f8 2415 /* REG_81 */
252b5132 2416 {
ce518a5f
L
2417 { "addQ", { Ev, Iv } },
2418 { "orQ", { Ev, Iv } },
2419 { "adcQ", { Ev, Iv } },
2420 { "sbbQ", { Ev, Iv } },
2421 { "andQ", { Ev, Iv } },
2422 { "subQ", { Ev, Iv } },
2423 { "xorQ", { Ev, Iv } },
2424 { "cmpQ", { Ev, Iv } },
252b5132 2425 },
1ceb70f8 2426 /* REG_82 */
252b5132 2427 {
ce518a5f
L
2428 { "addQ", { Ev, sIb } },
2429 { "orQ", { Ev, sIb } },
2430 { "adcQ", { Ev, sIb } },
2431 { "sbbQ", { Ev, sIb } },
2432 { "andQ", { Ev, sIb } },
2433 { "subQ", { Ev, sIb } },
2434 { "xorQ", { Ev, sIb } },
2435 { "cmpQ", { Ev, sIb } },
252b5132 2436 },
1ceb70f8 2437 /* REG_8F */
4e7d34a6
L
2438 {
2439 { "popU", { stackEv } },
c48244a5 2440 { XOP_8F_TABLE (XOP_09) },
4e7d34a6
L
2441 { "(bad)", { XX } },
2442 { "(bad)", { XX } },
2443 { "(bad)", { XX } },
f88c9eb0 2444 { XOP_8F_TABLE (XOP_09) },
4e7d34a6
L
2445 { "(bad)", { XX } },
2446 { "(bad)", { XX } },
2447 },
1ceb70f8 2448 /* REG_C0 */
252b5132 2449 {
ce518a5f
L
2450 { "rolA", { Eb, Ib } },
2451 { "rorA", { Eb, Ib } },
2452 { "rclA", { Eb, Ib } },
2453 { "rcrA", { Eb, Ib } },
2454 { "shlA", { Eb, Ib } },
2455 { "shrA", { Eb, Ib } },
2456 { "(bad)", { XX } },
2457 { "sarA", { Eb, Ib } },
252b5132 2458 },
1ceb70f8 2459 /* REG_C1 */
252b5132 2460 {
ce518a5f
L
2461 { "rolQ", { Ev, Ib } },
2462 { "rorQ", { Ev, Ib } },
2463 { "rclQ", { Ev, Ib } },
2464 { "rcrQ", { Ev, Ib } },
2465 { "shlQ", { Ev, Ib } },
2466 { "shrQ", { Ev, Ib } },
2467 { "(bad)", { XX } },
2468 { "sarQ", { Ev, Ib } },
252b5132 2469 },
1ceb70f8 2470 /* REG_C6 */
4e7d34a6
L
2471 {
2472 { "movA", { Eb, Ib } },
2473 { "(bad)", { XX } },
2474 { "(bad)", { XX } },
2475 { "(bad)", { XX } },
2476 { "(bad)", { XX } },
2477 { "(bad)", { XX } },
2478 { "(bad)", { XX } },
2479 { "(bad)", { XX } },
2480 },
1ceb70f8 2481 /* REG_C7 */
4e7d34a6
L
2482 {
2483 { "movQ", { Ev, Iv } },
2484 { "(bad)", { XX } },
2485 { "(bad)", { XX } },
2486 { "(bad)", { XX } },
2487 { "(bad)", { XX } },
2488 { "(bad)", { XX } },
2489 { "(bad)", { XX } },
2490 { "(bad)", { XX } },
2491 },
1ceb70f8 2492 /* REG_D0 */
252b5132 2493 {
ce518a5f
L
2494 { "rolA", { Eb, I1 } },
2495 { "rorA", { Eb, I1 } },
2496 { "rclA", { Eb, I1 } },
2497 { "rcrA", { Eb, I1 } },
2498 { "shlA", { Eb, I1 } },
2499 { "shrA", { Eb, I1 } },
2500 { "(bad)", { XX } },
2501 { "sarA", { Eb, I1 } },
252b5132 2502 },
1ceb70f8 2503 /* REG_D1 */
252b5132 2504 {
ce518a5f
L
2505 { "rolQ", { Ev, I1 } },
2506 { "rorQ", { Ev, I1 } },
2507 { "rclQ", { Ev, I1 } },
2508 { "rcrQ", { Ev, I1 } },
2509 { "shlQ", { Ev, I1 } },
2510 { "shrQ", { Ev, I1 } },
2511 { "(bad)", { XX } },
2512 { "sarQ", { Ev, I1 } },
252b5132 2513 },
1ceb70f8 2514 /* REG_D2 */
252b5132 2515 {
ce518a5f
L
2516 { "rolA", { Eb, CL } },
2517 { "rorA", { Eb, CL } },
2518 { "rclA", { Eb, CL } },
2519 { "rcrA", { Eb, CL } },
2520 { "shlA", { Eb, CL } },
2521 { "shrA", { Eb, CL } },
2522 { "(bad)", { XX } },
2523 { "sarA", { Eb, CL } },
252b5132 2524 },
1ceb70f8 2525 /* REG_D3 */
252b5132 2526 {
ce518a5f
L
2527 { "rolQ", { Ev, CL } },
2528 { "rorQ", { Ev, CL } },
2529 { "rclQ", { Ev, CL } },
2530 { "rcrQ", { Ev, CL } },
2531 { "shlQ", { Ev, CL } },
2532 { "shrQ", { Ev, CL } },
2533 { "(bad)", { XX } },
2534 { "sarQ", { Ev, CL } },
252b5132 2535 },
1ceb70f8 2536 /* REG_F6 */
252b5132 2537 {
ce518a5f 2538 { "testA", { Eb, Ib } },
058f233b 2539 { "(bad)", { XX } },
ce518a5f
L
2540 { "notA", { Eb } },
2541 { "negA", { Eb } },
2542 { "mulA", { Eb } }, /* Don't print the implicit %al register, */
2543 { "imulA", { Eb } }, /* to distinguish these opcodes from other */
2544 { "divA", { Eb } }, /* mul/imul opcodes. Do the same for div */
2545 { "idivA", { Eb } }, /* and idiv for consistency. */
252b5132 2546 },
1ceb70f8 2547 /* REG_F7 */
252b5132 2548 {
ce518a5f
L
2549 { "testQ", { Ev, Iv } },
2550 { "(bad)", { XX } },
2551 { "notQ", { Ev } },
2552 { "negQ", { Ev } },
2553 { "mulQ", { Ev } }, /* Don't print the implicit register. */
2554 { "imulQ", { Ev } },
2555 { "divQ", { Ev } },
2556 { "idivQ", { Ev } },
252b5132 2557 },
1ceb70f8 2558 /* REG_FE */
252b5132 2559 {
ce518a5f
L
2560 { "incA", { Eb } },
2561 { "decA", { Eb } },
2562 { "(bad)", { XX } },
2563 { "(bad)", { XX } },
2564 { "(bad)", { XX } },
2565 { "(bad)", { XX } },
2566 { "(bad)", { XX } },
2567 { "(bad)", { XX } },
252b5132 2568 },
1ceb70f8 2569 /* REG_FF */
252b5132 2570 {
ce518a5f
L
2571 { "incQ", { Ev } },
2572 { "decQ", { Ev } },
2573 { "callT", { indirEv } },
2574 { "JcallT", { indirEp } },
2575 { "jmpT", { indirEv } },
2576 { "JjmpT", { indirEp } },
2577 { "pushU", { stackEv } },
2578 { "(bad)", { XX } },
252b5132 2579 },
1ceb70f8 2580 /* REG_0F00 */
252b5132 2581 {
ce518a5f
L
2582 { "sldtD", { Sv } },
2583 { "strD", { Sv } },
2584 { "lldt", { Ew } },
2585 { "ltr", { Ew } },
2586 { "verr", { Ew } },
2587 { "verw", { Ew } },
2588 { "(bad)", { XX } },
2589 { "(bad)", { XX } },
252b5132 2590 },
1ceb70f8 2591 /* REG_0F01 */
252b5132 2592 {
1ceb70f8
L
2593 { MOD_TABLE (MOD_0F01_REG_0) },
2594 { MOD_TABLE (MOD_0F01_REG_1) },
2595 { MOD_TABLE (MOD_0F01_REG_2) },
2596 { MOD_TABLE (MOD_0F01_REG_3) },
ce518a5f
L
2597 { "smswD", { Sv } },
2598 { "(bad)", { XX } },
2599 { "lmsw", { Ew } },
1ceb70f8 2600 { MOD_TABLE (MOD_0F01_REG_7) },
252b5132 2601 },
b5b1fc4f 2602 /* REG_0F0D */
252b5132 2603 {
4e7d34a6
L
2604 { "prefetch", { Eb } },
2605 { "prefetchw", { Eb } },
2606 { "(bad)", { XX } },
2607 { "(bad)", { XX } },
2608 { "(bad)", { XX } },
2609 { "(bad)", { XX } },
2610 { "(bad)", { XX } },
2611 { "(bad)", { XX } },
252b5132 2612 },
1ceb70f8 2613 /* REG_0F18 */
252b5132 2614 {
1ceb70f8
L
2615 { MOD_TABLE (MOD_0F18_REG_0) },
2616 { MOD_TABLE (MOD_0F18_REG_1) },
2617 { MOD_TABLE (MOD_0F18_REG_2) },
2618 { MOD_TABLE (MOD_0F18_REG_3) },
ce518a5f
L
2619 { "(bad)", { XX } },
2620 { "(bad)", { XX } },
2621 { "(bad)", { XX } },
2622 { "(bad)", { XX } },
252b5132 2623 },
1ceb70f8 2624 /* REG_0F71 */
a6bd098c 2625 {
ce518a5f
L
2626 { "(bad)", { XX } },
2627 { "(bad)", { XX } },
1ceb70f8 2628 { MOD_TABLE (MOD_0F71_REG_2) },
ce518a5f 2629 { "(bad)", { XX } },
1ceb70f8 2630 { MOD_TABLE (MOD_0F71_REG_4) },
ce518a5f 2631 { "(bad)", { XX } },
1ceb70f8 2632 { MOD_TABLE (MOD_0F71_REG_6) },
ce518a5f 2633 { "(bad)", { XX } },
a6bd098c 2634 },
1ceb70f8 2635 /* REG_0F72 */
a6bd098c 2636 {
ce518a5f
L
2637 { "(bad)", { XX } },
2638 { "(bad)", { XX } },
1ceb70f8 2639 { MOD_TABLE (MOD_0F72_REG_2) },
ce518a5f 2640 { "(bad)", { XX } },
1ceb70f8 2641 { MOD_TABLE (MOD_0F72_REG_4) },
ce518a5f 2642 { "(bad)", { XX } },
1ceb70f8 2643 { MOD_TABLE (MOD_0F72_REG_6) },
ce518a5f 2644 { "(bad)", { XX } },
a6bd098c 2645 },
1ceb70f8 2646 /* REG_0F73 */
252b5132 2647 {
ce518a5f
L
2648 { "(bad)", { XX } },
2649 { "(bad)", { XX } },
1ceb70f8
L
2650 { MOD_TABLE (MOD_0F73_REG_2) },
2651 { MOD_TABLE (MOD_0F73_REG_3) },
ce518a5f 2652 { "(bad)", { XX } },
ce518a5f 2653 { "(bad)", { XX } },
1ceb70f8
L
2654 { MOD_TABLE (MOD_0F73_REG_6) },
2655 { MOD_TABLE (MOD_0F73_REG_7) },
252b5132 2656 },
1ceb70f8 2657 /* REG_0FA6 */
252b5132 2658 {
4e7d34a6
L
2659 { "montmul", { { OP_0f07, 0 } } },
2660 { "xsha1", { { OP_0f07, 0 } } },
2661 { "xsha256", { { OP_0f07, 0 } } },
2662 { "(bad)", { { OP_0f07, 0 } } },
2663 { "(bad)", { { OP_0f07, 0 } } },
2664 { "(bad)", { { OP_0f07, 0 } } },
2665 { "(bad)", { { OP_0f07, 0 } } },
2666 { "(bad)", { { OP_0f07, 0 } } },
2667 },
1ceb70f8 2668 /* REG_0FA7 */
4e7d34a6
L
2669 {
2670 { "xstore-rng", { { OP_0f07, 0 } } },
2671 { "xcrypt-ecb", { { OP_0f07, 0 } } },
2672 { "xcrypt-cbc", { { OP_0f07, 0 } } },
2673 { "xcrypt-ctr", { { OP_0f07, 0 } } },
2674 { "xcrypt-cfb", { { OP_0f07, 0 } } },
2675 { "xcrypt-ofb", { { OP_0f07, 0 } } },
2676 { "(bad)", { { OP_0f07, 0 } } },
2677 { "(bad)", { { OP_0f07, 0 } } },
2678 },
1ceb70f8 2679 /* REG_0FAE */
4e7d34a6 2680 {
1ceb70f8
L
2681 { MOD_TABLE (MOD_0FAE_REG_0) },
2682 { MOD_TABLE (MOD_0FAE_REG_1) },
2683 { MOD_TABLE (MOD_0FAE_REG_2) },
2684 { MOD_TABLE (MOD_0FAE_REG_3) },
475a2301 2685 { MOD_TABLE (MOD_0FAE_REG_4) },
1ceb70f8
L
2686 { MOD_TABLE (MOD_0FAE_REG_5) },
2687 { MOD_TABLE (MOD_0FAE_REG_6) },
2688 { MOD_TABLE (MOD_0FAE_REG_7) },
252b5132 2689 },
1ceb70f8 2690 /* REG_0FBA */
252b5132 2691 {
ce518a5f
L
2692 { "(bad)", { XX } },
2693 { "(bad)", { XX } },
d8faab4e
L
2694 { "(bad)", { XX } },
2695 { "(bad)", { XX } },
4e7d34a6
L
2696 { "btQ", { Ev, Ib } },
2697 { "btsQ", { Ev, Ib } },
2698 { "btrQ", { Ev, Ib } },
2699 { "btcQ", { Ev, Ib } },
c608c12e 2700 },
1ceb70f8 2701 /* REG_0FC7 */
c608c12e 2702 {
b844680a 2703 { "(bad)", { XX } },
4e7d34a6 2704 { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } } },
d8faab4e 2705 { "(bad)", { XX } },
b844680a
L
2706 { "(bad)", { XX } },
2707 { "(bad)", { XX } },
2708 { "(bad)", { XX } },
1ceb70f8
L
2709 { MOD_TABLE (MOD_0FC7_REG_6) },
2710 { MOD_TABLE (MOD_0FC7_REG_7) },
252b5132 2711 },
c0f3af97
L
2712 /* REG_VEX_71 */
2713 {
2714 { "(bad)", { XX } },
2715 { "(bad)", { XX } },
2716 { MOD_TABLE (MOD_VEX_71_REG_2) },
2717 { "(bad)", { XX } },
2718 { MOD_TABLE (MOD_VEX_71_REG_4) },
2719 { "(bad)", { XX } },
2720 { MOD_TABLE (MOD_VEX_71_REG_6) },
2721 { "(bad)", { XX } },
2722 },
2723 /* REG_VEX_72 */
2724 {
2725 { "(bad)", { XX } },
2726 { "(bad)", { XX } },
2727 { MOD_TABLE (MOD_VEX_72_REG_2) },
2728 { "(bad)", { XX } },
2729 { MOD_TABLE (MOD_VEX_72_REG_4) },
2730 { "(bad)", { XX } },
2731 { MOD_TABLE (MOD_VEX_72_REG_6) },
2732 { "(bad)", { XX } },
2733 },
2734 /* REG_VEX_73 */
2735 {
2736 { "(bad)", { XX } },
2737 { "(bad)", { XX } },
2738 { MOD_TABLE (MOD_VEX_73_REG_2) },
2739 { MOD_TABLE (MOD_VEX_73_REG_3) },
2740 { "(bad)", { XX } },
2741 { "(bad)", { XX } },
2742 { MOD_TABLE (MOD_VEX_73_REG_6) },
2743 { MOD_TABLE (MOD_VEX_73_REG_7) },
2744 },
2745 /* REG_VEX_AE */
2746 {
2747 { "(bad)", { XX } },
2748 { "(bad)", { XX } },
2749 { MOD_TABLE (MOD_VEX_AE_REG_2) },
2750 { MOD_TABLE (MOD_VEX_AE_REG_3) },
2751 { "(bad)", { XX } },
2752 { "(bad)", { XX } },
2753 { "(bad)", { XX } },
2754 { "(bad)", { XX } },
2755 },
f88c9eb0
SP
2756 /* REG_XOP_LWPCB */
2757 {
2758 { "llwpcb", { { OP_LWPCB_E, 0 } } },
2759 { "slwpcb", { { OP_LWPCB_E, 0 } } },
2760 { "(bad)", { XX } },
2761 { "(bad)", { XX } },
2762 { "(bad)", { XX } },
2763 { "(bad)", { XX } },
2764 { "(bad)", { XX } },
2765 { "(bad)", { XX } },
2766 },
2767 /* REG_XOP_LWP */
2768 {
2769 { "lwpins", { { OP_LWP_E, 0 }, Ed, { OP_LWP_I, 0 } } },
2770 { "lwpval", { { OP_LWP_E, 0 }, Ed, { OP_LWP_I, 0 } } },
2771 { "(bad)", { XX } },
2772 { "(bad)", { XX } },
2773 { "(bad)", { XX } },
2774 { "(bad)", { XX } },
2775 { "(bad)", { XX } },
2776 { "(bad)", { XX } },
2777 },
4e7d34a6
L
2778};
2779
1ceb70f8
L
2780static const struct dis386 prefix_table[][4] = {
2781 /* PREFIX_90 */
252b5132 2782 {
4e7d34a6
L
2783 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
2784 { "pause", { XX } },
2785 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
2786 { "(bad)", { XX } },
0f10071e 2787 },
4e7d34a6 2788
1ceb70f8 2789 /* PREFIX_0F10 */
cc0ec051 2790 {
4e7d34a6
L
2791 { "movups", { XM, EXx } },
2792 { "movss", { XM, EXd } },
2793 { "movupd", { XM, EXx } },
2794 { "movsd", { XM, EXq } },
30d1c836 2795 },
4e7d34a6 2796
1ceb70f8 2797 /* PREFIX_0F11 */
30d1c836 2798 {
b6169b20 2799 { "movups", { EXxS, XM } },
fa99fab2 2800 { "movss", { EXdS, XM } },
b6169b20 2801 { "movupd", { EXxS, XM } },
fa99fab2 2802 { "movsd", { EXqS, XM } },
4e7d34a6 2803 },
252b5132 2804
1ceb70f8 2805 /* PREFIX_0F12 */
c608c12e 2806 {
1ceb70f8 2807 { MOD_TABLE (MOD_0F12_PREFIX_0) },
4e7d34a6
L
2808 { "movsldup", { XM, EXx } },
2809 { "movlpd", { XM, EXq } },
2810 { "movddup", { XM, EXq } },
c608c12e 2811 },
4e7d34a6 2812
1ceb70f8 2813 /* PREFIX_0F16 */
c608c12e 2814 {
1ceb70f8 2815 { MOD_TABLE (MOD_0F16_PREFIX_0) },
4e7d34a6
L
2816 { "movshdup", { XM, EXx } },
2817 { "movhpd", { XM, EXq } },
058f233b 2818 { "(bad)", { XX } },
c608c12e 2819 },
4e7d34a6 2820
1ceb70f8 2821 /* PREFIX_0F2A */
c608c12e 2822 {
09335d05 2823 { "cvtpi2ps", { XM, EMCq } },
98b528ac 2824 { "cvtsi2ss%LQ", { XM, Ev } },
09335d05 2825 { "cvtpi2pd", { XM, EMCq } },
98b528ac 2826 { "cvtsi2sd%LQ", { XM, Ev } },
c608c12e 2827 },
4e7d34a6 2828
1ceb70f8 2829 /* PREFIX_0F2B */
c608c12e 2830 {
75c135a8
L
2831 { MOD_TABLE (MOD_0F2B_PREFIX_0) },
2832 { MOD_TABLE (MOD_0F2B_PREFIX_1) },
2833 { MOD_TABLE (MOD_0F2B_PREFIX_2) },
2834 { MOD_TABLE (MOD_0F2B_PREFIX_3) },
c608c12e 2835 },
4e7d34a6 2836
1ceb70f8 2837 /* PREFIX_0F2C */
c608c12e 2838 {
09335d05
L
2839 { "cvttps2pi", { MXC, EXq } },
2840 { "cvttss2siY", { Gv, EXd } },
09a2c6cf 2841 { "cvttpd2pi", { MXC, EXx } },
09335d05 2842 { "cvttsd2siY", { Gv, EXq } },
c608c12e 2843 },
4e7d34a6 2844
1ceb70f8 2845 /* PREFIX_0F2D */
c608c12e 2846 {
4e7d34a6
L
2847 { "cvtps2pi", { MXC, EXq } },
2848 { "cvtss2siY", { Gv, EXd } },
2849 { "cvtpd2pi", { MXC, EXx } },
2850 { "cvtsd2siY", { Gv, EXq } },
c608c12e 2851 },
4e7d34a6 2852
1ceb70f8 2853 /* PREFIX_0F2E */
c608c12e 2854 {
4e7d34a6
L
2855 { "ucomiss",{ XM, EXd } },
2856 { "(bad)", { XX } },
2857 { "ucomisd",{ XM, EXq } },
2858 { "(bad)", { XX } },
c608c12e 2859 },
4e7d34a6 2860
1ceb70f8 2861 /* PREFIX_0F2F */
c608c12e 2862 {
4e7d34a6
L
2863 { "comiss", { XM, EXd } },
2864 { "(bad)", { XX } },
2865 { "comisd", { XM, EXq } },
2866 { "(bad)", { XX } },
c608c12e 2867 },
4e7d34a6 2868
1ceb70f8 2869 /* PREFIX_0F51 */
c608c12e 2870 {
4e7d34a6
L
2871 { "sqrtps", { XM, EXx } },
2872 { "sqrtss", { XM, EXd } },
2873 { "sqrtpd", { XM, EXx } },
2874 { "sqrtsd", { XM, EXq } },
c608c12e 2875 },
4e7d34a6 2876
1ceb70f8 2877 /* PREFIX_0F52 */
c608c12e 2878 {
4e7d34a6
L
2879 { "rsqrtps",{ XM, EXx } },
2880 { "rsqrtss",{ XM, EXd } },
058f233b
L
2881 { "(bad)", { XX } },
2882 { "(bad)", { XX } },
c608c12e 2883 },
4e7d34a6 2884
1ceb70f8 2885 /* PREFIX_0F53 */
c608c12e 2886 {
4e7d34a6
L
2887 { "rcpps", { XM, EXx } },
2888 { "rcpss", { XM, EXd } },
058f233b
L
2889 { "(bad)", { XX } },
2890 { "(bad)", { XX } },
c608c12e 2891 },
4e7d34a6 2892
1ceb70f8 2893 /* PREFIX_0F58 */
c608c12e 2894 {
4e7d34a6
L
2895 { "addps", { XM, EXx } },
2896 { "addss", { XM, EXd } },
2897 { "addpd", { XM, EXx } },
2898 { "addsd", { XM, EXq } },
c608c12e 2899 },
4e7d34a6 2900
1ceb70f8 2901 /* PREFIX_0F59 */
c608c12e 2902 {
4e7d34a6
L
2903 { "mulps", { XM, EXx } },
2904 { "mulss", { XM, EXd } },
2905 { "mulpd", { XM, EXx } },
2906 { "mulsd", { XM, EXq } },
041bd2e0 2907 },
4e7d34a6 2908
1ceb70f8 2909 /* PREFIX_0F5A */
041bd2e0 2910 {
4e7d34a6
L
2911 { "cvtps2pd", { XM, EXq } },
2912 { "cvtss2sd", { XM, EXd } },
2913 { "cvtpd2ps", { XM, EXx } },
2914 { "cvtsd2ss", { XM, EXq } },
041bd2e0 2915 },
4e7d34a6 2916
1ceb70f8 2917 /* PREFIX_0F5B */
041bd2e0 2918 {
09a2c6cf
L
2919 { "cvtdq2ps", { XM, EXx } },
2920 { "cvttps2dq", { XM, EXx } },
2921 { "cvtps2dq", { XM, EXx } },
058f233b 2922 { "(bad)", { XX } },
041bd2e0 2923 },
4e7d34a6 2924
1ceb70f8 2925 /* PREFIX_0F5C */
041bd2e0 2926 {
4e7d34a6
L
2927 { "subps", { XM, EXx } },
2928 { "subss", { XM, EXd } },
2929 { "subpd", { XM, EXx } },
2930 { "subsd", { XM, EXq } },
041bd2e0 2931 },
4e7d34a6 2932
1ceb70f8 2933 /* PREFIX_0F5D */
041bd2e0 2934 {
4e7d34a6
L
2935 { "minps", { XM, EXx } },
2936 { "minss", { XM, EXd } },
2937 { "minpd", { XM, EXx } },
2938 { "minsd", { XM, EXq } },
041bd2e0 2939 },
4e7d34a6 2940
1ceb70f8 2941 /* PREFIX_0F5E */
041bd2e0 2942 {
4e7d34a6
L
2943 { "divps", { XM, EXx } },
2944 { "divss", { XM, EXd } },
2945 { "divpd", { XM, EXx } },
2946 { "divsd", { XM, EXq } },
041bd2e0 2947 },
4e7d34a6 2948
1ceb70f8 2949 /* PREFIX_0F5F */
041bd2e0 2950 {
4e7d34a6
L
2951 { "maxps", { XM, EXx } },
2952 { "maxss", { XM, EXd } },
2953 { "maxpd", { XM, EXx } },
2954 { "maxsd", { XM, EXq } },
041bd2e0 2955 },
4e7d34a6 2956
1ceb70f8 2957 /* PREFIX_0F60 */
041bd2e0 2958 {
4e7d34a6
L
2959 { "punpcklbw",{ MX, EMd } },
2960 { "(bad)", { XX } },
2961 { "punpcklbw",{ MX, EMx } },
2962 { "(bad)", { XX } },
041bd2e0 2963 },
4e7d34a6 2964
1ceb70f8 2965 /* PREFIX_0F61 */
041bd2e0 2966 {
4e7d34a6
L
2967 { "punpcklwd",{ MX, EMd } },
2968 { "(bad)", { XX } },
2969 { "punpcklwd",{ MX, EMx } },
2970 { "(bad)", { XX } },
041bd2e0 2971 },
4e7d34a6 2972
1ceb70f8 2973 /* PREFIX_0F62 */
041bd2e0 2974 {
4e7d34a6
L
2975 { "punpckldq",{ MX, EMd } },
2976 { "(bad)", { XX } },
2977 { "punpckldq",{ MX, EMx } },
2978 { "(bad)", { XX } },
041bd2e0 2979 },
4e7d34a6 2980
1ceb70f8 2981 /* PREFIX_0F6C */
041bd2e0 2982 {
058f233b
L
2983 { "(bad)", { XX } },
2984 { "(bad)", { XX } },
4e7d34a6 2985 { "punpcklqdq", { XM, EXx } },
058f233b 2986 { "(bad)", { XX } },
0f17484f 2987 },
4e7d34a6 2988
1ceb70f8 2989 /* PREFIX_0F6D */
0f17484f 2990 {
058f233b
L
2991 { "(bad)", { XX } },
2992 { "(bad)", { XX } },
4e7d34a6 2993 { "punpckhqdq", { XM, EXx } },
058f233b 2994 { "(bad)", { XX } },
041bd2e0 2995 },
4e7d34a6 2996
1ceb70f8 2997 /* PREFIX_0F6F */
ca164297 2998 {
4e7d34a6
L
2999 { "movq", { MX, EM } },
3000 { "movdqu", { XM, EXx } },
3001 { "movdqa", { XM, EXx } },
058f233b 3002 { "(bad)", { XX } },
ca164297 3003 },
4e7d34a6 3004
1ceb70f8 3005 /* PREFIX_0F70 */
4e7d34a6
L
3006 {
3007 { "pshufw", { MX, EM, Ib } },
3008 { "pshufhw",{ XM, EXx, Ib } },
3009 { "pshufd", { XM, EXx, Ib } },
3010 { "pshuflw",{ XM, EXx, Ib } },
3011 },
3012
92fddf8e
L
3013 /* PREFIX_0F73_REG_3 */
3014 {
3015 { "(bad)", { XX } },
3016 { "(bad)", { XX } },
3017 { "psrldq", { XS, Ib } },
3018 { "(bad)", { XX } },
3019 },
3020
3021 /* PREFIX_0F73_REG_7 */
3022 {
3023 { "(bad)", { XX } },
3024 { "(bad)", { XX } },
3025 { "pslldq", { XS, Ib } },
3026 { "(bad)", { XX } },
3027 },
3028
1ceb70f8 3029 /* PREFIX_0F78 */
4e7d34a6
L
3030 {
3031 {"vmread", { Em, Gm } },
3032 {"(bad)", { XX } },
3033 {"extrq", { XS, Ib, Ib } },
3034 {"insertq", { XM, XS, Ib, Ib } },
3035 },
3036
1ceb70f8 3037 /* PREFIX_0F79 */
4e7d34a6
L
3038 {
3039 {"vmwrite", { Gm, Em } },
3040 {"(bad)", { XX } },
3041 {"extrq", { XM, XS } },
3042 {"insertq", { XM, XS } },
3043 },
3044
1ceb70f8 3045 /* PREFIX_0F7C */
ca164297 3046 {
058f233b
L
3047 { "(bad)", { XX } },
3048 { "(bad)", { XX } },
09a2c6cf
L
3049 { "haddpd", { XM, EXx } },
3050 { "haddps", { XM, EXx } },
ca164297 3051 },
4e7d34a6 3052
1ceb70f8 3053 /* PREFIX_0F7D */
ca164297 3054 {
058f233b
L
3055 { "(bad)", { XX } },
3056 { "(bad)", { XX } },
09a2c6cf
L
3057 { "hsubpd", { XM, EXx } },
3058 { "hsubps", { XM, EXx } },
ca164297 3059 },
4e7d34a6 3060
1ceb70f8 3061 /* PREFIX_0F7E */
ca164297 3062 {
4e7d34a6
L
3063 { "movK", { Edq, MX } },
3064 { "movq", { XM, EXq } },
3065 { "movK", { Edq, XM } },
058f233b 3066 { "(bad)", { XX } },
ca164297 3067 },
4e7d34a6 3068
1ceb70f8 3069 /* PREFIX_0F7F */
ca164297 3070 {
b6169b20
L
3071 { "movq", { EMS, MX } },
3072 { "movdqu", { EXxS, XM } },
3073 { "movdqa", { EXxS, XM } },
058f233b 3074 { "(bad)", { XX } },
ca164297 3075 },
4e7d34a6 3076
1ceb70f8 3077 /* PREFIX_0FB8 */
ca164297 3078 {
4e7d34a6
L
3079 { "(bad)", { XX } },
3080 { "popcntS", { Gv, Ev } },
3081 { "(bad)", { XX } },
3082 { "(bad)", { XX } },
ca164297 3083 },
4e7d34a6 3084
1ceb70f8 3085 /* PREFIX_0FBD */
050dfa73 3086 {
4e7d34a6
L
3087 { "bsrS", { Gv, Ev } },
3088 { "lzcntS", { Gv, Ev } },
3089 { "bsrS", { Gv, Ev } },
3090 { "(bad)", { XX } },
050dfa73
MM
3091 },
3092
1ceb70f8 3093 /* PREFIX_0FC2 */
050dfa73 3094 {
ad19981d
L
3095 { "cmpps", { XM, EXx, CMP } },
3096 { "cmpss", { XM, EXd, CMP } },
3097 { "cmppd", { XM, EXx, CMP } },
3098 { "cmpsd", { XM, EXq, CMP } },
050dfa73 3099 },
246c51aa 3100
4ee52178
L
3101 /* PREFIX_0FC3 */
3102 {
3103 { "movntiS", { Ma, Gv } },
3104 { "(bad)", { XX } },
3105 { "(bad)", { XX } },
3106 { "(bad)", { XX } },
3107 },
3108
92fddf8e
L
3109 /* PREFIX_0FC7_REG_6 */
3110 {
3111 { "vmptrld",{ Mq } },
3112 { "vmxon", { Mq } },
3113 { "vmclear",{ Mq } },
3114 { "(bad)", { XX } },
3115 },
3116
1ceb70f8 3117 /* PREFIX_0FD0 */
050dfa73 3118 {
058f233b
L
3119 { "(bad)", { XX } },
3120 { "(bad)", { XX } },
4e7d34a6
L
3121 { "addsubpd", { XM, EXx } },
3122 { "addsubps", { XM, EXx } },
246c51aa 3123 },
050dfa73 3124
1ceb70f8 3125 /* PREFIX_0FD6 */
050dfa73 3126 {
058f233b 3127 { "(bad)", { XX } },
4e7d34a6 3128 { "movq2dq",{ XM, MS } },
b6169b20 3129 { "movq", { EXqS, XM } },
4e7d34a6 3130 { "movdq2q",{ MX, XS } },
050dfa73
MM
3131 },
3132
1ceb70f8 3133 /* PREFIX_0FE6 */
7918206c 3134 {
058f233b 3135 { "(bad)", { XX } },
4e7d34a6
L
3136 { "cvtdq2pd", { XM, EXq } },
3137 { "cvttpd2dq", { XM, EXx } },
3138 { "cvtpd2dq", { XM, EXx } },
7918206c 3139 },
8b38ad71 3140
1ceb70f8 3141 /* PREFIX_0FE7 */
8b38ad71 3142 {
4ee52178 3143 { "movntq", { Mq, MX } },
058f233b 3144 { "(bad)", { XX } },
75c135a8 3145 { MOD_TABLE (MOD_0FE7_PREFIX_2) },
058f233b 3146 { "(bad)", { XX } },
4e7d34a6
L
3147 },
3148
1ceb70f8 3149 /* PREFIX_0FF0 */
4e7d34a6 3150 {
058f233b
L
3151 { "(bad)", { XX } },
3152 { "(bad)", { XX } },
3153 { "(bad)", { XX } },
1ceb70f8 3154 { MOD_TABLE (MOD_0FF0_PREFIX_3) },
4e7d34a6
L
3155 },
3156
1ceb70f8 3157 /* PREFIX_0FF7 */
4e7d34a6
L
3158 {
3159 { "maskmovq", { MX, MS } },
058f233b 3160 { "(bad)", { XX } },
4e7d34a6 3161 { "maskmovdqu", { XM, XS } },
058f233b 3162 { "(bad)", { XX } },
8b38ad71 3163 },
42903f7f 3164
1ceb70f8 3165 /* PREFIX_0F3810 */
42903f7f
L
3166 {
3167 { "(bad)", { XX } },
3168 { "(bad)", { XX } },
88a94849 3169 { "pblendvb", { XM, EXx, XMM0 } },
42903f7f
L
3170 { "(bad)", { XX } },
3171 },
3172
1ceb70f8 3173 /* PREFIX_0F3814 */
42903f7f
L
3174 {
3175 { "(bad)", { XX } },
3176 { "(bad)", { XX } },
88a94849 3177 { "blendvps", { XM, EXx, XMM0 } },
42903f7f
L
3178 { "(bad)", { XX } },
3179 },
3180
1ceb70f8 3181 /* PREFIX_0F3815 */
42903f7f
L
3182 {
3183 { "(bad)", { XX } },
3184 { "(bad)", { XX } },
09a2c6cf 3185 { "blendvpd", { XM, EXx, XMM0 } },
42903f7f
L
3186 { "(bad)", { XX } },
3187 },
3188
1ceb70f8 3189 /* PREFIX_0F3817 */
42903f7f
L
3190 {
3191 { "(bad)", { XX } },
3192 { "(bad)", { XX } },
09a2c6cf 3193 { "ptest", { XM, EXx } },
42903f7f
L
3194 { "(bad)", { XX } },
3195 },
3196
1ceb70f8 3197 /* PREFIX_0F3820 */
42903f7f
L
3198 {
3199 { "(bad)", { XX } },
3200 { "(bad)", { XX } },
8976381e 3201 { "pmovsxbw", { XM, EXq } },
42903f7f
L
3202 { "(bad)", { XX } },
3203 },
3204
1ceb70f8 3205 /* PREFIX_0F3821 */
42903f7f
L
3206 {
3207 { "(bad)", { XX } },
3208 { "(bad)", { XX } },
8976381e 3209 { "pmovsxbd", { XM, EXd } },
42903f7f
L
3210 { "(bad)", { XX } },
3211 },
3212
1ceb70f8 3213 /* PREFIX_0F3822 */
42903f7f
L
3214 {
3215 { "(bad)", { XX } },
3216 { "(bad)", { XX } },
8976381e 3217 { "pmovsxbq", { XM, EXw } },
42903f7f
L
3218 { "(bad)", { XX } },
3219 },
3220
1ceb70f8 3221 /* PREFIX_0F3823 */
42903f7f
L
3222 {
3223 { "(bad)", { XX } },
3224 { "(bad)", { XX } },
8976381e 3225 { "pmovsxwd", { XM, EXq } },
42903f7f
L
3226 { "(bad)", { XX } },
3227 },
3228
1ceb70f8 3229 /* PREFIX_0F3824 */
42903f7f
L
3230 {
3231 { "(bad)", { XX } },
3232 { "(bad)", { XX } },
8976381e 3233 { "pmovsxwq", { XM, EXd } },
42903f7f
L
3234 { "(bad)", { XX } },
3235 },
3236
1ceb70f8 3237 /* PREFIX_0F3825 */
42903f7f
L
3238 {
3239 { "(bad)", { XX } },
3240 { "(bad)", { XX } },
8976381e 3241 { "pmovsxdq", { XM, EXq } },
42903f7f
L
3242 { "(bad)", { XX } },
3243 },
3244
1ceb70f8 3245 /* PREFIX_0F3828 */
42903f7f
L
3246 {
3247 { "(bad)", { XX } },
3248 { "(bad)", { XX } },
09a2c6cf 3249 { "pmuldq", { XM, EXx } },
42903f7f
L
3250 { "(bad)", { XX } },
3251 },
3252
1ceb70f8 3253 /* PREFIX_0F3829 */
42903f7f
L
3254 {
3255 { "(bad)", { XX } },
3256 { "(bad)", { XX } },
09a2c6cf 3257 { "pcmpeqq", { XM, EXx } },
42903f7f
L
3258 { "(bad)", { XX } },
3259 },
3260
1ceb70f8 3261 /* PREFIX_0F382A */
42903f7f
L
3262 {
3263 { "(bad)", { XX } },
3264 { "(bad)", { XX } },
75c135a8 3265 { MOD_TABLE (MOD_0F382A_PREFIX_2) },
42903f7f
L
3266 { "(bad)", { XX } },
3267 },
3268
1ceb70f8 3269 /* PREFIX_0F382B */
42903f7f
L
3270 {
3271 { "(bad)", { XX } },
3272 { "(bad)", { XX } },
09a2c6cf 3273 { "packusdw", { XM, EXx } },
42903f7f
L
3274 { "(bad)", { XX } },
3275 },
3276
1ceb70f8 3277 /* PREFIX_0F3830 */
42903f7f
L
3278 {
3279 { "(bad)", { XX } },
3280 { "(bad)", { XX } },
8976381e 3281 { "pmovzxbw", { XM, EXq } },
42903f7f
L
3282 { "(bad)", { XX } },
3283 },
3284
1ceb70f8 3285 /* PREFIX_0F3831 */
42903f7f
L
3286 {
3287 { "(bad)", { XX } },
3288 { "(bad)", { XX } },
8976381e 3289 { "pmovzxbd", { XM, EXd } },
42903f7f
L
3290 { "(bad)", { XX } },
3291 },
3292
1ceb70f8 3293 /* PREFIX_0F3832 */
42903f7f
L
3294 {
3295 { "(bad)", { XX } },
3296 { "(bad)", { XX } },
8976381e 3297 { "pmovzxbq", { XM, EXw } },
42903f7f
L
3298 { "(bad)", { XX } },
3299 },
3300
1ceb70f8 3301 /* PREFIX_0F3833 */
42903f7f
L
3302 {
3303 { "(bad)", { XX } },
3304 { "(bad)", { XX } },
8976381e 3305 { "pmovzxwd", { XM, EXq } },
42903f7f
L
3306 { "(bad)", { XX } },
3307 },
3308
1ceb70f8 3309 /* PREFIX_0F3834 */
42903f7f
L
3310 {
3311 { "(bad)", { XX } },
3312 { "(bad)", { XX } },
8976381e 3313 { "pmovzxwq", { XM, EXd } },
42903f7f
L
3314 { "(bad)", { XX } },
3315 },
3316
1ceb70f8 3317 /* PREFIX_0F3835 */
42903f7f
L
3318 {
3319 { "(bad)", { XX } },
3320 { "(bad)", { XX } },
8976381e 3321 { "pmovzxdq", { XM, EXq } },
42903f7f
L
3322 { "(bad)", { XX } },
3323 },
3324
1ceb70f8 3325 /* PREFIX_0F3837 */
4e7d34a6
L
3326 {
3327 { "(bad)", { XX } },
3328 { "(bad)", { XX } },
3329 { "pcmpgtq", { XM, EXx } },
3330 { "(bad)", { XX } },
3331 },
3332
1ceb70f8 3333 /* PREFIX_0F3838 */
42903f7f
L
3334 {
3335 { "(bad)", { XX } },
3336 { "(bad)", { XX } },
09a2c6cf 3337 { "pminsb", { XM, EXx } },
42903f7f
L
3338 { "(bad)", { XX } },
3339 },
3340
1ceb70f8 3341 /* PREFIX_0F3839 */
42903f7f
L
3342 {
3343 { "(bad)", { XX } },
3344 { "(bad)", { XX } },
09a2c6cf 3345 { "pminsd", { XM, EXx } },
42903f7f
L
3346 { "(bad)", { XX } },
3347 },
3348
1ceb70f8 3349 /* PREFIX_0F383A */
42903f7f
L
3350 {
3351 { "(bad)", { XX } },
3352 { "(bad)", { XX } },
09a2c6cf 3353 { "pminuw", { XM, EXx } },
42903f7f
L
3354 { "(bad)", { XX } },
3355 },
3356
1ceb70f8 3357 /* PREFIX_0F383B */
42903f7f
L
3358 {
3359 { "(bad)", { XX } },
3360 { "(bad)", { XX } },
09a2c6cf 3361 { "pminud", { XM, EXx } },
42903f7f
L
3362 { "(bad)", { XX } },
3363 },
3364
1ceb70f8 3365 /* PREFIX_0F383C */
42903f7f
L
3366 {
3367 { "(bad)", { XX } },
3368 { "(bad)", { XX } },
09a2c6cf 3369 { "pmaxsb", { XM, EXx } },
42903f7f
L
3370 { "(bad)", { XX } },
3371 },
3372
1ceb70f8 3373 /* PREFIX_0F383D */
42903f7f
L
3374 {
3375 { "(bad)", { XX } },
3376 { "(bad)", { XX } },
09a2c6cf 3377 { "pmaxsd", { XM, EXx } },
42903f7f
L
3378 { "(bad)", { XX } },
3379 },
3380
1ceb70f8 3381 /* PREFIX_0F383E */
42903f7f
L
3382 {
3383 { "(bad)", { XX } },
3384 { "(bad)", { XX } },
09a2c6cf 3385 { "pmaxuw", { XM, EXx } },
42903f7f
L
3386 { "(bad)", { XX } },
3387 },
3388
1ceb70f8 3389 /* PREFIX_0F383F */
42903f7f
L
3390 {
3391 { "(bad)", { XX } },
3392 { "(bad)", { XX } },
09a2c6cf 3393 { "pmaxud", { XM, EXx } },
42903f7f
L
3394 { "(bad)", { XX } },
3395 },
3396
1ceb70f8 3397 /* PREFIX_0F3840 */
42903f7f
L
3398 {
3399 { "(bad)", { XX } },
3400 { "(bad)", { XX } },
09a2c6cf 3401 { "pmulld", { XM, EXx } },
42903f7f
L
3402 { "(bad)", { XX } },
3403 },
3404
1ceb70f8 3405 /* PREFIX_0F3841 */
42903f7f
L
3406 {
3407 { "(bad)", { XX } },
3408 { "(bad)", { XX } },
09a2c6cf 3409 { "phminposuw", { XM, EXx } },
42903f7f
L
3410 { "(bad)", { XX } },
3411 },
3412
f1f8f695
L
3413 /* PREFIX_0F3880 */
3414 {
3415 { "(bad)", { XX } },
3416 { "(bad)", { XX } },
3417 { "invept", { Gm, Mo } },
3418 { "(bad)", { XX } },
3419 },
3420
3421 /* PREFIX_0F3881 */
3422 {
3423 { "(bad)", { XX } },
3424 { "(bad)", { XX } },
3425 { "invvpid", { Gm, Mo } },
3426 { "(bad)", { XX } },
3427 },
3428
c0f3af97
L
3429 /* PREFIX_0F38DB */
3430 {
3431 { "(bad)", { XX } },
3432 { "(bad)", { XX } },
3433 { "aesimc", { XM, EXx } },
3434 { "(bad)", { XX } },
3435 },
3436
3437 /* PREFIX_0F38DC */
3438 {
3439 { "(bad)", { XX } },
3440 { "(bad)", { XX } },
3441 { "aesenc", { XM, EXx } },
3442 { "(bad)", { XX } },
3443 },
3444
3445 /* PREFIX_0F38DD */
3446 {
3447 { "(bad)", { XX } },
3448 { "(bad)", { XX } },
3449 { "aesenclast", { XM, EXx } },
3450 { "(bad)", { XX } },
3451 },
3452
3453 /* PREFIX_0F38DE */
3454 {
3455 { "(bad)", { XX } },
3456 { "(bad)", { XX } },
3457 { "aesdec", { XM, EXx } },
3458 { "(bad)", { XX } },
3459 },
3460
3461 /* PREFIX_0F38DF */
3462 {
3463 { "(bad)", { XX } },
3464 { "(bad)", { XX } },
3465 { "aesdeclast", { XM, EXx } },
3466 { "(bad)", { XX } },
3467 },
3468
1ceb70f8 3469 /* PREFIX_0F38F0 */
4e7d34a6 3470 {
f1f8f695 3471 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
4e7d34a6 3472 { "(bad)", { XX } },
f1f8f695 3473 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
4e7d34a6
L
3474 { "crc32", { Gdq, { CRC32_Fixup, b_mode } } },
3475 },
3476
1ceb70f8 3477 /* PREFIX_0F38F1 */
4e7d34a6 3478 {
f1f8f695 3479 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
4e7d34a6 3480 { "(bad)", { XX } },
f1f8f695 3481 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
4e7d34a6
L
3482 { "crc32", { Gdq, { CRC32_Fixup, v_mode } } },
3483 },
3484
1ceb70f8 3485 /* PREFIX_0F3A08 */
42903f7f
L
3486 {
3487 { "(bad)", { XX } },
3488 { "(bad)", { XX } },
09a2c6cf 3489 { "roundps", { XM, EXx, Ib } },
42903f7f
L
3490 { "(bad)", { XX } },
3491 },
3492
1ceb70f8 3493 /* PREFIX_0F3A09 */
42903f7f
L
3494 {
3495 { "(bad)", { XX } },
3496 { "(bad)", { XX } },
09a2c6cf 3497 { "roundpd", { XM, EXx, Ib } },
42903f7f
L
3498 { "(bad)", { XX } },
3499 },
3500
1ceb70f8 3501 /* PREFIX_0F3A0A */
42903f7f
L
3502 {
3503 { "(bad)", { XX } },
3504 { "(bad)", { XX } },
09335d05 3505 { "roundss", { XM, EXd, Ib } },
42903f7f
L
3506 { "(bad)", { XX } },
3507 },
3508
1ceb70f8 3509 /* PREFIX_0F3A0B */
42903f7f
L
3510 {
3511 { "(bad)", { XX } },
3512 { "(bad)", { XX } },
09335d05 3513 { "roundsd", { XM, EXq, Ib } },
42903f7f
L
3514 { "(bad)", { XX } },
3515 },
3516
1ceb70f8 3517 /* PREFIX_0F3A0C */
42903f7f
L
3518 {
3519 { "(bad)", { XX } },
3520 { "(bad)", { XX } },
09a2c6cf 3521 { "blendps", { XM, EXx, Ib } },
42903f7f
L
3522 { "(bad)", { XX } },
3523 },
3524
1ceb70f8 3525 /* PREFIX_0F3A0D */
42903f7f
L
3526 {
3527 { "(bad)", { XX } },
3528 { "(bad)", { XX } },
09a2c6cf 3529 { "blendpd", { XM, EXx, Ib } },
42903f7f
L
3530 { "(bad)", { XX } },
3531 },
3532
1ceb70f8 3533 /* PREFIX_0F3A0E */
42903f7f
L
3534 {
3535 { "(bad)", { XX } },
3536 { "(bad)", { XX } },
09a2c6cf 3537 { "pblendw", { XM, EXx, Ib } },
42903f7f
L
3538 { "(bad)", { XX } },
3539 },
3540
1ceb70f8 3541 /* PREFIX_0F3A14 */
42903f7f
L
3542 {
3543 { "(bad)", { XX } },
3544 { "(bad)", { XX } },
3545 { "pextrb", { Edqb, XM, Ib } },
3546 { "(bad)", { XX } },
3547 },
3548
1ceb70f8 3549 /* PREFIX_0F3A15 */
42903f7f
L
3550 {
3551 { "(bad)", { XX } },
3552 { "(bad)", { XX } },
3553 { "pextrw", { Edqw, XM, Ib } },
3554 { "(bad)", { XX } },
3555 },
3556
1ceb70f8 3557 /* PREFIX_0F3A16 */
42903f7f
L
3558 {
3559 { "(bad)", { XX } },
3560 { "(bad)", { XX } },
3561 { "pextrK", { Edq, XM, Ib } },
3562 { "(bad)", { XX } },
3563 },
3564
1ceb70f8 3565 /* PREFIX_0F3A17 */
42903f7f
L
3566 {
3567 { "(bad)", { XX } },
3568 { "(bad)", { XX } },
3569 { "extractps", { Edqd, XM, Ib } },
3570 { "(bad)", { XX } },
3571 },
3572
1ceb70f8 3573 /* PREFIX_0F3A20 */
42903f7f
L
3574 {
3575 { "(bad)", { XX } },
3576 { "(bad)", { XX } },
3577 { "pinsrb", { XM, Edqb, Ib } },
3578 { "(bad)", { XX } },
3579 },
3580
1ceb70f8 3581 /* PREFIX_0F3A21 */
42903f7f
L
3582 {
3583 { "(bad)", { XX } },
3584 { "(bad)", { XX } },
8976381e 3585 { "insertps", { XM, EXd, Ib } },
42903f7f
L
3586 { "(bad)", { XX } },
3587 },
3588
1ceb70f8 3589 /* PREFIX_0F3A22 */
42903f7f
L
3590 {
3591 { "(bad)", { XX } },
3592 { "(bad)", { XX } },
3593 { "pinsrK", { XM, Edq, Ib } },
3594 { "(bad)", { XX } },
3595 },
3596
1ceb70f8 3597 /* PREFIX_0F3A40 */
42903f7f
L
3598 {
3599 { "(bad)", { XX } },
3600 { "(bad)", { XX } },
09a2c6cf 3601 { "dpps", { XM, EXx, Ib } },
42903f7f
L
3602 { "(bad)", { XX } },
3603 },
3604
1ceb70f8 3605 /* PREFIX_0F3A41 */
42903f7f
L
3606 {
3607 { "(bad)", { XX } },
3608 { "(bad)", { XX } },
09a2c6cf 3609 { "dppd", { XM, EXx, Ib } },
42903f7f
L
3610 { "(bad)", { XX } },
3611 },
3612
1ceb70f8 3613 /* PREFIX_0F3A42 */
42903f7f
L
3614 {
3615 { "(bad)", { XX } },
3616 { "(bad)", { XX } },
09a2c6cf 3617 { "mpsadbw", { XM, EXx, Ib } },
42903f7f
L
3618 { "(bad)", { XX } },
3619 },
381d071f 3620
c0f3af97
L
3621 /* PREFIX_0F3A44 */
3622 {
3623 { "(bad)", { XX } },
3624 { "(bad)", { XX } },
3625 { "pclmulqdq", { XM, EXx, PCLMUL } },
3626 { "(bad)", { XX } },
3627 },
3628
1ceb70f8 3629 /* PREFIX_0F3A60 */
381d071f
L
3630 {
3631 { "(bad)", { XX } },
3632 { "(bad)", { XX } },
4e7d34a6 3633 { "pcmpestrm", { XM, EXx, Ib } },
381d071f
L
3634 { "(bad)", { XX } },
3635 },
3636
1ceb70f8 3637 /* PREFIX_0F3A61 */
381d071f
L
3638 {
3639 { "(bad)", { XX } },
3640 { "(bad)", { XX } },
4e7d34a6 3641 { "pcmpestri", { XM, EXx, Ib } },
381d071f 3642 { "(bad)", { XX } },
381d071f
L
3643 },
3644
1ceb70f8 3645 /* PREFIX_0F3A62 */
381d071f
L
3646 {
3647 { "(bad)", { XX } },
3648 { "(bad)", { XX } },
4e7d34a6 3649 { "pcmpistrm", { XM, EXx, Ib } },
381d071f 3650 { "(bad)", { XX } },
381d071f
L
3651 },
3652
1ceb70f8 3653 /* PREFIX_0F3A63 */
381d071f
L
3654 {
3655 { "(bad)", { XX } },
3656 { "(bad)", { XX } },
4e7d34a6 3657 { "pcmpistri", { XM, EXx, Ib } },
381d071f
L
3658 { "(bad)", { XX } },
3659 },
09a2c6cf 3660
c0f3af97 3661 /* PREFIX_0F3ADF */
09a2c6cf 3662 {
c0f3af97
L
3663 { "(bad)", { XX } },
3664 { "(bad)", { XX } },
3665 { "aeskeygenassist", { XM, EXx, Ib } },
3666 { "(bad)", { XX } },
09a2c6cf
L
3667 },
3668
c0f3af97 3669 /* PREFIX_VEX_10 */
09a2c6cf 3670 {
9e30b8e0 3671 { VEX_W_TABLE (VEX_W_10_P_0) },
c0f3af97 3672 { VEX_LEN_TABLE (VEX_LEN_10_P_1) },
9e30b8e0 3673 { VEX_W_TABLE (VEX_W_10_P_2) },
c0f3af97 3674 { VEX_LEN_TABLE (VEX_LEN_10_P_3) },
09a2c6cf
L
3675 },
3676
c0f3af97 3677 /* PREFIX_VEX_11 */
09a2c6cf 3678 {
9e30b8e0 3679 { VEX_W_TABLE (VEX_W_11_P_0) },
c0f3af97 3680 { VEX_LEN_TABLE (VEX_LEN_11_P_1) },
9e30b8e0 3681 { VEX_W_TABLE (VEX_W_11_P_2) },
c0f3af97 3682 { VEX_LEN_TABLE (VEX_LEN_11_P_3) },
09a2c6cf
L
3683 },
3684
c0f3af97 3685 /* PREFIX_VEX_12 */
09a2c6cf 3686 {
c0f3af97 3687 { MOD_TABLE (MOD_VEX_12_PREFIX_0) },
9e30b8e0 3688 { VEX_W_TABLE (VEX_W_12_P_1) },
c0f3af97 3689 { VEX_LEN_TABLE (VEX_LEN_12_P_2) },
9e30b8e0 3690 { VEX_W_TABLE (VEX_W_12_P_3) },
09a2c6cf
L
3691 },
3692
c0f3af97 3693 /* PREFIX_VEX_16 */
09a2c6cf 3694 {
c0f3af97 3695 { MOD_TABLE (MOD_VEX_16_PREFIX_0) },
9e30b8e0 3696 { VEX_W_TABLE (VEX_W_16_P_1) },
c0f3af97
L
3697 { VEX_LEN_TABLE (VEX_LEN_16_P_2) },
3698 { "(bad)", { XX } },
5f754f58 3699 },
7c52e0e8 3700
c0f3af97 3701 /* PREFIX_VEX_2A */
5f754f58 3702 {
c0f3af97
L
3703 { "(bad)", { XX } },
3704 { VEX_LEN_TABLE (VEX_LEN_2A_P_1) },
3705 { "(bad)", { XX } },
3706 { VEX_LEN_TABLE (VEX_LEN_2A_P_3) },
5f754f58 3707 },
7c52e0e8 3708
c0f3af97 3709 /* PREFIX_VEX_2C */
5f754f58 3710 {
c0f3af97
L
3711 { "(bad)", { XX } },
3712 { VEX_LEN_TABLE (VEX_LEN_2C_P_1) },
3713 { "(bad)", { XX } },
3714 { VEX_LEN_TABLE (VEX_LEN_2C_P_3) },
5f754f58 3715 },
7c52e0e8 3716
c0f3af97 3717 /* PREFIX_VEX_2D */
7c52e0e8 3718 {
c0f3af97
L
3719 { "(bad)", { XX } },
3720 { VEX_LEN_TABLE (VEX_LEN_2D_P_1) },
3721 { "(bad)", { XX } },
3722 { VEX_LEN_TABLE (VEX_LEN_2D_P_3) },
7c52e0e8
L
3723 },
3724
c0f3af97 3725 /* PREFIX_VEX_2E */
7c52e0e8 3726 {
c0f3af97
L
3727 { VEX_LEN_TABLE (VEX_LEN_2E_P_0) },
3728 { "(bad)", { XX } },
3729 { VEX_LEN_TABLE (VEX_LEN_2E_P_2) },
3730 { "(bad)", { XX } },
7c52e0e8
L
3731 },
3732
c0f3af97 3733 /* PREFIX_VEX_2F */
7c52e0e8 3734 {
c0f3af97
L
3735 { VEX_LEN_TABLE (VEX_LEN_2F_P_0) },
3736 { "(bad)", { XX } },
3737 { VEX_LEN_TABLE (VEX_LEN_2F_P_2) },
3738 { "(bad)", { XX } },
7c52e0e8
L
3739 },
3740
c0f3af97 3741 /* PREFIX_VEX_51 */
7c52e0e8 3742 {
9e30b8e0 3743 { VEX_W_TABLE (VEX_W_51_P_0) },
c0f3af97 3744 { VEX_LEN_TABLE (VEX_LEN_51_P_1) },
9e30b8e0 3745 { VEX_W_TABLE (VEX_W_51_P_2) },
c0f3af97 3746 { VEX_LEN_TABLE (VEX_LEN_51_P_3) },
7c52e0e8
L
3747 },
3748
c0f3af97 3749 /* PREFIX_VEX_52 */
7c52e0e8 3750 {
9e30b8e0 3751 { VEX_W_TABLE (VEX_W_52_P_0) },
c0f3af97
L
3752 { VEX_LEN_TABLE (VEX_LEN_52_P_1) },
3753 { "(bad)", { XX } },
3754 { "(bad)", { XX } },
7c52e0e8
L
3755 },
3756
c0f3af97 3757 /* PREFIX_VEX_53 */
7c52e0e8 3758 {
9e30b8e0 3759 { VEX_W_TABLE (VEX_W_53_P_0) },
c0f3af97
L
3760 { VEX_LEN_TABLE (VEX_LEN_53_P_1) },
3761 { "(bad)", { XX } },
3762 { "(bad)", { XX } },
7c52e0e8
L
3763 },
3764
c0f3af97 3765 /* PREFIX_VEX_58 */
7c52e0e8 3766 {
9e30b8e0 3767 { VEX_W_TABLE (VEX_W_58_P_0) },
c0f3af97 3768 { VEX_LEN_TABLE (VEX_LEN_58_P_1) },
9e30b8e0 3769 { VEX_W_TABLE (VEX_W_58_P_2) },
c0f3af97 3770 { VEX_LEN_TABLE (VEX_LEN_58_P_3) },
7c52e0e8
L
3771 },
3772
c0f3af97 3773 /* PREFIX_VEX_59 */
7c52e0e8 3774 {
9e30b8e0 3775 { VEX_W_TABLE (VEX_W_59_P_0) },
c0f3af97 3776 { VEX_LEN_TABLE (VEX_LEN_59_P_1) },
9e30b8e0 3777 { VEX_W_TABLE (VEX_W_59_P_2) },
c0f3af97 3778 { VEX_LEN_TABLE (VEX_LEN_59_P_3) },
7c52e0e8
L
3779 },
3780
c0f3af97 3781 /* PREFIX_VEX_5A */
7c52e0e8 3782 {
9e30b8e0 3783 { VEX_W_TABLE (VEX_W_5A_P_0) },
c0f3af97
L
3784 { VEX_LEN_TABLE (VEX_LEN_5A_P_1) },
3785 { "vcvtpd2ps%XY", { XMM, EXx } },
3786 { VEX_LEN_TABLE (VEX_LEN_5A_P_3) },
7c52e0e8
L
3787 },
3788
c0f3af97 3789 /* PREFIX_VEX_5B */
7c52e0e8 3790 {
9e30b8e0
L
3791 { VEX_W_TABLE (VEX_W_5B_P_0) },
3792 { VEX_W_TABLE (VEX_W_5B_P_1) },
3793 { VEX_W_TABLE (VEX_W_5B_P_2) },
c0f3af97 3794 { "(bad)", { XX } },
7c52e0e8
L
3795 },
3796
c0f3af97 3797 /* PREFIX_VEX_5C */
7c52e0e8 3798 {
9e30b8e0 3799 { VEX_W_TABLE (VEX_W_5C_P_0) },
c0f3af97 3800 { VEX_LEN_TABLE (VEX_LEN_5C_P_1) },
9e30b8e0 3801 { VEX_W_TABLE (VEX_W_5C_P_2) },
c0f3af97 3802 { VEX_LEN_TABLE (VEX_LEN_5C_P_3) },
7c52e0e8
L
3803 },
3804
c0f3af97 3805 /* PREFIX_VEX_5D */
7c52e0e8 3806 {
9e30b8e0 3807 { VEX_W_TABLE (VEX_W_5D_P_0) },
c0f3af97 3808 { VEX_LEN_TABLE (VEX_LEN_5D_P_1) },
9e30b8e0 3809 { VEX_W_TABLE (VEX_W_5D_P_2) },
c0f3af97 3810 { VEX_LEN_TABLE (VEX_LEN_5D_P_3) },
7c52e0e8
L
3811 },
3812
c0f3af97 3813 /* PREFIX_VEX_5E */
7c52e0e8 3814 {
9e30b8e0 3815 { VEX_W_TABLE (VEX_W_5E_P_0) },
c0f3af97 3816 { VEX_LEN_TABLE (VEX_LEN_5E_P_1) },
9e30b8e0 3817 { VEX_W_TABLE (VEX_W_5E_P_2) },
c0f3af97 3818 { VEX_LEN_TABLE (VEX_LEN_5E_P_3) },
7c52e0e8
L
3819 },
3820
c0f3af97 3821 /* PREFIX_VEX_5F */
7c52e0e8 3822 {
9e30b8e0 3823 { VEX_W_TABLE (VEX_W_5F_P_0) },
c0f3af97 3824 { VEX_LEN_TABLE (VEX_LEN_5F_P_1) },
9e30b8e0 3825 { VEX_W_TABLE (VEX_W_5F_P_2) },
c0f3af97 3826 { VEX_LEN_TABLE (VEX_LEN_5F_P_3) },
7c52e0e8
L
3827 },
3828
c0f3af97 3829 /* PREFIX_VEX_60 */
7c52e0e8 3830 {
c0f3af97
L
3831 { "(bad)", { XX } },
3832 { "(bad)", { XX } },
3833 { VEX_LEN_TABLE (VEX_LEN_60_P_2) },
3834 { "(bad)", { XX } },
7c52e0e8
L
3835 },
3836
c0f3af97 3837 /* PREFIX_VEX_61 */
7c52e0e8 3838 {
c0f3af97
L
3839 { "(bad)", { XX } },
3840 { "(bad)", { XX } },
3841 { VEX_LEN_TABLE (VEX_LEN_61_P_2) },
3842 { "(bad)", { XX } },
7c52e0e8
L
3843 },
3844
c0f3af97 3845 /* PREFIX_VEX_62 */
7c52e0e8 3846 {
c0f3af97
L
3847 { "(bad)", { XX } },
3848 { "(bad)", { XX } },
3849 { VEX_LEN_TABLE (VEX_LEN_62_P_2) },
3850 { "(bad)", { XX } },
7c52e0e8
L
3851 },
3852
c0f3af97 3853 /* PREFIX_VEX_63 */
7c52e0e8 3854 {
c0f3af97
L
3855 { "(bad)", { XX } },
3856 { "(bad)", { XX } },
3857 { VEX_LEN_TABLE (VEX_LEN_63_P_2) },
3858 { "(bad)", { XX } },
7c52e0e8
L
3859 },
3860
c0f3af97 3861 /* PREFIX_VEX_64 */
7c52e0e8 3862 {
c0f3af97
L
3863 { "(bad)", { XX } },
3864 { "(bad)", { XX } },
3865 { VEX_LEN_TABLE (VEX_LEN_64_P_2) },
3866 { "(bad)", { XX } },
7c52e0e8
L
3867 },
3868
c0f3af97 3869 /* PREFIX_VEX_65 */
7c52e0e8 3870 {
c0f3af97
L
3871 { "(bad)", { XX } },
3872 { "(bad)", { XX } },
3873 { VEX_LEN_TABLE (VEX_LEN_65_P_2) },
3874 { "(bad)", { XX } },
7c52e0e8
L
3875 },
3876
c0f3af97 3877 /* PREFIX_VEX_66 */
7c52e0e8 3878 {
c0f3af97
L
3879 { "(bad)", { XX } },
3880 { "(bad)", { XX } },
3881 { VEX_LEN_TABLE (VEX_LEN_66_P_2) },
3882 { "(bad)", { XX } },
7c52e0e8 3883 },
6439fc28 3884
c0f3af97 3885 /* PREFIX_VEX_67 */
331d2d0d 3886 {
c0f3af97
L
3887 { "(bad)", { XX } },
3888 { "(bad)", { XX } },
3889 { VEX_LEN_TABLE (VEX_LEN_67_P_2) },
3890 { "(bad)", { XX } },
3891 },
3892
3893 /* PREFIX_VEX_68 */
3894 {
3895 { "(bad)", { XX } },
3896 { "(bad)", { XX } },
3897 { VEX_LEN_TABLE (VEX_LEN_68_P_2) },
3898 { "(bad)", { XX } },
3899 },
3900
3901 /* PREFIX_VEX_69 */
3902 {
3903 { "(bad)", { XX } },
3904 { "(bad)", { XX } },
3905 { VEX_LEN_TABLE (VEX_LEN_69_P_2) },
3906 { "(bad)", { XX } },
3907 },
3908
3909 /* PREFIX_VEX_6A */
3910 {
3911 { "(bad)", { XX } },
3912 { "(bad)", { XX } },
3913 { VEX_LEN_TABLE (VEX_LEN_6A_P_2) },
3914 { "(bad)", { XX } },
3915 },
3916
3917 /* PREFIX_VEX_6B */
3918 {
3919 { "(bad)", { XX } },
3920 { "(bad)", { XX } },
3921 { VEX_LEN_TABLE (VEX_LEN_6B_P_2) },
3922 { "(bad)", { XX } },
3923 },
3924
3925 /* PREFIX_VEX_6C */
3926 {
3927 { "(bad)", { XX } },
3928 { "(bad)", { XX } },
3929 { VEX_LEN_TABLE (VEX_LEN_6C_P_2) },
3930 { "(bad)", { XX } },
3931 },
3932
3933 /* PREFIX_VEX_6D */
3934 {
3935 { "(bad)", { XX } },
3936 { "(bad)", { XX } },
3937 { VEX_LEN_TABLE (VEX_LEN_6D_P_2) },
3938 { "(bad)", { XX } },
3939 },
3940
3941 /* PREFIX_VEX_6E */
3942 {
3943 { "(bad)", { XX } },
3944 { "(bad)", { XX } },
3945 { VEX_LEN_TABLE (VEX_LEN_6E_P_2) },
3946 { "(bad)", { XX } },
3947 },
3948
3949 /* PREFIX_VEX_6F */
3950 {
3951 { "(bad)", { XX } },
9e30b8e0
L
3952 { VEX_W_TABLE (VEX_W_6F_P_1) },
3953 { VEX_W_TABLE (VEX_W_6F_P_2) },
c0f3af97
L
3954 { "(bad)", { XX } },
3955 },
3956
3957 /* PREFIX_VEX_70 */
3958 {
3959 { "(bad)", { XX } },
3960 { VEX_LEN_TABLE (VEX_LEN_70_P_1) },
3961 { VEX_LEN_TABLE (VEX_LEN_70_P_2) },
3962 { VEX_LEN_TABLE (VEX_LEN_70_P_3) },
3963 },
3964
3965 /* PREFIX_VEX_71_REG_2 */
3966 {
3967 { "(bad)", { XX } },
3968 { "(bad)", { XX } },
3969 { VEX_LEN_TABLE (VEX_LEN_71_R_2_P_2) },
3970 { "(bad)", { XX } },
3971 },
3972
3973 /* PREFIX_VEX_71_REG_4 */
3974 {
3975 { "(bad)", { XX } },
3976 { "(bad)", { XX } },
3977 { VEX_LEN_TABLE (VEX_LEN_71_R_4_P_2) },
3978 { "(bad)", { XX } },
3979 },
3980
3981 /* PREFIX_VEX_71_REG_6 */
3982 {
3983 { "(bad)", { XX } },
3984 { "(bad)", { XX } },
3985 { VEX_LEN_TABLE (VEX_LEN_71_R_6_P_2) },
3986 { "(bad)", { XX } },
3987 },
3988
3989 /* PREFIX_VEX_72_REG_2 */
3990 {
3991 { "(bad)", { XX } },
3992 { "(bad)", { XX } },
3993 { VEX_LEN_TABLE (VEX_LEN_72_R_2_P_2) },
3994 { "(bad)", { XX } },
3995 },
3996
3997 /* PREFIX_VEX_72_REG_4 */
3998 {
3999 { "(bad)", { XX } },
4000 { "(bad)", { XX } },
4001 { VEX_LEN_TABLE (VEX_LEN_72_R_4_P_2) },
4002 { "(bad)", { XX } },
4003 },
4004
4005 /* PREFIX_VEX_72_REG_6 */
4006 {
4007 { "(bad)", { XX } },
4008 { "(bad)", { XX } },
4009 { VEX_LEN_TABLE (VEX_LEN_72_R_6_P_2) },
4010 { "(bad)", { XX } },
4011 },
4012
4013 /* PREFIX_VEX_73_REG_2 */
4014 {
4015 { "(bad)", { XX } },
4016 { "(bad)", { XX } },
4017 { VEX_LEN_TABLE (VEX_LEN_73_R_2_P_2) },
4018 { "(bad)", { XX } },
4019 },
4020
4021 /* PREFIX_VEX_73_REG_3 */
4022 {
4023 { "(bad)", { XX } },
4024 { "(bad)", { XX } },
4025 { VEX_LEN_TABLE (VEX_LEN_73_R_3_P_2) },
4026 { "(bad)", { XX } },
4027 },
4028
4029 /* PREFIX_VEX_73_REG_6 */
4030 {
4031 { "(bad)", { XX } },
4032 { "(bad)", { XX } },
4033 { VEX_LEN_TABLE (VEX_LEN_73_R_6_P_2) },
4034 { "(bad)", { XX } },
4035 },
4036
4037 /* PREFIX_VEX_73_REG_7 */
4038 {
4039 { "(bad)", { XX } },
4040 { "(bad)", { XX } },
4041 { VEX_LEN_TABLE (VEX_LEN_73_R_7_P_2) },
4042 { "(bad)", { XX } },
4043 },
4044
4045 /* PREFIX_VEX_74 */
4046 {
4047 { "(bad)", { XX } },
4048 { "(bad)", { XX } },
4049 { VEX_LEN_TABLE (VEX_LEN_74_P_2) },
4050 { "(bad)", { XX } },
4051 },
4052
4053 /* PREFIX_VEX_75 */
4054 {
4055 { "(bad)", { XX } },
4056 { "(bad)", { XX } },
4057 { VEX_LEN_TABLE (VEX_LEN_75_P_2) },
4058 { "(bad)", { XX } },
4059 },
4060
4061 /* PREFIX_VEX_76 */
4062 {
4063 { "(bad)", { XX } },
4064 { "(bad)", { XX } },
4065 { VEX_LEN_TABLE (VEX_LEN_76_P_2) },
4066 { "(bad)", { XX } },
4067 },
4068
4069 /* PREFIX_VEX_77 */
4070 {
9e30b8e0 4071 { VEX_W_TABLE (VEX_W_77_P_0) },
c0f3af97
L
4072 { "(bad)", { XX } },
4073 { "(bad)", { XX } },
4074 { "(bad)", { XX } },
4075 },
4076
4077 /* PREFIX_VEX_7C */
4078 {
4079 { "(bad)", { XX } },
4080 { "(bad)", { XX } },
9e30b8e0
L
4081 { VEX_W_TABLE (VEX_W_7C_P_2) },
4082 { VEX_W_TABLE (VEX_W_7C_P_3) },
c0f3af97
L
4083 },
4084
4085 /* PREFIX_VEX_7D */
4086 {
4087 { "(bad)", { XX } },
4088 { "(bad)", { XX } },
9e30b8e0
L
4089 { VEX_W_TABLE (VEX_W_7D_P_2) },
4090 { VEX_W_TABLE (VEX_W_7D_P_3) },
c0f3af97
L
4091 },
4092
4093 /* PREFIX_VEX_7E */
4094 {
4095 { "(bad)", { XX } },
4096 { VEX_LEN_TABLE (VEX_LEN_7E_P_1) },
4097 { VEX_LEN_TABLE (VEX_LEN_7E_P_2) },
4098 { "(bad)", { XX } },
4099 },
4100
4101 /* PREFIX_VEX_7F */
4102 {
4103 { "(bad)", { XX } },
9e30b8e0
L
4104 { VEX_W_TABLE (VEX_W_7F_P_1) },
4105 { VEX_W_TABLE (VEX_W_7F_P_2) },
c0f3af97
L
4106 { "(bad)", { XX } },
4107 },
4108
4109 /* PREFIX_VEX_C2 */
4110 {
9e30b8e0 4111 { VEX_W_TABLE (VEX_W_C2_P_0) },
c0f3af97 4112 { VEX_LEN_TABLE (VEX_LEN_C2_P_1) },
9e30b8e0 4113 { VEX_W_TABLE (VEX_W_C2_P_2) },
c0f3af97
L
4114 { VEX_LEN_TABLE (VEX_LEN_C2_P_3) },
4115 },
4116
4117 /* PREFIX_VEX_C4 */
4118 {
4119 { "(bad)", { XX } },
4120 { "(bad)", { XX } },
4121 { VEX_LEN_TABLE (VEX_LEN_C4_P_2) },
4122 { "(bad)", { XX } },
4123 },
4124
4125 /* PREFIX_VEX_C5 */
4126 {
4127 { "(bad)", { XX } },
4128 { "(bad)", { XX } },
4129 { VEX_LEN_TABLE (VEX_LEN_C5_P_2) },
4130 { "(bad)", { XX } },
4131 },
4132
4133 /* PREFIX_VEX_D0 */
4134 {
4135 { "(bad)", { XX } },
4136 { "(bad)", { XX } },
9e30b8e0
L
4137 { VEX_W_TABLE (VEX_W_D0_P_2) },
4138 { VEX_W_TABLE (VEX_W_D0_P_3) },
c0f3af97
L
4139 },
4140
4141 /* PREFIX_VEX_D1 */
4142 {
4143 { "(bad)", { XX } },
4144 { "(bad)", { XX } },
4145 { VEX_LEN_TABLE (VEX_LEN_D1_P_2) },
4146 { "(bad)", { XX } },
4147 },
4148
4149 /* PREFIX_VEX_D2 */
4150 {
4151 { "(bad)", { XX } },
4152 { "(bad)", { XX } },
4153 { VEX_LEN_TABLE (VEX_LEN_D2_P_2) },
4154 { "(bad)", { XX } },
4155 },
4156
4157 /* PREFIX_VEX_D3 */
4158 {
4159 { "(bad)", { XX } },
4160 { "(bad)", { XX } },
4161 { VEX_LEN_TABLE (VEX_LEN_D3_P_2) },
4162 { "(bad)", { XX } },
4163 },
4164
4165 /* PREFIX_VEX_D4 */
4166 {
4167 { "(bad)", { XX } },
4168 { "(bad)", { XX } },
4169 { VEX_LEN_TABLE (VEX_LEN_D4_P_2) },
4170 { "(bad)", { XX } },
4171 },
4172
4173 /* PREFIX_VEX_D5 */
4174 {
4175 { "(bad)", { XX } },
4176 { "(bad)", { XX } },
4177 { VEX_LEN_TABLE (VEX_LEN_D5_P_2) },
4178 { "(bad)", { XX } },
4179 },
4180
4181 /* PREFIX_VEX_D6 */
4182 {
4183 { "(bad)", { XX } },
4184 { "(bad)", { XX } },
4185 { VEX_LEN_TABLE (VEX_LEN_D6_P_2) },
4186 { "(bad)", { XX } },
4187 },
4188
4189 /* PREFIX_VEX_D7 */
4190 {
4191 { "(bad)", { XX } },
4192 { "(bad)", { XX } },
4193 { MOD_TABLE (MOD_VEX_D7_PREFIX_2) },
4194 { "(bad)", { XX } },
4195 },
4196
4197 /* PREFIX_VEX_D8 */
4198 {
4199 { "(bad)", { XX } },
4200 { "(bad)", { XX } },
4201 { VEX_LEN_TABLE (VEX_LEN_D8_P_2) },
4202 { "(bad)", { XX } },
4203 },
4204
4205 /* PREFIX_VEX_D9 */
4206 {
4207 { "(bad)", { XX } },
4208 { "(bad)", { XX } },
4209 { VEX_LEN_TABLE (VEX_LEN_D9_P_2) },
4210 { "(bad)", { XX } },
4211 },
4212
4213 /* PREFIX_VEX_DA */
4214 {
4215 { "(bad)", { XX } },
4216 { "(bad)", { XX } },
4217 { VEX_LEN_TABLE (VEX_LEN_DA_P_2) },
4218 { "(bad)", { XX } },
4219 },
4220
4221 /* PREFIX_VEX_DB */
4222 {
4223 { "(bad)", { XX } },
4224 { "(bad)", { XX } },
4225 { VEX_LEN_TABLE (VEX_LEN_DB_P_2) },
4226 { "(bad)", { XX } },
4227 },
4228
4229 /* PREFIX_VEX_DC */
4230 {
4231 { "(bad)", { XX } },
4232 { "(bad)", { XX } },
4233 { VEX_LEN_TABLE (VEX_LEN_DC_P_2) },
4234 { "(bad)", { XX } },
4235 },
4236
4237 /* PREFIX_VEX_DD */
4238 {
4239 { "(bad)", { XX } },
4240 { "(bad)", { XX } },
4241 { VEX_LEN_TABLE (VEX_LEN_DD_P_2) },
4242 { "(bad)", { XX } },
4243 },
4244
4245 /* PREFIX_VEX_DE */
4246 {
4247 { "(bad)", { XX } },
4248 { "(bad)", { XX } },
4249 { VEX_LEN_TABLE (VEX_LEN_DE_P_2) },
4250 { "(bad)", { XX } },
4251 },
4252
4253 /* PREFIX_VEX_DF */
4254 {
4255 { "(bad)", { XX } },
4256 { "(bad)", { XX } },
4257 { VEX_LEN_TABLE (VEX_LEN_DF_P_2) },
4258 { "(bad)", { XX } },
4259 },
4260
4261 /* PREFIX_VEX_E0 */
4262 {
4263 { "(bad)", { XX } },
4264 { "(bad)", { XX } },
4265 { VEX_LEN_TABLE (VEX_LEN_E0_P_2) },
4266 { "(bad)", { XX } },
4267 },
4268
4269 /* PREFIX_VEX_E1 */
4270 {
4271 { "(bad)", { XX } },
4272 { "(bad)", { XX } },
4273 { VEX_LEN_TABLE (VEX_LEN_E1_P_2) },
4274 { "(bad)", { XX } },
4275 },
4276
4277 /* PREFIX_VEX_E2 */
4278 {
4279 { "(bad)", { XX } },
4280 { "(bad)", { XX } },
4281 { VEX_LEN_TABLE (VEX_LEN_E2_P_2) },
4282 { "(bad)", { XX } },
4283 },
4284
4285 /* PREFIX_VEX_E3 */
4286 {
4287 { "(bad)", { XX } },
4288 { "(bad)", { XX } },
4289 { VEX_LEN_TABLE (VEX_LEN_E3_P_2) },
4290 { "(bad)", { XX } },
4291 },
4292
4293 /* PREFIX_VEX_E4 */
4294 {
4295 { "(bad)", { XX } },
4296 { "(bad)", { XX } },
4297 { VEX_LEN_TABLE (VEX_LEN_E4_P_2) },
4298 { "(bad)", { XX } },
4299 },
4300
4301 /* PREFIX_VEX_E5 */
4302 {
4303 { "(bad)", { XX } },
4304 { "(bad)", { XX } },
4305 { VEX_LEN_TABLE (VEX_LEN_E5_P_2) },
4306 { "(bad)", { XX } },
4307 },
4308
4309 /* PREFIX_VEX_E6 */
4310 {
4311 { "(bad)", { XX } },
9e30b8e0
L
4312 { VEX_W_TABLE (VEX_W_E6_P_1) },
4313 { VEX_W_TABLE (VEX_W_E6_P_2) },
4314 { VEX_W_TABLE (VEX_W_E6_P_3) },
c0f3af97
L
4315 },
4316
4317 /* PREFIX_VEX_E7 */
4318 {
4319 { "(bad)", { XX } },
4320 { "(bad)", { XX } },
4321 { MOD_TABLE (MOD_VEX_E7_PREFIX_2) },
4322 { "(bad)", { XX } },
4323 },
4324
4325 /* PREFIX_VEX_E8 */
4326 {
4327 { "(bad)", { XX } },
4328 { "(bad)", { XX } },
4329 { VEX_LEN_TABLE (VEX_LEN_E8_P_2) },
4330 { "(bad)", { XX } },
4331 },
4332
4333 /* PREFIX_VEX_E9 */
4334 {
4335 { "(bad)", { XX } },
4336 { "(bad)", { XX } },
4337 { VEX_LEN_TABLE (VEX_LEN_E9_P_2) },
4338 { "(bad)", { XX } },
4339 },
4340
4341 /* PREFIX_VEX_EA */
4342 {
4343 { "(bad)", { XX } },
4344 { "(bad)", { XX } },
4345 { VEX_LEN_TABLE (VEX_LEN_EA_P_2) },
4346 { "(bad)", { XX } },
4347 },
4348
4349 /* PREFIX_VEX_EB */
4350 {
4351 { "(bad)", { XX } },
4352 { "(bad)", { XX } },
4353 { VEX_LEN_TABLE (VEX_LEN_EB_P_2) },
4354 { "(bad)", { XX } },
4355 },
4356
4357 /* PREFIX_VEX_EC */
4358 {
4359 { "(bad)", { XX } },
4360 { "(bad)", { XX } },
4361 { VEX_LEN_TABLE (VEX_LEN_EC_P_2) },
4362 { "(bad)", { XX } },
4363 },
4364
4365 /* PREFIX_VEX_ED */
4366 {
4367 { "(bad)", { XX } },
4368 { "(bad)", { XX } },
4369 { VEX_LEN_TABLE (VEX_LEN_ED_P_2) },
4370 { "(bad)", { XX } },
4371 },
4372
4373 /* PREFIX_VEX_EE */
4374 {
4375 { "(bad)", { XX } },
4376 { "(bad)", { XX } },
4377 { VEX_LEN_TABLE (VEX_LEN_EE_P_2) },
4378 { "(bad)", { XX } },
4379 },
4380
4381 /* PREFIX_VEX_EF */
4382 {
4383 { "(bad)", { XX } },
4384 { "(bad)", { XX } },
4385 { VEX_LEN_TABLE (VEX_LEN_EF_P_2) },
4386 { "(bad)", { XX } },
4387 },
4388
4389 /* PREFIX_VEX_F0 */
4390 {
4391 { "(bad)", { XX } },
4392 { "(bad)", { XX } },
4393 { "(bad)", { XX } },
4394 { MOD_TABLE (MOD_VEX_F0_PREFIX_3) },
4395 },
4396
4397 /* PREFIX_VEX_F1 */
4398 {
4399 { "(bad)", { XX } },
4400 { "(bad)", { XX } },
4401 { VEX_LEN_TABLE (VEX_LEN_F1_P_2) },
4402 { "(bad)", { XX } },
4403 },
4404
4405 /* PREFIX_VEX_F2 */
4406 {
4407 { "(bad)", { XX } },
4408 { "(bad)", { XX } },
4409 { VEX_LEN_TABLE (VEX_LEN_F2_P_2) },
4410 { "(bad)", { XX } },
4411 },
4412
4413 /* PREFIX_VEX_F3 */
4414 {
4415 { "(bad)", { XX } },
4416 { "(bad)", { XX } },
4417 { VEX_LEN_TABLE (VEX_LEN_F3_P_2) },
4418 { "(bad)", { XX } },
4419 },
4420
4421 /* PREFIX_VEX_F4 */
4422 {
4423 { "(bad)", { XX } },
4424 { "(bad)", { XX } },
4425 { VEX_LEN_TABLE (VEX_LEN_F4_P_2) },
4426 { "(bad)", { XX } },
4427 },
4428
4429 /* PREFIX_VEX_F5 */
4430 {
4431 { "(bad)", { XX } },
4432 { "(bad)", { XX } },
4433 { VEX_LEN_TABLE (VEX_LEN_F5_P_2) },
4434 { "(bad)", { XX } },
4435 },
4436
4437 /* PREFIX_VEX_F6 */
4438 {
4439 { "(bad)", { XX } },
4440 { "(bad)", { XX } },
4441 { VEX_LEN_TABLE (VEX_LEN_F6_P_2) },
4442 { "(bad)", { XX } },
4443 },
4444
4445 /* PREFIX_VEX_F7 */
4446 {
4447 { "(bad)", { XX } },
4448 { "(bad)", { XX } },
4449 { VEX_LEN_TABLE (VEX_LEN_F7_P_2) },
4450 { "(bad)", { XX } },
4451 },
4452
4453 /* PREFIX_VEX_F8 */
4454 {
4455 { "(bad)", { XX } },
4456 { "(bad)", { XX } },
4457 { VEX_LEN_TABLE (VEX_LEN_F8_P_2) },
4458 { "(bad)", { XX } },
4459 },
4460
4461 /* PREFIX_VEX_F9 */
4462 {
4463 { "(bad)", { XX } },
4464 { "(bad)", { XX } },
4465 { VEX_LEN_TABLE (VEX_LEN_F9_P_2) },
4466 { "(bad)", { XX } },
4467 },
4468
4469 /* PREFIX_VEX_FA */
4470 {
4471 { "(bad)", { XX } },
4472 { "(bad)", { XX } },
4473 { VEX_LEN_TABLE (VEX_LEN_FA_P_2) },
4474 { "(bad)", { XX } },
4475 },
4476
4477 /* PREFIX_VEX_FB */
4478 {
4479 { "(bad)", { XX } },
4480 { "(bad)", { XX } },
4481 { VEX_LEN_TABLE (VEX_LEN_FB_P_2) },
4482 { "(bad)", { XX } },
4483 },
4484
4485 /* PREFIX_VEX_FC */
4486 {
4487 { "(bad)", { XX } },
4488 { "(bad)", { XX } },
4489 { VEX_LEN_TABLE (VEX_LEN_FC_P_2) },
4490 { "(bad)", { XX } },
4491 },
4492
4493 /* PREFIX_VEX_FD */
4494 {
4495 { "(bad)", { XX } },
4496 { "(bad)", { XX } },
4497 { VEX_LEN_TABLE (VEX_LEN_FD_P_2) },
4498 { "(bad)", { XX } },
4499 },
4500
4501 /* PREFIX_VEX_FE */
4502 {
4503 { "(bad)", { XX } },
4504 { "(bad)", { XX } },
4505 { VEX_LEN_TABLE (VEX_LEN_FE_P_2) },
4506 { "(bad)", { XX } },
4507 },
4508
4509 /* PREFIX_VEX_3800 */
4510 {
4511 { "(bad)", { XX } },
4512 { "(bad)", { XX } },
4513 { VEX_LEN_TABLE (VEX_LEN_3800_P_2) },
4514 { "(bad)", { XX } },
4515 },
4516
4517 /* PREFIX_VEX_3801 */
4518 {
4519 { "(bad)", { XX } },
4520 { "(bad)", { XX } },
4521 { VEX_LEN_TABLE (VEX_LEN_3801_P_2) },
4522 { "(bad)", { XX } },
4523 },
4524
4525 /* PREFIX_VEX_3802 */
4526 {
4527 { "(bad)", { XX } },
4528 { "(bad)", { XX } },
4529 { VEX_LEN_TABLE (VEX_LEN_3802_P_2) },
4530 { "(bad)", { XX } },
4531 },
4532
4533 /* PREFIX_VEX_3803 */
4534 {
4535 { "(bad)", { XX } },
4536 { "(bad)", { XX } },
4537 { VEX_LEN_TABLE (VEX_LEN_3803_P_2) },
4538 { "(bad)", { XX } },
4539 },
4540
4541 /* PREFIX_VEX_3804 */
4542 {
4543 { "(bad)", { XX } },
4544 { "(bad)", { XX } },
4545 { VEX_LEN_TABLE (VEX_LEN_3804_P_2) },
4546 { "(bad)", { XX } },
4547 },
4548
4549 /* PREFIX_VEX_3805 */
4550 {
4551 { "(bad)", { XX } },
4552 { "(bad)", { XX } },
4553 { VEX_LEN_TABLE (VEX_LEN_3805_P_2) },
4554 { "(bad)", { XX } },
4555 },
4556
4557 /* PREFIX_VEX_3806 */
4558 {
4559 { "(bad)", { XX } },
4560 { "(bad)", { XX } },
4561 { VEX_LEN_TABLE (VEX_LEN_3806_P_2) },
4562 { "(bad)", { XX } },
4563 },
4564
4565 /* PREFIX_VEX_3807 */
4566 {
4567 { "(bad)", { XX } },
4568 { "(bad)", { XX } },
4569 { VEX_LEN_TABLE (VEX_LEN_3807_P_2) },
4570 { "(bad)", { XX } },
4571 },
4572
4573 /* PREFIX_VEX_3808 */
4574 {
4575 { "(bad)", { XX } },
4576 { "(bad)", { XX } },
4577 { VEX_LEN_TABLE (VEX_LEN_3808_P_2) },
4578 { "(bad)", { XX } },
4579 },
4580
4581 /* PREFIX_VEX_3809 */
4582 {
4583 { "(bad)", { XX } },
4584 { "(bad)", { XX } },
4585 { VEX_LEN_TABLE (VEX_LEN_3809_P_2) },
4586 { "(bad)", { XX } },
4587 },
4588
4589 /* PREFIX_VEX_380A */
4590 {
4591 { "(bad)", { XX } },
4592 { "(bad)", { XX } },
4593 { VEX_LEN_TABLE (VEX_LEN_380A_P_2) },
4594 { "(bad)", { XX } },
4595 },
4596
4597 /* PREFIX_VEX_380B */
4598 {
4599 { "(bad)", { XX } },
4600 { "(bad)", { XX } },
4601 { VEX_LEN_TABLE (VEX_LEN_380B_P_2) },
4602 { "(bad)", { XX } },
4603 },
4604
4605 /* PREFIX_VEX_380C */
4606 {
4607 { "(bad)", { XX } },
4608 { "(bad)", { XX } },
9e30b8e0 4609 { VEX_W_TABLE (VEX_W_380C_P_2) },
c0f3af97
L
4610 { "(bad)", { XX } },
4611 },
4612
4613 /* PREFIX_VEX_380D */
4614 {
4615 { "(bad)", { XX } },
4616 { "(bad)", { XX } },
9e30b8e0 4617 { VEX_W_TABLE (VEX_W_380D_P_2) },
c0f3af97
L
4618 { "(bad)", { XX } },
4619 },
4620
4621 /* PREFIX_VEX_380E */
4622 {
4623 { "(bad)", { XX } },
4624 { "(bad)", { XX } },
9e30b8e0 4625 { VEX_W_TABLE (VEX_W_380E_P_2) },
c0f3af97
L
4626 { "(bad)", { XX } },
4627 },
4628
4629 /* PREFIX_VEX_380F */
4630 {
4631 { "(bad)", { XX } },
4632 { "(bad)", { XX } },
9e30b8e0 4633 { VEX_W_TABLE (VEX_W_380F_P_2) },
c0f3af97
L
4634 { "(bad)", { XX } },
4635 },
4636
4637 /* PREFIX_VEX_3817 */
4638 {
4639 { "(bad)", { XX } },
4640 { "(bad)", { XX } },
9e30b8e0 4641 { VEX_W_TABLE (VEX_W_3817_P_2) },
c0f3af97
L
4642 { "(bad)", { XX } },
4643 },
4644
4645 /* PREFIX_VEX_3818 */
4646 {
4647 { "(bad)", { XX } },
4648 { "(bad)", { XX } },
4649 { MOD_TABLE (MOD_VEX_3818_PREFIX_2) },
4650 { "(bad)", { XX } },
4651 },
4652
4653 /* PREFIX_VEX_3819 */
4654 {
4655 { "(bad)", { XX } },
4656 { "(bad)", { XX } },
4657 { MOD_TABLE (MOD_VEX_3819_PREFIX_2) },
4658 { "(bad)", { XX } },
4659 },
4660
4661 /* PREFIX_VEX_381A */
4662 {
4663 { "(bad)", { XX } },
4664 { "(bad)", { XX } },
4665 { MOD_TABLE (MOD_VEX_381A_PREFIX_2) },
4666 { "(bad)", { XX } },
4667 },
4668
4669 /* PREFIX_VEX_381C */
4670 {
4671 { "(bad)", { XX } },
4672 { "(bad)", { XX } },
4673 { VEX_LEN_TABLE (VEX_LEN_381C_P_2) },
4674 { "(bad)", { XX } },
4675 },
4676
4677 /* PREFIX_VEX_381D */
4678 {
4679 { "(bad)", { XX } },
4680 { "(bad)", { XX } },
4681 { VEX_LEN_TABLE (VEX_LEN_381D_P_2) },
4682 { "(bad)", { XX } },
4683 },
4684
4685 /* PREFIX_VEX_381E */
4686 {
4687 { "(bad)", { XX } },
4688 { "(bad)", { XX } },
4689 { VEX_LEN_TABLE (VEX_LEN_381E_P_2) },
4690 { "(bad)", { XX } },
4691 },
4692
4693 /* PREFIX_VEX_3820 */
4694 {
4695 { "(bad)", { XX } },
4696 { "(bad)", { XX } },
4697 { VEX_LEN_TABLE (VEX_LEN_3820_P_2) },
4698 { "(bad)", { XX } },
4699 },
4700
4701 /* PREFIX_VEX_3821 */
4702 {
4703 { "(bad)", { XX } },
4704 { "(bad)", { XX } },
4705 { VEX_LEN_TABLE (VEX_LEN_3821_P_2) },
4706 { "(bad)", { XX } },
4707 },
4708
4709 /* PREFIX_VEX_3822 */
4710 {
4711 { "(bad)", { XX } },
4712 { "(bad)", { XX } },
4713 { VEX_LEN_TABLE (VEX_LEN_3822_P_2) },
4714 { "(bad)", { XX } },
4715 },
4716
4717 /* PREFIX_VEX_3823 */
4718 {
4719 { "(bad)", { XX } },
4720 { "(bad)", { XX } },
4721 { VEX_LEN_TABLE (VEX_LEN_3823_P_2) },
4722 { "(bad)", { XX } },
4723 },
4724
4725 /* PREFIX_VEX_3824 */
4726 {
4727 { "(bad)", { XX } },
4728 { "(bad)", { XX } },
4729 { VEX_LEN_TABLE (VEX_LEN_3824_P_2) },
4730 { "(bad)", { XX } },
4731 },
4732
4733 /* PREFIX_VEX_3825 */
4734 {
4735 { "(bad)", { XX } },
4736 { "(bad)", { XX } },
4737 { VEX_LEN_TABLE (VEX_LEN_3825_P_2) },
4738 { "(bad)", { XX } },
4739 },
4740
4741 /* PREFIX_VEX_3828 */
4742 {
4743 { "(bad)", { XX } },
4744 { "(bad)", { XX } },
4745 { VEX_LEN_TABLE (VEX_LEN_3828_P_2) },
4746 { "(bad)", { XX } },
4747 },
4748
4749 /* PREFIX_VEX_3829 */
4750 {
4751 { "(bad)", { XX } },
4752 { "(bad)", { XX } },
4753 { VEX_LEN_TABLE (VEX_LEN_3829_P_2) },
4754 { "(bad)", { XX } },
4755 },
4756
4757 /* PREFIX_VEX_382A */
4758 {
4759 { "(bad)", { XX } },
4760 { "(bad)", { XX } },
4761 { MOD_TABLE (MOD_VEX_382A_PREFIX_2) },
4762 { "(bad)", { XX } },
4763 },
4764
4765 /* PREFIX_VEX_382B */
4766 {
4767 { "(bad)", { XX } },
4768 { "(bad)", { XX } },
4769 { VEX_LEN_TABLE (VEX_LEN_382B_P_2) },
4770 { "(bad)", { XX } },
4771 },
4772
4773 /* PREFIX_VEX_382C */
4774 {
4775 { "(bad)", { XX } },
4776 { "(bad)", { XX } },
4777 { MOD_TABLE (MOD_VEX_382C_PREFIX_2) },
4778 { "(bad)", { XX } },
4779 },
4780
4781 /* PREFIX_VEX_382D */
4782 {
4783 { "(bad)", { XX } },
4784 { "(bad)", { XX } },
4785 { MOD_TABLE (MOD_VEX_382D_PREFIX_2) },
4786 { "(bad)", { XX } },
4787 },
4788
4789 /* PREFIX_VEX_382E */
4790 {
4791 { "(bad)", { XX } },
4792 { "(bad)", { XX } },
4793 { MOD_TABLE (MOD_VEX_382E_PREFIX_2) },
4794 { "(bad)", { XX } },
4795 },
4796
4797 /* PREFIX_VEX_382F */
4798 {
4799 { "(bad)", { XX } },
4800 { "(bad)", { XX } },
4801 { MOD_TABLE (MOD_VEX_382F_PREFIX_2) },
4802 { "(bad)", { XX } },
4803 },
4804
4805 /* PREFIX_VEX_3830 */
4806 {
4807 { "(bad)", { XX } },
4808 { "(bad)", { XX } },
4809 { VEX_LEN_TABLE (VEX_LEN_3830_P_2) },
4810 { "(bad)", { XX } },
4811 },
4812
4813 /* PREFIX_VEX_3831 */
4814 {
4815 { "(bad)", { XX } },
4816 { "(bad)", { XX } },
4817 { VEX_LEN_TABLE (VEX_LEN_3831_P_2) },
4818 { "(bad)", { XX } },
4819 },
4820
4821 /* PREFIX_VEX_3832 */
4822 {
4823 { "(bad)", { XX } },
4824 { "(bad)", { XX } },
4825 { VEX_LEN_TABLE (VEX_LEN_3832_P_2) },
4826 { "(bad)", { XX } },
4827 },
4828
4829 /* PREFIX_VEX_3833 */
4830 {
4831 { "(bad)", { XX } },
4832 { "(bad)", { XX } },
4833 { VEX_LEN_TABLE (VEX_LEN_3833_P_2) },
4834 { "(bad)", { XX } },
4835 },
4836
4837 /* PREFIX_VEX_3834 */
4838 {
4839 { "(bad)", { XX } },
4840 { "(bad)", { XX } },
4841 { VEX_LEN_TABLE (VEX_LEN_3834_P_2) },
4842 { "(bad)", { XX } },
4843 },
4844
4845 /* PREFIX_VEX_3835 */
4846 {
4847 { "(bad)", { XX } },
4848 { "(bad)", { XX } },
4849 { VEX_LEN_TABLE (VEX_LEN_3835_P_2) },
4850 { "(bad)", { XX } },
4851 },
4852
4853 /* PREFIX_VEX_3837 */
4854 {
4855 { "(bad)", { XX } },
4856 { "(bad)", { XX } },
4857 { VEX_LEN_TABLE (VEX_LEN_3837_P_2) },
4858 { "(bad)", { XX } },
4859 },
4860
4861 /* PREFIX_VEX_3838 */
4862 {
4863 { "(bad)", { XX } },
4864 { "(bad)", { XX } },
4865 { VEX_LEN_TABLE (VEX_LEN_3838_P_2) },
4866 { "(bad)", { XX } },
4867 },
4868
4869 /* PREFIX_VEX_3839 */
4870 {
4871 { "(bad)", { XX } },
4872 { "(bad)", { XX } },
4873 { VEX_LEN_TABLE (VEX_LEN_3839_P_2) },
4874 { "(bad)", { XX } },
4875 },
4876
4877 /* PREFIX_VEX_383A */
4878 {
4879 { "(bad)", { XX } },
4880 { "(bad)", { XX } },
4881 { VEX_LEN_TABLE (VEX_LEN_383A_P_2) },
4882 { "(bad)", { XX } },
4883 },
4884
4885 /* PREFIX_VEX_383B */
4886 {
4887 { "(bad)", { XX } },
4888 { "(bad)", { XX } },
4889 { VEX_LEN_TABLE (VEX_LEN_383B_P_2) },
4890 { "(bad)", { XX } },
4891 },
4892
4893 /* PREFIX_VEX_383C */
4894 {
4895 { "(bad)", { XX } },
4896 { "(bad)", { XX } },
4897 { VEX_LEN_TABLE (VEX_LEN_383C_P_2) },
4898 { "(bad)", { XX } },
4899 },
4900
4901 /* PREFIX_VEX_383D */
4902 {
4903 { "(bad)", { XX } },
4904 { "(bad)", { XX } },
4905 { VEX_LEN_TABLE (VEX_LEN_383D_P_2) },
4906 { "(bad)", { XX } },
4907 },
4908
4909 /* PREFIX_VEX_383E */
4910 {
4911 { "(bad)", { XX } },
4912 { "(bad)", { XX } },
4913 { VEX_LEN_TABLE (VEX_LEN_383E_P_2) },
4914 { "(bad)", { XX } },
4915 },
4916
4917 /* PREFIX_VEX_383F */
4918 {
4919 { "(bad)", { XX } },
4920 { "(bad)", { XX } },
4921 { VEX_LEN_TABLE (VEX_LEN_383F_P_2) },
4922 { "(bad)", { XX } },
4923 },
4924
4925 /* PREFIX_VEX_3840 */
4926 {
4927 { "(bad)", { XX } },
4928 { "(bad)", { XX } },
4929 { VEX_LEN_TABLE (VEX_LEN_3840_P_2) },
4930 { "(bad)", { XX } },
4931 },
4932
4933 /* PREFIX_VEX_3841 */
4934 {
4935 { "(bad)", { XX } },
4936 { "(bad)", { XX } },
4937 { VEX_LEN_TABLE (VEX_LEN_3841_P_2) },
4938 { "(bad)", { XX } },
4939 },
4940
0bfee649 4941 /* PREFIX_VEX_3896 */
a5ff0eb2
L
4942 {
4943 { "(bad)", { XX } },
4944 { "(bad)", { XX } },
0bfee649 4945 { "vfmaddsub132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4946 { "(bad)", { XX } },
4947 },
4948
0bfee649 4949 /* PREFIX_VEX_3897 */
a5ff0eb2
L
4950 {
4951 { "(bad)", { XX } },
4952 { "(bad)", { XX } },
0bfee649 4953 { "vfmsubadd132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4954 { "(bad)", { XX } },
4955 },
4956
0bfee649 4957 /* PREFIX_VEX_3898 */
a5ff0eb2
L
4958 {
4959 { "(bad)", { XX } },
4960 { "(bad)", { XX } },
0bfee649 4961 { "vfmadd132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4962 { "(bad)", { XX } },
4963 },
4964
0bfee649 4965 /* PREFIX_VEX_3899 */
a5ff0eb2
L
4966 {
4967 { "(bad)", { XX } },
4968 { "(bad)", { XX } },
0bfee649 4969 { "vfmadd132s%XW", { XM, Vex, EXVexWdq } },
a5ff0eb2
L
4970 { "(bad)", { XX } },
4971 },
4972
0bfee649 4973 /* PREFIX_VEX_389A */
a5ff0eb2
L
4974 {
4975 { "(bad)", { XX } },
4976 { "(bad)", { XX } },
0bfee649 4977 { "vfmsub132p%XW", { XM, Vex, EXx } },
a5ff0eb2
L
4978 { "(bad)", { XX } },
4979 },
4980
0bfee649 4981 /* PREFIX_VEX_389B */
c0f3af97
L
4982 {
4983 { "(bad)", { XX } },
4984 { "(bad)", { XX } },
0bfee649 4985 { "vfmsub132s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
4986 { "(bad)", { XX } },
4987 },
4988
0bfee649 4989 /* PREFIX_VEX_389C */
c0f3af97
L
4990 {
4991 { "(bad)", { XX } },
4992 { "(bad)", { XX } },
0bfee649 4993 { "vfnmadd132p%XW", { XM, Vex, EXx } },
c0f3af97
L
4994 { "(bad)", { XX } },
4995 },
4996
0bfee649 4997 /* PREFIX_VEX_389D */
c0f3af97
L
4998 {
4999 { "(bad)", { XX } },
5000 { "(bad)", { XX } },
0bfee649 5001 { "vfnmadd132s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5002 { "(bad)", { XX } },
5003 },
5004
0bfee649 5005 /* PREFIX_VEX_389E */
c0f3af97
L
5006 {
5007 { "(bad)", { XX } },
5008 { "(bad)", { XX } },
0bfee649 5009 { "vfnmsub132p%XW", { XM, Vex, EXx } },
c0f3af97
L
5010 { "(bad)", { XX } },
5011 },
5012
0bfee649 5013 /* PREFIX_VEX_389F */
c0f3af97
L
5014 {
5015 { "(bad)", { XX } },
5016 { "(bad)", { XX } },
0bfee649 5017 { "vfnmsub132s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5018 { "(bad)", { XX } },
5019 },
5020
0bfee649 5021 /* PREFIX_VEX_38A6 */
c0f3af97
L
5022 {
5023 { "(bad)", { XX } },
5024 { "(bad)", { XX } },
0bfee649 5025 { "vfmaddsub213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5026 { "(bad)", { XX } },
5027 },
5028
0bfee649 5029 /* PREFIX_VEX_38A7 */
c0f3af97
L
5030 {
5031 { "(bad)", { XX } },
5032 { "(bad)", { XX } },
0bfee649 5033 { "vfmsubadd213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5034 { "(bad)", { XX } },
5035 },
5036
0bfee649 5037 /* PREFIX_VEX_38A8 */
c0f3af97
L
5038 {
5039 { "(bad)", { XX } },
5040 { "(bad)", { XX } },
0bfee649 5041 { "vfmadd213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5042 { "(bad)", { XX } },
5043 },
5044
0bfee649 5045 /* PREFIX_VEX_38A9 */
c0f3af97
L
5046 {
5047 { "(bad)", { XX } },
5048 { "(bad)", { XX } },
0bfee649 5049 { "vfmadd213s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5050 { "(bad)", { XX } },
5051 },
5052
0bfee649 5053 /* PREFIX_VEX_38AA */
c0f3af97
L
5054 {
5055 { "(bad)", { XX } },
5056 { "(bad)", { XX } },
0bfee649 5057 { "vfmsub213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5058 { "(bad)", { XX } },
5059 },
5060
0bfee649 5061 /* PREFIX_VEX_38AB */
c0f3af97
L
5062 {
5063 { "(bad)", { XX } },
5064 { "(bad)", { XX } },
0bfee649 5065 { "vfmsub213s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5066 { "(bad)", { XX } },
5067 },
5068
0bfee649 5069 /* PREFIX_VEX_38AC */
c0f3af97
L
5070 {
5071 { "(bad)", { XX } },
5072 { "(bad)", { XX } },
0bfee649 5073 { "vfnmadd213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5074 { "(bad)", { XX } },
5075 },
5076
0bfee649 5077 /* PREFIX_VEX_38AD */
c0f3af97
L
5078 {
5079 { "(bad)", { XX } },
5080 { "(bad)", { XX } },
0bfee649 5081 { "vfnmadd213s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5082 { "(bad)", { XX } },
5083 },
5084
0bfee649 5085 /* PREFIX_VEX_38AE */
c0f3af97
L
5086 {
5087 { "(bad)", { XX } },
5088 { "(bad)", { XX } },
0bfee649 5089 { "vfnmsub213p%XW", { XM, Vex, EXx } },
c0f3af97
L
5090 { "(bad)", { XX } },
5091 },
5092
0bfee649 5093 /* PREFIX_VEX_38AF */
c0f3af97
L
5094 {
5095 { "(bad)", { XX } },
5096 { "(bad)", { XX } },
0bfee649 5097 { "vfnmsub213s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5098 { "(bad)", { XX } },
5099 },
5100
0bfee649 5101 /* PREFIX_VEX_38B6 */
c0f3af97
L
5102 {
5103 { "(bad)", { XX } },
5104 { "(bad)", { XX } },
0bfee649 5105 { "vfmaddsub231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5106 { "(bad)", { XX } },
5107 },
5108
0bfee649 5109 /* PREFIX_VEX_38B7 */
c0f3af97
L
5110 {
5111 { "(bad)", { XX } },
5112 { "(bad)", { XX } },
0bfee649 5113 { "vfmsubadd231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5114 { "(bad)", { XX } },
5115 },
5116
0bfee649 5117 /* PREFIX_VEX_38B8 */
c0f3af97
L
5118 {
5119 { "(bad)", { XX } },
5120 { "(bad)", { XX } },
0bfee649 5121 { "vfmadd231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5122 { "(bad)", { XX } },
5123 },
5124
0bfee649 5125 /* PREFIX_VEX_38B9 */
c0f3af97
L
5126 {
5127 { "(bad)", { XX } },
5128 { "(bad)", { XX } },
0bfee649 5129 { "vfmadd231s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5130 { "(bad)", { XX } },
5131 },
5132
0bfee649 5133 /* PREFIX_VEX_38BA */
c0f3af97
L
5134 {
5135 { "(bad)", { XX } },
5136 { "(bad)", { XX } },
0bfee649 5137 { "vfmsub231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5138 { "(bad)", { XX } },
5139 },
5140
0bfee649 5141 /* PREFIX_VEX_38BB */
c0f3af97
L
5142 {
5143 { "(bad)", { XX } },
5144 { "(bad)", { XX } },
0bfee649 5145 { "vfmsub231s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5146 { "(bad)", { XX } },
5147 },
5148
0bfee649 5149 /* PREFIX_VEX_38BC */
c0f3af97
L
5150 {
5151 { "(bad)", { XX } },
5152 { "(bad)", { XX } },
0bfee649 5153 { "vfnmadd231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5154 { "(bad)", { XX } },
5155 },
5156
0bfee649 5157 /* PREFIX_VEX_38BD */
c0f3af97
L
5158 {
5159 { "(bad)", { XX } },
5160 { "(bad)", { XX } },
0bfee649 5161 { "vfnmadd231s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5162 { "(bad)", { XX } },
5163 },
5164
0bfee649 5165 /* PREFIX_VEX_38BE */
c0f3af97
L
5166 {
5167 { "(bad)", { XX } },
5168 { "(bad)", { XX } },
0bfee649 5169 { "vfnmsub231p%XW", { XM, Vex, EXx } },
c0f3af97
L
5170 { "(bad)", { XX } },
5171 },
5172
0bfee649 5173 /* PREFIX_VEX_38BF */
c0f3af97
L
5174 {
5175 { "(bad)", { XX } },
5176 { "(bad)", { XX } },
0bfee649 5177 { "vfnmsub231s%XW", { XM, Vex, EXVexWdq } },
c0f3af97
L
5178 { "(bad)", { XX } },
5179 },
5180
0bfee649 5181 /* PREFIX_VEX_38DB */
c0f3af97
L
5182 {
5183 { "(bad)", { XX } },
5184 { "(bad)", { XX } },
0bfee649 5185 { VEX_LEN_TABLE (VEX_LEN_38DB_P_2) },
c0f3af97
L
5186 { "(bad)", { XX } },
5187 },
5188
0bfee649 5189 /* PREFIX_VEX_38DC */
c0f3af97
L
5190 {
5191 { "(bad)", { XX } },
5192 { "(bad)", { XX } },
0bfee649 5193 { VEX_LEN_TABLE (VEX_LEN_38DC_P_2) },
c0f3af97
L
5194 { "(bad)", { XX } },
5195 },
5196
0bfee649 5197 /* PREFIX_VEX_38DD */
c0f3af97
L
5198 {
5199 { "(bad)", { XX } },
5200 { "(bad)", { XX } },
0bfee649 5201 { VEX_LEN_TABLE (VEX_LEN_38DD_P_2) },
c0f3af97
L
5202 { "(bad)", { XX } },
5203 },
5204
0bfee649 5205 /* PREFIX_VEX_38DE */
c0f3af97
L
5206 {
5207 { "(bad)", { XX } },
5208 { "(bad)", { XX } },
0bfee649 5209 { VEX_LEN_TABLE (VEX_LEN_38DE_P_2) },
c0f3af97
L
5210 { "(bad)", { XX } },
5211 },
5212
0bfee649 5213 /* PREFIX_VEX_38DF */
c0f3af97
L
5214 {
5215 { "(bad)", { XX } },
5216 { "(bad)", { XX } },
0bfee649 5217 { VEX_LEN_TABLE (VEX_LEN_38DF_P_2) },
c0f3af97
L
5218 { "(bad)", { XX } },
5219 },
5220
0bfee649 5221 /* PREFIX_VEX_3A04 */
c0f3af97
L
5222 {
5223 { "(bad)", { XX } },
5224 { "(bad)", { XX } },
9e30b8e0 5225 { VEX_W_TABLE (VEX_W_3A04_P_2) },
c0f3af97
L
5226 { "(bad)", { XX } },
5227 },
5228
0bfee649 5229 /* PREFIX_VEX_3A05 */
c0f3af97
L
5230 {
5231 { "(bad)", { XX } },
5232 { "(bad)", { XX } },
9e30b8e0 5233 { VEX_W_TABLE (VEX_W_3A05_P_2) },
c0f3af97
L
5234 { "(bad)", { XX } },
5235 },
5236
0bfee649 5237 /* PREFIX_VEX_3A06 */
c0f3af97
L
5238 {
5239 { "(bad)", { XX } },
5240 { "(bad)", { XX } },
0bfee649 5241 { VEX_LEN_TABLE (VEX_LEN_3A06_P_2) },
c0f3af97
L
5242 { "(bad)", { XX } },
5243 },
5244
0bfee649 5245 /* PREFIX_VEX_3A08 */
c0f3af97
L
5246 {
5247 { "(bad)", { XX } },
5248 { "(bad)", { XX } },
9e30b8e0 5249 { VEX_W_TABLE (VEX_W_3A08_P_2) },
c0f3af97
L
5250 { "(bad)", { XX } },
5251 },
5252
0bfee649 5253 /* PREFIX_VEX_3A09 */
c0f3af97
L
5254 {
5255 { "(bad)", { XX } },
5256 { "(bad)", { XX } },
9e30b8e0 5257 { VEX_W_TABLE (VEX_W_3A09_P_2) },
c0f3af97
L
5258 { "(bad)", { XX } },
5259 },
5260
0bfee649 5261 /* PREFIX_VEX_3A0A */
c0f3af97
L
5262 {
5263 { "(bad)", { XX } },
5264 { "(bad)", { XX } },
0bfee649
L
5265 { VEX_LEN_TABLE (VEX_LEN_3A0A_P_2) },
5266 { "(bad)", { XX } },
5267 },
5268
5269 /* PREFIX_VEX_3A0B */
5270 {
5271 { "(bad)", { XX } },
5272 { "(bad)", { XX } },
5273 { VEX_LEN_TABLE (VEX_LEN_3A0B_P_2) },
5274 { "(bad)", { XX } },
5275 },
5276
5277 /* PREFIX_VEX_3A0C */
5278 {
5279 { "(bad)", { XX } },
5280 { "(bad)", { XX } },
9e30b8e0 5281 { VEX_W_TABLE (VEX_W_3A0C_P_2) },
0bfee649
L
5282 { "(bad)", { XX } },
5283 },
5284
5285 /* PREFIX_VEX_3A0D */
5286 {
5287 { "(bad)", { XX } },
5288 { "(bad)", { XX } },
9e30b8e0 5289 { VEX_W_TABLE (VEX_W_3A0D_P_2) },
c0f3af97
L
5290 { "(bad)", { XX } },
5291 },
5292
0bfee649
L
5293 /* PREFIX_VEX_3A0E */
5294 {
5295 { "(bad)", { XX } },
5296 { "(bad)", { XX } },
5297 { VEX_LEN_TABLE (VEX_LEN_3A0E_P_2) },
5298 { "(bad)", { XX } },
5299 },
5300
5301 /* PREFIX_VEX_3A0F */
5302 {
5303 { "(bad)", { XX } },
5304 { "(bad)", { XX } },
5305 { VEX_LEN_TABLE (VEX_LEN_3A0F_P_2) },
5306 { "(bad)", { XX } },
5307 },
5308
5309 /* PREFIX_VEX_3A14 */
5310 {
5311 { "(bad)", { XX } },
5312 { "(bad)", { XX } },
5313 { VEX_LEN_TABLE (VEX_LEN_3A14_P_2) },
5314 { "(bad)", { XX } },
5315 },
5316
5317 /* PREFIX_VEX_3A15 */
5318 {
5319 { "(bad)", { XX } },
5320 { "(bad)", { XX } },
5321 { VEX_LEN_TABLE (VEX_LEN_3A15_P_2) },
5322 { "(bad)", { XX } },
5323 },
5324
5325 /* PREFIX_VEX_3A16 */
c0f3af97
L
5326 {
5327 { "(bad)", { XX } },
5328 { "(bad)", { XX } },
0bfee649 5329 { VEX_LEN_TABLE (VEX_LEN_3A16_P_2) },
c0f3af97
L
5330 { "(bad)", { XX } },
5331 },
5332
0bfee649 5333 /* PREFIX_VEX_3A17 */
c0f3af97
L
5334 {
5335 { "(bad)", { XX } },
5336 { "(bad)", { XX } },
0bfee649 5337 { VEX_LEN_TABLE (VEX_LEN_3A17_P_2) },
c0f3af97
L
5338 { "(bad)", { XX } },
5339 },
5340
0bfee649 5341 /* PREFIX_VEX_3A18 */
c0f3af97
L
5342 {
5343 { "(bad)", { XX } },
5344 { "(bad)", { XX } },
0bfee649 5345 { VEX_LEN_TABLE (VEX_LEN_3A18_P_2) },
c0f3af97
L
5346 { "(bad)", { XX } },
5347 },
5348
0bfee649 5349 /* PREFIX_VEX_3A19 */
c0f3af97
L
5350 {
5351 { "(bad)", { XX } },
5352 { "(bad)", { XX } },
0bfee649 5353 { VEX_LEN_TABLE (VEX_LEN_3A19_P_2) },
c0f3af97
L
5354 { "(bad)", { XX } },
5355 },
5356
0bfee649 5357 /* PREFIX_VEX_3A20 */
c0f3af97
L
5358 {
5359 { "(bad)", { XX } },
5360 { "(bad)", { XX } },
0bfee649 5361 { VEX_LEN_TABLE (VEX_LEN_3A20_P_2) },
c0f3af97
L
5362 { "(bad)", { XX } },
5363 },
5364
0bfee649 5365 /* PREFIX_VEX_3A21 */
c0f3af97
L
5366 {
5367 { "(bad)", { XX } },
5368 { "(bad)", { XX } },
0bfee649 5369 { VEX_LEN_TABLE (VEX_LEN_3A21_P_2) },
c0f3af97
L
5370 { "(bad)", { XX } },
5371 },
5372
0bfee649
L
5373 /* PREFIX_VEX_3A22 */
5374 {
5375 { "(bad)", { XX } },
5376 { "(bad)", { XX } },
5377 { VEX_LEN_TABLE (VEX_LEN_3A22_P_2) },
5378 { "(bad)", { XX } },
5379 },
5380
5381 /* PREFIX_VEX_3A40 */
c0f3af97
L
5382 {
5383 { "(bad)", { XX } },
5384 { "(bad)", { XX } },
9e30b8e0 5385 { VEX_W_TABLE (VEX_W_3A40_P_2) },
c0f3af97
L
5386 { "(bad)", { XX } },
5387 },
5388
0bfee649 5389 /* PREFIX_VEX_3A41 */
c0f3af97
L
5390 {
5391 { "(bad)", { XX } },
5392 { "(bad)", { XX } },
0bfee649 5393 { VEX_LEN_TABLE (VEX_LEN_3A41_P_2) },
c0f3af97
L
5394 { "(bad)", { XX } },
5395 },
5396
0bfee649 5397 /* PREFIX_VEX_3A42 */
c0f3af97
L
5398 {
5399 { "(bad)", { XX } },
5400 { "(bad)", { XX } },
0bfee649 5401 { VEX_LEN_TABLE (VEX_LEN_3A42_P_2) },
c0f3af97
L
5402 { "(bad)", { XX } },
5403 },
5404
ce2f5b3c
L
5405 /* PREFIX_VEX_3A44 */
5406 {
5407 { "(bad)", { XX } },
5408 { "(bad)", { XX } },
5409 { VEX_LEN_TABLE (VEX_LEN_3A44_P_2) },
5410 { "(bad)", { XX } },
5411 },
5412
0bfee649 5413 /* PREFIX_VEX_3A4A */
c0f3af97
L
5414 {
5415 { "(bad)", { XX } },
5416 { "(bad)", { XX } },
9e30b8e0 5417 { VEX_W_TABLE (VEX_W_3A4A_P_2) },
c0f3af97
L
5418 { "(bad)", { XX } },
5419 },
5420
0bfee649 5421 /* PREFIX_VEX_3A4B */
c0f3af97
L
5422 {
5423 { "(bad)", { XX } },
5424 { "(bad)", { XX } },
9e30b8e0 5425 { VEX_W_TABLE (VEX_W_3A4B_P_2) },
c0f3af97
L
5426 { "(bad)", { XX } },
5427 },
5428
0bfee649 5429 /* PREFIX_VEX_3A4C */
c0f3af97
L
5430 {
5431 { "(bad)", { XX } },
5432 { "(bad)", { XX } },
0bfee649 5433 { VEX_LEN_TABLE (VEX_LEN_3A4C_P_2) },
c0f3af97
L
5434 { "(bad)", { XX } },
5435 },
5436
922d8de8
DR
5437 /* PREFIX_VEX_3A5C */
5438 {
5439 { "(bad)", { XX } },
5440 { "(bad)", { XX } },
206c2556 5441 { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5442 { "(bad)", { XX } },
5443 },
5444
5445 /* PREFIX_VEX_3A5D */
5446 {
5447 { "(bad)", { XX } },
5448 { "(bad)", { XX } },
206c2556 5449 { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5450 { "(bad)", { XX } },
5451 },
5452
5453 /* PREFIX_VEX_3A5E */
5454 {
5455 { "(bad)", { XX } },
5456 { "(bad)", { XX } },
206c2556 5457 { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5458 { "(bad)", { XX } },
5459 },
5460
5461 /* PREFIX_VEX_3A5F */
5462 {
5463 { "(bad)", { XX } },
5464 { "(bad)", { XX } },
206c2556 5465 { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5466 { "(bad)", { XX } },
5467 },
5468
0bfee649 5469 /* PREFIX_VEX_3A60 */
c0f3af97
L
5470 {
5471 { "(bad)", { XX } },
5472 { "(bad)", { XX } },
0bfee649 5473 { VEX_LEN_TABLE (VEX_LEN_3A60_P_2) },
c0f3af97
L
5474 { "(bad)", { XX } },
5475 },
5476
0bfee649 5477 /* PREFIX_VEX_3A61 */
c0f3af97
L
5478 {
5479 { "(bad)", { XX } },
5480 { "(bad)", { XX } },
0bfee649 5481 { VEX_LEN_TABLE (VEX_LEN_3A61_P_2) },
c0f3af97
L
5482 { "(bad)", { XX } },
5483 },
5484
0bfee649 5485 /* PREFIX_VEX_3A62 */
c0f3af97
L
5486 {
5487 { "(bad)", { XX } },
5488 { "(bad)", { XX } },
0bfee649 5489 { VEX_LEN_TABLE (VEX_LEN_3A62_P_2) },
c0f3af97
L
5490 { "(bad)", { XX } },
5491 },
5492
0bfee649 5493 /* PREFIX_VEX_3A63 */
c0f3af97
L
5494 {
5495 { "(bad)", { XX } },
5496 { "(bad)", { XX } },
0bfee649 5497 { VEX_LEN_TABLE (VEX_LEN_3A63_P_2) },
c0f3af97
L
5498 { "(bad)", { XX } },
5499 },
a5ff0eb2 5500
922d8de8
DR
5501 /* PREFIX_VEX_3A68 */
5502 {
5503 { "(bad)", { XX } },
5504 { "(bad)", { XX } },
206c2556 5505 { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5506 { "(bad)", { XX } },
5507 },
5508
5509 /* PREFIX_VEX_3A69 */
5510 {
5511 { "(bad)", { XX } },
5512 { "(bad)", { XX } },
206c2556 5513 { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5514 { "(bad)", { XX } },
5515 },
5516
5517 /* PREFIX_VEX_3A6A */
5518 {
5519 { "(bad)", { XX } },
5520 { "(bad)", { XX } },
5521 { VEX_LEN_TABLE (VEX_LEN_3A6A_P_2) },
5522 { "(bad)", { XX } },
5523 },
5524
5525 /* PREFIX_VEX_3A6B */
5526 {
5527 { "(bad)", { XX } },
5528 { "(bad)", { XX } },
5529 { VEX_LEN_TABLE (VEX_LEN_3A6B_P_2) },
5530 { "(bad)", { XX } },
5531 },
5532
5533 /* PREFIX_VEX_3A6C */
5534 {
5535 { "(bad)", { XX } },
5536 { "(bad)", { XX } },
206c2556 5537 { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5538 { "(bad)", { XX } },
5539 },
5540
5541 /* PREFIX_VEX_3A6D */
5542 {
5543 { "(bad)", { XX } },
5544 { "(bad)", { XX } },
206c2556 5545 { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5546 { "(bad)", { XX } },
5547 },
5548
5549 /* PREFIX_VEX_3A6E */
5550 {
5551 { "(bad)", { XX } },
5552 { "(bad)", { XX } },
5553 { VEX_LEN_TABLE (VEX_LEN_3A6E_P_2) },
5554 { "(bad)", { XX } },
5555 },
5556
5557 /* PREFIX_VEX_3A6F */
5558 {
5559 { "(bad)", { XX } },
5560 { "(bad)", { XX } },
5561 { VEX_LEN_TABLE (VEX_LEN_3A6F_P_2) },
5562 { "(bad)", { XX } },
5563 },
5564
5565 /* PREFIX_VEX_3A78 */
5566 {
5567 { "(bad)", { XX } },
5568 { "(bad)", { XX } },
206c2556 5569 { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5570 { "(bad)", { XX } },
5571 },
5572
5573 /* PREFIX_VEX_3A79 */
5574 {
5575 { "(bad)", { XX } },
5576 { "(bad)", { XX } },
206c2556 5577 { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5578 { "(bad)", { XX } },
5579 },
5580
5581 /* PREFIX_VEX_3A7A */
5582 {
5583 { "(bad)", { XX } },
5584 { "(bad)", { XX } },
5585 { VEX_LEN_TABLE (VEX_LEN_3A7A_P_2) },
5586 { "(bad)", { XX } },
5587 },
5588
5589 /* PREFIX_VEX_3A7B */
5590 {
5591 { "(bad)", { XX } },
5592 { "(bad)", { XX } },
5593 { VEX_LEN_TABLE (VEX_LEN_3A7B_P_2) },
5594 { "(bad)", { XX } },
5595 },
5596
5597 /* PREFIX_VEX_3A7C */
5598 {
5599 { "(bad)", { XX } },
5600 { "(bad)", { XX } },
206c2556 5601 { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5602 { "(bad)", { XX } },
5603 },
5604
5605 /* PREFIX_VEX_3A7D */
5606 {
5607 { "(bad)", { XX } },
5608 { "(bad)", { XX } },
206c2556 5609 { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
922d8de8
DR
5610 { "(bad)", { XX } },
5611 },
5612
5613 /* PREFIX_VEX_3A7E */
5614 {
5615 { "(bad)", { XX } },
5616 { "(bad)", { XX } },
5617 { VEX_LEN_TABLE (VEX_LEN_3A7E_P_2) },
5618 { "(bad)", { XX } },
5619 },
5620
5621 /* PREFIX_VEX_3A7F */
5622 {
5623 { "(bad)", { XX } },
5624 { "(bad)", { XX } },
5625 { VEX_LEN_TABLE (VEX_LEN_3A7F_P_2) },
5626 { "(bad)", { XX } },
5627 },
5628
a5ff0eb2
L
5629 /* PREFIX_VEX_3ADF */
5630 {
5631 { "(bad)", { XX } },
5632 { "(bad)", { XX } },
5633 { VEX_LEN_TABLE (VEX_LEN_3ADF_P_2) },
5634 { "(bad)", { XX } },
5635 },
c0f3af97
L
5636};
5637
5638static const struct dis386 x86_64_table[][2] = {
5639 /* X86_64_06 */
5640 {
5641 { "push{T|}", { es } },
5642 { "(bad)", { XX } },
5643 },
5644
5645 /* X86_64_07 */
5646 {
5647 { "pop{T|}", { es } },
5648 { "(bad)", { XX } },
5649 },
5650
5651 /* X86_64_0D */
5652 {
5653 { "push{T|}", { cs } },
5654 { "(bad)", { XX } },
5655 },
5656
5657 /* X86_64_16 */
5658 {
5659 { "push{T|}", { ss } },
5660 { "(bad)", { XX } },
5661 },
5662
5663 /* X86_64_17 */
5664 {
5665 { "pop{T|}", { ss } },
5666 { "(bad)", { XX } },
5667 },
5668
5669 /* X86_64_1E */
5670 {
5671 { "push{T|}", { ds } },
5672 { "(bad)", { XX } },
5673 },
5674
5675 /* X86_64_1F */
5676 {
5677 { "pop{T|}", { ds } },
5678 { "(bad)", { XX } },
5679 },
5680
5681 /* X86_64_27 */
5682 {
5683 { "daa", { XX } },
5684 { "(bad)", { XX } },
5685 },
5686
5687 /* X86_64_2F */
5688 {
5689 { "das", { XX } },
5690 { "(bad)", { XX } },
5691 },
5692
5693 /* X86_64_37 */
5694 {
5695 { "aaa", { XX } },
5696 { "(bad)", { XX } },
5697 },
5698
5699 /* X86_64_3F */
5700 {
5701 { "aas", { XX } },
5702 { "(bad)", { XX } },
5703 },
5704
5705 /* X86_64_60 */
5706 {
5707 { "pusha{P|}", { XX } },
5708 { "(bad)", { XX } },
5709 },
5710
5711 /* X86_64_61 */
5712 {
5713 { "popa{P|}", { XX } },
5714 { "(bad)", { XX } },
5715 },
5716
5717 /* X86_64_62 */
5718 {
5719 { MOD_TABLE (MOD_62_32BIT) },
5720 { "(bad)", { XX } },
5721 },
5722
5723 /* X86_64_63 */
5724 {
5725 { "arpl", { Ew, Gw } },
5726 { "movs{lq|xd}", { Gv, Ed } },
5727 },
5728
5729 /* X86_64_6D */
5730 {
5731 { "ins{R|}", { Yzr, indirDX } },
5732 { "ins{G|}", { Yzr, indirDX } },
5733 },
5734
5735 /* X86_64_6F */
5736 {
5737 { "outs{R|}", { indirDXr, Xz } },
5738 { "outs{G|}", { indirDXr, Xz } },
5739 },
5740
5741 /* X86_64_9A */
5742 {
5743 { "Jcall{T|}", { Ap } },
5744 { "(bad)", { XX } },
5745 },
5746
5747 /* X86_64_C4 */
5748 {
5749 { MOD_TABLE (MOD_C4_32BIT) },
5750 { VEX_C4_TABLE (VEX_0F) },
5751 },
5752
5753 /* X86_64_C5 */
5754 {
5755 { MOD_TABLE (MOD_C5_32BIT) },
5756 { VEX_C5_TABLE (VEX_0F) },
5757 },
5758
5759 /* X86_64_CE */
5760 {
5761 { "into", { XX } },
5762 { "(bad)", { XX } },
5763 },
5764
5765 /* X86_64_D4 */
5766 {
5767 { "aam", { sIb } },
5768 { "(bad)", { XX } },
5769 },
5770
5771 /* X86_64_D5 */
5772 {
5773 { "aad", { sIb } },
5774 { "(bad)", { XX } },
5775 },
5776
5777 /* X86_64_EA */
5778 {
5779 { "Jjmp{T|}", { Ap } },
5780 { "(bad)", { XX } },
5781 },
5782
5783 /* X86_64_0F01_REG_0 */
5784 {
5785 { "sgdt{Q|IQ}", { M } },
5786 { "sgdt", { M } },
5787 },
5788
5789 /* X86_64_0F01_REG_1 */
5790 {
5791 { "sidt{Q|IQ}", { M } },
5792 { "sidt", { M } },
5793 },
5794
5795 /* X86_64_0F01_REG_2 */
5796 {
5797 { "lgdt{Q|Q}", { M } },
5798 { "lgdt", { M } },
5799 },
5800
5801 /* X86_64_0F01_REG_3 */
5802 {
5803 { "lidt{Q|Q}", { M } },
5804 { "lidt", { M } },
5805 },
5806};
5807
5808static const struct dis386 three_byte_table[][256] = {
c1e679ec
DR
5809
5810 /* THREE_BYTE_0F38 */
c0f3af97
L
5811 {
5812 /* 00 */
c1e679ec
DR
5813 { "pshufb", { MX, EM } },
5814 { "phaddw", { MX, EM } },
5815 { "phaddd", { MX, EM } },
5816 { "phaddsw", { MX, EM } },
5817 { "pmaddubsw", { MX, EM } },
5818 { "phsubw", { MX, EM } },
5819 { "phsubd", { MX, EM } },
5820 { "phsubsw", { MX, EM } },
c0f3af97 5821 /* 08 */
c1e679ec
DR
5822 { "psignb", { MX, EM } },
5823 { "psignw", { MX, EM } },
5824 { "psignd", { MX, EM } },
5825 { "pmulhrsw", { MX, EM } },
c0f3af97
L
5826 { "(bad)", { XX } },
5827 { "(bad)", { XX } },
5828 { "(bad)", { XX } },
5829 { "(bad)", { XX } },
f88c9eb0
SP
5830 /* 10 */
5831 { PREFIX_TABLE (PREFIX_0F3810) },
5832 { "(bad)", { XX } },
5833 { "(bad)", { XX } },
5834 { "(bad)", { XX } },
5835 { PREFIX_TABLE (PREFIX_0F3814) },
5836 { PREFIX_TABLE (PREFIX_0F3815) },
5837 { "(bad)", { XX } },
5838 { PREFIX_TABLE (PREFIX_0F3817) },
5839 /* 18 */
5840 { "(bad)", { XX } },
5841 { "(bad)", { XX } },
5842 { "(bad)", { XX } },
5843 { "(bad)", { XX } },
5844 { "pabsb", { MX, EM } },
5845 { "pabsw", { MX, EM } },
5846 { "pabsd", { MX, EM } },
5847 { "(bad)", { XX } },
5848 /* 20 */
5849 { PREFIX_TABLE (PREFIX_0F3820) },
5850 { PREFIX_TABLE (PREFIX_0F3821) },
5851 { PREFIX_TABLE (PREFIX_0F3822) },
5852 { PREFIX_TABLE (PREFIX_0F3823) },
5853 { PREFIX_TABLE (PREFIX_0F3824) },
5854 { PREFIX_TABLE (PREFIX_0F3825) },
5855 { "(bad)", { XX } },
5856 { "(bad)", { XX } },
5857 /* 28 */
5858 { PREFIX_TABLE (PREFIX_0F3828) },
5859 { PREFIX_TABLE (PREFIX_0F3829) },
5860 { PREFIX_TABLE (PREFIX_0F382A) },
5861 { PREFIX_TABLE (PREFIX_0F382B) },
5862 { "(bad)", { XX } },
5863 { "(bad)", { XX } },
5864 { "(bad)", { XX } },
5865 { "(bad)", { XX } },
5866 /* 30 */
5867 { PREFIX_TABLE (PREFIX_0F3830) },
5868 { PREFIX_TABLE (PREFIX_0F3831) },
5869 { PREFIX_TABLE (PREFIX_0F3832) },
5870 { PREFIX_TABLE (PREFIX_0F3833) },
5871 { PREFIX_TABLE (PREFIX_0F3834) },
5872 { PREFIX_TABLE (PREFIX_0F3835) },
5873 { "(bad)", { XX } },
5874 { PREFIX_TABLE (PREFIX_0F3837) },
5875 /* 38 */
5876 { PREFIX_TABLE (PREFIX_0F3838) },
5877 { PREFIX_TABLE (PREFIX_0F3839) },
5878 { PREFIX_TABLE (PREFIX_0F383A) },
5879 { PREFIX_TABLE (PREFIX_0F383B) },
5880 { PREFIX_TABLE (PREFIX_0F383C) },
5881 { PREFIX_TABLE (PREFIX_0F383D) },
5882 { PREFIX_TABLE (PREFIX_0F383E) },
5883 { PREFIX_TABLE (PREFIX_0F383F) },
5884 /* 40 */
5885 { PREFIX_TABLE (PREFIX_0F3840) },
5886 { PREFIX_TABLE (PREFIX_0F3841) },
5887 { "(bad)", { XX } },
5888 { "(bad)", { XX } },
5889 { "(bad)", { XX } },
5890 { "(bad)", { XX } },
5891 { "(bad)", { XX } },
5892 { "(bad)", { XX } },
5893 /* 48 */
5894 { "(bad)", { XX } },
5895 { "(bad)", { XX } },
5896 { "(bad)", { XX } },
5897 { "(bad)", { XX } },
5898 { "(bad)", { XX } },
5899 { "(bad)", { XX } },
5900 { "(bad)", { XX } },
5901 { "(bad)", { XX } },
5902 /* 50 */
5903 { "(bad)", { XX } },
5904 { "(bad)", { XX } },
5905 { "(bad)", { XX } },
5906 { "(bad)", { XX } },
5907 { "(bad)", { XX } },
5908 { "(bad)", { XX } },
5909 { "(bad)", { XX } },
5910 { "(bad)", { XX } },
5911 /* 58 */
5912 { "(bad)", { XX } },
5913 { "(bad)", { XX } },
5914 { "(bad)", { XX } },
5915 { "(bad)", { XX } },
5916 { "(bad)", { XX } },
5917 { "(bad)", { XX } },
5918 { "(bad)", { XX } },
5919 { "(bad)", { XX } },
5920 /* 60 */
5921 { "(bad)", { XX } },
5922 { "(bad)", { XX } },
5923 { "(bad)", { XX } },
5924 { "(bad)", { XX } },
5925 { "(bad)", { XX } },
5926 { "(bad)", { XX } },
5927 { "(bad)", { XX } },
5928 { "(bad)", { XX } },
5929 /* 68 */
5930 { "(bad)", { XX } },
5931 { "(bad)", { XX } },
5932 { "(bad)", { XX } },
5933 { "(bad)", { XX } },
5934 { "(bad)", { XX } },
5935 { "(bad)", { XX } },
5936 { "(bad)", { XX } },
5937 { "(bad)", { XX } },
5938 /* 70 */
5939 { "(bad)", { XX } },
5940 { "(bad)", { XX } },
5941 { "(bad)", { XX } },
5942 { "(bad)", { XX } },
5943 { "(bad)", { XX } },
5944 { "(bad)", { XX } },
5945 { "(bad)", { XX } },
5946 { "(bad)", { XX } },
5947 /* 78 */
5948 { "(bad)", { XX } },
5949 { "(bad)", { XX } },
5950 { "(bad)", { XX } },
5951 { "(bad)", { XX } },
5952 { "(bad)", { XX } },
5953 { "(bad)", { XX } },
5954 { "(bad)", { XX } },
5955 { "(bad)", { XX } },
5956 /* 80 */
5957 { PREFIX_TABLE (PREFIX_0F3880) },
5958 { PREFIX_TABLE (PREFIX_0F3881) },
5959 { "(bad)", { XX } },
5960 { "(bad)", { XX } },
5961 { "(bad)", { XX } },
5962 { "(bad)", { XX } },
5963 { "(bad)", { XX } },
5964 { "(bad)", { XX } },
5965 /* 88 */
5966 { "(bad)", { XX } },
5967 { "(bad)", { XX } },
5968 { "(bad)", { XX } },
5969 { "(bad)", { XX } },
5970 { "(bad)", { XX } },
5971 { "(bad)", { XX } },
5972 { "(bad)", { XX } },
5973 { "(bad)", { XX } },
5974 /* 90 */
5975 { "(bad)", { XX } },
5976 { "(bad)", { XX } },
5977 { "(bad)", { XX } },
5978 { "(bad)", { XX } },
5979 { "(bad)", { XX } },
5980 { "(bad)", { XX } },
5981 { "(bad)", { XX } },
5982 { "(bad)", { XX } },
5983 /* 98 */
5984 { "(bad)", { XX } },
5985 { "(bad)", { XX } },
5986 { "(bad)", { XX } },
5987 { "(bad)", { XX } },
5988 { "(bad)", { XX } },
5989 { "(bad)", { XX } },
5990 { "(bad)", { XX } },
5991 { "(bad)", { XX } },
5992 /* a0 */
5993 { "(bad)", { XX } },
5994 { "(bad)", { XX } },
5995 { "(bad)", { XX } },
5996 { "(bad)", { XX } },
5997 { "(bad)", { XX } },
5998 { "(bad)", { XX } },
5999 { "(bad)", { XX } },
6000 { "(bad)", { XX } },
6001 /* a8 */
6002 { "(bad)", { XX } },
6003 { "(bad)", { XX } },
6004 { "(bad)", { XX } },
6005 { "(bad)", { XX } },
6006 { "(bad)", { XX } },
6007 { "(bad)", { XX } },
6008 { "(bad)", { XX } },
6009 { "(bad)", { XX } },
6010 /* b0 */
6011 { "(bad)", { XX } },
6012 { "(bad)", { XX } },
6013 { "(bad)", { XX } },
6014 { "(bad)", { XX } },
6015 { "(bad)", { XX } },
6016 { "(bad)", { XX } },
6017 { "(bad)", { XX } },
6018 { "(bad)", { XX } },
6019 /* b8 */
6020 { "(bad)", { XX } },
6021 { "(bad)", { XX } },
6022 { "(bad)", { XX } },
6023 { "(bad)", { XX } },
6024 { "(bad)", { XX } },
6025 { "(bad)", { XX } },
6026 { "(bad)", { XX } },
6027 { "(bad)", { XX } },
6028 /* c0 */
6029 { "(bad)", { XX } },
6030 { "(bad)", { XX } },
6031 { "(bad)", { XX } },
6032 { "(bad)", { XX } },
6033 { "(bad)", { XX } },
6034 { "(bad)", { XX } },
6035 { "(bad)", { XX } },
6036 { "(bad)", { XX } },
6037 /* c8 */
6038 { "(bad)", { XX } },
6039 { "(bad)", { XX } },
6040 { "(bad)", { XX } },
6041 { "(bad)", { XX } },
6042 { "(bad)", { XX } },
6043 { "(bad)", { XX } },
6044 { "(bad)", { XX } },
6045 { "(bad)", { XX } },
6046 /* d0 */
6047 { "(bad)", { XX } },
6048 { "(bad)", { XX } },
6049 { "(bad)", { XX } },
6050 { "(bad)", { XX } },
6051 { "(bad)", { XX } },
6052 { "(bad)", { XX } },
6053 { "(bad)", { XX } },
6054 { "(bad)", { XX } },
6055 /* d8 */
6056 { "(bad)", { XX } },
6057 { "(bad)", { XX } },
6058 { "(bad)", { XX } },
6059 { PREFIX_TABLE (PREFIX_0F38DB) },
6060 { PREFIX_TABLE (PREFIX_0F38DC) },
6061 { PREFIX_TABLE (PREFIX_0F38DD) },
6062 { PREFIX_TABLE (PREFIX_0F38DE) },
6063 { PREFIX_TABLE (PREFIX_0F38DF) },
6064 /* e0 */
6065 { "(bad)", { XX } },
6066 { "(bad)", { XX } },
6067 { "(bad)", { XX } },
6068 { "(bad)", { XX } },
6069 { "(bad)", { XX } },
6070 { "(bad)", { XX } },
6071 { "(bad)", { XX } },
6072 { "(bad)", { XX } },
6073 /* e8 */
6074 { "(bad)", { XX } },
6075 { "(bad)", { XX } },
6076 { "(bad)", { XX } },
6077 { "(bad)", { XX } },
6078 { "(bad)", { XX } },
6079 { "(bad)", { XX } },
6080 { "(bad)", { XX } },
6081 { "(bad)", { XX } },
6082 /* f0 */
6083 { PREFIX_TABLE (PREFIX_0F38F0) },
6084 { PREFIX_TABLE (PREFIX_0F38F1) },
6085 { "(bad)", { XX } },
6086 { "(bad)", { XX } },
6087 { "(bad)", { XX } },
6088 { "(bad)", { XX } },
6089 { "(bad)", { XX } },
6090 { "(bad)", { XX } },
6091 /* f8 */
6092 { "(bad)", { XX } },
6093 { "(bad)", { XX } },
6094 { "(bad)", { XX } },
6095 { "(bad)", { XX } },
6096 { "(bad)", { XX } },
6097 { "(bad)", { XX } },
6098 { "(bad)", { XX } },
6099 { "(bad)", { XX } },
6100 },
6101 /* THREE_BYTE_0F3A */
6102 {
6103 /* 00 */
6104 { "(bad)", { XX } },
6105 { "(bad)", { XX } },
6106 { "(bad)", { XX } },
6107 { "(bad)", { XX } },
6108 { "(bad)", { XX } },
6109 { "(bad)", { XX } },
6110 { "(bad)", { XX } },
6111 { "(bad)", { XX } },
6112 /* 08 */
6113 { PREFIX_TABLE (PREFIX_0F3A08) },
6114 { PREFIX_TABLE (PREFIX_0F3A09) },
6115 { PREFIX_TABLE (PREFIX_0F3A0A) },
6116 { PREFIX_TABLE (PREFIX_0F3A0B) },
6117 { PREFIX_TABLE (PREFIX_0F3A0C) },
6118 { PREFIX_TABLE (PREFIX_0F3A0D) },
6119 { PREFIX_TABLE (PREFIX_0F3A0E) },
6120 { "palignr", { MX, EM, Ib } },
6121 /* 10 */
6122 { "(bad)", { XX } },
6123 { "(bad)", { XX } },
6124 { "(bad)", { XX } },
6125 { "(bad)", { XX } },
6126 { PREFIX_TABLE (PREFIX_0F3A14) },
6127 { PREFIX_TABLE (PREFIX_0F3A15) },
6128 { PREFIX_TABLE (PREFIX_0F3A16) },
6129 { PREFIX_TABLE (PREFIX_0F3A17) },
6130 /* 18 */
6131 { "(bad)", { XX } },
6132 { "(bad)", { XX } },
6133 { "(bad)", { XX } },
6134 { "(bad)", { XX } },
6135 { "(bad)", { XX } },
6136 { "(bad)", { XX } },
6137 { "(bad)", { XX } },
6138 { "(bad)", { XX } },
6139 /* 20 */
6140 { PREFIX_TABLE (PREFIX_0F3A20) },
6141 { PREFIX_TABLE (PREFIX_0F3A21) },
6142 { PREFIX_TABLE (PREFIX_0F3A22) },
6143 { "(bad)", { XX } },
6144 { "(bad)", { XX } },
6145 { "(bad)", { XX } },
6146 { "(bad)", { XX } },
6147 { "(bad)", { XX } },
6148 /* 28 */
6149 { "(bad)", { XX } },
6150 { "(bad)", { XX } },
6151 { "(bad)", { XX } },
6152 { "(bad)", { XX } },
6153 { "(bad)", { XX } },
6154 { "(bad)", { XX } },
6155 { "(bad)", { XX } },
6156 { "(bad)", { XX } },
6157 /* 30 */
6158 { "(bad)", { XX } },
6159 { "(bad)", { XX } },
6160 { "(bad)", { XX } },
6161 { "(bad)", { XX } },
6162 { "(bad)", { XX } },
6163 { "(bad)", { XX } },
6164 { "(bad)", { XX } },
6165 { "(bad)", { XX } },
6166 /* 38 */
6167 { "(bad)", { XX } },
6168 { "(bad)", { XX } },
6169 { "(bad)", { XX } },
6170 { "(bad)", { XX } },
6171 { "(bad)", { XX } },
6172 { "(bad)", { XX } },
6173 { "(bad)", { XX } },
6174 { "(bad)", { XX } },
6175 /* 40 */
6176 { PREFIX_TABLE (PREFIX_0F3A40) },
6177 { PREFIX_TABLE (PREFIX_0F3A41) },
6178 { PREFIX_TABLE (PREFIX_0F3A42) },
6179 { "(bad)", { XX } },
6180 { PREFIX_TABLE (PREFIX_0F3A44) },
6181 { "(bad)", { XX } },
6182 { "(bad)", { XX } },
6183 { "(bad)", { XX } },
6184 /* 48 */
6185 { "(bad)", { XX } },
6186 { "(bad)", { XX } },
6187 { "(bad)", { XX } },
6188 { "(bad)", { XX } },
6189 { "(bad)", { XX } },
6190 { "(bad)", { XX } },
6191 { "(bad)", { XX } },
6192 { "(bad)", { XX } },
6193 /* 50 */
6194 { "(bad)", { XX } },
6195 { "(bad)", { XX } },
6196 { "(bad)", { XX } },
6197 { "(bad)", { XX } },
6198 { "(bad)", { XX } },
6199 { "(bad)", { XX } },
6200 { "(bad)", { XX } },
6201 { "(bad)", { XX } },
6202 /* 58 */
6203 { "(bad)", { XX } },
6204 { "(bad)", { XX } },
6205 { "(bad)", { XX } },
6206 { "(bad)", { XX } },
6207 { "(bad)", { XX } },
6208 { "(bad)", { XX } },
6209 { "(bad)", { XX } },
6210 { "(bad)", { XX } },
6211 /* 60 */
6212 { PREFIX_TABLE (PREFIX_0F3A60) },
6213 { PREFIX_TABLE (PREFIX_0F3A61) },
6214 { PREFIX_TABLE (PREFIX_0F3A62) },
6215 { PREFIX_TABLE (PREFIX_0F3A63) },
6216 { "(bad)", { XX } },
6217 { "(bad)", { XX } },
6218 { "(bad)", { XX } },
6219 { "(bad)", { XX } },
6220 /* 68 */
6221 { "(bad)", { XX } },
6222 { "(bad)", { XX } },
6223 { "(bad)", { XX } },
6224 { "(bad)", { XX } },
6225 { "(bad)", { XX } },
6226 { "(bad)", { XX } },
6227 { "(bad)", { XX } },
6228 { "(bad)", { XX } },
6229 /* 70 */
6230 { "(bad)", { XX } },
6231 { "(bad)", { XX } },
6232 { "(bad)", { XX } },
6233 { "(bad)", { XX } },
6234 { "(bad)", { XX } },
6235 { "(bad)", { XX } },
6236 { "(bad)", { XX } },
6237 { "(bad)", { XX } },
6238 /* 78 */
6239 { "(bad)", { XX } },
6240 { "(bad)", { XX } },
6241 { "(bad)", { XX } },
6242 { "(bad)", { XX } },
6243 { "(bad)", { XX } },
6244 { "(bad)", { XX } },
6245 { "(bad)", { XX } },
6246 { "(bad)", { XX } },
6247 /* 80 */
6248 { "(bad)", { XX } },
6249 { "(bad)", { XX } },
6250 { "(bad)", { XX } },
6251 { "(bad)", { XX } },
6252 { "(bad)", { XX } },
6253 { "(bad)", { XX } },
6254 { "(bad)", { XX } },
6255 { "(bad)", { XX } },
6256 /* 88 */
6257 { "(bad)", { XX } },
6258 { "(bad)", { XX } },
6259 { "(bad)", { XX } },
6260 { "(bad)", { XX } },
6261 { "(bad)", { XX } },
6262 { "(bad)", { XX } },
6263 { "(bad)", { XX } },
6264 { "(bad)", { XX } },
6265 /* 90 */
6266 { "(bad)", { XX } },
6267 { "(bad)", { XX } },
6268 { "(bad)", { XX } },
6269 { "(bad)", { XX } },
6270 { "(bad)", { XX } },
6271 { "(bad)", { XX } },
6272 { "(bad)", { XX } },
6273 { "(bad)", { XX } },
6274 /* 98 */
6275 { "(bad)", { XX } },
6276 { "(bad)", { XX } },
6277 { "(bad)", { XX } },
6278 { "(bad)", { XX } },
6279 { "(bad)", { XX } },
6280 { "(bad)", { XX } },
6281 { "(bad)", { XX } },
6282 { "(bad)", { XX } },
6283 /* a0 */
6284 { "(bad)", { XX } },
6285 { "(bad)", { XX } },
6286 { "(bad)", { XX } },
6287 { "(bad)", { XX } },
6288 { "(bad)", { XX } },
6289 { "(bad)", { XX } },
6290 { "(bad)", { XX } },
6291 { "(bad)", { XX } },
6292 /* a8 */
6293 { "(bad)", { XX } },
6294 { "(bad)", { XX } },
6295 { "(bad)", { XX } },
6296 { "(bad)", { XX } },
6297 { "(bad)", { XX } },
6298 { "(bad)", { XX } },
6299 { "(bad)", { XX } },
6300 { "(bad)", { XX } },
6301 /* b0 */
6302 { "(bad)", { XX } },
6303 { "(bad)", { XX } },
6304 { "(bad)", { XX } },
6305 { "(bad)", { XX } },
6306 { "(bad)", { XX } },
6307 { "(bad)", { XX } },
6308 { "(bad)", { XX } },
6309 { "(bad)", { XX } },
6310 /* b8 */
6311 { "(bad)", { XX } },
6312 { "(bad)", { XX } },
6313 { "(bad)", { XX } },
6314 { "(bad)", { XX } },
6315 { "(bad)", { XX } },
6316 { "(bad)", { XX } },
6317 { "(bad)", { XX } },
6318 { "(bad)", { XX } },
6319 /* c0 */
6320 { "(bad)", { XX } },
6321 { "(bad)", { XX } },
6322 { "(bad)", { XX } },
6323 { "(bad)", { XX } },
6324 { "(bad)", { XX } },
6325 { "(bad)", { XX } },
6326 { "(bad)", { XX } },
6327 { "(bad)", { XX } },
6328 /* c8 */
6329 { "(bad)", { XX } },
6330 { "(bad)", { XX } },
6331 { "(bad)", { XX } },
6332 { "(bad)", { XX } },
6333 { "(bad)", { XX } },
6334 { "(bad)", { XX } },
6335 { "(bad)", { XX } },
6336 { "(bad)", { XX } },
6337 /* d0 */
6338 { "(bad)", { XX } },
6339 { "(bad)", { XX } },
6340 { "(bad)", { XX } },
6341 { "(bad)", { XX } },
6342 { "(bad)", { XX } },
6343 { "(bad)", { XX } },
6344 { "(bad)", { XX } },
6345 { "(bad)", { XX } },
6346 /* d8 */
6347 { "(bad)", { XX } },
6348 { "(bad)", { XX } },
6349 { "(bad)", { XX } },
6350 { "(bad)", { XX } },
6351 { "(bad)", { XX } },
6352 { "(bad)", { XX } },
6353 { "(bad)", { XX } },
6354 { PREFIX_TABLE (PREFIX_0F3ADF) },
6355 /* e0 */
6356 { "(bad)", { XX } },
6357 { "(bad)", { XX } },
6358 { "(bad)", { XX } },
6359 { "(bad)", { XX } },
6360 { "(bad)", { XX } },
6361 { "(bad)", { XX } },
6362 { "(bad)", { XX } },
6363 { "(bad)", { XX } },
6364 /* e8 */
6365 { "(bad)", { XX } },
6366 { "(bad)", { XX } },
6367 { "(bad)", { XX } },
6368 { "(bad)", { XX } },
6369 { "(bad)", { XX } },
6370 { "(bad)", { XX } },
6371 { "(bad)", { XX } },
6372 { "(bad)", { XX } },
6373 /* f0 */
6374 { "(bad)", { XX } },
6375 { "(bad)", { XX } },
6376 { "(bad)", { XX } },
6377 { "(bad)", { XX } },
6378 { "(bad)", { XX } },
6379 { "(bad)", { XX } },
6380 { "(bad)", { XX } },
6381 { "(bad)", { XX } },
6382 /* f8 */
6383 { "(bad)", { XX } },
6384 { "(bad)", { XX } },
6385 { "(bad)", { XX } },
6386 { "(bad)", { XX } },
6387 { "(bad)", { XX } },
6388 { "(bad)", { XX } },
6389 { "(bad)", { XX } },
6390 { "(bad)", { XX } },
6391 },
6392
6393 /* THREE_BYTE_0F7A */
6394 {
6395 /* 00 */
6396 { "(bad)", { XX } },
6397 { "(bad)", { XX } },
6398 { "(bad)", { XX } },
6399 { "(bad)", { XX } },
6400 { "(bad)", { XX } },
6401 { "(bad)", { XX } },
6402 { "(bad)", { XX } },
6403 { "(bad)", { XX } },
6404 /* 08 */
6405 { "(bad)", { XX } },
6406 { "(bad)", { XX } },
6407 { "(bad)", { XX } },
6408 { "(bad)", { XX } },
6409 { "(bad)", { XX } },
6410 { "(bad)", { XX } },
6411 { "(bad)", { XX } },
6412 { "(bad)", { XX } },
6413 /* 10 */
6414 { "(bad)", { XX } },
6415 { "(bad)", { XX } },
6416 { "(bad)", { XX } },
6417 { "(bad)", { XX } },
6418 { "(bad)", { XX } },
6419 { "(bad)", { XX } },
6420 { "(bad)", { XX } },
6421 { "(bad)", { XX } },
6422 /* 18 */
6423 { "(bad)", { XX } },
6424 { "(bad)", { XX } },
6425 { "(bad)", { XX } },
6426 { "(bad)", { XX } },
6427 { "(bad)", { XX } },
6428 { "(bad)", { XX } },
6429 { "(bad)", { XX } },
6430 { "(bad)", { XX } },
6431 /* 20 */
6432 { "ptest", { XX } },
6433 { "(bad)", { XX } },
6434 { "(bad)", { XX } },
c0f3af97
L
6435 { "(bad)", { XX } },
6436 { "(bad)", { XX } },
6437 { "(bad)", { XX } },
6438 { "(bad)", { XX } },
6439 { "(bad)", { XX } },
f88c9eb0 6440 /* 28 */
c0f3af97
L
6441 { "(bad)", { XX } },
6442 { "(bad)", { XX } },
6443 { "(bad)", { XX } },
c0f3af97
L
6444 { "(bad)", { XX } },
6445 { "(bad)", { XX } },
6446 { "(bad)", { XX } },
6447 { "(bad)", { XX } },
6448 { "(bad)", { XX } },
f88c9eb0 6449 /* 30 */
c0f3af97
L
6450 { "(bad)", { XX } },
6451 { "(bad)", { XX } },
6452 { "(bad)", { XX } },
4e7d34a6
L
6453 { "(bad)", { XX } },
6454 { "(bad)", { XX } },
c0f3af97 6455 { "(bad)", { XX } },
c0f3af97
L
6456 { "(bad)", { XX } },
6457 { "(bad)", { XX } },
f88c9eb0 6458 /* 38 */
c0f3af97 6459 { "(bad)", { XX } },
4e7d34a6
L
6460 { "(bad)", { XX } },
6461 { "(bad)", { XX } },
6462 { "(bad)", { XX } },
6463 { "(bad)", { XX } },
4e7d34a6
L
6464 { "(bad)", { XX } },
6465 { "(bad)", { XX } },
6466 { "(bad)", { XX } },
f88c9eb0 6467 /* 40 */
4e7d34a6 6468 { "(bad)", { XX } },
f88c9eb0
SP
6469 { "phaddbw", { XM, EXq } },
6470 { "phaddbd", { XM, EXq } },
6471 { "phaddbq", { XM, EXq } },
4e7d34a6
L
6472 { "(bad)", { XX } },
6473 { "(bad)", { XX } },
f88c9eb0
SP
6474 { "phaddwd", { XM, EXq } },
6475 { "phaddwq", { XM, EXq } },
6476 /* 48 */
4e7d34a6
L
6477 { "(bad)", { XX } },
6478 { "(bad)", { XX } },
4e7d34a6 6479 { "(bad)", { XX } },
f88c9eb0 6480 { "phadddq", { XM, EXq } },
4e7d34a6
L
6481 { "(bad)", { XX } },
6482 { "(bad)", { XX } },
6483 { "(bad)", { XX } },
6484 { "(bad)", { XX } },
f88c9eb0 6485 /* 50 */
4e7d34a6 6486 { "(bad)", { XX } },
f88c9eb0
SP
6487 { "phaddubw", { XM, EXq } },
6488 { "phaddubd", { XM, EXq } },
6489 { "phaddubq", { XM, EXq } },
4e7d34a6
L
6490 { "(bad)", { XX } },
6491 { "(bad)", { XX } },
f88c9eb0
SP
6492 { "phadduwd", { XM, EXq } },
6493 { "phadduwq", { XM, EXq } },
6494 /* 58 */
4e7d34a6
L
6495 { "(bad)", { XX } },
6496 { "(bad)", { XX } },
6497 { "(bad)", { XX } },
f88c9eb0 6498 { "phaddudq", { XM, EXq } },
4e7d34a6 6499 { "(bad)", { XX } },
c1e679ec
DR
6500 { "(bad)", { XX } },
6501 { "(bad)", { XX } },
6502 { "(bad)", { XX } },
f88c9eb0 6503 /* 60 */
c1e679ec 6504 { "(bad)", { XX } },
f88c9eb0
SP
6505 { "phsubbw", { XM, EXq } },
6506 { "phsubbd", { XM, EXq } },
6507 { "phsubbq", { XM, EXq } },
4e7d34a6
L
6508 { "(bad)", { XX } },
6509 { "(bad)", { XX } },
6510 { "(bad)", { XX } },
6511 { "(bad)", { XX } },
6512 /* 68 */
6513 { "(bad)", { XX } },
6514 { "(bad)", { XX } },
6515 { "(bad)", { XX } },
6516 { "(bad)", { XX } },
6517 { "(bad)", { XX } },
6518 { "(bad)", { XX } },
6519 { "(bad)", { XX } },
6520 { "(bad)", { XX } },
85f10a01 6521 /* 70 */
4e7d34a6
L
6522 { "(bad)", { XX } },
6523 { "(bad)", { XX } },
6524 { "(bad)", { XX } },
6525 { "(bad)", { XX } },
6526 { "(bad)", { XX } },
6527 { "(bad)", { XX } },
6528 { "(bad)", { XX } },
6529 { "(bad)", { XX } },
85f10a01 6530 /* 78 */
4e7d34a6
L
6531 { "(bad)", { XX } },
6532 { "(bad)", { XX } },
6533 { "(bad)", { XX } },
6534 { "(bad)", { XX } },
6535 { "(bad)", { XX } },
6536 { "(bad)", { XX } },
6537 { "(bad)", { XX } },
6538 { "(bad)", { XX } },
85f10a01 6539 /* 80 */
f88c9eb0
SP
6540 { "(bad)", { XX } },
6541 { "(bad)", { XX } },
4e7d34a6
L
6542 { "(bad)", { XX } },
6543 { "(bad)", { XX } },
6544 { "(bad)", { XX } },
c0f3af97
L
6545 { "(bad)", { XX } },
6546 { "(bad)", { XX } },
6547 { "(bad)", { XX } },
85f10a01 6548 /* 88 */
4e7d34a6
L
6549 { "(bad)", { XX } },
6550 { "(bad)", { XX } },
6551 { "(bad)", { XX } },
6552 { "(bad)", { XX } },
6553 { "(bad)", { XX } },
6554 { "(bad)", { XX } },
c0f3af97
L
6555 { "(bad)", { XX } },
6556 { "(bad)", { XX } },
85f10a01 6557 /* 90 */
4e7d34a6
L
6558 { "(bad)", { XX } },
6559 { "(bad)", { XX } },
6560 { "(bad)", { XX } },
6561 { "(bad)", { XX } },
6562 { "(bad)", { XX } },
c0f3af97
L
6563 { "(bad)", { XX } },
6564 { "(bad)", { XX } },
6565 { "(bad)", { XX } },
85f10a01 6566 /* 98 */
4e7d34a6
L
6567 { "(bad)", { XX } },
6568 { "(bad)", { XX } },
6569 { "(bad)", { XX } },
6570 { "(bad)", { XX } },
6571 { "(bad)", { XX } },
6572 { "(bad)", { XX } },
c0f3af97
L
6573 { "(bad)", { XX } },
6574 { "(bad)", { XX } },
85f10a01 6575 /* a0 */
4e7d34a6
L
6576 { "(bad)", { XX } },
6577 { "(bad)", { XX } },
6578 { "(bad)", { XX } },
6579 { "(bad)", { XX } },
6580 { "(bad)", { XX } },
6581 { "(bad)", { XX } },
c0f3af97 6582 { "(bad)", { XX } },
4e7d34a6 6583 { "(bad)", { XX } },
85f10a01 6584 /* a8 */
4e7d34a6
L
6585 { "(bad)", { XX } },
6586 { "(bad)", { XX } },
6587 { "(bad)", { XX } },
6588 { "(bad)", { XX } },
6589 { "(bad)", { XX } },
6590 { "(bad)", { XX } },
6591 { "(bad)", { XX } },
6592 { "(bad)", { XX } },
85f10a01 6593 /* b0 */
4e7d34a6
L
6594 { "(bad)", { XX } },
6595 { "(bad)", { XX } },
6596 { "(bad)", { XX } },
6597 { "(bad)", { XX } },
6598 { "(bad)", { XX } },
6599 { "(bad)", { XX } },
c0f3af97 6600 { "(bad)", { XX } },
4e7d34a6 6601 { "(bad)", { XX } },
85f10a01 6602 /* b8 */
4e7d34a6
L
6603 { "(bad)", { XX } },
6604 { "(bad)", { XX } },
6605 { "(bad)", { XX } },
6606 { "(bad)", { XX } },
6607 { "(bad)", { XX } },
6608 { "(bad)", { XX } },
6609 { "(bad)", { XX } },
6610 { "(bad)", { XX } },
85f10a01 6611 /* c0 */
4e7d34a6
L
6612 { "(bad)", { XX } },
6613 { "(bad)", { XX } },
6614 { "(bad)", { XX } },
6615 { "(bad)", { XX } },
6616 { "(bad)", { XX } },
6617 { "(bad)", { XX } },
6618 { "(bad)", { XX } },
6619 { "(bad)", { XX } },
85f10a01 6620 /* c8 */
4e7d34a6
L
6621 { "(bad)", { XX } },
6622 { "(bad)", { XX } },
6623 { "(bad)", { XX } },
6624 { "(bad)", { XX } },
6625 { "(bad)", { XX } },
6626 { "(bad)", { XX } },
6627 { "(bad)", { XX } },
6628 { "(bad)", { XX } },
85f10a01 6629 /* d0 */
4e7d34a6
L
6630 { "(bad)", { XX } },
6631 { "(bad)", { XX } },
6632 { "(bad)", { XX } },
6633 { "(bad)", { XX } },
6634 { "(bad)", { XX } },
6635 { "(bad)", { XX } },
6636 { "(bad)", { XX } },
6637 { "(bad)", { XX } },
85f10a01 6638 /* d8 */
4e7d34a6
L
6639 { "(bad)", { XX } },
6640 { "(bad)", { XX } },
6641 { "(bad)", { XX } },
f88c9eb0
SP
6642 { "(bad)", { XX } },
6643 { "(bad)", { XX } },
6644 { "(bad)", { XX } },
6645 { "(bad)", { XX } },
6646 { "(bad)", { XX } },
85f10a01 6647 /* e0 */
4e7d34a6
L
6648 { "(bad)", { XX } },
6649 { "(bad)", { XX } },
6650 { "(bad)", { XX } },
6651 { "(bad)", { XX } },
6652 { "(bad)", { XX } },
6653 { "(bad)", { XX } },
6654 { "(bad)", { XX } },
6655 { "(bad)", { XX } },
85f10a01 6656 /* e8 */
4e7d34a6
L
6657 { "(bad)", { XX } },
6658 { "(bad)", { XX } },
6659 { "(bad)", { XX } },
6660 { "(bad)", { XX } },
6661 { "(bad)", { XX } },
6662 { "(bad)", { XX } },
6663 { "(bad)", { XX } },
6664 { "(bad)", { XX } },
85f10a01 6665 /* f0 */
f88c9eb0
SP
6666 { "(bad)", { XX } },
6667 { "(bad)", { XX } },
4e7d34a6
L
6668 { "(bad)", { XX } },
6669 { "(bad)", { XX } },
6670 { "(bad)", { XX } },
6671 { "(bad)", { XX } },
6672 { "(bad)", { XX } },
6673 { "(bad)", { XX } },
85f10a01 6674 /* f8 */
4e7d34a6
L
6675 { "(bad)", { XX } },
6676 { "(bad)", { XX } },
6677 { "(bad)", { XX } },
6678 { "(bad)", { XX } },
6679 { "(bad)", { XX } },
6680 { "(bad)", { XX } },
6681 { "(bad)", { XX } },
6682 { "(bad)", { XX } },
85f10a01 6683 },
f88c9eb0
SP
6684};
6685
6686static const struct dis386 xop_table[][256] = {
5dd85c99 6687 /* XOP_08 */
85f10a01
MM
6688 {
6689 /* 00 */
4e7d34a6
L
6690 { "(bad)", { XX } },
6691 { "(bad)", { XX } },
6692 { "(bad)", { XX } },
6693 { "(bad)", { XX } },
6694 { "(bad)", { XX } },
6695 { "(bad)", { XX } },
6696 { "(bad)", { XX } },
6697 { "(bad)", { XX } },
85f10a01 6698 /* 08 */
f88c9eb0
SP
6699 { "(bad)", { XX } },
6700 { "(bad)", { XX } },
6701 { "(bad)", { XX } },
6702 { "(bad)", { XX } },
6703 { "(bad)", { XX } },
6704 { "(bad)", { XX } },
6705 { "(bad)", { XX } },
6706 { "(bad)", { XX } },
85f10a01 6707 /* 10 */
4e7d34a6
L
6708 { "(bad)", { XX } },
6709 { "(bad)", { XX } },
5dd85c99 6710 { "(bad)", { XX } },
f88c9eb0
SP
6711 { "(bad)", { XX } },
6712 { "(bad)", { XX } },
6713 { "(bad)", { XX } },
4e7d34a6
L
6714 { "(bad)", { XX } },
6715 { "(bad)", { XX } },
85f10a01 6716 /* 18 */
4e7d34a6
L
6717 { "(bad)", { XX } },
6718 { "(bad)", { XX } },
6719 { "(bad)", { XX } },
6720 { "(bad)", { XX } },
6721 { "(bad)", { XX } },
6722 { "(bad)", { XX } },
6723 { "(bad)", { XX } },
6724 { "(bad)", { XX } },
85f10a01 6725 /* 20 */
f88c9eb0
SP
6726 { "(bad)", { XX } },
6727 { "(bad)", { XX } },
6728 { "(bad)", { XX } },
4e7d34a6
L
6729 { "(bad)", { XX } },
6730 { "(bad)", { XX } },
6731 { "(bad)", { XX } },
6732 { "(bad)", { XX } },
6733 { "(bad)", { XX } },
85f10a01 6734 /* 28 */
4e7d34a6
L
6735 { "(bad)", { XX } },
6736 { "(bad)", { XX } },
6737 { "(bad)", { XX } },
6738 { "(bad)", { XX } },
4e7d34a6
L
6739 { "(bad)", { XX } },
6740 { "(bad)", { XX } },
6741 { "(bad)", { XX } },
6742 { "(bad)", { XX } },
c0f3af97 6743 /* 30 */
c1e679ec
DR
6744 { "(bad)", { XX } },
6745 { "(bad)", { XX } },
4e7d34a6 6746 { "(bad)", { XX } },
4e7d34a6
L
6747 { "(bad)", { XX } },
6748 { "(bad)", { XX } },
6749 { "(bad)", { XX } },
6750 { "(bad)", { XX } },
6751 { "(bad)", { XX } },
c0f3af97 6752 /* 38 */
4e7d34a6
L
6753 { "(bad)", { XX } },
6754 { "(bad)", { XX } },
6755 { "(bad)", { XX } },
4e7d34a6
L
6756 { "(bad)", { XX } },
6757 { "(bad)", { XX } },
6758 { "(bad)", { XX } },
6759 { "(bad)", { XX } },
6760 { "(bad)", { XX } },
c0f3af97 6761 /* 40 */
c1e679ec 6762 { "(bad)", { XX } },
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 } },
85f10a01 6770 /* 48 */
4e7d34a6
L
6771 { "(bad)", { XX } },
6772 { "(bad)", { XX } },
6773 { "(bad)", { XX } },
c1e679ec 6774 { "(bad)", { XX } },
4e7d34a6
L
6775 { "(bad)", { XX } },
6776 { "(bad)", { XX } },
6777 { "(bad)", { XX } },
6778 { "(bad)", { XX } },
c0f3af97 6779 /* 50 */
4e7d34a6
L
6780 { "(bad)", { XX } },
6781 { "(bad)", { XX } },
6782 { "(bad)", { XX } },
c1e679ec
DR
6783 { "(bad)", { XX } },
6784 { "(bad)", { XX } },
6785 { "(bad)", { XX } },
6786 { "(bad)", { XX } },
6787 { "(bad)", { XX } },
85f10a01 6788 /* 58 */
4e7d34a6
L
6789 { "(bad)", { XX } },
6790 { "(bad)", { XX } },
6791 { "(bad)", { XX } },
4e7d34a6
L
6792 { "(bad)", { XX } },
6793 { "(bad)", { XX } },
6794 { "(bad)", { XX } },
6795 { "(bad)", { XX } },
4e7d34a6 6796 { "(bad)", { XX } },
c1e679ec 6797 /* 60 */
f88c9eb0
SP
6798 { "(bad)", { XX } },
6799 { "(bad)", { XX } },
6800 { "(bad)", { XX } },
6801 { "(bad)", { XX } },
4e7d34a6
L
6802 { "(bad)", { XX } },
6803 { "(bad)", { XX } },
6804 { "(bad)", { XX } },
6805 { "(bad)", { XX } },
c0f3af97
L
6806 /* 68 */
6807 { "(bad)", { XX } },
4e7d34a6
L
6808 { "(bad)", { XX } },
6809 { "(bad)", { XX } },
6810 { "(bad)", { XX } },
4e7d34a6
L
6811 { "(bad)", { XX } },
6812 { "(bad)", { XX } },
6813 { "(bad)", { XX } },
6814 { "(bad)", { XX } },
85f10a01 6815 /* 70 */
4e7d34a6
L
6816 { "(bad)", { XX } },
6817 { "(bad)", { XX } },
6818 { "(bad)", { XX } },
6819 { "(bad)", { XX } },
6820 { "(bad)", { XX } },
6821 { "(bad)", { XX } },
6822 { "(bad)", { XX } },
6823 { "(bad)", { XX } },
85f10a01 6824 /* 78 */
4e7d34a6
L
6825 { "(bad)", { XX } },
6826 { "(bad)", { XX } },
6827 { "(bad)", { XX } },
6828 { "(bad)", { XX } },
6829 { "(bad)", { XX } },
6830 { "(bad)", { XX } },
6831 { "(bad)", { XX } },
6832 { "(bad)", { XX } },
85f10a01 6833 /* 80 */
4e7d34a6
L
6834 { "(bad)", { XX } },
6835 { "(bad)", { XX } },
6836 { "(bad)", { XX } },
6837 { "(bad)", { XX } },
6838 { "(bad)", { XX } },
5dd85c99
SP
6839 { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6840 { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6841 { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6842 /* 88 */
4e7d34a6
L
6843 { "(bad)", { XX } },
6844 { "(bad)", { XX } },
6845 { "(bad)", { XX } },
4e7d34a6
L
6846 { "(bad)", { XX } },
6847 { "(bad)", { XX } },
6848 { "(bad)", { XX } },
5dd85c99
SP
6849 { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6850 { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6851 /* 90 */
4e7d34a6
L
6852 { "(bad)", { XX } },
6853 { "(bad)", { XX } },
6854 { "(bad)", { XX } },
6855 { "(bad)", { XX } },
6856 { "(bad)", { XX } },
5dd85c99
SP
6857 { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6858 { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6859 { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6860 /* 98 */
4e7d34a6
L
6861 { "(bad)", { XX } },
6862 { "(bad)", { XX } },
6863 { "(bad)", { XX } },
6864 { "(bad)", { XX } },
6865 { "(bad)", { XX } },
6866 { "(bad)", { XX } },
5dd85c99
SP
6867 { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6868 { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6869 /* a0 */
f0ae4a24
SP
6870 { "(bad)", { XX } },
6871 { "(bad)", { XX } },
5dd85c99
SP
6872 { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6873 { "vpperm", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
4e7d34a6
L
6874 { "(bad)", { XX } },
6875 { "(bad)", { XX } },
5dd85c99 6876 { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
4e7d34a6 6877 { "(bad)", { XX } },
5dd85c99 6878 /* a8 */
4e7d34a6
L
6879 { "(bad)", { XX } },
6880 { "(bad)", { XX } },
6881 { "(bad)", { XX } },
6882 { "(bad)", { XX } },
6883 { "(bad)", { XX } },
6884 { "(bad)", { XX } },
6885 { "(bad)", { XX } },
4e7d34a6 6886 { "(bad)", { XX } },
5dd85c99 6887 /* b0 */
4e7d34a6
L
6888 { "(bad)", { XX } },
6889 { "(bad)", { XX } },
6890 { "(bad)", { XX } },
6891 { "(bad)", { XX } },
6892 { "(bad)", { XX } },
6893 { "(bad)", { XX } },
5dd85c99 6894 { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
4e7d34a6 6895 { "(bad)", { XX } },
5dd85c99 6896 /* b8 */
4e7d34a6
L
6897 { "(bad)", { XX } },
6898 { "(bad)", { XX } },
6899 { "(bad)", { XX } },
6900 { "(bad)", { XX } },
6901 { "(bad)", { XX } },
6902 { "(bad)", { XX } },
6903 { "(bad)", { XX } },
6904 { "(bad)", { XX } },
5dd85c99
SP
6905 /* c0 */
6906 { "vprotb", { XM, Vex_2src_1, Ib } },
6907 { "vprotw", { XM, Vex_2src_1, Ib } },
6908 { "vprotd", { XM, Vex_2src_1, Ib } },
6909 { "vprotq", { XM, Vex_2src_1, Ib } },
4e7d34a6
L
6910 { "(bad)", { XX } },
6911 { "(bad)", { XX } },
6912 { "(bad)", { XX } },
6913 { "(bad)", { XX } },
5dd85c99 6914 /* c8 */
4e7d34a6
L
6915 { "(bad)", { XX } },
6916 { "(bad)", { XX } },
6917 { "(bad)", { XX } },
6918 { "(bad)", { XX } },
5dd85c99
SP
6919 { "vpcomb", { XM, Vex128, EXx, Ib } },
6920 { "vpcomw", { XM, Vex128, EXx, Ib } },
6921 { "vpcomd", { XM, Vex128, EXx, Ib } },
6922 { "vpcomq", { XM, Vex128, EXx, Ib } },
6923 /* d0 */
4e7d34a6
L
6924 { "(bad)", { XX } },
6925 { "(bad)", { XX } },
6926 { "(bad)", { XX } },
6927 { "(bad)", { XX } },
6928 { "(bad)", { XX } },
6929 { "(bad)", { XX } },
6930 { "(bad)", { XX } },
6931 { "(bad)", { XX } },
5dd85c99 6932 /* d8 */
4e7d34a6
L
6933 { "(bad)", { XX } },
6934 { "(bad)", { XX } },
6935 { "(bad)", { XX } },
6936 { "(bad)", { XX } },
6937 { "(bad)", { XX } },
6938 { "(bad)", { XX } },
6939 { "(bad)", { XX } },
6940 { "(bad)", { XX } },
5dd85c99 6941 /* e0 */
4e7d34a6
L
6942 { "(bad)", { XX } },
6943 { "(bad)", { XX } },
6944 { "(bad)", { XX } },
6945 { "(bad)", { XX } },
6946 { "(bad)", { XX } },
6947 { "(bad)", { XX } },
6948 { "(bad)", { XX } },
6949 { "(bad)", { XX } },
5dd85c99 6950 /* e8 */
4e7d34a6
L
6951 { "(bad)", { XX } },
6952 { "(bad)", { XX } },
6953 { "(bad)", { XX } },
6954 { "(bad)", { XX } },
5dd85c99
SP
6955 { "vpcomub", { XM, Vex128, EXx, Ib } },
6956 { "vpcomuw", { XM, Vex128, EXx, Ib } },
6957 { "vpcomud", { XM, Vex128, EXx, Ib } },
6958 { "vpcomuq", { XM, Vex128, EXx, Ib } },
6959 /* f0 */
4e7d34a6
L
6960 { "(bad)", { XX } },
6961 { "(bad)", { XX } },
6962 { "(bad)", { XX } },
6963 { "(bad)", { XX } },
4e7d34a6
L
6964 { "(bad)", { XX } },
6965 { "(bad)", { XX } },
6966 { "(bad)", { XX } },
6967 { "(bad)", { XX } },
5dd85c99
SP
6968 /* f8 */
6969 { "(bad)", { XX } },
6970 { "(bad)", { XX } },
6971 { "(bad)", { XX } },
6972 { "(bad)", { XX } },
6973 { "(bad)", { XX } },
6974 { "(bad)", { XX } },
6975 { "(bad)", { XX } },
6976 { "(bad)", { XX } },
6977 },
6978 /* XOP_09 */
6979 {
6980 /* 00 */
6981 { "(bad)", { XX } },
6982 { "(bad)", { XX } },
6983 { "(bad)", { XX } },
6984 { "(bad)", { XX } },
6985 { "(bad)", { XX } },
6986 { "(bad)", { XX } },
6987 { "(bad)", { XX } },
6988 { "(bad)", { XX } },
6989 /* 08 */
6990 { "(bad)", { XX } },
6991 { "(bad)", { XX } },
6992 { "(bad)", { XX } },
6993 { "(bad)", { XX } },
6994 { "(bad)", { XX } },
6995 { "(bad)", { XX } },
6996 { "(bad)", { XX } },
6997 { "(bad)", { XX } },
6998 /* 10 */
6999 { "(bad)", { XX } },
7000 { "(bad)", { XX } },
7001 { REG_TABLE (REG_XOP_LWPCB) },
7002 { "(bad)", { XX } },
7003 { "(bad)", { XX } },
7004 { "(bad)", { XX } },
7005 { "(bad)", { XX } },
7006 { "(bad)", { XX } },
7007 /* 18 */
7008 { "(bad)", { XX } },
7009 { "(bad)", { XX } },
7010 { "(bad)", { XX } },
7011 { "(bad)", { XX } },
7012 { "(bad)", { XX } },
7013 { "(bad)", { XX } },
7014 { "(bad)", { XX } },
7015 { "(bad)", { XX } },
7016 /* 20 */
4e7d34a6
L
7017 { "(bad)", { XX } },
7018 { "(bad)", { XX } },
7019 { "(bad)", { XX } },
f88c9eb0 7020 { "(bad)", { XX } },
4e7d34a6
L
7021 { "(bad)", { XX } },
7022 { "(bad)", { XX } },
7023 { "(bad)", { XX } },
7024 { "(bad)", { XX } },
5dd85c99
SP
7025 /* 28 */
7026 { "(bad)", { XX } },
7027 { "(bad)", { XX } },
7028 { "(bad)", { XX } },
7029 { "(bad)", { XX } },
7030 { "(bad)", { XX } },
7031 { "(bad)", { XX } },
7032 { "(bad)", { XX } },
7033 { "(bad)", { XX } },
7034 /* 30 */
7035 { "(bad)", { XX } },
7036 { "(bad)", { XX } },
7037 { "(bad)", { XX } },
7038 { "(bad)", { XX } },
7039 { "(bad)", { XX } },
7040 { "(bad)", { XX } },
7041 { "(bad)", { XX } },
7042 { "(bad)", { XX } },
7043 /* 38 */
7044 { "(bad)", { XX } },
7045 { "(bad)", { XX } },
7046 { "(bad)", { XX } },
7047 { "(bad)", { XX } },
7048 { "(bad)", { XX } },
7049 { "(bad)", { XX } },
7050 { "(bad)", { XX } },
7051 { "(bad)", { XX } },
7052 /* 40 */
7053 { "(bad)", { XX } },
7054 { "(bad)", { XX } },
7055 { "(bad)", { XX } },
7056 { "(bad)", { XX } },
7057 { "(bad)", { XX } },
7058 { "(bad)", { XX } },
7059 { "(bad)", { XX } },
7060 { "(bad)", { XX } },
7061 /* 48 */
7062 { "(bad)", { XX } },
7063 { "(bad)", { XX } },
7064 { "(bad)", { XX } },
7065 { "(bad)", { XX } },
7066 { "(bad)", { XX } },
7067 { "(bad)", { XX } },
7068 { "(bad)", { XX } },
7069 { "(bad)", { XX } },
7070 /* 50 */
7071 { "(bad)", { XX } },
7072 { "(bad)", { XX } },
7073 { "(bad)", { XX } },
7074 { "(bad)", { XX } },
7075 { "(bad)", { XX } },
7076 { "(bad)", { XX } },
7077 { "(bad)", { XX } },
7078 { "(bad)", { XX } },
7079 /* 58 */
7080 { "(bad)", { XX } },
7081 { "(bad)", { XX } },
7082 { "(bad)", { XX } },
7083 { "(bad)", { XX } },
7084 { "(bad)", { XX } },
7085 { "(bad)", { XX } },
7086 { "(bad)", { XX } },
7087 { "(bad)", { XX } },
7088 /* 60 */
7089 { "(bad)", { XX } },
7090 { "(bad)", { XX } },
7091 { "(bad)", { XX } },
7092 { "(bad)", { XX } },
7093 { "(bad)", { XX } },
7094 { "(bad)", { XX } },
7095 { "(bad)", { XX } },
7096 { "(bad)", { XX } },
7097 /* 68 */
7098 { "(bad)", { XX } },
7099 { "(bad)", { XX } },
7100 { "(bad)", { XX } },
7101 { "(bad)", { XX } },
7102 { "(bad)", { XX } },
7103 { "(bad)", { XX } },
7104 { "(bad)", { XX } },
7105 { "(bad)", { XX } },
7106 /* 70 */
7107 { "(bad)", { XX } },
7108 { "(bad)", { XX } },
7109 { "(bad)", { XX } },
7110 { "(bad)", { XX } },
7111 { "(bad)", { XX } },
7112 { "(bad)", { XX } },
7113 { "(bad)", { XX } },
7114 { "(bad)", { XX } },
7115 /* 78 */
7116 { "(bad)", { XX } },
7117 { "(bad)", { XX } },
7118 { "(bad)", { XX } },
7119 { "(bad)", { XX } },
7120 { "(bad)", { XX } },
7121 { "(bad)", { XX } },
7122 { "(bad)", { XX } },
7123 { "(bad)", { XX } },
7124 /* 80 */
7125 { VEX_LEN_TABLE (VEX_LEN_XOP_09_80) },
7126 { VEX_LEN_TABLE (VEX_LEN_XOP_09_81) },
7127 { "vfrczss", { XM, EXd } },
7128 { "vfrczsd", { XM, EXq } },
7129 { "(bad)", { XX } },
7130 { "(bad)", { XX } },
7131 { "(bad)", { XX } },
7132 { "(bad)", { XX } },
7133 /* 88 */
7134 { "(bad)", { XX } },
7135 { "(bad)", { XX } },
7136 { "(bad)", { XX } },
7137 { "(bad)", { XX } },
7138 { "(bad)", { XX } },
7139 { "(bad)", { XX } },
7140 { "(bad)", { XX } },
7141 { "(bad)", { XX } },
7142 /* 90 */
7143 { "vprotb", { XM, Vex_2src_1, Vex_2src_2 } },
7144 { "vprotw", { XM, Vex_2src_1, Vex_2src_2 } },
7145 { "vprotd", { XM, Vex_2src_1, Vex_2src_2 } },
7146 { "vprotq", { XM, Vex_2src_1, Vex_2src_2 } },
7147 { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 } },
7148 { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 } },
7149 { "vpshld", { XM, Vex_2src_1, Vex_2src_2 } },
7150 { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 } },
7151 /* 98 */
7152 { "vpshab", { XM, Vex_2src_1, Vex_2src_2 } },
7153 { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 } },
7154 { "vpshad", { XM, Vex_2src_1, Vex_2src_2 } },
7155 { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 } },
7156 { "(bad)", { XX } },
7157 { "(bad)", { XX } },
7158 { "(bad)", { XX } },
7159 { "(bad)", { XX } },
7160 /* a0 */
7161 { "(bad)", { XX } },
7162 { "(bad)", { XX } },
7163 { "(bad)", { XX } },
7164 { "(bad)", { XX } },
7165 { "(bad)", { XX } },
7166 { "(bad)", { XX } },
7167 { "(bad)", { XX } },
7168 { "(bad)", { XX } },
7169 /* a8 */
7170 { "(bad)", { XX } },
7171 { "(bad)", { XX } },
7172 { "(bad)", { XX } },
7173 { "(bad)", { XX } },
7174 { "(bad)", { XX } },
7175 { "(bad)", { XX } },
7176 { "(bad)", { XX } },
7177 { "(bad)", { XX } },
7178 /* b0 */
7179 { "(bad)", { XX } },
7180 { "(bad)", { XX } },
7181 { "(bad)", { XX } },
7182 { "(bad)", { XX } },
7183 { "(bad)", { XX } },
7184 { "(bad)", { XX } },
7185 { "(bad)", { XX } },
7186 { "(bad)", { XX } },
7187 /* b8 */
7188 { "(bad)", { XX } },
7189 { "(bad)", { XX } },
7190 { "(bad)", { XX } },
7191 { "(bad)", { XX } },
7192 { "(bad)", { XX } },
7193 { "(bad)", { XX } },
7194 { "(bad)", { XX } },
7195 { "(bad)", { XX } },
7196 /* c0 */
7197 { "(bad)", { XX } },
7198 { "vphaddbw", { XM, EXxmm } },
7199 { "vphaddbd", { XM, EXxmm } },
7200 { "vphaddbq", { XM, EXxmm } },
7201 { "(bad)", { XX } },
7202 { "(bad)", { XX } },
7203 { "vphaddwd", { XM, EXxmm } },
7204 { "vphaddwq", { XM, EXxmm } },
7205 /* c8 */
7206 { "(bad)", { XX } },
7207 { "(bad)", { XX } },
7208 { "(bad)", { XX } },
7209 { "vphadddq", { XM, EXxmm } },
7210 { "(bad)", { XX } },
7211 { "(bad)", { XX } },
7212 { "(bad)", { XX } },
7213 { "(bad)", { XX } },
7214 /* d0 */
7215 { "(bad)", { XX } },
7216 { "vphaddubw", { XM, EXxmm } },
7217 { "vphaddubd", { XM, EXxmm } },
7218 { "vphaddubq", { XM, EXxmm } },
7219 { "(bad)", { XX } },
7220 { "(bad)", { XX } },
7221 { "vphadduwd", { XM, EXxmm } },
7222 { "vphadduwq", { XM, EXxmm } },
7223 /* d8 */
7224 { "(bad)", { XX } },
7225 { "(bad)", { XX } },
7226 { "(bad)", { XX } },
7227 { "vphaddudq", { XM, EXxmm } },
7228 { "(bad)", { XX } },
7229 { "(bad)", { XX } },
7230 { "(bad)", { XX } },
7231 { "(bad)", { XX } },
7232 /* e0 */
7233 { "(bad)", { XX } },
7234 { "vphsubbw", { XM, EXxmm } },
7235 { "vphsubwd", { XM, EXxmm } },
7236 { "vphsubdq", { XM, EXxmm } },
4e7d34a6
L
7237 { "(bad)", { XX } },
7238 { "(bad)", { XX } },
7239 { "(bad)", { XX } },
7240 { "(bad)", { XX } },
7241 /* e8 */
7242 { "(bad)", { XX } },
7243 { "(bad)", { XX } },
7244 { "(bad)", { XX } },
7245 { "(bad)", { XX } },
7246 { "(bad)", { XX } },
7247 { "(bad)", { XX } },
7248 { "(bad)", { XX } },
7249 { "(bad)", { XX } },
7250 /* f0 */
7251 { "(bad)", { XX } },
7252 { "(bad)", { XX } },
7253 { "(bad)", { XX } },
7254 { "(bad)", { XX } },
7255 { "(bad)", { XX } },
7256 { "(bad)", { XX } },
7257 { "(bad)", { XX } },
7258 { "(bad)", { XX } },
7259 /* f8 */
7260 { "(bad)", { XX } },
7261 { "(bad)", { XX } },
7262 { "(bad)", { XX } },
7263 { "(bad)", { XX } },
7264 { "(bad)", { XX } },
7265 { "(bad)", { XX } },
7266 { "(bad)", { XX } },
7267 { "(bad)", { XX } },
7268 },
f88c9eb0 7269 /* XOP_0A */
4e7d34a6
L
7270 {
7271 /* 00 */
c0f3af97
L
7272 { "(bad)", { XX } },
7273 { "(bad)", { XX } },
7274 { "(bad)", { XX } },
7275 { "(bad)", { XX } },
7276 { "(bad)", { XX } },
7277 { "(bad)", { XX } },
7278 { "(bad)", { XX } },
7279 { "(bad)", { XX } },
4e7d34a6 7280 /* 08 */
c0f3af97
L
7281 { "(bad)", { XX } },
7282 { "(bad)", { XX } },
7283 { "(bad)", { XX } },
7284 { "(bad)", { XX } },
d5d7db8e
L
7285 { "(bad)", { XX } },
7286 { "(bad)", { XX } },
7287 { "(bad)", { XX } },
7288 { "(bad)", { XX } },
4e7d34a6 7289 /* 10 */
d5d7db8e
L
7290 { "(bad)", { XX } },
7291 { "(bad)", { XX } },
f88c9eb0 7292 { REG_TABLE (REG_XOP_LWP) },
d5d7db8e 7293 { "(bad)", { XX } },
c0f3af97
L
7294 { "(bad)", { XX } },
7295 { "(bad)", { XX } },
7296 { "(bad)", { XX } },
7297 { "(bad)", { XX } },
4e7d34a6 7298 /* 18 */
d5d7db8e
L
7299 { "(bad)", { XX } },
7300 { "(bad)", { XX } },
7301 { "(bad)", { XX } },
7302 { "(bad)", { XX } },
c0f3af97
L
7303 { "(bad)", { XX } },
7304 { "(bad)", { XX } },
7305 { "(bad)", { XX } },
d5d7db8e 7306 { "(bad)", { XX } },
4e7d34a6 7307 /* 20 */
f88c9eb0 7308 { "(bad)", { XX } },
c0f3af97
L
7309 { "(bad)", { XX } },
7310 { "(bad)", { XX } },
7311 { "(bad)", { XX } },
7312 { "(bad)", { XX } },
7313 { "(bad)", { XX } },
d5d7db8e
L
7314 { "(bad)", { XX } },
7315 { "(bad)", { XX } },
4e7d34a6 7316 /* 28 */
c0f3af97
L
7317 { "(bad)", { XX } },
7318 { "(bad)", { XX } },
7319 { "(bad)", { XX } },
7320 { "(bad)", { XX } },
d5d7db8e
L
7321 { "(bad)", { XX } },
7322 { "(bad)", { XX } },
7323 { "(bad)", { XX } },
7324 { "(bad)", { XX } },
4e7d34a6 7325 /* 30 */
d5d7db8e 7326 { "(bad)", { XX } },
d5d7db8e
L
7327 { "(bad)", { XX } },
7328 { "(bad)", { XX } },
7329 { "(bad)", { XX } },
7330 { "(bad)", { XX } },
7331 { "(bad)", { XX } },
7332 { "(bad)", { XX } },
c0f3af97
L
7333 { "(bad)", { XX } },
7334 /* 38 */
7335 { "(bad)", { XX } },
7336 { "(bad)", { XX } },
7337 { "(bad)", { XX } },
7338 { "(bad)", { XX } },
d5d7db8e
L
7339 { "(bad)", { XX } },
7340 { "(bad)", { XX } },
7341 { "(bad)", { XX } },
7342 { "(bad)", { XX } },
c0f3af97 7343 /* 40 */
c1e679ec 7344 { "(bad)", { XX } },
d5d7db8e
L
7345 { "(bad)", { XX } },
7346 { "(bad)", { XX } },
f88c9eb0
SP
7347 { "(bad)", { XX } },
7348 { "(bad)", { XX } },
7349 { "(bad)", { XX } },
7350 { "(bad)", { XX } },
7351 { "(bad)", { XX } },
c1e679ec 7352 /* 48 */
d5d7db8e
L
7353 { "(bad)", { XX } },
7354 { "(bad)", { XX } },
d5d7db8e 7355 { "(bad)", { XX } },
f88c9eb0 7356 { "(bad)", { XX } },
d5d7db8e
L
7357 { "(bad)", { XX } },
7358 { "(bad)", { XX } },
7359 { "(bad)", { XX } },
7360 { "(bad)", { XX } },
c1e679ec 7361 /* 50 */
d5d7db8e
L
7362 { "(bad)", { XX } },
7363 { "(bad)", { XX } },
7364 { "(bad)", { XX } },
f88c9eb0
SP
7365 { "(bad)", { XX } },
7366 { "(bad)", { XX } },
7367 { "(bad)", { XX } },
7368 { "(bad)", { XX } },
7369 { "(bad)", { XX } },
4e7d34a6 7370 /* 58 */
d5d7db8e
L
7371 { "(bad)", { XX } },
7372 { "(bad)", { XX } },
7373 { "(bad)", { XX } },
f88c9eb0 7374 { "(bad)", { XX } },
d5d7db8e
L
7375 { "(bad)", { XX } },
7376 { "(bad)", { XX } },
7377 { "(bad)", { XX } },
7378 { "(bad)", { XX } },
4e7d34a6 7379 /* 60 */
d5d7db8e 7380 { "(bad)", { XX } },
f88c9eb0
SP
7381 { "(bad)", { XX } },
7382 { "(bad)", { XX } },
7383 { "(bad)", { XX } },
d5d7db8e
L
7384 { "(bad)", { XX } },
7385 { "(bad)", { XX } },
7386 { "(bad)", { XX } },
7387 { "(bad)", { XX } },
4e7d34a6 7388 /* 68 */
d5d7db8e
L
7389 { "(bad)", { XX } },
7390 { "(bad)", { XX } },
7391 { "(bad)", { XX } },
7392 { "(bad)", { XX } },
7393 { "(bad)", { XX } },
7394 { "(bad)", { XX } },
7395 { "(bad)", { XX } },
7396 { "(bad)", { XX } },
4e7d34a6 7397 /* 70 */
d5d7db8e
L
7398 { "(bad)", { XX } },
7399 { "(bad)", { XX } },
7400 { "(bad)", { XX } },
7401 { "(bad)", { XX } },
7402 { "(bad)", { XX } },
7403 { "(bad)", { XX } },
7404 { "(bad)", { XX } },
7405 { "(bad)", { XX } },
4e7d34a6 7406 /* 78 */
d5d7db8e
L
7407 { "(bad)", { XX } },
7408 { "(bad)", { XX } },
7409 { "(bad)", { XX } },
7410 { "(bad)", { XX } },
7411 { "(bad)", { XX } },
7412 { "(bad)", { XX } },
7413 { "(bad)", { XX } },
7414 { "(bad)", { XX } },
4e7d34a6 7415 /* 80 */
d5d7db8e
L
7416 { "(bad)", { XX } },
7417 { "(bad)", { XX } },
7418 { "(bad)", { XX } },
7419 { "(bad)", { XX } },
7420 { "(bad)", { XX } },
7421 { "(bad)", { XX } },
7422 { "(bad)", { XX } },
7423 { "(bad)", { XX } },
4e7d34a6 7424 /* 88 */
d5d7db8e
L
7425 { "(bad)", { XX } },
7426 { "(bad)", { XX } },
7427 { "(bad)", { XX } },
7428 { "(bad)", { XX } },
7429 { "(bad)", { XX } },
7430 { "(bad)", { XX } },
7431 { "(bad)", { XX } },
7432 { "(bad)", { XX } },
4e7d34a6 7433 /* 90 */
d5d7db8e
L
7434 { "(bad)", { XX } },
7435 { "(bad)", { XX } },
7436 { "(bad)", { XX } },
7437 { "(bad)", { XX } },
7438 { "(bad)", { XX } },
7439 { "(bad)", { XX } },
7440 { "(bad)", { XX } },
7441 { "(bad)", { XX } },
4e7d34a6 7442 /* 98 */
d5d7db8e
L
7443 { "(bad)", { XX } },
7444 { "(bad)", { XX } },
7445 { "(bad)", { XX } },
7446 { "(bad)", { XX } },
7447 { "(bad)", { XX } },
7448 { "(bad)", { XX } },
7449 { "(bad)", { XX } },
7450 { "(bad)", { XX } },
4e7d34a6 7451 /* a0 */
d5d7db8e
L
7452 { "(bad)", { XX } },
7453 { "(bad)", { XX } },
7454 { "(bad)", { XX } },
7455 { "(bad)", { XX } },
7456 { "(bad)", { XX } },
7457 { "(bad)", { XX } },
7458 { "(bad)", { XX } },
7459 { "(bad)", { XX } },
4e7d34a6 7460 /* a8 */
d5d7db8e
L
7461 { "(bad)", { XX } },
7462 { "(bad)", { XX } },
7463 { "(bad)", { XX } },
7464 { "(bad)", { XX } },
7465 { "(bad)", { XX } },
7466 { "(bad)", { XX } },
7467 { "(bad)", { XX } },
7468 { "(bad)", { XX } },
7469 /* b0 */
7470 { "(bad)", { XX } },
7471 { "(bad)", { XX } },
7472 { "(bad)", { XX } },
7473 { "(bad)", { XX } },
7474 { "(bad)", { XX } },
7475 { "(bad)", { XX } },
7476 { "(bad)", { XX } },
7477 { "(bad)", { XX } },
85f10a01 7478 /* b8 */
d5d7db8e
L
7479 { "(bad)", { XX } },
7480 { "(bad)", { XX } },
7481 { "(bad)", { XX } },
7482 { "(bad)", { XX } },
7483 { "(bad)", { XX } },
7484 { "(bad)", { XX } },
7485 { "(bad)", { XX } },
7486 { "(bad)", { XX } },
85f10a01 7487 /* c0 */
d5d7db8e
L
7488 { "(bad)", { XX } },
7489 { "(bad)", { XX } },
7490 { "(bad)", { XX } },
7491 { "(bad)", { XX } },
7492 { "(bad)", { XX } },
7493 { "(bad)", { XX } },
7494 { "(bad)", { XX } },
7495 { "(bad)", { XX } },
85f10a01 7496 /* c8 */
d5d7db8e
L
7497 { "(bad)", { XX } },
7498 { "(bad)", { XX } },
7499 { "(bad)", { XX } },
7500 { "(bad)", { XX } },
7501 { "(bad)", { XX } },
7502 { "(bad)", { XX } },
7503 { "(bad)", { XX } },
7504 { "(bad)", { XX } },
85f10a01 7505 /* d0 */
d5d7db8e
L
7506 { "(bad)", { XX } },
7507 { "(bad)", { XX } },
7508 { "(bad)", { XX } },
7509 { "(bad)", { XX } },
7510 { "(bad)", { XX } },
7511 { "(bad)", { XX } },
7512 { "(bad)", { XX } },
7513 { "(bad)", { XX } },
85f10a01 7514 /* d8 */
d5d7db8e
L
7515 { "(bad)", { XX } },
7516 { "(bad)", { XX } },
7517 { "(bad)", { XX } },
7518 { "(bad)", { XX } },
7519 { "(bad)", { XX } },
7520 { "(bad)", { XX } },
7521 { "(bad)", { XX } },
7522 { "(bad)", { XX } },
85f10a01 7523 /* e0 */
d5d7db8e
L
7524 { "(bad)", { XX } },
7525 { "(bad)", { XX } },
7526 { "(bad)", { XX } },
7527 { "(bad)", { XX } },
7528 { "(bad)", { XX } },
7529 { "(bad)", { XX } },
7530 { "(bad)", { XX } },
7531 { "(bad)", { XX } },
85f10a01 7532 /* e8 */
d5d7db8e
L
7533 { "(bad)", { XX } },
7534 { "(bad)", { XX } },
7535 { "(bad)", { XX } },
7536 { "(bad)", { XX } },
7537 { "(bad)", { XX } },
7538 { "(bad)", { XX } },
7539 { "(bad)", { XX } },
7540 { "(bad)", { XX } },
85f10a01 7541 /* f0 */
c0f3af97
L
7542 { "(bad)", { XX } },
7543 { "(bad)", { XX } },
d5d7db8e
L
7544 { "(bad)", { XX } },
7545 { "(bad)", { XX } },
7546 { "(bad)", { XX } },
7547 { "(bad)", { XX } },
7548 { "(bad)", { XX } },
7549 { "(bad)", { XX } },
85f10a01 7550 /* f8 */
d5d7db8e
L
7551 { "(bad)", { XX } },
7552 { "(bad)", { XX } },
7553 { "(bad)", { XX } },
7554 { "(bad)", { XX } },
7555 { "(bad)", { XX } },
7556 { "(bad)", { XX } },
7557 { "(bad)", { XX } },
7558 { "(bad)", { XX } },
85f10a01 7559 },
c0f3af97
L
7560};
7561
7562static const struct dis386 vex_table[][256] = {
7563 /* VEX_0F */
85f10a01
MM
7564 {
7565 /* 00 */
d5d7db8e
L
7566 { "(bad)", { XX } },
7567 { "(bad)", { XX } },
7568 { "(bad)", { XX } },
7569 { "(bad)", { XX } },
7570 { "(bad)", { XX } },
7571 { "(bad)", { XX } },
7572 { "(bad)", { XX } },
7573 { "(bad)", { XX } },
85f10a01 7574 /* 08 */
d5d7db8e
L
7575 { "(bad)", { XX } },
7576 { "(bad)", { XX } },
7577 { "(bad)", { XX } },
7578 { "(bad)", { XX } },
d5d7db8e
L
7579 { "(bad)", { XX } },
7580 { "(bad)", { XX } },
7581 { "(bad)", { XX } },
7582 { "(bad)", { XX } },
c0f3af97
L
7583 /* 10 */
7584 { PREFIX_TABLE (PREFIX_VEX_10) },
7585 { PREFIX_TABLE (PREFIX_VEX_11) },
7586 { PREFIX_TABLE (PREFIX_VEX_12) },
7587 { MOD_TABLE (MOD_VEX_13) },
9e30b8e0
L
7588 { VEX_W_TABLE (VEX_W_14) },
7589 { VEX_W_TABLE (VEX_W_15) },
c0f3af97
L
7590 { PREFIX_TABLE (PREFIX_VEX_16) },
7591 { MOD_TABLE (MOD_VEX_17) },
7592 /* 18 */
d5d7db8e
L
7593 { "(bad)", { XX } },
7594 { "(bad)", { XX } },
7595 { "(bad)", { XX } },
d5d7db8e
L
7596 { "(bad)", { XX } },
7597 { "(bad)", { XX } },
7598 { "(bad)", { XX } },
7599 { "(bad)", { XX } },
7600 { "(bad)", { XX } },
c0f3af97 7601 /* 20 */
d5d7db8e
L
7602 { "(bad)", { XX } },
7603 { "(bad)", { XX } },
7604 { "(bad)", { XX } },
7605 { "(bad)", { XX } },
7606 { "(bad)", { XX } },
7607 { "(bad)", { XX } },
7608 { "(bad)", { XX } },
7609 { "(bad)", { XX } },
c0f3af97 7610 /* 28 */
9e30b8e0
L
7611 { VEX_W_TABLE (VEX_W_28) },
7612 { VEX_W_TABLE (VEX_W_29) },
c0f3af97
L
7613 { PREFIX_TABLE (PREFIX_VEX_2A) },
7614 { MOD_TABLE (MOD_VEX_2B) },
7615 { PREFIX_TABLE (PREFIX_VEX_2C) },
7616 { PREFIX_TABLE (PREFIX_VEX_2D) },
7617 { PREFIX_TABLE (PREFIX_VEX_2E) },
7618 { PREFIX_TABLE (PREFIX_VEX_2F) },
85f10a01 7619 /* 30 */
d5d7db8e
L
7620 { "(bad)", { XX } },
7621 { "(bad)", { XX } },
7622 { "(bad)", { XX } },
7623 { "(bad)", { XX } },
7624 { "(bad)", { XX } },
7625 { "(bad)", { XX } },
7626 { "(bad)", { XX } },
7627 { "(bad)", { XX } },
4e7d34a6 7628 /* 38 */
d5d7db8e
L
7629 { "(bad)", { XX } },
7630 { "(bad)", { XX } },
7631 { "(bad)", { XX } },
7632 { "(bad)", { XX } },
7633 { "(bad)", { XX } },
7634 { "(bad)", { XX } },
7635 { "(bad)", { XX } },
7636 { "(bad)", { XX } },
7637 /* 40 */
c0f3af97
L
7638 { "(bad)", { XX } },
7639 { "(bad)", { XX } },
7640 { "(bad)", { XX } },
d5d7db8e
L
7641 { "(bad)", { XX } },
7642 { "(bad)", { XX } },
7643 { "(bad)", { XX } },
7644 { "(bad)", { XX } },
7645 { "(bad)", { XX } },
85f10a01 7646 /* 48 */
85f10a01
MM
7647 { "(bad)", { XX } },
7648 { "(bad)", { XX } },
7649 { "(bad)", { XX } },
7650 { "(bad)", { XX } },
7651 { "(bad)", { XX } },
7652 { "(bad)", { XX } },
7653 { "(bad)", { XX } },
7654 { "(bad)", { XX } },
d5d7db8e 7655 /* 50 */
976f1fde 7656 { MOD_TABLE (MOD_VEX_50) },
c0f3af97
L
7657 { PREFIX_TABLE (PREFIX_VEX_51) },
7658 { PREFIX_TABLE (PREFIX_VEX_52) },
7659 { PREFIX_TABLE (PREFIX_VEX_53) },
7660 { "vandpX", { XM, Vex, EXx } },
7661 { "vandnpX", { XM, Vex, EXx } },
7662 { "vorpX", { XM, Vex, EXx } },
7663 { "vxorpX", { XM, Vex, EXx } },
7664 /* 58 */
7665 { PREFIX_TABLE (PREFIX_VEX_58) },
7666 { PREFIX_TABLE (PREFIX_VEX_59) },
7667 { PREFIX_TABLE (PREFIX_VEX_5A) },
7668 { PREFIX_TABLE (PREFIX_VEX_5B) },
7669 { PREFIX_TABLE (PREFIX_VEX_5C) },
7670 { PREFIX_TABLE (PREFIX_VEX_5D) },
7671 { PREFIX_TABLE (PREFIX_VEX_5E) },
7672 { PREFIX_TABLE (PREFIX_VEX_5F) },
7673 /* 60 */
7674 { PREFIX_TABLE (PREFIX_VEX_60) },
7675 { PREFIX_TABLE (PREFIX_VEX_61) },
7676 { PREFIX_TABLE (PREFIX_VEX_62) },
7677 { PREFIX_TABLE (PREFIX_VEX_63) },
7678 { PREFIX_TABLE (PREFIX_VEX_64) },
7679 { PREFIX_TABLE (PREFIX_VEX_65) },
7680 { PREFIX_TABLE (PREFIX_VEX_66) },
7681 { PREFIX_TABLE (PREFIX_VEX_67) },
7682 /* 68 */
7683 { PREFIX_TABLE (PREFIX_VEX_68) },
7684 { PREFIX_TABLE (PREFIX_VEX_69) },
7685 { PREFIX_TABLE (PREFIX_VEX_6A) },
7686 { PREFIX_TABLE (PREFIX_VEX_6B) },
7687 { PREFIX_TABLE (PREFIX_VEX_6C) },
7688 { PREFIX_TABLE (PREFIX_VEX_6D) },
7689 { PREFIX_TABLE (PREFIX_VEX_6E) },
7690 { PREFIX_TABLE (PREFIX_VEX_6F) },
7691 /* 70 */
7692 { PREFIX_TABLE (PREFIX_VEX_70) },
7693 { REG_TABLE (REG_VEX_71) },
7694 { REG_TABLE (REG_VEX_72) },
7695 { REG_TABLE (REG_VEX_73) },
7696 { PREFIX_TABLE (PREFIX_VEX_74) },
7697 { PREFIX_TABLE (PREFIX_VEX_75) },
7698 { PREFIX_TABLE (PREFIX_VEX_76) },
7699 { PREFIX_TABLE (PREFIX_VEX_77) },
7700 /* 78 */
85f10a01
MM
7701 { "(bad)", { XX } },
7702 { "(bad)", { XX } },
7703 { "(bad)", { XX } },
7704 { "(bad)", { XX } },
c0f3af97
L
7705 { PREFIX_TABLE (PREFIX_VEX_7C) },
7706 { PREFIX_TABLE (PREFIX_VEX_7D) },
7707 { PREFIX_TABLE (PREFIX_VEX_7E) },
7708 { PREFIX_TABLE (PREFIX_VEX_7F) },
7709 /* 80 */
85f10a01
MM
7710 { "(bad)", { XX } },
7711 { "(bad)", { XX } },
7712 { "(bad)", { XX } },
7713 { "(bad)", { XX } },
85f10a01
MM
7714 { "(bad)", { XX } },
7715 { "(bad)", { XX } },
7716 { "(bad)", { XX } },
7717 { "(bad)", { XX } },
c0f3af97 7718 /* 88 */
85f10a01
MM
7719 { "(bad)", { XX } },
7720 { "(bad)", { XX } },
7721 { "(bad)", { XX } },
7722 { "(bad)", { XX } },
7723 { "(bad)", { XX } },
7724 { "(bad)", { XX } },
7725 { "(bad)", { XX } },
7726 { "(bad)", { XX } },
c0f3af97 7727 /* 90 */
85f10a01
MM
7728 { "(bad)", { XX } },
7729 { "(bad)", { XX } },
7730 { "(bad)", { XX } },
7731 { "(bad)", { XX } },
7732 { "(bad)", { XX } },
7733 { "(bad)", { XX } },
7734 { "(bad)", { XX } },
85f10a01 7735 { "(bad)", { XX } },
c0f3af97 7736 /* 98 */
85f10a01
MM
7737 { "(bad)", { XX } },
7738 { "(bad)", { XX } },
7739 { "(bad)", { XX } },
d5d7db8e
L
7740 { "(bad)", { XX } },
7741 { "(bad)", { XX } },
7742 { "(bad)", { XX } },
7743 { "(bad)", { XX } },
7744 { "(bad)", { XX } },
c0f3af97 7745 /* a0 */
d5d7db8e
L
7746 { "(bad)", { XX } },
7747 { "(bad)", { XX } },
7748 { "(bad)", { XX } },
7749 { "(bad)", { XX } },
7750 { "(bad)", { XX } },
7751 { "(bad)", { XX } },
7752 { "(bad)", { XX } },
7753 { "(bad)", { XX } },
c0f3af97 7754 /* a8 */
d5d7db8e
L
7755 { "(bad)", { XX } },
7756 { "(bad)", { XX } },
7757 { "(bad)", { XX } },
7758 { "(bad)", { XX } },
7759 { "(bad)", { XX } },
7760 { "(bad)", { XX } },
c0f3af97 7761 { REG_TABLE (REG_VEX_AE) },
d5d7db8e 7762 { "(bad)", { XX } },
c0f3af97 7763 /* b0 */
d5d7db8e 7764 { "(bad)", { XX } },
d5d7db8e
L
7765 { "(bad)", { XX } },
7766 { "(bad)", { XX } },
7767 { "(bad)", { XX } },
7768 { "(bad)", { XX } },
7769 { "(bad)", { XX } },
7770 { "(bad)", { XX } },
7771 { "(bad)", { XX } },
c0f3af97 7772 /* b8 */
d5d7db8e 7773 { "(bad)", { XX } },
d5d7db8e
L
7774 { "(bad)", { XX } },
7775 { "(bad)", { XX } },
7776 { "(bad)", { XX } },
7777 { "(bad)", { XX } },
7778 { "(bad)", { XX } },
7779 { "(bad)", { XX } },
7780 { "(bad)", { XX } },
c0f3af97 7781 /* c0 */
d5d7db8e 7782 { "(bad)", { XX } },
d5d7db8e 7783 { "(bad)", { XX } },
c0f3af97 7784 { PREFIX_TABLE (PREFIX_VEX_C2) },
d5d7db8e 7785 { "(bad)", { XX } },
c0f3af97
L
7786 { PREFIX_TABLE (PREFIX_VEX_C4) },
7787 { PREFIX_TABLE (PREFIX_VEX_C5) },
7788 { "vshufpX", { XM, Vex, EXx, Ib } },
d5d7db8e 7789 { "(bad)", { XX } },
c0f3af97 7790 /* c8 */
d5d7db8e
L
7791 { "(bad)", { XX } },
7792 { "(bad)", { XX } },
7793 { "(bad)", { XX } },
7794 { "(bad)", { XX } },
7795 { "(bad)", { XX } },
d5d7db8e
L
7796 { "(bad)", { XX } },
7797 { "(bad)", { XX } },
7798 { "(bad)", { XX } },
c0f3af97
L
7799 /* d0 */
7800 { PREFIX_TABLE (PREFIX_VEX_D0) },
7801 { PREFIX_TABLE (PREFIX_VEX_D1) },
7802 { PREFIX_TABLE (PREFIX_VEX_D2) },
7803 { PREFIX_TABLE (PREFIX_VEX_D3) },
7804 { PREFIX_TABLE (PREFIX_VEX_D4) },
7805 { PREFIX_TABLE (PREFIX_VEX_D5) },
7806 { PREFIX_TABLE (PREFIX_VEX_D6) },
7807 { PREFIX_TABLE (PREFIX_VEX_D7) },
7808 /* d8 */
7809 { PREFIX_TABLE (PREFIX_VEX_D8) },
7810 { PREFIX_TABLE (PREFIX_VEX_D9) },
7811 { PREFIX_TABLE (PREFIX_VEX_DA) },
7812 { PREFIX_TABLE (PREFIX_VEX_DB) },
7813 { PREFIX_TABLE (PREFIX_VEX_DC) },
7814 { PREFIX_TABLE (PREFIX_VEX_DD) },
7815 { PREFIX_TABLE (PREFIX_VEX_DE) },
7816 { PREFIX_TABLE (PREFIX_VEX_DF) },
7817 /* e0 */
7818 { PREFIX_TABLE (PREFIX_VEX_E0) },
7819 { PREFIX_TABLE (PREFIX_VEX_E1) },
7820 { PREFIX_TABLE (PREFIX_VEX_E2) },
7821 { PREFIX_TABLE (PREFIX_VEX_E3) },
7822 { PREFIX_TABLE (PREFIX_VEX_E4) },
7823 { PREFIX_TABLE (PREFIX_VEX_E5) },
7824 { PREFIX_TABLE (PREFIX_VEX_E6) },
7825 { PREFIX_TABLE (PREFIX_VEX_E7) },
7826 /* e8 */
7827 { PREFIX_TABLE (PREFIX_VEX_E8) },
7828 { PREFIX_TABLE (PREFIX_VEX_E9) },
7829 { PREFIX_TABLE (PREFIX_VEX_EA) },
7830 { PREFIX_TABLE (PREFIX_VEX_EB) },
7831 { PREFIX_TABLE (PREFIX_VEX_EC) },
7832 { PREFIX_TABLE (PREFIX_VEX_ED) },
7833 { PREFIX_TABLE (PREFIX_VEX_EE) },
7834 { PREFIX_TABLE (PREFIX_VEX_EF) },
7835 /* f0 */
7836 { PREFIX_TABLE (PREFIX_VEX_F0) },
7837 { PREFIX_TABLE (PREFIX_VEX_F1) },
7838 { PREFIX_TABLE (PREFIX_VEX_F2) },
7839 { PREFIX_TABLE (PREFIX_VEX_F3) },
7840 { PREFIX_TABLE (PREFIX_VEX_F4) },
7841 { PREFIX_TABLE (PREFIX_VEX_F5) },
7842 { PREFIX_TABLE (PREFIX_VEX_F6) },
7843 { PREFIX_TABLE (PREFIX_VEX_F7) },
7844 /* f8 */
7845 { PREFIX_TABLE (PREFIX_VEX_F8) },
7846 { PREFIX_TABLE (PREFIX_VEX_F9) },
7847 { PREFIX_TABLE (PREFIX_VEX_FA) },
7848 { PREFIX_TABLE (PREFIX_VEX_FB) },
7849 { PREFIX_TABLE (PREFIX_VEX_FC) },
7850 { PREFIX_TABLE (PREFIX_VEX_FD) },
7851 { PREFIX_TABLE (PREFIX_VEX_FE) },
d5d7db8e 7852 { "(bad)", { XX } },
c0f3af97
L
7853 },
7854 /* VEX_0F38 */
7855 {
7856 /* 00 */
7857 { PREFIX_TABLE (PREFIX_VEX_3800) },
7858 { PREFIX_TABLE (PREFIX_VEX_3801) },
7859 { PREFIX_TABLE (PREFIX_VEX_3802) },
7860 { PREFIX_TABLE (PREFIX_VEX_3803) },
7861 { PREFIX_TABLE (PREFIX_VEX_3804) },
7862 { PREFIX_TABLE (PREFIX_VEX_3805) },
7863 { PREFIX_TABLE (PREFIX_VEX_3806) },
7864 { PREFIX_TABLE (PREFIX_VEX_3807) },
7865 /* 08 */
7866 { PREFIX_TABLE (PREFIX_VEX_3808) },
7867 { PREFIX_TABLE (PREFIX_VEX_3809) },
7868 { PREFIX_TABLE (PREFIX_VEX_380A) },
7869 { PREFIX_TABLE (PREFIX_VEX_380B) },
7870 { PREFIX_TABLE (PREFIX_VEX_380C) },
7871 { PREFIX_TABLE (PREFIX_VEX_380D) },
7872 { PREFIX_TABLE (PREFIX_VEX_380E) },
7873 { PREFIX_TABLE (PREFIX_VEX_380F) },
7874 /* 10 */
d5d7db8e
L
7875 { "(bad)", { XX } },
7876 { "(bad)", { XX } },
7877 { "(bad)", { XX } },
7878 { "(bad)", { XX } },
d5d7db8e
L
7879 { "(bad)", { XX } },
7880 { "(bad)", { XX } },
7881 { "(bad)", { XX } },
c0f3af97
L
7882 { PREFIX_TABLE (PREFIX_VEX_3817) },
7883 /* 18 */
7884 { PREFIX_TABLE (PREFIX_VEX_3818) },
7885 { PREFIX_TABLE (PREFIX_VEX_3819) },
7886 { PREFIX_TABLE (PREFIX_VEX_381A) },
d5d7db8e 7887 { "(bad)", { XX } },
c0f3af97
L
7888 { PREFIX_TABLE (PREFIX_VEX_381C) },
7889 { PREFIX_TABLE (PREFIX_VEX_381D) },
7890 { PREFIX_TABLE (PREFIX_VEX_381E) },
d5d7db8e 7891 { "(bad)", { XX } },
c0f3af97
L
7892 /* 20 */
7893 { PREFIX_TABLE (PREFIX_VEX_3820) },
7894 { PREFIX_TABLE (PREFIX_VEX_3821) },
7895 { PREFIX_TABLE (PREFIX_VEX_3822) },
7896 { PREFIX_TABLE (PREFIX_VEX_3823) },
7897 { PREFIX_TABLE (PREFIX_VEX_3824) },
7898 { PREFIX_TABLE (PREFIX_VEX_3825) },
d5d7db8e
L
7899 { "(bad)", { XX } },
7900 { "(bad)", { XX } },
c0f3af97
L
7901 /* 28 */
7902 { PREFIX_TABLE (PREFIX_VEX_3828) },
7903 { PREFIX_TABLE (PREFIX_VEX_3829) },
7904 { PREFIX_TABLE (PREFIX_VEX_382A) },
7905 { PREFIX_TABLE (PREFIX_VEX_382B) },
7906 { PREFIX_TABLE (PREFIX_VEX_382C) },
7907 { PREFIX_TABLE (PREFIX_VEX_382D) },
7908 { PREFIX_TABLE (PREFIX_VEX_382E) },
7909 { PREFIX_TABLE (PREFIX_VEX_382F) },
7910 /* 30 */
7911 { PREFIX_TABLE (PREFIX_VEX_3830) },
7912 { PREFIX_TABLE (PREFIX_VEX_3831) },
7913 { PREFIX_TABLE (PREFIX_VEX_3832) },
7914 { PREFIX_TABLE (PREFIX_VEX_3833) },
7915 { PREFIX_TABLE (PREFIX_VEX_3834) },
7916 { PREFIX_TABLE (PREFIX_VEX_3835) },
7917 { "(bad)", { XX } },
7918 { PREFIX_TABLE (PREFIX_VEX_3837) },
7919 /* 38 */
7920 { PREFIX_TABLE (PREFIX_VEX_3838) },
7921 { PREFIX_TABLE (PREFIX_VEX_3839) },
7922 { PREFIX_TABLE (PREFIX_VEX_383A) },
7923 { PREFIX_TABLE (PREFIX_VEX_383B) },
7924 { PREFIX_TABLE (PREFIX_VEX_383C) },
7925 { PREFIX_TABLE (PREFIX_VEX_383D) },
7926 { PREFIX_TABLE (PREFIX_VEX_383E) },
7927 { PREFIX_TABLE (PREFIX_VEX_383F) },
7928 /* 40 */
7929 { PREFIX_TABLE (PREFIX_VEX_3840) },
7930 { PREFIX_TABLE (PREFIX_VEX_3841) },
d5d7db8e 7931 { "(bad)", { XX } },
d5d7db8e
L
7932 { "(bad)", { XX } },
7933 { "(bad)", { XX } },
7934 { "(bad)", { XX } },
7935 { "(bad)", { XX } },
7936 { "(bad)", { XX } },
c0f3af97 7937 /* 48 */
d5d7db8e
L
7938 { "(bad)", { XX } },
7939 { "(bad)", { XX } },
7940 { "(bad)", { XX } },
d5d7db8e
L
7941 { "(bad)", { XX } },
7942 { "(bad)", { XX } },
7943 { "(bad)", { XX } },
7944 { "(bad)", { XX } },
7945 { "(bad)", { XX } },
c0f3af97 7946 /* 50 */
d5d7db8e
L
7947 { "(bad)", { XX } },
7948 { "(bad)", { XX } },
7949 { "(bad)", { XX } },
d5d7db8e
L
7950 { "(bad)", { XX } },
7951 { "(bad)", { XX } },
7952 { "(bad)", { XX } },
7953 { "(bad)", { XX } },
7954 { "(bad)", { XX } },
c0f3af97 7955 /* 58 */
d5d7db8e
L
7956 { "(bad)", { XX } },
7957 { "(bad)", { XX } },
7958 { "(bad)", { XX } },
d5d7db8e
L
7959 { "(bad)", { XX } },
7960 { "(bad)", { XX } },
7961 { "(bad)", { XX } },
7962 { "(bad)", { XX } },
7963 { "(bad)", { XX } },
c0f3af97 7964 /* 60 */
d5d7db8e
L
7965 { "(bad)", { XX } },
7966 { "(bad)", { XX } },
7967 { "(bad)", { XX } },
d5d7db8e
L
7968 { "(bad)", { XX } },
7969 { "(bad)", { XX } },
7970 { "(bad)", { XX } },
7971 { "(bad)", { XX } },
7972 { "(bad)", { XX } },
c0f3af97 7973 /* 68 */
d5d7db8e
L
7974 { "(bad)", { XX } },
7975 { "(bad)", { XX } },
7976 { "(bad)", { XX } },
d5d7db8e
L
7977 { "(bad)", { XX } },
7978 { "(bad)", { XX } },
7979 { "(bad)", { XX } },
7980 { "(bad)", { XX } },
7981 { "(bad)", { XX } },
c0f3af97 7982 /* 70 */
d5d7db8e
L
7983 { "(bad)", { XX } },
7984 { "(bad)", { XX } },
7985 { "(bad)", { XX } },
d5d7db8e
L
7986 { "(bad)", { XX } },
7987 { "(bad)", { XX } },
7988 { "(bad)", { XX } },
7989 { "(bad)", { XX } },
7990 { "(bad)", { XX } },
c0f3af97 7991 /* 78 */
d5d7db8e
L
7992 { "(bad)", { XX } },
7993 { "(bad)", { XX } },
7994 { "(bad)", { XX } },
d5d7db8e
L
7995 { "(bad)", { XX } },
7996 { "(bad)", { XX } },
7997 { "(bad)", { XX } },
7998 { "(bad)", { XX } },
7999 { "(bad)", { XX } },
c0f3af97 8000 /* 80 */
d5d7db8e
L
8001 { "(bad)", { XX } },
8002 { "(bad)", { XX } },
8003 { "(bad)", { XX } },
d5d7db8e
L
8004 { "(bad)", { XX } },
8005 { "(bad)", { XX } },
8006 { "(bad)", { XX } },
8007 { "(bad)", { XX } },
8008 { "(bad)", { XX } },
c0f3af97 8009 /* 88 */
d5d7db8e
L
8010 { "(bad)", { XX } },
8011 { "(bad)", { XX } },
8012 { "(bad)", { XX } },
d5d7db8e
L
8013 { "(bad)", { XX } },
8014 { "(bad)", { XX } },
8015 { "(bad)", { XX } },
8016 { "(bad)", { XX } },
8017 { "(bad)", { XX } },
c0f3af97 8018 /* 90 */
d5d7db8e
L
8019 { "(bad)", { XX } },
8020 { "(bad)", { XX } },
8021 { "(bad)", { XX } },
d5d7db8e
L
8022 { "(bad)", { XX } },
8023 { "(bad)", { XX } },
8024 { "(bad)", { XX } },
0bfee649
L
8025 { PREFIX_TABLE (PREFIX_VEX_3896) },
8026 { PREFIX_TABLE (PREFIX_VEX_3897) },
c0f3af97 8027 /* 98 */
0bfee649
L
8028 { PREFIX_TABLE (PREFIX_VEX_3898) },
8029 { PREFIX_TABLE (PREFIX_VEX_3899) },
8030 { PREFIX_TABLE (PREFIX_VEX_389A) },
8031 { PREFIX_TABLE (PREFIX_VEX_389B) },
8032 { PREFIX_TABLE (PREFIX_VEX_389C) },
8033 { PREFIX_TABLE (PREFIX_VEX_389D) },
8034 { PREFIX_TABLE (PREFIX_VEX_389E) },
8035 { PREFIX_TABLE (PREFIX_VEX_389F) },
c0f3af97 8036 /* a0 */
d5d7db8e
L
8037 { "(bad)", { XX } },
8038 { "(bad)", { XX } },
8039 { "(bad)", { XX } },
d5d7db8e
L
8040 { "(bad)", { XX } },
8041 { "(bad)", { XX } },
8042 { "(bad)", { XX } },
0bfee649
L
8043 { PREFIX_TABLE (PREFIX_VEX_38A6) },
8044 { PREFIX_TABLE (PREFIX_VEX_38A7) },
c0f3af97 8045 /* a8 */
0bfee649
L
8046 { PREFIX_TABLE (PREFIX_VEX_38A8) },
8047 { PREFIX_TABLE (PREFIX_VEX_38A9) },
8048 { PREFIX_TABLE (PREFIX_VEX_38AA) },
8049 { PREFIX_TABLE (PREFIX_VEX_38AB) },
8050 { PREFIX_TABLE (PREFIX_VEX_38AC) },
8051 { PREFIX_TABLE (PREFIX_VEX_38AD) },
8052 { PREFIX_TABLE (PREFIX_VEX_38AE) },
8053 { PREFIX_TABLE (PREFIX_VEX_38AF) },
c0f3af97 8054 /* b0 */
d5d7db8e
L
8055 { "(bad)", { XX } },
8056 { "(bad)", { XX } },
8057 { "(bad)", { XX } },
8058 { "(bad)", { XX } },
8059 { "(bad)", { XX } },
8060 { "(bad)", { XX } },
0bfee649
L
8061 { PREFIX_TABLE (PREFIX_VEX_38B6) },
8062 { PREFIX_TABLE (PREFIX_VEX_38B7) },
c0f3af97 8063 /* b8 */
0bfee649
L
8064 { PREFIX_TABLE (PREFIX_VEX_38B8) },
8065 { PREFIX_TABLE (PREFIX_VEX_38B9) },
8066 { PREFIX_TABLE (PREFIX_VEX_38BA) },
8067 { PREFIX_TABLE (PREFIX_VEX_38BB) },
8068 { PREFIX_TABLE (PREFIX_VEX_38BC) },
8069 { PREFIX_TABLE (PREFIX_VEX_38BD) },
8070 { PREFIX_TABLE (PREFIX_VEX_38BE) },
8071 { PREFIX_TABLE (PREFIX_VEX_38BF) },
c0f3af97 8072 /* c0 */
d5d7db8e
L
8073 { "(bad)", { XX } },
8074 { "(bad)", { XX } },
8075 { "(bad)", { XX } },
8076 { "(bad)", { XX } },
d5d7db8e
L
8077 { "(bad)", { XX } },
8078 { "(bad)", { XX } },
8079 { "(bad)", { XX } },
8080 { "(bad)", { XX } },
c0f3af97 8081 /* c8 */
d5d7db8e
L
8082 { "(bad)", { XX } },
8083 { "(bad)", { XX } },
8084 { "(bad)", { XX } },
8085 { "(bad)", { XX } },
d5d7db8e 8086 { "(bad)", { XX } },
d5d7db8e
L
8087 { "(bad)", { XX } },
8088 { "(bad)", { XX } },
d5d7db8e 8089 { "(bad)", { XX } },
c0f3af97 8090 /* d0 */
d5d7db8e
L
8091 { "(bad)", { XX } },
8092 { "(bad)", { XX } },
d5d7db8e
L
8093 { "(bad)", { XX } },
8094 { "(bad)", { XX } },
8095 { "(bad)", { XX } },
8096 { "(bad)", { XX } },
d5d7db8e 8097 { "(bad)", { XX } },
d5d7db8e 8098 { "(bad)", { XX } },
c0f3af97 8099 /* d8 */
d5d7db8e 8100 { "(bad)", { XX } },
d5d7db8e
L
8101 { "(bad)", { XX } },
8102 { "(bad)", { XX } },
a5ff0eb2
L
8103 { PREFIX_TABLE (PREFIX_VEX_38DB) },
8104 { PREFIX_TABLE (PREFIX_VEX_38DC) },
8105 { PREFIX_TABLE (PREFIX_VEX_38DD) },
8106 { PREFIX_TABLE (PREFIX_VEX_38DE) },
8107 { PREFIX_TABLE (PREFIX_VEX_38DF) },
c0f3af97 8108 /* e0 */
d5d7db8e 8109 { "(bad)", { XX } },
d5d7db8e
L
8110 { "(bad)", { XX } },
8111 { "(bad)", { XX } },
8112 { "(bad)", { XX } },
8113 { "(bad)", { XX } },
d5d7db8e
L
8114 { "(bad)", { XX } },
8115 { "(bad)", { XX } },
8116 { "(bad)", { XX } },
c0f3af97 8117 /* e8 */
d5d7db8e
L
8118 { "(bad)", { XX } },
8119 { "(bad)", { XX } },
8120 { "(bad)", { XX } },
8121 { "(bad)", { XX } },
8122 { "(bad)", { XX } },
d5d7db8e
L
8123 { "(bad)", { XX } },
8124 { "(bad)", { XX } },
8125 { "(bad)", { XX } },
c0f3af97 8126 /* f0 */
d5d7db8e
L
8127 { "(bad)", { XX } },
8128 { "(bad)", { XX } },
8129 { "(bad)", { XX } },
8130 { "(bad)", { XX } },
8131 { "(bad)", { XX } },
d5d7db8e
L
8132 { "(bad)", { XX } },
8133 { "(bad)", { XX } },
8134 { "(bad)", { XX } },
c0f3af97 8135 /* f8 */
d5d7db8e
L
8136 { "(bad)", { XX } },
8137 { "(bad)", { XX } },
8138 { "(bad)", { XX } },
8139 { "(bad)", { XX } },
8140 { "(bad)", { XX } },
d5d7db8e
L
8141 { "(bad)", { XX } },
8142 { "(bad)", { XX } },
8143 { "(bad)", { XX } },
c0f3af97
L
8144 },
8145 /* VEX_0F3A */
8146 {
8147 /* 00 */
d5d7db8e
L
8148 { "(bad)", { XX } },
8149 { "(bad)", { XX } },
8150 { "(bad)", { XX } },
8151 { "(bad)", { XX } },
c0f3af97
L
8152 { PREFIX_TABLE (PREFIX_VEX_3A04) },
8153 { PREFIX_TABLE (PREFIX_VEX_3A05) },
8154 { PREFIX_TABLE (PREFIX_VEX_3A06) },
d5d7db8e 8155 { "(bad)", { XX } },
c0f3af97
L
8156 /* 08 */
8157 { PREFIX_TABLE (PREFIX_VEX_3A08) },
8158 { PREFIX_TABLE (PREFIX_VEX_3A09) },
8159 { PREFIX_TABLE (PREFIX_VEX_3A0A) },
8160 { PREFIX_TABLE (PREFIX_VEX_3A0B) },
8161 { PREFIX_TABLE (PREFIX_VEX_3A0C) },
8162 { PREFIX_TABLE (PREFIX_VEX_3A0D) },
8163 { PREFIX_TABLE (PREFIX_VEX_3A0E) },
8164 { PREFIX_TABLE (PREFIX_VEX_3A0F) },
8165 /* 10 */
d5d7db8e
L
8166 { "(bad)", { XX } },
8167 { "(bad)", { XX } },
8168 { "(bad)", { XX } },
8169 { "(bad)", { XX } },
c0f3af97
L
8170 { PREFIX_TABLE (PREFIX_VEX_3A14) },
8171 { PREFIX_TABLE (PREFIX_VEX_3A15) },
8172 { PREFIX_TABLE (PREFIX_VEX_3A16) },
8173 { PREFIX_TABLE (PREFIX_VEX_3A17) },
8174 /* 18 */
8175 { PREFIX_TABLE (PREFIX_VEX_3A18) },
8176 { PREFIX_TABLE (PREFIX_VEX_3A19) },
d5d7db8e
L
8177 { "(bad)", { XX } },
8178 { "(bad)", { XX } },
8179 { "(bad)", { XX } },
8180 { "(bad)", { XX } },
d5d7db8e
L
8181 { "(bad)", { XX } },
8182 { "(bad)", { XX } },
c0f3af97
L
8183 /* 20 */
8184 { PREFIX_TABLE (PREFIX_VEX_3A20) },
8185 { PREFIX_TABLE (PREFIX_VEX_3A21) },
8186 { PREFIX_TABLE (PREFIX_VEX_3A22) },
d5d7db8e
L
8187 { "(bad)", { XX } },
8188 { "(bad)", { XX } },
8189 { "(bad)", { XX } },
8190 { "(bad)", { XX } },
8191 { "(bad)", { XX } },
c0f3af97 8192 /* 28 */
d5d7db8e 8193 { "(bad)", { XX } },
d5d7db8e
L
8194 { "(bad)", { XX } },
8195 { "(bad)", { XX } },
8196 { "(bad)", { XX } },
8197 { "(bad)", { XX } },
8198 { "(bad)", { XX } },
8199 { "(bad)", { XX } },
8200 { "(bad)", { XX } },
c0f3af97 8201 /* 30 */
d5d7db8e 8202 { "(bad)", { XX } },
d5d7db8e
L
8203 { "(bad)", { XX } },
8204 { "(bad)", { XX } },
8205 { "(bad)", { XX } },
8206 { "(bad)", { XX } },
8207 { "(bad)", { XX } },
8208 { "(bad)", { XX } },
8209 { "(bad)", { XX } },
c0f3af97 8210 /* 38 */
d5d7db8e 8211 { "(bad)", { XX } },
d5d7db8e
L
8212 { "(bad)", { XX } },
8213 { "(bad)", { XX } },
8214 { "(bad)", { XX } },
8215 { "(bad)", { XX } },
8216 { "(bad)", { XX } },
8217 { "(bad)", { XX } },
8218 { "(bad)", { XX } },
c0f3af97
L
8219 /* 40 */
8220 { PREFIX_TABLE (PREFIX_VEX_3A40) },
8221 { PREFIX_TABLE (PREFIX_VEX_3A41) },
8222 { PREFIX_TABLE (PREFIX_VEX_3A42) },
d5d7db8e 8223 { "(bad)", { XX } },
ce2f5b3c 8224 { PREFIX_TABLE (PREFIX_VEX_3A44) },
d5d7db8e
L
8225 { "(bad)", { XX } },
8226 { "(bad)", { XX } },
8227 { "(bad)", { XX } },
c0f3af97 8228 /* 48 */
0bfee649
L
8229 { "(bad)", { XX } },
8230 { "(bad)", { XX } },
c0f3af97
L
8231 { PREFIX_TABLE (PREFIX_VEX_3A4A) },
8232 { PREFIX_TABLE (PREFIX_VEX_3A4B) },
8233 { PREFIX_TABLE (PREFIX_VEX_3A4C) },
d5d7db8e
L
8234 { "(bad)", { XX } },
8235 { "(bad)", { XX } },
8236 { "(bad)", { XX } },
c0f3af97 8237 /* 50 */
d5d7db8e 8238 { "(bad)", { XX } },
d5d7db8e
L
8239 { "(bad)", { XX } },
8240 { "(bad)", { XX } },
8241 { "(bad)", { XX } },
8242 { "(bad)", { XX } },
8243 { "(bad)", { XX } },
8244 { "(bad)", { XX } },
8245 { "(bad)", { XX } },
c0f3af97 8246 /* 58 */
d5d7db8e 8247 { "(bad)", { XX } },
d5d7db8e
L
8248 { "(bad)", { XX } },
8249 { "(bad)", { XX } },
8250 { "(bad)", { XX } },
922d8de8
DR
8251 { PREFIX_TABLE (PREFIX_VEX_3A5C) },
8252 { PREFIX_TABLE (PREFIX_VEX_3A5D) },
8253 { PREFIX_TABLE (PREFIX_VEX_3A5E) },
8254 { PREFIX_TABLE (PREFIX_VEX_3A5F) },
c0f3af97
L
8255 /* 60 */
8256 { PREFIX_TABLE (PREFIX_VEX_3A60) },
8257 { PREFIX_TABLE (PREFIX_VEX_3A61) },
8258 { PREFIX_TABLE (PREFIX_VEX_3A62) },
8259 { PREFIX_TABLE (PREFIX_VEX_3A63) },
d5d7db8e
L
8260 { "(bad)", { XX } },
8261 { "(bad)", { XX } },
8262 { "(bad)", { XX } },
8263 { "(bad)", { XX } },
c0f3af97 8264 /* 68 */
922d8de8
DR
8265 { PREFIX_TABLE (PREFIX_VEX_3A68) },
8266 { PREFIX_TABLE (PREFIX_VEX_3A69) },
8267 { PREFIX_TABLE (PREFIX_VEX_3A6A) },
8268 { PREFIX_TABLE (PREFIX_VEX_3A6B) },
8269 { PREFIX_TABLE (PREFIX_VEX_3A6C) },
8270 { PREFIX_TABLE (PREFIX_VEX_3A6D) },
8271 { PREFIX_TABLE (PREFIX_VEX_3A6E) },
8272 { PREFIX_TABLE (PREFIX_VEX_3A6F) },
c0f3af97 8273 /* 70 */
d5d7db8e 8274 { "(bad)", { XX } },
d5d7db8e
L
8275 { "(bad)", { XX } },
8276 { "(bad)", { XX } },
8277 { "(bad)", { XX } },
8278 { "(bad)", { XX } },
8279 { "(bad)", { XX } },
8280 { "(bad)", { XX } },
8281 { "(bad)", { XX } },
c0f3af97 8282 /* 78 */
922d8de8
DR
8283 { PREFIX_TABLE (PREFIX_VEX_3A78) },
8284 { PREFIX_TABLE (PREFIX_VEX_3A79) },
8285 { PREFIX_TABLE (PREFIX_VEX_3A7A) },
8286 { PREFIX_TABLE (PREFIX_VEX_3A7B) },
8287 { PREFIX_TABLE (PREFIX_VEX_3A7C) },
8288 { PREFIX_TABLE (PREFIX_VEX_3A7D) },
8289 { PREFIX_TABLE (PREFIX_VEX_3A7E) },
8290 { PREFIX_TABLE (PREFIX_VEX_3A7F) },
c0f3af97 8291 /* 80 */
d5d7db8e 8292 { "(bad)", { XX } },
d5d7db8e
L
8293 { "(bad)", { XX } },
8294 { "(bad)", { XX } },
8295 { "(bad)", { XX } },
8296 { "(bad)", { XX } },
8297 { "(bad)", { XX } },
8298 { "(bad)", { XX } },
8299 { "(bad)", { XX } },
c0f3af97 8300 /* 88 */
d5d7db8e 8301 { "(bad)", { XX } },
d5d7db8e
L
8302 { "(bad)", { XX } },
8303 { "(bad)", { XX } },
8304 { "(bad)", { XX } },
8305 { "(bad)", { XX } },
8306 { "(bad)", { XX } },
8307 { "(bad)", { XX } },
8308 { "(bad)", { XX } },
c0f3af97 8309 /* 90 */
d5d7db8e 8310 { "(bad)", { XX } },
d5d7db8e
L
8311 { "(bad)", { XX } },
8312 { "(bad)", { XX } },
8313 { "(bad)", { XX } },
8314 { "(bad)", { XX } },
8315 { "(bad)", { XX } },
8316 { "(bad)", { XX } },
8317 { "(bad)", { XX } },
c0f3af97 8318 /* 98 */
d5d7db8e 8319 { "(bad)", { XX } },
d5d7db8e
L
8320 { "(bad)", { XX } },
8321 { "(bad)", { XX } },
8322 { "(bad)", { XX } },
8323 { "(bad)", { XX } },
8324 { "(bad)", { XX } },
8325 { "(bad)", { XX } },
8326 { "(bad)", { XX } },
c0f3af97 8327 /* a0 */
d5d7db8e 8328 { "(bad)", { XX } },
85f10a01
MM
8329 { "(bad)", { XX } },
8330 { "(bad)", { XX } },
d5d7db8e
L
8331 { "(bad)", { XX } },
8332 { "(bad)", { XX } },
8333 { "(bad)", { XX } },
8334 { "(bad)", { XX } },
8335 { "(bad)", { XX } },
c0f3af97 8336 /* a8 */
d5d7db8e 8337 { "(bad)", { XX } },
d5d7db8e
L
8338 { "(bad)", { XX } },
8339 { "(bad)", { XX } },
8340 { "(bad)", { XX } },
8341 { "(bad)", { XX } },
8342 { "(bad)", { XX } },
8343 { "(bad)", { XX } },
8344 { "(bad)", { XX } },
c0f3af97
L
8345 /* b0 */
8346 { "(bad)", { XX } },
8347 { "(bad)", { XX } },
8348 { "(bad)", { XX } },
8349 { "(bad)", { XX } },
8350 { "(bad)", { XX } },
8351 { "(bad)", { XX } },
8352 { "(bad)", { XX } },
8353 { "(bad)", { XX } },
8354 /* b8 */
8355 { "(bad)", { XX } },
8356 { "(bad)", { XX } },
8357 { "(bad)", { XX } },
8358 { "(bad)", { XX } },
8359 { "(bad)", { XX } },
8360 { "(bad)", { XX } },
8361 { "(bad)", { XX } },
8362 { "(bad)", { XX } },
8363 /* c0 */
8364 { "(bad)", { XX } },
8365 { "(bad)", { XX } },
8366 { "(bad)", { XX } },
8367 { "(bad)", { XX } },
8368 { "(bad)", { XX } },
8369 { "(bad)", { XX } },
8370 { "(bad)", { XX } },
8371 { "(bad)", { XX } },
8372 /* c8 */
8373 { "(bad)", { XX } },
8374 { "(bad)", { XX } },
d5d7db8e 8375 { "(bad)", { XX } },
d5d7db8e
L
8376 { "(bad)", { XX } },
8377 { "(bad)", { XX } },
8378 { "(bad)", { XX } },
8379 { "(bad)", { XX } },
8380 { "(bad)", { XX } },
c0f3af97
L
8381 /* d0 */
8382 { "(bad)", { XX } },
8383 { "(bad)", { XX } },
8384 { "(bad)", { XX } },
d5d7db8e
L
8385 { "(bad)", { XX } },
8386 { "(bad)", { XX } },
8387 { "(bad)", { XX } },
c0f3af97
L
8388 { "(bad)", { XX } },
8389 { "(bad)", { XX } },
8390 /* d8 */
8391 { "(bad)", { XX } },
d5d7db8e
L
8392 { "(bad)", { XX } },
8393 { "(bad)", { XX } },
8394 { "(bad)", { XX } },
8395 { "(bad)", { XX } },
8396 { "(bad)", { XX } },
8397 { "(bad)", { XX } },
a5ff0eb2 8398 { PREFIX_TABLE (PREFIX_VEX_3ADF) },
c0f3af97 8399 /* e0 */
d5d7db8e 8400 { "(bad)", { XX } },
d5d7db8e
L
8401 { "(bad)", { XX } },
8402 { "(bad)", { XX } },
8403 { "(bad)", { XX } },
8404 { "(bad)", { XX } },
8405 { "(bad)", { XX } },
8406 { "(bad)", { XX } },
8407 { "(bad)", { XX } },
c0f3af97 8408 /* e8 */
d5d7db8e 8409 { "(bad)", { XX } },
d5d7db8e
L
8410 { "(bad)", { XX } },
8411 { "(bad)", { XX } },
8412 { "(bad)", { XX } },
8413 { "(bad)", { XX } },
8414 { "(bad)", { XX } },
8415 { "(bad)", { XX } },
8416 { "(bad)", { XX } },
c0f3af97 8417 /* f0 */
d5d7db8e 8418 { "(bad)", { XX } },
d5d7db8e
L
8419 { "(bad)", { XX } },
8420 { "(bad)", { XX } },
8421 { "(bad)", { XX } },
8422 { "(bad)", { XX } },
8423 { "(bad)", { XX } },
8424 { "(bad)", { XX } },
8425 { "(bad)", { XX } },
c0f3af97 8426 /* f8 */
d5d7db8e 8427 { "(bad)", { XX } },
d5d7db8e
L
8428 { "(bad)", { XX } },
8429 { "(bad)", { XX } },
8430 { "(bad)", { XX } },
8431 { "(bad)", { XX } },
8432 { "(bad)", { XX } },
8433 { "(bad)", { XX } },
8434 { "(bad)", { XX } },
c0f3af97
L
8435 },
8436};
8437
8438static const struct dis386 vex_len_table[][2] = {
8439 /* VEX_LEN_10_P_1 */
8440 {
9e30b8e0 8441 { VEX_W_TABLE (VEX_W_10_P_1) },
d5d7db8e 8442 { "(bad)", { XX } },
c0f3af97
L
8443 },
8444
8445 /* VEX_LEN_10_P_3 */
8446 {
9e30b8e0 8447 { VEX_W_TABLE (VEX_W_10_P_3) },
d5d7db8e 8448 { "(bad)", { XX } },
c0f3af97
L
8449 },
8450
8451 /* VEX_LEN_11_P_1 */
8452 {
9e30b8e0 8453 { VEX_W_TABLE (VEX_W_11_P_1) },
d5d7db8e 8454 { "(bad)", { XX } },
c0f3af97
L
8455 },
8456
8457 /* VEX_LEN_11_P_3 */
8458 {
9e30b8e0 8459 { VEX_W_TABLE (VEX_W_11_P_3) },
d5d7db8e 8460 { "(bad)", { XX } },
c0f3af97
L
8461 },
8462
8463 /* VEX_LEN_12_P_0_M_0 */
8464 {
9e30b8e0 8465 { VEX_W_TABLE (VEX_W_12_P_0_M_0) },
d5d7db8e 8466 { "(bad)", { XX } },
c0f3af97
L
8467 },
8468
8469 /* VEX_LEN_12_P_0_M_1 */
8470 {
9e30b8e0 8471 { VEX_W_TABLE (VEX_W_12_P_0_M_1) },
d5d7db8e 8472 { "(bad)", { XX } },
c0f3af97
L
8473 },
8474
8475 /* VEX_LEN_12_P_2 */
8476 {
9e30b8e0 8477 { VEX_W_TABLE (VEX_W_12_P_2) },
d5d7db8e 8478 { "(bad)", { XX } },
c0f3af97
L
8479 },
8480
8481 /* VEX_LEN_13_M_0 */
8482 {
9e30b8e0 8483 { VEX_W_TABLE (VEX_W_13_M_0) },
85f10a01 8484 { "(bad)", { XX } },
c0f3af97
L
8485 },
8486
8487 /* VEX_LEN_16_P_0_M_0 */
8488 {
9e30b8e0 8489 { VEX_W_TABLE (VEX_W_16_P_0_M_0) },
85f10a01 8490 { "(bad)", { XX } },
c0f3af97
L
8491 },
8492
8493 /* VEX_LEN_16_P_0_M_1 */
8494 {
9e30b8e0 8495 { VEX_W_TABLE (VEX_W_16_P_0_M_1) },
85f10a01 8496 { "(bad)", { XX } },
c0f3af97
L
8497 },
8498
8499 /* VEX_LEN_16_P_2 */
8500 {
9e30b8e0 8501 { VEX_W_TABLE (VEX_W_16_P_2) },
85f10a01 8502 { "(bad)", { XX } },
c0f3af97
L
8503 },
8504
8505 /* VEX_LEN_17_M_0 */
8506 {
9e30b8e0 8507 { VEX_W_TABLE (VEX_W_17_M_0) },
85f10a01 8508 { "(bad)", { XX } },
c0f3af97
L
8509 },
8510
8511 /* VEX_LEN_2A_P_1 */
8512 {
8513 { "vcvtsi2ss%LQ", { XM, Vex128, Ev } },
d5d7db8e 8514 { "(bad)", { XX } },
c0f3af97
L
8515 },
8516
8517 /* VEX_LEN_2A_P_3 */
8518 {
8519 { "vcvtsi2sd%LQ", { XM, Vex128, Ev } },
d5d7db8e 8520 { "(bad)", { XX } },
c0f3af97
L
8521 },
8522
c0f3af97
L
8523 /* VEX_LEN_2C_P_1 */
8524 {
8525 { "vcvttss2siY", { Gv, EXd } },
d5d7db8e 8526 { "(bad)", { XX } },
c0f3af97
L
8527 },
8528
8529 /* VEX_LEN_2C_P_3 */
8530 {
8531 { "vcvttsd2siY", { Gv, EXq } },
d5d7db8e 8532 { "(bad)", { XX } },
c0f3af97
L
8533 },
8534
8535 /* VEX_LEN_2D_P_1 */
8536 {
8537 { "vcvtss2siY", { Gv, EXd } },
85f10a01 8538 { "(bad)", { XX } },
c0f3af97
L
8539 },
8540
8541 /* VEX_LEN_2D_P_3 */
8542 {
8543 { "vcvtsd2siY", { Gv, EXq } },
d5d7db8e 8544 { "(bad)", { XX } },
c0f3af97
L
8545 },
8546
8547 /* VEX_LEN_2E_P_0 */
8548 {
9e30b8e0 8549 { VEX_W_TABLE (VEX_W_2E_P_0) },
d5d7db8e 8550 { "(bad)", { XX } },
c0f3af97
L
8551 },
8552
8553 /* VEX_LEN_2E_P_2 */
8554 {
9e30b8e0 8555 { VEX_W_TABLE (VEX_W_2E_P_2) },
d5d7db8e 8556 { "(bad)", { XX } },
c0f3af97
L
8557 },
8558
8559 /* VEX_LEN_2F_P_0 */
8560 {
9e30b8e0 8561 { VEX_W_TABLE (VEX_W_2F_P_0) },
d5d7db8e 8562 { "(bad)", { XX } },
c0f3af97
L
8563 },
8564
8565 /* VEX_LEN_2F_P_2 */
8566 {
9e30b8e0 8567 { VEX_W_TABLE (VEX_W_2F_P_2) },
d5d7db8e 8568 { "(bad)", { XX } },
c0f3af97
L
8569 },
8570
8571 /* VEX_LEN_51_P_1 */
8572 {
9e30b8e0 8573 { VEX_W_TABLE (VEX_W_51_P_1) },
d5d7db8e 8574 { "(bad)", { XX } },
c0f3af97
L
8575 },
8576
8577 /* VEX_LEN_51_P_3 */
8578 {
9e30b8e0 8579 { VEX_W_TABLE (VEX_W_51_P_3) },
d5d7db8e 8580 { "(bad)", { XX } },
c0f3af97
L
8581 },
8582
8583 /* VEX_LEN_52_P_1 */
8584 {
9e30b8e0 8585 { VEX_W_TABLE (VEX_W_52_P_1) },
d5d7db8e 8586 { "(bad)", { XX } },
c0f3af97
L
8587 },
8588
8589 /* VEX_LEN_53_P_1 */
8590 {
9e30b8e0 8591 { VEX_W_TABLE (VEX_W_53_P_1) },
d5d7db8e 8592 { "(bad)", { XX } },
c0f3af97
L
8593 },
8594
8595 /* VEX_LEN_58_P_1 */
8596 {
9e30b8e0 8597 { VEX_W_TABLE (VEX_W_58_P_1) },
d5d7db8e 8598 { "(bad)", { XX } },
c0f3af97
L
8599 },
8600
8601 /* VEX_LEN_58_P_3 */
8602 {
9e30b8e0 8603 { VEX_W_TABLE (VEX_W_58_P_3) },
d5d7db8e 8604 { "(bad)", { XX } },
c0f3af97
L
8605 },
8606
8607 /* VEX_LEN_59_P_1 */
8608 {
9e30b8e0 8609 { VEX_W_TABLE (VEX_W_59_P_1) },
d5d7db8e 8610 { "(bad)", { XX } },
c0f3af97
L
8611 },
8612
8613 /* VEX_LEN_59_P_3 */
8614 {
9e30b8e0 8615 { VEX_W_TABLE (VEX_W_59_P_3) },
d5d7db8e 8616 { "(bad)", { XX } },
c0f3af97
L
8617 },
8618
8619 /* VEX_LEN_5A_P_1 */
8620 {
9e30b8e0 8621 { VEX_W_TABLE (VEX_W_5A_P_1) },
d5d7db8e 8622 { "(bad)", { XX } },
c0f3af97
L
8623 },
8624
8625 /* VEX_LEN_5A_P_3 */
8626 {
9e30b8e0 8627 { VEX_W_TABLE (VEX_W_5A_P_3) },
d5d7db8e 8628 { "(bad)", { XX } },
c0f3af97
L
8629 },
8630
8631 /* VEX_LEN_5C_P_1 */
8632 {
9e30b8e0 8633 { VEX_W_TABLE (VEX_W_5C_P_1) },
d5d7db8e 8634 { "(bad)", { XX } },
c0f3af97
L
8635 },
8636
8637 /* VEX_LEN_5C_P_3 */
8638 {
9e30b8e0 8639 { VEX_W_TABLE (VEX_W_5C_P_3) },
d5d7db8e 8640 { "(bad)", { XX } },
c0f3af97
L
8641 },
8642
8643 /* VEX_LEN_5D_P_1 */
8644 {
9e30b8e0 8645 { VEX_W_TABLE (VEX_W_5D_P_1) },
d5d7db8e 8646 { "(bad)", { XX } },
c0f3af97
L
8647 },
8648
8649 /* VEX_LEN_5D_P_3 */
8650 {
9e30b8e0 8651 { VEX_W_TABLE (VEX_W_5D_P_3) },
d5d7db8e 8652 { "(bad)", { XX } },
c0f3af97
L
8653 },
8654
8655 /* VEX_LEN_5E_P_1 */
8656 {
9e30b8e0 8657 { VEX_W_TABLE (VEX_W_5E_P_1) },
85f10a01 8658 { "(bad)", { XX } },
c0f3af97
L
8659 },
8660
8661 /* VEX_LEN_5E_P_3 */
8662 {
9e30b8e0 8663 { VEX_W_TABLE (VEX_W_5E_P_3) },
85f10a01 8664 { "(bad)", { XX } },
c0f3af97
L
8665 },
8666
8667 /* VEX_LEN_5F_P_1 */
8668 {
9e30b8e0 8669 { VEX_W_TABLE (VEX_W_5F_P_1) },
85f10a01 8670 { "(bad)", { XX } },
c0f3af97
L
8671 },
8672
8673 /* VEX_LEN_5F_P_3 */
8674 {
9e30b8e0 8675 { VEX_W_TABLE (VEX_W_5F_P_3) },
85f10a01 8676 { "(bad)", { XX } },
c0f3af97
L
8677 },
8678
8679 /* VEX_LEN_60_P_2 */
8680 {
9e30b8e0 8681 { VEX_W_TABLE (VEX_W_60_P_2) },
d5d7db8e 8682 { "(bad)", { XX } },
c0f3af97
L
8683 },
8684
8685 /* VEX_LEN_61_P_2 */
8686 {
9e30b8e0 8687 { VEX_W_TABLE (VEX_W_61_P_2) },
d5d7db8e 8688 { "(bad)", { XX } },
c0f3af97
L
8689 },
8690
8691 /* VEX_LEN_62_P_2 */
8692 {
9e30b8e0 8693 { VEX_W_TABLE (VEX_W_62_P_2) },
d5d7db8e 8694 { "(bad)", { XX } },
c0f3af97
L
8695 },
8696
8697 /* VEX_LEN_63_P_2 */
8698 {
9e30b8e0 8699 { VEX_W_TABLE (VEX_W_63_P_2) },
d5d7db8e 8700 { "(bad)", { XX } },
c0f3af97
L
8701 },
8702
8703 /* VEX_LEN_64_P_2 */
8704 {
9e30b8e0 8705 { VEX_W_TABLE (VEX_W_64_P_2) },
d5d7db8e 8706 { "(bad)", { XX } },
c0f3af97
L
8707 },
8708
8709 /* VEX_LEN_65_P_2 */
8710 {
9e30b8e0 8711 { VEX_W_TABLE (VEX_W_65_P_2) },
d5d7db8e 8712 { "(bad)", { XX } },
c0f3af97
L
8713 },
8714
8715 /* VEX_LEN_66_P_2 */
8716 {
9e30b8e0 8717 { VEX_W_TABLE (VEX_W_66_P_2) },
d5d7db8e 8718 { "(bad)", { XX } },
c0f3af97
L
8719 },
8720
8721 /* VEX_LEN_67_P_2 */
8722 {
9e30b8e0 8723 { VEX_W_TABLE (VEX_W_67_P_2) },
d5d7db8e 8724 { "(bad)", { XX } },
c0f3af97
L
8725 },
8726
8727 /* VEX_LEN_68_P_2 */
8728 {
9e30b8e0 8729 { VEX_W_TABLE (VEX_W_68_P_2) },
d5d7db8e 8730 { "(bad)", { XX } },
c0f3af97
L
8731 },
8732
8733 /* VEX_LEN_69_P_2 */
8734 {
9e30b8e0 8735 { VEX_W_TABLE (VEX_W_69_P_2) },
d5d7db8e 8736 { "(bad)", { XX } },
c0f3af97
L
8737 },
8738
8739 /* VEX_LEN_6A_P_2 */
8740 {
9e30b8e0 8741 { VEX_W_TABLE (VEX_W_6A_P_2) },
d5d7db8e 8742 { "(bad)", { XX } },
c0f3af97
L
8743 },
8744
8745 /* VEX_LEN_6B_P_2 */
8746 {
9e30b8e0 8747 { VEX_W_TABLE (VEX_W_6B_P_2) },
d5d7db8e 8748 { "(bad)", { XX } },
c0f3af97
L
8749 },
8750
8751 /* VEX_LEN_6C_P_2 */
8752 {
9e30b8e0 8753 { VEX_W_TABLE (VEX_W_6C_P_2) },
d5d7db8e 8754 { "(bad)", { XX } },
c0f3af97
L
8755 },
8756
8757 /* VEX_LEN_6D_P_2 */
8758 {
9e30b8e0 8759 { VEX_W_TABLE (VEX_W_6D_P_2) },
d5d7db8e 8760 { "(bad)", { XX } },
c0f3af97
L
8761 },
8762
8763 /* VEX_LEN_6E_P_2 */
8764 {
8765 { "vmovK", { XM, Edq } },
d5d7db8e 8766 { "(bad)", { XX } },
c0f3af97
L
8767 },
8768
8769 /* VEX_LEN_70_P_1 */
8770 {
9e30b8e0 8771 { VEX_W_TABLE (VEX_W_70_P_1) },
d5d7db8e 8772 { "(bad)", { XX } },
c0f3af97
L
8773 },
8774
8775 /* VEX_LEN_70_P_2 */
8776 {
9e30b8e0 8777 { VEX_W_TABLE (VEX_W_70_P_2) },
d5d7db8e 8778 { "(bad)", { XX } },
c0f3af97
L
8779 },
8780
8781 /* VEX_LEN_70_P_3 */
8782 {
9e30b8e0 8783 { VEX_W_TABLE (VEX_W_70_P_3) },
d5d7db8e 8784 { "(bad)", { XX } },
c0f3af97
L
8785 },
8786
8787 /* VEX_LEN_71_R_2_P_2 */
8788 {
9e30b8e0 8789 { VEX_W_TABLE (VEX_W_71_R_2_P_2) },
d5d7db8e 8790 { "(bad)", { XX } },
c0f3af97
L
8791 },
8792
8793 /* VEX_LEN_71_R_4_P_2 */
8794 {
9e30b8e0 8795 { VEX_W_TABLE (VEX_W_71_R_4_P_2) },
d5d7db8e 8796 { "(bad)", { XX } },
c0f3af97
L
8797 },
8798
8799 /* VEX_LEN_71_R_6_P_2 */
8800 {
9e30b8e0 8801 { VEX_W_TABLE (VEX_W_71_R_6_P_2) },
d5d7db8e 8802 { "(bad)", { XX } },
c0f3af97
L
8803 },
8804
8805 /* VEX_LEN_72_R_2_P_2 */
8806 {
9e30b8e0 8807 { VEX_W_TABLE (VEX_W_72_R_2_P_2) },
d5d7db8e 8808 { "(bad)", { XX } },
c0f3af97
L
8809 },
8810
8811 /* VEX_LEN_72_R_4_P_2 */
8812 {
9e30b8e0 8813 { VEX_W_TABLE (VEX_W_72_R_4_P_2) },
d5d7db8e 8814 { "(bad)", { XX } },
c0f3af97
L
8815 },
8816
8817 /* VEX_LEN_72_R_6_P_2 */
8818 {
9e30b8e0 8819 { VEX_W_TABLE (VEX_W_72_R_6_P_2) },
d5d7db8e 8820 { "(bad)", { XX } },
c0f3af97
L
8821 },
8822
8823 /* VEX_LEN_73_R_2_P_2 */
8824 {
9e30b8e0 8825 { VEX_W_TABLE (VEX_W_73_R_2_P_2) },
d5d7db8e 8826 { "(bad)", { XX } },
c0f3af97
L
8827 },
8828
8829 /* VEX_LEN_73_R_3_P_2 */
8830 {
9e30b8e0 8831 { VEX_W_TABLE (VEX_W_73_R_3_P_2) },
d5d7db8e 8832 { "(bad)", { XX } },
c0f3af97
L
8833 },
8834
8835 /* VEX_LEN_73_R_6_P_2 */
8836 {
9e30b8e0 8837 { VEX_W_TABLE (VEX_W_73_R_6_P_2) },
d5d7db8e 8838 { "(bad)", { XX } },
c0f3af97
L
8839 },
8840
8841 /* VEX_LEN_73_R_7_P_2 */
8842 {
9e30b8e0 8843 { VEX_W_TABLE (VEX_W_73_R_7_P_2) },
d5d7db8e 8844 { "(bad)", { XX } },
c0f3af97
L
8845 },
8846
8847 /* VEX_LEN_74_P_2 */
8848 {
9e30b8e0 8849 { VEX_W_TABLE (VEX_W_74_P_2) },
d5d7db8e 8850 { "(bad)", { XX } },
c0f3af97
L
8851 },
8852
8853 /* VEX_LEN_75_P_2 */
8854 {
9e30b8e0 8855 { VEX_W_TABLE (VEX_W_75_P_2) },
d5d7db8e 8856 { "(bad)", { XX } },
c0f3af97
L
8857 },
8858
8859 /* VEX_LEN_76_P_2 */
8860 {
9e30b8e0 8861 { VEX_W_TABLE (VEX_W_76_P_2) },
d5d7db8e 8862 { "(bad)", { XX } },
c0f3af97
L
8863 },
8864
8865 /* VEX_LEN_7E_P_1 */
8866 {
9e30b8e0 8867 { VEX_W_TABLE (VEX_W_7E_P_1) },
d5d7db8e 8868 { "(bad)", { XX } },
c0f3af97
L
8869 },
8870
8871 /* VEX_LEN_7E_P_2 */
8872 {
8873 { "vmovK", { Edq, XM } },
d5d7db8e 8874 { "(bad)", { XX } },
c0f3af97
L
8875 },
8876
9daa0d29 8877 /* VEX_LEN_AE_R_2_M_0 */
c0f3af97 8878 {
9e30b8e0 8879 { VEX_W_TABLE (VEX_W_AE_R_2_M_0) },
d5d7db8e 8880 { "(bad)", { XX } },
c0f3af97
L
8881 },
8882
9daa0d29 8883 /* VEX_LEN_AE_R_3_M_0 */
c0f3af97 8884 {
9e30b8e0 8885 { VEX_W_TABLE (VEX_W_AE_R_3_M_0) },
d5d7db8e 8886 { "(bad)", { XX } },
c0f3af97
L
8887 },
8888
8889 /* VEX_LEN_C2_P_1 */
8890 {
9e30b8e0 8891 { VEX_W_TABLE (VEX_W_C2_P_1) },
d5d7db8e 8892 { "(bad)", { XX } },
c0f3af97
L
8893 },
8894
8895 /* VEX_LEN_C2_P_3 */
8896 {
9e30b8e0 8897 { VEX_W_TABLE (VEX_W_C2_P_3) },
d5d7db8e 8898 { "(bad)", { XX } },
c0f3af97
L
8899 },
8900
8901 /* VEX_LEN_C4_P_2 */
8902 {
9e30b8e0 8903 { VEX_W_TABLE (VEX_W_C4_P_2) },
d5d7db8e 8904 { "(bad)", { XX } },
c0f3af97
L
8905 },
8906
8907 /* VEX_LEN_C5_P_2 */
8908 {
9e30b8e0 8909 { VEX_W_TABLE (VEX_W_C5_P_2) },
d5d7db8e 8910 { "(bad)", { XX } },
c0f3af97
L
8911 },
8912
8913 /* VEX_LEN_D1_P_2 */
8914 {
9e30b8e0 8915 { VEX_W_TABLE (VEX_W_D1_P_2) },
d5d7db8e 8916 { "(bad)", { XX } },
c0f3af97
L
8917 },
8918
8919 /* VEX_LEN_D2_P_2 */
8920 {
9e30b8e0 8921 { VEX_W_TABLE (VEX_W_D2_P_2) },
d5d7db8e 8922 { "(bad)", { XX } },
c0f3af97
L
8923 },
8924
8925 /* VEX_LEN_D3_P_2 */
8926 {
9e30b8e0 8927 { VEX_W_TABLE (VEX_W_D3_P_2) },
d5d7db8e 8928 { "(bad)", { XX } },
c0f3af97
L
8929 },
8930
8931 /* VEX_LEN_D4_P_2 */
8932 {
9e30b8e0 8933 { VEX_W_TABLE (VEX_W_D4_P_2) },
d5d7db8e 8934 { "(bad)", { XX } },
c0f3af97
L
8935 },
8936
8937 /* VEX_LEN_D5_P_2 */
8938 {
9e30b8e0 8939 { VEX_W_TABLE (VEX_W_D5_P_2) },
d5d7db8e 8940 { "(bad)", { XX } },
c0f3af97
L
8941 },
8942
8943 /* VEX_LEN_D6_P_2 */
8944 {
9e30b8e0 8945 { VEX_W_TABLE (VEX_W_D6_P_2) },
d5d7db8e 8946 { "(bad)", { XX } },
c0f3af97
L
8947 },
8948
8949 /* VEX_LEN_D7_P_2_M_1 */
8950 {
9e30b8e0 8951 { VEX_W_TABLE (VEX_W_D7_P_2_M_1) },
d5d7db8e 8952 { "(bad)", { XX } },
c0f3af97
L
8953 },
8954
8955 /* VEX_LEN_D8_P_2 */
8956 {
9e30b8e0 8957 { VEX_W_TABLE (VEX_W_D8_P_2) },
d5d7db8e 8958 { "(bad)", { XX } },
c0f3af97
L
8959 },
8960
8961 /* VEX_LEN_D9_P_2 */
8962 {
9e30b8e0 8963 { VEX_W_TABLE (VEX_W_D9_P_2) },
d5d7db8e 8964 { "(bad)", { XX } },
c0f3af97
L
8965 },
8966
8967 /* VEX_LEN_DA_P_2 */
8968 {
9e30b8e0 8969 { VEX_W_TABLE (VEX_W_DA_P_2) },
d5d7db8e 8970 { "(bad)", { XX } },
c0f3af97
L
8971 },
8972
8973 /* VEX_LEN_DB_P_2 */
8974 {
9e30b8e0 8975 { VEX_W_TABLE (VEX_W_DB_P_2) },
d5d7db8e 8976 { "(bad)", { XX } },
c0f3af97
L
8977 },
8978
8979 /* VEX_LEN_DC_P_2 */
8980 {
9e30b8e0 8981 { VEX_W_TABLE (VEX_W_DC_P_2) },
d5d7db8e 8982 { "(bad)", { XX } },
c0f3af97
L
8983 },
8984
8985 /* VEX_LEN_DD_P_2 */
8986 {
9e30b8e0 8987 { VEX_W_TABLE (VEX_W_DD_P_2) },
d5d7db8e 8988 { "(bad)", { XX } },
c0f3af97
L
8989 },
8990
8991 /* VEX_LEN_DE_P_2 */
8992 {
9e30b8e0 8993 { VEX_W_TABLE (VEX_W_DE_P_2) },
d5d7db8e 8994 { "(bad)", { XX } },
c0f3af97
L
8995 },
8996
8997 /* VEX_LEN_DF_P_2 */
8998 {
9e30b8e0 8999 { VEX_W_TABLE (VEX_W_DF_P_2) },
d5d7db8e 9000 { "(bad)", { XX } },
c0f3af97
L
9001 },
9002
9003 /* VEX_LEN_E0_P_2 */
9004 {
9e30b8e0 9005 { VEX_W_TABLE (VEX_W_E0_P_2) },
d5d7db8e 9006 { "(bad)", { XX } },
c0f3af97
L
9007 },
9008
9009 /* VEX_LEN_E1_P_2 */
9010 {
9e30b8e0 9011 { VEX_W_TABLE (VEX_W_E1_P_2) },
d5d7db8e 9012 { "(bad)", { XX } },
c0f3af97
L
9013 },
9014
9015 /* VEX_LEN_E2_P_2 */
9016 {
9e30b8e0 9017 { VEX_W_TABLE (VEX_W_E2_P_2) },
d5d7db8e 9018 { "(bad)", { XX } },
c0f3af97
L
9019 },
9020
9021 /* VEX_LEN_E3_P_2 */
9022 {
9e30b8e0 9023 { VEX_W_TABLE (VEX_W_E3_P_2) },
d5d7db8e 9024 { "(bad)", { XX } },
c0f3af97
L
9025 },
9026
9027 /* VEX_LEN_E4_P_2 */
9028 {
9e30b8e0 9029 { VEX_W_TABLE (VEX_W_E4_P_2) },
d5d7db8e 9030 { "(bad)", { XX } },
c0f3af97
L
9031 },
9032
9033 /* VEX_LEN_E5_P_2 */
9034 {
9e30b8e0 9035 { VEX_W_TABLE (VEX_W_E5_P_2) },
d5d7db8e 9036 { "(bad)", { XX } },
c0f3af97
L
9037 },
9038
c0f3af97
L
9039 /* VEX_LEN_E8_P_2 */
9040 {
9e30b8e0 9041 { VEX_W_TABLE (VEX_W_E8_P_2) },
d5d7db8e 9042 { "(bad)", { XX } },
c0f3af97
L
9043 },
9044
9045 /* VEX_LEN_E9_P_2 */
9046 {
9e30b8e0 9047 { VEX_W_TABLE (VEX_W_E9_P_2) },
d5d7db8e 9048 { "(bad)", { XX } },
c0f3af97
L
9049 },
9050
9051 /* VEX_LEN_EA_P_2 */
9052 {
9e30b8e0 9053 { VEX_W_TABLE (VEX_W_EA_P_2) },
d5d7db8e 9054 { "(bad)", { XX } },
c0f3af97
L
9055 },
9056
9057 /* VEX_LEN_EB_P_2 */
9058 {
9e30b8e0 9059 { VEX_W_TABLE (VEX_W_EB_P_2) },
d5d7db8e 9060 { "(bad)", { XX } },
c0f3af97
L
9061 },
9062
9063 /* VEX_LEN_EC_P_2 */
9064 {
9e30b8e0 9065 { VEX_W_TABLE (VEX_W_EC_P_2) },
d5d7db8e 9066 { "(bad)", { XX } },
c0f3af97
L
9067 },
9068
9069 /* VEX_LEN_ED_P_2 */
9070 {
9e30b8e0 9071 { VEX_W_TABLE (VEX_W_ED_P_2) },
d5d7db8e 9072 { "(bad)", { XX } },
c0f3af97
L
9073 },
9074
9075 /* VEX_LEN_EE_P_2 */
9076 {
9e30b8e0 9077 { VEX_W_TABLE (VEX_W_EE_P_2) },
d5d7db8e 9078 { "(bad)", { XX } },
c0f3af97
L
9079 },
9080
9081 /* VEX_LEN_EF_P_2 */
9082 {
9e30b8e0 9083 { VEX_W_TABLE (VEX_W_EF_P_2) },
d5d7db8e 9084 { "(bad)", { XX } },
c0f3af97
L
9085 },
9086
9087 /* VEX_LEN_F1_P_2 */
9088 {
9e30b8e0 9089 { VEX_W_TABLE (VEX_W_F1_P_2) },
d5d7db8e 9090 { "(bad)", { XX } },
c0f3af97
L
9091 },
9092
9093 /* VEX_LEN_F2_P_2 */
9094 {
9e30b8e0 9095 { VEX_W_TABLE (VEX_W_F2_P_2) },
d5d7db8e 9096 { "(bad)", { XX } },
c0f3af97
L
9097 },
9098
9099 /* VEX_LEN_F3_P_2 */
9100 {
9e30b8e0 9101 { VEX_W_TABLE (VEX_W_F3_P_2) },
d5d7db8e 9102 { "(bad)", { XX } },
c0f3af97
L
9103 },
9104
9105 /* VEX_LEN_F4_P_2 */
9106 {
9e30b8e0 9107 { VEX_W_TABLE (VEX_W_F4_P_2) },
d5d7db8e 9108 { "(bad)", { XX } },
c0f3af97
L
9109 },
9110
9111 /* VEX_LEN_F5_P_2 */
9112 {
9e30b8e0 9113 { VEX_W_TABLE (VEX_W_F5_P_2) },
d5d7db8e 9114 { "(bad)", { XX } },
c0f3af97
L
9115 },
9116
9117 /* VEX_LEN_F6_P_2 */
9118 {
9e30b8e0 9119 { VEX_W_TABLE (VEX_W_F6_P_2) },
d5d7db8e 9120 { "(bad)", { XX } },
c0f3af97
L
9121 },
9122
9123 /* VEX_LEN_F7_P_2 */
9124 {
9e30b8e0 9125 { VEX_W_TABLE (VEX_W_F7_P_2) },
d5d7db8e 9126 { "(bad)", { XX } },
c0f3af97
L
9127 },
9128
9129 /* VEX_LEN_F8_P_2 */
9130 {
9e30b8e0 9131 { VEX_W_TABLE (VEX_W_F8_P_2) },
d5d7db8e 9132 { "(bad)", { XX } },
c0f3af97
L
9133 },
9134
9135 /* VEX_LEN_F9_P_2 */
9136 {
9e30b8e0 9137 { VEX_W_TABLE (VEX_W_F9_P_2) },
d5d7db8e 9138 { "(bad)", { XX } },
c0f3af97
L
9139 },
9140
9141 /* VEX_LEN_FA_P_2 */
9142 {
9e30b8e0 9143 { VEX_W_TABLE (VEX_W_FA_P_2) },
d5d7db8e 9144 { "(bad)", { XX } },
c0f3af97
L
9145 },
9146
9147 /* VEX_LEN_FB_P_2 */
9148 {
9e30b8e0 9149 { VEX_W_TABLE (VEX_W_FB_P_2) },
d5d7db8e 9150 { "(bad)", { XX } },
c0f3af97
L
9151 },
9152
9153 /* VEX_LEN_FC_P_2 */
9154 {
9e30b8e0 9155 { VEX_W_TABLE (VEX_W_FC_P_2) },
d5d7db8e 9156 { "(bad)", { XX } },
c0f3af97
L
9157 },
9158
9159 /* VEX_LEN_FD_P_2 */
9160 {
9e30b8e0 9161 { VEX_W_TABLE (VEX_W_FD_P_2) },
d5d7db8e 9162 { "(bad)", { XX } },
c0f3af97
L
9163 },
9164
9165 /* VEX_LEN_FE_P_2 */
9166 {
9e30b8e0 9167 { VEX_W_TABLE (VEX_W_FE_P_2) },
d5d7db8e 9168 { "(bad)", { XX } },
c0f3af97
L
9169 },
9170
9171 /* VEX_LEN_3800_P_2 */
9172 {
9e30b8e0 9173 { VEX_W_TABLE (VEX_W_3800_P_2) },
d5d7db8e 9174 { "(bad)", { XX } },
c0f3af97
L
9175 },
9176
9177 /* VEX_LEN_3801_P_2 */
9178 {
9e30b8e0 9179 { VEX_W_TABLE (VEX_W_3801_P_2) },
d5d7db8e 9180 { "(bad)", { XX } },
c0f3af97
L
9181 },
9182
9183 /* VEX_LEN_3802_P_2 */
9184 {
9e30b8e0 9185 { VEX_W_TABLE (VEX_W_3802_P_2) },
d5d7db8e 9186 { "(bad)", { XX } },
c0f3af97
L
9187 },
9188
9189 /* VEX_LEN_3803_P_2 */
9190 {
9e30b8e0 9191 { VEX_W_TABLE (VEX_W_3803_P_2) },
d5d7db8e 9192 { "(bad)", { XX } },
c0f3af97
L
9193 },
9194
9195 /* VEX_LEN_3804_P_2 */
9196 {
9e30b8e0 9197 { VEX_W_TABLE (VEX_W_3804_P_2) },
d5d7db8e 9198 { "(bad)", { XX } },
c0f3af97
L
9199 },
9200
9201 /* VEX_LEN_3805_P_2 */
9202 {
9e30b8e0 9203 { VEX_W_TABLE (VEX_W_3805_P_2) },
d5d7db8e 9204 { "(bad)", { XX } },
c0f3af97
L
9205 },
9206
9207 /* VEX_LEN_3806_P_2 */
9208 {
9e30b8e0 9209 { VEX_W_TABLE (VEX_W_3806_P_2) },
d5d7db8e 9210 { "(bad)", { XX } },
c0f3af97
L
9211 },
9212
9213 /* VEX_LEN_3807_P_2 */
9214 {
9e30b8e0 9215 { VEX_W_TABLE (VEX_W_3807_P_2) },
d5d7db8e 9216 { "(bad)", { XX } },
c0f3af97
L
9217 },
9218
9219 /* VEX_LEN_3808_P_2 */
9220 {
9e30b8e0 9221 { VEX_W_TABLE (VEX_W_3808_P_2) },
d5d7db8e 9222 { "(bad)", { XX } },
c0f3af97
L
9223 },
9224
9225 /* VEX_LEN_3809_P_2 */
9226 {
9e30b8e0 9227 { VEX_W_TABLE (VEX_W_3809_P_2) },
d5d7db8e 9228 { "(bad)", { XX } },
c0f3af97
L
9229 },
9230
9231 /* VEX_LEN_380A_P_2 */
9232 {
9e30b8e0 9233 { VEX_W_TABLE (VEX_W_380A_P_2) },
d5d7db8e 9234 { "(bad)", { XX } },
c0f3af97
L
9235 },
9236
9237 /* VEX_LEN_380B_P_2 */
9238 {
9e30b8e0 9239 { VEX_W_TABLE (VEX_W_380B_P_2) },
d5d7db8e 9240 { "(bad)", { XX } },
c0f3af97
L
9241 },
9242
9243 /* VEX_LEN_3819_P_2_M_0 */
9244 {
d5d7db8e 9245 { "(bad)", { XX } },
9e30b8e0 9246 { VEX_W_TABLE (VEX_W_3819_P_2_M_0) },
c0f3af97
L
9247 },
9248
9249 /* VEX_LEN_381A_P_2_M_0 */
9250 {
d5d7db8e 9251 { "(bad)", { XX } },
9e30b8e0 9252 { VEX_W_TABLE (VEX_W_381A_P_2_M_0) },
c0f3af97
L
9253 },
9254
9255 /* VEX_LEN_381C_P_2 */
9256 {
9e30b8e0 9257 { VEX_W_TABLE (VEX_W_381C_P_2) },
d5d7db8e 9258 { "(bad)", { XX } },
c0f3af97
L
9259 },
9260
9261 /* VEX_LEN_381D_P_2 */
9262 {
9e30b8e0 9263 { VEX_W_TABLE (VEX_W_381D_P_2) },
d5d7db8e 9264 { "(bad)", { XX } },
c0f3af97
L
9265 },
9266
9267 /* VEX_LEN_381E_P_2 */
9268 {
9e30b8e0 9269 { VEX_W_TABLE (VEX_W_381E_P_2) },
d5d7db8e 9270 { "(bad)", { XX } },
c0f3af97
L
9271 },
9272
9273 /* VEX_LEN_3820_P_2 */
9274 {
9e30b8e0 9275 { VEX_W_TABLE (VEX_W_3820_P_2) },
d5d7db8e 9276 { "(bad)", { XX } },
c0f3af97
L
9277 },
9278
9279 /* VEX_LEN_3821_P_2 */
9280 {
9e30b8e0 9281 { VEX_W_TABLE (VEX_W_3821_P_2) },
d5d7db8e 9282 { "(bad)", { XX } },
c0f3af97
L
9283 },
9284
9285 /* VEX_LEN_3822_P_2 */
9286 {
9e30b8e0 9287 { VEX_W_TABLE (VEX_W_3822_P_2) },
d5d7db8e 9288 { "(bad)", { XX } },
c0f3af97
L
9289 },
9290
9291 /* VEX_LEN_3823_P_2 */
9292 {
9e30b8e0 9293 { VEX_W_TABLE (VEX_W_3823_P_2) },
d5d7db8e 9294 { "(bad)", { XX } },
c0f3af97
L
9295 },
9296
9297 /* VEX_LEN_3824_P_2 */
9298 {
9e30b8e0 9299 { VEX_W_TABLE (VEX_W_3824_P_2) },
d5d7db8e 9300 { "(bad)", { XX } },
c0f3af97
L
9301 },
9302
9303 /* VEX_LEN_3825_P_2 */
9304 {
9e30b8e0 9305 { VEX_W_TABLE (VEX_W_3825_P_2) },
d5d7db8e 9306 { "(bad)", { XX } },
c0f3af97
L
9307 },
9308
9309 /* VEX_LEN_3828_P_2 */
9310 {
9e30b8e0 9311 { VEX_W_TABLE (VEX_W_3828_P_2) },
d5d7db8e 9312 { "(bad)", { XX } },
c0f3af97
L
9313 },
9314
9315 /* VEX_LEN_3829_P_2 */
9316 {
9e30b8e0 9317 { VEX_W_TABLE (VEX_W_3829_P_2) },
d5d7db8e 9318 { "(bad)", { XX } },
c0f3af97
L
9319 },
9320
9321 /* VEX_LEN_382A_P_2_M_0 */
9322 {
9e30b8e0 9323 { VEX_W_TABLE (VEX_W_382A_P_2_M_0) },
d5d7db8e 9324 { "(bad)", { XX } },
c0f3af97
L
9325 },
9326
9327 /* VEX_LEN_382B_P_2 */
9328 {
9e30b8e0 9329 { VEX_W_TABLE (VEX_W_382B_P_2) },
d5d7db8e 9330 { "(bad)", { XX } },
c0f3af97
L
9331 },
9332
9333 /* VEX_LEN_3830_P_2 */
9334 {
9e30b8e0 9335 { VEX_W_TABLE (VEX_W_3830_P_2) },
d5d7db8e 9336 { "(bad)", { XX } },
c0f3af97
L
9337 },
9338
9339 /* VEX_LEN_3831_P_2 */
9340 {
9e30b8e0 9341 { VEX_W_TABLE (VEX_W_3831_P_2) },
d5d7db8e 9342 { "(bad)", { XX } },
c0f3af97
L
9343 },
9344
9345 /* VEX_LEN_3832_P_2 */
9346 {
9e30b8e0 9347 { VEX_W_TABLE (VEX_W_3832_P_2) },
d5d7db8e 9348 { "(bad)", { XX } },
c0f3af97
L
9349 },
9350
9351 /* VEX_LEN_3833_P_2 */
9352 {
9e30b8e0 9353 { VEX_W_TABLE (VEX_W_3833_P_2) },
d5d7db8e 9354 { "(bad)", { XX } },
c0f3af97
L
9355 },
9356
9357 /* VEX_LEN_3834_P_2 */
9358 {
9e30b8e0 9359 { VEX_W_TABLE (VEX_W_3834_P_2) },
d5d7db8e 9360 { "(bad)", { XX } },
c0f3af97
L
9361 },
9362
9363 /* VEX_LEN_3835_P_2 */
9364 {
9e30b8e0 9365 { VEX_W_TABLE (VEX_W_3835_P_2) },
d5d7db8e 9366 { "(bad)", { XX } },
c0f3af97
L
9367 },
9368
9369 /* VEX_LEN_3837_P_2 */
9370 {
9e30b8e0 9371 { VEX_W_TABLE (VEX_W_3837_P_2) },
d5d7db8e 9372 { "(bad)", { XX } },
c0f3af97
L
9373 },
9374
9375 /* VEX_LEN_3838_P_2 */
9376 {
9e30b8e0 9377 { VEX_W_TABLE (VEX_W_3838_P_2) },
d5d7db8e 9378 { "(bad)", { XX } },
c0f3af97
L
9379 },
9380
9381 /* VEX_LEN_3839_P_2 */
9382 {
9e30b8e0 9383 { VEX_W_TABLE (VEX_W_3839_P_2) },
d5d7db8e 9384 { "(bad)", { XX } },
c0f3af97
L
9385 },
9386
9387 /* VEX_LEN_383A_P_2 */
9388 {
9e30b8e0 9389 { VEX_W_TABLE (VEX_W_383A_P_2) },
d5d7db8e 9390 { "(bad)", { XX } },
c0f3af97
L
9391 },
9392
9393 /* VEX_LEN_383B_P_2 */
9394 {
9e30b8e0 9395 { VEX_W_TABLE (VEX_W_383B_P_2) },
d5d7db8e 9396 { "(bad)", { XX } },
c0f3af97
L
9397 },
9398
9399 /* VEX_LEN_383C_P_2 */
9400 {
9e30b8e0 9401 { VEX_W_TABLE (VEX_W_383C_P_2) },
d5d7db8e 9402 { "(bad)", { XX } },
c0f3af97
L
9403 },
9404
9405 /* VEX_LEN_383D_P_2 */
9406 {
9e30b8e0 9407 { VEX_W_TABLE (VEX_W_383D_P_2) },
d5d7db8e 9408 { "(bad)", { XX } },
c0f3af97
L
9409 },
9410
9411 /* VEX_LEN_383E_P_2 */
9412 {
9e30b8e0 9413 { VEX_W_TABLE (VEX_W_383E_P_2) },
d5d7db8e 9414 { "(bad)", { XX } },
c0f3af97
L
9415 },
9416
9417 /* VEX_LEN_383F_P_2 */
9418 {
9e30b8e0 9419 { VEX_W_TABLE (VEX_W_383F_P_2) },
d5d7db8e 9420 { "(bad)", { XX } },
c0f3af97
L
9421 },
9422
9423 /* VEX_LEN_3840_P_2 */
9424 {
9e30b8e0 9425 { VEX_W_TABLE (VEX_W_3840_P_2) },
d5d7db8e 9426 { "(bad)", { XX } },
c0f3af97
L
9427 },
9428
9429 /* VEX_LEN_3841_P_2 */
9430 {
9e30b8e0 9431 { VEX_W_TABLE (VEX_W_3841_P_2) },
d5d7db8e 9432 { "(bad)", { XX } },
c0f3af97
L
9433 },
9434
a5ff0eb2
L
9435 /* VEX_LEN_38DB_P_2 */
9436 {
9e30b8e0 9437 { VEX_W_TABLE (VEX_W_38DB_P_2) },
a5ff0eb2
L
9438 { "(bad)", { XX } },
9439 },
9440
9441 /* VEX_LEN_38DC_P_2 */
9442 {
9e30b8e0 9443 { VEX_W_TABLE (VEX_W_38DC_P_2) },
a5ff0eb2
L
9444 { "(bad)", { XX } },
9445 },
9446
9447 /* VEX_LEN_38DD_P_2 */
9448 {
9e30b8e0 9449 { VEX_W_TABLE (VEX_W_38DD_P_2) },
a5ff0eb2
L
9450 { "(bad)", { XX } },
9451 },
9452
9453 /* VEX_LEN_38DE_P_2 */
9454 {
9e30b8e0 9455 { VEX_W_TABLE (VEX_W_38DE_P_2) },
a5ff0eb2
L
9456 { "(bad)", { XX } },
9457 },
9458
9459 /* VEX_LEN_38DF_P_2 */
9460 {
9e30b8e0 9461 { VEX_W_TABLE (VEX_W_38DF_P_2) },
a5ff0eb2
L
9462 { "(bad)", { XX } },
9463 },
9464
c0f3af97
L
9465 /* VEX_LEN_3A06_P_2 */
9466 {
d5d7db8e 9467 { "(bad)", { XX } },
9e30b8e0 9468 { VEX_W_TABLE (VEX_W_3A06_P_2) },
c0f3af97
L
9469 },
9470
9471 /* VEX_LEN_3A0A_P_2 */
9472 {
9e30b8e0 9473 { VEX_W_TABLE (VEX_W_3A0A_P_2) },
d5d7db8e 9474 { "(bad)", { XX } },
c0f3af97
L
9475 },
9476
9477 /* VEX_LEN_3A0B_P_2 */
9478 {
9e30b8e0 9479 { VEX_W_TABLE (VEX_W_3A0B_P_2) },
d5d7db8e 9480 { "(bad)", { XX } },
c0f3af97
L
9481 },
9482
9483 /* VEX_LEN_3A0E_P_2 */
9484 {
9e30b8e0 9485 { VEX_W_TABLE (VEX_W_3A0E_P_2) },
d5d7db8e 9486 { "(bad)", { XX } },
c0f3af97
L
9487 },
9488
9489 /* VEX_LEN_3A0F_P_2 */
9490 {
9e30b8e0 9491 { VEX_W_TABLE (VEX_W_3A0F_P_2) },
d5d7db8e 9492 { "(bad)", { XX } },
c0f3af97
L
9493 },
9494
9495 /* VEX_LEN_3A14_P_2 */
9496 {
9e30b8e0 9497 { VEX_W_TABLE (VEX_W_3A14_P_2) },
d5d7db8e 9498 { "(bad)", { XX } },
c0f3af97
L
9499 },
9500
9501 /* VEX_LEN_3A15_P_2 */
9502 {
9e30b8e0 9503 { VEX_W_TABLE (VEX_W_3A15_P_2) },
d5d7db8e 9504 { "(bad)", { XX } },
c0f3af97
L
9505 },
9506
9507 /* VEX_LEN_3A16_P_2 */
9508 {
9509 { "vpextrK", { Edq, XM, Ib } },
d5d7db8e 9510 { "(bad)", { XX } },
c0f3af97
L
9511 },
9512
9513 /* VEX_LEN_3A17_P_2 */
9514 {
9515 { "vextractps", { Edqd, XM, Ib } },
d5d7db8e 9516 { "(bad)", { XX } },
c0f3af97
L
9517 },
9518
9519 /* VEX_LEN_3A18_P_2 */
9520 {
d5d7db8e 9521 { "(bad)", { XX } },
9e30b8e0 9522 { VEX_W_TABLE (VEX_W_3A18_P_2) },
c0f3af97
L
9523 },
9524
9525 /* VEX_LEN_3A19_P_2 */
9526 {
d5d7db8e 9527 { "(bad)", { XX } },
9e30b8e0 9528 { VEX_W_TABLE (VEX_W_3A19_P_2) },
c0f3af97
L
9529 },
9530
9531 /* VEX_LEN_3A20_P_2 */
9532 {
9e30b8e0 9533 { VEX_W_TABLE (VEX_W_3A20_P_2) },
d5d7db8e 9534 { "(bad)", { XX } },
c0f3af97
L
9535 },
9536
9537 /* VEX_LEN_3A21_P_2 */
9538 {
9e30b8e0 9539 { VEX_W_TABLE (VEX_W_3A21_P_2) },
d5d7db8e 9540 { "(bad)", { XX } },
c0f3af97
L
9541 },
9542
9543 /* VEX_LEN_3A22_P_2 */
9544 {
9545 { "vpinsrK", { XM, Vex128, Edq, Ib } },
d5d7db8e 9546 { "(bad)", { XX } },
c0f3af97
L
9547 },
9548
9549 /* VEX_LEN_3A41_P_2 */
9550 {
9e30b8e0 9551 { VEX_W_TABLE (VEX_W_3A41_P_2) },
d5d7db8e 9552 { "(bad)", { XX } },
c0f3af97
L
9553 },
9554
9555 /* VEX_LEN_3A42_P_2 */
9556 {
9e30b8e0 9557 { VEX_W_TABLE (VEX_W_3A42_P_2) },
d5d7db8e 9558 { "(bad)", { XX } },
c0f3af97
L
9559 },
9560
ce2f5b3c
L
9561 /* VEX_LEN_3A44_P_2 */
9562 {
9e30b8e0 9563 { VEX_W_TABLE (VEX_W_3A44_P_2) },
ce2f5b3c
L
9564 { "(bad)", { XX } },
9565 },
9566
c0f3af97
L
9567 /* VEX_LEN_3A4C_P_2 */
9568 {
9e30b8e0 9569 { VEX_W_TABLE (VEX_W_3A4C_P_2) },
d5d7db8e 9570 { "(bad)", { XX } },
c0f3af97
L
9571 },
9572
9573 /* VEX_LEN_3A60_P_2 */
9574 {
9e30b8e0 9575 { VEX_W_TABLE (VEX_W_3A60_P_2) },
d5d7db8e 9576 { "(bad)", { XX } },
c0f3af97
L
9577 },
9578
9579 /* VEX_LEN_3A61_P_2 */
9580 {
9e30b8e0 9581 { VEX_W_TABLE (VEX_W_3A61_P_2) },
d5d7db8e 9582 { "(bad)", { XX } },
c0f3af97
L
9583 },
9584
9585 /* VEX_LEN_3A62_P_2 */
9586 {
9e30b8e0 9587 { VEX_W_TABLE (VEX_W_3A62_P_2) },
d5d7db8e 9588 { "(bad)", { XX } },
c0f3af97
L
9589 },
9590
9591 /* VEX_LEN_3A63_P_2 */
9592 {
9e30b8e0 9593 { VEX_W_TABLE (VEX_W_3A63_P_2) },
d5d7db8e 9594 { "(bad)", { XX } },
c0f3af97
L
9595 },
9596
922d8de8
DR
9597 /* VEX_LEN_3A6A_P_2 */
9598 {
206c2556 9599 { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9600 { "(bad)", { XX } },
9601 },
9602
9603 /* VEX_LEN_3A6B_P_2 */
9604 {
206c2556 9605 { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9606 { "(bad)", { XX } },
9607 },
9608
9609 /* VEX_LEN_3A6E_P_2 */
9610 {
206c2556 9611 { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9612 { "(bad)", { XX } },
9613 },
9614
9615 /* VEX_LEN_3A6F_P_2 */
9616 {
206c2556 9617 { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9618 { "(bad)", { XX } },
9619 },
9620
9621 /* VEX_LEN_3A7A_P_2 */
9622 {
206c2556 9623 { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9624 { "(bad)", { XX } },
9625 },
9626
9627 /* VEX_LEN_3A7B_P_2 */
9628 {
206c2556 9629 { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9630 { "(bad)", { XX } },
9631 },
9632
9633 /* VEX_LEN_3A7E_P_2 */
9634 {
206c2556 9635 { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
922d8de8
DR
9636 { "(bad)", { XX } },
9637 },
9638
9639 /* VEX_LEN_3A7F_P_2 */
9640 {
206c2556 9641 { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
922d8de8
DR
9642 { "(bad)", { XX } },
9643 },
9644
a5ff0eb2
L
9645 /* VEX_LEN_3ADF_P_2 */
9646 {
9e30b8e0 9647 { VEX_W_TABLE (VEX_W_3ADF_P_2) },
a5ff0eb2
L
9648 { "(bad)", { XX } },
9649 },
4c807e72 9650
5dd85c99
SP
9651 /* VEX_LEN_XOP_09_80 */
9652 {
4c807e72
L
9653 { "vfrczps", { XM, EXxmm } },
9654 { "vfrczps", { XM, EXymmq } },
5dd85c99 9655 },
4c807e72 9656
5dd85c99
SP
9657 /* VEX_LEN_XOP_09_81 */
9658 {
4c807e72
L
9659 { "vfrczpd", { XM, EXxmm } },
9660 { "vfrczpd", { XM, EXymmq } },
5dd85c99 9661 },
331d2d0d
L
9662};
9663
9e30b8e0 9664static const struct dis386 vex_w_table[][2] = {
b844680a 9665 {
9e30b8e0
L
9666 /* VEX_W_10_P_0 */
9667 { "vmovups", { XM, EXx } },
d8faab4e
L
9668 { "(bad)", { XX } },
9669 },
9670 {
9e30b8e0
L
9671 /* VEX_W_10_P_1 */
9672 { "vmovss", { XMVex, Vex128, EXd } },
9673 { "(bad)", { XX } },
d8faab4e
L
9674 },
9675 {
9e30b8e0
L
9676 /* VEX_W_10_P_2 */
9677 { "vmovupd", { XM, EXx } },
9678 { "(bad)", { XX } },
d8faab4e
L
9679 },
9680 {
9e30b8e0
L
9681 /* VEX_W_10_P_3 */
9682 { "vmovsd", { XMVex, Vex128, EXq } },
9683 { "(bad)", { XX } },
d8faab4e
L
9684 },
9685 {
9e30b8e0
L
9686 /* VEX_W_11_P_0 */
9687 { "vmovups", { EXxS, XM } },
9688 { "(bad)", { XX } },
d8faab4e
L
9689 },
9690 {
9e30b8e0
L
9691 /* VEX_W_11_P_1 */
9692 { "vmovss", { EXdVexS, Vex128, XM } },
9693 { "(bad)", { XX } },
b844680a
L
9694 },
9695 {
9e30b8e0
L
9696 /* VEX_W_11_P_2 */
9697 { "vmovupd", { EXxS, XM } },
9698 { "(bad)", { XX } },
b844680a
L
9699 },
9700 {
9e30b8e0
L
9701 /* VEX_W_11_P_3 */
9702 { "vmovsd", { EXqVexS, Vex128, XM } },
d8faab4e
L
9703 { "(bad)", { XX } },
9704 },
9705 {
9e30b8e0
L
9706 /* VEX_W_12_P_0_M_0 */
9707 { "vmovlps", { XM, Vex128, EXq } },
9708 { "(bad)", { XX } },
b844680a
L
9709 },
9710 {
9e30b8e0
L
9711 /* VEX_W_12_P_0_M_1 */
9712 { "vmovhlps", { XM, Vex128, EXq } },
b844680a
L
9713 { "(bad)", { XX } },
9714 },
9715 {
9e30b8e0
L
9716 /* VEX_W_12_P_1 */
9717 { "vmovsldup", { XM, EXx } },
b844680a 9718 { "(bad)", { XX } },
b844680a
L
9719 },
9720 {
9e30b8e0
L
9721 /* VEX_W_12_P_2 */
9722 { "vmovlpd", { XM, Vex128, EXq } },
92fddf8e 9723 { "(bad)", { XX } },
b844680a
L
9724 },
9725 {
9e30b8e0
L
9726 /* VEX_W_12_P_3 */
9727 { "vmovddup", { XM, EXymmq } },
92fddf8e 9728 { "(bad)", { XX } },
b844680a
L
9729 },
9730 {
9e30b8e0
L
9731 /* VEX_W_13_M_0 */
9732 { "vmovlpX", { EXq, XM } },
b844680a 9733 { "(bad)", { XX } },
b844680a
L
9734 },
9735 {
9e30b8e0
L
9736 /* VEX_W_14 */
9737 { "vunpcklpX", { XM, Vex, EXx } },
92fddf8e 9738 { "(bad)", { XX } },
b844680a
L
9739 },
9740 {
9e30b8e0
L
9741 /* VEX_W_15 */
9742 { "vunpckhpX", { XM, Vex, EXx } },
92fddf8e 9743 { "(bad)", { XX } },
b844680a
L
9744 },
9745 {
9e30b8e0
L
9746 /* VEX_W_16_P_0_M_0 */
9747 { "vmovhps", { XM, Vex128, EXq } },
b844680a 9748 { "(bad)", { XX } },
9e30b8e0
L
9749 },
9750 {
9751 /* VEX_W_16_P_0_M_1 */
9752 { "vmovlhps", { XM, Vex128, EXq } },
9753 { "(bad)", { XX } },
9754 },
9755 {
9756 /* VEX_W_16_P_1 */
9757 { "vmovshdup", { XM, EXx } },
9758 { "(bad)", { XX } },
9759 },
9760 {
9761 /* VEX_W_16_P_2 */
9762 { "vmovhpd", { XM, Vex128, EXq } },
9763 { "(bad)", { XX } },
9764 },
9765 {
9766 /* VEX_W_17_M_0 */
9767 { "vmovhpX", { EXq, XM } },
9768 { "(bad)", { XX } },
9769 },
9770 {
9771 /* VEX_W_28 */
9772 { "vmovapX", { XM, EXx } },
9773 { "(bad)", { XX } },
9774 },
9775 {
9776 /* VEX_W_29 */
9777 { "vmovapX", { EXxS, XM } },
9778 { "(bad)", { XX } },
9779 },
9780 {
9781 /* VEX_W_2B_M_0 */
9782 { "vmovntpX", { Mx, XM } },
9783 { "(bad)", { XX } },
9784 },
9785 {
9786 /* VEX_W_2E_P_0 */
9787 { "vucomiss", { XM, EXd } },
9788 { "(bad)", { XX } },
9789 },
9790 {
9791 /* VEX_W_2E_P_2 */
9792 { "vucomisd", { XM, EXq } },
9793 { "(bad)", { XX } },
9794 },
9795 {
9796 /* VEX_W_2F_P_0 */
9797 { "vcomiss", { XM, EXd } },
9798 { "(bad)", { XX } },
9799 },
9800 {
9801 /* VEX_W_2F_P_2 */
9802 { "vcomisd", { XM, EXq } },
9803 { "(bad)", { XX } },
9804 },
9805 {
9806 /* VEX_W_50_M_0 */
9807 { "vmovmskpX", { Gdq, XS } },
9808 { "(bad)", { XX } },
9809 },
9810 {
9811 /* VEX_W_51_P_0 */
9812 { "vsqrtps", { XM, EXx } },
9813 { "(bad)", { XX } },
9814 },
9815 {
9816 /* VEX_W_51_P_1 */
9817 { "vsqrtss", { XM, Vex128, EXd } },
9818 { "(bad)", { XX } },
9819 },
9820 {
9821 /* VEX_W_51_P_2 */
9822 { "vsqrtpd", { XM, EXx } },
9823 { "(bad)", { XX } },
9824 },
9825 {
9826 /* VEX_W_51_P_3 */
9827 { "vsqrtsd", { XM, Vex128, EXq } },
9828 { "(bad)", { XX } },
9829 },
9830 {
9831 /* VEX_W_52_P_0 */
9832 { "vrsqrtps", { XM, EXx } },
9833 { "(bad)", { XX } },
9834 },
9835 {
9836 /* VEX_W_52_P_1 */
9837 { "vrsqrtss", { XM, Vex128, EXd } },
9838 { "(bad)", { XX } },
9839 },
9840 {
9841 /* VEX_W_53_P_0 */
9842 { "vrcpps", { XM, EXx } },
9843 { "(bad)", { XX } },
9844 },
9845 {
9846 /* VEX_W_53_P_1 */
9847 { "vrcpss", { XM, Vex128, EXd } },
9848 { "(bad)", { XX } },
9849 },
9850 {
9851 /* VEX_W_58_P_0 */
9852 { "vaddps", { XM, Vex, EXx } },
9853 { "(bad)", { XX } },
9854 },
9855 {
9856 /* VEX_W_58_P_1 */
9857 { "vaddss", { XM, Vex128, EXd } },
9858 { "(bad)", { XX } },
9859 },
9860 {
9861 /* VEX_W_58_P_2 */
9862 { "vaddpd", { XM, Vex, EXx } },
9863 { "(bad)", { XX } },
9864 },
9865 {
9866 /* VEX_W_58_P_3 */
9867 { "vaddsd", { XM, Vex128, EXq } },
9868 { "(bad)", { XX } },
9869 },
9870 {
9871 /* VEX_W_59_P_0 */
9872 { "vmulps", { XM, Vex, EXx } },
9873 { "(bad)", { XX } },
9874 },
9875 {
9876 /* VEX_W_59_P_1 */
9877 { "vmulss", { XM, Vex128, EXd } },
9878 { "(bad)", { XX } },
9879 },
9880 {
9881 /* VEX_W_59_P_2 */
9882 { "vmulpd", { XM, Vex, EXx } },
9883 { "(bad)", { XX } },
9884 },
9885 {
9886 /* VEX_W_59_P_3 */
9887 { "vmulsd", { XM, Vex128, EXq } },
9888 { "(bad)", { XX } },
9889 },
9890 {
9891 /* VEX_W_5A_P_0 */
9892 { "vcvtps2pd", { XM, EXxmmq } },
9893 { "(bad)", { XX } },
9894 },
9895 {
9896 /* VEX_W_5A_P_1 */
9897 { "vcvtss2sd", { XM, Vex128, EXd } },
9898 { "(bad)", { XX } },
9899 },
9900 {
9901 /* VEX_W_5A_P_3 */
9902 { "vcvtsd2ss", { XM, Vex128, EXq } },
9903 { "(bad)", { XX } },
9904 },
9905 {
9906 /* VEX_W_5B_P_0 */
9907 { "vcvtdq2ps", { XM, EXx } },
9908 { "(bad)", { XX } },
9909 },
9910 {
9911 /* VEX_W_5B_P_1 */
9912 { "vcvttps2dq", { XM, EXx } },
9913 { "(bad)", { XX } },
9914 },
9915 {
9916 /* VEX_W_5B_P_2 */
9917 { "vcvtps2dq", { XM, EXx } },
9918 { "(bad)", { XX } },
9919 },
9920 {
9921 /* VEX_W_5C_P_0 */
9922 { "vsubps", { XM, Vex, EXx } },
9923 { "(bad)", { XX } },
9924 },
9925 {
9926 /* VEX_W_5C_P_1 */
9927 { "vsubss", { XM, Vex128, EXd } },
9928 { "(bad)", { XX } },
9929 },
9930 {
9931 /* VEX_W_5C_P_2 */
9932 { "vsubpd", { XM, Vex, EXx } },
9933 { "(bad)", { XX } },
9934 },
9935 {
9936 /* VEX_W_5C_P_3 */
9937 { "vsubsd", { XM, Vex128, EXq } },
9938 { "(bad)", { XX } },
9939 },
9940 {
9941 /* VEX_W_5D_P_0 */
9942 { "vminps", { XM, Vex, EXx } },
9943 { "(bad)", { XX } },
9944 },
9945 {
9946 /* VEX_W_5D_P_1 */
9947 { "vminss", { XM, Vex128, EXd } },
9948 { "(bad)", { XX } },
9949 },
9950 {
9951 /* VEX_W_5D_P_2 */
9952 { "vminpd", { XM, Vex, EXx } },
9953 { "(bad)", { XX } },
9954 },
9955 {
9956 /* VEX_W_5D_P_3 */
9957 { "vminsd", { XM, Vex128, EXq } },
9958 { "(bad)", { XX } },
9959 },
9960 {
9961 /* VEX_W_5E_P_0 */
9962 { "vdivps", { XM, Vex, EXx } },
9963 { "(bad)", { XX } },
9964 },
9965 {
9966 /* VEX_W_5E_P_1 */
9967 { "vdivss", { XM, Vex128, EXd } },
9968 { "(bad)", { XX } },
9969 },
9970 {
9971 /* VEX_W_5E_P_2 */
9972 { "vdivpd", { XM, Vex, EXx } },
9973 { "(bad)", { XX } },
9974 },
9975 {
9976 /* VEX_W_5E_P_3 */
9977 { "vdivsd", { XM, Vex128, EXq } },
9978 { "(bad)", { XX } },
9979 },
9980 {
9981 /* VEX_W_5F_P_0 */
9982 { "vmaxps", { XM, Vex, EXx } },
9983 { "(bad)", { XX } },
9984 },
9985 {
9986 /* VEX_W_5F_P_1 */
9987 { "vmaxss", { XM, Vex128, EXd } },
9988 { "(bad)", { XX } },
9989 },
9990 {
9991 /* VEX_W_5F_P_2 */
9992 { "vmaxpd", { XM, Vex, EXx } },
9993 { "(bad)", { XX } },
9994 },
9995 {
9996 /* VEX_W_5F_P_3 */
9997 { "vmaxsd", { XM, Vex128, EXq } },
9998 { "(bad)", { XX } },
9999 },
10000 {
10001 /* VEX_W_60_P_2 */
10002 { "vpunpcklbw", { XM, Vex128, EXx } },
10003 { "(bad)", { XX } },
10004 },
10005 {
10006 /* VEX_W_61_P_2 */
10007 { "vpunpcklwd", { XM, Vex128, EXx } },
10008 { "(bad)", { XX } },
10009 },
10010 {
10011 /* VEX_W_62_P_2 */
10012 { "vpunpckldq", { XM, Vex128, EXx } },
10013 { "(bad)", { XX } },
10014 },
10015 {
10016 /* VEX_W_63_P_2 */
10017 { "vpacksswb", { XM, Vex128, EXx } },
10018 { "(bad)", { XX } },
10019 },
10020 {
10021 /* VEX_W_64_P_2 */
10022 { "vpcmpgtb", { XM, Vex128, EXx } },
10023 { "(bad)", { XX } },
10024 },
10025 {
10026 /* VEX_W_65_P_2 */
10027 { "vpcmpgtw", { XM, Vex128, EXx } },
10028 { "(bad)", { XX } },
10029 },
10030 {
10031 /* VEX_W_66_P_2 */
10032 { "vpcmpgtd", { XM, Vex128, EXx } },
10033 { "(bad)", { XX } },
10034 },
10035 {
10036 /* VEX_W_67_P_2 */
10037 { "vpackuswb", { XM, Vex128, EXx } },
10038 { "(bad)", { XX } },
10039 },
10040 {
10041 /* VEX_W_68_P_2 */
10042 { "vpunpckhbw", { XM, Vex128, EXx } },
10043 { "(bad)", { XX } },
10044 },
10045 {
10046 /* VEX_W_69_P_2 */
10047 { "vpunpckhwd", { XM, Vex128, EXx } },
10048 { "(bad)", { XX } },
10049 },
10050 {
10051 /* VEX_W_6A_P_2 */
10052 { "vpunpckhdq", { XM, Vex128, EXx } },
10053 { "(bad)", { XX } },
10054 },
10055 {
10056 /* VEX_W_6B_P_2 */
10057 { "vpackssdw", { XM, Vex128, EXx } },
10058 { "(bad)", { XX } },
10059 },
10060 {
10061 /* VEX_W_6C_P_2 */
10062 { "vpunpcklqdq", { XM, Vex128, EXx } },
10063 { "(bad)", { XX } },
10064 },
10065 {
10066 /* VEX_W_6D_P_2 */
10067 { "vpunpckhqdq", { XM, Vex128, EXx } },
10068 { "(bad)", { XX } },
10069 },
10070 {
10071 /* VEX_W_6F_P_1 */
efdb52b7 10072 { "vmovdqu", { XM, EXx } },
9e30b8e0
L
10073 { "(bad)", { XX } },
10074 },
10075 {
10076 /* VEX_W_6F_P_2 */
efdb52b7 10077 { "vmovdqa", { XM, EXx } },
9e30b8e0
L
10078 { "(bad)", { XX } },
10079 },
10080 {
10081 /* VEX_W_70_P_1 */
10082 { "vpshufhw", { XM, EXx, Ib } },
10083 { "(bad)", { XX } },
10084 },
10085 {
10086 /* VEX_W_70_P_2 */
10087 { "vpshufd", { XM, EXx, Ib } },
10088 { "(bad)", { XX } },
10089 },
10090 {
10091 /* VEX_W_70_P_3 */
10092 { "vpshuflw", { XM, EXx, Ib } },
10093 { "(bad)", { XX } },
10094 },
10095 {
10096 /* VEX_W_71_R_2_P_2 */
10097 { "vpsrlw", { Vex128, XS, Ib } },
10098 { "(bad)", { XX } },
10099 },
10100 {
10101 /* VEX_W_71_R_4_P_2 */
10102 { "vpsraw", { Vex128, XS, Ib } },
10103 { "(bad)", { XX } },
10104 },
10105 {
10106 /* VEX_W_71_R_6_P_2 */
10107 { "vpsllw", { Vex128, XS, Ib } },
10108 { "(bad)", { XX } },
10109 },
10110 {
10111 /* VEX_W_72_R_2_P_2 */
10112 { "vpsrld", { Vex128, XS, Ib } },
10113 { "(bad)", { XX } },
10114 },
10115 {
10116 /* VEX_W_72_R_4_P_2 */
10117 { "vpsrad", { Vex128, XS, Ib } },
10118 { "(bad)", { XX } },
10119 },
10120 {
10121 /* VEX_W_72_R_6_P_2 */
10122 { "vpslld", { Vex128, XS, Ib } },
10123 { "(bad)", { XX } },
10124 },
10125 {
10126 /* VEX_W_73_R_2_P_2 */
10127 { "vpsrlq", { Vex128, XS, Ib } },
10128 { "(bad)", { XX } },
10129 },
10130 {
10131 /* VEX_W_73_R_3_P_2 */
10132 { "vpsrldq", { Vex128, XS, Ib } },
10133 { "(bad)", { XX } },
10134 },
10135 {
10136 /* VEX_W_73_R_6_P_2 */
10137 { "vpsllq", { Vex128, XS, Ib } },
10138 { "(bad)", { XX } },
10139 },
10140 {
10141 /* VEX_W_73_R_7_P_2 */
10142 { "vpslldq", { Vex128, XS, Ib } },
10143 { "(bad)", { XX } },
10144 },
10145 {
10146 /* VEX_W_74_P_2 */
10147 { "vpcmpeqb", { XM, Vex128, EXx } },
10148 { "(bad)", { XX } },
10149 },
10150 {
10151 /* VEX_W_75_P_2 */
10152 { "vpcmpeqw", { XM, Vex128, EXx } },
10153 { "(bad)", { XX } },
10154 },
10155 {
10156 /* VEX_W_76_P_2 */
10157 { "vpcmpeqd", { XM, Vex128, EXx } },
10158 { "(bad)", { XX } },
10159 },
10160 {
10161 /* VEX_W_77_P_0 */
10162 { "", { VZERO } },
10163 { "(bad)", { XX } },
10164 },
10165 {
10166 /* VEX_W_7C_P_2 */
10167 { "vhaddpd", { XM, Vex, EXx } },
10168 { "(bad)", { XX } },
10169 },
10170 {
10171 /* VEX_W_7C_P_3 */
10172 { "vhaddps", { XM, Vex, EXx } },
10173 { "(bad)", { XX } },
10174 },
10175 {
10176 /* VEX_W_7D_P_2 */
10177 { "vhsubpd", { XM, Vex, EXx } },
10178 { "(bad)", { XX } },
10179 },
10180 {
10181 /* VEX_W_7D_P_3 */
10182 { "vhsubps", { XM, Vex, EXx } },
10183 { "(bad)", { XX } },
10184 },
10185 {
10186 /* VEX_W_7E_P_1 */
10187 { "vmovq", { XM, EXq } },
10188 { "(bad)", { XX } },
10189 },
10190 {
10191 /* VEX_W_7F_P_1 */
10192 { "vmovdqu", { EXxS, XM } },
10193 { "(bad)", { XX } },
10194 },
10195 {
10196 /* VEX_W_7F_P_2 */
10197 { "vmovdqa", { EXxS, XM } },
10198 { "(bad)", { XX } },
10199 },
10200 {
10201 /* VEX_W_AE_R_2_M_0 */
10202 { "vldmxcsr", { Md } },
10203 { "(bad)", { XX } },
10204 },
10205 {
10206 /* VEX_W_AE_R_3_M_0 */
10207 { "vstmxcsr", { Md } },
10208 { "(bad)", { XX } },
10209 },
10210 {
10211 /* VEX_W_C2_P_0 */
10212 { "vcmpps", { XM, Vex, EXx, VCMP } },
10213 { "(bad)", { XX } },
10214 },
10215 {
10216 /* VEX_W_C2_P_1 */
10217 { "vcmpss", { XM, Vex128, EXd, VCMP } },
10218 { "(bad)", { XX } },
10219 },
10220 {
10221 /* VEX_W_C2_P_2 */
10222 { "vcmppd", { XM, Vex, EXx, VCMP } },
10223 { "(bad)", { XX } },
10224 },
10225 {
10226 /* VEX_W_C2_P_3 */
10227 { "vcmpsd", { XM, Vex128, EXq, VCMP } },
10228 { "(bad)", { XX } },
10229 },
10230 {
10231 /* VEX_W_C4_P_2 */
10232 { "vpinsrw", { XM, Vex128, Edqw, Ib } },
10233 { "(bad)", { XX } },
10234 },
10235 {
10236 /* VEX_W_C5_P_2 */
10237 { "vpextrw", { Gdq, XS, Ib } },
10238 { "(bad)", { XX } },
10239 },
10240 {
10241 /* VEX_W_D0_P_2 */
10242 { "vaddsubpd", { XM, Vex, EXx } },
10243 { "(bad)", { XX } },
10244 },
10245 {
10246 /* VEX_W_D0_P_3 */
10247 { "vaddsubps", { XM, Vex, EXx } },
10248 { "(bad)", { XX } },
10249 },
10250 {
10251 /* VEX_W_D1_P_2 */
10252 { "vpsrlw", { XM, Vex128, EXx } },
10253 { "(bad)", { XX } },
10254 },
10255 {
10256 /* VEX_W_D2_P_2 */
10257 { "vpsrld", { XM, Vex128, EXx } },
10258 { "(bad)", { XX } },
10259 },
10260 {
10261 /* VEX_W_D3_P_2 */
10262 { "vpsrlq", { XM, Vex128, EXx } },
10263 { "(bad)", { XX } },
10264 },
10265 {
10266 /* VEX_W_D4_P_2 */
10267 { "vpaddq", { XM, Vex128, EXx } },
10268 { "(bad)", { XX } },
10269 },
10270 {
10271 /* VEX_W_D5_P_2 */
10272 { "vpmullw", { XM, Vex128, EXx } },
10273 { "(bad)", { XX } },
10274 },
10275 {
10276 /* VEX_W_D6_P_2 */
10277 { "vmovq", { EXqS, XM } },
10278 { "(bad)", { XX } },
10279 },
10280 {
10281 /* VEX_W_D7_P_2_M_1 */
10282 { "vpmovmskb", { Gdq, XS } },
10283 { "(bad)", { XX } },
10284 },
10285 {
10286 /* VEX_W_D8_P_2 */
10287 { "vpsubusb", { XM, Vex128, EXx } },
10288 { "(bad)", { XX } },
10289 },
10290 {
10291 /* VEX_W_D9_P_2 */
10292 { "vpsubusw", { XM, Vex128, EXx } },
10293 { "(bad)", { XX } },
10294 },
10295 {
10296 /* VEX_W_DA_P_2 */
10297 { "vpminub", { XM, Vex128, EXx } },
10298 { "(bad)", { XX } },
10299 },
10300 {
10301 /* VEX_W_DB_P_2 */
10302 { "vpand", { XM, Vex128, EXx } },
10303 { "(bad)", { XX } },
10304 },
10305 {
10306 /* VEX_W_DC_P_2 */
10307 { "vpaddusb", { XM, Vex128, EXx } },
10308 { "(bad)", { XX } },
10309 },
10310 {
10311 /* VEX_W_DD_P_2 */
10312 { "vpaddusw", { XM, Vex128, EXx } },
10313 { "(bad)", { XX } },
10314 },
10315 {
10316 /* VEX_W_DE_P_2 */
10317 { "vpmaxub", { XM, Vex128, EXx } },
10318 { "(bad)", { XX } },
10319 },
10320 {
10321 /* VEX_W_DF_P_2 */
10322 { "vpandn", { XM, Vex128, EXx } },
10323 { "(bad)", { XX } },
10324 },
10325 {
10326 /* VEX_W_E0_P_2 */
10327 { "vpavgb", { XM, Vex128, EXx } },
10328 { "(bad)", { XX } },
10329 },
10330 {
10331 /* VEX_W_E1_P_2 */
10332 { "vpsraw", { XM, Vex128, EXx } },
10333 { "(bad)", { XX } },
10334 },
10335 {
10336 /* VEX_W_E2_P_2 */
10337 { "vpsrad", { XM, Vex128, EXx } },
10338 { "(bad)", { XX } },
10339 },
10340 {
10341 /* VEX_W_E3_P_2 */
10342 { "vpavgw", { XM, Vex128, EXx } },
10343 { "(bad)", { XX } },
10344 },
10345 {
10346 /* VEX_W_E4_P_2 */
10347 { "vpmulhuw", { XM, Vex128, EXx } },
10348 { "(bad)", { XX } },
10349 },
10350 {
10351 /* VEX_W_E5_P_2 */
10352 { "vpmulhw", { XM, Vex128, EXx } },
10353 { "(bad)", { XX } },
10354 },
10355 {
10356 /* VEX_W_E6_P_1 */
efdb52b7 10357 { "vcvtdq2pd", { XM, EXxmmq } },
9e30b8e0
L
10358 { "(bad)", { XX } },
10359 },
10360 {
10361 /* VEX_W_E6_P_2 */
a179a9fd 10362 { "vcvttpd2dq%XY", { XMM, EXx } },
9e30b8e0
L
10363 { "(bad)", { XX } },
10364 },
10365 {
10366 /* VEX_W_E6_P_3 */
a179a9fd 10367 { "vcvtpd2dq%XY", { XMM, EXx } },
9e30b8e0
L
10368 { "(bad)", { XX } },
10369 },
10370 {
10371 /* VEX_W_E7_P_2_M_0 */
10372 { "vmovntdq", { Mx, XM } },
10373 { "(bad)", { XX } },
10374 },
10375 {
10376 /* VEX_W_E8_P_2 */
10377 { "vpsubsb", { XM, Vex128, EXx } },
10378 { "(bad)", { XX } },
10379 },
10380 {
10381 /* VEX_W_E9_P_2 */
10382 { "vpsubsw", { XM, Vex128, EXx } },
10383 { "(bad)", { XX } },
10384 },
10385 {
10386 /* VEX_W_EA_P_2 */
10387 { "vpminsw", { XM, Vex128, EXx } },
10388 { "(bad)", { XX } },
10389 },
10390 {
10391 /* VEX_W_EB_P_2 */
10392 { "vpor", { XM, Vex128, EXx } },
10393 { "(bad)", { XX } },
10394 },
10395 {
10396 /* VEX_W_EC_P_2 */
10397 { "vpaddsb", { XM, Vex128, EXx } },
10398 { "(bad)", { XX } },
10399 },
10400 {
10401 /* VEX_W_ED_P_2 */
10402 { "vpaddsw", { XM, Vex128, EXx } },
10403 { "(bad)", { XX } },
10404 },
10405 {
10406 /* VEX_W_EE_P_2 */
10407 { "vpmaxsw", { XM, Vex128, EXx } },
10408 { "(bad)", { XX } },
10409 },
10410 {
10411 /* VEX_W_EF_P_2 */
10412 { "vpxor", { XM, Vex128, EXx } },
10413 { "(bad)", { XX } },
10414 },
10415 {
10416 /* VEX_W_F0_P_3_M_0 */
10417 { "vlddqu", { XM, M } },
10418 { "(bad)", { XX } },
10419 },
10420 {
10421 /* VEX_W_F1_P_2 */
10422 { "vpsllw", { XM, Vex128, EXx } },
10423 { "(bad)", { XX } },
10424 },
10425 {
10426 /* VEX_W_F2_P_2 */
10427 { "vpslld", { XM, Vex128, EXx } },
10428 { "(bad)", { XX } },
10429 },
10430 {
10431 /* VEX_W_F3_P_2 */
10432 { "vpsllq", { XM, Vex128, EXx } },
10433 { "(bad)", { XX } },
10434 },
10435 {
10436 /* VEX_W_F4_P_2 */
10437 { "vpmuludq", { XM, Vex128, EXx } },
10438 { "(bad)", { XX } },
10439 },
10440 {
10441 /* VEX_W_F5_P_2 */
10442 { "vpmaddwd", { XM, Vex128, EXx } },
10443 { "(bad)", { XX } },
10444 },
10445 {
10446 /* VEX_W_F6_P_2 */
10447 { "vpsadbw", { XM, Vex128, EXx } },
10448 { "(bad)", { XX } },
10449 },
10450 {
10451 /* VEX_W_F7_P_2 */
10452 { "vmaskmovdqu", { XM, XS } },
10453 { "(bad)", { XX } },
10454 },
10455 {
10456 /* VEX_W_F8_P_2 */
10457 { "vpsubb", { XM, Vex128, EXx } },
10458 { "(bad)", { XX } },
10459 },
10460 {
10461 /* VEX_W_F9_P_2 */
10462 { "vpsubw", { XM, Vex128, EXx } },
10463 { "(bad)", { XX } },
10464 },
10465 {
10466 /* VEX_W_FA_P_2 */
10467 { "vpsubd", { XM, Vex128, EXx } },
10468 { "(bad)", { XX } },
10469 },
10470 {
10471 /* VEX_W_FB_P_2 */
10472 { "vpsubq", { XM, Vex128, EXx } },
10473 { "(bad)", { XX } },
10474 },
10475 {
10476 /* VEX_W_FC_P_2 */
10477 { "vpaddb", { XM, Vex128, EXx } },
10478 { "(bad)", { XX } },
10479 },
10480 {
10481 /* VEX_W_FD_P_2 */
10482 { "vpaddw", { XM, Vex128, EXx } },
10483 { "(bad)", { XX } },
10484 },
10485 {
10486 /* VEX_W_FE_P_2 */
10487 { "vpaddd", { XM, Vex128, EXx } },
10488 { "(bad)", { XX } },
10489 },
10490 {
10491 /* VEX_W_3800_P_2 */
10492 { "vpshufb", { XM, Vex128, EXx } },
10493 { "(bad)", { XX } },
10494 },
10495 {
10496 /* VEX_W_3801_P_2 */
10497 { "vphaddw", { XM, Vex128, EXx } },
10498 { "(bad)", { XX } },
10499 },
10500 {
10501 /* VEX_W_3802_P_2 */
10502 { "vphaddd", { XM, Vex128, EXx } },
10503 { "(bad)", { XX } },
10504 },
10505 {
10506 /* VEX_W_3803_P_2 */
10507 { "vphaddsw", { XM, Vex128, EXx } },
10508 { "(bad)", { XX } },
10509 },
10510 {
10511 /* VEX_W_3804_P_2 */
10512 { "vpmaddubsw", { XM, Vex128, EXx } },
10513 { "(bad)", { XX } },
10514 },
10515 {
10516 /* VEX_W_3805_P_2 */
10517 { "vphsubw", { XM, Vex128, EXx } },
10518 { "(bad)", { XX } },
10519 },
10520 {
10521 /* VEX_W_3806_P_2 */
10522 { "vphsubd", { XM, Vex128, EXx } },
10523 { "(bad)", { XX } },
10524 },
10525 {
10526 /* VEX_W_3807_P_2 */
10527 { "vphsubsw", { XM, Vex128, EXx } },
10528 { "(bad)", { XX } },
10529 },
10530 {
10531 /* VEX_W_3808_P_2 */
10532 { "vpsignb", { XM, Vex128, EXx } },
10533 { "(bad)", { XX } },
10534 },
10535 {
10536 /* VEX_W_3809_P_2 */
10537 { "vpsignw", { XM, Vex128, EXx } },
10538 { "(bad)", { XX } },
10539 },
10540 {
10541 /* VEX_W_380A_P_2 */
10542 { "vpsignd", { XM, Vex128, EXx } },
10543 { "(bad)", { XX } },
10544 },
10545 {
10546 /* VEX_W_380B_P_2 */
10547 { "vpmulhrsw", { XM, Vex128, EXx } },
10548 { "(bad)", { XX } },
10549 },
10550 {
10551 /* VEX_W_380C_P_2 */
10552 { "vpermilps", { XM, Vex, EXx } },
10553 { "(bad)", { XX } },
10554 },
10555 {
10556 /* VEX_W_380D_P_2 */
10557 { "vpermilpd", { XM, Vex, EXx } },
10558 { "(bad)", { XX } },
10559 },
10560 {
10561 /* VEX_W_380E_P_2 */
10562 { "vtestps", { XM, EXx } },
10563 { "(bad)", { XX } },
10564 },
10565 {
10566 /* VEX_W_380F_P_2 */
10567 { "vtestpd", { XM, EXx } },
10568 { "(bad)", { XX } },
10569 },
10570 {
10571 /* VEX_W_3817_P_2 */
10572 { "vptest", { XM, EXx } },
10573 { "(bad)", { XX } },
10574 },
bcf2684f
L
10575 {
10576 /* VEX_W_3818_P_2_M_0 */
10577 { "vbroadcastss", { XM, Md } },
10578 { "(bad)", { XX } },
10579 },
9e30b8e0
L
10580 {
10581 /* VEX_W_3819_P_2_M_0 */
10582 { "vbroadcastsd", { XM, Mq } },
10583 { "(bad)", { XX } },
10584 },
10585 {
10586 /* VEX_W_381A_P_2_M_0 */
10587 { "vbroadcastf128", { XM, Mxmm } },
10588 { "(bad)", { XX } },
10589 },
10590 {
10591 /* VEX_W_381C_P_2 */
10592 { "vpabsb", { XM, EXx } },
10593 { "(bad)", { XX } },
10594 },
10595 {
10596 /* VEX_W_381D_P_2 */
10597 { "vpabsw", { XM, EXx } },
10598 { "(bad)", { XX } },
10599 },
10600 {
10601 /* VEX_W_381E_P_2 */
10602 { "vpabsd", { XM, EXx } },
10603 { "(bad)", { XX } },
10604 },
10605 {
10606 /* VEX_W_3820_P_2 */
10607 { "vpmovsxbw", { XM, EXq } },
10608 { "(bad)", { XX } },
10609 },
10610 {
10611 /* VEX_W_3821_P_2 */
10612 { "vpmovsxbd", { XM, EXd } },
10613 { "(bad)", { XX } },
10614 },
10615 {
10616 /* VEX_W_3822_P_2 */
10617 { "vpmovsxbq", { XM, EXw } },
10618 { "(bad)", { XX } },
10619 },
10620 {
10621 /* VEX_W_3823_P_2 */
10622 { "vpmovsxwd", { XM, EXq } },
10623 { "(bad)", { XX } },
10624 },
10625 {
10626 /* VEX_W_3824_P_2 */
10627 { "vpmovsxwq", { XM, EXd } },
10628 { "(bad)", { XX } },
10629 },
10630 {
10631 /* VEX_W_3825_P_2 */
10632 { "vpmovsxdq", { XM, EXq } },
10633 { "(bad)", { XX } },
10634 },
10635 {
10636 /* VEX_W_3828_P_2 */
10637 { "vpmuldq", { XM, Vex128, EXx } },
10638 { "(bad)", { XX } },
10639 },
10640 {
10641 /* VEX_W_3829_P_2 */
10642 { "vpcmpeqq", { XM, Vex128, EXx } },
10643 { "(bad)", { XX } },
10644 },
10645 {
10646 /* VEX_W_382A_P_2_M_0 */
10647 { "vmovntdqa", { XM, Mx } },
10648 { "(bad)", { XX } },
10649 },
10650 {
10651 /* VEX_W_382B_P_2 */
10652 { "vpackusdw", { XM, Vex128, EXx } },
10653 { "(bad)", { XX } },
10654 },
53aa04a0
L
10655 {
10656 /* VEX_W_382C_P_2_M_0 */
10657 { "vmaskmovps", { XM, Vex, Mx } },
10658 { "(bad)", { XX } },
10659 },
10660 {
10661 /* VEX_W_382D_P_2_M_0 */
10662 { "vmaskmovpd", { XM, Vex, Mx } },
10663 { "(bad)", { XX } },
10664 },
10665 {
10666 /* VEX_W_382E_P_2_M_0 */
10667 { "vmaskmovps", { Mx, Vex, XM } },
10668 { "(bad)", { XX } },
10669 },
10670 {
10671 /* VEX_W_382F_P_2_M_0 */
10672 { "vmaskmovpd", { Mx, Vex, XM } },
10673 { "(bad)", { XX } },
10674 },
9e30b8e0
L
10675 {
10676 /* VEX_W_3830_P_2 */
10677 { "vpmovzxbw", { XM, EXq } },
10678 { "(bad)", { XX } },
10679 },
10680 {
10681 /* VEX_W_3831_P_2 */
10682 { "vpmovzxbd", { XM, EXd } },
10683 { "(bad)", { XX } },
10684 },
10685 {
10686 /* VEX_W_3832_P_2 */
10687 { "vpmovzxbq", { XM, EXw } },
10688 { "(bad)", { XX } },
10689 },
10690 {
10691 /* VEX_W_3833_P_2 */
10692 { "vpmovzxwd", { XM, EXq } },
10693 { "(bad)", { XX } },
10694 },
10695 {
10696 /* VEX_W_3834_P_2 */
10697 { "vpmovzxwq", { XM, EXd } },
10698 { "(bad)", { XX } },
10699 },
10700 {
10701 /* VEX_W_3835_P_2 */
10702 { "vpmovzxdq", { XM, EXq } },
10703 { "(bad)", { XX } },
10704 },
10705 {
10706 /* VEX_W_3837_P_2 */
10707 { "vpcmpgtq", { XM, Vex128, EXx } },
10708 { "(bad)", { XX } },
10709 },
10710 {
10711 /* VEX_W_3838_P_2 */
10712 { "vpminsb", { XM, Vex128, EXx } },
10713 { "(bad)", { XX } },
10714 },
10715 {
10716 /* VEX_W_3839_P_2 */
10717 { "vpminsd", { XM, Vex128, EXx } },
10718 { "(bad)", { XX } },
10719 },
10720 {
10721 /* VEX_W_383A_P_2 */
10722 { "vpminuw", { XM, Vex128, EXx } },
10723 { "(bad)", { XX } },
10724 },
10725 {
10726 /* VEX_W_383B_P_2 */
10727 { "vpminud", { XM, Vex128, EXx } },
10728 { "(bad)", { XX } },
10729 },
10730 {
10731 /* VEX_W_383C_P_2 */
10732 { "vpmaxsb", { XM, Vex128, EXx } },
10733 { "(bad)", { XX } },
10734 },
10735 {
10736 /* VEX_W_383D_P_2 */
10737 { "vpmaxsd", { XM, Vex128, EXx } },
10738 { "(bad)", { XX } },
10739 },
10740 {
10741 /* VEX_W_383E_P_2 */
10742 { "vpmaxuw", { XM, Vex128, EXx } },
10743 { "(bad)", { XX } },
10744 },
10745 {
10746 /* VEX_W_383F_P_2 */
10747 { "vpmaxud", { XM, Vex128, EXx } },
10748 { "(bad)", { XX } },
10749 },
10750 {
10751 /* VEX_W_3840_P_2 */
10752 { "vpmulld", { XM, Vex128, EXx } },
10753 { "(bad)", { XX } },
10754 },
10755 {
10756 /* VEX_W_3841_P_2 */
10757 { "vphminposuw", { XM, EXx } },
10758 { "(bad)", { XX } },
10759 },
10760 {
10761 /* VEX_W_38DB_P_2 */
10762 { "vaesimc", { XM, EXx } },
10763 { "(bad)", { XX } },
10764 },
10765 {
10766 /* VEX_W_38DC_P_2 */
10767 { "vaesenc", { XM, Vex128, EXx } },
10768 { "(bad)", { XX } },
10769 },
10770 {
10771 /* VEX_W_38DD_P_2 */
10772 { "vaesenclast", { XM, Vex128, EXx } },
10773 { "(bad)", { XX } },
10774 },
10775 {
10776 /* VEX_W_38DE_P_2 */
10777 { "vaesdec", { XM, Vex128, EXx } },
10778 { "(bad)", { XX } },
10779 },
10780 {
10781 /* VEX_W_38DF_P_2 */
10782 { "vaesdeclast", { XM, Vex128, EXx } },
10783 { "(bad)", { XX } },
10784 },
10785 {
10786 /* VEX_W_3A04_P_2 */
10787 { "vpermilps", { XM, EXx, Ib } },
10788 { "(bad)", { XX } },
10789 },
10790 {
10791 /* VEX_W_3A05_P_2 */
10792 { "vpermilpd", { XM, EXx, Ib } },
10793 { "(bad)", { XX } },
10794 },
10795 {
10796 /* VEX_W_3A06_P_2 */
10797 { "vperm2f128", { XM, Vex256, EXx, Ib } },
10798 { "(bad)", { XX } },
10799 },
10800 {
10801 /* VEX_W_3A08_P_2 */
10802 { "vroundps", { XM, EXx, Ib } },
10803 { "(bad)", { XX } },
10804 },
10805 {
10806 /* VEX_W_3A09_P_2 */
10807 { "vroundpd", { XM, EXx, Ib } },
10808 { "(bad)", { XX } },
10809 },
10810 {
10811 /* VEX_W_3A0A_P_2 */
10812 { "vroundss", { XM, Vex128, EXd, Ib } },
10813 { "(bad)", { XX } },
10814 },
10815 {
10816 /* VEX_W_3A0B_P_2 */
10817 { "vroundsd", { XM, Vex128, EXq, Ib } },
10818 { "(bad)", { XX } },
10819 },
10820 {
10821 /* VEX_W_3A0C_P_2 */
10822 { "vblendps", { XM, Vex, EXx, Ib } },
10823 { "(bad)", { XX } },
10824 },
10825 {
10826 /* VEX_W_3A0D_P_2 */
10827 { "vblendpd", { XM, Vex, EXx, Ib } },
10828 { "(bad)", { XX } },
10829 },
10830 {
10831 /* VEX_W_3A0E_P_2 */
10832 { "vpblendw", { XM, Vex128, EXx, Ib } },
10833 { "(bad)", { XX } },
10834 },
10835 {
10836 /* VEX_W_3A0F_P_2 */
10837 { "vpalignr", { XM, Vex128, EXx, Ib } },
10838 { "(bad)", { XX } },
10839 },
10840 {
10841 /* VEX_W_3A14_P_2 */
10842 { "vpextrb", { Edqb, XM, Ib } },
10843 { "(bad)", { XX } },
10844 },
10845 {
10846 /* VEX_W_3A15_P_2 */
10847 { "vpextrw", { Edqw, XM, Ib } },
10848 { "(bad)", { XX } },
10849 },
10850 {
10851 /* VEX_W_3A18_P_2 */
10852 { "vinsertf128", { XM, Vex256, EXxmm, Ib } },
10853 { "(bad)", { XX } },
10854 },
10855 {
10856 /* VEX_W_3A19_P_2 */
10857 { "vextractf128", { EXxmm, XM, Ib } },
10858 { "(bad)", { XX } },
10859 },
10860 {
10861 /* VEX_W_3A20_P_2 */
10862 { "vpinsrb", { XM, Vex128, Edqb, Ib } },
10863 { "(bad)", { XX } },
10864 },
10865 {
10866 /* VEX_W_3A21_P_2 */
10867 { "vinsertps", { XM, Vex128, EXd, Ib } },
10868 { "(bad)", { XX } },
10869 },
10870 {
10871 /* VEX_W_3A40_P_2 */
10872 { "vdpps", { XM, Vex, EXx, Ib } },
10873 { "(bad)", { XX } },
10874 },
10875 {
10876 /* VEX_W_3A41_P_2 */
10877 { "vdppd", { XM, Vex128, EXx, Ib } },
10878 { "(bad)", { XX } },
10879 },
10880 {
10881 /* VEX_W_3A42_P_2 */
10882 { "vmpsadbw", { XM, Vex128, EXx, Ib } },
10883 { "(bad)", { XX } },
10884 },
10885 {
10886 /* VEX_W_3A44_P_2 */
10887 { "vpclmulqdq", { XM, Vex128, EXx, PCLMUL } },
10888 { "(bad)", { XX } },
10889 },
10890 {
10891 /* VEX_W_3A4A_P_2 */
10892 { "vblendvps", { XM, Vex, EXx, XMVexI4 } },
10893 { "(bad)", { XX } },
10894 },
10895 {
10896 /* VEX_W_3A4B_P_2 */
10897 { "vblendvpd", { XM, Vex, EXx, XMVexI4 } },
10898 { "(bad)", { XX } },
10899 },
10900 {
10901 /* VEX_W_3A4C_P_2 */
10902 { "vpblendvb", { XM, Vex128, EXx, XMVexI4 } },
10903 { "(bad)", { XX } },
10904 },
10905 {
10906 /* VEX_W_3A60_P_2 */
10907 { "vpcmpestrm", { XM, EXx, Ib } },
10908 { "(bad)", { XX } },
10909 },
10910 {
10911 /* VEX_W_3A61_P_2 */
10912 { "vpcmpestri", { XM, EXx, Ib } },
10913 { "(bad)", { XX } },
10914 },
10915 {
10916 /* VEX_W_3A62_P_2 */
10917 { "vpcmpistrm", { XM, EXx, Ib } },
10918 { "(bad)", { XX } },
10919 },
10920 {
10921 /* VEX_W_3A63_P_2 */
10922 { "vpcmpistri", { XM, EXx, Ib } },
10923 { "(bad)", { XX } },
10924 },
10925 {
10926 /* VEX_W_3ADF_P_2 */
10927 { "vaeskeygenassist", { XM, EXx, Ib } },
10928 { "(bad)", { XX } },
10929 },
10930};
10931
10932static const struct dis386 mod_table[][2] = {
10933 {
10934 /* MOD_8D */
10935 { "leaS", { Gv, M } },
10936 { "(bad)", { XX } },
10937 },
10938 {
10939 /* MOD_0F01_REG_0 */
10940 { X86_64_TABLE (X86_64_0F01_REG_0) },
10941 { RM_TABLE (RM_0F01_REG_0) },
10942 },
10943 {
10944 /* MOD_0F01_REG_1 */
10945 { X86_64_TABLE (X86_64_0F01_REG_1) },
10946 { RM_TABLE (RM_0F01_REG_1) },
10947 },
10948 {
10949 /* MOD_0F01_REG_2 */
10950 { X86_64_TABLE (X86_64_0F01_REG_2) },
10951 { RM_TABLE (RM_0F01_REG_2) },
10952 },
10953 {
10954 /* MOD_0F01_REG_3 */
10955 { X86_64_TABLE (X86_64_0F01_REG_3) },
10956 { RM_TABLE (RM_0F01_REG_3) },
10957 },
10958 {
10959 /* MOD_0F01_REG_7 */
10960 { "invlpg", { Mb } },
10961 { RM_TABLE (RM_0F01_REG_7) },
10962 },
10963 {
10964 /* MOD_0F12_PREFIX_0 */
10965 { "movlps", { XM, EXq } },
10966 { "movhlps", { XM, EXq } },
10967 },
10968 {
10969 /* MOD_0F13 */
10970 { "movlpX", { EXq, XM } },
10971 { "(bad)", { XX } },
10972 },
10973 {
10974 /* MOD_0F16_PREFIX_0 */
10975 { "movhps", { XM, EXq } },
10976 { "movlhps", { XM, EXq } },
10977 },
10978 {
10979 /* MOD_0F17 */
10980 { "movhpX", { EXq, XM } },
10981 { "(bad)", { XX } },
10982 },
10983 {
10984 /* MOD_0F18_REG_0 */
10985 { "prefetchnta", { Mb } },
10986 { "(bad)", { XX } },
10987 },
10988 {
10989 /* MOD_0F18_REG_1 */
10990 { "prefetcht0", { Mb } },
10991 { "(bad)", { XX } },
10992 },
10993 {
10994 /* MOD_0F18_REG_2 */
10995 { "prefetcht1", { Mb } },
10996 { "(bad)", { XX } },
10997 },
10998 {
10999 /* MOD_0F18_REG_3 */
11000 { "prefetcht2", { Mb } },
11001 { "(bad)", { XX } },
11002 },
11003 {
11004 /* MOD_0F20 */
11005 { "(bad)", { XX } },
11006 { "movZ", { Rm, Cm } },
11007 },
11008 {
11009 /* MOD_0F21 */
11010 { "(bad)", { XX } },
11011 { "movZ", { Rm, Dm } },
11012 },
11013 {
11014 /* MOD_0F22 */
11015 { "(bad)", { XX } },
11016 { "movZ", { Cm, Rm } },
b844680a
L
11017 },
11018 {
92fddf8e 11019 /* MOD_0F23 */
b844680a 11020 { "(bad)", { XX } },
92fddf8e 11021 { "movZ", { Dm, Rm } },
b844680a
L
11022 },
11023 {
92fddf8e 11024 /* MOD_0F24 */
c1e679ec 11025 { "(bad)", { XX } },
92fddf8e 11026 { "movL", { Rd, Td } },
b844680a
L
11027 },
11028 {
92fddf8e 11029 /* MOD_0F26 */
b844680a 11030 { "(bad)", { XX } },
92fddf8e 11031 { "movL", { Td, Rd } },
b844680a 11032 },
75c135a8
L
11033 {
11034 /* MOD_0F2B_PREFIX_0 */
4ee52178 11035 {"movntps", { Mx, XM } },
75c135a8
L
11036 { "(bad)", { XX } },
11037 },
11038 {
11039 /* MOD_0F2B_PREFIX_1 */
4ee52178 11040 {"movntss", { Md, XM } },
75c135a8
L
11041 { "(bad)", { XX } },
11042 },
11043 {
11044 /* MOD_0F2B_PREFIX_2 */
4ee52178 11045 {"movntpd", { Mx, XM } },
75c135a8
L
11046 { "(bad)", { XX } },
11047 },
11048 {
11049 /* MOD_0F2B_PREFIX_3 */
4ee52178 11050 {"movntsd", { Mq, XM } },
75c135a8
L
11051 { "(bad)", { XX } },
11052 },
11053 {
11054 /* MOD_0F51 */
11055 { "(bad)", { XX } },
11056 { "movmskpX", { Gdq, XS } },
11057 },
b844680a 11058 {
1ceb70f8 11059 /* MOD_0F71_REG_2 */
b844680a 11060 { "(bad)", { XX } },
4e7d34a6 11061 { "psrlw", { MS, Ib } },
b844680a
L
11062 },
11063 {
1ceb70f8 11064 /* MOD_0F71_REG_4 */
b844680a 11065 { "(bad)", { XX } },
4e7d34a6 11066 { "psraw", { MS, Ib } },
b844680a
L
11067 },
11068 {
1ceb70f8 11069 /* MOD_0F71_REG_6 */
b844680a 11070 { "(bad)", { XX } },
4e7d34a6 11071 { "psllw", { MS, Ib } },
b844680a
L
11072 },
11073 {
1ceb70f8 11074 /* MOD_0F72_REG_2 */
b844680a 11075 { "(bad)", { XX } },
4e7d34a6 11076 { "psrld", { MS, Ib } },
b844680a
L
11077 },
11078 {
1ceb70f8 11079 /* MOD_0F72_REG_4 */
b844680a 11080 { "(bad)", { XX } },
4e7d34a6 11081 { "psrad", { MS, Ib } },
b844680a
L
11082 },
11083 {
1ceb70f8 11084 /* MOD_0F72_REG_6 */
b844680a 11085 { "(bad)", { XX } },
4e7d34a6 11086 { "pslld", { MS, Ib } },
b844680a
L
11087 },
11088 {
1ceb70f8 11089 /* MOD_0F73_REG_2 */
4e7d34a6
L
11090 { "(bad)", { XX } },
11091 { "psrlq", { MS, Ib } },
b844680a
L
11092 },
11093 {
1ceb70f8 11094 /* MOD_0F73_REG_3 */
b844680a 11095 { "(bad)", { XX } },
c0f3af97
L
11096 { PREFIX_TABLE (PREFIX_0F73_REG_3) },
11097 },
11098 {
11099 /* MOD_0F73_REG_6 */
11100 { "(bad)", { XX } },
11101 { "psllq", { MS, Ib } },
11102 },
11103 {
11104 /* MOD_0F73_REG_7 */
11105 { "(bad)", { XX } },
11106 { PREFIX_TABLE (PREFIX_0F73_REG_7) },
11107 },
11108 {
11109 /* MOD_0FAE_REG_0 */
eacc9c89 11110 { "fxsave", { FXSAVE } },
c0f3af97
L
11111 { "(bad)", { XX } },
11112 },
11113 {
11114 /* MOD_0FAE_REG_1 */
eacc9c89 11115 { "fxrstor", { FXSAVE } },
c0f3af97
L
11116 { "(bad)", { XX } },
11117 },
11118 {
11119 /* MOD_0FAE_REG_2 */
11120 { "ldmxcsr", { Md } },
11121 { "(bad)", { XX } },
11122 },
11123 {
11124 /* MOD_0FAE_REG_3 */
11125 { "stmxcsr", { Md } },
11126 { "(bad)", { XX } },
11127 },
11128 {
11129 /* MOD_0FAE_REG_4 */
11130 { "xsave", { M } },
11131 { "(bad)", { XX } },
11132 },
11133 {
11134 /* MOD_0FAE_REG_5 */
11135 { "xrstor", { M } },
11136 { RM_TABLE (RM_0FAE_REG_5) },
11137 },
11138 {
11139 /* MOD_0FAE_REG_6 */
11140 { "xsaveopt", { M } },
11141 { RM_TABLE (RM_0FAE_REG_6) },
11142 },
11143 {
11144 /* MOD_0FAE_REG_7 */
11145 { "clflush", { Mb } },
11146 { RM_TABLE (RM_0FAE_REG_7) },
11147 },
11148 {
11149 /* MOD_0FB2 */
11150 { "lssS", { Gv, Mp } },
11151 { "(bad)", { XX } },
11152 },
11153 {
11154 /* MOD_0FB4 */
11155 { "lfsS", { Gv, Mp } },
11156 { "(bad)", { XX } },
11157 },
11158 {
11159 /* MOD_0FB5 */
11160 { "lgsS", { Gv, Mp } },
11161 { "(bad)", { XX } },
11162 },
11163 {
11164 /* MOD_0FC7_REG_6 */
11165 { PREFIX_TABLE (PREFIX_0FC7_REG_6) },
11166 { "(bad)", { XX } },
11167 },
11168 {
11169 /* MOD_0FC7_REG_7 */
11170 { "vmptrst", { Mq } },
11171 { "(bad)", { XX } },
11172 },
11173 {
11174 /* MOD_0FD7 */
11175 { "(bad)", { XX } },
11176 { "pmovmskb", { Gdq, MS } },
11177 },
11178 {
11179 /* MOD_0FE7_PREFIX_2 */
11180 { "movntdq", { Mx, XM } },
11181 { "(bad)", { XX } },
11182 },
11183 {
11184 /* MOD_0FF0_PREFIX_3 */
11185 { "lddqu", { XM, M } },
11186 { "(bad)", { XX } },
11187 },
11188 {
11189 /* MOD_0F382A_PREFIX_2 */
11190 { "movntdqa", { XM, Mx } },
11191 { "(bad)", { XX } },
11192 },
11193 {
11194 /* MOD_62_32BIT */
11195 { "bound{S|}", { Gv, Ma } },
11196 { "(bad)", { XX } },
11197 },
11198 {
11199 /* MOD_C4_32BIT */
11200 { "lesS", { Gv, Mp } },
11201 { VEX_C4_TABLE (VEX_0F) },
11202 },
11203 {
11204 /* MOD_C5_32BIT */
11205 { "ldsS", { Gv, Mp } },
11206 { VEX_C5_TABLE (VEX_0F) },
11207 },
11208 {
11209 /* MOD_VEX_12_PREFIX_0 */
11210 { VEX_LEN_TABLE (VEX_LEN_12_P_0_M_0) },
11211 { VEX_LEN_TABLE (VEX_LEN_12_P_0_M_1) },
11212 },
11213 {
11214 /* MOD_VEX_13 */
11215 { VEX_LEN_TABLE (VEX_LEN_13_M_0) },
11216 { "(bad)", { XX } },
11217 },
11218 {
11219 /* MOD_VEX_16_PREFIX_0 */
11220 { VEX_LEN_TABLE (VEX_LEN_16_P_0_M_0) },
11221 { VEX_LEN_TABLE (VEX_LEN_16_P_0_M_1) },
11222 },
11223 {
11224 /* MOD_VEX_17 */
11225 { VEX_LEN_TABLE (VEX_LEN_17_M_0) },
11226 { "(bad)", { XX } },
11227 },
11228 {
11229 /* MOD_VEX_2B */
9e30b8e0 11230 { VEX_W_TABLE (VEX_W_2B_M_0) },
c0f3af97
L
11231 { "(bad)", { XX } },
11232 },
11233 {
976f1fde 11234 /* MOD_VEX_50 */
c0f3af97 11235 { "(bad)", { XX } },
9e30b8e0 11236 { VEX_W_TABLE (VEX_W_50_M_0) },
c0f3af97
L
11237 },
11238 {
11239 /* MOD_VEX_71_REG_2 */
11240 { "(bad)", { XX } },
11241 { PREFIX_TABLE (PREFIX_VEX_71_REG_2) },
b844680a
L
11242 },
11243 {
c0f3af97 11244 /* MOD_VEX_71_REG_4 */
b844680a 11245 { "(bad)", { XX } },
c0f3af97 11246 { PREFIX_TABLE (PREFIX_VEX_71_REG_4) },
b844680a
L
11247 },
11248 {
c0f3af97 11249 /* MOD_VEX_71_REG_6 */
b844680a 11250 { "(bad)", { XX } },
c0f3af97 11251 { PREFIX_TABLE (PREFIX_VEX_71_REG_6) },
b844680a
L
11252 },
11253 {
c0f3af97 11254 /* MOD_VEX_72_REG_2 */
b844680a 11255 { "(bad)", { XX } },
c0f3af97 11256 { PREFIX_TABLE (PREFIX_VEX_72_REG_2) },
b844680a 11257 },
d8faab4e 11258 {
c0f3af97 11259 /* MOD_VEX_72_REG_4 */
d8faab4e 11260 { "(bad)", { XX } },
c0f3af97 11261 { PREFIX_TABLE (PREFIX_VEX_72_REG_4) },
d8faab4e
L
11262 },
11263 {
c0f3af97 11264 /* MOD_VEX_72_REG_6 */
d8faab4e 11265 { "(bad)", { XX } },
c0f3af97 11266 { PREFIX_TABLE (PREFIX_VEX_72_REG_6) },
d8faab4e 11267 },
876d4bfa 11268 {
c0f3af97 11269 /* MOD_VEX_73_REG_2 */
876d4bfa 11270 { "(bad)", { XX } },
c0f3af97 11271 { PREFIX_TABLE (PREFIX_VEX_73_REG_2) },
876d4bfa
L
11272 },
11273 {
c0f3af97 11274 /* MOD_VEX_73_REG_3 */
876d4bfa 11275 { "(bad)", { XX } },
c0f3af97 11276 { PREFIX_TABLE (PREFIX_VEX_73_REG_3) },
475a2301
L
11277 },
11278 {
c0f3af97
L
11279 /* MOD_VEX_73_REG_6 */
11280 { "(bad)", { XX } },
11281 { PREFIX_TABLE (PREFIX_VEX_73_REG_6) },
876d4bfa
L
11282 },
11283 {
c0f3af97 11284 /* MOD_VEX_73_REG_7 */
4e7d34a6 11285 { "(bad)", { XX } },
c0f3af97 11286 { PREFIX_TABLE (PREFIX_VEX_73_REG_7) },
876d4bfa
L
11287 },
11288 {
c0f3af97
L
11289 /* MOD_VEX_AE_REG_2 */
11290 { VEX_LEN_TABLE (VEX_LEN_AE_R_2_M_0) },
11291 { "(bad)", { XX } },
876d4bfa 11292 },
bbedc832 11293 {
c0f3af97
L
11294 /* MOD_VEX_AE_REG_3 */
11295 { VEX_LEN_TABLE (VEX_LEN_AE_R_3_M_0) },
4e7d34a6 11296 { "(bad)", { XX } },
bbedc832 11297 },
144c41d9 11298 {
c0f3af97 11299 /* MOD_VEX_D7_PREFIX_2 */
4e7d34a6 11300 { "(bad)", { XX } },
c0f3af97 11301 { VEX_LEN_TABLE (VEX_LEN_D7_P_2_M_1) },
144c41d9 11302 },
1afd85e3 11303 {
c0f3af97 11304 /* MOD_VEX_E7_PREFIX_2 */
9e30b8e0 11305 { VEX_W_TABLE (VEX_W_E7_P_2_M_0) },
92fddf8e 11306 { "(bad)", { XX } },
1afd85e3
L
11307 },
11308 {
c0f3af97 11309 /* MOD_VEX_F0_PREFIX_3 */
9e30b8e0 11310 { VEX_W_TABLE (VEX_W_F0_P_3_M_0) },
92fddf8e
L
11311 { "(bad)", { XX } },
11312 },
11313 {
c0f3af97 11314 /* MOD_VEX_3818_PREFIX_2 */
bcf2684f 11315 { VEX_W_TABLE (VEX_W_3818_P_2_M_0) },
92fddf8e 11316 { "(bad)", { XX } },
1afd85e3 11317 },
75c135a8 11318 {
c0f3af97
L
11319 /* MOD_VEX_3819_PREFIX_2 */
11320 { VEX_LEN_TABLE (VEX_LEN_3819_P_2_M_0) },
75c135a8 11321 { "(bad)", { XX } },
75c135a8
L
11322 },
11323 {
c0f3af97
L
11324 /* MOD_VEX_381A_PREFIX_2 */
11325 { VEX_LEN_TABLE (VEX_LEN_381A_P_2_M_0) },
75c135a8
L
11326 { "(bad)", { XX } },
11327 },
1afd85e3 11328 {
c0f3af97
L
11329 /* MOD_VEX_382A_PREFIX_2 */
11330 { VEX_LEN_TABLE (VEX_LEN_382A_P_2_M_0) },
1afd85e3 11331 { "(bad)", { XX } },
1afd85e3 11332 },
75c135a8 11333 {
c0f3af97 11334 /* MOD_VEX_382C_PREFIX_2 */
53aa04a0 11335 { VEX_W_TABLE (VEX_W_382C_P_2_M_0) },
75c135a8
L
11336 { "(bad)", { XX } },
11337 },
1afd85e3 11338 {
c0f3af97 11339 /* MOD_VEX_382D_PREFIX_2 */
53aa04a0 11340 { VEX_W_TABLE (VEX_W_382D_P_2_M_0) },
1afd85e3 11341 { "(bad)", { XX } },
1afd85e3
L
11342 },
11343 {
c0f3af97 11344 /* MOD_VEX_382E_PREFIX_2 */
53aa04a0 11345 { VEX_W_TABLE (VEX_W_382E_P_2_M_0) },
4e7d34a6 11346 { "(bad)", { XX } },
1afd85e3
L
11347 },
11348 {
c0f3af97 11349 /* MOD_VEX_382F_PREFIX_2 */
53aa04a0 11350 { VEX_W_TABLE (VEX_W_382F_P_2_M_0) },
1afd85e3 11351 { "(bad)", { XX } },
1afd85e3 11352 },
b844680a
L
11353};
11354
1ceb70f8 11355static const struct dis386 rm_table[][8] = {
b844680a 11356 {
1ceb70f8 11357 /* RM_0F01_REG_0 */
b844680a
L
11358 { "(bad)", { XX } },
11359 { "vmcall", { Skip_MODRM } },
11360 { "vmlaunch", { Skip_MODRM } },
11361 { "vmresume", { Skip_MODRM } },
11362 { "vmxoff", { Skip_MODRM } },
11363 { "(bad)", { XX } },
11364 { "(bad)", { XX } },
11365 { "(bad)", { XX } },
11366 },
11367 {
1ceb70f8 11368 /* RM_0F01_REG_1 */
b844680a
L
11369 { "monitor", { { OP_Monitor, 0 } } },
11370 { "mwait", { { OP_Mwait, 0 } } },
11371 { "(bad)", { XX } },
11372 { "(bad)", { XX } },
11373 { "(bad)", { XX } },
11374 { "(bad)", { XX } },
11375 { "(bad)", { XX } },
11376 { "(bad)", { XX } },
11377 },
475a2301
L
11378 {
11379 /* RM_0F01_REG_2 */
11380 { "xgetbv", { Skip_MODRM } },
11381 { "xsetbv", { Skip_MODRM } },
11382 { "(bad)", { XX } },
11383 { "(bad)", { XX } },
11384 { "(bad)", { XX } },
11385 { "(bad)", { XX } },
11386 { "(bad)", { XX } },
11387 { "(bad)", { XX } },
11388 },
b844680a 11389 {
1ceb70f8 11390 /* RM_0F01_REG_3 */
4e7d34a6
L
11391 { "vmrun", { Skip_MODRM } },
11392 { "vmmcall", { Skip_MODRM } },
11393 { "vmload", { Skip_MODRM } },
11394 { "vmsave", { Skip_MODRM } },
11395 { "stgi", { Skip_MODRM } },
11396 { "clgi", { Skip_MODRM } },
11397 { "skinit", { Skip_MODRM } },
11398 { "invlpga", { Skip_MODRM } },
11399 },
11400 {
1ceb70f8 11401 /* RM_0F01_REG_7 */
4e7d34a6
L
11402 { "swapgs", { Skip_MODRM } },
11403 { "rdtscp", { Skip_MODRM } },
b844680a
L
11404 { "(bad)", { XX } },
11405 { "(bad)", { XX } },
11406 { "(bad)", { XX } },
11407 { "(bad)", { XX } },
11408 { "(bad)", { XX } },
11409 { "(bad)", { XX } },
11410 },
11411 {
1ceb70f8 11412 /* RM_0FAE_REG_5 */
4e7d34a6 11413 { "lfence", { Skip_MODRM } },
b844680a
L
11414 { "(bad)", { XX } },
11415 { "(bad)", { XX } },
11416 { "(bad)", { XX } },
11417 { "(bad)", { XX } },
11418 { "(bad)", { XX } },
11419 { "(bad)", { XX } },
11420 { "(bad)", { XX } },
11421 },
11422 {
1ceb70f8 11423 /* RM_0FAE_REG_6 */
4e7d34a6 11424 { "mfence", { Skip_MODRM } },
b844680a
L
11425 { "(bad)", { XX } },
11426 { "(bad)", { XX } },
11427 { "(bad)", { XX } },
11428 { "(bad)", { XX } },
11429 { "(bad)", { XX } },
11430 { "(bad)", { XX } },
11431 { "(bad)", { XX } },
11432 },
bbedc832 11433 {
1ceb70f8 11434 /* RM_0FAE_REG_7 */
4e7d34a6
L
11435 { "sfence", { Skip_MODRM } },
11436 { "(bad)", { XX } },
bbedc832
L
11437 { "(bad)", { XX } },
11438 { "(bad)", { XX } },
11439 { "(bad)", { XX } },
11440 { "(bad)", { XX } },
11441 { "(bad)", { XX } },
11442 { "(bad)", { XX } },
144c41d9 11443 },
b844680a
L
11444};
11445
c608c12e
AM
11446#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
11447
f16cd0d5
L
11448/* We use the high bit to indicate different name for the same
11449 prefix. */
11450#define ADDR16_PREFIX (0x67 | 0x100)
11451#define ADDR32_PREFIX (0x67 | 0x200)
11452#define DATA16_PREFIX (0x66 | 0x100)
11453#define DATA32_PREFIX (0x66 | 0x200)
11454#define REP_PREFIX (0xf3 | 0x100)
11455
11456static int
26ca5450 11457ckprefix (void)
252b5132 11458{
f16cd0d5 11459 int newrex, i, length;
52b15da3 11460 rex = 0;
c0f3af97 11461 rex_ignored = 0;
252b5132 11462 prefixes = 0;
7d421014 11463 used_prefixes = 0;
52b15da3 11464 rex_used = 0;
f16cd0d5
L
11465 last_lock_prefix = -1;
11466 last_repz_prefix = -1;
11467 last_repnz_prefix = -1;
11468 last_data_prefix = -1;
11469 last_addr_prefix = -1;
11470 last_rex_prefix = -1;
11471 last_seg_prefix = -1;
f310f33d
L
11472 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
11473 all_prefixes[i] = 0;
11474 i = 0;
f16cd0d5
L
11475 length = 0;
11476 /* The maximum instruction length is 15bytes. */
11477 while (length < MAX_CODE_LENGTH - 1)
252b5132
RH
11478 {
11479 FETCH_DATA (the_info, codep + 1);
52b15da3 11480 newrex = 0;
252b5132
RH
11481 switch (*codep)
11482 {
52b15da3
JH
11483 /* REX prefixes family. */
11484 case 0x40:
11485 case 0x41:
11486 case 0x42:
11487 case 0x43:
11488 case 0x44:
11489 case 0x45:
11490 case 0x46:
11491 case 0x47:
11492 case 0x48:
11493 case 0x49:
11494 case 0x4a:
11495 case 0x4b:
11496 case 0x4c:
11497 case 0x4d:
11498 case 0x4e:
11499 case 0x4f:
f16cd0d5
L
11500 if (address_mode == mode_64bit)
11501 newrex = *codep;
11502 else
11503 return 1;
11504 last_rex_prefix = i;
52b15da3 11505 break;
252b5132
RH
11506 case 0xf3:
11507 prefixes |= PREFIX_REPZ;
f16cd0d5 11508 last_repz_prefix = i;
252b5132
RH
11509 break;
11510 case 0xf2:
11511 prefixes |= PREFIX_REPNZ;
f16cd0d5 11512 last_repnz_prefix = i;
252b5132
RH
11513 break;
11514 case 0xf0:
11515 prefixes |= PREFIX_LOCK;
f16cd0d5 11516 last_lock_prefix = i;
252b5132
RH
11517 break;
11518 case 0x2e:
11519 prefixes |= PREFIX_CS;
f16cd0d5 11520 last_seg_prefix = i;
252b5132
RH
11521 break;
11522 case 0x36:
11523 prefixes |= PREFIX_SS;
f16cd0d5 11524 last_seg_prefix = i;
252b5132
RH
11525 break;
11526 case 0x3e:
11527 prefixes |= PREFIX_DS;
f16cd0d5 11528 last_seg_prefix = i;
252b5132
RH
11529 break;
11530 case 0x26:
11531 prefixes |= PREFIX_ES;
f16cd0d5 11532 last_seg_prefix = i;
252b5132
RH
11533 break;
11534 case 0x64:
11535 prefixes |= PREFIX_FS;
f16cd0d5 11536 last_seg_prefix = i;
252b5132
RH
11537 break;
11538 case 0x65:
11539 prefixes |= PREFIX_GS;
f16cd0d5 11540 last_seg_prefix = i;
252b5132
RH
11541 break;
11542 case 0x66:
11543 prefixes |= PREFIX_DATA;
f16cd0d5 11544 last_data_prefix = i;
252b5132
RH
11545 break;
11546 case 0x67:
11547 prefixes |= PREFIX_ADDR;
f16cd0d5 11548 last_addr_prefix = i;
252b5132 11549 break;
5076851f 11550 case FWAIT_OPCODE:
252b5132
RH
11551 /* fwait is really an instruction. If there are prefixes
11552 before the fwait, they belong to the fwait, *not* to the
11553 following instruction. */
3e7d61b2 11554 if (prefixes || rex)
252b5132
RH
11555 {
11556 prefixes |= PREFIX_FWAIT;
11557 codep++;
f16cd0d5 11558 return 1;
252b5132
RH
11559 }
11560 prefixes = PREFIX_FWAIT;
11561 break;
11562 default:
f16cd0d5 11563 return 1;
252b5132 11564 }
52b15da3
JH
11565 /* Rex is ignored when followed by another prefix. */
11566 if (rex)
11567 {
3e7d61b2 11568 rex_used = rex;
f16cd0d5 11569 return 1;
52b15da3 11570 }
f16cd0d5
L
11571 if (*codep != FWAIT_OPCODE)
11572 all_prefixes[i++] = *codep;
52b15da3 11573 rex = newrex;
252b5132 11574 codep++;
f16cd0d5
L
11575 length++;
11576 }
11577 return 0;
11578}
11579
11580static int
11581seg_prefix (int pref)
11582{
11583 switch (pref)
11584 {
11585 case 0x2e:
11586 return PREFIX_CS;
11587 case 0x36:
11588 return PREFIX_SS;
11589 case 0x3e:
11590 return PREFIX_DS;
11591 case 0x26:
11592 return PREFIX_ES;
11593 case 0x64:
11594 return PREFIX_FS;
11595 case 0x65:
11596 return PREFIX_GS;
11597 default:
11598 return 0;
252b5132
RH
11599 }
11600}
11601
7d421014
ILT
11602/* Return the name of the prefix byte PREF, or NULL if PREF is not a
11603 prefix byte. */
11604
11605static const char *
26ca5450 11606prefix_name (int pref, int sizeflag)
7d421014 11607{
0003779b
L
11608 static const char *rexes [16] =
11609 {
11610 "rex", /* 0x40 */
11611 "rex.B", /* 0x41 */
11612 "rex.X", /* 0x42 */
11613 "rex.XB", /* 0x43 */
11614 "rex.R", /* 0x44 */
11615 "rex.RB", /* 0x45 */
11616 "rex.RX", /* 0x46 */
11617 "rex.RXB", /* 0x47 */
11618 "rex.W", /* 0x48 */
11619 "rex.WB", /* 0x49 */
11620 "rex.WX", /* 0x4a */
11621 "rex.WXB", /* 0x4b */
11622 "rex.WR", /* 0x4c */
11623 "rex.WRB", /* 0x4d */
11624 "rex.WRX", /* 0x4e */
11625 "rex.WRXB", /* 0x4f */
11626 };
11627
7d421014
ILT
11628 switch (pref)
11629 {
52b15da3
JH
11630 /* REX prefixes family. */
11631 case 0x40:
52b15da3 11632 case 0x41:
52b15da3 11633 case 0x42:
52b15da3 11634 case 0x43:
52b15da3 11635 case 0x44:
52b15da3 11636 case 0x45:
52b15da3 11637 case 0x46:
52b15da3 11638 case 0x47:
52b15da3 11639 case 0x48:
52b15da3 11640 case 0x49:
52b15da3 11641 case 0x4a:
52b15da3 11642 case 0x4b:
52b15da3 11643 case 0x4c:
52b15da3 11644 case 0x4d:
52b15da3 11645 case 0x4e:
52b15da3 11646 case 0x4f:
0003779b 11647 return rexes [pref - 0x40];
7d421014
ILT
11648 case 0xf3:
11649 return "repz";
11650 case 0xf2:
11651 return "repnz";
11652 case 0xf0:
11653 return "lock";
11654 case 0x2e:
11655 return "cs";
11656 case 0x36:
11657 return "ss";
11658 case 0x3e:
11659 return "ds";
11660 case 0x26:
11661 return "es";
11662 case 0x64:
11663 return "fs";
11664 case 0x65:
11665 return "gs";
11666 case 0x66:
11667 return (sizeflag & DFLAG) ? "data16" : "data32";
11668 case 0x67:
cb712a9e 11669 if (address_mode == mode_64bit)
db6eb5be 11670 return (sizeflag & AFLAG) ? "addr32" : "addr64";
c1a64871 11671 else
2888cb7a 11672 return (sizeflag & AFLAG) ? "addr16" : "addr32";
7d421014
ILT
11673 case FWAIT_OPCODE:
11674 return "fwait";
f16cd0d5
L
11675 case ADDR16_PREFIX:
11676 return "addr16";
11677 case ADDR32_PREFIX:
11678 return "addr32";
11679 case DATA16_PREFIX:
11680 return "data16";
11681 case DATA32_PREFIX:
11682 return "data32";
11683 case REP_PREFIX:
11684 return "rep";
7d421014
ILT
11685 default:
11686 return NULL;
11687 }
11688}
11689
ce518a5f
L
11690static char op_out[MAX_OPERANDS][100];
11691static int op_ad, op_index[MAX_OPERANDS];
1d9f512f 11692static int two_source_ops;
ce518a5f
L
11693static bfd_vma op_address[MAX_OPERANDS];
11694static bfd_vma op_riprel[MAX_OPERANDS];
52b15da3 11695static bfd_vma start_pc;
ce518a5f 11696
252b5132
RH
11697/*
11698 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
11699 * (see topic "Redundant prefixes" in the "Differences from 8086"
11700 * section of the "Virtual 8086 Mode" chapter.)
11701 * 'pc' should be the address of this instruction, it will
11702 * be used to print the target address if this is a relative jump or call
11703 * The function returns the length of this instruction in bytes.
11704 */
11705
252b5132 11706static char intel_syntax;
9d141669 11707static char intel_mnemonic = !SYSV386_COMPAT;
252b5132
RH
11708static char open_char;
11709static char close_char;
11710static char separator_char;
11711static char scale_char;
11712
e396998b
AM
11713/* Here for backwards compatibility. When gdb stops using
11714 print_insn_i386_att and print_insn_i386_intel these functions can
11715 disappear, and print_insn_i386 be merged into print_insn. */
252b5132 11716int
26ca5450 11717print_insn_i386_att (bfd_vma pc, disassemble_info *info)
252b5132
RH
11718{
11719 intel_syntax = 0;
e396998b
AM
11720
11721 return print_insn (pc, info);
252b5132
RH
11722}
11723
11724int
26ca5450 11725print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
252b5132
RH
11726{
11727 intel_syntax = 1;
e396998b
AM
11728
11729 return print_insn (pc, info);
252b5132
RH
11730}
11731
e396998b 11732int
26ca5450 11733print_insn_i386 (bfd_vma pc, disassemble_info *info)
e396998b
AM
11734{
11735 intel_syntax = -1;
11736
11737 return print_insn (pc, info);
11738}
11739
f59a29b9
L
11740void
11741print_i386_disassembler_options (FILE *stream)
11742{
11743 fprintf (stream, _("\n\
11744The following i386/x86-64 specific disassembler options are supported for use\n\
11745with the -M switch (multiple options should be separated by commas):\n"));
11746
11747 fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
11748 fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
11749 fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
11750 fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
11751 fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
9d141669
L
11752 fprintf (stream, _(" att-mnemonic\n"
11753 " Display instruction in AT&T mnemonic\n"));
11754 fprintf (stream, _(" intel-mnemonic\n"
11755 " Display instruction in Intel mnemonic\n"));
f59a29b9
L
11756 fprintf (stream, _(" addr64 Assume 64bit address size\n"));
11757 fprintf (stream, _(" addr32 Assume 32bit address size\n"));
11758 fprintf (stream, _(" addr16 Assume 16bit address size\n"));
11759 fprintf (stream, _(" data32 Assume 32bit data size\n"));
11760 fprintf (stream, _(" data16 Assume 16bit data size\n"));
11761 fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
11762}
11763
b844680a
L
11764/* Get a pointer to struct dis386 with a valid name. */
11765
11766static const struct dis386 *
8bb15339 11767get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
b844680a 11768{
91d6fa6a 11769 int vindex, vex_table_index;
b844680a
L
11770
11771 if (dp->name != NULL)
11772 return dp;
11773
11774 switch (dp->op[0].bytemode)
11775 {
1ceb70f8
L
11776 case USE_REG_TABLE:
11777 dp = &reg_table[dp->op[1].bytemode][modrm.reg];
11778 break;
11779
11780 case USE_MOD_TABLE:
91d6fa6a
NC
11781 vindex = modrm.mod == 0x3 ? 1 : 0;
11782 dp = &mod_table[dp->op[1].bytemode][vindex];
1ceb70f8
L
11783 break;
11784
11785 case USE_RM_TABLE:
11786 dp = &rm_table[dp->op[1].bytemode][modrm.rm];
b844680a
L
11787 break;
11788
4e7d34a6 11789 case USE_PREFIX_TABLE:
c0f3af97 11790 if (need_vex)
b844680a 11791 {
c0f3af97
L
11792 /* The prefix in VEX is implicit. */
11793 switch (vex.prefix)
11794 {
11795 case 0:
91d6fa6a 11796 vindex = 0;
c0f3af97
L
11797 break;
11798 case REPE_PREFIX_OPCODE:
91d6fa6a 11799 vindex = 1;
c0f3af97
L
11800 break;
11801 case DATA_PREFIX_OPCODE:
91d6fa6a 11802 vindex = 2;
c0f3af97
L
11803 break;
11804 case REPNE_PREFIX_OPCODE:
91d6fa6a 11805 vindex = 3;
c0f3af97
L
11806 break;
11807 default:
11808 abort ();
11809 break;
11810 }
b844680a 11811 }
c0f3af97 11812 else
b844680a 11813 {
91d6fa6a 11814 vindex = 0;
c0f3af97
L
11815 used_prefixes |= (prefixes & PREFIX_REPZ);
11816 if (prefixes & PREFIX_REPZ)
b844680a 11817 {
91d6fa6a 11818 vindex = 1;
f16cd0d5 11819 all_prefixes[last_repz_prefix] = 0;
b844680a
L
11820 }
11821 else
11822 {
c0f3af97
L
11823 /* We should check PREFIX_REPNZ and PREFIX_REPZ before
11824 PREFIX_DATA. */
11825 used_prefixes |= (prefixes & PREFIX_REPNZ);
11826 if (prefixes & PREFIX_REPNZ)
11827 {
91d6fa6a 11828 vindex = 3;
f16cd0d5 11829 all_prefixes[last_repnz_prefix] = 0;
c0f3af97
L
11830 }
11831 else
b844680a 11832 {
c0f3af97
L
11833 used_prefixes |= (prefixes & PREFIX_DATA);
11834 if (prefixes & PREFIX_DATA)
11835 {
91d6fa6a 11836 vindex = 2;
f16cd0d5 11837 all_prefixes[last_data_prefix] = 0;
c0f3af97 11838 }
b844680a
L
11839 }
11840 }
11841 }
91d6fa6a 11842 dp = &prefix_table[dp->op[1].bytemode][vindex];
b844680a
L
11843 break;
11844
4e7d34a6 11845 case USE_X86_64_TABLE:
91d6fa6a
NC
11846 vindex = address_mode == mode_64bit ? 1 : 0;
11847 dp = &x86_64_table[dp->op[1].bytemode][vindex];
b844680a
L
11848 break;
11849
4e7d34a6 11850 case USE_3BYTE_TABLE:
8bb15339 11851 FETCH_DATA (info, codep + 2);
91d6fa6a
NC
11852 vindex = *codep++;
11853 dp = &three_byte_table[dp->op[1].bytemode][vindex];
8bb15339
L
11854 modrm.mod = (*codep >> 6) & 3;
11855 modrm.reg = (*codep >> 3) & 7;
11856 modrm.rm = *codep & 7;
11857 break;
11858
c0f3af97
L
11859 case USE_VEX_LEN_TABLE:
11860 if (!need_vex)
11861 abort ();
11862
11863 switch (vex.length)
11864 {
11865 case 128:
91d6fa6a 11866 vindex = 0;
c0f3af97
L
11867 break;
11868 case 256:
91d6fa6a 11869 vindex = 1;
c0f3af97
L
11870 break;
11871 default:
11872 abort ();
11873 break;
11874 }
11875
91d6fa6a 11876 dp = &vex_len_table[dp->op[1].bytemode][vindex];
c0f3af97
L
11877 break;
11878
f88c9eb0
SP
11879 case USE_XOP_8F_TABLE:
11880 FETCH_DATA (info, codep + 3);
11881 /* All bits in the REX prefix are ignored. */
11882 rex_ignored = rex;
11883 rex = ~(*codep >> 5) & 0x7;
11884
11885 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
11886 switch ((*codep & 0x1f))
11887 {
11888 default:
11889 BadOp ();
5dd85c99
SP
11890 case 0x8:
11891 vex_table_index = XOP_08;
11892 break;
f88c9eb0
SP
11893 case 0x9:
11894 vex_table_index = XOP_09;
11895 break;
11896 case 0xa:
11897 vex_table_index = XOP_0A;
11898 break;
11899 }
11900 codep++;
11901 vex.w = *codep & 0x80;
11902 if (vex.w && address_mode == mode_64bit)
11903 rex |= REX_W;
11904
11905 vex.register_specifier = (~(*codep >> 3)) & 0xf;
11906 if (address_mode != mode_64bit
11907 && vex.register_specifier > 0x7)
11908 BadOp ();
11909
11910 vex.length = (*codep & 0x4) ? 256 : 128;
11911 switch ((*codep & 0x3))
11912 {
11913 case 0:
11914 vex.prefix = 0;
11915 break;
11916 case 1:
11917 vex.prefix = DATA_PREFIX_OPCODE;
11918 break;
11919 case 2:
11920 vex.prefix = REPE_PREFIX_OPCODE;
11921 break;
11922 case 3:
11923 vex.prefix = REPNE_PREFIX_OPCODE;
11924 break;
11925 }
11926 need_vex = 1;
11927 need_vex_reg = 1;
11928 codep++;
91d6fa6a
NC
11929 vindex = *codep++;
11930 dp = &xop_table[vex_table_index][vindex];
c48244a5
SP
11931
11932 FETCH_DATA (info, codep + 1);
11933 modrm.mod = (*codep >> 6) & 3;
11934 modrm.reg = (*codep >> 3) & 7;
11935 modrm.rm = *codep & 7;
f88c9eb0
SP
11936 break;
11937
c0f3af97
L
11938 case USE_VEX_C4_TABLE:
11939 FETCH_DATA (info, codep + 3);
11940 /* All bits in the REX prefix are ignored. */
11941 rex_ignored = rex;
11942 rex = ~(*codep >> 5) & 0x7;
11943 switch ((*codep & 0x1f))
11944 {
11945 default:
11946 BadOp ();
11947 case 0x1:
f88c9eb0 11948 vex_table_index = VEX_0F;
c0f3af97
L
11949 break;
11950 case 0x2:
f88c9eb0 11951 vex_table_index = VEX_0F38;
c0f3af97
L
11952 break;
11953 case 0x3:
f88c9eb0 11954 vex_table_index = VEX_0F3A;
c0f3af97
L
11955 break;
11956 }
11957 codep++;
11958 vex.w = *codep & 0x80;
11959 if (vex.w && address_mode == mode_64bit)
11960 rex |= REX_W;
11961
11962 vex.register_specifier = (~(*codep >> 3)) & 0xf;
11963 if (address_mode != mode_64bit
11964 && vex.register_specifier > 0x7)
11965 BadOp ();
11966
11967 vex.length = (*codep & 0x4) ? 256 : 128;
11968 switch ((*codep & 0x3))
11969 {
11970 case 0:
11971 vex.prefix = 0;
11972 break;
11973 case 1:
11974 vex.prefix = DATA_PREFIX_OPCODE;
11975 break;
11976 case 2:
11977 vex.prefix = REPE_PREFIX_OPCODE;
11978 break;
11979 case 3:
11980 vex.prefix = REPNE_PREFIX_OPCODE;
11981 break;
11982 }
11983 need_vex = 1;
11984 need_vex_reg = 1;
11985 codep++;
91d6fa6a
NC
11986 vindex = *codep++;
11987 dp = &vex_table[vex_table_index][vindex];
c0f3af97 11988 /* There is no MODRM byte for VEX [82|77]. */
91d6fa6a 11989 if (vindex != 0x77 && vindex != 0x82)
c0f3af97
L
11990 {
11991 FETCH_DATA (info, codep + 1);
11992 modrm.mod = (*codep >> 6) & 3;
11993 modrm.reg = (*codep >> 3) & 7;
11994 modrm.rm = *codep & 7;
11995 }
11996 break;
11997
11998 case USE_VEX_C5_TABLE:
11999 FETCH_DATA (info, codep + 2);
12000 /* All bits in the REX prefix are ignored. */
12001 rex_ignored = rex;
12002 rex = (*codep & 0x80) ? 0 : REX_R;
12003
12004 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12005 if (address_mode != mode_64bit
12006 && vex.register_specifier > 0x7)
12007 BadOp ();
12008
759a05ce
L
12009 vex.w = 0;
12010
c0f3af97
L
12011 vex.length = (*codep & 0x4) ? 256 : 128;
12012 switch ((*codep & 0x3))
12013 {
12014 case 0:
12015 vex.prefix = 0;
12016 break;
12017 case 1:
12018 vex.prefix = DATA_PREFIX_OPCODE;
12019 break;
12020 case 2:
12021 vex.prefix = REPE_PREFIX_OPCODE;
12022 break;
12023 case 3:
12024 vex.prefix = REPNE_PREFIX_OPCODE;
12025 break;
12026 }
12027 need_vex = 1;
12028 need_vex_reg = 1;
12029 codep++;
91d6fa6a
NC
12030 vindex = *codep++;
12031 dp = &vex_table[dp->op[1].bytemode][vindex];
c0f3af97 12032 /* There is no MODRM byte for VEX [82|77]. */
91d6fa6a 12033 if (vindex != 0x77 && vindex != 0x82)
c0f3af97
L
12034 {
12035 FETCH_DATA (info, codep + 1);
12036 modrm.mod = (*codep >> 6) & 3;
12037 modrm.reg = (*codep >> 3) & 7;
12038 modrm.rm = *codep & 7;
12039 }
12040 break;
12041
9e30b8e0
L
12042 case USE_VEX_W_TABLE:
12043 if (!need_vex)
12044 abort ();
12045
12046 dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
12047 break;
12048
b844680a 12049 default:
d34b5006 12050 abort ();
b844680a
L
12051 }
12052
12053 if (dp->name != NULL)
12054 return dp;
12055 else
8bb15339 12056 return get_valid_dis386 (dp, info);
b844680a
L
12057}
12058
e396998b 12059static int
26ca5450 12060print_insn (bfd_vma pc, disassemble_info *info)
252b5132 12061{
2da11e11 12062 const struct dis386 *dp;
252b5132 12063 int i;
ce518a5f 12064 char *op_txt[MAX_OPERANDS];
252b5132 12065 int needcomma;
e396998b
AM
12066 int sizeflag;
12067 const char *p;
252b5132 12068 struct dis_private priv;
eec0f4ca 12069 unsigned char op;
f16cd0d5
L
12070 int prefix_length;
12071 int default_prefixes;
252b5132 12072
cb712a9e 12073 if (info->mach == bfd_mach_x86_64_intel_syntax
8a9036a4
L
12074 || info->mach == bfd_mach_x86_64
12075 || info->mach == bfd_mach_l1om
12076 || info->mach == bfd_mach_l1om_intel_syntax)
cb712a9e
L
12077 address_mode = mode_64bit;
12078 else
12079 address_mode = mode_32bit;
52b15da3 12080
8373f971 12081 if (intel_syntax == (char) -1)
e396998b 12082 intel_syntax = (info->mach == bfd_mach_i386_i386_intel_syntax
8a9036a4
L
12083 || info->mach == bfd_mach_x86_64_intel_syntax
12084 || info->mach == bfd_mach_l1om_intel_syntax);
e396998b 12085
2da11e11 12086 if (info->mach == bfd_mach_i386_i386
52b15da3 12087 || info->mach == bfd_mach_x86_64
8a9036a4 12088 || info->mach == bfd_mach_l1om
52b15da3 12089 || info->mach == bfd_mach_i386_i386_intel_syntax
8a9036a4
L
12090 || info->mach == bfd_mach_x86_64_intel_syntax
12091 || info->mach == bfd_mach_l1om_intel_syntax)
e396998b 12092 priv.orig_sizeflag = AFLAG | DFLAG;
2da11e11 12093 else if (info->mach == bfd_mach_i386_i8086)
e396998b 12094 priv.orig_sizeflag = 0;
2da11e11
AM
12095 else
12096 abort ();
e396998b
AM
12097
12098 for (p = info->disassembler_options; p != NULL; )
12099 {
0112cd26 12100 if (CONST_STRNEQ (p, "x86-64"))
e396998b 12101 {
cb712a9e 12102 address_mode = mode_64bit;
e396998b
AM
12103 priv.orig_sizeflag = AFLAG | DFLAG;
12104 }
0112cd26 12105 else if (CONST_STRNEQ (p, "i386"))
e396998b 12106 {
cb712a9e 12107 address_mode = mode_32bit;
e396998b
AM
12108 priv.orig_sizeflag = AFLAG | DFLAG;
12109 }
0112cd26 12110 else if (CONST_STRNEQ (p, "i8086"))
e396998b 12111 {
cb712a9e 12112 address_mode = mode_16bit;
e396998b
AM
12113 priv.orig_sizeflag = 0;
12114 }
0112cd26 12115 else if (CONST_STRNEQ (p, "intel"))
e396998b
AM
12116 {
12117 intel_syntax = 1;
9d141669
L
12118 if (CONST_STRNEQ (p + 5, "-mnemonic"))
12119 intel_mnemonic = 1;
e396998b 12120 }
0112cd26 12121 else if (CONST_STRNEQ (p, "att"))
e396998b
AM
12122 {
12123 intel_syntax = 0;
9d141669
L
12124 if (CONST_STRNEQ (p + 3, "-mnemonic"))
12125 intel_mnemonic = 0;
e396998b 12126 }
0112cd26 12127 else if (CONST_STRNEQ (p, "addr"))
e396998b 12128 {
f59a29b9
L
12129 if (address_mode == mode_64bit)
12130 {
12131 if (p[4] == '3' && p[5] == '2')
12132 priv.orig_sizeflag &= ~AFLAG;
12133 else if (p[4] == '6' && p[5] == '4')
12134 priv.orig_sizeflag |= AFLAG;
12135 }
12136 else
12137 {
12138 if (p[4] == '1' && p[5] == '6')
12139 priv.orig_sizeflag &= ~AFLAG;
12140 else if (p[4] == '3' && p[5] == '2')
12141 priv.orig_sizeflag |= AFLAG;
12142 }
e396998b 12143 }
0112cd26 12144 else if (CONST_STRNEQ (p, "data"))
e396998b
AM
12145 {
12146 if (p[4] == '1' && p[5] == '6')
12147 priv.orig_sizeflag &= ~DFLAG;
12148 else if (p[4] == '3' && p[5] == '2')
12149 priv.orig_sizeflag |= DFLAG;
12150 }
0112cd26 12151 else if (CONST_STRNEQ (p, "suffix"))
e396998b
AM
12152 priv.orig_sizeflag |= SUFFIX_ALWAYS;
12153
12154 p = strchr (p, ',');
12155 if (p != NULL)
12156 p++;
12157 }
12158
12159 if (intel_syntax)
12160 {
12161 names64 = intel_names64;
12162 names32 = intel_names32;
12163 names16 = intel_names16;
12164 names8 = intel_names8;
12165 names8rex = intel_names8rex;
12166 names_seg = intel_names_seg;
b9733481
L
12167 names_mm = intel_names_mm;
12168 names_xmm = intel_names_xmm;
12169 names_ymm = intel_names_ymm;
db51cc60
L
12170 index64 = intel_index64;
12171 index32 = intel_index32;
e396998b
AM
12172 index16 = intel_index16;
12173 open_char = '[';
12174 close_char = ']';
12175 separator_char = '+';
12176 scale_char = '*';
12177 }
12178 else
12179 {
12180 names64 = att_names64;
12181 names32 = att_names32;
12182 names16 = att_names16;
12183 names8 = att_names8;
12184 names8rex = att_names8rex;
12185 names_seg = att_names_seg;
b9733481
L
12186 names_mm = att_names_mm;
12187 names_xmm = att_names_xmm;
12188 names_ymm = att_names_ymm;
db51cc60
L
12189 index64 = att_index64;
12190 index32 = att_index32;
e396998b
AM
12191 index16 = att_index16;
12192 open_char = '(';
12193 close_char = ')';
12194 separator_char = ',';
12195 scale_char = ',';
12196 }
2da11e11 12197
4fe53c98 12198 /* The output looks better if we put 7 bytes on a line, since that
8a9036a4
L
12199 puts most long word instructions on a single line. Use 8 bytes
12200 for Intel L1OM. */
12201 if (info->mach == bfd_mach_l1om
12202 || info->mach == bfd_mach_l1om_intel_syntax)
12203 info->bytes_per_line = 8;
12204 else
12205 info->bytes_per_line = 7;
252b5132 12206
26ca5450 12207 info->private_data = &priv;
252b5132
RH
12208 priv.max_fetched = priv.the_buffer;
12209 priv.insn_start = pc;
252b5132
RH
12210
12211 obuf[0] = 0;
ce518a5f
L
12212 for (i = 0; i < MAX_OPERANDS; ++i)
12213 {
12214 op_out[i][0] = 0;
12215 op_index[i] = -1;
12216 }
252b5132
RH
12217
12218 the_info = info;
12219 start_pc = pc;
e396998b
AM
12220 start_codep = priv.the_buffer;
12221 codep = priv.the_buffer;
252b5132 12222
5076851f
ILT
12223 if (setjmp (priv.bailout) != 0)
12224 {
7d421014
ILT
12225 const char *name;
12226
5076851f 12227 /* Getting here means we tried for data but didn't get it. That
e396998b
AM
12228 means we have an incomplete instruction of some sort. Just
12229 print the first byte as a prefix or a .byte pseudo-op. */
12230 if (codep > priv.the_buffer)
5076851f 12231 {
e396998b 12232 name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
7d421014
ILT
12233 if (name != NULL)
12234 (*info->fprintf_func) (info->stream, "%s", name);
12235 else
5076851f 12236 {
7d421014
ILT
12237 /* Just print the first byte as a .byte instruction. */
12238 (*info->fprintf_func) (info->stream, ".byte 0x%x",
e396998b 12239 (unsigned int) priv.the_buffer[0]);
5076851f 12240 }
5076851f 12241
7d421014 12242 return 1;
5076851f
ILT
12243 }
12244
12245 return -1;
12246 }
12247
52b15da3 12248 obufp = obuf;
f16cd0d5
L
12249 sizeflag = priv.orig_sizeflag;
12250
12251 if (!ckprefix () || rex_used)
12252 {
12253 /* Too many prefixes or unused REX prefixes. */
12254 for (i = 0;
12255 all_prefixes[i] && i < (int) ARRAY_SIZE (all_prefixes);
12256 i++)
12257 (*info->fprintf_func) (info->stream, "%s",
12258 prefix_name (all_prefixes[i], sizeflag));
12259 return 1;
12260 }
252b5132
RH
12261
12262 insn_codep = codep;
12263
12264 FETCH_DATA (info, codep + 1);
12265 two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
12266
3e7d61b2 12267 if (((prefixes & PREFIX_FWAIT)
f16cd0d5 12268 && ((*codep < 0xd8) || (*codep > 0xdf))))
252b5132 12269 {
f16cd0d5 12270 (*info->fprintf_func) (info->stream, "fwait");
7d421014 12271 return 1;
252b5132
RH
12272 }
12273
eec0f4ca 12274 op = 0;
c1e679ec 12275
252b5132
RH
12276 if (*codep == 0x0f)
12277 {
eec0f4ca 12278 unsigned char threebyte;
252b5132 12279 FETCH_DATA (info, codep + 2);
eec0f4ca
L
12280 threebyte = *++codep;
12281 dp = &dis386_twobyte[threebyte];
252b5132 12282 need_modrm = twobyte_has_modrm[*codep];
eec0f4ca 12283 codep++;
252b5132
RH
12284 }
12285 else
12286 {
6439fc28 12287 dp = &dis386[*codep];
252b5132 12288 need_modrm = onebyte_has_modrm[*codep];
eec0f4ca 12289 codep++;
252b5132 12290 }
246c51aa 12291
b844680a 12292 if ((prefixes & PREFIX_REPZ))
f16cd0d5 12293 used_prefixes |= PREFIX_REPZ;
b844680a 12294 if ((prefixes & PREFIX_REPNZ))
f16cd0d5 12295 used_prefixes |= PREFIX_REPNZ;
b844680a 12296 if ((prefixes & PREFIX_LOCK))
f16cd0d5 12297 used_prefixes |= PREFIX_LOCK;
c608c12e 12298
f16cd0d5 12299 default_prefixes = 0;
c608c12e
AM
12300 if (prefixes & PREFIX_ADDR)
12301 {
12302 sizeflag ^= AFLAG;
ce518a5f 12303 if (dp->op[2].bytemode != loop_jcxz_mode || intel_syntax)
3ffd33cf 12304 {
cb712a9e 12305 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
f16cd0d5 12306 all_prefixes[last_addr_prefix] = ADDR32_PREFIX;
3ffd33cf 12307 else
f16cd0d5
L
12308 all_prefixes[last_addr_prefix] = ADDR16_PREFIX;
12309 default_prefixes |= PREFIX_ADDR;
3ffd33cf
AM
12310 }
12311 }
12312
b844680a 12313 if ((prefixes & PREFIX_DATA))
3ffd33cf
AM
12314 {
12315 sizeflag ^= DFLAG;
ce518a5f
L
12316 if (dp->op[2].bytemode == cond_jump_mode
12317 && dp->op[0].bytemode == v_mode
6439fc28 12318 && !intel_syntax)
3ffd33cf
AM
12319 {
12320 if (sizeflag & DFLAG)
f16cd0d5 12321 all_prefixes[last_data_prefix] = DATA32_PREFIX;
3ffd33cf 12322 else
f16cd0d5
L
12323 all_prefixes[last_data_prefix] = DATA16_PREFIX;
12324 default_prefixes |= PREFIX_DATA;
12325 }
12326 else if (rex & REX_W)
12327 {
12328 /* REX_W will override PREFIX_DATA. */
12329 default_prefixes |= PREFIX_DATA;
3ffd33cf
AM
12330 }
12331 }
12332
8bb15339 12333 if (need_modrm)
252b5132
RH
12334 {
12335 FETCH_DATA (info, codep + 1);
7967e09e
L
12336 modrm.mod = (*codep >> 6) & 3;
12337 modrm.reg = (*codep >> 3) & 7;
12338 modrm.rm = *codep & 7;
252b5132
RH
12339 }
12340
55b126d4
L
12341 need_vex = 0;
12342 need_vex_reg = 0;
12343 vex_w_done = 0;
12344
ce518a5f 12345 if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
252b5132
RH
12346 {
12347 dofloat (sizeflag);
12348 }
12349 else
12350 {
8bb15339 12351 dp = get_valid_dis386 (dp, info);
b844680a 12352 if (dp != NULL && putop (dp->name, sizeflag) == 0)
ce518a5f
L
12353 {
12354 for (i = 0; i < MAX_OPERANDS; ++i)
12355 {
246c51aa 12356 obufp = op_out[i];
ce518a5f
L
12357 op_ad = MAX_OPERANDS - 1 - i;
12358 if (dp->op[i].rtn)
12359 (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
12360 }
6439fc28 12361 }
252b5132
RH
12362 }
12363
7d421014
ILT
12364 /* See if any prefixes were not used. If so, print the first one
12365 separately. If we don't do this, we'll wind up printing an
12366 instruction stream which does not precisely correspond to the
12367 bytes we are disassembling. */
f16cd0d5 12368 if ((prefixes & ~(used_prefixes | default_prefixes)) != 0)
7d421014 12369 {
f16cd0d5
L
12370 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
12371 if (all_prefixes[i])
12372 {
12373 const char *name;
12374 name = prefix_name (all_prefixes[i], priv.orig_sizeflag);
12375 if (name == NULL)
12376 name = INTERNAL_DISASSEMBLER_ERROR;
12377 (*info->fprintf_func) (info->stream, "%s", name);
12378 return 1;
12379 }
52b15da3 12380 }
7d421014 12381
d869730d 12382 /* Check if the REX prefix is used. */
2a70cca4 12383 if (rex_ignored == 0 && (rex ^ rex_used) == 0)
f16cd0d5
L
12384 all_prefixes[last_rex_prefix] = 0;
12385
5e6718e4 12386 /* Check if the SEG prefix is used. */
f16cd0d5
L
12387 if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
12388 | PREFIX_FS | PREFIX_GS)) != 0
12389 && (used_prefixes
12390 & seg_prefix (all_prefixes[last_seg_prefix])) != 0)
12391 all_prefixes[last_seg_prefix] = 0;
12392
5e6718e4 12393 /* Check if the ADDR prefix is used. */
f16cd0d5
L
12394 if ((prefixes & PREFIX_ADDR) != 0
12395 && (used_prefixes & PREFIX_ADDR) != 0)
12396 all_prefixes[last_addr_prefix] = 0;
12397
5e6718e4 12398 /* Check if the DATA prefix is used. */
f16cd0d5
L
12399 if ((prefixes & PREFIX_DATA) != 0
12400 && (used_prefixes & PREFIX_DATA) != 0)
12401 all_prefixes[last_data_prefix] = 0;
12402
12403 prefix_length = 0;
f310f33d 12404 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
f16cd0d5
L
12405 if (all_prefixes[i])
12406 {
12407 const char *name;
12408 name = prefix_name (all_prefixes[i], sizeflag);
12409 if (name == NULL)
12410 abort ();
12411 prefix_length += strlen (name) + 1;
12412 (*info->fprintf_func) (info->stream, "%s ", name);
12413 }
b844680a 12414
f16cd0d5
L
12415 /* Check maximum code length. */
12416 if ((codep - start_codep) > MAX_CODE_LENGTH)
12417 {
12418 (*info->fprintf_func) (info->stream, "(bad)");
12419 return MAX_CODE_LENGTH;
12420 }
b844680a 12421
ea397f5b 12422 obufp = mnemonicendp;
f16cd0d5 12423 for (i = strlen (obuf) + prefix_length; i < 6; i++)
252b5132
RH
12424 oappend (" ");
12425 oappend (" ");
12426 (*info->fprintf_func) (info->stream, "%s", obuf);
12427
12428 /* The enter and bound instructions are printed with operands in the same
12429 order as the intel book; everything else is printed in reverse order. */
2da11e11 12430 if (intel_syntax || two_source_ops)
252b5132 12431 {
185b1163
L
12432 bfd_vma riprel;
12433
ce518a5f
L
12434 for (i = 0; i < MAX_OPERANDS; ++i)
12435 op_txt[i] = op_out[i];
246c51aa 12436
ce518a5f
L
12437 for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
12438 {
12439 op_ad = op_index[i];
12440 op_index[i] = op_index[MAX_OPERANDS - 1 - i];
12441 op_index[MAX_OPERANDS - 1 - i] = op_ad;
185b1163
L
12442 riprel = op_riprel[i];
12443 op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
12444 op_riprel[MAX_OPERANDS - 1 - i] = riprel;
ce518a5f 12445 }
252b5132
RH
12446 }
12447 else
12448 {
ce518a5f
L
12449 for (i = 0; i < MAX_OPERANDS; ++i)
12450 op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
050dfa73
MM
12451 }
12452
ce518a5f
L
12453 needcomma = 0;
12454 for (i = 0; i < MAX_OPERANDS; ++i)
12455 if (*op_txt[i])
12456 {
12457 if (needcomma)
12458 (*info->fprintf_func) (info->stream, ",");
12459 if (op_index[i] != -1 && !op_riprel[i])
12460 (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
12461 else
12462 (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
12463 needcomma = 1;
12464 }
050dfa73 12465
ce518a5f 12466 for (i = 0; i < MAX_OPERANDS; i++)
52b15da3
JH
12467 if (op_index[i] != -1 && op_riprel[i])
12468 {
12469 (*info->fprintf_func) (info->stream, " # ");
12470 (*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
12471 + op_address[op_index[i]]), info);
185b1163 12472 break;
52b15da3 12473 }
e396998b 12474 return codep - priv.the_buffer;
252b5132
RH
12475}
12476
6439fc28 12477static const char *float_mem[] = {
252b5132 12478 /* d8 */
7c52e0e8
L
12479 "fadd{s|}",
12480 "fmul{s|}",
12481 "fcom{s|}",
12482 "fcomp{s|}",
12483 "fsub{s|}",
12484 "fsubr{s|}",
12485 "fdiv{s|}",
12486 "fdivr{s|}",
db6eb5be 12487 /* d9 */
7c52e0e8 12488 "fld{s|}",
252b5132 12489 "(bad)",
7c52e0e8
L
12490 "fst{s|}",
12491 "fstp{s|}",
9306ca4a 12492 "fldenvIC",
252b5132 12493 "fldcw",
9306ca4a 12494 "fNstenvIC",
252b5132
RH
12495 "fNstcw",
12496 /* da */
7c52e0e8
L
12497 "fiadd{l|}",
12498 "fimul{l|}",
12499 "ficom{l|}",
12500 "ficomp{l|}",
12501 "fisub{l|}",
12502 "fisubr{l|}",
12503 "fidiv{l|}",
12504 "fidivr{l|}",
252b5132 12505 /* db */
7c52e0e8
L
12506 "fild{l|}",
12507 "fisttp{l|}",
12508 "fist{l|}",
12509 "fistp{l|}",
252b5132 12510 "(bad)",
6439fc28 12511 "fld{t||t|}",
252b5132 12512 "(bad)",
6439fc28 12513 "fstp{t||t|}",
252b5132 12514 /* dc */
7c52e0e8
L
12515 "fadd{l|}",
12516 "fmul{l|}",
12517 "fcom{l|}",
12518 "fcomp{l|}",
12519 "fsub{l|}",
12520 "fsubr{l|}",
12521 "fdiv{l|}",
12522 "fdivr{l|}",
252b5132 12523 /* dd */
7c52e0e8
L
12524 "fld{l|}",
12525 "fisttp{ll|}",
12526 "fst{l||}",
12527 "fstp{l|}",
9306ca4a 12528 "frstorIC",
252b5132 12529 "(bad)",
9306ca4a 12530 "fNsaveIC",
252b5132
RH
12531 "fNstsw",
12532 /* de */
12533 "fiadd",
12534 "fimul",
12535 "ficom",
12536 "ficomp",
12537 "fisub",
12538 "fisubr",
12539 "fidiv",
12540 "fidivr",
12541 /* df */
12542 "fild",
ca164297 12543 "fisttp",
252b5132
RH
12544 "fist",
12545 "fistp",
12546 "fbld",
7c52e0e8 12547 "fild{ll|}",
252b5132 12548 "fbstp",
7c52e0e8 12549 "fistp{ll|}",
1d9f512f
AM
12550};
12551
12552static const unsigned char float_mem_mode[] = {
12553 /* d8 */
12554 d_mode,
12555 d_mode,
12556 d_mode,
12557 d_mode,
12558 d_mode,
12559 d_mode,
12560 d_mode,
12561 d_mode,
12562 /* d9 */
12563 d_mode,
12564 0,
12565 d_mode,
12566 d_mode,
12567 0,
12568 w_mode,
12569 0,
12570 w_mode,
12571 /* da */
12572 d_mode,
12573 d_mode,
12574 d_mode,
12575 d_mode,
12576 d_mode,
12577 d_mode,
12578 d_mode,
12579 d_mode,
12580 /* db */
12581 d_mode,
12582 d_mode,
12583 d_mode,
12584 d_mode,
12585 0,
9306ca4a 12586 t_mode,
1d9f512f 12587 0,
9306ca4a 12588 t_mode,
1d9f512f
AM
12589 /* dc */
12590 q_mode,
12591 q_mode,
12592 q_mode,
12593 q_mode,
12594 q_mode,
12595 q_mode,
12596 q_mode,
12597 q_mode,
12598 /* dd */
12599 q_mode,
12600 q_mode,
12601 q_mode,
12602 q_mode,
12603 0,
12604 0,
12605 0,
12606 w_mode,
12607 /* de */
12608 w_mode,
12609 w_mode,
12610 w_mode,
12611 w_mode,
12612 w_mode,
12613 w_mode,
12614 w_mode,
12615 w_mode,
12616 /* df */
12617 w_mode,
12618 w_mode,
12619 w_mode,
12620 w_mode,
9306ca4a 12621 t_mode,
1d9f512f 12622 q_mode,
9306ca4a 12623 t_mode,
1d9f512f 12624 q_mode
252b5132
RH
12625};
12626
ce518a5f
L
12627#define ST { OP_ST, 0 }
12628#define STi { OP_STi, 0 }
252b5132 12629
4efba78c
L
12630#define FGRPd9_2 NULL, { { NULL, 0 } }
12631#define FGRPd9_4 NULL, { { NULL, 1 } }
12632#define FGRPd9_5 NULL, { { NULL, 2 } }
12633#define FGRPd9_6 NULL, { { NULL, 3 } }
12634#define FGRPd9_7 NULL, { { NULL, 4 } }
12635#define FGRPda_5 NULL, { { NULL, 5 } }
12636#define FGRPdb_4 NULL, { { NULL, 6 } }
12637#define FGRPde_3 NULL, { { NULL, 7 } }
12638#define FGRPdf_4 NULL, { { NULL, 8 } }
252b5132 12639
2da11e11 12640static const struct dis386 float_reg[][8] = {
252b5132
RH
12641 /* d8 */
12642 {
ce518a5f
L
12643 { "fadd", { ST, STi } },
12644 { "fmul", { ST, STi } },
12645 { "fcom", { STi } },
12646 { "fcomp", { STi } },
12647 { "fsub", { ST, STi } },
12648 { "fsubr", { ST, STi } },
12649 { "fdiv", { ST, STi } },
12650 { "fdivr", { ST, STi } },
252b5132
RH
12651 },
12652 /* d9 */
12653 {
ce518a5f
L
12654 { "fld", { STi } },
12655 { "fxch", { STi } },
252b5132 12656 { FGRPd9_2 },
ce518a5f 12657 { "(bad)", { XX } },
252b5132
RH
12658 { FGRPd9_4 },
12659 { FGRPd9_5 },
12660 { FGRPd9_6 },
12661 { FGRPd9_7 },
12662 },
12663 /* da */
12664 {
ce518a5f
L
12665 { "fcmovb", { ST, STi } },
12666 { "fcmove", { ST, STi } },
12667 { "fcmovbe",{ ST, STi } },
12668 { "fcmovu", { ST, STi } },
12669 { "(bad)", { XX } },
252b5132 12670 { FGRPda_5 },
ce518a5f
L
12671 { "(bad)", { XX } },
12672 { "(bad)", { XX } },
252b5132
RH
12673 },
12674 /* db */
12675 {
ce518a5f
L
12676 { "fcmovnb",{ ST, STi } },
12677 { "fcmovne",{ ST, STi } },
12678 { "fcmovnbe",{ ST, STi } },
12679 { "fcmovnu",{ ST, STi } },
252b5132 12680 { FGRPdb_4 },
ce518a5f
L
12681 { "fucomi", { ST, STi } },
12682 { "fcomi", { ST, STi } },
12683 { "(bad)", { XX } },
252b5132
RH
12684 },
12685 /* dc */
12686 {
ce518a5f
L
12687 { "fadd", { STi, ST } },
12688 { "fmul", { STi, ST } },
12689 { "(bad)", { XX } },
12690 { "(bad)", { XX } },
9d141669
L
12691 { "fsub!M", { STi, ST } },
12692 { "fsubM", { STi, ST } },
12693 { "fdiv!M", { STi, ST } },
12694 { "fdivM", { STi, ST } },
252b5132
RH
12695 },
12696 /* dd */
12697 {
ce518a5f
L
12698 { "ffree", { STi } },
12699 { "(bad)", { XX } },
12700 { "fst", { STi } },
12701 { "fstp", { STi } },
12702 { "fucom", { STi } },
12703 { "fucomp", { STi } },
12704 { "(bad)", { XX } },
12705 { "(bad)", { XX } },
252b5132
RH
12706 },
12707 /* de */
12708 {
ce518a5f
L
12709 { "faddp", { STi, ST } },
12710 { "fmulp", { STi, ST } },
12711 { "(bad)", { XX } },
252b5132 12712 { FGRPde_3 },
9d141669
L
12713 { "fsub!Mp", { STi, ST } },
12714 { "fsubMp", { STi, ST } },
12715 { "fdiv!Mp", { STi, ST } },
12716 { "fdivMp", { STi, ST } },
252b5132
RH
12717 },
12718 /* df */
12719 {
ce518a5f
L
12720 { "ffreep", { STi } },
12721 { "(bad)", { XX } },
12722 { "(bad)", { XX } },
12723 { "(bad)", { XX } },
252b5132 12724 { FGRPdf_4 },
ce518a5f
L
12725 { "fucomip", { ST, STi } },
12726 { "fcomip", { ST, STi } },
12727 { "(bad)", { XX } },
252b5132
RH
12728 },
12729};
12730
252b5132
RH
12731static char *fgrps[][8] = {
12732 /* d9_2 0 */
12733 {
12734 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12735 },
12736
12737 /* d9_4 1 */
12738 {
12739 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
12740 },
12741
12742 /* d9_5 2 */
12743 {
12744 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
12745 },
12746
12747 /* d9_6 3 */
12748 {
12749 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
12750 },
12751
12752 /* d9_7 4 */
12753 {
12754 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
12755 },
12756
12757 /* da_5 5 */
12758 {
12759 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12760 },
12761
12762 /* db_4 6 */
12763 {
309d3373
JB
12764 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
12765 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
252b5132
RH
12766 },
12767
12768 /* de_3 7 */
12769 {
12770 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12771 },
12772
12773 /* df_4 8 */
12774 {
12775 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12776 },
12777};
12778
b6169b20
L
12779static void
12780swap_operand (void)
12781{
12782 mnemonicendp[0] = '.';
12783 mnemonicendp[1] = 's';
12784 mnemonicendp += 2;
12785}
12786
b844680a
L
12787static void
12788OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
12789 int sizeflag ATTRIBUTE_UNUSED)
12790{
12791 /* Skip mod/rm byte. */
12792 MODRM_CHECK;
12793 codep++;
12794}
12795
252b5132 12796static void
26ca5450 12797dofloat (int sizeflag)
252b5132 12798{
2da11e11 12799 const struct dis386 *dp;
252b5132
RH
12800 unsigned char floatop;
12801
12802 floatop = codep[-1];
12803
7967e09e 12804 if (modrm.mod != 3)
252b5132 12805 {
7967e09e 12806 int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
1d9f512f
AM
12807
12808 putop (float_mem[fp_indx], sizeflag);
ce518a5f 12809 obufp = op_out[0];
6e50d963 12810 op_ad = 2;
1d9f512f 12811 OP_E (float_mem_mode[fp_indx], sizeflag);
252b5132
RH
12812 return;
12813 }
6608db57 12814 /* Skip mod/rm byte. */
4bba6815 12815 MODRM_CHECK;
252b5132
RH
12816 codep++;
12817
7967e09e 12818 dp = &float_reg[floatop - 0xd8][modrm.reg];
252b5132
RH
12819 if (dp->name == NULL)
12820 {
7967e09e 12821 putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
252b5132 12822
6608db57 12823 /* Instruction fnstsw is only one with strange arg. */
252b5132 12824 if (floatop == 0xdf && codep[-1] == 0xe0)
ce518a5f 12825 strcpy (op_out[0], names16[0]);
252b5132
RH
12826 }
12827 else
12828 {
12829 putop (dp->name, sizeflag);
12830
ce518a5f 12831 obufp = op_out[0];
6e50d963 12832 op_ad = 2;
ce518a5f
L
12833 if (dp->op[0].rtn)
12834 (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
6e50d963 12835
ce518a5f 12836 obufp = op_out[1];
6e50d963 12837 op_ad = 1;
ce518a5f
L
12838 if (dp->op[1].rtn)
12839 (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
252b5132
RH
12840 }
12841}
12842
252b5132 12843static void
26ca5450 12844OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12845{
422673a9 12846 oappend ("%st" + intel_syntax);
252b5132
RH
12847}
12848
252b5132 12849static void
26ca5450 12850OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 12851{
7967e09e 12852 sprintf (scratchbuf, "%%st(%d)", modrm.rm);
d708bcba 12853 oappend (scratchbuf + intel_syntax);
252b5132
RH
12854}
12855
6608db57 12856/* Capital letters in template are macros. */
6439fc28 12857static int
d3ce72d0 12858putop (const char *in_template, int sizeflag)
252b5132 12859{
2da11e11 12860 const char *p;
9306ca4a 12861 int alt = 0;
9d141669 12862 int cond = 1;
98b528ac
L
12863 unsigned int l = 0, len = 1;
12864 char last[4];
12865
12866#define SAVE_LAST(c) \
12867 if (l < len && l < sizeof (last)) \
12868 last[l++] = c; \
12869 else \
12870 abort ();
252b5132 12871
d3ce72d0 12872 for (p = in_template; *p; p++)
252b5132
RH
12873 {
12874 switch (*p)
12875 {
12876 default:
12877 *obufp++ = *p;
12878 break;
98b528ac
L
12879 case '%':
12880 len++;
12881 break;
9d141669
L
12882 case '!':
12883 cond = 0;
12884 break;
6439fc28
AM
12885 case '{':
12886 alt = 0;
12887 if (intel_syntax)
6439fc28
AM
12888 {
12889 while (*++p != '|')
7c52e0e8
L
12890 if (*p == '}' || *p == '\0')
12891 abort ();
6439fc28 12892 }
9306ca4a
JB
12893 /* Fall through. */
12894 case 'I':
12895 alt = 1;
12896 continue;
6439fc28
AM
12897 case '|':
12898 while (*++p != '}')
12899 {
12900 if (*p == '\0')
12901 abort ();
12902 }
12903 break;
12904 case '}':
12905 break;
252b5132 12906 case 'A':
db6eb5be
AM
12907 if (intel_syntax)
12908 break;
7967e09e 12909 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
252b5132
RH
12910 *obufp++ = 'b';
12911 break;
12912 case 'B':
4b06377f
L
12913 if (l == 0 && len == 1)
12914 {
12915case_B:
12916 if (intel_syntax)
12917 break;
12918 if (sizeflag & SUFFIX_ALWAYS)
12919 *obufp++ = 'b';
12920 }
12921 else
12922 {
12923 if (l != 1
12924 || len != 2
12925 || last[0] != 'L')
12926 {
12927 SAVE_LAST (*p);
12928 break;
12929 }
12930
12931 if (address_mode == mode_64bit
12932 && !(prefixes & PREFIX_ADDR))
12933 {
12934 *obufp++ = 'a';
12935 *obufp++ = 'b';
12936 *obufp++ = 's';
12937 }
12938
12939 goto case_B;
12940 }
252b5132 12941 break;
9306ca4a
JB
12942 case 'C':
12943 if (intel_syntax && !alt)
12944 break;
12945 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
12946 {
12947 if (sizeflag & DFLAG)
12948 *obufp++ = intel_syntax ? 'd' : 'l';
12949 else
12950 *obufp++ = intel_syntax ? 'w' : 's';
12951 used_prefixes |= (prefixes & PREFIX_DATA);
12952 }
12953 break;
ed7841b3
JB
12954 case 'D':
12955 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
12956 break;
161a04f6 12957 USED_REX (REX_W);
7967e09e 12958 if (modrm.mod == 3)
ed7841b3 12959 {
161a04f6 12960 if (rex & REX_W)
ed7841b3 12961 *obufp++ = 'q';
ed7841b3 12962 else
f16cd0d5
L
12963 {
12964 if (sizeflag & DFLAG)
12965 *obufp++ = intel_syntax ? 'd' : 'l';
12966 else
12967 *obufp++ = 'w';
12968 used_prefixes |= (prefixes & PREFIX_DATA);
12969 }
ed7841b3
JB
12970 }
12971 else
12972 *obufp++ = 'w';
12973 break;
252b5132 12974 case 'E': /* For jcxz/jecxz */
cb712a9e 12975 if (address_mode == mode_64bit)
c1a64871
JH
12976 {
12977 if (sizeflag & AFLAG)
12978 *obufp++ = 'r';
12979 else
12980 *obufp++ = 'e';
12981 }
12982 else
12983 if (sizeflag & AFLAG)
12984 *obufp++ = 'e';
3ffd33cf
AM
12985 used_prefixes |= (prefixes & PREFIX_ADDR);
12986 break;
12987 case 'F':
db6eb5be
AM
12988 if (intel_syntax)
12989 break;
e396998b 12990 if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
3ffd33cf
AM
12991 {
12992 if (sizeflag & AFLAG)
cb712a9e 12993 *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
3ffd33cf 12994 else
cb712a9e 12995 *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
3ffd33cf
AM
12996 used_prefixes |= (prefixes & PREFIX_ADDR);
12997 }
252b5132 12998 break;
52fd6d94
JB
12999 case 'G':
13000 if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
13001 break;
161a04f6 13002 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
13003 *obufp++ = 'l';
13004 else
13005 *obufp++ = 'w';
161a04f6 13006 if (!(rex & REX_W))
52fd6d94
JB
13007 used_prefixes |= (prefixes & PREFIX_DATA);
13008 break;
5dd0794d 13009 case 'H':
db6eb5be
AM
13010 if (intel_syntax)
13011 break;
5dd0794d
AM
13012 if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
13013 || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
13014 {
13015 used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
13016 *obufp++ = ',';
13017 *obufp++ = 'p';
13018 if (prefixes & PREFIX_DS)
13019 *obufp++ = 't';
13020 else
13021 *obufp++ = 'n';
13022 }
13023 break;
9306ca4a
JB
13024 case 'J':
13025 if (intel_syntax)
13026 break;
13027 *obufp++ = 'l';
13028 break;
42903f7f
L
13029 case 'K':
13030 USED_REX (REX_W);
13031 if (rex & REX_W)
13032 *obufp++ = 'q';
13033 else
13034 *obufp++ = 'd';
13035 break;
6dd5059a
L
13036 case 'Z':
13037 if (intel_syntax)
13038 break;
13039 if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
13040 {
13041 *obufp++ = 'q';
13042 break;
13043 }
13044 /* Fall through. */
98b528ac 13045 goto case_L;
252b5132 13046 case 'L':
98b528ac
L
13047 if (l != 0 || len != 1)
13048 {
13049 SAVE_LAST (*p);
13050 break;
13051 }
13052case_L:
db6eb5be
AM
13053 if (intel_syntax)
13054 break;
252b5132
RH
13055 if (sizeflag & SUFFIX_ALWAYS)
13056 *obufp++ = 'l';
252b5132 13057 break;
9d141669
L
13058 case 'M':
13059 if (intel_mnemonic != cond)
13060 *obufp++ = 'r';
13061 break;
252b5132
RH
13062 case 'N':
13063 if ((prefixes & PREFIX_FWAIT) == 0)
13064 *obufp++ = 'n';
7d421014
ILT
13065 else
13066 used_prefixes |= PREFIX_FWAIT;
252b5132 13067 break;
52b15da3 13068 case 'O':
161a04f6
L
13069 USED_REX (REX_W);
13070 if (rex & REX_W)
6439fc28 13071 *obufp++ = 'o';
a35ca55a
JB
13072 else if (intel_syntax && (sizeflag & DFLAG))
13073 *obufp++ = 'q';
52b15da3
JH
13074 else
13075 *obufp++ = 'd';
161a04f6 13076 if (!(rex & REX_W))
a35ca55a 13077 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 13078 break;
6439fc28 13079 case 'T':
db6eb5be
AM
13080 if (intel_syntax)
13081 break;
cb712a9e 13082 if (address_mode == mode_64bit && (sizeflag & DFLAG))
6439fc28
AM
13083 {
13084 *obufp++ = 'q';
13085 break;
13086 }
6608db57 13087 /* Fall through. */
252b5132 13088 case 'P':
db6eb5be
AM
13089 if (intel_syntax)
13090 break;
252b5132 13091 if ((prefixes & PREFIX_DATA)
161a04f6 13092 || (rex & REX_W)
e396998b 13093 || (sizeflag & SUFFIX_ALWAYS))
252b5132 13094 {
161a04f6
L
13095 USED_REX (REX_W);
13096 if (rex & REX_W)
52b15da3 13097 *obufp++ = 'q';
c2419411 13098 else
52b15da3
JH
13099 {
13100 if (sizeflag & DFLAG)
13101 *obufp++ = 'l';
13102 else
13103 *obufp++ = 'w';
f16cd0d5 13104 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 13105 }
252b5132
RH
13106 }
13107 break;
6439fc28 13108 case 'U':
db6eb5be
AM
13109 if (intel_syntax)
13110 break;
cb712a9e 13111 if (address_mode == mode_64bit && (sizeflag & DFLAG))
6439fc28 13112 {
7967e09e 13113 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
1a114b12 13114 *obufp++ = 'q';
6439fc28
AM
13115 break;
13116 }
6608db57 13117 /* Fall through. */
98b528ac 13118 goto case_Q;
252b5132 13119 case 'Q':
98b528ac 13120 if (l == 0 && len == 1)
252b5132 13121 {
98b528ac
L
13122case_Q:
13123 if (intel_syntax && !alt)
13124 break;
13125 USED_REX (REX_W);
13126 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
52b15da3 13127 {
98b528ac
L
13128 if (rex & REX_W)
13129 *obufp++ = 'q';
52b15da3 13130 else
98b528ac
L
13131 {
13132 if (sizeflag & DFLAG)
13133 *obufp++ = intel_syntax ? 'd' : 'l';
13134 else
13135 *obufp++ = 'w';
f16cd0d5 13136 used_prefixes |= (prefixes & PREFIX_DATA);
98b528ac 13137 }
52b15da3 13138 }
98b528ac
L
13139 }
13140 else
13141 {
13142 if (l != 1 || len != 2 || last[0] != 'L')
13143 {
13144 SAVE_LAST (*p);
13145 break;
13146 }
13147 if (intel_syntax
13148 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
13149 break;
13150 if ((rex & REX_W))
13151 {
13152 USED_REX (REX_W);
13153 *obufp++ = 'q';
13154 }
13155 else
13156 *obufp++ = 'l';
252b5132
RH
13157 }
13158 break;
13159 case 'R':
161a04f6
L
13160 USED_REX (REX_W);
13161 if (rex & REX_W)
a35ca55a
JB
13162 *obufp++ = 'q';
13163 else if (sizeflag & DFLAG)
c608c12e 13164 {
a35ca55a 13165 if (intel_syntax)
c608c12e 13166 *obufp++ = 'd';
c608c12e 13167 else
a35ca55a 13168 *obufp++ = 'l';
c608c12e 13169 }
252b5132 13170 else
a35ca55a
JB
13171 *obufp++ = 'w';
13172 if (intel_syntax && !p[1]
161a04f6 13173 && ((rex & REX_W) || (sizeflag & DFLAG)))
a35ca55a 13174 *obufp++ = 'e';
161a04f6 13175 if (!(rex & REX_W))
52b15da3 13176 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132 13177 break;
1a114b12 13178 case 'V':
4b06377f 13179 if (l == 0 && len == 1)
1a114b12 13180 {
4b06377f
L
13181 if (intel_syntax)
13182 break;
13183 if (address_mode == mode_64bit && (sizeflag & DFLAG))
13184 {
13185 if (sizeflag & SUFFIX_ALWAYS)
13186 *obufp++ = 'q';
13187 break;
13188 }
13189 }
13190 else
13191 {
13192 if (l != 1
13193 || len != 2
13194 || last[0] != 'L')
13195 {
13196 SAVE_LAST (*p);
13197 break;
13198 }
13199
13200 if (rex & REX_W)
13201 {
13202 *obufp++ = 'a';
13203 *obufp++ = 'b';
13204 *obufp++ = 's';
13205 }
1a114b12
JB
13206 }
13207 /* Fall through. */
4b06377f 13208 goto case_S;
252b5132 13209 case 'S':
4b06377f 13210 if (l == 0 && len == 1)
252b5132 13211 {
4b06377f
L
13212case_S:
13213 if (intel_syntax)
13214 break;
13215 if (sizeflag & SUFFIX_ALWAYS)
52b15da3 13216 {
4b06377f
L
13217 if (rex & REX_W)
13218 *obufp++ = 'q';
52b15da3 13219 else
4b06377f
L
13220 {
13221 if (sizeflag & DFLAG)
13222 *obufp++ = 'l';
13223 else
13224 *obufp++ = 'w';
13225 used_prefixes |= (prefixes & PREFIX_DATA);
13226 }
13227 }
13228 }
13229 else
13230 {
13231 if (l != 1
13232 || len != 2
13233 || last[0] != 'L')
13234 {
13235 SAVE_LAST (*p);
13236 break;
52b15da3 13237 }
4b06377f
L
13238
13239 if (address_mode == mode_64bit
13240 && !(prefixes & PREFIX_ADDR))
13241 {
13242 *obufp++ = 'a';
13243 *obufp++ = 'b';
13244 *obufp++ = 's';
13245 }
13246
13247 goto case_S;
252b5132 13248 }
252b5132 13249 break;
041bd2e0 13250 case 'X':
c0f3af97
L
13251 if (l != 0 || len != 1)
13252 {
13253 SAVE_LAST (*p);
13254 break;
13255 }
13256 if (need_vex && vex.prefix)
13257 {
13258 if (vex.prefix == DATA_PREFIX_OPCODE)
13259 *obufp++ = 'd';
13260 else
13261 *obufp++ = 's';
13262 }
041bd2e0 13263 else
f16cd0d5
L
13264 {
13265 if (prefixes & PREFIX_DATA)
13266 *obufp++ = 'd';
13267 else
13268 *obufp++ = 's';
13269 used_prefixes |= (prefixes & PREFIX_DATA);
13270 }
041bd2e0 13271 break;
76f227a5 13272 case 'Y':
c0f3af97 13273 if (l == 0 && len == 1)
76f227a5 13274 {
c0f3af97
L
13275 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
13276 break;
13277 if (rex & REX_W)
13278 {
13279 USED_REX (REX_W);
13280 *obufp++ = 'q';
13281 }
13282 break;
13283 }
13284 else
13285 {
13286 if (l != 1 || len != 2 || last[0] != 'X')
13287 {
13288 SAVE_LAST (*p);
13289 break;
13290 }
13291 if (!need_vex)
13292 abort ();
13293 if (intel_syntax
13294 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
13295 break;
13296 switch (vex.length)
13297 {
13298 case 128:
13299 *obufp++ = 'x';
13300 break;
13301 case 256:
13302 *obufp++ = 'y';
13303 break;
13304 default:
13305 abort ();
13306 }
76f227a5
JH
13307 }
13308 break;
252b5132 13309 case 'W':
0bfee649 13310 if (l == 0 && len == 1)
a35ca55a 13311 {
0bfee649
L
13312 /* operand size flag for cwtl, cbtw */
13313 USED_REX (REX_W);
13314 if (rex & REX_W)
13315 {
13316 if (intel_syntax)
13317 *obufp++ = 'd';
13318 else
13319 *obufp++ = 'l';
13320 }
13321 else if (sizeflag & DFLAG)
13322 *obufp++ = 'w';
a35ca55a 13323 else
0bfee649
L
13324 *obufp++ = 'b';
13325 if (!(rex & REX_W))
13326 used_prefixes |= (prefixes & PREFIX_DATA);
a35ca55a 13327 }
252b5132 13328 else
0bfee649
L
13329 {
13330 if (l != 1 || len != 2 || last[0] != 'X')
13331 {
13332 SAVE_LAST (*p);
13333 break;
13334 }
13335 if (!need_vex)
13336 abort ();
13337 *obufp++ = vex.w ? 'd': 's';
13338 }
252b5132
RH
13339 break;
13340 }
9306ca4a 13341 alt = 0;
252b5132
RH
13342 }
13343 *obufp = 0;
ea397f5b 13344 mnemonicendp = obufp;
6439fc28 13345 return 0;
252b5132
RH
13346}
13347
13348static void
26ca5450 13349oappend (const char *s)
252b5132 13350{
ea397f5b 13351 obufp = stpcpy (obufp, s);
252b5132
RH
13352}
13353
13354static void
26ca5450 13355append_seg (void)
252b5132
RH
13356{
13357 if (prefixes & PREFIX_CS)
7d421014 13358 {
7d421014 13359 used_prefixes |= PREFIX_CS;
d708bcba 13360 oappend ("%cs:" + intel_syntax);
7d421014 13361 }
252b5132 13362 if (prefixes & PREFIX_DS)
7d421014 13363 {
7d421014 13364 used_prefixes |= PREFIX_DS;
d708bcba 13365 oappend ("%ds:" + intel_syntax);
7d421014 13366 }
252b5132 13367 if (prefixes & PREFIX_SS)
7d421014 13368 {
7d421014 13369 used_prefixes |= PREFIX_SS;
d708bcba 13370 oappend ("%ss:" + intel_syntax);
7d421014 13371 }
252b5132 13372 if (prefixes & PREFIX_ES)
7d421014 13373 {
7d421014 13374 used_prefixes |= PREFIX_ES;
d708bcba 13375 oappend ("%es:" + intel_syntax);
7d421014 13376 }
252b5132 13377 if (prefixes & PREFIX_FS)
7d421014 13378 {
7d421014 13379 used_prefixes |= PREFIX_FS;
d708bcba 13380 oappend ("%fs:" + intel_syntax);
7d421014 13381 }
252b5132 13382 if (prefixes & PREFIX_GS)
7d421014 13383 {
7d421014 13384 used_prefixes |= PREFIX_GS;
d708bcba 13385 oappend ("%gs:" + intel_syntax);
7d421014 13386 }
252b5132
RH
13387}
13388
13389static void
26ca5450 13390OP_indirE (int bytemode, int sizeflag)
252b5132
RH
13391{
13392 if (!intel_syntax)
13393 oappend ("*");
13394 OP_E (bytemode, sizeflag);
13395}
13396
52b15da3 13397static void
26ca5450 13398print_operand_value (char *buf, int hex, bfd_vma disp)
52b15da3 13399{
cb712a9e 13400 if (address_mode == mode_64bit)
52b15da3
JH
13401 {
13402 if (hex)
13403 {
13404 char tmp[30];
13405 int i;
13406 buf[0] = '0';
13407 buf[1] = 'x';
13408 sprintf_vma (tmp, disp);
6608db57 13409 for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
52b15da3
JH
13410 strcpy (buf + 2, tmp + i);
13411 }
13412 else
13413 {
13414 bfd_signed_vma v = disp;
13415 char tmp[30];
13416 int i;
13417 if (v < 0)
13418 {
13419 *(buf++) = '-';
13420 v = -disp;
6608db57 13421 /* Check for possible overflow on 0x8000000000000000. */
52b15da3
JH
13422 if (v < 0)
13423 {
13424 strcpy (buf, "9223372036854775808");
13425 return;
13426 }
13427 }
13428 if (!v)
13429 {
13430 strcpy (buf, "0");
13431 return;
13432 }
13433
13434 i = 0;
13435 tmp[29] = 0;
13436 while (v)
13437 {
6608db57 13438 tmp[28 - i] = (v % 10) + '0';
52b15da3
JH
13439 v /= 10;
13440 i++;
13441 }
13442 strcpy (buf, tmp + 29 - i);
13443 }
13444 }
13445 else
13446 {
13447 if (hex)
13448 sprintf (buf, "0x%x", (unsigned int) disp);
13449 else
13450 sprintf (buf, "%d", (int) disp);
13451 }
13452}
13453
5d669648
L
13454/* Put DISP in BUF as signed hex number. */
13455
13456static void
13457print_displacement (char *buf, bfd_vma disp)
13458{
13459 bfd_signed_vma val = disp;
13460 char tmp[30];
13461 int i, j = 0;
13462
13463 if (val < 0)
13464 {
13465 buf[j++] = '-';
13466 val = -disp;
13467
13468 /* Check for possible overflow. */
13469 if (val < 0)
13470 {
13471 switch (address_mode)
13472 {
13473 case mode_64bit:
13474 strcpy (buf + j, "0x8000000000000000");
13475 break;
13476 case mode_32bit:
13477 strcpy (buf + j, "0x80000000");
13478 break;
13479 case mode_16bit:
13480 strcpy (buf + j, "0x8000");
13481 break;
13482 }
13483 return;
13484 }
13485 }
13486
13487 buf[j++] = '0';
13488 buf[j++] = 'x';
13489
0af1713e 13490 sprintf_vma (tmp, (bfd_vma) val);
5d669648
L
13491 for (i = 0; tmp[i] == '0'; i++)
13492 continue;
13493 if (tmp[i] == '\0')
13494 i--;
13495 strcpy (buf + j, tmp + i);
13496}
13497
3f31e633
JB
13498static void
13499intel_operand_size (int bytemode, int sizeflag)
13500{
13501 switch (bytemode)
13502 {
13503 case b_mode:
b6169b20 13504 case b_swap_mode:
42903f7f 13505 case dqb_mode:
3f31e633
JB
13506 oappend ("BYTE PTR ");
13507 break;
13508 case w_mode:
13509 case dqw_mode:
13510 oappend ("WORD PTR ");
13511 break;
1a114b12 13512 case stack_v_mode:
cb712a9e 13513 if (address_mode == mode_64bit && (sizeflag & DFLAG))
3f31e633
JB
13514 {
13515 oappend ("QWORD PTR ");
3f31e633
JB
13516 break;
13517 }
13518 /* FALLTHRU */
13519 case v_mode:
b6169b20 13520 case v_swap_mode:
3f31e633 13521 case dq_mode:
161a04f6
L
13522 USED_REX (REX_W);
13523 if (rex & REX_W)
3f31e633 13524 oappend ("QWORD PTR ");
3f31e633 13525 else
f16cd0d5
L
13526 {
13527 if ((sizeflag & DFLAG) || bytemode == dq_mode)
13528 oappend ("DWORD PTR ");
13529 else
13530 oappend ("WORD PTR ");
13531 used_prefixes |= (prefixes & PREFIX_DATA);
13532 }
3f31e633 13533 break;
52fd6d94 13534 case z_mode:
161a04f6 13535 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
13536 *obufp++ = 'D';
13537 oappend ("WORD PTR ");
161a04f6 13538 if (!(rex & REX_W))
52fd6d94
JB
13539 used_prefixes |= (prefixes & PREFIX_DATA);
13540 break;
34b772a6
JB
13541 case a_mode:
13542 if (sizeflag & DFLAG)
13543 oappend ("QWORD PTR ");
13544 else
13545 oappend ("DWORD PTR ");
13546 used_prefixes |= (prefixes & PREFIX_DATA);
13547 break;
3f31e633 13548 case d_mode:
fa99fab2 13549 case d_swap_mode:
42903f7f 13550 case dqd_mode:
3f31e633
JB
13551 oappend ("DWORD PTR ");
13552 break;
13553 case q_mode:
b6169b20 13554 case q_swap_mode:
3f31e633
JB
13555 oappend ("QWORD PTR ");
13556 break;
13557 case m_mode:
cb712a9e 13558 if (address_mode == mode_64bit)
3f31e633
JB
13559 oappend ("QWORD PTR ");
13560 else
13561 oappend ("DWORD PTR ");
13562 break;
13563 case f_mode:
13564 if (sizeflag & DFLAG)
13565 oappend ("FWORD PTR ");
13566 else
13567 oappend ("DWORD PTR ");
13568 used_prefixes |= (prefixes & PREFIX_DATA);
13569 break;
13570 case t_mode:
13571 oappend ("TBYTE PTR ");
13572 break;
13573 case x_mode:
b6169b20 13574 case x_swap_mode:
c0f3af97
L
13575 if (need_vex)
13576 {
13577 switch (vex.length)
13578 {
13579 case 128:
13580 oappend ("XMMWORD PTR ");
13581 break;
13582 case 256:
13583 oappend ("YMMWORD PTR ");
13584 break;
13585 default:
13586 abort ();
13587 }
13588 }
13589 else
13590 oappend ("XMMWORD PTR ");
13591 break;
13592 case xmm_mode:
3f31e633
JB
13593 oappend ("XMMWORD PTR ");
13594 break;
c0f3af97
L
13595 case xmmq_mode:
13596 if (!need_vex)
13597 abort ();
13598
13599 switch (vex.length)
13600 {
13601 case 128:
13602 oappend ("QWORD PTR ");
13603 break;
13604 case 256:
13605 oappend ("XMMWORD PTR ");
13606 break;
13607 default:
13608 abort ();
13609 }
13610 break;
13611 case ymmq_mode:
13612 if (!need_vex)
13613 abort ();
13614
13615 switch (vex.length)
13616 {
13617 case 128:
13618 oappend ("QWORD PTR ");
13619 break;
13620 case 256:
13621 oappend ("YMMWORD PTR ");
13622 break;
13623 default:
13624 abort ();
13625 }
13626 break;
fb9c77c7
L
13627 case o_mode:
13628 oappend ("OWORD PTR ");
13629 break;
0bfee649
L
13630 case vex_w_dq_mode:
13631 if (!need_vex)
13632 abort ();
13633
13634 if (vex.w)
13635 oappend ("QWORD PTR ");
13636 else
13637 oappend ("DWORD PTR ");
13638 break;
3f31e633
JB
13639 default:
13640 break;
13641 }
13642}
13643
252b5132 13644static void
c0f3af97 13645OP_E_register (int bytemode, int sizeflag)
252b5132 13646{
c0f3af97
L
13647 int reg = modrm.rm;
13648 const char **names;
252b5132 13649
c0f3af97
L
13650 USED_REX (REX_B);
13651 if ((rex & REX_B))
13652 reg += 8;
252b5132 13653
b6169b20
L
13654 if ((sizeflag & SUFFIX_ALWAYS)
13655 && (bytemode == b_swap_mode || bytemode == v_swap_mode))
13656 swap_operand ();
13657
c0f3af97 13658 switch (bytemode)
252b5132 13659 {
c0f3af97 13660 case b_mode:
b6169b20 13661 case b_swap_mode:
c0f3af97
L
13662 USED_REX (0);
13663 if (rex)
13664 names = names8rex;
13665 else
13666 names = names8;
13667 break;
13668 case w_mode:
13669 names = names16;
13670 break;
13671 case d_mode:
13672 names = names32;
13673 break;
13674 case q_mode:
13675 names = names64;
13676 break;
13677 case m_mode:
13678 names = address_mode == mode_64bit ? names64 : names32;
13679 break;
13680 case stack_v_mode:
13681 if (address_mode == mode_64bit && (sizeflag & DFLAG))
252b5132 13682 {
c0f3af97 13683 names = names64;
252b5132 13684 break;
252b5132 13685 }
c0f3af97
L
13686 bytemode = v_mode;
13687 /* FALLTHRU */
13688 case v_mode:
b6169b20 13689 case v_swap_mode:
c0f3af97
L
13690 case dq_mode:
13691 case dqb_mode:
13692 case dqd_mode:
13693 case dqw_mode:
13694 USED_REX (REX_W);
13695 if (rex & REX_W)
13696 names = names64;
c0f3af97 13697 else
f16cd0d5
L
13698 {
13699 if ((sizeflag & DFLAG)
13700 || (bytemode != v_mode
13701 && bytemode != v_swap_mode))
13702 names = names32;
13703 else
13704 names = names16;
13705 used_prefixes |= (prefixes & PREFIX_DATA);
13706 }
c0f3af97
L
13707 break;
13708 case 0:
13709 return;
13710 default:
13711 oappend (INTERNAL_DISASSEMBLER_ERROR);
252b5132
RH
13712 return;
13713 }
c0f3af97
L
13714 oappend (names[reg]);
13715}
13716
13717static void
c1e679ec 13718OP_E_memory (int bytemode, int sizeflag)
c0f3af97
L
13719{
13720 bfd_vma disp = 0;
13721 int add = (rex & REX_B) ? 8 : 0;
13722 int riprel = 0;
252b5132 13723
c0f3af97 13724 USED_REX (REX_B);
3f31e633
JB
13725 if (intel_syntax)
13726 intel_operand_size (bytemode, sizeflag);
252b5132
RH
13727 append_seg ();
13728
5d669648 13729 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132 13730 {
5d669648
L
13731 /* 32/64 bit address mode */
13732 int havedisp;
252b5132
RH
13733 int havesib;
13734 int havebase;
0f7da397 13735 int haveindex;
20afcfb7 13736 int needindex;
82c18208 13737 int base, rbase;
91d6fa6a 13738 int vindex = 0;
252b5132
RH
13739 int scale = 0;
13740
13741 havesib = 0;
13742 havebase = 1;
0f7da397 13743 haveindex = 0;
7967e09e 13744 base = modrm.rm;
252b5132
RH
13745
13746 if (base == 4)
13747 {
13748 havesib = 1;
13749 FETCH_DATA (the_info, codep + 1);
91d6fa6a 13750 vindex = (*codep >> 3) & 7;
db51cc60 13751 scale = (*codep >> 6) & 3;
252b5132 13752 base = *codep & 7;
161a04f6
L
13753 USED_REX (REX_X);
13754 if (rex & REX_X)
91d6fa6a
NC
13755 vindex += 8;
13756 haveindex = vindex != 4;
252b5132
RH
13757 codep++;
13758 }
82c18208 13759 rbase = base + add;
252b5132 13760
7967e09e 13761 switch (modrm.mod)
252b5132
RH
13762 {
13763 case 0:
82c18208 13764 if (base == 5)
252b5132
RH
13765 {
13766 havebase = 0;
cb712a9e 13767 if (address_mode == mode_64bit && !havesib)
52b15da3
JH
13768 riprel = 1;
13769 disp = get32s ();
252b5132
RH
13770 }
13771 break;
13772 case 1:
13773 FETCH_DATA (the_info, codep + 1);
13774 disp = *codep++;
13775 if ((disp & 0x80) != 0)
13776 disp -= 0x100;
13777 break;
13778 case 2:
52b15da3 13779 disp = get32s ();
252b5132
RH
13780 break;
13781 }
13782
20afcfb7
L
13783 /* In 32bit mode, we need index register to tell [offset] from
13784 [eiz*1 + offset]. */
13785 needindex = (havesib
13786 && !havebase
13787 && !haveindex
13788 && address_mode == mode_32bit);
13789 havedisp = (havebase
13790 || needindex
13791 || (havesib && (haveindex || scale != 0)));
5d669648 13792
252b5132 13793 if (!intel_syntax)
82c18208 13794 if (modrm.mod != 0 || base == 5)
db6eb5be 13795 {
5d669648
L
13796 if (havedisp || riprel)
13797 print_displacement (scratchbuf, disp);
13798 else
13799 print_operand_value (scratchbuf, 1, disp);
db6eb5be 13800 oappend (scratchbuf);
52b15da3
JH
13801 if (riprel)
13802 {
13803 set_op (disp, 1);
87767711 13804 oappend (sizeflag & AFLAG ? "(%rip)" : "(%eip)");
52b15da3 13805 }
db6eb5be 13806 }
2da11e11 13807
87767711
JB
13808 if (havebase || haveindex || riprel)
13809 used_prefixes |= PREFIX_ADDR;
13810
5d669648 13811 if (havedisp || (intel_syntax && riprel))
252b5132 13812 {
252b5132 13813 *obufp++ = open_char;
52b15da3 13814 if (intel_syntax && riprel)
185b1163
L
13815 {
13816 set_op (disp, 1);
87767711 13817 oappend (sizeflag & AFLAG ? "rip" : "eip");
185b1163 13818 }
db6eb5be 13819 *obufp = '\0';
252b5132 13820 if (havebase)
cb712a9e 13821 oappend (address_mode == mode_64bit && (sizeflag & AFLAG)
82c18208 13822 ? names64[rbase] : names32[rbase]);
252b5132
RH
13823 if (havesib)
13824 {
db51cc60
L
13825 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
13826 print index to tell base + index from base. */
13827 if (scale != 0
20afcfb7 13828 || needindex
db51cc60
L
13829 || haveindex
13830 || (havebase && base != ESP_REG_NUM))
252b5132 13831 {
9306ca4a 13832 if (!intel_syntax || havebase)
db6eb5be 13833 {
9306ca4a
JB
13834 *obufp++ = separator_char;
13835 *obufp = '\0';
db6eb5be 13836 }
db51cc60
L
13837 if (haveindex)
13838 oappend (address_mode == mode_64bit
13839 && (sizeflag & AFLAG)
91d6fa6a 13840 ? names64[vindex] : names32[vindex]);
db51cc60
L
13841 else
13842 oappend (address_mode == mode_64bit
13843 && (sizeflag & AFLAG)
13844 ? index64 : index32);
13845
db6eb5be
AM
13846 *obufp++ = scale_char;
13847 *obufp = '\0';
13848 sprintf (scratchbuf, "%d", 1 << scale);
13849 oappend (scratchbuf);
13850 }
252b5132 13851 }
185b1163 13852 if (intel_syntax
82c18208 13853 && (disp || modrm.mod != 0 || base == 5))
3d456fa1 13854 {
db51cc60 13855 if (!havedisp || (bfd_signed_vma) disp >= 0)
3d456fa1
JB
13856 {
13857 *obufp++ = '+';
13858 *obufp = '\0';
13859 }
05203043 13860 else if (modrm.mod != 1 && disp != -disp)
3d456fa1
JB
13861 {
13862 *obufp++ = '-';
13863 *obufp = '\0';
13864 disp = - (bfd_signed_vma) disp;
13865 }
13866
db51cc60
L
13867 if (havedisp)
13868 print_displacement (scratchbuf, disp);
13869 else
13870 print_operand_value (scratchbuf, 1, disp);
3d456fa1
JB
13871 oappend (scratchbuf);
13872 }
252b5132
RH
13873
13874 *obufp++ = close_char;
db6eb5be 13875 *obufp = '\0';
252b5132
RH
13876 }
13877 else if (intel_syntax)
db6eb5be 13878 {
82c18208 13879 if (modrm.mod != 0 || base == 5)
db6eb5be 13880 {
252b5132
RH
13881 if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
13882 | PREFIX_ES | PREFIX_FS | PREFIX_GS))
13883 ;
13884 else
13885 {
d708bcba 13886 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
13887 oappend (":");
13888 }
52b15da3 13889 print_operand_value (scratchbuf, 1, disp);
db6eb5be
AM
13890 oappend (scratchbuf);
13891 }
13892 }
252b5132
RH
13893 }
13894 else
f16cd0d5
L
13895 {
13896 /* 16 bit address mode */
13897 used_prefixes |= prefixes & PREFIX_ADDR;
7967e09e 13898 switch (modrm.mod)
252b5132
RH
13899 {
13900 case 0:
7967e09e 13901 if (modrm.rm == 6)
252b5132
RH
13902 {
13903 disp = get16 ();
13904 if ((disp & 0x8000) != 0)
13905 disp -= 0x10000;
13906 }
13907 break;
13908 case 1:
13909 FETCH_DATA (the_info, codep + 1);
13910 disp = *codep++;
13911 if ((disp & 0x80) != 0)
13912 disp -= 0x100;
13913 break;
13914 case 2:
13915 disp = get16 ();
13916 if ((disp & 0x8000) != 0)
13917 disp -= 0x10000;
13918 break;
13919 }
13920
13921 if (!intel_syntax)
7967e09e 13922 if (modrm.mod != 0 || modrm.rm == 6)
db6eb5be 13923 {
5d669648 13924 print_displacement (scratchbuf, disp);
db6eb5be
AM
13925 oappend (scratchbuf);
13926 }
252b5132 13927
7967e09e 13928 if (modrm.mod != 0 || modrm.rm != 6)
252b5132
RH
13929 {
13930 *obufp++ = open_char;
db6eb5be 13931 *obufp = '\0';
7967e09e 13932 oappend (index16[modrm.rm]);
5d669648
L
13933 if (intel_syntax
13934 && (disp || modrm.mod != 0 || modrm.rm == 6))
3d456fa1 13935 {
5d669648 13936 if ((bfd_signed_vma) disp >= 0)
3d456fa1
JB
13937 {
13938 *obufp++ = '+';
13939 *obufp = '\0';
13940 }
7967e09e 13941 else if (modrm.mod != 1)
3d456fa1
JB
13942 {
13943 *obufp++ = '-';
13944 *obufp = '\0';
13945 disp = - (bfd_signed_vma) disp;
13946 }
13947
5d669648 13948 print_displacement (scratchbuf, disp);
3d456fa1
JB
13949 oappend (scratchbuf);
13950 }
13951
db6eb5be
AM
13952 *obufp++ = close_char;
13953 *obufp = '\0';
252b5132 13954 }
3d456fa1
JB
13955 else if (intel_syntax)
13956 {
13957 if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
13958 | PREFIX_ES | PREFIX_FS | PREFIX_GS))
13959 ;
13960 else
13961 {
13962 oappend (names_seg[ds_reg - es_reg]);
13963 oappend (":");
13964 }
13965 print_operand_value (scratchbuf, 1, disp & 0xffff);
13966 oappend (scratchbuf);
13967 }
252b5132
RH
13968 }
13969}
13970
c0f3af97 13971static void
8b3f93e7 13972OP_E (int bytemode, int sizeflag)
c0f3af97
L
13973{
13974 /* Skip mod/rm byte. */
13975 MODRM_CHECK;
13976 codep++;
13977
13978 if (modrm.mod == 3)
13979 OP_E_register (bytemode, sizeflag);
13980 else
c1e679ec 13981 OP_E_memory (bytemode, sizeflag);
c0f3af97
L
13982}
13983
252b5132 13984static void
26ca5450 13985OP_G (int bytemode, int sizeflag)
252b5132 13986{
52b15da3 13987 int add = 0;
161a04f6
L
13988 USED_REX (REX_R);
13989 if (rex & REX_R)
52b15da3 13990 add += 8;
252b5132
RH
13991 switch (bytemode)
13992 {
13993 case b_mode:
52b15da3
JH
13994 USED_REX (0);
13995 if (rex)
7967e09e 13996 oappend (names8rex[modrm.reg + add]);
52b15da3 13997 else
7967e09e 13998 oappend (names8[modrm.reg + add]);
252b5132
RH
13999 break;
14000 case w_mode:
7967e09e 14001 oappend (names16[modrm.reg + add]);
252b5132
RH
14002 break;
14003 case d_mode:
7967e09e 14004 oappend (names32[modrm.reg + add]);
52b15da3
JH
14005 break;
14006 case q_mode:
7967e09e 14007 oappend (names64[modrm.reg + add]);
252b5132
RH
14008 break;
14009 case v_mode:
9306ca4a 14010 case dq_mode:
42903f7f
L
14011 case dqb_mode:
14012 case dqd_mode:
9306ca4a 14013 case dqw_mode:
161a04f6
L
14014 USED_REX (REX_W);
14015 if (rex & REX_W)
7967e09e 14016 oappend (names64[modrm.reg + add]);
252b5132 14017 else
f16cd0d5
L
14018 {
14019 if ((sizeflag & DFLAG) || bytemode != v_mode)
14020 oappend (names32[modrm.reg + add]);
14021 else
14022 oappend (names16[modrm.reg + add]);
14023 used_prefixes |= (prefixes & PREFIX_DATA);
14024 }
252b5132 14025 break;
90700ea2 14026 case m_mode:
cb712a9e 14027 if (address_mode == mode_64bit)
7967e09e 14028 oappend (names64[modrm.reg + add]);
90700ea2 14029 else
7967e09e 14030 oappend (names32[modrm.reg + add]);
90700ea2 14031 break;
252b5132
RH
14032 default:
14033 oappend (INTERNAL_DISASSEMBLER_ERROR);
14034 break;
14035 }
14036}
14037
52b15da3 14038static bfd_vma
26ca5450 14039get64 (void)
52b15da3 14040{
5dd0794d 14041 bfd_vma x;
52b15da3 14042#ifdef BFD64
5dd0794d
AM
14043 unsigned int a;
14044 unsigned int b;
14045
52b15da3
JH
14046 FETCH_DATA (the_info, codep + 8);
14047 a = *codep++ & 0xff;
14048 a |= (*codep++ & 0xff) << 8;
14049 a |= (*codep++ & 0xff) << 16;
14050 a |= (*codep++ & 0xff) << 24;
5dd0794d 14051 b = *codep++ & 0xff;
52b15da3
JH
14052 b |= (*codep++ & 0xff) << 8;
14053 b |= (*codep++ & 0xff) << 16;
14054 b |= (*codep++ & 0xff) << 24;
14055 x = a + ((bfd_vma) b << 32);
14056#else
6608db57 14057 abort ();
5dd0794d 14058 x = 0;
52b15da3
JH
14059#endif
14060 return x;
14061}
14062
14063static bfd_signed_vma
26ca5450 14064get32 (void)
252b5132 14065{
52b15da3 14066 bfd_signed_vma x = 0;
252b5132
RH
14067
14068 FETCH_DATA (the_info, codep + 4);
52b15da3
JH
14069 x = *codep++ & (bfd_signed_vma) 0xff;
14070 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14071 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14072 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14073 return x;
14074}
14075
14076static bfd_signed_vma
26ca5450 14077get32s (void)
52b15da3
JH
14078{
14079 bfd_signed_vma x = 0;
14080
14081 FETCH_DATA (the_info, codep + 4);
14082 x = *codep++ & (bfd_signed_vma) 0xff;
14083 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14084 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14085 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14086
14087 x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
14088
252b5132
RH
14089 return x;
14090}
14091
14092static int
26ca5450 14093get16 (void)
252b5132
RH
14094{
14095 int x = 0;
14096
14097 FETCH_DATA (the_info, codep + 2);
14098 x = *codep++ & 0xff;
14099 x |= (*codep++ & 0xff) << 8;
14100 return x;
14101}
14102
14103static void
26ca5450 14104set_op (bfd_vma op, int riprel)
252b5132
RH
14105{
14106 op_index[op_ad] = op_ad;
cb712a9e 14107 if (address_mode == mode_64bit)
7081ff04
AJ
14108 {
14109 op_address[op_ad] = op;
14110 op_riprel[op_ad] = riprel;
14111 }
14112 else
14113 {
14114 /* Mask to get a 32-bit address. */
14115 op_address[op_ad] = op & 0xffffffff;
14116 op_riprel[op_ad] = riprel & 0xffffffff;
14117 }
252b5132
RH
14118}
14119
14120static void
26ca5450 14121OP_REG (int code, int sizeflag)
252b5132 14122{
2da11e11 14123 const char *s;
9b60702d 14124 int add;
161a04f6
L
14125 USED_REX (REX_B);
14126 if (rex & REX_B)
52b15da3 14127 add = 8;
9b60702d
L
14128 else
14129 add = 0;
52b15da3
JH
14130
14131 switch (code)
14132 {
52b15da3
JH
14133 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14134 case sp_reg: case bp_reg: case si_reg: case di_reg:
14135 s = names16[code - ax_reg + add];
14136 break;
14137 case es_reg: case ss_reg: case cs_reg:
14138 case ds_reg: case fs_reg: case gs_reg:
14139 s = names_seg[code - es_reg + add];
14140 break;
14141 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14142 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
14143 USED_REX (0);
14144 if (rex)
14145 s = names8rex[code - al_reg + add];
14146 else
14147 s = names8[code - al_reg];
14148 break;
6439fc28
AM
14149 case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
14150 case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
cb712a9e 14151 if (address_mode == mode_64bit && (sizeflag & DFLAG))
6439fc28
AM
14152 {
14153 s = names64[code - rAX_reg + add];
14154 break;
14155 }
14156 code += eAX_reg - rAX_reg;
6608db57 14157 /* Fall through. */
52b15da3
JH
14158 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14159 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
14160 USED_REX (REX_W);
14161 if (rex & REX_W)
52b15da3 14162 s = names64[code - eAX_reg + add];
52b15da3 14163 else
f16cd0d5
L
14164 {
14165 if (sizeflag & DFLAG)
14166 s = names32[code - eAX_reg + add];
14167 else
14168 s = names16[code - eAX_reg + add];
14169 used_prefixes |= (prefixes & PREFIX_DATA);
14170 }
52b15da3 14171 break;
52b15da3
JH
14172 default:
14173 s = INTERNAL_DISASSEMBLER_ERROR;
14174 break;
14175 }
14176 oappend (s);
14177}
14178
14179static void
26ca5450 14180OP_IMREG (int code, int sizeflag)
52b15da3
JH
14181{
14182 const char *s;
252b5132
RH
14183
14184 switch (code)
14185 {
14186 case indir_dx_reg:
d708bcba 14187 if (intel_syntax)
52fd6d94 14188 s = "dx";
d708bcba 14189 else
db6eb5be 14190 s = "(%dx)";
252b5132
RH
14191 break;
14192 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14193 case sp_reg: case bp_reg: case si_reg: case di_reg:
14194 s = names16[code - ax_reg];
14195 break;
14196 case es_reg: case ss_reg: case cs_reg:
14197 case ds_reg: case fs_reg: case gs_reg:
14198 s = names_seg[code - es_reg];
14199 break;
14200 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14201 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
52b15da3
JH
14202 USED_REX (0);
14203 if (rex)
14204 s = names8rex[code - al_reg];
14205 else
14206 s = names8[code - al_reg];
252b5132
RH
14207 break;
14208 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14209 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
161a04f6
L
14210 USED_REX (REX_W);
14211 if (rex & REX_W)
52b15da3 14212 s = names64[code - eAX_reg];
252b5132 14213 else
f16cd0d5
L
14214 {
14215 if (sizeflag & DFLAG)
14216 s = names32[code - eAX_reg];
14217 else
14218 s = names16[code - eAX_reg];
14219 used_prefixes |= (prefixes & PREFIX_DATA);
14220 }
252b5132 14221 break;
52fd6d94 14222 case z_mode_ax_reg:
161a04f6 14223 if ((rex & REX_W) || (sizeflag & DFLAG))
52fd6d94
JB
14224 s = *names32;
14225 else
14226 s = *names16;
161a04f6 14227 if (!(rex & REX_W))
52fd6d94
JB
14228 used_prefixes |= (prefixes & PREFIX_DATA);
14229 break;
252b5132
RH
14230 default:
14231 s = INTERNAL_DISASSEMBLER_ERROR;
14232 break;
14233 }
14234 oappend (s);
14235}
14236
14237static void
26ca5450 14238OP_I (int bytemode, int sizeflag)
252b5132 14239{
52b15da3
JH
14240 bfd_signed_vma op;
14241 bfd_signed_vma mask = -1;
252b5132
RH
14242
14243 switch (bytemode)
14244 {
14245 case b_mode:
14246 FETCH_DATA (the_info, codep + 1);
52b15da3
JH
14247 op = *codep++;
14248 mask = 0xff;
14249 break;
14250 case q_mode:
cb712a9e 14251 if (address_mode == mode_64bit)
6439fc28
AM
14252 {
14253 op = get32s ();
14254 break;
14255 }
6608db57 14256 /* Fall through. */
252b5132 14257 case v_mode:
161a04f6
L
14258 USED_REX (REX_W);
14259 if (rex & REX_W)
52b15da3 14260 op = get32s ();
252b5132 14261 else
52b15da3 14262 {
f16cd0d5
L
14263 if (sizeflag & DFLAG)
14264 {
14265 op = get32 ();
14266 mask = 0xffffffff;
14267 }
14268 else
14269 {
14270 op = get16 ();
14271 mask = 0xfffff;
14272 }
14273 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 14274 }
252b5132
RH
14275 break;
14276 case w_mode:
52b15da3 14277 mask = 0xfffff;
252b5132
RH
14278 op = get16 ();
14279 break;
9306ca4a
JB
14280 case const_1_mode:
14281 if (intel_syntax)
14282 oappend ("1");
14283 return;
252b5132
RH
14284 default:
14285 oappend (INTERNAL_DISASSEMBLER_ERROR);
14286 return;
14287 }
14288
52b15da3
JH
14289 op &= mask;
14290 scratchbuf[0] = '$';
d708bcba
AM
14291 print_operand_value (scratchbuf + 1, 1, op);
14292 oappend (scratchbuf + intel_syntax);
52b15da3
JH
14293 scratchbuf[0] = '\0';
14294}
14295
14296static void
26ca5450 14297OP_I64 (int bytemode, int sizeflag)
52b15da3
JH
14298{
14299 bfd_signed_vma op;
14300 bfd_signed_vma mask = -1;
14301
cb712a9e 14302 if (address_mode != mode_64bit)
6439fc28
AM
14303 {
14304 OP_I (bytemode, sizeflag);
14305 return;
14306 }
14307
52b15da3
JH
14308 switch (bytemode)
14309 {
14310 case b_mode:
14311 FETCH_DATA (the_info, codep + 1);
14312 op = *codep++;
14313 mask = 0xff;
14314 break;
14315 case v_mode:
161a04f6
L
14316 USED_REX (REX_W);
14317 if (rex & REX_W)
52b15da3 14318 op = get64 ();
52b15da3
JH
14319 else
14320 {
f16cd0d5
L
14321 if (sizeflag & DFLAG)
14322 {
14323 op = get32 ();
14324 mask = 0xffffffff;
14325 }
14326 else
14327 {
14328 op = get16 ();
14329 mask = 0xfffff;
14330 }
14331 used_prefixes |= (prefixes & PREFIX_DATA);
52b15da3 14332 }
52b15da3
JH
14333 break;
14334 case w_mode:
14335 mask = 0xfffff;
14336 op = get16 ();
14337 break;
14338 default:
14339 oappend (INTERNAL_DISASSEMBLER_ERROR);
14340 return;
14341 }
14342
14343 op &= mask;
14344 scratchbuf[0] = '$';
d708bcba
AM
14345 print_operand_value (scratchbuf + 1, 1, op);
14346 oappend (scratchbuf + intel_syntax);
252b5132
RH
14347 scratchbuf[0] = '\0';
14348}
14349
14350static void
26ca5450 14351OP_sI (int bytemode, int sizeflag)
252b5132 14352{
52b15da3
JH
14353 bfd_signed_vma op;
14354 bfd_signed_vma mask = -1;
252b5132
RH
14355
14356 switch (bytemode)
14357 {
14358 case b_mode:
14359 FETCH_DATA (the_info, codep + 1);
14360 op = *codep++;
14361 if ((op & 0x80) != 0)
14362 op -= 0x100;
52b15da3 14363 mask = 0xffffffff;
252b5132
RH
14364 break;
14365 case v_mode:
161a04f6
L
14366 USED_REX (REX_W);
14367 if (rex & REX_W)
52b15da3 14368 op = get32s ();
252b5132
RH
14369 else
14370 {
f16cd0d5
L
14371 if (sizeflag & DFLAG)
14372 {
14373 op = get32s ();
14374 mask = 0xffffffff;
14375 }
14376 else
14377 {
14378 mask = 0xffffffff;
14379 op = get16 ();
14380 if ((op & 0x8000) != 0)
14381 op -= 0x10000;
14382 }
14383 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132
RH
14384 }
14385 break;
14386 case w_mode:
14387 op = get16 ();
52b15da3 14388 mask = 0xffffffff;
252b5132
RH
14389 if ((op & 0x8000) != 0)
14390 op -= 0x10000;
14391 break;
14392 default:
14393 oappend (INTERNAL_DISASSEMBLER_ERROR);
14394 return;
14395 }
52b15da3
JH
14396
14397 scratchbuf[0] = '$';
14398 print_operand_value (scratchbuf + 1, 1, op);
d708bcba 14399 oappend (scratchbuf + intel_syntax);
252b5132
RH
14400}
14401
14402static void
26ca5450 14403OP_J (int bytemode, int sizeflag)
252b5132 14404{
52b15da3 14405 bfd_vma disp;
7081ff04 14406 bfd_vma mask = -1;
65ca155d 14407 bfd_vma segment = 0;
252b5132
RH
14408
14409 switch (bytemode)
14410 {
14411 case b_mode:
14412 FETCH_DATA (the_info, codep + 1);
14413 disp = *codep++;
14414 if ((disp & 0x80) != 0)
14415 disp -= 0x100;
14416 break;
14417 case v_mode:
f16cd0d5 14418 USED_REX (REX_W);
161a04f6 14419 if ((sizeflag & DFLAG) || (rex & REX_W))
52b15da3 14420 disp = get32s ();
252b5132
RH
14421 else
14422 {
14423 disp = get16 ();
206717e8
L
14424 if ((disp & 0x8000) != 0)
14425 disp -= 0x10000;
65ca155d
L
14426 /* In 16bit mode, address is wrapped around at 64k within
14427 the same segment. Otherwise, a data16 prefix on a jump
14428 instruction means that the pc is masked to 16 bits after
14429 the displacement is added! */
14430 mask = 0xffff;
14431 if ((prefixes & PREFIX_DATA) == 0)
14432 segment = ((start_pc + codep - start_codep)
14433 & ~((bfd_vma) 0xffff));
252b5132 14434 }
f16cd0d5
L
14435 if (!(rex & REX_W))
14436 used_prefixes |= (prefixes & PREFIX_DATA);
252b5132
RH
14437 break;
14438 default:
14439 oappend (INTERNAL_DISASSEMBLER_ERROR);
14440 return;
14441 }
65ca155d 14442 disp = ((start_pc + codep - start_codep + disp) & mask) | segment;
52b15da3
JH
14443 set_op (disp, 0);
14444 print_operand_value (scratchbuf, 1, disp);
252b5132
RH
14445 oappend (scratchbuf);
14446}
14447
252b5132 14448static void
ed7841b3 14449OP_SEG (int bytemode, int sizeflag)
252b5132 14450{
ed7841b3 14451 if (bytemode == w_mode)
7967e09e 14452 oappend (names_seg[modrm.reg]);
ed7841b3 14453 else
7967e09e 14454 OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
252b5132
RH
14455}
14456
14457static void
26ca5450 14458OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
252b5132
RH
14459{
14460 int seg, offset;
14461
c608c12e 14462 if (sizeflag & DFLAG)
252b5132 14463 {
c608c12e
AM
14464 offset = get32 ();
14465 seg = get16 ();
252b5132 14466 }
c608c12e
AM
14467 else
14468 {
14469 offset = get16 ();
14470 seg = get16 ();
14471 }
7d421014 14472 used_prefixes |= (prefixes & PREFIX_DATA);
d708bcba 14473 if (intel_syntax)
3f31e633 14474 sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
d708bcba
AM
14475 else
14476 sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
c608c12e 14477 oappend (scratchbuf);
252b5132
RH
14478}
14479
252b5132 14480static void
3f31e633 14481OP_OFF (int bytemode, int sizeflag)
252b5132 14482{
52b15da3 14483 bfd_vma off;
252b5132 14484
3f31e633
JB
14485 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
14486 intel_operand_size (bytemode, sizeflag);
252b5132
RH
14487 append_seg ();
14488
cb712a9e 14489 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
252b5132
RH
14490 off = get32 ();
14491 else
14492 off = get16 ();
14493
14494 if (intel_syntax)
14495 {
14496 if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
db6eb5be 14497 | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
252b5132 14498 {
d708bcba 14499 oappend (names_seg[ds_reg - es_reg]);
252b5132
RH
14500 oappend (":");
14501 }
14502 }
52b15da3
JH
14503 print_operand_value (scratchbuf, 1, off);
14504 oappend (scratchbuf);
14505}
6439fc28 14506
52b15da3 14507static void
3f31e633 14508OP_OFF64 (int bytemode, int sizeflag)
52b15da3
JH
14509{
14510 bfd_vma off;
14511
539e75ad
L
14512 if (address_mode != mode_64bit
14513 || (prefixes & PREFIX_ADDR))
6439fc28
AM
14514 {
14515 OP_OFF (bytemode, sizeflag);
14516 return;
14517 }
14518
3f31e633
JB
14519 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
14520 intel_operand_size (bytemode, sizeflag);
52b15da3
JH
14521 append_seg ();
14522
6608db57 14523 off = get64 ();
52b15da3
JH
14524
14525 if (intel_syntax)
14526 {
14527 if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
db6eb5be 14528 | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
52b15da3 14529 {
d708bcba 14530 oappend (names_seg[ds_reg - es_reg]);
52b15da3
JH
14531 oappend (":");
14532 }
14533 }
14534 print_operand_value (scratchbuf, 1, off);
252b5132
RH
14535 oappend (scratchbuf);
14536}
14537
14538static void
26ca5450 14539ptr_reg (int code, int sizeflag)
252b5132 14540{
2da11e11 14541 const char *s;
d708bcba 14542
1d9f512f 14543 *obufp++ = open_char;
20f0a1fc 14544 used_prefixes |= (prefixes & PREFIX_ADDR);
cb712a9e 14545 if (address_mode == mode_64bit)
c1a64871
JH
14546 {
14547 if (!(sizeflag & AFLAG))
db6eb5be 14548 s = names32[code - eAX_reg];
c1a64871 14549 else
db6eb5be 14550 s = names64[code - eAX_reg];
c1a64871 14551 }
52b15da3 14552 else if (sizeflag & AFLAG)
252b5132
RH
14553 s = names32[code - eAX_reg];
14554 else
14555 s = names16[code - eAX_reg];
14556 oappend (s);
1d9f512f
AM
14557 *obufp++ = close_char;
14558 *obufp = 0;
252b5132
RH
14559}
14560
14561static void
26ca5450 14562OP_ESreg (int code, int sizeflag)
252b5132 14563{
9306ca4a 14564 if (intel_syntax)
52fd6d94
JB
14565 {
14566 switch (codep[-1])
14567 {
14568 case 0x6d: /* insw/insl */
14569 intel_operand_size (z_mode, sizeflag);
14570 break;
14571 case 0xa5: /* movsw/movsl/movsq */
14572 case 0xa7: /* cmpsw/cmpsl/cmpsq */
14573 case 0xab: /* stosw/stosl */
14574 case 0xaf: /* scasw/scasl */
14575 intel_operand_size (v_mode, sizeflag);
14576 break;
14577 default:
14578 intel_operand_size (b_mode, sizeflag);
14579 }
14580 }
d708bcba 14581 oappend ("%es:" + intel_syntax);
252b5132
RH
14582 ptr_reg (code, sizeflag);
14583}
14584
14585static void
26ca5450 14586OP_DSreg (int code, int sizeflag)
252b5132 14587{
9306ca4a 14588 if (intel_syntax)
52fd6d94
JB
14589 {
14590 switch (codep[-1])
14591 {
14592 case 0x6f: /* outsw/outsl */
14593 intel_operand_size (z_mode, sizeflag);
14594 break;
14595 case 0xa5: /* movsw/movsl/movsq */
14596 case 0xa7: /* cmpsw/cmpsl/cmpsq */
14597 case 0xad: /* lodsw/lodsl/lodsq */
14598 intel_operand_size (v_mode, sizeflag);
14599 break;
14600 default:
14601 intel_operand_size (b_mode, sizeflag);
14602 }
14603 }
252b5132
RH
14604 if ((prefixes
14605 & (PREFIX_CS
14606 | PREFIX_DS
14607 | PREFIX_SS
14608 | PREFIX_ES
14609 | PREFIX_FS
14610 | PREFIX_GS)) == 0)
14611 prefixes |= PREFIX_DS;
6608db57 14612 append_seg ();
252b5132
RH
14613 ptr_reg (code, sizeflag);
14614}
14615
252b5132 14616static void
26ca5450 14617OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14618{
9b60702d 14619 int add;
161a04f6 14620 if (rex & REX_R)
c4a530c5 14621 {
161a04f6 14622 USED_REX (REX_R);
c4a530c5
JB
14623 add = 8;
14624 }
cb712a9e 14625 else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
c4a530c5 14626 {
f16cd0d5 14627 all_prefixes[last_lock_prefix] = 0;
c4a530c5
JB
14628 used_prefixes |= PREFIX_LOCK;
14629 add = 8;
14630 }
9b60702d
L
14631 else
14632 add = 0;
7967e09e 14633 sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
d708bcba 14634 oappend (scratchbuf + intel_syntax);
252b5132
RH
14635}
14636
252b5132 14637static void
26ca5450 14638OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14639{
9b60702d 14640 int add;
161a04f6
L
14641 USED_REX (REX_R);
14642 if (rex & REX_R)
52b15da3 14643 add = 8;
9b60702d
L
14644 else
14645 add = 0;
d708bcba 14646 if (intel_syntax)
7967e09e 14647 sprintf (scratchbuf, "db%d", modrm.reg + add);
d708bcba 14648 else
7967e09e 14649 sprintf (scratchbuf, "%%db%d", modrm.reg + add);
252b5132
RH
14650 oappend (scratchbuf);
14651}
14652
252b5132 14653static void
26ca5450 14654OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14655{
7967e09e 14656 sprintf (scratchbuf, "%%tr%d", modrm.reg);
d708bcba 14657 oappend (scratchbuf + intel_syntax);
252b5132
RH
14658}
14659
14660static void
6f74c397 14661OP_R (int bytemode, int sizeflag)
252b5132 14662{
7967e09e 14663 if (modrm.mod == 3)
2da11e11
AM
14664 OP_E (bytemode, sizeflag);
14665 else
6608db57 14666 BadOp ();
252b5132
RH
14667}
14668
14669static void
26ca5450 14670OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132 14671{
b9733481
L
14672 int reg = modrm.reg;
14673 const char **names;
14674
041bd2e0
JH
14675 used_prefixes |= (prefixes & PREFIX_DATA);
14676 if (prefixes & PREFIX_DATA)
20f0a1fc 14677 {
b9733481 14678 names = names_xmm;
161a04f6
L
14679 USED_REX (REX_R);
14680 if (rex & REX_R)
b9733481 14681 reg += 8;
20f0a1fc 14682 }
041bd2e0 14683 else
b9733481
L
14684 names = names_mm;
14685 oappend (names[reg]);
252b5132
RH
14686}
14687
c608c12e 14688static void
c0f3af97 14689OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
c608c12e 14690{
b9733481
L
14691 int reg = modrm.reg;
14692 const char **names;
14693
161a04f6
L
14694 USED_REX (REX_R);
14695 if (rex & REX_R)
b9733481 14696 reg += 8;
c0f3af97
L
14697 if (need_vex && bytemode != xmm_mode)
14698 {
14699 switch (vex.length)
14700 {
14701 case 128:
b9733481 14702 names = names_xmm;
c0f3af97
L
14703 break;
14704 case 256:
b9733481 14705 names = names_ymm;
c0f3af97
L
14706 break;
14707 default:
14708 abort ();
14709 }
14710 }
14711 else
b9733481
L
14712 names = names_xmm;
14713 oappend (names[reg]);
c608c12e
AM
14714}
14715
252b5132 14716static void
26ca5450 14717OP_EM (int bytemode, int sizeflag)
252b5132 14718{
b9733481
L
14719 int reg;
14720 const char **names;
14721
7967e09e 14722 if (modrm.mod != 3)
252b5132 14723 {
b6169b20
L
14724 if (intel_syntax
14725 && (bytemode == v_mode || bytemode == v_swap_mode))
9306ca4a
JB
14726 {
14727 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
14728 used_prefixes |= (prefixes & PREFIX_DATA);
14729 }
252b5132
RH
14730 OP_E (bytemode, sizeflag);
14731 return;
14732 }
14733
b6169b20
L
14734 if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
14735 swap_operand ();
14736
6608db57 14737 /* Skip mod/rm byte. */
4bba6815 14738 MODRM_CHECK;
252b5132 14739 codep++;
041bd2e0 14740 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 14741 reg = modrm.rm;
041bd2e0 14742 if (prefixes & PREFIX_DATA)
20f0a1fc 14743 {
b9733481 14744 names = names_xmm;
161a04f6
L
14745 USED_REX (REX_B);
14746 if (rex & REX_B)
b9733481 14747 reg += 8;
20f0a1fc 14748 }
041bd2e0 14749 else
b9733481
L
14750 names = names_mm;
14751 oappend (names[reg]);
252b5132
RH
14752}
14753
246c51aa
L
14754/* cvt* are the only instructions in sse2 which have
14755 both SSE and MMX operands and also have 0x66 prefix
14756 in their opcode. 0x66 was originally used to differentiate
14757 between SSE and MMX instruction(operands). So we have to handle the
4d9567e0
MM
14758 cvt* separately using OP_EMC and OP_MXC */
14759static void
14760OP_EMC (int bytemode, int sizeflag)
14761{
7967e09e 14762 if (modrm.mod != 3)
4d9567e0
MM
14763 {
14764 if (intel_syntax && bytemode == v_mode)
14765 {
14766 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
14767 used_prefixes |= (prefixes & PREFIX_DATA);
14768 }
14769 OP_E (bytemode, sizeflag);
14770 return;
14771 }
246c51aa 14772
4d9567e0
MM
14773 /* Skip mod/rm byte. */
14774 MODRM_CHECK;
14775 codep++;
14776 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 14777 oappend (names_mm[modrm.rm]);
4d9567e0
MM
14778}
14779
14780static void
14781OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
14782{
14783 used_prefixes |= (prefixes & PREFIX_DATA);
b9733481 14784 oappend (names_mm[modrm.reg]);
4d9567e0
MM
14785}
14786
c608c12e 14787static void
26ca5450 14788OP_EX (int bytemode, int sizeflag)
c608c12e 14789{
b9733481
L
14790 int reg;
14791 const char **names;
d6f574e0
L
14792
14793 /* Skip mod/rm byte. */
14794 MODRM_CHECK;
14795 codep++;
14796
7967e09e 14797 if (modrm.mod != 3)
c608c12e 14798 {
c1e679ec 14799 OP_E_memory (bytemode, sizeflag);
c608c12e
AM
14800 return;
14801 }
d6f574e0 14802
b9733481 14803 reg = modrm.rm;
161a04f6
L
14804 USED_REX (REX_B);
14805 if (rex & REX_B)
b9733481 14806 reg += 8;
c608c12e 14807
b6169b20 14808 if ((sizeflag & SUFFIX_ALWAYS)
fa99fab2
L
14809 && (bytemode == x_swap_mode
14810 || bytemode == d_swap_mode
14811 || bytemode == q_swap_mode))
b6169b20
L
14812 swap_operand ();
14813
c0f3af97
L
14814 if (need_vex
14815 && bytemode != xmm_mode
14816 && bytemode != xmmq_mode)
14817 {
14818 switch (vex.length)
14819 {
14820 case 128:
b9733481 14821 names = names_xmm;
c0f3af97
L
14822 break;
14823 case 256:
b9733481 14824 names = names_ymm;
c0f3af97
L
14825 break;
14826 default:
14827 abort ();
14828 }
14829 }
14830 else
b9733481
L
14831 names = names_xmm;
14832 oappend (names[reg]);
c608c12e
AM
14833}
14834
252b5132 14835static void
26ca5450 14836OP_MS (int bytemode, int sizeflag)
252b5132 14837{
7967e09e 14838 if (modrm.mod == 3)
2da11e11
AM
14839 OP_EM (bytemode, sizeflag);
14840 else
6608db57 14841 BadOp ();
252b5132
RH
14842}
14843
992aaec9 14844static void
26ca5450 14845OP_XS (int bytemode, int sizeflag)
992aaec9 14846{
7967e09e 14847 if (modrm.mod == 3)
992aaec9
AM
14848 OP_EX (bytemode, sizeflag);
14849 else
6608db57 14850 BadOp ();
992aaec9
AM
14851}
14852
cc0ec051
AM
14853static void
14854OP_M (int bytemode, int sizeflag)
14855{
7967e09e 14856 if (modrm.mod == 3)
75413a22
L
14857 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
14858 BadOp ();
cc0ec051
AM
14859 else
14860 OP_E (bytemode, sizeflag);
14861}
14862
14863static void
14864OP_0f07 (int bytemode, int sizeflag)
14865{
7967e09e 14866 if (modrm.mod != 3 || modrm.rm != 0)
cc0ec051
AM
14867 BadOp ();
14868 else
14869 OP_E (bytemode, sizeflag);
14870}
14871
46e883c5 14872/* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
246c51aa 14873 32bit mode and "xchg %rax,%rax" in 64bit mode. */
46e883c5 14874
cc0ec051 14875static void
46e883c5 14876NOP_Fixup1 (int bytemode, int sizeflag)
cc0ec051 14877{
8b38ad71
L
14878 if ((prefixes & PREFIX_DATA) != 0
14879 || (rex != 0
14880 && rex != 0x48
14881 && address_mode == mode_64bit))
46e883c5
L
14882 OP_REG (bytemode, sizeflag);
14883 else
14884 strcpy (obuf, "nop");
14885}
14886
14887static void
14888NOP_Fixup2 (int bytemode, int sizeflag)
14889{
8b38ad71
L
14890 if ((prefixes & PREFIX_DATA) != 0
14891 || (rex != 0
14892 && rex != 0x48
14893 && address_mode == mode_64bit))
46e883c5 14894 OP_IMREG (bytemode, sizeflag);
cc0ec051
AM
14895}
14896
84037f8c 14897static const char *const Suffix3DNow[] = {
252b5132
RH
14898/* 00 */ NULL, NULL, NULL, NULL,
14899/* 04 */ NULL, NULL, NULL, NULL,
14900/* 08 */ NULL, NULL, NULL, NULL,
9e525108 14901/* 0C */ "pi2fw", "pi2fd", NULL, NULL,
252b5132
RH
14902/* 10 */ NULL, NULL, NULL, NULL,
14903/* 14 */ NULL, NULL, NULL, NULL,
14904/* 18 */ NULL, NULL, NULL, NULL,
9e525108 14905/* 1C */ "pf2iw", "pf2id", NULL, NULL,
252b5132
RH
14906/* 20 */ NULL, NULL, NULL, NULL,
14907/* 24 */ NULL, NULL, NULL, NULL,
14908/* 28 */ NULL, NULL, NULL, NULL,
14909/* 2C */ NULL, NULL, NULL, NULL,
14910/* 30 */ NULL, NULL, NULL, NULL,
14911/* 34 */ NULL, NULL, NULL, NULL,
14912/* 38 */ NULL, NULL, NULL, NULL,
14913/* 3C */ NULL, NULL, NULL, NULL,
14914/* 40 */ NULL, NULL, NULL, NULL,
14915/* 44 */ NULL, NULL, NULL, NULL,
14916/* 48 */ NULL, NULL, NULL, NULL,
14917/* 4C */ NULL, NULL, NULL, NULL,
14918/* 50 */ NULL, NULL, NULL, NULL,
14919/* 54 */ NULL, NULL, NULL, NULL,
14920/* 58 */ NULL, NULL, NULL, NULL,
14921/* 5C */ NULL, NULL, NULL, NULL,
14922/* 60 */ NULL, NULL, NULL, NULL,
14923/* 64 */ NULL, NULL, NULL, NULL,
14924/* 68 */ NULL, NULL, NULL, NULL,
14925/* 6C */ NULL, NULL, NULL, NULL,
14926/* 70 */ NULL, NULL, NULL, NULL,
14927/* 74 */ NULL, NULL, NULL, NULL,
14928/* 78 */ NULL, NULL, NULL, NULL,
14929/* 7C */ NULL, NULL, NULL, NULL,
14930/* 80 */ NULL, NULL, NULL, NULL,
14931/* 84 */ NULL, NULL, NULL, NULL,
9e525108
AM
14932/* 88 */ NULL, NULL, "pfnacc", NULL,
14933/* 8C */ NULL, NULL, "pfpnacc", NULL,
252b5132
RH
14934/* 90 */ "pfcmpge", NULL, NULL, NULL,
14935/* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
14936/* 98 */ NULL, NULL, "pfsub", NULL,
14937/* 9C */ NULL, NULL, "pfadd", NULL,
14938/* A0 */ "pfcmpgt", NULL, NULL, NULL,
14939/* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
14940/* A8 */ NULL, NULL, "pfsubr", NULL,
14941/* AC */ NULL, NULL, "pfacc", NULL,
14942/* B0 */ "pfcmpeq", NULL, NULL, NULL,
9beff690 14943/* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
9e525108 14944/* B8 */ NULL, NULL, NULL, "pswapd",
252b5132
RH
14945/* BC */ NULL, NULL, NULL, "pavgusb",
14946/* C0 */ NULL, NULL, NULL, NULL,
14947/* C4 */ NULL, NULL, NULL, NULL,
14948/* C8 */ NULL, NULL, NULL, NULL,
14949/* CC */ NULL, NULL, NULL, NULL,
14950/* D0 */ NULL, NULL, NULL, NULL,
14951/* D4 */ NULL, NULL, NULL, NULL,
14952/* D8 */ NULL, NULL, NULL, NULL,
14953/* DC */ NULL, NULL, NULL, NULL,
14954/* E0 */ NULL, NULL, NULL, NULL,
14955/* E4 */ NULL, NULL, NULL, NULL,
14956/* E8 */ NULL, NULL, NULL, NULL,
14957/* EC */ NULL, NULL, NULL, NULL,
14958/* F0 */ NULL, NULL, NULL, NULL,
14959/* F4 */ NULL, NULL, NULL, NULL,
14960/* F8 */ NULL, NULL, NULL, NULL,
14961/* FC */ NULL, NULL, NULL, NULL,
14962};
14963
14964static void
26ca5450 14965OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
252b5132
RH
14966{
14967 const char *mnemonic;
14968
14969 FETCH_DATA (the_info, codep + 1);
14970 /* AMD 3DNow! instructions are specified by an opcode suffix in the
14971 place where an 8-bit immediate would normally go. ie. the last
14972 byte of the instruction. */
ea397f5b 14973 obufp = mnemonicendp;
c608c12e 14974 mnemonic = Suffix3DNow[*codep++ & 0xff];
252b5132 14975 if (mnemonic)
2da11e11 14976 oappend (mnemonic);
252b5132
RH
14977 else
14978 {
14979 /* Since a variable sized modrm/sib chunk is between the start
14980 of the opcode (0x0f0f) and the opcode suffix, we need to do
14981 all the modrm processing first, and don't know until now that
14982 we have a bad opcode. This necessitates some cleaning up. */
ce518a5f
L
14983 op_out[0][0] = '\0';
14984 op_out[1][0] = '\0';
6608db57 14985 BadOp ();
252b5132 14986 }
ea397f5b 14987 mnemonicendp = obufp;
252b5132 14988}
c608c12e 14989
ea397f5b
L
14990static struct op simd_cmp_op[] =
14991{
14992 { STRING_COMMA_LEN ("eq") },
14993 { STRING_COMMA_LEN ("lt") },
14994 { STRING_COMMA_LEN ("le") },
14995 { STRING_COMMA_LEN ("unord") },
14996 { STRING_COMMA_LEN ("neq") },
14997 { STRING_COMMA_LEN ("nlt") },
14998 { STRING_COMMA_LEN ("nle") },
14999 { STRING_COMMA_LEN ("ord") }
c608c12e
AM
15000};
15001
15002static void
ad19981d 15003CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
c608c12e
AM
15004{
15005 unsigned int cmp_type;
15006
15007 FETCH_DATA (the_info, codep + 1);
15008 cmp_type = *codep++ & 0xff;
c0f3af97 15009 if (cmp_type < ARRAY_SIZE (simd_cmp_op))
c608c12e 15010 {
ad19981d 15011 char suffix [3];
ea397f5b 15012 char *p = mnemonicendp - 2;
ad19981d
L
15013 suffix[0] = p[0];
15014 suffix[1] = p[1];
15015 suffix[2] = '\0';
ea397f5b
L
15016 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
15017 mnemonicendp += simd_cmp_op[cmp_type].len;
c608c12e
AM
15018 }
15019 else
15020 {
ad19981d
L
15021 /* We have a reserved extension byte. Output it directly. */
15022 scratchbuf[0] = '$';
15023 print_operand_value (scratchbuf + 1, 1, cmp_type);
15024 oappend (scratchbuf + intel_syntax);
15025 scratchbuf[0] = '\0';
c608c12e
AM
15026 }
15027}
15028
ca164297 15029static void
b844680a
L
15030OP_Mwait (int bytemode ATTRIBUTE_UNUSED,
15031 int sizeflag ATTRIBUTE_UNUSED)
15032{
15033 /* mwait %eax,%ecx */
15034 if (!intel_syntax)
15035 {
15036 const char **names = (address_mode == mode_64bit
15037 ? names64 : names32);
15038 strcpy (op_out[0], names[0]);
15039 strcpy (op_out[1], names[1]);
15040 two_source_ops = 1;
15041 }
15042 /* Skip mod/rm byte. */
15043 MODRM_CHECK;
15044 codep++;
15045}
15046
15047static void
15048OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
15049 int sizeflag ATTRIBUTE_UNUSED)
ca164297 15050{
b844680a
L
15051 /* monitor %eax,%ecx,%edx" */
15052 if (!intel_syntax)
ca164297 15053 {
b844680a 15054 const char **op1_names;
cb712a9e
L
15055 const char **names = (address_mode == mode_64bit
15056 ? names64 : names32);
1d9f512f 15057
b844680a
L
15058 if (!(prefixes & PREFIX_ADDR))
15059 op1_names = (address_mode == mode_16bit
15060 ? names16 : names);
ca164297
L
15061 else
15062 {
b844680a 15063 /* Remove "addr16/addr32". */
f16cd0d5 15064 all_prefixes[last_addr_prefix] = 0;
b844680a
L
15065 op1_names = (address_mode != mode_32bit
15066 ? names32 : names16);
15067 used_prefixes |= PREFIX_ADDR;
ca164297 15068 }
b844680a
L
15069 strcpy (op_out[0], op1_names[0]);
15070 strcpy (op_out[1], names[1]);
15071 strcpy (op_out[2], names[2]);
15072 two_source_ops = 1;
ca164297 15073 }
b844680a
L
15074 /* Skip mod/rm byte. */
15075 MODRM_CHECK;
15076 codep++;
30123838
JB
15077}
15078
6608db57
KH
15079static void
15080BadOp (void)
2da11e11 15081{
6608db57
KH
15082 /* Throw away prefixes and 1st. opcode byte. */
15083 codep = insn_codep + 1;
2da11e11
AM
15084 oappend ("(bad)");
15085}
4cc91dba 15086
35c52694
L
15087static void
15088REP_Fixup (int bytemode, int sizeflag)
15089{
15090 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
15091 lods and stos. */
35c52694 15092 if (prefixes & PREFIX_REPZ)
f16cd0d5 15093 all_prefixes[last_repz_prefix] = REP_PREFIX;
35c52694
L
15094
15095 switch (bytemode)
15096 {
15097 case al_reg:
15098 case eAX_reg:
15099 case indir_dx_reg:
15100 OP_IMREG (bytemode, sizeflag);
15101 break;
15102 case eDI_reg:
15103 OP_ESreg (bytemode, sizeflag);
15104 break;
15105 case eSI_reg:
15106 OP_DSreg (bytemode, sizeflag);
15107 break;
15108 default:
15109 abort ();
15110 break;
15111 }
15112}
f5804c90
L
15113
15114static void
15115CMPXCHG8B_Fixup (int bytemode, int sizeflag)
15116{
161a04f6
L
15117 USED_REX (REX_W);
15118 if (rex & REX_W)
f5804c90
L
15119 {
15120 /* Change cmpxchg8b to cmpxchg16b. */
ea397f5b
L
15121 char *p = mnemonicendp - 2;
15122 mnemonicendp = stpcpy (p, "16b");
fb9c77c7 15123 bytemode = o_mode;
f5804c90
L
15124 }
15125 OP_M (bytemode, sizeflag);
15126}
42903f7f
L
15127
15128static void
15129XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
15130{
b9733481
L
15131 const char **names;
15132
c0f3af97
L
15133 if (need_vex)
15134 {
15135 switch (vex.length)
15136 {
15137 case 128:
b9733481 15138 names = names_xmm;
c0f3af97
L
15139 break;
15140 case 256:
b9733481 15141 names = names_ymm;
c0f3af97
L
15142 break;
15143 default:
15144 abort ();
15145 }
15146 }
15147 else
b9733481
L
15148 names = names_xmm;
15149 oappend (names[reg]);
42903f7f 15150}
381d071f
L
15151
15152static void
15153CRC32_Fixup (int bytemode, int sizeflag)
15154{
15155 /* Add proper suffix to "crc32". */
ea397f5b 15156 char *p = mnemonicendp;
381d071f
L
15157
15158 switch (bytemode)
15159 {
15160 case b_mode:
20592a94 15161 if (intel_syntax)
ea397f5b 15162 goto skip;
20592a94 15163
381d071f
L
15164 *p++ = 'b';
15165 break;
15166 case v_mode:
20592a94 15167 if (intel_syntax)
ea397f5b 15168 goto skip;
20592a94 15169
381d071f
L
15170 USED_REX (REX_W);
15171 if (rex & REX_W)
15172 *p++ = 'q';
f16cd0d5
L
15173 else
15174 {
15175 if (sizeflag & DFLAG)
15176 *p++ = 'l';
15177 else
15178 *p++ = 'w';
15179 used_prefixes |= (prefixes & PREFIX_DATA);
15180 }
381d071f
L
15181 break;
15182 default:
15183 oappend (INTERNAL_DISASSEMBLER_ERROR);
15184 break;
15185 }
ea397f5b 15186 mnemonicendp = p;
381d071f
L
15187 *p = '\0';
15188
ea397f5b 15189skip:
381d071f
L
15190 if (modrm.mod == 3)
15191 {
15192 int add;
15193
15194 /* Skip mod/rm byte. */
15195 MODRM_CHECK;
15196 codep++;
15197
15198 USED_REX (REX_B);
15199 add = (rex & REX_B) ? 8 : 0;
15200 if (bytemode == b_mode)
15201 {
15202 USED_REX (0);
15203 if (rex)
15204 oappend (names8rex[modrm.rm + add]);
15205 else
15206 oappend (names8[modrm.rm + add]);
15207 }
15208 else
15209 {
15210 USED_REX (REX_W);
15211 if (rex & REX_W)
15212 oappend (names64[modrm.rm + add]);
15213 else if ((prefixes & PREFIX_DATA))
15214 oappend (names16[modrm.rm + add]);
15215 else
15216 oappend (names32[modrm.rm + add]);
15217 }
15218 }
15219 else
9344ff29 15220 OP_E (bytemode, sizeflag);
381d071f 15221}
85f10a01 15222
eacc9c89
L
15223static void
15224FXSAVE_Fixup (int bytemode, int sizeflag)
15225{
15226 /* Add proper suffix to "fxsave" and "fxrstor". */
15227 USED_REX (REX_W);
15228 if (rex & REX_W)
15229 {
15230 char *p = mnemonicendp;
15231 *p++ = '6';
15232 *p++ = '4';
15233 *p = '\0';
15234 mnemonicendp = p;
15235 }
15236 OP_M (bytemode, sizeflag);
15237}
15238
c0f3af97
L
15239/* Display the destination register operand for instructions with
15240 VEX. */
15241
15242static void
15243OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
15244{
b9733481
L
15245 const char **names;
15246
c0f3af97
L
15247 if (!need_vex)
15248 abort ();
15249
15250 if (!need_vex_reg)
15251 return;
15252
15253 switch (vex.length)
15254 {
15255 case 128:
15256 switch (bytemode)
15257 {
15258 case vex_mode:
15259 case vex128_mode:
15260 break;
15261 default:
15262 abort ();
15263 return;
15264 }
15265
b9733481 15266 names = names_xmm;
c0f3af97
L
15267 break;
15268 case 256:
15269 switch (bytemode)
15270 {
15271 case vex_mode:
15272 case vex256_mode:
15273 break;
15274 default:
15275 abort ();
15276 return;
15277 }
15278
b9733481 15279 names = names_ymm;
c0f3af97
L
15280 break;
15281 default:
15282 abort ();
15283 break;
15284 }
b9733481 15285 oappend (names[vex.register_specifier]);
c0f3af97
L
15286}
15287
922d8de8
DR
15288/* Get the VEX immediate byte without moving codep. */
15289
15290static unsigned char
ccc5981b 15291get_vex_imm8 (int sizeflag, int opnum)
922d8de8
DR
15292{
15293 int bytes_before_imm = 0;
15294
922d8de8
DR
15295 if (modrm.mod != 3)
15296 {
15297 /* There are SIB/displacement bytes. */
15298 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
02e647f9 15299 {
922d8de8 15300 /* 32/64 bit address mode */
02e647f9 15301 int base = modrm.rm;
922d8de8
DR
15302
15303 /* Check SIB byte. */
02e647f9
SP
15304 if (base == 4)
15305 {
15306 FETCH_DATA (the_info, codep + 1);
15307 base = *codep & 7;
15308 /* When decoding the third source, don't increase
15309 bytes_before_imm as this has already been incremented
15310 by one in OP_E_memory while decoding the second
15311 source operand. */
ccc5981b
SP
15312 if (opnum == 0)
15313 bytes_before_imm++;
02e647f9
SP
15314 }
15315
15316 /* Don't increase bytes_before_imm when decoding the third source,
15317 it has already been incremented by OP_E_memory while decoding
15318 the second source operand. */
15319 if (opnum == 0)
15320 {
15321 switch (modrm.mod)
15322 {
15323 case 0:
15324 /* When modrm.rm == 5 or modrm.rm == 4 and base in
15325 SIB == 5, there is a 4 byte displacement. */
15326 if (base != 5)
15327 /* No displacement. */
15328 break;
15329 case 2:
15330 /* 4 byte displacement. */
15331 bytes_before_imm += 4;
15332 break;
15333 case 1:
15334 /* 1 byte displacement. */
15335 bytes_before_imm++;
15336 break;
15337 }
15338 }
15339 }
922d8de8 15340 else
02e647f9
SP
15341 {
15342 /* 16 bit address mode */
15343 /* Don't increase bytes_before_imm when decoding the third source,
15344 it has already been incremented by OP_E_memory while decoding
15345 the second source operand. */
15346 if (opnum == 0)
15347 {
15348 switch (modrm.mod)
15349 {
15350 case 0:
15351 /* When modrm.rm == 6, there is a 2 byte displacement. */
15352 if (modrm.rm != 6)
15353 /* No displacement. */
15354 break;
15355 case 2:
15356 /* 2 byte displacement. */
15357 bytes_before_imm += 2;
15358 break;
15359 case 1:
15360 /* 1 byte displacement: when decoding the third source,
15361 don't increase bytes_before_imm as this has already
15362 been incremented by one in OP_E_memory while decoding
15363 the second source operand. */
15364 if (opnum == 0)
15365 bytes_before_imm++;
ccc5981b 15366
02e647f9
SP
15367 break;
15368 }
922d8de8
DR
15369 }
15370 }
15371 }
15372
15373 FETCH_DATA (the_info, codep + bytes_before_imm + 1);
15374 return codep [bytes_before_imm];
15375}
15376
15377static void
15378OP_EX_VexReg (int bytemode, int sizeflag, int reg)
15379{
b9733481
L
15380 const char **names;
15381
922d8de8
DR
15382 if (reg == -1 && modrm.mod != 3)
15383 {
15384 OP_E_memory (bytemode, sizeflag);
15385 return;
15386 }
15387 else
15388 {
15389 if (reg == -1)
15390 {
15391 reg = modrm.rm;
15392 USED_REX (REX_B);
15393 if (rex & REX_B)
15394 reg += 8;
15395 }
15396 else if (reg > 7 && address_mode != mode_64bit)
15397 BadOp ();
15398 }
15399
15400 switch (vex.length)
15401 {
15402 case 128:
b9733481 15403 names = names_xmm;
922d8de8
DR
15404 break;
15405 case 256:
b9733481 15406 names = names_ymm;
922d8de8
DR
15407 break;
15408 default:
15409 abort ();
15410 }
b9733481 15411 oappend (names[reg]);
922d8de8
DR
15412}
15413
5dd85c99
SP
15414static void
15415OP_Vex_2src (int bytemode, int sizeflag)
15416{
15417 if (modrm.mod == 3)
15418 {
b9733481 15419 int reg = modrm.rm;
5dd85c99 15420 USED_REX (REX_B);
b9733481
L
15421 if (rex & REX_B)
15422 reg += 8;
15423 oappend (names_xmm[reg]);
5dd85c99
SP
15424 }
15425 else
15426 {
15427 if (intel_syntax
15428 && (bytemode == v_mode || bytemode == v_swap_mode))
15429 {
15430 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
15431 used_prefixes |= (prefixes & PREFIX_DATA);
15432 }
15433 OP_E (bytemode, sizeflag);
15434 }
15435}
15436
15437static void
15438OP_Vex_2src_1 (int bytemode, int sizeflag)
15439{
15440 if (modrm.mod == 3)
15441 {
15442 /* Skip mod/rm byte. */
15443 MODRM_CHECK;
15444 codep++;
15445 }
15446
15447 if (vex.w)
b9733481 15448 oappend (names_xmm[vex.register_specifier]);
5dd85c99
SP
15449 else
15450 OP_Vex_2src (bytemode, sizeflag);
15451}
15452
15453static void
15454OP_Vex_2src_2 (int bytemode, int sizeflag)
15455{
15456 if (vex.w)
15457 OP_Vex_2src (bytemode, sizeflag);
15458 else
b9733481 15459 oappend (names_xmm[vex.register_specifier]);
5dd85c99
SP
15460}
15461
922d8de8
DR
15462static void
15463OP_EX_VexW (int bytemode, int sizeflag)
15464{
15465 int reg = -1;
15466
15467 if (!vex_w_done)
15468 {
15469 vex_w_done = 1;
41effecb
SP
15470
15471 /* Skip mod/rm byte. */
15472 MODRM_CHECK;
15473 codep++;
15474
922d8de8 15475 if (vex.w)
ccc5981b 15476 reg = get_vex_imm8 (sizeflag, 0) >> 4;
922d8de8
DR
15477 }
15478 else
15479 {
15480 if (!vex.w)
ccc5981b 15481 reg = get_vex_imm8 (sizeflag, 1) >> 4;
922d8de8
DR
15482 }
15483
15484 OP_EX_VexReg (bytemode, sizeflag, reg);
15485}
15486
922d8de8
DR
15487static void
15488VEXI4_Fixup (int bytemode ATTRIBUTE_UNUSED,
15489 int sizeflag ATTRIBUTE_UNUSED)
15490{
15491 /* Skip the immediate byte and check for invalid bits. */
15492 FETCH_DATA (the_info, codep + 1);
15493 if (*codep++ & 0xf)
15494 BadOp ();
15495}
15496
c0f3af97
L
15497static void
15498OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
15499{
15500 int reg;
b9733481
L
15501 const char **names;
15502
c0f3af97
L
15503 FETCH_DATA (the_info, codep + 1);
15504 reg = *codep++;
15505
15506 if (bytemode != x_mode)
15507 abort ();
15508
15509 if (reg & 0xf)
15510 BadOp ();
15511
15512 reg >>= 4;
dae39acc
L
15513 if (reg > 7 && address_mode != mode_64bit)
15514 BadOp ();
15515
c0f3af97
L
15516 switch (vex.length)
15517 {
15518 case 128:
b9733481 15519 names = names_xmm;
c0f3af97
L
15520 break;
15521 case 256:
b9733481 15522 names = names_ymm;
c0f3af97
L
15523 break;
15524 default:
15525 abort ();
15526 }
b9733481 15527 oappend (names[reg]);
c0f3af97
L
15528}
15529
922d8de8
DR
15530static void
15531OP_XMM_VexW (int bytemode, int sizeflag)
15532{
15533 /* Turn off the REX.W bit since it is used for swapping operands
15534 now. */
15535 rex &= ~REX_W;
15536 OP_XMM (bytemode, sizeflag);
15537}
15538
c0f3af97
L
15539static void
15540OP_EX_Vex (int bytemode, int sizeflag)
15541{
15542 if (modrm.mod != 3)
15543 {
15544 if (vex.register_specifier != 0)
15545 BadOp ();
15546 need_vex_reg = 0;
15547 }
15548 OP_EX (bytemode, sizeflag);
15549}
15550
15551static void
15552OP_XMM_Vex (int bytemode, int sizeflag)
15553{
15554 if (modrm.mod != 3)
15555 {
15556 if (vex.register_specifier != 0)
15557 BadOp ();
15558 need_vex_reg = 0;
15559 }
15560 OP_XMM (bytemode, sizeflag);
15561}
15562
15563static void
15564VZERO_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15565{
15566 switch (vex.length)
15567 {
15568 case 128:
ea397f5b 15569 mnemonicendp = stpcpy (obuf, "vzeroupper");
c0f3af97
L
15570 break;
15571 case 256:
ea397f5b 15572 mnemonicendp = stpcpy (obuf, "vzeroall");
c0f3af97
L
15573 break;
15574 default:
15575 abort ();
15576 }
15577}
15578
ea397f5b
L
15579static struct op vex_cmp_op[] =
15580{
15581 { STRING_COMMA_LEN ("eq") },
15582 { STRING_COMMA_LEN ("lt") },
15583 { STRING_COMMA_LEN ("le") },
15584 { STRING_COMMA_LEN ("unord") },
15585 { STRING_COMMA_LEN ("neq") },
15586 { STRING_COMMA_LEN ("nlt") },
15587 { STRING_COMMA_LEN ("nle") },
15588 { STRING_COMMA_LEN ("ord") },
15589 { STRING_COMMA_LEN ("eq_uq") },
15590 { STRING_COMMA_LEN ("nge") },
15591 { STRING_COMMA_LEN ("ngt") },
15592 { STRING_COMMA_LEN ("false") },
15593 { STRING_COMMA_LEN ("neq_oq") },
15594 { STRING_COMMA_LEN ("ge") },
15595 { STRING_COMMA_LEN ("gt") },
15596 { STRING_COMMA_LEN ("true") },
15597 { STRING_COMMA_LEN ("eq_os") },
15598 { STRING_COMMA_LEN ("lt_oq") },
15599 { STRING_COMMA_LEN ("le_oq") },
15600 { STRING_COMMA_LEN ("unord_s") },
15601 { STRING_COMMA_LEN ("neq_us") },
15602 { STRING_COMMA_LEN ("nlt_uq") },
15603 { STRING_COMMA_LEN ("nle_uq") },
15604 { STRING_COMMA_LEN ("ord_s") },
15605 { STRING_COMMA_LEN ("eq_us") },
15606 { STRING_COMMA_LEN ("nge_uq") },
15607 { STRING_COMMA_LEN ("ngt_uq") },
15608 { STRING_COMMA_LEN ("false_os") },
15609 { STRING_COMMA_LEN ("neq_os") },
15610 { STRING_COMMA_LEN ("ge_oq") },
15611 { STRING_COMMA_LEN ("gt_oq") },
15612 { STRING_COMMA_LEN ("true_us") },
c0f3af97
L
15613};
15614
15615static void
15616VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15617{
15618 unsigned int cmp_type;
15619
15620 FETCH_DATA (the_info, codep + 1);
15621 cmp_type = *codep++ & 0xff;
15622 if (cmp_type < ARRAY_SIZE (vex_cmp_op))
15623 {
15624 char suffix [3];
ea397f5b 15625 char *p = mnemonicendp - 2;
c0f3af97
L
15626 suffix[0] = p[0];
15627 suffix[1] = p[1];
15628 suffix[2] = '\0';
ea397f5b
L
15629 sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
15630 mnemonicendp += vex_cmp_op[cmp_type].len;
c0f3af97
L
15631 }
15632 else
15633 {
15634 /* We have a reserved extension byte. Output it directly. */
15635 scratchbuf[0] = '$';
15636 print_operand_value (scratchbuf + 1, 1, cmp_type);
15637 oappend (scratchbuf + intel_syntax);
15638 scratchbuf[0] = '\0';
15639 }
15640}
15641
ea397f5b
L
15642static const struct op pclmul_op[] =
15643{
15644 { STRING_COMMA_LEN ("lql") },
15645 { STRING_COMMA_LEN ("hql") },
15646 { STRING_COMMA_LEN ("lqh") },
15647 { STRING_COMMA_LEN ("hqh") }
c0f3af97
L
15648};
15649
15650static void
15651PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
15652 int sizeflag ATTRIBUTE_UNUSED)
15653{
15654 unsigned int pclmul_type;
15655
15656 FETCH_DATA (the_info, codep + 1);
15657 pclmul_type = *codep++ & 0xff;
15658 switch (pclmul_type)
15659 {
15660 case 0x10:
15661 pclmul_type = 2;
15662 break;
15663 case 0x11:
15664 pclmul_type = 3;
15665 break;
15666 default:
15667 break;
15668 }
15669 if (pclmul_type < ARRAY_SIZE (pclmul_op))
15670 {
15671 char suffix [4];
ea397f5b 15672 char *p = mnemonicendp - 3;
c0f3af97
L
15673 suffix[0] = p[0];
15674 suffix[1] = p[1];
15675 suffix[2] = p[2];
15676 suffix[3] = '\0';
ea397f5b
L
15677 sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
15678 mnemonicendp += pclmul_op[pclmul_type].len;
c0f3af97
L
15679 }
15680 else
15681 {
15682 /* We have a reserved extension byte. Output it directly. */
15683 scratchbuf[0] = '$';
15684 print_operand_value (scratchbuf + 1, 1, pclmul_type);
15685 oappend (scratchbuf + intel_syntax);
15686 scratchbuf[0] = '\0';
15687 }
15688}
15689
f1f8f695
L
15690static void
15691MOVBE_Fixup (int bytemode, int sizeflag)
15692{
15693 /* Add proper suffix to "movbe". */
ea397f5b 15694 char *p = mnemonicendp;
f1f8f695
L
15695
15696 switch (bytemode)
15697 {
15698 case v_mode:
15699 if (intel_syntax)
ea397f5b 15700 goto skip;
f1f8f695
L
15701
15702 USED_REX (REX_W);
15703 if (sizeflag & SUFFIX_ALWAYS)
15704 {
15705 if (rex & REX_W)
15706 *p++ = 'q';
f1f8f695 15707 else
f16cd0d5
L
15708 {
15709 if (sizeflag & DFLAG)
15710 *p++ = 'l';
15711 else
15712 *p++ = 'w';
15713 used_prefixes |= (prefixes & PREFIX_DATA);
15714 }
f1f8f695 15715 }
f1f8f695
L
15716 break;
15717 default:
15718 oappend (INTERNAL_DISASSEMBLER_ERROR);
15719 break;
15720 }
ea397f5b 15721 mnemonicendp = p;
f1f8f695
L
15722 *p = '\0';
15723
ea397f5b 15724skip:
f1f8f695
L
15725 OP_M (bytemode, sizeflag);
15726}
f88c9eb0
SP
15727
15728static void
15729OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15730{
15731 int reg;
15732 const char **names;
15733
15734 /* Skip mod/rm byte. */
15735 MODRM_CHECK;
15736 codep++;
15737
15738 if (vex.w)
15739 names = names64;
15740 else if (vex.length == 256)
15741 names = names32;
15742 else
15743 names = names16;
15744
15745 reg = modrm.rm;
15746 USED_REX (REX_B);
15747 if (rex & REX_B)
15748 reg += 8;
15749
15750 oappend (names[reg]);
15751}
15752
15753static void
15754OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15755{
15756 const char **names;
15757
15758 if (vex.w)
15759 names = names64;
15760 else if (vex.length == 256)
15761 names = names32;
15762 else
15763 names = names16;
15764
15765 oappend (names[vex.register_specifier]);
15766}
15767
15768static void
15769OP_LWP_I (int bytemode ATTRIBUTE_UNUSED, int sizeflag)
15770{
15771 if (vex.w || vex.length == 256)
15772 OP_I (q_mode, sizeflag);
15773 else
15774 OP_I (w_mode, sizeflag);
15775}
15776
This page took 1.433298 seconds and 4 git commands to generate.