1 /* Print i386 instructions for GDB, the GNU debugger.
2 Copyright (C) 1988-2018 Free Software Foundation, Inc.
4 This file is part of the GNU opcodes library.
6 This library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 It is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
22 /* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
24 modified by John Hassey (hassey@dg-rtp.dg.com)
25 x86-64 support added by Jan Hubicka (jh@suse.cz)
26 VIA PadLock support by Michal Ludvig (mludvig@suse.cz). */
28 /* The main tables describing the instructions is essentially a copy
29 of the "Opcode Map" chapter (Appendix A) of the Intel 80386
30 Programmers Manual. Usually, there is a capital letter, followed
31 by a small letter. The capital letter tell the addressing mode,
32 and the small letter tells about the operand size. Refer to
33 the Intel manual for details. */
36 #include "disassemble.h"
38 #include "opcode/i386.h"
39 #include "libiberty.h"
43 static int print_insn (bfd_vma, disassemble_info *);
44 static void dofloat (int);
45 static void OP_ST (int, int);
46 static void OP_STi (int, int);
47 static int putop (const char *, int);
48 static void oappend (const char *);
49 static void append_seg (void);
50 static void OP_indirE (int, int);
51 static void print_operand_value (char *, int, bfd_vma);
52 static void OP_E_register (int, int);
53 static void OP_E_memory (int, int);
54 static void print_displacement (char *, bfd_vma);
55 static void OP_E (int, int);
56 static void OP_G (int, int);
57 static bfd_vma get64 (void);
58 static bfd_signed_vma get32 (void);
59 static bfd_signed_vma get32s (void);
60 static int get16 (void);
61 static void set_op (bfd_vma, int);
62 static void OP_Skip_MODRM (int, int);
63 static void OP_REG (int, int);
64 static void OP_IMREG (int, int);
65 static void OP_I (int, int);
66 static void OP_I64 (int, int);
67 static void OP_sI (int, int);
68 static void OP_J (int, int);
69 static void OP_SEG (int, int);
70 static void OP_DIR (int, int);
71 static void OP_OFF (int, int);
72 static void OP_OFF64 (int, int);
73 static void ptr_reg (int, int);
74 static void OP_ESreg (int, int);
75 static void OP_DSreg (int, int);
76 static void OP_C (int, int);
77 static void OP_D (int, int);
78 static void OP_T (int, int);
79 static void OP_R (int, int);
80 static void OP_MMX (int, int);
81 static void OP_XMM (int, int);
82 static void OP_EM (int, int);
83 static void OP_EX (int, int);
84 static void OP_EMC (int,int);
85 static void OP_MXC (int,int);
86 static void OP_MS (int, int);
87 static void OP_XS (int, int);
88 static void OP_M (int, int);
89 static void OP_VEX (int, int);
90 static void OP_EX_Vex (int, int);
91 static void OP_EX_VexW (int, int);
92 static void OP_EX_VexImmW (int, int);
93 static void OP_XMM_Vex (int, int);
94 static void OP_XMM_VexW (int, int);
95 static void OP_Rounding (int, int);
96 static void OP_REG_VexI4 (int, int);
97 static void PCLMUL_Fixup (int, int);
98 static void VZERO_Fixup (int, int);
99 static void VCMP_Fixup (int, int);
100 static void VPCMP_Fixup (int, int);
101 static void VPCOM_Fixup (int, int);
102 static void OP_0f07 (int, int);
103 static void OP_Monitor (int, int);
104 static void OP_Mwait (int, int);
105 static void OP_Mwaitx (int, int);
106 static void NOP_Fixup1 (int, int);
107 static void NOP_Fixup2 (int, int);
108 static void OP_3DNowSuffix (int, int);
109 static void CMP_Fixup (int, int);
110 static void BadOp (void);
111 static void REP_Fixup (int, int);
112 static void BND_Fixup (int, int);
113 static void NOTRACK_Fixup (int, int);
114 static void HLE_Fixup1 (int, int);
115 static void HLE_Fixup2 (int, int);
116 static void HLE_Fixup3 (int, int);
117 static void CMPXCHG8B_Fixup (int, int);
118 static void XMM_Fixup (int, int);
119 static void CRC32_Fixup (int, int);
120 static void FXSAVE_Fixup (int, int);
121 static void PCMPESTR_Fixup (int, int);
122 static void OP_LWPCB_E (int, int);
123 static void OP_LWP_E (int, int);
124 static void OP_Vex_2src_1 (int, int);
125 static void OP_Vex_2src_2 (int, int);
127 static void MOVBE_Fixup (int, int);
129 static void OP_Mask (int, int);
132 /* Points to first byte not fetched. */
133 bfd_byte *max_fetched;
134 bfd_byte the_buffer[MAX_MNEM_SIZE];
137 OPCODES_SIGJMP_BUF bailout;
147 enum address_mode address_mode;
149 /* Flags for the prefixes for the current instruction. See below. */
152 /* REX prefix the current instruction. See below. */
154 /* Bits of REX we've already used. */
156 /* REX bits in original REX prefix ignored. */
157 static int rex_ignored;
158 /* Mark parts used in the REX prefix. When we are testing for
159 empty prefix (for 8bit register REX extension), just mask it
160 out. Otherwise test for REX bit is excuse for existence of REX
161 only in case value is nonzero. */
162 #define USED_REX(value) \
167 rex_used |= (value) | REX_OPCODE; \
170 rex_used |= REX_OPCODE; \
173 /* Flags for prefixes which we somehow handled when printing the
174 current instruction. */
175 static int used_prefixes;
177 /* Flags stored in PREFIXES. */
178 #define PREFIX_REPZ 1
179 #define PREFIX_REPNZ 2
180 #define PREFIX_LOCK 4
182 #define PREFIX_SS 0x10
183 #define PREFIX_DS 0x20
184 #define PREFIX_ES 0x40
185 #define PREFIX_FS 0x80
186 #define PREFIX_GS 0x100
187 #define PREFIX_DATA 0x200
188 #define PREFIX_ADDR 0x400
189 #define PREFIX_FWAIT 0x800
191 /* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
192 to ADDR (exclusive) are valid. Returns 1 for success, longjmps
194 #define FETCH_DATA(info, addr) \
195 ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
196 ? 1 : fetch_data ((info), (addr)))
199 fetch_data (struct disassemble_info *info, bfd_byte *addr)
202 struct dis_private *priv = (struct dis_private *) info->private_data;
203 bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
205 if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
206 status = (*info->read_memory_func) (start,
208 addr - priv->max_fetched,
214 /* If we did manage to read at least one byte, then
215 print_insn_i386 will do something sensible. Otherwise, print
216 an error. We do that here because this is where we know
218 if (priv->max_fetched == priv->the_buffer)
219 (*info->memory_error_func) (status, start, info);
220 OPCODES_SIGLONGJMP (priv->bailout, 1);
223 priv->max_fetched = addr;
227 /* Possible values for prefix requirement. */
228 #define PREFIX_IGNORED_SHIFT 16
229 #define PREFIX_IGNORED_REPZ (PREFIX_REPZ << PREFIX_IGNORED_SHIFT)
230 #define PREFIX_IGNORED_REPNZ (PREFIX_REPNZ << PREFIX_IGNORED_SHIFT)
231 #define PREFIX_IGNORED_DATA (PREFIX_DATA << PREFIX_IGNORED_SHIFT)
232 #define PREFIX_IGNORED_ADDR (PREFIX_ADDR << PREFIX_IGNORED_SHIFT)
233 #define PREFIX_IGNORED_LOCK (PREFIX_LOCK << PREFIX_IGNORED_SHIFT)
235 /* Opcode prefixes. */
236 #define PREFIX_OPCODE (PREFIX_REPZ \
240 /* Prefixes ignored. */
241 #define PREFIX_IGNORED (PREFIX_IGNORED_REPZ \
242 | PREFIX_IGNORED_REPNZ \
243 | PREFIX_IGNORED_DATA)
245 #define XX { NULL, 0 }
246 #define Bad_Opcode NULL, { { NULL, 0 } }, 0
248 #define Eb { OP_E, b_mode }
249 #define Ebnd { OP_E, bnd_mode }
250 #define EbS { OP_E, b_swap_mode }
251 #define EbndS { OP_E, bnd_swap_mode }
252 #define Ev { OP_E, v_mode }
253 #define Eva { OP_E, va_mode }
254 #define Ev_bnd { OP_E, v_bnd_mode }
255 #define EvS { OP_E, v_swap_mode }
256 #define Ed { OP_E, d_mode }
257 #define Edq { OP_E, dq_mode }
258 #define Edqw { OP_E, dqw_mode }
259 #define Edqb { OP_E, dqb_mode }
260 #define Edb { OP_E, db_mode }
261 #define Edw { OP_E, dw_mode }
262 #define Edqd { OP_E, dqd_mode }
263 #define Eq { OP_E, q_mode }
264 #define indirEv { OP_indirE, indir_v_mode }
265 #define indirEp { OP_indirE, f_mode }
266 #define stackEv { OP_E, stack_v_mode }
267 #define Em { OP_E, m_mode }
268 #define Ew { OP_E, w_mode }
269 #define M { OP_M, 0 } /* lea, lgdt, etc. */
270 #define Ma { OP_M, a_mode }
271 #define Mb { OP_M, b_mode }
272 #define Md { OP_M, d_mode }
273 #define Mo { OP_M, o_mode }
274 #define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
275 #define Mq { OP_M, q_mode }
276 #define Mv_bnd { OP_M, v_bndmk_mode }
277 #define Mx { OP_M, x_mode }
278 #define Mxmm { OP_M, xmm_mode }
279 #define Gb { OP_G, b_mode }
280 #define Gbnd { OP_G, bnd_mode }
281 #define Gv { OP_G, v_mode }
282 #define Gd { OP_G, d_mode }
283 #define Gdq { OP_G, dq_mode }
284 #define Gm { OP_G, m_mode }
285 #define Gva { OP_G, va_mode }
286 #define Gw { OP_G, w_mode }
287 #define Rd { OP_R, d_mode }
288 #define Rdq { OP_R, dq_mode }
289 #define Rm { OP_R, m_mode }
290 #define Ib { OP_I, b_mode }
291 #define sIb { OP_sI, b_mode } /* sign extened byte */
292 #define sIbT { OP_sI, b_T_mode } /* sign extened byte like 'T' */
293 #define Iv { OP_I, v_mode }
294 #define sIv { OP_sI, v_mode }
295 #define Iq { OP_I, q_mode }
296 #define Iv64 { OP_I64, v_mode }
297 #define Iw { OP_I, w_mode }
298 #define I1 { OP_I, const_1_mode }
299 #define Jb { OP_J, b_mode }
300 #define Jv { OP_J, v_mode }
301 #define Cm { OP_C, m_mode }
302 #define Dm { OP_D, m_mode }
303 #define Td { OP_T, d_mode }
304 #define Skip_MODRM { OP_Skip_MODRM, 0 }
306 #define RMeAX { OP_REG, eAX_reg }
307 #define RMeBX { OP_REG, eBX_reg }
308 #define RMeCX { OP_REG, eCX_reg }
309 #define RMeDX { OP_REG, eDX_reg }
310 #define RMeSP { OP_REG, eSP_reg }
311 #define RMeBP { OP_REG, eBP_reg }
312 #define RMeSI { OP_REG, eSI_reg }
313 #define RMeDI { OP_REG, eDI_reg }
314 #define RMrAX { OP_REG, rAX_reg }
315 #define RMrBX { OP_REG, rBX_reg }
316 #define RMrCX { OP_REG, rCX_reg }
317 #define RMrDX { OP_REG, rDX_reg }
318 #define RMrSP { OP_REG, rSP_reg }
319 #define RMrBP { OP_REG, rBP_reg }
320 #define RMrSI { OP_REG, rSI_reg }
321 #define RMrDI { OP_REG, rDI_reg }
322 #define RMAL { OP_REG, al_reg }
323 #define RMCL { OP_REG, cl_reg }
324 #define RMDL { OP_REG, dl_reg }
325 #define RMBL { OP_REG, bl_reg }
326 #define RMAH { OP_REG, ah_reg }
327 #define RMCH { OP_REG, ch_reg }
328 #define RMDH { OP_REG, dh_reg }
329 #define RMBH { OP_REG, bh_reg }
330 #define RMAX { OP_REG, ax_reg }
331 #define RMDX { OP_REG, dx_reg }
333 #define eAX { OP_IMREG, eAX_reg }
334 #define eBX { OP_IMREG, eBX_reg }
335 #define eCX { OP_IMREG, eCX_reg }
336 #define eDX { OP_IMREG, eDX_reg }
337 #define eSP { OP_IMREG, eSP_reg }
338 #define eBP { OP_IMREG, eBP_reg }
339 #define eSI { OP_IMREG, eSI_reg }
340 #define eDI { OP_IMREG, eDI_reg }
341 #define AL { OP_IMREG, al_reg }
342 #define CL { OP_IMREG, cl_reg }
343 #define DL { OP_IMREG, dl_reg }
344 #define BL { OP_IMREG, bl_reg }
345 #define AH { OP_IMREG, ah_reg }
346 #define CH { OP_IMREG, ch_reg }
347 #define DH { OP_IMREG, dh_reg }
348 #define BH { OP_IMREG, bh_reg }
349 #define AX { OP_IMREG, ax_reg }
350 #define DX { OP_IMREG, dx_reg }
351 #define zAX { OP_IMREG, z_mode_ax_reg }
352 #define indirDX { OP_IMREG, indir_dx_reg }
354 #define Sw { OP_SEG, w_mode }
355 #define Sv { OP_SEG, v_mode }
356 #define Ap { OP_DIR, 0 }
357 #define Ob { OP_OFF64, b_mode }
358 #define Ov { OP_OFF64, v_mode }
359 #define Xb { OP_DSreg, eSI_reg }
360 #define Xv { OP_DSreg, eSI_reg }
361 #define Xz { OP_DSreg, eSI_reg }
362 #define Yb { OP_ESreg, eDI_reg }
363 #define Yv { OP_ESreg, eDI_reg }
364 #define DSBX { OP_DSreg, eBX_reg }
366 #define es { OP_REG, es_reg }
367 #define ss { OP_REG, ss_reg }
368 #define cs { OP_REG, cs_reg }
369 #define ds { OP_REG, ds_reg }
370 #define fs { OP_REG, fs_reg }
371 #define gs { OP_REG, gs_reg }
373 #define MX { OP_MMX, 0 }
374 #define XM { OP_XMM, 0 }
375 #define XMScalar { OP_XMM, scalar_mode }
376 #define XMGatherQ { OP_XMM, vex_vsib_q_w_dq_mode }
377 #define XMM { OP_XMM, xmm_mode }
378 #define XMxmmq { OP_XMM, xmmq_mode }
379 #define EM { OP_EM, v_mode }
380 #define EMS { OP_EM, v_swap_mode }
381 #define EMd { OP_EM, d_mode }
382 #define EMx { OP_EM, x_mode }
383 #define EXbScalar { OP_EX, b_scalar_mode }
384 #define EXw { OP_EX, w_mode }
385 #define EXwScalar { OP_EX, w_scalar_mode }
386 #define EXd { OP_EX, d_mode }
387 #define EXdScalar { OP_EX, d_scalar_mode }
388 #define EXdS { OP_EX, d_swap_mode }
389 #define EXdScalarS { OP_EX, d_scalar_swap_mode }
390 #define EXq { OP_EX, q_mode }
391 #define EXqScalar { OP_EX, q_scalar_mode }
392 #define EXqScalarS { OP_EX, q_scalar_swap_mode }
393 #define EXqS { OP_EX, q_swap_mode }
394 #define EXx { OP_EX, x_mode }
395 #define EXxS { OP_EX, x_swap_mode }
396 #define EXxmm { OP_EX, xmm_mode }
397 #define EXymm { OP_EX, ymm_mode }
398 #define EXxmmq { OP_EX, xmmq_mode }
399 #define EXEvexHalfBcstXmmq { OP_EX, evex_half_bcst_xmmq_mode }
400 #define EXxmm_mb { OP_EX, xmm_mb_mode }
401 #define EXxmm_mw { OP_EX, xmm_mw_mode }
402 #define EXxmm_md { OP_EX, xmm_md_mode }
403 #define EXxmm_mq { OP_EX, xmm_mq_mode }
404 #define EXxmm_mdq { OP_EX, xmm_mdq_mode }
405 #define EXxmmdw { OP_EX, xmmdw_mode }
406 #define EXxmmqd { OP_EX, xmmqd_mode }
407 #define EXymmq { OP_EX, ymmq_mode }
408 #define EXVexWdq { OP_EX, vex_w_dq_mode }
409 #define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
410 #define EXEvexXGscat { OP_EX, evex_x_gscat_mode }
411 #define EXEvexXNoBcst { OP_EX, evex_x_nobcst_mode }
412 #define MS { OP_MS, v_mode }
413 #define XS { OP_XS, v_mode }
414 #define EMCq { OP_EMC, q_mode }
415 #define MXC { OP_MXC, 0 }
416 #define OPSUF { OP_3DNowSuffix, 0 }
417 #define CMP { CMP_Fixup, 0 }
418 #define XMM0 { XMM_Fixup, 0 }
419 #define FXSAVE { FXSAVE_Fixup, 0 }
420 #define Vex_2src_1 { OP_Vex_2src_1, 0 }
421 #define Vex_2src_2 { OP_Vex_2src_2, 0 }
423 #define Vex { OP_VEX, vex_mode }
424 #define VexScalar { OP_VEX, vex_scalar_mode }
425 #define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode }
426 #define Vex128 { OP_VEX, vex128_mode }
427 #define Vex256 { OP_VEX, vex256_mode }
428 #define VexGdq { OP_VEX, dq_mode }
429 #define EXdVex { OP_EX_Vex, d_mode }
430 #define EXdVexS { OP_EX_Vex, d_swap_mode }
431 #define EXdVexScalarS { OP_EX_Vex, d_scalar_swap_mode }
432 #define EXqVex { OP_EX_Vex, q_mode }
433 #define EXqVexS { OP_EX_Vex, q_swap_mode }
434 #define EXqVexScalarS { OP_EX_Vex, q_scalar_swap_mode }
435 #define EXVexW { OP_EX_VexW, x_mode }
436 #define EXdVexW { OP_EX_VexW, d_mode }
437 #define EXqVexW { OP_EX_VexW, q_mode }
438 #define EXVexImmW { OP_EX_VexImmW, x_mode }
439 #define XMVex { OP_XMM_Vex, 0 }
440 #define XMVexScalar { OP_XMM_Vex, scalar_mode }
441 #define XMVexW { OP_XMM_VexW, 0 }
442 #define XMVexI4 { OP_REG_VexI4, x_mode }
443 #define PCLMUL { PCLMUL_Fixup, 0 }
444 #define VZERO { VZERO_Fixup, 0 }
445 #define VCMP { VCMP_Fixup, 0 }
446 #define VPCMP { VPCMP_Fixup, 0 }
447 #define VPCOM { VPCOM_Fixup, 0 }
449 #define EXxEVexR { OP_Rounding, evex_rounding_mode }
450 #define EXxEVexS { OP_Rounding, evex_sae_mode }
452 #define XMask { OP_Mask, mask_mode }
453 #define MaskG { OP_G, mask_mode }
454 #define MaskE { OP_E, mask_mode }
455 #define MaskBDE { OP_E, mask_bd_mode }
456 #define MaskR { OP_R, mask_mode }
457 #define MaskVex { OP_VEX, mask_mode }
459 #define MVexVSIBDWpX { OP_M, vex_vsib_d_w_dq_mode }
460 #define MVexVSIBDQWpX { OP_M, vex_vsib_d_w_d_mode }
461 #define MVexVSIBQWpX { OP_M, vex_vsib_q_w_dq_mode }
462 #define MVexVSIBQDWpX { OP_M, vex_vsib_q_w_d_mode }
464 /* Used handle "rep" prefix for string instructions. */
465 #define Xbr { REP_Fixup, eSI_reg }
466 #define Xvr { REP_Fixup, eSI_reg }
467 #define Ybr { REP_Fixup, eDI_reg }
468 #define Yvr { REP_Fixup, eDI_reg }
469 #define Yzr { REP_Fixup, eDI_reg }
470 #define indirDXr { REP_Fixup, indir_dx_reg }
471 #define ALr { REP_Fixup, al_reg }
472 #define eAXr { REP_Fixup, eAX_reg }
474 /* Used handle HLE prefix for lockable instructions. */
475 #define Ebh1 { HLE_Fixup1, b_mode }
476 #define Evh1 { HLE_Fixup1, v_mode }
477 #define Ebh2 { HLE_Fixup2, b_mode }
478 #define Evh2 { HLE_Fixup2, v_mode }
479 #define Ebh3 { HLE_Fixup3, b_mode }
480 #define Evh3 { HLE_Fixup3, v_mode }
482 #define BND { BND_Fixup, 0 }
483 #define NOTRACK { NOTRACK_Fixup, 0 }
485 #define cond_jump_flag { NULL, cond_jump_mode }
486 #define loop_jcxz_flag { NULL, loop_jcxz_mode }
488 /* bits in sizeflag */
489 #define SUFFIX_ALWAYS 4
497 /* byte operand with operand swapped */
499 /* byte operand, sign extend like 'T' suffix */
501 /* operand size depends on prefixes */
503 /* operand size depends on prefixes with operand swapped */
505 /* operand size depends on address prefix */
509 /* double word operand */
511 /* double word operand with operand swapped */
513 /* quad word operand */
515 /* quad word operand with operand swapped */
517 /* ten-byte operand */
519 /* 16-byte XMM, 32-byte YMM or 64-byte ZMM operand. In EVEX with
520 broadcast enabled. */
522 /* Similar to x_mode, but with different EVEX mem shifts. */
524 /* Similar to x_mode, but with disabled broadcast. */
526 /* Similar to x_mode, but with operands swapped and disabled broadcast
529 /* 16-byte XMM operand */
531 /* XMM, XMM or YMM register operand, or quad word, xmmword or ymmword
532 memory operand (depending on vector length). Broadcast isn't
535 /* Same as xmmq_mode, but broadcast is allowed. */
536 evex_half_bcst_xmmq_mode,
537 /* XMM register or byte memory operand */
539 /* XMM register or word memory operand */
541 /* XMM register or double word memory operand */
543 /* XMM register or quad word memory operand */
545 /* XMM register or double/quad word memory operand, depending on
548 /* 16-byte XMM, word, double word or quad word operand. */
550 /* 16-byte XMM, double word, quad word operand or xmm word operand. */
552 /* 32-byte YMM operand */
554 /* quad word, ymmword or zmmword memory operand. */
556 /* 32-byte YMM or 16-byte word operand */
558 /* d_mode in 32bit, q_mode in 64bit mode. */
560 /* pair of v_mode operands */
565 /* like v_bnd_mode in 32bit, no RIP-rel in 64bit mode. */
567 /* operand size depends on REX prefixes. */
569 /* registers like dq_mode, memory like w_mode. */
573 /* bounds operand with operand swapped */
575 /* 4- or 6-byte pointer operand */
578 /* v_mode for indirect branch opcodes. */
580 /* v_mode for stack-related opcodes. */
582 /* non-quad operand size depends on prefixes */
584 /* 16-byte operand */
586 /* registers like dq_mode, memory like b_mode. */
588 /* registers like d_mode, memory like b_mode. */
590 /* registers like d_mode, memory like w_mode. */
592 /* registers like dq_mode, memory like d_mode. */
594 /* normal vex mode */
596 /* 128bit vex mode */
598 /* 256bit vex mode */
600 /* operand size depends on the VEX.W bit. */
603 /* Similar to vex_w_dq_mode, with VSIB dword indices. */
604 vex_vsib_d_w_dq_mode,
605 /* Similar to vex_vsib_d_w_dq_mode, with smaller memory. */
607 /* Similar to vex_w_dq_mode, with VSIB qword indices. */
608 vex_vsib_q_w_dq_mode,
609 /* Similar to vex_vsib_q_w_dq_mode, with smaller memory. */
612 /* scalar, ignore vector length. */
614 /* like b_mode, ignore vector length. */
616 /* like w_mode, ignore vector length. */
618 /* like d_mode, ignore vector length. */
620 /* like d_swap_mode, ignore vector length. */
622 /* like q_mode, ignore vector length. */
624 /* like q_swap_mode, ignore vector length. */
626 /* like vex_mode, ignore vector length. */
628 /* like vex_w_dq_mode, ignore vector length. */
629 vex_scalar_w_dq_mode,
631 /* Static rounding. */
633 /* Supress all exceptions. */
636 /* Mask register operand. */
638 /* Mask register operand. */
705 #define FLOAT NULL, { { NULL, FLOATCODE } }, 0
707 #define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }, 0
708 #define DIS386_PREFIX(T, I, P) NULL, { { NULL, (T)}, { NULL, (I) } }, P
709 #define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
710 #define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
711 #define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
712 #define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
713 #define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
714 #define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
715 #define THREE_BYTE_TABLE_PREFIX(I, P) DIS386_PREFIX (USE_3BYTE_TABLE, (I), P)
716 #define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
717 #define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
718 #define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
719 #define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
720 #define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
721 #define EVEX_TABLE(I) DIS386 (USE_EVEX_TABLE, (I))
847 MOD_VEX_0F12_PREFIX_0,
849 MOD_VEX_0F16_PREFIX_0,
852 MOD_VEX_W_0_0F41_P_0_LEN_1,
853 MOD_VEX_W_1_0F41_P_0_LEN_1,
854 MOD_VEX_W_0_0F41_P_2_LEN_1,
855 MOD_VEX_W_1_0F41_P_2_LEN_1,
856 MOD_VEX_W_0_0F42_P_0_LEN_1,
857 MOD_VEX_W_1_0F42_P_0_LEN_1,
858 MOD_VEX_W_0_0F42_P_2_LEN_1,
859 MOD_VEX_W_1_0F42_P_2_LEN_1,
860 MOD_VEX_W_0_0F44_P_0_LEN_1,
861 MOD_VEX_W_1_0F44_P_0_LEN_1,
862 MOD_VEX_W_0_0F44_P_2_LEN_1,
863 MOD_VEX_W_1_0F44_P_2_LEN_1,
864 MOD_VEX_W_0_0F45_P_0_LEN_1,
865 MOD_VEX_W_1_0F45_P_0_LEN_1,
866 MOD_VEX_W_0_0F45_P_2_LEN_1,
867 MOD_VEX_W_1_0F45_P_2_LEN_1,
868 MOD_VEX_W_0_0F46_P_0_LEN_1,
869 MOD_VEX_W_1_0F46_P_0_LEN_1,
870 MOD_VEX_W_0_0F46_P_2_LEN_1,
871 MOD_VEX_W_1_0F46_P_2_LEN_1,
872 MOD_VEX_W_0_0F47_P_0_LEN_1,
873 MOD_VEX_W_1_0F47_P_0_LEN_1,
874 MOD_VEX_W_0_0F47_P_2_LEN_1,
875 MOD_VEX_W_1_0F47_P_2_LEN_1,
876 MOD_VEX_W_0_0F4A_P_0_LEN_1,
877 MOD_VEX_W_1_0F4A_P_0_LEN_1,
878 MOD_VEX_W_0_0F4A_P_2_LEN_1,
879 MOD_VEX_W_1_0F4A_P_2_LEN_1,
880 MOD_VEX_W_0_0F4B_P_0_LEN_1,
881 MOD_VEX_W_1_0F4B_P_0_LEN_1,
882 MOD_VEX_W_0_0F4B_P_2_LEN_1,
894 MOD_VEX_W_0_0F91_P_0_LEN_0,
895 MOD_VEX_W_1_0F91_P_0_LEN_0,
896 MOD_VEX_W_0_0F91_P_2_LEN_0,
897 MOD_VEX_W_1_0F91_P_2_LEN_0,
898 MOD_VEX_W_0_0F92_P_0_LEN_0,
899 MOD_VEX_W_0_0F92_P_2_LEN_0,
900 MOD_VEX_W_0_0F92_P_3_LEN_0,
901 MOD_VEX_W_1_0F92_P_3_LEN_0,
902 MOD_VEX_W_0_0F93_P_0_LEN_0,
903 MOD_VEX_W_0_0F93_P_2_LEN_0,
904 MOD_VEX_W_0_0F93_P_3_LEN_0,
905 MOD_VEX_W_1_0F93_P_3_LEN_0,
906 MOD_VEX_W_0_0F98_P_0_LEN_0,
907 MOD_VEX_W_1_0F98_P_0_LEN_0,
908 MOD_VEX_W_0_0F98_P_2_LEN_0,
909 MOD_VEX_W_1_0F98_P_2_LEN_0,
910 MOD_VEX_W_0_0F99_P_0_LEN_0,
911 MOD_VEX_W_1_0F99_P_0_LEN_0,
912 MOD_VEX_W_0_0F99_P_2_LEN_0,
913 MOD_VEX_W_1_0F99_P_2_LEN_0,
916 MOD_VEX_0FD7_PREFIX_2,
917 MOD_VEX_0FE7_PREFIX_2,
918 MOD_VEX_0FF0_PREFIX_3,
919 MOD_VEX_0F381A_PREFIX_2,
920 MOD_VEX_0F382A_PREFIX_2,
921 MOD_VEX_0F382C_PREFIX_2,
922 MOD_VEX_0F382D_PREFIX_2,
923 MOD_VEX_0F382E_PREFIX_2,
924 MOD_VEX_0F382F_PREFIX_2,
925 MOD_VEX_0F385A_PREFIX_2,
926 MOD_VEX_0F388C_PREFIX_2,
927 MOD_VEX_0F388E_PREFIX_2,
928 MOD_VEX_W_0_0F3A30_P_2_LEN_0,
929 MOD_VEX_W_1_0F3A30_P_2_LEN_0,
930 MOD_VEX_W_0_0F3A31_P_2_LEN_0,
931 MOD_VEX_W_1_0F3A31_P_2_LEN_0,
932 MOD_VEX_W_0_0F3A32_P_2_LEN_0,
933 MOD_VEX_W_1_0F3A32_P_2_LEN_0,
934 MOD_VEX_W_0_0F3A33_P_2_LEN_0,
935 MOD_VEX_W_1_0F3A33_P_2_LEN_0,
937 MOD_EVEX_0F10_PREFIX_1,
938 MOD_EVEX_0F10_PREFIX_3,
939 MOD_EVEX_0F11_PREFIX_1,
940 MOD_EVEX_0F11_PREFIX_3,
941 MOD_EVEX_0F12_PREFIX_0,
942 MOD_EVEX_0F16_PREFIX_0,
943 MOD_EVEX_0F38C6_REG_1,
944 MOD_EVEX_0F38C6_REG_2,
945 MOD_EVEX_0F38C6_REG_5,
946 MOD_EVEX_0F38C6_REG_6,
947 MOD_EVEX_0F38C7_REG_1,
948 MOD_EVEX_0F38C7_REG_2,
949 MOD_EVEX_0F38C7_REG_5,
950 MOD_EVEX_0F38C7_REG_6
971 PREFIX_MOD_0_0F01_REG_5,
972 PREFIX_MOD_3_0F01_REG_5_RM_0,
973 PREFIX_MOD_3_0F01_REG_5_RM_2,
1019 PREFIX_MOD_0_0FAE_REG_4,
1020 PREFIX_MOD_3_0FAE_REG_4,
1021 PREFIX_MOD_0_0FAE_REG_5,
1022 PREFIX_MOD_3_0FAE_REG_5,
1023 PREFIX_MOD_0_0FAE_REG_6,
1024 PREFIX_MOD_1_0FAE_REG_6,
1031 PREFIX_MOD_0_0FC7_REG_6,
1032 PREFIX_MOD_3_0FC7_REG_6,
1033 PREFIX_MOD_3_0FC7_REG_7,
1163 PREFIX_VEX_0F71_REG_2,
1164 PREFIX_VEX_0F71_REG_4,
1165 PREFIX_VEX_0F71_REG_6,
1166 PREFIX_VEX_0F72_REG_2,
1167 PREFIX_VEX_0F72_REG_4,
1168 PREFIX_VEX_0F72_REG_6,
1169 PREFIX_VEX_0F73_REG_2,
1170 PREFIX_VEX_0F73_REG_3,
1171 PREFIX_VEX_0F73_REG_6,
1172 PREFIX_VEX_0F73_REG_7,
1345 PREFIX_VEX_0F38F3_REG_1,
1346 PREFIX_VEX_0F38F3_REG_2,
1347 PREFIX_VEX_0F38F3_REG_3,
1466 PREFIX_EVEX_0F71_REG_2,
1467 PREFIX_EVEX_0F71_REG_4,
1468 PREFIX_EVEX_0F71_REG_6,
1469 PREFIX_EVEX_0F72_REG_0,
1470 PREFIX_EVEX_0F72_REG_1,
1471 PREFIX_EVEX_0F72_REG_2,
1472 PREFIX_EVEX_0F72_REG_4,
1473 PREFIX_EVEX_0F72_REG_6,
1474 PREFIX_EVEX_0F73_REG_2,
1475 PREFIX_EVEX_0F73_REG_3,
1476 PREFIX_EVEX_0F73_REG_6,
1477 PREFIX_EVEX_0F73_REG_7,
1673 PREFIX_EVEX_0F38C6_REG_1,
1674 PREFIX_EVEX_0F38C6_REG_2,
1675 PREFIX_EVEX_0F38C6_REG_5,
1676 PREFIX_EVEX_0F38C6_REG_6,
1677 PREFIX_EVEX_0F38C7_REG_1,
1678 PREFIX_EVEX_0F38C7_REG_2,
1679 PREFIX_EVEX_0F38C7_REG_5,
1680 PREFIX_EVEX_0F38C7_REG_6,
1782 THREE_BYTE_0F38 = 0,
1809 VEX_LEN_0F10_P_1 = 0,
1813 VEX_LEN_0F12_P_0_M_0,
1814 VEX_LEN_0F12_P_0_M_1,
1817 VEX_LEN_0F16_P_0_M_0,
1818 VEX_LEN_0F16_P_0_M_1,
1882 VEX_LEN_0FAE_R_2_M_0,
1883 VEX_LEN_0FAE_R_3_M_0,
1892 VEX_LEN_0F381A_P_2_M_0,
1895 VEX_LEN_0F385A_P_2_M_0,
1898 VEX_LEN_0F38F3_R_1_P_0,
1899 VEX_LEN_0F38F3_R_2_P_0,
1900 VEX_LEN_0F38F3_R_3_P_0,
1945 VEX_LEN_0FXOP_08_CC,
1946 VEX_LEN_0FXOP_08_CD,
1947 VEX_LEN_0FXOP_08_CE,
1948 VEX_LEN_0FXOP_08_CF,
1949 VEX_LEN_0FXOP_08_EC,
1950 VEX_LEN_0FXOP_08_ED,
1951 VEX_LEN_0FXOP_08_EE,
1952 VEX_LEN_0FXOP_08_EF,
1953 VEX_LEN_0FXOP_09_80,
1987 VEX_W_0F41_P_0_LEN_1,
1988 VEX_W_0F41_P_2_LEN_1,
1989 VEX_W_0F42_P_0_LEN_1,
1990 VEX_W_0F42_P_2_LEN_1,
1991 VEX_W_0F44_P_0_LEN_0,
1992 VEX_W_0F44_P_2_LEN_0,
1993 VEX_W_0F45_P_0_LEN_1,
1994 VEX_W_0F45_P_2_LEN_1,
1995 VEX_W_0F46_P_0_LEN_1,
1996 VEX_W_0F46_P_2_LEN_1,
1997 VEX_W_0F47_P_0_LEN_1,
1998 VEX_W_0F47_P_2_LEN_1,
1999 VEX_W_0F4A_P_0_LEN_1,
2000 VEX_W_0F4A_P_2_LEN_1,
2001 VEX_W_0F4B_P_0_LEN_1,
2002 VEX_W_0F4B_P_2_LEN_1,
2082 VEX_W_0F90_P_0_LEN_0,
2083 VEX_W_0F90_P_2_LEN_0,
2084 VEX_W_0F91_P_0_LEN_0,
2085 VEX_W_0F91_P_2_LEN_0,
2086 VEX_W_0F92_P_0_LEN_0,
2087 VEX_W_0F92_P_2_LEN_0,
2088 VEX_W_0F92_P_3_LEN_0,
2089 VEX_W_0F93_P_0_LEN_0,
2090 VEX_W_0F93_P_2_LEN_0,
2091 VEX_W_0F93_P_3_LEN_0,
2092 VEX_W_0F98_P_0_LEN_0,
2093 VEX_W_0F98_P_2_LEN_0,
2094 VEX_W_0F99_P_0_LEN_0,
2095 VEX_W_0F99_P_2_LEN_0,
2174 VEX_W_0F381A_P_2_M_0,
2186 VEX_W_0F382A_P_2_M_0,
2188 VEX_W_0F382C_P_2_M_0,
2189 VEX_W_0F382D_P_2_M_0,
2190 VEX_W_0F382E_P_2_M_0,
2191 VEX_W_0F382F_P_2_M_0,
2213 VEX_W_0F385A_P_2_M_0,
2238 VEX_W_0F3A30_P_2_LEN_0,
2239 VEX_W_0F3A31_P_2_LEN_0,
2240 VEX_W_0F3A32_P_2_LEN_0,
2241 VEX_W_0F3A33_P_2_LEN_0,
2260 EVEX_W_0F10_P_1_M_0,
2261 EVEX_W_0F10_P_1_M_1,
2263 EVEX_W_0F10_P_3_M_0,
2264 EVEX_W_0F10_P_3_M_1,
2266 EVEX_W_0F11_P_1_M_0,
2267 EVEX_W_0F11_P_1_M_1,
2269 EVEX_W_0F11_P_3_M_0,
2270 EVEX_W_0F11_P_3_M_1,
2271 EVEX_W_0F12_P_0_M_0,
2272 EVEX_W_0F12_P_0_M_1,
2282 EVEX_W_0F16_P_0_M_0,
2283 EVEX_W_0F16_P_0_M_1,
2354 EVEX_W_0F72_R_2_P_2,
2355 EVEX_W_0F72_R_6_P_2,
2356 EVEX_W_0F73_R_2_P_2,
2357 EVEX_W_0F73_R_6_P_2,
2465 EVEX_W_0F38C7_R_1_P_2,
2466 EVEX_W_0F38C7_R_2_P_2,
2467 EVEX_W_0F38C7_R_5_P_2,
2468 EVEX_W_0F38C7_R_6_P_2,
2509 typedef void (*op_rtn) (int bytemode, int sizeflag);
2518 unsigned int prefix_requirement;
2521 /* Upper case letters in the instruction names here are macros.
2522 'A' => print 'b' if no register operands or suffix_always is true
2523 'B' => print 'b' if suffix_always is true
2524 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
2526 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
2527 suffix_always is true
2528 'E' => print 'e' if 32-bit form of jcxz
2529 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
2530 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
2531 'H' => print ",pt" or ",pn" branch hint
2532 'I' => honor following macro letter even in Intel mode (implemented only
2533 for some of the macro letters)
2535 'K' => print 'd' or 'q' if rex prefix is present.
2536 'L' => print 'l' if suffix_always is true
2537 'M' => print 'r' if intel_mnemonic is false.
2538 'N' => print 'n' if instruction has no wait "prefix"
2539 'O' => print 'd' or 'o' (or 'q' in Intel mode)
2540 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
2541 or suffix_always is true. print 'q' if rex prefix is present.
2542 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
2544 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
2545 'S' => print 'w', 'l' or 'q' if suffix_always is true
2546 'T' => print 'q' in 64bit mode if instruction has no operand size
2547 prefix and behave as 'P' otherwise
2548 'U' => print 'q' in 64bit mode if instruction has no operand size
2549 prefix and behave as 'Q' otherwise
2550 'V' => print 'q' in 64bit mode if instruction has no operand size
2551 prefix and behave as 'S' otherwise
2552 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
2553 'X' => print 's', 'd' depending on data16 prefix (for XMM)
2555 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
2556 '!' => change condition from true to false or from false to true.
2557 '%' => add 1 upper case letter to the macro.
2558 '^' => print 'w' or 'l' depending on operand size prefix or
2559 suffix_always is true (lcall/ljmp).
2560 '@' => print 'q' for Intel64 ISA, 'w' or 'q' for AMD64 ISA depending
2561 on operand size prefix.
2562 '&' => print 'q' in 64bit mode for Intel64 ISA or if instruction
2563 has no operand size prefix for AMD64 ISA, behave as 'P'
2566 2 upper case letter macros:
2567 "XY" => print 'x' or 'y' if suffix_always is true or no register
2568 operands and no broadcast.
2569 "XZ" => print 'x', 'y', or 'z' if suffix_always is true or no
2570 register operands and no broadcast.
2571 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
2572 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
2573 or suffix_always is true
2574 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
2575 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
2576 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
2577 "LW" => print 'd', 'q' depending on the VEX.W bit
2578 "LP" => print 'w' or 'l' ('d' in Intel mode) if instruction has
2579 an operand size prefix, or suffix_always is true. print
2580 'q' if rex prefix is present.
2582 Many of the above letters print nothing in Intel mode. See "putop"
2585 Braces '{' and '}', and vertical bars '|', indicate alternative
2586 mnemonic strings for AT&T and Intel. */
2588 static const struct dis386 dis386[] = {
2590 { "addB", { Ebh1, Gb }, 0 },
2591 { "addS", { Evh1, Gv }, 0 },
2592 { "addB", { Gb, EbS }, 0 },
2593 { "addS", { Gv, EvS }, 0 },
2594 { "addB", { AL, Ib }, 0 },
2595 { "addS", { eAX, Iv }, 0 },
2596 { X86_64_TABLE (X86_64_06) },
2597 { X86_64_TABLE (X86_64_07) },
2599 { "orB", { Ebh1, Gb }, 0 },
2600 { "orS", { Evh1, Gv }, 0 },
2601 { "orB", { Gb, EbS }, 0 },
2602 { "orS", { Gv, EvS }, 0 },
2603 { "orB", { AL, Ib }, 0 },
2604 { "orS", { eAX, Iv }, 0 },
2605 { X86_64_TABLE (X86_64_0D) },
2606 { Bad_Opcode }, /* 0x0f extended opcode escape */
2608 { "adcB", { Ebh1, Gb }, 0 },
2609 { "adcS", { Evh1, Gv }, 0 },
2610 { "adcB", { Gb, EbS }, 0 },
2611 { "adcS", { Gv, EvS }, 0 },
2612 { "adcB", { AL, Ib }, 0 },
2613 { "adcS", { eAX, Iv }, 0 },
2614 { X86_64_TABLE (X86_64_16) },
2615 { X86_64_TABLE (X86_64_17) },
2617 { "sbbB", { Ebh1, Gb }, 0 },
2618 { "sbbS", { Evh1, Gv }, 0 },
2619 { "sbbB", { Gb, EbS }, 0 },
2620 { "sbbS", { Gv, EvS }, 0 },
2621 { "sbbB", { AL, Ib }, 0 },
2622 { "sbbS", { eAX, Iv }, 0 },
2623 { X86_64_TABLE (X86_64_1E) },
2624 { X86_64_TABLE (X86_64_1F) },
2626 { "andB", { Ebh1, Gb }, 0 },
2627 { "andS", { Evh1, Gv }, 0 },
2628 { "andB", { Gb, EbS }, 0 },
2629 { "andS", { Gv, EvS }, 0 },
2630 { "andB", { AL, Ib }, 0 },
2631 { "andS", { eAX, Iv }, 0 },
2632 { Bad_Opcode }, /* SEG ES prefix */
2633 { X86_64_TABLE (X86_64_27) },
2635 { "subB", { Ebh1, Gb }, 0 },
2636 { "subS", { Evh1, Gv }, 0 },
2637 { "subB", { Gb, EbS }, 0 },
2638 { "subS", { Gv, EvS }, 0 },
2639 { "subB", { AL, Ib }, 0 },
2640 { "subS", { eAX, Iv }, 0 },
2641 { Bad_Opcode }, /* SEG CS prefix */
2642 { X86_64_TABLE (X86_64_2F) },
2644 { "xorB", { Ebh1, Gb }, 0 },
2645 { "xorS", { Evh1, Gv }, 0 },
2646 { "xorB", { Gb, EbS }, 0 },
2647 { "xorS", { Gv, EvS }, 0 },
2648 { "xorB", { AL, Ib }, 0 },
2649 { "xorS", { eAX, Iv }, 0 },
2650 { Bad_Opcode }, /* SEG SS prefix */
2651 { X86_64_TABLE (X86_64_37) },
2653 { "cmpB", { Eb, Gb }, 0 },
2654 { "cmpS", { Ev, Gv }, 0 },
2655 { "cmpB", { Gb, EbS }, 0 },
2656 { "cmpS", { Gv, EvS }, 0 },
2657 { "cmpB", { AL, Ib }, 0 },
2658 { "cmpS", { eAX, Iv }, 0 },
2659 { Bad_Opcode }, /* SEG DS prefix */
2660 { X86_64_TABLE (X86_64_3F) },
2662 { "inc{S|}", { RMeAX }, 0 },
2663 { "inc{S|}", { RMeCX }, 0 },
2664 { "inc{S|}", { RMeDX }, 0 },
2665 { "inc{S|}", { RMeBX }, 0 },
2666 { "inc{S|}", { RMeSP }, 0 },
2667 { "inc{S|}", { RMeBP }, 0 },
2668 { "inc{S|}", { RMeSI }, 0 },
2669 { "inc{S|}", { RMeDI }, 0 },
2671 { "dec{S|}", { RMeAX }, 0 },
2672 { "dec{S|}", { RMeCX }, 0 },
2673 { "dec{S|}", { RMeDX }, 0 },
2674 { "dec{S|}", { RMeBX }, 0 },
2675 { "dec{S|}", { RMeSP }, 0 },
2676 { "dec{S|}", { RMeBP }, 0 },
2677 { "dec{S|}", { RMeSI }, 0 },
2678 { "dec{S|}", { RMeDI }, 0 },
2680 { "pushV", { RMrAX }, 0 },
2681 { "pushV", { RMrCX }, 0 },
2682 { "pushV", { RMrDX }, 0 },
2683 { "pushV", { RMrBX }, 0 },
2684 { "pushV", { RMrSP }, 0 },
2685 { "pushV", { RMrBP }, 0 },
2686 { "pushV", { RMrSI }, 0 },
2687 { "pushV", { RMrDI }, 0 },
2689 { "popV", { RMrAX }, 0 },
2690 { "popV", { RMrCX }, 0 },
2691 { "popV", { RMrDX }, 0 },
2692 { "popV", { RMrBX }, 0 },
2693 { "popV", { RMrSP }, 0 },
2694 { "popV", { RMrBP }, 0 },
2695 { "popV", { RMrSI }, 0 },
2696 { "popV", { RMrDI }, 0 },
2698 { X86_64_TABLE (X86_64_60) },
2699 { X86_64_TABLE (X86_64_61) },
2700 { X86_64_TABLE (X86_64_62) },
2701 { X86_64_TABLE (X86_64_63) },
2702 { Bad_Opcode }, /* seg fs */
2703 { Bad_Opcode }, /* seg gs */
2704 { Bad_Opcode }, /* op size prefix */
2705 { Bad_Opcode }, /* adr size prefix */
2707 { "pushT", { sIv }, 0 },
2708 { "imulS", { Gv, Ev, Iv }, 0 },
2709 { "pushT", { sIbT }, 0 },
2710 { "imulS", { Gv, Ev, sIb }, 0 },
2711 { "ins{b|}", { Ybr, indirDX }, 0 },
2712 { X86_64_TABLE (X86_64_6D) },
2713 { "outs{b|}", { indirDXr, Xb }, 0 },
2714 { X86_64_TABLE (X86_64_6F) },
2716 { "joH", { Jb, BND, cond_jump_flag }, 0 },
2717 { "jnoH", { Jb, BND, cond_jump_flag }, 0 },
2718 { "jbH", { Jb, BND, cond_jump_flag }, 0 },
2719 { "jaeH", { Jb, BND, cond_jump_flag }, 0 },
2720 { "jeH", { Jb, BND, cond_jump_flag }, 0 },
2721 { "jneH", { Jb, BND, cond_jump_flag }, 0 },
2722 { "jbeH", { Jb, BND, cond_jump_flag }, 0 },
2723 { "jaH", { Jb, BND, cond_jump_flag }, 0 },
2725 { "jsH", { Jb, BND, cond_jump_flag }, 0 },
2726 { "jnsH", { Jb, BND, cond_jump_flag }, 0 },
2727 { "jpH", { Jb, BND, cond_jump_flag }, 0 },
2728 { "jnpH", { Jb, BND, cond_jump_flag }, 0 },
2729 { "jlH", { Jb, BND, cond_jump_flag }, 0 },
2730 { "jgeH", { Jb, BND, cond_jump_flag }, 0 },
2731 { "jleH", { Jb, BND, cond_jump_flag }, 0 },
2732 { "jgH", { Jb, BND, cond_jump_flag }, 0 },
2734 { REG_TABLE (REG_80) },
2735 { REG_TABLE (REG_81) },
2736 { X86_64_TABLE (X86_64_82) },
2737 { REG_TABLE (REG_83) },
2738 { "testB", { Eb, Gb }, 0 },
2739 { "testS", { Ev, Gv }, 0 },
2740 { "xchgB", { Ebh2, Gb }, 0 },
2741 { "xchgS", { Evh2, Gv }, 0 },
2743 { "movB", { Ebh3, Gb }, 0 },
2744 { "movS", { Evh3, Gv }, 0 },
2745 { "movB", { Gb, EbS }, 0 },
2746 { "movS", { Gv, EvS }, 0 },
2747 { "movD", { Sv, Sw }, 0 },
2748 { MOD_TABLE (MOD_8D) },
2749 { "movD", { Sw, Sv }, 0 },
2750 { REG_TABLE (REG_8F) },
2752 { PREFIX_TABLE (PREFIX_90) },
2753 { "xchgS", { RMeCX, eAX }, 0 },
2754 { "xchgS", { RMeDX, eAX }, 0 },
2755 { "xchgS", { RMeBX, eAX }, 0 },
2756 { "xchgS", { RMeSP, eAX }, 0 },
2757 { "xchgS", { RMeBP, eAX }, 0 },
2758 { "xchgS", { RMeSI, eAX }, 0 },
2759 { "xchgS", { RMeDI, eAX }, 0 },
2761 { "cW{t|}R", { XX }, 0 },
2762 { "cR{t|}O", { XX }, 0 },
2763 { X86_64_TABLE (X86_64_9A) },
2764 { Bad_Opcode }, /* fwait */
2765 { "pushfT", { XX }, 0 },
2766 { "popfT", { XX }, 0 },
2767 { "sahf", { XX }, 0 },
2768 { "lahf", { XX }, 0 },
2770 { "mov%LB", { AL, Ob }, 0 },
2771 { "mov%LS", { eAX, Ov }, 0 },
2772 { "mov%LB", { Ob, AL }, 0 },
2773 { "mov%LS", { Ov, eAX }, 0 },
2774 { "movs{b|}", { Ybr, Xb }, 0 },
2775 { "movs{R|}", { Yvr, Xv }, 0 },
2776 { "cmps{b|}", { Xb, Yb }, 0 },
2777 { "cmps{R|}", { Xv, Yv }, 0 },
2779 { "testB", { AL, Ib }, 0 },
2780 { "testS", { eAX, Iv }, 0 },
2781 { "stosB", { Ybr, AL }, 0 },
2782 { "stosS", { Yvr, eAX }, 0 },
2783 { "lodsB", { ALr, Xb }, 0 },
2784 { "lodsS", { eAXr, Xv }, 0 },
2785 { "scasB", { AL, Yb }, 0 },
2786 { "scasS", { eAX, Yv }, 0 },
2788 { "movB", { RMAL, Ib }, 0 },
2789 { "movB", { RMCL, Ib }, 0 },
2790 { "movB", { RMDL, Ib }, 0 },
2791 { "movB", { RMBL, Ib }, 0 },
2792 { "movB", { RMAH, Ib }, 0 },
2793 { "movB", { RMCH, Ib }, 0 },
2794 { "movB", { RMDH, Ib }, 0 },
2795 { "movB", { RMBH, Ib }, 0 },
2797 { "mov%LV", { RMeAX, Iv64 }, 0 },
2798 { "mov%LV", { RMeCX, Iv64 }, 0 },
2799 { "mov%LV", { RMeDX, Iv64 }, 0 },
2800 { "mov%LV", { RMeBX, Iv64 }, 0 },
2801 { "mov%LV", { RMeSP, Iv64 }, 0 },
2802 { "mov%LV", { RMeBP, Iv64 }, 0 },
2803 { "mov%LV", { RMeSI, Iv64 }, 0 },
2804 { "mov%LV", { RMeDI, Iv64 }, 0 },
2806 { REG_TABLE (REG_C0) },
2807 { REG_TABLE (REG_C1) },
2808 { "retT", { Iw, BND }, 0 },
2809 { "retT", { BND }, 0 },
2810 { X86_64_TABLE (X86_64_C4) },
2811 { X86_64_TABLE (X86_64_C5) },
2812 { REG_TABLE (REG_C6) },
2813 { REG_TABLE (REG_C7) },
2815 { "enterT", { Iw, Ib }, 0 },
2816 { "leaveT", { XX }, 0 },
2817 { "Jret{|f}P", { Iw }, 0 },
2818 { "Jret{|f}P", { XX }, 0 },
2819 { "int3", { XX }, 0 },
2820 { "int", { Ib }, 0 },
2821 { X86_64_TABLE (X86_64_CE) },
2822 { "iret%LP", { XX }, 0 },
2824 { REG_TABLE (REG_D0) },
2825 { REG_TABLE (REG_D1) },
2826 { REG_TABLE (REG_D2) },
2827 { REG_TABLE (REG_D3) },
2828 { X86_64_TABLE (X86_64_D4) },
2829 { X86_64_TABLE (X86_64_D5) },
2831 { "xlat", { DSBX }, 0 },
2842 { "loopneFH", { Jb, XX, loop_jcxz_flag }, 0 },
2843 { "loopeFH", { Jb, XX, loop_jcxz_flag }, 0 },
2844 { "loopFH", { Jb, XX, loop_jcxz_flag }, 0 },
2845 { "jEcxzH", { Jb, XX, loop_jcxz_flag }, 0 },
2846 { "inB", { AL, Ib }, 0 },
2847 { "inG", { zAX, Ib }, 0 },
2848 { "outB", { Ib, AL }, 0 },
2849 { "outG", { Ib, zAX }, 0 },
2851 { X86_64_TABLE (X86_64_E8) },
2852 { X86_64_TABLE (X86_64_E9) },
2853 { X86_64_TABLE (X86_64_EA) },
2854 { "jmp", { Jb, BND }, 0 },
2855 { "inB", { AL, indirDX }, 0 },
2856 { "inG", { zAX, indirDX }, 0 },
2857 { "outB", { indirDX, AL }, 0 },
2858 { "outG", { indirDX, zAX }, 0 },
2860 { Bad_Opcode }, /* lock prefix */
2861 { "icebp", { XX }, 0 },
2862 { Bad_Opcode }, /* repne */
2863 { Bad_Opcode }, /* repz */
2864 { "hlt", { XX }, 0 },
2865 { "cmc", { XX }, 0 },
2866 { REG_TABLE (REG_F6) },
2867 { REG_TABLE (REG_F7) },
2869 { "clc", { XX }, 0 },
2870 { "stc", { XX }, 0 },
2871 { "cli", { XX }, 0 },
2872 { "sti", { XX }, 0 },
2873 { "cld", { XX }, 0 },
2874 { "std", { XX }, 0 },
2875 { REG_TABLE (REG_FE) },
2876 { REG_TABLE (REG_FF) },
2879 static const struct dis386 dis386_twobyte[] = {
2881 { REG_TABLE (REG_0F00 ) },
2882 { REG_TABLE (REG_0F01 ) },
2883 { "larS", { Gv, Ew }, 0 },
2884 { "lslS", { Gv, Ew }, 0 },
2886 { "syscall", { XX }, 0 },
2887 { "clts", { XX }, 0 },
2888 { "sysret%LP", { XX }, 0 },
2890 { "invd", { XX }, 0 },
2891 { PREFIX_TABLE (PREFIX_0F09) },
2893 { "ud2", { XX }, 0 },
2895 { REG_TABLE (REG_0F0D) },
2896 { "femms", { XX }, 0 },
2897 { "", { MX, EM, OPSUF }, 0 }, /* See OP_3DNowSuffix. */
2899 { PREFIX_TABLE (PREFIX_0F10) },
2900 { PREFIX_TABLE (PREFIX_0F11) },
2901 { PREFIX_TABLE (PREFIX_0F12) },
2902 { MOD_TABLE (MOD_0F13) },
2903 { "unpcklpX", { XM, EXx }, PREFIX_OPCODE },
2904 { "unpckhpX", { XM, EXx }, PREFIX_OPCODE },
2905 { PREFIX_TABLE (PREFIX_0F16) },
2906 { MOD_TABLE (MOD_0F17) },
2908 { REG_TABLE (REG_0F18) },
2909 { "nopQ", { Ev }, 0 },
2910 { PREFIX_TABLE (PREFIX_0F1A) },
2911 { PREFIX_TABLE (PREFIX_0F1B) },
2912 { PREFIX_TABLE (PREFIX_0F1C) },
2913 { "nopQ", { Ev }, 0 },
2914 { PREFIX_TABLE (PREFIX_0F1E) },
2915 { "nopQ", { Ev }, 0 },
2917 { "movZ", { Rm, Cm }, 0 },
2918 { "movZ", { Rm, Dm }, 0 },
2919 { "movZ", { Cm, Rm }, 0 },
2920 { "movZ", { Dm, Rm }, 0 },
2921 { MOD_TABLE (MOD_0F24) },
2923 { MOD_TABLE (MOD_0F26) },
2926 { "movapX", { XM, EXx }, PREFIX_OPCODE },
2927 { "movapX", { EXxS, XM }, PREFIX_OPCODE },
2928 { PREFIX_TABLE (PREFIX_0F2A) },
2929 { PREFIX_TABLE (PREFIX_0F2B) },
2930 { PREFIX_TABLE (PREFIX_0F2C) },
2931 { PREFIX_TABLE (PREFIX_0F2D) },
2932 { PREFIX_TABLE (PREFIX_0F2E) },
2933 { PREFIX_TABLE (PREFIX_0F2F) },
2935 { "wrmsr", { XX }, 0 },
2936 { "rdtsc", { XX }, 0 },
2937 { "rdmsr", { XX }, 0 },
2938 { "rdpmc", { XX }, 0 },
2939 { "sysenter", { XX }, 0 },
2940 { "sysexit", { XX }, 0 },
2942 { "getsec", { XX }, 0 },
2944 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F38, PREFIX_OPCODE) },
2946 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F3A, PREFIX_OPCODE) },
2953 { "cmovoS", { Gv, Ev }, 0 },
2954 { "cmovnoS", { Gv, Ev }, 0 },
2955 { "cmovbS", { Gv, Ev }, 0 },
2956 { "cmovaeS", { Gv, Ev }, 0 },
2957 { "cmoveS", { Gv, Ev }, 0 },
2958 { "cmovneS", { Gv, Ev }, 0 },
2959 { "cmovbeS", { Gv, Ev }, 0 },
2960 { "cmovaS", { Gv, Ev }, 0 },
2962 { "cmovsS", { Gv, Ev }, 0 },
2963 { "cmovnsS", { Gv, Ev }, 0 },
2964 { "cmovpS", { Gv, Ev }, 0 },
2965 { "cmovnpS", { Gv, Ev }, 0 },
2966 { "cmovlS", { Gv, Ev }, 0 },
2967 { "cmovgeS", { Gv, Ev }, 0 },
2968 { "cmovleS", { Gv, Ev }, 0 },
2969 { "cmovgS", { Gv, Ev }, 0 },
2971 { MOD_TABLE (MOD_0F51) },
2972 { PREFIX_TABLE (PREFIX_0F51) },
2973 { PREFIX_TABLE (PREFIX_0F52) },
2974 { PREFIX_TABLE (PREFIX_0F53) },
2975 { "andpX", { XM, EXx }, PREFIX_OPCODE },
2976 { "andnpX", { XM, EXx }, PREFIX_OPCODE },
2977 { "orpX", { XM, EXx }, PREFIX_OPCODE },
2978 { "xorpX", { XM, EXx }, PREFIX_OPCODE },
2980 { PREFIX_TABLE (PREFIX_0F58) },
2981 { PREFIX_TABLE (PREFIX_0F59) },
2982 { PREFIX_TABLE (PREFIX_0F5A) },
2983 { PREFIX_TABLE (PREFIX_0F5B) },
2984 { PREFIX_TABLE (PREFIX_0F5C) },
2985 { PREFIX_TABLE (PREFIX_0F5D) },
2986 { PREFIX_TABLE (PREFIX_0F5E) },
2987 { PREFIX_TABLE (PREFIX_0F5F) },
2989 { PREFIX_TABLE (PREFIX_0F60) },
2990 { PREFIX_TABLE (PREFIX_0F61) },
2991 { PREFIX_TABLE (PREFIX_0F62) },
2992 { "packsswb", { MX, EM }, PREFIX_OPCODE },
2993 { "pcmpgtb", { MX, EM }, PREFIX_OPCODE },
2994 { "pcmpgtw", { MX, EM }, PREFIX_OPCODE },
2995 { "pcmpgtd", { MX, EM }, PREFIX_OPCODE },
2996 { "packuswb", { MX, EM }, PREFIX_OPCODE },
2998 { "punpckhbw", { MX, EM }, PREFIX_OPCODE },
2999 { "punpckhwd", { MX, EM }, PREFIX_OPCODE },
3000 { "punpckhdq", { MX, EM }, PREFIX_OPCODE },
3001 { "packssdw", { MX, EM }, PREFIX_OPCODE },
3002 { PREFIX_TABLE (PREFIX_0F6C) },
3003 { PREFIX_TABLE (PREFIX_0F6D) },
3004 { "movK", { MX, Edq }, PREFIX_OPCODE },
3005 { PREFIX_TABLE (PREFIX_0F6F) },
3007 { PREFIX_TABLE (PREFIX_0F70) },
3008 { REG_TABLE (REG_0F71) },
3009 { REG_TABLE (REG_0F72) },
3010 { REG_TABLE (REG_0F73) },
3011 { "pcmpeqb", { MX, EM }, PREFIX_OPCODE },
3012 { "pcmpeqw", { MX, EM }, PREFIX_OPCODE },
3013 { "pcmpeqd", { MX, EM }, PREFIX_OPCODE },
3014 { "emms", { XX }, PREFIX_OPCODE },
3016 { PREFIX_TABLE (PREFIX_0F78) },
3017 { PREFIX_TABLE (PREFIX_0F79) },
3020 { PREFIX_TABLE (PREFIX_0F7C) },
3021 { PREFIX_TABLE (PREFIX_0F7D) },
3022 { PREFIX_TABLE (PREFIX_0F7E) },
3023 { PREFIX_TABLE (PREFIX_0F7F) },
3025 { "joH", { Jv, BND, cond_jump_flag }, 0 },
3026 { "jnoH", { Jv, BND, cond_jump_flag }, 0 },
3027 { "jbH", { Jv, BND, cond_jump_flag }, 0 },
3028 { "jaeH", { Jv, BND, cond_jump_flag }, 0 },
3029 { "jeH", { Jv, BND, cond_jump_flag }, 0 },
3030 { "jneH", { Jv, BND, cond_jump_flag }, 0 },
3031 { "jbeH", { Jv, BND, cond_jump_flag }, 0 },
3032 { "jaH", { Jv, BND, cond_jump_flag }, 0 },
3034 { "jsH", { Jv, BND, cond_jump_flag }, 0 },
3035 { "jnsH", { Jv, BND, cond_jump_flag }, 0 },
3036 { "jpH", { Jv, BND, cond_jump_flag }, 0 },
3037 { "jnpH", { Jv, BND, cond_jump_flag }, 0 },
3038 { "jlH", { Jv, BND, cond_jump_flag }, 0 },
3039 { "jgeH", { Jv, BND, cond_jump_flag }, 0 },
3040 { "jleH", { Jv, BND, cond_jump_flag }, 0 },
3041 { "jgH", { Jv, BND, cond_jump_flag }, 0 },
3043 { "seto", { Eb }, 0 },
3044 { "setno", { Eb }, 0 },
3045 { "setb", { Eb }, 0 },
3046 { "setae", { Eb }, 0 },
3047 { "sete", { Eb }, 0 },
3048 { "setne", { Eb }, 0 },
3049 { "setbe", { Eb }, 0 },
3050 { "seta", { Eb }, 0 },
3052 { "sets", { Eb }, 0 },
3053 { "setns", { Eb }, 0 },
3054 { "setp", { Eb }, 0 },
3055 { "setnp", { Eb }, 0 },
3056 { "setl", { Eb }, 0 },
3057 { "setge", { Eb }, 0 },
3058 { "setle", { Eb }, 0 },
3059 { "setg", { Eb }, 0 },
3061 { "pushT", { fs }, 0 },
3062 { "popT", { fs }, 0 },
3063 { "cpuid", { XX }, 0 },
3064 { "btS", { Ev, Gv }, 0 },
3065 { "shldS", { Ev, Gv, Ib }, 0 },
3066 { "shldS", { Ev, Gv, CL }, 0 },
3067 { REG_TABLE (REG_0FA6) },
3068 { REG_TABLE (REG_0FA7) },
3070 { "pushT", { gs }, 0 },
3071 { "popT", { gs }, 0 },
3072 { "rsm", { XX }, 0 },
3073 { "btsS", { Evh1, Gv }, 0 },
3074 { "shrdS", { Ev, Gv, Ib }, 0 },
3075 { "shrdS", { Ev, Gv, CL }, 0 },
3076 { REG_TABLE (REG_0FAE) },
3077 { "imulS", { Gv, Ev }, 0 },
3079 { "cmpxchgB", { Ebh1, Gb }, 0 },
3080 { "cmpxchgS", { Evh1, Gv }, 0 },
3081 { MOD_TABLE (MOD_0FB2) },
3082 { "btrS", { Evh1, Gv }, 0 },
3083 { MOD_TABLE (MOD_0FB4) },
3084 { MOD_TABLE (MOD_0FB5) },
3085 { "movz{bR|x}", { Gv, Eb }, 0 },
3086 { "movz{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movzww ! */
3088 { PREFIX_TABLE (PREFIX_0FB8) },
3089 { "ud1S", { Gv, Ev }, 0 },
3090 { REG_TABLE (REG_0FBA) },
3091 { "btcS", { Evh1, Gv }, 0 },
3092 { PREFIX_TABLE (PREFIX_0FBC) },
3093 { PREFIX_TABLE (PREFIX_0FBD) },
3094 { "movs{bR|x}", { Gv, Eb }, 0 },
3095 { "movs{wR|x}", { Gv, Ew }, 0 }, /* yes, there really is movsww ! */
3097 { "xaddB", { Ebh1, Gb }, 0 },
3098 { "xaddS", { Evh1, Gv }, 0 },
3099 { PREFIX_TABLE (PREFIX_0FC2) },
3100 { MOD_TABLE (MOD_0FC3) },
3101 { "pinsrw", { MX, Edqw, Ib }, PREFIX_OPCODE },
3102 { "pextrw", { Gdq, MS, Ib }, PREFIX_OPCODE },
3103 { "shufpX", { XM, EXx, Ib }, PREFIX_OPCODE },
3104 { REG_TABLE (REG_0FC7) },
3106 { "bswap", { RMeAX }, 0 },
3107 { "bswap", { RMeCX }, 0 },
3108 { "bswap", { RMeDX }, 0 },
3109 { "bswap", { RMeBX }, 0 },
3110 { "bswap", { RMeSP }, 0 },
3111 { "bswap", { RMeBP }, 0 },
3112 { "bswap", { RMeSI }, 0 },
3113 { "bswap", { RMeDI }, 0 },
3115 { PREFIX_TABLE (PREFIX_0FD0) },
3116 { "psrlw", { MX, EM }, PREFIX_OPCODE },
3117 { "psrld", { MX, EM }, PREFIX_OPCODE },
3118 { "psrlq", { MX, EM }, PREFIX_OPCODE },
3119 { "paddq", { MX, EM }, PREFIX_OPCODE },
3120 { "pmullw", { MX, EM }, PREFIX_OPCODE },
3121 { PREFIX_TABLE (PREFIX_0FD6) },
3122 { MOD_TABLE (MOD_0FD7) },
3124 { "psubusb", { MX, EM }, PREFIX_OPCODE },
3125 { "psubusw", { MX, EM }, PREFIX_OPCODE },
3126 { "pminub", { MX, EM }, PREFIX_OPCODE },
3127 { "pand", { MX, EM }, PREFIX_OPCODE },
3128 { "paddusb", { MX, EM }, PREFIX_OPCODE },
3129 { "paddusw", { MX, EM }, PREFIX_OPCODE },
3130 { "pmaxub", { MX, EM }, PREFIX_OPCODE },
3131 { "pandn", { MX, EM }, PREFIX_OPCODE },
3133 { "pavgb", { MX, EM }, PREFIX_OPCODE },
3134 { "psraw", { MX, EM }, PREFIX_OPCODE },
3135 { "psrad", { MX, EM }, PREFIX_OPCODE },
3136 { "pavgw", { MX, EM }, PREFIX_OPCODE },
3137 { "pmulhuw", { MX, EM }, PREFIX_OPCODE },
3138 { "pmulhw", { MX, EM }, PREFIX_OPCODE },
3139 { PREFIX_TABLE (PREFIX_0FE6) },
3140 { PREFIX_TABLE (PREFIX_0FE7) },
3142 { "psubsb", { MX, EM }, PREFIX_OPCODE },
3143 { "psubsw", { MX, EM }, PREFIX_OPCODE },
3144 { "pminsw", { MX, EM }, PREFIX_OPCODE },
3145 { "por", { MX, EM }, PREFIX_OPCODE },
3146 { "paddsb", { MX, EM }, PREFIX_OPCODE },
3147 { "paddsw", { MX, EM }, PREFIX_OPCODE },
3148 { "pmaxsw", { MX, EM }, PREFIX_OPCODE },
3149 { "pxor", { MX, EM }, PREFIX_OPCODE },
3151 { PREFIX_TABLE (PREFIX_0FF0) },
3152 { "psllw", { MX, EM }, PREFIX_OPCODE },
3153 { "pslld", { MX, EM }, PREFIX_OPCODE },
3154 { "psllq", { MX, EM }, PREFIX_OPCODE },
3155 { "pmuludq", { MX, EM }, PREFIX_OPCODE },
3156 { "pmaddwd", { MX, EM }, PREFIX_OPCODE },
3157 { "psadbw", { MX, EM }, PREFIX_OPCODE },
3158 { PREFIX_TABLE (PREFIX_0FF7) },
3160 { "psubb", { MX, EM }, PREFIX_OPCODE },
3161 { "psubw", { MX, EM }, PREFIX_OPCODE },
3162 { "psubd", { MX, EM }, PREFIX_OPCODE },
3163 { "psubq", { MX, EM }, PREFIX_OPCODE },
3164 { "paddb", { MX, EM }, PREFIX_OPCODE },
3165 { "paddw", { MX, EM }, PREFIX_OPCODE },
3166 { "paddd", { MX, EM }, PREFIX_OPCODE },
3167 { "ud0S", { Gv, Ev }, 0 },
3170 static const unsigned char onebyte_has_modrm[256] = {
3171 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3172 /* ------------------------------- */
3173 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
3174 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
3175 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
3176 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
3177 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
3178 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
3179 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
3180 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
3181 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
3182 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
3183 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
3184 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
3185 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
3186 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
3187 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
3188 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
3189 /* ------------------------------- */
3190 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3193 static const unsigned char twobyte_has_modrm[256] = {
3194 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3195 /* ------------------------------- */
3196 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
3197 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
3198 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
3199 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
3200 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
3201 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
3202 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
3203 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
3204 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
3205 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
3206 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
3207 /* b0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* bf */
3208 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
3209 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
3210 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
3211 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 /* ff */
3212 /* ------------------------------- */
3213 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3216 static char obuf[100];
3218 static char *mnemonicendp;
3219 static char scratchbuf[100];
3220 static unsigned char *start_codep;
3221 static unsigned char *insn_codep;
3222 static unsigned char *codep;
3223 static unsigned char *end_codep;
3224 static int last_lock_prefix;
3225 static int last_repz_prefix;
3226 static int last_repnz_prefix;
3227 static int last_data_prefix;
3228 static int last_addr_prefix;
3229 static int last_rex_prefix;
3230 static int last_seg_prefix;
3231 static int fwait_prefix;
3232 /* The active segment register prefix. */
3233 static int active_seg_prefix;
3234 #define MAX_CODE_LENGTH 15
3235 /* We can up to 14 prefixes since the maximum instruction length is
3237 static int all_prefixes[MAX_CODE_LENGTH - 1];
3238 static disassemble_info *the_info;
3246 static unsigned char need_modrm;
3256 int register_specifier;
3263 int mask_register_specifier;
3269 static unsigned char need_vex;
3270 static unsigned char need_vex_reg;
3271 static unsigned char vex_w_done;
3279 /* If we are accessing mod/rm/reg without need_modrm set, then the
3280 values are stale. Hitting this abort likely indicates that you
3281 need to update onebyte_has_modrm or twobyte_has_modrm. */
3282 #define MODRM_CHECK if (!need_modrm) abort ()
3284 static const char **names64;
3285 static const char **names32;
3286 static const char **names16;
3287 static const char **names8;
3288 static const char **names8rex;
3289 static const char **names_seg;
3290 static const char *index64;
3291 static const char *index32;
3292 static const char **index16;
3293 static const char **names_bnd;
3295 static const char *intel_names64[] = {
3296 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
3297 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
3299 static const char *intel_names32[] = {
3300 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
3301 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
3303 static const char *intel_names16[] = {
3304 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
3305 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
3307 static const char *intel_names8[] = {
3308 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
3310 static const char *intel_names8rex[] = {
3311 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
3312 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
3314 static const char *intel_names_seg[] = {
3315 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
3317 static const char *intel_index64 = "riz";
3318 static const char *intel_index32 = "eiz";
3319 static const char *intel_index16[] = {
3320 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
3323 static const char *att_names64[] = {
3324 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
3325 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
3327 static const char *att_names32[] = {
3328 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
3329 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
3331 static const char *att_names16[] = {
3332 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
3333 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
3335 static const char *att_names8[] = {
3336 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
3338 static const char *att_names8rex[] = {
3339 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
3340 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
3342 static const char *att_names_seg[] = {
3343 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
3345 static const char *att_index64 = "%riz";
3346 static const char *att_index32 = "%eiz";
3347 static const char *att_index16[] = {
3348 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
3351 static const char **names_mm;
3352 static const char *intel_names_mm[] = {
3353 "mm0", "mm1", "mm2", "mm3",
3354 "mm4", "mm5", "mm6", "mm7"
3356 static const char *att_names_mm[] = {
3357 "%mm0", "%mm1", "%mm2", "%mm3",
3358 "%mm4", "%mm5", "%mm6", "%mm7"
3361 static const char *intel_names_bnd[] = {
3362 "bnd0", "bnd1", "bnd2", "bnd3"
3365 static const char *att_names_bnd[] = {
3366 "%bnd0", "%bnd1", "%bnd2", "%bnd3"
3369 static const char **names_xmm;
3370 static const char *intel_names_xmm[] = {
3371 "xmm0", "xmm1", "xmm2", "xmm3",
3372 "xmm4", "xmm5", "xmm6", "xmm7",
3373 "xmm8", "xmm9", "xmm10", "xmm11",
3374 "xmm12", "xmm13", "xmm14", "xmm15",
3375 "xmm16", "xmm17", "xmm18", "xmm19",
3376 "xmm20", "xmm21", "xmm22", "xmm23",
3377 "xmm24", "xmm25", "xmm26", "xmm27",
3378 "xmm28", "xmm29", "xmm30", "xmm31"
3380 static const char *att_names_xmm[] = {
3381 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
3382 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
3383 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
3384 "%xmm12", "%xmm13", "%xmm14", "%xmm15",
3385 "%xmm16", "%xmm17", "%xmm18", "%xmm19",
3386 "%xmm20", "%xmm21", "%xmm22", "%xmm23",
3387 "%xmm24", "%xmm25", "%xmm26", "%xmm27",
3388 "%xmm28", "%xmm29", "%xmm30", "%xmm31"
3391 static const char **names_ymm;
3392 static const char *intel_names_ymm[] = {
3393 "ymm0", "ymm1", "ymm2", "ymm3",
3394 "ymm4", "ymm5", "ymm6", "ymm7",
3395 "ymm8", "ymm9", "ymm10", "ymm11",
3396 "ymm12", "ymm13", "ymm14", "ymm15",
3397 "ymm16", "ymm17", "ymm18", "ymm19",
3398 "ymm20", "ymm21", "ymm22", "ymm23",
3399 "ymm24", "ymm25", "ymm26", "ymm27",
3400 "ymm28", "ymm29", "ymm30", "ymm31"
3402 static const char *att_names_ymm[] = {
3403 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
3404 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
3405 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
3406 "%ymm12", "%ymm13", "%ymm14", "%ymm15",
3407 "%ymm16", "%ymm17", "%ymm18", "%ymm19",
3408 "%ymm20", "%ymm21", "%ymm22", "%ymm23",
3409 "%ymm24", "%ymm25", "%ymm26", "%ymm27",
3410 "%ymm28", "%ymm29", "%ymm30", "%ymm31"
3413 static const char **names_zmm;
3414 static const char *intel_names_zmm[] = {
3415 "zmm0", "zmm1", "zmm2", "zmm3",
3416 "zmm4", "zmm5", "zmm6", "zmm7",
3417 "zmm8", "zmm9", "zmm10", "zmm11",
3418 "zmm12", "zmm13", "zmm14", "zmm15",
3419 "zmm16", "zmm17", "zmm18", "zmm19",
3420 "zmm20", "zmm21", "zmm22", "zmm23",
3421 "zmm24", "zmm25", "zmm26", "zmm27",
3422 "zmm28", "zmm29", "zmm30", "zmm31"
3424 static const char *att_names_zmm[] = {
3425 "%zmm0", "%zmm1", "%zmm2", "%zmm3",
3426 "%zmm4", "%zmm5", "%zmm6", "%zmm7",
3427 "%zmm8", "%zmm9", "%zmm10", "%zmm11",
3428 "%zmm12", "%zmm13", "%zmm14", "%zmm15",
3429 "%zmm16", "%zmm17", "%zmm18", "%zmm19",
3430 "%zmm20", "%zmm21", "%zmm22", "%zmm23",
3431 "%zmm24", "%zmm25", "%zmm26", "%zmm27",
3432 "%zmm28", "%zmm29", "%zmm30", "%zmm31"
3435 static const char **names_mask;
3436 static const char *intel_names_mask[] = {
3437 "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"
3439 static const char *att_names_mask[] = {
3440 "%k0", "%k1", "%k2", "%k3", "%k4", "%k5", "%k6", "%k7"
3443 static const char *names_rounding[] =
3451 static const struct dis386 reg_table[][8] = {
3454 { "addA", { Ebh1, Ib }, 0 },
3455 { "orA", { Ebh1, Ib }, 0 },
3456 { "adcA", { Ebh1, Ib }, 0 },
3457 { "sbbA", { Ebh1, Ib }, 0 },
3458 { "andA", { Ebh1, Ib }, 0 },
3459 { "subA", { Ebh1, Ib }, 0 },
3460 { "xorA", { Ebh1, Ib }, 0 },
3461 { "cmpA", { Eb, Ib }, 0 },
3465 { "addQ", { Evh1, Iv }, 0 },
3466 { "orQ", { Evh1, Iv }, 0 },
3467 { "adcQ", { Evh1, Iv }, 0 },
3468 { "sbbQ", { Evh1, Iv }, 0 },
3469 { "andQ", { Evh1, Iv }, 0 },
3470 { "subQ", { Evh1, Iv }, 0 },
3471 { "xorQ", { Evh1, Iv }, 0 },
3472 { "cmpQ", { Ev, Iv }, 0 },
3476 { "addQ", { Evh1, sIb }, 0 },
3477 { "orQ", { Evh1, sIb }, 0 },
3478 { "adcQ", { Evh1, sIb }, 0 },
3479 { "sbbQ", { Evh1, sIb }, 0 },
3480 { "andQ", { Evh1, sIb }, 0 },
3481 { "subQ", { Evh1, sIb }, 0 },
3482 { "xorQ", { Evh1, sIb }, 0 },
3483 { "cmpQ", { Ev, sIb }, 0 },
3487 { "popU", { stackEv }, 0 },
3488 { XOP_8F_TABLE (XOP_09) },
3492 { XOP_8F_TABLE (XOP_09) },
3496 { "rolA", { Eb, Ib }, 0 },
3497 { "rorA", { Eb, Ib }, 0 },
3498 { "rclA", { Eb, Ib }, 0 },
3499 { "rcrA", { Eb, Ib }, 0 },
3500 { "shlA", { Eb, Ib }, 0 },
3501 { "shrA", { Eb, Ib }, 0 },
3502 { "shlA", { Eb, Ib }, 0 },
3503 { "sarA", { Eb, Ib }, 0 },
3507 { "rolQ", { Ev, Ib }, 0 },
3508 { "rorQ", { Ev, Ib }, 0 },
3509 { "rclQ", { Ev, Ib }, 0 },
3510 { "rcrQ", { Ev, Ib }, 0 },
3511 { "shlQ", { Ev, Ib }, 0 },
3512 { "shrQ", { Ev, Ib }, 0 },
3513 { "shlQ", { Ev, Ib }, 0 },
3514 { "sarQ", { Ev, Ib }, 0 },
3518 { "movA", { Ebh3, Ib }, 0 },
3525 { MOD_TABLE (MOD_C6_REG_7) },
3529 { "movQ", { Evh3, Iv }, 0 },
3536 { MOD_TABLE (MOD_C7_REG_7) },
3540 { "rolA", { Eb, I1 }, 0 },
3541 { "rorA", { Eb, I1 }, 0 },
3542 { "rclA", { Eb, I1 }, 0 },
3543 { "rcrA", { Eb, I1 }, 0 },
3544 { "shlA", { Eb, I1 }, 0 },
3545 { "shrA", { Eb, I1 }, 0 },
3546 { "shlA", { Eb, I1 }, 0 },
3547 { "sarA", { Eb, I1 }, 0 },
3551 { "rolQ", { Ev, I1 }, 0 },
3552 { "rorQ", { Ev, I1 }, 0 },
3553 { "rclQ", { Ev, I1 }, 0 },
3554 { "rcrQ", { Ev, I1 }, 0 },
3555 { "shlQ", { Ev, I1 }, 0 },
3556 { "shrQ", { Ev, I1 }, 0 },
3557 { "shlQ", { Ev, I1 }, 0 },
3558 { "sarQ", { Ev, I1 }, 0 },
3562 { "rolA", { Eb, CL }, 0 },
3563 { "rorA", { Eb, CL }, 0 },
3564 { "rclA", { Eb, CL }, 0 },
3565 { "rcrA", { Eb, CL }, 0 },
3566 { "shlA", { Eb, CL }, 0 },
3567 { "shrA", { Eb, CL }, 0 },
3568 { "shlA", { Eb, CL }, 0 },
3569 { "sarA", { Eb, CL }, 0 },
3573 { "rolQ", { Ev, CL }, 0 },
3574 { "rorQ", { Ev, CL }, 0 },
3575 { "rclQ", { Ev, CL }, 0 },
3576 { "rcrQ", { Ev, CL }, 0 },
3577 { "shlQ", { Ev, CL }, 0 },
3578 { "shrQ", { Ev, CL }, 0 },
3579 { "shlQ", { Ev, CL }, 0 },
3580 { "sarQ", { Ev, CL }, 0 },
3584 { "testA", { Eb, Ib }, 0 },
3585 { "testA", { Eb, Ib }, 0 },
3586 { "notA", { Ebh1 }, 0 },
3587 { "negA", { Ebh1 }, 0 },
3588 { "mulA", { Eb }, 0 }, /* Don't print the implicit %al register, */
3589 { "imulA", { Eb }, 0 }, /* to distinguish these opcodes from other */
3590 { "divA", { Eb }, 0 }, /* mul/imul opcodes. Do the same for div */
3591 { "idivA", { Eb }, 0 }, /* and idiv for consistency. */
3595 { "testQ", { Ev, Iv }, 0 },
3596 { "testQ", { Ev, Iv }, 0 },
3597 { "notQ", { Evh1 }, 0 },
3598 { "negQ", { Evh1 }, 0 },
3599 { "mulQ", { Ev }, 0 }, /* Don't print the implicit register. */
3600 { "imulQ", { Ev }, 0 },
3601 { "divQ", { Ev }, 0 },
3602 { "idivQ", { Ev }, 0 },
3606 { "incA", { Ebh1 }, 0 },
3607 { "decA", { Ebh1 }, 0 },
3611 { "incQ", { Evh1 }, 0 },
3612 { "decQ", { Evh1 }, 0 },
3613 { "call{&|}", { NOTRACK, indirEv, BND }, 0 },
3614 { MOD_TABLE (MOD_FF_REG_3) },
3615 { "jmp{&|}", { NOTRACK, indirEv, BND }, 0 },
3616 { MOD_TABLE (MOD_FF_REG_5) },
3617 { "pushU", { stackEv }, 0 },
3622 { "sldtD", { Sv }, 0 },
3623 { "strD", { Sv }, 0 },
3624 { "lldt", { Ew }, 0 },
3625 { "ltr", { Ew }, 0 },
3626 { "verr", { Ew }, 0 },
3627 { "verw", { Ew }, 0 },
3633 { MOD_TABLE (MOD_0F01_REG_0) },
3634 { MOD_TABLE (MOD_0F01_REG_1) },
3635 { MOD_TABLE (MOD_0F01_REG_2) },
3636 { MOD_TABLE (MOD_0F01_REG_3) },
3637 { "smswD", { Sv }, 0 },
3638 { MOD_TABLE (MOD_0F01_REG_5) },
3639 { "lmsw", { Ew }, 0 },
3640 { MOD_TABLE (MOD_0F01_REG_7) },
3644 { "prefetch", { Mb }, 0 },
3645 { "prefetchw", { Mb }, 0 },
3646 { "prefetchwt1", { Mb }, 0 },
3647 { "prefetch", { Mb }, 0 },
3648 { "prefetch", { Mb }, 0 },
3649 { "prefetch", { Mb }, 0 },
3650 { "prefetch", { Mb }, 0 },
3651 { "prefetch", { Mb }, 0 },
3655 { MOD_TABLE (MOD_0F18_REG_0) },
3656 { MOD_TABLE (MOD_0F18_REG_1) },
3657 { MOD_TABLE (MOD_0F18_REG_2) },
3658 { MOD_TABLE (MOD_0F18_REG_3) },
3659 { MOD_TABLE (MOD_0F18_REG_4) },
3660 { MOD_TABLE (MOD_0F18_REG_5) },
3661 { MOD_TABLE (MOD_0F18_REG_6) },
3662 { MOD_TABLE (MOD_0F18_REG_7) },
3664 /* REG_0F1C_MOD_0 */
3666 { "cldemote", { Mb }, 0 },
3667 { "nopQ", { Ev }, 0 },
3668 { "nopQ", { Ev }, 0 },
3669 { "nopQ", { Ev }, 0 },
3670 { "nopQ", { Ev }, 0 },
3671 { "nopQ", { Ev }, 0 },
3672 { "nopQ", { Ev }, 0 },
3673 { "nopQ", { Ev }, 0 },
3675 /* REG_0F1E_MOD_3 */
3677 { "nopQ", { Ev }, 0 },
3678 { "rdsspK", { Rdq }, PREFIX_OPCODE },
3679 { "nopQ", { Ev }, 0 },
3680 { "nopQ", { Ev }, 0 },
3681 { "nopQ", { Ev }, 0 },
3682 { "nopQ", { Ev }, 0 },
3683 { "nopQ", { Ev }, 0 },
3684 { RM_TABLE (RM_0F1E_MOD_3_REG_7) },
3690 { MOD_TABLE (MOD_0F71_REG_2) },
3692 { MOD_TABLE (MOD_0F71_REG_4) },
3694 { MOD_TABLE (MOD_0F71_REG_6) },
3700 { MOD_TABLE (MOD_0F72_REG_2) },
3702 { MOD_TABLE (MOD_0F72_REG_4) },
3704 { MOD_TABLE (MOD_0F72_REG_6) },
3710 { MOD_TABLE (MOD_0F73_REG_2) },
3711 { MOD_TABLE (MOD_0F73_REG_3) },
3714 { MOD_TABLE (MOD_0F73_REG_6) },
3715 { MOD_TABLE (MOD_0F73_REG_7) },
3719 { "montmul", { { OP_0f07, 0 } }, 0 },
3720 { "xsha1", { { OP_0f07, 0 } }, 0 },
3721 { "xsha256", { { OP_0f07, 0 } }, 0 },
3725 { "xstore-rng", { { OP_0f07, 0 } }, 0 },
3726 { "xcrypt-ecb", { { OP_0f07, 0 } }, 0 },
3727 { "xcrypt-cbc", { { OP_0f07, 0 } }, 0 },
3728 { "xcrypt-ctr", { { OP_0f07, 0 } }, 0 },
3729 { "xcrypt-cfb", { { OP_0f07, 0 } }, 0 },
3730 { "xcrypt-ofb", { { OP_0f07, 0 } }, 0 },
3734 { MOD_TABLE (MOD_0FAE_REG_0) },
3735 { MOD_TABLE (MOD_0FAE_REG_1) },
3736 { MOD_TABLE (MOD_0FAE_REG_2) },
3737 { MOD_TABLE (MOD_0FAE_REG_3) },
3738 { MOD_TABLE (MOD_0FAE_REG_4) },
3739 { MOD_TABLE (MOD_0FAE_REG_5) },
3740 { MOD_TABLE (MOD_0FAE_REG_6) },
3741 { MOD_TABLE (MOD_0FAE_REG_7) },
3749 { "btQ", { Ev, Ib }, 0 },
3750 { "btsQ", { Evh1, Ib }, 0 },
3751 { "btrQ", { Evh1, Ib }, 0 },
3752 { "btcQ", { Evh1, Ib }, 0 },
3757 { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } }, 0 },
3759 { MOD_TABLE (MOD_0FC7_REG_3) },
3760 { MOD_TABLE (MOD_0FC7_REG_4) },
3761 { MOD_TABLE (MOD_0FC7_REG_5) },
3762 { MOD_TABLE (MOD_0FC7_REG_6) },
3763 { MOD_TABLE (MOD_0FC7_REG_7) },
3769 { MOD_TABLE (MOD_VEX_0F71_REG_2) },
3771 { MOD_TABLE (MOD_VEX_0F71_REG_4) },
3773 { MOD_TABLE (MOD_VEX_0F71_REG_6) },
3779 { MOD_TABLE (MOD_VEX_0F72_REG_2) },
3781 { MOD_TABLE (MOD_VEX_0F72_REG_4) },
3783 { MOD_TABLE (MOD_VEX_0F72_REG_6) },
3789 { MOD_TABLE (MOD_VEX_0F73_REG_2) },
3790 { MOD_TABLE (MOD_VEX_0F73_REG_3) },
3793 { MOD_TABLE (MOD_VEX_0F73_REG_6) },
3794 { MOD_TABLE (MOD_VEX_0F73_REG_7) },
3800 { MOD_TABLE (MOD_VEX_0FAE_REG_2) },
3801 { MOD_TABLE (MOD_VEX_0FAE_REG_3) },
3803 /* REG_VEX_0F38F3 */
3806 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1) },
3807 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2) },
3808 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3) },
3812 { "llwpcb", { { OP_LWPCB_E, 0 } }, 0 },
3813 { "slwpcb", { { OP_LWPCB_E, 0 } }, 0 },
3817 { "lwpins", { { OP_LWP_E, 0 }, Ed, Iq }, 0 },
3818 { "lwpval", { { OP_LWP_E, 0 }, Ed, Iq }, 0 },
3820 /* REG_XOP_TBM_01 */
3823 { "blcfill", { { OP_LWP_E, 0 }, Ev }, 0 },
3824 { "blsfill", { { OP_LWP_E, 0 }, Ev }, 0 },
3825 { "blcs", { { OP_LWP_E, 0 }, Ev }, 0 },
3826 { "tzmsk", { { OP_LWP_E, 0 }, Ev }, 0 },
3827 { "blcic", { { OP_LWP_E, 0 }, Ev }, 0 },
3828 { "blsic", { { OP_LWP_E, 0 }, Ev }, 0 },
3829 { "t1mskc", { { OP_LWP_E, 0 }, Ev }, 0 },
3831 /* REG_XOP_TBM_02 */
3834 { "blcmsk", { { OP_LWP_E, 0 }, Ev }, 0 },
3839 { "blci", { { OP_LWP_E, 0 }, Ev }, 0 },
3841 #define NEED_REG_TABLE
3842 #include "i386-dis-evex.h"
3843 #undef NEED_REG_TABLE
3846 static const struct dis386 prefix_table[][4] = {
3849 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
3850 { "pause", { XX }, 0 },
3851 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } }, 0 },
3852 { NULL, { { NULL, 0 } }, PREFIX_IGNORED }
3855 /* PREFIX_MOD_0_0F01_REG_5 */
3858 { "rstorssp", { Mq }, PREFIX_OPCODE },
3861 /* PREFIX_MOD_3_0F01_REG_5_RM_0 */
3864 { "setssbsy", { Skip_MODRM }, PREFIX_OPCODE },
3867 /* PREFIX_MOD_3_0F01_REG_5_RM_2 */
3870 { "saveprevssp", { Skip_MODRM }, PREFIX_OPCODE },
3875 { "wbinvd", { XX }, 0 },
3876 { "wbnoinvd", { XX }, 0 },
3881 { "movups", { XM, EXx }, PREFIX_OPCODE },
3882 { "movss", { XM, EXd }, PREFIX_OPCODE },
3883 { "movupd", { XM, EXx }, PREFIX_OPCODE },
3884 { "movsd", { XM, EXq }, PREFIX_OPCODE },
3889 { "movups", { EXxS, XM }, PREFIX_OPCODE },
3890 { "movss", { EXdS, XM }, PREFIX_OPCODE },
3891 { "movupd", { EXxS, XM }, PREFIX_OPCODE },
3892 { "movsd", { EXqS, XM }, PREFIX_OPCODE },
3897 { MOD_TABLE (MOD_0F12_PREFIX_0) },
3898 { "movsldup", { XM, EXx }, PREFIX_OPCODE },
3899 { "movlpd", { XM, EXq }, PREFIX_OPCODE },
3900 { "movddup", { XM, EXq }, PREFIX_OPCODE },
3905 { MOD_TABLE (MOD_0F16_PREFIX_0) },
3906 { "movshdup", { XM, EXx }, PREFIX_OPCODE },
3907 { "movhpd", { XM, EXq }, PREFIX_OPCODE },
3912 { MOD_TABLE (MOD_0F1A_PREFIX_0) },
3913 { "bndcl", { Gbnd, Ev_bnd }, 0 },
3914 { "bndmov", { Gbnd, Ebnd }, 0 },
3915 { "bndcu", { Gbnd, Ev_bnd }, 0 },
3920 { MOD_TABLE (MOD_0F1B_PREFIX_0) },
3921 { MOD_TABLE (MOD_0F1B_PREFIX_1) },
3922 { "bndmov", { EbndS, Gbnd }, 0 },
3923 { "bndcn", { Gbnd, Ev_bnd }, 0 },
3928 { MOD_TABLE (MOD_0F1C_PREFIX_0) },
3929 { "nopQ", { Ev }, PREFIX_OPCODE },
3930 { "nopQ", { Ev }, PREFIX_OPCODE },
3931 { "nopQ", { Ev }, PREFIX_OPCODE },
3936 { "nopQ", { Ev }, PREFIX_OPCODE },
3937 { MOD_TABLE (MOD_0F1E_PREFIX_1) },
3938 { "nopQ", { Ev }, PREFIX_OPCODE },
3939 { "nopQ", { Ev }, PREFIX_OPCODE },
3944 { "cvtpi2ps", { XM, EMCq }, PREFIX_OPCODE },
3945 { "cvtsi2ss%LQ", { XM, Ev }, PREFIX_OPCODE },
3946 { "cvtpi2pd", { XM, EMCq }, PREFIX_OPCODE },
3947 { "cvtsi2sd%LQ", { XM, Ev }, 0 },
3952 { MOD_TABLE (MOD_0F2B_PREFIX_0) },
3953 { MOD_TABLE (MOD_0F2B_PREFIX_1) },
3954 { MOD_TABLE (MOD_0F2B_PREFIX_2) },
3955 { MOD_TABLE (MOD_0F2B_PREFIX_3) },
3960 { "cvttps2pi", { MXC, EXq }, PREFIX_OPCODE },
3961 { "cvttss2si", { Gv, EXd }, PREFIX_OPCODE },
3962 { "cvttpd2pi", { MXC, EXx }, PREFIX_OPCODE },
3963 { "cvttsd2si", { Gv, EXq }, PREFIX_OPCODE },
3968 { "cvtps2pi", { MXC, EXq }, PREFIX_OPCODE },
3969 { "cvtss2si", { Gv, EXd }, PREFIX_OPCODE },
3970 { "cvtpd2pi", { MXC, EXx }, PREFIX_OPCODE },
3971 { "cvtsd2si", { Gv, EXq }, PREFIX_OPCODE },
3976 { "ucomiss",{ XM, EXd }, 0 },
3978 { "ucomisd",{ XM, EXq }, 0 },
3983 { "comiss", { XM, EXd }, 0 },
3985 { "comisd", { XM, EXq }, 0 },
3990 { "sqrtps", { XM, EXx }, PREFIX_OPCODE },
3991 { "sqrtss", { XM, EXd }, PREFIX_OPCODE },
3992 { "sqrtpd", { XM, EXx }, PREFIX_OPCODE },
3993 { "sqrtsd", { XM, EXq }, PREFIX_OPCODE },
3998 { "rsqrtps",{ XM, EXx }, PREFIX_OPCODE },
3999 { "rsqrtss",{ XM, EXd }, PREFIX_OPCODE },
4004 { "rcpps", { XM, EXx }, PREFIX_OPCODE },
4005 { "rcpss", { XM, EXd }, PREFIX_OPCODE },
4010 { "addps", { XM, EXx }, PREFIX_OPCODE },
4011 { "addss", { XM, EXd }, PREFIX_OPCODE },
4012 { "addpd", { XM, EXx }, PREFIX_OPCODE },
4013 { "addsd", { XM, EXq }, PREFIX_OPCODE },
4018 { "mulps", { XM, EXx }, PREFIX_OPCODE },
4019 { "mulss", { XM, EXd }, PREFIX_OPCODE },
4020 { "mulpd", { XM, EXx }, PREFIX_OPCODE },
4021 { "mulsd", { XM, EXq }, PREFIX_OPCODE },
4026 { "cvtps2pd", { XM, EXq }, PREFIX_OPCODE },
4027 { "cvtss2sd", { XM, EXd }, PREFIX_OPCODE },
4028 { "cvtpd2ps", { XM, EXx }, PREFIX_OPCODE },
4029 { "cvtsd2ss", { XM, EXq }, PREFIX_OPCODE },
4034 { "cvtdq2ps", { XM, EXx }, PREFIX_OPCODE },
4035 { "cvttps2dq", { XM, EXx }, PREFIX_OPCODE },
4036 { "cvtps2dq", { XM, EXx }, PREFIX_OPCODE },
4041 { "subps", { XM, EXx }, PREFIX_OPCODE },
4042 { "subss", { XM, EXd }, PREFIX_OPCODE },
4043 { "subpd", { XM, EXx }, PREFIX_OPCODE },
4044 { "subsd", { XM, EXq }, PREFIX_OPCODE },
4049 { "minps", { XM, EXx }, PREFIX_OPCODE },
4050 { "minss", { XM, EXd }, PREFIX_OPCODE },
4051 { "minpd", { XM, EXx }, PREFIX_OPCODE },
4052 { "minsd", { XM, EXq }, PREFIX_OPCODE },
4057 { "divps", { XM, EXx }, PREFIX_OPCODE },
4058 { "divss", { XM, EXd }, PREFIX_OPCODE },
4059 { "divpd", { XM, EXx }, PREFIX_OPCODE },
4060 { "divsd", { XM, EXq }, PREFIX_OPCODE },
4065 { "maxps", { XM, EXx }, PREFIX_OPCODE },
4066 { "maxss", { XM, EXd }, PREFIX_OPCODE },
4067 { "maxpd", { XM, EXx }, PREFIX_OPCODE },
4068 { "maxsd", { XM, EXq }, PREFIX_OPCODE },
4073 { "punpcklbw",{ MX, EMd }, PREFIX_OPCODE },
4075 { "punpcklbw",{ MX, EMx }, PREFIX_OPCODE },
4080 { "punpcklwd",{ MX, EMd }, PREFIX_OPCODE },
4082 { "punpcklwd",{ MX, EMx }, PREFIX_OPCODE },
4087 { "punpckldq",{ MX, EMd }, PREFIX_OPCODE },
4089 { "punpckldq",{ MX, EMx }, PREFIX_OPCODE },
4096 { "punpcklqdq", { XM, EXx }, PREFIX_OPCODE },
4103 { "punpckhqdq", { XM, EXx }, PREFIX_OPCODE },
4108 { "movq", { MX, EM }, PREFIX_OPCODE },
4109 { "movdqu", { XM, EXx }, PREFIX_OPCODE },
4110 { "movdqa", { XM, EXx }, PREFIX_OPCODE },
4115 { "pshufw", { MX, EM, Ib }, PREFIX_OPCODE },
4116 { "pshufhw",{ XM, EXx, Ib }, PREFIX_OPCODE },
4117 { "pshufd", { XM, EXx, Ib }, PREFIX_OPCODE },
4118 { "pshuflw",{ XM, EXx, Ib }, PREFIX_OPCODE },
4121 /* PREFIX_0F73_REG_3 */
4125 { "psrldq", { XS, Ib }, 0 },
4128 /* PREFIX_0F73_REG_7 */
4132 { "pslldq", { XS, Ib }, 0 },
4137 {"vmread", { Em, Gm }, 0 },
4139 {"extrq", { XS, Ib, Ib }, 0 },
4140 {"insertq", { XM, XS, Ib, Ib }, 0 },
4145 {"vmwrite", { Gm, Em }, 0 },
4147 {"extrq", { XM, XS }, 0 },
4148 {"insertq", { XM, XS }, 0 },
4155 { "haddpd", { XM, EXx }, PREFIX_OPCODE },
4156 { "haddps", { XM, EXx }, PREFIX_OPCODE },
4163 { "hsubpd", { XM, EXx }, PREFIX_OPCODE },
4164 { "hsubps", { XM, EXx }, PREFIX_OPCODE },
4169 { "movK", { Edq, MX }, PREFIX_OPCODE },
4170 { "movq", { XM, EXq }, PREFIX_OPCODE },
4171 { "movK", { Edq, XM }, PREFIX_OPCODE },
4176 { "movq", { EMS, MX }, PREFIX_OPCODE },
4177 { "movdqu", { EXxS, XM }, PREFIX_OPCODE },
4178 { "movdqa", { EXxS, XM }, PREFIX_OPCODE },
4181 /* PREFIX_0FAE_REG_0 */
4184 { "rdfsbase", { Ev }, 0 },
4187 /* PREFIX_0FAE_REG_1 */
4190 { "rdgsbase", { Ev }, 0 },
4193 /* PREFIX_0FAE_REG_2 */
4196 { "wrfsbase", { Ev }, 0 },
4199 /* PREFIX_0FAE_REG_3 */
4202 { "wrgsbase", { Ev }, 0 },
4205 /* PREFIX_MOD_0_0FAE_REG_4 */
4207 { "xsave", { FXSAVE }, 0 },
4208 { "ptwrite%LQ", { Edq }, 0 },
4211 /* PREFIX_MOD_3_0FAE_REG_4 */
4214 { "ptwrite%LQ", { Edq }, 0 },
4217 /* PREFIX_MOD_0_0FAE_REG_5 */
4219 { "xrstor", { FXSAVE }, PREFIX_OPCODE },
4222 /* PREFIX_MOD_3_0FAE_REG_5 */
4224 { "lfence", { Skip_MODRM }, 0 },
4225 { "incsspK", { Rdq }, PREFIX_OPCODE },
4228 /* PREFIX_MOD_0_0FAE_REG_6 */
4230 { "xsaveopt", { FXSAVE }, PREFIX_OPCODE },
4231 { "clrssbsy", { Mq }, PREFIX_OPCODE },
4232 { "clwb", { Mb }, PREFIX_OPCODE },
4235 /* PREFIX_MOD_1_0FAE_REG_6 */
4237 { RM_TABLE (RM_0FAE_REG_6) },
4238 { "umonitor", { Eva }, PREFIX_OPCODE },
4239 { "tpause", { Edq }, PREFIX_OPCODE },
4240 { "umwait", { Edq }, PREFIX_OPCODE },
4243 /* PREFIX_0FAE_REG_7 */
4245 { "clflush", { Mb }, 0 },
4247 { "clflushopt", { Mb }, 0 },
4253 { "popcntS", { Gv, Ev }, 0 },
4258 { "bsfS", { Gv, Ev }, 0 },
4259 { "tzcntS", { Gv, Ev }, 0 },
4260 { "bsfS", { Gv, Ev }, 0 },
4265 { "bsrS", { Gv, Ev }, 0 },
4266 { "lzcntS", { Gv, Ev }, 0 },
4267 { "bsrS", { Gv, Ev }, 0 },
4272 { "cmpps", { XM, EXx, CMP }, PREFIX_OPCODE },
4273 { "cmpss", { XM, EXd, CMP }, PREFIX_OPCODE },
4274 { "cmppd", { XM, EXx, CMP }, PREFIX_OPCODE },
4275 { "cmpsd", { XM, EXq, CMP }, PREFIX_OPCODE },
4278 /* PREFIX_MOD_0_0FC3 */
4280 { "movntiS", { Ev, Gv }, PREFIX_OPCODE },
4283 /* PREFIX_MOD_0_0FC7_REG_6 */
4285 { "vmptrld",{ Mq }, 0 },
4286 { "vmxon", { Mq }, 0 },
4287 { "vmclear",{ Mq }, 0 },
4290 /* PREFIX_MOD_3_0FC7_REG_6 */
4292 { "rdrand", { Ev }, 0 },
4294 { "rdrand", { Ev }, 0 }
4297 /* PREFIX_MOD_3_0FC7_REG_7 */
4299 { "rdseed", { Ev }, 0 },
4300 { "rdpid", { Em }, 0 },
4301 { "rdseed", { Ev }, 0 },
4308 { "addsubpd", { XM, EXx }, 0 },
4309 { "addsubps", { XM, EXx }, 0 },
4315 { "movq2dq",{ XM, MS }, 0 },
4316 { "movq", { EXqS, XM }, 0 },
4317 { "movdq2q",{ MX, XS }, 0 },
4323 { "cvtdq2pd", { XM, EXq }, PREFIX_OPCODE },
4324 { "cvttpd2dq", { XM, EXx }, PREFIX_OPCODE },
4325 { "cvtpd2dq", { XM, EXx }, PREFIX_OPCODE },
4330 { "movntq", { Mq, MX }, PREFIX_OPCODE },
4332 { MOD_TABLE (MOD_0FE7_PREFIX_2) },
4340 { MOD_TABLE (MOD_0FF0_PREFIX_3) },
4345 { "maskmovq", { MX, MS }, PREFIX_OPCODE },
4347 { "maskmovdqu", { XM, XS }, PREFIX_OPCODE },
4354 { "pblendvb", { XM, EXx, XMM0 }, PREFIX_OPCODE },
4361 { "blendvps", { XM, EXx, XMM0 }, PREFIX_OPCODE },
4368 { "blendvpd", { XM, EXx, XMM0 }, PREFIX_OPCODE },
4375 { "ptest", { XM, EXx }, PREFIX_OPCODE },
4382 { "pmovsxbw", { XM, EXq }, PREFIX_OPCODE },
4389 { "pmovsxbd", { XM, EXd }, PREFIX_OPCODE },
4396 { "pmovsxbq", { XM, EXw }, PREFIX_OPCODE },
4403 { "pmovsxwd", { XM, EXq }, PREFIX_OPCODE },
4410 { "pmovsxwq", { XM, EXd }, PREFIX_OPCODE },
4417 { "pmovsxdq", { XM, EXq }, PREFIX_OPCODE },
4424 { "pmuldq", { XM, EXx }, PREFIX_OPCODE },
4431 { "pcmpeqq", { XM, EXx }, PREFIX_OPCODE },
4438 { MOD_TABLE (MOD_0F382A_PREFIX_2) },
4445 { "packusdw", { XM, EXx }, PREFIX_OPCODE },
4452 { "pmovzxbw", { XM, EXq }, PREFIX_OPCODE },
4459 { "pmovzxbd", { XM, EXd }, PREFIX_OPCODE },
4466 { "pmovzxbq", { XM, EXw }, PREFIX_OPCODE },
4473 { "pmovzxwd", { XM, EXq }, PREFIX_OPCODE },
4480 { "pmovzxwq", { XM, EXd }, PREFIX_OPCODE },
4487 { "pmovzxdq", { XM, EXq }, PREFIX_OPCODE },
4494 { "pcmpgtq", { XM, EXx }, PREFIX_OPCODE },
4501 { "pminsb", { XM, EXx }, PREFIX_OPCODE },
4508 { "pminsd", { XM, EXx }, PREFIX_OPCODE },
4515 { "pminuw", { XM, EXx }, PREFIX_OPCODE },
4522 { "pminud", { XM, EXx }, PREFIX_OPCODE },
4529 { "pmaxsb", { XM, EXx }, PREFIX_OPCODE },
4536 { "pmaxsd", { XM, EXx }, PREFIX_OPCODE },
4543 { "pmaxuw", { XM, EXx }, PREFIX_OPCODE },
4550 { "pmaxud", { XM, EXx }, PREFIX_OPCODE },
4557 { "pmulld", { XM, EXx }, PREFIX_OPCODE },
4564 { "phminposuw", { XM, EXx }, PREFIX_OPCODE },
4571 { "invept", { Gm, Mo }, PREFIX_OPCODE },
4578 { "invvpid", { Gm, Mo }, PREFIX_OPCODE },
4585 { "invpcid", { Gm, M }, PREFIX_OPCODE },
4590 { "sha1nexte", { XM, EXxmm }, PREFIX_OPCODE },
4595 { "sha1msg1", { XM, EXxmm }, PREFIX_OPCODE },
4600 { "sha1msg2", { XM, EXxmm }, PREFIX_OPCODE },
4605 { "sha256rnds2", { XM, EXxmm, XMM0 }, PREFIX_OPCODE },
4610 { "sha256msg1", { XM, EXxmm }, PREFIX_OPCODE },
4615 { "sha256msg2", { XM, EXxmm }, PREFIX_OPCODE },
4622 { "gf2p8mulb", { XM, EXxmm }, PREFIX_OPCODE },
4629 { "aesimc", { XM, EXx }, PREFIX_OPCODE },
4636 { "aesenc", { XM, EXx }, PREFIX_OPCODE },
4643 { "aesenclast", { XM, EXx }, PREFIX_OPCODE },
4650 { "aesdec", { XM, EXx }, PREFIX_OPCODE },
4657 { "aesdeclast", { XM, EXx }, PREFIX_OPCODE },
4662 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
4664 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } }, PREFIX_OPCODE },
4665 { "crc32", { Gdq, { CRC32_Fixup, b_mode } }, PREFIX_OPCODE },
4670 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
4672 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv }, PREFIX_OPCODE },
4673 { "crc32", { Gdq, { CRC32_Fixup, v_mode } }, PREFIX_OPCODE },
4680 { MOD_TABLE (MOD_0F38F5_PREFIX_2) },
4685 { MOD_TABLE (MOD_0F38F6_PREFIX_0) },
4686 { "adoxS", { Gdq, Edq}, PREFIX_OPCODE },
4687 { "adcxS", { Gdq, Edq}, PREFIX_OPCODE },
4695 { MOD_TABLE (MOD_0F38F8_PREFIX_2) },
4700 { MOD_TABLE (MOD_0F38F9_PREFIX_0) },
4707 { "roundps", { XM, EXx, Ib }, PREFIX_OPCODE },
4714 { "roundpd", { XM, EXx, Ib }, PREFIX_OPCODE },
4721 { "roundss", { XM, EXd, Ib }, PREFIX_OPCODE },
4728 { "roundsd", { XM, EXq, Ib }, PREFIX_OPCODE },
4735 { "blendps", { XM, EXx, Ib }, PREFIX_OPCODE },
4742 { "blendpd", { XM, EXx, Ib }, PREFIX_OPCODE },
4749 { "pblendw", { XM, EXx, Ib }, PREFIX_OPCODE },
4756 { "pextrb", { Edqb, XM, Ib }, PREFIX_OPCODE },
4763 { "pextrw", { Edqw, XM, Ib }, PREFIX_OPCODE },
4770 { "pextrK", { Edq, XM, Ib }, PREFIX_OPCODE },
4777 { "extractps", { Edqd, XM, Ib }, PREFIX_OPCODE },
4784 { "pinsrb", { XM, Edqb, Ib }, PREFIX_OPCODE },
4791 { "insertps", { XM, EXd, Ib }, PREFIX_OPCODE },
4798 { "pinsrK", { XM, Edq, Ib }, PREFIX_OPCODE },
4805 { "dpps", { XM, EXx, Ib }, PREFIX_OPCODE },
4812 { "dppd", { XM, EXx, Ib }, PREFIX_OPCODE },
4819 { "mpsadbw", { XM, EXx, Ib }, PREFIX_OPCODE },
4826 { "pclmulqdq", { XM, EXx, PCLMUL }, PREFIX_OPCODE },
4833 { "pcmpestrm", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, PREFIX_OPCODE },
4840 { "pcmpestri", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, PREFIX_OPCODE },
4847 { "pcmpistrm", { XM, EXx, Ib }, PREFIX_OPCODE },
4854 { "pcmpistri", { XM, EXx, Ib }, PREFIX_OPCODE },
4859 { "sha1rnds4", { XM, EXxmm, Ib }, PREFIX_OPCODE },
4866 { "gf2p8affineqb", { XM, EXxmm, Ib }, PREFIX_OPCODE },
4873 { "gf2p8affineinvqb", { XM, EXxmm, Ib }, PREFIX_OPCODE },
4880 { "aeskeygenassist", { XM, EXx, Ib }, PREFIX_OPCODE },
4883 /* PREFIX_VEX_0F10 */
4885 { VEX_W_TABLE (VEX_W_0F10_P_0) },
4886 { VEX_LEN_TABLE (VEX_LEN_0F10_P_1) },
4887 { VEX_W_TABLE (VEX_W_0F10_P_2) },
4888 { VEX_LEN_TABLE (VEX_LEN_0F10_P_3) },
4891 /* PREFIX_VEX_0F11 */
4893 { VEX_W_TABLE (VEX_W_0F11_P_0) },
4894 { VEX_LEN_TABLE (VEX_LEN_0F11_P_1) },
4895 { VEX_W_TABLE (VEX_W_0F11_P_2) },
4896 { VEX_LEN_TABLE (VEX_LEN_0F11_P_3) },
4899 /* PREFIX_VEX_0F12 */
4901 { MOD_TABLE (MOD_VEX_0F12_PREFIX_0) },
4902 { VEX_W_TABLE (VEX_W_0F12_P_1) },
4903 { VEX_LEN_TABLE (VEX_LEN_0F12_P_2) },
4904 { VEX_W_TABLE (VEX_W_0F12_P_3) },
4907 /* PREFIX_VEX_0F16 */
4909 { MOD_TABLE (MOD_VEX_0F16_PREFIX_0) },
4910 { VEX_W_TABLE (VEX_W_0F16_P_1) },
4911 { VEX_LEN_TABLE (VEX_LEN_0F16_P_2) },
4914 /* PREFIX_VEX_0F2A */
4917 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_1) },
4919 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_3) },
4922 /* PREFIX_VEX_0F2C */
4925 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_1) },
4927 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_3) },
4930 /* PREFIX_VEX_0F2D */
4933 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_1) },
4935 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_3) },
4938 /* PREFIX_VEX_0F2E */
4940 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_0) },
4942 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_2) },
4945 /* PREFIX_VEX_0F2F */
4947 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_0) },
4949 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_2) },
4952 /* PREFIX_VEX_0F41 */
4954 { VEX_LEN_TABLE (VEX_LEN_0F41_P_0) },
4956 { VEX_LEN_TABLE (VEX_LEN_0F41_P_2) },
4959 /* PREFIX_VEX_0F42 */
4961 { VEX_LEN_TABLE (VEX_LEN_0F42_P_0) },
4963 { VEX_LEN_TABLE (VEX_LEN_0F42_P_2) },
4966 /* PREFIX_VEX_0F44 */
4968 { VEX_LEN_TABLE (VEX_LEN_0F44_P_0) },
4970 { VEX_LEN_TABLE (VEX_LEN_0F44_P_2) },
4973 /* PREFIX_VEX_0F45 */
4975 { VEX_LEN_TABLE (VEX_LEN_0F45_P_0) },
4977 { VEX_LEN_TABLE (VEX_LEN_0F45_P_2) },
4980 /* PREFIX_VEX_0F46 */
4982 { VEX_LEN_TABLE (VEX_LEN_0F46_P_0) },
4984 { VEX_LEN_TABLE (VEX_LEN_0F46_P_2) },
4987 /* PREFIX_VEX_0F47 */
4989 { VEX_LEN_TABLE (VEX_LEN_0F47_P_0) },
4991 { VEX_LEN_TABLE (VEX_LEN_0F47_P_2) },
4994 /* PREFIX_VEX_0F4A */
4996 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_0) },
4998 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_2) },
5001 /* PREFIX_VEX_0F4B */
5003 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_0) },
5005 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_2) },
5008 /* PREFIX_VEX_0F51 */
5010 { VEX_W_TABLE (VEX_W_0F51_P_0) },
5011 { VEX_LEN_TABLE (VEX_LEN_0F51_P_1) },
5012 { VEX_W_TABLE (VEX_W_0F51_P_2) },
5013 { VEX_LEN_TABLE (VEX_LEN_0F51_P_3) },
5016 /* PREFIX_VEX_0F52 */
5018 { VEX_W_TABLE (VEX_W_0F52_P_0) },
5019 { VEX_LEN_TABLE (VEX_LEN_0F52_P_1) },
5022 /* PREFIX_VEX_0F53 */
5024 { VEX_W_TABLE (VEX_W_0F53_P_0) },
5025 { VEX_LEN_TABLE (VEX_LEN_0F53_P_1) },
5028 /* PREFIX_VEX_0F58 */
5030 { VEX_W_TABLE (VEX_W_0F58_P_0) },
5031 { VEX_LEN_TABLE (VEX_LEN_0F58_P_1) },
5032 { VEX_W_TABLE (VEX_W_0F58_P_2) },
5033 { VEX_LEN_TABLE (VEX_LEN_0F58_P_3) },
5036 /* PREFIX_VEX_0F59 */
5038 { VEX_W_TABLE (VEX_W_0F59_P_0) },
5039 { VEX_LEN_TABLE (VEX_LEN_0F59_P_1) },
5040 { VEX_W_TABLE (VEX_W_0F59_P_2) },
5041 { VEX_LEN_TABLE (VEX_LEN_0F59_P_3) },
5044 /* PREFIX_VEX_0F5A */
5046 { VEX_W_TABLE (VEX_W_0F5A_P_0) },
5047 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_1) },
5048 { "vcvtpd2ps%XY", { XMM, EXx }, 0 },
5049 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_3) },
5052 /* PREFIX_VEX_0F5B */
5054 { VEX_W_TABLE (VEX_W_0F5B_P_0) },
5055 { VEX_W_TABLE (VEX_W_0F5B_P_1) },
5056 { VEX_W_TABLE (VEX_W_0F5B_P_2) },
5059 /* PREFIX_VEX_0F5C */
5061 { VEX_W_TABLE (VEX_W_0F5C_P_0) },
5062 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_1) },
5063 { VEX_W_TABLE (VEX_W_0F5C_P_2) },
5064 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_3) },
5067 /* PREFIX_VEX_0F5D */
5069 { VEX_W_TABLE (VEX_W_0F5D_P_0) },
5070 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_1) },
5071 { VEX_W_TABLE (VEX_W_0F5D_P_2) },
5072 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_3) },
5075 /* PREFIX_VEX_0F5E */
5077 { VEX_W_TABLE (VEX_W_0F5E_P_0) },
5078 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_1) },
5079 { VEX_W_TABLE (VEX_W_0F5E_P_2) },
5080 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_3) },
5083 /* PREFIX_VEX_0F5F */
5085 { VEX_W_TABLE (VEX_W_0F5F_P_0) },
5086 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_1) },
5087 { VEX_W_TABLE (VEX_W_0F5F_P_2) },
5088 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_3) },
5091 /* PREFIX_VEX_0F60 */
5095 { VEX_W_TABLE (VEX_W_0F60_P_2) },
5098 /* PREFIX_VEX_0F61 */
5102 { VEX_W_TABLE (VEX_W_0F61_P_2) },
5105 /* PREFIX_VEX_0F62 */
5109 { VEX_W_TABLE (VEX_W_0F62_P_2) },
5112 /* PREFIX_VEX_0F63 */
5116 { VEX_W_TABLE (VEX_W_0F63_P_2) },
5119 /* PREFIX_VEX_0F64 */
5123 { VEX_W_TABLE (VEX_W_0F64_P_2) },
5126 /* PREFIX_VEX_0F65 */
5130 { VEX_W_TABLE (VEX_W_0F65_P_2) },
5133 /* PREFIX_VEX_0F66 */
5137 { VEX_W_TABLE (VEX_W_0F66_P_2) },
5140 /* PREFIX_VEX_0F67 */
5144 { VEX_W_TABLE (VEX_W_0F67_P_2) },
5147 /* PREFIX_VEX_0F68 */
5151 { VEX_W_TABLE (VEX_W_0F68_P_2) },
5154 /* PREFIX_VEX_0F69 */
5158 { VEX_W_TABLE (VEX_W_0F69_P_2) },
5161 /* PREFIX_VEX_0F6A */
5165 { VEX_W_TABLE (VEX_W_0F6A_P_2) },
5168 /* PREFIX_VEX_0F6B */
5172 { VEX_W_TABLE (VEX_W_0F6B_P_2) },
5175 /* PREFIX_VEX_0F6C */
5179 { VEX_W_TABLE (VEX_W_0F6C_P_2) },
5182 /* PREFIX_VEX_0F6D */
5186 { VEX_W_TABLE (VEX_W_0F6D_P_2) },
5189 /* PREFIX_VEX_0F6E */
5193 { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2) },
5196 /* PREFIX_VEX_0F6F */
5199 { VEX_W_TABLE (VEX_W_0F6F_P_1) },
5200 { VEX_W_TABLE (VEX_W_0F6F_P_2) },
5203 /* PREFIX_VEX_0F70 */
5206 { VEX_W_TABLE (VEX_W_0F70_P_1) },
5207 { VEX_W_TABLE (VEX_W_0F70_P_2) },
5208 { VEX_W_TABLE (VEX_W_0F70_P_3) },
5211 /* PREFIX_VEX_0F71_REG_2 */
5215 { VEX_W_TABLE (VEX_W_0F71_R_2_P_2) },
5218 /* PREFIX_VEX_0F71_REG_4 */
5222 { VEX_W_TABLE (VEX_W_0F71_R_4_P_2) },
5225 /* PREFIX_VEX_0F71_REG_6 */
5229 { VEX_W_TABLE (VEX_W_0F71_R_6_P_2) },
5232 /* PREFIX_VEX_0F72_REG_2 */
5236 { VEX_W_TABLE (VEX_W_0F72_R_2_P_2) },
5239 /* PREFIX_VEX_0F72_REG_4 */
5243 { VEX_W_TABLE (VEX_W_0F72_R_4_P_2) },
5246 /* PREFIX_VEX_0F72_REG_6 */
5250 { VEX_W_TABLE (VEX_W_0F72_R_6_P_2) },
5253 /* PREFIX_VEX_0F73_REG_2 */
5257 { VEX_W_TABLE (VEX_W_0F73_R_2_P_2) },
5260 /* PREFIX_VEX_0F73_REG_3 */
5264 { VEX_W_TABLE (VEX_W_0F73_R_3_P_2) },
5267 /* PREFIX_VEX_0F73_REG_6 */
5271 { VEX_W_TABLE (VEX_W_0F73_R_6_P_2) },
5274 /* PREFIX_VEX_0F73_REG_7 */
5278 { VEX_W_TABLE (VEX_W_0F73_R_7_P_2) },
5281 /* PREFIX_VEX_0F74 */
5285 { VEX_W_TABLE (VEX_W_0F74_P_2) },
5288 /* PREFIX_VEX_0F75 */
5292 { VEX_W_TABLE (VEX_W_0F75_P_2) },
5295 /* PREFIX_VEX_0F76 */
5299 { VEX_W_TABLE (VEX_W_0F76_P_2) },
5302 /* PREFIX_VEX_0F77 */
5304 { VEX_W_TABLE (VEX_W_0F77_P_0) },
5307 /* PREFIX_VEX_0F7C */
5311 { VEX_W_TABLE (VEX_W_0F7C_P_2) },
5312 { VEX_W_TABLE (VEX_W_0F7C_P_3) },
5315 /* PREFIX_VEX_0F7D */
5319 { VEX_W_TABLE (VEX_W_0F7D_P_2) },
5320 { VEX_W_TABLE (VEX_W_0F7D_P_3) },
5323 /* PREFIX_VEX_0F7E */
5326 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1) },
5327 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2) },
5330 /* PREFIX_VEX_0F7F */
5333 { VEX_W_TABLE (VEX_W_0F7F_P_1) },
5334 { VEX_W_TABLE (VEX_W_0F7F_P_2) },
5337 /* PREFIX_VEX_0F90 */
5339 { VEX_LEN_TABLE (VEX_LEN_0F90_P_0) },
5341 { VEX_LEN_TABLE (VEX_LEN_0F90_P_2) },
5344 /* PREFIX_VEX_0F91 */
5346 { VEX_LEN_TABLE (VEX_LEN_0F91_P_0) },
5348 { VEX_LEN_TABLE (VEX_LEN_0F91_P_2) },
5351 /* PREFIX_VEX_0F92 */
5353 { VEX_LEN_TABLE (VEX_LEN_0F92_P_0) },
5355 { VEX_LEN_TABLE (VEX_LEN_0F92_P_2) },
5356 { VEX_LEN_TABLE (VEX_LEN_0F92_P_3) },
5359 /* PREFIX_VEX_0F93 */
5361 { VEX_LEN_TABLE (VEX_LEN_0F93_P_0) },
5363 { VEX_LEN_TABLE (VEX_LEN_0F93_P_2) },
5364 { VEX_LEN_TABLE (VEX_LEN_0F93_P_3) },
5367 /* PREFIX_VEX_0F98 */
5369 { VEX_LEN_TABLE (VEX_LEN_0F98_P_0) },
5371 { VEX_LEN_TABLE (VEX_LEN_0F98_P_2) },
5374 /* PREFIX_VEX_0F99 */
5376 { VEX_LEN_TABLE (VEX_LEN_0F99_P_0) },
5378 { VEX_LEN_TABLE (VEX_LEN_0F99_P_2) },
5381 /* PREFIX_VEX_0FC2 */
5383 { VEX_W_TABLE (VEX_W_0FC2_P_0) },
5384 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_1) },
5385 { VEX_W_TABLE (VEX_W_0FC2_P_2) },
5386 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_3) },
5389 /* PREFIX_VEX_0FC4 */
5393 { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2) },
5396 /* PREFIX_VEX_0FC5 */
5400 { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2) },
5403 /* PREFIX_VEX_0FD0 */
5407 { VEX_W_TABLE (VEX_W_0FD0_P_2) },
5408 { VEX_W_TABLE (VEX_W_0FD0_P_3) },
5411 /* PREFIX_VEX_0FD1 */
5415 { VEX_W_TABLE (VEX_W_0FD1_P_2) },
5418 /* PREFIX_VEX_0FD2 */
5422 { VEX_W_TABLE (VEX_W_0FD2_P_2) },
5425 /* PREFIX_VEX_0FD3 */
5429 { VEX_W_TABLE (VEX_W_0FD3_P_2) },
5432 /* PREFIX_VEX_0FD4 */
5436 { VEX_W_TABLE (VEX_W_0FD4_P_2) },
5439 /* PREFIX_VEX_0FD5 */
5443 { VEX_W_TABLE (VEX_W_0FD5_P_2) },
5446 /* PREFIX_VEX_0FD6 */
5450 { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2) },
5453 /* PREFIX_VEX_0FD7 */
5457 { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2) },
5460 /* PREFIX_VEX_0FD8 */
5464 { VEX_W_TABLE (VEX_W_0FD8_P_2) },
5467 /* PREFIX_VEX_0FD9 */
5471 { VEX_W_TABLE (VEX_W_0FD9_P_2) },
5474 /* PREFIX_VEX_0FDA */
5478 { VEX_W_TABLE (VEX_W_0FDA_P_2) },
5481 /* PREFIX_VEX_0FDB */
5485 { VEX_W_TABLE (VEX_W_0FDB_P_2) },
5488 /* PREFIX_VEX_0FDC */
5492 { VEX_W_TABLE (VEX_W_0FDC_P_2) },
5495 /* PREFIX_VEX_0FDD */
5499 { VEX_W_TABLE (VEX_W_0FDD_P_2) },
5502 /* PREFIX_VEX_0FDE */
5506 { VEX_W_TABLE (VEX_W_0FDE_P_2) },
5509 /* PREFIX_VEX_0FDF */
5513 { VEX_W_TABLE (VEX_W_0FDF_P_2) },
5516 /* PREFIX_VEX_0FE0 */
5520 { VEX_W_TABLE (VEX_W_0FE0_P_2) },
5523 /* PREFIX_VEX_0FE1 */
5527 { VEX_W_TABLE (VEX_W_0FE1_P_2) },
5530 /* PREFIX_VEX_0FE2 */
5534 { VEX_W_TABLE (VEX_W_0FE2_P_2) },
5537 /* PREFIX_VEX_0FE3 */
5541 { VEX_W_TABLE (VEX_W_0FE3_P_2) },
5544 /* PREFIX_VEX_0FE4 */
5548 { VEX_W_TABLE (VEX_W_0FE4_P_2) },
5551 /* PREFIX_VEX_0FE5 */
5555 { VEX_W_TABLE (VEX_W_0FE5_P_2) },
5558 /* PREFIX_VEX_0FE6 */
5561 { VEX_W_TABLE (VEX_W_0FE6_P_1) },
5562 { VEX_W_TABLE (VEX_W_0FE6_P_2) },
5563 { VEX_W_TABLE (VEX_W_0FE6_P_3) },
5566 /* PREFIX_VEX_0FE7 */
5570 { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2) },
5573 /* PREFIX_VEX_0FE8 */
5577 { VEX_W_TABLE (VEX_W_0FE8_P_2) },
5580 /* PREFIX_VEX_0FE9 */
5584 { VEX_W_TABLE (VEX_W_0FE9_P_2) },
5587 /* PREFIX_VEX_0FEA */
5591 { VEX_W_TABLE (VEX_W_0FEA_P_2) },
5594 /* PREFIX_VEX_0FEB */
5598 { VEX_W_TABLE (VEX_W_0FEB_P_2) },
5601 /* PREFIX_VEX_0FEC */
5605 { VEX_W_TABLE (VEX_W_0FEC_P_2) },
5608 /* PREFIX_VEX_0FED */
5612 { VEX_W_TABLE (VEX_W_0FED_P_2) },
5615 /* PREFIX_VEX_0FEE */
5619 { VEX_W_TABLE (VEX_W_0FEE_P_2) },
5622 /* PREFIX_VEX_0FEF */
5626 { VEX_W_TABLE (VEX_W_0FEF_P_2) },
5629 /* PREFIX_VEX_0FF0 */
5634 { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3) },
5637 /* PREFIX_VEX_0FF1 */
5641 { VEX_W_TABLE (VEX_W_0FF1_P_2) },
5644 /* PREFIX_VEX_0FF2 */
5648 { VEX_W_TABLE (VEX_W_0FF2_P_2) },
5651 /* PREFIX_VEX_0FF3 */
5655 { VEX_W_TABLE (VEX_W_0FF3_P_2) },
5658 /* PREFIX_VEX_0FF4 */
5662 { VEX_W_TABLE (VEX_W_0FF4_P_2) },
5665 /* PREFIX_VEX_0FF5 */
5669 { VEX_W_TABLE (VEX_W_0FF5_P_2) },
5672 /* PREFIX_VEX_0FF6 */
5676 { VEX_W_TABLE (VEX_W_0FF6_P_2) },
5679 /* PREFIX_VEX_0FF7 */
5683 { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2) },
5686 /* PREFIX_VEX_0FF8 */
5690 { VEX_W_TABLE (VEX_W_0FF8_P_2) },
5693 /* PREFIX_VEX_0FF9 */
5697 { VEX_W_TABLE (VEX_W_0FF9_P_2) },
5700 /* PREFIX_VEX_0FFA */
5704 { VEX_W_TABLE (VEX_W_0FFA_P_2) },
5707 /* PREFIX_VEX_0FFB */
5711 { VEX_W_TABLE (VEX_W_0FFB_P_2) },
5714 /* PREFIX_VEX_0FFC */
5718 { VEX_W_TABLE (VEX_W_0FFC_P_2) },
5721 /* PREFIX_VEX_0FFD */
5725 { VEX_W_TABLE (VEX_W_0FFD_P_2) },
5728 /* PREFIX_VEX_0FFE */
5732 { VEX_W_TABLE (VEX_W_0FFE_P_2) },
5735 /* PREFIX_VEX_0F3800 */
5739 { VEX_W_TABLE (VEX_W_0F3800_P_2) },
5742 /* PREFIX_VEX_0F3801 */
5746 { VEX_W_TABLE (VEX_W_0F3801_P_2) },
5749 /* PREFIX_VEX_0F3802 */
5753 { VEX_W_TABLE (VEX_W_0F3802_P_2) },
5756 /* PREFIX_VEX_0F3803 */
5760 { VEX_W_TABLE (VEX_W_0F3803_P_2) },
5763 /* PREFIX_VEX_0F3804 */
5767 { VEX_W_TABLE (VEX_W_0F3804_P_2) },
5770 /* PREFIX_VEX_0F3805 */
5774 { VEX_W_TABLE (VEX_W_0F3805_P_2) },
5777 /* PREFIX_VEX_0F3806 */
5781 { VEX_W_TABLE (VEX_W_0F3806_P_2) },
5784 /* PREFIX_VEX_0F3807 */
5788 { VEX_W_TABLE (VEX_W_0F3807_P_2) },
5791 /* PREFIX_VEX_0F3808 */
5795 { VEX_W_TABLE (VEX_W_0F3808_P_2) },
5798 /* PREFIX_VEX_0F3809 */
5802 { VEX_W_TABLE (VEX_W_0F3809_P_2) },
5805 /* PREFIX_VEX_0F380A */
5809 { VEX_W_TABLE (VEX_W_0F380A_P_2) },
5812 /* PREFIX_VEX_0F380B */
5816 { VEX_W_TABLE (VEX_W_0F380B_P_2) },
5819 /* PREFIX_VEX_0F380C */
5823 { VEX_W_TABLE (VEX_W_0F380C_P_2) },
5826 /* PREFIX_VEX_0F380D */
5830 { VEX_W_TABLE (VEX_W_0F380D_P_2) },
5833 /* PREFIX_VEX_0F380E */
5837 { VEX_W_TABLE (VEX_W_0F380E_P_2) },
5840 /* PREFIX_VEX_0F380F */
5844 { VEX_W_TABLE (VEX_W_0F380F_P_2) },
5847 /* PREFIX_VEX_0F3813 */
5851 { "vcvtph2ps", { XM, EXxmmq }, 0 },
5854 /* PREFIX_VEX_0F3816 */
5858 { VEX_LEN_TABLE (VEX_LEN_0F3816_P_2) },
5861 /* PREFIX_VEX_0F3817 */
5865 { VEX_W_TABLE (VEX_W_0F3817_P_2) },
5868 /* PREFIX_VEX_0F3818 */
5872 { VEX_W_TABLE (VEX_W_0F3818_P_2) },
5875 /* PREFIX_VEX_0F3819 */
5879 { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2) },
5882 /* PREFIX_VEX_0F381A */
5886 { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2) },
5889 /* PREFIX_VEX_0F381C */
5893 { VEX_W_TABLE (VEX_W_0F381C_P_2) },
5896 /* PREFIX_VEX_0F381D */
5900 { VEX_W_TABLE (VEX_W_0F381D_P_2) },
5903 /* PREFIX_VEX_0F381E */
5907 { VEX_W_TABLE (VEX_W_0F381E_P_2) },
5910 /* PREFIX_VEX_0F3820 */
5914 { VEX_W_TABLE (VEX_W_0F3820_P_2) },
5917 /* PREFIX_VEX_0F3821 */
5921 { VEX_W_TABLE (VEX_W_0F3821_P_2) },
5924 /* PREFIX_VEX_0F3822 */
5928 { VEX_W_TABLE (VEX_W_0F3822_P_2) },
5931 /* PREFIX_VEX_0F3823 */
5935 { VEX_W_TABLE (VEX_W_0F3823_P_2) },
5938 /* PREFIX_VEX_0F3824 */
5942 { VEX_W_TABLE (VEX_W_0F3824_P_2) },
5945 /* PREFIX_VEX_0F3825 */
5949 { VEX_W_TABLE (VEX_W_0F3825_P_2) },
5952 /* PREFIX_VEX_0F3828 */
5956 { VEX_W_TABLE (VEX_W_0F3828_P_2) },
5959 /* PREFIX_VEX_0F3829 */
5963 { VEX_W_TABLE (VEX_W_0F3829_P_2) },
5966 /* PREFIX_VEX_0F382A */
5970 { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2) },
5973 /* PREFIX_VEX_0F382B */
5977 { VEX_W_TABLE (VEX_W_0F382B_P_2) },
5980 /* PREFIX_VEX_0F382C */
5984 { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2) },
5987 /* PREFIX_VEX_0F382D */
5991 { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2) },
5994 /* PREFIX_VEX_0F382E */
5998 { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2) },
6001 /* PREFIX_VEX_0F382F */
6005 { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2) },
6008 /* PREFIX_VEX_0F3830 */
6012 { VEX_W_TABLE (VEX_W_0F3830_P_2) },
6015 /* PREFIX_VEX_0F3831 */
6019 { VEX_W_TABLE (VEX_W_0F3831_P_2) },
6022 /* PREFIX_VEX_0F3832 */
6026 { VEX_W_TABLE (VEX_W_0F3832_P_2) },
6029 /* PREFIX_VEX_0F3833 */
6033 { VEX_W_TABLE (VEX_W_0F3833_P_2) },
6036 /* PREFIX_VEX_0F3834 */
6040 { VEX_W_TABLE (VEX_W_0F3834_P_2) },
6043 /* PREFIX_VEX_0F3835 */
6047 { VEX_W_TABLE (VEX_W_0F3835_P_2) },
6050 /* PREFIX_VEX_0F3836 */
6054 { VEX_LEN_TABLE (VEX_LEN_0F3836_P_2) },
6057 /* PREFIX_VEX_0F3837 */
6061 { VEX_W_TABLE (VEX_W_0F3837_P_2) },
6064 /* PREFIX_VEX_0F3838 */
6068 { VEX_W_TABLE (VEX_W_0F3838_P_2) },
6071 /* PREFIX_VEX_0F3839 */
6075 { VEX_W_TABLE (VEX_W_0F3839_P_2) },
6078 /* PREFIX_VEX_0F383A */
6082 { VEX_W_TABLE (VEX_W_0F383A_P_2) },
6085 /* PREFIX_VEX_0F383B */
6089 { VEX_W_TABLE (VEX_W_0F383B_P_2) },
6092 /* PREFIX_VEX_0F383C */
6096 { VEX_W_TABLE (VEX_W_0F383C_P_2) },
6099 /* PREFIX_VEX_0F383D */
6103 { VEX_W_TABLE (VEX_W_0F383D_P_2) },
6106 /* PREFIX_VEX_0F383E */
6110 { VEX_W_TABLE (VEX_W_0F383E_P_2) },
6113 /* PREFIX_VEX_0F383F */
6117 { VEX_W_TABLE (VEX_W_0F383F_P_2) },
6120 /* PREFIX_VEX_0F3840 */
6124 { VEX_W_TABLE (VEX_W_0F3840_P_2) },
6127 /* PREFIX_VEX_0F3841 */
6131 { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2) },
6134 /* PREFIX_VEX_0F3845 */
6138 { "vpsrlv%LW", { XM, Vex, EXx }, 0 },
6141 /* PREFIX_VEX_0F3846 */
6145 { VEX_W_TABLE (VEX_W_0F3846_P_2) },
6148 /* PREFIX_VEX_0F3847 */
6152 { "vpsllv%LW", { XM, Vex, EXx }, 0 },
6155 /* PREFIX_VEX_0F3858 */
6159 { VEX_W_TABLE (VEX_W_0F3858_P_2) },
6162 /* PREFIX_VEX_0F3859 */
6166 { VEX_W_TABLE (VEX_W_0F3859_P_2) },
6169 /* PREFIX_VEX_0F385A */
6173 { MOD_TABLE (MOD_VEX_0F385A_PREFIX_2) },
6176 /* PREFIX_VEX_0F3878 */
6180 { VEX_W_TABLE (VEX_W_0F3878_P_2) },
6183 /* PREFIX_VEX_0F3879 */
6187 { VEX_W_TABLE (VEX_W_0F3879_P_2) },
6190 /* PREFIX_VEX_0F388C */
6194 { MOD_TABLE (MOD_VEX_0F388C_PREFIX_2) },
6197 /* PREFIX_VEX_0F388E */
6201 { MOD_TABLE (MOD_VEX_0F388E_PREFIX_2) },
6204 /* PREFIX_VEX_0F3890 */
6208 { "vpgatherd%LW", { XM, MVexVSIBDWpX, Vex }, 0 },
6211 /* PREFIX_VEX_0F3891 */
6215 { "vpgatherq%LW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6218 /* PREFIX_VEX_0F3892 */
6222 { "vgatherdp%XW", { XM, MVexVSIBDWpX, Vex }, 0 },
6225 /* PREFIX_VEX_0F3893 */
6229 { "vgatherqp%XW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ }, 0 },
6232 /* PREFIX_VEX_0F3896 */
6236 { "vfmaddsub132p%XW", { XM, Vex, EXx }, 0 },
6239 /* PREFIX_VEX_0F3897 */
6243 { "vfmsubadd132p%XW", { XM, Vex, EXx }, 0 },
6246 /* PREFIX_VEX_0F3898 */
6250 { "vfmadd132p%XW", { XM, Vex, EXx }, 0 },
6253 /* PREFIX_VEX_0F3899 */
6257 { "vfmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6260 /* PREFIX_VEX_0F389A */
6264 { "vfmsub132p%XW", { XM, Vex, EXx }, 0 },
6267 /* PREFIX_VEX_0F389B */
6271 { "vfmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6274 /* PREFIX_VEX_0F389C */
6278 { "vfnmadd132p%XW", { XM, Vex, EXx }, 0 },
6281 /* PREFIX_VEX_0F389D */
6285 { "vfnmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6288 /* PREFIX_VEX_0F389E */
6292 { "vfnmsub132p%XW", { XM, Vex, EXx }, 0 },
6295 /* PREFIX_VEX_0F389F */
6299 { "vfnmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6302 /* PREFIX_VEX_0F38A6 */
6306 { "vfmaddsub213p%XW", { XM, Vex, EXx }, 0 },
6310 /* PREFIX_VEX_0F38A7 */
6314 { "vfmsubadd213p%XW", { XM, Vex, EXx }, 0 },
6317 /* PREFIX_VEX_0F38A8 */
6321 { "vfmadd213p%XW", { XM, Vex, EXx }, 0 },
6324 /* PREFIX_VEX_0F38A9 */
6328 { "vfmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6331 /* PREFIX_VEX_0F38AA */
6335 { "vfmsub213p%XW", { XM, Vex, EXx }, 0 },
6338 /* PREFIX_VEX_0F38AB */
6342 { "vfmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6345 /* PREFIX_VEX_0F38AC */
6349 { "vfnmadd213p%XW", { XM, Vex, EXx }, 0 },
6352 /* PREFIX_VEX_0F38AD */
6356 { "vfnmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6359 /* PREFIX_VEX_0F38AE */
6363 { "vfnmsub213p%XW", { XM, Vex, EXx }, 0 },
6366 /* PREFIX_VEX_0F38AF */
6370 { "vfnmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6373 /* PREFIX_VEX_0F38B6 */
6377 { "vfmaddsub231p%XW", { XM, Vex, EXx }, 0 },
6380 /* PREFIX_VEX_0F38B7 */
6384 { "vfmsubadd231p%XW", { XM, Vex, EXx }, 0 },
6387 /* PREFIX_VEX_0F38B8 */
6391 { "vfmadd231p%XW", { XM, Vex, EXx }, 0 },
6394 /* PREFIX_VEX_0F38B9 */
6398 { "vfmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6401 /* PREFIX_VEX_0F38BA */
6405 { "vfmsub231p%XW", { XM, Vex, EXx }, 0 },
6408 /* PREFIX_VEX_0F38BB */
6412 { "vfmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6415 /* PREFIX_VEX_0F38BC */
6419 { "vfnmadd231p%XW", { XM, Vex, EXx }, 0 },
6422 /* PREFIX_VEX_0F38BD */
6426 { "vfnmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6429 /* PREFIX_VEX_0F38BE */
6433 { "vfnmsub231p%XW", { XM, Vex, EXx }, 0 },
6436 /* PREFIX_VEX_0F38BF */
6440 { "vfnmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar }, 0 },
6443 /* PREFIX_VEX_0F38CF */
6447 { VEX_W_TABLE (VEX_W_0F38CF_P_2) },
6450 /* PREFIX_VEX_0F38DB */
6454 { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2) },
6457 /* PREFIX_VEX_0F38DC */
6461 { "vaesenc", { XM, Vex, EXx }, 0 },
6464 /* PREFIX_VEX_0F38DD */
6468 { "vaesenclast", { XM, Vex, EXx }, 0 },
6471 /* PREFIX_VEX_0F38DE */
6475 { "vaesdec", { XM, Vex, EXx }, 0 },
6478 /* PREFIX_VEX_0F38DF */
6482 { "vaesdeclast", { XM, Vex, EXx }, 0 },
6485 /* PREFIX_VEX_0F38F2 */
6487 { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0) },
6490 /* PREFIX_VEX_0F38F3_REG_1 */
6492 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0) },
6495 /* PREFIX_VEX_0F38F3_REG_2 */
6497 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0) },
6500 /* PREFIX_VEX_0F38F3_REG_3 */
6502 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0) },
6505 /* PREFIX_VEX_0F38F5 */
6507 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_0) },
6508 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_1) },
6510 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_3) },
6513 /* PREFIX_VEX_0F38F6 */
6518 { VEX_LEN_TABLE (VEX_LEN_0F38F6_P_3) },
6521 /* PREFIX_VEX_0F38F7 */
6523 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0) },
6524 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_1) },
6525 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_2) },
6526 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_3) },
6529 /* PREFIX_VEX_0F3A00 */
6533 { VEX_LEN_TABLE (VEX_LEN_0F3A00_P_2) },
6536 /* PREFIX_VEX_0F3A01 */
6540 { VEX_LEN_TABLE (VEX_LEN_0F3A01_P_2) },
6543 /* PREFIX_VEX_0F3A02 */
6547 { VEX_W_TABLE (VEX_W_0F3A02_P_2) },
6550 /* PREFIX_VEX_0F3A04 */
6554 { VEX_W_TABLE (VEX_W_0F3A04_P_2) },
6557 /* PREFIX_VEX_0F3A05 */
6561 { VEX_W_TABLE (VEX_W_0F3A05_P_2) },
6564 /* PREFIX_VEX_0F3A06 */
6568 { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2) },
6571 /* PREFIX_VEX_0F3A08 */
6575 { VEX_W_TABLE (VEX_W_0F3A08_P_2) },
6578 /* PREFIX_VEX_0F3A09 */
6582 { VEX_W_TABLE (VEX_W_0F3A09_P_2) },
6585 /* PREFIX_VEX_0F3A0A */
6589 { VEX_LEN_TABLE (VEX_LEN_0F3A0A_P_2) },
6592 /* PREFIX_VEX_0F3A0B */
6596 { VEX_LEN_TABLE (VEX_LEN_0F3A0B_P_2) },
6599 /* PREFIX_VEX_0F3A0C */
6603 { VEX_W_TABLE (VEX_W_0F3A0C_P_2) },
6606 /* PREFIX_VEX_0F3A0D */
6610 { VEX_W_TABLE (VEX_W_0F3A0D_P_2) },
6613 /* PREFIX_VEX_0F3A0E */
6617 { VEX_W_TABLE (VEX_W_0F3A0E_P_2) },
6620 /* PREFIX_VEX_0F3A0F */
6624 { VEX_W_TABLE (VEX_W_0F3A0F_P_2) },
6627 /* PREFIX_VEX_0F3A14 */
6631 { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2) },
6634 /* PREFIX_VEX_0F3A15 */
6638 { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2) },
6641 /* PREFIX_VEX_0F3A16 */
6645 { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2) },
6648 /* PREFIX_VEX_0F3A17 */
6652 { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2) },
6655 /* PREFIX_VEX_0F3A18 */
6659 { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2) },
6662 /* PREFIX_VEX_0F3A19 */
6666 { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2) },
6669 /* PREFIX_VEX_0F3A1D */
6673 { "vcvtps2ph", { EXxmmq, XM, Ib }, 0 },
6676 /* PREFIX_VEX_0F3A20 */
6680 { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2) },
6683 /* PREFIX_VEX_0F3A21 */
6687 { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2) },
6690 /* PREFIX_VEX_0F3A22 */
6694 { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2) },
6697 /* PREFIX_VEX_0F3A30 */
6701 { VEX_LEN_TABLE (VEX_LEN_0F3A30_P_2) },
6704 /* PREFIX_VEX_0F3A31 */
6708 { VEX_LEN_TABLE (VEX_LEN_0F3A31_P_2) },
6711 /* PREFIX_VEX_0F3A32 */
6715 { VEX_LEN_TABLE (VEX_LEN_0F3A32_P_2) },
6718 /* PREFIX_VEX_0F3A33 */
6722 { VEX_LEN_TABLE (VEX_LEN_0F3A33_P_2) },
6725 /* PREFIX_VEX_0F3A38 */
6729 { VEX_LEN_TABLE (VEX_LEN_0F3A38_P_2) },
6732 /* PREFIX_VEX_0F3A39 */
6736 { VEX_LEN_TABLE (VEX_LEN_0F3A39_P_2) },
6739 /* PREFIX_VEX_0F3A40 */
6743 { VEX_W_TABLE (VEX_W_0F3A40_P_2) },
6746 /* PREFIX_VEX_0F3A41 */
6750 { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2) },
6753 /* PREFIX_VEX_0F3A42 */
6757 { VEX_W_TABLE (VEX_W_0F3A42_P_2) },
6760 /* PREFIX_VEX_0F3A44 */
6764 { "vpclmulqdq", { XM, Vex, EXx, PCLMUL }, 0 },
6767 /* PREFIX_VEX_0F3A46 */
6771 { VEX_LEN_TABLE (VEX_LEN_0F3A46_P_2) },
6774 /* PREFIX_VEX_0F3A48 */
6778 { VEX_W_TABLE (VEX_W_0F3A48_P_2) },
6781 /* PREFIX_VEX_0F3A49 */
6785 { VEX_W_TABLE (VEX_W_0F3A49_P_2) },
6788 /* PREFIX_VEX_0F3A4A */
6792 { VEX_W_TABLE (VEX_W_0F3A4A_P_2) },
6795 /* PREFIX_VEX_0F3A4B */
6799 { VEX_W_TABLE (VEX_W_0F3A4B_P_2) },
6802 /* PREFIX_VEX_0F3A4C */
6806 { VEX_W_TABLE (VEX_W_0F3A4C_P_2) },
6809 /* PREFIX_VEX_0F3A5C */
6813 { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6816 /* PREFIX_VEX_0F3A5D */
6820 { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6823 /* PREFIX_VEX_0F3A5E */
6827 { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6830 /* PREFIX_VEX_0F3A5F */
6834 { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6837 /* PREFIX_VEX_0F3A60 */
6841 { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2) },
6845 /* PREFIX_VEX_0F3A61 */
6849 { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2) },
6852 /* PREFIX_VEX_0F3A62 */
6856 { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2) },
6859 /* PREFIX_VEX_0F3A63 */
6863 { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2) },
6866 /* PREFIX_VEX_0F3A68 */
6870 { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6873 /* PREFIX_VEX_0F3A69 */
6877 { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6880 /* PREFIX_VEX_0F3A6A */
6884 { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2) },
6887 /* PREFIX_VEX_0F3A6B */
6891 { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2) },
6894 /* PREFIX_VEX_0F3A6C */
6898 { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6901 /* PREFIX_VEX_0F3A6D */
6905 { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6908 /* PREFIX_VEX_0F3A6E */
6912 { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2) },
6915 /* PREFIX_VEX_0F3A6F */
6919 { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2) },
6922 /* PREFIX_VEX_0F3A78 */
6926 { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6929 /* PREFIX_VEX_0F3A79 */
6933 { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6936 /* PREFIX_VEX_0F3A7A */
6940 { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2) },
6943 /* PREFIX_VEX_0F3A7B */
6947 { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2) },
6950 /* PREFIX_VEX_0F3A7C */
6954 { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6958 /* PREFIX_VEX_0F3A7D */
6962 { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
6965 /* PREFIX_VEX_0F3A7E */
6969 { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2) },
6972 /* PREFIX_VEX_0F3A7F */
6976 { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2) },
6979 /* PREFIX_VEX_0F3ACE */
6983 { VEX_W_TABLE (VEX_W_0F3ACE_P_2) },
6986 /* PREFIX_VEX_0F3ACF */
6990 { VEX_W_TABLE (VEX_W_0F3ACF_P_2) },
6993 /* PREFIX_VEX_0F3ADF */
6997 { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2) },
7000 /* PREFIX_VEX_0F3AF0 */
7005 { VEX_LEN_TABLE (VEX_LEN_0F3AF0_P_3) },
7008 #define NEED_PREFIX_TABLE
7009 #include "i386-dis-evex.h"
7010 #undef NEED_PREFIX_TABLE
7013 static const struct dis386 x86_64_table[][2] = {
7016 { "pushP", { es }, 0 },
7021 { "popP", { es }, 0 },
7026 { "pushP", { cs }, 0 },
7031 { "pushP", { ss }, 0 },
7036 { "popP", { ss }, 0 },
7041 { "pushP", { ds }, 0 },
7046 { "popP", { ds }, 0 },
7051 { "daa", { XX }, 0 },
7056 { "das", { XX }, 0 },
7061 { "aaa", { XX }, 0 },
7066 { "aas", { XX }, 0 },
7071 { "pushaP", { XX }, 0 },
7076 { "popaP", { XX }, 0 },
7081 { MOD_TABLE (MOD_62_32BIT) },
7082 { EVEX_TABLE (EVEX_0F) },
7087 { "arpl", { Ew, Gw }, 0 },
7088 { "movs{lq|xd}", { Gv, Ed }, 0 },
7093 { "ins{R|}", { Yzr, indirDX }, 0 },
7094 { "ins{G|}", { Yzr, indirDX }, 0 },
7099 { "outs{R|}", { indirDXr, Xz }, 0 },
7100 { "outs{G|}", { indirDXr, Xz }, 0 },
7105 /* Opcode 0x82 is an alias of opcode 0x80 in 32-bit mode. */
7106 { REG_TABLE (REG_80) },
7111 { "Jcall{T|}", { Ap }, 0 },
7116 { MOD_TABLE (MOD_C4_32BIT) },
7117 { VEX_C4_TABLE (VEX_0F) },
7122 { MOD_TABLE (MOD_C5_32BIT) },
7123 { VEX_C5_TABLE (VEX_0F) },
7128 { "into", { XX }, 0 },
7133 { "aam", { Ib }, 0 },
7138 { "aad", { Ib }, 0 },
7143 { "callP", { Jv, BND }, 0 },
7144 { "call@", { Jv, BND }, 0 }
7149 { "jmpP", { Jv, BND }, 0 },
7150 { "jmp@", { Jv, BND }, 0 }
7155 { "Jjmp{T|}", { Ap }, 0 },
7158 /* X86_64_0F01_REG_0 */
7160 { "sgdt{Q|IQ}", { M }, 0 },
7161 { "sgdt", { M }, 0 },
7164 /* X86_64_0F01_REG_1 */
7166 { "sidt{Q|IQ}", { M }, 0 },
7167 { "sidt", { M }, 0 },
7170 /* X86_64_0F01_REG_2 */
7172 { "lgdt{Q|Q}", { M }, 0 },
7173 { "lgdt", { M }, 0 },
7176 /* X86_64_0F01_REG_3 */
7178 { "lidt{Q|Q}", { M }, 0 },
7179 { "lidt", { M }, 0 },
7183 static const struct dis386 three_byte_table[][256] = {
7185 /* THREE_BYTE_0F38 */
7188 { "pshufb", { MX, EM }, PREFIX_OPCODE },
7189 { "phaddw", { MX, EM }, PREFIX_OPCODE },
7190 { "phaddd", { MX, EM }, PREFIX_OPCODE },
7191 { "phaddsw", { MX, EM }, PREFIX_OPCODE },
7192 { "pmaddubsw", { MX, EM }, PREFIX_OPCODE },
7193 { "phsubw", { MX, EM }, PREFIX_OPCODE },
7194 { "phsubd", { MX, EM }, PREFIX_OPCODE },
7195 { "phsubsw", { MX, EM }, PREFIX_OPCODE },
7197 { "psignb", { MX, EM }, PREFIX_OPCODE },
7198 { "psignw", { MX, EM }, PREFIX_OPCODE },
7199 { "psignd", { MX, EM }, PREFIX_OPCODE },
7200 { "pmulhrsw", { MX, EM }, PREFIX_OPCODE },
7206 { PREFIX_TABLE (PREFIX_0F3810) },
7210 { PREFIX_TABLE (PREFIX_0F3814) },
7211 { PREFIX_TABLE (PREFIX_0F3815) },
7213 { PREFIX_TABLE (PREFIX_0F3817) },
7219 { "pabsb", { MX, EM }, PREFIX_OPCODE },
7220 { "pabsw", { MX, EM }, PREFIX_OPCODE },
7221 { "pabsd", { MX, EM }, PREFIX_OPCODE },
7224 { PREFIX_TABLE (PREFIX_0F3820) },
7225 { PREFIX_TABLE (PREFIX_0F3821) },
7226 { PREFIX_TABLE (PREFIX_0F3822) },
7227 { PREFIX_TABLE (PREFIX_0F3823) },
7228 { PREFIX_TABLE (PREFIX_0F3824) },
7229 { PREFIX_TABLE (PREFIX_0F3825) },
7233 { PREFIX_TABLE (PREFIX_0F3828) },
7234 { PREFIX_TABLE (PREFIX_0F3829) },
7235 { PREFIX_TABLE (PREFIX_0F382A) },
7236 { PREFIX_TABLE (PREFIX_0F382B) },
7242 { PREFIX_TABLE (PREFIX_0F3830) },
7243 { PREFIX_TABLE (PREFIX_0F3831) },
7244 { PREFIX_TABLE (PREFIX_0F3832) },
7245 { PREFIX_TABLE (PREFIX_0F3833) },
7246 { PREFIX_TABLE (PREFIX_0F3834) },
7247 { PREFIX_TABLE (PREFIX_0F3835) },
7249 { PREFIX_TABLE (PREFIX_0F3837) },
7251 { PREFIX_TABLE (PREFIX_0F3838) },
7252 { PREFIX_TABLE (PREFIX_0F3839) },
7253 { PREFIX_TABLE (PREFIX_0F383A) },
7254 { PREFIX_TABLE (PREFIX_0F383B) },
7255 { PREFIX_TABLE (PREFIX_0F383C) },
7256 { PREFIX_TABLE (PREFIX_0F383D) },
7257 { PREFIX_TABLE (PREFIX_0F383E) },
7258 { PREFIX_TABLE (PREFIX_0F383F) },
7260 { PREFIX_TABLE (PREFIX_0F3840) },
7261 { PREFIX_TABLE (PREFIX_0F3841) },
7332 { PREFIX_TABLE (PREFIX_0F3880) },
7333 { PREFIX_TABLE (PREFIX_0F3881) },
7334 { PREFIX_TABLE (PREFIX_0F3882) },
7413 { PREFIX_TABLE (PREFIX_0F38C8) },
7414 { PREFIX_TABLE (PREFIX_0F38C9) },
7415 { PREFIX_TABLE (PREFIX_0F38CA) },
7416 { PREFIX_TABLE (PREFIX_0F38CB) },
7417 { PREFIX_TABLE (PREFIX_0F38CC) },
7418 { PREFIX_TABLE (PREFIX_0F38CD) },
7420 { PREFIX_TABLE (PREFIX_0F38CF) },
7434 { PREFIX_TABLE (PREFIX_0F38DB) },
7435 { PREFIX_TABLE (PREFIX_0F38DC) },
7436 { PREFIX_TABLE (PREFIX_0F38DD) },
7437 { PREFIX_TABLE (PREFIX_0F38DE) },
7438 { PREFIX_TABLE (PREFIX_0F38DF) },
7458 { PREFIX_TABLE (PREFIX_0F38F0) },
7459 { PREFIX_TABLE (PREFIX_0F38F1) },
7463 { PREFIX_TABLE (PREFIX_0F38F5) },
7464 { PREFIX_TABLE (PREFIX_0F38F6) },
7467 { PREFIX_TABLE (PREFIX_0F38F8) },
7468 { PREFIX_TABLE (PREFIX_0F38F9) },
7476 /* THREE_BYTE_0F3A */
7488 { PREFIX_TABLE (PREFIX_0F3A08) },
7489 { PREFIX_TABLE (PREFIX_0F3A09) },
7490 { PREFIX_TABLE (PREFIX_0F3A0A) },
7491 { PREFIX_TABLE (PREFIX_0F3A0B) },
7492 { PREFIX_TABLE (PREFIX_0F3A0C) },
7493 { PREFIX_TABLE (PREFIX_0F3A0D) },
7494 { PREFIX_TABLE (PREFIX_0F3A0E) },
7495 { "palignr", { MX, EM, Ib }, PREFIX_OPCODE },
7501 { PREFIX_TABLE (PREFIX_0F3A14) },
7502 { PREFIX_TABLE (PREFIX_0F3A15) },
7503 { PREFIX_TABLE (PREFIX_0F3A16) },
7504 { PREFIX_TABLE (PREFIX_0F3A17) },
7515 { PREFIX_TABLE (PREFIX_0F3A20) },
7516 { PREFIX_TABLE (PREFIX_0F3A21) },
7517 { PREFIX_TABLE (PREFIX_0F3A22) },
7551 { PREFIX_TABLE (PREFIX_0F3A40) },
7552 { PREFIX_TABLE (PREFIX_0F3A41) },
7553 { PREFIX_TABLE (PREFIX_0F3A42) },
7555 { PREFIX_TABLE (PREFIX_0F3A44) },
7587 { PREFIX_TABLE (PREFIX_0F3A60) },
7588 { PREFIX_TABLE (PREFIX_0F3A61) },
7589 { PREFIX_TABLE (PREFIX_0F3A62) },
7590 { PREFIX_TABLE (PREFIX_0F3A63) },
7708 { PREFIX_TABLE (PREFIX_0F3ACC) },
7710 { PREFIX_TABLE (PREFIX_0F3ACE) },
7711 { PREFIX_TABLE (PREFIX_0F3ACF) },
7729 { PREFIX_TABLE (PREFIX_0F3ADF) },
7769 static const struct dis386 xop_table[][256] = {
7922 { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7923 { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7924 { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7932 { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7933 { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7940 { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7941 { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7942 { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7950 { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7951 { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7955 { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7956 { "vpperm", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7959 { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7977 { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW }, 0 },
7989 { "vprotb", { XM, Vex_2src_1, Ib }, 0 },
7990 { "vprotw", { XM, Vex_2src_1, Ib }, 0 },
7991 { "vprotd", { XM, Vex_2src_1, Ib }, 0 },
7992 { "vprotq", { XM, Vex_2src_1, Ib }, 0 },
8002 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CC) },
8003 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CD) },
8004 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CE) },
8005 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CF) },
8038 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EC) },
8039 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_ED) },
8040 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EE) },
8041 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EF) },
8065 { REG_TABLE (REG_XOP_TBM_01) },
8066 { REG_TABLE (REG_XOP_TBM_02) },
8084 { REG_TABLE (REG_XOP_LWPCB) },
8208 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80) },
8209 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81) },
8210 { "vfrczss", { XM, EXd }, 0 },
8211 { "vfrczsd", { XM, EXq }, 0 },
8226 { "vprotb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8227 { "vprotw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8228 { "vprotd", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8229 { "vprotq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8230 { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8231 { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8232 { "vpshld", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8233 { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8235 { "vpshab", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8236 { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8237 { "vpshad", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8238 { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 }, 0 },
8281 { "vphaddbw", { XM, EXxmm }, 0 },
8282 { "vphaddbd", { XM, EXxmm }, 0 },
8283 { "vphaddbq", { XM, EXxmm }, 0 },
8286 { "vphaddwd", { XM, EXxmm }, 0 },
8287 { "vphaddwq", { XM, EXxmm }, 0 },
8292 { "vphadddq", { XM, EXxmm }, 0 },
8299 { "vphaddubw", { XM, EXxmm }, 0 },
8300 { "vphaddubd", { XM, EXxmm }, 0 },
8301 { "vphaddubq", { XM, EXxmm }, 0 },
8304 { "vphadduwd", { XM, EXxmm }, 0 },
8305 { "vphadduwq", { XM, EXxmm }, 0 },
8310 { "vphaddudq", { XM, EXxmm }, 0 },
8317 { "vphsubbw", { XM, EXxmm }, 0 },
8318 { "vphsubwd", { XM, EXxmm }, 0 },
8319 { "vphsubdq", { XM, EXxmm }, 0 },
8373 { "bextr", { Gv, Ev, Iq }, 0 },
8375 { REG_TABLE (REG_XOP_LWP) },
8645 static const struct dis386 vex_table[][256] = {
8667 { PREFIX_TABLE (PREFIX_VEX_0F10) },
8668 { PREFIX_TABLE (PREFIX_VEX_0F11) },
8669 { PREFIX_TABLE (PREFIX_VEX_0F12) },
8670 { MOD_TABLE (MOD_VEX_0F13) },
8671 { VEX_W_TABLE (VEX_W_0F14) },
8672 { VEX_W_TABLE (VEX_W_0F15) },
8673 { PREFIX_TABLE (PREFIX_VEX_0F16) },
8674 { MOD_TABLE (MOD_VEX_0F17) },
8694 { VEX_W_TABLE (VEX_W_0F28) },
8695 { VEX_W_TABLE (VEX_W_0F29) },
8696 { PREFIX_TABLE (PREFIX_VEX_0F2A) },
8697 { MOD_TABLE (MOD_VEX_0F2B) },
8698 { PREFIX_TABLE (PREFIX_VEX_0F2C) },
8699 { PREFIX_TABLE (PREFIX_VEX_0F2D) },
8700 { PREFIX_TABLE (PREFIX_VEX_0F2E) },
8701 { PREFIX_TABLE (PREFIX_VEX_0F2F) },
8722 { PREFIX_TABLE (PREFIX_VEX_0F41) },
8723 { PREFIX_TABLE (PREFIX_VEX_0F42) },
8725 { PREFIX_TABLE (PREFIX_VEX_0F44) },
8726 { PREFIX_TABLE (PREFIX_VEX_0F45) },
8727 { PREFIX_TABLE (PREFIX_VEX_0F46) },
8728 { PREFIX_TABLE (PREFIX_VEX_0F47) },
8732 { PREFIX_TABLE (PREFIX_VEX_0F4A) },
8733 { PREFIX_TABLE (PREFIX_VEX_0F4B) },
8739 { MOD_TABLE (MOD_VEX_0F50) },
8740 { PREFIX_TABLE (PREFIX_VEX_0F51) },
8741 { PREFIX_TABLE (PREFIX_VEX_0F52) },
8742 { PREFIX_TABLE (PREFIX_VEX_0F53) },
8743 { "vandpX", { XM, Vex, EXx }, 0 },
8744 { "vandnpX", { XM, Vex, EXx }, 0 },
8745 { "vorpX", { XM, Vex, EXx }, 0 },
8746 { "vxorpX", { XM, Vex, EXx }, 0 },
8748 { PREFIX_TABLE (PREFIX_VEX_0F58) },
8749 { PREFIX_TABLE (PREFIX_VEX_0F59) },
8750 { PREFIX_TABLE (PREFIX_VEX_0F5A) },
8751 { PREFIX_TABLE (PREFIX_VEX_0F5B) },
8752 { PREFIX_TABLE (PREFIX_VEX_0F5C) },
8753 { PREFIX_TABLE (PREFIX_VEX_0F5D) },
8754 { PREFIX_TABLE (PREFIX_VEX_0F5E) },
8755 { PREFIX_TABLE (PREFIX_VEX_0F5F) },
8757 { PREFIX_TABLE (PREFIX_VEX_0F60) },
8758 { PREFIX_TABLE (PREFIX_VEX_0F61) },
8759 { PREFIX_TABLE (PREFIX_VEX_0F62) },
8760 { PREFIX_TABLE (PREFIX_VEX_0F63) },
8761 { PREFIX_TABLE (PREFIX_VEX_0F64) },
8762 { PREFIX_TABLE (PREFIX_VEX_0F65) },
8763 { PREFIX_TABLE (PREFIX_VEX_0F66) },
8764 { PREFIX_TABLE (PREFIX_VEX_0F67) },
8766 { PREFIX_TABLE (PREFIX_VEX_0F68) },
8767 { PREFIX_TABLE (PREFIX_VEX_0F69) },
8768 { PREFIX_TABLE (PREFIX_VEX_0F6A) },
8769 { PREFIX_TABLE (PREFIX_VEX_0F6B) },
8770 { PREFIX_TABLE (PREFIX_VEX_0F6C) },
8771 { PREFIX_TABLE (PREFIX_VEX_0F6D) },
8772 { PREFIX_TABLE (PREFIX_VEX_0F6E) },
8773 { PREFIX_TABLE (PREFIX_VEX_0F6F) },
8775 { PREFIX_TABLE (PREFIX_VEX_0F70) },
8776 { REG_TABLE (REG_VEX_0F71) },
8777 { REG_TABLE (REG_VEX_0F72) },
8778 { REG_TABLE (REG_VEX_0F73) },
8779 { PREFIX_TABLE (PREFIX_VEX_0F74) },
8780 { PREFIX_TABLE (PREFIX_VEX_0F75) },
8781 { PREFIX_TABLE (PREFIX_VEX_0F76) },
8782 { PREFIX_TABLE (PREFIX_VEX_0F77) },
8788 { PREFIX_TABLE (PREFIX_VEX_0F7C) },
8789 { PREFIX_TABLE (PREFIX_VEX_0F7D) },
8790 { PREFIX_TABLE (PREFIX_VEX_0F7E) },
8791 { PREFIX_TABLE (PREFIX_VEX_0F7F) },
8811 { PREFIX_TABLE (PREFIX_VEX_0F90) },
8812 { PREFIX_TABLE (PREFIX_VEX_0F91) },
8813 { PREFIX_TABLE (PREFIX_VEX_0F92) },
8814 { PREFIX_TABLE (PREFIX_VEX_0F93) },
8820 { PREFIX_TABLE (PREFIX_VEX_0F98) },
8821 { PREFIX_TABLE (PREFIX_VEX_0F99) },
8844 { REG_TABLE (REG_VEX_0FAE) },
8867 { PREFIX_TABLE (PREFIX_VEX_0FC2) },
8869 { PREFIX_TABLE (PREFIX_VEX_0FC4) },
8870 { PREFIX_TABLE (PREFIX_VEX_0FC5) },
8871 { "vshufpX", { XM, Vex, EXx, Ib }, 0 },
8883 { PREFIX_TABLE (PREFIX_VEX_0FD0) },
8884 { PREFIX_TABLE (PREFIX_VEX_0FD1) },
8885 { PREFIX_TABLE (PREFIX_VEX_0FD2) },
8886 { PREFIX_TABLE (PREFIX_VEX_0FD3) },
8887 { PREFIX_TABLE (PREFIX_VEX_0FD4) },
8888 { PREFIX_TABLE (PREFIX_VEX_0FD5) },
8889 { PREFIX_TABLE (PREFIX_VEX_0FD6) },
8890 { PREFIX_TABLE (PREFIX_VEX_0FD7) },
8892 { PREFIX_TABLE (PREFIX_VEX_0FD8) },
8893 { PREFIX_TABLE (PREFIX_VEX_0FD9) },
8894 { PREFIX_TABLE (PREFIX_VEX_0FDA) },
8895 { PREFIX_TABLE (PREFIX_VEX_0FDB) },
8896 { PREFIX_TABLE (PREFIX_VEX_0FDC) },
8897 { PREFIX_TABLE (PREFIX_VEX_0FDD) },
8898 { PREFIX_TABLE (PREFIX_VEX_0FDE) },
8899 { PREFIX_TABLE (PREFIX_VEX_0FDF) },
8901 { PREFIX_TABLE (PREFIX_VEX_0FE0) },
8902 { PREFIX_TABLE (PREFIX_VEX_0FE1) },
8903 { PREFIX_TABLE (PREFIX_VEX_0FE2) },
8904 { PREFIX_TABLE (PREFIX_VEX_0FE3) },
8905 { PREFIX_TABLE (PREFIX_VEX_0FE4) },
8906 { PREFIX_TABLE (PREFIX_VEX_0FE5) },
8907 { PREFIX_TABLE (PREFIX_VEX_0FE6) },
8908 { PREFIX_TABLE (PREFIX_VEX_0FE7) },
8910 { PREFIX_TABLE (PREFIX_VEX_0FE8) },
8911 { PREFIX_TABLE (PREFIX_VEX_0FE9) },
8912 { PREFIX_TABLE (PREFIX_VEX_0FEA) },
8913 { PREFIX_TABLE (PREFIX_VEX_0FEB) },
8914 { PREFIX_TABLE (PREFIX_VEX_0FEC) },
8915 { PREFIX_TABLE (PREFIX_VEX_0FED) },
8916 { PREFIX_TABLE (PREFIX_VEX_0FEE) },
8917 { PREFIX_TABLE (PREFIX_VEX_0FEF) },
8919 { PREFIX_TABLE (PREFIX_VEX_0FF0) },
8920 { PREFIX_TABLE (PREFIX_VEX_0FF1) },
8921 { PREFIX_TABLE (PREFIX_VEX_0FF2) },
8922 { PREFIX_TABLE (PREFIX_VEX_0FF3) },
8923 { PREFIX_TABLE (PREFIX_VEX_0FF4) },
8924 { PREFIX_TABLE (PREFIX_VEX_0FF5) },
8925 { PREFIX_TABLE (PREFIX_VEX_0FF6) },
8926 { PREFIX_TABLE (PREFIX_VEX_0FF7) },
8928 { PREFIX_TABLE (PREFIX_VEX_0FF8) },
8929 { PREFIX_TABLE (PREFIX_VEX_0FF9) },
8930 { PREFIX_TABLE (PREFIX_VEX_0FFA) },
8931 { PREFIX_TABLE (PREFIX_VEX_0FFB) },
8932 { PREFIX_TABLE (PREFIX_VEX_0FFC) },
8933 { PREFIX_TABLE (PREFIX_VEX_0FFD) },
8934 { PREFIX_TABLE (PREFIX_VEX_0FFE) },
8940 { PREFIX_TABLE (PREFIX_VEX_0F3800) },
8941 { PREFIX_TABLE (PREFIX_VEX_0F3801) },
8942 { PREFIX_TABLE (PREFIX_VEX_0F3802) },
8943 { PREFIX_TABLE (PREFIX_VEX_0F3803) },
8944 { PREFIX_TABLE (PREFIX_VEX_0F3804) },
8945 { PREFIX_TABLE (PREFIX_VEX_0F3805) },
8946 { PREFIX_TABLE (PREFIX_VEX_0F3806) },
8947 { PREFIX_TABLE (PREFIX_VEX_0F3807) },
8949 { PREFIX_TABLE (PREFIX_VEX_0F3808) },
8950 { PREFIX_TABLE (PREFIX_VEX_0F3809) },
8951 { PREFIX_TABLE (PREFIX_VEX_0F380A) },
8952 { PREFIX_TABLE (PREFIX_VEX_0F380B) },
8953 { PREFIX_TABLE (PREFIX_VEX_0F380C) },
8954 { PREFIX_TABLE (PREFIX_VEX_0F380D) },
8955 { PREFIX_TABLE (PREFIX_VEX_0F380E) },
8956 { PREFIX_TABLE (PREFIX_VEX_0F380F) },
8961 { PREFIX_TABLE (PREFIX_VEX_0F3813) },
8964 { PREFIX_TABLE (PREFIX_VEX_0F3816) },
8965 { PREFIX_TABLE (PREFIX_VEX_0F3817) },
8967 { PREFIX_TABLE (PREFIX_VEX_0F3818) },
8968 { PREFIX_TABLE (PREFIX_VEX_0F3819) },
8969 { PREFIX_TABLE (PREFIX_VEX_0F381A) },
8971 { PREFIX_TABLE (PREFIX_VEX_0F381C) },
8972 { PREFIX_TABLE (PREFIX_VEX_0F381D) },
8973 { PREFIX_TABLE (PREFIX_VEX_0F381E) },
8976 { PREFIX_TABLE (PREFIX_VEX_0F3820) },
8977 { PREFIX_TABLE (PREFIX_VEX_0F3821) },
8978 { PREFIX_TABLE (PREFIX_VEX_0F3822) },
8979 { PREFIX_TABLE (PREFIX_VEX_0F3823) },
8980 { PREFIX_TABLE (PREFIX_VEX_0F3824) },
8981 { PREFIX_TABLE (PREFIX_VEX_0F3825) },
8985 { PREFIX_TABLE (PREFIX_VEX_0F3828) },
8986 { PREFIX_TABLE (PREFIX_VEX_0F3829) },
8987 { PREFIX_TABLE (PREFIX_VEX_0F382A) },
8988 { PREFIX_TABLE (PREFIX_VEX_0F382B) },
8989 { PREFIX_TABLE (PREFIX_VEX_0F382C) },
8990 { PREFIX_TABLE (PREFIX_VEX_0F382D) },
8991 { PREFIX_TABLE (PREFIX_VEX_0F382E) },
8992 { PREFIX_TABLE (PREFIX_VEX_0F382F) },
8994 { PREFIX_TABLE (PREFIX_VEX_0F3830) },
8995 { PREFIX_TABLE (PREFIX_VEX_0F3831) },
8996 { PREFIX_TABLE (PREFIX_VEX_0F3832) },
8997 { PREFIX_TABLE (PREFIX_VEX_0F3833) },
8998 { PREFIX_TABLE (PREFIX_VEX_0F3834) },
8999 { PREFIX_TABLE (PREFIX_VEX_0F3835) },
9000 { PREFIX_TABLE (PREFIX_VEX_0F3836) },
9001 { PREFIX_TABLE (PREFIX_VEX_0F3837) },
9003 { PREFIX_TABLE (PREFIX_VEX_0F3838) },
9004 { PREFIX_TABLE (PREFIX_VEX_0F3839) },
9005 { PREFIX_TABLE (PREFIX_VEX_0F383A) },
9006 { PREFIX_TABLE (PREFIX_VEX_0F383B) },
9007 { PREFIX_TABLE (PREFIX_VEX_0F383C) },
9008 { PREFIX_TABLE (PREFIX_VEX_0F383D) },
9009 { PREFIX_TABLE (PREFIX_VEX_0F383E) },
9010 { PREFIX_TABLE (PREFIX_VEX_0F383F) },
9012 { PREFIX_TABLE (PREFIX_VEX_0F3840) },
9013 { PREFIX_TABLE (PREFIX_VEX_0F3841) },
9017 { PREFIX_TABLE (PREFIX_VEX_0F3845) },
9018 { PREFIX_TABLE (PREFIX_VEX_0F3846) },
9019 { PREFIX_TABLE (PREFIX_VEX_0F3847) },
9039 { PREFIX_TABLE (PREFIX_VEX_0F3858) },
9040 { PREFIX_TABLE (PREFIX_VEX_0F3859) },
9041 { PREFIX_TABLE (PREFIX_VEX_0F385A) },
9075 { PREFIX_TABLE (PREFIX_VEX_0F3878) },
9076 { PREFIX_TABLE (PREFIX_VEX_0F3879) },
9097 { PREFIX_TABLE (PREFIX_VEX_0F388C) },
9099 { PREFIX_TABLE (PREFIX_VEX_0F388E) },
9102 { PREFIX_TABLE (PREFIX_VEX_0F3890) },
9103 { PREFIX_TABLE (PREFIX_VEX_0F3891) },
9104 { PREFIX_TABLE (PREFIX_VEX_0F3892) },
9105 { PREFIX_TABLE (PREFIX_VEX_0F3893) },
9108 { PREFIX_TABLE (PREFIX_VEX_0F3896) },
9109 { PREFIX_TABLE (PREFIX_VEX_0F3897) },
9111 { PREFIX_TABLE (PREFIX_VEX_0F3898) },
9112 { PREFIX_TABLE (PREFIX_VEX_0F3899) },
9113 { PREFIX_TABLE (PREFIX_VEX_0F389A) },
9114 { PREFIX_TABLE (PREFIX_VEX_0F389B) },
9115 { PREFIX_TABLE (PREFIX_VEX_0F389C) },
9116 { PREFIX_TABLE (PREFIX_VEX_0F389D) },
9117 { PREFIX_TABLE (PREFIX_VEX_0F389E) },
9118 { PREFIX_TABLE (PREFIX_VEX_0F389F) },
9126 { PREFIX_TABLE (PREFIX_VEX_0F38A6) },
9127 { PREFIX_TABLE (PREFIX_VEX_0F38A7) },
9129 { PREFIX_TABLE (PREFIX_VEX_0F38A8) },
9130 { PREFIX_TABLE (PREFIX_VEX_0F38A9) },
9131 { PREFIX_TABLE (PREFIX_VEX_0F38AA) },
9132 { PREFIX_TABLE (PREFIX_VEX_0F38AB) },
9133 { PREFIX_TABLE (PREFIX_VEX_0F38AC) },
9134 { PREFIX_TABLE (PREFIX_VEX_0F38AD) },
9135 { PREFIX_TABLE (PREFIX_VEX_0F38AE) },
9136 { PREFIX_TABLE (PREFIX_VEX_0F38AF) },
9144 { PREFIX_TABLE (PREFIX_VEX_0F38B6) },
9145 { PREFIX_TABLE (PREFIX_VEX_0F38B7) },
9147 { PREFIX_TABLE (PREFIX_VEX_0F38B8) },
9148 { PREFIX_TABLE (PREFIX_VEX_0F38B9) },
9149 { PREFIX_TABLE (PREFIX_VEX_0F38BA) },
9150 { PREFIX_TABLE (PREFIX_VEX_0F38BB) },
9151 { PREFIX_TABLE (PREFIX_VEX_0F38BC) },
9152 { PREFIX_TABLE (PREFIX_VEX_0F38BD) },
9153 { PREFIX_TABLE (PREFIX_VEX_0F38BE) },
9154 { PREFIX_TABLE (PREFIX_VEX_0F38BF) },
9172 { PREFIX_TABLE (PREFIX_VEX_0F38CF) },
9186 { PREFIX_TABLE (PREFIX_VEX_0F38DB) },
9187 { PREFIX_TABLE (PREFIX_VEX_0F38DC) },
9188 { PREFIX_TABLE (PREFIX_VEX_0F38DD) },
9189 { PREFIX_TABLE (PREFIX_VEX_0F38DE) },
9190 { PREFIX_TABLE (PREFIX_VEX_0F38DF) },
9212 { PREFIX_TABLE (PREFIX_VEX_0F38F2) },
9213 { REG_TABLE (REG_VEX_0F38F3) },
9215 { PREFIX_TABLE (PREFIX_VEX_0F38F5) },
9216 { PREFIX_TABLE (PREFIX_VEX_0F38F6) },
9217 { PREFIX_TABLE (PREFIX_VEX_0F38F7) },
9231 { PREFIX_TABLE (PREFIX_VEX_0F3A00) },
9232 { PREFIX_TABLE (PREFIX_VEX_0F3A01) },
9233 { PREFIX_TABLE (PREFIX_VEX_0F3A02) },
9235 { PREFIX_TABLE (PREFIX_VEX_0F3A04) },
9236 { PREFIX_TABLE (PREFIX_VEX_0F3A05) },
9237 { PREFIX_TABLE (PREFIX_VEX_0F3A06) },
9240 { PREFIX_TABLE (PREFIX_VEX_0F3A08) },
9241 { PREFIX_TABLE (PREFIX_VEX_0F3A09) },
9242 { PREFIX_TABLE (PREFIX_VEX_0F3A0A) },
9243 { PREFIX_TABLE (PREFIX_VEX_0F3A0B) },
9244 { PREFIX_TABLE (PREFIX_VEX_0F3A0C) },
9245 { PREFIX_TABLE (PREFIX_VEX_0F3A0D) },
9246 { PREFIX_TABLE (PREFIX_VEX_0F3A0E) },
9247 { PREFIX_TABLE (PREFIX_VEX_0F3A0F) },
9253 { PREFIX_TABLE (PREFIX_VEX_0F3A14) },
9254 { PREFIX_TABLE (PREFIX_VEX_0F3A15) },
9255 { PREFIX_TABLE (PREFIX_VEX_0F3A16) },
9256 { PREFIX_TABLE (PREFIX_VEX_0F3A17) },
9258 { PREFIX_TABLE (PREFIX_VEX_0F3A18) },
9259 { PREFIX_TABLE (PREFIX_VEX_0F3A19) },
9263 { PREFIX_TABLE (PREFIX_VEX_0F3A1D) },
9267 { PREFIX_TABLE (PREFIX_VEX_0F3A20) },
9268 { PREFIX_TABLE (PREFIX_VEX_0F3A21) },
9269 { PREFIX_TABLE (PREFIX_VEX_0F3A22) },
9285 { PREFIX_TABLE (PREFIX_VEX_0F3A30) },
9286 { PREFIX_TABLE (PREFIX_VEX_0F3A31) },
9287 { PREFIX_TABLE (PREFIX_VEX_0F3A32) },
9288 { PREFIX_TABLE (PREFIX_VEX_0F3A33) },
9294 { PREFIX_TABLE (PREFIX_VEX_0F3A38) },
9295 { PREFIX_TABLE (PREFIX_VEX_0F3A39) },
9303 { PREFIX_TABLE (PREFIX_VEX_0F3A40) },
9304 { PREFIX_TABLE (PREFIX_VEX_0F3A41) },
9305 { PREFIX_TABLE (PREFIX_VEX_0F3A42) },
9307 { PREFIX_TABLE (PREFIX_VEX_0F3A44) },
9309 { PREFIX_TABLE (PREFIX_VEX_0F3A46) },
9312 { PREFIX_TABLE (PREFIX_VEX_0F3A48) },
9313 { PREFIX_TABLE (PREFIX_VEX_0F3A49) },
9314 { PREFIX_TABLE (PREFIX_VEX_0F3A4A) },
9315 { PREFIX_TABLE (PREFIX_VEX_0F3A4B) },
9316 { PREFIX_TABLE (PREFIX_VEX_0F3A4C) },
9334 { PREFIX_TABLE (PREFIX_VEX_0F3A5C) },
9335 { PREFIX_TABLE (PREFIX_VEX_0F3A5D) },
9336 { PREFIX_TABLE (PREFIX_VEX_0F3A5E) },
9337 { PREFIX_TABLE (PREFIX_VEX_0F3A5F) },
9339 { PREFIX_TABLE (PREFIX_VEX_0F3A60) },
9340 { PREFIX_TABLE (PREFIX_VEX_0F3A61) },
9341 { PREFIX_TABLE (PREFIX_VEX_0F3A62) },
9342 { PREFIX_TABLE (PREFIX_VEX_0F3A63) },
9348 { PREFIX_TABLE (PREFIX_VEX_0F3A68) },
9349 { PREFIX_TABLE (PREFIX_VEX_0F3A69) },
9350 { PREFIX_TABLE (PREFIX_VEX_0F3A6A) },
9351 { PREFIX_TABLE (PREFIX_VEX_0F3A6B) },
9352 { PREFIX_TABLE (PREFIX_VEX_0F3A6C) },
9353 { PREFIX_TABLE (PREFIX_VEX_0F3A6D) },
9354 { PREFIX_TABLE (PREFIX_VEX_0F3A6E) },
9355 { PREFIX_TABLE (PREFIX_VEX_0F3A6F) },
9366 { PREFIX_TABLE (PREFIX_VEX_0F3A78) },
9367 { PREFIX_TABLE (PREFIX_VEX_0F3A79) },
9368 { PREFIX_TABLE (PREFIX_VEX_0F3A7A) },
9369 { PREFIX_TABLE (PREFIX_VEX_0F3A7B) },
9370 { PREFIX_TABLE (PREFIX_VEX_0F3A7C) },
9371 { PREFIX_TABLE (PREFIX_VEX_0F3A7D) },
9372 { PREFIX_TABLE (PREFIX_VEX_0F3A7E) },
9373 { PREFIX_TABLE (PREFIX_VEX_0F3A7F) },
9462 { PREFIX_TABLE(PREFIX_VEX_0F3ACE) },
9463 { PREFIX_TABLE(PREFIX_VEX_0F3ACF) },
9481 { PREFIX_TABLE (PREFIX_VEX_0F3ADF) },
9501 { PREFIX_TABLE (PREFIX_VEX_0F3AF0) },
9521 #define NEED_OPCODE_TABLE
9522 #include "i386-dis-evex.h"
9523 #undef NEED_OPCODE_TABLE
9524 static const struct dis386 vex_len_table[][2] = {
9525 /* VEX_LEN_0F10_P_1 */
9527 { VEX_W_TABLE (VEX_W_0F10_P_1) },
9528 { VEX_W_TABLE (VEX_W_0F10_P_1) },
9531 /* VEX_LEN_0F10_P_3 */
9533 { VEX_W_TABLE (VEX_W_0F10_P_3) },
9534 { VEX_W_TABLE (VEX_W_0F10_P_3) },
9537 /* VEX_LEN_0F11_P_1 */
9539 { VEX_W_TABLE (VEX_W_0F11_P_1) },
9540 { VEX_W_TABLE (VEX_W_0F11_P_1) },
9543 /* VEX_LEN_0F11_P_3 */
9545 { VEX_W_TABLE (VEX_W_0F11_P_3) },
9546 { VEX_W_TABLE (VEX_W_0F11_P_3) },
9549 /* VEX_LEN_0F12_P_0_M_0 */
9551 { VEX_W_TABLE (VEX_W_0F12_P_0_M_0) },
9554 /* VEX_LEN_0F12_P_0_M_1 */
9556 { VEX_W_TABLE (VEX_W_0F12_P_0_M_1) },
9559 /* VEX_LEN_0F12_P_2 */
9561 { VEX_W_TABLE (VEX_W_0F12_P_2) },
9564 /* VEX_LEN_0F13_M_0 */
9566 { VEX_W_TABLE (VEX_W_0F13_M_0) },
9569 /* VEX_LEN_0F16_P_0_M_0 */
9571 { VEX_W_TABLE (VEX_W_0F16_P_0_M_0) },
9574 /* VEX_LEN_0F16_P_0_M_1 */
9576 { VEX_W_TABLE (VEX_W_0F16_P_0_M_1) },
9579 /* VEX_LEN_0F16_P_2 */
9581 { VEX_W_TABLE (VEX_W_0F16_P_2) },
9584 /* VEX_LEN_0F17_M_0 */
9586 { VEX_W_TABLE (VEX_W_0F17_M_0) },
9589 /* VEX_LEN_0F2A_P_1 */
9591 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev }, 0 },
9592 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev }, 0 },
9595 /* VEX_LEN_0F2A_P_3 */
9597 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev }, 0 },
9598 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev }, 0 },
9601 /* VEX_LEN_0F2C_P_1 */
9603 { "vcvttss2si", { Gv, EXdScalar }, 0 },
9604 { "vcvttss2si", { Gv, EXdScalar }, 0 },
9607 /* VEX_LEN_0F2C_P_3 */
9609 { "vcvttsd2si", { Gv, EXqScalar }, 0 },
9610 { "vcvttsd2si", { Gv, EXqScalar }, 0 },
9613 /* VEX_LEN_0F2D_P_1 */
9615 { "vcvtss2si", { Gv, EXdScalar }, 0 },
9616 { "vcvtss2si", { Gv, EXdScalar }, 0 },
9619 /* VEX_LEN_0F2D_P_3 */
9621 { "vcvtsd2si", { Gv, EXqScalar }, 0 },
9622 { "vcvtsd2si", { Gv, EXqScalar }, 0 },
9625 /* VEX_LEN_0F2E_P_0 */
9627 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
9628 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
9631 /* VEX_LEN_0F2E_P_2 */
9633 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
9634 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
9637 /* VEX_LEN_0F2F_P_0 */
9639 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
9640 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
9643 /* VEX_LEN_0F2F_P_2 */
9645 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
9646 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
9649 /* VEX_LEN_0F41_P_0 */
9652 { VEX_W_TABLE (VEX_W_0F41_P_0_LEN_1) },
9654 /* VEX_LEN_0F41_P_2 */
9657 { VEX_W_TABLE (VEX_W_0F41_P_2_LEN_1) },
9659 /* VEX_LEN_0F42_P_0 */
9662 { VEX_W_TABLE (VEX_W_0F42_P_0_LEN_1) },
9664 /* VEX_LEN_0F42_P_2 */
9667 { VEX_W_TABLE (VEX_W_0F42_P_2_LEN_1) },
9669 /* VEX_LEN_0F44_P_0 */
9671 { VEX_W_TABLE (VEX_W_0F44_P_0_LEN_0) },
9673 /* VEX_LEN_0F44_P_2 */
9675 { VEX_W_TABLE (VEX_W_0F44_P_2_LEN_0) },
9677 /* VEX_LEN_0F45_P_0 */
9680 { VEX_W_TABLE (VEX_W_0F45_P_0_LEN_1) },
9682 /* VEX_LEN_0F45_P_2 */
9685 { VEX_W_TABLE (VEX_W_0F45_P_2_LEN_1) },
9687 /* VEX_LEN_0F46_P_0 */
9690 { VEX_W_TABLE (VEX_W_0F46_P_0_LEN_1) },
9692 /* VEX_LEN_0F46_P_2 */
9695 { VEX_W_TABLE (VEX_W_0F46_P_2_LEN_1) },
9697 /* VEX_LEN_0F47_P_0 */
9700 { VEX_W_TABLE (VEX_W_0F47_P_0_LEN_1) },
9702 /* VEX_LEN_0F47_P_2 */
9705 { VEX_W_TABLE (VEX_W_0F47_P_2_LEN_1) },
9707 /* VEX_LEN_0F4A_P_0 */
9710 { VEX_W_TABLE (VEX_W_0F4A_P_0_LEN_1) },
9712 /* VEX_LEN_0F4A_P_2 */
9715 { VEX_W_TABLE (VEX_W_0F4A_P_2_LEN_1) },
9717 /* VEX_LEN_0F4B_P_0 */
9720 { VEX_W_TABLE (VEX_W_0F4B_P_0_LEN_1) },
9722 /* VEX_LEN_0F4B_P_2 */
9725 { VEX_W_TABLE (VEX_W_0F4B_P_2_LEN_1) },
9728 /* VEX_LEN_0F51_P_1 */
9730 { VEX_W_TABLE (VEX_W_0F51_P_1) },
9731 { VEX_W_TABLE (VEX_W_0F51_P_1) },
9734 /* VEX_LEN_0F51_P_3 */
9736 { VEX_W_TABLE (VEX_W_0F51_P_3) },
9737 { VEX_W_TABLE (VEX_W_0F51_P_3) },
9740 /* VEX_LEN_0F52_P_1 */
9742 { VEX_W_TABLE (VEX_W_0F52_P_1) },
9743 { VEX_W_TABLE (VEX_W_0F52_P_1) },
9746 /* VEX_LEN_0F53_P_1 */
9748 { VEX_W_TABLE (VEX_W_0F53_P_1) },
9749 { VEX_W_TABLE (VEX_W_0F53_P_1) },
9752 /* VEX_LEN_0F58_P_1 */
9754 { VEX_W_TABLE (VEX_W_0F58_P_1) },
9755 { VEX_W_TABLE (VEX_W_0F58_P_1) },
9758 /* VEX_LEN_0F58_P_3 */
9760 { VEX_W_TABLE (VEX_W_0F58_P_3) },
9761 { VEX_W_TABLE (VEX_W_0F58_P_3) },
9764 /* VEX_LEN_0F59_P_1 */
9766 { VEX_W_TABLE (VEX_W_0F59_P_1) },
9767 { VEX_W_TABLE (VEX_W_0F59_P_1) },
9770 /* VEX_LEN_0F59_P_3 */
9772 { VEX_W_TABLE (VEX_W_0F59_P_3) },
9773 { VEX_W_TABLE (VEX_W_0F59_P_3) },
9776 /* VEX_LEN_0F5A_P_1 */
9778 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
9779 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
9782 /* VEX_LEN_0F5A_P_3 */
9784 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
9785 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
9788 /* VEX_LEN_0F5C_P_1 */
9790 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
9791 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
9794 /* VEX_LEN_0F5C_P_3 */
9796 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
9797 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
9800 /* VEX_LEN_0F5D_P_1 */
9802 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
9803 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
9806 /* VEX_LEN_0F5D_P_3 */
9808 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
9809 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
9812 /* VEX_LEN_0F5E_P_1 */
9814 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
9815 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
9818 /* VEX_LEN_0F5E_P_3 */
9820 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
9821 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
9824 /* VEX_LEN_0F5F_P_1 */
9826 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
9827 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
9830 /* VEX_LEN_0F5F_P_3 */
9832 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
9833 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
9836 /* VEX_LEN_0F6E_P_2 */
9838 { "vmovK", { XMScalar, Edq }, 0 },
9839 { "vmovK", { XMScalar, Edq }, 0 },
9842 /* VEX_LEN_0F7E_P_1 */
9844 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
9845 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
9848 /* VEX_LEN_0F7E_P_2 */
9850 { "vmovK", { Edq, XMScalar }, 0 },
9851 { "vmovK", { Edq, XMScalar }, 0 },
9854 /* VEX_LEN_0F90_P_0 */
9856 { VEX_W_TABLE (VEX_W_0F90_P_0_LEN_0) },
9859 /* VEX_LEN_0F90_P_2 */
9861 { VEX_W_TABLE (VEX_W_0F90_P_2_LEN_0) },
9864 /* VEX_LEN_0F91_P_0 */
9866 { VEX_W_TABLE (VEX_W_0F91_P_0_LEN_0) },
9869 /* VEX_LEN_0F91_P_2 */
9871 { VEX_W_TABLE (VEX_W_0F91_P_2_LEN_0) },
9874 /* VEX_LEN_0F92_P_0 */
9876 { VEX_W_TABLE (VEX_W_0F92_P_0_LEN_0) },
9879 /* VEX_LEN_0F92_P_2 */
9881 { VEX_W_TABLE (VEX_W_0F92_P_2_LEN_0) },
9884 /* VEX_LEN_0F92_P_3 */
9886 { VEX_W_TABLE (VEX_W_0F92_P_3_LEN_0) },
9889 /* VEX_LEN_0F93_P_0 */
9891 { VEX_W_TABLE (VEX_W_0F93_P_0_LEN_0) },
9894 /* VEX_LEN_0F93_P_2 */
9896 { VEX_W_TABLE (VEX_W_0F93_P_2_LEN_0) },
9899 /* VEX_LEN_0F93_P_3 */
9901 { VEX_W_TABLE (VEX_W_0F93_P_3_LEN_0) },
9904 /* VEX_LEN_0F98_P_0 */
9906 { VEX_W_TABLE (VEX_W_0F98_P_0_LEN_0) },
9909 /* VEX_LEN_0F98_P_2 */
9911 { VEX_W_TABLE (VEX_W_0F98_P_2_LEN_0) },
9914 /* VEX_LEN_0F99_P_0 */
9916 { VEX_W_TABLE (VEX_W_0F99_P_0_LEN_0) },
9919 /* VEX_LEN_0F99_P_2 */
9921 { VEX_W_TABLE (VEX_W_0F99_P_2_LEN_0) },
9924 /* VEX_LEN_0FAE_R_2_M_0 */
9926 { VEX_W_TABLE (VEX_W_0FAE_R_2_M_0) },
9929 /* VEX_LEN_0FAE_R_3_M_0 */
9931 { VEX_W_TABLE (VEX_W_0FAE_R_3_M_0) },
9934 /* VEX_LEN_0FC2_P_1 */
9936 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
9937 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
9940 /* VEX_LEN_0FC2_P_3 */
9942 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
9943 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
9946 /* VEX_LEN_0FC4_P_2 */
9948 { VEX_W_TABLE (VEX_W_0FC4_P_2) },
9951 /* VEX_LEN_0FC5_P_2 */
9953 { VEX_W_TABLE (VEX_W_0FC5_P_2) },
9956 /* VEX_LEN_0FD6_P_2 */
9958 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
9959 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
9962 /* VEX_LEN_0FF7_P_2 */
9964 { VEX_W_TABLE (VEX_W_0FF7_P_2) },
9967 /* VEX_LEN_0F3816_P_2 */
9970 { VEX_W_TABLE (VEX_W_0F3816_P_2) },
9973 /* VEX_LEN_0F3819_P_2 */
9976 { VEX_W_TABLE (VEX_W_0F3819_P_2) },
9979 /* VEX_LEN_0F381A_P_2_M_0 */
9982 { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0) },
9985 /* VEX_LEN_0F3836_P_2 */
9988 { VEX_W_TABLE (VEX_W_0F3836_P_2) },
9991 /* VEX_LEN_0F3841_P_2 */
9993 { VEX_W_TABLE (VEX_W_0F3841_P_2) },
9996 /* VEX_LEN_0F385A_P_2_M_0 */
9999 { VEX_W_TABLE (VEX_W_0F385A_P_2_M_0) },
10002 /* VEX_LEN_0F38DB_P_2 */
10004 { VEX_W_TABLE (VEX_W_0F38DB_P_2) },
10007 /* VEX_LEN_0F38F2_P_0 */
10009 { "andnS", { Gdq, VexGdq, Edq }, 0 },
10012 /* VEX_LEN_0F38F3_R_1_P_0 */
10014 { "blsrS", { VexGdq, Edq }, 0 },
10017 /* VEX_LEN_0F38F3_R_2_P_0 */
10019 { "blsmskS", { VexGdq, Edq }, 0 },
10022 /* VEX_LEN_0F38F3_R_3_P_0 */
10024 { "blsiS", { VexGdq, Edq }, 0 },
10027 /* VEX_LEN_0F38F5_P_0 */
10029 { "bzhiS", { Gdq, Edq, VexGdq }, 0 },
10032 /* VEX_LEN_0F38F5_P_1 */
10034 { "pextS", { Gdq, VexGdq, Edq }, 0 },
10037 /* VEX_LEN_0F38F5_P_3 */
10039 { "pdepS", { Gdq, VexGdq, Edq }, 0 },
10042 /* VEX_LEN_0F38F6_P_3 */
10044 { "mulxS", { Gdq, VexGdq, Edq }, 0 },
10047 /* VEX_LEN_0F38F7_P_0 */
10049 { "bextrS", { Gdq, Edq, VexGdq }, 0 },
10052 /* VEX_LEN_0F38F7_P_1 */
10054 { "sarxS", { Gdq, Edq, VexGdq }, 0 },
10057 /* VEX_LEN_0F38F7_P_2 */
10059 { "shlxS", { Gdq, Edq, VexGdq }, 0 },
10062 /* VEX_LEN_0F38F7_P_3 */
10064 { "shrxS", { Gdq, Edq, VexGdq }, 0 },
10067 /* VEX_LEN_0F3A00_P_2 */
10070 { VEX_W_TABLE (VEX_W_0F3A00_P_2) },
10073 /* VEX_LEN_0F3A01_P_2 */
10076 { VEX_W_TABLE (VEX_W_0F3A01_P_2) },
10079 /* VEX_LEN_0F3A06_P_2 */
10082 { VEX_W_TABLE (VEX_W_0F3A06_P_2) },
10085 /* VEX_LEN_0F3A0A_P_2 */
10087 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
10088 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
10091 /* VEX_LEN_0F3A0B_P_2 */
10093 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
10094 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
10097 /* VEX_LEN_0F3A14_P_2 */
10099 { VEX_W_TABLE (VEX_W_0F3A14_P_2) },
10102 /* VEX_LEN_0F3A15_P_2 */
10104 { VEX_W_TABLE (VEX_W_0F3A15_P_2) },
10107 /* VEX_LEN_0F3A16_P_2 */
10109 { "vpextrK", { Edq, XM, Ib }, 0 },
10112 /* VEX_LEN_0F3A17_P_2 */
10114 { "vextractps", { Edqd, XM, Ib }, 0 },
10117 /* VEX_LEN_0F3A18_P_2 */
10120 { VEX_W_TABLE (VEX_W_0F3A18_P_2) },
10123 /* VEX_LEN_0F3A19_P_2 */
10126 { VEX_W_TABLE (VEX_W_0F3A19_P_2) },
10129 /* VEX_LEN_0F3A20_P_2 */
10131 { VEX_W_TABLE (VEX_W_0F3A20_P_2) },
10134 /* VEX_LEN_0F3A21_P_2 */
10136 { VEX_W_TABLE (VEX_W_0F3A21_P_2) },
10139 /* VEX_LEN_0F3A22_P_2 */
10141 { "vpinsrK", { XM, Vex128, Edq, Ib }, 0 },
10144 /* VEX_LEN_0F3A30_P_2 */
10146 { VEX_W_TABLE (VEX_W_0F3A30_P_2_LEN_0) },
10149 /* VEX_LEN_0F3A31_P_2 */
10151 { VEX_W_TABLE (VEX_W_0F3A31_P_2_LEN_0) },
10154 /* VEX_LEN_0F3A32_P_2 */
10156 { VEX_W_TABLE (VEX_W_0F3A32_P_2_LEN_0) },
10159 /* VEX_LEN_0F3A33_P_2 */
10161 { VEX_W_TABLE (VEX_W_0F3A33_P_2_LEN_0) },
10164 /* VEX_LEN_0F3A38_P_2 */
10167 { VEX_W_TABLE (VEX_W_0F3A38_P_2) },
10170 /* VEX_LEN_0F3A39_P_2 */
10173 { VEX_W_TABLE (VEX_W_0F3A39_P_2) },
10176 /* VEX_LEN_0F3A41_P_2 */
10178 { VEX_W_TABLE (VEX_W_0F3A41_P_2) },
10181 /* VEX_LEN_0F3A46_P_2 */
10184 { VEX_W_TABLE (VEX_W_0F3A46_P_2) },
10187 /* VEX_LEN_0F3A60_P_2 */
10189 { "vpcmpestrm", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, 0 },
10192 /* VEX_LEN_0F3A61_P_2 */
10194 { "vpcmpestri", { XM, { PCMPESTR_Fixup, x_mode }, Ib }, 0 },
10197 /* VEX_LEN_0F3A62_P_2 */
10199 { VEX_W_TABLE (VEX_W_0F3A62_P_2) },
10202 /* VEX_LEN_0F3A63_P_2 */
10204 { VEX_W_TABLE (VEX_W_0F3A63_P_2) },
10207 /* VEX_LEN_0F3A6A_P_2 */
10209 { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
10212 /* VEX_LEN_0F3A6B_P_2 */
10214 { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
10217 /* VEX_LEN_0F3A6E_P_2 */
10219 { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
10222 /* VEX_LEN_0F3A6F_P_2 */
10224 { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
10227 /* VEX_LEN_0F3A7A_P_2 */
10229 { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
10232 /* VEX_LEN_0F3A7B_P_2 */
10234 { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
10237 /* VEX_LEN_0F3A7E_P_2 */
10239 { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW }, 0 },
10242 /* VEX_LEN_0F3A7F_P_2 */
10244 { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW }, 0 },
10247 /* VEX_LEN_0F3ADF_P_2 */
10249 { VEX_W_TABLE (VEX_W_0F3ADF_P_2) },
10252 /* VEX_LEN_0F3AF0_P_3 */
10254 { "rorxS", { Gdq, Edq, Ib }, 0 },
10257 /* VEX_LEN_0FXOP_08_CC */
10259 { "vpcomb", { XM, Vex128, EXx, VPCOM }, 0 },
10262 /* VEX_LEN_0FXOP_08_CD */
10264 { "vpcomw", { XM, Vex128, EXx, VPCOM }, 0 },
10267 /* VEX_LEN_0FXOP_08_CE */
10269 { "vpcomd", { XM, Vex128, EXx, VPCOM }, 0 },
10272 /* VEX_LEN_0FXOP_08_CF */
10274 { "vpcomq", { XM, Vex128, EXx, VPCOM }, 0 },
10277 /* VEX_LEN_0FXOP_08_EC */
10279 { "vpcomub", { XM, Vex128, EXx, VPCOM }, 0 },
10282 /* VEX_LEN_0FXOP_08_ED */
10284 { "vpcomuw", { XM, Vex128, EXx, VPCOM }, 0 },
10287 /* VEX_LEN_0FXOP_08_EE */
10289 { "vpcomud", { XM, Vex128, EXx, VPCOM }, 0 },
10292 /* VEX_LEN_0FXOP_08_EF */
10294 { "vpcomuq", { XM, Vex128, EXx, VPCOM }, 0 },
10297 /* VEX_LEN_0FXOP_09_80 */
10299 { "vfrczps", { XM, EXxmm }, 0 },
10300 { "vfrczps", { XM, EXymmq }, 0 },
10303 /* VEX_LEN_0FXOP_09_81 */
10305 { "vfrczpd", { XM, EXxmm }, 0 },
10306 { "vfrczpd", { XM, EXymmq }, 0 },
10310 static const struct dis386 vex_w_table[][2] = {
10312 /* VEX_W_0F10_P_0 */
10313 { "vmovups", { XM, EXx }, 0 },
10316 /* VEX_W_0F10_P_1 */
10317 { "vmovss", { XMVexScalar, VexScalar, EXdScalar }, 0 },
10320 /* VEX_W_0F10_P_2 */
10321 { "vmovupd", { XM, EXx }, 0 },
10324 /* VEX_W_0F10_P_3 */
10325 { "vmovsd", { XMVexScalar, VexScalar, EXqScalar }, 0 },
10328 /* VEX_W_0F11_P_0 */
10329 { "vmovups", { EXxS, XM }, 0 },
10332 /* VEX_W_0F11_P_1 */
10333 { "vmovss", { EXdVexScalarS, VexScalar, XMScalar }, 0 },
10336 /* VEX_W_0F11_P_2 */
10337 { "vmovupd", { EXxS, XM }, 0 },
10340 /* VEX_W_0F11_P_3 */
10341 { "vmovsd", { EXqVexScalarS, VexScalar, XMScalar }, 0 },
10344 /* VEX_W_0F12_P_0_M_0 */
10345 { "vmovlps", { XM, Vex128, EXq }, 0 },
10348 /* VEX_W_0F12_P_0_M_1 */
10349 { "vmovhlps", { XM, Vex128, EXq }, 0 },
10352 /* VEX_W_0F12_P_1 */
10353 { "vmovsldup", { XM, EXx }, 0 },
10356 /* VEX_W_0F12_P_2 */
10357 { "vmovlpd", { XM, Vex128, EXq }, 0 },
10360 /* VEX_W_0F12_P_3 */
10361 { "vmovddup", { XM, EXymmq }, 0 },
10364 /* VEX_W_0F13_M_0 */
10365 { "vmovlpX", { EXq, XM }, 0 },
10369 { "vunpcklpX", { XM, Vex, EXx }, 0 },
10373 { "vunpckhpX", { XM, Vex, EXx }, 0 },
10376 /* VEX_W_0F16_P_0_M_0 */
10377 { "vmovhps", { XM, Vex128, EXq }, 0 },
10380 /* VEX_W_0F16_P_0_M_1 */
10381 { "vmovlhps", { XM, Vex128, EXq }, 0 },
10384 /* VEX_W_0F16_P_1 */
10385 { "vmovshdup", { XM, EXx }, 0 },
10388 /* VEX_W_0F16_P_2 */
10389 { "vmovhpd", { XM, Vex128, EXq }, 0 },
10392 /* VEX_W_0F17_M_0 */
10393 { "vmovhpX", { EXq, XM }, 0 },
10397 { "vmovapX", { XM, EXx }, 0 },
10401 { "vmovapX", { EXxS, XM }, 0 },
10404 /* VEX_W_0F2B_M_0 */
10405 { "vmovntpX", { Mx, XM }, 0 },
10408 /* VEX_W_0F2E_P_0 */
10409 { "vucomiss", { XMScalar, EXdScalar }, 0 },
10412 /* VEX_W_0F2E_P_2 */
10413 { "vucomisd", { XMScalar, EXqScalar }, 0 },
10416 /* VEX_W_0F2F_P_0 */
10417 { "vcomiss", { XMScalar, EXdScalar }, 0 },
10420 /* VEX_W_0F2F_P_2 */
10421 { "vcomisd", { XMScalar, EXqScalar }, 0 },
10424 /* VEX_W_0F41_P_0_LEN_1 */
10425 { MOD_TABLE (MOD_VEX_W_0_0F41_P_0_LEN_1) },
10426 { MOD_TABLE (MOD_VEX_W_1_0F41_P_0_LEN_1) },
10429 /* VEX_W_0F41_P_2_LEN_1 */
10430 { MOD_TABLE (MOD_VEX_W_0_0F41_P_2_LEN_1) },
10431 { MOD_TABLE (MOD_VEX_W_1_0F41_P_2_LEN_1) }
10434 /* VEX_W_0F42_P_0_LEN_1 */
10435 { MOD_TABLE (MOD_VEX_W_0_0F42_P_0_LEN_1) },
10436 { MOD_TABLE (MOD_VEX_W_1_0F42_P_0_LEN_1) },
10439 /* VEX_W_0F42_P_2_LEN_1 */
10440 { MOD_TABLE (MOD_VEX_W_0_0F42_P_2_LEN_1) },
10441 { MOD_TABLE (MOD_VEX_W_1_0F42_P_2_LEN_1) },
10444 /* VEX_W_0F44_P_0_LEN_0 */
10445 { MOD_TABLE (MOD_VEX_W_0_0F44_P_0_LEN_1) },
10446 { MOD_TABLE (MOD_VEX_W_1_0F44_P_0_LEN_1) },
10449 /* VEX_W_0F44_P_2_LEN_0 */
10450 { MOD_TABLE (MOD_VEX_W_0_0F44_P_2_LEN_1) },
10451 { MOD_TABLE (MOD_VEX_W_1_0F44_P_2_LEN_1) },
10454 /* VEX_W_0F45_P_0_LEN_1 */
10455 { MOD_TABLE (MOD_VEX_W_0_0F45_P_0_LEN_1) },
10456 { MOD_TABLE (MOD_VEX_W_1_0F45_P_0_LEN_1) },
10459 /* VEX_W_0F45_P_2_LEN_1 */
10460 { MOD_TABLE (MOD_VEX_W_0_0F45_P_2_LEN_1) },
10461 { MOD_TABLE (MOD_VEX_W_1_0F45_P_2_LEN_1) },
10464 /* VEX_W_0F46_P_0_LEN_1 */
10465 { MOD_TABLE (MOD_VEX_W_0_0F46_P_0_LEN_1) },
10466 { MOD_TABLE (MOD_VEX_W_1_0F46_P_0_LEN_1) },
10469 /* VEX_W_0F46_P_2_LEN_1 */
10470 { MOD_TABLE (MOD_VEX_W_0_0F46_P_2_LEN_1) },
10471 { MOD_TABLE (MOD_VEX_W_1_0F46_P_2_LEN_1) },
10474 /* VEX_W_0F47_P_0_LEN_1 */
10475 { MOD_TABLE (MOD_VEX_W_0_0F47_P_0_LEN_1) },
10476 { MOD_TABLE (MOD_VEX_W_1_0F47_P_0_LEN_1) },
10479 /* VEX_W_0F47_P_2_LEN_1 */
10480 { MOD_TABLE (MOD_VEX_W_0_0F47_P_2_LEN_1) },
10481 { MOD_TABLE (MOD_VEX_W_1_0F47_P_2_LEN_1) },
10484 /* VEX_W_0F4A_P_0_LEN_1 */
10485 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_0_LEN_1) },
10486 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_0_LEN_1) },
10489 /* VEX_W_0F4A_P_2_LEN_1 */
10490 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_2_LEN_1) },
10491 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_2_LEN_1) },
10494 /* VEX_W_0F4B_P_0_LEN_1 */
10495 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_0_LEN_1) },
10496 { MOD_TABLE (MOD_VEX_W_1_0F4B_P_0_LEN_1) },
10499 /* VEX_W_0F4B_P_2_LEN_1 */
10500 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_2_LEN_1) },
10503 /* VEX_W_0F50_M_0 */
10504 { "vmovmskpX", { Gdq, XS }, 0 },
10507 /* VEX_W_0F51_P_0 */
10508 { "vsqrtps", { XM, EXx }, 0 },
10511 /* VEX_W_0F51_P_1 */
10512 { "vsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
10515 /* VEX_W_0F51_P_2 */
10516 { "vsqrtpd", { XM, EXx }, 0 },
10519 /* VEX_W_0F51_P_3 */
10520 { "vsqrtsd", { XMScalar, VexScalar, EXqScalar }, 0 },
10523 /* VEX_W_0F52_P_0 */
10524 { "vrsqrtps", { XM, EXx }, 0 },
10527 /* VEX_W_0F52_P_1 */
10528 { "vrsqrtss", { XMScalar, VexScalar, EXdScalar }, 0 },
10531 /* VEX_W_0F53_P_0 */
10532 { "vrcpps", { XM, EXx }, 0 },
10535 /* VEX_W_0F53_P_1 */
10536 { "vrcpss", { XMScalar, VexScalar, EXdScalar }, 0 },
10539 /* VEX_W_0F58_P_0 */
10540 { "vaddps", { XM, Vex, EXx }, 0 },
10543 /* VEX_W_0F58_P_1 */
10544 { "vaddss", { XMScalar, VexScalar, EXdScalar }, 0 },
10547 /* VEX_W_0F58_P_2 */
10548 { "vaddpd", { XM, Vex, EXx }, 0 },
10551 /* VEX_W_0F58_P_3 */
10552 { "vaddsd", { XMScalar, VexScalar, EXqScalar }, 0 },
10555 /* VEX_W_0F59_P_0 */
10556 { "vmulps", { XM, Vex, EXx }, 0 },
10559 /* VEX_W_0F59_P_1 */
10560 { "vmulss", { XMScalar, VexScalar, EXdScalar }, 0 },
10563 /* VEX_W_0F59_P_2 */
10564 { "vmulpd", { XM, Vex, EXx }, 0 },
10567 /* VEX_W_0F59_P_3 */
10568 { "vmulsd", { XMScalar, VexScalar, EXqScalar }, 0 },
10571 /* VEX_W_0F5A_P_0 */
10572 { "vcvtps2pd", { XM, EXxmmq }, 0 },
10575 /* VEX_W_0F5A_P_1 */
10576 { "vcvtss2sd", { XMScalar, VexScalar, EXdScalar }, 0 },
10579 /* VEX_W_0F5A_P_3 */
10580 { "vcvtsd2ss", { XMScalar, VexScalar, EXqScalar }, 0 },
10583 /* VEX_W_0F5B_P_0 */
10584 { "vcvtdq2ps", { XM, EXx }, 0 },
10587 /* VEX_W_0F5B_P_1 */
10588 { "vcvttps2dq", { XM, EXx }, 0 },
10591 /* VEX_W_0F5B_P_2 */
10592 { "vcvtps2dq", { XM, EXx }, 0 },
10595 /* VEX_W_0F5C_P_0 */
10596 { "vsubps", { XM, Vex, EXx }, 0 },
10599 /* VEX_W_0F5C_P_1 */
10600 { "vsubss", { XMScalar, VexScalar, EXdScalar }, 0 },
10603 /* VEX_W_0F5C_P_2 */
10604 { "vsubpd", { XM, Vex, EXx }, 0 },
10607 /* VEX_W_0F5C_P_3 */
10608 { "vsubsd", { XMScalar, VexScalar, EXqScalar }, 0 },
10611 /* VEX_W_0F5D_P_0 */
10612 { "vminps", { XM, Vex, EXx }, 0 },
10615 /* VEX_W_0F5D_P_1 */
10616 { "vminss", { XMScalar, VexScalar, EXdScalar }, 0 },
10619 /* VEX_W_0F5D_P_2 */
10620 { "vminpd", { XM, Vex, EXx }, 0 },
10623 /* VEX_W_0F5D_P_3 */
10624 { "vminsd", { XMScalar, VexScalar, EXqScalar }, 0 },
10627 /* VEX_W_0F5E_P_0 */
10628 { "vdivps", { XM, Vex, EXx }, 0 },
10631 /* VEX_W_0F5E_P_1 */
10632 { "vdivss", { XMScalar, VexScalar, EXdScalar }, 0 },
10635 /* VEX_W_0F5E_P_2 */
10636 { "vdivpd", { XM, Vex, EXx }, 0 },
10639 /* VEX_W_0F5E_P_3 */
10640 { "vdivsd", { XMScalar, VexScalar, EXqScalar }, 0 },
10643 /* VEX_W_0F5F_P_0 */
10644 { "vmaxps", { XM, Vex, EXx }, 0 },
10647 /* VEX_W_0F5F_P_1 */
10648 { "vmaxss", { XMScalar, VexScalar, EXdScalar }, 0 },
10651 /* VEX_W_0F5F_P_2 */
10652 { "vmaxpd", { XM, Vex, EXx }, 0 },
10655 /* VEX_W_0F5F_P_3 */
10656 { "vmaxsd", { XMScalar, VexScalar, EXqScalar }, 0 },
10659 /* VEX_W_0F60_P_2 */
10660 { "vpunpcklbw", { XM, Vex, EXx }, 0 },
10663 /* VEX_W_0F61_P_2 */
10664 { "vpunpcklwd", { XM, Vex, EXx }, 0 },
10667 /* VEX_W_0F62_P_2 */
10668 { "vpunpckldq", { XM, Vex, EXx }, 0 },
10671 /* VEX_W_0F63_P_2 */
10672 { "vpacksswb", { XM, Vex, EXx }, 0 },
10675 /* VEX_W_0F64_P_2 */
10676 { "vpcmpgtb", { XM, Vex, EXx }, 0 },
10679 /* VEX_W_0F65_P_2 */
10680 { "vpcmpgtw", { XM, Vex, EXx }, 0 },
10683 /* VEX_W_0F66_P_2 */
10684 { "vpcmpgtd", { XM, Vex, EXx }, 0 },
10687 /* VEX_W_0F67_P_2 */
10688 { "vpackuswb", { XM, Vex, EXx }, 0 },
10691 /* VEX_W_0F68_P_2 */
10692 { "vpunpckhbw", { XM, Vex, EXx }, 0 },
10695 /* VEX_W_0F69_P_2 */
10696 { "vpunpckhwd", { XM, Vex, EXx }, 0 },
10699 /* VEX_W_0F6A_P_2 */
10700 { "vpunpckhdq", { XM, Vex, EXx }, 0 },
10703 /* VEX_W_0F6B_P_2 */
10704 { "vpackssdw", { XM, Vex, EXx }, 0 },
10707 /* VEX_W_0F6C_P_2 */
10708 { "vpunpcklqdq", { XM, Vex, EXx }, 0 },
10711 /* VEX_W_0F6D_P_2 */
10712 { "vpunpckhqdq", { XM, Vex, EXx }, 0 },
10715 /* VEX_W_0F6F_P_1 */
10716 { "vmovdqu", { XM, EXx }, 0 },
10719 /* VEX_W_0F6F_P_2 */
10720 { "vmovdqa", { XM, EXx }, 0 },
10723 /* VEX_W_0F70_P_1 */
10724 { "vpshufhw", { XM, EXx, Ib }, 0 },
10727 /* VEX_W_0F70_P_2 */
10728 { "vpshufd", { XM, EXx, Ib }, 0 },
10731 /* VEX_W_0F70_P_3 */
10732 { "vpshuflw", { XM, EXx, Ib }, 0 },
10735 /* VEX_W_0F71_R_2_P_2 */
10736 { "vpsrlw", { Vex, XS, Ib }, 0 },
10739 /* VEX_W_0F71_R_4_P_2 */
10740 { "vpsraw", { Vex, XS, Ib }, 0 },
10743 /* VEX_W_0F71_R_6_P_2 */
10744 { "vpsllw", { Vex, XS, Ib }, 0 },
10747 /* VEX_W_0F72_R_2_P_2 */
10748 { "vpsrld", { Vex, XS, Ib }, 0 },
10751 /* VEX_W_0F72_R_4_P_2 */
10752 { "vpsrad", { Vex, XS, Ib }, 0 },
10755 /* VEX_W_0F72_R_6_P_2 */
10756 { "vpslld", { Vex, XS, Ib }, 0 },
10759 /* VEX_W_0F73_R_2_P_2 */
10760 { "vpsrlq", { Vex, XS, Ib }, 0 },
10763 /* VEX_W_0F73_R_3_P_2 */
10764 { "vpsrldq", { Vex, XS, Ib }, 0 },
10767 /* VEX_W_0F73_R_6_P_2 */
10768 { "vpsllq", { Vex, XS, Ib }, 0 },
10771 /* VEX_W_0F73_R_7_P_2 */
10772 { "vpslldq", { Vex, XS, Ib }, 0 },
10775 /* VEX_W_0F74_P_2 */
10776 { "vpcmpeqb", { XM, Vex, EXx }, 0 },
10779 /* VEX_W_0F75_P_2 */
10780 { "vpcmpeqw", { XM, Vex, EXx }, 0 },
10783 /* VEX_W_0F76_P_2 */
10784 { "vpcmpeqd", { XM, Vex, EXx }, 0 },
10787 /* VEX_W_0F77_P_0 */
10788 { "", { VZERO }, 0 },
10791 /* VEX_W_0F7C_P_2 */
10792 { "vhaddpd", { XM, Vex, EXx }, 0 },
10795 /* VEX_W_0F7C_P_3 */
10796 { "vhaddps", { XM, Vex, EXx }, 0 },
10799 /* VEX_W_0F7D_P_2 */
10800 { "vhsubpd", { XM, Vex, EXx }, 0 },
10803 /* VEX_W_0F7D_P_3 */
10804 { "vhsubps", { XM, Vex, EXx }, 0 },
10807 /* VEX_W_0F7E_P_1 */
10808 { "vmovq", { XMScalar, EXqScalar }, 0 },
10811 /* VEX_W_0F7F_P_1 */
10812 { "vmovdqu", { EXxS, XM }, 0 },
10815 /* VEX_W_0F7F_P_2 */
10816 { "vmovdqa", { EXxS, XM }, 0 },
10819 /* VEX_W_0F90_P_0_LEN_0 */
10820 { "kmovw", { MaskG, MaskE }, 0 },
10821 { "kmovq", { MaskG, MaskE }, 0 },
10824 /* VEX_W_0F90_P_2_LEN_0 */
10825 { "kmovb", { MaskG, MaskBDE }, 0 },
10826 { "kmovd", { MaskG, MaskBDE }, 0 },
10829 /* VEX_W_0F91_P_0_LEN_0 */
10830 { MOD_TABLE (MOD_VEX_W_0_0F91_P_0_LEN_0) },
10831 { MOD_TABLE (MOD_VEX_W_1_0F91_P_0_LEN_0) },
10834 /* VEX_W_0F91_P_2_LEN_0 */
10835 { MOD_TABLE (MOD_VEX_W_0_0F91_P_2_LEN_0) },
10836 { MOD_TABLE (MOD_VEX_W_1_0F91_P_2_LEN_0) },
10839 /* VEX_W_0F92_P_0_LEN_0 */
10840 { MOD_TABLE (MOD_VEX_W_0_0F92_P_0_LEN_0) },
10843 /* VEX_W_0F92_P_2_LEN_0 */
10844 { MOD_TABLE (MOD_VEX_W_0_0F92_P_2_LEN_0) },
10847 /* VEX_W_0F92_P_3_LEN_0 */
10848 { MOD_TABLE (MOD_VEX_W_0_0F92_P_3_LEN_0) },
10849 { MOD_TABLE (MOD_VEX_W_1_0F92_P_3_LEN_0) },
10852 /* VEX_W_0F93_P_0_LEN_0 */
10853 { MOD_TABLE (MOD_VEX_W_0_0F93_P_0_LEN_0) },
10856 /* VEX_W_0F93_P_2_LEN_0 */
10857 { MOD_TABLE (MOD_VEX_W_0_0F93_P_2_LEN_0) },
10860 /* VEX_W_0F93_P_3_LEN_0 */
10861 { MOD_TABLE (MOD_VEX_W_0_0F93_P_3_LEN_0) },
10862 { MOD_TABLE (MOD_VEX_W_1_0F93_P_3_LEN_0) },
10865 /* VEX_W_0F98_P_0_LEN_0 */
10866 { MOD_TABLE (MOD_VEX_W_0_0F98_P_0_LEN_0) },
10867 { MOD_TABLE (MOD_VEX_W_1_0F98_P_0_LEN_0) },
10870 /* VEX_W_0F98_P_2_LEN_0 */
10871 { MOD_TABLE (MOD_VEX_W_0_0F98_P_2_LEN_0) },
10872 { MOD_TABLE (MOD_VEX_W_1_0F98_P_2_LEN_0) },
10875 /* VEX_W_0F99_P_0_LEN_0 */
10876 { MOD_TABLE (MOD_VEX_W_0_0F99_P_0_LEN_0) },
10877 { MOD_TABLE (MOD_VEX_W_1_0F99_P_0_LEN_0) },
10880 /* VEX_W_0F99_P_2_LEN_0 */
10881 { MOD_TABLE (MOD_VEX_W_0_0F99_P_2_LEN_0) },
10882 { MOD_TABLE (MOD_VEX_W_1_0F99_P_2_LEN_0) },
10885 /* VEX_W_0FAE_R_2_M_0 */
10886 { "vldmxcsr", { Md }, 0 },
10889 /* VEX_W_0FAE_R_3_M_0 */
10890 { "vstmxcsr", { Md }, 0 },
10893 /* VEX_W_0FC2_P_0 */
10894 { "vcmpps", { XM, Vex, EXx, VCMP }, 0 },
10897 /* VEX_W_0FC2_P_1 */
10898 { "vcmpss", { XMScalar, VexScalar, EXdScalar, VCMP }, 0 },
10901 /* VEX_W_0FC2_P_2 */
10902 { "vcmppd", { XM, Vex, EXx, VCMP }, 0 },
10905 /* VEX_W_0FC2_P_3 */
10906 { "vcmpsd", { XMScalar, VexScalar, EXqScalar, VCMP }, 0 },
10909 /* VEX_W_0FC4_P_2 */
10910 { "vpinsrw", { XM, Vex128, Edqw, Ib }, 0 },
10913 /* VEX_W_0FC5_P_2 */
10914 { "vpextrw", { Gdq, XS, Ib }, 0 },
10917 /* VEX_W_0FD0_P_2 */
10918 { "vaddsubpd", { XM, Vex, EXx }, 0 },
10921 /* VEX_W_0FD0_P_3 */
10922 { "vaddsubps", { XM, Vex, EXx }, 0 },
10925 /* VEX_W_0FD1_P_2 */
10926 { "vpsrlw", { XM, Vex, EXxmm }, 0 },
10929 /* VEX_W_0FD2_P_2 */
10930 { "vpsrld", { XM, Vex, EXxmm }, 0 },
10933 /* VEX_W_0FD3_P_2 */
10934 { "vpsrlq", { XM, Vex, EXxmm }, 0 },
10937 /* VEX_W_0FD4_P_2 */
10938 { "vpaddq", { XM, Vex, EXx }, 0 },
10941 /* VEX_W_0FD5_P_2 */
10942 { "vpmullw", { XM, Vex, EXx }, 0 },
10945 /* VEX_W_0FD6_P_2 */
10946 { "vmovq", { EXqScalarS, XMScalar }, 0 },
10949 /* VEX_W_0FD7_P_2_M_1 */
10950 { "vpmovmskb", { Gdq, XS }, 0 },
10953 /* VEX_W_0FD8_P_2 */
10954 { "vpsubusb", { XM, Vex, EXx }, 0 },
10957 /* VEX_W_0FD9_P_2 */
10958 { "vpsubusw", { XM, Vex, EXx }, 0 },
10961 /* VEX_W_0FDA_P_2 */
10962 { "vpminub", { XM, Vex, EXx }, 0 },
10965 /* VEX_W_0FDB_P_2 */
10966 { "vpand", { XM, Vex, EXx }, 0 },
10969 /* VEX_W_0FDC_P_2 */
10970 { "vpaddusb", { XM, Vex, EXx }, 0 },
10973 /* VEX_W_0FDD_P_2 */
10974 { "vpaddusw", { XM, Vex, EXx }, 0 },
10977 /* VEX_W_0FDE_P_2 */
10978 { "vpmaxub", { XM, Vex, EXx }, 0 },
10981 /* VEX_W_0FDF_P_2 */
10982 { "vpandn", { XM, Vex, EXx }, 0 },
10985 /* VEX_W_0FE0_P_2 */
10986 { "vpavgb", { XM, Vex, EXx }, 0 },
10989 /* VEX_W_0FE1_P_2 */
10990 { "vpsraw", { XM, Vex, EXxmm }, 0 },
10993 /* VEX_W_0FE2_P_2 */
10994 { "vpsrad", { XM, Vex, EXxmm }, 0 },
10997 /* VEX_W_0FE3_P_2 */
10998 { "vpavgw", { XM, Vex, EXx }, 0 },
11001 /* VEX_W_0FE4_P_2 */
11002 { "vpmulhuw", { XM, Vex, EXx }, 0 },
11005 /* VEX_W_0FE5_P_2 */
11006 { "vpmulhw", { XM, Vex, EXx }, 0 },
11009 /* VEX_W_0FE6_P_1 */
11010 { "vcvtdq2pd", { XM, EXxmmq }, 0 },
11013 /* VEX_W_0FE6_P_2 */
11014 { "vcvttpd2dq%XY", { XMM, EXx }, 0 },
11017 /* VEX_W_0FE6_P_3 */
11018 { "vcvtpd2dq%XY", { XMM, EXx }, 0 },
11021 /* VEX_W_0FE7_P_2_M_0 */
11022 { "vmovntdq", { Mx, XM }, 0 },
11025 /* VEX_W_0FE8_P_2 */
11026 { "vpsubsb", { XM, Vex, EXx }, 0 },
11029 /* VEX_W_0FE9_P_2 */
11030 { "vpsubsw", { XM, Vex, EXx }, 0 },
11033 /* VEX_W_0FEA_P_2 */
11034 { "vpminsw", { XM, Vex, EXx }, 0 },
11037 /* VEX_W_0FEB_P_2 */
11038 { "vpor", { XM, Vex, EXx }, 0 },
11041 /* VEX_W_0FEC_P_2 */
11042 { "vpaddsb", { XM, Vex, EXx }, 0 },
11045 /* VEX_W_0FED_P_2 */
11046 { "vpaddsw", { XM, Vex, EXx }, 0 },
11049 /* VEX_W_0FEE_P_2 */
11050 { "vpmaxsw", { XM, Vex, EXx }, 0 },
11053 /* VEX_W_0FEF_P_2 */
11054 { "vpxor", { XM, Vex, EXx }, 0 },
11057 /* VEX_W_0FF0_P_3_M_0 */
11058 { "vlddqu", { XM, M }, 0 },
11061 /* VEX_W_0FF1_P_2 */
11062 { "vpsllw", { XM, Vex, EXxmm }, 0 },
11065 /* VEX_W_0FF2_P_2 */
11066 { "vpslld", { XM, Vex, EXxmm }, 0 },
11069 /* VEX_W_0FF3_P_2 */
11070 { "vpsllq", { XM, Vex, EXxmm }, 0 },
11073 /* VEX_W_0FF4_P_2 */
11074 { "vpmuludq", { XM, Vex, EXx }, 0 },
11077 /* VEX_W_0FF5_P_2 */
11078 { "vpmaddwd", { XM, Vex, EXx }, 0 },
11081 /* VEX_W_0FF6_P_2 */
11082 { "vpsadbw", { XM, Vex, EXx }, 0 },
11085 /* VEX_W_0FF7_P_2 */
11086 { "vmaskmovdqu", { XM, XS }, 0 },
11089 /* VEX_W_0FF8_P_2 */
11090 { "vpsubb", { XM, Vex, EXx }, 0 },
11093 /* VEX_W_0FF9_P_2 */
11094 { "vpsubw", { XM, Vex, EXx }, 0 },
11097 /* VEX_W_0FFA_P_2 */
11098 { "vpsubd", { XM, Vex, EXx }, 0 },
11101 /* VEX_W_0FFB_P_2 */
11102 { "vpsubq", { XM, Vex, EXx }, 0 },
11105 /* VEX_W_0FFC_P_2 */
11106 { "vpaddb", { XM, Vex, EXx }, 0 },
11109 /* VEX_W_0FFD_P_2 */
11110 { "vpaddw", { XM, Vex, EXx }, 0 },
11113 /* VEX_W_0FFE_P_2 */
11114 { "vpaddd", { XM, Vex, EXx }, 0 },
11117 /* VEX_W_0F3800_P_2 */
11118 { "vpshufb", { XM, Vex, EXx }, 0 },
11121 /* VEX_W_0F3801_P_2 */
11122 { "vphaddw", { XM, Vex, EXx }, 0 },
11125 /* VEX_W_0F3802_P_2 */
11126 { "vphaddd", { XM, Vex, EXx }, 0 },
11129 /* VEX_W_0F3803_P_2 */
11130 { "vphaddsw", { XM, Vex, EXx }, 0 },
11133 /* VEX_W_0F3804_P_2 */
11134 { "vpmaddubsw", { XM, Vex, EXx }, 0 },
11137 /* VEX_W_0F3805_P_2 */
11138 { "vphsubw", { XM, Vex, EXx }, 0 },
11141 /* VEX_W_0F3806_P_2 */
11142 { "vphsubd", { XM, Vex, EXx }, 0 },
11145 /* VEX_W_0F3807_P_2 */
11146 { "vphsubsw", { XM, Vex, EXx }, 0 },
11149 /* VEX_W_0F3808_P_2 */
11150 { "vpsignb", { XM, Vex, EXx }, 0 },
11153 /* VEX_W_0F3809_P_2 */
11154 { "vpsignw", { XM, Vex, EXx }, 0 },
11157 /* VEX_W_0F380A_P_2 */
11158 { "vpsignd", { XM, Vex, EXx }, 0 },
11161 /* VEX_W_0F380B_P_2 */
11162 { "vpmulhrsw", { XM, Vex, EXx }, 0 },
11165 /* VEX_W_0F380C_P_2 */
11166 { "vpermilps", { XM, Vex, EXx }, 0 },
11169 /* VEX_W_0F380D_P_2 */
11170 { "vpermilpd", { XM, Vex, EXx }, 0 },
11173 /* VEX_W_0F380E_P_2 */
11174 { "vtestps", { XM, EXx }, 0 },
11177 /* VEX_W_0F380F_P_2 */
11178 { "vtestpd", { XM, EXx }, 0 },
11181 /* VEX_W_0F3816_P_2 */
11182 { "vpermps", { XM, Vex, EXx }, 0 },
11185 /* VEX_W_0F3817_P_2 */
11186 { "vptest", { XM, EXx }, 0 },
11189 /* VEX_W_0F3818_P_2 */
11190 { "vbroadcastss", { XM, EXxmm_md }, 0 },
11193 /* VEX_W_0F3819_P_2 */
11194 { "vbroadcastsd", { XM, EXxmm_mq }, 0 },
11197 /* VEX_W_0F381A_P_2_M_0 */
11198 { "vbroadcastf128", { XM, Mxmm }, 0 },
11201 /* VEX_W_0F381C_P_2 */
11202 { "vpabsb", { XM, EXx }, 0 },
11205 /* VEX_W_0F381D_P_2 */
11206 { "vpabsw", { XM, EXx }, 0 },
11209 /* VEX_W_0F381E_P_2 */
11210 { "vpabsd", { XM, EXx }, 0 },
11213 /* VEX_W_0F3820_P_2 */
11214 { "vpmovsxbw", { XM, EXxmmq }, 0 },
11217 /* VEX_W_0F3821_P_2 */
11218 { "vpmovsxbd", { XM, EXxmmqd }, 0 },
11221 /* VEX_W_0F3822_P_2 */
11222 { "vpmovsxbq", { XM, EXxmmdw }, 0 },
11225 /* VEX_W_0F3823_P_2 */
11226 { "vpmovsxwd", { XM, EXxmmq }, 0 },
11229 /* VEX_W_0F3824_P_2 */
11230 { "vpmovsxwq", { XM, EXxmmqd }, 0 },
11233 /* VEX_W_0F3825_P_2 */
11234 { "vpmovsxdq", { XM, EXxmmq }, 0 },
11237 /* VEX_W_0F3828_P_2 */
11238 { "vpmuldq", { XM, Vex, EXx }, 0 },
11241 /* VEX_W_0F3829_P_2 */
11242 { "vpcmpeqq", { XM, Vex, EXx }, 0 },
11245 /* VEX_W_0F382A_P_2_M_0 */
11246 { "vmovntdqa", { XM, Mx }, 0 },
11249 /* VEX_W_0F382B_P_2 */
11250 { "vpackusdw", { XM, Vex, EXx }, 0 },
11253 /* VEX_W_0F382C_P_2_M_0 */
11254 { "vmaskmovps", { XM, Vex, Mx }, 0 },
11257 /* VEX_W_0F382D_P_2_M_0 */
11258 { "vmaskmovpd", { XM, Vex, Mx }, 0 },
11261 /* VEX_W_0F382E_P_2_M_0 */
11262 { "vmaskmovps", { Mx, Vex, XM }, 0 },
11265 /* VEX_W_0F382F_P_2_M_0 */
11266 { "vmaskmovpd", { Mx, Vex, XM }, 0 },
11269 /* VEX_W_0F3830_P_2 */
11270 { "vpmovzxbw", { XM, EXxmmq }, 0 },
11273 /* VEX_W_0F3831_P_2 */
11274 { "vpmovzxbd", { XM, EXxmmqd }, 0 },
11277 /* VEX_W_0F3832_P_2 */
11278 { "vpmovzxbq", { XM, EXxmmdw }, 0 },
11281 /* VEX_W_0F3833_P_2 */
11282 { "vpmovzxwd", { XM, EXxmmq }, 0 },
11285 /* VEX_W_0F3834_P_2 */
11286 { "vpmovzxwq", { XM, EXxmmqd }, 0 },
11289 /* VEX_W_0F3835_P_2 */
11290 { "vpmovzxdq", { XM, EXxmmq }, 0 },
11293 /* VEX_W_0F3836_P_2 */
11294 { "vpermd", { XM, Vex, EXx }, 0 },
11297 /* VEX_W_0F3837_P_2 */
11298 { "vpcmpgtq", { XM, Vex, EXx }, 0 },
11301 /* VEX_W_0F3838_P_2 */
11302 { "vpminsb", { XM, Vex, EXx }, 0 },
11305 /* VEX_W_0F3839_P_2 */
11306 { "vpminsd", { XM, Vex, EXx }, 0 },
11309 /* VEX_W_0F383A_P_2 */
11310 { "vpminuw", { XM, Vex, EXx }, 0 },
11313 /* VEX_W_0F383B_P_2 */
11314 { "vpminud", { XM, Vex, EXx }, 0 },
11317 /* VEX_W_0F383C_P_2 */
11318 { "vpmaxsb", { XM, Vex, EXx }, 0 },
11321 /* VEX_W_0F383D_P_2 */
11322 { "vpmaxsd", { XM, Vex, EXx }, 0 },
11325 /* VEX_W_0F383E_P_2 */
11326 { "vpmaxuw", { XM, Vex, EXx }, 0 },
11329 /* VEX_W_0F383F_P_2 */
11330 { "vpmaxud", { XM, Vex, EXx }, 0 },
11333 /* VEX_W_0F3840_P_2 */
11334 { "vpmulld", { XM, Vex, EXx }, 0 },
11337 /* VEX_W_0F3841_P_2 */
11338 { "vphminposuw", { XM, EXx }, 0 },
11341 /* VEX_W_0F3846_P_2 */
11342 { "vpsravd", { XM, Vex, EXx }, 0 },
11345 /* VEX_W_0F3858_P_2 */
11346 { "vpbroadcastd", { XM, EXxmm_md }, 0 },
11349 /* VEX_W_0F3859_P_2 */
11350 { "vpbroadcastq", { XM, EXxmm_mq }, 0 },
11353 /* VEX_W_0F385A_P_2_M_0 */
11354 { "vbroadcasti128", { XM, Mxmm }, 0 },
11357 /* VEX_W_0F3878_P_2 */
11358 { "vpbroadcastb", { XM, EXxmm_mb }, 0 },
11361 /* VEX_W_0F3879_P_2 */
11362 { "vpbroadcastw", { XM, EXxmm_mw }, 0 },
11365 /* VEX_W_0F38CF_P_2 */
11366 { "vgf2p8mulb", { XM, Vex, EXx }, 0 },
11369 /* VEX_W_0F38DB_P_2 */
11370 { "vaesimc", { XM, EXx }, 0 },
11373 /* VEX_W_0F3A00_P_2 */
11375 { "vpermq", { XM, EXx, Ib }, 0 },
11378 /* VEX_W_0F3A01_P_2 */
11380 { "vpermpd", { XM, EXx, Ib }, 0 },
11383 /* VEX_W_0F3A02_P_2 */
11384 { "vpblendd", { XM, Vex, EXx, Ib }, 0 },
11387 /* VEX_W_0F3A04_P_2 */
11388 { "vpermilps", { XM, EXx, Ib }, 0 },
11391 /* VEX_W_0F3A05_P_2 */
11392 { "vpermilpd", { XM, EXx, Ib }, 0 },
11395 /* VEX_W_0F3A06_P_2 */
11396 { "vperm2f128", { XM, Vex256, EXx, Ib }, 0 },
11399 /* VEX_W_0F3A08_P_2 */
11400 { "vroundps", { XM, EXx, Ib }, 0 },
11403 /* VEX_W_0F3A09_P_2 */
11404 { "vroundpd", { XM, EXx, Ib }, 0 },
11407 /* VEX_W_0F3A0A_P_2 */
11408 { "vroundss", { XMScalar, VexScalar, EXdScalar, Ib }, 0 },
11411 /* VEX_W_0F3A0B_P_2 */
11412 { "vroundsd", { XMScalar, VexScalar, EXqScalar, Ib }, 0 },
11415 /* VEX_W_0F3A0C_P_2 */
11416 { "vblendps", { XM, Vex, EXx, Ib }, 0 },
11419 /* VEX_W_0F3A0D_P_2 */
11420 { "vblendpd", { XM, Vex, EXx, Ib }, 0 },
11423 /* VEX_W_0F3A0E_P_2 */
11424 { "vpblendw", { XM, Vex, EXx, Ib }, 0 },
11427 /* VEX_W_0F3A0F_P_2 */
11428 { "vpalignr", { XM, Vex, EXx, Ib }, 0 },
11431 /* VEX_W_0F3A14_P_2 */
11432 { "vpextrb", { Edqb, XM, Ib }, 0 },
11435 /* VEX_W_0F3A15_P_2 */
11436 { "vpextrw", { Edqw, XM, Ib }, 0 },
11439 /* VEX_W_0F3A18_P_2 */
11440 { "vinsertf128", { XM, Vex256, EXxmm, Ib }, 0 },
11443 /* VEX_W_0F3A19_P_2 */
11444 { "vextractf128", { EXxmm, XM, Ib }, 0 },
11447 /* VEX_W_0F3A20_P_2 */
11448 { "vpinsrb", { XM, Vex128, Edqb, Ib }, 0 },
11451 /* VEX_W_0F3A21_P_2 */
11452 { "vinsertps", { XM, Vex128, EXd, Ib }, 0 },
11455 /* VEX_W_0F3A30_P_2_LEN_0 */
11456 { MOD_TABLE (MOD_VEX_W_0_0F3A30_P_2_LEN_0) },
11457 { MOD_TABLE (MOD_VEX_W_1_0F3A30_P_2_LEN_0) },
11460 /* VEX_W_0F3A31_P_2_LEN_0 */
11461 { MOD_TABLE (MOD_VEX_W_0_0F3A31_P_2_LEN_0) },
11462 { MOD_TABLE (MOD_VEX_W_1_0F3A31_P_2_LEN_0) },
11465 /* VEX_W_0F3A32_P_2_LEN_0 */
11466 { MOD_TABLE (MOD_VEX_W_0_0F3A32_P_2_LEN_0) },
11467 { MOD_TABLE (MOD_VEX_W_1_0F3A32_P_2_LEN_0) },
11470 /* VEX_W_0F3A33_P_2_LEN_0 */
11471 { MOD_TABLE (MOD_VEX_W_0_0F3A33_P_2_LEN_0) },
11472 { MOD_TABLE (MOD_VEX_W_1_0F3A33_P_2_LEN_0) },
11475 /* VEX_W_0F3A38_P_2 */
11476 { "vinserti128", { XM, Vex256, EXxmm, Ib }, 0 },
11479 /* VEX_W_0F3A39_P_2 */
11480 { "vextracti128", { EXxmm, XM, Ib }, 0 },
11483 /* VEX_W_0F3A40_P_2 */
11484 { "vdpps", { XM, Vex, EXx, Ib }, 0 },
11487 /* VEX_W_0F3A41_P_2 */
11488 { "vdppd", { XM, Vex128, EXx, Ib }, 0 },
11491 /* VEX_W_0F3A42_P_2 */
11492 { "vmpsadbw", { XM, Vex, EXx, Ib }, 0 },
11495 /* VEX_W_0F3A46_P_2 */
11496 { "vperm2i128", { XM, Vex256, EXx, Ib }, 0 },
11499 /* VEX_W_0F3A48_P_2 */
11500 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
11501 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
11504 /* VEX_W_0F3A49_P_2 */
11505 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
11506 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW }, 0 },
11509 /* VEX_W_0F3A4A_P_2 */
11510 { "vblendvps", { XM, Vex, EXx, XMVexI4 }, 0 },
11513 /* VEX_W_0F3A4B_P_2 */
11514 { "vblendvpd", { XM, Vex, EXx, XMVexI4 }, 0 },
11517 /* VEX_W_0F3A4C_P_2 */
11518 { "vpblendvb", { XM, Vex, EXx, XMVexI4 }, 0 },
11521 /* VEX_W_0F3A62_P_2 */
11522 { "vpcmpistrm", { XM, EXx, Ib }, 0 },
11525 /* VEX_W_0F3A63_P_2 */
11526 { "vpcmpistri", { XM, EXx, Ib }, 0 },
11529 /* VEX_W_0F3ACE_P_2 */
11531 { "vgf2p8affineqb", { XM, Vex, EXx, Ib }, 0 },
11534 /* VEX_W_0F3ACF_P_2 */
11536 { "vgf2p8affineinvqb", { XM, Vex, EXx, Ib }, 0 },
11539 /* VEX_W_0F3ADF_P_2 */
11540 { "vaeskeygenassist", { XM, EXx, Ib }, 0 },
11542 #define NEED_VEX_W_TABLE
11543 #include "i386-dis-evex.h"
11544 #undef NEED_VEX_W_TABLE
11547 static const struct dis386 mod_table[][2] = {
11550 { "leaS", { Gv, M }, 0 },
11555 { RM_TABLE (RM_C6_REG_7) },
11560 { RM_TABLE (RM_C7_REG_7) },
11564 { "Jcall^", { indirEp }, 0 },
11568 { "Jjmp^", { indirEp }, 0 },
11571 /* MOD_0F01_REG_0 */
11572 { X86_64_TABLE (X86_64_0F01_REG_0) },
11573 { RM_TABLE (RM_0F01_REG_0) },
11576 /* MOD_0F01_REG_1 */
11577 { X86_64_TABLE (X86_64_0F01_REG_1) },
11578 { RM_TABLE (RM_0F01_REG_1) },
11581 /* MOD_0F01_REG_2 */
11582 { X86_64_TABLE (X86_64_0F01_REG_2) },
11583 { RM_TABLE (RM_0F01_REG_2) },
11586 /* MOD_0F01_REG_3 */
11587 { X86_64_TABLE (X86_64_0F01_REG_3) },
11588 { RM_TABLE (RM_0F01_REG_3) },
11591 /* MOD_0F01_REG_5 */
11592 { PREFIX_TABLE (PREFIX_MOD_0_0F01_REG_5) },
11593 { RM_TABLE (RM_0F01_REG_5) },
11596 /* MOD_0F01_REG_7 */
11597 { "invlpg", { Mb }, 0 },
11598 { RM_TABLE (RM_0F01_REG_7) },
11601 /* MOD_0F12_PREFIX_0 */
11602 { "movlps", { XM, EXq }, PREFIX_OPCODE },
11603 { "movhlps", { XM, EXq }, PREFIX_OPCODE },
11607 { "movlpX", { EXq, XM }, PREFIX_OPCODE },
11610 /* MOD_0F16_PREFIX_0 */
11611 { "movhps", { XM, EXq }, 0 },
11612 { "movlhps", { XM, EXq }, 0 },
11616 { "movhpX", { EXq, XM }, PREFIX_OPCODE },
11619 /* MOD_0F18_REG_0 */
11620 { "prefetchnta", { Mb }, 0 },
11623 /* MOD_0F18_REG_1 */
11624 { "prefetcht0", { Mb }, 0 },
11627 /* MOD_0F18_REG_2 */
11628 { "prefetcht1", { Mb }, 0 },
11631 /* MOD_0F18_REG_3 */
11632 { "prefetcht2", { Mb }, 0 },
11635 /* MOD_0F18_REG_4 */
11636 { "nop/reserved", { Mb }, 0 },
11639 /* MOD_0F18_REG_5 */
11640 { "nop/reserved", { Mb }, 0 },
11643 /* MOD_0F18_REG_6 */
11644 { "nop/reserved", { Mb }, 0 },
11647 /* MOD_0F18_REG_7 */
11648 { "nop/reserved", { Mb }, 0 },
11651 /* MOD_0F1A_PREFIX_0 */
11652 { "bndldx", { Gbnd, Mv_bnd }, 0 },
11653 { "nopQ", { Ev }, 0 },
11656 /* MOD_0F1B_PREFIX_0 */
11657 { "bndstx", { Mv_bnd, Gbnd }, 0 },
11658 { "nopQ", { Ev }, 0 },
11661 /* MOD_0F1B_PREFIX_1 */
11662 { "bndmk", { Gbnd, Mv_bnd }, 0 },
11663 { "nopQ", { Ev }, 0 },
11666 /* MOD_0F1C_PREFIX_0 */
11667 { REG_TABLE (REG_0F1C_MOD_0) },
11668 { "nopQ", { Ev }, 0 },
11671 /* MOD_0F1E_PREFIX_1 */
11672 { "nopQ", { Ev }, 0 },
11673 { REG_TABLE (REG_0F1E_MOD_3) },
11678 { "movL", { Rd, Td }, 0 },
11683 { "movL", { Td, Rd }, 0 },
11686 /* MOD_0F2B_PREFIX_0 */
11687 {"movntps", { Mx, XM }, PREFIX_OPCODE },
11690 /* MOD_0F2B_PREFIX_1 */
11691 {"movntss", { Md, XM }, PREFIX_OPCODE },
11694 /* MOD_0F2B_PREFIX_2 */
11695 {"movntpd", { Mx, XM }, PREFIX_OPCODE },
11698 /* MOD_0F2B_PREFIX_3 */
11699 {"movntsd", { Mq, XM }, PREFIX_OPCODE },
11704 { "movmskpX", { Gdq, XS }, PREFIX_OPCODE },
11707 /* MOD_0F71_REG_2 */
11709 { "psrlw", { MS, Ib }, 0 },
11712 /* MOD_0F71_REG_4 */
11714 { "psraw", { MS, Ib }, 0 },
11717 /* MOD_0F71_REG_6 */
11719 { "psllw", { MS, Ib }, 0 },
11722 /* MOD_0F72_REG_2 */
11724 { "psrld", { MS, Ib }, 0 },
11727 /* MOD_0F72_REG_4 */
11729 { "psrad", { MS, Ib }, 0 },
11732 /* MOD_0F72_REG_6 */
11734 { "pslld", { MS, Ib }, 0 },
11737 /* MOD_0F73_REG_2 */
11739 { "psrlq", { MS, Ib }, 0 },
11742 /* MOD_0F73_REG_3 */
11744 { PREFIX_TABLE (PREFIX_0F73_REG_3) },
11747 /* MOD_0F73_REG_6 */
11749 { "psllq", { MS, Ib }, 0 },
11752 /* MOD_0F73_REG_7 */
11754 { PREFIX_TABLE (PREFIX_0F73_REG_7) },
11757 /* MOD_0FAE_REG_0 */
11758 { "fxsave", { FXSAVE }, 0 },
11759 { PREFIX_TABLE (PREFIX_0FAE_REG_0) },
11762 /* MOD_0FAE_REG_1 */
11763 { "fxrstor", { FXSAVE }, 0 },
11764 { PREFIX_TABLE (PREFIX_0FAE_REG_1) },
11767 /* MOD_0FAE_REG_2 */
11768 { "ldmxcsr", { Md }, 0 },
11769 { PREFIX_TABLE (PREFIX_0FAE_REG_2) },
11772 /* MOD_0FAE_REG_3 */
11773 { "stmxcsr", { Md }, 0 },
11774 { PREFIX_TABLE (PREFIX_0FAE_REG_3) },
11777 /* MOD_0FAE_REG_4 */
11778 { PREFIX_TABLE (PREFIX_MOD_0_0FAE_REG_4) },
11779 { PREFIX_TABLE (PREFIX_MOD_3_0FAE_REG_4) },
11782 /* MOD_0FAE_REG_5 */
11783 { PREFIX_TABLE (PREFIX_MOD_0_0FAE_REG_5) },
11784 { PREFIX_TABLE (PREFIX_MOD_3_0FAE_REG_5) },
11787 /* MOD_0FAE_REG_6 */
11788 { PREFIX_TABLE (PREFIX_MOD_0_0FAE_REG_6) },
11789 { PREFIX_TABLE (PREFIX_MOD_1_0FAE_REG_6) },
11792 /* MOD_0FAE_REG_7 */
11793 { PREFIX_TABLE (PREFIX_0FAE_REG_7) },
11794 { RM_TABLE (RM_0FAE_REG_7) },
11798 { "lssS", { Gv, Mp }, 0 },
11802 { "lfsS", { Gv, Mp }, 0 },
11806 { "lgsS", { Gv, Mp }, 0 },
11810 { PREFIX_TABLE (PREFIX_MOD_0_0FC3) },
11813 /* MOD_0FC7_REG_3 */
11814 { "xrstors", { FXSAVE }, 0 },
11817 /* MOD_0FC7_REG_4 */
11818 { "xsavec", { FXSAVE }, 0 },
11821 /* MOD_0FC7_REG_5 */
11822 { "xsaves", { FXSAVE }, 0 },
11825 /* MOD_0FC7_REG_6 */
11826 { PREFIX_TABLE (PREFIX_MOD_0_0FC7_REG_6) },
11827 { PREFIX_TABLE (PREFIX_MOD_3_0FC7_REG_6) }
11830 /* MOD_0FC7_REG_7 */
11831 { "vmptrst", { Mq }, 0 },
11832 { PREFIX_TABLE (PREFIX_MOD_3_0FC7_REG_7) }
11837 { "pmovmskb", { Gdq, MS }, 0 },
11840 /* MOD_0FE7_PREFIX_2 */
11841 { "movntdq", { Mx, XM }, 0 },
11844 /* MOD_0FF0_PREFIX_3 */
11845 { "lddqu", { XM, M }, 0 },
11848 /* MOD_0F382A_PREFIX_2 */
11849 { "movntdqa", { XM, Mx }, 0 },
11852 /* MOD_0F38F5_PREFIX_2 */
11853 { "wrussK", { M, Gdq }, PREFIX_OPCODE },
11856 /* MOD_0F38F6_PREFIX_0 */
11857 { "wrssK", { M, Gdq }, PREFIX_OPCODE },
11860 /* MOD_0F38F8_PREFIX_2 */
11861 { "movdir64b", { Gva, M }, PREFIX_OPCODE },
11864 /* MOD_0F38F9_PREFIX_0 */
11865 { "movdiri", { Em, Gv }, PREFIX_OPCODE },
11869 { "bound{S|}", { Gv, Ma }, 0 },
11870 { EVEX_TABLE (EVEX_0F) },
11874 { "lesS", { Gv, Mp }, 0 },
11875 { VEX_C4_TABLE (VEX_0F) },
11879 { "ldsS", { Gv, Mp }, 0 },
11880 { VEX_C5_TABLE (VEX_0F) },
11883 /* MOD_VEX_0F12_PREFIX_0 */
11884 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0) },
11885 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1) },
11889 { VEX_LEN_TABLE (VEX_LEN_0F13_M_0) },
11892 /* MOD_VEX_0F16_PREFIX_0 */
11893 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0) },
11894 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1) },
11898 { VEX_LEN_TABLE (VEX_LEN_0F17_M_0) },
11902 { VEX_W_TABLE (VEX_W_0F2B_M_0) },
11905 /* MOD_VEX_W_0_0F41_P_0_LEN_1 */
11907 { "kandw", { MaskG, MaskVex, MaskR }, 0 },
11910 /* MOD_VEX_W_1_0F41_P_0_LEN_1 */
11912 { "kandq", { MaskG, MaskVex, MaskR }, 0 },
11915 /* MOD_VEX_W_0_0F41_P_2_LEN_1 */
11917 { "kandb", { MaskG, MaskVex, MaskR }, 0 },
11920 /* MOD_VEX_W_1_0F41_P_2_LEN_1 */
11922 { "kandd", { MaskG, MaskVex, MaskR }, 0 },
11925 /* MOD_VEX_W_0_0F42_P_0_LEN_1 */
11927 { "kandnw", { MaskG, MaskVex, MaskR }, 0 },
11930 /* MOD_VEX_W_1_0F42_P_0_LEN_1 */
11932 { "kandnq", { MaskG, MaskVex, MaskR }, 0 },
11935 /* MOD_VEX_W_0_0F42_P_2_LEN_1 */
11937 { "kandnb", { MaskG, MaskVex, MaskR }, 0 },
11940 /* MOD_VEX_W_1_0F42_P_2_LEN_1 */
11942 { "kandnd", { MaskG, MaskVex, MaskR }, 0 },
11945 /* MOD_VEX_W_0_0F44_P_0_LEN_0 */
11947 { "knotw", { MaskG, MaskR }, 0 },
11950 /* MOD_VEX_W_1_0F44_P_0_LEN_0 */
11952 { "knotq", { MaskG, MaskR }, 0 },
11955 /* MOD_VEX_W_0_0F44_P_2_LEN_0 */
11957 { "knotb", { MaskG, MaskR }, 0 },
11960 /* MOD_VEX_W_1_0F44_P_2_LEN_0 */
11962 { "knotd", { MaskG, MaskR }, 0 },
11965 /* MOD_VEX_W_0_0F45_P_0_LEN_1 */
11967 { "korw", { MaskG, MaskVex, MaskR }, 0 },
11970 /* MOD_VEX_W_1_0F45_P_0_LEN_1 */
11972 { "korq", { MaskG, MaskVex, MaskR }, 0 },
11975 /* MOD_VEX_W_0_0F45_P_2_LEN_1 */
11977 { "korb", { MaskG, MaskVex, MaskR }, 0 },
11980 /* MOD_VEX_W_1_0F45_P_2_LEN_1 */
11982 { "kord", { MaskG, MaskVex, MaskR }, 0 },
11985 /* MOD_VEX_W_0_0F46_P_0_LEN_1 */
11987 { "kxnorw", { MaskG, MaskVex, MaskR }, 0 },
11990 /* MOD_VEX_W_1_0F46_P_0_LEN_1 */
11992 { "kxnorq", { MaskG, MaskVex, MaskR }, 0 },
11995 /* MOD_VEX_W_0_0F46_P_2_LEN_1 */
11997 { "kxnorb", { MaskG, MaskVex, MaskR }, 0 },
12000 /* MOD_VEX_W_1_0F46_P_2_LEN_1 */
12002 { "kxnord", { MaskG, MaskVex, MaskR }, 0 },
12005 /* MOD_VEX_W_0_0F47_P_0_LEN_1 */
12007 { "kxorw", { MaskG, MaskVex, MaskR }, 0 },
12010 /* MOD_VEX_W_1_0F47_P_0_LEN_1 */
12012 { "kxorq", { MaskG, MaskVex, MaskR }, 0 },
12015 /* MOD_VEX_W_0_0F47_P_2_LEN_1 */
12017 { "kxorb", { MaskG, MaskVex, MaskR }, 0 },
12020 /* MOD_VEX_W_1_0F47_P_2_LEN_1 */
12022 { "kxord", { MaskG, MaskVex, MaskR }, 0 },
12025 /* MOD_VEX_W_0_0F4A_P_0_LEN_1 */
12027 { "kaddw", { MaskG, MaskVex, MaskR }, 0 },
12030 /* MOD_VEX_W_1_0F4A_P_0_LEN_1 */
12032 { "kaddq", { MaskG, MaskVex, MaskR }, 0 },
12035 /* MOD_VEX_W_0_0F4A_P_2_LEN_1 */
12037 { "kaddb", { MaskG, MaskVex, MaskR }, 0 },
12040 /* MOD_VEX_W_1_0F4A_P_2_LEN_1 */
12042 { "kaddd", { MaskG, MaskVex, MaskR }, 0 },
12045 /* MOD_VEX_W_0_0F4B_P_0_LEN_1 */
12047 { "kunpckwd", { MaskG, MaskVex, MaskR }, 0 },
12050 /* MOD_VEX_W_1_0F4B_P_0_LEN_1 */
12052 { "kunpckdq", { MaskG, MaskVex, MaskR }, 0 },
12055 /* MOD_VEX_W_0_0F4B_P_2_LEN_1 */
12057 { "kunpckbw", { MaskG, MaskVex, MaskR }, 0 },
12062 { VEX_W_TABLE (VEX_W_0F50_M_0) },
12065 /* MOD_VEX_0F71_REG_2 */
12067 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2) },
12070 /* MOD_VEX_0F71_REG_4 */
12072 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4) },
12075 /* MOD_VEX_0F71_REG_6 */
12077 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6) },
12080 /* MOD_VEX_0F72_REG_2 */
12082 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2) },
12085 /* MOD_VEX_0F72_REG_4 */
12087 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4) },
12090 /* MOD_VEX_0F72_REG_6 */
12092 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6) },
12095 /* MOD_VEX_0F73_REG_2 */
12097 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2) },
12100 /* MOD_VEX_0F73_REG_3 */
12102 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3) },
12105 /* MOD_VEX_0F73_REG_6 */
12107 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6) },
12110 /* MOD_VEX_0F73_REG_7 */
12112 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7) },
12115 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
12116 { "kmovw", { Ew, MaskG }, 0 },
12120 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
12121 { "kmovq", { Eq, MaskG }, 0 },
12125 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
12126 { "kmovb", { Eb, MaskG }, 0 },
12130 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
12131 { "kmovd", { Ed, MaskG }, 0 },
12135 /* MOD_VEX_W_0_0F92_P_0_LEN_0 */
12137 { "kmovw", { MaskG, Rdq }, 0 },
12140 /* MOD_VEX_W_0_0F92_P_2_LEN_0 */
12142 { "kmovb", { MaskG, Rdq }, 0 },
12145 /* MOD_VEX_W_0_0F92_P_3_LEN_0 */
12147 { "kmovd", { MaskG, Rdq }, 0 },
12150 /* MOD_VEX_W_1_0F92_P_3_LEN_0 */
12152 { "kmovq", { MaskG, Rdq }, 0 },
12155 /* MOD_VEX_W_0_0F93_P_0_LEN_0 */
12157 { "kmovw", { Gdq, MaskR }, 0 },
12160 /* MOD_VEX_W_0_0F93_P_2_LEN_0 */
12162 { "kmovb", { Gdq, MaskR }, 0 },
12165 /* MOD_VEX_W_0_0F93_P_3_LEN_0 */
12167 { "kmovd", { Gdq, MaskR }, 0 },
12170 /* MOD_VEX_W_1_0F93_P_3_LEN_0 */
12172 { "kmovq", { Gdq, MaskR }, 0 },
12175 /* MOD_VEX_W_0_0F98_P_0_LEN_0 */
12177 { "kortestw", { MaskG, MaskR }, 0 },
12180 /* MOD_VEX_W_1_0F98_P_0_LEN_0 */
12182 { "kortestq", { MaskG, MaskR }, 0 },
12185 /* MOD_VEX_W_0_0F98_P_2_LEN_0 */
12187 { "kortestb", { MaskG, MaskR }, 0 },
12190 /* MOD_VEX_W_1_0F98_P_2_LEN_0 */
12192 { "kortestd", { MaskG, MaskR }, 0 },
12195 /* MOD_VEX_W_0_0F99_P_0_LEN_0 */
12197 { "ktestw", { MaskG, MaskR }, 0 },
12200 /* MOD_VEX_W_1_0F99_P_0_LEN_0 */
12202 { "ktestq", { MaskG, MaskR }, 0 },
12205 /* MOD_VEX_W_0_0F99_P_2_LEN_0 */
12207 { "ktestb", { MaskG, MaskR }, 0 },
12210 /* MOD_VEX_W_1_0F99_P_2_LEN_0 */
12212 { "ktestd", { MaskG, MaskR }, 0 },
12215 /* MOD_VEX_0FAE_REG_2 */
12216 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0) },
12219 /* MOD_VEX_0FAE_REG_3 */
12220 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0) },
12223 /* MOD_VEX_0FD7_PREFIX_2 */
12225 { VEX_W_TABLE (VEX_W_0FD7_P_2_M_1) },
12228 /* MOD_VEX_0FE7_PREFIX_2 */
12229 { VEX_W_TABLE (VEX_W_0FE7_P_2_M_0) },
12232 /* MOD_VEX_0FF0_PREFIX_3 */
12233 { VEX_W_TABLE (VEX_W_0FF0_P_3_M_0) },
12236 /* MOD_VEX_0F381A_PREFIX_2 */
12237 { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0) },
12240 /* MOD_VEX_0F382A_PREFIX_2 */
12241 { VEX_W_TABLE (VEX_W_0F382A_P_2_M_0) },
12244 /* MOD_VEX_0F382C_PREFIX_2 */
12245 { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0) },
12248 /* MOD_VEX_0F382D_PREFIX_2 */
12249 { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0) },
12252 /* MOD_VEX_0F382E_PREFIX_2 */
12253 { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0) },
12256 /* MOD_VEX_0F382F_PREFIX_2 */
12257 { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0) },
12260 /* MOD_VEX_0F385A_PREFIX_2 */
12261 { VEX_LEN_TABLE (VEX_LEN_0F385A_P_2_M_0) },
12264 /* MOD_VEX_0F388C_PREFIX_2 */
12265 { "vpmaskmov%LW", { XM, Vex, Mx }, 0 },
12268 /* MOD_VEX_0F388E_PREFIX_2 */
12269 { "vpmaskmov%LW", { Mx, Vex, XM }, 0 },
12272 /* MOD_VEX_W_0_0F3A30_P_2_LEN_0 */
12274 { "kshiftrb", { MaskG, MaskR, Ib }, 0 },
12277 /* MOD_VEX_W_1_0F3A30_P_2_LEN_0 */
12279 { "kshiftrw", { MaskG, MaskR, Ib }, 0 },
12282 /* MOD_VEX_W_0_0F3A31_P_2_LEN_0 */
12284 { "kshiftrd", { MaskG, MaskR, Ib }, 0 },
12287 /* MOD_VEX_W_1_0F3A31_P_2_LEN_0 */
12289 { "kshiftrq", { MaskG, MaskR, Ib }, 0 },
12292 /* MOD_VEX_W_0_0F3A32_P_2_LEN_0 */
12294 { "kshiftlb", { MaskG, MaskR, Ib }, 0 },
12297 /* MOD_VEX_W_1_0F3A32_P_2_LEN_0 */
12299 { "kshiftlw", { MaskG, MaskR, Ib }, 0 },
12302 /* MOD_VEX_W_0_0F3A33_P_2_LEN_0 */
12304 { "kshiftld", { MaskG, MaskR, Ib }, 0 },
12307 /* MOD_VEX_W_1_0F3A33_P_2_LEN_0 */
12309 { "kshiftlq", { MaskG, MaskR, Ib }, 0 },
12311 #define NEED_MOD_TABLE
12312 #include "i386-dis-evex.h"
12313 #undef NEED_MOD_TABLE
12316 static const struct dis386 rm_table[][8] = {
12319 { "xabort", { Skip_MODRM, Ib }, 0 },
12323 { "xbeginT", { Skip_MODRM, Jv }, 0 },
12326 /* RM_0F01_REG_0 */
12328 { "vmcall", { Skip_MODRM }, 0 },
12329 { "vmlaunch", { Skip_MODRM }, 0 },
12330 { "vmresume", { Skip_MODRM }, 0 },
12331 { "vmxoff", { Skip_MODRM }, 0 },
12332 { "pconfig", { Skip_MODRM }, 0 },
12335 /* RM_0F01_REG_1 */
12336 { "monitor", { { OP_Monitor, 0 } }, 0 },
12337 { "mwait", { { OP_Mwait, 0 } }, 0 },
12338 { "clac", { Skip_MODRM }, 0 },
12339 { "stac", { Skip_MODRM }, 0 },
12343 { "encls", { Skip_MODRM }, 0 },
12346 /* RM_0F01_REG_2 */
12347 { "xgetbv", { Skip_MODRM }, 0 },
12348 { "xsetbv", { Skip_MODRM }, 0 },
12351 { "vmfunc", { Skip_MODRM }, 0 },
12352 { "xend", { Skip_MODRM }, 0 },
12353 { "xtest", { Skip_MODRM }, 0 },
12354 { "enclu", { Skip_MODRM }, 0 },
12357 /* RM_0F01_REG_3 */
12358 { "vmrun", { Skip_MODRM }, 0 },
12359 { "vmmcall", { Skip_MODRM }, 0 },
12360 { "vmload", { Skip_MODRM }, 0 },
12361 { "vmsave", { Skip_MODRM }, 0 },
12362 { "stgi", { Skip_MODRM }, 0 },
12363 { "clgi", { Skip_MODRM }, 0 },
12364 { "skinit", { Skip_MODRM }, 0 },
12365 { "invlpga", { Skip_MODRM }, 0 },
12368 /* RM_0F01_REG_5 */
12369 { PREFIX_TABLE (PREFIX_MOD_3_0F01_REG_5_RM_0) },
12371 { PREFIX_TABLE (PREFIX_MOD_3_0F01_REG_5_RM_2) },
12375 { "rdpkru", { Skip_MODRM }, 0 },
12376 { "wrpkru", { Skip_MODRM }, 0 },
12379 /* RM_0F01_REG_7 */
12380 { "swapgs", { Skip_MODRM }, 0 },
12381 { "rdtscp", { Skip_MODRM }, 0 },
12382 { "monitorx", { { OP_Monitor, 0 } }, 0 },
12383 { "mwaitx", { { OP_Mwaitx, 0 } }, 0 },
12384 { "clzero", { Skip_MODRM }, 0 },
12387 /* RM_0F1E_MOD_3_REG_7 */
12388 { "nopQ", { Ev }, 0 },
12389 { "nopQ", { Ev }, 0 },
12390 { "endbr64", { Skip_MODRM }, PREFIX_OPCODE },
12391 { "endbr32", { Skip_MODRM }, PREFIX_OPCODE },
12392 { "nopQ", { Ev }, 0 },
12393 { "nopQ", { Ev }, 0 },
12394 { "nopQ", { Ev }, 0 },
12395 { "nopQ", { Ev }, 0 },
12398 /* RM_0FAE_REG_6 */
12399 { "mfence", { Skip_MODRM }, 0 },
12402 /* RM_0FAE_REG_7 */
12403 { "sfence", { Skip_MODRM }, 0 },
12408 #define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
12410 /* We use the high bit to indicate different name for the same
12412 #define REP_PREFIX (0xf3 | 0x100)
12413 #define XACQUIRE_PREFIX (0xf2 | 0x200)
12414 #define XRELEASE_PREFIX (0xf3 | 0x400)
12415 #define BND_PREFIX (0xf2 | 0x400)
12416 #define NOTRACK_PREFIX (0x3e | 0x100)
12421 int newrex, i, length;
12427 last_lock_prefix = -1;
12428 last_repz_prefix = -1;
12429 last_repnz_prefix = -1;
12430 last_data_prefix = -1;
12431 last_addr_prefix = -1;
12432 last_rex_prefix = -1;
12433 last_seg_prefix = -1;
12435 active_seg_prefix = 0;
12436 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
12437 all_prefixes[i] = 0;
12440 /* The maximum instruction length is 15bytes. */
12441 while (length < MAX_CODE_LENGTH - 1)
12443 FETCH_DATA (the_info, codep + 1);
12447 /* REX prefixes family. */
12464 if (address_mode == mode_64bit)
12468 last_rex_prefix = i;
12471 prefixes |= PREFIX_REPZ;
12472 last_repz_prefix = i;
12475 prefixes |= PREFIX_REPNZ;
12476 last_repnz_prefix = i;
12479 prefixes |= PREFIX_LOCK;
12480 last_lock_prefix = i;
12483 prefixes |= PREFIX_CS;
12484 last_seg_prefix = i;
12485 active_seg_prefix = PREFIX_CS;
12488 prefixes |= PREFIX_SS;
12489 last_seg_prefix = i;
12490 active_seg_prefix = PREFIX_SS;
12493 prefixes |= PREFIX_DS;
12494 last_seg_prefix = i;
12495 active_seg_prefix = PREFIX_DS;
12498 prefixes |= PREFIX_ES;
12499 last_seg_prefix = i;
12500 active_seg_prefix = PREFIX_ES;
12503 prefixes |= PREFIX_FS;
12504 last_seg_prefix = i;
12505 active_seg_prefix = PREFIX_FS;
12508 prefixes |= PREFIX_GS;
12509 last_seg_prefix = i;
12510 active_seg_prefix = PREFIX_GS;
12513 prefixes |= PREFIX_DATA;
12514 last_data_prefix = i;
12517 prefixes |= PREFIX_ADDR;
12518 last_addr_prefix = i;
12521 /* fwait is really an instruction. If there are prefixes
12522 before the fwait, they belong to the fwait, *not* to the
12523 following instruction. */
12525 if (prefixes || rex)
12527 prefixes |= PREFIX_FWAIT;
12529 /* This ensures that the previous REX prefixes are noticed
12530 as unused prefixes, as in the return case below. */
12534 prefixes = PREFIX_FWAIT;
12539 /* Rex is ignored when followed by another prefix. */
12545 if (*codep != FWAIT_OPCODE)
12546 all_prefixes[i++] = *codep;
12554 /* Return the name of the prefix byte PREF, or NULL if PREF is not a
12557 static const char *
12558 prefix_name (int pref, int sizeflag)
12560 static const char *rexes [16] =
12563 "rex.B", /* 0x41 */
12564 "rex.X", /* 0x42 */
12565 "rex.XB", /* 0x43 */
12566 "rex.R", /* 0x44 */
12567 "rex.RB", /* 0x45 */
12568 "rex.RX", /* 0x46 */
12569 "rex.RXB", /* 0x47 */
12570 "rex.W", /* 0x48 */
12571 "rex.WB", /* 0x49 */
12572 "rex.WX", /* 0x4a */
12573 "rex.WXB", /* 0x4b */
12574 "rex.WR", /* 0x4c */
12575 "rex.WRB", /* 0x4d */
12576 "rex.WRX", /* 0x4e */
12577 "rex.WRXB", /* 0x4f */
12582 /* REX prefixes family. */
12599 return rexes [pref - 0x40];
12619 return (sizeflag & DFLAG) ? "data16" : "data32";
12621 if (address_mode == mode_64bit)
12622 return (sizeflag & AFLAG) ? "addr32" : "addr64";
12624 return (sizeflag & AFLAG) ? "addr16" : "addr32";
12629 case XACQUIRE_PREFIX:
12631 case XRELEASE_PREFIX:
12635 case NOTRACK_PREFIX:
12642 static char op_out[MAX_OPERANDS][100];
12643 static int op_ad, op_index[MAX_OPERANDS];
12644 static int two_source_ops;
12645 static bfd_vma op_address[MAX_OPERANDS];
12646 static bfd_vma op_riprel[MAX_OPERANDS];
12647 static bfd_vma start_pc;
12650 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
12651 * (see topic "Redundant prefixes" in the "Differences from 8086"
12652 * section of the "Virtual 8086 Mode" chapter.)
12653 * 'pc' should be the address of this instruction, it will
12654 * be used to print the target address if this is a relative jump or call
12655 * The function returns the length of this instruction in bytes.
12658 static char intel_syntax;
12659 static char intel_mnemonic = !SYSV386_COMPAT;
12660 static char open_char;
12661 static char close_char;
12662 static char separator_char;
12663 static char scale_char;
12671 static enum x86_64_isa isa64;
12673 /* Here for backwards compatibility. When gdb stops using
12674 print_insn_i386_att and print_insn_i386_intel these functions can
12675 disappear, and print_insn_i386 be merged into print_insn. */
12677 print_insn_i386_att (bfd_vma pc, disassemble_info *info)
12681 return print_insn (pc, info);
12685 print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
12689 return print_insn (pc, info);
12693 print_insn_i386 (bfd_vma pc, disassemble_info *info)
12697 return print_insn (pc, info);
12701 print_i386_disassembler_options (FILE *stream)
12703 fprintf (stream, _("\n\
12704 The following i386/x86-64 specific disassembler options are supported for use\n\
12705 with the -M switch (multiple options should be separated by commas):\n"));
12707 fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
12708 fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
12709 fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
12710 fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
12711 fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
12712 fprintf (stream, _(" att-mnemonic\n"
12713 " Display instruction in AT&T mnemonic\n"));
12714 fprintf (stream, _(" intel-mnemonic\n"
12715 " Display instruction in Intel mnemonic\n"));
12716 fprintf (stream, _(" addr64 Assume 64bit address size\n"));
12717 fprintf (stream, _(" addr32 Assume 32bit address size\n"));
12718 fprintf (stream, _(" addr16 Assume 16bit address size\n"));
12719 fprintf (stream, _(" data32 Assume 32bit data size\n"));
12720 fprintf (stream, _(" data16 Assume 16bit data size\n"));
12721 fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
12722 fprintf (stream, _(" amd64 Display instruction in AMD64 ISA\n"));
12723 fprintf (stream, _(" intel64 Display instruction in Intel64 ISA\n"));
12727 static const struct dis386 bad_opcode = { "(bad)", { XX }, 0 };
12729 /* Get a pointer to struct dis386 with a valid name. */
12731 static const struct dis386 *
12732 get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
12734 int vindex, vex_table_index;
12736 if (dp->name != NULL)
12739 switch (dp->op[0].bytemode)
12741 case USE_REG_TABLE:
12742 dp = ®_table[dp->op[1].bytemode][modrm.reg];
12745 case USE_MOD_TABLE:
12746 vindex = modrm.mod == 0x3 ? 1 : 0;
12747 dp = &mod_table[dp->op[1].bytemode][vindex];
12751 dp = &rm_table[dp->op[1].bytemode][modrm.rm];
12754 case USE_PREFIX_TABLE:
12757 /* The prefix in VEX is implicit. */
12758 switch (vex.prefix)
12763 case REPE_PREFIX_OPCODE:
12766 case DATA_PREFIX_OPCODE:
12769 case REPNE_PREFIX_OPCODE:
12779 int last_prefix = -1;
12782 /* We check PREFIX_REPNZ and PREFIX_REPZ before PREFIX_DATA.
12783 When there are multiple PREFIX_REPNZ and PREFIX_REPZ, the
12785 if ((prefixes & (PREFIX_REPZ | PREFIX_REPNZ)) != 0)
12787 if (last_repz_prefix > last_repnz_prefix)
12790 prefix = PREFIX_REPZ;
12791 last_prefix = last_repz_prefix;
12796 prefix = PREFIX_REPNZ;
12797 last_prefix = last_repnz_prefix;
12800 /* Check if prefix should be ignored. */
12801 if ((((prefix_table[dp->op[1].bytemode][vindex].prefix_requirement
12802 & PREFIX_IGNORED) >> PREFIX_IGNORED_SHIFT)
12807 if (vindex == 0 && (prefixes & PREFIX_DATA) != 0)
12810 prefix = PREFIX_DATA;
12811 last_prefix = last_data_prefix;
12816 used_prefixes |= prefix;
12817 all_prefixes[last_prefix] = 0;
12820 dp = &prefix_table[dp->op[1].bytemode][vindex];
12823 case USE_X86_64_TABLE:
12824 vindex = address_mode == mode_64bit ? 1 : 0;
12825 dp = &x86_64_table[dp->op[1].bytemode][vindex];
12828 case USE_3BYTE_TABLE:
12829 FETCH_DATA (info, codep + 2);
12831 dp = &three_byte_table[dp->op[1].bytemode][vindex];
12833 modrm.mod = (*codep >> 6) & 3;
12834 modrm.reg = (*codep >> 3) & 7;
12835 modrm.rm = *codep & 7;
12838 case USE_VEX_LEN_TABLE:
12842 switch (vex.length)
12855 dp = &vex_len_table[dp->op[1].bytemode][vindex];
12858 case USE_XOP_8F_TABLE:
12859 FETCH_DATA (info, codep + 3);
12860 /* All bits in the REX prefix are ignored. */
12862 rex = ~(*codep >> 5) & 0x7;
12864 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
12865 switch ((*codep & 0x1f))
12871 vex_table_index = XOP_08;
12874 vex_table_index = XOP_09;
12877 vex_table_index = XOP_0A;
12881 vex.w = *codep & 0x80;
12882 if (vex.w && address_mode == mode_64bit)
12885 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12886 if (address_mode != mode_64bit)
12888 /* In 16/32-bit mode REX_B is silently ignored. */
12892 vex.length = (*codep & 0x4) ? 256 : 128;
12893 switch ((*codep & 0x3))
12898 vex.prefix = DATA_PREFIX_OPCODE;
12901 vex.prefix = REPE_PREFIX_OPCODE;
12904 vex.prefix = REPNE_PREFIX_OPCODE;
12911 dp = &xop_table[vex_table_index][vindex];
12914 FETCH_DATA (info, codep + 1);
12915 modrm.mod = (*codep >> 6) & 3;
12916 modrm.reg = (*codep >> 3) & 7;
12917 modrm.rm = *codep & 7;
12920 case USE_VEX_C4_TABLE:
12922 FETCH_DATA (info, codep + 3);
12923 /* All bits in the REX prefix are ignored. */
12925 rex = ~(*codep >> 5) & 0x7;
12926 switch ((*codep & 0x1f))
12932 vex_table_index = VEX_0F;
12935 vex_table_index = VEX_0F38;
12938 vex_table_index = VEX_0F3A;
12942 vex.w = *codep & 0x80;
12943 if (address_mode == mode_64bit)
12950 /* For the 3-byte VEX prefix in 32-bit mode, the REX_B bit
12951 is ignored, other REX bits are 0 and the highest bit in
12952 VEX.vvvv is also ignored (but we mustn't clear it here). */
12955 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12956 vex.length = (*codep & 0x4) ? 256 : 128;
12957 switch ((*codep & 0x3))
12962 vex.prefix = DATA_PREFIX_OPCODE;
12965 vex.prefix = REPE_PREFIX_OPCODE;
12968 vex.prefix = REPNE_PREFIX_OPCODE;
12975 dp = &vex_table[vex_table_index][vindex];
12977 /* There is no MODRM byte for VEX0F 77. */
12978 if (vex_table_index != VEX_0F || vindex != 0x77)
12980 FETCH_DATA (info, codep + 1);
12981 modrm.mod = (*codep >> 6) & 3;
12982 modrm.reg = (*codep >> 3) & 7;
12983 modrm.rm = *codep & 7;
12987 case USE_VEX_C5_TABLE:
12989 FETCH_DATA (info, codep + 2);
12990 /* All bits in the REX prefix are ignored. */
12992 rex = (*codep & 0x80) ? 0 : REX_R;
12994 /* For the 2-byte VEX prefix in 32-bit mode, the highest bit in
12996 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12997 vex.length = (*codep & 0x4) ? 256 : 128;
12998 switch ((*codep & 0x3))
13003 vex.prefix = DATA_PREFIX_OPCODE;
13006 vex.prefix = REPE_PREFIX_OPCODE;
13009 vex.prefix = REPNE_PREFIX_OPCODE;
13016 dp = &vex_table[dp->op[1].bytemode][vindex];
13018 /* There is no MODRM byte for VEX 77. */
13019 if (vindex != 0x77)
13021 FETCH_DATA (info, codep + 1);
13022 modrm.mod = (*codep >> 6) & 3;
13023 modrm.reg = (*codep >> 3) & 7;
13024 modrm.rm = *codep & 7;
13028 case USE_VEX_W_TABLE:
13032 dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
13035 case USE_EVEX_TABLE:
13036 two_source_ops = 0;
13039 FETCH_DATA (info, codep + 4);
13040 /* All bits in the REX prefix are ignored. */
13042 /* The first byte after 0x62. */
13043 rex = ~(*codep >> 5) & 0x7;
13044 vex.r = *codep & 0x10;
13045 switch ((*codep & 0xf))
13048 return &bad_opcode;
13050 vex_table_index = EVEX_0F;
13053 vex_table_index = EVEX_0F38;
13056 vex_table_index = EVEX_0F3A;
13060 /* The second byte after 0x62. */
13062 vex.w = *codep & 0x80;
13063 if (vex.w && address_mode == mode_64bit)
13066 vex.register_specifier = (~(*codep >> 3)) & 0xf;
13069 if (!(*codep & 0x4))
13070 return &bad_opcode;
13072 switch ((*codep & 0x3))
13077 vex.prefix = DATA_PREFIX_OPCODE;
13080 vex.prefix = REPE_PREFIX_OPCODE;
13083 vex.prefix = REPNE_PREFIX_OPCODE;
13087 /* The third byte after 0x62. */
13090 /* Remember the static rounding bits. */
13091 vex.ll = (*codep >> 5) & 3;
13092 vex.b = (*codep & 0x10) != 0;
13094 vex.v = *codep & 0x8;
13095 vex.mask_register_specifier = *codep & 0x7;
13096 vex.zeroing = *codep & 0x80;
13098 if (address_mode != mode_64bit)
13100 /* In 16/32-bit mode silently ignore following bits. */
13110 dp = &evex_table[vex_table_index][vindex];
13112 FETCH_DATA (info, codep + 1);
13113 modrm.mod = (*codep >> 6) & 3;
13114 modrm.reg = (*codep >> 3) & 7;
13115 modrm.rm = *codep & 7;
13117 /* Set vector length. */
13118 if (modrm.mod == 3 && vex.b)
13134 return &bad_opcode;
13147 if (dp->name != NULL)
13150 return get_valid_dis386 (dp, info);
13154 get_sib (disassemble_info *info, int sizeflag)
13156 /* If modrm.mod == 3, operand must be register. */
13158 && ((sizeflag & AFLAG) || address_mode == mode_64bit)
13162 FETCH_DATA (info, codep + 2);
13163 sib.index = (codep [1] >> 3) & 7;
13164 sib.scale = (codep [1] >> 6) & 3;
13165 sib.base = codep [1] & 7;
13170 print_insn (bfd_vma pc, disassemble_info *info)
13172 const struct dis386 *dp;
13174 char *op_txt[MAX_OPERANDS];
13176 int sizeflag, orig_sizeflag;
13178 struct dis_private priv;
13181 priv.orig_sizeflag = AFLAG | DFLAG;
13182 if ((info->mach & bfd_mach_i386_i386) != 0)
13183 address_mode = mode_32bit;
13184 else if (info->mach == bfd_mach_i386_i8086)
13186 address_mode = mode_16bit;
13187 priv.orig_sizeflag = 0;
13190 address_mode = mode_64bit;
13192 if (intel_syntax == (char) -1)
13193 intel_syntax = (info->mach & bfd_mach_i386_intel_syntax) != 0;
13195 for (p = info->disassembler_options; p != NULL; )
13197 if (CONST_STRNEQ (p, "amd64"))
13199 else if (CONST_STRNEQ (p, "intel64"))
13201 else if (CONST_STRNEQ (p, "x86-64"))
13203 address_mode = mode_64bit;
13204 priv.orig_sizeflag = AFLAG | DFLAG;
13206 else if (CONST_STRNEQ (p, "i386"))
13208 address_mode = mode_32bit;
13209 priv.orig_sizeflag = AFLAG | DFLAG;
13211 else if (CONST_STRNEQ (p, "i8086"))
13213 address_mode = mode_16bit;
13214 priv.orig_sizeflag = 0;
13216 else if (CONST_STRNEQ (p, "intel"))
13219 if (CONST_STRNEQ (p + 5, "-mnemonic"))
13220 intel_mnemonic = 1;
13222 else if (CONST_STRNEQ (p, "att"))
13225 if (CONST_STRNEQ (p + 3, "-mnemonic"))
13226 intel_mnemonic = 0;
13228 else if (CONST_STRNEQ (p, "addr"))
13230 if (address_mode == mode_64bit)
13232 if (p[4] == '3' && p[5] == '2')
13233 priv.orig_sizeflag &= ~AFLAG;
13234 else if (p[4] == '6' && p[5] == '4')
13235 priv.orig_sizeflag |= AFLAG;
13239 if (p[4] == '1' && p[5] == '6')
13240 priv.orig_sizeflag &= ~AFLAG;
13241 else if (p[4] == '3' && p[5] == '2')
13242 priv.orig_sizeflag |= AFLAG;
13245 else if (CONST_STRNEQ (p, "data"))
13247 if (p[4] == '1' && p[5] == '6')
13248 priv.orig_sizeflag &= ~DFLAG;
13249 else if (p[4] == '3' && p[5] == '2')
13250 priv.orig_sizeflag |= DFLAG;
13252 else if (CONST_STRNEQ (p, "suffix"))
13253 priv.orig_sizeflag |= SUFFIX_ALWAYS;
13255 p = strchr (p, ',');
13260 if (address_mode == mode_64bit && sizeof (bfd_vma) < 8)
13262 (*info->fprintf_func) (info->stream,
13263 _("64-bit address is disabled"));
13269 names64 = intel_names64;
13270 names32 = intel_names32;
13271 names16 = intel_names16;
13272 names8 = intel_names8;
13273 names8rex = intel_names8rex;
13274 names_seg = intel_names_seg;
13275 names_mm = intel_names_mm;
13276 names_bnd = intel_names_bnd;
13277 names_xmm = intel_names_xmm;
13278 names_ymm = intel_names_ymm;
13279 names_zmm = intel_names_zmm;
13280 index64 = intel_index64;
13281 index32 = intel_index32;
13282 names_mask = intel_names_mask;
13283 index16 = intel_index16;
13286 separator_char = '+';
13291 names64 = att_names64;
13292 names32 = att_names32;
13293 names16 = att_names16;
13294 names8 = att_names8;
13295 names8rex = att_names8rex;
13296 names_seg = att_names_seg;
13297 names_mm = att_names_mm;
13298 names_bnd = att_names_bnd;
13299 names_xmm = att_names_xmm;
13300 names_ymm = att_names_ymm;
13301 names_zmm = att_names_zmm;
13302 index64 = att_index64;
13303 index32 = att_index32;
13304 names_mask = att_names_mask;
13305 index16 = att_index16;
13308 separator_char = ',';
13312 /* The output looks better if we put 7 bytes on a line, since that
13313 puts most long word instructions on a single line. Use 8 bytes
13315 if ((info->mach & bfd_mach_l1om) != 0)
13316 info->bytes_per_line = 8;
13318 info->bytes_per_line = 7;
13320 info->private_data = &priv;
13321 priv.max_fetched = priv.the_buffer;
13322 priv.insn_start = pc;
13325 for (i = 0; i < MAX_OPERANDS; ++i)
13333 start_codep = priv.the_buffer;
13334 codep = priv.the_buffer;
13336 if (OPCODES_SIGSETJMP (priv.bailout) != 0)
13340 /* Getting here means we tried for data but didn't get it. That
13341 means we have an incomplete instruction of some sort. Just
13342 print the first byte as a prefix or a .byte pseudo-op. */
13343 if (codep > priv.the_buffer)
13345 name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
13347 (*info->fprintf_func) (info->stream, "%s", name);
13350 /* Just print the first byte as a .byte instruction. */
13351 (*info->fprintf_func) (info->stream, ".byte 0x%x",
13352 (unsigned int) priv.the_buffer[0]);
13362 sizeflag = priv.orig_sizeflag;
13364 if (!ckprefix () || rex_used)
13366 /* Too many prefixes or unused REX prefixes. */
13368 i < (int) ARRAY_SIZE (all_prefixes) && all_prefixes[i];
13370 (*info->fprintf_func) (info->stream, "%s%s",
13372 prefix_name (all_prefixes[i], sizeflag));
13376 insn_codep = codep;
13378 FETCH_DATA (info, codep + 1);
13379 two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
13381 if (((prefixes & PREFIX_FWAIT)
13382 && ((*codep < 0xd8) || (*codep > 0xdf))))
13384 /* Handle prefixes before fwait. */
13385 for (i = 0; i < fwait_prefix && all_prefixes[i];
13387 (*info->fprintf_func) (info->stream, "%s ",
13388 prefix_name (all_prefixes[i], sizeflag));
13389 (*info->fprintf_func) (info->stream, "fwait");
13393 if (*codep == 0x0f)
13395 unsigned char threebyte;
13398 FETCH_DATA (info, codep + 1);
13399 threebyte = *codep;
13400 dp = &dis386_twobyte[threebyte];
13401 need_modrm = twobyte_has_modrm[*codep];
13406 dp = &dis386[*codep];
13407 need_modrm = onebyte_has_modrm[*codep];
13411 /* Save sizeflag for printing the extra prefixes later before updating
13412 it for mnemonic and operand processing. The prefix names depend
13413 only on the address mode. */
13414 orig_sizeflag = sizeflag;
13415 if (prefixes & PREFIX_ADDR)
13417 if ((prefixes & PREFIX_DATA))
13423 FETCH_DATA (info, codep + 1);
13424 modrm.mod = (*codep >> 6) & 3;
13425 modrm.reg = (*codep >> 3) & 7;
13426 modrm.rm = *codep & 7;
13432 memset (&vex, 0, sizeof (vex));
13434 if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
13436 get_sib (info, sizeflag);
13437 dofloat (sizeflag);
13441 dp = get_valid_dis386 (dp, info);
13442 if (dp != NULL && putop (dp->name, sizeflag) == 0)
13444 get_sib (info, sizeflag);
13445 for (i = 0; i < MAX_OPERANDS; ++i)
13448 op_ad = MAX_OPERANDS - 1 - i;
13450 (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
13451 /* For EVEX instruction after the last operand masking
13452 should be printed. */
13453 if (i == 0 && vex.evex)
13455 /* Don't print {%k0}. */
13456 if (vex.mask_register_specifier)
13459 oappend (names_mask[vex.mask_register_specifier]);
13469 /* Check if the REX prefix is used. */
13470 if (rex_ignored == 0 && (rex ^ rex_used) == 0 && last_rex_prefix >= 0)
13471 all_prefixes[last_rex_prefix] = 0;
13473 /* Check if the SEG prefix is used. */
13474 if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
13475 | PREFIX_FS | PREFIX_GS)) != 0
13476 && (used_prefixes & active_seg_prefix) != 0)
13477 all_prefixes[last_seg_prefix] = 0;
13479 /* Check if the ADDR prefix is used. */
13480 if ((prefixes & PREFIX_ADDR) != 0
13481 && (used_prefixes & PREFIX_ADDR) != 0)
13482 all_prefixes[last_addr_prefix] = 0;
13484 /* Check if the DATA prefix is used. */
13485 if ((prefixes & PREFIX_DATA) != 0
13486 && (used_prefixes & PREFIX_DATA) != 0)
13487 all_prefixes[last_data_prefix] = 0;
13489 /* Print the extra prefixes. */
13491 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
13492 if (all_prefixes[i])
13495 name = prefix_name (all_prefixes[i], orig_sizeflag);
13498 prefix_length += strlen (name) + 1;
13499 (*info->fprintf_func) (info->stream, "%s ", name);
13502 /* If the mandatory PREFIX_REPZ/PREFIX_REPNZ/PREFIX_DATA prefix is
13503 unused, opcode is invalid. Since the PREFIX_DATA prefix may be
13504 used by putop and MMX/SSE operand and may be overriden by the
13505 PREFIX_REPZ/PREFIX_REPNZ fix, we check the PREFIX_DATA prefix
13507 if (dp->prefix_requirement == PREFIX_OPCODE
13508 && dp != &bad_opcode
13510 & (PREFIX_REPZ | PREFIX_REPNZ)) != 0
13512 & (PREFIX_REPZ | PREFIX_REPNZ)) == 0)
13514 & (PREFIX_REPZ | PREFIX_REPNZ | PREFIX_DATA))
13516 && (used_prefixes & PREFIX_DATA) == 0))))
13518 (*info->fprintf_func) (info->stream, "(bad)");
13519 return end_codep - priv.the_buffer;
13522 /* Check maximum code length. */
13523 if ((codep - start_codep) > MAX_CODE_LENGTH)
13525 (*info->fprintf_func) (info->stream, "(bad)");
13526 return MAX_CODE_LENGTH;
13529 obufp = mnemonicendp;
13530 for (i = strlen (obuf) + prefix_length; i < 6; i++)
13533 (*info->fprintf_func) (info->stream, "%s", obuf);
13535 /* The enter and bound instructions are printed with operands in the same
13536 order as the intel book; everything else is printed in reverse order. */
13537 if (intel_syntax || two_source_ops)
13541 for (i = 0; i < MAX_OPERANDS; ++i)
13542 op_txt[i] = op_out[i];
13544 if (intel_syntax && dp && dp->op[2].rtn == OP_Rounding
13545 && dp->op[3].rtn == OP_E && dp->op[4].rtn == NULL)
13547 op_txt[2] = op_out[3];
13548 op_txt[3] = op_out[2];
13551 for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
13553 op_ad = op_index[i];
13554 op_index[i] = op_index[MAX_OPERANDS - 1 - i];
13555 op_index[MAX_OPERANDS - 1 - i] = op_ad;
13556 riprel = op_riprel[i];
13557 op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
13558 op_riprel[MAX_OPERANDS - 1 - i] = riprel;
13563 for (i = 0; i < MAX_OPERANDS; ++i)
13564 op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
13568 for (i = 0; i < MAX_OPERANDS; ++i)
13572 (*info->fprintf_func) (info->stream, ",");
13573 if (op_index[i] != -1 && !op_riprel[i])
13574 (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
13576 (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
13580 for (i = 0; i < MAX_OPERANDS; i++)
13581 if (op_index[i] != -1 && op_riprel[i])
13583 (*info->fprintf_func) (info->stream, " # ");
13584 (*info->print_address_func) ((bfd_vma) (start_pc + (codep - start_codep)
13585 + op_address[op_index[i]]), info);
13588 return codep - priv.the_buffer;
13591 static const char *float_mem[] = {
13666 static const unsigned char float_mem_mode[] = {
13741 #define ST { OP_ST, 0 }
13742 #define STi { OP_STi, 0 }
13744 #define FGRPd9_2 NULL, { { NULL, 1 } }, 0
13745 #define FGRPd9_4 NULL, { { NULL, 2 } }, 0
13746 #define FGRPd9_5 NULL, { { NULL, 3 } }, 0
13747 #define FGRPd9_6 NULL, { { NULL, 4 } }, 0
13748 #define FGRPd9_7 NULL, { { NULL, 5 } }, 0
13749 #define FGRPda_5 NULL, { { NULL, 6 } }, 0
13750 #define FGRPdb_4 NULL, { { NULL, 7 } }, 0
13751 #define FGRPde_3 NULL, { { NULL, 8 } }, 0
13752 #define FGRPdf_4 NULL, { { NULL, 9 } }, 0
13754 static const struct dis386 float_reg[][8] = {
13757 { "fadd", { ST, STi }, 0 },
13758 { "fmul", { ST, STi }, 0 },
13759 { "fcom", { STi }, 0 },
13760 { "fcomp", { STi }, 0 },
13761 { "fsub", { ST, STi }, 0 },
13762 { "fsubr", { ST, STi }, 0 },
13763 { "fdiv", { ST, STi }, 0 },
13764 { "fdivr", { ST, STi }, 0 },
13768 { "fld", { STi }, 0 },
13769 { "fxch", { STi }, 0 },
13779 { "fcmovb", { ST, STi }, 0 },
13780 { "fcmove", { ST, STi }, 0 },
13781 { "fcmovbe",{ ST, STi }, 0 },
13782 { "fcmovu", { ST, STi }, 0 },
13790 { "fcmovnb",{ ST, STi }, 0 },
13791 { "fcmovne",{ ST, STi }, 0 },
13792 { "fcmovnbe",{ ST, STi }, 0 },
13793 { "fcmovnu",{ ST, STi }, 0 },
13795 { "fucomi", { ST, STi }, 0 },
13796 { "fcomi", { ST, STi }, 0 },
13801 { "fadd", { STi, ST }, 0 },
13802 { "fmul", { STi, ST }, 0 },
13805 { "fsub{!M|r}", { STi, ST }, 0 },
13806 { "fsub{M|}", { STi, ST }, 0 },
13807 { "fdiv{!M|r}", { STi, ST }, 0 },
13808 { "fdiv{M|}", { STi, ST }, 0 },
13812 { "ffree", { STi }, 0 },
13814 { "fst", { STi }, 0 },
13815 { "fstp", { STi }, 0 },
13816 { "fucom", { STi }, 0 },
13817 { "fucomp", { STi }, 0 },
13823 { "faddp", { STi, ST }, 0 },
13824 { "fmulp", { STi, ST }, 0 },
13827 { "fsub{!M|r}p", { STi, ST }, 0 },
13828 { "fsub{M|}p", { STi, ST }, 0 },
13829 { "fdiv{!M|r}p", { STi, ST }, 0 },
13830 { "fdiv{M|}p", { STi, ST }, 0 },
13834 { "ffreep", { STi }, 0 },
13839 { "fucomip", { ST, STi }, 0 },
13840 { "fcomip", { ST, STi }, 0 },
13845 static char *fgrps[][8] = {
13848 "(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13853 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13858 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
13863 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
13868 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
13873 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
13878 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13883 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
13884 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
13889 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13894 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13899 swap_operand (void)
13901 mnemonicendp[0] = '.';
13902 mnemonicendp[1] = 's';
13907 OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
13908 int sizeflag ATTRIBUTE_UNUSED)
13910 /* Skip mod/rm byte. */
13916 dofloat (int sizeflag)
13918 const struct dis386 *dp;
13919 unsigned char floatop;
13921 floatop = codep[-1];
13923 if (modrm.mod != 3)
13925 int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
13927 putop (float_mem[fp_indx], sizeflag);
13930 OP_E (float_mem_mode[fp_indx], sizeflag);
13933 /* Skip mod/rm byte. */
13937 dp = &float_reg[floatop - 0xd8][modrm.reg];
13938 if (dp->name == NULL)
13940 putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
13942 /* Instruction fnstsw is only one with strange arg. */
13943 if (floatop == 0xdf && codep[-1] == 0xe0)
13944 strcpy (op_out[0], names16[0]);
13948 putop (dp->name, sizeflag);
13953 (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
13958 (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
13962 /* Like oappend (below), but S is a string starting with '%'.
13963 In Intel syntax, the '%' is elided. */
13965 oappend_maybe_intel (const char *s)
13967 oappend (s + intel_syntax);
13971 OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
13973 oappend_maybe_intel ("%st");
13977 OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
13979 sprintf (scratchbuf, "%%st(%d)", modrm.rm);
13980 oappend_maybe_intel (scratchbuf);
13983 /* Capital letters in template are macros. */
13985 putop (const char *in_template, int sizeflag)
13990 unsigned int l = 0, len = 1;
13993 #define SAVE_LAST(c) \
13994 if (l < len && l < sizeof (last)) \
13999 for (p = in_template; *p; p++)
14015 while (*++p != '|')
14016 if (*p == '}' || *p == '\0')
14019 /* Fall through. */
14024 while (*++p != '}')
14035 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
14039 if (l == 0 && len == 1)
14044 if (sizeflag & SUFFIX_ALWAYS)
14057 if (address_mode == mode_64bit
14058 && !(prefixes & PREFIX_ADDR))
14069 if (intel_syntax && !alt)
14071 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
14073 if (sizeflag & DFLAG)
14074 *obufp++ = intel_syntax ? 'd' : 'l';
14076 *obufp++ = intel_syntax ? 'w' : 's';
14077 used_prefixes |= (prefixes & PREFIX_DATA);
14081 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
14084 if (modrm.mod == 3)
14090 if (sizeflag & DFLAG)
14091 *obufp++ = intel_syntax ? 'd' : 'l';
14094 used_prefixes |= (prefixes & PREFIX_DATA);
14100 case 'E': /* For jcxz/jecxz */
14101 if (address_mode == mode_64bit)
14103 if (sizeflag & AFLAG)
14109 if (sizeflag & AFLAG)
14111 used_prefixes |= (prefixes & PREFIX_ADDR);
14116 if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
14118 if (sizeflag & AFLAG)
14119 *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
14121 *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
14122 used_prefixes |= (prefixes & PREFIX_ADDR);
14126 if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
14128 if ((rex & REX_W) || (sizeflag & DFLAG))
14132 if (!(rex & REX_W))
14133 used_prefixes |= (prefixes & PREFIX_DATA);
14138 if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
14139 || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
14141 used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
14144 if (prefixes & PREFIX_DS)
14163 if (l != 0 || len != 1)
14165 if (l != 1 || len != 2 || last[0] != 'X')
14170 if (!need_vex || !vex.evex)
14173 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
14175 switch (vex.length)
14193 if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
14198 /* Fall through. */
14201 if (l != 0 || len != 1)
14209 if (sizeflag & SUFFIX_ALWAYS)
14213 if (intel_mnemonic != cond)
14217 if ((prefixes & PREFIX_FWAIT) == 0)
14220 used_prefixes |= PREFIX_FWAIT;
14226 else if (intel_syntax && (sizeflag & DFLAG))
14230 if (!(rex & REX_W))
14231 used_prefixes |= (prefixes & PREFIX_DATA);
14235 && address_mode == mode_64bit
14236 && isa64 == intel64)
14241 /* Fall through. */
14244 && address_mode == mode_64bit
14245 && ((sizeflag & DFLAG) || (rex & REX_W)))
14250 /* Fall through. */
14253 if (l == 0 && len == 1)
14258 if ((rex & REX_W) == 0
14259 && (prefixes & PREFIX_DATA))
14261 if ((sizeflag & DFLAG) == 0)
14263 used_prefixes |= (prefixes & PREFIX_DATA);
14267 if ((prefixes & PREFIX_DATA)
14269 || (sizeflag & SUFFIX_ALWAYS))
14276 if (sizeflag & DFLAG)
14280 used_prefixes |= (prefixes & PREFIX_DATA);
14286 if (l != 1 || len != 2 || last[0] != 'L')
14292 if ((prefixes & PREFIX_DATA)
14294 || (sizeflag & SUFFIX_ALWAYS))
14301 if (sizeflag & DFLAG)
14302 *obufp++ = intel_syntax ? 'd' : 'l';
14305 used_prefixes |= (prefixes & PREFIX_DATA);
14313 if (address_mode == mode_64bit
14314 && ((sizeflag & DFLAG) || (rex & REX_W)))
14316 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
14320 /* Fall through. */
14323 if (l == 0 && len == 1)
14326 if (intel_syntax && !alt)
14329 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
14335 if (sizeflag & DFLAG)
14336 *obufp++ = intel_syntax ? 'd' : 'l';
14339 used_prefixes |= (prefixes & PREFIX_DATA);
14345 if (l != 1 || len != 2 || last[0] != 'L')
14351 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
14366 else if (sizeflag & DFLAG)
14375 if (intel_syntax && !p[1]
14376 && ((rex & REX_W) || (sizeflag & DFLAG)))
14378 if (!(rex & REX_W))
14379 used_prefixes |= (prefixes & PREFIX_DATA);
14382 if (l == 0 && len == 1)
14386 if (address_mode == mode_64bit
14387 && ((sizeflag & DFLAG) || (rex & REX_W)))
14389 if (sizeflag & SUFFIX_ALWAYS)
14411 /* Fall through. */
14414 if (l == 0 && len == 1)
14419 if (sizeflag & SUFFIX_ALWAYS)
14425 if (sizeflag & DFLAG)
14429 used_prefixes |= (prefixes & PREFIX_DATA);
14443 if (address_mode == mode_64bit
14444 && !(prefixes & PREFIX_ADDR))
14455 if (l != 0 || len != 1)
14460 if (need_vex && vex.prefix)
14462 if (vex.prefix == DATA_PREFIX_OPCODE)
14469 if (prefixes & PREFIX_DATA)
14473 used_prefixes |= (prefixes & PREFIX_DATA);
14477 if (l == 0 && len == 1)
14481 if (l != 1 || len != 2 || last[0] != 'X')
14489 || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
14491 switch (vex.length)
14507 if (l == 0 && len == 1)
14509 /* operand size flag for cwtl, cbtw */
14518 else if (sizeflag & DFLAG)
14522 if (!(rex & REX_W))
14523 used_prefixes |= (prefixes & PREFIX_DATA);
14530 && last[0] != 'L'))
14537 if (last[0] == 'X')
14538 *obufp++ = vex.w ? 'd': 's';
14540 *obufp++ = vex.w ? 'q': 'd';
14546 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
14548 if (sizeflag & DFLAG)
14552 used_prefixes |= (prefixes & PREFIX_DATA);
14558 if (address_mode == mode_64bit
14559 && (isa64 == intel64
14560 || ((sizeflag & DFLAG) || (rex & REX_W))))
14562 else if ((prefixes & PREFIX_DATA))
14564 if (!(sizeflag & DFLAG))
14566 used_prefixes |= (prefixes & PREFIX_DATA);
14573 mnemonicendp = obufp;
14578 oappend (const char *s)
14580 obufp = stpcpy (obufp, s);
14586 /* Only print the active segment register. */
14587 if (!active_seg_prefix)
14590 used_prefixes |= active_seg_prefix;
14591 switch (active_seg_prefix)
14594 oappend_maybe_intel ("%cs:");
14597 oappend_maybe_intel ("%ds:");
14600 oappend_maybe_intel ("%ss:");
14603 oappend_maybe_intel ("%es:");
14606 oappend_maybe_intel ("%fs:");
14609 oappend_maybe_intel ("%gs:");
14617 OP_indirE (int bytemode, int sizeflag)
14621 OP_E (bytemode, sizeflag);
14625 print_operand_value (char *buf, int hex, bfd_vma disp)
14627 if (address_mode == mode_64bit)
14635 sprintf_vma (tmp, disp);
14636 for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
14637 strcpy (buf + 2, tmp + i);
14641 bfd_signed_vma v = disp;
14648 /* Check for possible overflow on 0x8000000000000000. */
14651 strcpy (buf, "9223372036854775808");
14665 tmp[28 - i] = (v % 10) + '0';
14669 strcpy (buf, tmp + 29 - i);
14675 sprintf (buf, "0x%x", (unsigned int) disp);
14677 sprintf (buf, "%d", (int) disp);
14681 /* Put DISP in BUF as signed hex number. */
14684 print_displacement (char *buf, bfd_vma disp)
14686 bfd_signed_vma val = disp;
14695 /* Check for possible overflow. */
14698 switch (address_mode)
14701 strcpy (buf + j, "0x8000000000000000");
14704 strcpy (buf + j, "0x80000000");
14707 strcpy (buf + j, "0x8000");
14717 sprintf_vma (tmp, (bfd_vma) val);
14718 for (i = 0; tmp[i] == '0'; i++)
14720 if (tmp[i] == '\0')
14722 strcpy (buf + j, tmp + i);
14726 intel_operand_size (int bytemode, int sizeflag)
14730 && (bytemode == x_mode
14731 || bytemode == evex_half_bcst_xmmq_mode))
14734 oappend ("QWORD PTR ");
14736 oappend ("DWORD PTR ");
14745 oappend ("BYTE PTR ");
14750 oappend ("WORD PTR ");
14753 if (address_mode == mode_64bit && isa64 == intel64)
14755 oappend ("QWORD PTR ");
14758 /* Fall through. */
14760 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
14762 oappend ("QWORD PTR ");
14765 /* Fall through. */
14771 oappend ("QWORD PTR ");
14774 if ((sizeflag & DFLAG) || bytemode == dq_mode)
14775 oappend ("DWORD PTR ");
14777 oappend ("WORD PTR ");
14778 used_prefixes |= (prefixes & PREFIX_DATA);
14782 if ((rex & REX_W) || (sizeflag & DFLAG))
14784 oappend ("WORD PTR ");
14785 if (!(rex & REX_W))
14786 used_prefixes |= (prefixes & PREFIX_DATA);
14789 if (sizeflag & DFLAG)
14790 oappend ("QWORD PTR ");
14792 oappend ("DWORD PTR ");
14793 used_prefixes |= (prefixes & PREFIX_DATA);
14796 case d_scalar_mode:
14797 case d_scalar_swap_mode:
14800 oappend ("DWORD PTR ");
14803 case q_scalar_mode:
14804 case q_scalar_swap_mode:
14806 oappend ("QWORD PTR ");
14809 if (address_mode == mode_64bit)
14810 oappend ("QWORD PTR ");
14812 oappend ("DWORD PTR ");
14815 if (sizeflag & DFLAG)
14816 oappend ("FWORD PTR ");
14818 oappend ("DWORD PTR ");
14819 used_prefixes |= (prefixes & PREFIX_DATA);
14822 oappend ("TBYTE PTR ");
14826 case evex_x_gscat_mode:
14827 case evex_x_nobcst_mode:
14828 case b_scalar_mode:
14829 case w_scalar_mode:
14832 switch (vex.length)
14835 oappend ("XMMWORD PTR ");
14838 oappend ("YMMWORD PTR ");
14841 oappend ("ZMMWORD PTR ");
14848 oappend ("XMMWORD PTR ");
14851 oappend ("XMMWORD PTR ");
14854 oappend ("YMMWORD PTR ");
14857 case evex_half_bcst_xmmq_mode:
14861 switch (vex.length)
14864 oappend ("QWORD PTR ");
14867 oappend ("XMMWORD PTR ");
14870 oappend ("YMMWORD PTR ");
14880 switch (vex.length)
14885 oappend ("BYTE PTR ");
14895 switch (vex.length)
14900 oappend ("WORD PTR ");
14910 switch (vex.length)
14915 oappend ("DWORD PTR ");
14925 switch (vex.length)
14930 oappend ("QWORD PTR ");
14940 switch (vex.length)
14943 oappend ("WORD PTR ");
14946 oappend ("DWORD PTR ");
14949 oappend ("QWORD PTR ");
14959 switch (vex.length)
14962 oappend ("DWORD PTR ");
14965 oappend ("QWORD PTR ");
14968 oappend ("XMMWORD PTR ");
14978 switch (vex.length)
14981 oappend ("QWORD PTR ");
14984 oappend ("YMMWORD PTR ");
14987 oappend ("ZMMWORD PTR ");
14997 switch (vex.length)
15001 oappend ("XMMWORD PTR ");
15008 oappend ("OWORD PTR ");
15011 case vex_w_dq_mode:
15012 case vex_scalar_w_dq_mode:
15017 oappend ("QWORD PTR ");
15019 oappend ("DWORD PTR ");
15021 case vex_vsib_d_w_dq_mode:
15022 case vex_vsib_q_w_dq_mode:
15029 oappend ("QWORD PTR ");
15031 oappend ("DWORD PTR ");
15035 switch (vex.length)
15038 oappend ("XMMWORD PTR ");
15041 oappend ("YMMWORD PTR ");
15044 oappend ("ZMMWORD PTR ");
15051 case vex_vsib_q_w_d_mode:
15052 case vex_vsib_d_w_d_mode:
15053 if (!need_vex || !vex.evex)
15056 switch (vex.length)
15059 oappend ("QWORD PTR ");
15062 oappend ("XMMWORD PTR ");
15065 oappend ("YMMWORD PTR ");
15073 if (!need_vex || vex.length != 128)
15076 oappend ("DWORD PTR ");
15078 oappend ("BYTE PTR ");
15084 oappend ("QWORD PTR ");
15086 oappend ("WORD PTR ");
15096 OP_E_register (int bytemode, int sizeflag)
15098 int reg = modrm.rm;
15099 const char **names;
15105 if ((sizeflag & SUFFIX_ALWAYS)
15106 && (bytemode == b_swap_mode
15107 || bytemode == bnd_swap_mode
15108 || bytemode == v_swap_mode))
15134 names = address_mode == mode_64bit ? names64 : names32;
15137 case bnd_swap_mode:
15146 if (address_mode == mode_64bit && isa64 == intel64)
15151 /* Fall through. */
15153 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
15159 /* Fall through. */
15171 if ((sizeflag & DFLAG)
15172 || (bytemode != v_mode
15173 && bytemode != v_swap_mode))
15177 used_prefixes |= (prefixes & PREFIX_DATA);
15181 names = (address_mode == mode_64bit
15182 ? names64 : names32);
15183 if (!(prefixes & PREFIX_ADDR))
15184 names = (address_mode == mode_16bit
15185 ? names16 : names);
15188 /* Remove "addr16/addr32". */
15189 all_prefixes[last_addr_prefix] = 0;
15190 names = (address_mode != mode_32bit
15191 ? names32 : names16);
15192 used_prefixes |= PREFIX_ADDR;
15202 names = names_mask;
15207 oappend (INTERNAL_DISASSEMBLER_ERROR);
15210 oappend (names[reg]);
15214 OP_E_memory (int bytemode, int sizeflag)
15217 int add = (rex & REX_B) ? 8 : 0;
15223 /* In EVEX, if operand doesn't allow broadcast, vex.b should be 0. */
15225 && bytemode != x_mode
15226 && bytemode != xmmq_mode
15227 && bytemode != evex_half_bcst_xmmq_mode)
15242 case vex_vsib_d_w_dq_mode:
15243 case vex_vsib_d_w_d_mode:
15244 case vex_vsib_q_w_dq_mode:
15245 case vex_vsib_q_w_d_mode:
15246 case evex_x_gscat_mode:
15248 shift = vex.w ? 3 : 2;
15251 case evex_half_bcst_xmmq_mode:
15255 shift = vex.w ? 3 : 2;
15258 /* Fall through. */
15262 case evex_x_nobcst_mode:
15264 switch (vex.length)
15287 case q_scalar_mode:
15289 case q_scalar_swap_mode:
15295 case d_scalar_mode:
15297 case d_scalar_swap_mode:
15300 case w_scalar_mode:
15304 case b_scalar_mode:
15311 /* Make necessary corrections to shift for modes that need it.
15312 For these modes we currently have shift 4, 5 or 6 depending on
15313 vex.length (it corresponds to xmmword, ymmword or zmmword
15314 operand). We might want to make it 3, 4 or 5 (e.g. for
15315 xmmq_mode). In case of broadcast enabled the corrections
15316 aren't needed, as element size is always 32 or 64 bits. */
15318 && (bytemode == xmmq_mode
15319 || bytemode == evex_half_bcst_xmmq_mode))
15321 else if (bytemode == xmmqd_mode)
15323 else if (bytemode == xmmdw_mode)
15325 else if (bytemode == ymmq_mode && vex.length == 128)
15333 intel_operand_size (bytemode, sizeflag);
15336 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
15338 /* 32/64 bit address mode */
15348 int addr32flag = !((sizeflag & AFLAG)
15349 || bytemode == v_bnd_mode
15350 || bytemode == v_bndmk_mode
15351 || bytemode == bnd_mode
15352 || bytemode == bnd_swap_mode);
15353 const char **indexes64 = names64;
15354 const char **indexes32 = names32;
15364 vindex = sib.index;
15370 case vex_vsib_d_w_dq_mode:
15371 case vex_vsib_d_w_d_mode:
15372 case vex_vsib_q_w_dq_mode:
15373 case vex_vsib_q_w_d_mode:
15383 switch (vex.length)
15386 indexes64 = indexes32 = names_xmm;
15390 || bytemode == vex_vsib_q_w_dq_mode
15391 || bytemode == vex_vsib_q_w_d_mode)
15392 indexes64 = indexes32 = names_ymm;
15394 indexes64 = indexes32 = names_xmm;
15398 || bytemode == vex_vsib_q_w_dq_mode
15399 || bytemode == vex_vsib_q_w_d_mode)
15400 indexes64 = indexes32 = names_zmm;
15402 indexes64 = indexes32 = names_ymm;
15409 haveindex = vindex != 4;
15416 rbase = base + add;
15424 if (address_mode == mode_64bit && !havesib)
15427 if (riprel && bytemode == v_bndmk_mode)
15435 FETCH_DATA (the_info, codep + 1);
15437 if ((disp & 0x80) != 0)
15439 if (vex.evex && shift > 0)
15452 && address_mode != mode_16bit)
15454 if (address_mode == mode_64bit)
15456 /* Display eiz instead of addr32. */
15457 needindex = addr32flag;
15462 /* In 32-bit mode, we need index register to tell [offset]
15463 from [eiz*1 + offset]. */
15468 havedisp = (havebase
15470 || (havesib && (haveindex || scale != 0)));
15473 if (modrm.mod != 0 || base == 5)
15475 if (havedisp || riprel)
15476 print_displacement (scratchbuf, disp);
15478 print_operand_value (scratchbuf, 1, disp);
15479 oappend (scratchbuf);
15483 oappend (!addr32flag ? "(%rip)" : "(%eip)");
15487 if ((havebase || haveindex || needaddr32 || riprel)
15488 && (bytemode != v_bnd_mode)
15489 && (bytemode != v_bndmk_mode)
15490 && (bytemode != bnd_mode)
15491 && (bytemode != bnd_swap_mode))
15492 used_prefixes |= PREFIX_ADDR;
15494 if (havedisp || (intel_syntax && riprel))
15496 *obufp++ = open_char;
15497 if (intel_syntax && riprel)
15500 oappend (!addr32flag ? "rip" : "eip");
15504 oappend (address_mode == mode_64bit && !addr32flag
15505 ? names64[rbase] : names32[rbase]);
15508 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
15509 print index to tell base + index from base. */
15513 || (havebase && base != ESP_REG_NUM))
15515 if (!intel_syntax || havebase)
15517 *obufp++ = separator_char;
15521 oappend (address_mode == mode_64bit && !addr32flag
15522 ? indexes64[vindex] : indexes32[vindex]);
15524 oappend (address_mode == mode_64bit && !addr32flag
15525 ? index64 : index32);
15527 *obufp++ = scale_char;
15529 sprintf (scratchbuf, "%d", 1 << scale);
15530 oappend (scratchbuf);
15534 && (disp || modrm.mod != 0 || base == 5))
15536 if (!havedisp || (bfd_signed_vma) disp >= 0)
15541 else if (modrm.mod != 1 && disp != -disp)
15545 disp = - (bfd_signed_vma) disp;
15549 print_displacement (scratchbuf, disp);
15551 print_operand_value (scratchbuf, 1, disp);
15552 oappend (scratchbuf);
15555 *obufp++ = close_char;
15558 else if (intel_syntax)
15560 if (modrm.mod != 0 || base == 5)
15562 if (!active_seg_prefix)
15564 oappend (names_seg[ds_reg - es_reg]);
15567 print_operand_value (scratchbuf, 1, disp);
15568 oappend (scratchbuf);
15574 /* 16 bit address mode */
15575 used_prefixes |= prefixes & PREFIX_ADDR;
15582 if ((disp & 0x8000) != 0)
15587 FETCH_DATA (the_info, codep + 1);
15589 if ((disp & 0x80) != 0)
15591 if (vex.evex && shift > 0)
15596 if ((disp & 0x8000) != 0)
15602 if (modrm.mod != 0 || modrm.rm == 6)
15604 print_displacement (scratchbuf, disp);
15605 oappend (scratchbuf);
15608 if (modrm.mod != 0 || modrm.rm != 6)
15610 *obufp++ = open_char;
15612 oappend (index16[modrm.rm]);
15614 && (disp || modrm.mod != 0 || modrm.rm == 6))
15616 if ((bfd_signed_vma) disp >= 0)
15621 else if (modrm.mod != 1)
15625 disp = - (bfd_signed_vma) disp;
15628 print_displacement (scratchbuf, disp);
15629 oappend (scratchbuf);
15632 *obufp++ = close_char;
15635 else if (intel_syntax)
15637 if (!active_seg_prefix)
15639 oappend (names_seg[ds_reg - es_reg]);
15642 print_operand_value (scratchbuf, 1, disp & 0xffff);
15643 oappend (scratchbuf);
15646 if (vex.evex && vex.b
15647 && (bytemode == x_mode
15648 || bytemode == xmmq_mode
15649 || bytemode == evex_half_bcst_xmmq_mode))
15652 || bytemode == xmmq_mode
15653 || bytemode == evex_half_bcst_xmmq_mode)
15655 switch (vex.length)
15658 oappend ("{1to2}");
15661 oappend ("{1to4}");
15664 oappend ("{1to8}");
15672 switch (vex.length)
15675 oappend ("{1to4}");
15678 oappend ("{1to8}");
15681 oappend ("{1to16}");
15691 OP_E (int bytemode, int sizeflag)
15693 /* Skip mod/rm byte. */
15697 if (modrm.mod == 3)
15698 OP_E_register (bytemode, sizeflag);
15700 OP_E_memory (bytemode, sizeflag);
15704 OP_G (int bytemode, int sizeflag)
15707 const char **names;
15716 oappend (names8rex[modrm.reg + add]);
15718 oappend (names8[modrm.reg + add]);
15721 oappend (names16[modrm.reg + add]);
15726 oappend (names32[modrm.reg + add]);
15729 oappend (names64[modrm.reg + add]);
15732 if (modrm.reg > 0x3)
15737 oappend (names_bnd[modrm.reg]);
15746 oappend (names64[modrm.reg + add]);
15749 if ((sizeflag & DFLAG) || bytemode != v_mode)
15750 oappend (names32[modrm.reg + add]);
15752 oappend (names16[modrm.reg + add]);
15753 used_prefixes |= (prefixes & PREFIX_DATA);
15757 names = (address_mode == mode_64bit
15758 ? names64 : names32);
15759 if (!(prefixes & PREFIX_ADDR))
15761 if (address_mode == mode_16bit)
15766 /* Remove "addr16/addr32". */
15767 all_prefixes[last_addr_prefix] = 0;
15768 names = (address_mode != mode_32bit
15769 ? names32 : names16);
15770 used_prefixes |= PREFIX_ADDR;
15772 oappend (names[modrm.reg + add]);
15775 if (address_mode == mode_64bit)
15776 oappend (names64[modrm.reg + add]);
15778 oappend (names32[modrm.reg + add]);
15782 if ((modrm.reg + add) > 0x7)
15787 oappend (names_mask[modrm.reg + add]);
15790 oappend (INTERNAL_DISASSEMBLER_ERROR);
15803 FETCH_DATA (the_info, codep + 8);
15804 a = *codep++ & 0xff;
15805 a |= (*codep++ & 0xff) << 8;
15806 a |= (*codep++ & 0xff) << 16;
15807 a |= (*codep++ & 0xffu) << 24;
15808 b = *codep++ & 0xff;
15809 b |= (*codep++ & 0xff) << 8;
15810 b |= (*codep++ & 0xff) << 16;
15811 b |= (*codep++ & 0xffu) << 24;
15812 x = a + ((bfd_vma) b << 32);
15820 static bfd_signed_vma
15823 bfd_signed_vma x = 0;
15825 FETCH_DATA (the_info, codep + 4);
15826 x = *codep++ & (bfd_signed_vma) 0xff;
15827 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
15828 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
15829 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
15833 static bfd_signed_vma
15836 bfd_signed_vma x = 0;
15838 FETCH_DATA (the_info, codep + 4);
15839 x = *codep++ & (bfd_signed_vma) 0xff;
15840 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
15841 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
15842 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
15844 x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
15854 FETCH_DATA (the_info, codep + 2);
15855 x = *codep++ & 0xff;
15856 x |= (*codep++ & 0xff) << 8;
15861 set_op (bfd_vma op, int riprel)
15863 op_index[op_ad] = op_ad;
15864 if (address_mode == mode_64bit)
15866 op_address[op_ad] = op;
15867 op_riprel[op_ad] = riprel;
15871 /* Mask to get a 32-bit address. */
15872 op_address[op_ad] = op & 0xffffffff;
15873 op_riprel[op_ad] = riprel & 0xffffffff;
15878 OP_REG (int code, int sizeflag)
15885 case es_reg: case ss_reg: case cs_reg:
15886 case ds_reg: case fs_reg: case gs_reg:
15887 oappend (names_seg[code - es_reg]);
15899 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
15900 case sp_reg: case bp_reg: case si_reg: case di_reg:
15901 s = names16[code - ax_reg + add];
15903 case al_reg: case ah_reg: case cl_reg: case ch_reg:
15904 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
15907 s = names8rex[code - al_reg + add];
15909 s = names8[code - al_reg];
15911 case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
15912 case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
15913 if (address_mode == mode_64bit
15914 && ((sizeflag & DFLAG) || (rex & REX_W)))
15916 s = names64[code - rAX_reg + add];
15919 code += eAX_reg - rAX_reg;
15920 /* Fall through. */
15921 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
15922 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
15925 s = names64[code - eAX_reg + add];
15928 if (sizeflag & DFLAG)
15929 s = names32[code - eAX_reg + add];
15931 s = names16[code - eAX_reg + add];
15932 used_prefixes |= (prefixes & PREFIX_DATA);
15936 s = INTERNAL_DISASSEMBLER_ERROR;
15943 OP_IMREG (int code, int sizeflag)
15955 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
15956 case sp_reg: case bp_reg: case si_reg: case di_reg:
15957 s = names16[code - ax_reg];
15959 case es_reg: case ss_reg: case cs_reg:
15960 case ds_reg: case fs_reg: case gs_reg:
15961 s = names_seg[code - es_reg];
15963 case al_reg: case ah_reg: case cl_reg: case ch_reg:
15964 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
15967 s = names8rex[code - al_reg];
15969 s = names8[code - al_reg];
15971 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
15972 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
15975 s = names64[code - eAX_reg];
15978 if (sizeflag & DFLAG)
15979 s = names32[code - eAX_reg];
15981 s = names16[code - eAX_reg];
15982 used_prefixes |= (prefixes & PREFIX_DATA);
15985 case z_mode_ax_reg:
15986 if ((rex & REX_W) || (sizeflag & DFLAG))
15990 if (!(rex & REX_W))
15991 used_prefixes |= (prefixes & PREFIX_DATA);
15994 s = INTERNAL_DISASSEMBLER_ERROR;
16001 OP_I (int bytemode, int sizeflag)
16004 bfd_signed_vma mask = -1;
16009 FETCH_DATA (the_info, codep + 1);
16014 if (address_mode == mode_64bit)
16019 /* Fall through. */
16026 if (sizeflag & DFLAG)
16036 used_prefixes |= (prefixes & PREFIX_DATA);
16048 oappend (INTERNAL_DISASSEMBLER_ERROR);
16053 scratchbuf[0] = '$';
16054 print_operand_value (scratchbuf + 1, 1, op);
16055 oappend_maybe_intel (scratchbuf);
16056 scratchbuf[0] = '\0';
16060 OP_I64 (int bytemode, int sizeflag)
16063 bfd_signed_vma mask = -1;
16065 if (address_mode != mode_64bit)
16067 OP_I (bytemode, sizeflag);
16074 FETCH_DATA (the_info, codep + 1);
16084 if (sizeflag & DFLAG)
16094 used_prefixes |= (prefixes & PREFIX_DATA);
16102 oappend (INTERNAL_DISASSEMBLER_ERROR);
16107 scratchbuf[0] = '$';
16108 print_operand_value (scratchbuf + 1, 1, op);
16109 oappend_maybe_intel (scratchbuf);
16110 scratchbuf[0] = '\0';
16114 OP_sI (int bytemode, int sizeflag)
16122 FETCH_DATA (the_info, codep + 1);
16124 if ((op & 0x80) != 0)
16126 if (bytemode == b_T_mode)
16128 if (address_mode != mode_64bit
16129 || !((sizeflag & DFLAG) || (rex & REX_W)))
16131 /* The operand-size prefix is overridden by a REX prefix. */
16132 if ((sizeflag & DFLAG) || (rex & REX_W))
16140 if (!(rex & REX_W))
16142 if (sizeflag & DFLAG)
16150 /* The operand-size prefix is overridden by a REX prefix. */
16151 if ((sizeflag & DFLAG) || (rex & REX_W))
16157 oappend (INTERNAL_DISASSEMBLER_ERROR);
16161 scratchbuf[0] = '$';
16162 print_operand_value (scratchbuf + 1, 1, op);
16163 oappend_maybe_intel (scratchbuf);
16167 OP_J (int bytemode, int sizeflag)
16171 bfd_vma segment = 0;
16176 FETCH_DATA (the_info, codep + 1);
16178 if ((disp & 0x80) != 0)
16182 if (isa64 == amd64)
16184 if ((sizeflag & DFLAG)
16185 || (address_mode == mode_64bit
16186 && (isa64 != amd64 || (rex & REX_W))))
16191 if ((disp & 0x8000) != 0)
16193 /* In 16bit mode, address is wrapped around at 64k within
16194 the same segment. Otherwise, a data16 prefix on a jump
16195 instruction means that the pc is masked to 16 bits after
16196 the displacement is added! */
16198 if ((prefixes & PREFIX_DATA) == 0)
16199 segment = ((start_pc + (codep - start_codep))
16200 & ~((bfd_vma) 0xffff));
16202 if (address_mode != mode_64bit
16203 || (isa64 == amd64 && !(rex & REX_W)))
16204 used_prefixes |= (prefixes & PREFIX_DATA);
16207 oappend (INTERNAL_DISASSEMBLER_ERROR);
16210 disp = ((start_pc + (codep - start_codep) + disp) & mask) | segment;
16212 print_operand_value (scratchbuf, 1, disp);
16213 oappend (scratchbuf);
16217 OP_SEG (int bytemode, int sizeflag)
16219 if (bytemode == w_mode)
16220 oappend (names_seg[modrm.reg]);
16222 OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
16226 OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
16230 if (sizeflag & DFLAG)
16240 used_prefixes |= (prefixes & PREFIX_DATA);
16242 sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
16244 sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
16245 oappend (scratchbuf);
16249 OP_OFF (int bytemode, int sizeflag)
16253 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
16254 intel_operand_size (bytemode, sizeflag);
16257 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
16264 if (!active_seg_prefix)
16266 oappend (names_seg[ds_reg - es_reg]);
16270 print_operand_value (scratchbuf, 1, off);
16271 oappend (scratchbuf);
16275 OP_OFF64 (int bytemode, int sizeflag)
16279 if (address_mode != mode_64bit
16280 || (prefixes & PREFIX_ADDR))
16282 OP_OFF (bytemode, sizeflag);
16286 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
16287 intel_operand_size (bytemode, sizeflag);
16294 if (!active_seg_prefix)
16296 oappend (names_seg[ds_reg - es_reg]);
16300 print_operand_value (scratchbuf, 1, off);
16301 oappend (scratchbuf);
16305 ptr_reg (int code, int sizeflag)
16309 *obufp++ = open_char;
16310 used_prefixes |= (prefixes & PREFIX_ADDR);
16311 if (address_mode == mode_64bit)
16313 if (!(sizeflag & AFLAG))
16314 s = names32[code - eAX_reg];
16316 s = names64[code - eAX_reg];
16318 else if (sizeflag & AFLAG)
16319 s = names32[code - eAX_reg];
16321 s = names16[code - eAX_reg];
16323 *obufp++ = close_char;
16328 OP_ESreg (int code, int sizeflag)
16334 case 0x6d: /* insw/insl */
16335 intel_operand_size (z_mode, sizeflag);
16337 case 0xa5: /* movsw/movsl/movsq */
16338 case 0xa7: /* cmpsw/cmpsl/cmpsq */
16339 case 0xab: /* stosw/stosl */
16340 case 0xaf: /* scasw/scasl */
16341 intel_operand_size (v_mode, sizeflag);
16344 intel_operand_size (b_mode, sizeflag);
16347 oappend_maybe_intel ("%es:");
16348 ptr_reg (code, sizeflag);
16352 OP_DSreg (int code, int sizeflag)
16358 case 0x6f: /* outsw/outsl */
16359 intel_operand_size (z_mode, sizeflag);
16361 case 0xa5: /* movsw/movsl/movsq */
16362 case 0xa7: /* cmpsw/cmpsl/cmpsq */
16363 case 0xad: /* lodsw/lodsl/lodsq */
16364 intel_operand_size (v_mode, sizeflag);
16367 intel_operand_size (b_mode, sizeflag);
16370 /* Set active_seg_prefix to PREFIX_DS if it is unset so that the
16371 default segment register DS is printed. */
16372 if (!active_seg_prefix)
16373 active_seg_prefix = PREFIX_DS;
16375 ptr_reg (code, sizeflag);
16379 OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16387 else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
16389 all_prefixes[last_lock_prefix] = 0;
16390 used_prefixes |= PREFIX_LOCK;
16395 sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
16396 oappend_maybe_intel (scratchbuf);
16400 OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16409 sprintf (scratchbuf, "db%d", modrm.reg + add);
16411 sprintf (scratchbuf, "%%db%d", modrm.reg + add);
16412 oappend (scratchbuf);
16416 OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16418 sprintf (scratchbuf, "%%tr%d", modrm.reg);
16419 oappend_maybe_intel (scratchbuf);
16423 OP_R (int bytemode, int sizeflag)
16425 /* Skip mod/rm byte. */
16428 OP_E_register (bytemode, sizeflag);
16432 OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16434 int reg = modrm.reg;
16435 const char **names;
16437 used_prefixes |= (prefixes & PREFIX_DATA);
16438 if (prefixes & PREFIX_DATA)
16447 oappend (names[reg]);
16451 OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16453 int reg = modrm.reg;
16454 const char **names;
16466 && bytemode != xmm_mode
16467 && bytemode != xmmq_mode
16468 && bytemode != evex_half_bcst_xmmq_mode
16469 && bytemode != ymm_mode
16470 && bytemode != scalar_mode)
16472 switch (vex.length)
16479 || (bytemode != vex_vsib_q_w_dq_mode
16480 && bytemode != vex_vsib_q_w_d_mode))
16492 else if (bytemode == xmmq_mode
16493 || bytemode == evex_half_bcst_xmmq_mode)
16495 switch (vex.length)
16508 else if (bytemode == ymm_mode)
16512 oappend (names[reg]);
16516 OP_EM (int bytemode, int sizeflag)
16519 const char **names;
16521 if (modrm.mod != 3)
16524 && (bytemode == v_mode || bytemode == v_swap_mode))
16526 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
16527 used_prefixes |= (prefixes & PREFIX_DATA);
16529 OP_E (bytemode, sizeflag);
16533 if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
16536 /* Skip mod/rm byte. */
16539 used_prefixes |= (prefixes & PREFIX_DATA);
16541 if (prefixes & PREFIX_DATA)
16550 oappend (names[reg]);
16553 /* cvt* are the only instructions in sse2 which have
16554 both SSE and MMX operands and also have 0x66 prefix
16555 in their opcode. 0x66 was originally used to differentiate
16556 between SSE and MMX instruction(operands). So we have to handle the
16557 cvt* separately using OP_EMC and OP_MXC */
16559 OP_EMC (int bytemode, int sizeflag)
16561 if (modrm.mod != 3)
16563 if (intel_syntax && bytemode == v_mode)
16565 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
16566 used_prefixes |= (prefixes & PREFIX_DATA);
16568 OP_E (bytemode, sizeflag);
16572 /* Skip mod/rm byte. */
16575 used_prefixes |= (prefixes & PREFIX_DATA);
16576 oappend (names_mm[modrm.rm]);
16580 OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16582 used_prefixes |= (prefixes & PREFIX_DATA);
16583 oappend (names_mm[modrm.reg]);
16587 OP_EX (int bytemode, int sizeflag)
16590 const char **names;
16592 /* Skip mod/rm byte. */
16596 if (modrm.mod != 3)
16598 OP_E_memory (bytemode, sizeflag);
16613 if ((sizeflag & SUFFIX_ALWAYS)
16614 && (bytemode == x_swap_mode
16615 || bytemode == d_swap_mode
16616 || bytemode == d_scalar_swap_mode
16617 || bytemode == q_swap_mode
16618 || bytemode == q_scalar_swap_mode))
16622 && bytemode != xmm_mode
16623 && bytemode != xmmdw_mode
16624 && bytemode != xmmqd_mode
16625 && bytemode != xmm_mb_mode
16626 && bytemode != xmm_mw_mode
16627 && bytemode != xmm_md_mode
16628 && bytemode != xmm_mq_mode
16629 && bytemode != xmm_mdq_mode
16630 && bytemode != xmmq_mode
16631 && bytemode != evex_half_bcst_xmmq_mode
16632 && bytemode != ymm_mode
16633 && bytemode != d_scalar_mode
16634 && bytemode != d_scalar_swap_mode
16635 && bytemode != q_scalar_mode
16636 && bytemode != q_scalar_swap_mode
16637 && bytemode != vex_scalar_w_dq_mode)
16639 switch (vex.length)
16654 else if (bytemode == xmmq_mode
16655 || bytemode == evex_half_bcst_xmmq_mode)
16657 switch (vex.length)
16670 else if (bytemode == ymm_mode)
16674 oappend (names[reg]);
16678 OP_MS (int bytemode, int sizeflag)
16680 if (modrm.mod == 3)
16681 OP_EM (bytemode, sizeflag);
16687 OP_XS (int bytemode, int sizeflag)
16689 if (modrm.mod == 3)
16690 OP_EX (bytemode, sizeflag);
16696 OP_M (int bytemode, int sizeflag)
16698 if (modrm.mod == 3)
16699 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
16702 OP_E (bytemode, sizeflag);
16706 OP_0f07 (int bytemode, int sizeflag)
16708 if (modrm.mod != 3 || modrm.rm != 0)
16711 OP_E (bytemode, sizeflag);
16714 /* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
16715 32bit mode and "xchg %rax,%rax" in 64bit mode. */
16718 NOP_Fixup1 (int bytemode, int sizeflag)
16720 if ((prefixes & PREFIX_DATA) != 0
16723 && address_mode == mode_64bit))
16724 OP_REG (bytemode, sizeflag);
16726 strcpy (obuf, "nop");
16730 NOP_Fixup2 (int bytemode, int sizeflag)
16732 if ((prefixes & PREFIX_DATA) != 0
16735 && address_mode == mode_64bit))
16736 OP_IMREG (bytemode, sizeflag);
16739 static const char *const Suffix3DNow[] = {
16740 /* 00 */ NULL, NULL, NULL, NULL,
16741 /* 04 */ NULL, NULL, NULL, NULL,
16742 /* 08 */ NULL, NULL, NULL, NULL,
16743 /* 0C */ "pi2fw", "pi2fd", NULL, NULL,
16744 /* 10 */ NULL, NULL, NULL, NULL,
16745 /* 14 */ NULL, NULL, NULL, NULL,
16746 /* 18 */ NULL, NULL, NULL, NULL,
16747 /* 1C */ "pf2iw", "pf2id", NULL, NULL,
16748 /* 20 */ NULL, NULL, NULL, NULL,
16749 /* 24 */ NULL, NULL, NULL, NULL,
16750 /* 28 */ NULL, NULL, NULL, NULL,
16751 /* 2C */ NULL, NULL, NULL, NULL,
16752 /* 30 */ NULL, NULL, NULL, NULL,
16753 /* 34 */ NULL, NULL, NULL, NULL,
16754 /* 38 */ NULL, NULL, NULL, NULL,
16755 /* 3C */ NULL, NULL, NULL, NULL,
16756 /* 40 */ NULL, NULL, NULL, NULL,
16757 /* 44 */ NULL, NULL, NULL, NULL,
16758 /* 48 */ NULL, NULL, NULL, NULL,
16759 /* 4C */ NULL, NULL, NULL, NULL,
16760 /* 50 */ NULL, NULL, NULL, NULL,
16761 /* 54 */ NULL, NULL, NULL, NULL,
16762 /* 58 */ NULL, NULL, NULL, NULL,
16763 /* 5C */ NULL, NULL, NULL, NULL,
16764 /* 60 */ NULL, NULL, NULL, NULL,
16765 /* 64 */ NULL, NULL, NULL, NULL,
16766 /* 68 */ NULL, NULL, NULL, NULL,
16767 /* 6C */ NULL, NULL, NULL, NULL,
16768 /* 70 */ NULL, NULL, NULL, NULL,
16769 /* 74 */ NULL, NULL, NULL, NULL,
16770 /* 78 */ NULL, NULL, NULL, NULL,
16771 /* 7C */ NULL, NULL, NULL, NULL,
16772 /* 80 */ NULL, NULL, NULL, NULL,
16773 /* 84 */ NULL, NULL, NULL, NULL,
16774 /* 88 */ NULL, NULL, "pfnacc", NULL,
16775 /* 8C */ NULL, NULL, "pfpnacc", NULL,
16776 /* 90 */ "pfcmpge", NULL, NULL, NULL,
16777 /* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
16778 /* 98 */ NULL, NULL, "pfsub", NULL,
16779 /* 9C */ NULL, NULL, "pfadd", NULL,
16780 /* A0 */ "pfcmpgt", NULL, NULL, NULL,
16781 /* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
16782 /* A8 */ NULL, NULL, "pfsubr", NULL,
16783 /* AC */ NULL, NULL, "pfacc", NULL,
16784 /* B0 */ "pfcmpeq", NULL, NULL, NULL,
16785 /* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
16786 /* B8 */ NULL, NULL, NULL, "pswapd",
16787 /* BC */ NULL, NULL, NULL, "pavgusb",
16788 /* C0 */ NULL, NULL, NULL, NULL,
16789 /* C4 */ NULL, NULL, NULL, NULL,
16790 /* C8 */ NULL, NULL, NULL, NULL,
16791 /* CC */ NULL, NULL, NULL, NULL,
16792 /* D0 */ NULL, NULL, NULL, NULL,
16793 /* D4 */ NULL, NULL, NULL, NULL,
16794 /* D8 */ NULL, NULL, NULL, NULL,
16795 /* DC */ NULL, NULL, NULL, NULL,
16796 /* E0 */ NULL, NULL, NULL, NULL,
16797 /* E4 */ NULL, NULL, NULL, NULL,
16798 /* E8 */ NULL, NULL, NULL, NULL,
16799 /* EC */ NULL, NULL, NULL, NULL,
16800 /* F0 */ NULL, NULL, NULL, NULL,
16801 /* F4 */ NULL, NULL, NULL, NULL,
16802 /* F8 */ NULL, NULL, NULL, NULL,
16803 /* FC */ NULL, NULL, NULL, NULL,
16807 OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16809 const char *mnemonic;
16811 FETCH_DATA (the_info, codep + 1);
16812 /* AMD 3DNow! instructions are specified by an opcode suffix in the
16813 place where an 8-bit immediate would normally go. ie. the last
16814 byte of the instruction. */
16815 obufp = mnemonicendp;
16816 mnemonic = Suffix3DNow[*codep++ & 0xff];
16818 oappend (mnemonic);
16821 /* Since a variable sized modrm/sib chunk is between the start
16822 of the opcode (0x0f0f) and the opcode suffix, we need to do
16823 all the modrm processing first, and don't know until now that
16824 we have a bad opcode. This necessitates some cleaning up. */
16825 op_out[0][0] = '\0';
16826 op_out[1][0] = '\0';
16829 mnemonicendp = obufp;
16832 static struct op simd_cmp_op[] =
16834 { STRING_COMMA_LEN ("eq") },
16835 { STRING_COMMA_LEN ("lt") },
16836 { STRING_COMMA_LEN ("le") },
16837 { STRING_COMMA_LEN ("unord") },
16838 { STRING_COMMA_LEN ("neq") },
16839 { STRING_COMMA_LEN ("nlt") },
16840 { STRING_COMMA_LEN ("nle") },
16841 { STRING_COMMA_LEN ("ord") }
16845 CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16847 unsigned int cmp_type;
16849 FETCH_DATA (the_info, codep + 1);
16850 cmp_type = *codep++ & 0xff;
16851 if (cmp_type < ARRAY_SIZE (simd_cmp_op))
16854 char *p = mnemonicendp - 2;
16858 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
16859 mnemonicendp += simd_cmp_op[cmp_type].len;
16863 /* We have a reserved extension byte. Output it directly. */
16864 scratchbuf[0] = '$';
16865 print_operand_value (scratchbuf + 1, 1, cmp_type);
16866 oappend_maybe_intel (scratchbuf);
16867 scratchbuf[0] = '\0';
16872 OP_Mwaitx (int bytemode ATTRIBUTE_UNUSED,
16873 int sizeflag ATTRIBUTE_UNUSED)
16875 /* mwaitx %eax,%ecx,%ebx */
16878 const char **names = (address_mode == mode_64bit
16879 ? names64 : names32);
16880 strcpy (op_out[0], names[0]);
16881 strcpy (op_out[1], names[1]);
16882 strcpy (op_out[2], names[3]);
16883 two_source_ops = 1;
16885 /* Skip mod/rm byte. */
16891 OP_Mwait (int bytemode ATTRIBUTE_UNUSED,
16892 int sizeflag ATTRIBUTE_UNUSED)
16894 /* mwait %eax,%ecx */
16897 const char **names = (address_mode == mode_64bit
16898 ? names64 : names32);
16899 strcpy (op_out[0], names[0]);
16900 strcpy (op_out[1], names[1]);
16901 two_source_ops = 1;
16903 /* Skip mod/rm byte. */
16909 OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
16910 int sizeflag ATTRIBUTE_UNUSED)
16912 /* monitor %eax,%ecx,%edx" */
16915 const char **op1_names;
16916 const char **names = (address_mode == mode_64bit
16917 ? names64 : names32);
16919 if (!(prefixes & PREFIX_ADDR))
16920 op1_names = (address_mode == mode_16bit
16921 ? names16 : names);
16924 /* Remove "addr16/addr32". */
16925 all_prefixes[last_addr_prefix] = 0;
16926 op1_names = (address_mode != mode_32bit
16927 ? names32 : names16);
16928 used_prefixes |= PREFIX_ADDR;
16930 strcpy (op_out[0], op1_names[0]);
16931 strcpy (op_out[1], names[1]);
16932 strcpy (op_out[2], names[2]);
16933 two_source_ops = 1;
16935 /* Skip mod/rm byte. */
16943 /* Throw away prefixes and 1st. opcode byte. */
16944 codep = insn_codep + 1;
16949 REP_Fixup (int bytemode, int sizeflag)
16951 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
16953 if (prefixes & PREFIX_REPZ)
16954 all_prefixes[last_repz_prefix] = REP_PREFIX;
16961 OP_IMREG (bytemode, sizeflag);
16964 OP_ESreg (bytemode, sizeflag);
16967 OP_DSreg (bytemode, sizeflag);
16975 /* For BND-prefixed instructions 0xF2 prefix should be displayed as
16979 BND_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16981 if (prefixes & PREFIX_REPNZ)
16982 all_prefixes[last_repnz_prefix] = BND_PREFIX;
16985 /* For NOTRACK-prefixed instructions, 0x3E prefix should be displayed as
16989 NOTRACK_Fixup (int bytemode ATTRIBUTE_UNUSED,
16990 int sizeflag ATTRIBUTE_UNUSED)
16992 if (active_seg_prefix == PREFIX_DS
16993 && (address_mode != mode_64bit || last_data_prefix < 0))
16995 /* NOTRACK prefix is only valid on indirect branch instructions.
16996 NB: DATA prefix is unsupported for Intel64. */
16997 active_seg_prefix = 0;
16998 all_prefixes[last_seg_prefix] = NOTRACK_PREFIX;
17002 /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
17003 "xacquire"/"xrelease" for memory operand if there is a LOCK prefix.
17007 HLE_Fixup1 (int bytemode, int sizeflag)
17010 && (prefixes & PREFIX_LOCK) != 0)
17012 if (prefixes & PREFIX_REPZ)
17013 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
17014 if (prefixes & PREFIX_REPNZ)
17015 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
17018 OP_E (bytemode, sizeflag);
17021 /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
17022 "xacquire"/"xrelease" for memory operand. No check for LOCK prefix.
17026 HLE_Fixup2 (int bytemode, int sizeflag)
17028 if (modrm.mod != 3)
17030 if (prefixes & PREFIX_REPZ)
17031 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
17032 if (prefixes & PREFIX_REPNZ)
17033 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
17036 OP_E (bytemode, sizeflag);
17039 /* Similar to OP_E. But the 0xf3 prefixes should be displayed as
17040 "xrelease" for memory operand. No check for LOCK prefix. */
17043 HLE_Fixup3 (int bytemode, int sizeflag)
17046 && last_repz_prefix > last_repnz_prefix
17047 && (prefixes & PREFIX_REPZ) != 0)
17048 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
17050 OP_E (bytemode, sizeflag);
17054 CMPXCHG8B_Fixup (int bytemode, int sizeflag)
17059 /* Change cmpxchg8b to cmpxchg16b. */
17060 char *p = mnemonicendp - 2;
17061 mnemonicendp = stpcpy (p, "16b");
17064 else if ((prefixes & PREFIX_LOCK) != 0)
17066 if (prefixes & PREFIX_REPZ)
17067 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
17068 if (prefixes & PREFIX_REPNZ)
17069 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
17072 OP_M (bytemode, sizeflag);
17076 XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
17078 const char **names;
17082 switch (vex.length)
17096 oappend (names[reg]);
17100 CRC32_Fixup (int bytemode, int sizeflag)
17102 /* Add proper suffix to "crc32". */
17103 char *p = mnemonicendp;
17122 if (sizeflag & DFLAG)
17126 used_prefixes |= (prefixes & PREFIX_DATA);
17130 oappend (INTERNAL_DISASSEMBLER_ERROR);
17137 if (modrm.mod == 3)
17141 /* Skip mod/rm byte. */
17146 add = (rex & REX_B) ? 8 : 0;
17147 if (bytemode == b_mode)
17151 oappend (names8rex[modrm.rm + add]);
17153 oappend (names8[modrm.rm + add]);
17159 oappend (names64[modrm.rm + add]);
17160 else if ((prefixes & PREFIX_DATA))
17161 oappend (names16[modrm.rm + add]);
17163 oappend (names32[modrm.rm + add]);
17167 OP_E (bytemode, sizeflag);
17171 FXSAVE_Fixup (int bytemode, int sizeflag)
17173 /* Add proper suffix to "fxsave" and "fxrstor". */
17177 char *p = mnemonicendp;
17183 OP_M (bytemode, sizeflag);
17187 PCMPESTR_Fixup (int bytemode, int sizeflag)
17189 /* Add proper suffix to "{,v}pcmpestr{i,m}". */
17192 char *p = mnemonicendp;
17197 else if (sizeflag & SUFFIX_ALWAYS)
17204 OP_EX (bytemode, sizeflag);
17207 /* Display the destination register operand for instructions with
17211 OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17214 const char **names;
17222 reg = vex.register_specifier;
17223 if (address_mode != mode_64bit)
17225 else if (vex.evex && !vex.v)
17228 if (bytemode == vex_scalar_mode)
17230 oappend (names_xmm[reg]);
17234 switch (vex.length)
17241 case vex_vsib_q_w_dq_mode:
17242 case vex_vsib_q_w_d_mode:
17258 names = names_mask;
17272 case vex_vsib_q_w_dq_mode:
17273 case vex_vsib_q_w_d_mode:
17274 names = vex.w ? names_ymm : names_xmm;
17283 names = names_mask;
17286 /* See PR binutils/20893 for a reproducer. */
17298 oappend (names[reg]);
17301 /* Get the VEX immediate byte without moving codep. */
17303 static unsigned char
17304 get_vex_imm8 (int sizeflag, int opnum)
17306 int bytes_before_imm = 0;
17308 if (modrm.mod != 3)
17310 /* There are SIB/displacement bytes. */
17311 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
17313 /* 32/64 bit address mode */
17314 int base = modrm.rm;
17316 /* Check SIB byte. */
17319 FETCH_DATA (the_info, codep + 1);
17321 /* When decoding the third source, don't increase
17322 bytes_before_imm as this has already been incremented
17323 by one in OP_E_memory while decoding the second
17326 bytes_before_imm++;
17329 /* Don't increase bytes_before_imm when decoding the third source,
17330 it has already been incremented by OP_E_memory while decoding
17331 the second source operand. */
17337 /* When modrm.rm == 5 or modrm.rm == 4 and base in
17338 SIB == 5, there is a 4 byte displacement. */
17340 /* No displacement. */
17342 /* Fall through. */
17344 /* 4 byte displacement. */
17345 bytes_before_imm += 4;
17348 /* 1 byte displacement. */
17349 bytes_before_imm++;
17356 /* 16 bit address mode */
17357 /* Don't increase bytes_before_imm when decoding the third source,
17358 it has already been incremented by OP_E_memory while decoding
17359 the second source operand. */
17365 /* When modrm.rm == 6, there is a 2 byte displacement. */
17367 /* No displacement. */
17369 /* Fall through. */
17371 /* 2 byte displacement. */
17372 bytes_before_imm += 2;
17375 /* 1 byte displacement: when decoding the third source,
17376 don't increase bytes_before_imm as this has already
17377 been incremented by one in OP_E_memory while decoding
17378 the second source operand. */
17380 bytes_before_imm++;
17388 FETCH_DATA (the_info, codep + bytes_before_imm + 1);
17389 return codep [bytes_before_imm];
17393 OP_EX_VexReg (int bytemode, int sizeflag, int reg)
17395 const char **names;
17397 if (reg == -1 && modrm.mod != 3)
17399 OP_E_memory (bytemode, sizeflag);
17411 if (address_mode != mode_64bit)
17415 switch (vex.length)
17426 oappend (names[reg]);
17430 OP_EX_VexImmW (int bytemode, int sizeflag)
17433 static unsigned char vex_imm8;
17435 if (vex_w_done == 0)
17439 /* Skip mod/rm byte. */
17443 vex_imm8 = get_vex_imm8 (sizeflag, 0);
17446 reg = vex_imm8 >> 4;
17448 OP_EX_VexReg (bytemode, sizeflag, reg);
17450 else if (vex_w_done == 1)
17455 reg = vex_imm8 >> 4;
17457 OP_EX_VexReg (bytemode, sizeflag, reg);
17461 /* Output the imm8 directly. */
17462 scratchbuf[0] = '$';
17463 print_operand_value (scratchbuf + 1, 1, vex_imm8 & 0xf);
17464 oappend_maybe_intel (scratchbuf);
17465 scratchbuf[0] = '\0';
17471 OP_Vex_2src (int bytemode, int sizeflag)
17473 if (modrm.mod == 3)
17475 int reg = modrm.rm;
17479 oappend (names_xmm[reg]);
17484 && (bytemode == v_mode || bytemode == v_swap_mode))
17486 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
17487 used_prefixes |= (prefixes & PREFIX_DATA);
17489 OP_E (bytemode, sizeflag);
17494 OP_Vex_2src_1 (int bytemode, int sizeflag)
17496 if (modrm.mod == 3)
17498 /* Skip mod/rm byte. */
17505 unsigned int reg = vex.register_specifier;
17507 if (address_mode != mode_64bit)
17509 oappend (names_xmm[reg]);
17512 OP_Vex_2src (bytemode, sizeflag);
17516 OP_Vex_2src_2 (int bytemode, int sizeflag)
17519 OP_Vex_2src (bytemode, sizeflag);
17522 unsigned int reg = vex.register_specifier;
17524 if (address_mode != mode_64bit)
17526 oappend (names_xmm[reg]);
17531 OP_EX_VexW (int bytemode, int sizeflag)
17537 /* Skip mod/rm byte. */
17542 reg = get_vex_imm8 (sizeflag, 0) >> 4;
17547 reg = get_vex_imm8 (sizeflag, 1) >> 4;
17550 OP_EX_VexReg (bytemode, sizeflag, reg);
17558 OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17561 const char **names;
17563 FETCH_DATA (the_info, codep + 1);
17566 if (bytemode != x_mode)
17570 if (address_mode != mode_64bit)
17573 switch (vex.length)
17584 oappend (names[reg]);
17588 OP_XMM_VexW (int bytemode, int sizeflag)
17590 /* Turn off the REX.W bit since it is used for swapping operands
17593 OP_XMM (bytemode, sizeflag);
17597 OP_EX_Vex (int bytemode, int sizeflag)
17599 if (modrm.mod != 3)
17601 if (vex.register_specifier != 0)
17605 OP_EX (bytemode, sizeflag);
17609 OP_XMM_Vex (int bytemode, int sizeflag)
17611 if (modrm.mod != 3)
17613 if (vex.register_specifier != 0)
17617 OP_XMM (bytemode, sizeflag);
17621 VZERO_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17623 switch (vex.length)
17626 mnemonicendp = stpcpy (obuf, "vzeroupper");
17629 mnemonicendp = stpcpy (obuf, "vzeroall");
17636 static struct op vex_cmp_op[] =
17638 { STRING_COMMA_LEN ("eq") },
17639 { STRING_COMMA_LEN ("lt") },
17640 { STRING_COMMA_LEN ("le") },
17641 { STRING_COMMA_LEN ("unord") },
17642 { STRING_COMMA_LEN ("neq") },
17643 { STRING_COMMA_LEN ("nlt") },
17644 { STRING_COMMA_LEN ("nle") },
17645 { STRING_COMMA_LEN ("ord") },
17646 { STRING_COMMA_LEN ("eq_uq") },
17647 { STRING_COMMA_LEN ("nge") },
17648 { STRING_COMMA_LEN ("ngt") },
17649 { STRING_COMMA_LEN ("false") },
17650 { STRING_COMMA_LEN ("neq_oq") },
17651 { STRING_COMMA_LEN ("ge") },
17652 { STRING_COMMA_LEN ("gt") },
17653 { STRING_COMMA_LEN ("true") },
17654 { STRING_COMMA_LEN ("eq_os") },
17655 { STRING_COMMA_LEN ("lt_oq") },
17656 { STRING_COMMA_LEN ("le_oq") },
17657 { STRING_COMMA_LEN ("unord_s") },
17658 { STRING_COMMA_LEN ("neq_us") },
17659 { STRING_COMMA_LEN ("nlt_uq") },
17660 { STRING_COMMA_LEN ("nle_uq") },
17661 { STRING_COMMA_LEN ("ord_s") },
17662 { STRING_COMMA_LEN ("eq_us") },
17663 { STRING_COMMA_LEN ("nge_uq") },
17664 { STRING_COMMA_LEN ("ngt_uq") },
17665 { STRING_COMMA_LEN ("false_os") },
17666 { STRING_COMMA_LEN ("neq_os") },
17667 { STRING_COMMA_LEN ("ge_oq") },
17668 { STRING_COMMA_LEN ("gt_oq") },
17669 { STRING_COMMA_LEN ("true_us") },
17673 VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17675 unsigned int cmp_type;
17677 FETCH_DATA (the_info, codep + 1);
17678 cmp_type = *codep++ & 0xff;
17679 if (cmp_type < ARRAY_SIZE (vex_cmp_op))
17682 char *p = mnemonicendp - 2;
17686 sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
17687 mnemonicendp += vex_cmp_op[cmp_type].len;
17691 /* We have a reserved extension byte. Output it directly. */
17692 scratchbuf[0] = '$';
17693 print_operand_value (scratchbuf + 1, 1, cmp_type);
17694 oappend_maybe_intel (scratchbuf);
17695 scratchbuf[0] = '\0';
17700 VPCMP_Fixup (int bytemode ATTRIBUTE_UNUSED,
17701 int sizeflag ATTRIBUTE_UNUSED)
17703 unsigned int cmp_type;
17708 FETCH_DATA (the_info, codep + 1);
17709 cmp_type = *codep++ & 0xff;
17710 /* There are aliases for immediates 0, 1, 2, 4, 5, 6.
17711 If it's the case, print suffix, otherwise - print the immediate. */
17712 if (cmp_type < ARRAY_SIZE (simd_cmp_op)
17717 char *p = mnemonicendp - 2;
17719 /* vpcmp* can have both one- and two-lettered suffix. */
17733 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
17734 mnemonicendp += simd_cmp_op[cmp_type].len;
17738 /* We have a reserved extension byte. Output it directly. */
17739 scratchbuf[0] = '$';
17740 print_operand_value (scratchbuf + 1, 1, cmp_type);
17741 oappend_maybe_intel (scratchbuf);
17742 scratchbuf[0] = '\0';
17746 static const struct op xop_cmp_op[] =
17748 { STRING_COMMA_LEN ("lt") },
17749 { STRING_COMMA_LEN ("le") },
17750 { STRING_COMMA_LEN ("gt") },
17751 { STRING_COMMA_LEN ("ge") },
17752 { STRING_COMMA_LEN ("eq") },
17753 { STRING_COMMA_LEN ("neq") },
17754 { STRING_COMMA_LEN ("false") },
17755 { STRING_COMMA_LEN ("true") }
17759 VPCOM_Fixup (int bytemode ATTRIBUTE_UNUSED,
17760 int sizeflag ATTRIBUTE_UNUSED)
17762 unsigned int cmp_type;
17764 FETCH_DATA (the_info, codep + 1);
17765 cmp_type = *codep++ & 0xff;
17766 if (cmp_type < ARRAY_SIZE (xop_cmp_op))
17769 char *p = mnemonicendp - 2;
17771 /* vpcom* can have both one- and two-lettered suffix. */
17785 sprintf (p, "%s%s", xop_cmp_op[cmp_type].name, suffix);
17786 mnemonicendp += xop_cmp_op[cmp_type].len;
17790 /* We have a reserved extension byte. Output it directly. */
17791 scratchbuf[0] = '$';
17792 print_operand_value (scratchbuf + 1, 1, cmp_type);
17793 oappend_maybe_intel (scratchbuf);
17794 scratchbuf[0] = '\0';
17798 static const struct op pclmul_op[] =
17800 { STRING_COMMA_LEN ("lql") },
17801 { STRING_COMMA_LEN ("hql") },
17802 { STRING_COMMA_LEN ("lqh") },
17803 { STRING_COMMA_LEN ("hqh") }
17807 PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
17808 int sizeflag ATTRIBUTE_UNUSED)
17810 unsigned int pclmul_type;
17812 FETCH_DATA (the_info, codep + 1);
17813 pclmul_type = *codep++ & 0xff;
17814 switch (pclmul_type)
17825 if (pclmul_type < ARRAY_SIZE (pclmul_op))
17828 char *p = mnemonicendp - 3;
17833 sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
17834 mnemonicendp += pclmul_op[pclmul_type].len;
17838 /* We have a reserved extension byte. Output it directly. */
17839 scratchbuf[0] = '$';
17840 print_operand_value (scratchbuf + 1, 1, pclmul_type);
17841 oappend_maybe_intel (scratchbuf);
17842 scratchbuf[0] = '\0';
17847 MOVBE_Fixup (int bytemode, int sizeflag)
17849 /* Add proper suffix to "movbe". */
17850 char *p = mnemonicendp;
17859 if (sizeflag & SUFFIX_ALWAYS)
17865 if (sizeflag & DFLAG)
17869 used_prefixes |= (prefixes & PREFIX_DATA);
17874 oappend (INTERNAL_DISASSEMBLER_ERROR);
17881 OP_M (bytemode, sizeflag);
17885 OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17888 const char **names;
17890 /* Skip mod/rm byte. */
17904 oappend (names[reg]);
17908 OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
17910 const char **names;
17911 unsigned int reg = vex.register_specifier;
17918 if (address_mode != mode_64bit)
17920 oappend (names[reg]);
17924 OP_Mask (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17927 || (bytemode != mask_mode && bytemode != mask_bd_mode))
17931 if ((rex & REX_R) != 0 || !vex.r)
17937 oappend (names_mask [modrm.reg]);
17941 OP_Rounding (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
17944 || (bytemode != evex_rounding_mode
17945 && bytemode != evex_sae_mode))
17947 if (modrm.mod == 3 && vex.b)
17950 case evex_rounding_mode:
17951 oappend (names_rounding[vex.ll]);
17953 case evex_sae_mode: