1 /* Print i386 instructions for GDB, the GNU debugger.
2 Copyright (C) 1988-2014 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. */
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 VEXI4_Fixup (int, int);
99 static void VZERO_Fixup (int, int);
100 static void VCMP_Fixup (int, int);
101 static void VPCMP_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 NOP_Fixup1 (int, int);
106 static void NOP_Fixup2 (int, int);
107 static void OP_3DNowSuffix (int, int);
108 static void CMP_Fixup (int, int);
109 static void BadOp (void);
110 static void REP_Fixup (int, int);
111 static void BND_Fixup (int, int);
112 static void HLE_Fixup1 (int, int);
113 static void HLE_Fixup2 (int, int);
114 static void HLE_Fixup3 (int, int);
115 static void CMPXCHG8B_Fixup (int, int);
116 static void XMM_Fixup (int, int);
117 static void CRC32_Fixup (int, int);
118 static void FXSAVE_Fixup (int, int);
119 static void OP_LWPCB_E (int, int);
120 static void OP_LWP_E (int, int);
121 static void OP_Vex_2src_1 (int, int);
122 static void OP_Vex_2src_2 (int, int);
124 static void MOVBE_Fixup (int, int);
126 static void OP_Mask (int, int);
129 /* Points to first byte not fetched. */
130 bfd_byte *max_fetched;
131 bfd_byte the_buffer[MAX_MNEM_SIZE];
144 enum address_mode address_mode;
146 /* Flags for the prefixes for the current instruction. See below. */
149 /* REX prefix the current instruction. See below. */
151 /* Bits of REX we've already used. */
153 /* REX bits in original REX prefix ignored. */
154 static int rex_ignored;
155 /* Mark parts used in the REX prefix. When we are testing for
156 empty prefix (for 8bit register REX extension), just mask it
157 out. Otherwise test for REX bit is excuse for existence of REX
158 only in case value is nonzero. */
159 #define USED_REX(value) \
164 rex_used |= (value) | REX_OPCODE; \
167 rex_used |= REX_OPCODE; \
170 /* Flags for prefixes which we somehow handled when printing the
171 current instruction. */
172 static int used_prefixes;
174 /* Flags stored in PREFIXES. */
175 #define PREFIX_REPZ 1
176 #define PREFIX_REPNZ 2
177 #define PREFIX_LOCK 4
179 #define PREFIX_SS 0x10
180 #define PREFIX_DS 0x20
181 #define PREFIX_ES 0x40
182 #define PREFIX_FS 0x80
183 #define PREFIX_GS 0x100
184 #define PREFIX_DATA 0x200
185 #define PREFIX_ADDR 0x400
186 #define PREFIX_FWAIT 0x800
188 /* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
189 to ADDR (exclusive) are valid. Returns 1 for success, longjmps
191 #define FETCH_DATA(info, addr) \
192 ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
193 ? 1 : fetch_data ((info), (addr)))
196 fetch_data (struct disassemble_info *info, bfd_byte *addr)
199 struct dis_private *priv = (struct dis_private *) info->private_data;
200 bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
202 if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
203 status = (*info->read_memory_func) (start,
205 addr - priv->max_fetched,
211 /* If we did manage to read at least one byte, then
212 print_insn_i386 will do something sensible. Otherwise, print
213 an error. We do that here because this is where we know
215 if (priv->max_fetched == priv->the_buffer)
216 (*info->memory_error_func) (status, start, info);
217 longjmp (priv->bailout, 1);
220 priv->max_fetched = addr;
224 #define XX { NULL, 0 }
225 #define Bad_Opcode NULL, { { NULL, 0 } }
227 #define Eb { OP_E, b_mode }
228 #define Ebnd { OP_E, bnd_mode }
229 #define EbS { OP_E, b_swap_mode }
230 #define Ev { OP_E, v_mode }
231 #define Ev_bnd { OP_E, v_bnd_mode }
232 #define EvS { OP_E, v_swap_mode }
233 #define Ed { OP_E, d_mode }
234 #define Edq { OP_E, dq_mode }
235 #define Edqw { OP_E, dqw_mode }
236 #define Edqb { OP_E, dqb_mode }
237 #define Edqd { OP_E, dqd_mode }
238 #define Eq { OP_E, q_mode }
239 #define indirEv { OP_indirE, stack_v_mode }
240 #define indirEp { OP_indirE, f_mode }
241 #define stackEv { OP_E, stack_v_mode }
242 #define Em { OP_E, m_mode }
243 #define Ew { OP_E, w_mode }
244 #define M { OP_M, 0 } /* lea, lgdt, etc. */
245 #define Ma { OP_M, a_mode }
246 #define Mb { OP_M, b_mode }
247 #define Md { OP_M, d_mode }
248 #define Mo { OP_M, o_mode }
249 #define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
250 #define Mq { OP_M, q_mode }
251 #define Mx { OP_M, x_mode }
252 #define Mxmm { OP_M, xmm_mode }
253 #define Gb { OP_G, b_mode }
254 #define Gbnd { OP_G, bnd_mode }
255 #define Gv { OP_G, v_mode }
256 #define Gd { OP_G, d_mode }
257 #define Gdq { OP_G, dq_mode }
258 #define Gm { OP_G, m_mode }
259 #define Gw { OP_G, w_mode }
260 #define Rd { OP_R, d_mode }
261 #define Rdq { OP_R, dq_mode }
262 #define Rm { OP_R, m_mode }
263 #define Ib { OP_I, b_mode }
264 #define sIb { OP_sI, b_mode } /* sign extened byte */
265 #define sIbT { OP_sI, b_T_mode } /* sign extened byte like 'T' */
266 #define Iv { OP_I, v_mode }
267 #define sIv { OP_sI, v_mode }
268 #define Iq { OP_I, q_mode }
269 #define Iv64 { OP_I64, v_mode }
270 #define Iw { OP_I, w_mode }
271 #define I1 { OP_I, const_1_mode }
272 #define Jb { OP_J, b_mode }
273 #define Jv { OP_J, v_mode }
274 #define Cm { OP_C, m_mode }
275 #define Dm { OP_D, m_mode }
276 #define Td { OP_T, d_mode }
277 #define Skip_MODRM { OP_Skip_MODRM, 0 }
279 #define RMeAX { OP_REG, eAX_reg }
280 #define RMeBX { OP_REG, eBX_reg }
281 #define RMeCX { OP_REG, eCX_reg }
282 #define RMeDX { OP_REG, eDX_reg }
283 #define RMeSP { OP_REG, eSP_reg }
284 #define RMeBP { OP_REG, eBP_reg }
285 #define RMeSI { OP_REG, eSI_reg }
286 #define RMeDI { OP_REG, eDI_reg }
287 #define RMrAX { OP_REG, rAX_reg }
288 #define RMrBX { OP_REG, rBX_reg }
289 #define RMrCX { OP_REG, rCX_reg }
290 #define RMrDX { OP_REG, rDX_reg }
291 #define RMrSP { OP_REG, rSP_reg }
292 #define RMrBP { OP_REG, rBP_reg }
293 #define RMrSI { OP_REG, rSI_reg }
294 #define RMrDI { OP_REG, rDI_reg }
295 #define RMAL { OP_REG, al_reg }
296 #define RMCL { OP_REG, cl_reg }
297 #define RMDL { OP_REG, dl_reg }
298 #define RMBL { OP_REG, bl_reg }
299 #define RMAH { OP_REG, ah_reg }
300 #define RMCH { OP_REG, ch_reg }
301 #define RMDH { OP_REG, dh_reg }
302 #define RMBH { OP_REG, bh_reg }
303 #define RMAX { OP_REG, ax_reg }
304 #define RMDX { OP_REG, dx_reg }
306 #define eAX { OP_IMREG, eAX_reg }
307 #define eBX { OP_IMREG, eBX_reg }
308 #define eCX { OP_IMREG, eCX_reg }
309 #define eDX { OP_IMREG, eDX_reg }
310 #define eSP { OP_IMREG, eSP_reg }
311 #define eBP { OP_IMREG, eBP_reg }
312 #define eSI { OP_IMREG, eSI_reg }
313 #define eDI { OP_IMREG, eDI_reg }
314 #define AL { OP_IMREG, al_reg }
315 #define CL { OP_IMREG, cl_reg }
316 #define DL { OP_IMREG, dl_reg }
317 #define BL { OP_IMREG, bl_reg }
318 #define AH { OP_IMREG, ah_reg }
319 #define CH { OP_IMREG, ch_reg }
320 #define DH { OP_IMREG, dh_reg }
321 #define BH { OP_IMREG, bh_reg }
322 #define AX { OP_IMREG, ax_reg }
323 #define DX { OP_IMREG, dx_reg }
324 #define zAX { OP_IMREG, z_mode_ax_reg }
325 #define indirDX { OP_IMREG, indir_dx_reg }
327 #define Sw { OP_SEG, w_mode }
328 #define Sv { OP_SEG, v_mode }
329 #define Ap { OP_DIR, 0 }
330 #define Ob { OP_OFF64, b_mode }
331 #define Ov { OP_OFF64, v_mode }
332 #define Xb { OP_DSreg, eSI_reg }
333 #define Xv { OP_DSreg, eSI_reg }
334 #define Xz { OP_DSreg, eSI_reg }
335 #define Yb { OP_ESreg, eDI_reg }
336 #define Yv { OP_ESreg, eDI_reg }
337 #define DSBX { OP_DSreg, eBX_reg }
339 #define es { OP_REG, es_reg }
340 #define ss { OP_REG, ss_reg }
341 #define cs { OP_REG, cs_reg }
342 #define ds { OP_REG, ds_reg }
343 #define fs { OP_REG, fs_reg }
344 #define gs { OP_REG, gs_reg }
346 #define MX { OP_MMX, 0 }
347 #define XM { OP_XMM, 0 }
348 #define XMScalar { OP_XMM, scalar_mode }
349 #define XMGatherQ { OP_XMM, vex_vsib_q_w_dq_mode }
350 #define XMM { OP_XMM, xmm_mode }
351 #define XMxmmq { OP_XMM, xmmq_mode }
352 #define EM { OP_EM, v_mode }
353 #define EMS { OP_EM, v_swap_mode }
354 #define EMd { OP_EM, d_mode }
355 #define EMx { OP_EM, x_mode }
356 #define EXw { OP_EX, w_mode }
357 #define EXd { OP_EX, d_mode }
358 #define EXdScalar { OP_EX, d_scalar_mode }
359 #define EXdS { OP_EX, d_swap_mode }
360 #define EXdScalarS { OP_EX, d_scalar_swap_mode }
361 #define EXq { OP_EX, q_mode }
362 #define EXqScalar { OP_EX, q_scalar_mode }
363 #define EXqScalarS { OP_EX, q_scalar_swap_mode }
364 #define EXqS { OP_EX, q_swap_mode }
365 #define EXx { OP_EX, x_mode }
366 #define EXxS { OP_EX, x_swap_mode }
367 #define EXxmm { OP_EX, xmm_mode }
368 #define EXymm { OP_EX, ymm_mode }
369 #define EXxmmq { OP_EX, xmmq_mode }
370 #define EXEvexHalfBcstXmmq { OP_EX, evex_half_bcst_xmmq_mode }
371 #define EXxmm_mb { OP_EX, xmm_mb_mode }
372 #define EXxmm_mw { OP_EX, xmm_mw_mode }
373 #define EXxmm_md { OP_EX, xmm_md_mode }
374 #define EXxmm_mq { OP_EX, xmm_mq_mode }
375 #define EXxmm_mdq { OP_EX, xmm_mdq_mode }
376 #define EXxmmdw { OP_EX, xmmdw_mode }
377 #define EXxmmqd { OP_EX, xmmqd_mode }
378 #define EXymmq { OP_EX, ymmq_mode }
379 #define EXVexWdq { OP_EX, vex_w_dq_mode }
380 #define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
381 #define EXEvexXGscat { OP_EX, evex_x_gscat_mode }
382 #define EXEvexXNoBcst { OP_EX, evex_x_nobcst_mode }
383 #define MS { OP_MS, v_mode }
384 #define XS { OP_XS, v_mode }
385 #define EMCq { OP_EMC, q_mode }
386 #define MXC { OP_MXC, 0 }
387 #define OPSUF { OP_3DNowSuffix, 0 }
388 #define CMP { CMP_Fixup, 0 }
389 #define XMM0 { XMM_Fixup, 0 }
390 #define FXSAVE { FXSAVE_Fixup, 0 }
391 #define Vex_2src_1 { OP_Vex_2src_1, 0 }
392 #define Vex_2src_2 { OP_Vex_2src_2, 0 }
394 #define Vex { OP_VEX, vex_mode }
395 #define VexScalar { OP_VEX, vex_scalar_mode }
396 #define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode }
397 #define Vex128 { OP_VEX, vex128_mode }
398 #define Vex256 { OP_VEX, vex256_mode }
399 #define VexGdq { OP_VEX, dq_mode }
400 #define VexI4 { VEXI4_Fixup, 0}
401 #define EXdVex { OP_EX_Vex, d_mode }
402 #define EXdVexS { OP_EX_Vex, d_swap_mode }
403 #define EXdVexScalarS { OP_EX_Vex, d_scalar_swap_mode }
404 #define EXqVex { OP_EX_Vex, q_mode }
405 #define EXqVexS { OP_EX_Vex, q_swap_mode }
406 #define EXqVexScalarS { OP_EX_Vex, q_scalar_swap_mode }
407 #define EXVexW { OP_EX_VexW, x_mode }
408 #define EXdVexW { OP_EX_VexW, d_mode }
409 #define EXqVexW { OP_EX_VexW, q_mode }
410 #define EXVexImmW { OP_EX_VexImmW, x_mode }
411 #define XMVex { OP_XMM_Vex, 0 }
412 #define XMVexScalar { OP_XMM_Vex, scalar_mode }
413 #define XMVexW { OP_XMM_VexW, 0 }
414 #define XMVexI4 { OP_REG_VexI4, x_mode }
415 #define PCLMUL { PCLMUL_Fixup, 0 }
416 #define VZERO { VZERO_Fixup, 0 }
417 #define VCMP { VCMP_Fixup, 0 }
418 #define VPCMP { VPCMP_Fixup, 0 }
420 #define EXxEVexR { OP_Rounding, evex_rounding_mode }
421 #define EXxEVexS { OP_Rounding, evex_sae_mode }
423 #define XMask { OP_Mask, mask_mode }
424 #define MaskG { OP_G, mask_mode }
425 #define MaskE { OP_E, mask_mode }
426 #define MaskR { OP_R, mask_mode }
427 #define MaskVex { OP_VEX, mask_mode }
429 #define MVexVSIBDWpX { OP_M, vex_vsib_d_w_dq_mode }
430 #define MVexVSIBQWpX { OP_M, vex_vsib_q_w_dq_mode }
432 /* Used handle "rep" prefix for string instructions. */
433 #define Xbr { REP_Fixup, eSI_reg }
434 #define Xvr { REP_Fixup, eSI_reg }
435 #define Ybr { REP_Fixup, eDI_reg }
436 #define Yvr { REP_Fixup, eDI_reg }
437 #define Yzr { REP_Fixup, eDI_reg }
438 #define indirDXr { REP_Fixup, indir_dx_reg }
439 #define ALr { REP_Fixup, al_reg }
440 #define eAXr { REP_Fixup, eAX_reg }
442 /* Used handle HLE prefix for lockable instructions. */
443 #define Ebh1 { HLE_Fixup1, b_mode }
444 #define Evh1 { HLE_Fixup1, v_mode }
445 #define Ebh2 { HLE_Fixup2, b_mode }
446 #define Evh2 { HLE_Fixup2, v_mode }
447 #define Ebh3 { HLE_Fixup3, b_mode }
448 #define Evh3 { HLE_Fixup3, v_mode }
450 #define BND { BND_Fixup, 0 }
452 #define cond_jump_flag { NULL, cond_jump_mode }
453 #define loop_jcxz_flag { NULL, loop_jcxz_mode }
455 /* bits in sizeflag */
456 #define SUFFIX_ALWAYS 4
464 /* byte operand with operand swapped */
466 /* byte operand, sign extend like 'T' suffix */
468 /* operand size depends on prefixes */
470 /* operand size depends on prefixes with operand swapped */
474 /* double word operand */
476 /* double word operand with operand swapped */
478 /* quad word operand */
480 /* quad word operand with operand swapped */
482 /* ten-byte operand */
484 /* 16-byte XMM, 32-byte YMM or 64-byte ZMM operand. In EVEX with
485 broadcast enabled. */
487 /* Similar to x_mode, but with different EVEX mem shifts. */
489 /* Similar to x_mode, but with disabled broadcast. */
491 /* Similar to x_mode, but with operands swapped and disabled broadcast
494 /* 16-byte XMM operand */
496 /* XMM, XMM or YMM register operand, or quad word, xmmword or ymmword
497 memory operand (depending on vector length). Broadcast isn't
500 /* Same as xmmq_mode, but broadcast is allowed. */
501 evex_half_bcst_xmmq_mode,
502 /* XMM register or byte memory operand */
504 /* XMM register or word memory operand */
506 /* XMM register or double word memory operand */
508 /* XMM register or quad word memory operand */
510 /* XMM register or double/quad word memory operand, depending on
513 /* 16-byte XMM, word, double word or quad word operand. */
515 /* 16-byte XMM, double word, quad word operand or xmm word operand. */
517 /* 32-byte YMM operand */
519 /* quad word, ymmword or zmmword memory operand. */
521 /* 32-byte YMM or 16-byte word operand */
523 /* d_mode in 32bit, q_mode in 64bit mode. */
525 /* pair of v_mode operands */
530 /* operand size depends on REX prefixes. */
532 /* registers like dq_mode, memory like w_mode. */
535 /* 4- or 6-byte pointer operand */
538 /* v_mode for stack-related opcodes. */
540 /* non-quad operand size depends on prefixes */
542 /* 16-byte operand */
544 /* registers like dq_mode, memory like b_mode. */
546 /* registers like dq_mode, memory like d_mode. */
548 /* normal vex mode */
550 /* 128bit vex mode */
552 /* 256bit vex mode */
554 /* operand size depends on the VEX.W bit. */
557 /* Similar to vex_w_dq_mode, with VSIB dword indices. */
558 vex_vsib_d_w_dq_mode,
559 /* Similar to vex_w_dq_mode, with VSIB qword indices. */
560 vex_vsib_q_w_dq_mode,
562 /* scalar, ignore vector length. */
564 /* like d_mode, ignore vector length. */
566 /* like d_swap_mode, ignore vector length. */
568 /* like q_mode, ignore vector length. */
570 /* like q_swap_mode, ignore vector length. */
572 /* like vex_mode, ignore vector length. */
574 /* like vex_w_dq_mode, ignore vector length. */
575 vex_scalar_w_dq_mode,
577 /* Static rounding. */
579 /* Supress all exceptions. */
582 /* Mask register operand. */
649 #define FLOAT NULL, { { NULL, FLOATCODE } }
651 #define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }
652 #define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
653 #define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
654 #define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
655 #define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
656 #define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
657 #define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
658 #define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
659 #define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
660 #define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
661 #define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
662 #define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
663 #define EVEX_TABLE(I) DIS386 (USE_EVEX_TABLE, (I))
782 MOD_VEX_0F12_PREFIX_0,
784 MOD_VEX_0F16_PREFIX_0,
800 MOD_VEX_0FD7_PREFIX_2,
801 MOD_VEX_0FE7_PREFIX_2,
802 MOD_VEX_0FF0_PREFIX_3,
803 MOD_VEX_0F381A_PREFIX_2,
804 MOD_VEX_0F382A_PREFIX_2,
805 MOD_VEX_0F382C_PREFIX_2,
806 MOD_VEX_0F382D_PREFIX_2,
807 MOD_VEX_0F382E_PREFIX_2,
808 MOD_VEX_0F382F_PREFIX_2,
809 MOD_VEX_0F385A_PREFIX_2,
810 MOD_VEX_0F388C_PREFIX_2,
811 MOD_VEX_0F388E_PREFIX_2,
813 MOD_EVEX_0F10_PREFIX_1,
814 MOD_EVEX_0F10_PREFIX_3,
815 MOD_EVEX_0F11_PREFIX_1,
816 MOD_EVEX_0F11_PREFIX_3,
817 MOD_EVEX_0F12_PREFIX_0,
818 MOD_EVEX_0F16_PREFIX_0,
819 MOD_EVEX_0F38C6_REG_1,
820 MOD_EVEX_0F38C6_REG_2,
821 MOD_EVEX_0F38C6_REG_5,
822 MOD_EVEX_0F38C6_REG_6,
823 MOD_EVEX_0F38C7_REG_1,
824 MOD_EVEX_0F38C7_REG_2,
825 MOD_EVEX_0F38C7_REG_5,
826 MOD_EVEX_0F38C7_REG_6
1017 PREFIX_VEX_0F71_REG_2,
1018 PREFIX_VEX_0F71_REG_4,
1019 PREFIX_VEX_0F71_REG_6,
1020 PREFIX_VEX_0F72_REG_2,
1021 PREFIX_VEX_0F72_REG_4,
1022 PREFIX_VEX_0F72_REG_6,
1023 PREFIX_VEX_0F73_REG_2,
1024 PREFIX_VEX_0F73_REG_3,
1025 PREFIX_VEX_0F73_REG_6,
1026 PREFIX_VEX_0F73_REG_7,
1197 PREFIX_VEX_0F38F3_REG_1,
1198 PREFIX_VEX_0F38F3_REG_2,
1199 PREFIX_VEX_0F38F3_REG_3,
1301 PREFIX_EVEX_0F72_REG_0,
1302 PREFIX_EVEX_0F72_REG_1,
1303 PREFIX_EVEX_0F72_REG_2,
1304 PREFIX_EVEX_0F72_REG_4,
1305 PREFIX_EVEX_0F72_REG_6,
1306 PREFIX_EVEX_0F73_REG_2,
1307 PREFIX_EVEX_0F73_REG_6,
1436 PREFIX_EVEX_0F38C6_REG_1,
1437 PREFIX_EVEX_0F38C6_REG_2,
1438 PREFIX_EVEX_0F38C6_REG_5,
1439 PREFIX_EVEX_0F38C6_REG_6,
1440 PREFIX_EVEX_0F38C7_REG_1,
1441 PREFIX_EVEX_0F38C7_REG_2,
1442 PREFIX_EVEX_0F38C7_REG_5,
1443 PREFIX_EVEX_0F38C7_REG_6,
1515 THREE_BYTE_0F38 = 0,
1543 VEX_LEN_0F10_P_1 = 0,
1547 VEX_LEN_0F12_P_0_M_0,
1548 VEX_LEN_0F12_P_0_M_1,
1551 VEX_LEN_0F16_P_0_M_0,
1552 VEX_LEN_0F16_P_0_M_1,
1598 VEX_LEN_0FAE_R_2_M_0,
1599 VEX_LEN_0FAE_R_3_M_0,
1608 VEX_LEN_0F381A_P_2_M_0,
1611 VEX_LEN_0F385A_P_2_M_0,
1618 VEX_LEN_0F38F3_R_1_P_0,
1619 VEX_LEN_0F38F3_R_2_P_0,
1620 VEX_LEN_0F38F3_R_3_P_0,
1664 VEX_LEN_0FXOP_08_CC,
1665 VEX_LEN_0FXOP_08_CD,
1666 VEX_LEN_0FXOP_08_CE,
1667 VEX_LEN_0FXOP_08_CF,
1668 VEX_LEN_0FXOP_08_EC,
1669 VEX_LEN_0FXOP_08_ED,
1670 VEX_LEN_0FXOP_08_EE,
1671 VEX_LEN_0FXOP_08_EF,
1672 VEX_LEN_0FXOP_09_80,
1706 VEX_W_0F41_P_0_LEN_1,
1707 VEX_W_0F42_P_0_LEN_1,
1708 VEX_W_0F44_P_0_LEN_0,
1709 VEX_W_0F45_P_0_LEN_1,
1710 VEX_W_0F46_P_0_LEN_1,
1711 VEX_W_0F47_P_0_LEN_1,
1712 VEX_W_0F4B_P_2_LEN_1,
1792 VEX_W_0F90_P_0_LEN_0,
1793 VEX_W_0F91_P_0_LEN_0,
1794 VEX_W_0F92_P_0_LEN_0,
1795 VEX_W_0F93_P_0_LEN_0,
1796 VEX_W_0F98_P_0_LEN_0,
1875 VEX_W_0F381A_P_2_M_0,
1887 VEX_W_0F382A_P_2_M_0,
1889 VEX_W_0F382C_P_2_M_0,
1890 VEX_W_0F382D_P_2_M_0,
1891 VEX_W_0F382E_P_2_M_0,
1892 VEX_W_0F382F_P_2_M_0,
1914 VEX_W_0F385A_P_2_M_0,
1942 VEX_W_0F3A30_P_2_LEN_0,
1943 VEX_W_0F3A32_P_2_LEN_0,
1963 EVEX_W_0F10_P_1_M_0,
1964 EVEX_W_0F10_P_1_M_1,
1966 EVEX_W_0F10_P_3_M_0,
1967 EVEX_W_0F10_P_3_M_1,
1969 EVEX_W_0F11_P_1_M_0,
1970 EVEX_W_0F11_P_1_M_1,
1972 EVEX_W_0F11_P_3_M_0,
1973 EVEX_W_0F11_P_3_M_1,
1974 EVEX_W_0F12_P_0_M_0,
1975 EVEX_W_0F12_P_0_M_1,
1985 EVEX_W_0F16_P_0_M_0,
1986 EVEX_W_0F16_P_0_M_1,
2047 EVEX_W_0F72_R_2_P_2,
2048 EVEX_W_0F72_R_6_P_2,
2049 EVEX_W_0F73_R_2_P_2,
2050 EVEX_W_0F73_R_6_P_2,
2123 EVEX_W_0F38C7_R_1_P_2,
2124 EVEX_W_0F38C7_R_2_P_2,
2125 EVEX_W_0F38C7_R_5_P_2,
2126 EVEX_W_0F38C7_R_6_P_2,
2150 typedef void (*op_rtn) (int bytemode, int sizeflag);
2161 /* Upper case letters in the instruction names here are macros.
2162 'A' => print 'b' if no register operands or suffix_always is true
2163 'B' => print 'b' if suffix_always is true
2164 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
2166 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
2167 suffix_always is true
2168 'E' => print 'e' if 32-bit form of jcxz
2169 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
2170 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
2171 'H' => print ",pt" or ",pn" branch hint
2172 'I' => honor following macro letter even in Intel mode (implemented only
2173 for some of the macro letters)
2175 'K' => print 'd' or 'q' if rex prefix is present.
2176 'L' => print 'l' if suffix_always is true
2177 'M' => print 'r' if intel_mnemonic is false.
2178 'N' => print 'n' if instruction has no wait "prefix"
2179 'O' => print 'd' or 'o' (or 'q' in Intel mode)
2180 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
2181 or suffix_always is true. print 'q' if rex prefix is present.
2182 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
2184 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
2185 'S' => print 'w', 'l' or 'q' if suffix_always is true
2186 'T' => print 'q' in 64bit mode and behave as 'P' otherwise
2187 'U' => print 'q' in 64bit mode and behave as 'Q' otherwise
2188 'V' => print 'q' in 64bit mode and behave as 'S' otherwise
2189 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
2190 'X' => print 's', 'd' depending on data16 prefix (for XMM)
2191 'Y' => 'q' if instruction has an REX 64bit overwrite prefix and
2192 suffix_always is true.
2193 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
2194 '!' => change condition from true to false or from false to true.
2195 '%' => add 1 upper case letter to the macro.
2197 2 upper case letter macros:
2198 "XY" => print 'x' or 'y' if no register operands or suffix_always
2200 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
2201 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
2202 or suffix_always is true
2203 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
2204 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
2205 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
2206 "LW" => print 'd', 'q' depending on the VEX.W bit
2208 Many of the above letters print nothing in Intel mode. See "putop"
2211 Braces '{' and '}', and vertical bars '|', indicate alternative
2212 mnemonic strings for AT&T and Intel. */
2214 static const struct dis386 dis386[] = {
2216 { "addB", { Ebh1, Gb } },
2217 { "addS", { Evh1, Gv } },
2218 { "addB", { Gb, EbS } },
2219 { "addS", { Gv, EvS } },
2220 { "addB", { AL, Ib } },
2221 { "addS", { eAX, Iv } },
2222 { X86_64_TABLE (X86_64_06) },
2223 { X86_64_TABLE (X86_64_07) },
2225 { "orB", { Ebh1, Gb } },
2226 { "orS", { Evh1, Gv } },
2227 { "orB", { Gb, EbS } },
2228 { "orS", { Gv, EvS } },
2229 { "orB", { AL, Ib } },
2230 { "orS", { eAX, Iv } },
2231 { X86_64_TABLE (X86_64_0D) },
2232 { Bad_Opcode }, /* 0x0f extended opcode escape */
2234 { "adcB", { Ebh1, Gb } },
2235 { "adcS", { Evh1, Gv } },
2236 { "adcB", { Gb, EbS } },
2237 { "adcS", { Gv, EvS } },
2238 { "adcB", { AL, Ib } },
2239 { "adcS", { eAX, Iv } },
2240 { X86_64_TABLE (X86_64_16) },
2241 { X86_64_TABLE (X86_64_17) },
2243 { "sbbB", { Ebh1, Gb } },
2244 { "sbbS", { Evh1, Gv } },
2245 { "sbbB", { Gb, EbS } },
2246 { "sbbS", { Gv, EvS } },
2247 { "sbbB", { AL, Ib } },
2248 { "sbbS", { eAX, Iv } },
2249 { X86_64_TABLE (X86_64_1E) },
2250 { X86_64_TABLE (X86_64_1F) },
2252 { "andB", { Ebh1, Gb } },
2253 { "andS", { Evh1, Gv } },
2254 { "andB", { Gb, EbS } },
2255 { "andS", { Gv, EvS } },
2256 { "andB", { AL, Ib } },
2257 { "andS", { eAX, Iv } },
2258 { Bad_Opcode }, /* SEG ES prefix */
2259 { X86_64_TABLE (X86_64_27) },
2261 { "subB", { Ebh1, Gb } },
2262 { "subS", { Evh1, Gv } },
2263 { "subB", { Gb, EbS } },
2264 { "subS", { Gv, EvS } },
2265 { "subB", { AL, Ib } },
2266 { "subS", { eAX, Iv } },
2267 { Bad_Opcode }, /* SEG CS prefix */
2268 { X86_64_TABLE (X86_64_2F) },
2270 { "xorB", { Ebh1, Gb } },
2271 { "xorS", { Evh1, Gv } },
2272 { "xorB", { Gb, EbS } },
2273 { "xorS", { Gv, EvS } },
2274 { "xorB", { AL, Ib } },
2275 { "xorS", { eAX, Iv } },
2276 { Bad_Opcode }, /* SEG SS prefix */
2277 { X86_64_TABLE (X86_64_37) },
2279 { "cmpB", { Eb, Gb } },
2280 { "cmpS", { Ev, Gv } },
2281 { "cmpB", { Gb, EbS } },
2282 { "cmpS", { Gv, EvS } },
2283 { "cmpB", { AL, Ib } },
2284 { "cmpS", { eAX, Iv } },
2285 { Bad_Opcode }, /* SEG DS prefix */
2286 { X86_64_TABLE (X86_64_3F) },
2288 { "inc{S|}", { RMeAX } },
2289 { "inc{S|}", { RMeCX } },
2290 { "inc{S|}", { RMeDX } },
2291 { "inc{S|}", { RMeBX } },
2292 { "inc{S|}", { RMeSP } },
2293 { "inc{S|}", { RMeBP } },
2294 { "inc{S|}", { RMeSI } },
2295 { "inc{S|}", { RMeDI } },
2297 { "dec{S|}", { RMeAX } },
2298 { "dec{S|}", { RMeCX } },
2299 { "dec{S|}", { RMeDX } },
2300 { "dec{S|}", { RMeBX } },
2301 { "dec{S|}", { RMeSP } },
2302 { "dec{S|}", { RMeBP } },
2303 { "dec{S|}", { RMeSI } },
2304 { "dec{S|}", { RMeDI } },
2306 { "pushV", { RMrAX } },
2307 { "pushV", { RMrCX } },
2308 { "pushV", { RMrDX } },
2309 { "pushV", { RMrBX } },
2310 { "pushV", { RMrSP } },
2311 { "pushV", { RMrBP } },
2312 { "pushV", { RMrSI } },
2313 { "pushV", { RMrDI } },
2315 { "popV", { RMrAX } },
2316 { "popV", { RMrCX } },
2317 { "popV", { RMrDX } },
2318 { "popV", { RMrBX } },
2319 { "popV", { RMrSP } },
2320 { "popV", { RMrBP } },
2321 { "popV", { RMrSI } },
2322 { "popV", { RMrDI } },
2324 { X86_64_TABLE (X86_64_60) },
2325 { X86_64_TABLE (X86_64_61) },
2326 { X86_64_TABLE (X86_64_62) },
2327 { X86_64_TABLE (X86_64_63) },
2328 { Bad_Opcode }, /* seg fs */
2329 { Bad_Opcode }, /* seg gs */
2330 { Bad_Opcode }, /* op size prefix */
2331 { Bad_Opcode }, /* adr size prefix */
2333 { "pushT", { sIv } },
2334 { "imulS", { Gv, Ev, Iv } },
2335 { "pushT", { sIbT } },
2336 { "imulS", { Gv, Ev, sIb } },
2337 { "ins{b|}", { Ybr, indirDX } },
2338 { X86_64_TABLE (X86_64_6D) },
2339 { "outs{b|}", { indirDXr, Xb } },
2340 { X86_64_TABLE (X86_64_6F) },
2342 { "joH", { Jb, BND, cond_jump_flag } },
2343 { "jnoH", { Jb, BND, cond_jump_flag } },
2344 { "jbH", { Jb, BND, cond_jump_flag } },
2345 { "jaeH", { Jb, BND, cond_jump_flag } },
2346 { "jeH", { Jb, BND, cond_jump_flag } },
2347 { "jneH", { Jb, BND, cond_jump_flag } },
2348 { "jbeH", { Jb, BND, cond_jump_flag } },
2349 { "jaH", { Jb, BND, cond_jump_flag } },
2351 { "jsH", { Jb, BND, cond_jump_flag } },
2352 { "jnsH", { Jb, BND, cond_jump_flag } },
2353 { "jpH", { Jb, BND, cond_jump_flag } },
2354 { "jnpH", { Jb, BND, cond_jump_flag } },
2355 { "jlH", { Jb, BND, cond_jump_flag } },
2356 { "jgeH", { Jb, BND, cond_jump_flag } },
2357 { "jleH", { Jb, BND, cond_jump_flag } },
2358 { "jgH", { Jb, BND, cond_jump_flag } },
2360 { REG_TABLE (REG_80) },
2361 { REG_TABLE (REG_81) },
2363 { REG_TABLE (REG_82) },
2364 { "testB", { Eb, Gb } },
2365 { "testS", { Ev, Gv } },
2366 { "xchgB", { Ebh2, Gb } },
2367 { "xchgS", { Evh2, Gv } },
2369 { "movB", { Ebh3, Gb } },
2370 { "movS", { Evh3, Gv } },
2371 { "movB", { Gb, EbS } },
2372 { "movS", { Gv, EvS } },
2373 { "movD", { Sv, Sw } },
2374 { MOD_TABLE (MOD_8D) },
2375 { "movD", { Sw, Sv } },
2376 { REG_TABLE (REG_8F) },
2378 { PREFIX_TABLE (PREFIX_90) },
2379 { "xchgS", { RMeCX, eAX } },
2380 { "xchgS", { RMeDX, eAX } },
2381 { "xchgS", { RMeBX, eAX } },
2382 { "xchgS", { RMeSP, eAX } },
2383 { "xchgS", { RMeBP, eAX } },
2384 { "xchgS", { RMeSI, eAX } },
2385 { "xchgS", { RMeDI, eAX } },
2387 { "cW{t|}R", { XX } },
2388 { "cR{t|}O", { XX } },
2389 { X86_64_TABLE (X86_64_9A) },
2390 { Bad_Opcode }, /* fwait */
2391 { "pushfT", { XX } },
2392 { "popfT", { XX } },
2396 { "mov%LB", { AL, Ob } },
2397 { "mov%LS", { eAX, Ov } },
2398 { "mov%LB", { Ob, AL } },
2399 { "mov%LS", { Ov, eAX } },
2400 { "movs{b|}", { Ybr, Xb } },
2401 { "movs{R|}", { Yvr, Xv } },
2402 { "cmps{b|}", { Xb, Yb } },
2403 { "cmps{R|}", { Xv, Yv } },
2405 { "testB", { AL, Ib } },
2406 { "testS", { eAX, Iv } },
2407 { "stosB", { Ybr, AL } },
2408 { "stosS", { Yvr, eAX } },
2409 { "lodsB", { ALr, Xb } },
2410 { "lodsS", { eAXr, Xv } },
2411 { "scasB", { AL, Yb } },
2412 { "scasS", { eAX, Yv } },
2414 { "movB", { RMAL, Ib } },
2415 { "movB", { RMCL, Ib } },
2416 { "movB", { RMDL, Ib } },
2417 { "movB", { RMBL, Ib } },
2418 { "movB", { RMAH, Ib } },
2419 { "movB", { RMCH, Ib } },
2420 { "movB", { RMDH, Ib } },
2421 { "movB", { RMBH, Ib } },
2423 { "mov%LV", { RMeAX, Iv64 } },
2424 { "mov%LV", { RMeCX, Iv64 } },
2425 { "mov%LV", { RMeDX, Iv64 } },
2426 { "mov%LV", { RMeBX, Iv64 } },
2427 { "mov%LV", { RMeSP, Iv64 } },
2428 { "mov%LV", { RMeBP, Iv64 } },
2429 { "mov%LV", { RMeSI, Iv64 } },
2430 { "mov%LV", { RMeDI, Iv64 } },
2432 { REG_TABLE (REG_C0) },
2433 { REG_TABLE (REG_C1) },
2434 { "retT", { Iw, BND } },
2435 { "retT", { BND } },
2436 { X86_64_TABLE (X86_64_C4) },
2437 { X86_64_TABLE (X86_64_C5) },
2438 { REG_TABLE (REG_C6) },
2439 { REG_TABLE (REG_C7) },
2441 { "enterT", { Iw, Ib } },
2442 { "leaveT", { XX } },
2443 { "Jret{|f}P", { Iw } },
2444 { "Jret{|f}P", { XX } },
2447 { X86_64_TABLE (X86_64_CE) },
2448 { "iretP", { XX } },
2450 { REG_TABLE (REG_D0) },
2451 { REG_TABLE (REG_D1) },
2452 { REG_TABLE (REG_D2) },
2453 { REG_TABLE (REG_D3) },
2454 { X86_64_TABLE (X86_64_D4) },
2455 { X86_64_TABLE (X86_64_D5) },
2457 { "xlat", { DSBX } },
2468 { "loopneFH", { Jb, XX, loop_jcxz_flag } },
2469 { "loopeFH", { Jb, XX, loop_jcxz_flag } },
2470 { "loopFH", { Jb, XX, loop_jcxz_flag } },
2471 { "jEcxzH", { Jb, XX, loop_jcxz_flag } },
2472 { "inB", { AL, Ib } },
2473 { "inG", { zAX, Ib } },
2474 { "outB", { Ib, AL } },
2475 { "outG", { Ib, zAX } },
2477 { "callT", { Jv, BND } },
2478 { "jmpT", { Jv, BND } },
2479 { X86_64_TABLE (X86_64_EA) },
2480 { "jmp", { Jb, BND } },
2481 { "inB", { AL, indirDX } },
2482 { "inG", { zAX, indirDX } },
2483 { "outB", { indirDX, AL } },
2484 { "outG", { indirDX, zAX } },
2486 { Bad_Opcode }, /* lock prefix */
2487 { "icebp", { XX } },
2488 { Bad_Opcode }, /* repne */
2489 { Bad_Opcode }, /* repz */
2492 { REG_TABLE (REG_F6) },
2493 { REG_TABLE (REG_F7) },
2501 { REG_TABLE (REG_FE) },
2502 { REG_TABLE (REG_FF) },
2505 static const struct dis386 dis386_twobyte[] = {
2507 { REG_TABLE (REG_0F00 ) },
2508 { REG_TABLE (REG_0F01 ) },
2509 { "larS", { Gv, Ew } },
2510 { "lslS", { Gv, Ew } },
2512 { "syscall", { XX } },
2514 { "sysretP", { XX } },
2517 { "wbinvd", { XX } },
2521 { REG_TABLE (REG_0F0D) },
2522 { "femms", { XX } },
2523 { "", { MX, EM, OPSUF } }, /* See OP_3DNowSuffix. */
2525 { PREFIX_TABLE (PREFIX_0F10) },
2526 { PREFIX_TABLE (PREFIX_0F11) },
2527 { PREFIX_TABLE (PREFIX_0F12) },
2528 { MOD_TABLE (MOD_0F13) },
2529 { "unpcklpX", { XM, EXx } },
2530 { "unpckhpX", { XM, EXx } },
2531 { PREFIX_TABLE (PREFIX_0F16) },
2532 { MOD_TABLE (MOD_0F17) },
2534 { REG_TABLE (REG_0F18) },
2536 { PREFIX_TABLE (PREFIX_0F1A) },
2537 { PREFIX_TABLE (PREFIX_0F1B) },
2543 { MOD_TABLE (MOD_0F20) },
2544 { MOD_TABLE (MOD_0F21) },
2545 { MOD_TABLE (MOD_0F22) },
2546 { MOD_TABLE (MOD_0F23) },
2547 { MOD_TABLE (MOD_0F24) },
2549 { MOD_TABLE (MOD_0F26) },
2552 { "movapX", { XM, EXx } },
2553 { "movapX", { EXxS, XM } },
2554 { PREFIX_TABLE (PREFIX_0F2A) },
2555 { PREFIX_TABLE (PREFIX_0F2B) },
2556 { PREFIX_TABLE (PREFIX_0F2C) },
2557 { PREFIX_TABLE (PREFIX_0F2D) },
2558 { PREFIX_TABLE (PREFIX_0F2E) },
2559 { PREFIX_TABLE (PREFIX_0F2F) },
2561 { "wrmsr", { XX } },
2562 { "rdtsc", { XX } },
2563 { "rdmsr", { XX } },
2564 { "rdpmc", { XX } },
2565 { "sysenter", { XX } },
2566 { "sysexit", { XX } },
2568 { "getsec", { XX } },
2570 { THREE_BYTE_TABLE (THREE_BYTE_0F38) },
2572 { THREE_BYTE_TABLE (THREE_BYTE_0F3A) },
2579 { "cmovoS", { Gv, Ev } },
2580 { "cmovnoS", { Gv, Ev } },
2581 { "cmovbS", { Gv, Ev } },
2582 { "cmovaeS", { Gv, Ev } },
2583 { "cmoveS", { Gv, Ev } },
2584 { "cmovneS", { Gv, Ev } },
2585 { "cmovbeS", { Gv, Ev } },
2586 { "cmovaS", { Gv, Ev } },
2588 { "cmovsS", { Gv, Ev } },
2589 { "cmovnsS", { Gv, Ev } },
2590 { "cmovpS", { Gv, Ev } },
2591 { "cmovnpS", { Gv, Ev } },
2592 { "cmovlS", { Gv, Ev } },
2593 { "cmovgeS", { Gv, Ev } },
2594 { "cmovleS", { Gv, Ev } },
2595 { "cmovgS", { Gv, Ev } },
2597 { MOD_TABLE (MOD_0F51) },
2598 { PREFIX_TABLE (PREFIX_0F51) },
2599 { PREFIX_TABLE (PREFIX_0F52) },
2600 { PREFIX_TABLE (PREFIX_0F53) },
2601 { "andpX", { XM, EXx } },
2602 { "andnpX", { XM, EXx } },
2603 { "orpX", { XM, EXx } },
2604 { "xorpX", { XM, EXx } },
2606 { PREFIX_TABLE (PREFIX_0F58) },
2607 { PREFIX_TABLE (PREFIX_0F59) },
2608 { PREFIX_TABLE (PREFIX_0F5A) },
2609 { PREFIX_TABLE (PREFIX_0F5B) },
2610 { PREFIX_TABLE (PREFIX_0F5C) },
2611 { PREFIX_TABLE (PREFIX_0F5D) },
2612 { PREFIX_TABLE (PREFIX_0F5E) },
2613 { PREFIX_TABLE (PREFIX_0F5F) },
2615 { PREFIX_TABLE (PREFIX_0F60) },
2616 { PREFIX_TABLE (PREFIX_0F61) },
2617 { PREFIX_TABLE (PREFIX_0F62) },
2618 { "packsswb", { MX, EM } },
2619 { "pcmpgtb", { MX, EM } },
2620 { "pcmpgtw", { MX, EM } },
2621 { "pcmpgtd", { MX, EM } },
2622 { "packuswb", { MX, EM } },
2624 { "punpckhbw", { MX, EM } },
2625 { "punpckhwd", { MX, EM } },
2626 { "punpckhdq", { MX, EM } },
2627 { "packssdw", { MX, EM } },
2628 { PREFIX_TABLE (PREFIX_0F6C) },
2629 { PREFIX_TABLE (PREFIX_0F6D) },
2630 { "movK", { MX, Edq } },
2631 { PREFIX_TABLE (PREFIX_0F6F) },
2633 { PREFIX_TABLE (PREFIX_0F70) },
2634 { REG_TABLE (REG_0F71) },
2635 { REG_TABLE (REG_0F72) },
2636 { REG_TABLE (REG_0F73) },
2637 { "pcmpeqb", { MX, EM } },
2638 { "pcmpeqw", { MX, EM } },
2639 { "pcmpeqd", { MX, EM } },
2642 { PREFIX_TABLE (PREFIX_0F78) },
2643 { PREFIX_TABLE (PREFIX_0F79) },
2644 { THREE_BYTE_TABLE (THREE_BYTE_0F7A) },
2646 { PREFIX_TABLE (PREFIX_0F7C) },
2647 { PREFIX_TABLE (PREFIX_0F7D) },
2648 { PREFIX_TABLE (PREFIX_0F7E) },
2649 { PREFIX_TABLE (PREFIX_0F7F) },
2651 { "joH", { Jv, BND, cond_jump_flag } },
2652 { "jnoH", { Jv, BND, cond_jump_flag } },
2653 { "jbH", { Jv, BND, cond_jump_flag } },
2654 { "jaeH", { Jv, BND, cond_jump_flag } },
2655 { "jeH", { Jv, BND, cond_jump_flag } },
2656 { "jneH", { Jv, BND, cond_jump_flag } },
2657 { "jbeH", { Jv, BND, cond_jump_flag } },
2658 { "jaH", { Jv, BND, cond_jump_flag } },
2660 { "jsH", { Jv, BND, cond_jump_flag } },
2661 { "jnsH", { Jv, BND, cond_jump_flag } },
2662 { "jpH", { Jv, BND, cond_jump_flag } },
2663 { "jnpH", { Jv, BND, cond_jump_flag } },
2664 { "jlH", { Jv, BND, cond_jump_flag } },
2665 { "jgeH", { Jv, BND, cond_jump_flag } },
2666 { "jleH", { Jv, BND, cond_jump_flag } },
2667 { "jgH", { Jv, BND, cond_jump_flag } },
2670 { "setno", { Eb } },
2672 { "setae", { Eb } },
2674 { "setne", { Eb } },
2675 { "setbe", { Eb } },
2679 { "setns", { Eb } },
2681 { "setnp", { Eb } },
2683 { "setge", { Eb } },
2684 { "setle", { Eb } },
2687 { "pushT", { fs } },
2689 { "cpuid", { XX } },
2690 { "btS", { Ev, Gv } },
2691 { "shldS", { Ev, Gv, Ib } },
2692 { "shldS", { Ev, Gv, CL } },
2693 { REG_TABLE (REG_0FA6) },
2694 { REG_TABLE (REG_0FA7) },
2696 { "pushT", { gs } },
2699 { "btsS", { Evh1, Gv } },
2700 { "shrdS", { Ev, Gv, Ib } },
2701 { "shrdS", { Ev, Gv, CL } },
2702 { REG_TABLE (REG_0FAE) },
2703 { "imulS", { Gv, Ev } },
2705 { "cmpxchgB", { Ebh1, Gb } },
2706 { "cmpxchgS", { Evh1, Gv } },
2707 { MOD_TABLE (MOD_0FB2) },
2708 { "btrS", { Evh1, Gv } },
2709 { MOD_TABLE (MOD_0FB4) },
2710 { MOD_TABLE (MOD_0FB5) },
2711 { "movz{bR|x}", { Gv, Eb } },
2712 { "movz{wR|x}", { Gv, Ew } }, /* yes, there really is movzww ! */
2714 { PREFIX_TABLE (PREFIX_0FB8) },
2716 { REG_TABLE (REG_0FBA) },
2717 { "btcS", { Evh1, Gv } },
2718 { PREFIX_TABLE (PREFIX_0FBC) },
2719 { PREFIX_TABLE (PREFIX_0FBD) },
2720 { "movs{bR|x}", { Gv, Eb } },
2721 { "movs{wR|x}", { Gv, Ew } }, /* yes, there really is movsww ! */
2723 { "xaddB", { Ebh1, Gb } },
2724 { "xaddS", { Evh1, Gv } },
2725 { PREFIX_TABLE (PREFIX_0FC2) },
2726 { PREFIX_TABLE (PREFIX_0FC3) },
2727 { "pinsrw", { MX, Edqw, Ib } },
2728 { "pextrw", { Gdq, MS, Ib } },
2729 { "shufpX", { XM, EXx, Ib } },
2730 { REG_TABLE (REG_0FC7) },
2732 { "bswap", { RMeAX } },
2733 { "bswap", { RMeCX } },
2734 { "bswap", { RMeDX } },
2735 { "bswap", { RMeBX } },
2736 { "bswap", { RMeSP } },
2737 { "bswap", { RMeBP } },
2738 { "bswap", { RMeSI } },
2739 { "bswap", { RMeDI } },
2741 { PREFIX_TABLE (PREFIX_0FD0) },
2742 { "psrlw", { MX, EM } },
2743 { "psrld", { MX, EM } },
2744 { "psrlq", { MX, EM } },
2745 { "paddq", { MX, EM } },
2746 { "pmullw", { MX, EM } },
2747 { PREFIX_TABLE (PREFIX_0FD6) },
2748 { MOD_TABLE (MOD_0FD7) },
2750 { "psubusb", { MX, EM } },
2751 { "psubusw", { MX, EM } },
2752 { "pminub", { MX, EM } },
2753 { "pand", { MX, EM } },
2754 { "paddusb", { MX, EM } },
2755 { "paddusw", { MX, EM } },
2756 { "pmaxub", { MX, EM } },
2757 { "pandn", { MX, EM } },
2759 { "pavgb", { MX, EM } },
2760 { "psraw", { MX, EM } },
2761 { "psrad", { MX, EM } },
2762 { "pavgw", { MX, EM } },
2763 { "pmulhuw", { MX, EM } },
2764 { "pmulhw", { MX, EM } },
2765 { PREFIX_TABLE (PREFIX_0FE6) },
2766 { PREFIX_TABLE (PREFIX_0FE7) },
2768 { "psubsb", { MX, EM } },
2769 { "psubsw", { MX, EM } },
2770 { "pminsw", { MX, EM } },
2771 { "por", { MX, EM } },
2772 { "paddsb", { MX, EM } },
2773 { "paddsw", { MX, EM } },
2774 { "pmaxsw", { MX, EM } },
2775 { "pxor", { MX, EM } },
2777 { PREFIX_TABLE (PREFIX_0FF0) },
2778 { "psllw", { MX, EM } },
2779 { "pslld", { MX, EM } },
2780 { "psllq", { MX, EM } },
2781 { "pmuludq", { MX, EM } },
2782 { "pmaddwd", { MX, EM } },
2783 { "psadbw", { MX, EM } },
2784 { PREFIX_TABLE (PREFIX_0FF7) },
2786 { "psubb", { MX, EM } },
2787 { "psubw", { MX, EM } },
2788 { "psubd", { MX, EM } },
2789 { "psubq", { MX, EM } },
2790 { "paddb", { MX, EM } },
2791 { "paddw", { MX, EM } },
2792 { "paddd", { MX, EM } },
2796 static const unsigned char onebyte_has_modrm[256] = {
2797 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2798 /* ------------------------------- */
2799 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
2800 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
2801 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
2802 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
2803 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
2804 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
2805 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
2806 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
2807 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
2808 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
2809 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
2810 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
2811 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
2812 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
2813 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
2814 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
2815 /* ------------------------------- */
2816 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2819 static const unsigned char twobyte_has_modrm[256] = {
2820 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2821 /* ------------------------------- */
2822 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
2823 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
2824 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
2825 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
2826 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
2827 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
2828 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
2829 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
2830 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
2831 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
2832 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
2833 /* b0 */ 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, /* bf */
2834 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
2835 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
2836 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
2837 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
2838 /* ------------------------------- */
2839 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2842 static char obuf[100];
2844 static char *mnemonicendp;
2845 static char scratchbuf[100];
2846 static unsigned char *start_codep;
2847 static unsigned char *insn_codep;
2848 static unsigned char *codep;
2849 static int last_lock_prefix;
2850 static int last_repz_prefix;
2851 static int last_repnz_prefix;
2852 static int last_data_prefix;
2853 static int last_addr_prefix;
2854 static int last_rex_prefix;
2855 static int last_seg_prefix;
2856 #define MAX_CODE_LENGTH 15
2857 /* We can up to 14 prefixes since the maximum instruction length is
2859 static int all_prefixes[MAX_CODE_LENGTH - 1];
2860 static disassemble_info *the_info;
2868 static unsigned char need_modrm;
2878 int register_specifier;
2885 int mask_register_specifier;
2891 static unsigned char need_vex;
2892 static unsigned char need_vex_reg;
2893 static unsigned char vex_w_done;
2901 /* If we are accessing mod/rm/reg without need_modrm set, then the
2902 values are stale. Hitting this abort likely indicates that you
2903 need to update onebyte_has_modrm or twobyte_has_modrm. */
2904 #define MODRM_CHECK if (!need_modrm) abort ()
2906 static const char **names64;
2907 static const char **names32;
2908 static const char **names16;
2909 static const char **names8;
2910 static const char **names8rex;
2911 static const char **names_seg;
2912 static const char *index64;
2913 static const char *index32;
2914 static const char **index16;
2915 static const char **names_bnd;
2917 static const char *intel_names64[] = {
2918 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
2919 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
2921 static const char *intel_names32[] = {
2922 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
2923 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
2925 static const char *intel_names16[] = {
2926 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
2927 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
2929 static const char *intel_names8[] = {
2930 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
2932 static const char *intel_names8rex[] = {
2933 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
2934 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
2936 static const char *intel_names_seg[] = {
2937 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
2939 static const char *intel_index64 = "riz";
2940 static const char *intel_index32 = "eiz";
2941 static const char *intel_index16[] = {
2942 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
2945 static const char *att_names64[] = {
2946 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
2947 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
2949 static const char *att_names32[] = {
2950 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
2951 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
2953 static const char *att_names16[] = {
2954 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
2955 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
2957 static const char *att_names8[] = {
2958 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
2960 static const char *att_names8rex[] = {
2961 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
2962 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
2964 static const char *att_names_seg[] = {
2965 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
2967 static const char *att_index64 = "%riz";
2968 static const char *att_index32 = "%eiz";
2969 static const char *att_index16[] = {
2970 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
2973 static const char **names_mm;
2974 static const char *intel_names_mm[] = {
2975 "mm0", "mm1", "mm2", "mm3",
2976 "mm4", "mm5", "mm6", "mm7"
2978 static const char *att_names_mm[] = {
2979 "%mm0", "%mm1", "%mm2", "%mm3",
2980 "%mm4", "%mm5", "%mm6", "%mm7"
2983 static const char *intel_names_bnd[] = {
2984 "bnd0", "bnd1", "bnd2", "bnd3"
2987 static const char *att_names_bnd[] = {
2988 "%bnd0", "%bnd1", "%bnd2", "%bnd3"
2991 static const char **names_xmm;
2992 static const char *intel_names_xmm[] = {
2993 "xmm0", "xmm1", "xmm2", "xmm3",
2994 "xmm4", "xmm5", "xmm6", "xmm7",
2995 "xmm8", "xmm9", "xmm10", "xmm11",
2996 "xmm12", "xmm13", "xmm14", "xmm15",
2997 "xmm16", "xmm17", "xmm18", "xmm19",
2998 "xmm20", "xmm21", "xmm22", "xmm23",
2999 "xmm24", "xmm25", "xmm26", "xmm27",
3000 "xmm28", "xmm29", "xmm30", "xmm31"
3002 static const char *att_names_xmm[] = {
3003 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
3004 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
3005 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
3006 "%xmm12", "%xmm13", "%xmm14", "%xmm15",
3007 "%xmm16", "%xmm17", "%xmm18", "%xmm19",
3008 "%xmm20", "%xmm21", "%xmm22", "%xmm23",
3009 "%xmm24", "%xmm25", "%xmm26", "%xmm27",
3010 "%xmm28", "%xmm29", "%xmm30", "%xmm31"
3013 static const char **names_ymm;
3014 static const char *intel_names_ymm[] = {
3015 "ymm0", "ymm1", "ymm2", "ymm3",
3016 "ymm4", "ymm5", "ymm6", "ymm7",
3017 "ymm8", "ymm9", "ymm10", "ymm11",
3018 "ymm12", "ymm13", "ymm14", "ymm15",
3019 "ymm16", "ymm17", "ymm18", "ymm19",
3020 "ymm20", "ymm21", "ymm22", "ymm23",
3021 "ymm24", "ymm25", "ymm26", "ymm27",
3022 "ymm28", "ymm29", "ymm30", "ymm31"
3024 static const char *att_names_ymm[] = {
3025 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
3026 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
3027 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
3028 "%ymm12", "%ymm13", "%ymm14", "%ymm15",
3029 "%ymm16", "%ymm17", "%ymm18", "%ymm19",
3030 "%ymm20", "%ymm21", "%ymm22", "%ymm23",
3031 "%ymm24", "%ymm25", "%ymm26", "%ymm27",
3032 "%ymm28", "%ymm29", "%ymm30", "%ymm31"
3035 static const char **names_zmm;
3036 static const char *intel_names_zmm[] = {
3037 "zmm0", "zmm1", "zmm2", "zmm3",
3038 "zmm4", "zmm5", "zmm6", "zmm7",
3039 "zmm8", "zmm9", "zmm10", "zmm11",
3040 "zmm12", "zmm13", "zmm14", "zmm15",
3041 "zmm16", "zmm17", "zmm18", "zmm19",
3042 "zmm20", "zmm21", "zmm22", "zmm23",
3043 "zmm24", "zmm25", "zmm26", "zmm27",
3044 "zmm28", "zmm29", "zmm30", "zmm31"
3046 static const char *att_names_zmm[] = {
3047 "%zmm0", "%zmm1", "%zmm2", "%zmm3",
3048 "%zmm4", "%zmm5", "%zmm6", "%zmm7",
3049 "%zmm8", "%zmm9", "%zmm10", "%zmm11",
3050 "%zmm12", "%zmm13", "%zmm14", "%zmm15",
3051 "%zmm16", "%zmm17", "%zmm18", "%zmm19",
3052 "%zmm20", "%zmm21", "%zmm22", "%zmm23",
3053 "%zmm24", "%zmm25", "%zmm26", "%zmm27",
3054 "%zmm28", "%zmm29", "%zmm30", "%zmm31"
3057 static const char **names_mask;
3058 static const char *intel_names_mask[] = {
3059 "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"
3061 static const char *att_names_mask[] = {
3062 "%k0", "%k1", "%k2", "%k3", "%k4", "%k5", "%k6", "%k7"
3065 static const char *names_rounding[] =
3073 static const struct dis386 reg_table[][8] = {
3076 { "addA", { Ebh1, Ib } },
3077 { "orA", { Ebh1, Ib } },
3078 { "adcA", { Ebh1, Ib } },
3079 { "sbbA", { Ebh1, Ib } },
3080 { "andA", { Ebh1, Ib } },
3081 { "subA", { Ebh1, Ib } },
3082 { "xorA", { Ebh1, Ib } },
3083 { "cmpA", { Eb, Ib } },
3087 { "addQ", { Evh1, Iv } },
3088 { "orQ", { Evh1, Iv } },
3089 { "adcQ", { Evh1, Iv } },
3090 { "sbbQ", { Evh1, Iv } },
3091 { "andQ", { Evh1, Iv } },
3092 { "subQ", { Evh1, Iv } },
3093 { "xorQ", { Evh1, Iv } },
3094 { "cmpQ", { Ev, Iv } },
3098 { "addQ", { Evh1, sIb } },
3099 { "orQ", { Evh1, sIb } },
3100 { "adcQ", { Evh1, sIb } },
3101 { "sbbQ", { Evh1, sIb } },
3102 { "andQ", { Evh1, sIb } },
3103 { "subQ", { Evh1, sIb } },
3104 { "xorQ", { Evh1, sIb } },
3105 { "cmpQ", { Ev, sIb } },
3109 { "popU", { stackEv } },
3110 { XOP_8F_TABLE (XOP_09) },
3114 { XOP_8F_TABLE (XOP_09) },
3118 { "rolA", { Eb, Ib } },
3119 { "rorA", { Eb, Ib } },
3120 { "rclA", { Eb, Ib } },
3121 { "rcrA", { Eb, Ib } },
3122 { "shlA", { Eb, Ib } },
3123 { "shrA", { Eb, Ib } },
3125 { "sarA", { Eb, Ib } },
3129 { "rolQ", { Ev, Ib } },
3130 { "rorQ", { Ev, Ib } },
3131 { "rclQ", { Ev, Ib } },
3132 { "rcrQ", { Ev, Ib } },
3133 { "shlQ", { Ev, Ib } },
3134 { "shrQ", { Ev, Ib } },
3136 { "sarQ", { Ev, Ib } },
3140 { "movA", { Ebh3, Ib } },
3147 { MOD_TABLE (MOD_C6_REG_7) },
3151 { "movQ", { Evh3, Iv } },
3158 { MOD_TABLE (MOD_C7_REG_7) },
3162 { "rolA", { Eb, I1 } },
3163 { "rorA", { Eb, I1 } },
3164 { "rclA", { Eb, I1 } },
3165 { "rcrA", { Eb, I1 } },
3166 { "shlA", { Eb, I1 } },
3167 { "shrA", { Eb, I1 } },
3169 { "sarA", { Eb, I1 } },
3173 { "rolQ", { Ev, I1 } },
3174 { "rorQ", { Ev, I1 } },
3175 { "rclQ", { Ev, I1 } },
3176 { "rcrQ", { Ev, I1 } },
3177 { "shlQ", { Ev, I1 } },
3178 { "shrQ", { Ev, I1 } },
3180 { "sarQ", { Ev, I1 } },
3184 { "rolA", { Eb, CL } },
3185 { "rorA", { Eb, CL } },
3186 { "rclA", { Eb, CL } },
3187 { "rcrA", { Eb, CL } },
3188 { "shlA", { Eb, CL } },
3189 { "shrA", { Eb, CL } },
3191 { "sarA", { Eb, CL } },
3195 { "rolQ", { Ev, CL } },
3196 { "rorQ", { Ev, CL } },
3197 { "rclQ", { Ev, CL } },
3198 { "rcrQ", { Ev, CL } },
3199 { "shlQ", { Ev, CL } },
3200 { "shrQ", { Ev, CL } },
3202 { "sarQ", { Ev, CL } },
3206 { "testA", { Eb, Ib } },
3208 { "notA", { Ebh1 } },
3209 { "negA", { Ebh1 } },
3210 { "mulA", { Eb } }, /* Don't print the implicit %al register, */
3211 { "imulA", { Eb } }, /* to distinguish these opcodes from other */
3212 { "divA", { Eb } }, /* mul/imul opcodes. Do the same for div */
3213 { "idivA", { Eb } }, /* and idiv for consistency. */
3217 { "testQ", { Ev, Iv } },
3219 { "notQ", { Evh1 } },
3220 { "negQ", { Evh1 } },
3221 { "mulQ", { Ev } }, /* Don't print the implicit register. */
3222 { "imulQ", { Ev } },
3224 { "idivQ", { Ev } },
3228 { "incA", { Ebh1 } },
3229 { "decA", { Ebh1 } },
3233 { "incQ", { Evh1 } },
3234 { "decQ", { Evh1 } },
3235 { "call{T|}", { indirEv, BND } },
3236 { MOD_TABLE (MOD_FF_REG_3) },
3237 { "jmp{T|}", { indirEv, BND } },
3238 { MOD_TABLE (MOD_FF_REG_5) },
3239 { "pushU", { stackEv } },
3244 { "sldtD", { Sv } },
3255 { MOD_TABLE (MOD_0F01_REG_0) },
3256 { MOD_TABLE (MOD_0F01_REG_1) },
3257 { MOD_TABLE (MOD_0F01_REG_2) },
3258 { MOD_TABLE (MOD_0F01_REG_3) },
3259 { "smswD", { Sv } },
3262 { MOD_TABLE (MOD_0F01_REG_7) },
3266 { "prefetch", { Mb } },
3267 { "prefetchw", { Mb } },
3268 { "prefetchwt1", { Mb } },
3269 { "prefetch", { Mb } },
3270 { "prefetch", { Mb } },
3271 { "prefetch", { Mb } },
3272 { "prefetch", { Mb } },
3273 { "prefetch", { Mb } },
3277 { MOD_TABLE (MOD_0F18_REG_0) },
3278 { MOD_TABLE (MOD_0F18_REG_1) },
3279 { MOD_TABLE (MOD_0F18_REG_2) },
3280 { MOD_TABLE (MOD_0F18_REG_3) },
3281 { MOD_TABLE (MOD_0F18_REG_4) },
3282 { MOD_TABLE (MOD_0F18_REG_5) },
3283 { MOD_TABLE (MOD_0F18_REG_6) },
3284 { MOD_TABLE (MOD_0F18_REG_7) },
3290 { MOD_TABLE (MOD_0F71_REG_2) },
3292 { MOD_TABLE (MOD_0F71_REG_4) },
3294 { MOD_TABLE (MOD_0F71_REG_6) },
3300 { MOD_TABLE (MOD_0F72_REG_2) },
3302 { MOD_TABLE (MOD_0F72_REG_4) },
3304 { MOD_TABLE (MOD_0F72_REG_6) },
3310 { MOD_TABLE (MOD_0F73_REG_2) },
3311 { MOD_TABLE (MOD_0F73_REG_3) },
3314 { MOD_TABLE (MOD_0F73_REG_6) },
3315 { MOD_TABLE (MOD_0F73_REG_7) },
3319 { "montmul", { { OP_0f07, 0 } } },
3320 { "xsha1", { { OP_0f07, 0 } } },
3321 { "xsha256", { { OP_0f07, 0 } } },
3325 { "xstore-rng", { { OP_0f07, 0 } } },
3326 { "xcrypt-ecb", { { OP_0f07, 0 } } },
3327 { "xcrypt-cbc", { { OP_0f07, 0 } } },
3328 { "xcrypt-ctr", { { OP_0f07, 0 } } },
3329 { "xcrypt-cfb", { { OP_0f07, 0 } } },
3330 { "xcrypt-ofb", { { OP_0f07, 0 } } },
3334 { MOD_TABLE (MOD_0FAE_REG_0) },
3335 { MOD_TABLE (MOD_0FAE_REG_1) },
3336 { MOD_TABLE (MOD_0FAE_REG_2) },
3337 { MOD_TABLE (MOD_0FAE_REG_3) },
3338 { MOD_TABLE (MOD_0FAE_REG_4) },
3339 { MOD_TABLE (MOD_0FAE_REG_5) },
3340 { MOD_TABLE (MOD_0FAE_REG_6) },
3341 { MOD_TABLE (MOD_0FAE_REG_7) },
3349 { "btQ", { Ev, Ib } },
3350 { "btsQ", { Evh1, Ib } },
3351 { "btrQ", { Evh1, Ib } },
3352 { "btcQ", { Evh1, Ib } },
3357 { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } } },
3359 { MOD_TABLE (MOD_0FC7_REG_3) },
3360 { MOD_TABLE (MOD_0FC7_REG_4) },
3361 { MOD_TABLE (MOD_0FC7_REG_5) },
3362 { MOD_TABLE (MOD_0FC7_REG_6) },
3363 { MOD_TABLE (MOD_0FC7_REG_7) },
3369 { MOD_TABLE (MOD_VEX_0F71_REG_2) },
3371 { MOD_TABLE (MOD_VEX_0F71_REG_4) },
3373 { MOD_TABLE (MOD_VEX_0F71_REG_6) },
3379 { MOD_TABLE (MOD_VEX_0F72_REG_2) },
3381 { MOD_TABLE (MOD_VEX_0F72_REG_4) },
3383 { MOD_TABLE (MOD_VEX_0F72_REG_6) },
3389 { MOD_TABLE (MOD_VEX_0F73_REG_2) },
3390 { MOD_TABLE (MOD_VEX_0F73_REG_3) },
3393 { MOD_TABLE (MOD_VEX_0F73_REG_6) },
3394 { MOD_TABLE (MOD_VEX_0F73_REG_7) },
3400 { MOD_TABLE (MOD_VEX_0FAE_REG_2) },
3401 { MOD_TABLE (MOD_VEX_0FAE_REG_3) },
3403 /* REG_VEX_0F38F3 */
3406 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1) },
3407 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2) },
3408 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3) },
3412 { "llwpcb", { { OP_LWPCB_E, 0 } } },
3413 { "slwpcb", { { OP_LWPCB_E, 0 } } },
3417 { "lwpins", { { OP_LWP_E, 0 }, Ed, Iq } },
3418 { "lwpval", { { OP_LWP_E, 0 }, Ed, Iq } },
3420 /* REG_XOP_TBM_01 */
3423 { "blcfill", { { OP_LWP_E, 0 }, Ev } },
3424 { "blsfill", { { OP_LWP_E, 0 }, Ev } },
3425 { "blcs", { { OP_LWP_E, 0 }, Ev } },
3426 { "tzmsk", { { OP_LWP_E, 0 }, Ev } },
3427 { "blcic", { { OP_LWP_E, 0 }, Ev } },
3428 { "blsic", { { OP_LWP_E, 0 }, Ev } },
3429 { "t1mskc", { { OP_LWP_E, 0 }, Ev } },
3431 /* REG_XOP_TBM_02 */
3434 { "blcmsk", { { OP_LWP_E, 0 }, Ev } },
3439 { "blci", { { OP_LWP_E, 0 }, Ev } },
3441 #define NEED_REG_TABLE
3442 #include "i386-dis-evex.h"
3443 #undef NEED_REG_TABLE
3446 static const struct dis386 prefix_table[][4] = {
3449 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
3450 { "pause", { XX } },
3451 { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
3456 { "movups", { XM, EXx } },
3457 { "movss", { XM, EXd } },
3458 { "movupd", { XM, EXx } },
3459 { "movsd", { XM, EXq } },
3464 { "movups", { EXxS, XM } },
3465 { "movss", { EXdS, XM } },
3466 { "movupd", { EXxS, XM } },
3467 { "movsd", { EXqS, XM } },
3472 { MOD_TABLE (MOD_0F12_PREFIX_0) },
3473 { "movsldup", { XM, EXx } },
3474 { "movlpd", { XM, EXq } },
3475 { "movddup", { XM, EXq } },
3480 { MOD_TABLE (MOD_0F16_PREFIX_0) },
3481 { "movshdup", { XM, EXx } },
3482 { "movhpd", { XM, EXq } },
3487 { MOD_TABLE (MOD_0F1A_PREFIX_0) },
3488 { "bndcl", { Gbnd, Ev_bnd } },
3489 { "bndmov", { Gbnd, Ebnd } },
3490 { "bndcu", { Gbnd, Ev_bnd } },
3495 { MOD_TABLE (MOD_0F1B_PREFIX_0) },
3496 { MOD_TABLE (MOD_0F1B_PREFIX_1) },
3497 { "bndmov", { Ebnd, Gbnd } },
3498 { "bndcn", { Gbnd, Ev_bnd } },
3503 { "cvtpi2ps", { XM, EMCq } },
3504 { "cvtsi2ss%LQ", { XM, Ev } },
3505 { "cvtpi2pd", { XM, EMCq } },
3506 { "cvtsi2sd%LQ", { XM, Ev } },
3511 { MOD_TABLE (MOD_0F2B_PREFIX_0) },
3512 { MOD_TABLE (MOD_0F2B_PREFIX_1) },
3513 { MOD_TABLE (MOD_0F2B_PREFIX_2) },
3514 { MOD_TABLE (MOD_0F2B_PREFIX_3) },
3519 { "cvttps2pi", { MXC, EXq } },
3520 { "cvttss2siY", { Gv, EXd } },
3521 { "cvttpd2pi", { MXC, EXx } },
3522 { "cvttsd2siY", { Gv, EXq } },
3527 { "cvtps2pi", { MXC, EXq } },
3528 { "cvtss2siY", { Gv, EXd } },
3529 { "cvtpd2pi", { MXC, EXx } },
3530 { "cvtsd2siY", { Gv, EXq } },
3535 { "ucomiss",{ XM, EXd } },
3537 { "ucomisd",{ XM, EXq } },
3542 { "comiss", { XM, EXd } },
3544 { "comisd", { XM, EXq } },
3549 { "sqrtps", { XM, EXx } },
3550 { "sqrtss", { XM, EXd } },
3551 { "sqrtpd", { XM, EXx } },
3552 { "sqrtsd", { XM, EXq } },
3557 { "rsqrtps",{ XM, EXx } },
3558 { "rsqrtss",{ XM, EXd } },
3563 { "rcpps", { XM, EXx } },
3564 { "rcpss", { XM, EXd } },
3569 { "addps", { XM, EXx } },
3570 { "addss", { XM, EXd } },
3571 { "addpd", { XM, EXx } },
3572 { "addsd", { XM, EXq } },
3577 { "mulps", { XM, EXx } },
3578 { "mulss", { XM, EXd } },
3579 { "mulpd", { XM, EXx } },
3580 { "mulsd", { XM, EXq } },
3585 { "cvtps2pd", { XM, EXq } },
3586 { "cvtss2sd", { XM, EXd } },
3587 { "cvtpd2ps", { XM, EXx } },
3588 { "cvtsd2ss", { XM, EXq } },
3593 { "cvtdq2ps", { XM, EXx } },
3594 { "cvttps2dq", { XM, EXx } },
3595 { "cvtps2dq", { XM, EXx } },
3600 { "subps", { XM, EXx } },
3601 { "subss", { XM, EXd } },
3602 { "subpd", { XM, EXx } },
3603 { "subsd", { XM, EXq } },
3608 { "minps", { XM, EXx } },
3609 { "minss", { XM, EXd } },
3610 { "minpd", { XM, EXx } },
3611 { "minsd", { XM, EXq } },
3616 { "divps", { XM, EXx } },
3617 { "divss", { XM, EXd } },
3618 { "divpd", { XM, EXx } },
3619 { "divsd", { XM, EXq } },
3624 { "maxps", { XM, EXx } },
3625 { "maxss", { XM, EXd } },
3626 { "maxpd", { XM, EXx } },
3627 { "maxsd", { XM, EXq } },
3632 { "punpcklbw",{ MX, EMd } },
3634 { "punpcklbw",{ MX, EMx } },
3639 { "punpcklwd",{ MX, EMd } },
3641 { "punpcklwd",{ MX, EMx } },
3646 { "punpckldq",{ MX, EMd } },
3648 { "punpckldq",{ MX, EMx } },
3655 { "punpcklqdq", { XM, EXx } },
3662 { "punpckhqdq", { XM, EXx } },
3667 { "movq", { MX, EM } },
3668 { "movdqu", { XM, EXx } },
3669 { "movdqa", { XM, EXx } },
3674 { "pshufw", { MX, EM, Ib } },
3675 { "pshufhw",{ XM, EXx, Ib } },
3676 { "pshufd", { XM, EXx, Ib } },
3677 { "pshuflw",{ XM, EXx, Ib } },
3680 /* PREFIX_0F73_REG_3 */
3684 { "psrldq", { XS, Ib } },
3687 /* PREFIX_0F73_REG_7 */
3691 { "pslldq", { XS, Ib } },
3696 {"vmread", { Em, Gm } },
3698 {"extrq", { XS, Ib, Ib } },
3699 {"insertq", { XM, XS, Ib, Ib } },
3704 {"vmwrite", { Gm, Em } },
3706 {"extrq", { XM, XS } },
3707 {"insertq", { XM, XS } },
3714 { "haddpd", { XM, EXx } },
3715 { "haddps", { XM, EXx } },
3722 { "hsubpd", { XM, EXx } },
3723 { "hsubps", { XM, EXx } },
3728 { "movK", { Edq, MX } },
3729 { "movq", { XM, EXq } },
3730 { "movK", { Edq, XM } },
3735 { "movq", { EMS, MX } },
3736 { "movdqu", { EXxS, XM } },
3737 { "movdqa", { EXxS, XM } },
3740 /* PREFIX_0FAE_REG_0 */
3743 { "rdfsbase", { Ev } },
3746 /* PREFIX_0FAE_REG_1 */
3749 { "rdgsbase", { Ev } },
3752 /* PREFIX_0FAE_REG_2 */
3755 { "wrfsbase", { Ev } },
3758 /* PREFIX_0FAE_REG_3 */
3761 { "wrgsbase", { Ev } },
3764 /* PREFIX_0FAE_REG_7 */
3766 { "clflush", { Mb } },
3768 { "clflushopt", { Mb } },
3774 { "popcntS", { Gv, Ev } },
3779 { "bsfS", { Gv, Ev } },
3780 { "tzcntS", { Gv, Ev } },
3781 { "bsfS", { Gv, Ev } },
3786 { "bsrS", { Gv, Ev } },
3787 { "lzcntS", { Gv, Ev } },
3788 { "bsrS", { Gv, Ev } },
3793 { "cmpps", { XM, EXx, CMP } },
3794 { "cmpss", { XM, EXd, CMP } },
3795 { "cmppd", { XM, EXx, CMP } },
3796 { "cmpsd", { XM, EXq, CMP } },
3801 { "movntiS", { Ma, Gv } },
3804 /* PREFIX_0FC7_REG_6 */
3806 { "vmptrld",{ Mq } },
3807 { "vmxon", { Mq } },
3808 { "vmclear",{ Mq } },
3815 { "addsubpd", { XM, EXx } },
3816 { "addsubps", { XM, EXx } },
3822 { "movq2dq",{ XM, MS } },
3823 { "movq", { EXqS, XM } },
3824 { "movdq2q",{ MX, XS } },
3830 { "cvtdq2pd", { XM, EXq } },
3831 { "cvttpd2dq", { XM, EXx } },
3832 { "cvtpd2dq", { XM, EXx } },
3837 { "movntq", { Mq, MX } },
3839 { MOD_TABLE (MOD_0FE7_PREFIX_2) },
3847 { MOD_TABLE (MOD_0FF0_PREFIX_3) },
3852 { "maskmovq", { MX, MS } },
3854 { "maskmovdqu", { XM, XS } },
3861 { "pblendvb", { XM, EXx, XMM0 } },
3868 { "blendvps", { XM, EXx, XMM0 } },
3875 { "blendvpd", { XM, EXx, XMM0 } },
3882 { "ptest", { XM, EXx } },
3889 { "pmovsxbw", { XM, EXq } },
3896 { "pmovsxbd", { XM, EXd } },
3903 { "pmovsxbq", { XM, EXw } },
3910 { "pmovsxwd", { XM, EXq } },
3917 { "pmovsxwq", { XM, EXd } },
3924 { "pmovsxdq", { XM, EXq } },
3931 { "pmuldq", { XM, EXx } },
3938 { "pcmpeqq", { XM, EXx } },
3945 { MOD_TABLE (MOD_0F382A_PREFIX_2) },
3952 { "packusdw", { XM, EXx } },
3959 { "pmovzxbw", { XM, EXq } },
3966 { "pmovzxbd", { XM, EXd } },
3973 { "pmovzxbq", { XM, EXw } },
3980 { "pmovzxwd", { XM, EXq } },
3987 { "pmovzxwq", { XM, EXd } },
3994 { "pmovzxdq", { XM, EXq } },
4001 { "pcmpgtq", { XM, EXx } },
4008 { "pminsb", { XM, EXx } },
4015 { "pminsd", { XM, EXx } },
4022 { "pminuw", { XM, EXx } },
4029 { "pminud", { XM, EXx } },
4036 { "pmaxsb", { XM, EXx } },
4043 { "pmaxsd", { XM, EXx } },
4050 { "pmaxuw", { XM, EXx } },
4057 { "pmaxud", { XM, EXx } },
4064 { "pmulld", { XM, EXx } },
4071 { "phminposuw", { XM, EXx } },
4078 { "invept", { Gm, Mo } },
4085 { "invvpid", { Gm, Mo } },
4092 { "invpcid", { Gm, M } },
4097 { "sha1nexte", { XM, EXxmm } },
4102 { "sha1msg1", { XM, EXxmm } },
4107 { "sha1msg2", { XM, EXxmm } },
4112 { "sha256rnds2", { XM, EXxmm, XMM0 } },
4117 { "sha256msg1", { XM, EXxmm } },
4122 { "sha256msg2", { XM, EXxmm } },
4129 { "aesimc", { XM, EXx } },
4136 { "aesenc", { XM, EXx } },
4143 { "aesenclast", { XM, EXx } },
4150 { "aesdec", { XM, EXx } },
4157 { "aesdeclast", { XM, EXx } },
4162 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
4164 { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
4165 { "crc32", { Gdq, { CRC32_Fixup, b_mode } } },
4170 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
4172 { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
4173 { "crc32", { Gdq, { CRC32_Fixup, v_mode } } },
4179 { "adoxS", { Gdq, Edq} },
4180 { "adcxS", { Gdq, Edq} },
4188 { "roundps", { XM, EXx, Ib } },
4195 { "roundpd", { XM, EXx, Ib } },
4202 { "roundss", { XM, EXd, Ib } },
4209 { "roundsd", { XM, EXq, Ib } },
4216 { "blendps", { XM, EXx, Ib } },
4223 { "blendpd", { XM, EXx, Ib } },
4230 { "pblendw", { XM, EXx, Ib } },
4237 { "pextrb", { Edqb, XM, Ib } },
4244 { "pextrw", { Edqw, XM, Ib } },
4251 { "pextrK", { Edq, XM, Ib } },
4258 { "extractps", { Edqd, XM, Ib } },
4265 { "pinsrb", { XM, Edqb, Ib } },
4272 { "insertps", { XM, EXd, Ib } },
4279 { "pinsrK", { XM, Edq, Ib } },
4286 { "dpps", { XM, EXx, Ib } },
4293 { "dppd", { XM, EXx, Ib } },
4300 { "mpsadbw", { XM, EXx, Ib } },
4307 { "pclmulqdq", { XM, EXx, PCLMUL } },
4314 { "pcmpestrm", { XM, EXx, Ib } },
4321 { "pcmpestri", { XM, EXx, Ib } },
4328 { "pcmpistrm", { XM, EXx, Ib } },
4335 { "pcmpistri", { XM, EXx, Ib } },
4340 { "sha1rnds4", { XM, EXxmm, Ib } },
4347 { "aeskeygenassist", { XM, EXx, Ib } },
4350 /* PREFIX_VEX_0F10 */
4352 { VEX_W_TABLE (VEX_W_0F10_P_0) },
4353 { VEX_LEN_TABLE (VEX_LEN_0F10_P_1) },
4354 { VEX_W_TABLE (VEX_W_0F10_P_2) },
4355 { VEX_LEN_TABLE (VEX_LEN_0F10_P_3) },
4358 /* PREFIX_VEX_0F11 */
4360 { VEX_W_TABLE (VEX_W_0F11_P_0) },
4361 { VEX_LEN_TABLE (VEX_LEN_0F11_P_1) },
4362 { VEX_W_TABLE (VEX_W_0F11_P_2) },
4363 { VEX_LEN_TABLE (VEX_LEN_0F11_P_3) },
4366 /* PREFIX_VEX_0F12 */
4368 { MOD_TABLE (MOD_VEX_0F12_PREFIX_0) },
4369 { VEX_W_TABLE (VEX_W_0F12_P_1) },
4370 { VEX_LEN_TABLE (VEX_LEN_0F12_P_2) },
4371 { VEX_W_TABLE (VEX_W_0F12_P_3) },
4374 /* PREFIX_VEX_0F16 */
4376 { MOD_TABLE (MOD_VEX_0F16_PREFIX_0) },
4377 { VEX_W_TABLE (VEX_W_0F16_P_1) },
4378 { VEX_LEN_TABLE (VEX_LEN_0F16_P_2) },
4381 /* PREFIX_VEX_0F2A */
4384 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_1) },
4386 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_3) },
4389 /* PREFIX_VEX_0F2C */
4392 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_1) },
4394 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_3) },
4397 /* PREFIX_VEX_0F2D */
4400 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_1) },
4402 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_3) },
4405 /* PREFIX_VEX_0F2E */
4407 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_0) },
4409 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_2) },
4412 /* PREFIX_VEX_0F2F */
4414 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_0) },
4416 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_2) },
4419 /* PREFIX_VEX_0F41 */
4421 { VEX_LEN_TABLE (VEX_LEN_0F41_P_0) },
4424 /* PREFIX_VEX_0F42 */
4426 { VEX_LEN_TABLE (VEX_LEN_0F42_P_0) },
4429 /* PREFIX_VEX_0F44 */
4431 { VEX_LEN_TABLE (VEX_LEN_0F44_P_0) },
4434 /* PREFIX_VEX_0F45 */
4436 { VEX_LEN_TABLE (VEX_LEN_0F45_P_0) },
4439 /* PREFIX_VEX_0F46 */
4441 { VEX_LEN_TABLE (VEX_LEN_0F46_P_0) },
4444 /* PREFIX_VEX_0F47 */
4446 { VEX_LEN_TABLE (VEX_LEN_0F47_P_0) },
4449 /* PREFIX_VEX_0F4B */
4453 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_2) },
4456 /* PREFIX_VEX_0F51 */
4458 { VEX_W_TABLE (VEX_W_0F51_P_0) },
4459 { VEX_LEN_TABLE (VEX_LEN_0F51_P_1) },
4460 { VEX_W_TABLE (VEX_W_0F51_P_2) },
4461 { VEX_LEN_TABLE (VEX_LEN_0F51_P_3) },
4464 /* PREFIX_VEX_0F52 */
4466 { VEX_W_TABLE (VEX_W_0F52_P_0) },
4467 { VEX_LEN_TABLE (VEX_LEN_0F52_P_1) },
4470 /* PREFIX_VEX_0F53 */
4472 { VEX_W_TABLE (VEX_W_0F53_P_0) },
4473 { VEX_LEN_TABLE (VEX_LEN_0F53_P_1) },
4476 /* PREFIX_VEX_0F58 */
4478 { VEX_W_TABLE (VEX_W_0F58_P_0) },
4479 { VEX_LEN_TABLE (VEX_LEN_0F58_P_1) },
4480 { VEX_W_TABLE (VEX_W_0F58_P_2) },
4481 { VEX_LEN_TABLE (VEX_LEN_0F58_P_3) },
4484 /* PREFIX_VEX_0F59 */
4486 { VEX_W_TABLE (VEX_W_0F59_P_0) },
4487 { VEX_LEN_TABLE (VEX_LEN_0F59_P_1) },
4488 { VEX_W_TABLE (VEX_W_0F59_P_2) },
4489 { VEX_LEN_TABLE (VEX_LEN_0F59_P_3) },
4492 /* PREFIX_VEX_0F5A */
4494 { VEX_W_TABLE (VEX_W_0F5A_P_0) },
4495 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_1) },
4496 { "vcvtpd2ps%XY", { XMM, EXx } },
4497 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_3) },
4500 /* PREFIX_VEX_0F5B */
4502 { VEX_W_TABLE (VEX_W_0F5B_P_0) },
4503 { VEX_W_TABLE (VEX_W_0F5B_P_1) },
4504 { VEX_W_TABLE (VEX_W_0F5B_P_2) },
4507 /* PREFIX_VEX_0F5C */
4509 { VEX_W_TABLE (VEX_W_0F5C_P_0) },
4510 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_1) },
4511 { VEX_W_TABLE (VEX_W_0F5C_P_2) },
4512 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_3) },
4515 /* PREFIX_VEX_0F5D */
4517 { VEX_W_TABLE (VEX_W_0F5D_P_0) },
4518 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_1) },
4519 { VEX_W_TABLE (VEX_W_0F5D_P_2) },
4520 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_3) },
4523 /* PREFIX_VEX_0F5E */
4525 { VEX_W_TABLE (VEX_W_0F5E_P_0) },
4526 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_1) },
4527 { VEX_W_TABLE (VEX_W_0F5E_P_2) },
4528 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_3) },
4531 /* PREFIX_VEX_0F5F */
4533 { VEX_W_TABLE (VEX_W_0F5F_P_0) },
4534 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_1) },
4535 { VEX_W_TABLE (VEX_W_0F5F_P_2) },
4536 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_3) },
4539 /* PREFIX_VEX_0F60 */
4543 { VEX_W_TABLE (VEX_W_0F60_P_2) },
4546 /* PREFIX_VEX_0F61 */
4550 { VEX_W_TABLE (VEX_W_0F61_P_2) },
4553 /* PREFIX_VEX_0F62 */
4557 { VEX_W_TABLE (VEX_W_0F62_P_2) },
4560 /* PREFIX_VEX_0F63 */
4564 { VEX_W_TABLE (VEX_W_0F63_P_2) },
4567 /* PREFIX_VEX_0F64 */
4571 { VEX_W_TABLE (VEX_W_0F64_P_2) },
4574 /* PREFIX_VEX_0F65 */
4578 { VEX_W_TABLE (VEX_W_0F65_P_2) },
4581 /* PREFIX_VEX_0F66 */
4585 { VEX_W_TABLE (VEX_W_0F66_P_2) },
4588 /* PREFIX_VEX_0F67 */
4592 { VEX_W_TABLE (VEX_W_0F67_P_2) },
4595 /* PREFIX_VEX_0F68 */
4599 { VEX_W_TABLE (VEX_W_0F68_P_2) },
4602 /* PREFIX_VEX_0F69 */
4606 { VEX_W_TABLE (VEX_W_0F69_P_2) },
4609 /* PREFIX_VEX_0F6A */
4613 { VEX_W_TABLE (VEX_W_0F6A_P_2) },
4616 /* PREFIX_VEX_0F6B */
4620 { VEX_W_TABLE (VEX_W_0F6B_P_2) },
4623 /* PREFIX_VEX_0F6C */
4627 { VEX_W_TABLE (VEX_W_0F6C_P_2) },
4630 /* PREFIX_VEX_0F6D */
4634 { VEX_W_TABLE (VEX_W_0F6D_P_2) },
4637 /* PREFIX_VEX_0F6E */
4641 { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2) },
4644 /* PREFIX_VEX_0F6F */
4647 { VEX_W_TABLE (VEX_W_0F6F_P_1) },
4648 { VEX_W_TABLE (VEX_W_0F6F_P_2) },
4651 /* PREFIX_VEX_0F70 */
4654 { VEX_W_TABLE (VEX_W_0F70_P_1) },
4655 { VEX_W_TABLE (VEX_W_0F70_P_2) },
4656 { VEX_W_TABLE (VEX_W_0F70_P_3) },
4659 /* PREFIX_VEX_0F71_REG_2 */
4663 { VEX_W_TABLE (VEX_W_0F71_R_2_P_2) },
4666 /* PREFIX_VEX_0F71_REG_4 */
4670 { VEX_W_TABLE (VEX_W_0F71_R_4_P_2) },
4673 /* PREFIX_VEX_0F71_REG_6 */
4677 { VEX_W_TABLE (VEX_W_0F71_R_6_P_2) },
4680 /* PREFIX_VEX_0F72_REG_2 */
4684 { VEX_W_TABLE (VEX_W_0F72_R_2_P_2) },
4687 /* PREFIX_VEX_0F72_REG_4 */
4691 { VEX_W_TABLE (VEX_W_0F72_R_4_P_2) },
4694 /* PREFIX_VEX_0F72_REG_6 */
4698 { VEX_W_TABLE (VEX_W_0F72_R_6_P_2) },
4701 /* PREFIX_VEX_0F73_REG_2 */
4705 { VEX_W_TABLE (VEX_W_0F73_R_2_P_2) },
4708 /* PREFIX_VEX_0F73_REG_3 */
4712 { VEX_W_TABLE (VEX_W_0F73_R_3_P_2) },
4715 /* PREFIX_VEX_0F73_REG_6 */
4719 { VEX_W_TABLE (VEX_W_0F73_R_6_P_2) },
4722 /* PREFIX_VEX_0F73_REG_7 */
4726 { VEX_W_TABLE (VEX_W_0F73_R_7_P_2) },
4729 /* PREFIX_VEX_0F74 */
4733 { VEX_W_TABLE (VEX_W_0F74_P_2) },
4736 /* PREFIX_VEX_0F75 */
4740 { VEX_W_TABLE (VEX_W_0F75_P_2) },
4743 /* PREFIX_VEX_0F76 */
4747 { VEX_W_TABLE (VEX_W_0F76_P_2) },
4750 /* PREFIX_VEX_0F77 */
4752 { VEX_W_TABLE (VEX_W_0F77_P_0) },
4755 /* PREFIX_VEX_0F7C */
4759 { VEX_W_TABLE (VEX_W_0F7C_P_2) },
4760 { VEX_W_TABLE (VEX_W_0F7C_P_3) },
4763 /* PREFIX_VEX_0F7D */
4767 { VEX_W_TABLE (VEX_W_0F7D_P_2) },
4768 { VEX_W_TABLE (VEX_W_0F7D_P_3) },
4771 /* PREFIX_VEX_0F7E */
4774 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1) },
4775 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2) },
4778 /* PREFIX_VEX_0F7F */
4781 { VEX_W_TABLE (VEX_W_0F7F_P_1) },
4782 { VEX_W_TABLE (VEX_W_0F7F_P_2) },
4785 /* PREFIX_VEX_0F90 */
4787 { VEX_LEN_TABLE (VEX_LEN_0F90_P_0) },
4790 /* PREFIX_VEX_0F91 */
4792 { VEX_LEN_TABLE (VEX_LEN_0F91_P_0) },
4795 /* PREFIX_VEX_0F92 */
4797 { VEX_LEN_TABLE (VEX_LEN_0F92_P_0) },
4800 /* PREFIX_VEX_0F93 */
4802 { VEX_LEN_TABLE (VEX_LEN_0F93_P_0) },
4805 /* PREFIX_VEX_0F98 */
4807 { VEX_LEN_TABLE (VEX_LEN_0F98_P_0) },
4810 /* PREFIX_VEX_0FC2 */
4812 { VEX_W_TABLE (VEX_W_0FC2_P_0) },
4813 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_1) },
4814 { VEX_W_TABLE (VEX_W_0FC2_P_2) },
4815 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_3) },
4818 /* PREFIX_VEX_0FC4 */
4822 { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2) },
4825 /* PREFIX_VEX_0FC5 */
4829 { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2) },
4832 /* PREFIX_VEX_0FD0 */
4836 { VEX_W_TABLE (VEX_W_0FD0_P_2) },
4837 { VEX_W_TABLE (VEX_W_0FD0_P_3) },
4840 /* PREFIX_VEX_0FD1 */
4844 { VEX_W_TABLE (VEX_W_0FD1_P_2) },
4847 /* PREFIX_VEX_0FD2 */
4851 { VEX_W_TABLE (VEX_W_0FD2_P_2) },
4854 /* PREFIX_VEX_0FD3 */
4858 { VEX_W_TABLE (VEX_W_0FD3_P_2) },
4861 /* PREFIX_VEX_0FD4 */
4865 { VEX_W_TABLE (VEX_W_0FD4_P_2) },
4868 /* PREFIX_VEX_0FD5 */
4872 { VEX_W_TABLE (VEX_W_0FD5_P_2) },
4875 /* PREFIX_VEX_0FD6 */
4879 { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2) },
4882 /* PREFIX_VEX_0FD7 */
4886 { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2) },
4889 /* PREFIX_VEX_0FD8 */
4893 { VEX_W_TABLE (VEX_W_0FD8_P_2) },
4896 /* PREFIX_VEX_0FD9 */
4900 { VEX_W_TABLE (VEX_W_0FD9_P_2) },
4903 /* PREFIX_VEX_0FDA */
4907 { VEX_W_TABLE (VEX_W_0FDA_P_2) },
4910 /* PREFIX_VEX_0FDB */
4914 { VEX_W_TABLE (VEX_W_0FDB_P_2) },
4917 /* PREFIX_VEX_0FDC */
4921 { VEX_W_TABLE (VEX_W_0FDC_P_2) },
4924 /* PREFIX_VEX_0FDD */
4928 { VEX_W_TABLE (VEX_W_0FDD_P_2) },
4931 /* PREFIX_VEX_0FDE */
4935 { VEX_W_TABLE (VEX_W_0FDE_P_2) },
4938 /* PREFIX_VEX_0FDF */
4942 { VEX_W_TABLE (VEX_W_0FDF_P_2) },
4945 /* PREFIX_VEX_0FE0 */
4949 { VEX_W_TABLE (VEX_W_0FE0_P_2) },
4952 /* PREFIX_VEX_0FE1 */
4956 { VEX_W_TABLE (VEX_W_0FE1_P_2) },
4959 /* PREFIX_VEX_0FE2 */
4963 { VEX_W_TABLE (VEX_W_0FE2_P_2) },
4966 /* PREFIX_VEX_0FE3 */
4970 { VEX_W_TABLE (VEX_W_0FE3_P_2) },
4973 /* PREFIX_VEX_0FE4 */
4977 { VEX_W_TABLE (VEX_W_0FE4_P_2) },
4980 /* PREFIX_VEX_0FE5 */
4984 { VEX_W_TABLE (VEX_W_0FE5_P_2) },
4987 /* PREFIX_VEX_0FE6 */
4990 { VEX_W_TABLE (VEX_W_0FE6_P_1) },
4991 { VEX_W_TABLE (VEX_W_0FE6_P_2) },
4992 { VEX_W_TABLE (VEX_W_0FE6_P_3) },
4995 /* PREFIX_VEX_0FE7 */
4999 { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2) },
5002 /* PREFIX_VEX_0FE8 */
5006 { VEX_W_TABLE (VEX_W_0FE8_P_2) },
5009 /* PREFIX_VEX_0FE9 */
5013 { VEX_W_TABLE (VEX_W_0FE9_P_2) },
5016 /* PREFIX_VEX_0FEA */
5020 { VEX_W_TABLE (VEX_W_0FEA_P_2) },
5023 /* PREFIX_VEX_0FEB */
5027 { VEX_W_TABLE (VEX_W_0FEB_P_2) },
5030 /* PREFIX_VEX_0FEC */
5034 { VEX_W_TABLE (VEX_W_0FEC_P_2) },
5037 /* PREFIX_VEX_0FED */
5041 { VEX_W_TABLE (VEX_W_0FED_P_2) },
5044 /* PREFIX_VEX_0FEE */
5048 { VEX_W_TABLE (VEX_W_0FEE_P_2) },
5051 /* PREFIX_VEX_0FEF */
5055 { VEX_W_TABLE (VEX_W_0FEF_P_2) },
5058 /* PREFIX_VEX_0FF0 */
5063 { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3) },
5066 /* PREFIX_VEX_0FF1 */
5070 { VEX_W_TABLE (VEX_W_0FF1_P_2) },
5073 /* PREFIX_VEX_0FF2 */
5077 { VEX_W_TABLE (VEX_W_0FF2_P_2) },
5080 /* PREFIX_VEX_0FF3 */
5084 { VEX_W_TABLE (VEX_W_0FF3_P_2) },
5087 /* PREFIX_VEX_0FF4 */
5091 { VEX_W_TABLE (VEX_W_0FF4_P_2) },
5094 /* PREFIX_VEX_0FF5 */
5098 { VEX_W_TABLE (VEX_W_0FF5_P_2) },
5101 /* PREFIX_VEX_0FF6 */
5105 { VEX_W_TABLE (VEX_W_0FF6_P_2) },
5108 /* PREFIX_VEX_0FF7 */
5112 { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2) },
5115 /* PREFIX_VEX_0FF8 */
5119 { VEX_W_TABLE (VEX_W_0FF8_P_2) },
5122 /* PREFIX_VEX_0FF9 */
5126 { VEX_W_TABLE (VEX_W_0FF9_P_2) },
5129 /* PREFIX_VEX_0FFA */
5133 { VEX_W_TABLE (VEX_W_0FFA_P_2) },
5136 /* PREFIX_VEX_0FFB */
5140 { VEX_W_TABLE (VEX_W_0FFB_P_2) },
5143 /* PREFIX_VEX_0FFC */
5147 { VEX_W_TABLE (VEX_W_0FFC_P_2) },
5150 /* PREFIX_VEX_0FFD */
5154 { VEX_W_TABLE (VEX_W_0FFD_P_2) },
5157 /* PREFIX_VEX_0FFE */
5161 { VEX_W_TABLE (VEX_W_0FFE_P_2) },
5164 /* PREFIX_VEX_0F3800 */
5168 { VEX_W_TABLE (VEX_W_0F3800_P_2) },
5171 /* PREFIX_VEX_0F3801 */
5175 { VEX_W_TABLE (VEX_W_0F3801_P_2) },
5178 /* PREFIX_VEX_0F3802 */
5182 { VEX_W_TABLE (VEX_W_0F3802_P_2) },
5185 /* PREFIX_VEX_0F3803 */
5189 { VEX_W_TABLE (VEX_W_0F3803_P_2) },
5192 /* PREFIX_VEX_0F3804 */
5196 { VEX_W_TABLE (VEX_W_0F3804_P_2) },
5199 /* PREFIX_VEX_0F3805 */
5203 { VEX_W_TABLE (VEX_W_0F3805_P_2) },
5206 /* PREFIX_VEX_0F3806 */
5210 { VEX_W_TABLE (VEX_W_0F3806_P_2) },
5213 /* PREFIX_VEX_0F3807 */
5217 { VEX_W_TABLE (VEX_W_0F3807_P_2) },
5220 /* PREFIX_VEX_0F3808 */
5224 { VEX_W_TABLE (VEX_W_0F3808_P_2) },
5227 /* PREFIX_VEX_0F3809 */
5231 { VEX_W_TABLE (VEX_W_0F3809_P_2) },
5234 /* PREFIX_VEX_0F380A */
5238 { VEX_W_TABLE (VEX_W_0F380A_P_2) },
5241 /* PREFIX_VEX_0F380B */
5245 { VEX_W_TABLE (VEX_W_0F380B_P_2) },
5248 /* PREFIX_VEX_0F380C */
5252 { VEX_W_TABLE (VEX_W_0F380C_P_2) },
5255 /* PREFIX_VEX_0F380D */
5259 { VEX_W_TABLE (VEX_W_0F380D_P_2) },
5262 /* PREFIX_VEX_0F380E */
5266 { VEX_W_TABLE (VEX_W_0F380E_P_2) },
5269 /* PREFIX_VEX_0F380F */
5273 { VEX_W_TABLE (VEX_W_0F380F_P_2) },
5276 /* PREFIX_VEX_0F3813 */
5280 { "vcvtph2ps", { XM, EXxmmq } },
5283 /* PREFIX_VEX_0F3816 */
5287 { VEX_LEN_TABLE (VEX_LEN_0F3816_P_2) },
5290 /* PREFIX_VEX_0F3817 */
5294 { VEX_W_TABLE (VEX_W_0F3817_P_2) },
5297 /* PREFIX_VEX_0F3818 */
5301 { VEX_W_TABLE (VEX_W_0F3818_P_2) },
5304 /* PREFIX_VEX_0F3819 */
5308 { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2) },
5311 /* PREFIX_VEX_0F381A */
5315 { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2) },
5318 /* PREFIX_VEX_0F381C */
5322 { VEX_W_TABLE (VEX_W_0F381C_P_2) },
5325 /* PREFIX_VEX_0F381D */
5329 { VEX_W_TABLE (VEX_W_0F381D_P_2) },
5332 /* PREFIX_VEX_0F381E */
5336 { VEX_W_TABLE (VEX_W_0F381E_P_2) },
5339 /* PREFIX_VEX_0F3820 */
5343 { VEX_W_TABLE (VEX_W_0F3820_P_2) },
5346 /* PREFIX_VEX_0F3821 */
5350 { VEX_W_TABLE (VEX_W_0F3821_P_2) },
5353 /* PREFIX_VEX_0F3822 */
5357 { VEX_W_TABLE (VEX_W_0F3822_P_2) },
5360 /* PREFIX_VEX_0F3823 */
5364 { VEX_W_TABLE (VEX_W_0F3823_P_2) },
5367 /* PREFIX_VEX_0F3824 */
5371 { VEX_W_TABLE (VEX_W_0F3824_P_2) },
5374 /* PREFIX_VEX_0F3825 */
5378 { VEX_W_TABLE (VEX_W_0F3825_P_2) },
5381 /* PREFIX_VEX_0F3828 */
5385 { VEX_W_TABLE (VEX_W_0F3828_P_2) },
5388 /* PREFIX_VEX_0F3829 */
5392 { VEX_W_TABLE (VEX_W_0F3829_P_2) },
5395 /* PREFIX_VEX_0F382A */
5399 { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2) },
5402 /* PREFIX_VEX_0F382B */
5406 { VEX_W_TABLE (VEX_W_0F382B_P_2) },
5409 /* PREFIX_VEX_0F382C */
5413 { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2) },
5416 /* PREFIX_VEX_0F382D */
5420 { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2) },
5423 /* PREFIX_VEX_0F382E */
5427 { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2) },
5430 /* PREFIX_VEX_0F382F */
5434 { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2) },
5437 /* PREFIX_VEX_0F3830 */
5441 { VEX_W_TABLE (VEX_W_0F3830_P_2) },
5444 /* PREFIX_VEX_0F3831 */
5448 { VEX_W_TABLE (VEX_W_0F3831_P_2) },
5451 /* PREFIX_VEX_0F3832 */
5455 { VEX_W_TABLE (VEX_W_0F3832_P_2) },
5458 /* PREFIX_VEX_0F3833 */
5462 { VEX_W_TABLE (VEX_W_0F3833_P_2) },
5465 /* PREFIX_VEX_0F3834 */
5469 { VEX_W_TABLE (VEX_W_0F3834_P_2) },
5472 /* PREFIX_VEX_0F3835 */
5476 { VEX_W_TABLE (VEX_W_0F3835_P_2) },
5479 /* PREFIX_VEX_0F3836 */
5483 { VEX_LEN_TABLE (VEX_LEN_0F3836_P_2) },
5486 /* PREFIX_VEX_0F3837 */
5490 { VEX_W_TABLE (VEX_W_0F3837_P_2) },
5493 /* PREFIX_VEX_0F3838 */
5497 { VEX_W_TABLE (VEX_W_0F3838_P_2) },
5500 /* PREFIX_VEX_0F3839 */
5504 { VEX_W_TABLE (VEX_W_0F3839_P_2) },
5507 /* PREFIX_VEX_0F383A */
5511 { VEX_W_TABLE (VEX_W_0F383A_P_2) },
5514 /* PREFIX_VEX_0F383B */
5518 { VEX_W_TABLE (VEX_W_0F383B_P_2) },
5521 /* PREFIX_VEX_0F383C */
5525 { VEX_W_TABLE (VEX_W_0F383C_P_2) },
5528 /* PREFIX_VEX_0F383D */
5532 { VEX_W_TABLE (VEX_W_0F383D_P_2) },
5535 /* PREFIX_VEX_0F383E */
5539 { VEX_W_TABLE (VEX_W_0F383E_P_2) },
5542 /* PREFIX_VEX_0F383F */
5546 { VEX_W_TABLE (VEX_W_0F383F_P_2) },
5549 /* PREFIX_VEX_0F3840 */
5553 { VEX_W_TABLE (VEX_W_0F3840_P_2) },
5556 /* PREFIX_VEX_0F3841 */
5560 { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2) },
5563 /* PREFIX_VEX_0F3845 */
5567 { "vpsrlv%LW", { XM, Vex, EXx } },
5570 /* PREFIX_VEX_0F3846 */
5574 { VEX_W_TABLE (VEX_W_0F3846_P_2) },
5577 /* PREFIX_VEX_0F3847 */
5581 { "vpsllv%LW", { XM, Vex, EXx } },
5584 /* PREFIX_VEX_0F3858 */
5588 { VEX_W_TABLE (VEX_W_0F3858_P_2) },
5591 /* PREFIX_VEX_0F3859 */
5595 { VEX_W_TABLE (VEX_W_0F3859_P_2) },
5598 /* PREFIX_VEX_0F385A */
5602 { MOD_TABLE (MOD_VEX_0F385A_PREFIX_2) },
5605 /* PREFIX_VEX_0F3878 */
5609 { VEX_W_TABLE (VEX_W_0F3878_P_2) },
5612 /* PREFIX_VEX_0F3879 */
5616 { VEX_W_TABLE (VEX_W_0F3879_P_2) },
5619 /* PREFIX_VEX_0F388C */
5623 { MOD_TABLE (MOD_VEX_0F388C_PREFIX_2) },
5626 /* PREFIX_VEX_0F388E */
5630 { MOD_TABLE (MOD_VEX_0F388E_PREFIX_2) },
5633 /* PREFIX_VEX_0F3890 */
5637 { "vpgatherd%LW", { XM, MVexVSIBDWpX, Vex } },
5640 /* PREFIX_VEX_0F3891 */
5644 { "vpgatherq%LW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ } },
5647 /* PREFIX_VEX_0F3892 */
5651 { "vgatherdp%XW", { XM, MVexVSIBDWpX, Vex } },
5654 /* PREFIX_VEX_0F3893 */
5658 { "vgatherqp%XW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ } },
5661 /* PREFIX_VEX_0F3896 */
5665 { "vfmaddsub132p%XW", { XM, Vex, EXx } },
5668 /* PREFIX_VEX_0F3897 */
5672 { "vfmsubadd132p%XW", { XM, Vex, EXx } },
5675 /* PREFIX_VEX_0F3898 */
5679 { "vfmadd132p%XW", { XM, Vex, EXx } },
5682 /* PREFIX_VEX_0F3899 */
5686 { "vfmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5689 /* PREFIX_VEX_0F389A */
5693 { "vfmsub132p%XW", { XM, Vex, EXx } },
5696 /* PREFIX_VEX_0F389B */
5700 { "vfmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5703 /* PREFIX_VEX_0F389C */
5707 { "vfnmadd132p%XW", { XM, Vex, EXx } },
5710 /* PREFIX_VEX_0F389D */
5714 { "vfnmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5717 /* PREFIX_VEX_0F389E */
5721 { "vfnmsub132p%XW", { XM, Vex, EXx } },
5724 /* PREFIX_VEX_0F389F */
5728 { "vfnmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5731 /* PREFIX_VEX_0F38A6 */
5735 { "vfmaddsub213p%XW", { XM, Vex, EXx } },
5739 /* PREFIX_VEX_0F38A7 */
5743 { "vfmsubadd213p%XW", { XM, Vex, EXx } },
5746 /* PREFIX_VEX_0F38A8 */
5750 { "vfmadd213p%XW", { XM, Vex, EXx } },
5753 /* PREFIX_VEX_0F38A9 */
5757 { "vfmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5760 /* PREFIX_VEX_0F38AA */
5764 { "vfmsub213p%XW", { XM, Vex, EXx } },
5767 /* PREFIX_VEX_0F38AB */
5771 { "vfmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5774 /* PREFIX_VEX_0F38AC */
5778 { "vfnmadd213p%XW", { XM, Vex, EXx } },
5781 /* PREFIX_VEX_0F38AD */
5785 { "vfnmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5788 /* PREFIX_VEX_0F38AE */
5792 { "vfnmsub213p%XW", { XM, Vex, EXx } },
5795 /* PREFIX_VEX_0F38AF */
5799 { "vfnmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5802 /* PREFIX_VEX_0F38B6 */
5806 { "vfmaddsub231p%XW", { XM, Vex, EXx } },
5809 /* PREFIX_VEX_0F38B7 */
5813 { "vfmsubadd231p%XW", { XM, Vex, EXx } },
5816 /* PREFIX_VEX_0F38B8 */
5820 { "vfmadd231p%XW", { XM, Vex, EXx } },
5823 /* PREFIX_VEX_0F38B9 */
5827 { "vfmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5830 /* PREFIX_VEX_0F38BA */
5834 { "vfmsub231p%XW", { XM, Vex, EXx } },
5837 /* PREFIX_VEX_0F38BB */
5841 { "vfmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5844 /* PREFIX_VEX_0F38BC */
5848 { "vfnmadd231p%XW", { XM, Vex, EXx } },
5851 /* PREFIX_VEX_0F38BD */
5855 { "vfnmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5858 /* PREFIX_VEX_0F38BE */
5862 { "vfnmsub231p%XW", { XM, Vex, EXx } },
5865 /* PREFIX_VEX_0F38BF */
5869 { "vfnmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
5872 /* PREFIX_VEX_0F38DB */
5876 { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2) },
5879 /* PREFIX_VEX_0F38DC */
5883 { VEX_LEN_TABLE (VEX_LEN_0F38DC_P_2) },
5886 /* PREFIX_VEX_0F38DD */
5890 { VEX_LEN_TABLE (VEX_LEN_0F38DD_P_2) },
5893 /* PREFIX_VEX_0F38DE */
5897 { VEX_LEN_TABLE (VEX_LEN_0F38DE_P_2) },
5900 /* PREFIX_VEX_0F38DF */
5904 { VEX_LEN_TABLE (VEX_LEN_0F38DF_P_2) },
5907 /* PREFIX_VEX_0F38F2 */
5909 { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0) },
5912 /* PREFIX_VEX_0F38F3_REG_1 */
5914 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0) },
5917 /* PREFIX_VEX_0F38F3_REG_2 */
5919 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0) },
5922 /* PREFIX_VEX_0F38F3_REG_3 */
5924 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0) },
5927 /* PREFIX_VEX_0F38F5 */
5929 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_0) },
5930 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_1) },
5932 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_3) },
5935 /* PREFIX_VEX_0F38F6 */
5940 { VEX_LEN_TABLE (VEX_LEN_0F38F6_P_3) },
5943 /* PREFIX_VEX_0F38F7 */
5945 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0) },
5946 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_1) },
5947 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_2) },
5948 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_3) },
5951 /* PREFIX_VEX_0F3A00 */
5955 { VEX_LEN_TABLE (VEX_LEN_0F3A00_P_2) },
5958 /* PREFIX_VEX_0F3A01 */
5962 { VEX_LEN_TABLE (VEX_LEN_0F3A01_P_2) },
5965 /* PREFIX_VEX_0F3A02 */
5969 { VEX_W_TABLE (VEX_W_0F3A02_P_2) },
5972 /* PREFIX_VEX_0F3A04 */
5976 { VEX_W_TABLE (VEX_W_0F3A04_P_2) },
5979 /* PREFIX_VEX_0F3A05 */
5983 { VEX_W_TABLE (VEX_W_0F3A05_P_2) },
5986 /* PREFIX_VEX_0F3A06 */
5990 { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2) },
5993 /* PREFIX_VEX_0F3A08 */
5997 { VEX_W_TABLE (VEX_W_0F3A08_P_2) },
6000 /* PREFIX_VEX_0F3A09 */
6004 { VEX_W_TABLE (VEX_W_0F3A09_P_2) },
6007 /* PREFIX_VEX_0F3A0A */
6011 { VEX_LEN_TABLE (VEX_LEN_0F3A0A_P_2) },
6014 /* PREFIX_VEX_0F3A0B */
6018 { VEX_LEN_TABLE (VEX_LEN_0F3A0B_P_2) },
6021 /* PREFIX_VEX_0F3A0C */
6025 { VEX_W_TABLE (VEX_W_0F3A0C_P_2) },
6028 /* PREFIX_VEX_0F3A0D */
6032 { VEX_W_TABLE (VEX_W_0F3A0D_P_2) },
6035 /* PREFIX_VEX_0F3A0E */
6039 { VEX_W_TABLE (VEX_W_0F3A0E_P_2) },
6042 /* PREFIX_VEX_0F3A0F */
6046 { VEX_W_TABLE (VEX_W_0F3A0F_P_2) },
6049 /* PREFIX_VEX_0F3A14 */
6053 { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2) },
6056 /* PREFIX_VEX_0F3A15 */
6060 { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2) },
6063 /* PREFIX_VEX_0F3A16 */
6067 { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2) },
6070 /* PREFIX_VEX_0F3A17 */
6074 { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2) },
6077 /* PREFIX_VEX_0F3A18 */
6081 { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2) },
6084 /* PREFIX_VEX_0F3A19 */
6088 { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2) },
6091 /* PREFIX_VEX_0F3A1D */
6095 { "vcvtps2ph", { EXxmmq, XM, Ib } },
6098 /* PREFIX_VEX_0F3A20 */
6102 { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2) },
6105 /* PREFIX_VEX_0F3A21 */
6109 { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2) },
6112 /* PREFIX_VEX_0F3A22 */
6116 { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2) },
6119 /* PREFIX_VEX_0F3A30 */
6123 { VEX_LEN_TABLE (VEX_LEN_0F3A30_P_2) },
6126 /* PREFIX_VEX_0F3A32 */
6130 { VEX_LEN_TABLE (VEX_LEN_0F3A32_P_2) },
6133 /* PREFIX_VEX_0F3A38 */
6137 { VEX_LEN_TABLE (VEX_LEN_0F3A38_P_2) },
6140 /* PREFIX_VEX_0F3A39 */
6144 { VEX_LEN_TABLE (VEX_LEN_0F3A39_P_2) },
6147 /* PREFIX_VEX_0F3A40 */
6151 { VEX_W_TABLE (VEX_W_0F3A40_P_2) },
6154 /* PREFIX_VEX_0F3A41 */
6158 { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2) },
6161 /* PREFIX_VEX_0F3A42 */
6165 { VEX_W_TABLE (VEX_W_0F3A42_P_2) },
6168 /* PREFIX_VEX_0F3A44 */
6172 { VEX_LEN_TABLE (VEX_LEN_0F3A44_P_2) },
6175 /* PREFIX_VEX_0F3A46 */
6179 { VEX_LEN_TABLE (VEX_LEN_0F3A46_P_2) },
6182 /* PREFIX_VEX_0F3A48 */
6186 { VEX_W_TABLE (VEX_W_0F3A48_P_2) },
6189 /* PREFIX_VEX_0F3A49 */
6193 { VEX_W_TABLE (VEX_W_0F3A49_P_2) },
6196 /* PREFIX_VEX_0F3A4A */
6200 { VEX_W_TABLE (VEX_W_0F3A4A_P_2) },
6203 /* PREFIX_VEX_0F3A4B */
6207 { VEX_W_TABLE (VEX_W_0F3A4B_P_2) },
6210 /* PREFIX_VEX_0F3A4C */
6214 { VEX_W_TABLE (VEX_W_0F3A4C_P_2) },
6217 /* PREFIX_VEX_0F3A5C */
6221 { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6224 /* PREFIX_VEX_0F3A5D */
6228 { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6231 /* PREFIX_VEX_0F3A5E */
6235 { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6238 /* PREFIX_VEX_0F3A5F */
6242 { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6245 /* PREFIX_VEX_0F3A60 */
6249 { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2) },
6253 /* PREFIX_VEX_0F3A61 */
6257 { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2) },
6260 /* PREFIX_VEX_0F3A62 */
6264 { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2) },
6267 /* PREFIX_VEX_0F3A63 */
6271 { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2) },
6274 /* PREFIX_VEX_0F3A68 */
6278 { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6281 /* PREFIX_VEX_0F3A69 */
6285 { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6288 /* PREFIX_VEX_0F3A6A */
6292 { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2) },
6295 /* PREFIX_VEX_0F3A6B */
6299 { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2) },
6302 /* PREFIX_VEX_0F3A6C */
6306 { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6309 /* PREFIX_VEX_0F3A6D */
6313 { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6316 /* PREFIX_VEX_0F3A6E */
6320 { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2) },
6323 /* PREFIX_VEX_0F3A6F */
6327 { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2) },
6330 /* PREFIX_VEX_0F3A78 */
6334 { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6337 /* PREFIX_VEX_0F3A79 */
6341 { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6344 /* PREFIX_VEX_0F3A7A */
6348 { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2) },
6351 /* PREFIX_VEX_0F3A7B */
6355 { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2) },
6358 /* PREFIX_VEX_0F3A7C */
6362 { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6366 /* PREFIX_VEX_0F3A7D */
6370 { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6373 /* PREFIX_VEX_0F3A7E */
6377 { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2) },
6380 /* PREFIX_VEX_0F3A7F */
6384 { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2) },
6387 /* PREFIX_VEX_0F3ADF */
6391 { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2) },
6394 /* PREFIX_VEX_0F3AF0 */
6399 { VEX_LEN_TABLE (VEX_LEN_0F3AF0_P_3) },
6402 #define NEED_PREFIX_TABLE
6403 #include "i386-dis-evex.h"
6404 #undef NEED_PREFIX_TABLE
6407 static const struct dis386 x86_64_table[][2] = {
6410 { "pushP", { es } },
6420 { "pushP", { cs } },
6425 { "pushP", { ss } },
6435 { "pushP", { ds } },
6465 { "pushaP", { XX } },
6470 { "popaP", { XX } },
6475 { MOD_TABLE (MOD_62_32BIT) },
6476 { EVEX_TABLE (EVEX_0F) },
6481 { "arpl", { Ew, Gw } },
6482 { "movs{lq|xd}", { Gv, Ed } },
6487 { "ins{R|}", { Yzr, indirDX } },
6488 { "ins{G|}", { Yzr, indirDX } },
6493 { "outs{R|}", { indirDXr, Xz } },
6494 { "outs{G|}", { indirDXr, Xz } },
6499 { "Jcall{T|}", { Ap } },
6504 { MOD_TABLE (MOD_C4_32BIT) },
6505 { VEX_C4_TABLE (VEX_0F) },
6510 { MOD_TABLE (MOD_C5_32BIT) },
6511 { VEX_C5_TABLE (VEX_0F) },
6531 { "Jjmp{T|}", { Ap } },
6534 /* X86_64_0F01_REG_0 */
6536 { "sgdt{Q|IQ}", { M } },
6540 /* X86_64_0F01_REG_1 */
6542 { "sidt{Q|IQ}", { M } },
6546 /* X86_64_0F01_REG_2 */
6548 { "lgdt{Q|Q}", { M } },
6552 /* X86_64_0F01_REG_3 */
6554 { "lidt{Q|Q}", { M } },
6559 static const struct dis386 three_byte_table[][256] = {
6561 /* THREE_BYTE_0F38 */
6564 { "pshufb", { MX, EM } },
6565 { "phaddw", { MX, EM } },
6566 { "phaddd", { MX, EM } },
6567 { "phaddsw", { MX, EM } },
6568 { "pmaddubsw", { MX, EM } },
6569 { "phsubw", { MX, EM } },
6570 { "phsubd", { MX, EM } },
6571 { "phsubsw", { MX, EM } },
6573 { "psignb", { MX, EM } },
6574 { "psignw", { MX, EM } },
6575 { "psignd", { MX, EM } },
6576 { "pmulhrsw", { MX, EM } },
6582 { PREFIX_TABLE (PREFIX_0F3810) },
6586 { PREFIX_TABLE (PREFIX_0F3814) },
6587 { PREFIX_TABLE (PREFIX_0F3815) },
6589 { PREFIX_TABLE (PREFIX_0F3817) },
6595 { "pabsb", { MX, EM } },
6596 { "pabsw", { MX, EM } },
6597 { "pabsd", { MX, EM } },
6600 { PREFIX_TABLE (PREFIX_0F3820) },
6601 { PREFIX_TABLE (PREFIX_0F3821) },
6602 { PREFIX_TABLE (PREFIX_0F3822) },
6603 { PREFIX_TABLE (PREFIX_0F3823) },
6604 { PREFIX_TABLE (PREFIX_0F3824) },
6605 { PREFIX_TABLE (PREFIX_0F3825) },
6609 { PREFIX_TABLE (PREFIX_0F3828) },
6610 { PREFIX_TABLE (PREFIX_0F3829) },
6611 { PREFIX_TABLE (PREFIX_0F382A) },
6612 { PREFIX_TABLE (PREFIX_0F382B) },
6618 { PREFIX_TABLE (PREFIX_0F3830) },
6619 { PREFIX_TABLE (PREFIX_0F3831) },
6620 { PREFIX_TABLE (PREFIX_0F3832) },
6621 { PREFIX_TABLE (PREFIX_0F3833) },
6622 { PREFIX_TABLE (PREFIX_0F3834) },
6623 { PREFIX_TABLE (PREFIX_0F3835) },
6625 { PREFIX_TABLE (PREFIX_0F3837) },
6627 { PREFIX_TABLE (PREFIX_0F3838) },
6628 { PREFIX_TABLE (PREFIX_0F3839) },
6629 { PREFIX_TABLE (PREFIX_0F383A) },
6630 { PREFIX_TABLE (PREFIX_0F383B) },
6631 { PREFIX_TABLE (PREFIX_0F383C) },
6632 { PREFIX_TABLE (PREFIX_0F383D) },
6633 { PREFIX_TABLE (PREFIX_0F383E) },
6634 { PREFIX_TABLE (PREFIX_0F383F) },
6636 { PREFIX_TABLE (PREFIX_0F3840) },
6637 { PREFIX_TABLE (PREFIX_0F3841) },
6708 { PREFIX_TABLE (PREFIX_0F3880) },
6709 { PREFIX_TABLE (PREFIX_0F3881) },
6710 { PREFIX_TABLE (PREFIX_0F3882) },
6789 { PREFIX_TABLE (PREFIX_0F38C8) },
6790 { PREFIX_TABLE (PREFIX_0F38C9) },
6791 { PREFIX_TABLE (PREFIX_0F38CA) },
6792 { PREFIX_TABLE (PREFIX_0F38CB) },
6793 { PREFIX_TABLE (PREFIX_0F38CC) },
6794 { PREFIX_TABLE (PREFIX_0F38CD) },
6810 { PREFIX_TABLE (PREFIX_0F38DB) },
6811 { PREFIX_TABLE (PREFIX_0F38DC) },
6812 { PREFIX_TABLE (PREFIX_0F38DD) },
6813 { PREFIX_TABLE (PREFIX_0F38DE) },
6814 { PREFIX_TABLE (PREFIX_0F38DF) },
6834 { PREFIX_TABLE (PREFIX_0F38F0) },
6835 { PREFIX_TABLE (PREFIX_0F38F1) },
6840 { PREFIX_TABLE (PREFIX_0F38F6) },
6852 /* THREE_BYTE_0F3A */
6864 { PREFIX_TABLE (PREFIX_0F3A08) },
6865 { PREFIX_TABLE (PREFIX_0F3A09) },
6866 { PREFIX_TABLE (PREFIX_0F3A0A) },
6867 { PREFIX_TABLE (PREFIX_0F3A0B) },
6868 { PREFIX_TABLE (PREFIX_0F3A0C) },
6869 { PREFIX_TABLE (PREFIX_0F3A0D) },
6870 { PREFIX_TABLE (PREFIX_0F3A0E) },
6871 { "palignr", { MX, EM, Ib } },
6877 { PREFIX_TABLE (PREFIX_0F3A14) },
6878 { PREFIX_TABLE (PREFIX_0F3A15) },
6879 { PREFIX_TABLE (PREFIX_0F3A16) },
6880 { PREFIX_TABLE (PREFIX_0F3A17) },
6891 { PREFIX_TABLE (PREFIX_0F3A20) },
6892 { PREFIX_TABLE (PREFIX_0F3A21) },
6893 { PREFIX_TABLE (PREFIX_0F3A22) },
6927 { PREFIX_TABLE (PREFIX_0F3A40) },
6928 { PREFIX_TABLE (PREFIX_0F3A41) },
6929 { PREFIX_TABLE (PREFIX_0F3A42) },
6931 { PREFIX_TABLE (PREFIX_0F3A44) },
6963 { PREFIX_TABLE (PREFIX_0F3A60) },
6964 { PREFIX_TABLE (PREFIX_0F3A61) },
6965 { PREFIX_TABLE (PREFIX_0F3A62) },
6966 { PREFIX_TABLE (PREFIX_0F3A63) },
7084 { PREFIX_TABLE (PREFIX_0F3ACC) },
7105 { PREFIX_TABLE (PREFIX_0F3ADF) },
7144 /* THREE_BYTE_0F7A */
7183 { "ptest", { XX } },
7220 { "phaddbw", { XM, EXq } },
7221 { "phaddbd", { XM, EXq } },
7222 { "phaddbq", { XM, EXq } },
7225 { "phaddwd", { XM, EXq } },
7226 { "phaddwq", { XM, EXq } },
7231 { "phadddq", { XM, EXq } },
7238 { "phaddubw", { XM, EXq } },
7239 { "phaddubd", { XM, EXq } },
7240 { "phaddubq", { XM, EXq } },
7243 { "phadduwd", { XM, EXq } },
7244 { "phadduwq", { XM, EXq } },
7249 { "phaddudq", { XM, EXq } },
7256 { "phsubbw", { XM, EXq } },
7257 { "phsubbd", { XM, EXq } },
7258 { "phsubbq", { XM, EXq } },
7437 static const struct dis386 xop_table[][256] = {
7590 { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7591 { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7592 { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7600 { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7601 { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7608 { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7609 { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7610 { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7618 { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7619 { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7623 { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7624 { "vpperm", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7627 { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7645 { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
7657 { "vprotb", { XM, Vex_2src_1, Ib } },
7658 { "vprotw", { XM, Vex_2src_1, Ib } },
7659 { "vprotd", { XM, Vex_2src_1, Ib } },
7660 { "vprotq", { XM, Vex_2src_1, Ib } },
7670 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CC) },
7671 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CD) },
7672 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CE) },
7673 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CF) },
7706 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EC) },
7707 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_ED) },
7708 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EE) },
7709 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EF) },
7733 { REG_TABLE (REG_XOP_TBM_01) },
7734 { REG_TABLE (REG_XOP_TBM_02) },
7752 { REG_TABLE (REG_XOP_LWPCB) },
7876 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80) },
7877 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81) },
7878 { "vfrczss", { XM, EXd } },
7879 { "vfrczsd", { XM, EXq } },
7894 { "vprotb", { XM, Vex_2src_1, Vex_2src_2 } },
7895 { "vprotw", { XM, Vex_2src_1, Vex_2src_2 } },
7896 { "vprotd", { XM, Vex_2src_1, Vex_2src_2 } },
7897 { "vprotq", { XM, Vex_2src_1, Vex_2src_2 } },
7898 { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 } },
7899 { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 } },
7900 { "vpshld", { XM, Vex_2src_1, Vex_2src_2 } },
7901 { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 } },
7903 { "vpshab", { XM, Vex_2src_1, Vex_2src_2 } },
7904 { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 } },
7905 { "vpshad", { XM, Vex_2src_1, Vex_2src_2 } },
7906 { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 } },
7949 { "vphaddbw", { XM, EXxmm } },
7950 { "vphaddbd", { XM, EXxmm } },
7951 { "vphaddbq", { XM, EXxmm } },
7954 { "vphaddwd", { XM, EXxmm } },
7955 { "vphaddwq", { XM, EXxmm } },
7960 { "vphadddq", { XM, EXxmm } },
7967 { "vphaddubw", { XM, EXxmm } },
7968 { "vphaddubd", { XM, EXxmm } },
7969 { "vphaddubq", { XM, EXxmm } },
7972 { "vphadduwd", { XM, EXxmm } },
7973 { "vphadduwq", { XM, EXxmm } },
7978 { "vphaddudq", { XM, EXxmm } },
7985 { "vphsubbw", { XM, EXxmm } },
7986 { "vphsubwd", { XM, EXxmm } },
7987 { "vphsubdq", { XM, EXxmm } },
8041 { "bextr", { Gv, Ev, Iq } },
8043 { REG_TABLE (REG_XOP_LWP) },
8313 static const struct dis386 vex_table[][256] = {
8335 { PREFIX_TABLE (PREFIX_VEX_0F10) },
8336 { PREFIX_TABLE (PREFIX_VEX_0F11) },
8337 { PREFIX_TABLE (PREFIX_VEX_0F12) },
8338 { MOD_TABLE (MOD_VEX_0F13) },
8339 { VEX_W_TABLE (VEX_W_0F14) },
8340 { VEX_W_TABLE (VEX_W_0F15) },
8341 { PREFIX_TABLE (PREFIX_VEX_0F16) },
8342 { MOD_TABLE (MOD_VEX_0F17) },
8362 { VEX_W_TABLE (VEX_W_0F28) },
8363 { VEX_W_TABLE (VEX_W_0F29) },
8364 { PREFIX_TABLE (PREFIX_VEX_0F2A) },
8365 { MOD_TABLE (MOD_VEX_0F2B) },
8366 { PREFIX_TABLE (PREFIX_VEX_0F2C) },
8367 { PREFIX_TABLE (PREFIX_VEX_0F2D) },
8368 { PREFIX_TABLE (PREFIX_VEX_0F2E) },
8369 { PREFIX_TABLE (PREFIX_VEX_0F2F) },
8390 { PREFIX_TABLE (PREFIX_VEX_0F41) },
8391 { PREFIX_TABLE (PREFIX_VEX_0F42) },
8393 { PREFIX_TABLE (PREFIX_VEX_0F44) },
8394 { PREFIX_TABLE (PREFIX_VEX_0F45) },
8395 { PREFIX_TABLE (PREFIX_VEX_0F46) },
8396 { PREFIX_TABLE (PREFIX_VEX_0F47) },
8401 { PREFIX_TABLE (PREFIX_VEX_0F4B) },
8407 { MOD_TABLE (MOD_VEX_0F50) },
8408 { PREFIX_TABLE (PREFIX_VEX_0F51) },
8409 { PREFIX_TABLE (PREFIX_VEX_0F52) },
8410 { PREFIX_TABLE (PREFIX_VEX_0F53) },
8411 { "vandpX", { XM, Vex, EXx } },
8412 { "vandnpX", { XM, Vex, EXx } },
8413 { "vorpX", { XM, Vex, EXx } },
8414 { "vxorpX", { XM, Vex, EXx } },
8416 { PREFIX_TABLE (PREFIX_VEX_0F58) },
8417 { PREFIX_TABLE (PREFIX_VEX_0F59) },
8418 { PREFIX_TABLE (PREFIX_VEX_0F5A) },
8419 { PREFIX_TABLE (PREFIX_VEX_0F5B) },
8420 { PREFIX_TABLE (PREFIX_VEX_0F5C) },
8421 { PREFIX_TABLE (PREFIX_VEX_0F5D) },
8422 { PREFIX_TABLE (PREFIX_VEX_0F5E) },
8423 { PREFIX_TABLE (PREFIX_VEX_0F5F) },
8425 { PREFIX_TABLE (PREFIX_VEX_0F60) },
8426 { PREFIX_TABLE (PREFIX_VEX_0F61) },
8427 { PREFIX_TABLE (PREFIX_VEX_0F62) },
8428 { PREFIX_TABLE (PREFIX_VEX_0F63) },
8429 { PREFIX_TABLE (PREFIX_VEX_0F64) },
8430 { PREFIX_TABLE (PREFIX_VEX_0F65) },
8431 { PREFIX_TABLE (PREFIX_VEX_0F66) },
8432 { PREFIX_TABLE (PREFIX_VEX_0F67) },
8434 { PREFIX_TABLE (PREFIX_VEX_0F68) },
8435 { PREFIX_TABLE (PREFIX_VEX_0F69) },
8436 { PREFIX_TABLE (PREFIX_VEX_0F6A) },
8437 { PREFIX_TABLE (PREFIX_VEX_0F6B) },
8438 { PREFIX_TABLE (PREFIX_VEX_0F6C) },
8439 { PREFIX_TABLE (PREFIX_VEX_0F6D) },
8440 { PREFIX_TABLE (PREFIX_VEX_0F6E) },
8441 { PREFIX_TABLE (PREFIX_VEX_0F6F) },
8443 { PREFIX_TABLE (PREFIX_VEX_0F70) },
8444 { REG_TABLE (REG_VEX_0F71) },
8445 { REG_TABLE (REG_VEX_0F72) },
8446 { REG_TABLE (REG_VEX_0F73) },
8447 { PREFIX_TABLE (PREFIX_VEX_0F74) },
8448 { PREFIX_TABLE (PREFIX_VEX_0F75) },
8449 { PREFIX_TABLE (PREFIX_VEX_0F76) },
8450 { PREFIX_TABLE (PREFIX_VEX_0F77) },
8456 { PREFIX_TABLE (PREFIX_VEX_0F7C) },
8457 { PREFIX_TABLE (PREFIX_VEX_0F7D) },
8458 { PREFIX_TABLE (PREFIX_VEX_0F7E) },
8459 { PREFIX_TABLE (PREFIX_VEX_0F7F) },
8479 { PREFIX_TABLE (PREFIX_VEX_0F90) },
8480 { PREFIX_TABLE (PREFIX_VEX_0F91) },
8481 { PREFIX_TABLE (PREFIX_VEX_0F92) },
8482 { PREFIX_TABLE (PREFIX_VEX_0F93) },
8488 { PREFIX_TABLE (PREFIX_VEX_0F98) },
8512 { REG_TABLE (REG_VEX_0FAE) },
8535 { PREFIX_TABLE (PREFIX_VEX_0FC2) },
8537 { PREFIX_TABLE (PREFIX_VEX_0FC4) },
8538 { PREFIX_TABLE (PREFIX_VEX_0FC5) },
8539 { "vshufpX", { XM, Vex, EXx, Ib } },
8551 { PREFIX_TABLE (PREFIX_VEX_0FD0) },
8552 { PREFIX_TABLE (PREFIX_VEX_0FD1) },
8553 { PREFIX_TABLE (PREFIX_VEX_0FD2) },
8554 { PREFIX_TABLE (PREFIX_VEX_0FD3) },
8555 { PREFIX_TABLE (PREFIX_VEX_0FD4) },
8556 { PREFIX_TABLE (PREFIX_VEX_0FD5) },
8557 { PREFIX_TABLE (PREFIX_VEX_0FD6) },
8558 { PREFIX_TABLE (PREFIX_VEX_0FD7) },
8560 { PREFIX_TABLE (PREFIX_VEX_0FD8) },
8561 { PREFIX_TABLE (PREFIX_VEX_0FD9) },
8562 { PREFIX_TABLE (PREFIX_VEX_0FDA) },
8563 { PREFIX_TABLE (PREFIX_VEX_0FDB) },
8564 { PREFIX_TABLE (PREFIX_VEX_0FDC) },
8565 { PREFIX_TABLE (PREFIX_VEX_0FDD) },
8566 { PREFIX_TABLE (PREFIX_VEX_0FDE) },
8567 { PREFIX_TABLE (PREFIX_VEX_0FDF) },
8569 { PREFIX_TABLE (PREFIX_VEX_0FE0) },
8570 { PREFIX_TABLE (PREFIX_VEX_0FE1) },
8571 { PREFIX_TABLE (PREFIX_VEX_0FE2) },
8572 { PREFIX_TABLE (PREFIX_VEX_0FE3) },
8573 { PREFIX_TABLE (PREFIX_VEX_0FE4) },
8574 { PREFIX_TABLE (PREFIX_VEX_0FE5) },
8575 { PREFIX_TABLE (PREFIX_VEX_0FE6) },
8576 { PREFIX_TABLE (PREFIX_VEX_0FE7) },
8578 { PREFIX_TABLE (PREFIX_VEX_0FE8) },
8579 { PREFIX_TABLE (PREFIX_VEX_0FE9) },
8580 { PREFIX_TABLE (PREFIX_VEX_0FEA) },
8581 { PREFIX_TABLE (PREFIX_VEX_0FEB) },
8582 { PREFIX_TABLE (PREFIX_VEX_0FEC) },
8583 { PREFIX_TABLE (PREFIX_VEX_0FED) },
8584 { PREFIX_TABLE (PREFIX_VEX_0FEE) },
8585 { PREFIX_TABLE (PREFIX_VEX_0FEF) },
8587 { PREFIX_TABLE (PREFIX_VEX_0FF0) },
8588 { PREFIX_TABLE (PREFIX_VEX_0FF1) },
8589 { PREFIX_TABLE (PREFIX_VEX_0FF2) },
8590 { PREFIX_TABLE (PREFIX_VEX_0FF3) },
8591 { PREFIX_TABLE (PREFIX_VEX_0FF4) },
8592 { PREFIX_TABLE (PREFIX_VEX_0FF5) },
8593 { PREFIX_TABLE (PREFIX_VEX_0FF6) },
8594 { PREFIX_TABLE (PREFIX_VEX_0FF7) },
8596 { PREFIX_TABLE (PREFIX_VEX_0FF8) },
8597 { PREFIX_TABLE (PREFIX_VEX_0FF9) },
8598 { PREFIX_TABLE (PREFIX_VEX_0FFA) },
8599 { PREFIX_TABLE (PREFIX_VEX_0FFB) },
8600 { PREFIX_TABLE (PREFIX_VEX_0FFC) },
8601 { PREFIX_TABLE (PREFIX_VEX_0FFD) },
8602 { PREFIX_TABLE (PREFIX_VEX_0FFE) },
8608 { PREFIX_TABLE (PREFIX_VEX_0F3800) },
8609 { PREFIX_TABLE (PREFIX_VEX_0F3801) },
8610 { PREFIX_TABLE (PREFIX_VEX_0F3802) },
8611 { PREFIX_TABLE (PREFIX_VEX_0F3803) },
8612 { PREFIX_TABLE (PREFIX_VEX_0F3804) },
8613 { PREFIX_TABLE (PREFIX_VEX_0F3805) },
8614 { PREFIX_TABLE (PREFIX_VEX_0F3806) },
8615 { PREFIX_TABLE (PREFIX_VEX_0F3807) },
8617 { PREFIX_TABLE (PREFIX_VEX_0F3808) },
8618 { PREFIX_TABLE (PREFIX_VEX_0F3809) },
8619 { PREFIX_TABLE (PREFIX_VEX_0F380A) },
8620 { PREFIX_TABLE (PREFIX_VEX_0F380B) },
8621 { PREFIX_TABLE (PREFIX_VEX_0F380C) },
8622 { PREFIX_TABLE (PREFIX_VEX_0F380D) },
8623 { PREFIX_TABLE (PREFIX_VEX_0F380E) },
8624 { PREFIX_TABLE (PREFIX_VEX_0F380F) },
8629 { PREFIX_TABLE (PREFIX_VEX_0F3813) },
8632 { PREFIX_TABLE (PREFIX_VEX_0F3816) },
8633 { PREFIX_TABLE (PREFIX_VEX_0F3817) },
8635 { PREFIX_TABLE (PREFIX_VEX_0F3818) },
8636 { PREFIX_TABLE (PREFIX_VEX_0F3819) },
8637 { PREFIX_TABLE (PREFIX_VEX_0F381A) },
8639 { PREFIX_TABLE (PREFIX_VEX_0F381C) },
8640 { PREFIX_TABLE (PREFIX_VEX_0F381D) },
8641 { PREFIX_TABLE (PREFIX_VEX_0F381E) },
8644 { PREFIX_TABLE (PREFIX_VEX_0F3820) },
8645 { PREFIX_TABLE (PREFIX_VEX_0F3821) },
8646 { PREFIX_TABLE (PREFIX_VEX_0F3822) },
8647 { PREFIX_TABLE (PREFIX_VEX_0F3823) },
8648 { PREFIX_TABLE (PREFIX_VEX_0F3824) },
8649 { PREFIX_TABLE (PREFIX_VEX_0F3825) },
8653 { PREFIX_TABLE (PREFIX_VEX_0F3828) },
8654 { PREFIX_TABLE (PREFIX_VEX_0F3829) },
8655 { PREFIX_TABLE (PREFIX_VEX_0F382A) },
8656 { PREFIX_TABLE (PREFIX_VEX_0F382B) },
8657 { PREFIX_TABLE (PREFIX_VEX_0F382C) },
8658 { PREFIX_TABLE (PREFIX_VEX_0F382D) },
8659 { PREFIX_TABLE (PREFIX_VEX_0F382E) },
8660 { PREFIX_TABLE (PREFIX_VEX_0F382F) },
8662 { PREFIX_TABLE (PREFIX_VEX_0F3830) },
8663 { PREFIX_TABLE (PREFIX_VEX_0F3831) },
8664 { PREFIX_TABLE (PREFIX_VEX_0F3832) },
8665 { PREFIX_TABLE (PREFIX_VEX_0F3833) },
8666 { PREFIX_TABLE (PREFIX_VEX_0F3834) },
8667 { PREFIX_TABLE (PREFIX_VEX_0F3835) },
8668 { PREFIX_TABLE (PREFIX_VEX_0F3836) },
8669 { PREFIX_TABLE (PREFIX_VEX_0F3837) },
8671 { PREFIX_TABLE (PREFIX_VEX_0F3838) },
8672 { PREFIX_TABLE (PREFIX_VEX_0F3839) },
8673 { PREFIX_TABLE (PREFIX_VEX_0F383A) },
8674 { PREFIX_TABLE (PREFIX_VEX_0F383B) },
8675 { PREFIX_TABLE (PREFIX_VEX_0F383C) },
8676 { PREFIX_TABLE (PREFIX_VEX_0F383D) },
8677 { PREFIX_TABLE (PREFIX_VEX_0F383E) },
8678 { PREFIX_TABLE (PREFIX_VEX_0F383F) },
8680 { PREFIX_TABLE (PREFIX_VEX_0F3840) },
8681 { PREFIX_TABLE (PREFIX_VEX_0F3841) },
8685 { PREFIX_TABLE (PREFIX_VEX_0F3845) },
8686 { PREFIX_TABLE (PREFIX_VEX_0F3846) },
8687 { PREFIX_TABLE (PREFIX_VEX_0F3847) },
8707 { PREFIX_TABLE (PREFIX_VEX_0F3858) },
8708 { PREFIX_TABLE (PREFIX_VEX_0F3859) },
8709 { PREFIX_TABLE (PREFIX_VEX_0F385A) },
8743 { PREFIX_TABLE (PREFIX_VEX_0F3878) },
8744 { PREFIX_TABLE (PREFIX_VEX_0F3879) },
8765 { PREFIX_TABLE (PREFIX_VEX_0F388C) },
8767 { PREFIX_TABLE (PREFIX_VEX_0F388E) },
8770 { PREFIX_TABLE (PREFIX_VEX_0F3890) },
8771 { PREFIX_TABLE (PREFIX_VEX_0F3891) },
8772 { PREFIX_TABLE (PREFIX_VEX_0F3892) },
8773 { PREFIX_TABLE (PREFIX_VEX_0F3893) },
8776 { PREFIX_TABLE (PREFIX_VEX_0F3896) },
8777 { PREFIX_TABLE (PREFIX_VEX_0F3897) },
8779 { PREFIX_TABLE (PREFIX_VEX_0F3898) },
8780 { PREFIX_TABLE (PREFIX_VEX_0F3899) },
8781 { PREFIX_TABLE (PREFIX_VEX_0F389A) },
8782 { PREFIX_TABLE (PREFIX_VEX_0F389B) },
8783 { PREFIX_TABLE (PREFIX_VEX_0F389C) },
8784 { PREFIX_TABLE (PREFIX_VEX_0F389D) },
8785 { PREFIX_TABLE (PREFIX_VEX_0F389E) },
8786 { PREFIX_TABLE (PREFIX_VEX_0F389F) },
8794 { PREFIX_TABLE (PREFIX_VEX_0F38A6) },
8795 { PREFIX_TABLE (PREFIX_VEX_0F38A7) },
8797 { PREFIX_TABLE (PREFIX_VEX_0F38A8) },
8798 { PREFIX_TABLE (PREFIX_VEX_0F38A9) },
8799 { PREFIX_TABLE (PREFIX_VEX_0F38AA) },
8800 { PREFIX_TABLE (PREFIX_VEX_0F38AB) },
8801 { PREFIX_TABLE (PREFIX_VEX_0F38AC) },
8802 { PREFIX_TABLE (PREFIX_VEX_0F38AD) },
8803 { PREFIX_TABLE (PREFIX_VEX_0F38AE) },
8804 { PREFIX_TABLE (PREFIX_VEX_0F38AF) },
8812 { PREFIX_TABLE (PREFIX_VEX_0F38B6) },
8813 { PREFIX_TABLE (PREFIX_VEX_0F38B7) },
8815 { PREFIX_TABLE (PREFIX_VEX_0F38B8) },
8816 { PREFIX_TABLE (PREFIX_VEX_0F38B9) },
8817 { PREFIX_TABLE (PREFIX_VEX_0F38BA) },
8818 { PREFIX_TABLE (PREFIX_VEX_0F38BB) },
8819 { PREFIX_TABLE (PREFIX_VEX_0F38BC) },
8820 { PREFIX_TABLE (PREFIX_VEX_0F38BD) },
8821 { PREFIX_TABLE (PREFIX_VEX_0F38BE) },
8822 { PREFIX_TABLE (PREFIX_VEX_0F38BF) },
8854 { PREFIX_TABLE (PREFIX_VEX_0F38DB) },
8855 { PREFIX_TABLE (PREFIX_VEX_0F38DC) },
8856 { PREFIX_TABLE (PREFIX_VEX_0F38DD) },
8857 { PREFIX_TABLE (PREFIX_VEX_0F38DE) },
8858 { PREFIX_TABLE (PREFIX_VEX_0F38DF) },
8880 { PREFIX_TABLE (PREFIX_VEX_0F38F2) },
8881 { REG_TABLE (REG_VEX_0F38F3) },
8883 { PREFIX_TABLE (PREFIX_VEX_0F38F5) },
8884 { PREFIX_TABLE (PREFIX_VEX_0F38F6) },
8885 { PREFIX_TABLE (PREFIX_VEX_0F38F7) },
8899 { PREFIX_TABLE (PREFIX_VEX_0F3A00) },
8900 { PREFIX_TABLE (PREFIX_VEX_0F3A01) },
8901 { PREFIX_TABLE (PREFIX_VEX_0F3A02) },
8903 { PREFIX_TABLE (PREFIX_VEX_0F3A04) },
8904 { PREFIX_TABLE (PREFIX_VEX_0F3A05) },
8905 { PREFIX_TABLE (PREFIX_VEX_0F3A06) },
8908 { PREFIX_TABLE (PREFIX_VEX_0F3A08) },
8909 { PREFIX_TABLE (PREFIX_VEX_0F3A09) },
8910 { PREFIX_TABLE (PREFIX_VEX_0F3A0A) },
8911 { PREFIX_TABLE (PREFIX_VEX_0F3A0B) },
8912 { PREFIX_TABLE (PREFIX_VEX_0F3A0C) },
8913 { PREFIX_TABLE (PREFIX_VEX_0F3A0D) },
8914 { PREFIX_TABLE (PREFIX_VEX_0F3A0E) },
8915 { PREFIX_TABLE (PREFIX_VEX_0F3A0F) },
8921 { PREFIX_TABLE (PREFIX_VEX_0F3A14) },
8922 { PREFIX_TABLE (PREFIX_VEX_0F3A15) },
8923 { PREFIX_TABLE (PREFIX_VEX_0F3A16) },
8924 { PREFIX_TABLE (PREFIX_VEX_0F3A17) },
8926 { PREFIX_TABLE (PREFIX_VEX_0F3A18) },
8927 { PREFIX_TABLE (PREFIX_VEX_0F3A19) },
8931 { PREFIX_TABLE (PREFIX_VEX_0F3A1D) },
8935 { PREFIX_TABLE (PREFIX_VEX_0F3A20) },
8936 { PREFIX_TABLE (PREFIX_VEX_0F3A21) },
8937 { PREFIX_TABLE (PREFIX_VEX_0F3A22) },
8953 { PREFIX_TABLE (PREFIX_VEX_0F3A30) },
8955 { PREFIX_TABLE (PREFIX_VEX_0F3A32) },
8962 { PREFIX_TABLE (PREFIX_VEX_0F3A38) },
8963 { PREFIX_TABLE (PREFIX_VEX_0F3A39) },
8971 { PREFIX_TABLE (PREFIX_VEX_0F3A40) },
8972 { PREFIX_TABLE (PREFIX_VEX_0F3A41) },
8973 { PREFIX_TABLE (PREFIX_VEX_0F3A42) },
8975 { PREFIX_TABLE (PREFIX_VEX_0F3A44) },
8977 { PREFIX_TABLE (PREFIX_VEX_0F3A46) },
8980 { PREFIX_TABLE (PREFIX_VEX_0F3A48) },
8981 { PREFIX_TABLE (PREFIX_VEX_0F3A49) },
8982 { PREFIX_TABLE (PREFIX_VEX_0F3A4A) },
8983 { PREFIX_TABLE (PREFIX_VEX_0F3A4B) },
8984 { PREFIX_TABLE (PREFIX_VEX_0F3A4C) },
9002 { PREFIX_TABLE (PREFIX_VEX_0F3A5C) },
9003 { PREFIX_TABLE (PREFIX_VEX_0F3A5D) },
9004 { PREFIX_TABLE (PREFIX_VEX_0F3A5E) },
9005 { PREFIX_TABLE (PREFIX_VEX_0F3A5F) },
9007 { PREFIX_TABLE (PREFIX_VEX_0F3A60) },
9008 { PREFIX_TABLE (PREFIX_VEX_0F3A61) },
9009 { PREFIX_TABLE (PREFIX_VEX_0F3A62) },
9010 { PREFIX_TABLE (PREFIX_VEX_0F3A63) },
9016 { PREFIX_TABLE (PREFIX_VEX_0F3A68) },
9017 { PREFIX_TABLE (PREFIX_VEX_0F3A69) },
9018 { PREFIX_TABLE (PREFIX_VEX_0F3A6A) },
9019 { PREFIX_TABLE (PREFIX_VEX_0F3A6B) },
9020 { PREFIX_TABLE (PREFIX_VEX_0F3A6C) },
9021 { PREFIX_TABLE (PREFIX_VEX_0F3A6D) },
9022 { PREFIX_TABLE (PREFIX_VEX_0F3A6E) },
9023 { PREFIX_TABLE (PREFIX_VEX_0F3A6F) },
9034 { PREFIX_TABLE (PREFIX_VEX_0F3A78) },
9035 { PREFIX_TABLE (PREFIX_VEX_0F3A79) },
9036 { PREFIX_TABLE (PREFIX_VEX_0F3A7A) },
9037 { PREFIX_TABLE (PREFIX_VEX_0F3A7B) },
9038 { PREFIX_TABLE (PREFIX_VEX_0F3A7C) },
9039 { PREFIX_TABLE (PREFIX_VEX_0F3A7D) },
9040 { PREFIX_TABLE (PREFIX_VEX_0F3A7E) },
9041 { PREFIX_TABLE (PREFIX_VEX_0F3A7F) },
9149 { PREFIX_TABLE (PREFIX_VEX_0F3ADF) },
9169 { PREFIX_TABLE (PREFIX_VEX_0F3AF0) },
9189 #define NEED_OPCODE_TABLE
9190 #include "i386-dis-evex.h"
9191 #undef NEED_OPCODE_TABLE
9192 static const struct dis386 vex_len_table[][2] = {
9193 /* VEX_LEN_0F10_P_1 */
9195 { VEX_W_TABLE (VEX_W_0F10_P_1) },
9196 { VEX_W_TABLE (VEX_W_0F10_P_1) },
9199 /* VEX_LEN_0F10_P_3 */
9201 { VEX_W_TABLE (VEX_W_0F10_P_3) },
9202 { VEX_W_TABLE (VEX_W_0F10_P_3) },
9205 /* VEX_LEN_0F11_P_1 */
9207 { VEX_W_TABLE (VEX_W_0F11_P_1) },
9208 { VEX_W_TABLE (VEX_W_0F11_P_1) },
9211 /* VEX_LEN_0F11_P_3 */
9213 { VEX_W_TABLE (VEX_W_0F11_P_3) },
9214 { VEX_W_TABLE (VEX_W_0F11_P_3) },
9217 /* VEX_LEN_0F12_P_0_M_0 */
9219 { VEX_W_TABLE (VEX_W_0F12_P_0_M_0) },
9222 /* VEX_LEN_0F12_P_0_M_1 */
9224 { VEX_W_TABLE (VEX_W_0F12_P_0_M_1) },
9227 /* VEX_LEN_0F12_P_2 */
9229 { VEX_W_TABLE (VEX_W_0F12_P_2) },
9232 /* VEX_LEN_0F13_M_0 */
9234 { VEX_W_TABLE (VEX_W_0F13_M_0) },
9237 /* VEX_LEN_0F16_P_0_M_0 */
9239 { VEX_W_TABLE (VEX_W_0F16_P_0_M_0) },
9242 /* VEX_LEN_0F16_P_0_M_1 */
9244 { VEX_W_TABLE (VEX_W_0F16_P_0_M_1) },
9247 /* VEX_LEN_0F16_P_2 */
9249 { VEX_W_TABLE (VEX_W_0F16_P_2) },
9252 /* VEX_LEN_0F17_M_0 */
9254 { VEX_W_TABLE (VEX_W_0F17_M_0) },
9257 /* VEX_LEN_0F2A_P_1 */
9259 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev } },
9260 { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev } },
9263 /* VEX_LEN_0F2A_P_3 */
9265 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev } },
9266 { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev } },
9269 /* VEX_LEN_0F2C_P_1 */
9271 { "vcvttss2siY", { Gv, EXdScalar } },
9272 { "vcvttss2siY", { Gv, EXdScalar } },
9275 /* VEX_LEN_0F2C_P_3 */
9277 { "vcvttsd2siY", { Gv, EXqScalar } },
9278 { "vcvttsd2siY", { Gv, EXqScalar } },
9281 /* VEX_LEN_0F2D_P_1 */
9283 { "vcvtss2siY", { Gv, EXdScalar } },
9284 { "vcvtss2siY", { Gv, EXdScalar } },
9287 /* VEX_LEN_0F2D_P_3 */
9289 { "vcvtsd2siY", { Gv, EXqScalar } },
9290 { "vcvtsd2siY", { Gv, EXqScalar } },
9293 /* VEX_LEN_0F2E_P_0 */
9295 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
9296 { VEX_W_TABLE (VEX_W_0F2E_P_0) },
9299 /* VEX_LEN_0F2E_P_2 */
9301 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
9302 { VEX_W_TABLE (VEX_W_0F2E_P_2) },
9305 /* VEX_LEN_0F2F_P_0 */
9307 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
9308 { VEX_W_TABLE (VEX_W_0F2F_P_0) },
9311 /* VEX_LEN_0F2F_P_2 */
9313 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
9314 { VEX_W_TABLE (VEX_W_0F2F_P_2) },
9317 /* VEX_LEN_0F41_P_0 */
9320 { VEX_W_TABLE (VEX_W_0F41_P_0_LEN_1) },
9322 /* VEX_LEN_0F42_P_0 */
9325 { VEX_W_TABLE (VEX_W_0F42_P_0_LEN_1) },
9327 /* VEX_LEN_0F44_P_0 */
9329 { VEX_W_TABLE (VEX_W_0F44_P_0_LEN_0) },
9331 /* VEX_LEN_0F45_P_0 */
9334 { VEX_W_TABLE (VEX_W_0F45_P_0_LEN_1) },
9336 /* VEX_LEN_0F46_P_0 */
9339 { VEX_W_TABLE (VEX_W_0F46_P_0_LEN_1) },
9341 /* VEX_LEN_0F47_P_0 */
9344 { VEX_W_TABLE (VEX_W_0F47_P_0_LEN_1) },
9346 /* VEX_LEN_0F4B_P_2 */
9349 { VEX_W_TABLE (VEX_W_0F4B_P_2_LEN_1) },
9352 /* VEX_LEN_0F51_P_1 */
9354 { VEX_W_TABLE (VEX_W_0F51_P_1) },
9355 { VEX_W_TABLE (VEX_W_0F51_P_1) },
9358 /* VEX_LEN_0F51_P_3 */
9360 { VEX_W_TABLE (VEX_W_0F51_P_3) },
9361 { VEX_W_TABLE (VEX_W_0F51_P_3) },
9364 /* VEX_LEN_0F52_P_1 */
9366 { VEX_W_TABLE (VEX_W_0F52_P_1) },
9367 { VEX_W_TABLE (VEX_W_0F52_P_1) },
9370 /* VEX_LEN_0F53_P_1 */
9372 { VEX_W_TABLE (VEX_W_0F53_P_1) },
9373 { VEX_W_TABLE (VEX_W_0F53_P_1) },
9376 /* VEX_LEN_0F58_P_1 */
9378 { VEX_W_TABLE (VEX_W_0F58_P_1) },
9379 { VEX_W_TABLE (VEX_W_0F58_P_1) },
9382 /* VEX_LEN_0F58_P_3 */
9384 { VEX_W_TABLE (VEX_W_0F58_P_3) },
9385 { VEX_W_TABLE (VEX_W_0F58_P_3) },
9388 /* VEX_LEN_0F59_P_1 */
9390 { VEX_W_TABLE (VEX_W_0F59_P_1) },
9391 { VEX_W_TABLE (VEX_W_0F59_P_1) },
9394 /* VEX_LEN_0F59_P_3 */
9396 { VEX_W_TABLE (VEX_W_0F59_P_3) },
9397 { VEX_W_TABLE (VEX_W_0F59_P_3) },
9400 /* VEX_LEN_0F5A_P_1 */
9402 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
9403 { VEX_W_TABLE (VEX_W_0F5A_P_1) },
9406 /* VEX_LEN_0F5A_P_3 */
9408 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
9409 { VEX_W_TABLE (VEX_W_0F5A_P_3) },
9412 /* VEX_LEN_0F5C_P_1 */
9414 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
9415 { VEX_W_TABLE (VEX_W_0F5C_P_1) },
9418 /* VEX_LEN_0F5C_P_3 */
9420 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
9421 { VEX_W_TABLE (VEX_W_0F5C_P_3) },
9424 /* VEX_LEN_0F5D_P_1 */
9426 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
9427 { VEX_W_TABLE (VEX_W_0F5D_P_1) },
9430 /* VEX_LEN_0F5D_P_3 */
9432 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
9433 { VEX_W_TABLE (VEX_W_0F5D_P_3) },
9436 /* VEX_LEN_0F5E_P_1 */
9438 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
9439 { VEX_W_TABLE (VEX_W_0F5E_P_1) },
9442 /* VEX_LEN_0F5E_P_3 */
9444 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
9445 { VEX_W_TABLE (VEX_W_0F5E_P_3) },
9448 /* VEX_LEN_0F5F_P_1 */
9450 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
9451 { VEX_W_TABLE (VEX_W_0F5F_P_1) },
9454 /* VEX_LEN_0F5F_P_3 */
9456 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
9457 { VEX_W_TABLE (VEX_W_0F5F_P_3) },
9460 /* VEX_LEN_0F6E_P_2 */
9462 { "vmovK", { XMScalar, Edq } },
9463 { "vmovK", { XMScalar, Edq } },
9466 /* VEX_LEN_0F7E_P_1 */
9468 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
9469 { VEX_W_TABLE (VEX_W_0F7E_P_1) },
9472 /* VEX_LEN_0F7E_P_2 */
9474 { "vmovK", { Edq, XMScalar } },
9475 { "vmovK", { Edq, XMScalar } },
9478 /* VEX_LEN_0F90_P_0 */
9480 { VEX_W_TABLE (VEX_W_0F90_P_0_LEN_0) },
9483 /* VEX_LEN_0F91_P_0 */
9485 { VEX_W_TABLE (VEX_W_0F91_P_0_LEN_0) },
9488 /* VEX_LEN_0F92_P_0 */
9490 { VEX_W_TABLE (VEX_W_0F92_P_0_LEN_0) },
9493 /* VEX_LEN_0F93_P_0 */
9495 { VEX_W_TABLE (VEX_W_0F93_P_0_LEN_0) },
9498 /* VEX_LEN_0F98_P_0 */
9500 { VEX_W_TABLE (VEX_W_0F98_P_0_LEN_0) },
9503 /* VEX_LEN_0FAE_R_2_M_0 */
9505 { VEX_W_TABLE (VEX_W_0FAE_R_2_M_0) },
9508 /* VEX_LEN_0FAE_R_3_M_0 */
9510 { VEX_W_TABLE (VEX_W_0FAE_R_3_M_0) },
9513 /* VEX_LEN_0FC2_P_1 */
9515 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
9516 { VEX_W_TABLE (VEX_W_0FC2_P_1) },
9519 /* VEX_LEN_0FC2_P_3 */
9521 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
9522 { VEX_W_TABLE (VEX_W_0FC2_P_3) },
9525 /* VEX_LEN_0FC4_P_2 */
9527 { VEX_W_TABLE (VEX_W_0FC4_P_2) },
9530 /* VEX_LEN_0FC5_P_2 */
9532 { VEX_W_TABLE (VEX_W_0FC5_P_2) },
9535 /* VEX_LEN_0FD6_P_2 */
9537 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
9538 { VEX_W_TABLE (VEX_W_0FD6_P_2) },
9541 /* VEX_LEN_0FF7_P_2 */
9543 { VEX_W_TABLE (VEX_W_0FF7_P_2) },
9546 /* VEX_LEN_0F3816_P_2 */
9549 { VEX_W_TABLE (VEX_W_0F3816_P_2) },
9552 /* VEX_LEN_0F3819_P_2 */
9555 { VEX_W_TABLE (VEX_W_0F3819_P_2) },
9558 /* VEX_LEN_0F381A_P_2_M_0 */
9561 { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0) },
9564 /* VEX_LEN_0F3836_P_2 */
9567 { VEX_W_TABLE (VEX_W_0F3836_P_2) },
9570 /* VEX_LEN_0F3841_P_2 */
9572 { VEX_W_TABLE (VEX_W_0F3841_P_2) },
9575 /* VEX_LEN_0F385A_P_2_M_0 */
9578 { VEX_W_TABLE (VEX_W_0F385A_P_2_M_0) },
9581 /* VEX_LEN_0F38DB_P_2 */
9583 { VEX_W_TABLE (VEX_W_0F38DB_P_2) },
9586 /* VEX_LEN_0F38DC_P_2 */
9588 { VEX_W_TABLE (VEX_W_0F38DC_P_2) },
9591 /* VEX_LEN_0F38DD_P_2 */
9593 { VEX_W_TABLE (VEX_W_0F38DD_P_2) },
9596 /* VEX_LEN_0F38DE_P_2 */
9598 { VEX_W_TABLE (VEX_W_0F38DE_P_2) },
9601 /* VEX_LEN_0F38DF_P_2 */
9603 { VEX_W_TABLE (VEX_W_0F38DF_P_2) },
9606 /* VEX_LEN_0F38F2_P_0 */
9608 { "andnS", { Gdq, VexGdq, Edq } },
9611 /* VEX_LEN_0F38F3_R_1_P_0 */
9613 { "blsrS", { VexGdq, Edq } },
9616 /* VEX_LEN_0F38F3_R_2_P_0 */
9618 { "blsmskS", { VexGdq, Edq } },
9621 /* VEX_LEN_0F38F3_R_3_P_0 */
9623 { "blsiS", { VexGdq, Edq } },
9626 /* VEX_LEN_0F38F5_P_0 */
9628 { "bzhiS", { Gdq, Edq, VexGdq } },
9631 /* VEX_LEN_0F38F5_P_1 */
9633 { "pextS", { Gdq, VexGdq, Edq } },
9636 /* VEX_LEN_0F38F5_P_3 */
9638 { "pdepS", { Gdq, VexGdq, Edq } },
9641 /* VEX_LEN_0F38F6_P_3 */
9643 { "mulxS", { Gdq, VexGdq, Edq } },
9646 /* VEX_LEN_0F38F7_P_0 */
9648 { "bextrS", { Gdq, Edq, VexGdq } },
9651 /* VEX_LEN_0F38F7_P_1 */
9653 { "sarxS", { Gdq, Edq, VexGdq } },
9656 /* VEX_LEN_0F38F7_P_2 */
9658 { "shlxS", { Gdq, Edq, VexGdq } },
9661 /* VEX_LEN_0F38F7_P_3 */
9663 { "shrxS", { Gdq, Edq, VexGdq } },
9666 /* VEX_LEN_0F3A00_P_2 */
9669 { VEX_W_TABLE (VEX_W_0F3A00_P_2) },
9672 /* VEX_LEN_0F3A01_P_2 */
9675 { VEX_W_TABLE (VEX_W_0F3A01_P_2) },
9678 /* VEX_LEN_0F3A06_P_2 */
9681 { VEX_W_TABLE (VEX_W_0F3A06_P_2) },
9684 /* VEX_LEN_0F3A0A_P_2 */
9686 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
9687 { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
9690 /* VEX_LEN_0F3A0B_P_2 */
9692 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
9693 { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
9696 /* VEX_LEN_0F3A14_P_2 */
9698 { VEX_W_TABLE (VEX_W_0F3A14_P_2) },
9701 /* VEX_LEN_0F3A15_P_2 */
9703 { VEX_W_TABLE (VEX_W_0F3A15_P_2) },
9706 /* VEX_LEN_0F3A16_P_2 */
9708 { "vpextrK", { Edq, XM, Ib } },
9711 /* VEX_LEN_0F3A17_P_2 */
9713 { "vextractps", { Edqd, XM, Ib } },
9716 /* VEX_LEN_0F3A18_P_2 */
9719 { VEX_W_TABLE (VEX_W_0F3A18_P_2) },
9722 /* VEX_LEN_0F3A19_P_2 */
9725 { VEX_W_TABLE (VEX_W_0F3A19_P_2) },
9728 /* VEX_LEN_0F3A20_P_2 */
9730 { VEX_W_TABLE (VEX_W_0F3A20_P_2) },
9733 /* VEX_LEN_0F3A21_P_2 */
9735 { VEX_W_TABLE (VEX_W_0F3A21_P_2) },
9738 /* VEX_LEN_0F3A22_P_2 */
9740 { "vpinsrK", { XM, Vex128, Edq, Ib } },
9743 /* VEX_LEN_0F3A30_P_2 */
9745 { VEX_W_TABLE (VEX_W_0F3A30_P_2_LEN_0) },
9748 /* VEX_LEN_0F3A32_P_2 */
9750 { VEX_W_TABLE (VEX_W_0F3A32_P_2_LEN_0) },
9753 /* VEX_LEN_0F3A38_P_2 */
9756 { VEX_W_TABLE (VEX_W_0F3A38_P_2) },
9759 /* VEX_LEN_0F3A39_P_2 */
9762 { VEX_W_TABLE (VEX_W_0F3A39_P_2) },
9765 /* VEX_LEN_0F3A41_P_2 */
9767 { VEX_W_TABLE (VEX_W_0F3A41_P_2) },
9770 /* VEX_LEN_0F3A44_P_2 */
9772 { VEX_W_TABLE (VEX_W_0F3A44_P_2) },
9775 /* VEX_LEN_0F3A46_P_2 */
9778 { VEX_W_TABLE (VEX_W_0F3A46_P_2) },
9781 /* VEX_LEN_0F3A60_P_2 */
9783 { VEX_W_TABLE (VEX_W_0F3A60_P_2) },
9786 /* VEX_LEN_0F3A61_P_2 */
9788 { VEX_W_TABLE (VEX_W_0F3A61_P_2) },
9791 /* VEX_LEN_0F3A62_P_2 */
9793 { VEX_W_TABLE (VEX_W_0F3A62_P_2) },
9796 /* VEX_LEN_0F3A63_P_2 */
9798 { VEX_W_TABLE (VEX_W_0F3A63_P_2) },
9801 /* VEX_LEN_0F3A6A_P_2 */
9803 { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
9806 /* VEX_LEN_0F3A6B_P_2 */
9808 { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
9811 /* VEX_LEN_0F3A6E_P_2 */
9813 { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
9816 /* VEX_LEN_0F3A6F_P_2 */
9818 { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
9821 /* VEX_LEN_0F3A7A_P_2 */
9823 { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
9826 /* VEX_LEN_0F3A7B_P_2 */
9828 { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
9831 /* VEX_LEN_0F3A7E_P_2 */
9833 { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
9836 /* VEX_LEN_0F3A7F_P_2 */
9838 { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
9841 /* VEX_LEN_0F3ADF_P_2 */
9843 { VEX_W_TABLE (VEX_W_0F3ADF_P_2) },
9846 /* VEX_LEN_0F3AF0_P_3 */
9848 { "rorxS", { Gdq, Edq, Ib } },
9851 /* VEX_LEN_0FXOP_08_CC */
9853 { "vpcomb", { XM, Vex128, EXx, Ib } },
9856 /* VEX_LEN_0FXOP_08_CD */
9858 { "vpcomw", { XM, Vex128, EXx, Ib } },
9861 /* VEX_LEN_0FXOP_08_CE */
9863 { "vpcomd", { XM, Vex128, EXx, Ib } },
9866 /* VEX_LEN_0FXOP_08_CF */
9868 { "vpcomq", { XM, Vex128, EXx, Ib } },
9871 /* VEX_LEN_0FXOP_08_EC */
9873 { "vpcomub", { XM, Vex128, EXx, Ib } },
9876 /* VEX_LEN_0FXOP_08_ED */
9878 { "vpcomuw", { XM, Vex128, EXx, Ib } },
9881 /* VEX_LEN_0FXOP_08_EE */
9883 { "vpcomud", { XM, Vex128, EXx, Ib } },
9886 /* VEX_LEN_0FXOP_08_EF */
9888 { "vpcomuq", { XM, Vex128, EXx, Ib } },
9891 /* VEX_LEN_0FXOP_09_80 */
9893 { "vfrczps", { XM, EXxmm } },
9894 { "vfrczps", { XM, EXymmq } },
9897 /* VEX_LEN_0FXOP_09_81 */
9899 { "vfrczpd", { XM, EXxmm } },
9900 { "vfrczpd", { XM, EXymmq } },
9904 static const struct dis386 vex_w_table[][2] = {
9906 /* VEX_W_0F10_P_0 */
9907 { "vmovups", { XM, EXx } },
9910 /* VEX_W_0F10_P_1 */
9911 { "vmovss", { XMVexScalar, VexScalar, EXdScalar } },
9914 /* VEX_W_0F10_P_2 */
9915 { "vmovupd", { XM, EXx } },
9918 /* VEX_W_0F10_P_3 */
9919 { "vmovsd", { XMVexScalar, VexScalar, EXqScalar } },
9922 /* VEX_W_0F11_P_0 */
9923 { "vmovups", { EXxS, XM } },
9926 /* VEX_W_0F11_P_1 */
9927 { "vmovss", { EXdVexScalarS, VexScalar, XMScalar } },
9930 /* VEX_W_0F11_P_2 */
9931 { "vmovupd", { EXxS, XM } },
9934 /* VEX_W_0F11_P_3 */
9935 { "vmovsd", { EXqVexScalarS, VexScalar, XMScalar } },
9938 /* VEX_W_0F12_P_0_M_0 */
9939 { "vmovlps", { XM, Vex128, EXq } },
9942 /* VEX_W_0F12_P_0_M_1 */
9943 { "vmovhlps", { XM, Vex128, EXq } },
9946 /* VEX_W_0F12_P_1 */
9947 { "vmovsldup", { XM, EXx } },
9950 /* VEX_W_0F12_P_2 */
9951 { "vmovlpd", { XM, Vex128, EXq } },
9954 /* VEX_W_0F12_P_3 */
9955 { "vmovddup", { XM, EXymmq } },
9958 /* VEX_W_0F13_M_0 */
9959 { "vmovlpX", { EXq, XM } },
9963 { "vunpcklpX", { XM, Vex, EXx } },
9967 { "vunpckhpX", { XM, Vex, EXx } },
9970 /* VEX_W_0F16_P_0_M_0 */
9971 { "vmovhps", { XM, Vex128, EXq } },
9974 /* VEX_W_0F16_P_0_M_1 */
9975 { "vmovlhps", { XM, Vex128, EXq } },
9978 /* VEX_W_0F16_P_1 */
9979 { "vmovshdup", { XM, EXx } },
9982 /* VEX_W_0F16_P_2 */
9983 { "vmovhpd", { XM, Vex128, EXq } },
9986 /* VEX_W_0F17_M_0 */
9987 { "vmovhpX", { EXq, XM } },
9991 { "vmovapX", { XM, EXx } },
9995 { "vmovapX", { EXxS, XM } },
9998 /* VEX_W_0F2B_M_0 */
9999 { "vmovntpX", { Mx, XM } },
10002 /* VEX_W_0F2E_P_0 */
10003 { "vucomiss", { XMScalar, EXdScalar } },
10006 /* VEX_W_0F2E_P_2 */
10007 { "vucomisd", { XMScalar, EXqScalar } },
10010 /* VEX_W_0F2F_P_0 */
10011 { "vcomiss", { XMScalar, EXdScalar } },
10014 /* VEX_W_0F2F_P_2 */
10015 { "vcomisd", { XMScalar, EXqScalar } },
10018 /* VEX_W_0F41_P_0_LEN_1 */
10019 { "kandw", { MaskG, MaskVex, MaskR } },
10022 /* VEX_W_0F42_P_0_LEN_1 */
10023 { "kandnw", { MaskG, MaskVex, MaskR } },
10026 /* VEX_W_0F44_P_0_LEN_0 */
10027 { "knotw", { MaskG, MaskR } },
10030 /* VEX_W_0F45_P_0_LEN_1 */
10031 { "korw", { MaskG, MaskVex, MaskR } },
10034 /* VEX_W_0F46_P_0_LEN_1 */
10035 { "kxnorw", { MaskG, MaskVex, MaskR } },
10038 /* VEX_W_0F47_P_0_LEN_1 */
10039 { "kxorw", { MaskG, MaskVex, MaskR } },
10042 /* VEX_W_0F4B_P_2_LEN_1 */
10043 { "kunpckbw", { MaskG, MaskVex, MaskR } },
10046 /* VEX_W_0F50_M_0 */
10047 { "vmovmskpX", { Gdq, XS } },
10050 /* VEX_W_0F51_P_0 */
10051 { "vsqrtps", { XM, EXx } },
10054 /* VEX_W_0F51_P_1 */
10055 { "vsqrtss", { XMScalar, VexScalar, EXdScalar } },
10058 /* VEX_W_0F51_P_2 */
10059 { "vsqrtpd", { XM, EXx } },
10062 /* VEX_W_0F51_P_3 */
10063 { "vsqrtsd", { XMScalar, VexScalar, EXqScalar } },
10066 /* VEX_W_0F52_P_0 */
10067 { "vrsqrtps", { XM, EXx } },
10070 /* VEX_W_0F52_P_1 */
10071 { "vrsqrtss", { XMScalar, VexScalar, EXdScalar } },
10074 /* VEX_W_0F53_P_0 */
10075 { "vrcpps", { XM, EXx } },
10078 /* VEX_W_0F53_P_1 */
10079 { "vrcpss", { XMScalar, VexScalar, EXdScalar } },
10082 /* VEX_W_0F58_P_0 */
10083 { "vaddps", { XM, Vex, EXx } },
10086 /* VEX_W_0F58_P_1 */
10087 { "vaddss", { XMScalar, VexScalar, EXdScalar } },
10090 /* VEX_W_0F58_P_2 */
10091 { "vaddpd", { XM, Vex, EXx } },
10094 /* VEX_W_0F58_P_3 */
10095 { "vaddsd", { XMScalar, VexScalar, EXqScalar } },
10098 /* VEX_W_0F59_P_0 */
10099 { "vmulps", { XM, Vex, EXx } },
10102 /* VEX_W_0F59_P_1 */
10103 { "vmulss", { XMScalar, VexScalar, EXdScalar } },
10106 /* VEX_W_0F59_P_2 */
10107 { "vmulpd", { XM, Vex, EXx } },
10110 /* VEX_W_0F59_P_3 */
10111 { "vmulsd", { XMScalar, VexScalar, EXqScalar } },
10114 /* VEX_W_0F5A_P_0 */
10115 { "vcvtps2pd", { XM, EXxmmq } },
10118 /* VEX_W_0F5A_P_1 */
10119 { "vcvtss2sd", { XMScalar, VexScalar, EXdScalar } },
10122 /* VEX_W_0F5A_P_3 */
10123 { "vcvtsd2ss", { XMScalar, VexScalar, EXqScalar } },
10126 /* VEX_W_0F5B_P_0 */
10127 { "vcvtdq2ps", { XM, EXx } },
10130 /* VEX_W_0F5B_P_1 */
10131 { "vcvttps2dq", { XM, EXx } },
10134 /* VEX_W_0F5B_P_2 */
10135 { "vcvtps2dq", { XM, EXx } },
10138 /* VEX_W_0F5C_P_0 */
10139 { "vsubps", { XM, Vex, EXx } },
10142 /* VEX_W_0F5C_P_1 */
10143 { "vsubss", { XMScalar, VexScalar, EXdScalar } },
10146 /* VEX_W_0F5C_P_2 */
10147 { "vsubpd", { XM, Vex, EXx } },
10150 /* VEX_W_0F5C_P_3 */
10151 { "vsubsd", { XMScalar, VexScalar, EXqScalar } },
10154 /* VEX_W_0F5D_P_0 */
10155 { "vminps", { XM, Vex, EXx } },
10158 /* VEX_W_0F5D_P_1 */
10159 { "vminss", { XMScalar, VexScalar, EXdScalar } },
10162 /* VEX_W_0F5D_P_2 */
10163 { "vminpd", { XM, Vex, EXx } },
10166 /* VEX_W_0F5D_P_3 */
10167 { "vminsd", { XMScalar, VexScalar, EXqScalar } },
10170 /* VEX_W_0F5E_P_0 */
10171 { "vdivps", { XM, Vex, EXx } },
10174 /* VEX_W_0F5E_P_1 */
10175 { "vdivss", { XMScalar, VexScalar, EXdScalar } },
10178 /* VEX_W_0F5E_P_2 */
10179 { "vdivpd", { XM, Vex, EXx } },
10182 /* VEX_W_0F5E_P_3 */
10183 { "vdivsd", { XMScalar, VexScalar, EXqScalar } },
10186 /* VEX_W_0F5F_P_0 */
10187 { "vmaxps", { XM, Vex, EXx } },
10190 /* VEX_W_0F5F_P_1 */
10191 { "vmaxss", { XMScalar, VexScalar, EXdScalar } },
10194 /* VEX_W_0F5F_P_2 */
10195 { "vmaxpd", { XM, Vex, EXx } },
10198 /* VEX_W_0F5F_P_3 */
10199 { "vmaxsd", { XMScalar, VexScalar, EXqScalar } },
10202 /* VEX_W_0F60_P_2 */
10203 { "vpunpcklbw", { XM, Vex, EXx } },
10206 /* VEX_W_0F61_P_2 */
10207 { "vpunpcklwd", { XM, Vex, EXx } },
10210 /* VEX_W_0F62_P_2 */
10211 { "vpunpckldq", { XM, Vex, EXx } },
10214 /* VEX_W_0F63_P_2 */
10215 { "vpacksswb", { XM, Vex, EXx } },
10218 /* VEX_W_0F64_P_2 */
10219 { "vpcmpgtb", { XM, Vex, EXx } },
10222 /* VEX_W_0F65_P_2 */
10223 { "vpcmpgtw", { XM, Vex, EXx } },
10226 /* VEX_W_0F66_P_2 */
10227 { "vpcmpgtd", { XM, Vex, EXx } },
10230 /* VEX_W_0F67_P_2 */
10231 { "vpackuswb", { XM, Vex, EXx } },
10234 /* VEX_W_0F68_P_2 */
10235 { "vpunpckhbw", { XM, Vex, EXx } },
10238 /* VEX_W_0F69_P_2 */
10239 { "vpunpckhwd", { XM, Vex, EXx } },
10242 /* VEX_W_0F6A_P_2 */
10243 { "vpunpckhdq", { XM, Vex, EXx } },
10246 /* VEX_W_0F6B_P_2 */
10247 { "vpackssdw", { XM, Vex, EXx } },
10250 /* VEX_W_0F6C_P_2 */
10251 { "vpunpcklqdq", { XM, Vex, EXx } },
10254 /* VEX_W_0F6D_P_2 */
10255 { "vpunpckhqdq", { XM, Vex, EXx } },
10258 /* VEX_W_0F6F_P_1 */
10259 { "vmovdqu", { XM, EXx } },
10262 /* VEX_W_0F6F_P_2 */
10263 { "vmovdqa", { XM, EXx } },
10266 /* VEX_W_0F70_P_1 */
10267 { "vpshufhw", { XM, EXx, Ib } },
10270 /* VEX_W_0F70_P_2 */
10271 { "vpshufd", { XM, EXx, Ib } },
10274 /* VEX_W_0F70_P_3 */
10275 { "vpshuflw", { XM, EXx, Ib } },
10278 /* VEX_W_0F71_R_2_P_2 */
10279 { "vpsrlw", { Vex, XS, Ib } },
10282 /* VEX_W_0F71_R_4_P_2 */
10283 { "vpsraw", { Vex, XS, Ib } },
10286 /* VEX_W_0F71_R_6_P_2 */
10287 { "vpsllw", { Vex, XS, Ib } },
10290 /* VEX_W_0F72_R_2_P_2 */
10291 { "vpsrld", { Vex, XS, Ib } },
10294 /* VEX_W_0F72_R_4_P_2 */
10295 { "vpsrad", { Vex, XS, Ib } },
10298 /* VEX_W_0F72_R_6_P_2 */
10299 { "vpslld", { Vex, XS, Ib } },
10302 /* VEX_W_0F73_R_2_P_2 */
10303 { "vpsrlq", { Vex, XS, Ib } },
10306 /* VEX_W_0F73_R_3_P_2 */
10307 { "vpsrldq", { Vex, XS, Ib } },
10310 /* VEX_W_0F73_R_6_P_2 */
10311 { "vpsllq", { Vex, XS, Ib } },
10314 /* VEX_W_0F73_R_7_P_2 */
10315 { "vpslldq", { Vex, XS, Ib } },
10318 /* VEX_W_0F74_P_2 */
10319 { "vpcmpeqb", { XM, Vex, EXx } },
10322 /* VEX_W_0F75_P_2 */
10323 { "vpcmpeqw", { XM, Vex, EXx } },
10326 /* VEX_W_0F76_P_2 */
10327 { "vpcmpeqd", { XM, Vex, EXx } },
10330 /* VEX_W_0F77_P_0 */
10334 /* VEX_W_0F7C_P_2 */
10335 { "vhaddpd", { XM, Vex, EXx } },
10338 /* VEX_W_0F7C_P_3 */
10339 { "vhaddps", { XM, Vex, EXx } },
10342 /* VEX_W_0F7D_P_2 */
10343 { "vhsubpd", { XM, Vex, EXx } },
10346 /* VEX_W_0F7D_P_3 */
10347 { "vhsubps", { XM, Vex, EXx } },
10350 /* VEX_W_0F7E_P_1 */
10351 { "vmovq", { XMScalar, EXqScalar } },
10354 /* VEX_W_0F7F_P_1 */
10355 { "vmovdqu", { EXxS, XM } },
10358 /* VEX_W_0F7F_P_2 */
10359 { "vmovdqa", { EXxS, XM } },
10362 /* VEX_W_0F90_P_0_LEN_0 */
10363 { "kmovw", { MaskG, MaskE } },
10366 /* VEX_W_0F91_P_0_LEN_0 */
10367 { "kmovw", { Ew, MaskG } },
10370 /* VEX_W_0F92_P_0_LEN_0 */
10371 { "kmovw", { MaskG, Rdq } },
10374 /* VEX_W_0F93_P_0_LEN_0 */
10375 { "kmovw", { Gdq, MaskR } },
10378 /* VEX_W_0F98_P_0_LEN_0 */
10379 { "kortestw", { MaskG, MaskR } },
10382 /* VEX_W_0FAE_R_2_M_0 */
10383 { "vldmxcsr", { Md } },
10386 /* VEX_W_0FAE_R_3_M_0 */
10387 { "vstmxcsr", { Md } },
10390 /* VEX_W_0FC2_P_0 */
10391 { "vcmpps", { XM, Vex, EXx, VCMP } },
10394 /* VEX_W_0FC2_P_1 */
10395 { "vcmpss", { XMScalar, VexScalar, EXdScalar, VCMP } },
10398 /* VEX_W_0FC2_P_2 */
10399 { "vcmppd", { XM, Vex, EXx, VCMP } },
10402 /* VEX_W_0FC2_P_3 */
10403 { "vcmpsd", { XMScalar, VexScalar, EXqScalar, VCMP } },
10406 /* VEX_W_0FC4_P_2 */
10407 { "vpinsrw", { XM, Vex128, Edqw, Ib } },
10410 /* VEX_W_0FC5_P_2 */
10411 { "vpextrw", { Gdq, XS, Ib } },
10414 /* VEX_W_0FD0_P_2 */
10415 { "vaddsubpd", { XM, Vex, EXx } },
10418 /* VEX_W_0FD0_P_3 */
10419 { "vaddsubps", { XM, Vex, EXx } },
10422 /* VEX_W_0FD1_P_2 */
10423 { "vpsrlw", { XM, Vex, EXxmm } },
10426 /* VEX_W_0FD2_P_2 */
10427 { "vpsrld", { XM, Vex, EXxmm } },
10430 /* VEX_W_0FD3_P_2 */
10431 { "vpsrlq", { XM, Vex, EXxmm } },
10434 /* VEX_W_0FD4_P_2 */
10435 { "vpaddq", { XM, Vex, EXx } },
10438 /* VEX_W_0FD5_P_2 */
10439 { "vpmullw", { XM, Vex, EXx } },
10442 /* VEX_W_0FD6_P_2 */
10443 { "vmovq", { EXqScalarS, XMScalar } },
10446 /* VEX_W_0FD7_P_2_M_1 */
10447 { "vpmovmskb", { Gdq, XS } },
10450 /* VEX_W_0FD8_P_2 */
10451 { "vpsubusb", { XM, Vex, EXx } },
10454 /* VEX_W_0FD9_P_2 */
10455 { "vpsubusw", { XM, Vex, EXx } },
10458 /* VEX_W_0FDA_P_2 */
10459 { "vpminub", { XM, Vex, EXx } },
10462 /* VEX_W_0FDB_P_2 */
10463 { "vpand", { XM, Vex, EXx } },
10466 /* VEX_W_0FDC_P_2 */
10467 { "vpaddusb", { XM, Vex, EXx } },
10470 /* VEX_W_0FDD_P_2 */
10471 { "vpaddusw", { XM, Vex, EXx } },
10474 /* VEX_W_0FDE_P_2 */
10475 { "vpmaxub", { XM, Vex, EXx } },
10478 /* VEX_W_0FDF_P_2 */
10479 { "vpandn", { XM, Vex, EXx } },
10482 /* VEX_W_0FE0_P_2 */
10483 { "vpavgb", { XM, Vex, EXx } },
10486 /* VEX_W_0FE1_P_2 */
10487 { "vpsraw", { XM, Vex, EXxmm } },
10490 /* VEX_W_0FE2_P_2 */
10491 { "vpsrad", { XM, Vex, EXxmm } },
10494 /* VEX_W_0FE3_P_2 */
10495 { "vpavgw", { XM, Vex, EXx } },
10498 /* VEX_W_0FE4_P_2 */
10499 { "vpmulhuw", { XM, Vex, EXx } },
10502 /* VEX_W_0FE5_P_2 */
10503 { "vpmulhw", { XM, Vex, EXx } },
10506 /* VEX_W_0FE6_P_1 */
10507 { "vcvtdq2pd", { XM, EXxmmq } },
10510 /* VEX_W_0FE6_P_2 */
10511 { "vcvttpd2dq%XY", { XMM, EXx } },
10514 /* VEX_W_0FE6_P_3 */
10515 { "vcvtpd2dq%XY", { XMM, EXx } },
10518 /* VEX_W_0FE7_P_2_M_0 */
10519 { "vmovntdq", { Mx, XM } },
10522 /* VEX_W_0FE8_P_2 */
10523 { "vpsubsb", { XM, Vex, EXx } },
10526 /* VEX_W_0FE9_P_2 */
10527 { "vpsubsw", { XM, Vex, EXx } },
10530 /* VEX_W_0FEA_P_2 */
10531 { "vpminsw", { XM, Vex, EXx } },
10534 /* VEX_W_0FEB_P_2 */
10535 { "vpor", { XM, Vex, EXx } },
10538 /* VEX_W_0FEC_P_2 */
10539 { "vpaddsb", { XM, Vex, EXx } },
10542 /* VEX_W_0FED_P_2 */
10543 { "vpaddsw", { XM, Vex, EXx } },
10546 /* VEX_W_0FEE_P_2 */
10547 { "vpmaxsw", { XM, Vex, EXx } },
10550 /* VEX_W_0FEF_P_2 */
10551 { "vpxor", { XM, Vex, EXx } },
10554 /* VEX_W_0FF0_P_3_M_0 */
10555 { "vlddqu", { XM, M } },
10558 /* VEX_W_0FF1_P_2 */
10559 { "vpsllw", { XM, Vex, EXxmm } },
10562 /* VEX_W_0FF2_P_2 */
10563 { "vpslld", { XM, Vex, EXxmm } },
10566 /* VEX_W_0FF3_P_2 */
10567 { "vpsllq", { XM, Vex, EXxmm } },
10570 /* VEX_W_0FF4_P_2 */
10571 { "vpmuludq", { XM, Vex, EXx } },
10574 /* VEX_W_0FF5_P_2 */
10575 { "vpmaddwd", { XM, Vex, EXx } },
10578 /* VEX_W_0FF6_P_2 */
10579 { "vpsadbw", { XM, Vex, EXx } },
10582 /* VEX_W_0FF7_P_2 */
10583 { "vmaskmovdqu", { XM, XS } },
10586 /* VEX_W_0FF8_P_2 */
10587 { "vpsubb", { XM, Vex, EXx } },
10590 /* VEX_W_0FF9_P_2 */
10591 { "vpsubw", { XM, Vex, EXx } },
10594 /* VEX_W_0FFA_P_2 */
10595 { "vpsubd", { XM, Vex, EXx } },
10598 /* VEX_W_0FFB_P_2 */
10599 { "vpsubq", { XM, Vex, EXx } },
10602 /* VEX_W_0FFC_P_2 */
10603 { "vpaddb", { XM, Vex, EXx } },
10606 /* VEX_W_0FFD_P_2 */
10607 { "vpaddw", { XM, Vex, EXx } },
10610 /* VEX_W_0FFE_P_2 */
10611 { "vpaddd", { XM, Vex, EXx } },
10614 /* VEX_W_0F3800_P_2 */
10615 { "vpshufb", { XM, Vex, EXx } },
10618 /* VEX_W_0F3801_P_2 */
10619 { "vphaddw", { XM, Vex, EXx } },
10622 /* VEX_W_0F3802_P_2 */
10623 { "vphaddd", { XM, Vex, EXx } },
10626 /* VEX_W_0F3803_P_2 */
10627 { "vphaddsw", { XM, Vex, EXx } },
10630 /* VEX_W_0F3804_P_2 */
10631 { "vpmaddubsw", { XM, Vex, EXx } },
10634 /* VEX_W_0F3805_P_2 */
10635 { "vphsubw", { XM, Vex, EXx } },
10638 /* VEX_W_0F3806_P_2 */
10639 { "vphsubd", { XM, Vex, EXx } },
10642 /* VEX_W_0F3807_P_2 */
10643 { "vphsubsw", { XM, Vex, EXx } },
10646 /* VEX_W_0F3808_P_2 */
10647 { "vpsignb", { XM, Vex, EXx } },
10650 /* VEX_W_0F3809_P_2 */
10651 { "vpsignw", { XM, Vex, EXx } },
10654 /* VEX_W_0F380A_P_2 */
10655 { "vpsignd", { XM, Vex, EXx } },
10658 /* VEX_W_0F380B_P_2 */
10659 { "vpmulhrsw", { XM, Vex, EXx } },
10662 /* VEX_W_0F380C_P_2 */
10663 { "vpermilps", { XM, Vex, EXx } },
10666 /* VEX_W_0F380D_P_2 */
10667 { "vpermilpd", { XM, Vex, EXx } },
10670 /* VEX_W_0F380E_P_2 */
10671 { "vtestps", { XM, EXx } },
10674 /* VEX_W_0F380F_P_2 */
10675 { "vtestpd", { XM, EXx } },
10678 /* VEX_W_0F3816_P_2 */
10679 { "vpermps", { XM, Vex, EXx } },
10682 /* VEX_W_0F3817_P_2 */
10683 { "vptest", { XM, EXx } },
10686 /* VEX_W_0F3818_P_2 */
10687 { "vbroadcastss", { XM, EXxmm_md } },
10690 /* VEX_W_0F3819_P_2 */
10691 { "vbroadcastsd", { XM, EXxmm_mq } },
10694 /* VEX_W_0F381A_P_2_M_0 */
10695 { "vbroadcastf128", { XM, Mxmm } },
10698 /* VEX_W_0F381C_P_2 */
10699 { "vpabsb", { XM, EXx } },
10702 /* VEX_W_0F381D_P_2 */
10703 { "vpabsw", { XM, EXx } },
10706 /* VEX_W_0F381E_P_2 */
10707 { "vpabsd", { XM, EXx } },
10710 /* VEX_W_0F3820_P_2 */
10711 { "vpmovsxbw", { XM, EXxmmq } },
10714 /* VEX_W_0F3821_P_2 */
10715 { "vpmovsxbd", { XM, EXxmmqd } },
10718 /* VEX_W_0F3822_P_2 */
10719 { "vpmovsxbq", { XM, EXxmmdw } },
10722 /* VEX_W_0F3823_P_2 */
10723 { "vpmovsxwd", { XM, EXxmmq } },
10726 /* VEX_W_0F3824_P_2 */
10727 { "vpmovsxwq", { XM, EXxmmqd } },
10730 /* VEX_W_0F3825_P_2 */
10731 { "vpmovsxdq", { XM, EXxmmq } },
10734 /* VEX_W_0F3828_P_2 */
10735 { "vpmuldq", { XM, Vex, EXx } },
10738 /* VEX_W_0F3829_P_2 */
10739 { "vpcmpeqq", { XM, Vex, EXx } },
10742 /* VEX_W_0F382A_P_2_M_0 */
10743 { "vmovntdqa", { XM, Mx } },
10746 /* VEX_W_0F382B_P_2 */
10747 { "vpackusdw", { XM, Vex, EXx } },
10750 /* VEX_W_0F382C_P_2_M_0 */
10751 { "vmaskmovps", { XM, Vex, Mx } },
10754 /* VEX_W_0F382D_P_2_M_0 */
10755 { "vmaskmovpd", { XM, Vex, Mx } },
10758 /* VEX_W_0F382E_P_2_M_0 */
10759 { "vmaskmovps", { Mx, Vex, XM } },
10762 /* VEX_W_0F382F_P_2_M_0 */
10763 { "vmaskmovpd", { Mx, Vex, XM } },
10766 /* VEX_W_0F3830_P_2 */
10767 { "vpmovzxbw", { XM, EXxmmq } },
10770 /* VEX_W_0F3831_P_2 */
10771 { "vpmovzxbd", { XM, EXxmmqd } },
10774 /* VEX_W_0F3832_P_2 */
10775 { "vpmovzxbq", { XM, EXxmmdw } },
10778 /* VEX_W_0F3833_P_2 */
10779 { "vpmovzxwd", { XM, EXxmmq } },
10782 /* VEX_W_0F3834_P_2 */
10783 { "vpmovzxwq", { XM, EXxmmqd } },
10786 /* VEX_W_0F3835_P_2 */
10787 { "vpmovzxdq", { XM, EXxmmq } },
10790 /* VEX_W_0F3836_P_2 */
10791 { "vpermd", { XM, Vex, EXx } },
10794 /* VEX_W_0F3837_P_2 */
10795 { "vpcmpgtq", { XM, Vex, EXx } },
10798 /* VEX_W_0F3838_P_2 */
10799 { "vpminsb", { XM, Vex, EXx } },
10802 /* VEX_W_0F3839_P_2 */
10803 { "vpminsd", { XM, Vex, EXx } },
10806 /* VEX_W_0F383A_P_2 */
10807 { "vpminuw", { XM, Vex, EXx } },
10810 /* VEX_W_0F383B_P_2 */
10811 { "vpminud", { XM, Vex, EXx } },
10814 /* VEX_W_0F383C_P_2 */
10815 { "vpmaxsb", { XM, Vex, EXx } },
10818 /* VEX_W_0F383D_P_2 */
10819 { "vpmaxsd", { XM, Vex, EXx } },
10822 /* VEX_W_0F383E_P_2 */
10823 { "vpmaxuw", { XM, Vex, EXx } },
10826 /* VEX_W_0F383F_P_2 */
10827 { "vpmaxud", { XM, Vex, EXx } },
10830 /* VEX_W_0F3840_P_2 */
10831 { "vpmulld", { XM, Vex, EXx } },
10834 /* VEX_W_0F3841_P_2 */
10835 { "vphminposuw", { XM, EXx } },
10838 /* VEX_W_0F3846_P_2 */
10839 { "vpsravd", { XM, Vex, EXx } },
10842 /* VEX_W_0F3858_P_2 */
10843 { "vpbroadcastd", { XM, EXxmm_md } },
10846 /* VEX_W_0F3859_P_2 */
10847 { "vpbroadcastq", { XM, EXxmm_mq } },
10850 /* VEX_W_0F385A_P_2_M_0 */
10851 { "vbroadcasti128", { XM, Mxmm } },
10854 /* VEX_W_0F3878_P_2 */
10855 { "vpbroadcastb", { XM, EXxmm_mb } },
10858 /* VEX_W_0F3879_P_2 */
10859 { "vpbroadcastw", { XM, EXxmm_mw } },
10862 /* VEX_W_0F38DB_P_2 */
10863 { "vaesimc", { XM, EXx } },
10866 /* VEX_W_0F38DC_P_2 */
10867 { "vaesenc", { XM, Vex128, EXx } },
10870 /* VEX_W_0F38DD_P_2 */
10871 { "vaesenclast", { XM, Vex128, EXx } },
10874 /* VEX_W_0F38DE_P_2 */
10875 { "vaesdec", { XM, Vex128, EXx } },
10878 /* VEX_W_0F38DF_P_2 */
10879 { "vaesdeclast", { XM, Vex128, EXx } },
10882 /* VEX_W_0F3A00_P_2 */
10884 { "vpermq", { XM, EXx, Ib } },
10887 /* VEX_W_0F3A01_P_2 */
10889 { "vpermpd", { XM, EXx, Ib } },
10892 /* VEX_W_0F3A02_P_2 */
10893 { "vpblendd", { XM, Vex, EXx, Ib } },
10896 /* VEX_W_0F3A04_P_2 */
10897 { "vpermilps", { XM, EXx, Ib } },
10900 /* VEX_W_0F3A05_P_2 */
10901 { "vpermilpd", { XM, EXx, Ib } },
10904 /* VEX_W_0F3A06_P_2 */
10905 { "vperm2f128", { XM, Vex256, EXx, Ib } },
10908 /* VEX_W_0F3A08_P_2 */
10909 { "vroundps", { XM, EXx, Ib } },
10912 /* VEX_W_0F3A09_P_2 */
10913 { "vroundpd", { XM, EXx, Ib } },
10916 /* VEX_W_0F3A0A_P_2 */
10917 { "vroundss", { XMScalar, VexScalar, EXdScalar, Ib } },
10920 /* VEX_W_0F3A0B_P_2 */
10921 { "vroundsd", { XMScalar, VexScalar, EXqScalar, Ib } },
10924 /* VEX_W_0F3A0C_P_2 */
10925 { "vblendps", { XM, Vex, EXx, Ib } },
10928 /* VEX_W_0F3A0D_P_2 */
10929 { "vblendpd", { XM, Vex, EXx, Ib } },
10932 /* VEX_W_0F3A0E_P_2 */
10933 { "vpblendw", { XM, Vex, EXx, Ib } },
10936 /* VEX_W_0F3A0F_P_2 */
10937 { "vpalignr", { XM, Vex, EXx, Ib } },
10940 /* VEX_W_0F3A14_P_2 */
10941 { "vpextrb", { Edqb, XM, Ib } },
10944 /* VEX_W_0F3A15_P_2 */
10945 { "vpextrw", { Edqw, XM, Ib } },
10948 /* VEX_W_0F3A18_P_2 */
10949 { "vinsertf128", { XM, Vex256, EXxmm, Ib } },
10952 /* VEX_W_0F3A19_P_2 */
10953 { "vextractf128", { EXxmm, XM, Ib } },
10956 /* VEX_W_0F3A20_P_2 */
10957 { "vpinsrb", { XM, Vex128, Edqb, Ib } },
10960 /* VEX_W_0F3A21_P_2 */
10961 { "vinsertps", { XM, Vex128, EXd, Ib } },
10964 /* VEX_W_0F3A30_P_2 */
10966 { "kshiftrw", { MaskG, MaskR, Ib } },
10969 /* VEX_W_0F3A32_P_2 */
10971 { "kshiftlw", { MaskG, MaskR, Ib } },
10974 /* VEX_W_0F3A38_P_2 */
10975 { "vinserti128", { XM, Vex256, EXxmm, Ib } },
10978 /* VEX_W_0F3A39_P_2 */
10979 { "vextracti128", { EXxmm, XM, Ib } },
10982 /* VEX_W_0F3A40_P_2 */
10983 { "vdpps", { XM, Vex, EXx, Ib } },
10986 /* VEX_W_0F3A41_P_2 */
10987 { "vdppd", { XM, Vex128, EXx, Ib } },
10990 /* VEX_W_0F3A42_P_2 */
10991 { "vmpsadbw", { XM, Vex, EXx, Ib } },
10994 /* VEX_W_0F3A44_P_2 */
10995 { "vpclmulqdq", { XM, Vex128, EXx, PCLMUL } },
10998 /* VEX_W_0F3A46_P_2 */
10999 { "vperm2i128", { XM, Vex256, EXx, Ib } },
11002 /* VEX_W_0F3A48_P_2 */
11003 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
11004 { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
11007 /* VEX_W_0F3A49_P_2 */
11008 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
11009 { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
11012 /* VEX_W_0F3A4A_P_2 */
11013 { "vblendvps", { XM, Vex, EXx, XMVexI4 } },
11016 /* VEX_W_0F3A4B_P_2 */
11017 { "vblendvpd", { XM, Vex, EXx, XMVexI4 } },
11020 /* VEX_W_0F3A4C_P_2 */
11021 { "vpblendvb", { XM, Vex, EXx, XMVexI4 } },
11024 /* VEX_W_0F3A60_P_2 */
11025 { "vpcmpestrm", { XM, EXx, Ib } },
11028 /* VEX_W_0F3A61_P_2 */
11029 { "vpcmpestri", { XM, EXx, Ib } },
11032 /* VEX_W_0F3A62_P_2 */
11033 { "vpcmpistrm", { XM, EXx, Ib } },
11036 /* VEX_W_0F3A63_P_2 */
11037 { "vpcmpistri", { XM, EXx, Ib } },
11040 /* VEX_W_0F3ADF_P_2 */
11041 { "vaeskeygenassist", { XM, EXx, Ib } },
11043 #define NEED_VEX_W_TABLE
11044 #include "i386-dis-evex.h"
11045 #undef NEED_VEX_W_TABLE
11048 static const struct dis386 mod_table[][2] = {
11051 { "leaS", { Gv, M } },
11056 { RM_TABLE (RM_C6_REG_7) },
11061 { RM_TABLE (RM_C7_REG_7) },
11065 { "Jcall{T|}", { indirEp } },
11069 { "Jjmp{T|}", { indirEp } },
11072 /* MOD_0F01_REG_0 */
11073 { X86_64_TABLE (X86_64_0F01_REG_0) },
11074 { RM_TABLE (RM_0F01_REG_0) },
11077 /* MOD_0F01_REG_1 */
11078 { X86_64_TABLE (X86_64_0F01_REG_1) },
11079 { RM_TABLE (RM_0F01_REG_1) },
11082 /* MOD_0F01_REG_2 */
11083 { X86_64_TABLE (X86_64_0F01_REG_2) },
11084 { RM_TABLE (RM_0F01_REG_2) },
11087 /* MOD_0F01_REG_3 */
11088 { X86_64_TABLE (X86_64_0F01_REG_3) },
11089 { RM_TABLE (RM_0F01_REG_3) },
11092 /* MOD_0F01_REG_7 */
11093 { "invlpg", { Mb } },
11094 { RM_TABLE (RM_0F01_REG_7) },
11097 /* MOD_0F12_PREFIX_0 */
11098 { "movlps", { XM, EXq } },
11099 { "movhlps", { XM, EXq } },
11103 { "movlpX", { EXq, XM } },
11106 /* MOD_0F16_PREFIX_0 */
11107 { "movhps", { XM, EXq } },
11108 { "movlhps", { XM, EXq } },
11112 { "movhpX", { EXq, XM } },
11115 /* MOD_0F18_REG_0 */
11116 { "prefetchnta", { Mb } },
11119 /* MOD_0F18_REG_1 */
11120 { "prefetcht0", { Mb } },
11123 /* MOD_0F18_REG_2 */
11124 { "prefetcht1", { Mb } },
11127 /* MOD_0F18_REG_3 */
11128 { "prefetcht2", { Mb } },
11131 /* MOD_0F18_REG_4 */
11132 { "nop/reserved", { Mb } },
11135 /* MOD_0F18_REG_5 */
11136 { "nop/reserved", { Mb } },
11139 /* MOD_0F18_REG_6 */
11140 { "nop/reserved", { Mb } },
11143 /* MOD_0F18_REG_7 */
11144 { "nop/reserved", { Mb } },
11147 /* MOD_0F1A_PREFIX_0 */
11148 { "bndldx", { Gbnd, Ev_bnd } },
11149 { "nopQ", { Ev } },
11152 /* MOD_0F1B_PREFIX_0 */
11153 { "bndstx", { Ev_bnd, Gbnd } },
11154 { "nopQ", { Ev } },
11157 /* MOD_0F1B_PREFIX_1 */
11158 { "bndmk", { Gbnd, Ev_bnd } },
11159 { "nopQ", { Ev } },
11164 { "movZ", { Rm, Cm } },
11169 { "movZ", { Rm, Dm } },
11174 { "movZ", { Cm, Rm } },
11179 { "movZ", { Dm, Rm } },
11184 { "movL", { Rd, Td } },
11189 { "movL", { Td, Rd } },
11192 /* MOD_0F2B_PREFIX_0 */
11193 {"movntps", { Mx, XM } },
11196 /* MOD_0F2B_PREFIX_1 */
11197 {"movntss", { Md, XM } },
11200 /* MOD_0F2B_PREFIX_2 */
11201 {"movntpd", { Mx, XM } },
11204 /* MOD_0F2B_PREFIX_3 */
11205 {"movntsd", { Mq, XM } },
11210 { "movmskpX", { Gdq, XS } },
11213 /* MOD_0F71_REG_2 */
11215 { "psrlw", { MS, Ib } },
11218 /* MOD_0F71_REG_4 */
11220 { "psraw", { MS, Ib } },
11223 /* MOD_0F71_REG_6 */
11225 { "psllw", { MS, Ib } },
11228 /* MOD_0F72_REG_2 */
11230 { "psrld", { MS, Ib } },
11233 /* MOD_0F72_REG_4 */
11235 { "psrad", { MS, Ib } },
11238 /* MOD_0F72_REG_6 */
11240 { "pslld", { MS, Ib } },
11243 /* MOD_0F73_REG_2 */
11245 { "psrlq", { MS, Ib } },
11248 /* MOD_0F73_REG_3 */
11250 { PREFIX_TABLE (PREFIX_0F73_REG_3) },
11253 /* MOD_0F73_REG_6 */
11255 { "psllq", { MS, Ib } },
11258 /* MOD_0F73_REG_7 */
11260 { PREFIX_TABLE (PREFIX_0F73_REG_7) },
11263 /* MOD_0FAE_REG_0 */
11264 { "fxsave", { FXSAVE } },
11265 { PREFIX_TABLE (PREFIX_0FAE_REG_0) },
11268 /* MOD_0FAE_REG_1 */
11269 { "fxrstor", { FXSAVE } },
11270 { PREFIX_TABLE (PREFIX_0FAE_REG_1) },
11273 /* MOD_0FAE_REG_2 */
11274 { "ldmxcsr", { Md } },
11275 { PREFIX_TABLE (PREFIX_0FAE_REG_2) },
11278 /* MOD_0FAE_REG_3 */
11279 { "stmxcsr", { Md } },
11280 { PREFIX_TABLE (PREFIX_0FAE_REG_3) },
11283 /* MOD_0FAE_REG_4 */
11284 { "xsave", { FXSAVE } },
11287 /* MOD_0FAE_REG_5 */
11288 { "xrstor", { FXSAVE } },
11289 { RM_TABLE (RM_0FAE_REG_5) },
11292 /* MOD_0FAE_REG_6 */
11293 { "xsaveopt", { FXSAVE } },
11294 { RM_TABLE (RM_0FAE_REG_6) },
11297 /* MOD_0FAE_REG_7 */
11298 { PREFIX_TABLE (PREFIX_0FAE_REG_7) },
11299 { RM_TABLE (RM_0FAE_REG_7) },
11303 { "lssS", { Gv, Mp } },
11307 { "lfsS", { Gv, Mp } },
11311 { "lgsS", { Gv, Mp } },
11314 /* MOD_0FC7_REG_3 */
11315 { "xrstors", { FXSAVE } },
11318 /* MOD_0FC7_REG_4 */
11319 { "xsavec", { FXSAVE } },
11322 /* MOD_0FC7_REG_5 */
11323 { "xsaves", { FXSAVE } },
11326 /* MOD_0FC7_REG_6 */
11327 { PREFIX_TABLE (PREFIX_0FC7_REG_6) },
11328 { "rdrand", { Ev } },
11331 /* MOD_0FC7_REG_7 */
11332 { "vmptrst", { Mq } },
11333 { "rdseed", { Ev } },
11338 { "pmovmskb", { Gdq, MS } },
11341 /* MOD_0FE7_PREFIX_2 */
11342 { "movntdq", { Mx, XM } },
11345 /* MOD_0FF0_PREFIX_3 */
11346 { "lddqu", { XM, M } },
11349 /* MOD_0F382A_PREFIX_2 */
11350 { "movntdqa", { XM, Mx } },
11354 { "bound{S|}", { Gv, Ma } },
11355 { EVEX_TABLE (EVEX_0F) },
11359 { "lesS", { Gv, Mp } },
11360 { VEX_C4_TABLE (VEX_0F) },
11364 { "ldsS", { Gv, Mp } },
11365 { VEX_C5_TABLE (VEX_0F) },
11368 /* MOD_VEX_0F12_PREFIX_0 */
11369 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0) },
11370 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1) },
11374 { VEX_LEN_TABLE (VEX_LEN_0F13_M_0) },
11377 /* MOD_VEX_0F16_PREFIX_0 */
11378 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0) },
11379 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1) },
11383 { VEX_LEN_TABLE (VEX_LEN_0F17_M_0) },
11387 { VEX_W_TABLE (VEX_W_0F2B_M_0) },
11392 { VEX_W_TABLE (VEX_W_0F50_M_0) },
11395 /* MOD_VEX_0F71_REG_2 */
11397 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2) },
11400 /* MOD_VEX_0F71_REG_4 */
11402 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4) },
11405 /* MOD_VEX_0F71_REG_6 */
11407 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6) },
11410 /* MOD_VEX_0F72_REG_2 */
11412 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2) },
11415 /* MOD_VEX_0F72_REG_4 */
11417 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4) },
11420 /* MOD_VEX_0F72_REG_6 */
11422 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6) },
11425 /* MOD_VEX_0F73_REG_2 */
11427 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2) },
11430 /* MOD_VEX_0F73_REG_3 */
11432 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3) },
11435 /* MOD_VEX_0F73_REG_6 */
11437 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6) },
11440 /* MOD_VEX_0F73_REG_7 */
11442 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7) },
11445 /* MOD_VEX_0FAE_REG_2 */
11446 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0) },
11449 /* MOD_VEX_0FAE_REG_3 */
11450 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0) },
11453 /* MOD_VEX_0FD7_PREFIX_2 */
11455 { VEX_W_TABLE (VEX_W_0FD7_P_2_M_1) },
11458 /* MOD_VEX_0FE7_PREFIX_2 */
11459 { VEX_W_TABLE (VEX_W_0FE7_P_2_M_0) },
11462 /* MOD_VEX_0FF0_PREFIX_3 */
11463 { VEX_W_TABLE (VEX_W_0FF0_P_3_M_0) },
11466 /* MOD_VEX_0F381A_PREFIX_2 */
11467 { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0) },
11470 /* MOD_VEX_0F382A_PREFIX_2 */
11471 { VEX_W_TABLE (VEX_W_0F382A_P_2_M_0) },
11474 /* MOD_VEX_0F382C_PREFIX_2 */
11475 { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0) },
11478 /* MOD_VEX_0F382D_PREFIX_2 */
11479 { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0) },
11482 /* MOD_VEX_0F382E_PREFIX_2 */
11483 { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0) },
11486 /* MOD_VEX_0F382F_PREFIX_2 */
11487 { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0) },
11490 /* MOD_VEX_0F385A_PREFIX_2 */
11491 { VEX_LEN_TABLE (VEX_LEN_0F385A_P_2_M_0) },
11494 /* MOD_VEX_0F388C_PREFIX_2 */
11495 { "vpmaskmov%LW", { XM, Vex, Mx } },
11498 /* MOD_VEX_0F388E_PREFIX_2 */
11499 { "vpmaskmov%LW", { Mx, Vex, XM } },
11501 #define NEED_MOD_TABLE
11502 #include "i386-dis-evex.h"
11503 #undef NEED_MOD_TABLE
11506 static const struct dis386 rm_table[][8] = {
11509 { "xabort", { Skip_MODRM, Ib } },
11513 { "xbeginT", { Skip_MODRM, Jv } },
11516 /* RM_0F01_REG_0 */
11518 { "vmcall", { Skip_MODRM } },
11519 { "vmlaunch", { Skip_MODRM } },
11520 { "vmresume", { Skip_MODRM } },
11521 { "vmxoff", { Skip_MODRM } },
11524 /* RM_0F01_REG_1 */
11525 { "monitor", { { OP_Monitor, 0 } } },
11526 { "mwait", { { OP_Mwait, 0 } } },
11527 { "clac", { Skip_MODRM } },
11528 { "stac", { Skip_MODRM } },
11531 /* RM_0F01_REG_2 */
11532 { "xgetbv", { Skip_MODRM } },
11533 { "xsetbv", { Skip_MODRM } },
11536 { "vmfunc", { Skip_MODRM } },
11537 { "xend", { Skip_MODRM } },
11538 { "xtest", { Skip_MODRM } },
11542 /* RM_0F01_REG_3 */
11543 { "vmrun", { Skip_MODRM } },
11544 { "vmmcall", { Skip_MODRM } },
11545 { "vmload", { Skip_MODRM } },
11546 { "vmsave", { Skip_MODRM } },
11547 { "stgi", { Skip_MODRM } },
11548 { "clgi", { Skip_MODRM } },
11549 { "skinit", { Skip_MODRM } },
11550 { "invlpga", { Skip_MODRM } },
11553 /* RM_0F01_REG_7 */
11554 { "swapgs", { Skip_MODRM } },
11555 { "rdtscp", { Skip_MODRM } },
11558 /* RM_0FAE_REG_5 */
11559 { "lfence", { Skip_MODRM } },
11562 /* RM_0FAE_REG_6 */
11563 { "mfence", { Skip_MODRM } },
11566 /* RM_0FAE_REG_7 */
11567 { "sfence", { Skip_MODRM } },
11571 #define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
11573 /* We use the high bit to indicate different name for the same
11575 #define ADDR16_PREFIX (0x67 | 0x100)
11576 #define ADDR32_PREFIX (0x67 | 0x200)
11577 #define DATA16_PREFIX (0x66 | 0x100)
11578 #define DATA32_PREFIX (0x66 | 0x200)
11579 #define REP_PREFIX (0xf3 | 0x100)
11580 #define XACQUIRE_PREFIX (0xf2 | 0x200)
11581 #define XRELEASE_PREFIX (0xf3 | 0x400)
11582 #define BND_PREFIX (0xf2 | 0x400)
11587 int newrex, i, length;
11593 last_lock_prefix = -1;
11594 last_repz_prefix = -1;
11595 last_repnz_prefix = -1;
11596 last_data_prefix = -1;
11597 last_addr_prefix = -1;
11598 last_rex_prefix = -1;
11599 last_seg_prefix = -1;
11600 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
11601 all_prefixes[i] = 0;
11604 /* The maximum instruction length is 15bytes. */
11605 while (length < MAX_CODE_LENGTH - 1)
11607 FETCH_DATA (the_info, codep + 1);
11611 /* REX prefixes family. */
11628 if (address_mode == mode_64bit)
11632 last_rex_prefix = i;
11635 prefixes |= PREFIX_REPZ;
11636 last_repz_prefix = i;
11639 prefixes |= PREFIX_REPNZ;
11640 last_repnz_prefix = i;
11643 prefixes |= PREFIX_LOCK;
11644 last_lock_prefix = i;
11647 prefixes |= PREFIX_CS;
11648 last_seg_prefix = i;
11651 prefixes |= PREFIX_SS;
11652 last_seg_prefix = i;
11655 prefixes |= PREFIX_DS;
11656 last_seg_prefix = i;
11659 prefixes |= PREFIX_ES;
11660 last_seg_prefix = i;
11663 prefixes |= PREFIX_FS;
11664 last_seg_prefix = i;
11667 prefixes |= PREFIX_GS;
11668 last_seg_prefix = i;
11671 prefixes |= PREFIX_DATA;
11672 last_data_prefix = i;
11675 prefixes |= PREFIX_ADDR;
11676 last_addr_prefix = i;
11679 /* fwait is really an instruction. If there are prefixes
11680 before the fwait, they belong to the fwait, *not* to the
11681 following instruction. */
11682 if (prefixes || rex)
11684 prefixes |= PREFIX_FWAIT;
11686 /* This ensures that the previous REX prefixes are noticed
11687 as unused prefixes, as in the return case below. */
11691 prefixes = PREFIX_FWAIT;
11696 /* Rex is ignored when followed by another prefix. */
11702 if (*codep != FWAIT_OPCODE)
11703 all_prefixes[i++] = *codep;
11712 seg_prefix (int pref)
11733 /* Return the name of the prefix byte PREF, or NULL if PREF is not a
11736 static const char *
11737 prefix_name (int pref, int sizeflag)
11739 static const char *rexes [16] =
11742 "rex.B", /* 0x41 */
11743 "rex.X", /* 0x42 */
11744 "rex.XB", /* 0x43 */
11745 "rex.R", /* 0x44 */
11746 "rex.RB", /* 0x45 */
11747 "rex.RX", /* 0x46 */
11748 "rex.RXB", /* 0x47 */
11749 "rex.W", /* 0x48 */
11750 "rex.WB", /* 0x49 */
11751 "rex.WX", /* 0x4a */
11752 "rex.WXB", /* 0x4b */
11753 "rex.WR", /* 0x4c */
11754 "rex.WRB", /* 0x4d */
11755 "rex.WRX", /* 0x4e */
11756 "rex.WRXB", /* 0x4f */
11761 /* REX prefixes family. */
11778 return rexes [pref - 0x40];
11798 return (sizeflag & DFLAG) ? "data16" : "data32";
11800 if (address_mode == mode_64bit)
11801 return (sizeflag & AFLAG) ? "addr32" : "addr64";
11803 return (sizeflag & AFLAG) ? "addr16" : "addr32";
11806 case ADDR16_PREFIX:
11808 case ADDR32_PREFIX:
11810 case DATA16_PREFIX:
11812 case DATA32_PREFIX:
11816 case XACQUIRE_PREFIX:
11818 case XRELEASE_PREFIX:
11827 static char op_out[MAX_OPERANDS][100];
11828 static int op_ad, op_index[MAX_OPERANDS];
11829 static int two_source_ops;
11830 static bfd_vma op_address[MAX_OPERANDS];
11831 static bfd_vma op_riprel[MAX_OPERANDS];
11832 static bfd_vma start_pc;
11835 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
11836 * (see topic "Redundant prefixes" in the "Differences from 8086"
11837 * section of the "Virtual 8086 Mode" chapter.)
11838 * 'pc' should be the address of this instruction, it will
11839 * be used to print the target address if this is a relative jump or call
11840 * The function returns the length of this instruction in bytes.
11843 static char intel_syntax;
11844 static char intel_mnemonic = !SYSV386_COMPAT;
11845 static char open_char;
11846 static char close_char;
11847 static char separator_char;
11848 static char scale_char;
11850 /* Here for backwards compatibility. When gdb stops using
11851 print_insn_i386_att and print_insn_i386_intel these functions can
11852 disappear, and print_insn_i386 be merged into print_insn. */
11854 print_insn_i386_att (bfd_vma pc, disassemble_info *info)
11858 return print_insn (pc, info);
11862 print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
11866 return print_insn (pc, info);
11870 print_insn_i386 (bfd_vma pc, disassemble_info *info)
11874 return print_insn (pc, info);
11878 print_i386_disassembler_options (FILE *stream)
11880 fprintf (stream, _("\n\
11881 The following i386/x86-64 specific disassembler options are supported for use\n\
11882 with the -M switch (multiple options should be separated by commas):\n"));
11884 fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
11885 fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
11886 fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
11887 fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
11888 fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
11889 fprintf (stream, _(" att-mnemonic\n"
11890 " Display instruction in AT&T mnemonic\n"));
11891 fprintf (stream, _(" intel-mnemonic\n"
11892 " Display instruction in Intel mnemonic\n"));
11893 fprintf (stream, _(" addr64 Assume 64bit address size\n"));
11894 fprintf (stream, _(" addr32 Assume 32bit address size\n"));
11895 fprintf (stream, _(" addr16 Assume 16bit address size\n"));
11896 fprintf (stream, _(" data32 Assume 32bit data size\n"));
11897 fprintf (stream, _(" data16 Assume 16bit data size\n"));
11898 fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
11902 static const struct dis386 bad_opcode = { "(bad)", { XX } };
11904 /* Get a pointer to struct dis386 with a valid name. */
11906 static const struct dis386 *
11907 get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
11909 int vindex, vex_table_index;
11911 if (dp->name != NULL)
11914 switch (dp->op[0].bytemode)
11916 case USE_REG_TABLE:
11917 dp = ®_table[dp->op[1].bytemode][modrm.reg];
11920 case USE_MOD_TABLE:
11921 vindex = modrm.mod == 0x3 ? 1 : 0;
11922 dp = &mod_table[dp->op[1].bytemode][vindex];
11926 dp = &rm_table[dp->op[1].bytemode][modrm.rm];
11929 case USE_PREFIX_TABLE:
11932 /* The prefix in VEX is implicit. */
11933 switch (vex.prefix)
11938 case REPE_PREFIX_OPCODE:
11941 case DATA_PREFIX_OPCODE:
11944 case REPNE_PREFIX_OPCODE:
11955 used_prefixes |= (prefixes & PREFIX_REPZ);
11956 if (prefixes & PREFIX_REPZ)
11959 all_prefixes[last_repz_prefix] = 0;
11963 /* We should check PREFIX_REPNZ and PREFIX_REPZ before
11965 used_prefixes |= (prefixes & PREFIX_REPNZ);
11966 if (prefixes & PREFIX_REPNZ)
11969 all_prefixes[last_repnz_prefix] = 0;
11973 used_prefixes |= (prefixes & PREFIX_DATA);
11974 if (prefixes & PREFIX_DATA)
11977 all_prefixes[last_data_prefix] = 0;
11982 dp = &prefix_table[dp->op[1].bytemode][vindex];
11985 case USE_X86_64_TABLE:
11986 vindex = address_mode == mode_64bit ? 1 : 0;
11987 dp = &x86_64_table[dp->op[1].bytemode][vindex];
11990 case USE_3BYTE_TABLE:
11991 FETCH_DATA (info, codep + 2);
11993 dp = &three_byte_table[dp->op[1].bytemode][vindex];
11994 modrm.mod = (*codep >> 6) & 3;
11995 modrm.reg = (*codep >> 3) & 7;
11996 modrm.rm = *codep & 7;
11999 case USE_VEX_LEN_TABLE:
12003 switch (vex.length)
12016 dp = &vex_len_table[dp->op[1].bytemode][vindex];
12019 case USE_XOP_8F_TABLE:
12020 FETCH_DATA (info, codep + 3);
12021 /* All bits in the REX prefix are ignored. */
12023 rex = ~(*codep >> 5) & 0x7;
12025 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
12026 switch ((*codep & 0x1f))
12032 vex_table_index = XOP_08;
12035 vex_table_index = XOP_09;
12038 vex_table_index = XOP_0A;
12042 vex.w = *codep & 0x80;
12043 if (vex.w && address_mode == mode_64bit)
12046 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12047 if (address_mode != mode_64bit
12048 && vex.register_specifier > 0x7)
12054 vex.length = (*codep & 0x4) ? 256 : 128;
12055 switch ((*codep & 0x3))
12061 vex.prefix = DATA_PREFIX_OPCODE;
12064 vex.prefix = REPE_PREFIX_OPCODE;
12067 vex.prefix = REPNE_PREFIX_OPCODE;
12074 dp = &xop_table[vex_table_index][vindex];
12076 FETCH_DATA (info, codep + 1);
12077 modrm.mod = (*codep >> 6) & 3;
12078 modrm.reg = (*codep >> 3) & 7;
12079 modrm.rm = *codep & 7;
12082 case USE_VEX_C4_TABLE:
12084 FETCH_DATA (info, codep + 3);
12085 /* All bits in the REX prefix are ignored. */
12087 rex = ~(*codep >> 5) & 0x7;
12088 switch ((*codep & 0x1f))
12094 vex_table_index = VEX_0F;
12097 vex_table_index = VEX_0F38;
12100 vex_table_index = VEX_0F3A;
12104 vex.w = *codep & 0x80;
12105 if (vex.w && address_mode == mode_64bit)
12108 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12109 if (address_mode != mode_64bit
12110 && vex.register_specifier > 0x7)
12116 vex.length = (*codep & 0x4) ? 256 : 128;
12117 switch ((*codep & 0x3))
12123 vex.prefix = DATA_PREFIX_OPCODE;
12126 vex.prefix = REPE_PREFIX_OPCODE;
12129 vex.prefix = REPNE_PREFIX_OPCODE;
12136 dp = &vex_table[vex_table_index][vindex];
12137 /* There is no MODRM byte for VEX [82|77]. */
12138 if (vindex != 0x77 && vindex != 0x82)
12140 FETCH_DATA (info, codep + 1);
12141 modrm.mod = (*codep >> 6) & 3;
12142 modrm.reg = (*codep >> 3) & 7;
12143 modrm.rm = *codep & 7;
12147 case USE_VEX_C5_TABLE:
12149 FETCH_DATA (info, codep + 2);
12150 /* All bits in the REX prefix are ignored. */
12152 rex = (*codep & 0x80) ? 0 : REX_R;
12154 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12155 if (address_mode != mode_64bit
12156 && vex.register_specifier > 0x7)
12164 vex.length = (*codep & 0x4) ? 256 : 128;
12165 switch ((*codep & 0x3))
12171 vex.prefix = DATA_PREFIX_OPCODE;
12174 vex.prefix = REPE_PREFIX_OPCODE;
12177 vex.prefix = REPNE_PREFIX_OPCODE;
12184 dp = &vex_table[dp->op[1].bytemode][vindex];
12185 /* There is no MODRM byte for VEX [82|77]. */
12186 if (vindex != 0x77 && vindex != 0x82)
12188 FETCH_DATA (info, codep + 1);
12189 modrm.mod = (*codep >> 6) & 3;
12190 modrm.reg = (*codep >> 3) & 7;
12191 modrm.rm = *codep & 7;
12195 case USE_VEX_W_TABLE:
12199 dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
12202 case USE_EVEX_TABLE:
12203 two_source_ops = 0;
12206 FETCH_DATA (info, codep + 4);
12207 /* All bits in the REX prefix are ignored. */
12209 /* The first byte after 0x62. */
12210 rex = ~(*codep >> 5) & 0x7;
12211 vex.r = *codep & 0x10;
12212 switch ((*codep & 0xf))
12215 return &bad_opcode;
12217 vex_table_index = EVEX_0F;
12220 vex_table_index = EVEX_0F38;
12223 vex_table_index = EVEX_0F3A;
12227 /* The second byte after 0x62. */
12229 vex.w = *codep & 0x80;
12230 if (vex.w && address_mode == mode_64bit)
12233 vex.register_specifier = (~(*codep >> 3)) & 0xf;
12234 if (address_mode != mode_64bit)
12236 /* In 16/32-bit mode silently ignore following bits. */
12240 vex.register_specifier &= 0x7;
12244 if (!(*codep & 0x4))
12245 return &bad_opcode;
12247 switch ((*codep & 0x3))
12253 vex.prefix = DATA_PREFIX_OPCODE;
12256 vex.prefix = REPE_PREFIX_OPCODE;
12259 vex.prefix = REPNE_PREFIX_OPCODE;
12263 /* The third byte after 0x62. */
12266 /* Remember the static rounding bits. */
12267 vex.ll = (*codep >> 5) & 3;
12268 vex.b = (*codep & 0x10) != 0;
12270 vex.v = *codep & 0x8;
12271 vex.mask_register_specifier = *codep & 0x7;
12272 vex.zeroing = *codep & 0x80;
12278 dp = &evex_table[vex_table_index][vindex];
12279 FETCH_DATA (info, codep + 1);
12280 modrm.mod = (*codep >> 6) & 3;
12281 modrm.reg = (*codep >> 3) & 7;
12282 modrm.rm = *codep & 7;
12284 /* Set vector length. */
12285 if (modrm.mod == 3 && vex.b)
12301 return &bad_opcode;
12314 if (dp->name != NULL)
12317 return get_valid_dis386 (dp, info);
12321 get_sib (disassemble_info *info, int sizeflag)
12323 /* If modrm.mod == 3, operand must be register. */
12325 && ((sizeflag & AFLAG) || address_mode == mode_64bit)
12329 FETCH_DATA (info, codep + 2);
12330 sib.index = (codep [1] >> 3) & 7;
12331 sib.scale = (codep [1] >> 6) & 3;
12332 sib.base = codep [1] & 7;
12337 print_insn (bfd_vma pc, disassemble_info *info)
12339 const struct dis386 *dp;
12341 char *op_txt[MAX_OPERANDS];
12345 struct dis_private priv;
12347 int default_prefixes;
12349 priv.orig_sizeflag = AFLAG | DFLAG;
12350 if ((info->mach & bfd_mach_i386_i386) != 0)
12351 address_mode = mode_32bit;
12352 else if (info->mach == bfd_mach_i386_i8086)
12354 address_mode = mode_16bit;
12355 priv.orig_sizeflag = 0;
12358 address_mode = mode_64bit;
12360 if (intel_syntax == (char) -1)
12361 intel_syntax = (info->mach & bfd_mach_i386_intel_syntax) != 0;
12363 for (p = info->disassembler_options; p != NULL; )
12365 if (CONST_STRNEQ (p, "x86-64"))
12367 address_mode = mode_64bit;
12368 priv.orig_sizeflag = AFLAG | DFLAG;
12370 else if (CONST_STRNEQ (p, "i386"))
12372 address_mode = mode_32bit;
12373 priv.orig_sizeflag = AFLAG | DFLAG;
12375 else if (CONST_STRNEQ (p, "i8086"))
12377 address_mode = mode_16bit;
12378 priv.orig_sizeflag = 0;
12380 else if (CONST_STRNEQ (p, "intel"))
12383 if (CONST_STRNEQ (p + 5, "-mnemonic"))
12384 intel_mnemonic = 1;
12386 else if (CONST_STRNEQ (p, "att"))
12389 if (CONST_STRNEQ (p + 3, "-mnemonic"))
12390 intel_mnemonic = 0;
12392 else if (CONST_STRNEQ (p, "addr"))
12394 if (address_mode == mode_64bit)
12396 if (p[4] == '3' && p[5] == '2')
12397 priv.orig_sizeflag &= ~AFLAG;
12398 else if (p[4] == '6' && p[5] == '4')
12399 priv.orig_sizeflag |= AFLAG;
12403 if (p[4] == '1' && p[5] == '6')
12404 priv.orig_sizeflag &= ~AFLAG;
12405 else if (p[4] == '3' && p[5] == '2')
12406 priv.orig_sizeflag |= AFLAG;
12409 else if (CONST_STRNEQ (p, "data"))
12411 if (p[4] == '1' && p[5] == '6')
12412 priv.orig_sizeflag &= ~DFLAG;
12413 else if (p[4] == '3' && p[5] == '2')
12414 priv.orig_sizeflag |= DFLAG;
12416 else if (CONST_STRNEQ (p, "suffix"))
12417 priv.orig_sizeflag |= SUFFIX_ALWAYS;
12419 p = strchr (p, ',');
12426 names64 = intel_names64;
12427 names32 = intel_names32;
12428 names16 = intel_names16;
12429 names8 = intel_names8;
12430 names8rex = intel_names8rex;
12431 names_seg = intel_names_seg;
12432 names_mm = intel_names_mm;
12433 names_bnd = intel_names_bnd;
12434 names_xmm = intel_names_xmm;
12435 names_ymm = intel_names_ymm;
12436 names_zmm = intel_names_zmm;
12437 index64 = intel_index64;
12438 index32 = intel_index32;
12439 names_mask = intel_names_mask;
12440 index16 = intel_index16;
12443 separator_char = '+';
12448 names64 = att_names64;
12449 names32 = att_names32;
12450 names16 = att_names16;
12451 names8 = att_names8;
12452 names8rex = att_names8rex;
12453 names_seg = att_names_seg;
12454 names_mm = att_names_mm;
12455 names_bnd = att_names_bnd;
12456 names_xmm = att_names_xmm;
12457 names_ymm = att_names_ymm;
12458 names_zmm = att_names_zmm;
12459 index64 = att_index64;
12460 index32 = att_index32;
12461 names_mask = att_names_mask;
12462 index16 = att_index16;
12465 separator_char = ',';
12469 /* The output looks better if we put 7 bytes on a line, since that
12470 puts most long word instructions on a single line. Use 8 bytes
12472 if ((info->mach & bfd_mach_l1om) != 0)
12473 info->bytes_per_line = 8;
12475 info->bytes_per_line = 7;
12477 info->private_data = &priv;
12478 priv.max_fetched = priv.the_buffer;
12479 priv.insn_start = pc;
12482 for (i = 0; i < MAX_OPERANDS; ++i)
12490 start_codep = priv.the_buffer;
12491 codep = priv.the_buffer;
12493 if (setjmp (priv.bailout) != 0)
12497 /* Getting here means we tried for data but didn't get it. That
12498 means we have an incomplete instruction of some sort. Just
12499 print the first byte as a prefix or a .byte pseudo-op. */
12500 if (codep > priv.the_buffer)
12502 name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
12504 (*info->fprintf_func) (info->stream, "%s", name);
12507 /* Just print the first byte as a .byte instruction. */
12508 (*info->fprintf_func) (info->stream, ".byte 0x%x",
12509 (unsigned int) priv.the_buffer[0]);
12519 sizeflag = priv.orig_sizeflag;
12521 if (!ckprefix () || rex_used)
12523 /* Too many prefixes or unused REX prefixes. */
12525 i < (int) ARRAY_SIZE (all_prefixes) && all_prefixes[i];
12527 (*info->fprintf_func) (info->stream, "%s%s",
12529 prefix_name (all_prefixes[i], sizeflag));
12533 insn_codep = codep;
12535 FETCH_DATA (info, codep + 1);
12536 two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
12538 if (((prefixes & PREFIX_FWAIT)
12539 && ((*codep < 0xd8) || (*codep > 0xdf))))
12541 (*info->fprintf_func) (info->stream, "fwait");
12545 if (*codep == 0x0f)
12547 unsigned char threebyte;
12548 FETCH_DATA (info, codep + 2);
12549 threebyte = *++codep;
12550 dp = &dis386_twobyte[threebyte];
12551 need_modrm = twobyte_has_modrm[*codep];
12556 dp = &dis386[*codep];
12557 need_modrm = onebyte_has_modrm[*codep];
12561 if ((prefixes & PREFIX_REPZ))
12562 used_prefixes |= PREFIX_REPZ;
12563 if ((prefixes & PREFIX_REPNZ))
12564 used_prefixes |= PREFIX_REPNZ;
12565 if ((prefixes & PREFIX_LOCK))
12566 used_prefixes |= PREFIX_LOCK;
12568 default_prefixes = 0;
12569 if (prefixes & PREFIX_ADDR)
12572 if (dp->op[2].bytemode != loop_jcxz_mode || intel_syntax)
12574 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
12575 all_prefixes[last_addr_prefix] = ADDR32_PREFIX;
12577 all_prefixes[last_addr_prefix] = ADDR16_PREFIX;
12578 default_prefixes |= PREFIX_ADDR;
12582 if ((prefixes & PREFIX_DATA))
12585 if (dp->op[2].bytemode == cond_jump_mode
12586 && dp->op[0].bytemode == v_mode
12589 if (sizeflag & DFLAG)
12590 all_prefixes[last_data_prefix] = DATA32_PREFIX;
12592 all_prefixes[last_data_prefix] = DATA16_PREFIX;
12593 default_prefixes |= PREFIX_DATA;
12595 else if (rex & REX_W)
12597 /* REX_W will override PREFIX_DATA. */
12598 default_prefixes |= PREFIX_DATA;
12604 FETCH_DATA (info, codep + 1);
12605 modrm.mod = (*codep >> 6) & 3;
12606 modrm.reg = (*codep >> 3) & 7;
12607 modrm.rm = *codep & 7;
12615 if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
12617 get_sib (info, sizeflag);
12618 dofloat (sizeflag);
12622 dp = get_valid_dis386 (dp, info);
12623 if (dp != NULL && putop (dp->name, sizeflag) == 0)
12625 get_sib (info, sizeflag);
12626 for (i = 0; i < MAX_OPERANDS; ++i)
12629 op_ad = MAX_OPERANDS - 1 - i;
12631 (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
12632 /* For EVEX instruction after the last operand masking
12633 should be printed. */
12634 if (i == 0 && vex.evex)
12636 /* Don't print {%k0}. */
12637 if (vex.mask_register_specifier)
12640 oappend (names_mask[vex.mask_register_specifier]);
12650 /* See if any prefixes were not used. If so, print the first one
12651 separately. If we don't do this, we'll wind up printing an
12652 instruction stream which does not precisely correspond to the
12653 bytes we are disassembling. */
12654 if ((prefixes & ~(used_prefixes | default_prefixes)) != 0)
12656 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
12657 if (all_prefixes[i])
12660 name = prefix_name (all_prefixes[i], priv.orig_sizeflag);
12662 name = INTERNAL_DISASSEMBLER_ERROR;
12663 (*info->fprintf_func) (info->stream, "%s", name);
12668 /* Check if the REX prefix is used. */
12669 if (rex_ignored == 0 && (rex ^ rex_used) == 0 && last_rex_prefix >= 0)
12670 all_prefixes[last_rex_prefix] = 0;
12672 /* Check if the SEG prefix is used. */
12673 if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
12674 | PREFIX_FS | PREFIX_GS)) != 0
12676 & seg_prefix (all_prefixes[last_seg_prefix])) != 0)
12677 all_prefixes[last_seg_prefix] = 0;
12679 /* Check if the ADDR prefix is used. */
12680 if ((prefixes & PREFIX_ADDR) != 0
12681 && (used_prefixes & PREFIX_ADDR) != 0)
12682 all_prefixes[last_addr_prefix] = 0;
12684 /* Check if the DATA prefix is used. */
12685 if ((prefixes & PREFIX_DATA) != 0
12686 && (used_prefixes & PREFIX_DATA) != 0)
12687 all_prefixes[last_data_prefix] = 0;
12690 for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
12691 if (all_prefixes[i])
12694 name = prefix_name (all_prefixes[i], sizeflag);
12697 prefix_length += strlen (name) + 1;
12698 (*info->fprintf_func) (info->stream, "%s ", name);
12701 /* Check maximum code length. */
12702 if ((codep - start_codep) > MAX_CODE_LENGTH)
12704 (*info->fprintf_func) (info->stream, "(bad)");
12705 return MAX_CODE_LENGTH;
12708 obufp = mnemonicendp;
12709 for (i = strlen (obuf) + prefix_length; i < 6; i++)
12712 (*info->fprintf_func) (info->stream, "%s", obuf);
12714 /* The enter and bound instructions are printed with operands in the same
12715 order as the intel book; everything else is printed in reverse order. */
12716 if (intel_syntax || two_source_ops)
12720 for (i = 0; i < MAX_OPERANDS; ++i)
12721 op_txt[i] = op_out[i];
12723 for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
12725 op_ad = op_index[i];
12726 op_index[i] = op_index[MAX_OPERANDS - 1 - i];
12727 op_index[MAX_OPERANDS - 1 - i] = op_ad;
12728 riprel = op_riprel[i];
12729 op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
12730 op_riprel[MAX_OPERANDS - 1 - i] = riprel;
12735 for (i = 0; i < MAX_OPERANDS; ++i)
12736 op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
12740 for (i = 0; i < MAX_OPERANDS; ++i)
12744 (*info->fprintf_func) (info->stream, ",");
12745 if (op_index[i] != -1 && !op_riprel[i])
12746 (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
12748 (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
12752 for (i = 0; i < MAX_OPERANDS; i++)
12753 if (op_index[i] != -1 && op_riprel[i])
12755 (*info->fprintf_func) (info->stream, " # ");
12756 (*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
12757 + op_address[op_index[i]]), info);
12760 return codep - priv.the_buffer;
12763 static const char *float_mem[] = {
12838 static const unsigned char float_mem_mode[] = {
12913 #define ST { OP_ST, 0 }
12914 #define STi { OP_STi, 0 }
12916 #define FGRPd9_2 NULL, { { NULL, 0 } }
12917 #define FGRPd9_4 NULL, { { NULL, 1 } }
12918 #define FGRPd9_5 NULL, { { NULL, 2 } }
12919 #define FGRPd9_6 NULL, { { NULL, 3 } }
12920 #define FGRPd9_7 NULL, { { NULL, 4 } }
12921 #define FGRPda_5 NULL, { { NULL, 5 } }
12922 #define FGRPdb_4 NULL, { { NULL, 6 } }
12923 #define FGRPde_3 NULL, { { NULL, 7 } }
12924 #define FGRPdf_4 NULL, { { NULL, 8 } }
12926 static const struct dis386 float_reg[][8] = {
12929 { "fadd", { ST, STi } },
12930 { "fmul", { ST, STi } },
12931 { "fcom", { STi } },
12932 { "fcomp", { STi } },
12933 { "fsub", { ST, STi } },
12934 { "fsubr", { ST, STi } },
12935 { "fdiv", { ST, STi } },
12936 { "fdivr", { ST, STi } },
12940 { "fld", { STi } },
12941 { "fxch", { STi } },
12951 { "fcmovb", { ST, STi } },
12952 { "fcmove", { ST, STi } },
12953 { "fcmovbe",{ ST, STi } },
12954 { "fcmovu", { ST, STi } },
12962 { "fcmovnb",{ ST, STi } },
12963 { "fcmovne",{ ST, STi } },
12964 { "fcmovnbe",{ ST, STi } },
12965 { "fcmovnu",{ ST, STi } },
12967 { "fucomi", { ST, STi } },
12968 { "fcomi", { ST, STi } },
12973 { "fadd", { STi, ST } },
12974 { "fmul", { STi, ST } },
12977 { "fsub!M", { STi, ST } },
12978 { "fsubM", { STi, ST } },
12979 { "fdiv!M", { STi, ST } },
12980 { "fdivM", { STi, ST } },
12984 { "ffree", { STi } },
12986 { "fst", { STi } },
12987 { "fstp", { STi } },
12988 { "fucom", { STi } },
12989 { "fucomp", { STi } },
12995 { "faddp", { STi, ST } },
12996 { "fmulp", { STi, ST } },
12999 { "fsub!Mp", { STi, ST } },
13000 { "fsubMp", { STi, ST } },
13001 { "fdiv!Mp", { STi, ST } },
13002 { "fdivMp", { STi, ST } },
13006 { "ffreep", { STi } },
13011 { "fucomip", { ST, STi } },
13012 { "fcomip", { ST, STi } },
13017 static char *fgrps[][8] = {
13020 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13025 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
13030 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
13035 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
13040 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
13045 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13050 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
13051 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
13056 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13061 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13066 swap_operand (void)
13068 mnemonicendp[0] = '.';
13069 mnemonicendp[1] = 's';
13074 OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
13075 int sizeflag ATTRIBUTE_UNUSED)
13077 /* Skip mod/rm byte. */
13083 dofloat (int sizeflag)
13085 const struct dis386 *dp;
13086 unsigned char floatop;
13088 floatop = codep[-1];
13090 if (modrm.mod != 3)
13092 int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
13094 putop (float_mem[fp_indx], sizeflag);
13097 OP_E (float_mem_mode[fp_indx], sizeflag);
13100 /* Skip mod/rm byte. */
13104 dp = &float_reg[floatop - 0xd8][modrm.reg];
13105 if (dp->name == NULL)
13107 putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
13109 /* Instruction fnstsw is only one with strange arg. */
13110 if (floatop == 0xdf && codep[-1] == 0xe0)
13111 strcpy (op_out[0], names16[0]);
13115 putop (dp->name, sizeflag);
13120 (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
13125 (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
13129 /* Like oappend (below), but S is a string starting with '%'.
13130 In Intel syntax, the '%' is elided. */
13132 oappend_maybe_intel (const char *s)
13134 oappend (s + intel_syntax);
13138 OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
13140 oappend_maybe_intel ("%st");
13144 OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
13146 sprintf (scratchbuf, "%%st(%d)", modrm.rm);
13147 oappend_maybe_intel (scratchbuf);
13150 /* Capital letters in template are macros. */
13152 putop (const char *in_template, int sizeflag)
13157 unsigned int l = 0, len = 1;
13160 #define SAVE_LAST(c) \
13161 if (l < len && l < sizeof (last)) \
13166 for (p = in_template; *p; p++)
13183 while (*++p != '|')
13184 if (*p == '}' || *p == '\0')
13187 /* Fall through. */
13192 while (*++p != '}')
13203 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
13207 if (l == 0 && len == 1)
13212 if (sizeflag & SUFFIX_ALWAYS)
13225 if (address_mode == mode_64bit
13226 && !(prefixes & PREFIX_ADDR))
13237 if (intel_syntax && !alt)
13239 if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
13241 if (sizeflag & DFLAG)
13242 *obufp++ = intel_syntax ? 'd' : 'l';
13244 *obufp++ = intel_syntax ? 'w' : 's';
13245 used_prefixes |= (prefixes & PREFIX_DATA);
13249 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
13252 if (modrm.mod == 3)
13258 if (sizeflag & DFLAG)
13259 *obufp++ = intel_syntax ? 'd' : 'l';
13262 used_prefixes |= (prefixes & PREFIX_DATA);
13268 case 'E': /* For jcxz/jecxz */
13269 if (address_mode == mode_64bit)
13271 if (sizeflag & AFLAG)
13277 if (sizeflag & AFLAG)
13279 used_prefixes |= (prefixes & PREFIX_ADDR);
13284 if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
13286 if (sizeflag & AFLAG)
13287 *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
13289 *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
13290 used_prefixes |= (prefixes & PREFIX_ADDR);
13294 if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
13296 if ((rex & REX_W) || (sizeflag & DFLAG))
13300 if (!(rex & REX_W))
13301 used_prefixes |= (prefixes & PREFIX_DATA);
13306 if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
13307 || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
13309 used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
13312 if (prefixes & PREFIX_DS)
13333 if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
13338 /* Fall through. */
13341 if (l != 0 || len != 1)
13349 if (sizeflag & SUFFIX_ALWAYS)
13353 if (intel_mnemonic != cond)
13357 if ((prefixes & PREFIX_FWAIT) == 0)
13360 used_prefixes |= PREFIX_FWAIT;
13366 else if (intel_syntax && (sizeflag & DFLAG))
13370 if (!(rex & REX_W))
13371 used_prefixes |= (prefixes & PREFIX_DATA);
13375 && address_mode == mode_64bit
13376 && ((sizeflag & DFLAG) || (rex & REX_W)))
13381 /* Fall through. */
13385 if ((rex & REX_W) == 0
13386 && (prefixes & PREFIX_DATA))
13388 if ((sizeflag & DFLAG) == 0)
13390 used_prefixes |= (prefixes & PREFIX_DATA);
13394 if ((prefixes & PREFIX_DATA)
13396 || (sizeflag & SUFFIX_ALWAYS))
13403 if (sizeflag & DFLAG)
13407 used_prefixes |= (prefixes & PREFIX_DATA);
13414 if (address_mode == mode_64bit
13415 && ((sizeflag & DFLAG) || (rex & REX_W)))
13417 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
13421 /* Fall through. */
13424 if (l == 0 && len == 1)
13427 if (intel_syntax && !alt)
13430 if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
13436 if (sizeflag & DFLAG)
13437 *obufp++ = intel_syntax ? 'd' : 'l';
13440 used_prefixes |= (prefixes & PREFIX_DATA);
13446 if (l != 1 || len != 2 || last[0] != 'L')
13452 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
13467 else if (sizeflag & DFLAG)
13476 if (intel_syntax && !p[1]
13477 && ((rex & REX_W) || (sizeflag & DFLAG)))
13479 if (!(rex & REX_W))
13480 used_prefixes |= (prefixes & PREFIX_DATA);
13483 if (l == 0 && len == 1)
13487 if (address_mode == mode_64bit
13488 && ((sizeflag & DFLAG) || (rex & REX_W)))
13490 if (sizeflag & SUFFIX_ALWAYS)
13512 /* Fall through. */
13515 if (l == 0 && len == 1)
13520 if (sizeflag & SUFFIX_ALWAYS)
13526 if (sizeflag & DFLAG)
13530 used_prefixes |= (prefixes & PREFIX_DATA);
13544 if (address_mode == mode_64bit
13545 && !(prefixes & PREFIX_ADDR))
13556 if (l != 0 || len != 1)
13561 if (need_vex && vex.prefix)
13563 if (vex.prefix == DATA_PREFIX_OPCODE)
13570 if (prefixes & PREFIX_DATA)
13574 used_prefixes |= (prefixes & PREFIX_DATA);
13578 if (l == 0 && len == 1)
13580 if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
13591 if (l != 1 || len != 2 || last[0] != 'X')
13599 || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
13601 switch (vex.length)
13615 if (l == 0 && len == 1)
13617 /* operand size flag for cwtl, cbtw */
13626 else if (sizeflag & DFLAG)
13630 if (!(rex & REX_W))
13631 used_prefixes |= (prefixes & PREFIX_DATA);
13638 && last[0] != 'L'))
13645 if (last[0] == 'X')
13646 *obufp++ = vex.w ? 'd': 's';
13648 *obufp++ = vex.w ? 'q': 'd';
13655 mnemonicendp = obufp;
13660 oappend (const char *s)
13662 obufp = stpcpy (obufp, s);
13668 if (prefixes & PREFIX_CS)
13670 used_prefixes |= PREFIX_CS;
13671 oappend_maybe_intel ("%cs:");
13673 if (prefixes & PREFIX_DS)
13675 used_prefixes |= PREFIX_DS;
13676 oappend_maybe_intel ("%ds:");
13678 if (prefixes & PREFIX_SS)
13680 used_prefixes |= PREFIX_SS;
13681 oappend_maybe_intel ("%ss:");
13683 if (prefixes & PREFIX_ES)
13685 used_prefixes |= PREFIX_ES;
13686 oappend_maybe_intel ("%es:");
13688 if (prefixes & PREFIX_FS)
13690 used_prefixes |= PREFIX_FS;
13691 oappend_maybe_intel ("%fs:");
13693 if (prefixes & PREFIX_GS)
13695 used_prefixes |= PREFIX_GS;
13696 oappend_maybe_intel ("%gs:");
13701 OP_indirE (int bytemode, int sizeflag)
13705 OP_E (bytemode, sizeflag);
13709 print_operand_value (char *buf, int hex, bfd_vma disp)
13711 if (address_mode == mode_64bit)
13719 sprintf_vma (tmp, disp);
13720 for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
13721 strcpy (buf + 2, tmp + i);
13725 bfd_signed_vma v = disp;
13732 /* Check for possible overflow on 0x8000000000000000. */
13735 strcpy (buf, "9223372036854775808");
13749 tmp[28 - i] = (v % 10) + '0';
13753 strcpy (buf, tmp + 29 - i);
13759 sprintf (buf, "0x%x", (unsigned int) disp);
13761 sprintf (buf, "%d", (int) disp);
13765 /* Put DISP in BUF as signed hex number. */
13768 print_displacement (char *buf, bfd_vma disp)
13770 bfd_signed_vma val = disp;
13779 /* Check for possible overflow. */
13782 switch (address_mode)
13785 strcpy (buf + j, "0x8000000000000000");
13788 strcpy (buf + j, "0x80000000");
13791 strcpy (buf + j, "0x8000");
13801 sprintf_vma (tmp, (bfd_vma) val);
13802 for (i = 0; tmp[i] == '0'; i++)
13804 if (tmp[i] == '\0')
13806 strcpy (buf + j, tmp + i);
13810 intel_operand_size (int bytemode, int sizeflag)
13814 && (bytemode == x_mode
13815 || bytemode == evex_half_bcst_xmmq_mode))
13818 oappend ("QWORD PTR ");
13820 oappend ("DWORD PTR ");
13828 oappend ("BYTE PTR ");
13832 oappend ("WORD PTR ");
13835 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
13837 oappend ("QWORD PTR ");
13846 oappend ("QWORD PTR ");
13849 if ((sizeflag & DFLAG) || bytemode == dq_mode)
13850 oappend ("DWORD PTR ");
13852 oappend ("WORD PTR ");
13853 used_prefixes |= (prefixes & PREFIX_DATA);
13857 if ((rex & REX_W) || (sizeflag & DFLAG))
13859 oappend ("WORD PTR ");
13860 if (!(rex & REX_W))
13861 used_prefixes |= (prefixes & PREFIX_DATA);
13864 if (sizeflag & DFLAG)
13865 oappend ("QWORD PTR ");
13867 oappend ("DWORD PTR ");
13868 used_prefixes |= (prefixes & PREFIX_DATA);
13871 case d_scalar_mode:
13872 case d_scalar_swap_mode:
13875 oappend ("DWORD PTR ");
13878 case q_scalar_mode:
13879 case q_scalar_swap_mode:
13881 oappend ("QWORD PTR ");
13884 if (address_mode == mode_64bit)
13885 oappend ("QWORD PTR ");
13887 oappend ("DWORD PTR ");
13890 if (sizeflag & DFLAG)
13891 oappend ("FWORD PTR ");
13893 oappend ("DWORD PTR ");
13894 used_prefixes |= (prefixes & PREFIX_DATA);
13897 oappend ("TBYTE PTR ");
13901 case evex_x_gscat_mode:
13902 case evex_x_nobcst_mode:
13905 switch (vex.length)
13908 oappend ("XMMWORD PTR ");
13911 oappend ("YMMWORD PTR ");
13914 oappend ("ZMMWORD PTR ");
13921 oappend ("XMMWORD PTR ");
13924 oappend ("XMMWORD PTR ");
13927 oappend ("YMMWORD PTR ");
13930 case evex_half_bcst_xmmq_mode:
13934 switch (vex.length)
13937 oappend ("QWORD PTR ");
13940 oappend ("XMMWORD PTR ");
13943 oappend ("YMMWORD PTR ");
13953 switch (vex.length)
13958 oappend ("BYTE PTR ");
13968 switch (vex.length)
13973 oappend ("WORD PTR ");
13983 switch (vex.length)
13988 oappend ("DWORD PTR ");
13998 switch (vex.length)
14003 oappend ("QWORD PTR ");
14013 switch (vex.length)
14016 oappend ("WORD PTR ");
14019 oappend ("DWORD PTR ");
14022 oappend ("QWORD PTR ");
14032 switch (vex.length)
14035 oappend ("DWORD PTR ");
14038 oappend ("QWORD PTR ");
14041 oappend ("XMMWORD PTR ");
14051 switch (vex.length)
14054 oappend ("QWORD PTR ");
14057 oappend ("YMMWORD PTR ");
14060 oappend ("ZMMWORD PTR ");
14070 switch (vex.length)
14074 oappend ("XMMWORD PTR ");
14081 oappend ("OWORD PTR ");
14084 case vex_w_dq_mode:
14085 case vex_scalar_w_dq_mode:
14090 oappend ("QWORD PTR ");
14092 oappend ("DWORD PTR ");
14094 case vex_vsib_d_w_dq_mode:
14095 case vex_vsib_q_w_dq_mode:
14102 oappend ("QWORD PTR ");
14104 oappend ("DWORD PTR ");
14108 if (vex.length != 512)
14110 oappend ("ZMMWORD PTR ");
14116 /* Currently the only instructions, which allows either mask or
14117 memory operand, are AVX512's KMOVW instructions. They need
14118 Word-sized operand. */
14119 if (vex.w || vex.length != 128)
14121 oappend ("WORD PTR ");
14130 OP_E_register (int bytemode, int sizeflag)
14132 int reg = modrm.rm;
14133 const char **names;
14139 if ((sizeflag & SUFFIX_ALWAYS)
14140 && (bytemode == b_swap_mode || bytemode == v_swap_mode))
14164 names = address_mode == mode_64bit ? names64 : names32;
14170 if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
14188 if ((sizeflag & DFLAG)
14189 || (bytemode != v_mode
14190 && bytemode != v_swap_mode))
14194 used_prefixes |= (prefixes & PREFIX_DATA);
14198 names = names_mask;
14203 oappend (INTERNAL_DISASSEMBLER_ERROR);
14206 oappend (names[reg]);
14210 OP_E_memory (int bytemode, int sizeflag)
14213 int add = (rex & REX_B) ? 8 : 0;
14219 /* In EVEX, if operand doesn't allow broadcast, vex.b should be 0. */
14221 && bytemode != x_mode
14222 && bytemode != evex_half_bcst_xmmq_mode)
14229 case vex_vsib_d_w_dq_mode:
14230 case vex_vsib_q_w_dq_mode:
14231 case evex_x_gscat_mode:
14233 shift = vex.w ? 3 : 2;
14236 case evex_half_bcst_xmmq_mode:
14239 shift = vex.w ? 3 : 2;
14242 /* Fall through if vex.b == 0. */
14247 case evex_x_nobcst_mode:
14249 switch (vex.length)
14272 case q_scalar_mode:
14274 case q_scalar_swap_mode:
14280 case d_scalar_mode:
14282 case d_scalar_swap_mode:
14294 /* Make necessary corrections to shift for modes that need it.
14295 For these modes we currently have shift 4, 5 or 6 depending on
14296 vex.length (it corresponds to xmmword, ymmword or zmmword
14297 operand). We might want to make it 3, 4 or 5 (e.g. for
14298 xmmq_mode). In case of broadcast enabled the corrections
14299 aren't needed, as element size is always 32 or 64 bits. */
14300 if (bytemode == xmmq_mode
14301 || (bytemode == evex_half_bcst_xmmq_mode
14304 else if (bytemode == xmmqd_mode)
14306 else if (bytemode == xmmdw_mode)
14314 intel_operand_size (bytemode, sizeflag);
14317 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
14319 /* 32/64 bit address mode */
14328 int addr32flag = !((sizeflag & AFLAG)
14329 || bytemode == v_bnd_mode
14330 || bytemode == bnd_mode);
14331 const char **indexes64 = names64;
14332 const char **indexes32 = names32;
14342 vindex = sib.index;
14348 case vex_vsib_d_w_dq_mode:
14349 case vex_vsib_q_w_dq_mode:
14359 switch (vex.length)
14362 indexes64 = indexes32 = names_xmm;
14365 if (!vex.w || bytemode == vex_vsib_q_w_dq_mode)
14366 indexes64 = indexes32 = names_ymm;
14368 indexes64 = indexes32 = names_xmm;
14371 if (!vex.w || bytemode == vex_vsib_q_w_dq_mode)
14372 indexes64 = indexes32 = names_zmm;
14374 indexes64 = indexes32 = names_ymm;
14381 haveindex = vindex != 4;
14388 rbase = base + add;
14396 if (address_mode == mode_64bit && !havesib)
14402 FETCH_DATA (the_info, codep + 1);
14404 if ((disp & 0x80) != 0)
14406 if (vex.evex && shift > 0)
14414 /* In 32bit mode, we need index register to tell [offset] from
14415 [eiz*1 + offset]. */
14416 needindex = (havesib
14419 && address_mode == mode_32bit);
14420 havedisp = (havebase
14422 || (havesib && (haveindex || scale != 0)));
14425 if (modrm.mod != 0 || base == 5)
14427 if (havedisp || riprel)
14428 print_displacement (scratchbuf, disp);
14430 print_operand_value (scratchbuf, 1, disp);
14431 oappend (scratchbuf);
14435 oappend (sizeflag & AFLAG ? "(%rip)" : "(%eip)");
14439 if ((havebase || haveindex || riprel)
14440 && (bytemode != v_bnd_mode)
14441 && (bytemode != bnd_mode))
14442 used_prefixes |= PREFIX_ADDR;
14444 if (havedisp || (intel_syntax && riprel))
14446 *obufp++ = open_char;
14447 if (intel_syntax && riprel)
14450 oappend (sizeflag & AFLAG ? "rip" : "eip");
14454 oappend (address_mode == mode_64bit && !addr32flag
14455 ? names64[rbase] : names32[rbase]);
14458 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
14459 print index to tell base + index from base. */
14463 || (havebase && base != ESP_REG_NUM))
14465 if (!intel_syntax || havebase)
14467 *obufp++ = separator_char;
14471 oappend (address_mode == mode_64bit && !addr32flag
14472 ? indexes64[vindex] : indexes32[vindex]);
14474 oappend (address_mode == mode_64bit && !addr32flag
14475 ? index64 : index32);
14477 *obufp++ = scale_char;
14479 sprintf (scratchbuf, "%d", 1 << scale);
14480 oappend (scratchbuf);
14484 && (disp || modrm.mod != 0 || base == 5))
14486 if (!havedisp || (bfd_signed_vma) disp >= 0)
14491 else if (modrm.mod != 1 && disp != -disp)
14495 disp = - (bfd_signed_vma) disp;
14499 print_displacement (scratchbuf, disp);
14501 print_operand_value (scratchbuf, 1, disp);
14502 oappend (scratchbuf);
14505 *obufp++ = close_char;
14508 else if (intel_syntax)
14510 if (modrm.mod != 0 || base == 5)
14512 if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
14513 | PREFIX_ES | PREFIX_FS | PREFIX_GS))
14517 oappend (names_seg[ds_reg - es_reg]);
14520 print_operand_value (scratchbuf, 1, disp);
14521 oappend (scratchbuf);
14527 /* 16 bit address mode */
14528 used_prefixes |= prefixes & PREFIX_ADDR;
14535 if ((disp & 0x8000) != 0)
14540 FETCH_DATA (the_info, codep + 1);
14542 if ((disp & 0x80) != 0)
14547 if ((disp & 0x8000) != 0)
14553 if (modrm.mod != 0 || modrm.rm == 6)
14555 print_displacement (scratchbuf, disp);
14556 oappend (scratchbuf);
14559 if (modrm.mod != 0 || modrm.rm != 6)
14561 *obufp++ = open_char;
14563 oappend (index16[modrm.rm]);
14565 && (disp || modrm.mod != 0 || modrm.rm == 6))
14567 if ((bfd_signed_vma) disp >= 0)
14572 else if (modrm.mod != 1)
14576 disp = - (bfd_signed_vma) disp;
14579 print_displacement (scratchbuf, disp);
14580 oappend (scratchbuf);
14583 *obufp++ = close_char;
14586 else if (intel_syntax)
14588 if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
14589 | PREFIX_ES | PREFIX_FS | PREFIX_GS))
14593 oappend (names_seg[ds_reg - es_reg]);
14596 print_operand_value (scratchbuf, 1, disp & 0xffff);
14597 oappend (scratchbuf);
14600 if (vex.evex && vex.b
14601 && (bytemode == x_mode
14602 || bytemode == evex_half_bcst_xmmq_mode))
14604 if (vex.w || bytemode == evex_half_bcst_xmmq_mode)
14605 oappend ("{1to8}");
14607 oappend ("{1to16}");
14612 OP_E (int bytemode, int sizeflag)
14614 /* Skip mod/rm byte. */
14618 if (modrm.mod == 3)
14619 OP_E_register (bytemode, sizeflag);
14621 OP_E_memory (bytemode, sizeflag);
14625 OP_G (int bytemode, int sizeflag)
14636 oappend (names8rex[modrm.reg + add]);
14638 oappend (names8[modrm.reg + add]);
14641 oappend (names16[modrm.reg + add]);
14644 oappend (names32[modrm.reg + add]);
14647 oappend (names64[modrm.reg + add]);
14650 oappend (names_bnd[modrm.reg]);
14659 oappend (names64[modrm.reg + add]);
14662 if ((sizeflag & DFLAG) || bytemode != v_mode)
14663 oappend (names32[modrm.reg + add]);
14665 oappend (names16[modrm.reg + add]);
14666 used_prefixes |= (prefixes & PREFIX_DATA);
14670 if (address_mode == mode_64bit)
14671 oappend (names64[modrm.reg + add]);
14673 oappend (names32[modrm.reg + add]);
14676 oappend (names_mask[modrm.reg + add]);
14679 oappend (INTERNAL_DISASSEMBLER_ERROR);
14692 FETCH_DATA (the_info, codep + 8);
14693 a = *codep++ & 0xff;
14694 a |= (*codep++ & 0xff) << 8;
14695 a |= (*codep++ & 0xff) << 16;
14696 a |= (*codep++ & 0xff) << 24;
14697 b = *codep++ & 0xff;
14698 b |= (*codep++ & 0xff) << 8;
14699 b |= (*codep++ & 0xff) << 16;
14700 b |= (*codep++ & 0xff) << 24;
14701 x = a + ((bfd_vma) b << 32);
14709 static bfd_signed_vma
14712 bfd_signed_vma x = 0;
14714 FETCH_DATA (the_info, codep + 4);
14715 x = *codep++ & (bfd_signed_vma) 0xff;
14716 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14717 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14718 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14722 static bfd_signed_vma
14725 bfd_signed_vma x = 0;
14727 FETCH_DATA (the_info, codep + 4);
14728 x = *codep++ & (bfd_signed_vma) 0xff;
14729 x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
14730 x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
14731 x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
14733 x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
14743 FETCH_DATA (the_info, codep + 2);
14744 x = *codep++ & 0xff;
14745 x |= (*codep++ & 0xff) << 8;
14750 set_op (bfd_vma op, int riprel)
14752 op_index[op_ad] = op_ad;
14753 if (address_mode == mode_64bit)
14755 op_address[op_ad] = op;
14756 op_riprel[op_ad] = riprel;
14760 /* Mask to get a 32-bit address. */
14761 op_address[op_ad] = op & 0xffffffff;
14762 op_riprel[op_ad] = riprel & 0xffffffff;
14767 OP_REG (int code, int sizeflag)
14774 case es_reg: case ss_reg: case cs_reg:
14775 case ds_reg: case fs_reg: case gs_reg:
14776 oappend (names_seg[code - es_reg]);
14788 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14789 case sp_reg: case bp_reg: case si_reg: case di_reg:
14790 s = names16[code - ax_reg + add];
14792 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14793 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
14796 s = names8rex[code - al_reg + add];
14798 s = names8[code - al_reg];
14800 case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
14801 case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
14802 if (address_mode == mode_64bit
14803 && ((sizeflag & DFLAG) || (rex & REX_W)))
14805 s = names64[code - rAX_reg + add];
14808 code += eAX_reg - rAX_reg;
14809 /* Fall through. */
14810 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14811 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
14814 s = names64[code - eAX_reg + add];
14817 if (sizeflag & DFLAG)
14818 s = names32[code - eAX_reg + add];
14820 s = names16[code - eAX_reg + add];
14821 used_prefixes |= (prefixes & PREFIX_DATA);
14825 s = INTERNAL_DISASSEMBLER_ERROR;
14832 OP_IMREG (int code, int sizeflag)
14844 case ax_reg: case cx_reg: case dx_reg: case bx_reg:
14845 case sp_reg: case bp_reg: case si_reg: case di_reg:
14846 s = names16[code - ax_reg];
14848 case es_reg: case ss_reg: case cs_reg:
14849 case ds_reg: case fs_reg: case gs_reg:
14850 s = names_seg[code - es_reg];
14852 case al_reg: case ah_reg: case cl_reg: case ch_reg:
14853 case dl_reg: case dh_reg: case bl_reg: case bh_reg:
14856 s = names8rex[code - al_reg];
14858 s = names8[code - al_reg];
14860 case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
14861 case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
14864 s = names64[code - eAX_reg];
14867 if (sizeflag & DFLAG)
14868 s = names32[code - eAX_reg];
14870 s = names16[code - eAX_reg];
14871 used_prefixes |= (prefixes & PREFIX_DATA);
14874 case z_mode_ax_reg:
14875 if ((rex & REX_W) || (sizeflag & DFLAG))
14879 if (!(rex & REX_W))
14880 used_prefixes |= (prefixes & PREFIX_DATA);
14883 s = INTERNAL_DISASSEMBLER_ERROR;
14890 OP_I (int bytemode, int sizeflag)
14893 bfd_signed_vma mask = -1;
14898 FETCH_DATA (the_info, codep + 1);
14903 if (address_mode == mode_64bit)
14908 /* Fall through. */
14915 if (sizeflag & DFLAG)
14925 used_prefixes |= (prefixes & PREFIX_DATA);
14937 oappend (INTERNAL_DISASSEMBLER_ERROR);
14942 scratchbuf[0] = '$';
14943 print_operand_value (scratchbuf + 1, 1, op);
14944 oappend_maybe_intel (scratchbuf);
14945 scratchbuf[0] = '\0';
14949 OP_I64 (int bytemode, int sizeflag)
14952 bfd_signed_vma mask = -1;
14954 if (address_mode != mode_64bit)
14956 OP_I (bytemode, sizeflag);
14963 FETCH_DATA (the_info, codep + 1);
14973 if (sizeflag & DFLAG)
14983 used_prefixes |= (prefixes & PREFIX_DATA);
14991 oappend (INTERNAL_DISASSEMBLER_ERROR);
14996 scratchbuf[0] = '$';
14997 print_operand_value (scratchbuf + 1, 1, op);
14998 oappend_maybe_intel (scratchbuf);
14999 scratchbuf[0] = '\0';
15003 OP_sI (int bytemode, int sizeflag)
15011 FETCH_DATA (the_info, codep + 1);
15013 if ((op & 0x80) != 0)
15015 if (bytemode == b_T_mode)
15017 if (address_mode != mode_64bit
15018 || !((sizeflag & DFLAG) || (rex & REX_W)))
15020 /* The operand-size prefix is overridden by a REX prefix. */
15021 if ((sizeflag & DFLAG) || (rex & REX_W))
15029 if (!(rex & REX_W))
15031 if (sizeflag & DFLAG)
15039 /* The operand-size prefix is overridden by a REX prefix. */
15040 if ((sizeflag & DFLAG) || (rex & REX_W))
15046 oappend (INTERNAL_DISASSEMBLER_ERROR);
15050 scratchbuf[0] = '$';
15051 print_operand_value (scratchbuf + 1, 1, op);
15052 oappend_maybe_intel (scratchbuf);
15056 OP_J (int bytemode, int sizeflag)
15060 bfd_vma segment = 0;
15065 FETCH_DATA (the_info, codep + 1);
15067 if ((disp & 0x80) != 0)
15072 if ((sizeflag & DFLAG) || (rex & REX_W))
15077 if ((disp & 0x8000) != 0)
15079 /* In 16bit mode, address is wrapped around at 64k within
15080 the same segment. Otherwise, a data16 prefix on a jump
15081 instruction means that the pc is masked to 16 bits after
15082 the displacement is added! */
15084 if ((prefixes & PREFIX_DATA) == 0)
15085 segment = ((start_pc + codep - start_codep)
15086 & ~((bfd_vma) 0xffff));
15088 if (!(rex & REX_W))
15089 used_prefixes |= (prefixes & PREFIX_DATA);
15092 oappend (INTERNAL_DISASSEMBLER_ERROR);
15095 disp = ((start_pc + (codep - start_codep) + disp) & mask) | segment;
15097 print_operand_value (scratchbuf, 1, disp);
15098 oappend (scratchbuf);
15102 OP_SEG (int bytemode, int sizeflag)
15104 if (bytemode == w_mode)
15105 oappend (names_seg[modrm.reg]);
15107 OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
15111 OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
15115 if (sizeflag & DFLAG)
15125 used_prefixes |= (prefixes & PREFIX_DATA);
15127 sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
15129 sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
15130 oappend (scratchbuf);
15134 OP_OFF (int bytemode, int sizeflag)
15138 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
15139 intel_operand_size (bytemode, sizeflag);
15142 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
15149 if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
15150 | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
15152 oappend (names_seg[ds_reg - es_reg]);
15156 print_operand_value (scratchbuf, 1, off);
15157 oappend (scratchbuf);
15161 OP_OFF64 (int bytemode, int sizeflag)
15165 if (address_mode != mode_64bit
15166 || (prefixes & PREFIX_ADDR))
15168 OP_OFF (bytemode, sizeflag);
15172 if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
15173 intel_operand_size (bytemode, sizeflag);
15180 if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
15181 | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
15183 oappend (names_seg[ds_reg - es_reg]);
15187 print_operand_value (scratchbuf, 1, off);
15188 oappend (scratchbuf);
15192 ptr_reg (int code, int sizeflag)
15196 *obufp++ = open_char;
15197 used_prefixes |= (prefixes & PREFIX_ADDR);
15198 if (address_mode == mode_64bit)
15200 if (!(sizeflag & AFLAG))
15201 s = names32[code - eAX_reg];
15203 s = names64[code - eAX_reg];
15205 else if (sizeflag & AFLAG)
15206 s = names32[code - eAX_reg];
15208 s = names16[code - eAX_reg];
15210 *obufp++ = close_char;
15215 OP_ESreg (int code, int sizeflag)
15221 case 0x6d: /* insw/insl */
15222 intel_operand_size (z_mode, sizeflag);
15224 case 0xa5: /* movsw/movsl/movsq */
15225 case 0xa7: /* cmpsw/cmpsl/cmpsq */
15226 case 0xab: /* stosw/stosl */
15227 case 0xaf: /* scasw/scasl */
15228 intel_operand_size (v_mode, sizeflag);
15231 intel_operand_size (b_mode, sizeflag);
15234 oappend_maybe_intel ("%es:");
15235 ptr_reg (code, sizeflag);
15239 OP_DSreg (int code, int sizeflag)
15245 case 0x6f: /* outsw/outsl */
15246 intel_operand_size (z_mode, sizeflag);
15248 case 0xa5: /* movsw/movsl/movsq */
15249 case 0xa7: /* cmpsw/cmpsl/cmpsq */
15250 case 0xad: /* lodsw/lodsl/lodsq */
15251 intel_operand_size (v_mode, sizeflag);
15254 intel_operand_size (b_mode, sizeflag);
15263 | PREFIX_GS)) == 0)
15264 prefixes |= PREFIX_DS;
15266 ptr_reg (code, sizeflag);
15270 OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15278 else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
15280 all_prefixes[last_lock_prefix] = 0;
15281 used_prefixes |= PREFIX_LOCK;
15286 sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
15287 oappend_maybe_intel (scratchbuf);
15291 OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15300 sprintf (scratchbuf, "db%d", modrm.reg + add);
15302 sprintf (scratchbuf, "%%db%d", modrm.reg + add);
15303 oappend (scratchbuf);
15307 OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15309 sprintf (scratchbuf, "%%tr%d", modrm.reg);
15310 oappend_maybe_intel (scratchbuf);
15314 OP_R (int bytemode, int sizeflag)
15316 if (modrm.mod == 3)
15317 OP_E (bytemode, sizeflag);
15323 OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15325 int reg = modrm.reg;
15326 const char **names;
15328 used_prefixes |= (prefixes & PREFIX_DATA);
15329 if (prefixes & PREFIX_DATA)
15338 oappend (names[reg]);
15342 OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
15344 int reg = modrm.reg;
15345 const char **names;
15357 && bytemode != xmm_mode
15358 && bytemode != xmmq_mode
15359 && bytemode != evex_half_bcst_xmmq_mode
15360 && bytemode != ymm_mode
15361 && bytemode != scalar_mode)
15363 switch (vex.length)
15369 if (vex.w || bytemode != vex_vsib_q_w_dq_mode)
15381 else if (bytemode == xmmq_mode
15382 || bytemode == evex_half_bcst_xmmq_mode)
15384 switch (vex.length)
15397 else if (bytemode == ymm_mode)
15401 oappend (names[reg]);
15405 OP_EM (int bytemode, int sizeflag)
15408 const char **names;
15410 if (modrm.mod != 3)
15413 && (bytemode == v_mode || bytemode == v_swap_mode))
15415 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
15416 used_prefixes |= (prefixes & PREFIX_DATA);
15418 OP_E (bytemode, sizeflag);
15422 if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
15425 /* Skip mod/rm byte. */
15428 used_prefixes |= (prefixes & PREFIX_DATA);
15430 if (prefixes & PREFIX_DATA)
15439 oappend (names[reg]);
15442 /* cvt* are the only instructions in sse2 which have
15443 both SSE and MMX operands and also have 0x66 prefix
15444 in their opcode. 0x66 was originally used to differentiate
15445 between SSE and MMX instruction(operands). So we have to handle the
15446 cvt* separately using OP_EMC and OP_MXC */
15448 OP_EMC (int bytemode, int sizeflag)
15450 if (modrm.mod != 3)
15452 if (intel_syntax && bytemode == v_mode)
15454 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
15455 used_prefixes |= (prefixes & PREFIX_DATA);
15457 OP_E (bytemode, sizeflag);
15461 /* Skip mod/rm byte. */
15464 used_prefixes |= (prefixes & PREFIX_DATA);
15465 oappend (names_mm[modrm.rm]);
15469 OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15471 used_prefixes |= (prefixes & PREFIX_DATA);
15472 oappend (names_mm[modrm.reg]);
15476 OP_EX (int bytemode, int sizeflag)
15479 const char **names;
15481 /* Skip mod/rm byte. */
15485 if (modrm.mod != 3)
15487 OP_E_memory (bytemode, sizeflag);
15502 if ((sizeflag & SUFFIX_ALWAYS)
15503 && (bytemode == x_swap_mode
15504 || bytemode == d_swap_mode
15505 || bytemode == d_scalar_swap_mode
15506 || bytemode == q_swap_mode
15507 || bytemode == q_scalar_swap_mode))
15511 && bytemode != xmm_mode
15512 && bytemode != xmmdw_mode
15513 && bytemode != xmmqd_mode
15514 && bytemode != xmm_mb_mode
15515 && bytemode != xmm_mw_mode
15516 && bytemode != xmm_md_mode
15517 && bytemode != xmm_mq_mode
15518 && bytemode != xmm_mdq_mode
15519 && bytemode != xmmq_mode
15520 && bytemode != evex_half_bcst_xmmq_mode
15521 && bytemode != ymm_mode
15522 && bytemode != d_scalar_mode
15523 && bytemode != d_scalar_swap_mode
15524 && bytemode != q_scalar_mode
15525 && bytemode != q_scalar_swap_mode
15526 && bytemode != vex_scalar_w_dq_mode)
15528 switch (vex.length)
15543 else if (bytemode == xmmq_mode
15544 || bytemode == evex_half_bcst_xmmq_mode)
15546 switch (vex.length)
15559 else if (bytemode == ymm_mode)
15563 oappend (names[reg]);
15567 OP_MS (int bytemode, int sizeflag)
15569 if (modrm.mod == 3)
15570 OP_EM (bytemode, sizeflag);
15576 OP_XS (int bytemode, int sizeflag)
15578 if (modrm.mod == 3)
15579 OP_EX (bytemode, sizeflag);
15585 OP_M (int bytemode, int sizeflag)
15587 if (modrm.mod == 3)
15588 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
15591 OP_E (bytemode, sizeflag);
15595 OP_0f07 (int bytemode, int sizeflag)
15597 if (modrm.mod != 3 || modrm.rm != 0)
15600 OP_E (bytemode, sizeflag);
15603 /* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
15604 32bit mode and "xchg %rax,%rax" in 64bit mode. */
15607 NOP_Fixup1 (int bytemode, int sizeflag)
15609 if ((prefixes & PREFIX_DATA) != 0
15612 && address_mode == mode_64bit))
15613 OP_REG (bytemode, sizeflag);
15615 strcpy (obuf, "nop");
15619 NOP_Fixup2 (int bytemode, int sizeflag)
15621 if ((prefixes & PREFIX_DATA) != 0
15624 && address_mode == mode_64bit))
15625 OP_IMREG (bytemode, sizeflag);
15628 static const char *const Suffix3DNow[] = {
15629 /* 00 */ NULL, NULL, NULL, NULL,
15630 /* 04 */ NULL, NULL, NULL, NULL,
15631 /* 08 */ NULL, NULL, NULL, NULL,
15632 /* 0C */ "pi2fw", "pi2fd", NULL, NULL,
15633 /* 10 */ NULL, NULL, NULL, NULL,
15634 /* 14 */ NULL, NULL, NULL, NULL,
15635 /* 18 */ NULL, NULL, NULL, NULL,
15636 /* 1C */ "pf2iw", "pf2id", NULL, NULL,
15637 /* 20 */ NULL, NULL, NULL, NULL,
15638 /* 24 */ NULL, NULL, NULL, NULL,
15639 /* 28 */ NULL, NULL, NULL, NULL,
15640 /* 2C */ NULL, NULL, NULL, NULL,
15641 /* 30 */ NULL, NULL, NULL, NULL,
15642 /* 34 */ NULL, NULL, NULL, NULL,
15643 /* 38 */ NULL, NULL, NULL, NULL,
15644 /* 3C */ NULL, NULL, NULL, NULL,
15645 /* 40 */ NULL, NULL, NULL, NULL,
15646 /* 44 */ NULL, NULL, NULL, NULL,
15647 /* 48 */ NULL, NULL, NULL, NULL,
15648 /* 4C */ NULL, NULL, NULL, NULL,
15649 /* 50 */ NULL, NULL, NULL, NULL,
15650 /* 54 */ NULL, NULL, NULL, NULL,
15651 /* 58 */ NULL, NULL, NULL, NULL,
15652 /* 5C */ NULL, NULL, NULL, NULL,
15653 /* 60 */ NULL, NULL, NULL, NULL,
15654 /* 64 */ NULL, NULL, NULL, NULL,
15655 /* 68 */ NULL, NULL, NULL, NULL,
15656 /* 6C */ NULL, NULL, NULL, NULL,
15657 /* 70 */ NULL, NULL, NULL, NULL,
15658 /* 74 */ NULL, NULL, NULL, NULL,
15659 /* 78 */ NULL, NULL, NULL, NULL,
15660 /* 7C */ NULL, NULL, NULL, NULL,
15661 /* 80 */ NULL, NULL, NULL, NULL,
15662 /* 84 */ NULL, NULL, NULL, NULL,
15663 /* 88 */ NULL, NULL, "pfnacc", NULL,
15664 /* 8C */ NULL, NULL, "pfpnacc", NULL,
15665 /* 90 */ "pfcmpge", NULL, NULL, NULL,
15666 /* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
15667 /* 98 */ NULL, NULL, "pfsub", NULL,
15668 /* 9C */ NULL, NULL, "pfadd", NULL,
15669 /* A0 */ "pfcmpgt", NULL, NULL, NULL,
15670 /* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
15671 /* A8 */ NULL, NULL, "pfsubr", NULL,
15672 /* AC */ NULL, NULL, "pfacc", NULL,
15673 /* B0 */ "pfcmpeq", NULL, NULL, NULL,
15674 /* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
15675 /* B8 */ NULL, NULL, NULL, "pswapd",
15676 /* BC */ NULL, NULL, NULL, "pavgusb",
15677 /* C0 */ NULL, NULL, NULL, NULL,
15678 /* C4 */ NULL, NULL, NULL, NULL,
15679 /* C8 */ NULL, NULL, NULL, NULL,
15680 /* CC */ NULL, NULL, NULL, NULL,
15681 /* D0 */ NULL, NULL, NULL, NULL,
15682 /* D4 */ NULL, NULL, NULL, NULL,
15683 /* D8 */ NULL, NULL, NULL, NULL,
15684 /* DC */ NULL, NULL, NULL, NULL,
15685 /* E0 */ NULL, NULL, NULL, NULL,
15686 /* E4 */ NULL, NULL, NULL, NULL,
15687 /* E8 */ NULL, NULL, NULL, NULL,
15688 /* EC */ NULL, NULL, NULL, NULL,
15689 /* F0 */ NULL, NULL, NULL, NULL,
15690 /* F4 */ NULL, NULL, NULL, NULL,
15691 /* F8 */ NULL, NULL, NULL, NULL,
15692 /* FC */ NULL, NULL, NULL, NULL,
15696 OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15698 const char *mnemonic;
15700 FETCH_DATA (the_info, codep + 1);
15701 /* AMD 3DNow! instructions are specified by an opcode suffix in the
15702 place where an 8-bit immediate would normally go. ie. the last
15703 byte of the instruction. */
15704 obufp = mnemonicendp;
15705 mnemonic = Suffix3DNow[*codep++ & 0xff];
15707 oappend (mnemonic);
15710 /* Since a variable sized modrm/sib chunk is between the start
15711 of the opcode (0x0f0f) and the opcode suffix, we need to do
15712 all the modrm processing first, and don't know until now that
15713 we have a bad opcode. This necessitates some cleaning up. */
15714 op_out[0][0] = '\0';
15715 op_out[1][0] = '\0';
15718 mnemonicendp = obufp;
15721 static struct op simd_cmp_op[] =
15723 { STRING_COMMA_LEN ("eq") },
15724 { STRING_COMMA_LEN ("lt") },
15725 { STRING_COMMA_LEN ("le") },
15726 { STRING_COMMA_LEN ("unord") },
15727 { STRING_COMMA_LEN ("neq") },
15728 { STRING_COMMA_LEN ("nlt") },
15729 { STRING_COMMA_LEN ("nle") },
15730 { STRING_COMMA_LEN ("ord") }
15734 CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15736 unsigned int cmp_type;
15738 FETCH_DATA (the_info, codep + 1);
15739 cmp_type = *codep++ & 0xff;
15740 if (cmp_type < ARRAY_SIZE (simd_cmp_op))
15743 char *p = mnemonicendp - 2;
15747 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
15748 mnemonicendp += simd_cmp_op[cmp_type].len;
15752 /* We have a reserved extension byte. Output it directly. */
15753 scratchbuf[0] = '$';
15754 print_operand_value (scratchbuf + 1, 1, cmp_type);
15755 oappend_maybe_intel (scratchbuf);
15756 scratchbuf[0] = '\0';
15761 OP_Mwait (int bytemode ATTRIBUTE_UNUSED,
15762 int sizeflag ATTRIBUTE_UNUSED)
15764 /* mwait %eax,%ecx */
15767 const char **names = (address_mode == mode_64bit
15768 ? names64 : names32);
15769 strcpy (op_out[0], names[0]);
15770 strcpy (op_out[1], names[1]);
15771 two_source_ops = 1;
15773 /* Skip mod/rm byte. */
15779 OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
15780 int sizeflag ATTRIBUTE_UNUSED)
15782 /* monitor %eax,%ecx,%edx" */
15785 const char **op1_names;
15786 const char **names = (address_mode == mode_64bit
15787 ? names64 : names32);
15789 if (!(prefixes & PREFIX_ADDR))
15790 op1_names = (address_mode == mode_16bit
15791 ? names16 : names);
15794 /* Remove "addr16/addr32". */
15795 all_prefixes[last_addr_prefix] = 0;
15796 op1_names = (address_mode != mode_32bit
15797 ? names32 : names16);
15798 used_prefixes |= PREFIX_ADDR;
15800 strcpy (op_out[0], op1_names[0]);
15801 strcpy (op_out[1], names[1]);
15802 strcpy (op_out[2], names[2]);
15803 two_source_ops = 1;
15805 /* Skip mod/rm byte. */
15813 /* Throw away prefixes and 1st. opcode byte. */
15814 codep = insn_codep + 1;
15819 REP_Fixup (int bytemode, int sizeflag)
15821 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
15823 if (prefixes & PREFIX_REPZ)
15824 all_prefixes[last_repz_prefix] = REP_PREFIX;
15831 OP_IMREG (bytemode, sizeflag);
15834 OP_ESreg (bytemode, sizeflag);
15837 OP_DSreg (bytemode, sizeflag);
15845 /* For BND-prefixed instructions 0xF2 prefix should be displayed as
15849 BND_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15851 if (prefixes & PREFIX_REPNZ)
15852 all_prefixes[last_repnz_prefix] = BND_PREFIX;
15855 /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
15856 "xacquire"/"xrelease" for memory operand if there is a LOCK prefix.
15860 HLE_Fixup1 (int bytemode, int sizeflag)
15863 && (prefixes & PREFIX_LOCK) != 0)
15865 if (prefixes & PREFIX_REPZ)
15866 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15867 if (prefixes & PREFIX_REPNZ)
15868 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
15871 OP_E (bytemode, sizeflag);
15874 /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
15875 "xacquire"/"xrelease" for memory operand. No check for LOCK prefix.
15879 HLE_Fixup2 (int bytemode, int sizeflag)
15881 if (modrm.mod != 3)
15883 if (prefixes & PREFIX_REPZ)
15884 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15885 if (prefixes & PREFIX_REPNZ)
15886 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
15889 OP_E (bytemode, sizeflag);
15892 /* Similar to OP_E. But the 0xf3 prefixes should be displayed as
15893 "xrelease" for memory operand. No check for LOCK prefix. */
15896 HLE_Fixup3 (int bytemode, int sizeflag)
15899 && last_repz_prefix > last_repnz_prefix
15900 && (prefixes & PREFIX_REPZ) != 0)
15901 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15903 OP_E (bytemode, sizeflag);
15907 CMPXCHG8B_Fixup (int bytemode, int sizeflag)
15912 /* Change cmpxchg8b to cmpxchg16b. */
15913 char *p = mnemonicendp - 2;
15914 mnemonicendp = stpcpy (p, "16b");
15917 else if ((prefixes & PREFIX_LOCK) != 0)
15919 if (prefixes & PREFIX_REPZ)
15920 all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
15921 if (prefixes & PREFIX_REPNZ)
15922 all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
15925 OP_M (bytemode, sizeflag);
15929 XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
15931 const char **names;
15935 switch (vex.length)
15949 oappend (names[reg]);
15953 CRC32_Fixup (int bytemode, int sizeflag)
15955 /* Add proper suffix to "crc32". */
15956 char *p = mnemonicendp;
15975 if (sizeflag & DFLAG)
15979 used_prefixes |= (prefixes & PREFIX_DATA);
15983 oappend (INTERNAL_DISASSEMBLER_ERROR);
15990 if (modrm.mod == 3)
15994 /* Skip mod/rm byte. */
15999 add = (rex & REX_B) ? 8 : 0;
16000 if (bytemode == b_mode)
16004 oappend (names8rex[modrm.rm + add]);
16006 oappend (names8[modrm.rm + add]);
16012 oappend (names64[modrm.rm + add]);
16013 else if ((prefixes & PREFIX_DATA))
16014 oappend (names16[modrm.rm + add]);
16016 oappend (names32[modrm.rm + add]);
16020 OP_E (bytemode, sizeflag);
16024 FXSAVE_Fixup (int bytemode, int sizeflag)
16026 /* Add proper suffix to "fxsave" and "fxrstor". */
16030 char *p = mnemonicendp;
16036 OP_M (bytemode, sizeflag);
16039 /* Display the destination register operand for instructions with
16043 OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16046 const char **names;
16054 reg = vex.register_specifier;
16061 if (bytemode == vex_scalar_mode)
16063 oappend (names_xmm[reg]);
16067 switch (vex.length)
16074 case vex_vsib_q_w_dq_mode:
16084 names = names_mask;
16098 case vex_vsib_q_w_dq_mode:
16099 names = vex.w ? names_ymm : names_xmm;
16102 names = names_mask;
16116 oappend (names[reg]);
16119 /* Get the VEX immediate byte without moving codep. */
16121 static unsigned char
16122 get_vex_imm8 (int sizeflag, int opnum)
16124 int bytes_before_imm = 0;
16126 if (modrm.mod != 3)
16128 /* There are SIB/displacement bytes. */
16129 if ((sizeflag & AFLAG) || address_mode == mode_64bit)
16131 /* 32/64 bit address mode */
16132 int base = modrm.rm;
16134 /* Check SIB byte. */
16137 FETCH_DATA (the_info, codep + 1);
16139 /* When decoding the third source, don't increase
16140 bytes_before_imm as this has already been incremented
16141 by one in OP_E_memory while decoding the second
16144 bytes_before_imm++;
16147 /* Don't increase bytes_before_imm when decoding the third source,
16148 it has already been incremented by OP_E_memory while decoding
16149 the second source operand. */
16155 /* When modrm.rm == 5 or modrm.rm == 4 and base in
16156 SIB == 5, there is a 4 byte displacement. */
16158 /* No displacement. */
16161 /* 4 byte displacement. */
16162 bytes_before_imm += 4;
16165 /* 1 byte displacement. */
16166 bytes_before_imm++;
16173 /* 16 bit address mode */
16174 /* Don't increase bytes_before_imm when decoding the third source,
16175 it has already been incremented by OP_E_memory while decoding
16176 the second source operand. */
16182 /* When modrm.rm == 6, there is a 2 byte displacement. */
16184 /* No displacement. */
16187 /* 2 byte displacement. */
16188 bytes_before_imm += 2;
16191 /* 1 byte displacement: when decoding the third source,
16192 don't increase bytes_before_imm as this has already
16193 been incremented by one in OP_E_memory while decoding
16194 the second source operand. */
16196 bytes_before_imm++;
16204 FETCH_DATA (the_info, codep + bytes_before_imm + 1);
16205 return codep [bytes_before_imm];
16209 OP_EX_VexReg (int bytemode, int sizeflag, int reg)
16211 const char **names;
16213 if (reg == -1 && modrm.mod != 3)
16215 OP_E_memory (bytemode, sizeflag);
16227 else if (reg > 7 && address_mode != mode_64bit)
16231 switch (vex.length)
16242 oappend (names[reg]);
16246 OP_EX_VexImmW (int bytemode, int sizeflag)
16249 static unsigned char vex_imm8;
16251 if (vex_w_done == 0)
16255 /* Skip mod/rm byte. */
16259 vex_imm8 = get_vex_imm8 (sizeflag, 0);
16262 reg = vex_imm8 >> 4;
16264 OP_EX_VexReg (bytemode, sizeflag, reg);
16266 else if (vex_w_done == 1)
16271 reg = vex_imm8 >> 4;
16273 OP_EX_VexReg (bytemode, sizeflag, reg);
16277 /* Output the imm8 directly. */
16278 scratchbuf[0] = '$';
16279 print_operand_value (scratchbuf + 1, 1, vex_imm8 & 0xf);
16280 oappend_maybe_intel (scratchbuf);
16281 scratchbuf[0] = '\0';
16287 OP_Vex_2src (int bytemode, int sizeflag)
16289 if (modrm.mod == 3)
16291 int reg = modrm.rm;
16295 oappend (names_xmm[reg]);
16300 && (bytemode == v_mode || bytemode == v_swap_mode))
16302 bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
16303 used_prefixes |= (prefixes & PREFIX_DATA);
16305 OP_E (bytemode, sizeflag);
16310 OP_Vex_2src_1 (int bytemode, int sizeflag)
16312 if (modrm.mod == 3)
16314 /* Skip mod/rm byte. */
16320 oappend (names_xmm[vex.register_specifier]);
16322 OP_Vex_2src (bytemode, sizeflag);
16326 OP_Vex_2src_2 (int bytemode, int sizeflag)
16329 OP_Vex_2src (bytemode, sizeflag);
16331 oappend (names_xmm[vex.register_specifier]);
16335 OP_EX_VexW (int bytemode, int sizeflag)
16343 /* Skip mod/rm byte. */
16348 reg = get_vex_imm8 (sizeflag, 0) >> 4;
16353 reg = get_vex_imm8 (sizeflag, 1) >> 4;
16356 OP_EX_VexReg (bytemode, sizeflag, reg);
16360 VEXI4_Fixup (int bytemode ATTRIBUTE_UNUSED,
16361 int sizeflag ATTRIBUTE_UNUSED)
16363 /* Skip the immediate byte and check for invalid bits. */
16364 FETCH_DATA (the_info, codep + 1);
16365 if (*codep++ & 0xf)
16370 OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16373 const char **names;
16375 FETCH_DATA (the_info, codep + 1);
16378 if (bytemode != x_mode)
16385 if (reg > 7 && address_mode != mode_64bit)
16388 switch (vex.length)
16399 oappend (names[reg]);
16403 OP_XMM_VexW (int bytemode, int sizeflag)
16405 /* Turn off the REX.W bit since it is used for swapping operands
16408 OP_XMM (bytemode, sizeflag);
16412 OP_EX_Vex (int bytemode, int sizeflag)
16414 if (modrm.mod != 3)
16416 if (vex.register_specifier != 0)
16420 OP_EX (bytemode, sizeflag);
16424 OP_XMM_Vex (int bytemode, int sizeflag)
16426 if (modrm.mod != 3)
16428 if (vex.register_specifier != 0)
16432 OP_XMM (bytemode, sizeflag);
16436 VZERO_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16438 switch (vex.length)
16441 mnemonicendp = stpcpy (obuf, "vzeroupper");
16444 mnemonicendp = stpcpy (obuf, "vzeroall");
16451 static struct op vex_cmp_op[] =
16453 { STRING_COMMA_LEN ("eq") },
16454 { STRING_COMMA_LEN ("lt") },
16455 { STRING_COMMA_LEN ("le") },
16456 { STRING_COMMA_LEN ("unord") },
16457 { STRING_COMMA_LEN ("neq") },
16458 { STRING_COMMA_LEN ("nlt") },
16459 { STRING_COMMA_LEN ("nle") },
16460 { STRING_COMMA_LEN ("ord") },
16461 { STRING_COMMA_LEN ("eq_uq") },
16462 { STRING_COMMA_LEN ("nge") },
16463 { STRING_COMMA_LEN ("ngt") },
16464 { STRING_COMMA_LEN ("false") },
16465 { STRING_COMMA_LEN ("neq_oq") },
16466 { STRING_COMMA_LEN ("ge") },
16467 { STRING_COMMA_LEN ("gt") },
16468 { STRING_COMMA_LEN ("true") },
16469 { STRING_COMMA_LEN ("eq_os") },
16470 { STRING_COMMA_LEN ("lt_oq") },
16471 { STRING_COMMA_LEN ("le_oq") },
16472 { STRING_COMMA_LEN ("unord_s") },
16473 { STRING_COMMA_LEN ("neq_us") },
16474 { STRING_COMMA_LEN ("nlt_uq") },
16475 { STRING_COMMA_LEN ("nle_uq") },
16476 { STRING_COMMA_LEN ("ord_s") },
16477 { STRING_COMMA_LEN ("eq_us") },
16478 { STRING_COMMA_LEN ("nge_uq") },
16479 { STRING_COMMA_LEN ("ngt_uq") },
16480 { STRING_COMMA_LEN ("false_os") },
16481 { STRING_COMMA_LEN ("neq_os") },
16482 { STRING_COMMA_LEN ("ge_oq") },
16483 { STRING_COMMA_LEN ("gt_oq") },
16484 { STRING_COMMA_LEN ("true_us") },
16488 VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16490 unsigned int cmp_type;
16492 FETCH_DATA (the_info, codep + 1);
16493 cmp_type = *codep++ & 0xff;
16494 if (cmp_type < ARRAY_SIZE (vex_cmp_op))
16497 char *p = mnemonicendp - 2;
16501 sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
16502 mnemonicendp += vex_cmp_op[cmp_type].len;
16506 /* We have a reserved extension byte. Output it directly. */
16507 scratchbuf[0] = '$';
16508 print_operand_value (scratchbuf + 1, 1, cmp_type);
16509 oappend_maybe_intel (scratchbuf);
16510 scratchbuf[0] = '\0';
16515 VPCMP_Fixup (int bytemode ATTRIBUTE_UNUSED,
16516 int sizeflag ATTRIBUTE_UNUSED)
16518 unsigned int cmp_type;
16523 FETCH_DATA (the_info, codep + 1);
16524 cmp_type = *codep++ & 0xff;
16525 /* There are aliases for immediates 0, 1, 2, 4, 5, 6.
16526 If it's the case, print suffix, otherwise - print the immediate. */
16527 if (cmp_type < ARRAY_SIZE (simd_cmp_op)
16532 char *p = mnemonicendp - 2;
16534 /* vpcmp* can have both one- and two-lettered suffix. */
16548 sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
16549 mnemonicendp += simd_cmp_op[cmp_type].len;
16553 /* We have a reserved extension byte. Output it directly. */
16554 scratchbuf[0] = '$';
16555 print_operand_value (scratchbuf + 1, 1, cmp_type);
16556 oappend_maybe_intel (scratchbuf);
16557 scratchbuf[0] = '\0';
16561 static const struct op pclmul_op[] =
16563 { STRING_COMMA_LEN ("lql") },
16564 { STRING_COMMA_LEN ("hql") },
16565 { STRING_COMMA_LEN ("lqh") },
16566 { STRING_COMMA_LEN ("hqh") }
16570 PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
16571 int sizeflag ATTRIBUTE_UNUSED)
16573 unsigned int pclmul_type;
16575 FETCH_DATA (the_info, codep + 1);
16576 pclmul_type = *codep++ & 0xff;
16577 switch (pclmul_type)
16588 if (pclmul_type < ARRAY_SIZE (pclmul_op))
16591 char *p = mnemonicendp - 3;
16596 sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
16597 mnemonicendp += pclmul_op[pclmul_type].len;
16601 /* We have a reserved extension byte. Output it directly. */
16602 scratchbuf[0] = '$';
16603 print_operand_value (scratchbuf + 1, 1, pclmul_type);
16604 oappend_maybe_intel (scratchbuf);
16605 scratchbuf[0] = '\0';
16610 MOVBE_Fixup (int bytemode, int sizeflag)
16612 /* Add proper suffix to "movbe". */
16613 char *p = mnemonicendp;
16622 if (sizeflag & SUFFIX_ALWAYS)
16628 if (sizeflag & DFLAG)
16632 used_prefixes |= (prefixes & PREFIX_DATA);
16637 oappend (INTERNAL_DISASSEMBLER_ERROR);
16644 OP_M (bytemode, sizeflag);
16648 OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16651 const char **names;
16653 /* Skip mod/rm byte. */
16667 oappend (names[reg]);
16671 OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
16673 const char **names;
16680 oappend (names[vex.register_specifier]);
16684 OP_Mask (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16687 || bytemode != mask_mode)
16691 if ((rex & REX_R) != 0 || !vex.r)
16697 oappend (names_mask [modrm.reg]);
16701 OP_Rounding (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
16704 || (bytemode != evex_rounding_mode
16705 && bytemode != evex_sae_mode))
16707 if (modrm.mod == 3 && vex.b)
16710 case evex_rounding_mode:
16711 oappend (names_rounding[vex.ll]);
16713 case evex_sae_mode: