1 /* Print i386 instructions for GDB, the GNU debugger.
2 Copyright (C) 1988-2019 Free Software Foundation, Inc.
4 This file is part of the GNU opcodes library.
6 This library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 It is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
22 /* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
24 modified by John Hassey (hassey@dg-rtp.dg.com)
25 x86-64 support added by Jan Hubicka (jh@suse.cz)
26 VIA PadLock support by Michal Ludvig (mludvig@suse.cz). */
28 /* The main tables describing the instructions is essentially a copy
29 of the "Opcode Map" chapter (Appendix A) of the Intel 80386
30 Programmers Manual. Usually, there is a capital letter, followed
31 by a small letter. The capital letter tell the addressing mode,
32 and the small letter tells about the operand size. Refer to
33 the Intel manual for details. */
36 #include "disassemble.h"
38 #include "opcode/i386.h"
39 #include "libiberty.h"
43 static int print_insn (bfd_vma
, disassemble_info
*);
44 static void dofloat (int);
45 static void OP_ST (int, int);
46 static void OP_STi (int, int);
47 static int putop (const char *, int);
48 static void oappend (const char *);
49 static void append_seg (void);
50 static void OP_indirE (int, int);
51 static void print_operand_value (char *, int, bfd_vma
);
52 static void OP_E_register (int, int);
53 static void OP_E_memory (int, int);
54 static void print_displacement (char *, bfd_vma
);
55 static void OP_E (int, int);
56 static void OP_G (int, int);
57 static bfd_vma
get64 (void);
58 static bfd_signed_vma
get32 (void);
59 static bfd_signed_vma
get32s (void);
60 static int get16 (void);
61 static void set_op (bfd_vma
, int);
62 static void OP_Skip_MODRM (int, int);
63 static void OP_REG (int, int);
64 static void OP_IMREG (int, int);
65 static void OP_I (int, int);
66 static void OP_I64 (int, int);
67 static void OP_sI (int, int);
68 static void OP_J (int, int);
69 static void OP_SEG (int, int);
70 static void OP_DIR (int, int);
71 static void OP_OFF (int, int);
72 static void OP_OFF64 (int, int);
73 static void ptr_reg (int, int);
74 static void OP_ESreg (int, int);
75 static void OP_DSreg (int, int);
76 static void OP_C (int, int);
77 static void OP_D (int, int);
78 static void OP_T (int, int);
79 static void OP_R (int, int);
80 static void OP_MMX (int, int);
81 static void OP_XMM (int, int);
82 static void OP_EM (int, int);
83 static void OP_EX (int, int);
84 static void OP_EMC (int,int);
85 static void OP_MXC (int,int);
86 static void OP_MS (int, int);
87 static void OP_XS (int, int);
88 static void OP_M (int, int);
89 static void OP_VEX (int, int);
90 static void OP_EX_Vex (int, int);
91 static void OP_EX_VexW (int, int);
92 static void OP_EX_VexImmW (int, int);
93 static void OP_XMM_Vex (int, int);
94 static void OP_XMM_VexW (int, int);
95 static void OP_Rounding (int, int);
96 static void OP_REG_VexI4 (int, int);
97 static void PCLMUL_Fixup (int, int);
98 static void VCMP_Fixup (int, int);
99 static void VPCMP_Fixup (int, int);
100 static void VPCOM_Fixup (int, int);
101 static void OP_0f07 (int, int);
102 static void OP_Monitor (int, int);
103 static void OP_Mwait (int, int);
104 static void NOP_Fixup1 (int, int);
105 static void NOP_Fixup2 (int, int);
106 static void OP_3DNowSuffix (int, int);
107 static void CMP_Fixup (int, int);
108 static void BadOp (void);
109 static void REP_Fixup (int, int);
110 static void BND_Fixup (int, int);
111 static void NOTRACK_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 PCMPESTR_Fixup (int, int);
120 static void OP_LWPCB_E (int, int);
121 static void OP_LWP_E (int, int);
122 static void OP_Vex_2src_1 (int, int);
123 static void OP_Vex_2src_2 (int, int);
125 static void MOVBE_Fixup (int, int);
127 static void OP_Mask (int, int);
130 /* Points to first byte not fetched. */
131 bfd_byte
*max_fetched
;
132 bfd_byte the_buffer
[MAX_MNEM_SIZE
];
135 OPCODES_SIGJMP_BUF bailout
;
145 enum address_mode address_mode
;
147 /* Flags for the prefixes for the current instruction. See below. */
150 /* REX prefix the current instruction. See below. */
152 /* Bits of REX we've already used. */
154 /* REX bits in original REX prefix ignored. */
155 static int rex_ignored
;
156 /* Mark parts used in the REX prefix. When we are testing for
157 empty prefix (for 8bit register REX extension), just mask it
158 out. Otherwise test for REX bit is excuse for existence of REX
159 only in case value is nonzero. */
160 #define USED_REX(value) \
165 rex_used |= (value) | REX_OPCODE; \
168 rex_used |= REX_OPCODE; \
171 /* Flags for prefixes which we somehow handled when printing the
172 current instruction. */
173 static int used_prefixes
;
175 /* Flags stored in PREFIXES. */
176 #define PREFIX_REPZ 1
177 #define PREFIX_REPNZ 2
178 #define PREFIX_LOCK 4
180 #define PREFIX_SS 0x10
181 #define PREFIX_DS 0x20
182 #define PREFIX_ES 0x40
183 #define PREFIX_FS 0x80
184 #define PREFIX_GS 0x100
185 #define PREFIX_DATA 0x200
186 #define PREFIX_ADDR 0x400
187 #define PREFIX_FWAIT 0x800
189 /* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
190 to ADDR (exclusive) are valid. Returns 1 for success, longjmps
192 #define FETCH_DATA(info, addr) \
193 ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
194 ? 1 : fetch_data ((info), (addr)))
197 fetch_data (struct disassemble_info
*info
, bfd_byte
*addr
)
200 struct dis_private
*priv
= (struct dis_private
*) info
->private_data
;
201 bfd_vma start
= priv
->insn_start
+ (priv
->max_fetched
- priv
->the_buffer
);
203 if (addr
<= priv
->the_buffer
+ MAX_MNEM_SIZE
)
204 status
= (*info
->read_memory_func
) (start
,
206 addr
- priv
->max_fetched
,
212 /* If we did manage to read at least one byte, then
213 print_insn_i386 will do something sensible. Otherwise, print
214 an error. We do that here because this is where we know
216 if (priv
->max_fetched
== priv
->the_buffer
)
217 (*info
->memory_error_func
) (status
, start
, info
);
218 OPCODES_SIGLONGJMP (priv
->bailout
, 1);
221 priv
->max_fetched
= addr
;
225 /* Possible values for prefix requirement. */
226 #define PREFIX_IGNORED_SHIFT 16
227 #define PREFIX_IGNORED_REPZ (PREFIX_REPZ << PREFIX_IGNORED_SHIFT)
228 #define PREFIX_IGNORED_REPNZ (PREFIX_REPNZ << PREFIX_IGNORED_SHIFT)
229 #define PREFIX_IGNORED_DATA (PREFIX_DATA << PREFIX_IGNORED_SHIFT)
230 #define PREFIX_IGNORED_ADDR (PREFIX_ADDR << PREFIX_IGNORED_SHIFT)
231 #define PREFIX_IGNORED_LOCK (PREFIX_LOCK << PREFIX_IGNORED_SHIFT)
233 /* Opcode prefixes. */
234 #define PREFIX_OPCODE (PREFIX_REPZ \
238 /* Prefixes ignored. */
239 #define PREFIX_IGNORED (PREFIX_IGNORED_REPZ \
240 | PREFIX_IGNORED_REPNZ \
241 | PREFIX_IGNORED_DATA)
243 #define XX { NULL, 0 }
244 #define Bad_Opcode NULL, { { NULL, 0 } }, 0
246 #define Eb { OP_E, b_mode }
247 #define Ebnd { OP_E, bnd_mode }
248 #define EbS { OP_E, b_swap_mode }
249 #define EbndS { OP_E, bnd_swap_mode }
250 #define Ev { OP_E, v_mode }
251 #define Eva { OP_E, va_mode }
252 #define Ev_bnd { OP_E, v_bnd_mode }
253 #define EvS { OP_E, v_swap_mode }
254 #define Ed { OP_E, d_mode }
255 #define Edq { OP_E, dq_mode }
256 #define Edqw { OP_E, dqw_mode }
257 #define Edqb { OP_E, dqb_mode }
258 #define Edb { OP_E, db_mode }
259 #define Edw { OP_E, dw_mode }
260 #define Edqd { OP_E, dqd_mode }
261 #define Eq { OP_E, q_mode }
262 #define indirEv { OP_indirE, indir_v_mode }
263 #define indirEp { OP_indirE, f_mode }
264 #define stackEv { OP_E, stack_v_mode }
265 #define Em { OP_E, m_mode }
266 #define Ew { OP_E, w_mode }
267 #define M { OP_M, 0 } /* lea, lgdt, etc. */
268 #define Ma { OP_M, a_mode }
269 #define Mb { OP_M, b_mode }
270 #define Md { OP_M, d_mode }
271 #define Mo { OP_M, o_mode }
272 #define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
273 #define Mq { OP_M, q_mode }
274 #define Mv_bnd { OP_M, v_bndmk_mode }
275 #define Mx { OP_M, x_mode }
276 #define Mxmm { OP_M, xmm_mode }
277 #define Gb { OP_G, b_mode }
278 #define Gbnd { OP_G, bnd_mode }
279 #define Gv { OP_G, v_mode }
280 #define Gd { OP_G, d_mode }
281 #define Gdq { OP_G, dq_mode }
282 #define Gm { OP_G, m_mode }
283 #define Gva { OP_G, va_mode }
284 #define Gw { OP_G, w_mode }
285 #define Rd { OP_R, d_mode }
286 #define Rdq { OP_R, dq_mode }
287 #define Rm { OP_R, m_mode }
288 #define Ib { OP_I, b_mode }
289 #define sIb { OP_sI, b_mode } /* sign extened byte */
290 #define sIbT { OP_sI, b_T_mode } /* sign extened byte like 'T' */
291 #define Iv { OP_I, v_mode }
292 #define sIv { OP_sI, v_mode }
293 #define Iv64 { OP_I64, v_mode }
294 #define Id { OP_I, d_mode }
295 #define Iw { OP_I, w_mode }
296 #define I1 { OP_I, const_1_mode }
297 #define Jb { OP_J, b_mode }
298 #define Jv { OP_J, v_mode }
299 #define Cm { OP_C, m_mode }
300 #define Dm { OP_D, m_mode }
301 #define Td { OP_T, d_mode }
302 #define Skip_MODRM { OP_Skip_MODRM, 0 }
304 #define RMeAX { OP_REG, eAX_reg }
305 #define RMeBX { OP_REG, eBX_reg }
306 #define RMeCX { OP_REG, eCX_reg }
307 #define RMeDX { OP_REG, eDX_reg }
308 #define RMeSP { OP_REG, eSP_reg }
309 #define RMeBP { OP_REG, eBP_reg }
310 #define RMeSI { OP_REG, eSI_reg }
311 #define RMeDI { OP_REG, eDI_reg }
312 #define RMrAX { OP_REG, rAX_reg }
313 #define RMrBX { OP_REG, rBX_reg }
314 #define RMrCX { OP_REG, rCX_reg }
315 #define RMrDX { OP_REG, rDX_reg }
316 #define RMrSP { OP_REG, rSP_reg }
317 #define RMrBP { OP_REG, rBP_reg }
318 #define RMrSI { OP_REG, rSI_reg }
319 #define RMrDI { OP_REG, rDI_reg }
320 #define RMAL { OP_REG, al_reg }
321 #define RMCL { OP_REG, cl_reg }
322 #define RMDL { OP_REG, dl_reg }
323 #define RMBL { OP_REG, bl_reg }
324 #define RMAH { OP_REG, ah_reg }
325 #define RMCH { OP_REG, ch_reg }
326 #define RMDH { OP_REG, dh_reg }
327 #define RMBH { OP_REG, bh_reg }
328 #define RMAX { OP_REG, ax_reg }
329 #define RMDX { OP_REG, dx_reg }
331 #define eAX { OP_IMREG, eAX_reg }
332 #define eBX { OP_IMREG, eBX_reg }
333 #define eCX { OP_IMREG, eCX_reg }
334 #define eDX { OP_IMREG, eDX_reg }
335 #define eSP { OP_IMREG, eSP_reg }
336 #define eBP { OP_IMREG, eBP_reg }
337 #define eSI { OP_IMREG, eSI_reg }
338 #define eDI { OP_IMREG, eDI_reg }
339 #define AL { OP_IMREG, al_reg }
340 #define CL { OP_IMREG, cl_reg }
341 #define DL { OP_IMREG, dl_reg }
342 #define BL { OP_IMREG, bl_reg }
343 #define AH { OP_IMREG, ah_reg }
344 #define CH { OP_IMREG, ch_reg }
345 #define DH { OP_IMREG, dh_reg }
346 #define BH { OP_IMREG, bh_reg }
347 #define AX { OP_IMREG, ax_reg }
348 #define DX { OP_IMREG, dx_reg }
349 #define zAX { OP_IMREG, z_mode_ax_reg }
350 #define indirDX { OP_IMREG, indir_dx_reg }
352 #define Sw { OP_SEG, w_mode }
353 #define Sv { OP_SEG, v_mode }
354 #define Ap { OP_DIR, 0 }
355 #define Ob { OP_OFF64, b_mode }
356 #define Ov { OP_OFF64, v_mode }
357 #define Xb { OP_DSreg, eSI_reg }
358 #define Xv { OP_DSreg, eSI_reg }
359 #define Xz { OP_DSreg, eSI_reg }
360 #define Yb { OP_ESreg, eDI_reg }
361 #define Yv { OP_ESreg, eDI_reg }
362 #define DSBX { OP_DSreg, eBX_reg }
364 #define es { OP_REG, es_reg }
365 #define ss { OP_REG, ss_reg }
366 #define cs { OP_REG, cs_reg }
367 #define ds { OP_REG, ds_reg }
368 #define fs { OP_REG, fs_reg }
369 #define gs { OP_REG, gs_reg }
371 #define MX { OP_MMX, 0 }
372 #define XM { OP_XMM, 0 }
373 #define XMScalar { OP_XMM, scalar_mode }
374 #define XMGatherQ { OP_XMM, vex_vsib_q_w_dq_mode }
375 #define XMM { OP_XMM, xmm_mode }
376 #define XMxmmq { OP_XMM, xmmq_mode }
377 #define EM { OP_EM, v_mode }
378 #define EMS { OP_EM, v_swap_mode }
379 #define EMd { OP_EM, d_mode }
380 #define EMx { OP_EM, x_mode }
381 #define EXbScalar { OP_EX, b_scalar_mode }
382 #define EXw { OP_EX, w_mode }
383 #define EXwScalar { OP_EX, w_scalar_mode }
384 #define EXd { OP_EX, d_mode }
385 #define EXdScalar { OP_EX, d_scalar_mode }
386 #define EXdS { OP_EX, d_swap_mode }
387 #define EXq { OP_EX, q_mode }
388 #define EXqScalar { OP_EX, q_scalar_mode }
389 #define EXqScalarS { OP_EX, q_scalar_swap_mode }
390 #define EXqS { OP_EX, q_swap_mode }
391 #define EXx { OP_EX, x_mode }
392 #define EXxS { OP_EX, x_swap_mode }
393 #define EXxmm { OP_EX, xmm_mode }
394 #define EXymm { OP_EX, ymm_mode }
395 #define EXxmmq { OP_EX, xmmq_mode }
396 #define EXEvexHalfBcstXmmq { OP_EX, evex_half_bcst_xmmq_mode }
397 #define EXxmm_mb { OP_EX, xmm_mb_mode }
398 #define EXxmm_mw { OP_EX, xmm_mw_mode }
399 #define EXxmm_md { OP_EX, xmm_md_mode }
400 #define EXxmm_mq { OP_EX, xmm_mq_mode }
401 #define EXxmm_mdq { OP_EX, xmm_mdq_mode }
402 #define EXxmmdw { OP_EX, xmmdw_mode }
403 #define EXxmmqd { OP_EX, xmmqd_mode }
404 #define EXymmq { OP_EX, ymmq_mode }
405 #define EXVexWdq { OP_EX, vex_w_dq_mode }
406 #define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
407 #define EXEvexXGscat { OP_EX, evex_x_gscat_mode }
408 #define EXEvexXNoBcst { OP_EX, evex_x_nobcst_mode }
409 #define MS { OP_MS, v_mode }
410 #define XS { OP_XS, v_mode }
411 #define EMCq { OP_EMC, q_mode }
412 #define MXC { OP_MXC, 0 }
413 #define OPSUF { OP_3DNowSuffix, 0 }
414 #define CMP { CMP_Fixup, 0 }
415 #define XMM0 { XMM_Fixup, 0 }
416 #define FXSAVE { FXSAVE_Fixup, 0 }
417 #define Vex_2src_1 { OP_Vex_2src_1, 0 }
418 #define Vex_2src_2 { OP_Vex_2src_2, 0 }
420 #define Vex { OP_VEX, vex_mode }
421 #define VexScalar { OP_VEX, vex_scalar_mode }
422 #define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode }
423 #define Vex128 { OP_VEX, vex128_mode }
424 #define Vex256 { OP_VEX, vex256_mode }
425 #define VexGdq { OP_VEX, dq_mode }
426 #define EXdVexScalarS { OP_EX_Vex, d_scalar_swap_mode }
427 #define EXqVexScalarS { OP_EX_Vex, q_scalar_swap_mode }
428 #define EXVexW { OP_EX_VexW, x_mode }
429 #define EXdVexW { OP_EX_VexW, d_mode }
430 #define EXqVexW { OP_EX_VexW, q_mode }
431 #define EXVexImmW { OP_EX_VexImmW, x_mode }
432 #define XMVexScalar { OP_XMM_Vex, scalar_mode }
433 #define XMVexW { OP_XMM_VexW, 0 }
434 #define XMVexI4 { OP_REG_VexI4, x_mode }
435 #define PCLMUL { PCLMUL_Fixup, 0 }
436 #define VCMP { VCMP_Fixup, 0 }
437 #define VPCMP { VPCMP_Fixup, 0 }
438 #define VPCOM { VPCOM_Fixup, 0 }
440 #define EXxEVexR { OP_Rounding, evex_rounding_mode }
441 #define EXxEVexR64 { OP_Rounding, evex_rounding_64_mode }
442 #define EXxEVexS { OP_Rounding, evex_sae_mode }
444 #define XMask { OP_Mask, mask_mode }
445 #define MaskG { OP_G, mask_mode }
446 #define MaskE { OP_E, mask_mode }
447 #define MaskBDE { OP_E, mask_bd_mode }
448 #define MaskR { OP_R, mask_mode }
449 #define MaskVex { OP_VEX, mask_mode }
451 #define MVexVSIBDWpX { OP_M, vex_vsib_d_w_dq_mode }
452 #define MVexVSIBDQWpX { OP_M, vex_vsib_d_w_d_mode }
453 #define MVexVSIBQWpX { OP_M, vex_vsib_q_w_dq_mode }
454 #define MVexVSIBQDWpX { OP_M, vex_vsib_q_w_d_mode }
456 /* Used handle "rep" prefix for string instructions. */
457 #define Xbr { REP_Fixup, eSI_reg }
458 #define Xvr { REP_Fixup, eSI_reg }
459 #define Ybr { REP_Fixup, eDI_reg }
460 #define Yvr { REP_Fixup, eDI_reg }
461 #define Yzr { REP_Fixup, eDI_reg }
462 #define indirDXr { REP_Fixup, indir_dx_reg }
463 #define ALr { REP_Fixup, al_reg }
464 #define eAXr { REP_Fixup, eAX_reg }
466 /* Used handle HLE prefix for lockable instructions. */
467 #define Ebh1 { HLE_Fixup1, b_mode }
468 #define Evh1 { HLE_Fixup1, v_mode }
469 #define Ebh2 { HLE_Fixup2, b_mode }
470 #define Evh2 { HLE_Fixup2, v_mode }
471 #define Ebh3 { HLE_Fixup3, b_mode }
472 #define Evh3 { HLE_Fixup3, v_mode }
474 #define BND { BND_Fixup, 0 }
475 #define NOTRACK { NOTRACK_Fixup, 0 }
477 #define cond_jump_flag { NULL, cond_jump_mode }
478 #define loop_jcxz_flag { NULL, loop_jcxz_mode }
480 /* bits in sizeflag */
481 #define SUFFIX_ALWAYS 4
489 /* byte operand with operand swapped */
491 /* byte operand, sign extend like 'T' suffix */
493 /* operand size depends on prefixes */
495 /* operand size depends on prefixes with operand swapped */
497 /* operand size depends on address prefix */
501 /* double word operand */
503 /* double word operand with operand swapped */
505 /* quad word operand */
507 /* quad word operand with operand swapped */
509 /* ten-byte operand */
511 /* 16-byte XMM, 32-byte YMM or 64-byte ZMM operand. In EVEX with
512 broadcast enabled. */
514 /* Similar to x_mode, but with different EVEX mem shifts. */
516 /* Similar to x_mode, but with disabled broadcast. */
518 /* Similar to x_mode, but with operands swapped and disabled broadcast
521 /* 16-byte XMM operand */
523 /* XMM, XMM or YMM register operand, or quad word, xmmword or ymmword
524 memory operand (depending on vector length). Broadcast isn't
527 /* Same as xmmq_mode, but broadcast is allowed. */
528 evex_half_bcst_xmmq_mode
,
529 /* XMM register or byte memory operand */
531 /* XMM register or word memory operand */
533 /* XMM register or double word memory operand */
535 /* XMM register or quad word memory operand */
537 /* XMM register or double/quad word memory operand, depending on
540 /* 16-byte XMM, word, double word or quad word operand. */
542 /* 16-byte XMM, double word, quad word operand or xmm word operand. */
544 /* 32-byte YMM operand */
546 /* quad word, ymmword or zmmword memory operand. */
548 /* 32-byte YMM or 16-byte word operand */
550 /* d_mode in 32bit, q_mode in 64bit mode. */
552 /* pair of v_mode operands */
557 /* like v_bnd_mode in 32bit, no RIP-rel in 64bit mode. */
559 /* operand size depends on REX prefixes. */
561 /* registers like dq_mode, memory like w_mode. */
565 /* bounds operand with operand swapped */
567 /* 4- or 6-byte pointer operand */
570 /* v_mode for indirect branch opcodes. */
572 /* v_mode for stack-related opcodes. */
574 /* non-quad operand size depends on prefixes */
576 /* 16-byte operand */
578 /* registers like dq_mode, memory like b_mode. */
580 /* registers like d_mode, memory like b_mode. */
582 /* registers like d_mode, memory like w_mode. */
584 /* registers like dq_mode, memory like d_mode. */
586 /* normal vex mode */
588 /* 128bit vex mode */
590 /* 256bit vex mode */
592 /* operand size depends on the VEX.W bit. */
595 /* Similar to vex_w_dq_mode, with VSIB dword indices. */
596 vex_vsib_d_w_dq_mode
,
597 /* Similar to vex_vsib_d_w_dq_mode, with smaller memory. */
599 /* Similar to vex_w_dq_mode, with VSIB qword indices. */
600 vex_vsib_q_w_dq_mode
,
601 /* Similar to vex_vsib_q_w_dq_mode, with smaller memory. */
604 /* scalar, ignore vector length. */
606 /* like b_mode, ignore vector length. */
608 /* like w_mode, ignore vector length. */
610 /* like d_mode, ignore vector length. */
612 /* like d_swap_mode, ignore vector length. */
614 /* like q_mode, ignore vector length. */
616 /* like q_swap_mode, ignore vector length. */
618 /* like vex_mode, ignore vector length. */
620 /* like vex_w_dq_mode, ignore vector length. */
621 vex_scalar_w_dq_mode
,
623 /* Static rounding. */
625 /* Static rounding, 64-bit mode only. */
626 evex_rounding_64_mode
,
627 /* Supress all exceptions. */
630 /* Mask register operand. */
632 /* Mask register operand. */
700 #define FLOAT NULL, { { NULL, FLOATCODE } }, 0
702 #define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }, 0
703 #define DIS386_PREFIX(T, I, P) NULL, { { NULL, (T)}, { NULL, (I) } }, P
704 #define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
705 #define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
706 #define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
707 #define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
708 #define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
709 #define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
710 #define THREE_BYTE_TABLE_PREFIX(I, P) DIS386_PREFIX (USE_3BYTE_TABLE, (I), P)
711 #define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
712 #define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
713 #define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
714 #define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
715 #define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
716 #define EVEX_TABLE(I) DIS386 (USE_EVEX_TABLE, (I))
717 #define EVEX_LEN_TABLE(I) DIS386 (USE_EVEX_LEN_TABLE, (I))
845 MOD_VEX_0F12_PREFIX_0
,
847 MOD_VEX_0F16_PREFIX_0
,
850 MOD_VEX_W_0_0F41_P_0_LEN_1
,
851 MOD_VEX_W_1_0F41_P_0_LEN_1
,
852 MOD_VEX_W_0_0F41_P_2_LEN_1
,
853 MOD_VEX_W_1_0F41_P_2_LEN_1
,
854 MOD_VEX_W_0_0F42_P_0_LEN_1
,
855 MOD_VEX_W_1_0F42_P_0_LEN_1
,
856 MOD_VEX_W_0_0F42_P_2_LEN_1
,
857 MOD_VEX_W_1_0F42_P_2_LEN_1
,
858 MOD_VEX_W_0_0F44_P_0_LEN_1
,
859 MOD_VEX_W_1_0F44_P_0_LEN_1
,
860 MOD_VEX_W_0_0F44_P_2_LEN_1
,
861 MOD_VEX_W_1_0F44_P_2_LEN_1
,
862 MOD_VEX_W_0_0F45_P_0_LEN_1
,
863 MOD_VEX_W_1_0F45_P_0_LEN_1
,
864 MOD_VEX_W_0_0F45_P_2_LEN_1
,
865 MOD_VEX_W_1_0F45_P_2_LEN_1
,
866 MOD_VEX_W_0_0F46_P_0_LEN_1
,
867 MOD_VEX_W_1_0F46_P_0_LEN_1
,
868 MOD_VEX_W_0_0F46_P_2_LEN_1
,
869 MOD_VEX_W_1_0F46_P_2_LEN_1
,
870 MOD_VEX_W_0_0F47_P_0_LEN_1
,
871 MOD_VEX_W_1_0F47_P_0_LEN_1
,
872 MOD_VEX_W_0_0F47_P_2_LEN_1
,
873 MOD_VEX_W_1_0F47_P_2_LEN_1
,
874 MOD_VEX_W_0_0F4A_P_0_LEN_1
,
875 MOD_VEX_W_1_0F4A_P_0_LEN_1
,
876 MOD_VEX_W_0_0F4A_P_2_LEN_1
,
877 MOD_VEX_W_1_0F4A_P_2_LEN_1
,
878 MOD_VEX_W_0_0F4B_P_0_LEN_1
,
879 MOD_VEX_W_1_0F4B_P_0_LEN_1
,
880 MOD_VEX_W_0_0F4B_P_2_LEN_1
,
892 MOD_VEX_W_0_0F91_P_0_LEN_0
,
893 MOD_VEX_W_1_0F91_P_0_LEN_0
,
894 MOD_VEX_W_0_0F91_P_2_LEN_0
,
895 MOD_VEX_W_1_0F91_P_2_LEN_0
,
896 MOD_VEX_W_0_0F92_P_0_LEN_0
,
897 MOD_VEX_W_0_0F92_P_2_LEN_0
,
898 MOD_VEX_0F92_P_3_LEN_0
,
899 MOD_VEX_W_0_0F93_P_0_LEN_0
,
900 MOD_VEX_W_0_0F93_P_2_LEN_0
,
901 MOD_VEX_0F93_P_3_LEN_0
,
902 MOD_VEX_W_0_0F98_P_0_LEN_0
,
903 MOD_VEX_W_1_0F98_P_0_LEN_0
,
904 MOD_VEX_W_0_0F98_P_2_LEN_0
,
905 MOD_VEX_W_1_0F98_P_2_LEN_0
,
906 MOD_VEX_W_0_0F99_P_0_LEN_0
,
907 MOD_VEX_W_1_0F99_P_0_LEN_0
,
908 MOD_VEX_W_0_0F99_P_2_LEN_0
,
909 MOD_VEX_W_1_0F99_P_2_LEN_0
,
912 MOD_VEX_0FD7_PREFIX_2
,
913 MOD_VEX_0FE7_PREFIX_2
,
914 MOD_VEX_0FF0_PREFIX_3
,
915 MOD_VEX_0F381A_PREFIX_2
,
916 MOD_VEX_0F382A_PREFIX_2
,
917 MOD_VEX_0F382C_PREFIX_2
,
918 MOD_VEX_0F382D_PREFIX_2
,
919 MOD_VEX_0F382E_PREFIX_2
,
920 MOD_VEX_0F382F_PREFIX_2
,
921 MOD_VEX_0F385A_PREFIX_2
,
922 MOD_VEX_0F388C_PREFIX_2
,
923 MOD_VEX_0F388E_PREFIX_2
,
924 MOD_VEX_W_0_0F3A30_P_2_LEN_0
,
925 MOD_VEX_W_1_0F3A30_P_2_LEN_0
,
926 MOD_VEX_W_0_0F3A31_P_2_LEN_0
,
927 MOD_VEX_W_1_0F3A31_P_2_LEN_0
,
928 MOD_VEX_W_0_0F3A32_P_2_LEN_0
,
929 MOD_VEX_W_1_0F3A32_P_2_LEN_0
,
930 MOD_VEX_W_0_0F3A33_P_2_LEN_0
,
931 MOD_VEX_W_1_0F3A33_P_2_LEN_0
,
933 MOD_EVEX_0F12_PREFIX_0
,
934 MOD_EVEX_0F16_PREFIX_0
,
935 MOD_EVEX_0F38C6_REG_1
,
936 MOD_EVEX_0F38C6_REG_2
,
937 MOD_EVEX_0F38C6_REG_5
,
938 MOD_EVEX_0F38C6_REG_6
,
939 MOD_EVEX_0F38C7_REG_1
,
940 MOD_EVEX_0F38C7_REG_2
,
941 MOD_EVEX_0F38C7_REG_5
,
942 MOD_EVEX_0F38C7_REG_6
955 RM_0F1E_P_1_MOD_3_REG_7
,
956 RM_0FAE_REG_6_MOD_3_P_0
,
963 PREFIX_0F01_REG_5_MOD_0
,
964 PREFIX_0F01_REG_5_MOD_3_RM_0
,
965 PREFIX_0F01_REG_5_MOD_3_RM_2
,
966 PREFIX_0F01_REG_7_MOD_3_RM_2
,
967 PREFIX_0F01_REG_7_MOD_3_RM_3
,
1009 PREFIX_0FAE_REG_0_MOD_3
,
1010 PREFIX_0FAE_REG_1_MOD_3
,
1011 PREFIX_0FAE_REG_2_MOD_3
,
1012 PREFIX_0FAE_REG_3_MOD_3
,
1013 PREFIX_0FAE_REG_4_MOD_0
,
1014 PREFIX_0FAE_REG_4_MOD_3
,
1015 PREFIX_0FAE_REG_5_MOD_0
,
1016 PREFIX_0FAE_REG_5_MOD_3
,
1017 PREFIX_0FAE_REG_6_MOD_0
,
1018 PREFIX_0FAE_REG_6_MOD_3
,
1019 PREFIX_0FAE_REG_7_MOD_0
,
1025 PREFIX_0FC7_REG_6_MOD_0
,
1026 PREFIX_0FC7_REG_6_MOD_3
,
1027 PREFIX_0FC7_REG_7_MOD_3
,
1157 PREFIX_VEX_0F71_REG_2
,
1158 PREFIX_VEX_0F71_REG_4
,
1159 PREFIX_VEX_0F71_REG_6
,
1160 PREFIX_VEX_0F72_REG_2
,
1161 PREFIX_VEX_0F72_REG_4
,
1162 PREFIX_VEX_0F72_REG_6
,
1163 PREFIX_VEX_0F73_REG_2
,
1164 PREFIX_VEX_0F73_REG_3
,
1165 PREFIX_VEX_0F73_REG_6
,
1166 PREFIX_VEX_0F73_REG_7
,
1339 PREFIX_VEX_0F38F3_REG_1
,
1340 PREFIX_VEX_0F38F3_REG_2
,
1341 PREFIX_VEX_0F38F3_REG_3
,
1460 PREFIX_EVEX_0F71_REG_2
,
1461 PREFIX_EVEX_0F71_REG_4
,
1462 PREFIX_EVEX_0F71_REG_6
,
1463 PREFIX_EVEX_0F72_REG_0
,
1464 PREFIX_EVEX_0F72_REG_1
,
1465 PREFIX_EVEX_0F72_REG_2
,
1466 PREFIX_EVEX_0F72_REG_4
,
1467 PREFIX_EVEX_0F72_REG_6
,
1468 PREFIX_EVEX_0F73_REG_2
,
1469 PREFIX_EVEX_0F73_REG_3
,
1470 PREFIX_EVEX_0F73_REG_6
,
1471 PREFIX_EVEX_0F73_REG_7
,
1668 PREFIX_EVEX_0F38C6_REG_1
,
1669 PREFIX_EVEX_0F38C6_REG_2
,
1670 PREFIX_EVEX_0F38C6_REG_5
,
1671 PREFIX_EVEX_0F38C6_REG_6
,
1672 PREFIX_EVEX_0F38C7_REG_1
,
1673 PREFIX_EVEX_0F38C7_REG_2
,
1674 PREFIX_EVEX_0F38C7_REG_5
,
1675 PREFIX_EVEX_0F38C7_REG_6
,
1777 THREE_BYTE_0F38
= 0,
1804 VEX_LEN_0F12_P_0_M_0
= 0,
1805 VEX_LEN_0F12_P_0_M_1
,
1808 VEX_LEN_0F16_P_0_M_0
,
1809 VEX_LEN_0F16_P_0_M_1
,
1846 VEX_LEN_0FAE_R_2_M_0
,
1847 VEX_LEN_0FAE_R_3_M_0
,
1854 VEX_LEN_0F381A_P_2_M_0
,
1857 VEX_LEN_0F385A_P_2_M_0
,
1860 VEX_LEN_0F38F3_R_1_P_0
,
1861 VEX_LEN_0F38F3_R_2_P_0
,
1862 VEX_LEN_0F38F3_R_3_P_0
,
1905 VEX_LEN_0FXOP_08_CC
,
1906 VEX_LEN_0FXOP_08_CD
,
1907 VEX_LEN_0FXOP_08_CE
,
1908 VEX_LEN_0FXOP_08_CF
,
1909 VEX_LEN_0FXOP_08_EC
,
1910 VEX_LEN_0FXOP_08_ED
,
1911 VEX_LEN_0FXOP_08_EE
,
1912 VEX_LEN_0FXOP_08_EF
,
1913 VEX_LEN_0FXOP_09_80
,
1919 EVEX_LEN_0F6E_P_2
= 0,
1923 EVEX_LEN_0F3819_P_2_W_0
,
1924 EVEX_LEN_0F3819_P_2_W_1
,
1925 EVEX_LEN_0F381A_P_2_W_0
,
1926 EVEX_LEN_0F381A_P_2_W_1
,
1927 EVEX_LEN_0F381B_P_2_W_0
,
1928 EVEX_LEN_0F381B_P_2_W_1
,
1929 EVEX_LEN_0F385A_P_2_W_0
,
1930 EVEX_LEN_0F385A_P_2_W_1
,
1931 EVEX_LEN_0F385B_P_2_W_0
,
1932 EVEX_LEN_0F385B_P_2_W_1
,
1933 EVEX_LEN_0F38C6_REG_1_PREFIX_2
,
1934 EVEX_LEN_0F38C6_REG_2_PREFIX_2
,
1935 EVEX_LEN_0F38C6_REG_5_PREFIX_2
,
1936 EVEX_LEN_0F38C6_REG_6_PREFIX_2
,
1937 EVEX_LEN_0F38C7_R_1_P_2_W_0
,
1938 EVEX_LEN_0F38C7_R_1_P_2_W_1
,
1939 EVEX_LEN_0F38C7_R_2_P_2_W_0
,
1940 EVEX_LEN_0F38C7_R_2_P_2_W_1
,
1941 EVEX_LEN_0F38C7_R_5_P_2_W_0
,
1942 EVEX_LEN_0F38C7_R_5_P_2_W_1
,
1943 EVEX_LEN_0F38C7_R_6_P_2_W_0
,
1944 EVEX_LEN_0F38C7_R_6_P_2_W_1
,
1945 EVEX_LEN_0F3A18_P_2_W_0
,
1946 EVEX_LEN_0F3A18_P_2_W_1
,
1947 EVEX_LEN_0F3A19_P_2_W_0
,
1948 EVEX_LEN_0F3A19_P_2_W_1
,
1949 EVEX_LEN_0F3A1A_P_2_W_0
,
1950 EVEX_LEN_0F3A1A_P_2_W_1
,
1951 EVEX_LEN_0F3A1B_P_2_W_0
,
1952 EVEX_LEN_0F3A1B_P_2_W_1
,
1953 EVEX_LEN_0F3A23_P_2_W_0
,
1954 EVEX_LEN_0F3A23_P_2_W_1
,
1955 EVEX_LEN_0F3A38_P_2_W_0
,
1956 EVEX_LEN_0F3A38_P_2_W_1
,
1957 EVEX_LEN_0F3A39_P_2_W_0
,
1958 EVEX_LEN_0F3A39_P_2_W_1
,
1959 EVEX_LEN_0F3A3A_P_2_W_0
,
1960 EVEX_LEN_0F3A3A_P_2_W_1
,
1961 EVEX_LEN_0F3A3B_P_2_W_0
,
1962 EVEX_LEN_0F3A3B_P_2_W_1
,
1963 EVEX_LEN_0F3A43_P_2_W_0
,
1964 EVEX_LEN_0F3A43_P_2_W_1
1969 VEX_W_0F41_P_0_LEN_1
= 0,
1970 VEX_W_0F41_P_2_LEN_1
,
1971 VEX_W_0F42_P_0_LEN_1
,
1972 VEX_W_0F42_P_2_LEN_1
,
1973 VEX_W_0F44_P_0_LEN_0
,
1974 VEX_W_0F44_P_2_LEN_0
,
1975 VEX_W_0F45_P_0_LEN_1
,
1976 VEX_W_0F45_P_2_LEN_1
,
1977 VEX_W_0F46_P_0_LEN_1
,
1978 VEX_W_0F46_P_2_LEN_1
,
1979 VEX_W_0F47_P_0_LEN_1
,
1980 VEX_W_0F47_P_2_LEN_1
,
1981 VEX_W_0F4A_P_0_LEN_1
,
1982 VEX_W_0F4A_P_2_LEN_1
,
1983 VEX_W_0F4B_P_0_LEN_1
,
1984 VEX_W_0F4B_P_2_LEN_1
,
1985 VEX_W_0F90_P_0_LEN_0
,
1986 VEX_W_0F90_P_2_LEN_0
,
1987 VEX_W_0F91_P_0_LEN_0
,
1988 VEX_W_0F91_P_2_LEN_0
,
1989 VEX_W_0F92_P_0_LEN_0
,
1990 VEX_W_0F92_P_2_LEN_0
,
1991 VEX_W_0F93_P_0_LEN_0
,
1992 VEX_W_0F93_P_2_LEN_0
,
1993 VEX_W_0F98_P_0_LEN_0
,
1994 VEX_W_0F98_P_2_LEN_0
,
1995 VEX_W_0F99_P_0_LEN_0
,
1996 VEX_W_0F99_P_2_LEN_0
,
2004 VEX_W_0F381A_P_2_M_0
,
2005 VEX_W_0F382C_P_2_M_0
,
2006 VEX_W_0F382D_P_2_M_0
,
2007 VEX_W_0F382E_P_2_M_0
,
2008 VEX_W_0F382F_P_2_M_0
,
2013 VEX_W_0F385A_P_2_M_0
,
2025 VEX_W_0F3A30_P_2_LEN_0
,
2026 VEX_W_0F3A31_P_2_LEN_0
,
2027 VEX_W_0F3A32_P_2_LEN_0
,
2028 VEX_W_0F3A33_P_2_LEN_0
,
2048 EVEX_W_0F12_P_0_M_0
,
2049 EVEX_W_0F12_P_0_M_1
,
2059 EVEX_W_0F16_P_0_M_0
,
2060 EVEX_W_0F16_P_0_M_1
,
2129 EVEX_W_0F72_R_2_P_2
,
2130 EVEX_W_0F72_R_6_P_2
,
2131 EVEX_W_0F73_R_2_P_2
,
2132 EVEX_W_0F73_R_6_P_2
,
2242 EVEX_W_0F38C7_R_1_P_2
,
2243 EVEX_W_0F38C7_R_2_P_2
,
2244 EVEX_W_0F38C7_R_5_P_2
,
2245 EVEX_W_0F38C7_R_6_P_2
,
2284 typedef void (*op_rtn
) (int bytemode
, int sizeflag
);
2293 unsigned int prefix_requirement
;
2296 /* Upper case letters in the instruction names here are macros.
2297 'A' => print 'b' if no register operands or suffix_always is true
2298 'B' => print 'b' if suffix_always is true
2299 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
2301 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
2302 suffix_always is true
2303 'E' => print 'e' if 32-bit form of jcxz
2304 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
2305 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
2306 'H' => print ",pt" or ",pn" branch hint
2307 'I' => honor following macro letter even in Intel mode (implemented only
2308 for some of the macro letters)
2310 'K' => print 'd' or 'q' if rex prefix is present.
2311 'L' => print 'l' if suffix_always is true
2312 'M' => print 'r' if intel_mnemonic is false.
2313 'N' => print 'n' if instruction has no wait "prefix"
2314 'O' => print 'd' or 'o' (or 'q' in Intel mode)
2315 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
2316 or suffix_always is true. print 'q' if rex prefix is present.
2317 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
2319 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
2320 'S' => print 'w', 'l' or 'q' if suffix_always is true
2321 'T' => print 'q' in 64bit mode if instruction has no operand size
2322 prefix and behave as 'P' otherwise
2323 'U' => print 'q' in 64bit mode if instruction has no operand size
2324 prefix and behave as 'Q' otherwise
2325 'V' => print 'q' in 64bit mode if instruction has no operand size
2326 prefix and behave as 'S' otherwise
2327 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
2328 'X' => print 's', 'd' depending on data16 prefix (for XMM)
2330 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
2331 '!' => change condition from true to false or from false to true.
2332 '%' => add 1 upper case letter to the macro.
2333 '^' => print 'w' or 'l' depending on operand size prefix or
2334 suffix_always is true (lcall/ljmp).
2335 '@' => print 'q' for Intel64 ISA, 'w' or 'q' for AMD64 ISA depending
2336 on operand size prefix.
2337 '&' => print 'q' in 64bit mode for Intel64 ISA or if instruction
2338 has no operand size prefix for AMD64 ISA, behave as 'P'
2341 2 upper case letter macros:
2342 "XY" => print 'x' or 'y' if suffix_always is true or no register
2343 operands and no broadcast.
2344 "XZ" => print 'x', 'y', or 'z' if suffix_always is true or no
2345 register operands and no broadcast.
2346 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
2347 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
2348 or suffix_always is true
2349 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
2350 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
2351 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
2352 "LW" => print 'd', 'q' depending on the VEX.W bit
2353 "LP" => print 'w' or 'l' ('d' in Intel mode) if instruction has
2354 an operand size prefix, or suffix_always is true. print
2355 'q' if rex prefix is present.
2357 Many of the above letters print nothing in Intel mode. See "putop"
2360 Braces '{' and '}', and vertical bars '|', indicate alternative
2361 mnemonic strings for AT&T and Intel. */
2363 static const struct dis386 dis386
[] = {
2365 { "addB", { Ebh1
, Gb
}, 0 },
2366 { "addS", { Evh1
, Gv
}, 0 },
2367 { "addB", { Gb
, EbS
}, 0 },
2368 { "addS", { Gv
, EvS
}, 0 },
2369 { "addB", { AL
, Ib
}, 0 },
2370 { "addS", { eAX
, Iv
}, 0 },
2371 { X86_64_TABLE (X86_64_06
) },
2372 { X86_64_TABLE (X86_64_07
) },
2374 { "orB", { Ebh1
, Gb
}, 0 },
2375 { "orS", { Evh1
, Gv
}, 0 },
2376 { "orB", { Gb
, EbS
}, 0 },
2377 { "orS", { Gv
, EvS
}, 0 },
2378 { "orB", { AL
, Ib
}, 0 },
2379 { "orS", { eAX
, Iv
}, 0 },
2380 { X86_64_TABLE (X86_64_0D
) },
2381 { Bad_Opcode
}, /* 0x0f extended opcode escape */
2383 { "adcB", { Ebh1
, Gb
}, 0 },
2384 { "adcS", { Evh1
, Gv
}, 0 },
2385 { "adcB", { Gb
, EbS
}, 0 },
2386 { "adcS", { Gv
, EvS
}, 0 },
2387 { "adcB", { AL
, Ib
}, 0 },
2388 { "adcS", { eAX
, Iv
}, 0 },
2389 { X86_64_TABLE (X86_64_16
) },
2390 { X86_64_TABLE (X86_64_17
) },
2392 { "sbbB", { Ebh1
, Gb
}, 0 },
2393 { "sbbS", { Evh1
, Gv
}, 0 },
2394 { "sbbB", { Gb
, EbS
}, 0 },
2395 { "sbbS", { Gv
, EvS
}, 0 },
2396 { "sbbB", { AL
, Ib
}, 0 },
2397 { "sbbS", { eAX
, Iv
}, 0 },
2398 { X86_64_TABLE (X86_64_1E
) },
2399 { X86_64_TABLE (X86_64_1F
) },
2401 { "andB", { Ebh1
, Gb
}, 0 },
2402 { "andS", { Evh1
, Gv
}, 0 },
2403 { "andB", { Gb
, EbS
}, 0 },
2404 { "andS", { Gv
, EvS
}, 0 },
2405 { "andB", { AL
, Ib
}, 0 },
2406 { "andS", { eAX
, Iv
}, 0 },
2407 { Bad_Opcode
}, /* SEG ES prefix */
2408 { X86_64_TABLE (X86_64_27
) },
2410 { "subB", { Ebh1
, Gb
}, 0 },
2411 { "subS", { Evh1
, Gv
}, 0 },
2412 { "subB", { Gb
, EbS
}, 0 },
2413 { "subS", { Gv
, EvS
}, 0 },
2414 { "subB", { AL
, Ib
}, 0 },
2415 { "subS", { eAX
, Iv
}, 0 },
2416 { Bad_Opcode
}, /* SEG CS prefix */
2417 { X86_64_TABLE (X86_64_2F
) },
2419 { "xorB", { Ebh1
, Gb
}, 0 },
2420 { "xorS", { Evh1
, Gv
}, 0 },
2421 { "xorB", { Gb
, EbS
}, 0 },
2422 { "xorS", { Gv
, EvS
}, 0 },
2423 { "xorB", { AL
, Ib
}, 0 },
2424 { "xorS", { eAX
, Iv
}, 0 },
2425 { Bad_Opcode
}, /* SEG SS prefix */
2426 { X86_64_TABLE (X86_64_37
) },
2428 { "cmpB", { Eb
, Gb
}, 0 },
2429 { "cmpS", { Ev
, Gv
}, 0 },
2430 { "cmpB", { Gb
, EbS
}, 0 },
2431 { "cmpS", { Gv
, EvS
}, 0 },
2432 { "cmpB", { AL
, Ib
}, 0 },
2433 { "cmpS", { eAX
, Iv
}, 0 },
2434 { Bad_Opcode
}, /* SEG DS prefix */
2435 { X86_64_TABLE (X86_64_3F
) },
2437 { "inc{S|}", { RMeAX
}, 0 },
2438 { "inc{S|}", { RMeCX
}, 0 },
2439 { "inc{S|}", { RMeDX
}, 0 },
2440 { "inc{S|}", { RMeBX
}, 0 },
2441 { "inc{S|}", { RMeSP
}, 0 },
2442 { "inc{S|}", { RMeBP
}, 0 },
2443 { "inc{S|}", { RMeSI
}, 0 },
2444 { "inc{S|}", { RMeDI
}, 0 },
2446 { "dec{S|}", { RMeAX
}, 0 },
2447 { "dec{S|}", { RMeCX
}, 0 },
2448 { "dec{S|}", { RMeDX
}, 0 },
2449 { "dec{S|}", { RMeBX
}, 0 },
2450 { "dec{S|}", { RMeSP
}, 0 },
2451 { "dec{S|}", { RMeBP
}, 0 },
2452 { "dec{S|}", { RMeSI
}, 0 },
2453 { "dec{S|}", { RMeDI
}, 0 },
2455 { "pushV", { RMrAX
}, 0 },
2456 { "pushV", { RMrCX
}, 0 },
2457 { "pushV", { RMrDX
}, 0 },
2458 { "pushV", { RMrBX
}, 0 },
2459 { "pushV", { RMrSP
}, 0 },
2460 { "pushV", { RMrBP
}, 0 },
2461 { "pushV", { RMrSI
}, 0 },
2462 { "pushV", { RMrDI
}, 0 },
2464 { "popV", { RMrAX
}, 0 },
2465 { "popV", { RMrCX
}, 0 },
2466 { "popV", { RMrDX
}, 0 },
2467 { "popV", { RMrBX
}, 0 },
2468 { "popV", { RMrSP
}, 0 },
2469 { "popV", { RMrBP
}, 0 },
2470 { "popV", { RMrSI
}, 0 },
2471 { "popV", { RMrDI
}, 0 },
2473 { X86_64_TABLE (X86_64_60
) },
2474 { X86_64_TABLE (X86_64_61
) },
2475 { X86_64_TABLE (X86_64_62
) },
2476 { X86_64_TABLE (X86_64_63
) },
2477 { Bad_Opcode
}, /* seg fs */
2478 { Bad_Opcode
}, /* seg gs */
2479 { Bad_Opcode
}, /* op size prefix */
2480 { Bad_Opcode
}, /* adr size prefix */
2482 { "pushT", { sIv
}, 0 },
2483 { "imulS", { Gv
, Ev
, Iv
}, 0 },
2484 { "pushT", { sIbT
}, 0 },
2485 { "imulS", { Gv
, Ev
, sIb
}, 0 },
2486 { "ins{b|}", { Ybr
, indirDX
}, 0 },
2487 { X86_64_TABLE (X86_64_6D
) },
2488 { "outs{b|}", { indirDXr
, Xb
}, 0 },
2489 { X86_64_TABLE (X86_64_6F
) },
2491 { "joH", { Jb
, BND
, cond_jump_flag
}, 0 },
2492 { "jnoH", { Jb
, BND
, cond_jump_flag
}, 0 },
2493 { "jbH", { Jb
, BND
, cond_jump_flag
}, 0 },
2494 { "jaeH", { Jb
, BND
, cond_jump_flag
}, 0 },
2495 { "jeH", { Jb
, BND
, cond_jump_flag
}, 0 },
2496 { "jneH", { Jb
, BND
, cond_jump_flag
}, 0 },
2497 { "jbeH", { Jb
, BND
, cond_jump_flag
}, 0 },
2498 { "jaH", { Jb
, BND
, cond_jump_flag
}, 0 },
2500 { "jsH", { Jb
, BND
, cond_jump_flag
}, 0 },
2501 { "jnsH", { Jb
, BND
, cond_jump_flag
}, 0 },
2502 { "jpH", { Jb
, BND
, cond_jump_flag
}, 0 },
2503 { "jnpH", { Jb
, BND
, cond_jump_flag
}, 0 },
2504 { "jlH", { Jb
, BND
, cond_jump_flag
}, 0 },
2505 { "jgeH", { Jb
, BND
, cond_jump_flag
}, 0 },
2506 { "jleH", { Jb
, BND
, cond_jump_flag
}, 0 },
2507 { "jgH", { Jb
, BND
, cond_jump_flag
}, 0 },
2509 { REG_TABLE (REG_80
) },
2510 { REG_TABLE (REG_81
) },
2511 { X86_64_TABLE (X86_64_82
) },
2512 { REG_TABLE (REG_83
) },
2513 { "testB", { Eb
, Gb
}, 0 },
2514 { "testS", { Ev
, Gv
}, 0 },
2515 { "xchgB", { Ebh2
, Gb
}, 0 },
2516 { "xchgS", { Evh2
, Gv
}, 0 },
2518 { "movB", { Ebh3
, Gb
}, 0 },
2519 { "movS", { Evh3
, Gv
}, 0 },
2520 { "movB", { Gb
, EbS
}, 0 },
2521 { "movS", { Gv
, EvS
}, 0 },
2522 { "movD", { Sv
, Sw
}, 0 },
2523 { MOD_TABLE (MOD_8D
) },
2524 { "movD", { Sw
, Sv
}, 0 },
2525 { REG_TABLE (REG_8F
) },
2527 { PREFIX_TABLE (PREFIX_90
) },
2528 { "xchgS", { RMeCX
, eAX
}, 0 },
2529 { "xchgS", { RMeDX
, eAX
}, 0 },
2530 { "xchgS", { RMeBX
, eAX
}, 0 },
2531 { "xchgS", { RMeSP
, eAX
}, 0 },
2532 { "xchgS", { RMeBP
, eAX
}, 0 },
2533 { "xchgS", { RMeSI
, eAX
}, 0 },
2534 { "xchgS", { RMeDI
, eAX
}, 0 },
2536 { "cW{t|}R", { XX
}, 0 },
2537 { "cR{t|}O", { XX
}, 0 },
2538 { X86_64_TABLE (X86_64_9A
) },
2539 { Bad_Opcode
}, /* fwait */
2540 { "pushfT", { XX
}, 0 },
2541 { "popfT", { XX
}, 0 },
2542 { "sahf", { XX
}, 0 },
2543 { "lahf", { XX
}, 0 },
2545 { "mov%LB", { AL
, Ob
}, 0 },
2546 { "mov%LS", { eAX
, Ov
}, 0 },
2547 { "mov%LB", { Ob
, AL
}, 0 },
2548 { "mov%LS", { Ov
, eAX
}, 0 },
2549 { "movs{b|}", { Ybr
, Xb
}, 0 },
2550 { "movs{R|}", { Yvr
, Xv
}, 0 },
2551 { "cmps{b|}", { Xb
, Yb
}, 0 },
2552 { "cmps{R|}", { Xv
, Yv
}, 0 },
2554 { "testB", { AL
, Ib
}, 0 },
2555 { "testS", { eAX
, Iv
}, 0 },
2556 { "stosB", { Ybr
, AL
}, 0 },
2557 { "stosS", { Yvr
, eAX
}, 0 },
2558 { "lodsB", { ALr
, Xb
}, 0 },
2559 { "lodsS", { eAXr
, Xv
}, 0 },
2560 { "scasB", { AL
, Yb
}, 0 },
2561 { "scasS", { eAX
, Yv
}, 0 },
2563 { "movB", { RMAL
, Ib
}, 0 },
2564 { "movB", { RMCL
, Ib
}, 0 },
2565 { "movB", { RMDL
, Ib
}, 0 },
2566 { "movB", { RMBL
, Ib
}, 0 },
2567 { "movB", { RMAH
, Ib
}, 0 },
2568 { "movB", { RMCH
, Ib
}, 0 },
2569 { "movB", { RMDH
, Ib
}, 0 },
2570 { "movB", { RMBH
, Ib
}, 0 },
2572 { "mov%LV", { RMeAX
, Iv64
}, 0 },
2573 { "mov%LV", { RMeCX
, Iv64
}, 0 },
2574 { "mov%LV", { RMeDX
, Iv64
}, 0 },
2575 { "mov%LV", { RMeBX
, Iv64
}, 0 },
2576 { "mov%LV", { RMeSP
, Iv64
}, 0 },
2577 { "mov%LV", { RMeBP
, Iv64
}, 0 },
2578 { "mov%LV", { RMeSI
, Iv64
}, 0 },
2579 { "mov%LV", { RMeDI
, Iv64
}, 0 },
2581 { REG_TABLE (REG_C0
) },
2582 { REG_TABLE (REG_C1
) },
2583 { "retT", { Iw
, BND
}, 0 },
2584 { "retT", { BND
}, 0 },
2585 { X86_64_TABLE (X86_64_C4
) },
2586 { X86_64_TABLE (X86_64_C5
) },
2587 { REG_TABLE (REG_C6
) },
2588 { REG_TABLE (REG_C7
) },
2590 { "enterT", { Iw
, Ib
}, 0 },
2591 { "leaveT", { XX
}, 0 },
2592 { "Jret{|f}P", { Iw
}, 0 },
2593 { "Jret{|f}P", { XX
}, 0 },
2594 { "int3", { XX
}, 0 },
2595 { "int", { Ib
}, 0 },
2596 { X86_64_TABLE (X86_64_CE
) },
2597 { "iret%LP", { XX
}, 0 },
2599 { REG_TABLE (REG_D0
) },
2600 { REG_TABLE (REG_D1
) },
2601 { REG_TABLE (REG_D2
) },
2602 { REG_TABLE (REG_D3
) },
2603 { X86_64_TABLE (X86_64_D4
) },
2604 { X86_64_TABLE (X86_64_D5
) },
2606 { "xlat", { DSBX
}, 0 },
2617 { "loopneFH", { Jb
, XX
, loop_jcxz_flag
}, 0 },
2618 { "loopeFH", { Jb
, XX
, loop_jcxz_flag
}, 0 },
2619 { "loopFH", { Jb
, XX
, loop_jcxz_flag
}, 0 },
2620 { "jEcxzH", { Jb
, XX
, loop_jcxz_flag
}, 0 },
2621 { "inB", { AL
, Ib
}, 0 },
2622 { "inG", { zAX
, Ib
}, 0 },
2623 { "outB", { Ib
, AL
}, 0 },
2624 { "outG", { Ib
, zAX
}, 0 },
2626 { X86_64_TABLE (X86_64_E8
) },
2627 { X86_64_TABLE (X86_64_E9
) },
2628 { X86_64_TABLE (X86_64_EA
) },
2629 { "jmp", { Jb
, BND
}, 0 },
2630 { "inB", { AL
, indirDX
}, 0 },
2631 { "inG", { zAX
, indirDX
}, 0 },
2632 { "outB", { indirDX
, AL
}, 0 },
2633 { "outG", { indirDX
, zAX
}, 0 },
2635 { Bad_Opcode
}, /* lock prefix */
2636 { "icebp", { XX
}, 0 },
2637 { Bad_Opcode
}, /* repne */
2638 { Bad_Opcode
}, /* repz */
2639 { "hlt", { XX
}, 0 },
2640 { "cmc", { XX
}, 0 },
2641 { REG_TABLE (REG_F6
) },
2642 { REG_TABLE (REG_F7
) },
2644 { "clc", { XX
}, 0 },
2645 { "stc", { XX
}, 0 },
2646 { "cli", { XX
}, 0 },
2647 { "sti", { XX
}, 0 },
2648 { "cld", { XX
}, 0 },
2649 { "std", { XX
}, 0 },
2650 { REG_TABLE (REG_FE
) },
2651 { REG_TABLE (REG_FF
) },
2654 static const struct dis386 dis386_twobyte
[] = {
2656 { REG_TABLE (REG_0F00
) },
2657 { REG_TABLE (REG_0F01
) },
2658 { "larS", { Gv
, Ew
}, 0 },
2659 { "lslS", { Gv
, Ew
}, 0 },
2661 { "syscall", { XX
}, 0 },
2662 { "clts", { XX
}, 0 },
2663 { "sysret%LP", { XX
}, 0 },
2665 { "invd", { XX
}, 0 },
2666 { PREFIX_TABLE (PREFIX_0F09
) },
2668 { "ud2", { XX
}, 0 },
2670 { REG_TABLE (REG_0F0D
) },
2671 { "femms", { XX
}, 0 },
2672 { "", { MX
, EM
, OPSUF
}, 0 }, /* See OP_3DNowSuffix. */
2674 { PREFIX_TABLE (PREFIX_0F10
) },
2675 { PREFIX_TABLE (PREFIX_0F11
) },
2676 { PREFIX_TABLE (PREFIX_0F12
) },
2677 { MOD_TABLE (MOD_0F13
) },
2678 { "unpcklpX", { XM
, EXx
}, PREFIX_OPCODE
},
2679 { "unpckhpX", { XM
, EXx
}, PREFIX_OPCODE
},
2680 { PREFIX_TABLE (PREFIX_0F16
) },
2681 { MOD_TABLE (MOD_0F17
) },
2683 { REG_TABLE (REG_0F18
) },
2684 { "nopQ", { Ev
}, 0 },
2685 { PREFIX_TABLE (PREFIX_0F1A
) },
2686 { PREFIX_TABLE (PREFIX_0F1B
) },
2687 { PREFIX_TABLE (PREFIX_0F1C
) },
2688 { "nopQ", { Ev
}, 0 },
2689 { PREFIX_TABLE (PREFIX_0F1E
) },
2690 { "nopQ", { Ev
}, 0 },
2692 { "movZ", { Rm
, Cm
}, 0 },
2693 { "movZ", { Rm
, Dm
}, 0 },
2694 { "movZ", { Cm
, Rm
}, 0 },
2695 { "movZ", { Dm
, Rm
}, 0 },
2696 { MOD_TABLE (MOD_0F24
) },
2698 { MOD_TABLE (MOD_0F26
) },
2701 { "movapX", { XM
, EXx
}, PREFIX_OPCODE
},
2702 { "movapX", { EXxS
, XM
}, PREFIX_OPCODE
},
2703 { PREFIX_TABLE (PREFIX_0F2A
) },
2704 { PREFIX_TABLE (PREFIX_0F2B
) },
2705 { PREFIX_TABLE (PREFIX_0F2C
) },
2706 { PREFIX_TABLE (PREFIX_0F2D
) },
2707 { PREFIX_TABLE (PREFIX_0F2E
) },
2708 { PREFIX_TABLE (PREFIX_0F2F
) },
2710 { "wrmsr", { XX
}, 0 },
2711 { "rdtsc", { XX
}, 0 },
2712 { "rdmsr", { XX
}, 0 },
2713 { "rdpmc", { XX
}, 0 },
2714 { "sysenter", { XX
}, 0 },
2715 { "sysexit", { XX
}, 0 },
2717 { "getsec", { XX
}, 0 },
2719 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F38
, PREFIX_OPCODE
) },
2721 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F3A
, PREFIX_OPCODE
) },
2728 { "cmovoS", { Gv
, Ev
}, 0 },
2729 { "cmovnoS", { Gv
, Ev
}, 0 },
2730 { "cmovbS", { Gv
, Ev
}, 0 },
2731 { "cmovaeS", { Gv
, Ev
}, 0 },
2732 { "cmoveS", { Gv
, Ev
}, 0 },
2733 { "cmovneS", { Gv
, Ev
}, 0 },
2734 { "cmovbeS", { Gv
, Ev
}, 0 },
2735 { "cmovaS", { Gv
, Ev
}, 0 },
2737 { "cmovsS", { Gv
, Ev
}, 0 },
2738 { "cmovnsS", { Gv
, Ev
}, 0 },
2739 { "cmovpS", { Gv
, Ev
}, 0 },
2740 { "cmovnpS", { Gv
, Ev
}, 0 },
2741 { "cmovlS", { Gv
, Ev
}, 0 },
2742 { "cmovgeS", { Gv
, Ev
}, 0 },
2743 { "cmovleS", { Gv
, Ev
}, 0 },
2744 { "cmovgS", { Gv
, Ev
}, 0 },
2746 { MOD_TABLE (MOD_0F51
) },
2747 { PREFIX_TABLE (PREFIX_0F51
) },
2748 { PREFIX_TABLE (PREFIX_0F52
) },
2749 { PREFIX_TABLE (PREFIX_0F53
) },
2750 { "andpX", { XM
, EXx
}, PREFIX_OPCODE
},
2751 { "andnpX", { XM
, EXx
}, PREFIX_OPCODE
},
2752 { "orpX", { XM
, EXx
}, PREFIX_OPCODE
},
2753 { "xorpX", { XM
, EXx
}, PREFIX_OPCODE
},
2755 { PREFIX_TABLE (PREFIX_0F58
) },
2756 { PREFIX_TABLE (PREFIX_0F59
) },
2757 { PREFIX_TABLE (PREFIX_0F5A
) },
2758 { PREFIX_TABLE (PREFIX_0F5B
) },
2759 { PREFIX_TABLE (PREFIX_0F5C
) },
2760 { PREFIX_TABLE (PREFIX_0F5D
) },
2761 { PREFIX_TABLE (PREFIX_0F5E
) },
2762 { PREFIX_TABLE (PREFIX_0F5F
) },
2764 { PREFIX_TABLE (PREFIX_0F60
) },
2765 { PREFIX_TABLE (PREFIX_0F61
) },
2766 { PREFIX_TABLE (PREFIX_0F62
) },
2767 { "packsswb", { MX
, EM
}, PREFIX_OPCODE
},
2768 { "pcmpgtb", { MX
, EM
}, PREFIX_OPCODE
},
2769 { "pcmpgtw", { MX
, EM
}, PREFIX_OPCODE
},
2770 { "pcmpgtd", { MX
, EM
}, PREFIX_OPCODE
},
2771 { "packuswb", { MX
, EM
}, PREFIX_OPCODE
},
2773 { "punpckhbw", { MX
, EM
}, PREFIX_OPCODE
},
2774 { "punpckhwd", { MX
, EM
}, PREFIX_OPCODE
},
2775 { "punpckhdq", { MX
, EM
}, PREFIX_OPCODE
},
2776 { "packssdw", { MX
, EM
}, PREFIX_OPCODE
},
2777 { PREFIX_TABLE (PREFIX_0F6C
) },
2778 { PREFIX_TABLE (PREFIX_0F6D
) },
2779 { "movK", { MX
, Edq
}, PREFIX_OPCODE
},
2780 { PREFIX_TABLE (PREFIX_0F6F
) },
2782 { PREFIX_TABLE (PREFIX_0F70
) },
2783 { REG_TABLE (REG_0F71
) },
2784 { REG_TABLE (REG_0F72
) },
2785 { REG_TABLE (REG_0F73
) },
2786 { "pcmpeqb", { MX
, EM
}, PREFIX_OPCODE
},
2787 { "pcmpeqw", { MX
, EM
}, PREFIX_OPCODE
},
2788 { "pcmpeqd", { MX
, EM
}, PREFIX_OPCODE
},
2789 { "emms", { XX
}, PREFIX_OPCODE
},
2791 { PREFIX_TABLE (PREFIX_0F78
) },
2792 { PREFIX_TABLE (PREFIX_0F79
) },
2795 { PREFIX_TABLE (PREFIX_0F7C
) },
2796 { PREFIX_TABLE (PREFIX_0F7D
) },
2797 { PREFIX_TABLE (PREFIX_0F7E
) },
2798 { PREFIX_TABLE (PREFIX_0F7F
) },
2800 { "joH", { Jv
, BND
, cond_jump_flag
}, 0 },
2801 { "jnoH", { Jv
, BND
, cond_jump_flag
}, 0 },
2802 { "jbH", { Jv
, BND
, cond_jump_flag
}, 0 },
2803 { "jaeH", { Jv
, BND
, cond_jump_flag
}, 0 },
2804 { "jeH", { Jv
, BND
, cond_jump_flag
}, 0 },
2805 { "jneH", { Jv
, BND
, cond_jump_flag
}, 0 },
2806 { "jbeH", { Jv
, BND
, cond_jump_flag
}, 0 },
2807 { "jaH", { Jv
, BND
, cond_jump_flag
}, 0 },
2809 { "jsH", { Jv
, BND
, cond_jump_flag
}, 0 },
2810 { "jnsH", { Jv
, BND
, cond_jump_flag
}, 0 },
2811 { "jpH", { Jv
, BND
, cond_jump_flag
}, 0 },
2812 { "jnpH", { Jv
, BND
, cond_jump_flag
}, 0 },
2813 { "jlH", { Jv
, BND
, cond_jump_flag
}, 0 },
2814 { "jgeH", { Jv
, BND
, cond_jump_flag
}, 0 },
2815 { "jleH", { Jv
, BND
, cond_jump_flag
}, 0 },
2816 { "jgH", { Jv
, BND
, cond_jump_flag
}, 0 },
2818 { "seto", { Eb
}, 0 },
2819 { "setno", { Eb
}, 0 },
2820 { "setb", { Eb
}, 0 },
2821 { "setae", { Eb
}, 0 },
2822 { "sete", { Eb
}, 0 },
2823 { "setne", { Eb
}, 0 },
2824 { "setbe", { Eb
}, 0 },
2825 { "seta", { Eb
}, 0 },
2827 { "sets", { Eb
}, 0 },
2828 { "setns", { Eb
}, 0 },
2829 { "setp", { Eb
}, 0 },
2830 { "setnp", { Eb
}, 0 },
2831 { "setl", { Eb
}, 0 },
2832 { "setge", { Eb
}, 0 },
2833 { "setle", { Eb
}, 0 },
2834 { "setg", { Eb
}, 0 },
2836 { "pushT", { fs
}, 0 },
2837 { "popT", { fs
}, 0 },
2838 { "cpuid", { XX
}, 0 },
2839 { "btS", { Ev
, Gv
}, 0 },
2840 { "shldS", { Ev
, Gv
, Ib
}, 0 },
2841 { "shldS", { Ev
, Gv
, CL
}, 0 },
2842 { REG_TABLE (REG_0FA6
) },
2843 { REG_TABLE (REG_0FA7
) },
2845 { "pushT", { gs
}, 0 },
2846 { "popT", { gs
}, 0 },
2847 { "rsm", { XX
}, 0 },
2848 { "btsS", { Evh1
, Gv
}, 0 },
2849 { "shrdS", { Ev
, Gv
, Ib
}, 0 },
2850 { "shrdS", { Ev
, Gv
, CL
}, 0 },
2851 { REG_TABLE (REG_0FAE
) },
2852 { "imulS", { Gv
, Ev
}, 0 },
2854 { "cmpxchgB", { Ebh1
, Gb
}, 0 },
2855 { "cmpxchgS", { Evh1
, Gv
}, 0 },
2856 { MOD_TABLE (MOD_0FB2
) },
2857 { "btrS", { Evh1
, Gv
}, 0 },
2858 { MOD_TABLE (MOD_0FB4
) },
2859 { MOD_TABLE (MOD_0FB5
) },
2860 { "movz{bR|x}", { Gv
, Eb
}, 0 },
2861 { "movz{wR|x}", { Gv
, Ew
}, 0 }, /* yes, there really is movzww ! */
2863 { PREFIX_TABLE (PREFIX_0FB8
) },
2864 { "ud1S", { Gv
, Ev
}, 0 },
2865 { REG_TABLE (REG_0FBA
) },
2866 { "btcS", { Evh1
, Gv
}, 0 },
2867 { PREFIX_TABLE (PREFIX_0FBC
) },
2868 { PREFIX_TABLE (PREFIX_0FBD
) },
2869 { "movs{bR|x}", { Gv
, Eb
}, 0 },
2870 { "movs{wR|x}", { Gv
, Ew
}, 0 }, /* yes, there really is movsww ! */
2872 { "xaddB", { Ebh1
, Gb
}, 0 },
2873 { "xaddS", { Evh1
, Gv
}, 0 },
2874 { PREFIX_TABLE (PREFIX_0FC2
) },
2875 { MOD_TABLE (MOD_0FC3
) },
2876 { "pinsrw", { MX
, Edqw
, Ib
}, PREFIX_OPCODE
},
2877 { "pextrw", { Gdq
, MS
, Ib
}, PREFIX_OPCODE
},
2878 { "shufpX", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
2879 { REG_TABLE (REG_0FC7
) },
2881 { "bswap", { RMeAX
}, 0 },
2882 { "bswap", { RMeCX
}, 0 },
2883 { "bswap", { RMeDX
}, 0 },
2884 { "bswap", { RMeBX
}, 0 },
2885 { "bswap", { RMeSP
}, 0 },
2886 { "bswap", { RMeBP
}, 0 },
2887 { "bswap", { RMeSI
}, 0 },
2888 { "bswap", { RMeDI
}, 0 },
2890 { PREFIX_TABLE (PREFIX_0FD0
) },
2891 { "psrlw", { MX
, EM
}, PREFIX_OPCODE
},
2892 { "psrld", { MX
, EM
}, PREFIX_OPCODE
},
2893 { "psrlq", { MX
, EM
}, PREFIX_OPCODE
},
2894 { "paddq", { MX
, EM
}, PREFIX_OPCODE
},
2895 { "pmullw", { MX
, EM
}, PREFIX_OPCODE
},
2896 { PREFIX_TABLE (PREFIX_0FD6
) },
2897 { MOD_TABLE (MOD_0FD7
) },
2899 { "psubusb", { MX
, EM
}, PREFIX_OPCODE
},
2900 { "psubusw", { MX
, EM
}, PREFIX_OPCODE
},
2901 { "pminub", { MX
, EM
}, PREFIX_OPCODE
},
2902 { "pand", { MX
, EM
}, PREFIX_OPCODE
},
2903 { "paddusb", { MX
, EM
}, PREFIX_OPCODE
},
2904 { "paddusw", { MX
, EM
}, PREFIX_OPCODE
},
2905 { "pmaxub", { MX
, EM
}, PREFIX_OPCODE
},
2906 { "pandn", { MX
, EM
}, PREFIX_OPCODE
},
2908 { "pavgb", { MX
, EM
}, PREFIX_OPCODE
},
2909 { "psraw", { MX
, EM
}, PREFIX_OPCODE
},
2910 { "psrad", { MX
, EM
}, PREFIX_OPCODE
},
2911 { "pavgw", { MX
, EM
}, PREFIX_OPCODE
},
2912 { "pmulhuw", { MX
, EM
}, PREFIX_OPCODE
},
2913 { "pmulhw", { MX
, EM
}, PREFIX_OPCODE
},
2914 { PREFIX_TABLE (PREFIX_0FE6
) },
2915 { PREFIX_TABLE (PREFIX_0FE7
) },
2917 { "psubsb", { MX
, EM
}, PREFIX_OPCODE
},
2918 { "psubsw", { MX
, EM
}, PREFIX_OPCODE
},
2919 { "pminsw", { MX
, EM
}, PREFIX_OPCODE
},
2920 { "por", { MX
, EM
}, PREFIX_OPCODE
},
2921 { "paddsb", { MX
, EM
}, PREFIX_OPCODE
},
2922 { "paddsw", { MX
, EM
}, PREFIX_OPCODE
},
2923 { "pmaxsw", { MX
, EM
}, PREFIX_OPCODE
},
2924 { "pxor", { MX
, EM
}, PREFIX_OPCODE
},
2926 { PREFIX_TABLE (PREFIX_0FF0
) },
2927 { "psllw", { MX
, EM
}, PREFIX_OPCODE
},
2928 { "pslld", { MX
, EM
}, PREFIX_OPCODE
},
2929 { "psllq", { MX
, EM
}, PREFIX_OPCODE
},
2930 { "pmuludq", { MX
, EM
}, PREFIX_OPCODE
},
2931 { "pmaddwd", { MX
, EM
}, PREFIX_OPCODE
},
2932 { "psadbw", { MX
, EM
}, PREFIX_OPCODE
},
2933 { PREFIX_TABLE (PREFIX_0FF7
) },
2935 { "psubb", { MX
, EM
}, PREFIX_OPCODE
},
2936 { "psubw", { MX
, EM
}, PREFIX_OPCODE
},
2937 { "psubd", { MX
, EM
}, PREFIX_OPCODE
},
2938 { "psubq", { MX
, EM
}, PREFIX_OPCODE
},
2939 { "paddb", { MX
, EM
}, PREFIX_OPCODE
},
2940 { "paddw", { MX
, EM
}, PREFIX_OPCODE
},
2941 { "paddd", { MX
, EM
}, PREFIX_OPCODE
},
2942 { "ud0S", { Gv
, Ev
}, 0 },
2945 static const unsigned char onebyte_has_modrm
[256] = {
2946 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2947 /* ------------------------------- */
2948 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
2949 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
2950 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
2951 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
2952 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
2953 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
2954 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
2955 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
2956 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
2957 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
2958 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
2959 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
2960 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
2961 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
2962 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
2963 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
2964 /* ------------------------------- */
2965 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2968 static const unsigned char twobyte_has_modrm
[256] = {
2969 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2970 /* ------------------------------- */
2971 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
2972 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
2973 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
2974 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
2975 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
2976 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
2977 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
2978 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
2979 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
2980 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
2981 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
2982 /* b0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* bf */
2983 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
2984 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
2985 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
2986 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 /* ff */
2987 /* ------------------------------- */
2988 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
2991 static char obuf
[100];
2993 static char *mnemonicendp
;
2994 static char scratchbuf
[100];
2995 static unsigned char *start_codep
;
2996 static unsigned char *insn_codep
;
2997 static unsigned char *codep
;
2998 static unsigned char *end_codep
;
2999 static int last_lock_prefix
;
3000 static int last_repz_prefix
;
3001 static int last_repnz_prefix
;
3002 static int last_data_prefix
;
3003 static int last_addr_prefix
;
3004 static int last_rex_prefix
;
3005 static int last_seg_prefix
;
3006 static int fwait_prefix
;
3007 /* The active segment register prefix. */
3008 static int active_seg_prefix
;
3009 #define MAX_CODE_LENGTH 15
3010 /* We can up to 14 prefixes since the maximum instruction length is
3012 static int all_prefixes
[MAX_CODE_LENGTH
- 1];
3013 static disassemble_info
*the_info
;
3021 static unsigned char need_modrm
;
3031 int register_specifier
;
3038 int mask_register_specifier
;
3044 static unsigned char need_vex
;
3045 static unsigned char need_vex_reg
;
3046 static unsigned char vex_w_done
;
3054 /* If we are accessing mod/rm/reg without need_modrm set, then the
3055 values are stale. Hitting this abort likely indicates that you
3056 need to update onebyte_has_modrm or twobyte_has_modrm. */
3057 #define MODRM_CHECK if (!need_modrm) abort ()
3059 static const char **names64
;
3060 static const char **names32
;
3061 static const char **names16
;
3062 static const char **names8
;
3063 static const char **names8rex
;
3064 static const char **names_seg
;
3065 static const char *index64
;
3066 static const char *index32
;
3067 static const char **index16
;
3068 static const char **names_bnd
;
3070 static const char *intel_names64
[] = {
3071 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
3072 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
3074 static const char *intel_names32
[] = {
3075 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
3076 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
3078 static const char *intel_names16
[] = {
3079 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
3080 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
3082 static const char *intel_names8
[] = {
3083 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
3085 static const char *intel_names8rex
[] = {
3086 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
3087 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
3089 static const char *intel_names_seg
[] = {
3090 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
3092 static const char *intel_index64
= "riz";
3093 static const char *intel_index32
= "eiz";
3094 static const char *intel_index16
[] = {
3095 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
3098 static const char *att_names64
[] = {
3099 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
3100 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
3102 static const char *att_names32
[] = {
3103 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
3104 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
3106 static const char *att_names16
[] = {
3107 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
3108 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
3110 static const char *att_names8
[] = {
3111 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
3113 static const char *att_names8rex
[] = {
3114 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
3115 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
3117 static const char *att_names_seg
[] = {
3118 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
3120 static const char *att_index64
= "%riz";
3121 static const char *att_index32
= "%eiz";
3122 static const char *att_index16
[] = {
3123 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
3126 static const char **names_mm
;
3127 static const char *intel_names_mm
[] = {
3128 "mm0", "mm1", "mm2", "mm3",
3129 "mm4", "mm5", "mm6", "mm7"
3131 static const char *att_names_mm
[] = {
3132 "%mm0", "%mm1", "%mm2", "%mm3",
3133 "%mm4", "%mm5", "%mm6", "%mm7"
3136 static const char *intel_names_bnd
[] = {
3137 "bnd0", "bnd1", "bnd2", "bnd3"
3140 static const char *att_names_bnd
[] = {
3141 "%bnd0", "%bnd1", "%bnd2", "%bnd3"
3144 static const char **names_xmm
;
3145 static const char *intel_names_xmm
[] = {
3146 "xmm0", "xmm1", "xmm2", "xmm3",
3147 "xmm4", "xmm5", "xmm6", "xmm7",
3148 "xmm8", "xmm9", "xmm10", "xmm11",
3149 "xmm12", "xmm13", "xmm14", "xmm15",
3150 "xmm16", "xmm17", "xmm18", "xmm19",
3151 "xmm20", "xmm21", "xmm22", "xmm23",
3152 "xmm24", "xmm25", "xmm26", "xmm27",
3153 "xmm28", "xmm29", "xmm30", "xmm31"
3155 static const char *att_names_xmm
[] = {
3156 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
3157 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
3158 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
3159 "%xmm12", "%xmm13", "%xmm14", "%xmm15",
3160 "%xmm16", "%xmm17", "%xmm18", "%xmm19",
3161 "%xmm20", "%xmm21", "%xmm22", "%xmm23",
3162 "%xmm24", "%xmm25", "%xmm26", "%xmm27",
3163 "%xmm28", "%xmm29", "%xmm30", "%xmm31"
3166 static const char **names_ymm
;
3167 static const char *intel_names_ymm
[] = {
3168 "ymm0", "ymm1", "ymm2", "ymm3",
3169 "ymm4", "ymm5", "ymm6", "ymm7",
3170 "ymm8", "ymm9", "ymm10", "ymm11",
3171 "ymm12", "ymm13", "ymm14", "ymm15",
3172 "ymm16", "ymm17", "ymm18", "ymm19",
3173 "ymm20", "ymm21", "ymm22", "ymm23",
3174 "ymm24", "ymm25", "ymm26", "ymm27",
3175 "ymm28", "ymm29", "ymm30", "ymm31"
3177 static const char *att_names_ymm
[] = {
3178 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
3179 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
3180 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
3181 "%ymm12", "%ymm13", "%ymm14", "%ymm15",
3182 "%ymm16", "%ymm17", "%ymm18", "%ymm19",
3183 "%ymm20", "%ymm21", "%ymm22", "%ymm23",
3184 "%ymm24", "%ymm25", "%ymm26", "%ymm27",
3185 "%ymm28", "%ymm29", "%ymm30", "%ymm31"
3188 static const char **names_zmm
;
3189 static const char *intel_names_zmm
[] = {
3190 "zmm0", "zmm1", "zmm2", "zmm3",
3191 "zmm4", "zmm5", "zmm6", "zmm7",
3192 "zmm8", "zmm9", "zmm10", "zmm11",
3193 "zmm12", "zmm13", "zmm14", "zmm15",
3194 "zmm16", "zmm17", "zmm18", "zmm19",
3195 "zmm20", "zmm21", "zmm22", "zmm23",
3196 "zmm24", "zmm25", "zmm26", "zmm27",
3197 "zmm28", "zmm29", "zmm30", "zmm31"
3199 static const char *att_names_zmm
[] = {
3200 "%zmm0", "%zmm1", "%zmm2", "%zmm3",
3201 "%zmm4", "%zmm5", "%zmm6", "%zmm7",
3202 "%zmm8", "%zmm9", "%zmm10", "%zmm11",
3203 "%zmm12", "%zmm13", "%zmm14", "%zmm15",
3204 "%zmm16", "%zmm17", "%zmm18", "%zmm19",
3205 "%zmm20", "%zmm21", "%zmm22", "%zmm23",
3206 "%zmm24", "%zmm25", "%zmm26", "%zmm27",
3207 "%zmm28", "%zmm29", "%zmm30", "%zmm31"
3210 static const char **names_mask
;
3211 static const char *intel_names_mask
[] = {
3212 "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"
3214 static const char *att_names_mask
[] = {
3215 "%k0", "%k1", "%k2", "%k3", "%k4", "%k5", "%k6", "%k7"
3218 static const char *names_rounding
[] =
3226 static const struct dis386 reg_table
[][8] = {
3229 { "addA", { Ebh1
, Ib
}, 0 },
3230 { "orA", { Ebh1
, Ib
}, 0 },
3231 { "adcA", { Ebh1
, Ib
}, 0 },
3232 { "sbbA", { Ebh1
, Ib
}, 0 },
3233 { "andA", { Ebh1
, Ib
}, 0 },
3234 { "subA", { Ebh1
, Ib
}, 0 },
3235 { "xorA", { Ebh1
, Ib
}, 0 },
3236 { "cmpA", { Eb
, Ib
}, 0 },
3240 { "addQ", { Evh1
, Iv
}, 0 },
3241 { "orQ", { Evh1
, Iv
}, 0 },
3242 { "adcQ", { Evh1
, Iv
}, 0 },
3243 { "sbbQ", { Evh1
, Iv
}, 0 },
3244 { "andQ", { Evh1
, Iv
}, 0 },
3245 { "subQ", { Evh1
, Iv
}, 0 },
3246 { "xorQ", { Evh1
, Iv
}, 0 },
3247 { "cmpQ", { Ev
, Iv
}, 0 },
3251 { "addQ", { Evh1
, sIb
}, 0 },
3252 { "orQ", { Evh1
, sIb
}, 0 },
3253 { "adcQ", { Evh1
, sIb
}, 0 },
3254 { "sbbQ", { Evh1
, sIb
}, 0 },
3255 { "andQ", { Evh1
, sIb
}, 0 },
3256 { "subQ", { Evh1
, sIb
}, 0 },
3257 { "xorQ", { Evh1
, sIb
}, 0 },
3258 { "cmpQ", { Ev
, sIb
}, 0 },
3262 { "popU", { stackEv
}, 0 },
3263 { XOP_8F_TABLE (XOP_09
) },
3267 { XOP_8F_TABLE (XOP_09
) },
3271 { "rolA", { Eb
, Ib
}, 0 },
3272 { "rorA", { Eb
, Ib
}, 0 },
3273 { "rclA", { Eb
, Ib
}, 0 },
3274 { "rcrA", { Eb
, Ib
}, 0 },
3275 { "shlA", { Eb
, Ib
}, 0 },
3276 { "shrA", { Eb
, Ib
}, 0 },
3277 { "shlA", { Eb
, Ib
}, 0 },
3278 { "sarA", { Eb
, Ib
}, 0 },
3282 { "rolQ", { Ev
, Ib
}, 0 },
3283 { "rorQ", { Ev
, Ib
}, 0 },
3284 { "rclQ", { Ev
, Ib
}, 0 },
3285 { "rcrQ", { Ev
, Ib
}, 0 },
3286 { "shlQ", { Ev
, Ib
}, 0 },
3287 { "shrQ", { Ev
, Ib
}, 0 },
3288 { "shlQ", { Ev
, Ib
}, 0 },
3289 { "sarQ", { Ev
, Ib
}, 0 },
3293 { "movA", { Ebh3
, Ib
}, 0 },
3300 { MOD_TABLE (MOD_C6_REG_7
) },
3304 { "movQ", { Evh3
, Iv
}, 0 },
3311 { MOD_TABLE (MOD_C7_REG_7
) },
3315 { "rolA", { Eb
, I1
}, 0 },
3316 { "rorA", { Eb
, I1
}, 0 },
3317 { "rclA", { Eb
, I1
}, 0 },
3318 { "rcrA", { Eb
, I1
}, 0 },
3319 { "shlA", { Eb
, I1
}, 0 },
3320 { "shrA", { Eb
, I1
}, 0 },
3321 { "shlA", { Eb
, I1
}, 0 },
3322 { "sarA", { Eb
, I1
}, 0 },
3326 { "rolQ", { Ev
, I1
}, 0 },
3327 { "rorQ", { Ev
, I1
}, 0 },
3328 { "rclQ", { Ev
, I1
}, 0 },
3329 { "rcrQ", { Ev
, I1
}, 0 },
3330 { "shlQ", { Ev
, I1
}, 0 },
3331 { "shrQ", { Ev
, I1
}, 0 },
3332 { "shlQ", { Ev
, I1
}, 0 },
3333 { "sarQ", { Ev
, I1
}, 0 },
3337 { "rolA", { Eb
, CL
}, 0 },
3338 { "rorA", { Eb
, CL
}, 0 },
3339 { "rclA", { Eb
, CL
}, 0 },
3340 { "rcrA", { Eb
, CL
}, 0 },
3341 { "shlA", { Eb
, CL
}, 0 },
3342 { "shrA", { Eb
, CL
}, 0 },
3343 { "shlA", { Eb
, CL
}, 0 },
3344 { "sarA", { Eb
, CL
}, 0 },
3348 { "rolQ", { Ev
, CL
}, 0 },
3349 { "rorQ", { Ev
, CL
}, 0 },
3350 { "rclQ", { Ev
, CL
}, 0 },
3351 { "rcrQ", { Ev
, CL
}, 0 },
3352 { "shlQ", { Ev
, CL
}, 0 },
3353 { "shrQ", { Ev
, CL
}, 0 },
3354 { "shlQ", { Ev
, CL
}, 0 },
3355 { "sarQ", { Ev
, CL
}, 0 },
3359 { "testA", { Eb
, Ib
}, 0 },
3360 { "testA", { Eb
, Ib
}, 0 },
3361 { "notA", { Ebh1
}, 0 },
3362 { "negA", { Ebh1
}, 0 },
3363 { "mulA", { Eb
}, 0 }, /* Don't print the implicit %al register, */
3364 { "imulA", { Eb
}, 0 }, /* to distinguish these opcodes from other */
3365 { "divA", { Eb
}, 0 }, /* mul/imul opcodes. Do the same for div */
3366 { "idivA", { Eb
}, 0 }, /* and idiv for consistency. */
3370 { "testQ", { Ev
, Iv
}, 0 },
3371 { "testQ", { Ev
, Iv
}, 0 },
3372 { "notQ", { Evh1
}, 0 },
3373 { "negQ", { Evh1
}, 0 },
3374 { "mulQ", { Ev
}, 0 }, /* Don't print the implicit register. */
3375 { "imulQ", { Ev
}, 0 },
3376 { "divQ", { Ev
}, 0 },
3377 { "idivQ", { Ev
}, 0 },
3381 { "incA", { Ebh1
}, 0 },
3382 { "decA", { Ebh1
}, 0 },
3386 { "incQ", { Evh1
}, 0 },
3387 { "decQ", { Evh1
}, 0 },
3388 { "call{&|}", { NOTRACK
, indirEv
, BND
}, 0 },
3389 { MOD_TABLE (MOD_FF_REG_3
) },
3390 { "jmp{&|}", { NOTRACK
, indirEv
, BND
}, 0 },
3391 { MOD_TABLE (MOD_FF_REG_5
) },
3392 { "pushU", { stackEv
}, 0 },
3397 { "sldtD", { Sv
}, 0 },
3398 { "strD", { Sv
}, 0 },
3399 { "lldt", { Ew
}, 0 },
3400 { "ltr", { Ew
}, 0 },
3401 { "verr", { Ew
}, 0 },
3402 { "verw", { Ew
}, 0 },
3408 { MOD_TABLE (MOD_0F01_REG_0
) },
3409 { MOD_TABLE (MOD_0F01_REG_1
) },
3410 { MOD_TABLE (MOD_0F01_REG_2
) },
3411 { MOD_TABLE (MOD_0F01_REG_3
) },
3412 { "smswD", { Sv
}, 0 },
3413 { MOD_TABLE (MOD_0F01_REG_5
) },
3414 { "lmsw", { Ew
}, 0 },
3415 { MOD_TABLE (MOD_0F01_REG_7
) },
3419 { "prefetch", { Mb
}, 0 },
3420 { "prefetchw", { Mb
}, 0 },
3421 { "prefetchwt1", { Mb
}, 0 },
3422 { "prefetch", { Mb
}, 0 },
3423 { "prefetch", { Mb
}, 0 },
3424 { "prefetch", { Mb
}, 0 },
3425 { "prefetch", { Mb
}, 0 },
3426 { "prefetch", { Mb
}, 0 },
3430 { MOD_TABLE (MOD_0F18_REG_0
) },
3431 { MOD_TABLE (MOD_0F18_REG_1
) },
3432 { MOD_TABLE (MOD_0F18_REG_2
) },
3433 { MOD_TABLE (MOD_0F18_REG_3
) },
3434 { MOD_TABLE (MOD_0F18_REG_4
) },
3435 { MOD_TABLE (MOD_0F18_REG_5
) },
3436 { MOD_TABLE (MOD_0F18_REG_6
) },
3437 { MOD_TABLE (MOD_0F18_REG_7
) },
3439 /* REG_0F1C_P_0_MOD_0 */
3441 { "cldemote", { Mb
}, 0 },
3442 { "nopQ", { Ev
}, 0 },
3443 { "nopQ", { Ev
}, 0 },
3444 { "nopQ", { Ev
}, 0 },
3445 { "nopQ", { Ev
}, 0 },
3446 { "nopQ", { Ev
}, 0 },
3447 { "nopQ", { Ev
}, 0 },
3448 { "nopQ", { Ev
}, 0 },
3450 /* REG_0F1E_P_1_MOD_3 */
3452 { "nopQ", { Ev
}, 0 },
3453 { "rdsspK", { Rdq
}, PREFIX_OPCODE
},
3454 { "nopQ", { Ev
}, 0 },
3455 { "nopQ", { Ev
}, 0 },
3456 { "nopQ", { Ev
}, 0 },
3457 { "nopQ", { Ev
}, 0 },
3458 { "nopQ", { Ev
}, 0 },
3459 { RM_TABLE (RM_0F1E_P_1_MOD_3_REG_7
) },
3465 { MOD_TABLE (MOD_0F71_REG_2
) },
3467 { MOD_TABLE (MOD_0F71_REG_4
) },
3469 { MOD_TABLE (MOD_0F71_REG_6
) },
3475 { MOD_TABLE (MOD_0F72_REG_2
) },
3477 { MOD_TABLE (MOD_0F72_REG_4
) },
3479 { MOD_TABLE (MOD_0F72_REG_6
) },
3485 { MOD_TABLE (MOD_0F73_REG_2
) },
3486 { MOD_TABLE (MOD_0F73_REG_3
) },
3489 { MOD_TABLE (MOD_0F73_REG_6
) },
3490 { MOD_TABLE (MOD_0F73_REG_7
) },
3494 { "montmul", { { OP_0f07
, 0 } }, 0 },
3495 { "xsha1", { { OP_0f07
, 0 } }, 0 },
3496 { "xsha256", { { OP_0f07
, 0 } }, 0 },
3500 { "xstore-rng", { { OP_0f07
, 0 } }, 0 },
3501 { "xcrypt-ecb", { { OP_0f07
, 0 } }, 0 },
3502 { "xcrypt-cbc", { { OP_0f07
, 0 } }, 0 },
3503 { "xcrypt-ctr", { { OP_0f07
, 0 } }, 0 },
3504 { "xcrypt-cfb", { { OP_0f07
, 0 } }, 0 },
3505 { "xcrypt-ofb", { { OP_0f07
, 0 } }, 0 },
3509 { MOD_TABLE (MOD_0FAE_REG_0
) },
3510 { MOD_TABLE (MOD_0FAE_REG_1
) },
3511 { MOD_TABLE (MOD_0FAE_REG_2
) },
3512 { MOD_TABLE (MOD_0FAE_REG_3
) },
3513 { MOD_TABLE (MOD_0FAE_REG_4
) },
3514 { MOD_TABLE (MOD_0FAE_REG_5
) },
3515 { MOD_TABLE (MOD_0FAE_REG_6
) },
3516 { MOD_TABLE (MOD_0FAE_REG_7
) },
3524 { "btQ", { Ev
, Ib
}, 0 },
3525 { "btsQ", { Evh1
, Ib
}, 0 },
3526 { "btrQ", { Evh1
, Ib
}, 0 },
3527 { "btcQ", { Evh1
, Ib
}, 0 },
3532 { "cmpxchg8b", { { CMPXCHG8B_Fixup
, q_mode
} }, 0 },
3534 { MOD_TABLE (MOD_0FC7_REG_3
) },
3535 { MOD_TABLE (MOD_0FC7_REG_4
) },
3536 { MOD_TABLE (MOD_0FC7_REG_5
) },
3537 { MOD_TABLE (MOD_0FC7_REG_6
) },
3538 { MOD_TABLE (MOD_0FC7_REG_7
) },
3544 { MOD_TABLE (MOD_VEX_0F71_REG_2
) },
3546 { MOD_TABLE (MOD_VEX_0F71_REG_4
) },
3548 { MOD_TABLE (MOD_VEX_0F71_REG_6
) },
3554 { MOD_TABLE (MOD_VEX_0F72_REG_2
) },
3556 { MOD_TABLE (MOD_VEX_0F72_REG_4
) },
3558 { MOD_TABLE (MOD_VEX_0F72_REG_6
) },
3564 { MOD_TABLE (MOD_VEX_0F73_REG_2
) },
3565 { MOD_TABLE (MOD_VEX_0F73_REG_3
) },
3568 { MOD_TABLE (MOD_VEX_0F73_REG_6
) },
3569 { MOD_TABLE (MOD_VEX_0F73_REG_7
) },
3575 { MOD_TABLE (MOD_VEX_0FAE_REG_2
) },
3576 { MOD_TABLE (MOD_VEX_0FAE_REG_3
) },
3578 /* REG_VEX_0F38F3 */
3581 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1
) },
3582 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2
) },
3583 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3
) },
3587 { "llwpcb", { { OP_LWPCB_E
, 0 } }, 0 },
3588 { "slwpcb", { { OP_LWPCB_E
, 0 } }, 0 },
3592 { "lwpins", { { OP_LWP_E
, 0 }, Ed
, Id
}, 0 },
3593 { "lwpval", { { OP_LWP_E
, 0 }, Ed
, Id
}, 0 },
3595 /* REG_XOP_TBM_01 */
3598 { "blcfill", { { OP_LWP_E
, 0 }, Edq
}, 0 },
3599 { "blsfill", { { OP_LWP_E
, 0 }, Edq
}, 0 },
3600 { "blcs", { { OP_LWP_E
, 0 }, Edq
}, 0 },
3601 { "tzmsk", { { OP_LWP_E
, 0 }, Edq
}, 0 },
3602 { "blcic", { { OP_LWP_E
, 0 }, Edq
}, 0 },
3603 { "blsic", { { OP_LWP_E
, 0 }, Edq
}, 0 },
3604 { "t1mskc", { { OP_LWP_E
, 0 }, Edq
}, 0 },
3606 /* REG_XOP_TBM_02 */
3609 { "blcmsk", { { OP_LWP_E
, 0 }, Edq
}, 0 },
3614 { "blci", { { OP_LWP_E
, 0 }, Edq
}, 0 },
3617 #include "i386-dis-evex-reg.h"
3620 static const struct dis386 prefix_table
[][4] = {
3623 { "xchgS", { { NOP_Fixup1
, eAX_reg
}, { NOP_Fixup2
, eAX_reg
} }, 0 },
3624 { "pause", { XX
}, 0 },
3625 { "xchgS", { { NOP_Fixup1
, eAX_reg
}, { NOP_Fixup2
, eAX_reg
} }, 0 },
3626 { NULL
, { { NULL
, 0 } }, PREFIX_IGNORED
}
3629 /* PREFIX_0F01_REG_5_MOD_0 */
3632 { "rstorssp", { Mq
}, PREFIX_OPCODE
},
3635 /* PREFIX_0F01_REG_5_MOD_3_RM_0 */
3638 { "setssbsy", { Skip_MODRM
}, PREFIX_OPCODE
},
3641 /* PREFIX_0F01_REG_5_MOD_3_RM_2 */
3644 { "saveprevssp", { Skip_MODRM
}, PREFIX_OPCODE
},
3647 /* PREFIX_0F01_REG_7_MOD_3_RM_2 */
3649 { "monitorx", { { OP_Monitor
, 0 } }, 0 },
3650 { "mcommit", { Skip_MODRM
}, 0 },
3653 /* PREFIX_0F01_REG_7_MOD_3_RM_3 */
3655 { "mwaitx", { { OP_Mwait
, eBX_reg
} }, 0 },
3660 { "wbinvd", { XX
}, 0 },
3661 { "wbnoinvd", { XX
}, 0 },
3666 { "movups", { XM
, EXx
}, PREFIX_OPCODE
},
3667 { "movss", { XM
, EXd
}, PREFIX_OPCODE
},
3668 { "movupd", { XM
, EXx
}, PREFIX_OPCODE
},
3669 { "movsd", { XM
, EXq
}, PREFIX_OPCODE
},
3674 { "movups", { EXxS
, XM
}, PREFIX_OPCODE
},
3675 { "movss", { EXdS
, XM
}, PREFIX_OPCODE
},
3676 { "movupd", { EXxS
, XM
}, PREFIX_OPCODE
},
3677 { "movsd", { EXqS
, XM
}, PREFIX_OPCODE
},
3682 { MOD_TABLE (MOD_0F12_PREFIX_0
) },
3683 { "movsldup", { XM
, EXx
}, PREFIX_OPCODE
},
3684 { "movlpd", { XM
, EXq
}, PREFIX_OPCODE
},
3685 { "movddup", { XM
, EXq
}, PREFIX_OPCODE
},
3690 { MOD_TABLE (MOD_0F16_PREFIX_0
) },
3691 { "movshdup", { XM
, EXx
}, PREFIX_OPCODE
},
3692 { "movhpd", { XM
, EXq
}, PREFIX_OPCODE
},
3697 { MOD_TABLE (MOD_0F1A_PREFIX_0
) },
3698 { "bndcl", { Gbnd
, Ev_bnd
}, 0 },
3699 { "bndmov", { Gbnd
, Ebnd
}, 0 },
3700 { "bndcu", { Gbnd
, Ev_bnd
}, 0 },
3705 { MOD_TABLE (MOD_0F1B_PREFIX_0
) },
3706 { MOD_TABLE (MOD_0F1B_PREFIX_1
) },
3707 { "bndmov", { EbndS
, Gbnd
}, 0 },
3708 { "bndcn", { Gbnd
, Ev_bnd
}, 0 },
3713 { MOD_TABLE (MOD_0F1C_PREFIX_0
) },
3714 { "nopQ", { Ev
}, PREFIX_OPCODE
},
3715 { "nopQ", { Ev
}, PREFIX_OPCODE
},
3716 { "nopQ", { Ev
}, PREFIX_OPCODE
},
3721 { "nopQ", { Ev
}, PREFIX_OPCODE
},
3722 { MOD_TABLE (MOD_0F1E_PREFIX_1
) },
3723 { "nopQ", { Ev
}, PREFIX_OPCODE
},
3724 { "nopQ", { Ev
}, PREFIX_OPCODE
},
3729 { "cvtpi2ps", { XM
, EMCq
}, PREFIX_OPCODE
},
3730 { "cvtsi2ss%LQ", { XM
, Edq
}, PREFIX_OPCODE
},
3731 { "cvtpi2pd", { XM
, EMCq
}, PREFIX_OPCODE
},
3732 { "cvtsi2sd%LQ", { XM
, Edq
}, 0 },
3737 { MOD_TABLE (MOD_0F2B_PREFIX_0
) },
3738 { MOD_TABLE (MOD_0F2B_PREFIX_1
) },
3739 { MOD_TABLE (MOD_0F2B_PREFIX_2
) },
3740 { MOD_TABLE (MOD_0F2B_PREFIX_3
) },
3745 { "cvttps2pi", { MXC
, EXq
}, PREFIX_OPCODE
},
3746 { "cvttss2si", { Gdq
, EXd
}, PREFIX_OPCODE
},
3747 { "cvttpd2pi", { MXC
, EXx
}, PREFIX_OPCODE
},
3748 { "cvttsd2si", { Gdq
, EXq
}, PREFIX_OPCODE
},
3753 { "cvtps2pi", { MXC
, EXq
}, PREFIX_OPCODE
},
3754 { "cvtss2si", { Gdq
, EXd
}, PREFIX_OPCODE
},
3755 { "cvtpd2pi", { MXC
, EXx
}, PREFIX_OPCODE
},
3756 { "cvtsd2si", { Gdq
, EXq
}, PREFIX_OPCODE
},
3761 { "ucomiss",{ XM
, EXd
}, 0 },
3763 { "ucomisd",{ XM
, EXq
}, 0 },
3768 { "comiss", { XM
, EXd
}, 0 },
3770 { "comisd", { XM
, EXq
}, 0 },
3775 { "sqrtps", { XM
, EXx
}, PREFIX_OPCODE
},
3776 { "sqrtss", { XM
, EXd
}, PREFIX_OPCODE
},
3777 { "sqrtpd", { XM
, EXx
}, PREFIX_OPCODE
},
3778 { "sqrtsd", { XM
, EXq
}, PREFIX_OPCODE
},
3783 { "rsqrtps",{ XM
, EXx
}, PREFIX_OPCODE
},
3784 { "rsqrtss",{ XM
, EXd
}, PREFIX_OPCODE
},
3789 { "rcpps", { XM
, EXx
}, PREFIX_OPCODE
},
3790 { "rcpss", { XM
, EXd
}, PREFIX_OPCODE
},
3795 { "addps", { XM
, EXx
}, PREFIX_OPCODE
},
3796 { "addss", { XM
, EXd
}, PREFIX_OPCODE
},
3797 { "addpd", { XM
, EXx
}, PREFIX_OPCODE
},
3798 { "addsd", { XM
, EXq
}, PREFIX_OPCODE
},
3803 { "mulps", { XM
, EXx
}, PREFIX_OPCODE
},
3804 { "mulss", { XM
, EXd
}, PREFIX_OPCODE
},
3805 { "mulpd", { XM
, EXx
}, PREFIX_OPCODE
},
3806 { "mulsd", { XM
, EXq
}, PREFIX_OPCODE
},
3811 { "cvtps2pd", { XM
, EXq
}, PREFIX_OPCODE
},
3812 { "cvtss2sd", { XM
, EXd
}, PREFIX_OPCODE
},
3813 { "cvtpd2ps", { XM
, EXx
}, PREFIX_OPCODE
},
3814 { "cvtsd2ss", { XM
, EXq
}, PREFIX_OPCODE
},
3819 { "cvtdq2ps", { XM
, EXx
}, PREFIX_OPCODE
},
3820 { "cvttps2dq", { XM
, EXx
}, PREFIX_OPCODE
},
3821 { "cvtps2dq", { XM
, EXx
}, PREFIX_OPCODE
},
3826 { "subps", { XM
, EXx
}, PREFIX_OPCODE
},
3827 { "subss", { XM
, EXd
}, PREFIX_OPCODE
},
3828 { "subpd", { XM
, EXx
}, PREFIX_OPCODE
},
3829 { "subsd", { XM
, EXq
}, PREFIX_OPCODE
},
3834 { "minps", { XM
, EXx
}, PREFIX_OPCODE
},
3835 { "minss", { XM
, EXd
}, PREFIX_OPCODE
},
3836 { "minpd", { XM
, EXx
}, PREFIX_OPCODE
},
3837 { "minsd", { XM
, EXq
}, PREFIX_OPCODE
},
3842 { "divps", { XM
, EXx
}, PREFIX_OPCODE
},
3843 { "divss", { XM
, EXd
}, PREFIX_OPCODE
},
3844 { "divpd", { XM
, EXx
}, PREFIX_OPCODE
},
3845 { "divsd", { XM
, EXq
}, PREFIX_OPCODE
},
3850 { "maxps", { XM
, EXx
}, PREFIX_OPCODE
},
3851 { "maxss", { XM
, EXd
}, PREFIX_OPCODE
},
3852 { "maxpd", { XM
, EXx
}, PREFIX_OPCODE
},
3853 { "maxsd", { XM
, EXq
}, PREFIX_OPCODE
},
3858 { "punpcklbw",{ MX
, EMd
}, PREFIX_OPCODE
},
3860 { "punpcklbw",{ MX
, EMx
}, PREFIX_OPCODE
},
3865 { "punpcklwd",{ MX
, EMd
}, PREFIX_OPCODE
},
3867 { "punpcklwd",{ MX
, EMx
}, PREFIX_OPCODE
},
3872 { "punpckldq",{ MX
, EMd
}, PREFIX_OPCODE
},
3874 { "punpckldq",{ MX
, EMx
}, PREFIX_OPCODE
},
3881 { "punpcklqdq", { XM
, EXx
}, PREFIX_OPCODE
},
3888 { "punpckhqdq", { XM
, EXx
}, PREFIX_OPCODE
},
3893 { "movq", { MX
, EM
}, PREFIX_OPCODE
},
3894 { "movdqu", { XM
, EXx
}, PREFIX_OPCODE
},
3895 { "movdqa", { XM
, EXx
}, PREFIX_OPCODE
},
3900 { "pshufw", { MX
, EM
, Ib
}, PREFIX_OPCODE
},
3901 { "pshufhw",{ XM
, EXx
, Ib
}, PREFIX_OPCODE
},
3902 { "pshufd", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
3903 { "pshuflw",{ XM
, EXx
, Ib
}, PREFIX_OPCODE
},
3906 /* PREFIX_0F73_REG_3 */
3910 { "psrldq", { XS
, Ib
}, 0 },
3913 /* PREFIX_0F73_REG_7 */
3917 { "pslldq", { XS
, Ib
}, 0 },
3922 {"vmread", { Em
, Gm
}, 0 },
3924 {"extrq", { XS
, Ib
, Ib
}, 0 },
3925 {"insertq", { XM
, XS
, Ib
, Ib
}, 0 },
3930 {"vmwrite", { Gm
, Em
}, 0 },
3932 {"extrq", { XM
, XS
}, 0 },
3933 {"insertq", { XM
, XS
}, 0 },
3940 { "haddpd", { XM
, EXx
}, PREFIX_OPCODE
},
3941 { "haddps", { XM
, EXx
}, PREFIX_OPCODE
},
3948 { "hsubpd", { XM
, EXx
}, PREFIX_OPCODE
},
3949 { "hsubps", { XM
, EXx
}, PREFIX_OPCODE
},
3954 { "movK", { Edq
, MX
}, PREFIX_OPCODE
},
3955 { "movq", { XM
, EXq
}, PREFIX_OPCODE
},
3956 { "movK", { Edq
, XM
}, PREFIX_OPCODE
},
3961 { "movq", { EMS
, MX
}, PREFIX_OPCODE
},
3962 { "movdqu", { EXxS
, XM
}, PREFIX_OPCODE
},
3963 { "movdqa", { EXxS
, XM
}, PREFIX_OPCODE
},
3966 /* PREFIX_0FAE_REG_0_MOD_3 */
3969 { "rdfsbase", { Ev
}, 0 },
3972 /* PREFIX_0FAE_REG_1_MOD_3 */
3975 { "rdgsbase", { Ev
}, 0 },
3978 /* PREFIX_0FAE_REG_2_MOD_3 */
3981 { "wrfsbase", { Ev
}, 0 },
3984 /* PREFIX_0FAE_REG_3_MOD_3 */
3987 { "wrgsbase", { Ev
}, 0 },
3990 /* PREFIX_0FAE_REG_4_MOD_0 */
3992 { "xsave", { FXSAVE
}, 0 },
3993 { "ptwrite%LQ", { Edq
}, 0 },
3996 /* PREFIX_0FAE_REG_4_MOD_3 */
3999 { "ptwrite%LQ", { Edq
}, 0 },
4002 /* PREFIX_0FAE_REG_5_MOD_0 */
4004 { "xrstor", { FXSAVE
}, PREFIX_OPCODE
},
4007 /* PREFIX_0FAE_REG_5_MOD_3 */
4009 { "lfence", { Skip_MODRM
}, 0 },
4010 { "incsspK", { Rdq
}, PREFIX_OPCODE
},
4013 /* PREFIX_0FAE_REG_6_MOD_0 */
4015 { "xsaveopt", { FXSAVE
}, PREFIX_OPCODE
},
4016 { "clrssbsy", { Mq
}, PREFIX_OPCODE
},
4017 { "clwb", { Mb
}, PREFIX_OPCODE
},
4020 /* PREFIX_0FAE_REG_6_MOD_3 */
4022 { RM_TABLE (RM_0FAE_REG_6_MOD_3_P_0
) },
4023 { "umonitor", { Eva
}, PREFIX_OPCODE
},
4024 { "tpause", { Edq
}, PREFIX_OPCODE
},
4025 { "umwait", { Edq
}, PREFIX_OPCODE
},
4028 /* PREFIX_0FAE_REG_7_MOD_0 */
4030 { "clflush", { Mb
}, 0 },
4032 { "clflushopt", { Mb
}, 0 },
4038 { "popcntS", { Gv
, Ev
}, 0 },
4043 { "bsfS", { Gv
, Ev
}, 0 },
4044 { "tzcntS", { Gv
, Ev
}, 0 },
4045 { "bsfS", { Gv
, Ev
}, 0 },
4050 { "bsrS", { Gv
, Ev
}, 0 },
4051 { "lzcntS", { Gv
, Ev
}, 0 },
4052 { "bsrS", { Gv
, Ev
}, 0 },
4057 { "cmpps", { XM
, EXx
, CMP
}, PREFIX_OPCODE
},
4058 { "cmpss", { XM
, EXd
, CMP
}, PREFIX_OPCODE
},
4059 { "cmppd", { XM
, EXx
, CMP
}, PREFIX_OPCODE
},
4060 { "cmpsd", { XM
, EXq
, CMP
}, PREFIX_OPCODE
},
4063 /* PREFIX_0FC3_MOD_0 */
4065 { "movntiS", { Edq
, Gdq
}, PREFIX_OPCODE
},
4068 /* PREFIX_0FC7_REG_6_MOD_0 */
4070 { "vmptrld",{ Mq
}, 0 },
4071 { "vmxon", { Mq
}, 0 },
4072 { "vmclear",{ Mq
}, 0 },
4075 /* PREFIX_0FC7_REG_6_MOD_3 */
4077 { "rdrand", { Ev
}, 0 },
4079 { "rdrand", { Ev
}, 0 }
4082 /* PREFIX_0FC7_REG_7_MOD_3 */
4084 { "rdseed", { Ev
}, 0 },
4085 { "rdpid", { Em
}, 0 },
4086 { "rdseed", { Ev
}, 0 },
4093 { "addsubpd", { XM
, EXx
}, 0 },
4094 { "addsubps", { XM
, EXx
}, 0 },
4100 { "movq2dq",{ XM
, MS
}, 0 },
4101 { "movq", { EXqS
, XM
}, 0 },
4102 { "movdq2q",{ MX
, XS
}, 0 },
4108 { "cvtdq2pd", { XM
, EXq
}, PREFIX_OPCODE
},
4109 { "cvttpd2dq", { XM
, EXx
}, PREFIX_OPCODE
},
4110 { "cvtpd2dq", { XM
, EXx
}, PREFIX_OPCODE
},
4115 { "movntq", { Mq
, MX
}, PREFIX_OPCODE
},
4117 { MOD_TABLE (MOD_0FE7_PREFIX_2
) },
4125 { MOD_TABLE (MOD_0FF0_PREFIX_3
) },
4130 { "maskmovq", { MX
, MS
}, PREFIX_OPCODE
},
4132 { "maskmovdqu", { XM
, XS
}, PREFIX_OPCODE
},
4139 { "pblendvb", { XM
, EXx
, XMM0
}, PREFIX_OPCODE
},
4146 { "blendvps", { XM
, EXx
, XMM0
}, PREFIX_OPCODE
},
4153 { "blendvpd", { XM
, EXx
, XMM0
}, PREFIX_OPCODE
},
4160 { "ptest", { XM
, EXx
}, PREFIX_OPCODE
},
4167 { "pmovsxbw", { XM
, EXq
}, PREFIX_OPCODE
},
4174 { "pmovsxbd", { XM
, EXd
}, PREFIX_OPCODE
},
4181 { "pmovsxbq", { XM
, EXw
}, PREFIX_OPCODE
},
4188 { "pmovsxwd", { XM
, EXq
}, PREFIX_OPCODE
},
4195 { "pmovsxwq", { XM
, EXd
}, PREFIX_OPCODE
},
4202 { "pmovsxdq", { XM
, EXq
}, PREFIX_OPCODE
},
4209 { "pmuldq", { XM
, EXx
}, PREFIX_OPCODE
},
4216 { "pcmpeqq", { XM
, EXx
}, PREFIX_OPCODE
},
4223 { MOD_TABLE (MOD_0F382A_PREFIX_2
) },
4230 { "packusdw", { XM
, EXx
}, PREFIX_OPCODE
},
4237 { "pmovzxbw", { XM
, EXq
}, PREFIX_OPCODE
},
4244 { "pmovzxbd", { XM
, EXd
}, PREFIX_OPCODE
},
4251 { "pmovzxbq", { XM
, EXw
}, PREFIX_OPCODE
},
4258 { "pmovzxwd", { XM
, EXq
}, PREFIX_OPCODE
},
4265 { "pmovzxwq", { XM
, EXd
}, PREFIX_OPCODE
},
4272 { "pmovzxdq", { XM
, EXq
}, PREFIX_OPCODE
},
4279 { "pcmpgtq", { XM
, EXx
}, PREFIX_OPCODE
},
4286 { "pminsb", { XM
, EXx
}, PREFIX_OPCODE
},
4293 { "pminsd", { XM
, EXx
}, PREFIX_OPCODE
},
4300 { "pminuw", { XM
, EXx
}, PREFIX_OPCODE
},
4307 { "pminud", { XM
, EXx
}, PREFIX_OPCODE
},
4314 { "pmaxsb", { XM
, EXx
}, PREFIX_OPCODE
},
4321 { "pmaxsd", { XM
, EXx
}, PREFIX_OPCODE
},
4328 { "pmaxuw", { XM
, EXx
}, PREFIX_OPCODE
},
4335 { "pmaxud", { XM
, EXx
}, PREFIX_OPCODE
},
4342 { "pmulld", { XM
, EXx
}, PREFIX_OPCODE
},
4349 { "phminposuw", { XM
, EXx
}, PREFIX_OPCODE
},
4356 { "invept", { Gm
, Mo
}, PREFIX_OPCODE
},
4363 { "invvpid", { Gm
, Mo
}, PREFIX_OPCODE
},
4370 { "invpcid", { Gm
, M
}, PREFIX_OPCODE
},
4375 { "sha1nexte", { XM
, EXxmm
}, PREFIX_OPCODE
},
4380 { "sha1msg1", { XM
, EXxmm
}, PREFIX_OPCODE
},
4385 { "sha1msg2", { XM
, EXxmm
}, PREFIX_OPCODE
},
4390 { "sha256rnds2", { XM
, EXxmm
, XMM0
}, PREFIX_OPCODE
},
4395 { "sha256msg1", { XM
, EXxmm
}, PREFIX_OPCODE
},
4400 { "sha256msg2", { XM
, EXxmm
}, PREFIX_OPCODE
},
4407 { "gf2p8mulb", { XM
, EXxmm
}, PREFIX_OPCODE
},
4414 { "aesimc", { XM
, EXx
}, PREFIX_OPCODE
},
4421 { "aesenc", { XM
, EXx
}, PREFIX_OPCODE
},
4428 { "aesenclast", { XM
, EXx
}, PREFIX_OPCODE
},
4435 { "aesdec", { XM
, EXx
}, PREFIX_OPCODE
},
4442 { "aesdeclast", { XM
, EXx
}, PREFIX_OPCODE
},
4447 { "movbeS", { Gv
, { MOVBE_Fixup
, v_mode
} }, PREFIX_OPCODE
},
4449 { "movbeS", { Gv
, { MOVBE_Fixup
, v_mode
} }, PREFIX_OPCODE
},
4450 { "crc32", { Gdq
, { CRC32_Fixup
, b_mode
} }, PREFIX_OPCODE
},
4455 { "movbeS", { { MOVBE_Fixup
, v_mode
}, Gv
}, PREFIX_OPCODE
},
4457 { "movbeS", { { MOVBE_Fixup
, v_mode
}, Gv
}, PREFIX_OPCODE
},
4458 { "crc32", { Gdq
, { CRC32_Fixup
, v_mode
} }, PREFIX_OPCODE
},
4465 { MOD_TABLE (MOD_0F38F5_PREFIX_2
) },
4470 { MOD_TABLE (MOD_0F38F6_PREFIX_0
) },
4471 { "adoxS", { Gdq
, Edq
}, PREFIX_OPCODE
},
4472 { "adcxS", { Gdq
, Edq
}, PREFIX_OPCODE
},
4479 { MOD_TABLE (MOD_0F38F8_PREFIX_1
) },
4480 { MOD_TABLE (MOD_0F38F8_PREFIX_2
) },
4481 { MOD_TABLE (MOD_0F38F8_PREFIX_3
) },
4486 { MOD_TABLE (MOD_0F38F9_PREFIX_0
) },
4493 { "roundps", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4500 { "roundpd", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4507 { "roundss", { XM
, EXd
, Ib
}, PREFIX_OPCODE
},
4514 { "roundsd", { XM
, EXq
, Ib
}, PREFIX_OPCODE
},
4521 { "blendps", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4528 { "blendpd", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4535 { "pblendw", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4542 { "pextrb", { Edqb
, XM
, Ib
}, PREFIX_OPCODE
},
4549 { "pextrw", { Edqw
, XM
, Ib
}, PREFIX_OPCODE
},
4556 { "pextrK", { Edq
, XM
, Ib
}, PREFIX_OPCODE
},
4563 { "extractps", { Edqd
, XM
, Ib
}, PREFIX_OPCODE
},
4570 { "pinsrb", { XM
, Edqb
, Ib
}, PREFIX_OPCODE
},
4577 { "insertps", { XM
, EXd
, Ib
}, PREFIX_OPCODE
},
4584 { "pinsrK", { XM
, Edq
, Ib
}, PREFIX_OPCODE
},
4591 { "dpps", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4598 { "dppd", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4605 { "mpsadbw", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4612 { "pclmulqdq", { XM
, EXx
, PCLMUL
}, PREFIX_OPCODE
},
4619 { "pcmpestrm", { XM
, { PCMPESTR_Fixup
, x_mode
}, Ib
}, PREFIX_OPCODE
},
4626 { "pcmpestri", { XM
, { PCMPESTR_Fixup
, x_mode
}, Ib
}, PREFIX_OPCODE
},
4633 { "pcmpistrm", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4640 { "pcmpistri", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4645 { "sha1rnds4", { XM
, EXxmm
, Ib
}, PREFIX_OPCODE
},
4652 { "gf2p8affineqb", { XM
, EXxmm
, Ib
}, PREFIX_OPCODE
},
4659 { "gf2p8affineinvqb", { XM
, EXxmm
, Ib
}, PREFIX_OPCODE
},
4666 { "aeskeygenassist", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4669 /* PREFIX_VEX_0F10 */
4671 { "vmovups", { XM
, EXx
}, 0 },
4672 { "vmovss", { XMVexScalar
, VexScalar
, EXdScalar
}, 0 },
4673 { "vmovupd", { XM
, EXx
}, 0 },
4674 { "vmovsd", { XMVexScalar
, VexScalar
, EXqScalar
}, 0 },
4677 /* PREFIX_VEX_0F11 */
4679 { "vmovups", { EXxS
, XM
}, 0 },
4680 { "vmovss", { EXdVexScalarS
, VexScalar
, XMScalar
}, 0 },
4681 { "vmovupd", { EXxS
, XM
}, 0 },
4682 { "vmovsd", { EXqVexScalarS
, VexScalar
, XMScalar
}, 0 },
4685 /* PREFIX_VEX_0F12 */
4687 { MOD_TABLE (MOD_VEX_0F12_PREFIX_0
) },
4688 { "vmovsldup", { XM
, EXx
}, 0 },
4689 { VEX_LEN_TABLE (VEX_LEN_0F12_P_2
) },
4690 { "vmovddup", { XM
, EXymmq
}, 0 },
4693 /* PREFIX_VEX_0F16 */
4695 { MOD_TABLE (MOD_VEX_0F16_PREFIX_0
) },
4696 { "vmovshdup", { XM
, EXx
}, 0 },
4697 { VEX_LEN_TABLE (VEX_LEN_0F16_P_2
) },
4700 /* PREFIX_VEX_0F2A */
4703 { "vcvtsi2ss%LQ", { XMScalar
, VexScalar
, Edq
}, 0 },
4705 { "vcvtsi2sd%LQ", { XMScalar
, VexScalar
, Edq
}, 0 },
4708 /* PREFIX_VEX_0F2C */
4711 { "vcvttss2si", { Gdq
, EXdScalar
}, 0 },
4713 { "vcvttsd2si", { Gdq
, EXqScalar
}, 0 },
4716 /* PREFIX_VEX_0F2D */
4719 { "vcvtss2si", { Gdq
, EXdScalar
}, 0 },
4721 { "vcvtsd2si", { Gdq
, EXqScalar
}, 0 },
4724 /* PREFIX_VEX_0F2E */
4726 { "vucomiss", { XMScalar
, EXdScalar
}, 0 },
4728 { "vucomisd", { XMScalar
, EXqScalar
}, 0 },
4731 /* PREFIX_VEX_0F2F */
4733 { "vcomiss", { XMScalar
, EXdScalar
}, 0 },
4735 { "vcomisd", { XMScalar
, EXqScalar
}, 0 },
4738 /* PREFIX_VEX_0F41 */
4740 { VEX_LEN_TABLE (VEX_LEN_0F41_P_0
) },
4742 { VEX_LEN_TABLE (VEX_LEN_0F41_P_2
) },
4745 /* PREFIX_VEX_0F42 */
4747 { VEX_LEN_TABLE (VEX_LEN_0F42_P_0
) },
4749 { VEX_LEN_TABLE (VEX_LEN_0F42_P_2
) },
4752 /* PREFIX_VEX_0F44 */
4754 { VEX_LEN_TABLE (VEX_LEN_0F44_P_0
) },
4756 { VEX_LEN_TABLE (VEX_LEN_0F44_P_2
) },
4759 /* PREFIX_VEX_0F45 */
4761 { VEX_LEN_TABLE (VEX_LEN_0F45_P_0
) },
4763 { VEX_LEN_TABLE (VEX_LEN_0F45_P_2
) },
4766 /* PREFIX_VEX_0F46 */
4768 { VEX_LEN_TABLE (VEX_LEN_0F46_P_0
) },
4770 { VEX_LEN_TABLE (VEX_LEN_0F46_P_2
) },
4773 /* PREFIX_VEX_0F47 */
4775 { VEX_LEN_TABLE (VEX_LEN_0F47_P_0
) },
4777 { VEX_LEN_TABLE (VEX_LEN_0F47_P_2
) },
4780 /* PREFIX_VEX_0F4A */
4782 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_0
) },
4784 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_2
) },
4787 /* PREFIX_VEX_0F4B */
4789 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_0
) },
4791 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_2
) },
4794 /* PREFIX_VEX_0F51 */
4796 { "vsqrtps", { XM
, EXx
}, 0 },
4797 { "vsqrtss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4798 { "vsqrtpd", { XM
, EXx
}, 0 },
4799 { "vsqrtsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
4802 /* PREFIX_VEX_0F52 */
4804 { "vrsqrtps", { XM
, EXx
}, 0 },
4805 { "vrsqrtss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4808 /* PREFIX_VEX_0F53 */
4810 { "vrcpps", { XM
, EXx
}, 0 },
4811 { "vrcpss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4814 /* PREFIX_VEX_0F58 */
4816 { "vaddps", { XM
, Vex
, EXx
}, 0 },
4817 { "vaddss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4818 { "vaddpd", { XM
, Vex
, EXx
}, 0 },
4819 { "vaddsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
4822 /* PREFIX_VEX_0F59 */
4824 { "vmulps", { XM
, Vex
, EXx
}, 0 },
4825 { "vmulss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4826 { "vmulpd", { XM
, Vex
, EXx
}, 0 },
4827 { "vmulsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
4830 /* PREFIX_VEX_0F5A */
4832 { "vcvtps2pd", { XM
, EXxmmq
}, 0 },
4833 { "vcvtss2sd", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4834 { "vcvtpd2ps%XY",{ XMM
, EXx
}, 0 },
4835 { "vcvtsd2ss", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
4838 /* PREFIX_VEX_0F5B */
4840 { "vcvtdq2ps", { XM
, EXx
}, 0 },
4841 { "vcvttps2dq", { XM
, EXx
}, 0 },
4842 { "vcvtps2dq", { XM
, EXx
}, 0 },
4845 /* PREFIX_VEX_0F5C */
4847 { "vsubps", { XM
, Vex
, EXx
}, 0 },
4848 { "vsubss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4849 { "vsubpd", { XM
, Vex
, EXx
}, 0 },
4850 { "vsubsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
4853 /* PREFIX_VEX_0F5D */
4855 { "vminps", { XM
, Vex
, EXx
}, 0 },
4856 { "vminss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4857 { "vminpd", { XM
, Vex
, EXx
}, 0 },
4858 { "vminsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
4861 /* PREFIX_VEX_0F5E */
4863 { "vdivps", { XM
, Vex
, EXx
}, 0 },
4864 { "vdivss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4865 { "vdivpd", { XM
, Vex
, EXx
}, 0 },
4866 { "vdivsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
4869 /* PREFIX_VEX_0F5F */
4871 { "vmaxps", { XM
, Vex
, EXx
}, 0 },
4872 { "vmaxss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
4873 { "vmaxpd", { XM
, Vex
, EXx
}, 0 },
4874 { "vmaxsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
4877 /* PREFIX_VEX_0F60 */
4881 { "vpunpcklbw", { XM
, Vex
, EXx
}, 0 },
4884 /* PREFIX_VEX_0F61 */
4888 { "vpunpcklwd", { XM
, Vex
, EXx
}, 0 },
4891 /* PREFIX_VEX_0F62 */
4895 { "vpunpckldq", { XM
, Vex
, EXx
}, 0 },
4898 /* PREFIX_VEX_0F63 */
4902 { "vpacksswb", { XM
, Vex
, EXx
}, 0 },
4905 /* PREFIX_VEX_0F64 */
4909 { "vpcmpgtb", { XM
, Vex
, EXx
}, 0 },
4912 /* PREFIX_VEX_0F65 */
4916 { "vpcmpgtw", { XM
, Vex
, EXx
}, 0 },
4919 /* PREFIX_VEX_0F66 */
4923 { "vpcmpgtd", { XM
, Vex
, EXx
}, 0 },
4926 /* PREFIX_VEX_0F67 */
4930 { "vpackuswb", { XM
, Vex
, EXx
}, 0 },
4933 /* PREFIX_VEX_0F68 */
4937 { "vpunpckhbw", { XM
, Vex
, EXx
}, 0 },
4940 /* PREFIX_VEX_0F69 */
4944 { "vpunpckhwd", { XM
, Vex
, EXx
}, 0 },
4947 /* PREFIX_VEX_0F6A */
4951 { "vpunpckhdq", { XM
, Vex
, EXx
}, 0 },
4954 /* PREFIX_VEX_0F6B */
4958 { "vpackssdw", { XM
, Vex
, EXx
}, 0 },
4961 /* PREFIX_VEX_0F6C */
4965 { "vpunpcklqdq", { XM
, Vex
, EXx
}, 0 },
4968 /* PREFIX_VEX_0F6D */
4972 { "vpunpckhqdq", { XM
, Vex
, EXx
}, 0 },
4975 /* PREFIX_VEX_0F6E */
4979 { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2
) },
4982 /* PREFIX_VEX_0F6F */
4985 { "vmovdqu", { XM
, EXx
}, 0 },
4986 { "vmovdqa", { XM
, EXx
}, 0 },
4989 /* PREFIX_VEX_0F70 */
4992 { "vpshufhw", { XM
, EXx
, Ib
}, 0 },
4993 { "vpshufd", { XM
, EXx
, Ib
}, 0 },
4994 { "vpshuflw", { XM
, EXx
, Ib
}, 0 },
4997 /* PREFIX_VEX_0F71_REG_2 */
5001 { "vpsrlw", { Vex
, XS
, Ib
}, 0 },
5004 /* PREFIX_VEX_0F71_REG_4 */
5008 { "vpsraw", { Vex
, XS
, Ib
}, 0 },
5011 /* PREFIX_VEX_0F71_REG_6 */
5015 { "vpsllw", { Vex
, XS
, Ib
}, 0 },
5018 /* PREFIX_VEX_0F72_REG_2 */
5022 { "vpsrld", { Vex
, XS
, Ib
}, 0 },
5025 /* PREFIX_VEX_0F72_REG_4 */
5029 { "vpsrad", { Vex
, XS
, Ib
}, 0 },
5032 /* PREFIX_VEX_0F72_REG_6 */
5036 { "vpslld", { Vex
, XS
, Ib
}, 0 },
5039 /* PREFIX_VEX_0F73_REG_2 */
5043 { "vpsrlq", { Vex
, XS
, Ib
}, 0 },
5046 /* PREFIX_VEX_0F73_REG_3 */
5050 { "vpsrldq", { Vex
, XS
, Ib
}, 0 },
5053 /* PREFIX_VEX_0F73_REG_6 */
5057 { "vpsllq", { Vex
, XS
, Ib
}, 0 },
5060 /* PREFIX_VEX_0F73_REG_7 */
5064 { "vpslldq", { Vex
, XS
, Ib
}, 0 },
5067 /* PREFIX_VEX_0F74 */
5071 { "vpcmpeqb", { XM
, Vex
, EXx
}, 0 },
5074 /* PREFIX_VEX_0F75 */
5078 { "vpcmpeqw", { XM
, Vex
, EXx
}, 0 },
5081 /* PREFIX_VEX_0F76 */
5085 { "vpcmpeqd", { XM
, Vex
, EXx
}, 0 },
5088 /* PREFIX_VEX_0F77 */
5090 { VEX_LEN_TABLE (VEX_LEN_0F77_P_0
) },
5093 /* PREFIX_VEX_0F7C */
5097 { "vhaddpd", { XM
, Vex
, EXx
}, 0 },
5098 { "vhaddps", { XM
, Vex
, EXx
}, 0 },
5101 /* PREFIX_VEX_0F7D */
5105 { "vhsubpd", { XM
, Vex
, EXx
}, 0 },
5106 { "vhsubps", { XM
, Vex
, EXx
}, 0 },
5109 /* PREFIX_VEX_0F7E */
5112 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1
) },
5113 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2
) },
5116 /* PREFIX_VEX_0F7F */
5119 { "vmovdqu", { EXxS
, XM
}, 0 },
5120 { "vmovdqa", { EXxS
, XM
}, 0 },
5123 /* PREFIX_VEX_0F90 */
5125 { VEX_LEN_TABLE (VEX_LEN_0F90_P_0
) },
5127 { VEX_LEN_TABLE (VEX_LEN_0F90_P_2
) },
5130 /* PREFIX_VEX_0F91 */
5132 { VEX_LEN_TABLE (VEX_LEN_0F91_P_0
) },
5134 { VEX_LEN_TABLE (VEX_LEN_0F91_P_2
) },
5137 /* PREFIX_VEX_0F92 */
5139 { VEX_LEN_TABLE (VEX_LEN_0F92_P_0
) },
5141 { VEX_LEN_TABLE (VEX_LEN_0F92_P_2
) },
5142 { VEX_LEN_TABLE (VEX_LEN_0F92_P_3
) },
5145 /* PREFIX_VEX_0F93 */
5147 { VEX_LEN_TABLE (VEX_LEN_0F93_P_0
) },
5149 { VEX_LEN_TABLE (VEX_LEN_0F93_P_2
) },
5150 { VEX_LEN_TABLE (VEX_LEN_0F93_P_3
) },
5153 /* PREFIX_VEX_0F98 */
5155 { VEX_LEN_TABLE (VEX_LEN_0F98_P_0
) },
5157 { VEX_LEN_TABLE (VEX_LEN_0F98_P_2
) },
5160 /* PREFIX_VEX_0F99 */
5162 { VEX_LEN_TABLE (VEX_LEN_0F99_P_0
) },
5164 { VEX_LEN_TABLE (VEX_LEN_0F99_P_2
) },
5167 /* PREFIX_VEX_0FC2 */
5169 { "vcmpps", { XM
, Vex
, EXx
, VCMP
}, 0 },
5170 { "vcmpss", { XMScalar
, VexScalar
, EXdScalar
, VCMP
}, 0 },
5171 { "vcmppd", { XM
, Vex
, EXx
, VCMP
}, 0 },
5172 { "vcmpsd", { XMScalar
, VexScalar
, EXqScalar
, VCMP
}, 0 },
5175 /* PREFIX_VEX_0FC4 */
5179 { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2
) },
5182 /* PREFIX_VEX_0FC5 */
5186 { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2
) },
5189 /* PREFIX_VEX_0FD0 */
5193 { "vaddsubpd", { XM
, Vex
, EXx
}, 0 },
5194 { "vaddsubps", { XM
, Vex
, EXx
}, 0 },
5197 /* PREFIX_VEX_0FD1 */
5201 { "vpsrlw", { XM
, Vex
, EXxmm
}, 0 },
5204 /* PREFIX_VEX_0FD2 */
5208 { "vpsrld", { XM
, Vex
, EXxmm
}, 0 },
5211 /* PREFIX_VEX_0FD3 */
5215 { "vpsrlq", { XM
, Vex
, EXxmm
}, 0 },
5218 /* PREFIX_VEX_0FD4 */
5222 { "vpaddq", { XM
, Vex
, EXx
}, 0 },
5225 /* PREFIX_VEX_0FD5 */
5229 { "vpmullw", { XM
, Vex
, EXx
}, 0 },
5232 /* PREFIX_VEX_0FD6 */
5236 { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2
) },
5239 /* PREFIX_VEX_0FD7 */
5243 { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2
) },
5246 /* PREFIX_VEX_0FD8 */
5250 { "vpsubusb", { XM
, Vex
, EXx
}, 0 },
5253 /* PREFIX_VEX_0FD9 */
5257 { "vpsubusw", { XM
, Vex
, EXx
}, 0 },
5260 /* PREFIX_VEX_0FDA */
5264 { "vpminub", { XM
, Vex
, EXx
}, 0 },
5267 /* PREFIX_VEX_0FDB */
5271 { "vpand", { XM
, Vex
, EXx
}, 0 },
5274 /* PREFIX_VEX_0FDC */
5278 { "vpaddusb", { XM
, Vex
, EXx
}, 0 },
5281 /* PREFIX_VEX_0FDD */
5285 { "vpaddusw", { XM
, Vex
, EXx
}, 0 },
5288 /* PREFIX_VEX_0FDE */
5292 { "vpmaxub", { XM
, Vex
, EXx
}, 0 },
5295 /* PREFIX_VEX_0FDF */
5299 { "vpandn", { XM
, Vex
, EXx
}, 0 },
5302 /* PREFIX_VEX_0FE0 */
5306 { "vpavgb", { XM
, Vex
, EXx
}, 0 },
5309 /* PREFIX_VEX_0FE1 */
5313 { "vpsraw", { XM
, Vex
, EXxmm
}, 0 },
5316 /* PREFIX_VEX_0FE2 */
5320 { "vpsrad", { XM
, Vex
, EXxmm
}, 0 },
5323 /* PREFIX_VEX_0FE3 */
5327 { "vpavgw", { XM
, Vex
, EXx
}, 0 },
5330 /* PREFIX_VEX_0FE4 */
5334 { "vpmulhuw", { XM
, Vex
, EXx
}, 0 },
5337 /* PREFIX_VEX_0FE5 */
5341 { "vpmulhw", { XM
, Vex
, EXx
}, 0 },
5344 /* PREFIX_VEX_0FE6 */
5347 { "vcvtdq2pd", { XM
, EXxmmq
}, 0 },
5348 { "vcvttpd2dq%XY", { XMM
, EXx
}, 0 },
5349 { "vcvtpd2dq%XY", { XMM
, EXx
}, 0 },
5352 /* PREFIX_VEX_0FE7 */
5356 { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2
) },
5359 /* PREFIX_VEX_0FE8 */
5363 { "vpsubsb", { XM
, Vex
, EXx
}, 0 },
5366 /* PREFIX_VEX_0FE9 */
5370 { "vpsubsw", { XM
, Vex
, EXx
}, 0 },
5373 /* PREFIX_VEX_0FEA */
5377 { "vpminsw", { XM
, Vex
, EXx
}, 0 },
5380 /* PREFIX_VEX_0FEB */
5384 { "vpor", { XM
, Vex
, EXx
}, 0 },
5387 /* PREFIX_VEX_0FEC */
5391 { "vpaddsb", { XM
, Vex
, EXx
}, 0 },
5394 /* PREFIX_VEX_0FED */
5398 { "vpaddsw", { XM
, Vex
, EXx
}, 0 },
5401 /* PREFIX_VEX_0FEE */
5405 { "vpmaxsw", { XM
, Vex
, EXx
}, 0 },
5408 /* PREFIX_VEX_0FEF */
5412 { "vpxor", { XM
, Vex
, EXx
}, 0 },
5415 /* PREFIX_VEX_0FF0 */
5420 { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3
) },
5423 /* PREFIX_VEX_0FF1 */
5427 { "vpsllw", { XM
, Vex
, EXxmm
}, 0 },
5430 /* PREFIX_VEX_0FF2 */
5434 { "vpslld", { XM
, Vex
, EXxmm
}, 0 },
5437 /* PREFIX_VEX_0FF3 */
5441 { "vpsllq", { XM
, Vex
, EXxmm
}, 0 },
5444 /* PREFIX_VEX_0FF4 */
5448 { "vpmuludq", { XM
, Vex
, EXx
}, 0 },
5451 /* PREFIX_VEX_0FF5 */
5455 { "vpmaddwd", { XM
, Vex
, EXx
}, 0 },
5458 /* PREFIX_VEX_0FF6 */
5462 { "vpsadbw", { XM
, Vex
, EXx
}, 0 },
5465 /* PREFIX_VEX_0FF7 */
5469 { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2
) },
5472 /* PREFIX_VEX_0FF8 */
5476 { "vpsubb", { XM
, Vex
, EXx
}, 0 },
5479 /* PREFIX_VEX_0FF9 */
5483 { "vpsubw", { XM
, Vex
, EXx
}, 0 },
5486 /* PREFIX_VEX_0FFA */
5490 { "vpsubd", { XM
, Vex
, EXx
}, 0 },
5493 /* PREFIX_VEX_0FFB */
5497 { "vpsubq", { XM
, Vex
, EXx
}, 0 },
5500 /* PREFIX_VEX_0FFC */
5504 { "vpaddb", { XM
, Vex
, EXx
}, 0 },
5507 /* PREFIX_VEX_0FFD */
5511 { "vpaddw", { XM
, Vex
, EXx
}, 0 },
5514 /* PREFIX_VEX_0FFE */
5518 { "vpaddd", { XM
, Vex
, EXx
}, 0 },
5521 /* PREFIX_VEX_0F3800 */
5525 { "vpshufb", { XM
, Vex
, EXx
}, 0 },
5528 /* PREFIX_VEX_0F3801 */
5532 { "vphaddw", { XM
, Vex
, EXx
}, 0 },
5535 /* PREFIX_VEX_0F3802 */
5539 { "vphaddd", { XM
, Vex
, EXx
}, 0 },
5542 /* PREFIX_VEX_0F3803 */
5546 { "vphaddsw", { XM
, Vex
, EXx
}, 0 },
5549 /* PREFIX_VEX_0F3804 */
5553 { "vpmaddubsw", { XM
, Vex
, EXx
}, 0 },
5556 /* PREFIX_VEX_0F3805 */
5560 { "vphsubw", { XM
, Vex
, EXx
}, 0 },
5563 /* PREFIX_VEX_0F3806 */
5567 { "vphsubd", { XM
, Vex
, EXx
}, 0 },
5570 /* PREFIX_VEX_0F3807 */
5574 { "vphsubsw", { XM
, Vex
, EXx
}, 0 },
5577 /* PREFIX_VEX_0F3808 */
5581 { "vpsignb", { XM
, Vex
, EXx
}, 0 },
5584 /* PREFIX_VEX_0F3809 */
5588 { "vpsignw", { XM
, Vex
, EXx
}, 0 },
5591 /* PREFIX_VEX_0F380A */
5595 { "vpsignd", { XM
, Vex
, EXx
}, 0 },
5598 /* PREFIX_VEX_0F380B */
5602 { "vpmulhrsw", { XM
, Vex
, EXx
}, 0 },
5605 /* PREFIX_VEX_0F380C */
5609 { VEX_W_TABLE (VEX_W_0F380C_P_2
) },
5612 /* PREFIX_VEX_0F380D */
5616 { VEX_W_TABLE (VEX_W_0F380D_P_2
) },
5619 /* PREFIX_VEX_0F380E */
5623 { VEX_W_TABLE (VEX_W_0F380E_P_2
) },
5626 /* PREFIX_VEX_0F380F */
5630 { VEX_W_TABLE (VEX_W_0F380F_P_2
) },
5633 /* PREFIX_VEX_0F3813 */
5637 { "vcvtph2ps", { XM
, EXxmmq
}, 0 },
5640 /* PREFIX_VEX_0F3816 */
5644 { VEX_LEN_TABLE (VEX_LEN_0F3816_P_2
) },
5647 /* PREFIX_VEX_0F3817 */
5651 { "vptest", { XM
, EXx
}, 0 },
5654 /* PREFIX_VEX_0F3818 */
5658 { VEX_W_TABLE (VEX_W_0F3818_P_2
) },
5661 /* PREFIX_VEX_0F3819 */
5665 { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2
) },
5668 /* PREFIX_VEX_0F381A */
5672 { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2
) },
5675 /* PREFIX_VEX_0F381C */
5679 { "vpabsb", { XM
, EXx
}, 0 },
5682 /* PREFIX_VEX_0F381D */
5686 { "vpabsw", { XM
, EXx
}, 0 },
5689 /* PREFIX_VEX_0F381E */
5693 { "vpabsd", { XM
, EXx
}, 0 },
5696 /* PREFIX_VEX_0F3820 */
5700 { "vpmovsxbw", { XM
, EXxmmq
}, 0 },
5703 /* PREFIX_VEX_0F3821 */
5707 { "vpmovsxbd", { XM
, EXxmmqd
}, 0 },
5710 /* PREFIX_VEX_0F3822 */
5714 { "vpmovsxbq", { XM
, EXxmmdw
}, 0 },
5717 /* PREFIX_VEX_0F3823 */
5721 { "vpmovsxwd", { XM
, EXxmmq
}, 0 },
5724 /* PREFIX_VEX_0F3824 */
5728 { "vpmovsxwq", { XM
, EXxmmqd
}, 0 },
5731 /* PREFIX_VEX_0F3825 */
5735 { "vpmovsxdq", { XM
, EXxmmq
}, 0 },
5738 /* PREFIX_VEX_0F3828 */
5742 { "vpmuldq", { XM
, Vex
, EXx
}, 0 },
5745 /* PREFIX_VEX_0F3829 */
5749 { "vpcmpeqq", { XM
, Vex
, EXx
}, 0 },
5752 /* PREFIX_VEX_0F382A */
5756 { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2
) },
5759 /* PREFIX_VEX_0F382B */
5763 { "vpackusdw", { XM
, Vex
, EXx
}, 0 },
5766 /* PREFIX_VEX_0F382C */
5770 { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2
) },
5773 /* PREFIX_VEX_0F382D */
5777 { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2
) },
5780 /* PREFIX_VEX_0F382E */
5784 { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2
) },
5787 /* PREFIX_VEX_0F382F */
5791 { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2
) },
5794 /* PREFIX_VEX_0F3830 */
5798 { "vpmovzxbw", { XM
, EXxmmq
}, 0 },
5801 /* PREFIX_VEX_0F3831 */
5805 { "vpmovzxbd", { XM
, EXxmmqd
}, 0 },
5808 /* PREFIX_VEX_0F3832 */
5812 { "vpmovzxbq", { XM
, EXxmmdw
}, 0 },
5815 /* PREFIX_VEX_0F3833 */
5819 { "vpmovzxwd", { XM
, EXxmmq
}, 0 },
5822 /* PREFIX_VEX_0F3834 */
5826 { "vpmovzxwq", { XM
, EXxmmqd
}, 0 },
5829 /* PREFIX_VEX_0F3835 */
5833 { "vpmovzxdq", { XM
, EXxmmq
}, 0 },
5836 /* PREFIX_VEX_0F3836 */
5840 { VEX_LEN_TABLE (VEX_LEN_0F3836_P_2
) },
5843 /* PREFIX_VEX_0F3837 */
5847 { "vpcmpgtq", { XM
, Vex
, EXx
}, 0 },
5850 /* PREFIX_VEX_0F3838 */
5854 { "vpminsb", { XM
, Vex
, EXx
}, 0 },
5857 /* PREFIX_VEX_0F3839 */
5861 { "vpminsd", { XM
, Vex
, EXx
}, 0 },
5864 /* PREFIX_VEX_0F383A */
5868 { "vpminuw", { XM
, Vex
, EXx
}, 0 },
5871 /* PREFIX_VEX_0F383B */
5875 { "vpminud", { XM
, Vex
, EXx
}, 0 },
5878 /* PREFIX_VEX_0F383C */
5882 { "vpmaxsb", { XM
, Vex
, EXx
}, 0 },
5885 /* PREFIX_VEX_0F383D */
5889 { "vpmaxsd", { XM
, Vex
, EXx
}, 0 },
5892 /* PREFIX_VEX_0F383E */
5896 { "vpmaxuw", { XM
, Vex
, EXx
}, 0 },
5899 /* PREFIX_VEX_0F383F */
5903 { "vpmaxud", { XM
, Vex
, EXx
}, 0 },
5906 /* PREFIX_VEX_0F3840 */
5910 { "vpmulld", { XM
, Vex
, EXx
}, 0 },
5913 /* PREFIX_VEX_0F3841 */
5917 { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2
) },
5920 /* PREFIX_VEX_0F3845 */
5924 { "vpsrlv%LW", { XM
, Vex
, EXx
}, 0 },
5927 /* PREFIX_VEX_0F3846 */
5931 { VEX_W_TABLE (VEX_W_0F3846_P_2
) },
5934 /* PREFIX_VEX_0F3847 */
5938 { "vpsllv%LW", { XM
, Vex
, EXx
}, 0 },
5941 /* PREFIX_VEX_0F3858 */
5945 { VEX_W_TABLE (VEX_W_0F3858_P_2
) },
5948 /* PREFIX_VEX_0F3859 */
5952 { VEX_W_TABLE (VEX_W_0F3859_P_2
) },
5955 /* PREFIX_VEX_0F385A */
5959 { MOD_TABLE (MOD_VEX_0F385A_PREFIX_2
) },
5962 /* PREFIX_VEX_0F3878 */
5966 { VEX_W_TABLE (VEX_W_0F3878_P_2
) },
5969 /* PREFIX_VEX_0F3879 */
5973 { VEX_W_TABLE (VEX_W_0F3879_P_2
) },
5976 /* PREFIX_VEX_0F388C */
5980 { MOD_TABLE (MOD_VEX_0F388C_PREFIX_2
) },
5983 /* PREFIX_VEX_0F388E */
5987 { MOD_TABLE (MOD_VEX_0F388E_PREFIX_2
) },
5990 /* PREFIX_VEX_0F3890 */
5994 { "vpgatherd%LW", { XM
, MVexVSIBDWpX
, Vex
}, 0 },
5997 /* PREFIX_VEX_0F3891 */
6001 { "vpgatherq%LW", { XMGatherQ
, MVexVSIBQWpX
, VexGatherQ
}, 0 },
6004 /* PREFIX_VEX_0F3892 */
6008 { "vgatherdp%XW", { XM
, MVexVSIBDWpX
, Vex
}, 0 },
6011 /* PREFIX_VEX_0F3893 */
6015 { "vgatherqp%XW", { XMGatherQ
, MVexVSIBQWpX
, VexGatherQ
}, 0 },
6018 /* PREFIX_VEX_0F3896 */
6022 { "vfmaddsub132p%XW", { XM
, Vex
, EXx
}, 0 },
6025 /* PREFIX_VEX_0F3897 */
6029 { "vfmsubadd132p%XW", { XM
, Vex
, EXx
}, 0 },
6032 /* PREFIX_VEX_0F3898 */
6036 { "vfmadd132p%XW", { XM
, Vex
, EXx
}, 0 },
6039 /* PREFIX_VEX_0F3899 */
6043 { "vfmadd132s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6046 /* PREFIX_VEX_0F389A */
6050 { "vfmsub132p%XW", { XM
, Vex
, EXx
}, 0 },
6053 /* PREFIX_VEX_0F389B */
6057 { "vfmsub132s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6060 /* PREFIX_VEX_0F389C */
6064 { "vfnmadd132p%XW", { XM
, Vex
, EXx
}, 0 },
6067 /* PREFIX_VEX_0F389D */
6071 { "vfnmadd132s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6074 /* PREFIX_VEX_0F389E */
6078 { "vfnmsub132p%XW", { XM
, Vex
, EXx
}, 0 },
6081 /* PREFIX_VEX_0F389F */
6085 { "vfnmsub132s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6088 /* PREFIX_VEX_0F38A6 */
6092 { "vfmaddsub213p%XW", { XM
, Vex
, EXx
}, 0 },
6096 /* PREFIX_VEX_0F38A7 */
6100 { "vfmsubadd213p%XW", { XM
, Vex
, EXx
}, 0 },
6103 /* PREFIX_VEX_0F38A8 */
6107 { "vfmadd213p%XW", { XM
, Vex
, EXx
}, 0 },
6110 /* PREFIX_VEX_0F38A9 */
6114 { "vfmadd213s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6117 /* PREFIX_VEX_0F38AA */
6121 { "vfmsub213p%XW", { XM
, Vex
, EXx
}, 0 },
6124 /* PREFIX_VEX_0F38AB */
6128 { "vfmsub213s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6131 /* PREFIX_VEX_0F38AC */
6135 { "vfnmadd213p%XW", { XM
, Vex
, EXx
}, 0 },
6138 /* PREFIX_VEX_0F38AD */
6142 { "vfnmadd213s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6145 /* PREFIX_VEX_0F38AE */
6149 { "vfnmsub213p%XW", { XM
, Vex
, EXx
}, 0 },
6152 /* PREFIX_VEX_0F38AF */
6156 { "vfnmsub213s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6159 /* PREFIX_VEX_0F38B6 */
6163 { "vfmaddsub231p%XW", { XM
, Vex
, EXx
}, 0 },
6166 /* PREFIX_VEX_0F38B7 */
6170 { "vfmsubadd231p%XW", { XM
, Vex
, EXx
}, 0 },
6173 /* PREFIX_VEX_0F38B8 */
6177 { "vfmadd231p%XW", { XM
, Vex
, EXx
}, 0 },
6180 /* PREFIX_VEX_0F38B9 */
6184 { "vfmadd231s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6187 /* PREFIX_VEX_0F38BA */
6191 { "vfmsub231p%XW", { XM
, Vex
, EXx
}, 0 },
6194 /* PREFIX_VEX_0F38BB */
6198 { "vfmsub231s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6201 /* PREFIX_VEX_0F38BC */
6205 { "vfnmadd231p%XW", { XM
, Vex
, EXx
}, 0 },
6208 /* PREFIX_VEX_0F38BD */
6212 { "vfnmadd231s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6215 /* PREFIX_VEX_0F38BE */
6219 { "vfnmsub231p%XW", { XM
, Vex
, EXx
}, 0 },
6222 /* PREFIX_VEX_0F38BF */
6226 { "vfnmsub231s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6229 /* PREFIX_VEX_0F38CF */
6233 { VEX_W_TABLE (VEX_W_0F38CF_P_2
) },
6236 /* PREFIX_VEX_0F38DB */
6240 { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2
) },
6243 /* PREFIX_VEX_0F38DC */
6247 { "vaesenc", { XM
, Vex
, EXx
}, 0 },
6250 /* PREFIX_VEX_0F38DD */
6254 { "vaesenclast", { XM
, Vex
, EXx
}, 0 },
6257 /* PREFIX_VEX_0F38DE */
6261 { "vaesdec", { XM
, Vex
, EXx
}, 0 },
6264 /* PREFIX_VEX_0F38DF */
6268 { "vaesdeclast", { XM
, Vex
, EXx
}, 0 },
6271 /* PREFIX_VEX_0F38F2 */
6273 { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0
) },
6276 /* PREFIX_VEX_0F38F3_REG_1 */
6278 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0
) },
6281 /* PREFIX_VEX_0F38F3_REG_2 */
6283 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0
) },
6286 /* PREFIX_VEX_0F38F3_REG_3 */
6288 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0
) },
6291 /* PREFIX_VEX_0F38F5 */
6293 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_0
) },
6294 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_1
) },
6296 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_3
) },
6299 /* PREFIX_VEX_0F38F6 */
6304 { VEX_LEN_TABLE (VEX_LEN_0F38F6_P_3
) },
6307 /* PREFIX_VEX_0F38F7 */
6309 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0
) },
6310 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_1
) },
6311 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_2
) },
6312 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_3
) },
6315 /* PREFIX_VEX_0F3A00 */
6319 { VEX_LEN_TABLE (VEX_LEN_0F3A00_P_2
) },
6322 /* PREFIX_VEX_0F3A01 */
6326 { VEX_LEN_TABLE (VEX_LEN_0F3A01_P_2
) },
6329 /* PREFIX_VEX_0F3A02 */
6333 { VEX_W_TABLE (VEX_W_0F3A02_P_2
) },
6336 /* PREFIX_VEX_0F3A04 */
6340 { VEX_W_TABLE (VEX_W_0F3A04_P_2
) },
6343 /* PREFIX_VEX_0F3A05 */
6347 { VEX_W_TABLE (VEX_W_0F3A05_P_2
) },
6350 /* PREFIX_VEX_0F3A06 */
6354 { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2
) },
6357 /* PREFIX_VEX_0F3A08 */
6361 { "vroundps", { XM
, EXx
, Ib
}, 0 },
6364 /* PREFIX_VEX_0F3A09 */
6368 { "vroundpd", { XM
, EXx
, Ib
}, 0 },
6371 /* PREFIX_VEX_0F3A0A */
6375 { "vroundss", { XMScalar
, VexScalar
, EXdScalar
, Ib
}, 0 },
6378 /* PREFIX_VEX_0F3A0B */
6382 { "vroundsd", { XMScalar
, VexScalar
, EXqScalar
, Ib
}, 0 },
6385 /* PREFIX_VEX_0F3A0C */
6389 { "vblendps", { XM
, Vex
, EXx
, Ib
}, 0 },
6392 /* PREFIX_VEX_0F3A0D */
6396 { "vblendpd", { XM
, Vex
, EXx
, Ib
}, 0 },
6399 /* PREFIX_VEX_0F3A0E */
6403 { "vpblendw", { XM
, Vex
, EXx
, Ib
}, 0 },
6406 /* PREFIX_VEX_0F3A0F */
6410 { "vpalignr", { XM
, Vex
, EXx
, Ib
}, 0 },
6413 /* PREFIX_VEX_0F3A14 */
6417 { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2
) },
6420 /* PREFIX_VEX_0F3A15 */
6424 { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2
) },
6427 /* PREFIX_VEX_0F3A16 */
6431 { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2
) },
6434 /* PREFIX_VEX_0F3A17 */
6438 { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2
) },
6441 /* PREFIX_VEX_0F3A18 */
6445 { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2
) },
6448 /* PREFIX_VEX_0F3A19 */
6452 { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2
) },
6455 /* PREFIX_VEX_0F3A1D */
6459 { "vcvtps2ph", { EXxmmq
, XM
, Ib
}, 0 },
6462 /* PREFIX_VEX_0F3A20 */
6466 { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2
) },
6469 /* PREFIX_VEX_0F3A21 */
6473 { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2
) },
6476 /* PREFIX_VEX_0F3A22 */
6480 { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2
) },
6483 /* PREFIX_VEX_0F3A30 */
6487 { VEX_LEN_TABLE (VEX_LEN_0F3A30_P_2
) },
6490 /* PREFIX_VEX_0F3A31 */
6494 { VEX_LEN_TABLE (VEX_LEN_0F3A31_P_2
) },
6497 /* PREFIX_VEX_0F3A32 */
6501 { VEX_LEN_TABLE (VEX_LEN_0F3A32_P_2
) },
6504 /* PREFIX_VEX_0F3A33 */
6508 { VEX_LEN_TABLE (VEX_LEN_0F3A33_P_2
) },
6511 /* PREFIX_VEX_0F3A38 */
6515 { VEX_LEN_TABLE (VEX_LEN_0F3A38_P_2
) },
6518 /* PREFIX_VEX_0F3A39 */
6522 { VEX_LEN_TABLE (VEX_LEN_0F3A39_P_2
) },
6525 /* PREFIX_VEX_0F3A40 */
6529 { "vdpps", { XM
, Vex
, EXx
, Ib
}, 0 },
6532 /* PREFIX_VEX_0F3A41 */
6536 { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2
) },
6539 /* PREFIX_VEX_0F3A42 */
6543 { "vmpsadbw", { XM
, Vex
, EXx
, Ib
}, 0 },
6546 /* PREFIX_VEX_0F3A44 */
6550 { "vpclmulqdq", { XM
, Vex
, EXx
, PCLMUL
}, 0 },
6553 /* PREFIX_VEX_0F3A46 */
6557 { VEX_LEN_TABLE (VEX_LEN_0F3A46_P_2
) },
6560 /* PREFIX_VEX_0F3A48 */
6564 { VEX_W_TABLE (VEX_W_0F3A48_P_2
) },
6567 /* PREFIX_VEX_0F3A49 */
6571 { VEX_W_TABLE (VEX_W_0F3A49_P_2
) },
6574 /* PREFIX_VEX_0F3A4A */
6578 { VEX_W_TABLE (VEX_W_0F3A4A_P_2
) },
6581 /* PREFIX_VEX_0F3A4B */
6585 { VEX_W_TABLE (VEX_W_0F3A4B_P_2
) },
6588 /* PREFIX_VEX_0F3A4C */
6592 { VEX_W_TABLE (VEX_W_0F3A4C_P_2
) },
6595 /* PREFIX_VEX_0F3A5C */
6599 { "vfmaddsubps", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6602 /* PREFIX_VEX_0F3A5D */
6606 { "vfmaddsubpd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6609 /* PREFIX_VEX_0F3A5E */
6613 { "vfmsubaddps", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6616 /* PREFIX_VEX_0F3A5F */
6620 { "vfmsubaddpd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6623 /* PREFIX_VEX_0F3A60 */
6627 { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2
) },
6631 /* PREFIX_VEX_0F3A61 */
6635 { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2
) },
6638 /* PREFIX_VEX_0F3A62 */
6642 { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2
) },
6645 /* PREFIX_VEX_0F3A63 */
6649 { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2
) },
6652 /* PREFIX_VEX_0F3A68 */
6656 { "vfmaddps", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6659 /* PREFIX_VEX_0F3A69 */
6663 { "vfmaddpd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6666 /* PREFIX_VEX_0F3A6A */
6670 { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2
) },
6673 /* PREFIX_VEX_0F3A6B */
6677 { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2
) },
6680 /* PREFIX_VEX_0F3A6C */
6684 { "vfmsubps", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6687 /* PREFIX_VEX_0F3A6D */
6691 { "vfmsubpd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6694 /* PREFIX_VEX_0F3A6E */
6698 { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2
) },
6701 /* PREFIX_VEX_0F3A6F */
6705 { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2
) },
6708 /* PREFIX_VEX_0F3A78 */
6712 { "vfnmaddps", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6715 /* PREFIX_VEX_0F3A79 */
6719 { "vfnmaddpd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6722 /* PREFIX_VEX_0F3A7A */
6726 { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2
) },
6729 /* PREFIX_VEX_0F3A7B */
6733 { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2
) },
6736 /* PREFIX_VEX_0F3A7C */
6740 { "vfnmsubps", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6744 /* PREFIX_VEX_0F3A7D */
6748 { "vfnmsubpd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
6751 /* PREFIX_VEX_0F3A7E */
6755 { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2
) },
6758 /* PREFIX_VEX_0F3A7F */
6762 { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2
) },
6765 /* PREFIX_VEX_0F3ACE */
6769 { VEX_W_TABLE (VEX_W_0F3ACE_P_2
) },
6772 /* PREFIX_VEX_0F3ACF */
6776 { VEX_W_TABLE (VEX_W_0F3ACF_P_2
) },
6779 /* PREFIX_VEX_0F3ADF */
6783 { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2
) },
6786 /* PREFIX_VEX_0F3AF0 */
6791 { VEX_LEN_TABLE (VEX_LEN_0F3AF0_P_3
) },
6794 #include "i386-dis-evex-prefix.h"
6797 static const struct dis386 x86_64_table
[][2] = {
6800 { "pushP", { es
}, 0 },
6805 { "popP", { es
}, 0 },
6810 { "pushP", { cs
}, 0 },
6815 { "pushP", { ss
}, 0 },
6820 { "popP", { ss
}, 0 },
6825 { "pushP", { ds
}, 0 },
6830 { "popP", { ds
}, 0 },
6835 { "daa", { XX
}, 0 },
6840 { "das", { XX
}, 0 },
6845 { "aaa", { XX
}, 0 },
6850 { "aas", { XX
}, 0 },
6855 { "pushaP", { XX
}, 0 },
6860 { "popaP", { XX
}, 0 },
6865 { MOD_TABLE (MOD_62_32BIT
) },
6866 { EVEX_TABLE (EVEX_0F
) },
6871 { "arpl", { Ew
, Gw
}, 0 },
6872 { "movs{lq|xd}", { Gv
, Ed
}, 0 },
6877 { "ins{R|}", { Yzr
, indirDX
}, 0 },
6878 { "ins{G|}", { Yzr
, indirDX
}, 0 },
6883 { "outs{R|}", { indirDXr
, Xz
}, 0 },
6884 { "outs{G|}", { indirDXr
, Xz
}, 0 },
6889 /* Opcode 0x82 is an alias of opcode 0x80 in 32-bit mode. */
6890 { REG_TABLE (REG_80
) },
6895 { "Jcall{T|}", { Ap
}, 0 },
6900 { MOD_TABLE (MOD_C4_32BIT
) },
6901 { VEX_C4_TABLE (VEX_0F
) },
6906 { MOD_TABLE (MOD_C5_32BIT
) },
6907 { VEX_C5_TABLE (VEX_0F
) },
6912 { "into", { XX
}, 0 },
6917 { "aam", { Ib
}, 0 },
6922 { "aad", { Ib
}, 0 },
6927 { "callP", { Jv
, BND
}, 0 },
6928 { "call@", { Jv
, BND
}, 0 }
6933 { "jmpP", { Jv
, BND
}, 0 },
6934 { "jmp@", { Jv
, BND
}, 0 }
6939 { "Jjmp{T|}", { Ap
}, 0 },
6942 /* X86_64_0F01_REG_0 */
6944 { "sgdt{Q|IQ}", { M
}, 0 },
6945 { "sgdt", { M
}, 0 },
6948 /* X86_64_0F01_REG_1 */
6950 { "sidt{Q|IQ}", { M
}, 0 },
6951 { "sidt", { M
}, 0 },
6954 /* X86_64_0F01_REG_2 */
6956 { "lgdt{Q|Q}", { M
}, 0 },
6957 { "lgdt", { M
}, 0 },
6960 /* X86_64_0F01_REG_3 */
6962 { "lidt{Q|Q}", { M
}, 0 },
6963 { "lidt", { M
}, 0 },
6967 static const struct dis386 three_byte_table
[][256] = {
6969 /* THREE_BYTE_0F38 */
6972 { "pshufb", { MX
, EM
}, PREFIX_OPCODE
},
6973 { "phaddw", { MX
, EM
}, PREFIX_OPCODE
},
6974 { "phaddd", { MX
, EM
}, PREFIX_OPCODE
},
6975 { "phaddsw", { MX
, EM
}, PREFIX_OPCODE
},
6976 { "pmaddubsw", { MX
, EM
}, PREFIX_OPCODE
},
6977 { "phsubw", { MX
, EM
}, PREFIX_OPCODE
},
6978 { "phsubd", { MX
, EM
}, PREFIX_OPCODE
},
6979 { "phsubsw", { MX
, EM
}, PREFIX_OPCODE
},
6981 { "psignb", { MX
, EM
}, PREFIX_OPCODE
},
6982 { "psignw", { MX
, EM
}, PREFIX_OPCODE
},
6983 { "psignd", { MX
, EM
}, PREFIX_OPCODE
},
6984 { "pmulhrsw", { MX
, EM
}, PREFIX_OPCODE
},
6990 { PREFIX_TABLE (PREFIX_0F3810
) },
6994 { PREFIX_TABLE (PREFIX_0F3814
) },
6995 { PREFIX_TABLE (PREFIX_0F3815
) },
6997 { PREFIX_TABLE (PREFIX_0F3817
) },
7003 { "pabsb", { MX
, EM
}, PREFIX_OPCODE
},
7004 { "pabsw", { MX
, EM
}, PREFIX_OPCODE
},
7005 { "pabsd", { MX
, EM
}, PREFIX_OPCODE
},
7008 { PREFIX_TABLE (PREFIX_0F3820
) },
7009 { PREFIX_TABLE (PREFIX_0F3821
) },
7010 { PREFIX_TABLE (PREFIX_0F3822
) },
7011 { PREFIX_TABLE (PREFIX_0F3823
) },
7012 { PREFIX_TABLE (PREFIX_0F3824
) },
7013 { PREFIX_TABLE (PREFIX_0F3825
) },
7017 { PREFIX_TABLE (PREFIX_0F3828
) },
7018 { PREFIX_TABLE (PREFIX_0F3829
) },
7019 { PREFIX_TABLE (PREFIX_0F382A
) },
7020 { PREFIX_TABLE (PREFIX_0F382B
) },
7026 { PREFIX_TABLE (PREFIX_0F3830
) },
7027 { PREFIX_TABLE (PREFIX_0F3831
) },
7028 { PREFIX_TABLE (PREFIX_0F3832
) },
7029 { PREFIX_TABLE (PREFIX_0F3833
) },
7030 { PREFIX_TABLE (PREFIX_0F3834
) },
7031 { PREFIX_TABLE (PREFIX_0F3835
) },
7033 { PREFIX_TABLE (PREFIX_0F3837
) },
7035 { PREFIX_TABLE (PREFIX_0F3838
) },
7036 { PREFIX_TABLE (PREFIX_0F3839
) },
7037 { PREFIX_TABLE (PREFIX_0F383A
) },
7038 { PREFIX_TABLE (PREFIX_0F383B
) },
7039 { PREFIX_TABLE (PREFIX_0F383C
) },
7040 { PREFIX_TABLE (PREFIX_0F383D
) },
7041 { PREFIX_TABLE (PREFIX_0F383E
) },
7042 { PREFIX_TABLE (PREFIX_0F383F
) },
7044 { PREFIX_TABLE (PREFIX_0F3840
) },
7045 { PREFIX_TABLE (PREFIX_0F3841
) },
7116 { PREFIX_TABLE (PREFIX_0F3880
) },
7117 { PREFIX_TABLE (PREFIX_0F3881
) },
7118 { PREFIX_TABLE (PREFIX_0F3882
) },
7197 { PREFIX_TABLE (PREFIX_0F38C8
) },
7198 { PREFIX_TABLE (PREFIX_0F38C9
) },
7199 { PREFIX_TABLE (PREFIX_0F38CA
) },
7200 { PREFIX_TABLE (PREFIX_0F38CB
) },
7201 { PREFIX_TABLE (PREFIX_0F38CC
) },
7202 { PREFIX_TABLE (PREFIX_0F38CD
) },
7204 { PREFIX_TABLE (PREFIX_0F38CF
) },
7218 { PREFIX_TABLE (PREFIX_0F38DB
) },
7219 { PREFIX_TABLE (PREFIX_0F38DC
) },
7220 { PREFIX_TABLE (PREFIX_0F38DD
) },
7221 { PREFIX_TABLE (PREFIX_0F38DE
) },
7222 { PREFIX_TABLE (PREFIX_0F38DF
) },
7242 { PREFIX_TABLE (PREFIX_0F38F0
) },
7243 { PREFIX_TABLE (PREFIX_0F38F1
) },
7247 { PREFIX_TABLE (PREFIX_0F38F5
) },
7248 { PREFIX_TABLE (PREFIX_0F38F6
) },
7251 { PREFIX_TABLE (PREFIX_0F38F8
) },
7252 { PREFIX_TABLE (PREFIX_0F38F9
) },
7260 /* THREE_BYTE_0F3A */
7272 { PREFIX_TABLE (PREFIX_0F3A08
) },
7273 { PREFIX_TABLE (PREFIX_0F3A09
) },
7274 { PREFIX_TABLE (PREFIX_0F3A0A
) },
7275 { PREFIX_TABLE (PREFIX_0F3A0B
) },
7276 { PREFIX_TABLE (PREFIX_0F3A0C
) },
7277 { PREFIX_TABLE (PREFIX_0F3A0D
) },
7278 { PREFIX_TABLE (PREFIX_0F3A0E
) },
7279 { "palignr", { MX
, EM
, Ib
}, PREFIX_OPCODE
},
7285 { PREFIX_TABLE (PREFIX_0F3A14
) },
7286 { PREFIX_TABLE (PREFIX_0F3A15
) },
7287 { PREFIX_TABLE (PREFIX_0F3A16
) },
7288 { PREFIX_TABLE (PREFIX_0F3A17
) },
7299 { PREFIX_TABLE (PREFIX_0F3A20
) },
7300 { PREFIX_TABLE (PREFIX_0F3A21
) },
7301 { PREFIX_TABLE (PREFIX_0F3A22
) },
7335 { PREFIX_TABLE (PREFIX_0F3A40
) },
7336 { PREFIX_TABLE (PREFIX_0F3A41
) },
7337 { PREFIX_TABLE (PREFIX_0F3A42
) },
7339 { PREFIX_TABLE (PREFIX_0F3A44
) },
7371 { PREFIX_TABLE (PREFIX_0F3A60
) },
7372 { PREFIX_TABLE (PREFIX_0F3A61
) },
7373 { PREFIX_TABLE (PREFIX_0F3A62
) },
7374 { PREFIX_TABLE (PREFIX_0F3A63
) },
7492 { PREFIX_TABLE (PREFIX_0F3ACC
) },
7494 { PREFIX_TABLE (PREFIX_0F3ACE
) },
7495 { PREFIX_TABLE (PREFIX_0F3ACF
) },
7513 { PREFIX_TABLE (PREFIX_0F3ADF
) },
7553 static const struct dis386 xop_table
[][256] = {
7706 { "vpmacssww", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7707 { "vpmacsswd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7708 { "vpmacssdql", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7716 { "vpmacssdd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7717 { "vpmacssdqh", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7724 { "vpmacsww", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7725 { "vpmacswd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7726 { "vpmacsdql", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7734 { "vpmacsdd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7735 { "vpmacsdqh", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7739 { "vpcmov", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7740 { "vpperm", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7743 { "vpmadcsswd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7761 { "vpmadcswd", { XMVexW
, Vex
, EXVexW
, EXVexW
}, 0 },
7773 { "vprotb", { XM
, Vex_2src_1
, Ib
}, 0 },
7774 { "vprotw", { XM
, Vex_2src_1
, Ib
}, 0 },
7775 { "vprotd", { XM
, Vex_2src_1
, Ib
}, 0 },
7776 { "vprotq", { XM
, Vex_2src_1
, Ib
}, 0 },
7786 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CC
) },
7787 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CD
) },
7788 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CE
) },
7789 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CF
) },
7822 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EC
) },
7823 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_ED
) },
7824 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EE
) },
7825 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EF
) },
7849 { REG_TABLE (REG_XOP_TBM_01
) },
7850 { REG_TABLE (REG_XOP_TBM_02
) },
7868 { REG_TABLE (REG_XOP_LWPCB
) },
7992 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80
) },
7993 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81
) },
7994 { "vfrczss", { XM
, EXd
}, 0 },
7995 { "vfrczsd", { XM
, EXq
}, 0 },
8010 { "vprotb", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8011 { "vprotw", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8012 { "vprotd", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8013 { "vprotq", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8014 { "vpshlb", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8015 { "vpshlw", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8016 { "vpshld", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8017 { "vpshlq", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8019 { "vpshab", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8020 { "vpshaw", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8021 { "vpshad", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8022 { "vpshaq", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8065 { "vphaddbw", { XM
, EXxmm
}, 0 },
8066 { "vphaddbd", { XM
, EXxmm
}, 0 },
8067 { "vphaddbq", { XM
, EXxmm
}, 0 },
8070 { "vphaddwd", { XM
, EXxmm
}, 0 },
8071 { "vphaddwq", { XM
, EXxmm
}, 0 },
8076 { "vphadddq", { XM
, EXxmm
}, 0 },
8083 { "vphaddubw", { XM
, EXxmm
}, 0 },
8084 { "vphaddubd", { XM
, EXxmm
}, 0 },
8085 { "vphaddubq", { XM
, EXxmm
}, 0 },
8088 { "vphadduwd", { XM
, EXxmm
}, 0 },
8089 { "vphadduwq", { XM
, EXxmm
}, 0 },
8094 { "vphaddudq", { XM
, EXxmm
}, 0 },
8101 { "vphsubbw", { XM
, EXxmm
}, 0 },
8102 { "vphsubwd", { XM
, EXxmm
}, 0 },
8103 { "vphsubdq", { XM
, EXxmm
}, 0 },
8157 { "bextrS", { Gdq
, Edq
, Id
}, 0 },
8159 { REG_TABLE (REG_XOP_LWP
) },
8429 static const struct dis386 vex_table
[][256] = {
8451 { PREFIX_TABLE (PREFIX_VEX_0F10
) },
8452 { PREFIX_TABLE (PREFIX_VEX_0F11
) },
8453 { PREFIX_TABLE (PREFIX_VEX_0F12
) },
8454 { MOD_TABLE (MOD_VEX_0F13
) },
8455 { "vunpcklpX", { XM
, Vex
, EXx
}, 0 },
8456 { "vunpckhpX", { XM
, Vex
, EXx
}, 0 },
8457 { PREFIX_TABLE (PREFIX_VEX_0F16
) },
8458 { MOD_TABLE (MOD_VEX_0F17
) },
8478 { "vmovapX", { XM
, EXx
}, 0 },
8479 { "vmovapX", { EXxS
, XM
}, 0 },
8480 { PREFIX_TABLE (PREFIX_VEX_0F2A
) },
8481 { MOD_TABLE (MOD_VEX_0F2B
) },
8482 { PREFIX_TABLE (PREFIX_VEX_0F2C
) },
8483 { PREFIX_TABLE (PREFIX_VEX_0F2D
) },
8484 { PREFIX_TABLE (PREFIX_VEX_0F2E
) },
8485 { PREFIX_TABLE (PREFIX_VEX_0F2F
) },
8506 { PREFIX_TABLE (PREFIX_VEX_0F41
) },
8507 { PREFIX_TABLE (PREFIX_VEX_0F42
) },
8509 { PREFIX_TABLE (PREFIX_VEX_0F44
) },
8510 { PREFIX_TABLE (PREFIX_VEX_0F45
) },
8511 { PREFIX_TABLE (PREFIX_VEX_0F46
) },
8512 { PREFIX_TABLE (PREFIX_VEX_0F47
) },
8516 { PREFIX_TABLE (PREFIX_VEX_0F4A
) },
8517 { PREFIX_TABLE (PREFIX_VEX_0F4B
) },
8523 { MOD_TABLE (MOD_VEX_0F50
) },
8524 { PREFIX_TABLE (PREFIX_VEX_0F51
) },
8525 { PREFIX_TABLE (PREFIX_VEX_0F52
) },
8526 { PREFIX_TABLE (PREFIX_VEX_0F53
) },
8527 { "vandpX", { XM
, Vex
, EXx
}, 0 },
8528 { "vandnpX", { XM
, Vex
, EXx
}, 0 },
8529 { "vorpX", { XM
, Vex
, EXx
}, 0 },
8530 { "vxorpX", { XM
, Vex
, EXx
}, 0 },
8532 { PREFIX_TABLE (PREFIX_VEX_0F58
) },
8533 { PREFIX_TABLE (PREFIX_VEX_0F59
) },
8534 { PREFIX_TABLE (PREFIX_VEX_0F5A
) },
8535 { PREFIX_TABLE (PREFIX_VEX_0F5B
) },
8536 { PREFIX_TABLE (PREFIX_VEX_0F5C
) },
8537 { PREFIX_TABLE (PREFIX_VEX_0F5D
) },
8538 { PREFIX_TABLE (PREFIX_VEX_0F5E
) },
8539 { PREFIX_TABLE (PREFIX_VEX_0F5F
) },
8541 { PREFIX_TABLE (PREFIX_VEX_0F60
) },
8542 { PREFIX_TABLE (PREFIX_VEX_0F61
) },
8543 { PREFIX_TABLE (PREFIX_VEX_0F62
) },
8544 { PREFIX_TABLE (PREFIX_VEX_0F63
) },
8545 { PREFIX_TABLE (PREFIX_VEX_0F64
) },
8546 { PREFIX_TABLE (PREFIX_VEX_0F65
) },
8547 { PREFIX_TABLE (PREFIX_VEX_0F66
) },
8548 { PREFIX_TABLE (PREFIX_VEX_0F67
) },
8550 { PREFIX_TABLE (PREFIX_VEX_0F68
) },
8551 { PREFIX_TABLE (PREFIX_VEX_0F69
) },
8552 { PREFIX_TABLE (PREFIX_VEX_0F6A
) },
8553 { PREFIX_TABLE (PREFIX_VEX_0F6B
) },
8554 { PREFIX_TABLE (PREFIX_VEX_0F6C
) },
8555 { PREFIX_TABLE (PREFIX_VEX_0F6D
) },
8556 { PREFIX_TABLE (PREFIX_VEX_0F6E
) },
8557 { PREFIX_TABLE (PREFIX_VEX_0F6F
) },
8559 { PREFIX_TABLE (PREFIX_VEX_0F70
) },
8560 { REG_TABLE (REG_VEX_0F71
) },
8561 { REG_TABLE (REG_VEX_0F72
) },
8562 { REG_TABLE (REG_VEX_0F73
) },
8563 { PREFIX_TABLE (PREFIX_VEX_0F74
) },
8564 { PREFIX_TABLE (PREFIX_VEX_0F75
) },
8565 { PREFIX_TABLE (PREFIX_VEX_0F76
) },
8566 { PREFIX_TABLE (PREFIX_VEX_0F77
) },
8572 { PREFIX_TABLE (PREFIX_VEX_0F7C
) },
8573 { PREFIX_TABLE (PREFIX_VEX_0F7D
) },
8574 { PREFIX_TABLE (PREFIX_VEX_0F7E
) },
8575 { PREFIX_TABLE (PREFIX_VEX_0F7F
) },
8595 { PREFIX_TABLE (PREFIX_VEX_0F90
) },
8596 { PREFIX_TABLE (PREFIX_VEX_0F91
) },
8597 { PREFIX_TABLE (PREFIX_VEX_0F92
) },
8598 { PREFIX_TABLE (PREFIX_VEX_0F93
) },
8604 { PREFIX_TABLE (PREFIX_VEX_0F98
) },
8605 { PREFIX_TABLE (PREFIX_VEX_0F99
) },
8628 { REG_TABLE (REG_VEX_0FAE
) },
8651 { PREFIX_TABLE (PREFIX_VEX_0FC2
) },
8653 { PREFIX_TABLE (PREFIX_VEX_0FC4
) },
8654 { PREFIX_TABLE (PREFIX_VEX_0FC5
) },
8655 { "vshufpX", { XM
, Vex
, EXx
, Ib
}, 0 },
8667 { PREFIX_TABLE (PREFIX_VEX_0FD0
) },
8668 { PREFIX_TABLE (PREFIX_VEX_0FD1
) },
8669 { PREFIX_TABLE (PREFIX_VEX_0FD2
) },
8670 { PREFIX_TABLE (PREFIX_VEX_0FD3
) },
8671 { PREFIX_TABLE (PREFIX_VEX_0FD4
) },
8672 { PREFIX_TABLE (PREFIX_VEX_0FD5
) },
8673 { PREFIX_TABLE (PREFIX_VEX_0FD6
) },
8674 { PREFIX_TABLE (PREFIX_VEX_0FD7
) },
8676 { PREFIX_TABLE (PREFIX_VEX_0FD8
) },
8677 { PREFIX_TABLE (PREFIX_VEX_0FD9
) },
8678 { PREFIX_TABLE (PREFIX_VEX_0FDA
) },
8679 { PREFIX_TABLE (PREFIX_VEX_0FDB
) },
8680 { PREFIX_TABLE (PREFIX_VEX_0FDC
) },
8681 { PREFIX_TABLE (PREFIX_VEX_0FDD
) },
8682 { PREFIX_TABLE (PREFIX_VEX_0FDE
) },
8683 { PREFIX_TABLE (PREFIX_VEX_0FDF
) },
8685 { PREFIX_TABLE (PREFIX_VEX_0FE0
) },
8686 { PREFIX_TABLE (PREFIX_VEX_0FE1
) },
8687 { PREFIX_TABLE (PREFIX_VEX_0FE2
) },
8688 { PREFIX_TABLE (PREFIX_VEX_0FE3
) },
8689 { PREFIX_TABLE (PREFIX_VEX_0FE4
) },
8690 { PREFIX_TABLE (PREFIX_VEX_0FE5
) },
8691 { PREFIX_TABLE (PREFIX_VEX_0FE6
) },
8692 { PREFIX_TABLE (PREFIX_VEX_0FE7
) },
8694 { PREFIX_TABLE (PREFIX_VEX_0FE8
) },
8695 { PREFIX_TABLE (PREFIX_VEX_0FE9
) },
8696 { PREFIX_TABLE (PREFIX_VEX_0FEA
) },
8697 { PREFIX_TABLE (PREFIX_VEX_0FEB
) },
8698 { PREFIX_TABLE (PREFIX_VEX_0FEC
) },
8699 { PREFIX_TABLE (PREFIX_VEX_0FED
) },
8700 { PREFIX_TABLE (PREFIX_VEX_0FEE
) },
8701 { PREFIX_TABLE (PREFIX_VEX_0FEF
) },
8703 { PREFIX_TABLE (PREFIX_VEX_0FF0
) },
8704 { PREFIX_TABLE (PREFIX_VEX_0FF1
) },
8705 { PREFIX_TABLE (PREFIX_VEX_0FF2
) },
8706 { PREFIX_TABLE (PREFIX_VEX_0FF3
) },
8707 { PREFIX_TABLE (PREFIX_VEX_0FF4
) },
8708 { PREFIX_TABLE (PREFIX_VEX_0FF5
) },
8709 { PREFIX_TABLE (PREFIX_VEX_0FF6
) },
8710 { PREFIX_TABLE (PREFIX_VEX_0FF7
) },
8712 { PREFIX_TABLE (PREFIX_VEX_0FF8
) },
8713 { PREFIX_TABLE (PREFIX_VEX_0FF9
) },
8714 { PREFIX_TABLE (PREFIX_VEX_0FFA
) },
8715 { PREFIX_TABLE (PREFIX_VEX_0FFB
) },
8716 { PREFIX_TABLE (PREFIX_VEX_0FFC
) },
8717 { PREFIX_TABLE (PREFIX_VEX_0FFD
) },
8718 { PREFIX_TABLE (PREFIX_VEX_0FFE
) },
8724 { PREFIX_TABLE (PREFIX_VEX_0F3800
) },
8725 { PREFIX_TABLE (PREFIX_VEX_0F3801
) },
8726 { PREFIX_TABLE (PREFIX_VEX_0F3802
) },
8727 { PREFIX_TABLE (PREFIX_VEX_0F3803
) },
8728 { PREFIX_TABLE (PREFIX_VEX_0F3804
) },
8729 { PREFIX_TABLE (PREFIX_VEX_0F3805
) },
8730 { PREFIX_TABLE (PREFIX_VEX_0F3806
) },
8731 { PREFIX_TABLE (PREFIX_VEX_0F3807
) },
8733 { PREFIX_TABLE (PREFIX_VEX_0F3808
) },
8734 { PREFIX_TABLE (PREFIX_VEX_0F3809
) },
8735 { PREFIX_TABLE (PREFIX_VEX_0F380A
) },
8736 { PREFIX_TABLE (PREFIX_VEX_0F380B
) },
8737 { PREFIX_TABLE (PREFIX_VEX_0F380C
) },
8738 { PREFIX_TABLE (PREFIX_VEX_0F380D
) },
8739 { PREFIX_TABLE (PREFIX_VEX_0F380E
) },
8740 { PREFIX_TABLE (PREFIX_VEX_0F380F
) },
8745 { PREFIX_TABLE (PREFIX_VEX_0F3813
) },
8748 { PREFIX_TABLE (PREFIX_VEX_0F3816
) },
8749 { PREFIX_TABLE (PREFIX_VEX_0F3817
) },
8751 { PREFIX_TABLE (PREFIX_VEX_0F3818
) },
8752 { PREFIX_TABLE (PREFIX_VEX_0F3819
) },
8753 { PREFIX_TABLE (PREFIX_VEX_0F381A
) },
8755 { PREFIX_TABLE (PREFIX_VEX_0F381C
) },
8756 { PREFIX_TABLE (PREFIX_VEX_0F381D
) },
8757 { PREFIX_TABLE (PREFIX_VEX_0F381E
) },
8760 { PREFIX_TABLE (PREFIX_VEX_0F3820
) },
8761 { PREFIX_TABLE (PREFIX_VEX_0F3821
) },
8762 { PREFIX_TABLE (PREFIX_VEX_0F3822
) },
8763 { PREFIX_TABLE (PREFIX_VEX_0F3823
) },
8764 { PREFIX_TABLE (PREFIX_VEX_0F3824
) },
8765 { PREFIX_TABLE (PREFIX_VEX_0F3825
) },
8769 { PREFIX_TABLE (PREFIX_VEX_0F3828
) },
8770 { PREFIX_TABLE (PREFIX_VEX_0F3829
) },
8771 { PREFIX_TABLE (PREFIX_VEX_0F382A
) },
8772 { PREFIX_TABLE (PREFIX_VEX_0F382B
) },
8773 { PREFIX_TABLE (PREFIX_VEX_0F382C
) },
8774 { PREFIX_TABLE (PREFIX_VEX_0F382D
) },
8775 { PREFIX_TABLE (PREFIX_VEX_0F382E
) },
8776 { PREFIX_TABLE (PREFIX_VEX_0F382F
) },
8778 { PREFIX_TABLE (PREFIX_VEX_0F3830
) },
8779 { PREFIX_TABLE (PREFIX_VEX_0F3831
) },
8780 { PREFIX_TABLE (PREFIX_VEX_0F3832
) },
8781 { PREFIX_TABLE (PREFIX_VEX_0F3833
) },
8782 { PREFIX_TABLE (PREFIX_VEX_0F3834
) },
8783 { PREFIX_TABLE (PREFIX_VEX_0F3835
) },
8784 { PREFIX_TABLE (PREFIX_VEX_0F3836
) },
8785 { PREFIX_TABLE (PREFIX_VEX_0F3837
) },
8787 { PREFIX_TABLE (PREFIX_VEX_0F3838
) },
8788 { PREFIX_TABLE (PREFIX_VEX_0F3839
) },
8789 { PREFIX_TABLE (PREFIX_VEX_0F383A
) },
8790 { PREFIX_TABLE (PREFIX_VEX_0F383B
) },
8791 { PREFIX_TABLE (PREFIX_VEX_0F383C
) },
8792 { PREFIX_TABLE (PREFIX_VEX_0F383D
) },
8793 { PREFIX_TABLE (PREFIX_VEX_0F383E
) },
8794 { PREFIX_TABLE (PREFIX_VEX_0F383F
) },
8796 { PREFIX_TABLE (PREFIX_VEX_0F3840
) },
8797 { PREFIX_TABLE (PREFIX_VEX_0F3841
) },
8801 { PREFIX_TABLE (PREFIX_VEX_0F3845
) },
8802 { PREFIX_TABLE (PREFIX_VEX_0F3846
) },
8803 { PREFIX_TABLE (PREFIX_VEX_0F3847
) },
8823 { PREFIX_TABLE (PREFIX_VEX_0F3858
) },
8824 { PREFIX_TABLE (PREFIX_VEX_0F3859
) },
8825 { PREFIX_TABLE (PREFIX_VEX_0F385A
) },
8859 { PREFIX_TABLE (PREFIX_VEX_0F3878
) },
8860 { PREFIX_TABLE (PREFIX_VEX_0F3879
) },
8881 { PREFIX_TABLE (PREFIX_VEX_0F388C
) },
8883 { PREFIX_TABLE (PREFIX_VEX_0F388E
) },
8886 { PREFIX_TABLE (PREFIX_VEX_0F3890
) },
8887 { PREFIX_TABLE (PREFIX_VEX_0F3891
) },
8888 { PREFIX_TABLE (PREFIX_VEX_0F3892
) },
8889 { PREFIX_TABLE (PREFIX_VEX_0F3893
) },
8892 { PREFIX_TABLE (PREFIX_VEX_0F3896
) },
8893 { PREFIX_TABLE (PREFIX_VEX_0F3897
) },
8895 { PREFIX_TABLE (PREFIX_VEX_0F3898
) },
8896 { PREFIX_TABLE (PREFIX_VEX_0F3899
) },
8897 { PREFIX_TABLE (PREFIX_VEX_0F389A
) },
8898 { PREFIX_TABLE (PREFIX_VEX_0F389B
) },
8899 { PREFIX_TABLE (PREFIX_VEX_0F389C
) },
8900 { PREFIX_TABLE (PREFIX_VEX_0F389D
) },
8901 { PREFIX_TABLE (PREFIX_VEX_0F389E
) },
8902 { PREFIX_TABLE (PREFIX_VEX_0F389F
) },
8910 { PREFIX_TABLE (PREFIX_VEX_0F38A6
) },
8911 { PREFIX_TABLE (PREFIX_VEX_0F38A7
) },
8913 { PREFIX_TABLE (PREFIX_VEX_0F38A8
) },
8914 { PREFIX_TABLE (PREFIX_VEX_0F38A9
) },
8915 { PREFIX_TABLE (PREFIX_VEX_0F38AA
) },
8916 { PREFIX_TABLE (PREFIX_VEX_0F38AB
) },
8917 { PREFIX_TABLE (PREFIX_VEX_0F38AC
) },
8918 { PREFIX_TABLE (PREFIX_VEX_0F38AD
) },
8919 { PREFIX_TABLE (PREFIX_VEX_0F38AE
) },
8920 { PREFIX_TABLE (PREFIX_VEX_0F38AF
) },
8928 { PREFIX_TABLE (PREFIX_VEX_0F38B6
) },
8929 { PREFIX_TABLE (PREFIX_VEX_0F38B7
) },
8931 { PREFIX_TABLE (PREFIX_VEX_0F38B8
) },
8932 { PREFIX_TABLE (PREFIX_VEX_0F38B9
) },
8933 { PREFIX_TABLE (PREFIX_VEX_0F38BA
) },
8934 { PREFIX_TABLE (PREFIX_VEX_0F38BB
) },
8935 { PREFIX_TABLE (PREFIX_VEX_0F38BC
) },
8936 { PREFIX_TABLE (PREFIX_VEX_0F38BD
) },
8937 { PREFIX_TABLE (PREFIX_VEX_0F38BE
) },
8938 { PREFIX_TABLE (PREFIX_VEX_0F38BF
) },
8956 { PREFIX_TABLE (PREFIX_VEX_0F38CF
) },
8970 { PREFIX_TABLE (PREFIX_VEX_0F38DB
) },
8971 { PREFIX_TABLE (PREFIX_VEX_0F38DC
) },
8972 { PREFIX_TABLE (PREFIX_VEX_0F38DD
) },
8973 { PREFIX_TABLE (PREFIX_VEX_0F38DE
) },
8974 { PREFIX_TABLE (PREFIX_VEX_0F38DF
) },
8996 { PREFIX_TABLE (PREFIX_VEX_0F38F2
) },
8997 { REG_TABLE (REG_VEX_0F38F3
) },
8999 { PREFIX_TABLE (PREFIX_VEX_0F38F5
) },
9000 { PREFIX_TABLE (PREFIX_VEX_0F38F6
) },
9001 { PREFIX_TABLE (PREFIX_VEX_0F38F7
) },
9015 { PREFIX_TABLE (PREFIX_VEX_0F3A00
) },
9016 { PREFIX_TABLE (PREFIX_VEX_0F3A01
) },
9017 { PREFIX_TABLE (PREFIX_VEX_0F3A02
) },
9019 { PREFIX_TABLE (PREFIX_VEX_0F3A04
) },
9020 { PREFIX_TABLE (PREFIX_VEX_0F3A05
) },
9021 { PREFIX_TABLE (PREFIX_VEX_0F3A06
) },
9024 { PREFIX_TABLE (PREFIX_VEX_0F3A08
) },
9025 { PREFIX_TABLE (PREFIX_VEX_0F3A09
) },
9026 { PREFIX_TABLE (PREFIX_VEX_0F3A0A
) },
9027 { PREFIX_TABLE (PREFIX_VEX_0F3A0B
) },
9028 { PREFIX_TABLE (PREFIX_VEX_0F3A0C
) },
9029 { PREFIX_TABLE (PREFIX_VEX_0F3A0D
) },
9030 { PREFIX_TABLE (PREFIX_VEX_0F3A0E
) },
9031 { PREFIX_TABLE (PREFIX_VEX_0F3A0F
) },
9037 { PREFIX_TABLE (PREFIX_VEX_0F3A14
) },
9038 { PREFIX_TABLE (PREFIX_VEX_0F3A15
) },
9039 { PREFIX_TABLE (PREFIX_VEX_0F3A16
) },
9040 { PREFIX_TABLE (PREFIX_VEX_0F3A17
) },
9042 { PREFIX_TABLE (PREFIX_VEX_0F3A18
) },
9043 { PREFIX_TABLE (PREFIX_VEX_0F3A19
) },
9047 { PREFIX_TABLE (PREFIX_VEX_0F3A1D
) },
9051 { PREFIX_TABLE (PREFIX_VEX_0F3A20
) },
9052 { PREFIX_TABLE (PREFIX_VEX_0F3A21
) },
9053 { PREFIX_TABLE (PREFIX_VEX_0F3A22
) },
9069 { PREFIX_TABLE (PREFIX_VEX_0F3A30
) },
9070 { PREFIX_TABLE (PREFIX_VEX_0F3A31
) },
9071 { PREFIX_TABLE (PREFIX_VEX_0F3A32
) },
9072 { PREFIX_TABLE (PREFIX_VEX_0F3A33
) },
9078 { PREFIX_TABLE (PREFIX_VEX_0F3A38
) },
9079 { PREFIX_TABLE (PREFIX_VEX_0F3A39
) },
9087 { PREFIX_TABLE (PREFIX_VEX_0F3A40
) },
9088 { PREFIX_TABLE (PREFIX_VEX_0F3A41
) },
9089 { PREFIX_TABLE (PREFIX_VEX_0F3A42
) },
9091 { PREFIX_TABLE (PREFIX_VEX_0F3A44
) },
9093 { PREFIX_TABLE (PREFIX_VEX_0F3A46
) },
9096 { PREFIX_TABLE (PREFIX_VEX_0F3A48
) },
9097 { PREFIX_TABLE (PREFIX_VEX_0F3A49
) },
9098 { PREFIX_TABLE (PREFIX_VEX_0F3A4A
) },
9099 { PREFIX_TABLE (PREFIX_VEX_0F3A4B
) },
9100 { PREFIX_TABLE (PREFIX_VEX_0F3A4C
) },
9118 { PREFIX_TABLE (PREFIX_VEX_0F3A5C
) },
9119 { PREFIX_TABLE (PREFIX_VEX_0F3A5D
) },
9120 { PREFIX_TABLE (PREFIX_VEX_0F3A5E
) },
9121 { PREFIX_TABLE (PREFIX_VEX_0F3A5F
) },
9123 { PREFIX_TABLE (PREFIX_VEX_0F3A60
) },
9124 { PREFIX_TABLE (PREFIX_VEX_0F3A61
) },
9125 { PREFIX_TABLE (PREFIX_VEX_0F3A62
) },
9126 { PREFIX_TABLE (PREFIX_VEX_0F3A63
) },
9132 { PREFIX_TABLE (PREFIX_VEX_0F3A68
) },
9133 { PREFIX_TABLE (PREFIX_VEX_0F3A69
) },
9134 { PREFIX_TABLE (PREFIX_VEX_0F3A6A
) },
9135 { PREFIX_TABLE (PREFIX_VEX_0F3A6B
) },
9136 { PREFIX_TABLE (PREFIX_VEX_0F3A6C
) },
9137 { PREFIX_TABLE (PREFIX_VEX_0F3A6D
) },
9138 { PREFIX_TABLE (PREFIX_VEX_0F3A6E
) },
9139 { PREFIX_TABLE (PREFIX_VEX_0F3A6F
) },
9150 { PREFIX_TABLE (PREFIX_VEX_0F3A78
) },
9151 { PREFIX_TABLE (PREFIX_VEX_0F3A79
) },
9152 { PREFIX_TABLE (PREFIX_VEX_0F3A7A
) },
9153 { PREFIX_TABLE (PREFIX_VEX_0F3A7B
) },
9154 { PREFIX_TABLE (PREFIX_VEX_0F3A7C
) },
9155 { PREFIX_TABLE (PREFIX_VEX_0F3A7D
) },
9156 { PREFIX_TABLE (PREFIX_VEX_0F3A7E
) },
9157 { PREFIX_TABLE (PREFIX_VEX_0F3A7F
) },
9246 { PREFIX_TABLE(PREFIX_VEX_0F3ACE
) },
9247 { PREFIX_TABLE(PREFIX_VEX_0F3ACF
) },
9265 { PREFIX_TABLE (PREFIX_VEX_0F3ADF
) },
9285 { PREFIX_TABLE (PREFIX_VEX_0F3AF0
) },
9305 #include "i386-dis-evex.h"
9307 static const struct dis386 vex_len_table
[][2] = {
9308 /* VEX_LEN_0F12_P_0_M_0 */
9310 { "vmovlps", { XM
, Vex128
, EXq
}, 0 },
9313 /* VEX_LEN_0F12_P_0_M_1 */
9315 { "vmovhlps", { XM
, Vex128
, EXq
}, 0 },
9318 /* VEX_LEN_0F12_P_2 */
9320 { "vmovlpd", { XM
, Vex128
, EXq
}, 0 },
9323 /* VEX_LEN_0F13_M_0 */
9325 { "vmovlpX", { EXq
, XM
}, 0 },
9328 /* VEX_LEN_0F16_P_0_M_0 */
9330 { "vmovhps", { XM
, Vex128
, EXq
}, 0 },
9333 /* VEX_LEN_0F16_P_0_M_1 */
9335 { "vmovlhps", { XM
, Vex128
, EXq
}, 0 },
9338 /* VEX_LEN_0F16_P_2 */
9340 { "vmovhpd", { XM
, Vex128
, EXq
}, 0 },
9343 /* VEX_LEN_0F17_M_0 */
9345 { "vmovhpX", { EXq
, XM
}, 0 },
9348 /* VEX_LEN_0F41_P_0 */
9351 { VEX_W_TABLE (VEX_W_0F41_P_0_LEN_1
) },
9353 /* VEX_LEN_0F41_P_2 */
9356 { VEX_W_TABLE (VEX_W_0F41_P_2_LEN_1
) },
9358 /* VEX_LEN_0F42_P_0 */
9361 { VEX_W_TABLE (VEX_W_0F42_P_0_LEN_1
) },
9363 /* VEX_LEN_0F42_P_2 */
9366 { VEX_W_TABLE (VEX_W_0F42_P_2_LEN_1
) },
9368 /* VEX_LEN_0F44_P_0 */
9370 { VEX_W_TABLE (VEX_W_0F44_P_0_LEN_0
) },
9372 /* VEX_LEN_0F44_P_2 */
9374 { VEX_W_TABLE (VEX_W_0F44_P_2_LEN_0
) },
9376 /* VEX_LEN_0F45_P_0 */
9379 { VEX_W_TABLE (VEX_W_0F45_P_0_LEN_1
) },
9381 /* VEX_LEN_0F45_P_2 */
9384 { VEX_W_TABLE (VEX_W_0F45_P_2_LEN_1
) },
9386 /* VEX_LEN_0F46_P_0 */
9389 { VEX_W_TABLE (VEX_W_0F46_P_0_LEN_1
) },
9391 /* VEX_LEN_0F46_P_2 */
9394 { VEX_W_TABLE (VEX_W_0F46_P_2_LEN_1
) },
9396 /* VEX_LEN_0F47_P_0 */
9399 { VEX_W_TABLE (VEX_W_0F47_P_0_LEN_1
) },
9401 /* VEX_LEN_0F47_P_2 */
9404 { VEX_W_TABLE (VEX_W_0F47_P_2_LEN_1
) },
9406 /* VEX_LEN_0F4A_P_0 */
9409 { VEX_W_TABLE (VEX_W_0F4A_P_0_LEN_1
) },
9411 /* VEX_LEN_0F4A_P_2 */
9414 { VEX_W_TABLE (VEX_W_0F4A_P_2_LEN_1
) },
9416 /* VEX_LEN_0F4B_P_0 */
9419 { VEX_W_TABLE (VEX_W_0F4B_P_0_LEN_1
) },
9421 /* VEX_LEN_0F4B_P_2 */
9424 { VEX_W_TABLE (VEX_W_0F4B_P_2_LEN_1
) },
9427 /* VEX_LEN_0F6E_P_2 */
9429 { "vmovK", { XMScalar
, Edq
}, 0 },
9432 /* VEX_LEN_0F77_P_1 */
9434 { "vzeroupper", { XX
}, 0 },
9435 { "vzeroall", { XX
}, 0 },
9438 /* VEX_LEN_0F7E_P_1 */
9440 { "vmovq", { XMScalar
, EXqScalar
}, 0 },
9443 /* VEX_LEN_0F7E_P_2 */
9445 { "vmovK", { Edq
, XMScalar
}, 0 },
9448 /* VEX_LEN_0F90_P_0 */
9450 { VEX_W_TABLE (VEX_W_0F90_P_0_LEN_0
) },
9453 /* VEX_LEN_0F90_P_2 */
9455 { VEX_W_TABLE (VEX_W_0F90_P_2_LEN_0
) },
9458 /* VEX_LEN_0F91_P_0 */
9460 { VEX_W_TABLE (VEX_W_0F91_P_0_LEN_0
) },
9463 /* VEX_LEN_0F91_P_2 */
9465 { VEX_W_TABLE (VEX_W_0F91_P_2_LEN_0
) },
9468 /* VEX_LEN_0F92_P_0 */
9470 { VEX_W_TABLE (VEX_W_0F92_P_0_LEN_0
) },
9473 /* VEX_LEN_0F92_P_2 */
9475 { VEX_W_TABLE (VEX_W_0F92_P_2_LEN_0
) },
9478 /* VEX_LEN_0F92_P_3 */
9480 { MOD_TABLE (MOD_VEX_0F92_P_3_LEN_0
) },
9483 /* VEX_LEN_0F93_P_0 */
9485 { VEX_W_TABLE (VEX_W_0F93_P_0_LEN_0
) },
9488 /* VEX_LEN_0F93_P_2 */
9490 { VEX_W_TABLE (VEX_W_0F93_P_2_LEN_0
) },
9493 /* VEX_LEN_0F93_P_3 */
9495 { MOD_TABLE (MOD_VEX_0F93_P_3_LEN_0
) },
9498 /* VEX_LEN_0F98_P_0 */
9500 { VEX_W_TABLE (VEX_W_0F98_P_0_LEN_0
) },
9503 /* VEX_LEN_0F98_P_2 */
9505 { VEX_W_TABLE (VEX_W_0F98_P_2_LEN_0
) },
9508 /* VEX_LEN_0F99_P_0 */
9510 { VEX_W_TABLE (VEX_W_0F99_P_0_LEN_0
) },
9513 /* VEX_LEN_0F99_P_2 */
9515 { VEX_W_TABLE (VEX_W_0F99_P_2_LEN_0
) },
9518 /* VEX_LEN_0FAE_R_2_M_0 */
9520 { "vldmxcsr", { Md
}, 0 },
9523 /* VEX_LEN_0FAE_R_3_M_0 */
9525 { "vstmxcsr", { Md
}, 0 },
9528 /* VEX_LEN_0FC4_P_2 */
9530 { "vpinsrw", { XM
, Vex128
, Edqw
, Ib
}, 0 },
9533 /* VEX_LEN_0FC5_P_2 */
9535 { "vpextrw", { Gdq
, XS
, Ib
}, 0 },
9538 /* VEX_LEN_0FD6_P_2 */
9540 { "vmovq", { EXqScalarS
, XMScalar
}, 0 },
9543 /* VEX_LEN_0FF7_P_2 */
9545 { "vmaskmovdqu", { XM
, XS
}, 0 },
9548 /* VEX_LEN_0F3816_P_2 */
9551 { VEX_W_TABLE (VEX_W_0F3816_P_2
) },
9554 /* VEX_LEN_0F3819_P_2 */
9557 { VEX_W_TABLE (VEX_W_0F3819_P_2
) },
9560 /* VEX_LEN_0F381A_P_2_M_0 */
9563 { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0
) },
9566 /* VEX_LEN_0F3836_P_2 */
9569 { VEX_W_TABLE (VEX_W_0F3836_P_2
) },
9572 /* VEX_LEN_0F3841_P_2 */
9574 { "vphminposuw", { XM
, EXx
}, 0 },
9577 /* VEX_LEN_0F385A_P_2_M_0 */
9580 { VEX_W_TABLE (VEX_W_0F385A_P_2_M_0
) },
9583 /* VEX_LEN_0F38DB_P_2 */
9585 { "vaesimc", { XM
, EXx
}, 0 },
9588 /* VEX_LEN_0F38F2_P_0 */
9590 { "andnS", { Gdq
, VexGdq
, Edq
}, 0 },
9593 /* VEX_LEN_0F38F3_R_1_P_0 */
9595 { "blsrS", { VexGdq
, Edq
}, 0 },
9598 /* VEX_LEN_0F38F3_R_2_P_0 */
9600 { "blsmskS", { VexGdq
, Edq
}, 0 },
9603 /* VEX_LEN_0F38F3_R_3_P_0 */
9605 { "blsiS", { VexGdq
, Edq
}, 0 },
9608 /* VEX_LEN_0F38F5_P_0 */
9610 { "bzhiS", { Gdq
, Edq
, VexGdq
}, 0 },
9613 /* VEX_LEN_0F38F5_P_1 */
9615 { "pextS", { Gdq
, VexGdq
, Edq
}, 0 },
9618 /* VEX_LEN_0F38F5_P_3 */
9620 { "pdepS", { Gdq
, VexGdq
, Edq
}, 0 },
9623 /* VEX_LEN_0F38F6_P_3 */
9625 { "mulxS", { Gdq
, VexGdq
, Edq
}, 0 },
9628 /* VEX_LEN_0F38F7_P_0 */
9630 { "bextrS", { Gdq
, Edq
, VexGdq
}, 0 },
9633 /* VEX_LEN_0F38F7_P_1 */
9635 { "sarxS", { Gdq
, Edq
, VexGdq
}, 0 },
9638 /* VEX_LEN_0F38F7_P_2 */
9640 { "shlxS", { Gdq
, Edq
, VexGdq
}, 0 },
9643 /* VEX_LEN_0F38F7_P_3 */
9645 { "shrxS", { Gdq
, Edq
, VexGdq
}, 0 },
9648 /* VEX_LEN_0F3A00_P_2 */
9651 { VEX_W_TABLE (VEX_W_0F3A00_P_2
) },
9654 /* VEX_LEN_0F3A01_P_2 */
9657 { VEX_W_TABLE (VEX_W_0F3A01_P_2
) },
9660 /* VEX_LEN_0F3A06_P_2 */
9663 { VEX_W_TABLE (VEX_W_0F3A06_P_2
) },
9666 /* VEX_LEN_0F3A14_P_2 */
9668 { "vpextrb", { Edqb
, XM
, Ib
}, 0 },
9671 /* VEX_LEN_0F3A15_P_2 */
9673 { "vpextrw", { Edqw
, XM
, Ib
}, 0 },
9676 /* VEX_LEN_0F3A16_P_2 */
9678 { "vpextrK", { Edq
, XM
, Ib
}, 0 },
9681 /* VEX_LEN_0F3A17_P_2 */
9683 { "vextractps", { Edqd
, XM
, Ib
}, 0 },
9686 /* VEX_LEN_0F3A18_P_2 */
9689 { VEX_W_TABLE (VEX_W_0F3A18_P_2
) },
9692 /* VEX_LEN_0F3A19_P_2 */
9695 { VEX_W_TABLE (VEX_W_0F3A19_P_2
) },
9698 /* VEX_LEN_0F3A20_P_2 */
9700 { "vpinsrb", { XM
, Vex128
, Edqb
, Ib
}, 0 },
9703 /* VEX_LEN_0F3A21_P_2 */
9705 { "vinsertps", { XM
, Vex128
, EXd
, Ib
}, 0 },
9708 /* VEX_LEN_0F3A22_P_2 */
9710 { "vpinsrK", { XM
, Vex128
, Edq
, Ib
}, 0 },
9713 /* VEX_LEN_0F3A30_P_2 */
9715 { VEX_W_TABLE (VEX_W_0F3A30_P_2_LEN_0
) },
9718 /* VEX_LEN_0F3A31_P_2 */
9720 { VEX_W_TABLE (VEX_W_0F3A31_P_2_LEN_0
) },
9723 /* VEX_LEN_0F3A32_P_2 */
9725 { VEX_W_TABLE (VEX_W_0F3A32_P_2_LEN_0
) },
9728 /* VEX_LEN_0F3A33_P_2 */
9730 { VEX_W_TABLE (VEX_W_0F3A33_P_2_LEN_0
) },
9733 /* VEX_LEN_0F3A38_P_2 */
9736 { VEX_W_TABLE (VEX_W_0F3A38_P_2
) },
9739 /* VEX_LEN_0F3A39_P_2 */
9742 { VEX_W_TABLE (VEX_W_0F3A39_P_2
) },
9745 /* VEX_LEN_0F3A41_P_2 */
9747 { "vdppd", { XM
, Vex128
, EXx
, Ib
}, 0 },
9750 /* VEX_LEN_0F3A46_P_2 */
9753 { VEX_W_TABLE (VEX_W_0F3A46_P_2
) },
9756 /* VEX_LEN_0F3A60_P_2 */
9758 { "vpcmpestrm", { XM
, { PCMPESTR_Fixup
, x_mode
}, Ib
}, 0 },
9761 /* VEX_LEN_0F3A61_P_2 */
9763 { "vpcmpestri", { XM
, { PCMPESTR_Fixup
, x_mode
}, Ib
}, 0 },
9766 /* VEX_LEN_0F3A62_P_2 */
9768 { "vpcmpistrm", { XM
, EXx
, Ib
}, 0 },
9771 /* VEX_LEN_0F3A63_P_2 */
9773 { "vpcmpistri", { XM
, EXx
, Ib
}, 0 },
9776 /* VEX_LEN_0F3A6A_P_2 */
9778 { "vfmaddss", { XMVexW
, Vex128
, EXdVexW
, EXdVexW
}, 0 },
9781 /* VEX_LEN_0F3A6B_P_2 */
9783 { "vfmaddsd", { XMVexW
, Vex128
, EXqVexW
, EXqVexW
}, 0 },
9786 /* VEX_LEN_0F3A6E_P_2 */
9788 { "vfmsubss", { XMVexW
, Vex128
, EXdVexW
, EXdVexW
}, 0 },
9791 /* VEX_LEN_0F3A6F_P_2 */
9793 { "vfmsubsd", { XMVexW
, Vex128
, EXqVexW
, EXqVexW
}, 0 },
9796 /* VEX_LEN_0F3A7A_P_2 */
9798 { "vfnmaddss", { XMVexW
, Vex128
, EXdVexW
, EXdVexW
}, 0 },
9801 /* VEX_LEN_0F3A7B_P_2 */
9803 { "vfnmaddsd", { XMVexW
, Vex128
, EXqVexW
, EXqVexW
}, 0 },
9806 /* VEX_LEN_0F3A7E_P_2 */
9808 { "vfnmsubss", { XMVexW
, Vex128
, EXdVexW
, EXdVexW
}, 0 },
9811 /* VEX_LEN_0F3A7F_P_2 */
9813 { "vfnmsubsd", { XMVexW
, Vex128
, EXqVexW
, EXqVexW
}, 0 },
9816 /* VEX_LEN_0F3ADF_P_2 */
9818 { "vaeskeygenassist", { XM
, EXx
, Ib
}, 0 },
9821 /* VEX_LEN_0F3AF0_P_3 */
9823 { "rorxS", { Gdq
, Edq
, Ib
}, 0 },
9826 /* VEX_LEN_0FXOP_08_CC */
9828 { "vpcomb", { XM
, Vex128
, EXx
, VPCOM
}, 0 },
9831 /* VEX_LEN_0FXOP_08_CD */
9833 { "vpcomw", { XM
, Vex128
, EXx
, VPCOM
}, 0 },
9836 /* VEX_LEN_0FXOP_08_CE */
9838 { "vpcomd", { XM
, Vex128
, EXx
, VPCOM
}, 0 },
9841 /* VEX_LEN_0FXOP_08_CF */
9843 { "vpcomq", { XM
, Vex128
, EXx
, VPCOM
}, 0 },
9846 /* VEX_LEN_0FXOP_08_EC */
9848 { "vpcomub", { XM
, Vex128
, EXx
, VPCOM
}, 0 },
9851 /* VEX_LEN_0FXOP_08_ED */
9853 { "vpcomuw", { XM
, Vex128
, EXx
, VPCOM
}, 0 },
9856 /* VEX_LEN_0FXOP_08_EE */
9858 { "vpcomud", { XM
, Vex128
, EXx
, VPCOM
}, 0 },
9861 /* VEX_LEN_0FXOP_08_EF */
9863 { "vpcomuq", { XM
, Vex128
, EXx
, VPCOM
}, 0 },
9866 /* VEX_LEN_0FXOP_09_80 */
9868 { "vfrczps", { XM
, EXxmm
}, 0 },
9869 { "vfrczps", { XM
, EXymmq
}, 0 },
9872 /* VEX_LEN_0FXOP_09_81 */
9874 { "vfrczpd", { XM
, EXxmm
}, 0 },
9875 { "vfrczpd", { XM
, EXymmq
}, 0 },
9879 #include "i386-dis-evex-len.h"
9881 static const struct dis386 vex_w_table
[][2] = {
9883 /* VEX_W_0F41_P_0_LEN_1 */
9884 { MOD_TABLE (MOD_VEX_W_0_0F41_P_0_LEN_1
) },
9885 { MOD_TABLE (MOD_VEX_W_1_0F41_P_0_LEN_1
) },
9888 /* VEX_W_0F41_P_2_LEN_1 */
9889 { MOD_TABLE (MOD_VEX_W_0_0F41_P_2_LEN_1
) },
9890 { MOD_TABLE (MOD_VEX_W_1_0F41_P_2_LEN_1
) }
9893 /* VEX_W_0F42_P_0_LEN_1 */
9894 { MOD_TABLE (MOD_VEX_W_0_0F42_P_0_LEN_1
) },
9895 { MOD_TABLE (MOD_VEX_W_1_0F42_P_0_LEN_1
) },
9898 /* VEX_W_0F42_P_2_LEN_1 */
9899 { MOD_TABLE (MOD_VEX_W_0_0F42_P_2_LEN_1
) },
9900 { MOD_TABLE (MOD_VEX_W_1_0F42_P_2_LEN_1
) },
9903 /* VEX_W_0F44_P_0_LEN_0 */
9904 { MOD_TABLE (MOD_VEX_W_0_0F44_P_0_LEN_1
) },
9905 { MOD_TABLE (MOD_VEX_W_1_0F44_P_0_LEN_1
) },
9908 /* VEX_W_0F44_P_2_LEN_0 */
9909 { MOD_TABLE (MOD_VEX_W_0_0F44_P_2_LEN_1
) },
9910 { MOD_TABLE (MOD_VEX_W_1_0F44_P_2_LEN_1
) },
9913 /* VEX_W_0F45_P_0_LEN_1 */
9914 { MOD_TABLE (MOD_VEX_W_0_0F45_P_0_LEN_1
) },
9915 { MOD_TABLE (MOD_VEX_W_1_0F45_P_0_LEN_1
) },
9918 /* VEX_W_0F45_P_2_LEN_1 */
9919 { MOD_TABLE (MOD_VEX_W_0_0F45_P_2_LEN_1
) },
9920 { MOD_TABLE (MOD_VEX_W_1_0F45_P_2_LEN_1
) },
9923 /* VEX_W_0F46_P_0_LEN_1 */
9924 { MOD_TABLE (MOD_VEX_W_0_0F46_P_0_LEN_1
) },
9925 { MOD_TABLE (MOD_VEX_W_1_0F46_P_0_LEN_1
) },
9928 /* VEX_W_0F46_P_2_LEN_1 */
9929 { MOD_TABLE (MOD_VEX_W_0_0F46_P_2_LEN_1
) },
9930 { MOD_TABLE (MOD_VEX_W_1_0F46_P_2_LEN_1
) },
9933 /* VEX_W_0F47_P_0_LEN_1 */
9934 { MOD_TABLE (MOD_VEX_W_0_0F47_P_0_LEN_1
) },
9935 { MOD_TABLE (MOD_VEX_W_1_0F47_P_0_LEN_1
) },
9938 /* VEX_W_0F47_P_2_LEN_1 */
9939 { MOD_TABLE (MOD_VEX_W_0_0F47_P_2_LEN_1
) },
9940 { MOD_TABLE (MOD_VEX_W_1_0F47_P_2_LEN_1
) },
9943 /* VEX_W_0F4A_P_0_LEN_1 */
9944 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_0_LEN_1
) },
9945 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_0_LEN_1
) },
9948 /* VEX_W_0F4A_P_2_LEN_1 */
9949 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_2_LEN_1
) },
9950 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_2_LEN_1
) },
9953 /* VEX_W_0F4B_P_0_LEN_1 */
9954 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_0_LEN_1
) },
9955 { MOD_TABLE (MOD_VEX_W_1_0F4B_P_0_LEN_1
) },
9958 /* VEX_W_0F4B_P_2_LEN_1 */
9959 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_2_LEN_1
) },
9962 /* VEX_W_0F90_P_0_LEN_0 */
9963 { "kmovw", { MaskG
, MaskE
}, 0 },
9964 { "kmovq", { MaskG
, MaskE
}, 0 },
9967 /* VEX_W_0F90_P_2_LEN_0 */
9968 { "kmovb", { MaskG
, MaskBDE
}, 0 },
9969 { "kmovd", { MaskG
, MaskBDE
}, 0 },
9972 /* VEX_W_0F91_P_0_LEN_0 */
9973 { MOD_TABLE (MOD_VEX_W_0_0F91_P_0_LEN_0
) },
9974 { MOD_TABLE (MOD_VEX_W_1_0F91_P_0_LEN_0
) },
9977 /* VEX_W_0F91_P_2_LEN_0 */
9978 { MOD_TABLE (MOD_VEX_W_0_0F91_P_2_LEN_0
) },
9979 { MOD_TABLE (MOD_VEX_W_1_0F91_P_2_LEN_0
) },
9982 /* VEX_W_0F92_P_0_LEN_0 */
9983 { MOD_TABLE (MOD_VEX_W_0_0F92_P_0_LEN_0
) },
9986 /* VEX_W_0F92_P_2_LEN_0 */
9987 { MOD_TABLE (MOD_VEX_W_0_0F92_P_2_LEN_0
) },
9990 /* VEX_W_0F93_P_0_LEN_0 */
9991 { MOD_TABLE (MOD_VEX_W_0_0F93_P_0_LEN_0
) },
9994 /* VEX_W_0F93_P_2_LEN_0 */
9995 { MOD_TABLE (MOD_VEX_W_0_0F93_P_2_LEN_0
) },
9998 /* VEX_W_0F98_P_0_LEN_0 */
9999 { MOD_TABLE (MOD_VEX_W_0_0F98_P_0_LEN_0
) },
10000 { MOD_TABLE (MOD_VEX_W_1_0F98_P_0_LEN_0
) },
10003 /* VEX_W_0F98_P_2_LEN_0 */
10004 { MOD_TABLE (MOD_VEX_W_0_0F98_P_2_LEN_0
) },
10005 { MOD_TABLE (MOD_VEX_W_1_0F98_P_2_LEN_0
) },
10008 /* VEX_W_0F99_P_0_LEN_0 */
10009 { MOD_TABLE (MOD_VEX_W_0_0F99_P_0_LEN_0
) },
10010 { MOD_TABLE (MOD_VEX_W_1_0F99_P_0_LEN_0
) },
10013 /* VEX_W_0F99_P_2_LEN_0 */
10014 { MOD_TABLE (MOD_VEX_W_0_0F99_P_2_LEN_0
) },
10015 { MOD_TABLE (MOD_VEX_W_1_0F99_P_2_LEN_0
) },
10018 /* VEX_W_0F380C_P_2 */
10019 { "vpermilps", { XM
, Vex
, EXx
}, 0 },
10022 /* VEX_W_0F380D_P_2 */
10023 { "vpermilpd", { XM
, Vex
, EXx
}, 0 },
10026 /* VEX_W_0F380E_P_2 */
10027 { "vtestps", { XM
, EXx
}, 0 },
10030 /* VEX_W_0F380F_P_2 */
10031 { "vtestpd", { XM
, EXx
}, 0 },
10034 /* VEX_W_0F3816_P_2 */
10035 { "vpermps", { XM
, Vex
, EXx
}, 0 },
10038 /* VEX_W_0F3818_P_2 */
10039 { "vbroadcastss", { XM
, EXxmm_md
}, 0 },
10042 /* VEX_W_0F3819_P_2 */
10043 { "vbroadcastsd", { XM
, EXxmm_mq
}, 0 },
10046 /* VEX_W_0F381A_P_2_M_0 */
10047 { "vbroadcastf128", { XM
, Mxmm
}, 0 },
10050 /* VEX_W_0F382C_P_2_M_0 */
10051 { "vmaskmovps", { XM
, Vex
, Mx
}, 0 },
10054 /* VEX_W_0F382D_P_2_M_0 */
10055 { "vmaskmovpd", { XM
, Vex
, Mx
}, 0 },
10058 /* VEX_W_0F382E_P_2_M_0 */
10059 { "vmaskmovps", { Mx
, Vex
, XM
}, 0 },
10062 /* VEX_W_0F382F_P_2_M_0 */
10063 { "vmaskmovpd", { Mx
, Vex
, XM
}, 0 },
10066 /* VEX_W_0F3836_P_2 */
10067 { "vpermd", { XM
, Vex
, EXx
}, 0 },
10070 /* VEX_W_0F3846_P_2 */
10071 { "vpsravd", { XM
, Vex
, EXx
}, 0 },
10074 /* VEX_W_0F3858_P_2 */
10075 { "vpbroadcastd", { XM
, EXxmm_md
}, 0 },
10078 /* VEX_W_0F3859_P_2 */
10079 { "vpbroadcastq", { XM
, EXxmm_mq
}, 0 },
10082 /* VEX_W_0F385A_P_2_M_0 */
10083 { "vbroadcasti128", { XM
, Mxmm
}, 0 },
10086 /* VEX_W_0F3878_P_2 */
10087 { "vpbroadcastb", { XM
, EXxmm_mb
}, 0 },
10090 /* VEX_W_0F3879_P_2 */
10091 { "vpbroadcastw", { XM
, EXxmm_mw
}, 0 },
10094 /* VEX_W_0F38CF_P_2 */
10095 { "vgf2p8mulb", { XM
, Vex
, EXx
}, 0 },
10098 /* VEX_W_0F3A00_P_2 */
10100 { "vpermq", { XM
, EXx
, Ib
}, 0 },
10103 /* VEX_W_0F3A01_P_2 */
10105 { "vpermpd", { XM
, EXx
, Ib
}, 0 },
10108 /* VEX_W_0F3A02_P_2 */
10109 { "vpblendd", { XM
, Vex
, EXx
, Ib
}, 0 },
10112 /* VEX_W_0F3A04_P_2 */
10113 { "vpermilps", { XM
, EXx
, Ib
}, 0 },
10116 /* VEX_W_0F3A05_P_2 */
10117 { "vpermilpd", { XM
, EXx
, Ib
}, 0 },
10120 /* VEX_W_0F3A06_P_2 */
10121 { "vperm2f128", { XM
, Vex256
, EXx
, Ib
}, 0 },
10124 /* VEX_W_0F3A18_P_2 */
10125 { "vinsertf128", { XM
, Vex256
, EXxmm
, Ib
}, 0 },
10128 /* VEX_W_0F3A19_P_2 */
10129 { "vextractf128", { EXxmm
, XM
, Ib
}, 0 },
10132 /* VEX_W_0F3A30_P_2_LEN_0 */
10133 { MOD_TABLE (MOD_VEX_W_0_0F3A30_P_2_LEN_0
) },
10134 { MOD_TABLE (MOD_VEX_W_1_0F3A30_P_2_LEN_0
) },
10137 /* VEX_W_0F3A31_P_2_LEN_0 */
10138 { MOD_TABLE (MOD_VEX_W_0_0F3A31_P_2_LEN_0
) },
10139 { MOD_TABLE (MOD_VEX_W_1_0F3A31_P_2_LEN_0
) },
10142 /* VEX_W_0F3A32_P_2_LEN_0 */
10143 { MOD_TABLE (MOD_VEX_W_0_0F3A32_P_2_LEN_0
) },
10144 { MOD_TABLE (MOD_VEX_W_1_0F3A32_P_2_LEN_0
) },
10147 /* VEX_W_0F3A33_P_2_LEN_0 */
10148 { MOD_TABLE (MOD_VEX_W_0_0F3A33_P_2_LEN_0
) },
10149 { MOD_TABLE (MOD_VEX_W_1_0F3A33_P_2_LEN_0
) },
10152 /* VEX_W_0F3A38_P_2 */
10153 { "vinserti128", { XM
, Vex256
, EXxmm
, Ib
}, 0 },
10156 /* VEX_W_0F3A39_P_2 */
10157 { "vextracti128", { EXxmm
, XM
, Ib
}, 0 },
10160 /* VEX_W_0F3A46_P_2 */
10161 { "vperm2i128", { XM
, Vex256
, EXx
, Ib
}, 0 },
10164 /* VEX_W_0F3A48_P_2 */
10165 { "vpermil2ps", { XMVexW
, Vex
, EXVexImmW
, EXVexImmW
, EXVexImmW
}, 0 },
10166 { "vpermil2ps", { XMVexW
, Vex
, EXVexImmW
, EXVexImmW
, EXVexImmW
}, 0 },
10169 /* VEX_W_0F3A49_P_2 */
10170 { "vpermil2pd", { XMVexW
, Vex
, EXVexImmW
, EXVexImmW
, EXVexImmW
}, 0 },
10171 { "vpermil2pd", { XMVexW
, Vex
, EXVexImmW
, EXVexImmW
, EXVexImmW
}, 0 },
10174 /* VEX_W_0F3A4A_P_2 */
10175 { "vblendvps", { XM
, Vex
, EXx
, XMVexI4
}, 0 },
10178 /* VEX_W_0F3A4B_P_2 */
10179 { "vblendvpd", { XM
, Vex
, EXx
, XMVexI4
}, 0 },
10182 /* VEX_W_0F3A4C_P_2 */
10183 { "vpblendvb", { XM
, Vex
, EXx
, XMVexI4
}, 0 },
10186 /* VEX_W_0F3ACE_P_2 */
10188 { "vgf2p8affineqb", { XM
, Vex
, EXx
, Ib
}, 0 },
10191 /* VEX_W_0F3ACF_P_2 */
10193 { "vgf2p8affineinvqb", { XM
, Vex
, EXx
, Ib
}, 0 },
10196 #include "i386-dis-evex-w.h"
10199 static const struct dis386 mod_table
[][2] = {
10202 { "leaS", { Gv
, M
}, 0 },
10207 { RM_TABLE (RM_C6_REG_7
) },
10212 { RM_TABLE (RM_C7_REG_7
) },
10216 { "Jcall^", { indirEp
}, 0 },
10220 { "Jjmp^", { indirEp
}, 0 },
10223 /* MOD_0F01_REG_0 */
10224 { X86_64_TABLE (X86_64_0F01_REG_0
) },
10225 { RM_TABLE (RM_0F01_REG_0
) },
10228 /* MOD_0F01_REG_1 */
10229 { X86_64_TABLE (X86_64_0F01_REG_1
) },
10230 { RM_TABLE (RM_0F01_REG_1
) },
10233 /* MOD_0F01_REG_2 */
10234 { X86_64_TABLE (X86_64_0F01_REG_2
) },
10235 { RM_TABLE (RM_0F01_REG_2
) },
10238 /* MOD_0F01_REG_3 */
10239 { X86_64_TABLE (X86_64_0F01_REG_3
) },
10240 { RM_TABLE (RM_0F01_REG_3
) },
10243 /* MOD_0F01_REG_5 */
10244 { PREFIX_TABLE (PREFIX_0F01_REG_5_MOD_0
) },
10245 { RM_TABLE (RM_0F01_REG_5_MOD_3
) },
10248 /* MOD_0F01_REG_7 */
10249 { "invlpg", { Mb
}, 0 },
10250 { RM_TABLE (RM_0F01_REG_7_MOD_3
) },
10253 /* MOD_0F12_PREFIX_0 */
10254 { "movlps", { XM
, EXq
}, PREFIX_OPCODE
},
10255 { "movhlps", { XM
, EXq
}, PREFIX_OPCODE
},
10259 { "movlpX", { EXq
, XM
}, PREFIX_OPCODE
},
10262 /* MOD_0F16_PREFIX_0 */
10263 { "movhps", { XM
, EXq
}, 0 },
10264 { "movlhps", { XM
, EXq
}, 0 },
10268 { "movhpX", { EXq
, XM
}, PREFIX_OPCODE
},
10271 /* MOD_0F18_REG_0 */
10272 { "prefetchnta", { Mb
}, 0 },
10275 /* MOD_0F18_REG_1 */
10276 { "prefetcht0", { Mb
}, 0 },
10279 /* MOD_0F18_REG_2 */
10280 { "prefetcht1", { Mb
}, 0 },
10283 /* MOD_0F18_REG_3 */
10284 { "prefetcht2", { Mb
}, 0 },
10287 /* MOD_0F18_REG_4 */
10288 { "nop/reserved", { Mb
}, 0 },
10291 /* MOD_0F18_REG_5 */
10292 { "nop/reserved", { Mb
}, 0 },
10295 /* MOD_0F18_REG_6 */
10296 { "nop/reserved", { Mb
}, 0 },
10299 /* MOD_0F18_REG_7 */
10300 { "nop/reserved", { Mb
}, 0 },
10303 /* MOD_0F1A_PREFIX_0 */
10304 { "bndldx", { Gbnd
, Mv_bnd
}, 0 },
10305 { "nopQ", { Ev
}, 0 },
10308 /* MOD_0F1B_PREFIX_0 */
10309 { "bndstx", { Mv_bnd
, Gbnd
}, 0 },
10310 { "nopQ", { Ev
}, 0 },
10313 /* MOD_0F1B_PREFIX_1 */
10314 { "bndmk", { Gbnd
, Mv_bnd
}, 0 },
10315 { "nopQ", { Ev
}, 0 },
10318 /* MOD_0F1C_PREFIX_0 */
10319 { REG_TABLE (REG_0F1C_P_0_MOD_0
) },
10320 { "nopQ", { Ev
}, 0 },
10323 /* MOD_0F1E_PREFIX_1 */
10324 { "nopQ", { Ev
}, 0 },
10325 { REG_TABLE (REG_0F1E_P_1_MOD_3
) },
10330 { "movL", { Rd
, Td
}, 0 },
10335 { "movL", { Td
, Rd
}, 0 },
10338 /* MOD_0F2B_PREFIX_0 */
10339 {"movntps", { Mx
, XM
}, PREFIX_OPCODE
},
10342 /* MOD_0F2B_PREFIX_1 */
10343 {"movntss", { Md
, XM
}, PREFIX_OPCODE
},
10346 /* MOD_0F2B_PREFIX_2 */
10347 {"movntpd", { Mx
, XM
}, PREFIX_OPCODE
},
10350 /* MOD_0F2B_PREFIX_3 */
10351 {"movntsd", { Mq
, XM
}, PREFIX_OPCODE
},
10356 { "movmskpX", { Gdq
, XS
}, PREFIX_OPCODE
},
10359 /* MOD_0F71_REG_2 */
10361 { "psrlw", { MS
, Ib
}, 0 },
10364 /* MOD_0F71_REG_4 */
10366 { "psraw", { MS
, Ib
}, 0 },
10369 /* MOD_0F71_REG_6 */
10371 { "psllw", { MS
, Ib
}, 0 },
10374 /* MOD_0F72_REG_2 */
10376 { "psrld", { MS
, Ib
}, 0 },
10379 /* MOD_0F72_REG_4 */
10381 { "psrad", { MS
, Ib
}, 0 },
10384 /* MOD_0F72_REG_6 */
10386 { "pslld", { MS
, Ib
}, 0 },
10389 /* MOD_0F73_REG_2 */
10391 { "psrlq", { MS
, Ib
}, 0 },
10394 /* MOD_0F73_REG_3 */
10396 { PREFIX_TABLE (PREFIX_0F73_REG_3
) },
10399 /* MOD_0F73_REG_6 */
10401 { "psllq", { MS
, Ib
}, 0 },
10404 /* MOD_0F73_REG_7 */
10406 { PREFIX_TABLE (PREFIX_0F73_REG_7
) },
10409 /* MOD_0FAE_REG_0 */
10410 { "fxsave", { FXSAVE
}, 0 },
10411 { PREFIX_TABLE (PREFIX_0FAE_REG_0_MOD_3
) },
10414 /* MOD_0FAE_REG_1 */
10415 { "fxrstor", { FXSAVE
}, 0 },
10416 { PREFIX_TABLE (PREFIX_0FAE_REG_1_MOD_3
) },
10419 /* MOD_0FAE_REG_2 */
10420 { "ldmxcsr", { Md
}, 0 },
10421 { PREFIX_TABLE (PREFIX_0FAE_REG_2_MOD_3
) },
10424 /* MOD_0FAE_REG_3 */
10425 { "stmxcsr", { Md
}, 0 },
10426 { PREFIX_TABLE (PREFIX_0FAE_REG_3_MOD_3
) },
10429 /* MOD_0FAE_REG_4 */
10430 { PREFIX_TABLE (PREFIX_0FAE_REG_4_MOD_0
) },
10431 { PREFIX_TABLE (PREFIX_0FAE_REG_4_MOD_3
) },
10434 /* MOD_0FAE_REG_5 */
10435 { PREFIX_TABLE (PREFIX_0FAE_REG_5_MOD_0
) },
10436 { PREFIX_TABLE (PREFIX_0FAE_REG_5_MOD_3
) },
10439 /* MOD_0FAE_REG_6 */
10440 { PREFIX_TABLE (PREFIX_0FAE_REG_6_MOD_0
) },
10441 { PREFIX_TABLE (PREFIX_0FAE_REG_6_MOD_3
) },
10444 /* MOD_0FAE_REG_7 */
10445 { PREFIX_TABLE (PREFIX_0FAE_REG_7_MOD_0
) },
10446 { RM_TABLE (RM_0FAE_REG_7_MOD_3
) },
10450 { "lssS", { Gv
, Mp
}, 0 },
10454 { "lfsS", { Gv
, Mp
}, 0 },
10458 { "lgsS", { Gv
, Mp
}, 0 },
10462 { PREFIX_TABLE (PREFIX_0FC3_MOD_0
) },
10465 /* MOD_0FC7_REG_3 */
10466 { "xrstors", { FXSAVE
}, 0 },
10469 /* MOD_0FC7_REG_4 */
10470 { "xsavec", { FXSAVE
}, 0 },
10473 /* MOD_0FC7_REG_5 */
10474 { "xsaves", { FXSAVE
}, 0 },
10477 /* MOD_0FC7_REG_6 */
10478 { PREFIX_TABLE (PREFIX_0FC7_REG_6_MOD_0
) },
10479 { PREFIX_TABLE (PREFIX_0FC7_REG_6_MOD_3
) }
10482 /* MOD_0FC7_REG_7 */
10483 { "vmptrst", { Mq
}, 0 },
10484 { PREFIX_TABLE (PREFIX_0FC7_REG_7_MOD_3
) }
10489 { "pmovmskb", { Gdq
, MS
}, 0 },
10492 /* MOD_0FE7_PREFIX_2 */
10493 { "movntdq", { Mx
, XM
}, 0 },
10496 /* MOD_0FF0_PREFIX_3 */
10497 { "lddqu", { XM
, M
}, 0 },
10500 /* MOD_0F382A_PREFIX_2 */
10501 { "movntdqa", { XM
, Mx
}, 0 },
10504 /* MOD_0F38F5_PREFIX_2 */
10505 { "wrussK", { M
, Gdq
}, PREFIX_OPCODE
},
10508 /* MOD_0F38F6_PREFIX_0 */
10509 { "wrssK", { M
, Gdq
}, PREFIX_OPCODE
},
10512 /* MOD_0F38F8_PREFIX_1 */
10513 { "enqcmds", { Gva
, M
}, PREFIX_OPCODE
},
10516 /* MOD_0F38F8_PREFIX_2 */
10517 { "movdir64b", { Gva
, M
}, PREFIX_OPCODE
},
10520 /* MOD_0F38F8_PREFIX_3 */
10521 { "enqcmd", { Gva
, M
}, PREFIX_OPCODE
},
10524 /* MOD_0F38F9_PREFIX_0 */
10525 { "movdiri", { Em
, Gv
}, PREFIX_OPCODE
},
10529 { "bound{S|}", { Gv
, Ma
}, 0 },
10530 { EVEX_TABLE (EVEX_0F
) },
10534 { "lesS", { Gv
, Mp
}, 0 },
10535 { VEX_C4_TABLE (VEX_0F
) },
10539 { "ldsS", { Gv
, Mp
}, 0 },
10540 { VEX_C5_TABLE (VEX_0F
) },
10543 /* MOD_VEX_0F12_PREFIX_0 */
10544 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0
) },
10545 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1
) },
10549 { VEX_LEN_TABLE (VEX_LEN_0F13_M_0
) },
10552 /* MOD_VEX_0F16_PREFIX_0 */
10553 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0
) },
10554 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1
) },
10558 { VEX_LEN_TABLE (VEX_LEN_0F17_M_0
) },
10562 { "vmovntpX", { Mx
, XM
}, 0 },
10565 /* MOD_VEX_W_0_0F41_P_0_LEN_1 */
10567 { "kandw", { MaskG
, MaskVex
, MaskR
}, 0 },
10570 /* MOD_VEX_W_1_0F41_P_0_LEN_1 */
10572 { "kandq", { MaskG
, MaskVex
, MaskR
}, 0 },
10575 /* MOD_VEX_W_0_0F41_P_2_LEN_1 */
10577 { "kandb", { MaskG
, MaskVex
, MaskR
}, 0 },
10580 /* MOD_VEX_W_1_0F41_P_2_LEN_1 */
10582 { "kandd", { MaskG
, MaskVex
, MaskR
}, 0 },
10585 /* MOD_VEX_W_0_0F42_P_0_LEN_1 */
10587 { "kandnw", { MaskG
, MaskVex
, MaskR
}, 0 },
10590 /* MOD_VEX_W_1_0F42_P_0_LEN_1 */
10592 { "kandnq", { MaskG
, MaskVex
, MaskR
}, 0 },
10595 /* MOD_VEX_W_0_0F42_P_2_LEN_1 */
10597 { "kandnb", { MaskG
, MaskVex
, MaskR
}, 0 },
10600 /* MOD_VEX_W_1_0F42_P_2_LEN_1 */
10602 { "kandnd", { MaskG
, MaskVex
, MaskR
}, 0 },
10605 /* MOD_VEX_W_0_0F44_P_0_LEN_0 */
10607 { "knotw", { MaskG
, MaskR
}, 0 },
10610 /* MOD_VEX_W_1_0F44_P_0_LEN_0 */
10612 { "knotq", { MaskG
, MaskR
}, 0 },
10615 /* MOD_VEX_W_0_0F44_P_2_LEN_0 */
10617 { "knotb", { MaskG
, MaskR
}, 0 },
10620 /* MOD_VEX_W_1_0F44_P_2_LEN_0 */
10622 { "knotd", { MaskG
, MaskR
}, 0 },
10625 /* MOD_VEX_W_0_0F45_P_0_LEN_1 */
10627 { "korw", { MaskG
, MaskVex
, MaskR
}, 0 },
10630 /* MOD_VEX_W_1_0F45_P_0_LEN_1 */
10632 { "korq", { MaskG
, MaskVex
, MaskR
}, 0 },
10635 /* MOD_VEX_W_0_0F45_P_2_LEN_1 */
10637 { "korb", { MaskG
, MaskVex
, MaskR
}, 0 },
10640 /* MOD_VEX_W_1_0F45_P_2_LEN_1 */
10642 { "kord", { MaskG
, MaskVex
, MaskR
}, 0 },
10645 /* MOD_VEX_W_0_0F46_P_0_LEN_1 */
10647 { "kxnorw", { MaskG
, MaskVex
, MaskR
}, 0 },
10650 /* MOD_VEX_W_1_0F46_P_0_LEN_1 */
10652 { "kxnorq", { MaskG
, MaskVex
, MaskR
}, 0 },
10655 /* MOD_VEX_W_0_0F46_P_2_LEN_1 */
10657 { "kxnorb", { MaskG
, MaskVex
, MaskR
}, 0 },
10660 /* MOD_VEX_W_1_0F46_P_2_LEN_1 */
10662 { "kxnord", { MaskG
, MaskVex
, MaskR
}, 0 },
10665 /* MOD_VEX_W_0_0F47_P_0_LEN_1 */
10667 { "kxorw", { MaskG
, MaskVex
, MaskR
}, 0 },
10670 /* MOD_VEX_W_1_0F47_P_0_LEN_1 */
10672 { "kxorq", { MaskG
, MaskVex
, MaskR
}, 0 },
10675 /* MOD_VEX_W_0_0F47_P_2_LEN_1 */
10677 { "kxorb", { MaskG
, MaskVex
, MaskR
}, 0 },
10680 /* MOD_VEX_W_1_0F47_P_2_LEN_1 */
10682 { "kxord", { MaskG
, MaskVex
, MaskR
}, 0 },
10685 /* MOD_VEX_W_0_0F4A_P_0_LEN_1 */
10687 { "kaddw", { MaskG
, MaskVex
, MaskR
}, 0 },
10690 /* MOD_VEX_W_1_0F4A_P_0_LEN_1 */
10692 { "kaddq", { MaskG
, MaskVex
, MaskR
}, 0 },
10695 /* MOD_VEX_W_0_0F4A_P_2_LEN_1 */
10697 { "kaddb", { MaskG
, MaskVex
, MaskR
}, 0 },
10700 /* MOD_VEX_W_1_0F4A_P_2_LEN_1 */
10702 { "kaddd", { MaskG
, MaskVex
, MaskR
}, 0 },
10705 /* MOD_VEX_W_0_0F4B_P_0_LEN_1 */
10707 { "kunpckwd", { MaskG
, MaskVex
, MaskR
}, 0 },
10710 /* MOD_VEX_W_1_0F4B_P_0_LEN_1 */
10712 { "kunpckdq", { MaskG
, MaskVex
, MaskR
}, 0 },
10715 /* MOD_VEX_W_0_0F4B_P_2_LEN_1 */
10717 { "kunpckbw", { MaskG
, MaskVex
, MaskR
}, 0 },
10722 { "vmovmskpX", { Gdq
, XS
}, 0 },
10725 /* MOD_VEX_0F71_REG_2 */
10727 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2
) },
10730 /* MOD_VEX_0F71_REG_4 */
10732 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4
) },
10735 /* MOD_VEX_0F71_REG_6 */
10737 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6
) },
10740 /* MOD_VEX_0F72_REG_2 */
10742 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2
) },
10745 /* MOD_VEX_0F72_REG_4 */
10747 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4
) },
10750 /* MOD_VEX_0F72_REG_6 */
10752 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6
) },
10755 /* MOD_VEX_0F73_REG_2 */
10757 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2
) },
10760 /* MOD_VEX_0F73_REG_3 */
10762 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3
) },
10765 /* MOD_VEX_0F73_REG_6 */
10767 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6
) },
10770 /* MOD_VEX_0F73_REG_7 */
10772 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7
) },
10775 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
10776 { "kmovw", { Ew
, MaskG
}, 0 },
10780 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
10781 { "kmovq", { Eq
, MaskG
}, 0 },
10785 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
10786 { "kmovb", { Eb
, MaskG
}, 0 },
10790 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
10791 { "kmovd", { Ed
, MaskG
}, 0 },
10795 /* MOD_VEX_W_0_0F92_P_0_LEN_0 */
10797 { "kmovw", { MaskG
, Rdq
}, 0 },
10800 /* MOD_VEX_W_0_0F92_P_2_LEN_0 */
10802 { "kmovb", { MaskG
, Rdq
}, 0 },
10805 /* MOD_VEX_0F92_P_3_LEN_0 */
10807 { "kmovK", { MaskG
, Rdq
}, 0 },
10810 /* MOD_VEX_W_0_0F93_P_0_LEN_0 */
10812 { "kmovw", { Gdq
, MaskR
}, 0 },
10815 /* MOD_VEX_W_0_0F93_P_2_LEN_0 */
10817 { "kmovb", { Gdq
, MaskR
}, 0 },
10820 /* MOD_VEX_0F93_P_3_LEN_0 */
10822 { "kmovK", { Gdq
, MaskR
}, 0 },
10825 /* MOD_VEX_W_0_0F98_P_0_LEN_0 */
10827 { "kortestw", { MaskG
, MaskR
}, 0 },
10830 /* MOD_VEX_W_1_0F98_P_0_LEN_0 */
10832 { "kortestq", { MaskG
, MaskR
}, 0 },
10835 /* MOD_VEX_W_0_0F98_P_2_LEN_0 */
10837 { "kortestb", { MaskG
, MaskR
}, 0 },
10840 /* MOD_VEX_W_1_0F98_P_2_LEN_0 */
10842 { "kortestd", { MaskG
, MaskR
}, 0 },
10845 /* MOD_VEX_W_0_0F99_P_0_LEN_0 */
10847 { "ktestw", { MaskG
, MaskR
}, 0 },
10850 /* MOD_VEX_W_1_0F99_P_0_LEN_0 */
10852 { "ktestq", { MaskG
, MaskR
}, 0 },
10855 /* MOD_VEX_W_0_0F99_P_2_LEN_0 */
10857 { "ktestb", { MaskG
, MaskR
}, 0 },
10860 /* MOD_VEX_W_1_0F99_P_2_LEN_0 */
10862 { "ktestd", { MaskG
, MaskR
}, 0 },
10865 /* MOD_VEX_0FAE_REG_2 */
10866 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0
) },
10869 /* MOD_VEX_0FAE_REG_3 */
10870 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0
) },
10873 /* MOD_VEX_0FD7_PREFIX_2 */
10875 { "vpmovmskb", { Gdq
, XS
}, 0 },
10878 /* MOD_VEX_0FE7_PREFIX_2 */
10879 { "vmovntdq", { Mx
, XM
}, 0 },
10882 /* MOD_VEX_0FF0_PREFIX_3 */
10883 { "vlddqu", { XM
, M
}, 0 },
10886 /* MOD_VEX_0F381A_PREFIX_2 */
10887 { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0
) },
10890 /* MOD_VEX_0F382A_PREFIX_2 */
10891 { "vmovntdqa", { XM
, Mx
}, 0 },
10894 /* MOD_VEX_0F382C_PREFIX_2 */
10895 { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0
) },
10898 /* MOD_VEX_0F382D_PREFIX_2 */
10899 { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0
) },
10902 /* MOD_VEX_0F382E_PREFIX_2 */
10903 { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0
) },
10906 /* MOD_VEX_0F382F_PREFIX_2 */
10907 { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0
) },
10910 /* MOD_VEX_0F385A_PREFIX_2 */
10911 { VEX_LEN_TABLE (VEX_LEN_0F385A_P_2_M_0
) },
10914 /* MOD_VEX_0F388C_PREFIX_2 */
10915 { "vpmaskmov%LW", { XM
, Vex
, Mx
}, 0 },
10918 /* MOD_VEX_0F388E_PREFIX_2 */
10919 { "vpmaskmov%LW", { Mx
, Vex
, XM
}, 0 },
10922 /* MOD_VEX_W_0_0F3A30_P_2_LEN_0 */
10924 { "kshiftrb", { MaskG
, MaskR
, Ib
}, 0 },
10927 /* MOD_VEX_W_1_0F3A30_P_2_LEN_0 */
10929 { "kshiftrw", { MaskG
, MaskR
, Ib
}, 0 },
10932 /* MOD_VEX_W_0_0F3A31_P_2_LEN_0 */
10934 { "kshiftrd", { MaskG
, MaskR
, Ib
}, 0 },
10937 /* MOD_VEX_W_1_0F3A31_P_2_LEN_0 */
10939 { "kshiftrq", { MaskG
, MaskR
, Ib
}, 0 },
10942 /* MOD_VEX_W_0_0F3A32_P_2_LEN_0 */
10944 { "kshiftlb", { MaskG
, MaskR
, Ib
}, 0 },
10947 /* MOD_VEX_W_1_0F3A32_P_2_LEN_0 */
10949 { "kshiftlw", { MaskG
, MaskR
, Ib
}, 0 },
10952 /* MOD_VEX_W_0_0F3A33_P_2_LEN_0 */
10954 { "kshiftld", { MaskG
, MaskR
, Ib
}, 0 },
10957 /* MOD_VEX_W_1_0F3A33_P_2_LEN_0 */
10959 { "kshiftlq", { MaskG
, MaskR
, Ib
}, 0 },
10962 #include "i386-dis-evex-mod.h"
10965 static const struct dis386 rm_table
[][8] = {
10968 { "xabort", { Skip_MODRM
, Ib
}, 0 },
10972 { "xbeginT", { Skip_MODRM
, Jv
}, 0 },
10975 /* RM_0F01_REG_0 */
10976 { "enclv", { Skip_MODRM
}, 0 },
10977 { "vmcall", { Skip_MODRM
}, 0 },
10978 { "vmlaunch", { Skip_MODRM
}, 0 },
10979 { "vmresume", { Skip_MODRM
}, 0 },
10980 { "vmxoff", { Skip_MODRM
}, 0 },
10981 { "pconfig", { Skip_MODRM
}, 0 },
10984 /* RM_0F01_REG_1 */
10985 { "monitor", { { OP_Monitor
, 0 } }, 0 },
10986 { "mwait", { { OP_Mwait
, 0 } }, 0 },
10987 { "clac", { Skip_MODRM
}, 0 },
10988 { "stac", { Skip_MODRM
}, 0 },
10992 { "encls", { Skip_MODRM
}, 0 },
10995 /* RM_0F01_REG_2 */
10996 { "xgetbv", { Skip_MODRM
}, 0 },
10997 { "xsetbv", { Skip_MODRM
}, 0 },
11000 { "vmfunc", { Skip_MODRM
}, 0 },
11001 { "xend", { Skip_MODRM
}, 0 },
11002 { "xtest", { Skip_MODRM
}, 0 },
11003 { "enclu", { Skip_MODRM
}, 0 },
11006 /* RM_0F01_REG_3 */
11007 { "vmrun", { Skip_MODRM
}, 0 },
11008 { "vmmcall", { Skip_MODRM
}, 0 },
11009 { "vmload", { Skip_MODRM
}, 0 },
11010 { "vmsave", { Skip_MODRM
}, 0 },
11011 { "stgi", { Skip_MODRM
}, 0 },
11012 { "clgi", { Skip_MODRM
}, 0 },
11013 { "skinit", { Skip_MODRM
}, 0 },
11014 { "invlpga", { Skip_MODRM
}, 0 },
11017 /* RM_0F01_REG_5_MOD_3 */
11018 { PREFIX_TABLE (PREFIX_0F01_REG_5_MOD_3_RM_0
) },
11020 { PREFIX_TABLE (PREFIX_0F01_REG_5_MOD_3_RM_2
) },
11024 { "rdpkru", { Skip_MODRM
}, 0 },
11025 { "wrpkru", { Skip_MODRM
}, 0 },
11028 /* RM_0F01_REG_7_MOD_3 */
11029 { "swapgs", { Skip_MODRM
}, 0 },
11030 { "rdtscp", { Skip_MODRM
}, 0 },
11031 { PREFIX_TABLE (PREFIX_0F01_REG_7_MOD_3_RM_2
) },
11032 { PREFIX_TABLE (PREFIX_0F01_REG_7_MOD_3_RM_3
) },
11033 { "clzero", { Skip_MODRM
}, 0 },
11034 { "rdpru", { Skip_MODRM
}, 0 },
11037 /* RM_0F1E_P_1_MOD_3_REG_7 */
11038 { "nopQ", { Ev
}, 0 },
11039 { "nopQ", { Ev
}, 0 },
11040 { "endbr64", { Skip_MODRM
}, PREFIX_OPCODE
},
11041 { "endbr32", { Skip_MODRM
}, PREFIX_OPCODE
},
11042 { "nopQ", { Ev
}, 0 },
11043 { "nopQ", { Ev
}, 0 },
11044 { "nopQ", { Ev
}, 0 },
11045 { "nopQ", { Ev
}, 0 },
11048 /* RM_0FAE_REG_6_MOD_3 */
11049 { "mfence", { Skip_MODRM
}, 0 },
11052 /* RM_0FAE_REG_7_MOD_3 */
11053 { "sfence", { Skip_MODRM
}, 0 },
11058 #define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
11060 /* We use the high bit to indicate different name for the same
11062 #define REP_PREFIX (0xf3 | 0x100)
11063 #define XACQUIRE_PREFIX (0xf2 | 0x200)
11064 #define XRELEASE_PREFIX (0xf3 | 0x400)
11065 #define BND_PREFIX (0xf2 | 0x400)
11066 #define NOTRACK_PREFIX (0x3e | 0x100)
11071 int newrex
, i
, length
;
11077 last_lock_prefix
= -1;
11078 last_repz_prefix
= -1;
11079 last_repnz_prefix
= -1;
11080 last_data_prefix
= -1;
11081 last_addr_prefix
= -1;
11082 last_rex_prefix
= -1;
11083 last_seg_prefix
= -1;
11085 active_seg_prefix
= 0;
11086 for (i
= 0; i
< (int) ARRAY_SIZE (all_prefixes
); i
++)
11087 all_prefixes
[i
] = 0;
11090 /* The maximum instruction length is 15bytes. */
11091 while (length
< MAX_CODE_LENGTH
- 1)
11093 FETCH_DATA (the_info
, codep
+ 1);
11097 /* REX prefixes family. */
11114 if (address_mode
== mode_64bit
)
11118 last_rex_prefix
= i
;
11121 prefixes
|= PREFIX_REPZ
;
11122 last_repz_prefix
= i
;
11125 prefixes
|= PREFIX_REPNZ
;
11126 last_repnz_prefix
= i
;
11129 prefixes
|= PREFIX_LOCK
;
11130 last_lock_prefix
= i
;
11133 prefixes
|= PREFIX_CS
;
11134 last_seg_prefix
= i
;
11135 active_seg_prefix
= PREFIX_CS
;
11138 prefixes
|= PREFIX_SS
;
11139 last_seg_prefix
= i
;
11140 active_seg_prefix
= PREFIX_SS
;
11143 prefixes
|= PREFIX_DS
;
11144 last_seg_prefix
= i
;
11145 active_seg_prefix
= PREFIX_DS
;
11148 prefixes
|= PREFIX_ES
;
11149 last_seg_prefix
= i
;
11150 active_seg_prefix
= PREFIX_ES
;
11153 prefixes
|= PREFIX_FS
;
11154 last_seg_prefix
= i
;
11155 active_seg_prefix
= PREFIX_FS
;
11158 prefixes
|= PREFIX_GS
;
11159 last_seg_prefix
= i
;
11160 active_seg_prefix
= PREFIX_GS
;
11163 prefixes
|= PREFIX_DATA
;
11164 last_data_prefix
= i
;
11167 prefixes
|= PREFIX_ADDR
;
11168 last_addr_prefix
= i
;
11171 /* fwait is really an instruction. If there are prefixes
11172 before the fwait, they belong to the fwait, *not* to the
11173 following instruction. */
11175 if (prefixes
|| rex
)
11177 prefixes
|= PREFIX_FWAIT
;
11179 /* This ensures that the previous REX prefixes are noticed
11180 as unused prefixes, as in the return case below. */
11184 prefixes
= PREFIX_FWAIT
;
11189 /* Rex is ignored when followed by another prefix. */
11195 if (*codep
!= FWAIT_OPCODE
)
11196 all_prefixes
[i
++] = *codep
;
11204 /* Return the name of the prefix byte PREF, or NULL if PREF is not a
11207 static const char *
11208 prefix_name (int pref
, int sizeflag
)
11210 static const char *rexes
[16] =
11213 "rex.B", /* 0x41 */
11214 "rex.X", /* 0x42 */
11215 "rex.XB", /* 0x43 */
11216 "rex.R", /* 0x44 */
11217 "rex.RB", /* 0x45 */
11218 "rex.RX", /* 0x46 */
11219 "rex.RXB", /* 0x47 */
11220 "rex.W", /* 0x48 */
11221 "rex.WB", /* 0x49 */
11222 "rex.WX", /* 0x4a */
11223 "rex.WXB", /* 0x4b */
11224 "rex.WR", /* 0x4c */
11225 "rex.WRB", /* 0x4d */
11226 "rex.WRX", /* 0x4e */
11227 "rex.WRXB", /* 0x4f */
11232 /* REX prefixes family. */
11249 return rexes
[pref
- 0x40];
11269 return (sizeflag
& DFLAG
) ? "data16" : "data32";
11271 if (address_mode
== mode_64bit
)
11272 return (sizeflag
& AFLAG
) ? "addr32" : "addr64";
11274 return (sizeflag
& AFLAG
) ? "addr16" : "addr32";
11279 case XACQUIRE_PREFIX
:
11281 case XRELEASE_PREFIX
:
11285 case NOTRACK_PREFIX
:
11292 static char op_out
[MAX_OPERANDS
][100];
11293 static int op_ad
, op_index
[MAX_OPERANDS
];
11294 static int two_source_ops
;
11295 static bfd_vma op_address
[MAX_OPERANDS
];
11296 static bfd_vma op_riprel
[MAX_OPERANDS
];
11297 static bfd_vma start_pc
;
11300 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
11301 * (see topic "Redundant prefixes" in the "Differences from 8086"
11302 * section of the "Virtual 8086 Mode" chapter.)
11303 * 'pc' should be the address of this instruction, it will
11304 * be used to print the target address if this is a relative jump or call
11305 * The function returns the length of this instruction in bytes.
11308 static char intel_syntax
;
11309 static char intel_mnemonic
= !SYSV386_COMPAT
;
11310 static char open_char
;
11311 static char close_char
;
11312 static char separator_char
;
11313 static char scale_char
;
11321 static enum x86_64_isa isa64
;
11323 /* Here for backwards compatibility. When gdb stops using
11324 print_insn_i386_att and print_insn_i386_intel these functions can
11325 disappear, and print_insn_i386 be merged into print_insn. */
11327 print_insn_i386_att (bfd_vma pc
, disassemble_info
*info
)
11331 return print_insn (pc
, info
);
11335 print_insn_i386_intel (bfd_vma pc
, disassemble_info
*info
)
11339 return print_insn (pc
, info
);
11343 print_insn_i386 (bfd_vma pc
, disassemble_info
*info
)
11347 return print_insn (pc
, info
);
11351 print_i386_disassembler_options (FILE *stream
)
11353 fprintf (stream
, _("\n\
11354 The following i386/x86-64 specific disassembler options are supported for use\n\
11355 with the -M switch (multiple options should be separated by commas):\n"));
11357 fprintf (stream
, _(" x86-64 Disassemble in 64bit mode\n"));
11358 fprintf (stream
, _(" i386 Disassemble in 32bit mode\n"));
11359 fprintf (stream
, _(" i8086 Disassemble in 16bit mode\n"));
11360 fprintf (stream
, _(" att Display instruction in AT&T syntax\n"));
11361 fprintf (stream
, _(" intel Display instruction in Intel syntax\n"));
11362 fprintf (stream
, _(" att-mnemonic\n"
11363 " Display instruction in AT&T mnemonic\n"));
11364 fprintf (stream
, _(" intel-mnemonic\n"
11365 " Display instruction in Intel mnemonic\n"));
11366 fprintf (stream
, _(" addr64 Assume 64bit address size\n"));
11367 fprintf (stream
, _(" addr32 Assume 32bit address size\n"));
11368 fprintf (stream
, _(" addr16 Assume 16bit address size\n"));
11369 fprintf (stream
, _(" data32 Assume 32bit data size\n"));
11370 fprintf (stream
, _(" data16 Assume 16bit data size\n"));
11371 fprintf (stream
, _(" suffix Always display instruction suffix in AT&T syntax\n"));
11372 fprintf (stream
, _(" amd64 Display instruction in AMD64 ISA\n"));
11373 fprintf (stream
, _(" intel64 Display instruction in Intel64 ISA\n"));
11377 static const struct dis386 bad_opcode
= { "(bad)", { XX
}, 0 };
11379 /* Get a pointer to struct dis386 with a valid name. */
11381 static const struct dis386
*
11382 get_valid_dis386 (const struct dis386
*dp
, disassemble_info
*info
)
11384 int vindex
, vex_table_index
;
11386 if (dp
->name
!= NULL
)
11389 switch (dp
->op
[0].bytemode
)
11391 case USE_REG_TABLE
:
11392 dp
= ®_table
[dp
->op
[1].bytemode
][modrm
.reg
];
11395 case USE_MOD_TABLE
:
11396 vindex
= modrm
.mod
== 0x3 ? 1 : 0;
11397 dp
= &mod_table
[dp
->op
[1].bytemode
][vindex
];
11401 dp
= &rm_table
[dp
->op
[1].bytemode
][modrm
.rm
];
11404 case USE_PREFIX_TABLE
:
11407 /* The prefix in VEX is implicit. */
11408 switch (vex
.prefix
)
11413 case REPE_PREFIX_OPCODE
:
11416 case DATA_PREFIX_OPCODE
:
11419 case REPNE_PREFIX_OPCODE
:
11429 int last_prefix
= -1;
11432 /* We check PREFIX_REPNZ and PREFIX_REPZ before PREFIX_DATA.
11433 When there are multiple PREFIX_REPNZ and PREFIX_REPZ, the
11435 if ((prefixes
& (PREFIX_REPZ
| PREFIX_REPNZ
)) != 0)
11437 if (last_repz_prefix
> last_repnz_prefix
)
11440 prefix
= PREFIX_REPZ
;
11441 last_prefix
= last_repz_prefix
;
11446 prefix
= PREFIX_REPNZ
;
11447 last_prefix
= last_repnz_prefix
;
11450 /* Check if prefix should be ignored. */
11451 if ((((prefix_table
[dp
->op
[1].bytemode
][vindex
].prefix_requirement
11452 & PREFIX_IGNORED
) >> PREFIX_IGNORED_SHIFT
)
11457 if (vindex
== 0 && (prefixes
& PREFIX_DATA
) != 0)
11460 prefix
= PREFIX_DATA
;
11461 last_prefix
= last_data_prefix
;
11466 used_prefixes
|= prefix
;
11467 all_prefixes
[last_prefix
] = 0;
11470 dp
= &prefix_table
[dp
->op
[1].bytemode
][vindex
];
11473 case USE_X86_64_TABLE
:
11474 vindex
= address_mode
== mode_64bit
? 1 : 0;
11475 dp
= &x86_64_table
[dp
->op
[1].bytemode
][vindex
];
11478 case USE_3BYTE_TABLE
:
11479 FETCH_DATA (info
, codep
+ 2);
11481 dp
= &three_byte_table
[dp
->op
[1].bytemode
][vindex
];
11483 modrm
.mod
= (*codep
>> 6) & 3;
11484 modrm
.reg
= (*codep
>> 3) & 7;
11485 modrm
.rm
= *codep
& 7;
11488 case USE_VEX_LEN_TABLE
:
11492 switch (vex
.length
)
11505 dp
= &vex_len_table
[dp
->op
[1].bytemode
][vindex
];
11508 case USE_EVEX_LEN_TABLE
:
11512 switch (vex
.length
)
11528 dp
= &evex_len_table
[dp
->op
[1].bytemode
][vindex
];
11531 case USE_XOP_8F_TABLE
:
11532 FETCH_DATA (info
, codep
+ 3);
11533 /* All bits in the REX prefix are ignored. */
11535 rex
= ~(*codep
>> 5) & 0x7;
11537 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
11538 switch ((*codep
& 0x1f))
11544 vex_table_index
= XOP_08
;
11547 vex_table_index
= XOP_09
;
11550 vex_table_index
= XOP_0A
;
11554 vex
.w
= *codep
& 0x80;
11555 if (vex
.w
&& address_mode
== mode_64bit
)
11558 vex
.register_specifier
= (~(*codep
>> 3)) & 0xf;
11559 if (address_mode
!= mode_64bit
)
11561 /* In 16/32-bit mode REX_B is silently ignored. */
11565 vex
.length
= (*codep
& 0x4) ? 256 : 128;
11566 switch ((*codep
& 0x3))
11571 vex
.prefix
= DATA_PREFIX_OPCODE
;
11574 vex
.prefix
= REPE_PREFIX_OPCODE
;
11577 vex
.prefix
= REPNE_PREFIX_OPCODE
;
11584 dp
= &xop_table
[vex_table_index
][vindex
];
11587 FETCH_DATA (info
, codep
+ 1);
11588 modrm
.mod
= (*codep
>> 6) & 3;
11589 modrm
.reg
= (*codep
>> 3) & 7;
11590 modrm
.rm
= *codep
& 7;
11593 case USE_VEX_C4_TABLE
:
11595 FETCH_DATA (info
, codep
+ 3);
11596 /* All bits in the REX prefix are ignored. */
11598 rex
= ~(*codep
>> 5) & 0x7;
11599 switch ((*codep
& 0x1f))
11605 vex_table_index
= VEX_0F
;
11608 vex_table_index
= VEX_0F38
;
11611 vex_table_index
= VEX_0F3A
;
11615 vex
.w
= *codep
& 0x80;
11616 if (address_mode
== mode_64bit
)
11623 /* For the 3-byte VEX prefix in 32-bit mode, the REX_B bit
11624 is ignored, other REX bits are 0 and the highest bit in
11625 VEX.vvvv is also ignored (but we mustn't clear it here). */
11628 vex
.register_specifier
= (~(*codep
>> 3)) & 0xf;
11629 vex
.length
= (*codep
& 0x4) ? 256 : 128;
11630 switch ((*codep
& 0x3))
11635 vex
.prefix
= DATA_PREFIX_OPCODE
;
11638 vex
.prefix
= REPE_PREFIX_OPCODE
;
11641 vex
.prefix
= REPNE_PREFIX_OPCODE
;
11648 dp
= &vex_table
[vex_table_index
][vindex
];
11650 /* There is no MODRM byte for VEX0F 77. */
11651 if (vex_table_index
!= VEX_0F
|| vindex
!= 0x77)
11653 FETCH_DATA (info
, codep
+ 1);
11654 modrm
.mod
= (*codep
>> 6) & 3;
11655 modrm
.reg
= (*codep
>> 3) & 7;
11656 modrm
.rm
= *codep
& 7;
11660 case USE_VEX_C5_TABLE
:
11662 FETCH_DATA (info
, codep
+ 2);
11663 /* All bits in the REX prefix are ignored. */
11665 rex
= (*codep
& 0x80) ? 0 : REX_R
;
11667 /* For the 2-byte VEX prefix in 32-bit mode, the highest bit in
11669 vex
.register_specifier
= (~(*codep
>> 3)) & 0xf;
11670 vex
.length
= (*codep
& 0x4) ? 256 : 128;
11671 switch ((*codep
& 0x3))
11676 vex
.prefix
= DATA_PREFIX_OPCODE
;
11679 vex
.prefix
= REPE_PREFIX_OPCODE
;
11682 vex
.prefix
= REPNE_PREFIX_OPCODE
;
11689 dp
= &vex_table
[dp
->op
[1].bytemode
][vindex
];
11691 /* There is no MODRM byte for VEX 77. */
11692 if (vindex
!= 0x77)
11694 FETCH_DATA (info
, codep
+ 1);
11695 modrm
.mod
= (*codep
>> 6) & 3;
11696 modrm
.reg
= (*codep
>> 3) & 7;
11697 modrm
.rm
= *codep
& 7;
11701 case USE_VEX_W_TABLE
:
11705 dp
= &vex_w_table
[dp
->op
[1].bytemode
][vex
.w
? 1 : 0];
11708 case USE_EVEX_TABLE
:
11709 two_source_ops
= 0;
11712 FETCH_DATA (info
, codep
+ 4);
11713 /* All bits in the REX prefix are ignored. */
11715 /* The first byte after 0x62. */
11716 rex
= ~(*codep
>> 5) & 0x7;
11717 vex
.r
= *codep
& 0x10;
11718 switch ((*codep
& 0xf))
11721 return &bad_opcode
;
11723 vex_table_index
= EVEX_0F
;
11726 vex_table_index
= EVEX_0F38
;
11729 vex_table_index
= EVEX_0F3A
;
11733 /* The second byte after 0x62. */
11735 vex
.w
= *codep
& 0x80;
11736 if (vex
.w
&& address_mode
== mode_64bit
)
11739 vex
.register_specifier
= (~(*codep
>> 3)) & 0xf;
11742 if (!(*codep
& 0x4))
11743 return &bad_opcode
;
11745 switch ((*codep
& 0x3))
11750 vex
.prefix
= DATA_PREFIX_OPCODE
;
11753 vex
.prefix
= REPE_PREFIX_OPCODE
;
11756 vex
.prefix
= REPNE_PREFIX_OPCODE
;
11760 /* The third byte after 0x62. */
11763 /* Remember the static rounding bits. */
11764 vex
.ll
= (*codep
>> 5) & 3;
11765 vex
.b
= (*codep
& 0x10) != 0;
11767 vex
.v
= *codep
& 0x8;
11768 vex
.mask_register_specifier
= *codep
& 0x7;
11769 vex
.zeroing
= *codep
& 0x80;
11771 if (address_mode
!= mode_64bit
)
11773 /* In 16/32-bit mode silently ignore following bits. */
11783 dp
= &evex_table
[vex_table_index
][vindex
];
11785 FETCH_DATA (info
, codep
+ 1);
11786 modrm
.mod
= (*codep
>> 6) & 3;
11787 modrm
.reg
= (*codep
>> 3) & 7;
11788 modrm
.rm
= *codep
& 7;
11790 /* Set vector length. */
11791 if (modrm
.mod
== 3 && vex
.b
)
11807 return &bad_opcode
;
11820 if (dp
->name
!= NULL
)
11823 return get_valid_dis386 (dp
, info
);
11827 get_sib (disassemble_info
*info
, int sizeflag
)
11829 /* If modrm.mod == 3, operand must be register. */
11831 && ((sizeflag
& AFLAG
) || address_mode
== mode_64bit
)
11835 FETCH_DATA (info
, codep
+ 2);
11836 sib
.index
= (codep
[1] >> 3) & 7;
11837 sib
.scale
= (codep
[1] >> 6) & 3;
11838 sib
.base
= codep
[1] & 7;
11843 print_insn (bfd_vma pc
, disassemble_info
*info
)
11845 const struct dis386
*dp
;
11847 char *op_txt
[MAX_OPERANDS
];
11849 int sizeflag
, orig_sizeflag
;
11851 struct dis_private priv
;
11854 priv
.orig_sizeflag
= AFLAG
| DFLAG
;
11855 if ((info
->mach
& bfd_mach_i386_i386
) != 0)
11856 address_mode
= mode_32bit
;
11857 else if (info
->mach
== bfd_mach_i386_i8086
)
11859 address_mode
= mode_16bit
;
11860 priv
.orig_sizeflag
= 0;
11863 address_mode
= mode_64bit
;
11865 if (intel_syntax
== (char) -1)
11866 intel_syntax
= (info
->mach
& bfd_mach_i386_intel_syntax
) != 0;
11868 for (p
= info
->disassembler_options
; p
!= NULL
; )
11870 if (CONST_STRNEQ (p
, "amd64"))
11872 else if (CONST_STRNEQ (p
, "intel64"))
11874 else if (CONST_STRNEQ (p
, "x86-64"))
11876 address_mode
= mode_64bit
;
11877 priv
.orig_sizeflag
= AFLAG
| DFLAG
;
11879 else if (CONST_STRNEQ (p
, "i386"))
11881 address_mode
= mode_32bit
;
11882 priv
.orig_sizeflag
= AFLAG
| DFLAG
;
11884 else if (CONST_STRNEQ (p
, "i8086"))
11886 address_mode
= mode_16bit
;
11887 priv
.orig_sizeflag
= 0;
11889 else if (CONST_STRNEQ (p
, "intel"))
11892 if (CONST_STRNEQ (p
+ 5, "-mnemonic"))
11893 intel_mnemonic
= 1;
11895 else if (CONST_STRNEQ (p
, "att"))
11898 if (CONST_STRNEQ (p
+ 3, "-mnemonic"))
11899 intel_mnemonic
= 0;
11901 else if (CONST_STRNEQ (p
, "addr"))
11903 if (address_mode
== mode_64bit
)
11905 if (p
[4] == '3' && p
[5] == '2')
11906 priv
.orig_sizeflag
&= ~AFLAG
;
11907 else if (p
[4] == '6' && p
[5] == '4')
11908 priv
.orig_sizeflag
|= AFLAG
;
11912 if (p
[4] == '1' && p
[5] == '6')
11913 priv
.orig_sizeflag
&= ~AFLAG
;
11914 else if (p
[4] == '3' && p
[5] == '2')
11915 priv
.orig_sizeflag
|= AFLAG
;
11918 else if (CONST_STRNEQ (p
, "data"))
11920 if (p
[4] == '1' && p
[5] == '6')
11921 priv
.orig_sizeflag
&= ~DFLAG
;
11922 else if (p
[4] == '3' && p
[5] == '2')
11923 priv
.orig_sizeflag
|= DFLAG
;
11925 else if (CONST_STRNEQ (p
, "suffix"))
11926 priv
.orig_sizeflag
|= SUFFIX_ALWAYS
;
11928 p
= strchr (p
, ',');
11933 if (address_mode
== mode_64bit
&& sizeof (bfd_vma
) < 8)
11935 (*info
->fprintf_func
) (info
->stream
,
11936 _("64-bit address is disabled"));
11942 names64
= intel_names64
;
11943 names32
= intel_names32
;
11944 names16
= intel_names16
;
11945 names8
= intel_names8
;
11946 names8rex
= intel_names8rex
;
11947 names_seg
= intel_names_seg
;
11948 names_mm
= intel_names_mm
;
11949 names_bnd
= intel_names_bnd
;
11950 names_xmm
= intel_names_xmm
;
11951 names_ymm
= intel_names_ymm
;
11952 names_zmm
= intel_names_zmm
;
11953 index64
= intel_index64
;
11954 index32
= intel_index32
;
11955 names_mask
= intel_names_mask
;
11956 index16
= intel_index16
;
11959 separator_char
= '+';
11964 names64
= att_names64
;
11965 names32
= att_names32
;
11966 names16
= att_names16
;
11967 names8
= att_names8
;
11968 names8rex
= att_names8rex
;
11969 names_seg
= att_names_seg
;
11970 names_mm
= att_names_mm
;
11971 names_bnd
= att_names_bnd
;
11972 names_xmm
= att_names_xmm
;
11973 names_ymm
= att_names_ymm
;
11974 names_zmm
= att_names_zmm
;
11975 index64
= att_index64
;
11976 index32
= att_index32
;
11977 names_mask
= att_names_mask
;
11978 index16
= att_index16
;
11981 separator_char
= ',';
11985 /* The output looks better if we put 7 bytes on a line, since that
11986 puts most long word instructions on a single line. Use 8 bytes
11988 if ((info
->mach
& bfd_mach_l1om
) != 0)
11989 info
->bytes_per_line
= 8;
11991 info
->bytes_per_line
= 7;
11993 info
->private_data
= &priv
;
11994 priv
.max_fetched
= priv
.the_buffer
;
11995 priv
.insn_start
= pc
;
11998 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
12006 start_codep
= priv
.the_buffer
;
12007 codep
= priv
.the_buffer
;
12009 if (OPCODES_SIGSETJMP (priv
.bailout
) != 0)
12013 /* Getting here means we tried for data but didn't get it. That
12014 means we have an incomplete instruction of some sort. Just
12015 print the first byte as a prefix or a .byte pseudo-op. */
12016 if (codep
> priv
.the_buffer
)
12018 name
= prefix_name (priv
.the_buffer
[0], priv
.orig_sizeflag
);
12020 (*info
->fprintf_func
) (info
->stream
, "%s", name
);
12023 /* Just print the first byte as a .byte instruction. */
12024 (*info
->fprintf_func
) (info
->stream
, ".byte 0x%x",
12025 (unsigned int) priv
.the_buffer
[0]);
12035 sizeflag
= priv
.orig_sizeflag
;
12037 if (!ckprefix () || rex_used
)
12039 /* Too many prefixes or unused REX prefixes. */
12041 i
< (int) ARRAY_SIZE (all_prefixes
) && all_prefixes
[i
];
12043 (*info
->fprintf_func
) (info
->stream
, "%s%s",
12045 prefix_name (all_prefixes
[i
], sizeflag
));
12049 insn_codep
= codep
;
12051 FETCH_DATA (info
, codep
+ 1);
12052 two_source_ops
= (*codep
== 0x62) || (*codep
== 0xc8);
12054 if (((prefixes
& PREFIX_FWAIT
)
12055 && ((*codep
< 0xd8) || (*codep
> 0xdf))))
12057 /* Handle prefixes before fwait. */
12058 for (i
= 0; i
< fwait_prefix
&& all_prefixes
[i
];
12060 (*info
->fprintf_func
) (info
->stream
, "%s ",
12061 prefix_name (all_prefixes
[i
], sizeflag
));
12062 (*info
->fprintf_func
) (info
->stream
, "fwait");
12066 if (*codep
== 0x0f)
12068 unsigned char threebyte
;
12071 FETCH_DATA (info
, codep
+ 1);
12072 threebyte
= *codep
;
12073 dp
= &dis386_twobyte
[threebyte
];
12074 need_modrm
= twobyte_has_modrm
[*codep
];
12079 dp
= &dis386
[*codep
];
12080 need_modrm
= onebyte_has_modrm
[*codep
];
12084 /* Save sizeflag for printing the extra prefixes later before updating
12085 it for mnemonic and operand processing. The prefix names depend
12086 only on the address mode. */
12087 orig_sizeflag
= sizeflag
;
12088 if (prefixes
& PREFIX_ADDR
)
12090 if ((prefixes
& PREFIX_DATA
))
12096 FETCH_DATA (info
, codep
+ 1);
12097 modrm
.mod
= (*codep
>> 6) & 3;
12098 modrm
.reg
= (*codep
>> 3) & 7;
12099 modrm
.rm
= *codep
& 7;
12105 memset (&vex
, 0, sizeof (vex
));
12107 if (dp
->name
== NULL
&& dp
->op
[0].bytemode
== FLOATCODE
)
12109 get_sib (info
, sizeflag
);
12110 dofloat (sizeflag
);
12114 dp
= get_valid_dis386 (dp
, info
);
12115 if (dp
!= NULL
&& putop (dp
->name
, sizeflag
) == 0)
12117 get_sib (info
, sizeflag
);
12118 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
12121 op_ad
= MAX_OPERANDS
- 1 - i
;
12123 (*dp
->op
[i
].rtn
) (dp
->op
[i
].bytemode
, sizeflag
);
12124 /* For EVEX instruction after the last operand masking
12125 should be printed. */
12126 if (i
== 0 && vex
.evex
)
12128 /* Don't print {%k0}. */
12129 if (vex
.mask_register_specifier
)
12132 oappend (names_mask
[vex
.mask_register_specifier
]);
12142 /* If VEX.vvvv and EVEX.vvvv are unused, they must be all 1s, which
12143 are all 0s in inverted form. */
12144 if (need_vex
&& vex
.register_specifier
!= 0)
12146 (*info
->fprintf_func
) (info
->stream
, "(bad)");
12147 return end_codep
- priv
.the_buffer
;
12150 /* Check if the REX prefix is used. */
12151 if (rex_ignored
== 0 && (rex
^ rex_used
) == 0 && last_rex_prefix
>= 0)
12152 all_prefixes
[last_rex_prefix
] = 0;
12154 /* Check if the SEG prefix is used. */
12155 if ((prefixes
& (PREFIX_CS
| PREFIX_SS
| PREFIX_DS
| PREFIX_ES
12156 | PREFIX_FS
| PREFIX_GS
)) != 0
12157 && (used_prefixes
& active_seg_prefix
) != 0)
12158 all_prefixes
[last_seg_prefix
] = 0;
12160 /* Check if the ADDR prefix is used. */
12161 if ((prefixes
& PREFIX_ADDR
) != 0
12162 && (used_prefixes
& PREFIX_ADDR
) != 0)
12163 all_prefixes
[last_addr_prefix
] = 0;
12165 /* Check if the DATA prefix is used. */
12166 if ((prefixes
& PREFIX_DATA
) != 0
12167 && (used_prefixes
& PREFIX_DATA
) != 0)
12168 all_prefixes
[last_data_prefix
] = 0;
12170 /* Print the extra prefixes. */
12172 for (i
= 0; i
< (int) ARRAY_SIZE (all_prefixes
); i
++)
12173 if (all_prefixes
[i
])
12176 name
= prefix_name (all_prefixes
[i
], orig_sizeflag
);
12179 prefix_length
+= strlen (name
) + 1;
12180 (*info
->fprintf_func
) (info
->stream
, "%s ", name
);
12183 /* If the mandatory PREFIX_REPZ/PREFIX_REPNZ/PREFIX_DATA prefix is
12184 unused, opcode is invalid. Since the PREFIX_DATA prefix may be
12185 used by putop and MMX/SSE operand and may be overriden by the
12186 PREFIX_REPZ/PREFIX_REPNZ fix, we check the PREFIX_DATA prefix
12188 if (dp
->prefix_requirement
== PREFIX_OPCODE
12189 && dp
!= &bad_opcode
12191 & (PREFIX_REPZ
| PREFIX_REPNZ
)) != 0
12193 & (PREFIX_REPZ
| PREFIX_REPNZ
)) == 0)
12195 & (PREFIX_REPZ
| PREFIX_REPNZ
| PREFIX_DATA
))
12197 && (used_prefixes
& PREFIX_DATA
) == 0))))
12199 (*info
->fprintf_func
) (info
->stream
, "(bad)");
12200 return end_codep
- priv
.the_buffer
;
12203 /* Check maximum code length. */
12204 if ((codep
- start_codep
) > MAX_CODE_LENGTH
)
12206 (*info
->fprintf_func
) (info
->stream
, "(bad)");
12207 return MAX_CODE_LENGTH
;
12210 obufp
= mnemonicendp
;
12211 for (i
= strlen (obuf
) + prefix_length
; i
< 6; i
++)
12214 (*info
->fprintf_func
) (info
->stream
, "%s", obuf
);
12216 /* The enter and bound instructions are printed with operands in the same
12217 order as the intel book; everything else is printed in reverse order. */
12218 if (intel_syntax
|| two_source_ops
)
12222 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
12223 op_txt
[i
] = op_out
[i
];
12225 if (intel_syntax
&& dp
&& dp
->op
[2].rtn
== OP_Rounding
12226 && dp
->op
[3].rtn
== OP_E
&& dp
->op
[4].rtn
== NULL
)
12228 op_txt
[2] = op_out
[3];
12229 op_txt
[3] = op_out
[2];
12232 for (i
= 0; i
< (MAX_OPERANDS
>> 1); ++i
)
12234 op_ad
= op_index
[i
];
12235 op_index
[i
] = op_index
[MAX_OPERANDS
- 1 - i
];
12236 op_index
[MAX_OPERANDS
- 1 - i
] = op_ad
;
12237 riprel
= op_riprel
[i
];
12238 op_riprel
[i
] = op_riprel
[MAX_OPERANDS
- 1 - i
];
12239 op_riprel
[MAX_OPERANDS
- 1 - i
] = riprel
;
12244 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
12245 op_txt
[MAX_OPERANDS
- 1 - i
] = op_out
[i
];
12249 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
12253 (*info
->fprintf_func
) (info
->stream
, ",");
12254 if (op_index
[i
] != -1 && !op_riprel
[i
])
12255 (*info
->print_address_func
) ((bfd_vma
) op_address
[op_index
[i
]], info
);
12257 (*info
->fprintf_func
) (info
->stream
, "%s", op_txt
[i
]);
12261 for (i
= 0; i
< MAX_OPERANDS
; i
++)
12262 if (op_index
[i
] != -1 && op_riprel
[i
])
12264 (*info
->fprintf_func
) (info
->stream
, " # ");
12265 (*info
->print_address_func
) ((bfd_vma
) (start_pc
+ (codep
- start_codep
)
12266 + op_address
[op_index
[i
]]), info
);
12269 return codep
- priv
.the_buffer
;
12272 static const char *float_mem
[] = {
12347 static const unsigned char float_mem_mode
[] = {
12422 #define ST { OP_ST, 0 }
12423 #define STi { OP_STi, 0 }
12425 #define FGRPd9_2 NULL, { { NULL, 1 } }, 0
12426 #define FGRPd9_4 NULL, { { NULL, 2 } }, 0
12427 #define FGRPd9_5 NULL, { { NULL, 3 } }, 0
12428 #define FGRPd9_6 NULL, { { NULL, 4 } }, 0
12429 #define FGRPd9_7 NULL, { { NULL, 5 } }, 0
12430 #define FGRPda_5 NULL, { { NULL, 6 } }, 0
12431 #define FGRPdb_4 NULL, { { NULL, 7 } }, 0
12432 #define FGRPde_3 NULL, { { NULL, 8 } }, 0
12433 #define FGRPdf_4 NULL, { { NULL, 9 } }, 0
12435 static const struct dis386 float_reg
[][8] = {
12438 { "fadd", { ST
, STi
}, 0 },
12439 { "fmul", { ST
, STi
}, 0 },
12440 { "fcom", { STi
}, 0 },
12441 { "fcomp", { STi
}, 0 },
12442 { "fsub", { ST
, STi
}, 0 },
12443 { "fsubr", { ST
, STi
}, 0 },
12444 { "fdiv", { ST
, STi
}, 0 },
12445 { "fdivr", { ST
, STi
}, 0 },
12449 { "fld", { STi
}, 0 },
12450 { "fxch", { STi
}, 0 },
12460 { "fcmovb", { ST
, STi
}, 0 },
12461 { "fcmove", { ST
, STi
}, 0 },
12462 { "fcmovbe",{ ST
, STi
}, 0 },
12463 { "fcmovu", { ST
, STi
}, 0 },
12471 { "fcmovnb",{ ST
, STi
}, 0 },
12472 { "fcmovne",{ ST
, STi
}, 0 },
12473 { "fcmovnbe",{ ST
, STi
}, 0 },
12474 { "fcmovnu",{ ST
, STi
}, 0 },
12476 { "fucomi", { ST
, STi
}, 0 },
12477 { "fcomi", { ST
, STi
}, 0 },
12482 { "fadd", { STi
, ST
}, 0 },
12483 { "fmul", { STi
, ST
}, 0 },
12486 { "fsub{!M|r}", { STi
, ST
}, 0 },
12487 { "fsub{M|}", { STi
, ST
}, 0 },
12488 { "fdiv{!M|r}", { STi
, ST
}, 0 },
12489 { "fdiv{M|}", { STi
, ST
}, 0 },
12493 { "ffree", { STi
}, 0 },
12495 { "fst", { STi
}, 0 },
12496 { "fstp", { STi
}, 0 },
12497 { "fucom", { STi
}, 0 },
12498 { "fucomp", { STi
}, 0 },
12504 { "faddp", { STi
, ST
}, 0 },
12505 { "fmulp", { STi
, ST
}, 0 },
12508 { "fsub{!M|r}p", { STi
, ST
}, 0 },
12509 { "fsub{M|}p", { STi
, ST
}, 0 },
12510 { "fdiv{!M|r}p", { STi
, ST
}, 0 },
12511 { "fdiv{M|}p", { STi
, ST
}, 0 },
12515 { "ffreep", { STi
}, 0 },
12520 { "fucomip", { ST
, STi
}, 0 },
12521 { "fcomip", { ST
, STi
}, 0 },
12526 static char *fgrps
[][8] = {
12529 "(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12534 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12539 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
12544 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
12549 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
12554 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
12559 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12564 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
12565 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
12570 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12575 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
12580 swap_operand (void)
12582 mnemonicendp
[0] = '.';
12583 mnemonicendp
[1] = 's';
12588 OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED
,
12589 int sizeflag ATTRIBUTE_UNUSED
)
12591 /* Skip mod/rm byte. */
12597 dofloat (int sizeflag
)
12599 const struct dis386
*dp
;
12600 unsigned char floatop
;
12602 floatop
= codep
[-1];
12604 if (modrm
.mod
!= 3)
12606 int fp_indx
= (floatop
- 0xd8) * 8 + modrm
.reg
;
12608 putop (float_mem
[fp_indx
], sizeflag
);
12611 OP_E (float_mem_mode
[fp_indx
], sizeflag
);
12614 /* Skip mod/rm byte. */
12618 dp
= &float_reg
[floatop
- 0xd8][modrm
.reg
];
12619 if (dp
->name
== NULL
)
12621 putop (fgrps
[dp
->op
[0].bytemode
][modrm
.rm
], sizeflag
);
12623 /* Instruction fnstsw is only one with strange arg. */
12624 if (floatop
== 0xdf && codep
[-1] == 0xe0)
12625 strcpy (op_out
[0], names16
[0]);
12629 putop (dp
->name
, sizeflag
);
12634 (*dp
->op
[0].rtn
) (dp
->op
[0].bytemode
, sizeflag
);
12639 (*dp
->op
[1].rtn
) (dp
->op
[1].bytemode
, sizeflag
);
12643 /* Like oappend (below), but S is a string starting with '%'.
12644 In Intel syntax, the '%' is elided. */
12646 oappend_maybe_intel (const char *s
)
12648 oappend (s
+ intel_syntax
);
12652 OP_ST (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
12654 oappend_maybe_intel ("%st");
12658 OP_STi (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
12660 sprintf (scratchbuf
, "%%st(%d)", modrm
.rm
);
12661 oappend_maybe_intel (scratchbuf
);
12664 /* Capital letters in template are macros. */
12666 putop (const char *in_template
, int sizeflag
)
12671 unsigned int l
= 0, len
= 1;
12674 #define SAVE_LAST(c) \
12675 if (l < len && l < sizeof (last)) \
12680 for (p
= in_template
; *p
; p
++)
12696 while (*++p
!= '|')
12697 if (*p
== '}' || *p
== '\0')
12700 /* Fall through. */
12705 while (*++p
!= '}')
12716 if (modrm
.mod
!= 3 || (sizeflag
& SUFFIX_ALWAYS
))
12720 if (l
== 0 && len
== 1)
12725 if (sizeflag
& SUFFIX_ALWAYS
)
12738 if (address_mode
== mode_64bit
12739 && !(prefixes
& PREFIX_ADDR
))
12750 if (intel_syntax
&& !alt
)
12752 if ((prefixes
& PREFIX_DATA
) || (sizeflag
& SUFFIX_ALWAYS
))
12754 if (sizeflag
& DFLAG
)
12755 *obufp
++ = intel_syntax
? 'd' : 'l';
12757 *obufp
++ = intel_syntax
? 'w' : 's';
12758 used_prefixes
|= (prefixes
& PREFIX_DATA
);
12762 if (intel_syntax
|| !(sizeflag
& SUFFIX_ALWAYS
))
12765 if (modrm
.mod
== 3)
12771 if (sizeflag
& DFLAG
)
12772 *obufp
++ = intel_syntax
? 'd' : 'l';
12775 used_prefixes
|= (prefixes
& PREFIX_DATA
);
12781 case 'E': /* For jcxz/jecxz */
12782 if (address_mode
== mode_64bit
)
12784 if (sizeflag
& AFLAG
)
12790 if (sizeflag
& AFLAG
)
12792 used_prefixes
|= (prefixes
& PREFIX_ADDR
);
12797 if ((prefixes
& PREFIX_ADDR
) || (sizeflag
& SUFFIX_ALWAYS
))
12799 if (sizeflag
& AFLAG
)
12800 *obufp
++ = address_mode
== mode_64bit
? 'q' : 'l';
12802 *obufp
++ = address_mode
== mode_64bit
? 'l' : 'w';
12803 used_prefixes
|= (prefixes
& PREFIX_ADDR
);
12807 if (intel_syntax
|| (obufp
[-1] != 's' && !(sizeflag
& SUFFIX_ALWAYS
)))
12809 if ((rex
& REX_W
) || (sizeflag
& DFLAG
))
12813 if (!(rex
& REX_W
))
12814 used_prefixes
|= (prefixes
& PREFIX_DATA
);
12819 if ((prefixes
& (PREFIX_CS
| PREFIX_DS
)) == PREFIX_CS
12820 || (prefixes
& (PREFIX_CS
| PREFIX_DS
)) == PREFIX_DS
)
12822 used_prefixes
|= prefixes
& (PREFIX_CS
| PREFIX_DS
);
12825 if (prefixes
& PREFIX_DS
)
12844 if (l
!= 0 || len
!= 1)
12846 if (l
!= 1 || len
!= 2 || last
[0] != 'X')
12851 if (!need_vex
|| !vex
.evex
)
12854 || ((modrm
.mod
== 3 || vex
.b
) && !(sizeflag
& SUFFIX_ALWAYS
)))
12856 switch (vex
.length
)
12874 if (address_mode
== mode_64bit
&& (sizeflag
& SUFFIX_ALWAYS
))
12879 /* Fall through. */
12882 if (l
!= 0 || len
!= 1)
12890 if (sizeflag
& SUFFIX_ALWAYS
)
12894 if (intel_mnemonic
!= cond
)
12898 if ((prefixes
& PREFIX_FWAIT
) == 0)
12901 used_prefixes
|= PREFIX_FWAIT
;
12907 else if (intel_syntax
&& (sizeflag
& DFLAG
))
12911 if (!(rex
& REX_W
))
12912 used_prefixes
|= (prefixes
& PREFIX_DATA
);
12916 && address_mode
== mode_64bit
12917 && isa64
== intel64
)
12922 /* Fall through. */
12925 && address_mode
== mode_64bit
12926 && ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
12931 /* Fall through. */
12934 if (l
== 0 && len
== 1)
12939 if ((rex
& REX_W
) == 0
12940 && (prefixes
& PREFIX_DATA
))
12942 if ((sizeflag
& DFLAG
) == 0)
12944 used_prefixes
|= (prefixes
& PREFIX_DATA
);
12948 if ((prefixes
& PREFIX_DATA
)
12950 || (sizeflag
& SUFFIX_ALWAYS
))
12957 if (sizeflag
& DFLAG
)
12961 used_prefixes
|= (prefixes
& PREFIX_DATA
);
12967 if (l
!= 1 || len
!= 2 || last
[0] != 'L')
12973 if ((prefixes
& PREFIX_DATA
)
12975 || (sizeflag
& SUFFIX_ALWAYS
))
12982 if (sizeflag
& DFLAG
)
12983 *obufp
++ = intel_syntax
? 'd' : 'l';
12986 used_prefixes
|= (prefixes
& PREFIX_DATA
);
12994 if (address_mode
== mode_64bit
12995 && ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
12997 if (modrm
.mod
!= 3 || (sizeflag
& SUFFIX_ALWAYS
))
13001 /* Fall through. */
13004 if (l
== 0 && len
== 1)
13007 if (intel_syntax
&& !alt
)
13010 if (modrm
.mod
!= 3 || (sizeflag
& SUFFIX_ALWAYS
))
13016 if (sizeflag
& DFLAG
)
13017 *obufp
++ = intel_syntax
? 'd' : 'l';
13020 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13026 if (l
!= 1 || len
!= 2 || last
[0] != 'L')
13032 || (modrm
.mod
== 3 && !(sizeflag
& SUFFIX_ALWAYS
)))
13047 else if (sizeflag
& DFLAG
)
13056 if (intel_syntax
&& !p
[1]
13057 && ((rex
& REX_W
) || (sizeflag
& DFLAG
)))
13059 if (!(rex
& REX_W
))
13060 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13063 if (l
== 0 && len
== 1)
13067 if (address_mode
== mode_64bit
13068 && ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
13070 if (sizeflag
& SUFFIX_ALWAYS
)
13092 /* Fall through. */
13095 if (l
== 0 && len
== 1)
13100 if (sizeflag
& SUFFIX_ALWAYS
)
13106 if (sizeflag
& DFLAG
)
13110 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13124 if (address_mode
== mode_64bit
13125 && !(prefixes
& PREFIX_ADDR
))
13136 if (l
!= 0 || len
!= 1)
13141 if (need_vex
&& vex
.prefix
)
13143 if (vex
.prefix
== DATA_PREFIX_OPCODE
)
13150 if (prefixes
& PREFIX_DATA
)
13154 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13158 if (l
== 0 && len
== 1)
13162 if (l
!= 1 || len
!= 2 || last
[0] != 'X')
13170 || ((modrm
.mod
== 3 || vex
.b
) && !(sizeflag
& SUFFIX_ALWAYS
)))
13172 switch (vex
.length
)
13188 if (l
== 0 && len
== 1)
13190 /* operand size flag for cwtl, cbtw */
13199 else if (sizeflag
& DFLAG
)
13203 if (!(rex
& REX_W
))
13204 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13211 && last
[0] != 'L'))
13218 if (last
[0] == 'X')
13219 *obufp
++ = vex
.w
? 'd': 's';
13221 *obufp
++ = vex
.w
? 'q': 'd';
13227 if ((prefixes
& PREFIX_DATA
) || (sizeflag
& SUFFIX_ALWAYS
))
13229 if (sizeflag
& DFLAG
)
13233 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13239 if (address_mode
== mode_64bit
13240 && (isa64
== intel64
13241 || ((sizeflag
& DFLAG
) || (rex
& REX_W
))))
13243 else if ((prefixes
& PREFIX_DATA
))
13245 if (!(sizeflag
& DFLAG
))
13247 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13254 mnemonicendp
= obufp
;
13259 oappend (const char *s
)
13261 obufp
= stpcpy (obufp
, s
);
13267 /* Only print the active segment register. */
13268 if (!active_seg_prefix
)
13271 used_prefixes
|= active_seg_prefix
;
13272 switch (active_seg_prefix
)
13275 oappend_maybe_intel ("%cs:");
13278 oappend_maybe_intel ("%ds:");
13281 oappend_maybe_intel ("%ss:");
13284 oappend_maybe_intel ("%es:");
13287 oappend_maybe_intel ("%fs:");
13290 oappend_maybe_intel ("%gs:");
13298 OP_indirE (int bytemode
, int sizeflag
)
13302 OP_E (bytemode
, sizeflag
);
13306 print_operand_value (char *buf
, int hex
, bfd_vma disp
)
13308 if (address_mode
== mode_64bit
)
13316 sprintf_vma (tmp
, disp
);
13317 for (i
= 0; tmp
[i
] == '0' && tmp
[i
+ 1]; i
++);
13318 strcpy (buf
+ 2, tmp
+ i
);
13322 bfd_signed_vma v
= disp
;
13329 /* Check for possible overflow on 0x8000000000000000. */
13332 strcpy (buf
, "9223372036854775808");
13346 tmp
[28 - i
] = (v
% 10) + '0';
13350 strcpy (buf
, tmp
+ 29 - i
);
13356 sprintf (buf
, "0x%x", (unsigned int) disp
);
13358 sprintf (buf
, "%d", (int) disp
);
13362 /* Put DISP in BUF as signed hex number. */
13365 print_displacement (char *buf
, bfd_vma disp
)
13367 bfd_signed_vma val
= disp
;
13376 /* Check for possible overflow. */
13379 switch (address_mode
)
13382 strcpy (buf
+ j
, "0x8000000000000000");
13385 strcpy (buf
+ j
, "0x80000000");
13388 strcpy (buf
+ j
, "0x8000");
13398 sprintf_vma (tmp
, (bfd_vma
) val
);
13399 for (i
= 0; tmp
[i
] == '0'; i
++)
13401 if (tmp
[i
] == '\0')
13403 strcpy (buf
+ j
, tmp
+ i
);
13407 intel_operand_size (int bytemode
, int sizeflag
)
13411 && (bytemode
== x_mode
13412 || bytemode
== evex_half_bcst_xmmq_mode
))
13415 oappend ("QWORD PTR ");
13417 oappend ("DWORD PTR ");
13426 oappend ("BYTE PTR ");
13431 oappend ("WORD PTR ");
13434 if (address_mode
== mode_64bit
&& isa64
== intel64
)
13436 oappend ("QWORD PTR ");
13439 /* Fall through. */
13441 if (address_mode
== mode_64bit
&& ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
13443 oappend ("QWORD PTR ");
13446 /* Fall through. */
13452 oappend ("QWORD PTR ");
13455 if ((sizeflag
& DFLAG
) || bytemode
== dq_mode
)
13456 oappend ("DWORD PTR ");
13458 oappend ("WORD PTR ");
13459 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13463 if ((rex
& REX_W
) || (sizeflag
& DFLAG
))
13465 oappend ("WORD PTR ");
13466 if (!(rex
& REX_W
))
13467 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13470 if (sizeflag
& DFLAG
)
13471 oappend ("QWORD PTR ");
13473 oappend ("DWORD PTR ");
13474 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13477 case d_scalar_mode
:
13478 case d_scalar_swap_mode
:
13481 oappend ("DWORD PTR ");
13484 case q_scalar_mode
:
13485 case q_scalar_swap_mode
:
13487 oappend ("QWORD PTR ");
13490 if (address_mode
== mode_64bit
)
13491 oappend ("QWORD PTR ");
13493 oappend ("DWORD PTR ");
13496 if (sizeflag
& DFLAG
)
13497 oappend ("FWORD PTR ");
13499 oappend ("DWORD PTR ");
13500 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13503 oappend ("TBYTE PTR ");
13507 case evex_x_gscat_mode
:
13508 case evex_x_nobcst_mode
:
13509 case b_scalar_mode
:
13510 case w_scalar_mode
:
13513 switch (vex
.length
)
13516 oappend ("XMMWORD PTR ");
13519 oappend ("YMMWORD PTR ");
13522 oappend ("ZMMWORD PTR ");
13529 oappend ("XMMWORD PTR ");
13532 oappend ("XMMWORD PTR ");
13535 oappend ("YMMWORD PTR ");
13538 case evex_half_bcst_xmmq_mode
:
13542 switch (vex
.length
)
13545 oappend ("QWORD PTR ");
13548 oappend ("XMMWORD PTR ");
13551 oappend ("YMMWORD PTR ");
13561 switch (vex
.length
)
13566 oappend ("BYTE PTR ");
13576 switch (vex
.length
)
13581 oappend ("WORD PTR ");
13591 switch (vex
.length
)
13596 oappend ("DWORD PTR ");
13606 switch (vex
.length
)
13611 oappend ("QWORD PTR ");
13621 switch (vex
.length
)
13624 oappend ("WORD PTR ");
13627 oappend ("DWORD PTR ");
13630 oappend ("QWORD PTR ");
13640 switch (vex
.length
)
13643 oappend ("DWORD PTR ");
13646 oappend ("QWORD PTR ");
13649 oappend ("XMMWORD PTR ");
13659 switch (vex
.length
)
13662 oappend ("QWORD PTR ");
13665 oappend ("YMMWORD PTR ");
13668 oappend ("ZMMWORD PTR ");
13678 switch (vex
.length
)
13682 oappend ("XMMWORD PTR ");
13689 oappend ("OWORD PTR ");
13692 case vex_w_dq_mode
:
13693 case vex_scalar_w_dq_mode
:
13698 oappend ("QWORD PTR ");
13700 oappend ("DWORD PTR ");
13702 case vex_vsib_d_w_dq_mode
:
13703 case vex_vsib_q_w_dq_mode
:
13710 oappend ("QWORD PTR ");
13712 oappend ("DWORD PTR ");
13716 switch (vex
.length
)
13719 oappend ("XMMWORD PTR ");
13722 oappend ("YMMWORD PTR ");
13725 oappend ("ZMMWORD PTR ");
13732 case vex_vsib_q_w_d_mode
:
13733 case vex_vsib_d_w_d_mode
:
13734 if (!need_vex
|| !vex
.evex
)
13737 switch (vex
.length
)
13740 oappend ("QWORD PTR ");
13743 oappend ("XMMWORD PTR ");
13746 oappend ("YMMWORD PTR ");
13754 if (!need_vex
|| vex
.length
!= 128)
13757 oappend ("DWORD PTR ");
13759 oappend ("BYTE PTR ");
13765 oappend ("QWORD PTR ");
13767 oappend ("WORD PTR ");
13777 OP_E_register (int bytemode
, int sizeflag
)
13779 int reg
= modrm
.rm
;
13780 const char **names
;
13786 if ((sizeflag
& SUFFIX_ALWAYS
)
13787 && (bytemode
== b_swap_mode
13788 || bytemode
== bnd_swap_mode
13789 || bytemode
== v_swap_mode
))
13815 names
= address_mode
== mode_64bit
? names64
: names32
;
13818 case bnd_swap_mode
:
13827 if (address_mode
== mode_64bit
&& isa64
== intel64
)
13832 /* Fall through. */
13834 if (address_mode
== mode_64bit
&& ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
13840 /* Fall through. */
13852 if ((sizeflag
& DFLAG
)
13853 || (bytemode
!= v_mode
13854 && bytemode
!= v_swap_mode
))
13858 used_prefixes
|= (prefixes
& PREFIX_DATA
);
13862 names
= (address_mode
== mode_64bit
13863 ? names64
: names32
);
13864 if (!(prefixes
& PREFIX_ADDR
))
13865 names
= (address_mode
== mode_16bit
13866 ? names16
: names
);
13869 /* Remove "addr16/addr32". */
13870 all_prefixes
[last_addr_prefix
] = 0;
13871 names
= (address_mode
!= mode_32bit
13872 ? names32
: names16
);
13873 used_prefixes
|= PREFIX_ADDR
;
13883 names
= names_mask
;
13888 oappend (INTERNAL_DISASSEMBLER_ERROR
);
13891 oappend (names
[reg
]);
13895 OP_E_memory (int bytemode
, int sizeflag
)
13898 int add
= (rex
& REX_B
) ? 8 : 0;
13904 /* In EVEX, if operand doesn't allow broadcast, vex.b should be 0. */
13906 && bytemode
!= x_mode
13907 && bytemode
!= xmmq_mode
13908 && bytemode
!= evex_half_bcst_xmmq_mode
)
13924 if (address_mode
!= mode_64bit
)
13930 case vex_vsib_d_w_dq_mode
:
13931 case vex_vsib_d_w_d_mode
:
13932 case vex_vsib_q_w_dq_mode
:
13933 case vex_vsib_q_w_d_mode
:
13934 case evex_x_gscat_mode
:
13936 shift
= vex
.w
? 3 : 2;
13939 case evex_half_bcst_xmmq_mode
:
13943 shift
= vex
.w
? 3 : 2;
13946 /* Fall through. */
13950 case evex_x_nobcst_mode
:
13952 switch (vex
.length
)
13975 case q_scalar_mode
:
13977 case q_scalar_swap_mode
:
13983 case d_scalar_mode
:
13985 case d_scalar_swap_mode
:
13988 case w_scalar_mode
:
13992 case b_scalar_mode
:
13999 /* Make necessary corrections to shift for modes that need it.
14000 For these modes we currently have shift 4, 5 or 6 depending on
14001 vex.length (it corresponds to xmmword, ymmword or zmmword
14002 operand). We might want to make it 3, 4 or 5 (e.g. for
14003 xmmq_mode). In case of broadcast enabled the corrections
14004 aren't needed, as element size is always 32 or 64 bits. */
14006 && (bytemode
== xmmq_mode
14007 || bytemode
== evex_half_bcst_xmmq_mode
))
14009 else if (bytemode
== xmmqd_mode
)
14011 else if (bytemode
== xmmdw_mode
)
14013 else if (bytemode
== ymmq_mode
&& vex
.length
== 128)
14021 intel_operand_size (bytemode
, sizeflag
);
14024 if ((sizeflag
& AFLAG
) || address_mode
== mode_64bit
)
14026 /* 32/64 bit address mode */
14036 int addr32flag
= !((sizeflag
& AFLAG
)
14037 || bytemode
== v_bnd_mode
14038 || bytemode
== v_bndmk_mode
14039 || bytemode
== bnd_mode
14040 || bytemode
== bnd_swap_mode
);
14041 const char **indexes64
= names64
;
14042 const char **indexes32
= names32
;
14052 vindex
= sib
.index
;
14058 case vex_vsib_d_w_dq_mode
:
14059 case vex_vsib_d_w_d_mode
:
14060 case vex_vsib_q_w_dq_mode
:
14061 case vex_vsib_q_w_d_mode
:
14071 switch (vex
.length
)
14074 indexes64
= indexes32
= names_xmm
;
14078 || bytemode
== vex_vsib_q_w_dq_mode
14079 || bytemode
== vex_vsib_q_w_d_mode
)
14080 indexes64
= indexes32
= names_ymm
;
14082 indexes64
= indexes32
= names_xmm
;
14086 || bytemode
== vex_vsib_q_w_dq_mode
14087 || bytemode
== vex_vsib_q_w_d_mode
)
14088 indexes64
= indexes32
= names_zmm
;
14090 indexes64
= indexes32
= names_ymm
;
14097 haveindex
= vindex
!= 4;
14104 rbase
= base
+ add
;
14112 if (address_mode
== mode_64bit
&& !havesib
)
14115 if (riprel
&& bytemode
== v_bndmk_mode
)
14123 FETCH_DATA (the_info
, codep
+ 1);
14125 if ((disp
& 0x80) != 0)
14127 if (vex
.evex
&& shift
> 0)
14140 && address_mode
!= mode_16bit
)
14142 if (address_mode
== mode_64bit
)
14144 /* Display eiz instead of addr32. */
14145 needindex
= addr32flag
;
14150 /* In 32-bit mode, we need index register to tell [offset]
14151 from [eiz*1 + offset]. */
14156 havedisp
= (havebase
14158 || (havesib
&& (haveindex
|| scale
!= 0)));
14161 if (modrm
.mod
!= 0 || base
== 5)
14163 if (havedisp
|| riprel
)
14164 print_displacement (scratchbuf
, disp
);
14166 print_operand_value (scratchbuf
, 1, disp
);
14167 oappend (scratchbuf
);
14171 oappend (!addr32flag
? "(%rip)" : "(%eip)");
14175 if ((havebase
|| haveindex
|| needindex
|| needaddr32
|| riprel
)
14176 && (bytemode
!= v_bnd_mode
)
14177 && (bytemode
!= v_bndmk_mode
)
14178 && (bytemode
!= bnd_mode
)
14179 && (bytemode
!= bnd_swap_mode
))
14180 used_prefixes
|= PREFIX_ADDR
;
14182 if (havedisp
|| (intel_syntax
&& riprel
))
14184 *obufp
++ = open_char
;
14185 if (intel_syntax
&& riprel
)
14188 oappend (!addr32flag
? "rip" : "eip");
14192 oappend (address_mode
== mode_64bit
&& !addr32flag
14193 ? names64
[rbase
] : names32
[rbase
]);
14196 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
14197 print index to tell base + index from base. */
14201 || (havebase
&& base
!= ESP_REG_NUM
))
14203 if (!intel_syntax
|| havebase
)
14205 *obufp
++ = separator_char
;
14209 oappend (address_mode
== mode_64bit
&& !addr32flag
14210 ? indexes64
[vindex
] : indexes32
[vindex
]);
14212 oappend (address_mode
== mode_64bit
&& !addr32flag
14213 ? index64
: index32
);
14215 *obufp
++ = scale_char
;
14217 sprintf (scratchbuf
, "%d", 1 << scale
);
14218 oappend (scratchbuf
);
14222 && (disp
|| modrm
.mod
!= 0 || base
== 5))
14224 if (!havedisp
|| (bfd_signed_vma
) disp
>= 0)
14229 else if (modrm
.mod
!= 1 && disp
!= -disp
)
14233 disp
= - (bfd_signed_vma
) disp
;
14237 print_displacement (scratchbuf
, disp
);
14239 print_operand_value (scratchbuf
, 1, disp
);
14240 oappend (scratchbuf
);
14243 *obufp
++ = close_char
;
14246 else if (intel_syntax
)
14248 if (modrm
.mod
!= 0 || base
== 5)
14250 if (!active_seg_prefix
)
14252 oappend (names_seg
[ds_reg
- es_reg
]);
14255 print_operand_value (scratchbuf
, 1, disp
);
14256 oappend (scratchbuf
);
14262 /* 16 bit address mode */
14263 used_prefixes
|= prefixes
& PREFIX_ADDR
;
14270 if ((disp
& 0x8000) != 0)
14275 FETCH_DATA (the_info
, codep
+ 1);
14277 if ((disp
& 0x80) != 0)
14279 if (vex
.evex
&& shift
> 0)
14284 if ((disp
& 0x8000) != 0)
14290 if (modrm
.mod
!= 0 || modrm
.rm
== 6)
14292 print_displacement (scratchbuf
, disp
);
14293 oappend (scratchbuf
);
14296 if (modrm
.mod
!= 0 || modrm
.rm
!= 6)
14298 *obufp
++ = open_char
;
14300 oappend (index16
[modrm
.rm
]);
14302 && (disp
|| modrm
.mod
!= 0 || modrm
.rm
== 6))
14304 if ((bfd_signed_vma
) disp
>= 0)
14309 else if (modrm
.mod
!= 1)
14313 disp
= - (bfd_signed_vma
) disp
;
14316 print_displacement (scratchbuf
, disp
);
14317 oappend (scratchbuf
);
14320 *obufp
++ = close_char
;
14323 else if (intel_syntax
)
14325 if (!active_seg_prefix
)
14327 oappend (names_seg
[ds_reg
- es_reg
]);
14330 print_operand_value (scratchbuf
, 1, disp
& 0xffff);
14331 oappend (scratchbuf
);
14334 if (vex
.evex
&& vex
.b
14335 && (bytemode
== x_mode
14336 || bytemode
== xmmq_mode
14337 || bytemode
== evex_half_bcst_xmmq_mode
))
14340 || bytemode
== xmmq_mode
14341 || bytemode
== evex_half_bcst_xmmq_mode
)
14343 switch (vex
.length
)
14346 oappend ("{1to2}");
14349 oappend ("{1to4}");
14352 oappend ("{1to8}");
14360 switch (vex
.length
)
14363 oappend ("{1to4}");
14366 oappend ("{1to8}");
14369 oappend ("{1to16}");
14379 OP_E (int bytemode
, int sizeflag
)
14381 /* Skip mod/rm byte. */
14385 if (modrm
.mod
== 3)
14386 OP_E_register (bytemode
, sizeflag
);
14388 OP_E_memory (bytemode
, sizeflag
);
14392 OP_G (int bytemode
, int sizeflag
)
14395 const char **names
;
14404 oappend (names8rex
[modrm
.reg
+ add
]);
14406 oappend (names8
[modrm
.reg
+ add
]);
14409 oappend (names16
[modrm
.reg
+ add
]);
14414 oappend (names32
[modrm
.reg
+ add
]);
14417 oappend (names64
[modrm
.reg
+ add
]);
14420 if (modrm
.reg
> 0x3)
14425 oappend (names_bnd
[modrm
.reg
]);
14434 oappend (names64
[modrm
.reg
+ add
]);
14437 if ((sizeflag
& DFLAG
) || bytemode
!= v_mode
)
14438 oappend (names32
[modrm
.reg
+ add
]);
14440 oappend (names16
[modrm
.reg
+ add
]);
14441 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14445 names
= (address_mode
== mode_64bit
14446 ? names64
: names32
);
14447 if (!(prefixes
& PREFIX_ADDR
))
14449 if (address_mode
== mode_16bit
)
14454 /* Remove "addr16/addr32". */
14455 all_prefixes
[last_addr_prefix
] = 0;
14456 names
= (address_mode
!= mode_32bit
14457 ? names32
: names16
);
14458 used_prefixes
|= PREFIX_ADDR
;
14460 oappend (names
[modrm
.reg
+ add
]);
14463 if (address_mode
== mode_64bit
)
14464 oappend (names64
[modrm
.reg
+ add
]);
14466 oappend (names32
[modrm
.reg
+ add
]);
14470 if ((modrm
.reg
+ add
) > 0x7)
14475 oappend (names_mask
[modrm
.reg
+ add
]);
14478 oappend (INTERNAL_DISASSEMBLER_ERROR
);
14491 FETCH_DATA (the_info
, codep
+ 8);
14492 a
= *codep
++ & 0xff;
14493 a
|= (*codep
++ & 0xff) << 8;
14494 a
|= (*codep
++ & 0xff) << 16;
14495 a
|= (*codep
++ & 0xffu
) << 24;
14496 b
= *codep
++ & 0xff;
14497 b
|= (*codep
++ & 0xff) << 8;
14498 b
|= (*codep
++ & 0xff) << 16;
14499 b
|= (*codep
++ & 0xffu
) << 24;
14500 x
= a
+ ((bfd_vma
) b
<< 32);
14508 static bfd_signed_vma
14511 bfd_signed_vma x
= 0;
14513 FETCH_DATA (the_info
, codep
+ 4);
14514 x
= *codep
++ & (bfd_signed_vma
) 0xff;
14515 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 8;
14516 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 16;
14517 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 24;
14521 static bfd_signed_vma
14524 bfd_signed_vma x
= 0;
14526 FETCH_DATA (the_info
, codep
+ 4);
14527 x
= *codep
++ & (bfd_signed_vma
) 0xff;
14528 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 8;
14529 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 16;
14530 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 24;
14532 x
= (x
^ ((bfd_signed_vma
) 1 << 31)) - ((bfd_signed_vma
) 1 << 31);
14542 FETCH_DATA (the_info
, codep
+ 2);
14543 x
= *codep
++ & 0xff;
14544 x
|= (*codep
++ & 0xff) << 8;
14549 set_op (bfd_vma op
, int riprel
)
14551 op_index
[op_ad
] = op_ad
;
14552 if (address_mode
== mode_64bit
)
14554 op_address
[op_ad
] = op
;
14555 op_riprel
[op_ad
] = riprel
;
14559 /* Mask to get a 32-bit address. */
14560 op_address
[op_ad
] = op
& 0xffffffff;
14561 op_riprel
[op_ad
] = riprel
& 0xffffffff;
14566 OP_REG (int code
, int sizeflag
)
14573 case es_reg
: case ss_reg
: case cs_reg
:
14574 case ds_reg
: case fs_reg
: case gs_reg
:
14575 oappend (names_seg
[code
- es_reg
]);
14587 case ax_reg
: case cx_reg
: case dx_reg
: case bx_reg
:
14588 case sp_reg
: case bp_reg
: case si_reg
: case di_reg
:
14589 s
= names16
[code
- ax_reg
+ add
];
14591 case al_reg
: case ah_reg
: case cl_reg
: case ch_reg
:
14592 case dl_reg
: case dh_reg
: case bl_reg
: case bh_reg
:
14595 s
= names8rex
[code
- al_reg
+ add
];
14597 s
= names8
[code
- al_reg
];
14599 case rAX_reg
: case rCX_reg
: case rDX_reg
: case rBX_reg
:
14600 case rSP_reg
: case rBP_reg
: case rSI_reg
: case rDI_reg
:
14601 if (address_mode
== mode_64bit
14602 && ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
14604 s
= names64
[code
- rAX_reg
+ add
];
14607 code
+= eAX_reg
- rAX_reg
;
14608 /* Fall through. */
14609 case eAX_reg
: case eCX_reg
: case eDX_reg
: case eBX_reg
:
14610 case eSP_reg
: case eBP_reg
: case eSI_reg
: case eDI_reg
:
14613 s
= names64
[code
- eAX_reg
+ add
];
14616 if (sizeflag
& DFLAG
)
14617 s
= names32
[code
- eAX_reg
+ add
];
14619 s
= names16
[code
- eAX_reg
+ add
];
14620 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14624 s
= INTERNAL_DISASSEMBLER_ERROR
;
14631 OP_IMREG (int code
, int sizeflag
)
14643 case ax_reg
: case cx_reg
: case dx_reg
: case bx_reg
:
14644 case sp_reg
: case bp_reg
: case si_reg
: case di_reg
:
14645 s
= names16
[code
- ax_reg
];
14647 case es_reg
: case ss_reg
: case cs_reg
:
14648 case ds_reg
: case fs_reg
: case gs_reg
:
14649 s
= names_seg
[code
- es_reg
];
14651 case al_reg
: case ah_reg
: case cl_reg
: case ch_reg
:
14652 case dl_reg
: case dh_reg
: case bl_reg
: case bh_reg
:
14655 s
= names8rex
[code
- al_reg
];
14657 s
= names8
[code
- al_reg
];
14659 case eAX_reg
: case eCX_reg
: case eDX_reg
: case eBX_reg
:
14660 case eSP_reg
: case eBP_reg
: case eSI_reg
: case eDI_reg
:
14663 s
= names64
[code
- eAX_reg
];
14666 if (sizeflag
& DFLAG
)
14667 s
= names32
[code
- eAX_reg
];
14669 s
= names16
[code
- eAX_reg
];
14670 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14673 case z_mode_ax_reg
:
14674 if ((rex
& REX_W
) || (sizeflag
& DFLAG
))
14678 if (!(rex
& REX_W
))
14679 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14682 s
= INTERNAL_DISASSEMBLER_ERROR
;
14689 OP_I (int bytemode
, int sizeflag
)
14692 bfd_signed_vma mask
= -1;
14697 FETCH_DATA (the_info
, codep
+ 1);
14707 if (sizeflag
& DFLAG
)
14717 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14733 oappend (INTERNAL_DISASSEMBLER_ERROR
);
14738 scratchbuf
[0] = '$';
14739 print_operand_value (scratchbuf
+ 1, 1, op
);
14740 oappend_maybe_intel (scratchbuf
);
14741 scratchbuf
[0] = '\0';
14745 OP_I64 (int bytemode
, int sizeflag
)
14747 if (bytemode
!= v_mode
|| address_mode
!= mode_64bit
|| !(rex
& REX_W
))
14749 OP_I (bytemode
, sizeflag
);
14755 scratchbuf
[0] = '$';
14756 print_operand_value (scratchbuf
+ 1, 1, get64 ());
14757 oappend_maybe_intel (scratchbuf
);
14758 scratchbuf
[0] = '\0';
14762 OP_sI (int bytemode
, int sizeflag
)
14770 FETCH_DATA (the_info
, codep
+ 1);
14772 if ((op
& 0x80) != 0)
14774 if (bytemode
== b_T_mode
)
14776 if (address_mode
!= mode_64bit
14777 || !((sizeflag
& DFLAG
) || (rex
& REX_W
)))
14779 /* The operand-size prefix is overridden by a REX prefix. */
14780 if ((sizeflag
& DFLAG
) || (rex
& REX_W
))
14788 if (!(rex
& REX_W
))
14790 if (sizeflag
& DFLAG
)
14798 /* The operand-size prefix is overridden by a REX prefix. */
14799 if ((sizeflag
& DFLAG
) || (rex
& REX_W
))
14805 oappend (INTERNAL_DISASSEMBLER_ERROR
);
14809 scratchbuf
[0] = '$';
14810 print_operand_value (scratchbuf
+ 1, 1, op
);
14811 oappend_maybe_intel (scratchbuf
);
14815 OP_J (int bytemode
, int sizeflag
)
14819 bfd_vma segment
= 0;
14824 FETCH_DATA (the_info
, codep
+ 1);
14826 if ((disp
& 0x80) != 0)
14830 if (isa64
== amd64
)
14832 if ((sizeflag
& DFLAG
)
14833 || (address_mode
== mode_64bit
14834 && (isa64
!= amd64
|| (rex
& REX_W
))))
14839 if ((disp
& 0x8000) != 0)
14841 /* In 16bit mode, address is wrapped around at 64k within
14842 the same segment. Otherwise, a data16 prefix on a jump
14843 instruction means that the pc is masked to 16 bits after
14844 the displacement is added! */
14846 if ((prefixes
& PREFIX_DATA
) == 0)
14847 segment
= ((start_pc
+ (codep
- start_codep
))
14848 & ~((bfd_vma
) 0xffff));
14850 if (address_mode
!= mode_64bit
14851 || (isa64
== amd64
&& !(rex
& REX_W
)))
14852 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14855 oappend (INTERNAL_DISASSEMBLER_ERROR
);
14858 disp
= ((start_pc
+ (codep
- start_codep
) + disp
) & mask
) | segment
;
14860 print_operand_value (scratchbuf
, 1, disp
);
14861 oappend (scratchbuf
);
14865 OP_SEG (int bytemode
, int sizeflag
)
14867 if (bytemode
== w_mode
)
14868 oappend (names_seg
[modrm
.reg
]);
14870 OP_E (modrm
.mod
== 3 ? bytemode
: w_mode
, sizeflag
);
14874 OP_DIR (int dummy ATTRIBUTE_UNUSED
, int sizeflag
)
14878 if (sizeflag
& DFLAG
)
14888 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14890 sprintf (scratchbuf
, "0x%x:0x%x", seg
, offset
);
14892 sprintf (scratchbuf
, "$0x%x,$0x%x", seg
, offset
);
14893 oappend (scratchbuf
);
14897 OP_OFF (int bytemode
, int sizeflag
)
14901 if (intel_syntax
&& (sizeflag
& SUFFIX_ALWAYS
))
14902 intel_operand_size (bytemode
, sizeflag
);
14905 if ((sizeflag
& AFLAG
) || address_mode
== mode_64bit
)
14912 if (!active_seg_prefix
)
14914 oappend (names_seg
[ds_reg
- es_reg
]);
14918 print_operand_value (scratchbuf
, 1, off
);
14919 oappend (scratchbuf
);
14923 OP_OFF64 (int bytemode
, int sizeflag
)
14927 if (address_mode
!= mode_64bit
14928 || (prefixes
& PREFIX_ADDR
))
14930 OP_OFF (bytemode
, sizeflag
);
14934 if (intel_syntax
&& (sizeflag
& SUFFIX_ALWAYS
))
14935 intel_operand_size (bytemode
, sizeflag
);
14942 if (!active_seg_prefix
)
14944 oappend (names_seg
[ds_reg
- es_reg
]);
14948 print_operand_value (scratchbuf
, 1, off
);
14949 oappend (scratchbuf
);
14953 ptr_reg (int code
, int sizeflag
)
14957 *obufp
++ = open_char
;
14958 used_prefixes
|= (prefixes
& PREFIX_ADDR
);
14959 if (address_mode
== mode_64bit
)
14961 if (!(sizeflag
& AFLAG
))
14962 s
= names32
[code
- eAX_reg
];
14964 s
= names64
[code
- eAX_reg
];
14966 else if (sizeflag
& AFLAG
)
14967 s
= names32
[code
- eAX_reg
];
14969 s
= names16
[code
- eAX_reg
];
14971 *obufp
++ = close_char
;
14976 OP_ESreg (int code
, int sizeflag
)
14982 case 0x6d: /* insw/insl */
14983 intel_operand_size (z_mode
, sizeflag
);
14985 case 0xa5: /* movsw/movsl/movsq */
14986 case 0xa7: /* cmpsw/cmpsl/cmpsq */
14987 case 0xab: /* stosw/stosl */
14988 case 0xaf: /* scasw/scasl */
14989 intel_operand_size (v_mode
, sizeflag
);
14992 intel_operand_size (b_mode
, sizeflag
);
14995 oappend_maybe_intel ("%es:");
14996 ptr_reg (code
, sizeflag
);
15000 OP_DSreg (int code
, int sizeflag
)
15006 case 0x6f: /* outsw/outsl */
15007 intel_operand_size (z_mode
, sizeflag
);
15009 case 0xa5: /* movsw/movsl/movsq */
15010 case 0xa7: /* cmpsw/cmpsl/cmpsq */
15011 case 0xad: /* lodsw/lodsl/lodsq */
15012 intel_operand_size (v_mode
, sizeflag
);
15015 intel_operand_size (b_mode
, sizeflag
);
15018 /* Set active_seg_prefix to PREFIX_DS if it is unset so that the
15019 default segment register DS is printed. */
15020 if (!active_seg_prefix
)
15021 active_seg_prefix
= PREFIX_DS
;
15023 ptr_reg (code
, sizeflag
);
15027 OP_C (int dummy ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
15035 else if (address_mode
!= mode_64bit
&& (prefixes
& PREFIX_LOCK
))
15037 all_prefixes
[last_lock_prefix
] = 0;
15038 used_prefixes
|= PREFIX_LOCK
;
15043 sprintf (scratchbuf
, "%%cr%d", modrm
.reg
+ add
);
15044 oappend_maybe_intel (scratchbuf
);
15048 OP_D (int dummy ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
15057 sprintf (scratchbuf
, "db%d", modrm
.reg
+ add
);
15059 sprintf (scratchbuf
, "%%db%d", modrm
.reg
+ add
);
15060 oappend (scratchbuf
);
15064 OP_T (int dummy ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
15066 sprintf (scratchbuf
, "%%tr%d", modrm
.reg
);
15067 oappend_maybe_intel (scratchbuf
);
15071 OP_R (int bytemode
, int sizeflag
)
15073 /* Skip mod/rm byte. */
15076 OP_E_register (bytemode
, sizeflag
);
15080 OP_MMX (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
15082 int reg
= modrm
.reg
;
15083 const char **names
;
15085 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15086 if (prefixes
& PREFIX_DATA
)
15095 oappend (names
[reg
]);
15099 OP_XMM (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
15101 int reg
= modrm
.reg
;
15102 const char **names
;
15114 && bytemode
!= xmm_mode
15115 && bytemode
!= xmmq_mode
15116 && bytemode
!= evex_half_bcst_xmmq_mode
15117 && bytemode
!= ymm_mode
15118 && bytemode
!= scalar_mode
)
15120 switch (vex
.length
)
15127 || (bytemode
!= vex_vsib_q_w_dq_mode
15128 && bytemode
!= vex_vsib_q_w_d_mode
))
15140 else if (bytemode
== xmmq_mode
15141 || bytemode
== evex_half_bcst_xmmq_mode
)
15143 switch (vex
.length
)
15156 else if (bytemode
== ymm_mode
)
15160 oappend (names
[reg
]);
15164 OP_EM (int bytemode
, int sizeflag
)
15167 const char **names
;
15169 if (modrm
.mod
!= 3)
15172 && (bytemode
== v_mode
|| bytemode
== v_swap_mode
))
15174 bytemode
= (prefixes
& PREFIX_DATA
) ? x_mode
: q_mode
;
15175 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15177 OP_E (bytemode
, sizeflag
);
15181 if ((sizeflag
& SUFFIX_ALWAYS
) && bytemode
== v_swap_mode
)
15184 /* Skip mod/rm byte. */
15187 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15189 if (prefixes
& PREFIX_DATA
)
15198 oappend (names
[reg
]);
15201 /* cvt* are the only instructions in sse2 which have
15202 both SSE and MMX operands and also have 0x66 prefix
15203 in their opcode. 0x66 was originally used to differentiate
15204 between SSE and MMX instruction(operands). So we have to handle the
15205 cvt* separately using OP_EMC and OP_MXC */
15207 OP_EMC (int bytemode
, int sizeflag
)
15209 if (modrm
.mod
!= 3)
15211 if (intel_syntax
&& bytemode
== v_mode
)
15213 bytemode
= (prefixes
& PREFIX_DATA
) ? x_mode
: q_mode
;
15214 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15216 OP_E (bytemode
, sizeflag
);
15220 /* Skip mod/rm byte. */
15223 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15224 oappend (names_mm
[modrm
.rm
]);
15228 OP_MXC (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
15230 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15231 oappend (names_mm
[modrm
.reg
]);
15235 OP_EX (int bytemode
, int sizeflag
)
15238 const char **names
;
15240 /* Skip mod/rm byte. */
15244 if (modrm
.mod
!= 3)
15246 OP_E_memory (bytemode
, sizeflag
);
15261 if ((sizeflag
& SUFFIX_ALWAYS
)
15262 && (bytemode
== x_swap_mode
15263 || bytemode
== d_swap_mode
15264 || bytemode
== d_scalar_swap_mode
15265 || bytemode
== q_swap_mode
15266 || bytemode
== q_scalar_swap_mode
))
15270 && bytemode
!= xmm_mode
15271 && bytemode
!= xmmdw_mode
15272 && bytemode
!= xmmqd_mode
15273 && bytemode
!= xmm_mb_mode
15274 && bytemode
!= xmm_mw_mode
15275 && bytemode
!= xmm_md_mode
15276 && bytemode
!= xmm_mq_mode
15277 && bytemode
!= xmm_mdq_mode
15278 && bytemode
!= xmmq_mode
15279 && bytemode
!= evex_half_bcst_xmmq_mode
15280 && bytemode
!= ymm_mode
15281 && bytemode
!= d_scalar_mode
15282 && bytemode
!= d_scalar_swap_mode
15283 && bytemode
!= q_scalar_mode
15284 && bytemode
!= q_scalar_swap_mode
15285 && bytemode
!= vex_scalar_w_dq_mode
)
15287 switch (vex
.length
)
15302 else if (bytemode
== xmmq_mode
15303 || bytemode
== evex_half_bcst_xmmq_mode
)
15305 switch (vex
.length
)
15318 else if (bytemode
== ymm_mode
)
15322 oappend (names
[reg
]);
15326 OP_MS (int bytemode
, int sizeflag
)
15328 if (modrm
.mod
== 3)
15329 OP_EM (bytemode
, sizeflag
);
15335 OP_XS (int bytemode
, int sizeflag
)
15337 if (modrm
.mod
== 3)
15338 OP_EX (bytemode
, sizeflag
);
15344 OP_M (int bytemode
, int sizeflag
)
15346 if (modrm
.mod
== 3)
15347 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
15350 OP_E (bytemode
, sizeflag
);
15354 OP_0f07 (int bytemode
, int sizeflag
)
15356 if (modrm
.mod
!= 3 || modrm
.rm
!= 0)
15359 OP_E (bytemode
, sizeflag
);
15362 /* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
15363 32bit mode and "xchg %rax,%rax" in 64bit mode. */
15366 NOP_Fixup1 (int bytemode
, int sizeflag
)
15368 if ((prefixes
& PREFIX_DATA
) != 0
15371 && address_mode
== mode_64bit
))
15372 OP_REG (bytemode
, sizeflag
);
15374 strcpy (obuf
, "nop");
15378 NOP_Fixup2 (int bytemode
, int sizeflag
)
15380 if ((prefixes
& PREFIX_DATA
) != 0
15383 && address_mode
== mode_64bit
))
15384 OP_IMREG (bytemode
, sizeflag
);
15387 static const char *const Suffix3DNow
[] = {
15388 /* 00 */ NULL
, NULL
, NULL
, NULL
,
15389 /* 04 */ NULL
, NULL
, NULL
, NULL
,
15390 /* 08 */ NULL
, NULL
, NULL
, NULL
,
15391 /* 0C */ "pi2fw", "pi2fd", NULL
, NULL
,
15392 /* 10 */ NULL
, NULL
, NULL
, NULL
,
15393 /* 14 */ NULL
, NULL
, NULL
, NULL
,
15394 /* 18 */ NULL
, NULL
, NULL
, NULL
,
15395 /* 1C */ "pf2iw", "pf2id", NULL
, NULL
,
15396 /* 20 */ NULL
, NULL
, NULL
, NULL
,
15397 /* 24 */ NULL
, NULL
, NULL
, NULL
,
15398 /* 28 */ NULL
, NULL
, NULL
, NULL
,
15399 /* 2C */ NULL
, NULL
, NULL
, NULL
,
15400 /* 30 */ NULL
, NULL
, NULL
, NULL
,
15401 /* 34 */ NULL
, NULL
, NULL
, NULL
,
15402 /* 38 */ NULL
, NULL
, NULL
, NULL
,
15403 /* 3C */ NULL
, NULL
, NULL
, NULL
,
15404 /* 40 */ NULL
, NULL
, NULL
, NULL
,
15405 /* 44 */ NULL
, NULL
, NULL
, NULL
,
15406 /* 48 */ NULL
, NULL
, NULL
, NULL
,
15407 /* 4C */ NULL
, NULL
, NULL
, NULL
,
15408 /* 50 */ NULL
, NULL
, NULL
, NULL
,
15409 /* 54 */ NULL
, NULL
, NULL
, NULL
,
15410 /* 58 */ NULL
, NULL
, NULL
, NULL
,
15411 /* 5C */ NULL
, NULL
, NULL
, NULL
,
15412 /* 60 */ NULL
, NULL
, NULL
, NULL
,
15413 /* 64 */ NULL
, NULL
, NULL
, NULL
,
15414 /* 68 */ NULL
, NULL
, NULL
, NULL
,
15415 /* 6C */ NULL
, NULL
, NULL
, NULL
,
15416 /* 70 */ NULL
, NULL
, NULL
, NULL
,
15417 /* 74 */ NULL
, NULL
, NULL
, NULL
,
15418 /* 78 */ NULL
, NULL
, NULL
, NULL
,
15419 /* 7C */ NULL
, NULL
, NULL
, NULL
,
15420 /* 80 */ NULL
, NULL
, NULL
, NULL
,
15421 /* 84 */ NULL
, NULL
, NULL
, NULL
,
15422 /* 88 */ NULL
, NULL
, "pfnacc", NULL
,
15423 /* 8C */ NULL
, NULL
, "pfpnacc", NULL
,
15424 /* 90 */ "pfcmpge", NULL
, NULL
, NULL
,
15425 /* 94 */ "pfmin", NULL
, "pfrcp", "pfrsqrt",
15426 /* 98 */ NULL
, NULL
, "pfsub", NULL
,
15427 /* 9C */ NULL
, NULL
, "pfadd", NULL
,
15428 /* A0 */ "pfcmpgt", NULL
, NULL
, NULL
,
15429 /* A4 */ "pfmax", NULL
, "pfrcpit1", "pfrsqit1",
15430 /* A8 */ NULL
, NULL
, "pfsubr", NULL
,
15431 /* AC */ NULL
, NULL
, "pfacc", NULL
,
15432 /* B0 */ "pfcmpeq", NULL
, NULL
, NULL
,
15433 /* B4 */ "pfmul", NULL
, "pfrcpit2", "pmulhrw",
15434 /* B8 */ NULL
, NULL
, NULL
, "pswapd",
15435 /* BC */ NULL
, NULL
, NULL
, "pavgusb",
15436 /* C0 */ NULL
, NULL
, NULL
, NULL
,
15437 /* C4 */ NULL
, NULL
, NULL
, NULL
,
15438 /* C8 */ NULL
, NULL
, NULL
, NULL
,
15439 /* CC */ NULL
, NULL
, NULL
, NULL
,
15440 /* D0 */ NULL
, NULL
, NULL
, NULL
,
15441 /* D4 */ NULL
, NULL
, NULL
, NULL
,
15442 /* D8 */ NULL
, NULL
, NULL
, NULL
,
15443 /* DC */ NULL
, NULL
, NULL
, NULL
,
15444 /* E0 */ NULL
, NULL
, NULL
, NULL
,
15445 /* E4 */ NULL
, NULL
, NULL
, NULL
,
15446 /* E8 */ NULL
, NULL
, NULL
, NULL
,
15447 /* EC */ NULL
, NULL
, NULL
, NULL
,
15448 /* F0 */ NULL
, NULL
, NULL
, NULL
,
15449 /* F4 */ NULL
, NULL
, NULL
, NULL
,
15450 /* F8 */ NULL
, NULL
, NULL
, NULL
,
15451 /* FC */ NULL
, NULL
, NULL
, NULL
,
15455 OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
15457 const char *mnemonic
;
15459 FETCH_DATA (the_info
, codep
+ 1);
15460 /* AMD 3DNow! instructions are specified by an opcode suffix in the
15461 place where an 8-bit immediate would normally go. ie. the last
15462 byte of the instruction. */
15463 obufp
= mnemonicendp
;
15464 mnemonic
= Suffix3DNow
[*codep
++ & 0xff];
15466 oappend (mnemonic
);
15469 /* Since a variable sized modrm/sib chunk is between the start
15470 of the opcode (0x0f0f) and the opcode suffix, we need to do
15471 all the modrm processing first, and don't know until now that
15472 we have a bad opcode. This necessitates some cleaning up. */
15473 op_out
[0][0] = '\0';
15474 op_out
[1][0] = '\0';
15477 mnemonicendp
= obufp
;
15480 static struct op simd_cmp_op
[] =
15482 { STRING_COMMA_LEN ("eq") },
15483 { STRING_COMMA_LEN ("lt") },
15484 { STRING_COMMA_LEN ("le") },
15485 { STRING_COMMA_LEN ("unord") },
15486 { STRING_COMMA_LEN ("neq") },
15487 { STRING_COMMA_LEN ("nlt") },
15488 { STRING_COMMA_LEN ("nle") },
15489 { STRING_COMMA_LEN ("ord") }
15493 CMP_Fixup (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
15495 unsigned int cmp_type
;
15497 FETCH_DATA (the_info
, codep
+ 1);
15498 cmp_type
= *codep
++ & 0xff;
15499 if (cmp_type
< ARRAY_SIZE (simd_cmp_op
))
15502 char *p
= mnemonicendp
- 2;
15506 sprintf (p
, "%s%s", simd_cmp_op
[cmp_type
].name
, suffix
);
15507 mnemonicendp
+= simd_cmp_op
[cmp_type
].len
;
15511 /* We have a reserved extension byte. Output it directly. */
15512 scratchbuf
[0] = '$';
15513 print_operand_value (scratchbuf
+ 1, 1, cmp_type
);
15514 oappend_maybe_intel (scratchbuf
);
15515 scratchbuf
[0] = '\0';
15520 OP_Mwait (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
15522 /* mwait %eax,%ecx / mwaitx %eax,%ecx,%ebx */
15525 strcpy (op_out
[0], names32
[0]);
15526 strcpy (op_out
[1], names32
[1]);
15527 if (bytemode
== eBX_reg
)
15528 strcpy (op_out
[2], names32
[3]);
15529 two_source_ops
= 1;
15531 /* Skip mod/rm byte. */
15537 OP_Monitor (int bytemode ATTRIBUTE_UNUSED
,
15538 int sizeflag ATTRIBUTE_UNUSED
)
15540 /* monitor %{e,r,}ax,%ecx,%edx" */
15543 const char **names
= (address_mode
== mode_64bit
15544 ? names64
: names32
);
15546 if (prefixes
& PREFIX_ADDR
)
15548 /* Remove "addr16/addr32". */
15549 all_prefixes
[last_addr_prefix
] = 0;
15550 names
= (address_mode
!= mode_32bit
15551 ? names32
: names16
);
15552 used_prefixes
|= PREFIX_ADDR
;
15554 else if (address_mode
== mode_16bit
)
15556 strcpy (op_out
[0], names
[0]);
15557 strcpy (op_out
[1], names32
[1]);
15558 strcpy (op_out
[2], names32
[2]);
15559 two_source_ops
= 1;
15561 /* Skip mod/rm byte. */
15569 /* Throw away prefixes and 1st. opcode byte. */
15570 codep
= insn_codep
+ 1;
15575 REP_Fixup (int bytemode
, int sizeflag
)
15577 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
15579 if (prefixes
& PREFIX_REPZ
)
15580 all_prefixes
[last_repz_prefix
] = REP_PREFIX
;
15587 OP_IMREG (bytemode
, sizeflag
);
15590 OP_ESreg (bytemode
, sizeflag
);
15593 OP_DSreg (bytemode
, sizeflag
);
15601 /* For BND-prefixed instructions 0xF2 prefix should be displayed as
15605 BND_Fixup (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
15607 if (prefixes
& PREFIX_REPNZ
)
15608 all_prefixes
[last_repnz_prefix
] = BND_PREFIX
;
15611 /* For NOTRACK-prefixed instructions, 0x3E prefix should be displayed as
15615 NOTRACK_Fixup (int bytemode ATTRIBUTE_UNUSED
,
15616 int sizeflag ATTRIBUTE_UNUSED
)
15618 if (active_seg_prefix
== PREFIX_DS
15619 && (address_mode
!= mode_64bit
|| last_data_prefix
< 0))
15621 /* NOTRACK prefix is only valid on indirect branch instructions.
15622 NB: DATA prefix is unsupported for Intel64. */
15623 active_seg_prefix
= 0;
15624 all_prefixes
[last_seg_prefix
] = NOTRACK_PREFIX
;
15628 /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
15629 "xacquire"/"xrelease" for memory operand if there is a LOCK prefix.
15633 HLE_Fixup1 (int bytemode
, int sizeflag
)
15636 && (prefixes
& PREFIX_LOCK
) != 0)
15638 if (prefixes
& PREFIX_REPZ
)
15639 all_prefixes
[last_repz_prefix
] = XRELEASE_PREFIX
;
15640 if (prefixes
& PREFIX_REPNZ
)
15641 all_prefixes
[last_repnz_prefix
] = XACQUIRE_PREFIX
;
15644 OP_E (bytemode
, sizeflag
);
15647 /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
15648 "xacquire"/"xrelease" for memory operand. No check for LOCK prefix.
15652 HLE_Fixup2 (int bytemode
, int sizeflag
)
15654 if (modrm
.mod
!= 3)
15656 if (prefixes
& PREFIX_REPZ
)
15657 all_prefixes
[last_repz_prefix
] = XRELEASE_PREFIX
;
15658 if (prefixes
& PREFIX_REPNZ
)
15659 all_prefixes
[last_repnz_prefix
] = XACQUIRE_PREFIX
;
15662 OP_E (bytemode
, sizeflag
);
15665 /* Similar to OP_E. But the 0xf3 prefixes should be displayed as
15666 "xrelease" for memory operand. No check for LOCK prefix. */
15669 HLE_Fixup3 (int bytemode
, int sizeflag
)
15672 && last_repz_prefix
> last_repnz_prefix
15673 && (prefixes
& PREFIX_REPZ
) != 0)
15674 all_prefixes
[last_repz_prefix
] = XRELEASE_PREFIX
;
15676 OP_E (bytemode
, sizeflag
);
15680 CMPXCHG8B_Fixup (int bytemode
, int sizeflag
)
15685 /* Change cmpxchg8b to cmpxchg16b. */
15686 char *p
= mnemonicendp
- 2;
15687 mnemonicendp
= stpcpy (p
, "16b");
15690 else if ((prefixes
& PREFIX_LOCK
) != 0)
15692 if (prefixes
& PREFIX_REPZ
)
15693 all_prefixes
[last_repz_prefix
] = XRELEASE_PREFIX
;
15694 if (prefixes
& PREFIX_REPNZ
)
15695 all_prefixes
[last_repnz_prefix
] = XACQUIRE_PREFIX
;
15698 OP_M (bytemode
, sizeflag
);
15702 XMM_Fixup (int reg
, int sizeflag ATTRIBUTE_UNUSED
)
15704 const char **names
;
15708 switch (vex
.length
)
15722 oappend (names
[reg
]);
15726 CRC32_Fixup (int bytemode
, int sizeflag
)
15728 /* Add proper suffix to "crc32". */
15729 char *p
= mnemonicendp
;
15748 if (sizeflag
& DFLAG
)
15752 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15756 oappend (INTERNAL_DISASSEMBLER_ERROR
);
15763 if (modrm
.mod
== 3)
15767 /* Skip mod/rm byte. */
15772 add
= (rex
& REX_B
) ? 8 : 0;
15773 if (bytemode
== b_mode
)
15777 oappend (names8rex
[modrm
.rm
+ add
]);
15779 oappend (names8
[modrm
.rm
+ add
]);
15785 oappend (names64
[modrm
.rm
+ add
]);
15786 else if ((prefixes
& PREFIX_DATA
))
15787 oappend (names16
[modrm
.rm
+ add
]);
15789 oappend (names32
[modrm
.rm
+ add
]);
15793 OP_E (bytemode
, sizeflag
);
15797 FXSAVE_Fixup (int bytemode
, int sizeflag
)
15799 /* Add proper suffix to "fxsave" and "fxrstor". */
15803 char *p
= mnemonicendp
;
15809 OP_M (bytemode
, sizeflag
);
15813 PCMPESTR_Fixup (int bytemode
, int sizeflag
)
15815 /* Add proper suffix to "{,v}pcmpestr{i,m}". */
15818 char *p
= mnemonicendp
;
15823 else if (sizeflag
& SUFFIX_ALWAYS
)
15830 OP_EX (bytemode
, sizeflag
);
15833 /* Display the destination register operand for instructions with
15837 OP_VEX (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
15840 const char **names
;
15848 reg
= vex
.register_specifier
;
15849 vex
.register_specifier
= 0;
15850 if (address_mode
!= mode_64bit
)
15852 else if (vex
.evex
&& !vex
.v
)
15855 if (bytemode
== vex_scalar_mode
)
15857 oappend (names_xmm
[reg
]);
15861 switch (vex
.length
)
15868 case vex_vsib_q_w_dq_mode
:
15869 case vex_vsib_q_w_d_mode
:
15885 names
= names_mask
;
15899 case vex_vsib_q_w_dq_mode
:
15900 case vex_vsib_q_w_d_mode
:
15901 names
= vex
.w
? names_ymm
: names_xmm
;
15910 names
= names_mask
;
15913 /* See PR binutils/20893 for a reproducer. */
15925 oappend (names
[reg
]);
15928 /* Get the VEX immediate byte without moving codep. */
15930 static unsigned char
15931 get_vex_imm8 (int sizeflag
, int opnum
)
15933 int bytes_before_imm
= 0;
15935 if (modrm
.mod
!= 3)
15937 /* There are SIB/displacement bytes. */
15938 if ((sizeflag
& AFLAG
) || address_mode
== mode_64bit
)
15940 /* 32/64 bit address mode */
15941 int base
= modrm
.rm
;
15943 /* Check SIB byte. */
15946 FETCH_DATA (the_info
, codep
+ 1);
15948 /* When decoding the third source, don't increase
15949 bytes_before_imm as this has already been incremented
15950 by one in OP_E_memory while decoding the second
15953 bytes_before_imm
++;
15956 /* Don't increase bytes_before_imm when decoding the third source,
15957 it has already been incremented by OP_E_memory while decoding
15958 the second source operand. */
15964 /* When modrm.rm == 5 or modrm.rm == 4 and base in
15965 SIB == 5, there is a 4 byte displacement. */
15967 /* No displacement. */
15969 /* Fall through. */
15971 /* 4 byte displacement. */
15972 bytes_before_imm
+= 4;
15975 /* 1 byte displacement. */
15976 bytes_before_imm
++;
15983 /* 16 bit address mode */
15984 /* Don't increase bytes_before_imm when decoding the third source,
15985 it has already been incremented by OP_E_memory while decoding
15986 the second source operand. */
15992 /* When modrm.rm == 6, there is a 2 byte displacement. */
15994 /* No displacement. */
15996 /* Fall through. */
15998 /* 2 byte displacement. */
15999 bytes_before_imm
+= 2;
16002 /* 1 byte displacement: when decoding the third source,
16003 don't increase bytes_before_imm as this has already
16004 been incremented by one in OP_E_memory while decoding
16005 the second source operand. */
16007 bytes_before_imm
++;
16015 FETCH_DATA (the_info
, codep
+ bytes_before_imm
+ 1);
16016 return codep
[bytes_before_imm
];
16020 OP_EX_VexReg (int bytemode
, int sizeflag
, int reg
)
16022 const char **names
;
16024 if (reg
== -1 && modrm
.mod
!= 3)
16026 OP_E_memory (bytemode
, sizeflag
);
16038 if (address_mode
!= mode_64bit
)
16042 switch (vex
.length
)
16053 oappend (names
[reg
]);
16057 OP_EX_VexImmW (int bytemode
, int sizeflag
)
16060 static unsigned char vex_imm8
;
16062 if (vex_w_done
== 0)
16066 /* Skip mod/rm byte. */
16070 vex_imm8
= get_vex_imm8 (sizeflag
, 0);
16073 reg
= vex_imm8
>> 4;
16075 OP_EX_VexReg (bytemode
, sizeflag
, reg
);
16077 else if (vex_w_done
== 1)
16082 reg
= vex_imm8
>> 4;
16084 OP_EX_VexReg (bytemode
, sizeflag
, reg
);
16088 /* Output the imm8 directly. */
16089 scratchbuf
[0] = '$';
16090 print_operand_value (scratchbuf
+ 1, 1, vex_imm8
& 0xf);
16091 oappend_maybe_intel (scratchbuf
);
16092 scratchbuf
[0] = '\0';
16098 OP_Vex_2src (int bytemode
, int sizeflag
)
16100 if (modrm
.mod
== 3)
16102 int reg
= modrm
.rm
;
16106 oappend (names_xmm
[reg
]);
16111 && (bytemode
== v_mode
|| bytemode
== v_swap_mode
))
16113 bytemode
= (prefixes
& PREFIX_DATA
) ? x_mode
: q_mode
;
16114 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16116 OP_E (bytemode
, sizeflag
);
16121 OP_Vex_2src_1 (int bytemode
, int sizeflag
)
16123 if (modrm
.mod
== 3)
16125 /* Skip mod/rm byte. */
16132 unsigned int reg
= vex
.register_specifier
;
16133 vex
.register_specifier
= 0;
16135 if (address_mode
!= mode_64bit
)
16137 oappend (names_xmm
[reg
]);
16140 OP_Vex_2src (bytemode
, sizeflag
);
16144 OP_Vex_2src_2 (int bytemode
, int sizeflag
)
16147 OP_Vex_2src (bytemode
, sizeflag
);
16150 unsigned int reg
= vex
.register_specifier
;
16151 vex
.register_specifier
= 0;
16153 if (address_mode
!= mode_64bit
)
16155 oappend (names_xmm
[reg
]);
16160 OP_EX_VexW (int bytemode
, int sizeflag
)
16166 /* Skip mod/rm byte. */
16171 reg
= get_vex_imm8 (sizeflag
, 0) >> 4;
16176 reg
= get_vex_imm8 (sizeflag
, 1) >> 4;
16179 OP_EX_VexReg (bytemode
, sizeflag
, reg
);
16187 OP_REG_VexI4 (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
16190 const char **names
;
16192 FETCH_DATA (the_info
, codep
+ 1);
16195 if (bytemode
!= x_mode
)
16199 if (address_mode
!= mode_64bit
)
16202 switch (vex
.length
)
16213 oappend (names
[reg
]);
16217 OP_XMM_VexW (int bytemode
, int sizeflag
)
16219 /* Turn off the REX.W bit since it is used for swapping operands
16222 OP_XMM (bytemode
, sizeflag
);
16226 OP_EX_Vex (int bytemode
, int sizeflag
)
16228 if (modrm
.mod
!= 3)
16230 OP_EX (bytemode
, sizeflag
);
16234 OP_XMM_Vex (int bytemode
, int sizeflag
)
16236 if (modrm
.mod
!= 3)
16238 OP_XMM (bytemode
, sizeflag
);
16241 static struct op vex_cmp_op
[] =
16243 { STRING_COMMA_LEN ("eq") },
16244 { STRING_COMMA_LEN ("lt") },
16245 { STRING_COMMA_LEN ("le") },
16246 { STRING_COMMA_LEN ("unord") },
16247 { STRING_COMMA_LEN ("neq") },
16248 { STRING_COMMA_LEN ("nlt") },
16249 { STRING_COMMA_LEN ("nle") },
16250 { STRING_COMMA_LEN ("ord") },
16251 { STRING_COMMA_LEN ("eq_uq") },
16252 { STRING_COMMA_LEN ("nge") },
16253 { STRING_COMMA_LEN ("ngt") },
16254 { STRING_COMMA_LEN ("false") },
16255 { STRING_COMMA_LEN ("neq_oq") },
16256 { STRING_COMMA_LEN ("ge") },
16257 { STRING_COMMA_LEN ("gt") },
16258 { STRING_COMMA_LEN ("true") },
16259 { STRING_COMMA_LEN ("eq_os") },
16260 { STRING_COMMA_LEN ("lt_oq") },
16261 { STRING_COMMA_LEN ("le_oq") },
16262 { STRING_COMMA_LEN ("unord_s") },
16263 { STRING_COMMA_LEN ("neq_us") },
16264 { STRING_COMMA_LEN ("nlt_uq") },
16265 { STRING_COMMA_LEN ("nle_uq") },
16266 { STRING_COMMA_LEN ("ord_s") },
16267 { STRING_COMMA_LEN ("eq_us") },
16268 { STRING_COMMA_LEN ("nge_uq") },
16269 { STRING_COMMA_LEN ("ngt_uq") },
16270 { STRING_COMMA_LEN ("false_os") },
16271 { STRING_COMMA_LEN ("neq_os") },
16272 { STRING_COMMA_LEN ("ge_oq") },
16273 { STRING_COMMA_LEN ("gt_oq") },
16274 { STRING_COMMA_LEN ("true_us") },
16278 VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16280 unsigned int cmp_type
;
16282 FETCH_DATA (the_info
, codep
+ 1);
16283 cmp_type
= *codep
++ & 0xff;
16284 if (cmp_type
< ARRAY_SIZE (vex_cmp_op
))
16287 char *p
= mnemonicendp
- 2;
16291 sprintf (p
, "%s%s", vex_cmp_op
[cmp_type
].name
, suffix
);
16292 mnemonicendp
+= vex_cmp_op
[cmp_type
].len
;
16296 /* We have a reserved extension byte. Output it directly. */
16297 scratchbuf
[0] = '$';
16298 print_operand_value (scratchbuf
+ 1, 1, cmp_type
);
16299 oappend_maybe_intel (scratchbuf
);
16300 scratchbuf
[0] = '\0';
16305 VPCMP_Fixup (int bytemode ATTRIBUTE_UNUSED
,
16306 int sizeflag ATTRIBUTE_UNUSED
)
16308 unsigned int cmp_type
;
16313 FETCH_DATA (the_info
, codep
+ 1);
16314 cmp_type
= *codep
++ & 0xff;
16315 /* There are aliases for immediates 0, 1, 2, 4, 5, 6.
16316 If it's the case, print suffix, otherwise - print the immediate. */
16317 if (cmp_type
< ARRAY_SIZE (simd_cmp_op
)
16322 char *p
= mnemonicendp
- 2;
16324 /* vpcmp* can have both one- and two-lettered suffix. */
16338 sprintf (p
, "%s%s", simd_cmp_op
[cmp_type
].name
, suffix
);
16339 mnemonicendp
+= simd_cmp_op
[cmp_type
].len
;
16343 /* We have a reserved extension byte. Output it directly. */
16344 scratchbuf
[0] = '$';
16345 print_operand_value (scratchbuf
+ 1, 1, cmp_type
);
16346 oappend_maybe_intel (scratchbuf
);
16347 scratchbuf
[0] = '\0';
16351 static const struct op xop_cmp_op
[] =
16353 { STRING_COMMA_LEN ("lt") },
16354 { STRING_COMMA_LEN ("le") },
16355 { STRING_COMMA_LEN ("gt") },
16356 { STRING_COMMA_LEN ("ge") },
16357 { STRING_COMMA_LEN ("eq") },
16358 { STRING_COMMA_LEN ("neq") },
16359 { STRING_COMMA_LEN ("false") },
16360 { STRING_COMMA_LEN ("true") }
16364 VPCOM_Fixup (int bytemode ATTRIBUTE_UNUSED
,
16365 int sizeflag ATTRIBUTE_UNUSED
)
16367 unsigned int cmp_type
;
16369 FETCH_DATA (the_info
, codep
+ 1);
16370 cmp_type
= *codep
++ & 0xff;
16371 if (cmp_type
< ARRAY_SIZE (xop_cmp_op
))
16374 char *p
= mnemonicendp
- 2;
16376 /* vpcom* can have both one- and two-lettered suffix. */
16390 sprintf (p
, "%s%s", xop_cmp_op
[cmp_type
].name
, suffix
);
16391 mnemonicendp
+= xop_cmp_op
[cmp_type
].len
;
16395 /* We have a reserved extension byte. Output it directly. */
16396 scratchbuf
[0] = '$';
16397 print_operand_value (scratchbuf
+ 1, 1, cmp_type
);
16398 oappend_maybe_intel (scratchbuf
);
16399 scratchbuf
[0] = '\0';
16403 static const struct op pclmul_op
[] =
16405 { STRING_COMMA_LEN ("lql") },
16406 { STRING_COMMA_LEN ("hql") },
16407 { STRING_COMMA_LEN ("lqh") },
16408 { STRING_COMMA_LEN ("hqh") }
16412 PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED
,
16413 int sizeflag ATTRIBUTE_UNUSED
)
16415 unsigned int pclmul_type
;
16417 FETCH_DATA (the_info
, codep
+ 1);
16418 pclmul_type
= *codep
++ & 0xff;
16419 switch (pclmul_type
)
16430 if (pclmul_type
< ARRAY_SIZE (pclmul_op
))
16433 char *p
= mnemonicendp
- 3;
16438 sprintf (p
, "%s%s", pclmul_op
[pclmul_type
].name
, suffix
);
16439 mnemonicendp
+= pclmul_op
[pclmul_type
].len
;
16443 /* We have a reserved extension byte. Output it directly. */
16444 scratchbuf
[0] = '$';
16445 print_operand_value (scratchbuf
+ 1, 1, pclmul_type
);
16446 oappend_maybe_intel (scratchbuf
);
16447 scratchbuf
[0] = '\0';
16452 MOVBE_Fixup (int bytemode
, int sizeflag
)
16454 /* Add proper suffix to "movbe". */
16455 char *p
= mnemonicendp
;
16464 if (sizeflag
& SUFFIX_ALWAYS
)
16470 if (sizeflag
& DFLAG
)
16474 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16479 oappend (INTERNAL_DISASSEMBLER_ERROR
);
16486 OP_M (bytemode
, sizeflag
);
16490 OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16493 const char **names
;
16495 /* Skip mod/rm byte. */
16509 oappend (names
[reg
]);
16513 OP_LWP_E (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16515 const char **names
;
16516 unsigned int reg
= vex
.register_specifier
;
16517 vex
.register_specifier
= 0;
16524 if (address_mode
!= mode_64bit
)
16526 oappend (names
[reg
]);
16530 OP_Mask (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
16533 || (bytemode
!= mask_mode
&& bytemode
!= mask_bd_mode
))
16537 if ((rex
& REX_R
) != 0 || !vex
.r
)
16543 oappend (names_mask
[modrm
.reg
]);
16547 OP_Rounding (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
16550 || (bytemode
!= evex_rounding_mode
16551 && bytemode
!= evex_rounding_64_mode
16552 && bytemode
!= evex_sae_mode
))
16554 if (modrm
.mod
== 3 && vex
.b
)
16557 case evex_rounding_64_mode
:
16558 if (address_mode
!= mode_64bit
)
16563 /* Fall through. */
16564 case evex_rounding_mode
:
16565 oappend (names_rounding
[vex
.ll
]);
16567 case evex_sae_mode
: