1 /* Print i386 instructions for GDB, the GNU debugger.
2 Copyright (C) 1988-2016 Free Software Foundation, Inc.
4 This file is part of the GNU opcodes library.
6 This library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 It is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
22 /* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
24 modified by John Hassey (hassey@dg-rtp.dg.com)
25 x86-64 support added by Jan Hubicka (jh@suse.cz)
26 VIA PadLock support by Michal Ludvig (mludvig@suse.cz). */
28 /* The main tables describing the instructions is essentially a copy
29 of the "Opcode Map" chapter (Appendix A) of the Intel 80386
30 Programmers Manual. Usually, there is a capital letter, followed
31 by a small letter. The capital letter tell the addressing mode,
32 and the small letter tells about the operand size. Refer to
33 the Intel manual for details. */
38 #include "opcode/i386.h"
39 #include "libiberty.h"
43 static int print_insn (bfd_vma
, disassemble_info
*);
44 static void dofloat (int);
45 static void OP_ST (int, int);
46 static void OP_STi (int, int);
47 static int putop (const char *, int);
48 static void oappend (const char *);
49 static void append_seg (void);
50 static void OP_indirE (int, int);
51 static void print_operand_value (char *, int, bfd_vma
);
52 static void OP_E_register (int, int);
53 static void OP_E_memory (int, int);
54 static void print_displacement (char *, bfd_vma
);
55 static void OP_E (int, int);
56 static void OP_G (int, int);
57 static bfd_vma
get64 (void);
58 static bfd_signed_vma
get32 (void);
59 static bfd_signed_vma
get32s (void);
60 static int get16 (void);
61 static void set_op (bfd_vma
, int);
62 static void OP_Skip_MODRM (int, int);
63 static void OP_REG (int, int);
64 static void OP_IMREG (int, int);
65 static void OP_I (int, int);
66 static void OP_I64 (int, int);
67 static void OP_sI (int, int);
68 static void OP_J (int, int);
69 static void OP_SEG (int, int);
70 static void OP_DIR (int, int);
71 static void OP_OFF (int, int);
72 static void OP_OFF64 (int, int);
73 static void ptr_reg (int, int);
74 static void OP_ESreg (int, int);
75 static void OP_DSreg (int, int);
76 static void OP_C (int, int);
77 static void OP_D (int, int);
78 static void OP_T (int, int);
79 static void OP_R (int, int);
80 static void OP_MMX (int, int);
81 static void OP_XMM (int, int);
82 static void OP_EM (int, int);
83 static void OP_EX (int, int);
84 static void OP_EMC (int,int);
85 static void OP_MXC (int,int);
86 static void OP_MS (int, int);
87 static void OP_XS (int, int);
88 static void OP_M (int, int);
89 static void OP_VEX (int, int);
90 static void OP_EX_Vex (int, int);
91 static void OP_EX_VexW (int, int);
92 static void OP_EX_VexImmW (int, int);
93 static void OP_XMM_Vex (int, int);
94 static void OP_XMM_VexW (int, int);
95 static void OP_Rounding (int, int);
96 static void OP_REG_VexI4 (int, int);
97 static void PCLMUL_Fixup (int, int);
98 static void VEXI4_Fixup (int, int);
99 static void VZERO_Fixup (int, int);
100 static void VCMP_Fixup (int, int);
101 static void VPCMP_Fixup (int, int);
102 static void OP_0f07 (int, int);
103 static void OP_Monitor (int, int);
104 static void OP_Mwait (int, int);
105 static void OP_Mwaitx (int, int);
106 static void NOP_Fixup1 (int, int);
107 static void NOP_Fixup2 (int, int);
108 static void OP_3DNowSuffix (int, int);
109 static void CMP_Fixup (int, int);
110 static void BadOp (void);
111 static void REP_Fixup (int, int);
112 static void BND_Fixup (int, int);
113 static void HLE_Fixup1 (int, int);
114 static void HLE_Fixup2 (int, int);
115 static void HLE_Fixup3 (int, int);
116 static void CMPXCHG8B_Fixup (int, int);
117 static void XMM_Fixup (int, int);
118 static void CRC32_Fixup (int, int);
119 static void FXSAVE_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 Ev { OP_E, v_mode }
250 #define Ev_bnd { OP_E, v_bnd_mode }
251 #define EvS { OP_E, v_swap_mode }
252 #define Ed { OP_E, d_mode }
253 #define Edq { OP_E, dq_mode }
254 #define Edqw { OP_E, dqw_mode }
255 #define EdqwS { OP_E, dqw_swap_mode }
256 #define Edqb { OP_E, dqb_mode }
257 #define Edb { OP_E, db_mode }
258 #define Edw { OP_E, dw_mode }
259 #define Edqd { OP_E, dqd_mode }
260 #define Eq { OP_E, q_mode }
261 #define indirEv { OP_indirE, indir_v_mode }
262 #define indirEp { OP_indirE, f_mode }
263 #define stackEv { OP_E, stack_v_mode }
264 #define Em { OP_E, m_mode }
265 #define Ew { OP_E, w_mode }
266 #define M { OP_M, 0 } /* lea, lgdt, etc. */
267 #define Ma { OP_M, a_mode }
268 #define Mb { OP_M, b_mode }
269 #define Md { OP_M, d_mode }
270 #define Mo { OP_M, o_mode }
271 #define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
272 #define Mq { OP_M, q_mode }
273 #define Mx { OP_M, x_mode }
274 #define Mxmm { OP_M, xmm_mode }
275 #define Gb { OP_G, b_mode }
276 #define Gbnd { OP_G, bnd_mode }
277 #define Gv { OP_G, v_mode }
278 #define Gd { OP_G, d_mode }
279 #define Gdq { OP_G, dq_mode }
280 #define Gm { OP_G, m_mode }
281 #define Gw { OP_G, w_mode }
282 #define Rd { OP_R, d_mode }
283 #define Rdq { OP_R, dq_mode }
284 #define Rm { OP_R, m_mode }
285 #define Ib { OP_I, b_mode }
286 #define sIb { OP_sI, b_mode } /* sign extened byte */
287 #define sIbT { OP_sI, b_T_mode } /* sign extened byte like 'T' */
288 #define Iv { OP_I, v_mode }
289 #define sIv { OP_sI, v_mode }
290 #define Iq { OP_I, q_mode }
291 #define Iv64 { OP_I64, v_mode }
292 #define Iw { OP_I, w_mode }
293 #define I1 { OP_I, const_1_mode }
294 #define Jb { OP_J, b_mode }
295 #define Jv { OP_J, v_mode }
296 #define Cm { OP_C, m_mode }
297 #define Dm { OP_D, m_mode }
298 #define Td { OP_T, d_mode }
299 #define Skip_MODRM { OP_Skip_MODRM, 0 }
301 #define RMeAX { OP_REG, eAX_reg }
302 #define RMeBX { OP_REG, eBX_reg }
303 #define RMeCX { OP_REG, eCX_reg }
304 #define RMeDX { OP_REG, eDX_reg }
305 #define RMeSP { OP_REG, eSP_reg }
306 #define RMeBP { OP_REG, eBP_reg }
307 #define RMeSI { OP_REG, eSI_reg }
308 #define RMeDI { OP_REG, eDI_reg }
309 #define RMrAX { OP_REG, rAX_reg }
310 #define RMrBX { OP_REG, rBX_reg }
311 #define RMrCX { OP_REG, rCX_reg }
312 #define RMrDX { OP_REG, rDX_reg }
313 #define RMrSP { OP_REG, rSP_reg }
314 #define RMrBP { OP_REG, rBP_reg }
315 #define RMrSI { OP_REG, rSI_reg }
316 #define RMrDI { OP_REG, rDI_reg }
317 #define RMAL { OP_REG, al_reg }
318 #define RMCL { OP_REG, cl_reg }
319 #define RMDL { OP_REG, dl_reg }
320 #define RMBL { OP_REG, bl_reg }
321 #define RMAH { OP_REG, ah_reg }
322 #define RMCH { OP_REG, ch_reg }
323 #define RMDH { OP_REG, dh_reg }
324 #define RMBH { OP_REG, bh_reg }
325 #define RMAX { OP_REG, ax_reg }
326 #define RMDX { OP_REG, dx_reg }
328 #define eAX { OP_IMREG, eAX_reg }
329 #define eBX { OP_IMREG, eBX_reg }
330 #define eCX { OP_IMREG, eCX_reg }
331 #define eDX { OP_IMREG, eDX_reg }
332 #define eSP { OP_IMREG, eSP_reg }
333 #define eBP { OP_IMREG, eBP_reg }
334 #define eSI { OP_IMREG, eSI_reg }
335 #define eDI { OP_IMREG, eDI_reg }
336 #define AL { OP_IMREG, al_reg }
337 #define CL { OP_IMREG, cl_reg }
338 #define DL { OP_IMREG, dl_reg }
339 #define BL { OP_IMREG, bl_reg }
340 #define AH { OP_IMREG, ah_reg }
341 #define CH { OP_IMREG, ch_reg }
342 #define DH { OP_IMREG, dh_reg }
343 #define BH { OP_IMREG, bh_reg }
344 #define AX { OP_IMREG, ax_reg }
345 #define DX { OP_IMREG, dx_reg }
346 #define zAX { OP_IMREG, z_mode_ax_reg }
347 #define indirDX { OP_IMREG, indir_dx_reg }
349 #define Sw { OP_SEG, w_mode }
350 #define Sv { OP_SEG, v_mode }
351 #define Ap { OP_DIR, 0 }
352 #define Ob { OP_OFF64, b_mode }
353 #define Ov { OP_OFF64, v_mode }
354 #define Xb { OP_DSreg, eSI_reg }
355 #define Xv { OP_DSreg, eSI_reg }
356 #define Xz { OP_DSreg, eSI_reg }
357 #define Yb { OP_ESreg, eDI_reg }
358 #define Yv { OP_ESreg, eDI_reg }
359 #define DSBX { OP_DSreg, eBX_reg }
361 #define es { OP_REG, es_reg }
362 #define ss { OP_REG, ss_reg }
363 #define cs { OP_REG, cs_reg }
364 #define ds { OP_REG, ds_reg }
365 #define fs { OP_REG, fs_reg }
366 #define gs { OP_REG, gs_reg }
368 #define MX { OP_MMX, 0 }
369 #define XM { OP_XMM, 0 }
370 #define XMScalar { OP_XMM, scalar_mode }
371 #define XMGatherQ { OP_XMM, vex_vsib_q_w_dq_mode }
372 #define XMM { OP_XMM, xmm_mode }
373 #define XMxmmq { OP_XMM, xmmq_mode }
374 #define EM { OP_EM, v_mode }
375 #define EMS { OP_EM, v_swap_mode }
376 #define EMd { OP_EM, d_mode }
377 #define EMx { OP_EM, x_mode }
378 #define EXw { OP_EX, w_mode }
379 #define EXd { OP_EX, d_mode }
380 #define EXdScalar { OP_EX, d_scalar_mode }
381 #define EXdS { OP_EX, d_swap_mode }
382 #define EXdScalarS { OP_EX, d_scalar_swap_mode }
383 #define EXq { OP_EX, q_mode }
384 #define EXqScalar { OP_EX, q_scalar_mode }
385 #define EXqScalarS { OP_EX, q_scalar_swap_mode }
386 #define EXqS { OP_EX, q_swap_mode }
387 #define EXx { OP_EX, x_mode }
388 #define EXxS { OP_EX, x_swap_mode }
389 #define EXxmm { OP_EX, xmm_mode }
390 #define EXymm { OP_EX, ymm_mode }
391 #define EXxmmq { OP_EX, xmmq_mode }
392 #define EXEvexHalfBcstXmmq { OP_EX, evex_half_bcst_xmmq_mode }
393 #define EXxmm_mb { OP_EX, xmm_mb_mode }
394 #define EXxmm_mw { OP_EX, xmm_mw_mode }
395 #define EXxmm_md { OP_EX, xmm_md_mode }
396 #define EXxmm_mq { OP_EX, xmm_mq_mode }
397 #define EXxmm_mdq { OP_EX, xmm_mdq_mode }
398 #define EXxmmdw { OP_EX, xmmdw_mode }
399 #define EXxmmqd { OP_EX, xmmqd_mode }
400 #define EXymmq { OP_EX, ymmq_mode }
401 #define EXVexWdq { OP_EX, vex_w_dq_mode }
402 #define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
403 #define EXEvexXGscat { OP_EX, evex_x_gscat_mode }
404 #define EXEvexXNoBcst { OP_EX, evex_x_nobcst_mode }
405 #define MS { OP_MS, v_mode }
406 #define XS { OP_XS, v_mode }
407 #define EMCq { OP_EMC, q_mode }
408 #define MXC { OP_MXC, 0 }
409 #define OPSUF { OP_3DNowSuffix, 0 }
410 #define CMP { CMP_Fixup, 0 }
411 #define XMM0 { XMM_Fixup, 0 }
412 #define FXSAVE { FXSAVE_Fixup, 0 }
413 #define Vex_2src_1 { OP_Vex_2src_1, 0 }
414 #define Vex_2src_2 { OP_Vex_2src_2, 0 }
416 #define Vex { OP_VEX, vex_mode }
417 #define VexScalar { OP_VEX, vex_scalar_mode }
418 #define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode }
419 #define Vex128 { OP_VEX, vex128_mode }
420 #define Vex256 { OP_VEX, vex256_mode }
421 #define VexGdq { OP_VEX, dq_mode }
422 #define VexI4 { VEXI4_Fixup, 0}
423 #define EXdVex { OP_EX_Vex, d_mode }
424 #define EXdVexS { OP_EX_Vex, d_swap_mode }
425 #define EXdVexScalarS { OP_EX_Vex, d_scalar_swap_mode }
426 #define EXqVex { OP_EX_Vex, q_mode }
427 #define EXqVexS { OP_EX_Vex, q_swap_mode }
428 #define EXqVexScalarS { OP_EX_Vex, q_scalar_swap_mode }
429 #define EXVexW { OP_EX_VexW, x_mode }
430 #define EXdVexW { OP_EX_VexW, d_mode }
431 #define EXqVexW { OP_EX_VexW, q_mode }
432 #define EXVexImmW { OP_EX_VexImmW, x_mode }
433 #define XMVex { OP_XMM_Vex, 0 }
434 #define XMVexScalar { OP_XMM_Vex, scalar_mode }
435 #define XMVexW { OP_XMM_VexW, 0 }
436 #define XMVexI4 { OP_REG_VexI4, x_mode }
437 #define PCLMUL { PCLMUL_Fixup, 0 }
438 #define VZERO { VZERO_Fixup, 0 }
439 #define VCMP { VCMP_Fixup, 0 }
440 #define VPCMP { VPCMP_Fixup, 0 }
442 #define EXxEVexR { OP_Rounding, evex_rounding_mode }
443 #define EXxEVexS { OP_Rounding, evex_sae_mode }
445 #define XMask { OP_Mask, mask_mode }
446 #define MaskG { OP_G, mask_mode }
447 #define MaskE { OP_E, mask_mode }
448 #define MaskBDE { OP_E, mask_bd_mode }
449 #define MaskR { OP_R, mask_mode }
450 #define MaskVex { OP_VEX, mask_mode }
452 #define MVexVSIBDWpX { OP_M, vex_vsib_d_w_dq_mode }
453 #define MVexVSIBDQWpX { OP_M, vex_vsib_d_w_d_mode }
454 #define MVexVSIBQWpX { OP_M, vex_vsib_q_w_dq_mode }
455 #define MVexVSIBQDWpX { OP_M, vex_vsib_q_w_d_mode }
457 /* Used handle "rep" prefix for string instructions. */
458 #define Xbr { REP_Fixup, eSI_reg }
459 #define Xvr { REP_Fixup, eSI_reg }
460 #define Ybr { REP_Fixup, eDI_reg }
461 #define Yvr { REP_Fixup, eDI_reg }
462 #define Yzr { REP_Fixup, eDI_reg }
463 #define indirDXr { REP_Fixup, indir_dx_reg }
464 #define ALr { REP_Fixup, al_reg }
465 #define eAXr { REP_Fixup, eAX_reg }
467 /* Used handle HLE prefix for lockable instructions. */
468 #define Ebh1 { HLE_Fixup1, b_mode }
469 #define Evh1 { HLE_Fixup1, v_mode }
470 #define Ebh2 { HLE_Fixup2, b_mode }
471 #define Evh2 { HLE_Fixup2, v_mode }
472 #define Ebh3 { HLE_Fixup3, b_mode }
473 #define Evh3 { HLE_Fixup3, v_mode }
475 #define BND { BND_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 */
499 /* double word operand */
501 /* double word operand with operand swapped */
503 /* quad word operand */
505 /* quad word operand with operand swapped */
507 /* ten-byte operand */
509 /* 16-byte XMM, 32-byte YMM or 64-byte ZMM operand. In EVEX with
510 broadcast enabled. */
512 /* Similar to x_mode, but with different EVEX mem shifts. */
514 /* Similar to x_mode, but with disabled broadcast. */
516 /* Similar to x_mode, but with operands swapped and disabled broadcast
519 /* 16-byte XMM operand */
521 /* XMM, XMM or YMM register operand, or quad word, xmmword or ymmword
522 memory operand (depending on vector length). Broadcast isn't
525 /* Same as xmmq_mode, but broadcast is allowed. */
526 evex_half_bcst_xmmq_mode
,
527 /* XMM register or byte memory operand */
529 /* XMM register or word memory operand */
531 /* XMM register or double word memory operand */
533 /* XMM register or quad word memory operand */
535 /* XMM register or double/quad word memory operand, depending on
538 /* 16-byte XMM, word, double word or quad word operand. */
540 /* 16-byte XMM, double word, quad word operand or xmm word operand. */
542 /* 32-byte YMM operand */
544 /* quad word, ymmword or zmmword memory operand. */
546 /* 32-byte YMM or 16-byte word operand */
548 /* d_mode in 32bit, q_mode in 64bit mode. */
550 /* pair of v_mode operands */
555 /* operand size depends on REX prefixes. */
557 /* registers like dq_mode, memory like w_mode. */
561 /* 4- or 6-byte pointer operand */
564 /* v_mode for indirect branch opcodes. */
566 /* v_mode for stack-related opcodes. */
568 /* non-quad operand size depends on prefixes */
570 /* 16-byte operand */
572 /* registers like dq_mode, memory like b_mode. */
574 /* registers like d_mode, memory like b_mode. */
576 /* registers like d_mode, memory like w_mode. */
578 /* registers like dq_mode, memory like d_mode. */
580 /* normal vex mode */
582 /* 128bit vex mode */
584 /* 256bit vex mode */
586 /* operand size depends on the VEX.W bit. */
589 /* Similar to vex_w_dq_mode, with VSIB dword indices. */
590 vex_vsib_d_w_dq_mode
,
591 /* Similar to vex_vsib_d_w_dq_mode, with smaller memory. */
593 /* Similar to vex_w_dq_mode, with VSIB qword indices. */
594 vex_vsib_q_w_dq_mode
,
595 /* Similar to vex_vsib_q_w_dq_mode, with smaller memory. */
598 /* scalar, ignore vector length. */
600 /* like d_mode, ignore vector length. */
602 /* like d_swap_mode, ignore vector length. */
604 /* like q_mode, ignore vector length. */
606 /* like q_swap_mode, ignore vector length. */
608 /* like vex_mode, ignore vector length. */
610 /* like vex_w_dq_mode, ignore vector length. */
611 vex_scalar_w_dq_mode
,
613 /* Static rounding. */
615 /* Supress all exceptions. */
618 /* Mask register operand. */
620 /* Mask register operand. */
687 #define FLOAT NULL, { { NULL, FLOATCODE } }, 0
689 #define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }, 0
690 #define DIS386_PREFIX(T, I, P) NULL, { { NULL, (T)}, { NULL, (I) } }, P
691 #define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
692 #define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
693 #define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
694 #define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
695 #define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
696 #define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
697 #define THREE_BYTE_TABLE_PREFIX(I, P) DIS386_PREFIX (USE_3BYTE_TABLE, (I), P)
698 #define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
699 #define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
700 #define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
701 #define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
702 #define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
703 #define EVEX_TABLE(I) DIS386 (USE_EVEX_TABLE, (I))
821 MOD_VEX_0F12_PREFIX_0
,
823 MOD_VEX_0F16_PREFIX_0
,
826 MOD_VEX_W_0_0F41_P_0_LEN_1
,
827 MOD_VEX_W_1_0F41_P_0_LEN_1
,
828 MOD_VEX_W_0_0F41_P_2_LEN_1
,
829 MOD_VEX_W_1_0F41_P_2_LEN_1
,
830 MOD_VEX_W_0_0F42_P_0_LEN_1
,
831 MOD_VEX_W_1_0F42_P_0_LEN_1
,
832 MOD_VEX_W_0_0F42_P_2_LEN_1
,
833 MOD_VEX_W_1_0F42_P_2_LEN_1
,
834 MOD_VEX_W_0_0F44_P_0_LEN_1
,
835 MOD_VEX_W_1_0F44_P_0_LEN_1
,
836 MOD_VEX_W_0_0F44_P_2_LEN_1
,
837 MOD_VEX_W_1_0F44_P_2_LEN_1
,
838 MOD_VEX_W_0_0F45_P_0_LEN_1
,
839 MOD_VEX_W_1_0F45_P_0_LEN_1
,
840 MOD_VEX_W_0_0F45_P_2_LEN_1
,
841 MOD_VEX_W_1_0F45_P_2_LEN_1
,
842 MOD_VEX_W_0_0F46_P_0_LEN_1
,
843 MOD_VEX_W_1_0F46_P_0_LEN_1
,
844 MOD_VEX_W_0_0F46_P_2_LEN_1
,
845 MOD_VEX_W_1_0F46_P_2_LEN_1
,
846 MOD_VEX_W_0_0F47_P_0_LEN_1
,
847 MOD_VEX_W_1_0F47_P_0_LEN_1
,
848 MOD_VEX_W_0_0F47_P_2_LEN_1
,
849 MOD_VEX_W_1_0F47_P_2_LEN_1
,
850 MOD_VEX_W_0_0F4A_P_0_LEN_1
,
851 MOD_VEX_W_1_0F4A_P_0_LEN_1
,
852 MOD_VEX_W_0_0F4A_P_2_LEN_1
,
853 MOD_VEX_W_1_0F4A_P_2_LEN_1
,
854 MOD_VEX_W_0_0F4B_P_0_LEN_1
,
855 MOD_VEX_W_1_0F4B_P_0_LEN_1
,
856 MOD_VEX_W_0_0F4B_P_2_LEN_1
,
868 MOD_VEX_W_0_0F91_P_0_LEN_0
,
869 MOD_VEX_W_1_0F91_P_0_LEN_0
,
870 MOD_VEX_W_0_0F91_P_2_LEN_0
,
871 MOD_VEX_W_1_0F91_P_2_LEN_0
,
872 MOD_VEX_W_0_0F92_P_0_LEN_0
,
873 MOD_VEX_W_0_0F92_P_2_LEN_0
,
874 MOD_VEX_W_0_0F92_P_3_LEN_0
,
875 MOD_VEX_W_1_0F92_P_3_LEN_0
,
876 MOD_VEX_W_0_0F93_P_0_LEN_0
,
877 MOD_VEX_W_0_0F93_P_2_LEN_0
,
878 MOD_VEX_W_0_0F93_P_3_LEN_0
,
879 MOD_VEX_W_1_0F93_P_3_LEN_0
,
880 MOD_VEX_W_0_0F98_P_0_LEN_0
,
881 MOD_VEX_W_1_0F98_P_0_LEN_0
,
882 MOD_VEX_W_0_0F98_P_2_LEN_0
,
883 MOD_VEX_W_1_0F98_P_2_LEN_0
,
884 MOD_VEX_W_0_0F99_P_0_LEN_0
,
885 MOD_VEX_W_1_0F99_P_0_LEN_0
,
886 MOD_VEX_W_0_0F99_P_2_LEN_0
,
887 MOD_VEX_W_1_0F99_P_2_LEN_0
,
890 MOD_VEX_0FD7_PREFIX_2
,
891 MOD_VEX_0FE7_PREFIX_2
,
892 MOD_VEX_0FF0_PREFIX_3
,
893 MOD_VEX_0F381A_PREFIX_2
,
894 MOD_VEX_0F382A_PREFIX_2
,
895 MOD_VEX_0F382C_PREFIX_2
,
896 MOD_VEX_0F382D_PREFIX_2
,
897 MOD_VEX_0F382E_PREFIX_2
,
898 MOD_VEX_0F382F_PREFIX_2
,
899 MOD_VEX_0F385A_PREFIX_2
,
900 MOD_VEX_0F388C_PREFIX_2
,
901 MOD_VEX_0F388E_PREFIX_2
,
902 MOD_VEX_W_0_0F3A30_P_2_LEN_0
,
903 MOD_VEX_W_1_0F3A30_P_2_LEN_0
,
904 MOD_VEX_W_0_0F3A31_P_2_LEN_0
,
905 MOD_VEX_W_1_0F3A31_P_2_LEN_0
,
906 MOD_VEX_W_0_0F3A32_P_2_LEN_0
,
907 MOD_VEX_W_1_0F3A32_P_2_LEN_0
,
908 MOD_VEX_W_0_0F3A33_P_2_LEN_0
,
909 MOD_VEX_W_1_0F3A33_P_2_LEN_0
,
911 MOD_EVEX_0F10_PREFIX_1
,
912 MOD_EVEX_0F10_PREFIX_3
,
913 MOD_EVEX_0F11_PREFIX_1
,
914 MOD_EVEX_0F11_PREFIX_3
,
915 MOD_EVEX_0F12_PREFIX_0
,
916 MOD_EVEX_0F16_PREFIX_0
,
917 MOD_EVEX_0F38C6_REG_1
,
918 MOD_EVEX_0F38C6_REG_2
,
919 MOD_EVEX_0F38C6_REG_5
,
920 MOD_EVEX_0F38C6_REG_6
,
921 MOD_EVEX_0F38C7_REG_1
,
922 MOD_EVEX_0F38C7_REG_2
,
923 MOD_EVEX_0F38C7_REG_5
,
924 MOD_EVEX_0F38C7_REG_6
989 PREFIX_RM_0_0FAE_REG_7
,
995 PREFIX_MOD_0_0FC7_REG_6
,
996 PREFIX_MOD_3_0FC7_REG_6
,
997 PREFIX_MOD_3_0FC7_REG_7
,
1121 PREFIX_VEX_0F71_REG_2
,
1122 PREFIX_VEX_0F71_REG_4
,
1123 PREFIX_VEX_0F71_REG_6
,
1124 PREFIX_VEX_0F72_REG_2
,
1125 PREFIX_VEX_0F72_REG_4
,
1126 PREFIX_VEX_0F72_REG_6
,
1127 PREFIX_VEX_0F73_REG_2
,
1128 PREFIX_VEX_0F73_REG_3
,
1129 PREFIX_VEX_0F73_REG_6
,
1130 PREFIX_VEX_0F73_REG_7
,
1302 PREFIX_VEX_0F38F3_REG_1
,
1303 PREFIX_VEX_0F38F3_REG_2
,
1304 PREFIX_VEX_0F38F3_REG_3
,
1421 PREFIX_EVEX_0F71_REG_2
,
1422 PREFIX_EVEX_0F71_REG_4
,
1423 PREFIX_EVEX_0F71_REG_6
,
1424 PREFIX_EVEX_0F72_REG_0
,
1425 PREFIX_EVEX_0F72_REG_1
,
1426 PREFIX_EVEX_0F72_REG_2
,
1427 PREFIX_EVEX_0F72_REG_4
,
1428 PREFIX_EVEX_0F72_REG_6
,
1429 PREFIX_EVEX_0F73_REG_2
,
1430 PREFIX_EVEX_0F73_REG_3
,
1431 PREFIX_EVEX_0F73_REG_6
,
1432 PREFIX_EVEX_0F73_REG_7
,
1615 PREFIX_EVEX_0F38C6_REG_1
,
1616 PREFIX_EVEX_0F38C6_REG_2
,
1617 PREFIX_EVEX_0F38C6_REG_5
,
1618 PREFIX_EVEX_0F38C6_REG_6
,
1619 PREFIX_EVEX_0F38C7_REG_1
,
1620 PREFIX_EVEX_0F38C7_REG_2
,
1621 PREFIX_EVEX_0F38C7_REG_5
,
1622 PREFIX_EVEX_0F38C7_REG_6
,
1711 THREE_BYTE_0F38
= 0,
1739 VEX_LEN_0F10_P_1
= 0,
1743 VEX_LEN_0F12_P_0_M_0
,
1744 VEX_LEN_0F12_P_0_M_1
,
1747 VEX_LEN_0F16_P_0_M_0
,
1748 VEX_LEN_0F16_P_0_M_1
,
1812 VEX_LEN_0FAE_R_2_M_0
,
1813 VEX_LEN_0FAE_R_3_M_0
,
1822 VEX_LEN_0F381A_P_2_M_0
,
1825 VEX_LEN_0F385A_P_2_M_0
,
1832 VEX_LEN_0F38F3_R_1_P_0
,
1833 VEX_LEN_0F38F3_R_2_P_0
,
1834 VEX_LEN_0F38F3_R_3_P_0
,
1880 VEX_LEN_0FXOP_08_CC
,
1881 VEX_LEN_0FXOP_08_CD
,
1882 VEX_LEN_0FXOP_08_CE
,
1883 VEX_LEN_0FXOP_08_CF
,
1884 VEX_LEN_0FXOP_08_EC
,
1885 VEX_LEN_0FXOP_08_ED
,
1886 VEX_LEN_0FXOP_08_EE
,
1887 VEX_LEN_0FXOP_08_EF
,
1888 VEX_LEN_0FXOP_09_80
,
1922 VEX_W_0F41_P_0_LEN_1
,
1923 VEX_W_0F41_P_2_LEN_1
,
1924 VEX_W_0F42_P_0_LEN_1
,
1925 VEX_W_0F42_P_2_LEN_1
,
1926 VEX_W_0F44_P_0_LEN_0
,
1927 VEX_W_0F44_P_2_LEN_0
,
1928 VEX_W_0F45_P_0_LEN_1
,
1929 VEX_W_0F45_P_2_LEN_1
,
1930 VEX_W_0F46_P_0_LEN_1
,
1931 VEX_W_0F46_P_2_LEN_1
,
1932 VEX_W_0F47_P_0_LEN_1
,
1933 VEX_W_0F47_P_2_LEN_1
,
1934 VEX_W_0F4A_P_0_LEN_1
,
1935 VEX_W_0F4A_P_2_LEN_1
,
1936 VEX_W_0F4B_P_0_LEN_1
,
1937 VEX_W_0F4B_P_2_LEN_1
,
2017 VEX_W_0F90_P_0_LEN_0
,
2018 VEX_W_0F90_P_2_LEN_0
,
2019 VEX_W_0F91_P_0_LEN_0
,
2020 VEX_W_0F91_P_2_LEN_0
,
2021 VEX_W_0F92_P_0_LEN_0
,
2022 VEX_W_0F92_P_2_LEN_0
,
2023 VEX_W_0F92_P_3_LEN_0
,
2024 VEX_W_0F93_P_0_LEN_0
,
2025 VEX_W_0F93_P_2_LEN_0
,
2026 VEX_W_0F93_P_3_LEN_0
,
2027 VEX_W_0F98_P_0_LEN_0
,
2028 VEX_W_0F98_P_2_LEN_0
,
2029 VEX_W_0F99_P_0_LEN_0
,
2030 VEX_W_0F99_P_2_LEN_0
,
2109 VEX_W_0F381A_P_2_M_0
,
2121 VEX_W_0F382A_P_2_M_0
,
2123 VEX_W_0F382C_P_2_M_0
,
2124 VEX_W_0F382D_P_2_M_0
,
2125 VEX_W_0F382E_P_2_M_0
,
2126 VEX_W_0F382F_P_2_M_0
,
2148 VEX_W_0F385A_P_2_M_0
,
2176 VEX_W_0F3A30_P_2_LEN_0
,
2177 VEX_W_0F3A31_P_2_LEN_0
,
2178 VEX_W_0F3A32_P_2_LEN_0
,
2179 VEX_W_0F3A33_P_2_LEN_0
,
2199 EVEX_W_0F10_P_1_M_0
,
2200 EVEX_W_0F10_P_1_M_1
,
2202 EVEX_W_0F10_P_3_M_0
,
2203 EVEX_W_0F10_P_3_M_1
,
2205 EVEX_W_0F11_P_1_M_0
,
2206 EVEX_W_0F11_P_1_M_1
,
2208 EVEX_W_0F11_P_3_M_0
,
2209 EVEX_W_0F11_P_3_M_1
,
2210 EVEX_W_0F12_P_0_M_0
,
2211 EVEX_W_0F12_P_0_M_1
,
2221 EVEX_W_0F16_P_0_M_0
,
2222 EVEX_W_0F16_P_0_M_1
,
2293 EVEX_W_0F72_R_2_P_2
,
2294 EVEX_W_0F72_R_6_P_2
,
2295 EVEX_W_0F73_R_2_P_2
,
2296 EVEX_W_0F73_R_6_P_2
,
2396 EVEX_W_0F38C7_R_1_P_2
,
2397 EVEX_W_0F38C7_R_2_P_2
,
2398 EVEX_W_0F38C7_R_5_P_2
,
2399 EVEX_W_0F38C7_R_6_P_2
,
2434 typedef void (*op_rtn
) (int bytemode
, int sizeflag
);
2443 unsigned int prefix_requirement
;
2446 /* Upper case letters in the instruction names here are macros.
2447 'A' => print 'b' if no register operands or suffix_always is true
2448 'B' => print 'b' if suffix_always is true
2449 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
2451 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
2452 suffix_always is true
2453 'E' => print 'e' if 32-bit form of jcxz
2454 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
2455 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
2456 'H' => print ",pt" or ",pn" branch hint
2457 'I' => honor following macro letter even in Intel mode (implemented only
2458 for some of the macro letters)
2460 'K' => print 'd' or 'q' if rex prefix is present.
2461 'L' => print 'l' if suffix_always is true
2462 'M' => print 'r' if intel_mnemonic is false.
2463 'N' => print 'n' if instruction has no wait "prefix"
2464 'O' => print 'd' or 'o' (or 'q' in Intel mode)
2465 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
2466 or suffix_always is true. print 'q' if rex prefix is present.
2467 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
2469 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
2470 'S' => print 'w', 'l' or 'q' if suffix_always is true
2471 'T' => print 'q' in 64bit mode if instruction has no operand size
2472 prefix and behave as 'P' otherwise
2473 'U' => print 'q' in 64bit mode if instruction has no operand size
2474 prefix and behave as 'Q' otherwise
2475 'V' => print 'q' in 64bit mode if instruction has no operand size
2476 prefix and behave as 'S' otherwise
2477 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
2478 'X' => print 's', 'd' depending on data16 prefix (for XMM)
2479 'Y' => 'q' if instruction has an REX 64bit overwrite prefix and
2480 suffix_always is true.
2481 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
2482 '!' => change condition from true to false or from false to true.
2483 '%' => add 1 upper case letter to the macro.
2484 '^' => print 'w' or 'l' depending on operand size prefix or
2485 suffix_always is true (lcall/ljmp).
2486 '@' => print 'q' for Intel64 ISA, 'w' or 'q' for AMD64 ISA depending
2487 on operand size prefix.
2488 '&' => print 'q' in 64bit mode for Intel64 ISA or if instruction
2489 has no operand size prefix for AMD64 ISA, behave as 'P'
2492 2 upper case letter macros:
2493 "XY" => print 'x' or 'y' if suffix_always is true or no register
2494 operands and no broadcast.
2495 "XZ" => print 'x', 'y', or 'z' if suffix_always is true or no
2496 register operands and no broadcast.
2497 "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
2498 "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
2499 or suffix_always is true
2500 "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
2501 "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
2502 "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
2503 "LW" => print 'd', 'q' depending on the VEX.W bit
2504 "LP" => print 'w' or 'l' ('d' in Intel mode) if instruction has
2505 an operand size prefix, or suffix_always is true. print
2506 'q' if rex prefix is present.
2508 Many of the above letters print nothing in Intel mode. See "putop"
2511 Braces '{' and '}', and vertical bars '|', indicate alternative
2512 mnemonic strings for AT&T and Intel. */
2514 static const struct dis386 dis386
[] = {
2516 { "addB", { Ebh1
, Gb
}, 0 },
2517 { "addS", { Evh1
, Gv
}, 0 },
2518 { "addB", { Gb
, EbS
}, 0 },
2519 { "addS", { Gv
, EvS
}, 0 },
2520 { "addB", { AL
, Ib
}, 0 },
2521 { "addS", { eAX
, Iv
}, 0 },
2522 { X86_64_TABLE (X86_64_06
) },
2523 { X86_64_TABLE (X86_64_07
) },
2525 { "orB", { Ebh1
, Gb
}, 0 },
2526 { "orS", { Evh1
, Gv
}, 0 },
2527 { "orB", { Gb
, EbS
}, 0 },
2528 { "orS", { Gv
, EvS
}, 0 },
2529 { "orB", { AL
, Ib
}, 0 },
2530 { "orS", { eAX
, Iv
}, 0 },
2531 { X86_64_TABLE (X86_64_0D
) },
2532 { Bad_Opcode
}, /* 0x0f extended opcode escape */
2534 { "adcB", { Ebh1
, Gb
}, 0 },
2535 { "adcS", { Evh1
, Gv
}, 0 },
2536 { "adcB", { Gb
, EbS
}, 0 },
2537 { "adcS", { Gv
, EvS
}, 0 },
2538 { "adcB", { AL
, Ib
}, 0 },
2539 { "adcS", { eAX
, Iv
}, 0 },
2540 { X86_64_TABLE (X86_64_16
) },
2541 { X86_64_TABLE (X86_64_17
) },
2543 { "sbbB", { Ebh1
, Gb
}, 0 },
2544 { "sbbS", { Evh1
, Gv
}, 0 },
2545 { "sbbB", { Gb
, EbS
}, 0 },
2546 { "sbbS", { Gv
, EvS
}, 0 },
2547 { "sbbB", { AL
, Ib
}, 0 },
2548 { "sbbS", { eAX
, Iv
}, 0 },
2549 { X86_64_TABLE (X86_64_1E
) },
2550 { X86_64_TABLE (X86_64_1F
) },
2552 { "andB", { Ebh1
, Gb
}, 0 },
2553 { "andS", { Evh1
, Gv
}, 0 },
2554 { "andB", { Gb
, EbS
}, 0 },
2555 { "andS", { Gv
, EvS
}, 0 },
2556 { "andB", { AL
, Ib
}, 0 },
2557 { "andS", { eAX
, Iv
}, 0 },
2558 { Bad_Opcode
}, /* SEG ES prefix */
2559 { X86_64_TABLE (X86_64_27
) },
2561 { "subB", { Ebh1
, Gb
}, 0 },
2562 { "subS", { Evh1
, Gv
}, 0 },
2563 { "subB", { Gb
, EbS
}, 0 },
2564 { "subS", { Gv
, EvS
}, 0 },
2565 { "subB", { AL
, Ib
}, 0 },
2566 { "subS", { eAX
, Iv
}, 0 },
2567 { Bad_Opcode
}, /* SEG CS prefix */
2568 { X86_64_TABLE (X86_64_2F
) },
2570 { "xorB", { Ebh1
, Gb
}, 0 },
2571 { "xorS", { Evh1
, Gv
}, 0 },
2572 { "xorB", { Gb
, EbS
}, 0 },
2573 { "xorS", { Gv
, EvS
}, 0 },
2574 { "xorB", { AL
, Ib
}, 0 },
2575 { "xorS", { eAX
, Iv
}, 0 },
2576 { Bad_Opcode
}, /* SEG SS prefix */
2577 { X86_64_TABLE (X86_64_37
) },
2579 { "cmpB", { Eb
, Gb
}, 0 },
2580 { "cmpS", { Ev
, Gv
}, 0 },
2581 { "cmpB", { Gb
, EbS
}, 0 },
2582 { "cmpS", { Gv
, EvS
}, 0 },
2583 { "cmpB", { AL
, Ib
}, 0 },
2584 { "cmpS", { eAX
, Iv
}, 0 },
2585 { Bad_Opcode
}, /* SEG DS prefix */
2586 { X86_64_TABLE (X86_64_3F
) },
2588 { "inc{S|}", { RMeAX
}, 0 },
2589 { "inc{S|}", { RMeCX
}, 0 },
2590 { "inc{S|}", { RMeDX
}, 0 },
2591 { "inc{S|}", { RMeBX
}, 0 },
2592 { "inc{S|}", { RMeSP
}, 0 },
2593 { "inc{S|}", { RMeBP
}, 0 },
2594 { "inc{S|}", { RMeSI
}, 0 },
2595 { "inc{S|}", { RMeDI
}, 0 },
2597 { "dec{S|}", { RMeAX
}, 0 },
2598 { "dec{S|}", { RMeCX
}, 0 },
2599 { "dec{S|}", { RMeDX
}, 0 },
2600 { "dec{S|}", { RMeBX
}, 0 },
2601 { "dec{S|}", { RMeSP
}, 0 },
2602 { "dec{S|}", { RMeBP
}, 0 },
2603 { "dec{S|}", { RMeSI
}, 0 },
2604 { "dec{S|}", { RMeDI
}, 0 },
2606 { "pushV", { RMrAX
}, 0 },
2607 { "pushV", { RMrCX
}, 0 },
2608 { "pushV", { RMrDX
}, 0 },
2609 { "pushV", { RMrBX
}, 0 },
2610 { "pushV", { RMrSP
}, 0 },
2611 { "pushV", { RMrBP
}, 0 },
2612 { "pushV", { RMrSI
}, 0 },
2613 { "pushV", { RMrDI
}, 0 },
2615 { "popV", { RMrAX
}, 0 },
2616 { "popV", { RMrCX
}, 0 },
2617 { "popV", { RMrDX
}, 0 },
2618 { "popV", { RMrBX
}, 0 },
2619 { "popV", { RMrSP
}, 0 },
2620 { "popV", { RMrBP
}, 0 },
2621 { "popV", { RMrSI
}, 0 },
2622 { "popV", { RMrDI
}, 0 },
2624 { X86_64_TABLE (X86_64_60
) },
2625 { X86_64_TABLE (X86_64_61
) },
2626 { X86_64_TABLE (X86_64_62
) },
2627 { X86_64_TABLE (X86_64_63
) },
2628 { Bad_Opcode
}, /* seg fs */
2629 { Bad_Opcode
}, /* seg gs */
2630 { Bad_Opcode
}, /* op size prefix */
2631 { Bad_Opcode
}, /* adr size prefix */
2633 { "pushT", { sIv
}, 0 },
2634 { "imulS", { Gv
, Ev
, Iv
}, 0 },
2635 { "pushT", { sIbT
}, 0 },
2636 { "imulS", { Gv
, Ev
, sIb
}, 0 },
2637 { "ins{b|}", { Ybr
, indirDX
}, 0 },
2638 { X86_64_TABLE (X86_64_6D
) },
2639 { "outs{b|}", { indirDXr
, Xb
}, 0 },
2640 { X86_64_TABLE (X86_64_6F
) },
2642 { "joH", { Jb
, BND
, cond_jump_flag
}, 0 },
2643 { "jnoH", { Jb
, BND
, cond_jump_flag
}, 0 },
2644 { "jbH", { Jb
, BND
, cond_jump_flag
}, 0 },
2645 { "jaeH", { Jb
, BND
, cond_jump_flag
}, 0 },
2646 { "jeH", { Jb
, BND
, cond_jump_flag
}, 0 },
2647 { "jneH", { Jb
, BND
, cond_jump_flag
}, 0 },
2648 { "jbeH", { Jb
, BND
, cond_jump_flag
}, 0 },
2649 { "jaH", { Jb
, BND
, cond_jump_flag
}, 0 },
2651 { "jsH", { Jb
, BND
, cond_jump_flag
}, 0 },
2652 { "jnsH", { Jb
, BND
, cond_jump_flag
}, 0 },
2653 { "jpH", { Jb
, BND
, cond_jump_flag
}, 0 },
2654 { "jnpH", { Jb
, BND
, cond_jump_flag
}, 0 },
2655 { "jlH", { Jb
, BND
, cond_jump_flag
}, 0 },
2656 { "jgeH", { Jb
, BND
, cond_jump_flag
}, 0 },
2657 { "jleH", { Jb
, BND
, cond_jump_flag
}, 0 },
2658 { "jgH", { Jb
, BND
, cond_jump_flag
}, 0 },
2660 { REG_TABLE (REG_80
) },
2661 { REG_TABLE (REG_81
) },
2663 { REG_TABLE (REG_82
) },
2664 { "testB", { Eb
, Gb
}, 0 },
2665 { "testS", { Ev
, Gv
}, 0 },
2666 { "xchgB", { Ebh2
, Gb
}, 0 },
2667 { "xchgS", { Evh2
, Gv
}, 0 },
2669 { "movB", { Ebh3
, Gb
}, 0 },
2670 { "movS", { Evh3
, Gv
}, 0 },
2671 { "movB", { Gb
, EbS
}, 0 },
2672 { "movS", { Gv
, EvS
}, 0 },
2673 { "movD", { Sv
, Sw
}, 0 },
2674 { MOD_TABLE (MOD_8D
) },
2675 { "movD", { Sw
, Sv
}, 0 },
2676 { REG_TABLE (REG_8F
) },
2678 { PREFIX_TABLE (PREFIX_90
) },
2679 { "xchgS", { RMeCX
, eAX
}, 0 },
2680 { "xchgS", { RMeDX
, eAX
}, 0 },
2681 { "xchgS", { RMeBX
, eAX
}, 0 },
2682 { "xchgS", { RMeSP
, eAX
}, 0 },
2683 { "xchgS", { RMeBP
, eAX
}, 0 },
2684 { "xchgS", { RMeSI
, eAX
}, 0 },
2685 { "xchgS", { RMeDI
, eAX
}, 0 },
2687 { "cW{t|}R", { XX
}, 0 },
2688 { "cR{t|}O", { XX
}, 0 },
2689 { X86_64_TABLE (X86_64_9A
) },
2690 { Bad_Opcode
}, /* fwait */
2691 { "pushfT", { XX
}, 0 },
2692 { "popfT", { XX
}, 0 },
2693 { "sahf", { XX
}, 0 },
2694 { "lahf", { XX
}, 0 },
2696 { "mov%LB", { AL
, Ob
}, 0 },
2697 { "mov%LS", { eAX
, Ov
}, 0 },
2698 { "mov%LB", { Ob
, AL
}, 0 },
2699 { "mov%LS", { Ov
, eAX
}, 0 },
2700 { "movs{b|}", { Ybr
, Xb
}, 0 },
2701 { "movs{R|}", { Yvr
, Xv
}, 0 },
2702 { "cmps{b|}", { Xb
, Yb
}, 0 },
2703 { "cmps{R|}", { Xv
, Yv
}, 0 },
2705 { "testB", { AL
, Ib
}, 0 },
2706 { "testS", { eAX
, Iv
}, 0 },
2707 { "stosB", { Ybr
, AL
}, 0 },
2708 { "stosS", { Yvr
, eAX
}, 0 },
2709 { "lodsB", { ALr
, Xb
}, 0 },
2710 { "lodsS", { eAXr
, Xv
}, 0 },
2711 { "scasB", { AL
, Yb
}, 0 },
2712 { "scasS", { eAX
, Yv
}, 0 },
2714 { "movB", { RMAL
, Ib
}, 0 },
2715 { "movB", { RMCL
, Ib
}, 0 },
2716 { "movB", { RMDL
, Ib
}, 0 },
2717 { "movB", { RMBL
, Ib
}, 0 },
2718 { "movB", { RMAH
, Ib
}, 0 },
2719 { "movB", { RMCH
, Ib
}, 0 },
2720 { "movB", { RMDH
, Ib
}, 0 },
2721 { "movB", { RMBH
, Ib
}, 0 },
2723 { "mov%LV", { RMeAX
, Iv64
}, 0 },
2724 { "mov%LV", { RMeCX
, Iv64
}, 0 },
2725 { "mov%LV", { RMeDX
, Iv64
}, 0 },
2726 { "mov%LV", { RMeBX
, Iv64
}, 0 },
2727 { "mov%LV", { RMeSP
, Iv64
}, 0 },
2728 { "mov%LV", { RMeBP
, Iv64
}, 0 },
2729 { "mov%LV", { RMeSI
, Iv64
}, 0 },
2730 { "mov%LV", { RMeDI
, Iv64
}, 0 },
2732 { REG_TABLE (REG_C0
) },
2733 { REG_TABLE (REG_C1
) },
2734 { "retT", { Iw
, BND
}, 0 },
2735 { "retT", { BND
}, 0 },
2736 { X86_64_TABLE (X86_64_C4
) },
2737 { X86_64_TABLE (X86_64_C5
) },
2738 { REG_TABLE (REG_C6
) },
2739 { REG_TABLE (REG_C7
) },
2741 { "enterT", { Iw
, Ib
}, 0 },
2742 { "leaveT", { XX
}, 0 },
2743 { "Jret{|f}P", { Iw
}, 0 },
2744 { "Jret{|f}P", { XX
}, 0 },
2745 { "int3", { XX
}, 0 },
2746 { "int", { Ib
}, 0 },
2747 { X86_64_TABLE (X86_64_CE
) },
2748 { "iret%LP", { XX
}, 0 },
2750 { REG_TABLE (REG_D0
) },
2751 { REG_TABLE (REG_D1
) },
2752 { REG_TABLE (REG_D2
) },
2753 { REG_TABLE (REG_D3
) },
2754 { X86_64_TABLE (X86_64_D4
) },
2755 { X86_64_TABLE (X86_64_D5
) },
2757 { "xlat", { DSBX
}, 0 },
2768 { "loopneFH", { Jb
, XX
, loop_jcxz_flag
}, 0 },
2769 { "loopeFH", { Jb
, XX
, loop_jcxz_flag
}, 0 },
2770 { "loopFH", { Jb
, XX
, loop_jcxz_flag
}, 0 },
2771 { "jEcxzH", { Jb
, XX
, loop_jcxz_flag
}, 0 },
2772 { "inB", { AL
, Ib
}, 0 },
2773 { "inG", { zAX
, Ib
}, 0 },
2774 { "outB", { Ib
, AL
}, 0 },
2775 { "outG", { Ib
, zAX
}, 0 },
2777 { X86_64_TABLE (X86_64_E8
) },
2778 { X86_64_TABLE (X86_64_E9
) },
2779 { X86_64_TABLE (X86_64_EA
) },
2780 { "jmp", { Jb
, BND
}, 0 },
2781 { "inB", { AL
, indirDX
}, 0 },
2782 { "inG", { zAX
, indirDX
}, 0 },
2783 { "outB", { indirDX
, AL
}, 0 },
2784 { "outG", { indirDX
, zAX
}, 0 },
2786 { Bad_Opcode
}, /* lock prefix */
2787 { "icebp", { XX
}, 0 },
2788 { Bad_Opcode
}, /* repne */
2789 { Bad_Opcode
}, /* repz */
2790 { "hlt", { XX
}, 0 },
2791 { "cmc", { XX
}, 0 },
2792 { REG_TABLE (REG_F6
) },
2793 { REG_TABLE (REG_F7
) },
2795 { "clc", { XX
}, 0 },
2796 { "stc", { XX
}, 0 },
2797 { "cli", { XX
}, 0 },
2798 { "sti", { XX
}, 0 },
2799 { "cld", { XX
}, 0 },
2800 { "std", { XX
}, 0 },
2801 { REG_TABLE (REG_FE
) },
2802 { REG_TABLE (REG_FF
) },
2805 static const struct dis386 dis386_twobyte
[] = {
2807 { REG_TABLE (REG_0F00
) },
2808 { REG_TABLE (REG_0F01
) },
2809 { "larS", { Gv
, Ew
}, 0 },
2810 { "lslS", { Gv
, Ew
}, 0 },
2812 { "syscall", { XX
}, 0 },
2813 { "clts", { XX
}, 0 },
2814 { "sysret%LP", { XX
}, 0 },
2816 { "invd", { XX
}, 0 },
2817 { "wbinvd", { XX
}, 0 },
2819 { "ud2", { XX
}, 0 },
2821 { REG_TABLE (REG_0F0D
) },
2822 { "femms", { XX
}, 0 },
2823 { "", { MX
, EM
, OPSUF
}, 0 }, /* See OP_3DNowSuffix. */
2825 { PREFIX_TABLE (PREFIX_0F10
) },
2826 { PREFIX_TABLE (PREFIX_0F11
) },
2827 { PREFIX_TABLE (PREFIX_0F12
) },
2828 { MOD_TABLE (MOD_0F13
) },
2829 { "unpcklpX", { XM
, EXx
}, PREFIX_OPCODE
},
2830 { "unpckhpX", { XM
, EXx
}, PREFIX_OPCODE
},
2831 { PREFIX_TABLE (PREFIX_0F16
) },
2832 { MOD_TABLE (MOD_0F17
) },
2834 { REG_TABLE (REG_0F18
) },
2835 { "nopQ", { Ev
}, 0 },
2836 { PREFIX_TABLE (PREFIX_0F1A
) },
2837 { PREFIX_TABLE (PREFIX_0F1B
) },
2838 { "nopQ", { Ev
}, 0 },
2839 { "nopQ", { Ev
}, 0 },
2840 { "nopQ", { Ev
}, 0 },
2841 { "nopQ", { Ev
}, 0 },
2843 { "movZ", { Rm
, Cm
}, 0 },
2844 { "movZ", { Rm
, Dm
}, 0 },
2845 { "movZ", { Cm
, Rm
}, 0 },
2846 { "movZ", { Dm
, Rm
}, 0 },
2847 { MOD_TABLE (MOD_0F24
) },
2849 { MOD_TABLE (MOD_0F26
) },
2852 { "movapX", { XM
, EXx
}, PREFIX_OPCODE
},
2853 { "movapX", { EXxS
, XM
}, PREFIX_OPCODE
},
2854 { PREFIX_TABLE (PREFIX_0F2A
) },
2855 { PREFIX_TABLE (PREFIX_0F2B
) },
2856 { PREFIX_TABLE (PREFIX_0F2C
) },
2857 { PREFIX_TABLE (PREFIX_0F2D
) },
2858 { PREFIX_TABLE (PREFIX_0F2E
) },
2859 { PREFIX_TABLE (PREFIX_0F2F
) },
2861 { "wrmsr", { XX
}, 0 },
2862 { "rdtsc", { XX
}, 0 },
2863 { "rdmsr", { XX
}, 0 },
2864 { "rdpmc", { XX
}, 0 },
2865 { "sysenter", { XX
}, 0 },
2866 { "sysexit", { XX
}, 0 },
2868 { "getsec", { XX
}, 0 },
2870 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F38
, PREFIX_OPCODE
) },
2872 { THREE_BYTE_TABLE_PREFIX (THREE_BYTE_0F3A
, PREFIX_OPCODE
) },
2879 { "cmovoS", { Gv
, Ev
}, 0 },
2880 { "cmovnoS", { Gv
, Ev
}, 0 },
2881 { "cmovbS", { Gv
, Ev
}, 0 },
2882 { "cmovaeS", { Gv
, Ev
}, 0 },
2883 { "cmoveS", { Gv
, Ev
}, 0 },
2884 { "cmovneS", { Gv
, Ev
}, 0 },
2885 { "cmovbeS", { Gv
, Ev
}, 0 },
2886 { "cmovaS", { Gv
, Ev
}, 0 },
2888 { "cmovsS", { Gv
, Ev
}, 0 },
2889 { "cmovnsS", { Gv
, Ev
}, 0 },
2890 { "cmovpS", { Gv
, Ev
}, 0 },
2891 { "cmovnpS", { Gv
, Ev
}, 0 },
2892 { "cmovlS", { Gv
, Ev
}, 0 },
2893 { "cmovgeS", { Gv
, Ev
}, 0 },
2894 { "cmovleS", { Gv
, Ev
}, 0 },
2895 { "cmovgS", { Gv
, Ev
}, 0 },
2897 { MOD_TABLE (MOD_0F51
) },
2898 { PREFIX_TABLE (PREFIX_0F51
) },
2899 { PREFIX_TABLE (PREFIX_0F52
) },
2900 { PREFIX_TABLE (PREFIX_0F53
) },
2901 { "andpX", { XM
, EXx
}, PREFIX_OPCODE
},
2902 { "andnpX", { XM
, EXx
}, PREFIX_OPCODE
},
2903 { "orpX", { XM
, EXx
}, PREFIX_OPCODE
},
2904 { "xorpX", { XM
, EXx
}, PREFIX_OPCODE
},
2906 { PREFIX_TABLE (PREFIX_0F58
) },
2907 { PREFIX_TABLE (PREFIX_0F59
) },
2908 { PREFIX_TABLE (PREFIX_0F5A
) },
2909 { PREFIX_TABLE (PREFIX_0F5B
) },
2910 { PREFIX_TABLE (PREFIX_0F5C
) },
2911 { PREFIX_TABLE (PREFIX_0F5D
) },
2912 { PREFIX_TABLE (PREFIX_0F5E
) },
2913 { PREFIX_TABLE (PREFIX_0F5F
) },
2915 { PREFIX_TABLE (PREFIX_0F60
) },
2916 { PREFIX_TABLE (PREFIX_0F61
) },
2917 { PREFIX_TABLE (PREFIX_0F62
) },
2918 { "packsswb", { MX
, EM
}, PREFIX_OPCODE
},
2919 { "pcmpgtb", { MX
, EM
}, PREFIX_OPCODE
},
2920 { "pcmpgtw", { MX
, EM
}, PREFIX_OPCODE
},
2921 { "pcmpgtd", { MX
, EM
}, PREFIX_OPCODE
},
2922 { "packuswb", { MX
, EM
}, PREFIX_OPCODE
},
2924 { "punpckhbw", { MX
, EM
}, PREFIX_OPCODE
},
2925 { "punpckhwd", { MX
, EM
}, PREFIX_OPCODE
},
2926 { "punpckhdq", { MX
, EM
}, PREFIX_OPCODE
},
2927 { "packssdw", { MX
, EM
}, PREFIX_OPCODE
},
2928 { PREFIX_TABLE (PREFIX_0F6C
) },
2929 { PREFIX_TABLE (PREFIX_0F6D
) },
2930 { "movK", { MX
, Edq
}, PREFIX_OPCODE
},
2931 { PREFIX_TABLE (PREFIX_0F6F
) },
2933 { PREFIX_TABLE (PREFIX_0F70
) },
2934 { REG_TABLE (REG_0F71
) },
2935 { REG_TABLE (REG_0F72
) },
2936 { REG_TABLE (REG_0F73
) },
2937 { "pcmpeqb", { MX
, EM
}, PREFIX_OPCODE
},
2938 { "pcmpeqw", { MX
, EM
}, PREFIX_OPCODE
},
2939 { "pcmpeqd", { MX
, EM
}, PREFIX_OPCODE
},
2940 { "emms", { XX
}, PREFIX_OPCODE
},
2942 { PREFIX_TABLE (PREFIX_0F78
) },
2943 { PREFIX_TABLE (PREFIX_0F79
) },
2944 { THREE_BYTE_TABLE (THREE_BYTE_0F7A
) },
2946 { PREFIX_TABLE (PREFIX_0F7C
) },
2947 { PREFIX_TABLE (PREFIX_0F7D
) },
2948 { PREFIX_TABLE (PREFIX_0F7E
) },
2949 { PREFIX_TABLE (PREFIX_0F7F
) },
2951 { "joH", { Jv
, BND
, cond_jump_flag
}, 0 },
2952 { "jnoH", { Jv
, BND
, cond_jump_flag
}, 0 },
2953 { "jbH", { Jv
, BND
, cond_jump_flag
}, 0 },
2954 { "jaeH", { Jv
, BND
, cond_jump_flag
}, 0 },
2955 { "jeH", { Jv
, BND
, cond_jump_flag
}, 0 },
2956 { "jneH", { Jv
, BND
, cond_jump_flag
}, 0 },
2957 { "jbeH", { Jv
, BND
, cond_jump_flag
}, 0 },
2958 { "jaH", { Jv
, BND
, cond_jump_flag
}, 0 },
2960 { "jsH", { Jv
, BND
, cond_jump_flag
}, 0 },
2961 { "jnsH", { Jv
, BND
, cond_jump_flag
}, 0 },
2962 { "jpH", { Jv
, BND
, cond_jump_flag
}, 0 },
2963 { "jnpH", { Jv
, BND
, cond_jump_flag
}, 0 },
2964 { "jlH", { Jv
, BND
, cond_jump_flag
}, 0 },
2965 { "jgeH", { Jv
, BND
, cond_jump_flag
}, 0 },
2966 { "jleH", { Jv
, BND
, cond_jump_flag
}, 0 },
2967 { "jgH", { Jv
, BND
, cond_jump_flag
}, 0 },
2969 { "seto", { Eb
}, 0 },
2970 { "setno", { Eb
}, 0 },
2971 { "setb", { Eb
}, 0 },
2972 { "setae", { Eb
}, 0 },
2973 { "sete", { Eb
}, 0 },
2974 { "setne", { Eb
}, 0 },
2975 { "setbe", { Eb
}, 0 },
2976 { "seta", { Eb
}, 0 },
2978 { "sets", { Eb
}, 0 },
2979 { "setns", { Eb
}, 0 },
2980 { "setp", { Eb
}, 0 },
2981 { "setnp", { Eb
}, 0 },
2982 { "setl", { Eb
}, 0 },
2983 { "setge", { Eb
}, 0 },
2984 { "setle", { Eb
}, 0 },
2985 { "setg", { Eb
}, 0 },
2987 { "pushT", { fs
}, 0 },
2988 { "popT", { fs
}, 0 },
2989 { "cpuid", { XX
}, 0 },
2990 { "btS", { Ev
, Gv
}, 0 },
2991 { "shldS", { Ev
, Gv
, Ib
}, 0 },
2992 { "shldS", { Ev
, Gv
, CL
}, 0 },
2993 { REG_TABLE (REG_0FA6
) },
2994 { REG_TABLE (REG_0FA7
) },
2996 { "pushT", { gs
}, 0 },
2997 { "popT", { gs
}, 0 },
2998 { "rsm", { XX
}, 0 },
2999 { "btsS", { Evh1
, Gv
}, 0 },
3000 { "shrdS", { Ev
, Gv
, Ib
}, 0 },
3001 { "shrdS", { Ev
, Gv
, CL
}, 0 },
3002 { REG_TABLE (REG_0FAE
) },
3003 { "imulS", { Gv
, Ev
}, 0 },
3005 { "cmpxchgB", { Ebh1
, Gb
}, 0 },
3006 { "cmpxchgS", { Evh1
, Gv
}, 0 },
3007 { MOD_TABLE (MOD_0FB2
) },
3008 { "btrS", { Evh1
, Gv
}, 0 },
3009 { MOD_TABLE (MOD_0FB4
) },
3010 { MOD_TABLE (MOD_0FB5
) },
3011 { "movz{bR|x}", { Gv
, Eb
}, 0 },
3012 { "movz{wR|x}", { Gv
, Ew
}, 0 }, /* yes, there really is movzww ! */
3014 { PREFIX_TABLE (PREFIX_0FB8
) },
3015 { "ud1", { XX
}, 0 },
3016 { REG_TABLE (REG_0FBA
) },
3017 { "btcS", { Evh1
, Gv
}, 0 },
3018 { PREFIX_TABLE (PREFIX_0FBC
) },
3019 { PREFIX_TABLE (PREFIX_0FBD
) },
3020 { "movs{bR|x}", { Gv
, Eb
}, 0 },
3021 { "movs{wR|x}", { Gv
, Ew
}, 0 }, /* yes, there really is movsww ! */
3023 { "xaddB", { Ebh1
, Gb
}, 0 },
3024 { "xaddS", { Evh1
, Gv
}, 0 },
3025 { PREFIX_TABLE (PREFIX_0FC2
) },
3026 { MOD_TABLE (MOD_0FC3
) },
3027 { "pinsrw", { MX
, Edqw
, Ib
}, PREFIX_OPCODE
},
3028 { "pextrw", { Gdq
, MS
, Ib
}, PREFIX_OPCODE
},
3029 { "shufpX", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
3030 { REG_TABLE (REG_0FC7
) },
3032 { "bswap", { RMeAX
}, 0 },
3033 { "bswap", { RMeCX
}, 0 },
3034 { "bswap", { RMeDX
}, 0 },
3035 { "bswap", { RMeBX
}, 0 },
3036 { "bswap", { RMeSP
}, 0 },
3037 { "bswap", { RMeBP
}, 0 },
3038 { "bswap", { RMeSI
}, 0 },
3039 { "bswap", { RMeDI
}, 0 },
3041 { PREFIX_TABLE (PREFIX_0FD0
) },
3042 { "psrlw", { MX
, EM
}, PREFIX_OPCODE
},
3043 { "psrld", { MX
, EM
}, PREFIX_OPCODE
},
3044 { "psrlq", { MX
, EM
}, PREFIX_OPCODE
},
3045 { "paddq", { MX
, EM
}, PREFIX_OPCODE
},
3046 { "pmullw", { MX
, EM
}, PREFIX_OPCODE
},
3047 { PREFIX_TABLE (PREFIX_0FD6
) },
3048 { MOD_TABLE (MOD_0FD7
) },
3050 { "psubusb", { MX
, EM
}, PREFIX_OPCODE
},
3051 { "psubusw", { MX
, EM
}, PREFIX_OPCODE
},
3052 { "pminub", { MX
, EM
}, PREFIX_OPCODE
},
3053 { "pand", { MX
, EM
}, PREFIX_OPCODE
},
3054 { "paddusb", { MX
, EM
}, PREFIX_OPCODE
},
3055 { "paddusw", { MX
, EM
}, PREFIX_OPCODE
},
3056 { "pmaxub", { MX
, EM
}, PREFIX_OPCODE
},
3057 { "pandn", { MX
, EM
}, PREFIX_OPCODE
},
3059 { "pavgb", { MX
, EM
}, PREFIX_OPCODE
},
3060 { "psraw", { MX
, EM
}, PREFIX_OPCODE
},
3061 { "psrad", { MX
, EM
}, PREFIX_OPCODE
},
3062 { "pavgw", { MX
, EM
}, PREFIX_OPCODE
},
3063 { "pmulhuw", { MX
, EM
}, PREFIX_OPCODE
},
3064 { "pmulhw", { MX
, EM
}, PREFIX_OPCODE
},
3065 { PREFIX_TABLE (PREFIX_0FE6
) },
3066 { PREFIX_TABLE (PREFIX_0FE7
) },
3068 { "psubsb", { MX
, EM
}, PREFIX_OPCODE
},
3069 { "psubsw", { MX
, EM
}, PREFIX_OPCODE
},
3070 { "pminsw", { MX
, EM
}, PREFIX_OPCODE
},
3071 { "por", { MX
, EM
}, PREFIX_OPCODE
},
3072 { "paddsb", { MX
, EM
}, PREFIX_OPCODE
},
3073 { "paddsw", { MX
, EM
}, PREFIX_OPCODE
},
3074 { "pmaxsw", { MX
, EM
}, PREFIX_OPCODE
},
3075 { "pxor", { MX
, EM
}, PREFIX_OPCODE
},
3077 { PREFIX_TABLE (PREFIX_0FF0
) },
3078 { "psllw", { MX
, EM
}, PREFIX_OPCODE
},
3079 { "pslld", { MX
, EM
}, PREFIX_OPCODE
},
3080 { "psllq", { MX
, EM
}, PREFIX_OPCODE
},
3081 { "pmuludq", { MX
, EM
}, PREFIX_OPCODE
},
3082 { "pmaddwd", { MX
, EM
}, PREFIX_OPCODE
},
3083 { "psadbw", { MX
, EM
}, PREFIX_OPCODE
},
3084 { PREFIX_TABLE (PREFIX_0FF7
) },
3086 { "psubb", { MX
, EM
}, PREFIX_OPCODE
},
3087 { "psubw", { MX
, EM
}, PREFIX_OPCODE
},
3088 { "psubd", { MX
, EM
}, PREFIX_OPCODE
},
3089 { "psubq", { MX
, EM
}, PREFIX_OPCODE
},
3090 { "paddb", { MX
, EM
}, PREFIX_OPCODE
},
3091 { "paddw", { MX
, EM
}, PREFIX_OPCODE
},
3092 { "paddd", { MX
, EM
}, PREFIX_OPCODE
},
3096 static const unsigned char onebyte_has_modrm
[256] = {
3097 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3098 /* ------------------------------- */
3099 /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
3100 /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
3101 /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
3102 /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
3103 /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
3104 /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
3105 /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
3106 /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
3107 /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
3108 /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
3109 /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
3110 /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
3111 /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
3112 /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
3113 /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
3114 /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
3115 /* ------------------------------- */
3116 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3119 static const unsigned char twobyte_has_modrm
[256] = {
3120 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3121 /* ------------------------------- */
3122 /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
3123 /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
3124 /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
3125 /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
3126 /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
3127 /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
3128 /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
3129 /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
3130 /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
3131 /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
3132 /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
3133 /* b0 */ 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, /* bf */
3134 /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
3135 /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
3136 /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
3137 /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
3138 /* ------------------------------- */
3139 /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
3142 static char obuf
[100];
3144 static char *mnemonicendp
;
3145 static char scratchbuf
[100];
3146 static unsigned char *start_codep
;
3147 static unsigned char *insn_codep
;
3148 static unsigned char *codep
;
3149 static unsigned char *end_codep
;
3150 static int last_lock_prefix
;
3151 static int last_repz_prefix
;
3152 static int last_repnz_prefix
;
3153 static int last_data_prefix
;
3154 static int last_addr_prefix
;
3155 static int last_rex_prefix
;
3156 static int last_seg_prefix
;
3157 static int fwait_prefix
;
3158 /* The active segment register prefix. */
3159 static int active_seg_prefix
;
3160 #define MAX_CODE_LENGTH 15
3161 /* We can up to 14 prefixes since the maximum instruction length is
3163 static int all_prefixes
[MAX_CODE_LENGTH
- 1];
3164 static disassemble_info
*the_info
;
3172 static unsigned char need_modrm
;
3182 int register_specifier
;
3189 int mask_register_specifier
;
3195 static unsigned char need_vex
;
3196 static unsigned char need_vex_reg
;
3197 static unsigned char vex_w_done
;
3205 /* If we are accessing mod/rm/reg without need_modrm set, then the
3206 values are stale. Hitting this abort likely indicates that you
3207 need to update onebyte_has_modrm or twobyte_has_modrm. */
3208 #define MODRM_CHECK if (!need_modrm) abort ()
3210 static const char **names64
;
3211 static const char **names32
;
3212 static const char **names16
;
3213 static const char **names8
;
3214 static const char **names8rex
;
3215 static const char **names_seg
;
3216 static const char *index64
;
3217 static const char *index32
;
3218 static const char **index16
;
3219 static const char **names_bnd
;
3221 static const char *intel_names64
[] = {
3222 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
3223 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
3225 static const char *intel_names32
[] = {
3226 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
3227 "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
3229 static const char *intel_names16
[] = {
3230 "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
3231 "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
3233 static const char *intel_names8
[] = {
3234 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
3236 static const char *intel_names8rex
[] = {
3237 "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
3238 "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
3240 static const char *intel_names_seg
[] = {
3241 "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
3243 static const char *intel_index64
= "riz";
3244 static const char *intel_index32
= "eiz";
3245 static const char *intel_index16
[] = {
3246 "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
3249 static const char *att_names64
[] = {
3250 "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
3251 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
3253 static const char *att_names32
[] = {
3254 "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
3255 "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
3257 static const char *att_names16
[] = {
3258 "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
3259 "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
3261 static const char *att_names8
[] = {
3262 "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
3264 static const char *att_names8rex
[] = {
3265 "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
3266 "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
3268 static const char *att_names_seg
[] = {
3269 "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
3271 static const char *att_index64
= "%riz";
3272 static const char *att_index32
= "%eiz";
3273 static const char *att_index16
[] = {
3274 "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
3277 static const char **names_mm
;
3278 static const char *intel_names_mm
[] = {
3279 "mm0", "mm1", "mm2", "mm3",
3280 "mm4", "mm5", "mm6", "mm7"
3282 static const char *att_names_mm
[] = {
3283 "%mm0", "%mm1", "%mm2", "%mm3",
3284 "%mm4", "%mm5", "%mm6", "%mm7"
3287 static const char *intel_names_bnd
[] = {
3288 "bnd0", "bnd1", "bnd2", "bnd3"
3291 static const char *att_names_bnd
[] = {
3292 "%bnd0", "%bnd1", "%bnd2", "%bnd3"
3295 static const char **names_xmm
;
3296 static const char *intel_names_xmm
[] = {
3297 "xmm0", "xmm1", "xmm2", "xmm3",
3298 "xmm4", "xmm5", "xmm6", "xmm7",
3299 "xmm8", "xmm9", "xmm10", "xmm11",
3300 "xmm12", "xmm13", "xmm14", "xmm15",
3301 "xmm16", "xmm17", "xmm18", "xmm19",
3302 "xmm20", "xmm21", "xmm22", "xmm23",
3303 "xmm24", "xmm25", "xmm26", "xmm27",
3304 "xmm28", "xmm29", "xmm30", "xmm31"
3306 static const char *att_names_xmm
[] = {
3307 "%xmm0", "%xmm1", "%xmm2", "%xmm3",
3308 "%xmm4", "%xmm5", "%xmm6", "%xmm7",
3309 "%xmm8", "%xmm9", "%xmm10", "%xmm11",
3310 "%xmm12", "%xmm13", "%xmm14", "%xmm15",
3311 "%xmm16", "%xmm17", "%xmm18", "%xmm19",
3312 "%xmm20", "%xmm21", "%xmm22", "%xmm23",
3313 "%xmm24", "%xmm25", "%xmm26", "%xmm27",
3314 "%xmm28", "%xmm29", "%xmm30", "%xmm31"
3317 static const char **names_ymm
;
3318 static const char *intel_names_ymm
[] = {
3319 "ymm0", "ymm1", "ymm2", "ymm3",
3320 "ymm4", "ymm5", "ymm6", "ymm7",
3321 "ymm8", "ymm9", "ymm10", "ymm11",
3322 "ymm12", "ymm13", "ymm14", "ymm15",
3323 "ymm16", "ymm17", "ymm18", "ymm19",
3324 "ymm20", "ymm21", "ymm22", "ymm23",
3325 "ymm24", "ymm25", "ymm26", "ymm27",
3326 "ymm28", "ymm29", "ymm30", "ymm31"
3328 static const char *att_names_ymm
[] = {
3329 "%ymm0", "%ymm1", "%ymm2", "%ymm3",
3330 "%ymm4", "%ymm5", "%ymm6", "%ymm7",
3331 "%ymm8", "%ymm9", "%ymm10", "%ymm11",
3332 "%ymm12", "%ymm13", "%ymm14", "%ymm15",
3333 "%ymm16", "%ymm17", "%ymm18", "%ymm19",
3334 "%ymm20", "%ymm21", "%ymm22", "%ymm23",
3335 "%ymm24", "%ymm25", "%ymm26", "%ymm27",
3336 "%ymm28", "%ymm29", "%ymm30", "%ymm31"
3339 static const char **names_zmm
;
3340 static const char *intel_names_zmm
[] = {
3341 "zmm0", "zmm1", "zmm2", "zmm3",
3342 "zmm4", "zmm5", "zmm6", "zmm7",
3343 "zmm8", "zmm9", "zmm10", "zmm11",
3344 "zmm12", "zmm13", "zmm14", "zmm15",
3345 "zmm16", "zmm17", "zmm18", "zmm19",
3346 "zmm20", "zmm21", "zmm22", "zmm23",
3347 "zmm24", "zmm25", "zmm26", "zmm27",
3348 "zmm28", "zmm29", "zmm30", "zmm31"
3350 static const char *att_names_zmm
[] = {
3351 "%zmm0", "%zmm1", "%zmm2", "%zmm3",
3352 "%zmm4", "%zmm5", "%zmm6", "%zmm7",
3353 "%zmm8", "%zmm9", "%zmm10", "%zmm11",
3354 "%zmm12", "%zmm13", "%zmm14", "%zmm15",
3355 "%zmm16", "%zmm17", "%zmm18", "%zmm19",
3356 "%zmm20", "%zmm21", "%zmm22", "%zmm23",
3357 "%zmm24", "%zmm25", "%zmm26", "%zmm27",
3358 "%zmm28", "%zmm29", "%zmm30", "%zmm31"
3361 static const char **names_mask
;
3362 static const char *intel_names_mask
[] = {
3363 "k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"
3365 static const char *att_names_mask
[] = {
3366 "%k0", "%k1", "%k2", "%k3", "%k4", "%k5", "%k6", "%k7"
3369 static const char *names_rounding
[] =
3377 static const struct dis386 reg_table
[][8] = {
3380 { "addA", { Ebh1
, Ib
}, 0 },
3381 { "orA", { Ebh1
, Ib
}, 0 },
3382 { "adcA", { Ebh1
, Ib
}, 0 },
3383 { "sbbA", { Ebh1
, Ib
}, 0 },
3384 { "andA", { Ebh1
, Ib
}, 0 },
3385 { "subA", { Ebh1
, Ib
}, 0 },
3386 { "xorA", { Ebh1
, Ib
}, 0 },
3387 { "cmpA", { Eb
, Ib
}, 0 },
3391 { "addQ", { Evh1
, Iv
}, 0 },
3392 { "orQ", { Evh1
, Iv
}, 0 },
3393 { "adcQ", { Evh1
, Iv
}, 0 },
3394 { "sbbQ", { Evh1
, Iv
}, 0 },
3395 { "andQ", { Evh1
, Iv
}, 0 },
3396 { "subQ", { Evh1
, Iv
}, 0 },
3397 { "xorQ", { Evh1
, Iv
}, 0 },
3398 { "cmpQ", { Ev
, Iv
}, 0 },
3402 { "addQ", { Evh1
, sIb
}, 0 },
3403 { "orQ", { Evh1
, sIb
}, 0 },
3404 { "adcQ", { Evh1
, sIb
}, 0 },
3405 { "sbbQ", { Evh1
, sIb
}, 0 },
3406 { "andQ", { Evh1
, sIb
}, 0 },
3407 { "subQ", { Evh1
, sIb
}, 0 },
3408 { "xorQ", { Evh1
, sIb
}, 0 },
3409 { "cmpQ", { Ev
, sIb
}, 0 },
3413 { "popU", { stackEv
}, 0 },
3414 { XOP_8F_TABLE (XOP_09
) },
3418 { XOP_8F_TABLE (XOP_09
) },
3422 { "rolA", { Eb
, Ib
}, 0 },
3423 { "rorA", { Eb
, Ib
}, 0 },
3424 { "rclA", { Eb
, Ib
}, 0 },
3425 { "rcrA", { Eb
, Ib
}, 0 },
3426 { "shlA", { Eb
, Ib
}, 0 },
3427 { "shrA", { Eb
, Ib
}, 0 },
3429 { "sarA", { Eb
, Ib
}, 0 },
3433 { "rolQ", { Ev
, Ib
}, 0 },
3434 { "rorQ", { Ev
, Ib
}, 0 },
3435 { "rclQ", { Ev
, Ib
}, 0 },
3436 { "rcrQ", { Ev
, Ib
}, 0 },
3437 { "shlQ", { Ev
, Ib
}, 0 },
3438 { "shrQ", { Ev
, Ib
}, 0 },
3440 { "sarQ", { Ev
, Ib
}, 0 },
3444 { "movA", { Ebh3
, Ib
}, 0 },
3451 { MOD_TABLE (MOD_C6_REG_7
) },
3455 { "movQ", { Evh3
, Iv
}, 0 },
3462 { MOD_TABLE (MOD_C7_REG_7
) },
3466 { "rolA", { Eb
, I1
}, 0 },
3467 { "rorA", { Eb
, I1
}, 0 },
3468 { "rclA", { Eb
, I1
}, 0 },
3469 { "rcrA", { Eb
, I1
}, 0 },
3470 { "shlA", { Eb
, I1
}, 0 },
3471 { "shrA", { Eb
, I1
}, 0 },
3473 { "sarA", { Eb
, I1
}, 0 },
3477 { "rolQ", { Ev
, I1
}, 0 },
3478 { "rorQ", { Ev
, I1
}, 0 },
3479 { "rclQ", { Ev
, I1
}, 0 },
3480 { "rcrQ", { Ev
, I1
}, 0 },
3481 { "shlQ", { Ev
, I1
}, 0 },
3482 { "shrQ", { Ev
, I1
}, 0 },
3484 { "sarQ", { Ev
, I1
}, 0 },
3488 { "rolA", { Eb
, CL
}, 0 },
3489 { "rorA", { Eb
, CL
}, 0 },
3490 { "rclA", { Eb
, CL
}, 0 },
3491 { "rcrA", { Eb
, CL
}, 0 },
3492 { "shlA", { Eb
, CL
}, 0 },
3493 { "shrA", { Eb
, CL
}, 0 },
3495 { "sarA", { Eb
, CL
}, 0 },
3499 { "rolQ", { Ev
, CL
}, 0 },
3500 { "rorQ", { Ev
, CL
}, 0 },
3501 { "rclQ", { Ev
, CL
}, 0 },
3502 { "rcrQ", { Ev
, CL
}, 0 },
3503 { "shlQ", { Ev
, CL
}, 0 },
3504 { "shrQ", { Ev
, CL
}, 0 },
3506 { "sarQ", { Ev
, CL
}, 0 },
3510 { "testA", { Eb
, Ib
}, 0 },
3512 { "notA", { Ebh1
}, 0 },
3513 { "negA", { Ebh1
}, 0 },
3514 { "mulA", { Eb
}, 0 }, /* Don't print the implicit %al register, */
3515 { "imulA", { Eb
}, 0 }, /* to distinguish these opcodes from other */
3516 { "divA", { Eb
}, 0 }, /* mul/imul opcodes. Do the same for div */
3517 { "idivA", { Eb
}, 0 }, /* and idiv for consistency. */
3521 { "testQ", { Ev
, Iv
}, 0 },
3523 { "notQ", { Evh1
}, 0 },
3524 { "negQ", { Evh1
}, 0 },
3525 { "mulQ", { Ev
}, 0 }, /* Don't print the implicit register. */
3526 { "imulQ", { Ev
}, 0 },
3527 { "divQ", { Ev
}, 0 },
3528 { "idivQ", { Ev
}, 0 },
3532 { "incA", { Ebh1
}, 0 },
3533 { "decA", { Ebh1
}, 0 },
3537 { "incQ", { Evh1
}, 0 },
3538 { "decQ", { Evh1
}, 0 },
3539 { "call{&|}", { indirEv
, BND
}, 0 },
3540 { MOD_TABLE (MOD_FF_REG_3
) },
3541 { "jmp{&|}", { indirEv
, BND
}, 0 },
3542 { MOD_TABLE (MOD_FF_REG_5
) },
3543 { "pushU", { stackEv
}, 0 },
3548 { "sldtD", { Sv
}, 0 },
3549 { "strD", { Sv
}, 0 },
3550 { "lldt", { Ew
}, 0 },
3551 { "ltr", { Ew
}, 0 },
3552 { "verr", { Ew
}, 0 },
3553 { "verw", { Ew
}, 0 },
3559 { MOD_TABLE (MOD_0F01_REG_0
) },
3560 { MOD_TABLE (MOD_0F01_REG_1
) },
3561 { MOD_TABLE (MOD_0F01_REG_2
) },
3562 { MOD_TABLE (MOD_0F01_REG_3
) },
3563 { "smswD", { Sv
}, 0 },
3564 { MOD_TABLE (MOD_0F01_REG_5
) },
3565 { "lmsw", { Ew
}, 0 },
3566 { MOD_TABLE (MOD_0F01_REG_7
) },
3570 { "prefetch", { Mb
}, 0 },
3571 { "prefetchw", { Mb
}, 0 },
3572 { "prefetchwt1", { Mb
}, 0 },
3573 { "prefetch", { Mb
}, 0 },
3574 { "prefetch", { Mb
}, 0 },
3575 { "prefetch", { Mb
}, 0 },
3576 { "prefetch", { Mb
}, 0 },
3577 { "prefetch", { Mb
}, 0 },
3581 { MOD_TABLE (MOD_0F18_REG_0
) },
3582 { MOD_TABLE (MOD_0F18_REG_1
) },
3583 { MOD_TABLE (MOD_0F18_REG_2
) },
3584 { MOD_TABLE (MOD_0F18_REG_3
) },
3585 { MOD_TABLE (MOD_0F18_REG_4
) },
3586 { MOD_TABLE (MOD_0F18_REG_5
) },
3587 { MOD_TABLE (MOD_0F18_REG_6
) },
3588 { MOD_TABLE (MOD_0F18_REG_7
) },
3594 { MOD_TABLE (MOD_0F71_REG_2
) },
3596 { MOD_TABLE (MOD_0F71_REG_4
) },
3598 { MOD_TABLE (MOD_0F71_REG_6
) },
3604 { MOD_TABLE (MOD_0F72_REG_2
) },
3606 { MOD_TABLE (MOD_0F72_REG_4
) },
3608 { MOD_TABLE (MOD_0F72_REG_6
) },
3614 { MOD_TABLE (MOD_0F73_REG_2
) },
3615 { MOD_TABLE (MOD_0F73_REG_3
) },
3618 { MOD_TABLE (MOD_0F73_REG_6
) },
3619 { MOD_TABLE (MOD_0F73_REG_7
) },
3623 { "montmul", { { OP_0f07
, 0 } }, 0 },
3624 { "xsha1", { { OP_0f07
, 0 } }, 0 },
3625 { "xsha256", { { OP_0f07
, 0 } }, 0 },
3629 { "xstore-rng", { { OP_0f07
, 0 } }, 0 },
3630 { "xcrypt-ecb", { { OP_0f07
, 0 } }, 0 },
3631 { "xcrypt-cbc", { { OP_0f07
, 0 } }, 0 },
3632 { "xcrypt-ctr", { { OP_0f07
, 0 } }, 0 },
3633 { "xcrypt-cfb", { { OP_0f07
, 0 } }, 0 },
3634 { "xcrypt-ofb", { { OP_0f07
, 0 } }, 0 },
3638 { MOD_TABLE (MOD_0FAE_REG_0
) },
3639 { MOD_TABLE (MOD_0FAE_REG_1
) },
3640 { MOD_TABLE (MOD_0FAE_REG_2
) },
3641 { MOD_TABLE (MOD_0FAE_REG_3
) },
3642 { MOD_TABLE (MOD_0FAE_REG_4
) },
3643 { MOD_TABLE (MOD_0FAE_REG_5
) },
3644 { MOD_TABLE (MOD_0FAE_REG_6
) },
3645 { MOD_TABLE (MOD_0FAE_REG_7
) },
3653 { "btQ", { Ev
, Ib
}, 0 },
3654 { "btsQ", { Evh1
, Ib
}, 0 },
3655 { "btrQ", { Evh1
, Ib
}, 0 },
3656 { "btcQ", { Evh1
, Ib
}, 0 },
3661 { "cmpxchg8b", { { CMPXCHG8B_Fixup
, q_mode
} }, 0 },
3663 { MOD_TABLE (MOD_0FC7_REG_3
) },
3664 { MOD_TABLE (MOD_0FC7_REG_4
) },
3665 { MOD_TABLE (MOD_0FC7_REG_5
) },
3666 { MOD_TABLE (MOD_0FC7_REG_6
) },
3667 { MOD_TABLE (MOD_0FC7_REG_7
) },
3673 { MOD_TABLE (MOD_VEX_0F71_REG_2
) },
3675 { MOD_TABLE (MOD_VEX_0F71_REG_4
) },
3677 { MOD_TABLE (MOD_VEX_0F71_REG_6
) },
3683 { MOD_TABLE (MOD_VEX_0F72_REG_2
) },
3685 { MOD_TABLE (MOD_VEX_0F72_REG_4
) },
3687 { MOD_TABLE (MOD_VEX_0F72_REG_6
) },
3693 { MOD_TABLE (MOD_VEX_0F73_REG_2
) },
3694 { MOD_TABLE (MOD_VEX_0F73_REG_3
) },
3697 { MOD_TABLE (MOD_VEX_0F73_REG_6
) },
3698 { MOD_TABLE (MOD_VEX_0F73_REG_7
) },
3704 { MOD_TABLE (MOD_VEX_0FAE_REG_2
) },
3705 { MOD_TABLE (MOD_VEX_0FAE_REG_3
) },
3707 /* REG_VEX_0F38F3 */
3710 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1
) },
3711 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2
) },
3712 { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3
) },
3716 { "llwpcb", { { OP_LWPCB_E
, 0 } }, 0 },
3717 { "slwpcb", { { OP_LWPCB_E
, 0 } }, 0 },
3721 { "lwpins", { { OP_LWP_E
, 0 }, Ed
, Iq
}, 0 },
3722 { "lwpval", { { OP_LWP_E
, 0 }, Ed
, Iq
}, 0 },
3724 /* REG_XOP_TBM_01 */
3727 { "blcfill", { { OP_LWP_E
, 0 }, Ev
}, 0 },
3728 { "blsfill", { { OP_LWP_E
, 0 }, Ev
}, 0 },
3729 { "blcs", { { OP_LWP_E
, 0 }, Ev
}, 0 },
3730 { "tzmsk", { { OP_LWP_E
, 0 }, Ev
}, 0 },
3731 { "blcic", { { OP_LWP_E
, 0 }, Ev
}, 0 },
3732 { "blsic", { { OP_LWP_E
, 0 }, Ev
}, 0 },
3733 { "t1mskc", { { OP_LWP_E
, 0 }, Ev
}, 0 },
3735 /* REG_XOP_TBM_02 */
3738 { "blcmsk", { { OP_LWP_E
, 0 }, Ev
}, 0 },
3743 { "blci", { { OP_LWP_E
, 0 }, Ev
}, 0 },
3745 #define NEED_REG_TABLE
3746 #include "i386-dis-evex.h"
3747 #undef NEED_REG_TABLE
3750 static const struct dis386 prefix_table
[][4] = {
3753 { "xchgS", { { NOP_Fixup1
, eAX_reg
}, { NOP_Fixup2
, eAX_reg
} }, 0 },
3754 { "pause", { XX
}, 0 },
3755 { "xchgS", { { NOP_Fixup1
, eAX_reg
}, { NOP_Fixup2
, eAX_reg
} }, 0 },
3756 { NULL
, { { NULL
, 0 } }, PREFIX_IGNORED
}
3761 { "movups", { XM
, EXx
}, PREFIX_OPCODE
},
3762 { "movss", { XM
, EXd
}, PREFIX_OPCODE
},
3763 { "movupd", { XM
, EXx
}, PREFIX_OPCODE
},
3764 { "movsd", { XM
, EXq
}, PREFIX_OPCODE
},
3769 { "movups", { EXxS
, XM
}, PREFIX_OPCODE
},
3770 { "movss", { EXdS
, XM
}, PREFIX_OPCODE
},
3771 { "movupd", { EXxS
, XM
}, PREFIX_OPCODE
},
3772 { "movsd", { EXqS
, XM
}, PREFIX_OPCODE
},
3777 { MOD_TABLE (MOD_0F12_PREFIX_0
) },
3778 { "movsldup", { XM
, EXx
}, PREFIX_OPCODE
},
3779 { "movlpd", { XM
, EXq
}, PREFIX_OPCODE
},
3780 { "movddup", { XM
, EXq
}, PREFIX_OPCODE
},
3785 { MOD_TABLE (MOD_0F16_PREFIX_0
) },
3786 { "movshdup", { XM
, EXx
}, PREFIX_OPCODE
},
3787 { "movhpd", { XM
, EXq
}, PREFIX_OPCODE
},
3792 { MOD_TABLE (MOD_0F1A_PREFIX_0
) },
3793 { "bndcl", { Gbnd
, Ev_bnd
}, 0 },
3794 { "bndmov", { Gbnd
, Ebnd
}, 0 },
3795 { "bndcu", { Gbnd
, Ev_bnd
}, 0 },
3800 { MOD_TABLE (MOD_0F1B_PREFIX_0
) },
3801 { MOD_TABLE (MOD_0F1B_PREFIX_1
) },
3802 { "bndmov", { Ebnd
, Gbnd
}, 0 },
3803 { "bndcn", { Gbnd
, Ev_bnd
}, 0 },
3808 { "cvtpi2ps", { XM
, EMCq
}, PREFIX_OPCODE
},
3809 { "cvtsi2ss%LQ", { XM
, Ev
}, PREFIX_OPCODE
},
3810 { "cvtpi2pd", { XM
, EMCq
}, PREFIX_OPCODE
},
3811 { "cvtsi2sd%LQ", { XM
, Ev
}, 0 },
3816 { MOD_TABLE (MOD_0F2B_PREFIX_0
) },
3817 { MOD_TABLE (MOD_0F2B_PREFIX_1
) },
3818 { MOD_TABLE (MOD_0F2B_PREFIX_2
) },
3819 { MOD_TABLE (MOD_0F2B_PREFIX_3
) },
3824 { "cvttps2pi", { MXC
, EXq
}, PREFIX_OPCODE
},
3825 { "cvttss2siY", { Gv
, EXd
}, PREFIX_OPCODE
},
3826 { "cvttpd2pi", { MXC
, EXx
}, PREFIX_OPCODE
},
3827 { "cvttsd2siY", { Gv
, EXq
}, PREFIX_OPCODE
},
3832 { "cvtps2pi", { MXC
, EXq
}, PREFIX_OPCODE
},
3833 { "cvtss2siY", { Gv
, EXd
}, PREFIX_OPCODE
},
3834 { "cvtpd2pi", { MXC
, EXx
}, PREFIX_OPCODE
},
3835 { "cvtsd2siY", { Gv
, EXq
}, PREFIX_OPCODE
},
3840 { "ucomiss",{ XM
, EXd
}, 0 },
3842 { "ucomisd",{ XM
, EXq
}, 0 },
3847 { "comiss", { XM
, EXd
}, 0 },
3849 { "comisd", { XM
, EXq
}, 0 },
3854 { "sqrtps", { XM
, EXx
}, PREFIX_OPCODE
},
3855 { "sqrtss", { XM
, EXd
}, PREFIX_OPCODE
},
3856 { "sqrtpd", { XM
, EXx
}, PREFIX_OPCODE
},
3857 { "sqrtsd", { XM
, EXq
}, PREFIX_OPCODE
},
3862 { "rsqrtps",{ XM
, EXx
}, PREFIX_OPCODE
},
3863 { "rsqrtss",{ XM
, EXd
}, PREFIX_OPCODE
},
3868 { "rcpps", { XM
, EXx
}, PREFIX_OPCODE
},
3869 { "rcpss", { XM
, EXd
}, PREFIX_OPCODE
},
3874 { "addps", { XM
, EXx
}, PREFIX_OPCODE
},
3875 { "addss", { XM
, EXd
}, PREFIX_OPCODE
},
3876 { "addpd", { XM
, EXx
}, PREFIX_OPCODE
},
3877 { "addsd", { XM
, EXq
}, PREFIX_OPCODE
},
3882 { "mulps", { XM
, EXx
}, PREFIX_OPCODE
},
3883 { "mulss", { XM
, EXd
}, PREFIX_OPCODE
},
3884 { "mulpd", { XM
, EXx
}, PREFIX_OPCODE
},
3885 { "mulsd", { XM
, EXq
}, PREFIX_OPCODE
},
3890 { "cvtps2pd", { XM
, EXq
}, PREFIX_OPCODE
},
3891 { "cvtss2sd", { XM
, EXd
}, PREFIX_OPCODE
},
3892 { "cvtpd2ps", { XM
, EXx
}, PREFIX_OPCODE
},
3893 { "cvtsd2ss", { XM
, EXq
}, PREFIX_OPCODE
},
3898 { "cvtdq2ps", { XM
, EXx
}, PREFIX_OPCODE
},
3899 { "cvttps2dq", { XM
, EXx
}, PREFIX_OPCODE
},
3900 { "cvtps2dq", { XM
, EXx
}, PREFIX_OPCODE
},
3905 { "subps", { XM
, EXx
}, PREFIX_OPCODE
},
3906 { "subss", { XM
, EXd
}, PREFIX_OPCODE
},
3907 { "subpd", { XM
, EXx
}, PREFIX_OPCODE
},
3908 { "subsd", { XM
, EXq
}, PREFIX_OPCODE
},
3913 { "minps", { XM
, EXx
}, PREFIX_OPCODE
},
3914 { "minss", { XM
, EXd
}, PREFIX_OPCODE
},
3915 { "minpd", { XM
, EXx
}, PREFIX_OPCODE
},
3916 { "minsd", { XM
, EXq
}, PREFIX_OPCODE
},
3921 { "divps", { XM
, EXx
}, PREFIX_OPCODE
},
3922 { "divss", { XM
, EXd
}, PREFIX_OPCODE
},
3923 { "divpd", { XM
, EXx
}, PREFIX_OPCODE
},
3924 { "divsd", { XM
, EXq
}, PREFIX_OPCODE
},
3929 { "maxps", { XM
, EXx
}, PREFIX_OPCODE
},
3930 { "maxss", { XM
, EXd
}, PREFIX_OPCODE
},
3931 { "maxpd", { XM
, EXx
}, PREFIX_OPCODE
},
3932 { "maxsd", { XM
, EXq
}, PREFIX_OPCODE
},
3937 { "punpcklbw",{ MX
, EMd
}, PREFIX_OPCODE
},
3939 { "punpcklbw",{ MX
, EMx
}, PREFIX_OPCODE
},
3944 { "punpcklwd",{ MX
, EMd
}, PREFIX_OPCODE
},
3946 { "punpcklwd",{ MX
, EMx
}, PREFIX_OPCODE
},
3951 { "punpckldq",{ MX
, EMd
}, PREFIX_OPCODE
},
3953 { "punpckldq",{ MX
, EMx
}, PREFIX_OPCODE
},
3960 { "punpcklqdq", { XM
, EXx
}, PREFIX_OPCODE
},
3967 { "punpckhqdq", { XM
, EXx
}, PREFIX_OPCODE
},
3972 { "movq", { MX
, EM
}, PREFIX_OPCODE
},
3973 { "movdqu", { XM
, EXx
}, PREFIX_OPCODE
},
3974 { "movdqa", { XM
, EXx
}, PREFIX_OPCODE
},
3979 { "pshufw", { MX
, EM
, Ib
}, PREFIX_OPCODE
},
3980 { "pshufhw",{ XM
, EXx
, Ib
}, PREFIX_OPCODE
},
3981 { "pshufd", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
3982 { "pshuflw",{ XM
, EXx
, Ib
}, PREFIX_OPCODE
},
3985 /* PREFIX_0F73_REG_3 */
3989 { "psrldq", { XS
, Ib
}, 0 },
3992 /* PREFIX_0F73_REG_7 */
3996 { "pslldq", { XS
, Ib
}, 0 },
4001 {"vmread", { Em
, Gm
}, 0 },
4003 {"extrq", { XS
, Ib
, Ib
}, 0 },
4004 {"insertq", { XM
, XS
, Ib
, Ib
}, 0 },
4009 {"vmwrite", { Gm
, Em
}, 0 },
4011 {"extrq", { XM
, XS
}, 0 },
4012 {"insertq", { XM
, XS
}, 0 },
4019 { "haddpd", { XM
, EXx
}, PREFIX_OPCODE
},
4020 { "haddps", { XM
, EXx
}, PREFIX_OPCODE
},
4027 { "hsubpd", { XM
, EXx
}, PREFIX_OPCODE
},
4028 { "hsubps", { XM
, EXx
}, PREFIX_OPCODE
},
4033 { "movK", { Edq
, MX
}, PREFIX_OPCODE
},
4034 { "movq", { XM
, EXq
}, PREFIX_OPCODE
},
4035 { "movK", { Edq
, XM
}, PREFIX_OPCODE
},
4040 { "movq", { EMS
, MX
}, PREFIX_OPCODE
},
4041 { "movdqu", { EXxS
, XM
}, PREFIX_OPCODE
},
4042 { "movdqa", { EXxS
, XM
}, PREFIX_OPCODE
},
4045 /* PREFIX_0FAE_REG_0 */
4048 { "rdfsbase", { Ev
}, 0 },
4051 /* PREFIX_0FAE_REG_1 */
4054 { "rdgsbase", { Ev
}, 0 },
4057 /* PREFIX_0FAE_REG_2 */
4060 { "wrfsbase", { Ev
}, 0 },
4063 /* PREFIX_0FAE_REG_3 */
4066 { "wrgsbase", { Ev
}, 0 },
4069 /* PREFIX_0FAE_REG_6 */
4071 { "xsaveopt", { FXSAVE
}, 0 },
4073 { "clwb", { Mb
}, 0 },
4076 /* PREFIX_0FAE_REG_7 */
4078 { "clflush", { Mb
}, 0 },
4080 { "clflushopt", { Mb
}, 0 },
4083 /* PREFIX_RM_0_0FAE_REG_7 */
4085 { "sfence", { Skip_MODRM
}, 0 },
4087 { "pcommit", { Skip_MODRM
}, 0 },
4093 { "popcntS", { Gv
, Ev
}, 0 },
4098 { "bsfS", { Gv
, Ev
}, 0 },
4099 { "tzcntS", { Gv
, Ev
}, 0 },
4100 { "bsfS", { Gv
, Ev
}, 0 },
4105 { "bsrS", { Gv
, Ev
}, 0 },
4106 { "lzcntS", { Gv
, Ev
}, 0 },
4107 { "bsrS", { Gv
, Ev
}, 0 },
4112 { "cmpps", { XM
, EXx
, CMP
}, PREFIX_OPCODE
},
4113 { "cmpss", { XM
, EXd
, CMP
}, PREFIX_OPCODE
},
4114 { "cmppd", { XM
, EXx
, CMP
}, PREFIX_OPCODE
},
4115 { "cmpsd", { XM
, EXq
, CMP
}, PREFIX_OPCODE
},
4118 /* PREFIX_MOD_0_0FC3 */
4120 { "movntiS", { Ev
, Gv
}, PREFIX_OPCODE
},
4123 /* PREFIX_MOD_0_0FC7_REG_6 */
4125 { "vmptrld",{ Mq
}, 0 },
4126 { "vmxon", { Mq
}, 0 },
4127 { "vmclear",{ Mq
}, 0 },
4130 /* PREFIX_MOD_3_0FC7_REG_6 */
4132 { "rdrand", { Ev
}, 0 },
4134 { "rdrand", { Ev
}, 0 }
4137 /* PREFIX_MOD_3_0FC7_REG_7 */
4139 { "rdseed", { Ev
}, 0 },
4140 { "rdpid", { Em
}, 0 },
4141 { "rdseed", { Ev
}, 0 },
4148 { "addsubpd", { XM
, EXx
}, 0 },
4149 { "addsubps", { XM
, EXx
}, 0 },
4155 { "movq2dq",{ XM
, MS
}, 0 },
4156 { "movq", { EXqS
, XM
}, 0 },
4157 { "movdq2q",{ MX
, XS
}, 0 },
4163 { "cvtdq2pd", { XM
, EXq
}, PREFIX_OPCODE
},
4164 { "cvttpd2dq", { XM
, EXx
}, PREFIX_OPCODE
},
4165 { "cvtpd2dq", { XM
, EXx
}, PREFIX_OPCODE
},
4170 { "movntq", { Mq
, MX
}, PREFIX_OPCODE
},
4172 { MOD_TABLE (MOD_0FE7_PREFIX_2
) },
4180 { MOD_TABLE (MOD_0FF0_PREFIX_3
) },
4185 { "maskmovq", { MX
, MS
}, PREFIX_OPCODE
},
4187 { "maskmovdqu", { XM
, XS
}, PREFIX_OPCODE
},
4194 { "pblendvb", { XM
, EXx
, XMM0
}, PREFIX_OPCODE
},
4201 { "blendvps", { XM
, EXx
, XMM0
}, PREFIX_OPCODE
},
4208 { "blendvpd", { XM
, EXx
, XMM0
}, PREFIX_OPCODE
},
4215 { "ptest", { XM
, EXx
}, PREFIX_OPCODE
},
4222 { "pmovsxbw", { XM
, EXq
}, PREFIX_OPCODE
},
4229 { "pmovsxbd", { XM
, EXd
}, PREFIX_OPCODE
},
4236 { "pmovsxbq", { XM
, EXw
}, PREFIX_OPCODE
},
4243 { "pmovsxwd", { XM
, EXq
}, PREFIX_OPCODE
},
4250 { "pmovsxwq", { XM
, EXd
}, PREFIX_OPCODE
},
4257 { "pmovsxdq", { XM
, EXq
}, PREFIX_OPCODE
},
4264 { "pmuldq", { XM
, EXx
}, PREFIX_OPCODE
},
4271 { "pcmpeqq", { XM
, EXx
}, PREFIX_OPCODE
},
4278 { MOD_TABLE (MOD_0F382A_PREFIX_2
) },
4285 { "packusdw", { XM
, EXx
}, PREFIX_OPCODE
},
4292 { "pmovzxbw", { XM
, EXq
}, PREFIX_OPCODE
},
4299 { "pmovzxbd", { XM
, EXd
}, PREFIX_OPCODE
},
4306 { "pmovzxbq", { XM
, EXw
}, PREFIX_OPCODE
},
4313 { "pmovzxwd", { XM
, EXq
}, PREFIX_OPCODE
},
4320 { "pmovzxwq", { XM
, EXd
}, PREFIX_OPCODE
},
4327 { "pmovzxdq", { XM
, EXq
}, PREFIX_OPCODE
},
4334 { "pcmpgtq", { XM
, EXx
}, PREFIX_OPCODE
},
4341 { "pminsb", { XM
, EXx
}, PREFIX_OPCODE
},
4348 { "pminsd", { XM
, EXx
}, PREFIX_OPCODE
},
4355 { "pminuw", { XM
, EXx
}, PREFIX_OPCODE
},
4362 { "pminud", { XM
, EXx
}, PREFIX_OPCODE
},
4369 { "pmaxsb", { XM
, EXx
}, PREFIX_OPCODE
},
4376 { "pmaxsd", { XM
, EXx
}, PREFIX_OPCODE
},
4383 { "pmaxuw", { XM
, EXx
}, PREFIX_OPCODE
},
4390 { "pmaxud", { XM
, EXx
}, PREFIX_OPCODE
},
4397 { "pmulld", { XM
, EXx
}, PREFIX_OPCODE
},
4404 { "phminposuw", { XM
, EXx
}, PREFIX_OPCODE
},
4411 { "invept", { Gm
, Mo
}, PREFIX_OPCODE
},
4418 { "invvpid", { Gm
, Mo
}, PREFIX_OPCODE
},
4425 { "invpcid", { Gm
, M
}, PREFIX_OPCODE
},
4430 { "sha1nexte", { XM
, EXxmm
}, PREFIX_OPCODE
},
4435 { "sha1msg1", { XM
, EXxmm
}, PREFIX_OPCODE
},
4440 { "sha1msg2", { XM
, EXxmm
}, PREFIX_OPCODE
},
4445 { "sha256rnds2", { XM
, EXxmm
, XMM0
}, PREFIX_OPCODE
},
4450 { "sha256msg1", { XM
, EXxmm
}, PREFIX_OPCODE
},
4455 { "sha256msg2", { XM
, EXxmm
}, PREFIX_OPCODE
},
4462 { "aesimc", { XM
, EXx
}, PREFIX_OPCODE
},
4469 { "aesenc", { XM
, EXx
}, PREFIX_OPCODE
},
4476 { "aesenclast", { XM
, EXx
}, PREFIX_OPCODE
},
4483 { "aesdec", { XM
, EXx
}, PREFIX_OPCODE
},
4490 { "aesdeclast", { XM
, EXx
}, PREFIX_OPCODE
},
4495 { "movbeS", { Gv
, { MOVBE_Fixup
, v_mode
} }, PREFIX_OPCODE
},
4497 { "movbeS", { Gv
, { MOVBE_Fixup
, v_mode
} }, PREFIX_OPCODE
},
4498 { "crc32", { Gdq
, { CRC32_Fixup
, b_mode
} }, PREFIX_OPCODE
},
4503 { "movbeS", { { MOVBE_Fixup
, v_mode
}, Gv
}, PREFIX_OPCODE
},
4505 { "movbeS", { { MOVBE_Fixup
, v_mode
}, Gv
}, PREFIX_OPCODE
},
4506 { "crc32", { Gdq
, { CRC32_Fixup
, v_mode
} }, PREFIX_OPCODE
},
4512 { "adoxS", { Gdq
, Edq
}, PREFIX_OPCODE
},
4513 { "adcxS", { Gdq
, Edq
}, PREFIX_OPCODE
},
4521 { "roundps", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4528 { "roundpd", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4535 { "roundss", { XM
, EXd
, Ib
}, PREFIX_OPCODE
},
4542 { "roundsd", { XM
, EXq
, Ib
}, PREFIX_OPCODE
},
4549 { "blendps", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4556 { "blendpd", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4563 { "pblendw", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4570 { "pextrb", { Edqb
, XM
, Ib
}, PREFIX_OPCODE
},
4577 { "pextrw", { Edqw
, XM
, Ib
}, PREFIX_OPCODE
},
4584 { "pextrK", { Edq
, XM
, Ib
}, PREFIX_OPCODE
},
4591 { "extractps", { Edqd
, XM
, Ib
}, PREFIX_OPCODE
},
4598 { "pinsrb", { XM
, Edqb
, Ib
}, PREFIX_OPCODE
},
4605 { "insertps", { XM
, EXd
, Ib
}, PREFIX_OPCODE
},
4612 { "pinsrK", { XM
, Edq
, Ib
}, PREFIX_OPCODE
},
4619 { "dpps", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4626 { "dppd", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4633 { "mpsadbw", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4640 { "pclmulqdq", { XM
, EXx
, PCLMUL
}, PREFIX_OPCODE
},
4647 { "pcmpestrm", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4654 { "pcmpestri", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4661 { "pcmpistrm", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4668 { "pcmpistri", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4673 { "sha1rnds4", { XM
, EXxmm
, Ib
}, PREFIX_OPCODE
},
4680 { "aeskeygenassist", { XM
, EXx
, Ib
}, PREFIX_OPCODE
},
4683 /* PREFIX_VEX_0F10 */
4685 { VEX_W_TABLE (VEX_W_0F10_P_0
) },
4686 { VEX_LEN_TABLE (VEX_LEN_0F10_P_1
) },
4687 { VEX_W_TABLE (VEX_W_0F10_P_2
) },
4688 { VEX_LEN_TABLE (VEX_LEN_0F10_P_3
) },
4691 /* PREFIX_VEX_0F11 */
4693 { VEX_W_TABLE (VEX_W_0F11_P_0
) },
4694 { VEX_LEN_TABLE (VEX_LEN_0F11_P_1
) },
4695 { VEX_W_TABLE (VEX_W_0F11_P_2
) },
4696 { VEX_LEN_TABLE (VEX_LEN_0F11_P_3
) },
4699 /* PREFIX_VEX_0F12 */
4701 { MOD_TABLE (MOD_VEX_0F12_PREFIX_0
) },
4702 { VEX_W_TABLE (VEX_W_0F12_P_1
) },
4703 { VEX_LEN_TABLE (VEX_LEN_0F12_P_2
) },
4704 { VEX_W_TABLE (VEX_W_0F12_P_3
) },
4707 /* PREFIX_VEX_0F16 */
4709 { MOD_TABLE (MOD_VEX_0F16_PREFIX_0
) },
4710 { VEX_W_TABLE (VEX_W_0F16_P_1
) },
4711 { VEX_LEN_TABLE (VEX_LEN_0F16_P_2
) },
4714 /* PREFIX_VEX_0F2A */
4717 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_1
) },
4719 { VEX_LEN_TABLE (VEX_LEN_0F2A_P_3
) },
4722 /* PREFIX_VEX_0F2C */
4725 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_1
) },
4727 { VEX_LEN_TABLE (VEX_LEN_0F2C_P_3
) },
4730 /* PREFIX_VEX_0F2D */
4733 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_1
) },
4735 { VEX_LEN_TABLE (VEX_LEN_0F2D_P_3
) },
4738 /* PREFIX_VEX_0F2E */
4740 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_0
) },
4742 { VEX_LEN_TABLE (VEX_LEN_0F2E_P_2
) },
4745 /* PREFIX_VEX_0F2F */
4747 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_0
) },
4749 { VEX_LEN_TABLE (VEX_LEN_0F2F_P_2
) },
4752 /* PREFIX_VEX_0F41 */
4754 { VEX_LEN_TABLE (VEX_LEN_0F41_P_0
) },
4756 { VEX_LEN_TABLE (VEX_LEN_0F41_P_2
) },
4759 /* PREFIX_VEX_0F42 */
4761 { VEX_LEN_TABLE (VEX_LEN_0F42_P_0
) },
4763 { VEX_LEN_TABLE (VEX_LEN_0F42_P_2
) },
4766 /* PREFIX_VEX_0F44 */
4768 { VEX_LEN_TABLE (VEX_LEN_0F44_P_0
) },
4770 { VEX_LEN_TABLE (VEX_LEN_0F44_P_2
) },
4773 /* PREFIX_VEX_0F45 */
4775 { VEX_LEN_TABLE (VEX_LEN_0F45_P_0
) },
4777 { VEX_LEN_TABLE (VEX_LEN_0F45_P_2
) },
4780 /* PREFIX_VEX_0F46 */
4782 { VEX_LEN_TABLE (VEX_LEN_0F46_P_0
) },
4784 { VEX_LEN_TABLE (VEX_LEN_0F46_P_2
) },
4787 /* PREFIX_VEX_0F47 */
4789 { VEX_LEN_TABLE (VEX_LEN_0F47_P_0
) },
4791 { VEX_LEN_TABLE (VEX_LEN_0F47_P_2
) },
4794 /* PREFIX_VEX_0F4A */
4796 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_0
) },
4798 { VEX_LEN_TABLE (VEX_LEN_0F4A_P_2
) },
4801 /* PREFIX_VEX_0F4B */
4803 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_0
) },
4805 { VEX_LEN_TABLE (VEX_LEN_0F4B_P_2
) },
4808 /* PREFIX_VEX_0F51 */
4810 { VEX_W_TABLE (VEX_W_0F51_P_0
) },
4811 { VEX_LEN_TABLE (VEX_LEN_0F51_P_1
) },
4812 { VEX_W_TABLE (VEX_W_0F51_P_2
) },
4813 { VEX_LEN_TABLE (VEX_LEN_0F51_P_3
) },
4816 /* PREFIX_VEX_0F52 */
4818 { VEX_W_TABLE (VEX_W_0F52_P_0
) },
4819 { VEX_LEN_TABLE (VEX_LEN_0F52_P_1
) },
4822 /* PREFIX_VEX_0F53 */
4824 { VEX_W_TABLE (VEX_W_0F53_P_0
) },
4825 { VEX_LEN_TABLE (VEX_LEN_0F53_P_1
) },
4828 /* PREFIX_VEX_0F58 */
4830 { VEX_W_TABLE (VEX_W_0F58_P_0
) },
4831 { VEX_LEN_TABLE (VEX_LEN_0F58_P_1
) },
4832 { VEX_W_TABLE (VEX_W_0F58_P_2
) },
4833 { VEX_LEN_TABLE (VEX_LEN_0F58_P_3
) },
4836 /* PREFIX_VEX_0F59 */
4838 { VEX_W_TABLE (VEX_W_0F59_P_0
) },
4839 { VEX_LEN_TABLE (VEX_LEN_0F59_P_1
) },
4840 { VEX_W_TABLE (VEX_W_0F59_P_2
) },
4841 { VEX_LEN_TABLE (VEX_LEN_0F59_P_3
) },
4844 /* PREFIX_VEX_0F5A */
4846 { VEX_W_TABLE (VEX_W_0F5A_P_0
) },
4847 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_1
) },
4848 { "vcvtpd2ps%XY", { XMM
, EXx
}, 0 },
4849 { VEX_LEN_TABLE (VEX_LEN_0F5A_P_3
) },
4852 /* PREFIX_VEX_0F5B */
4854 { VEX_W_TABLE (VEX_W_0F5B_P_0
) },
4855 { VEX_W_TABLE (VEX_W_0F5B_P_1
) },
4856 { VEX_W_TABLE (VEX_W_0F5B_P_2
) },
4859 /* PREFIX_VEX_0F5C */
4861 { VEX_W_TABLE (VEX_W_0F5C_P_0
) },
4862 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_1
) },
4863 { VEX_W_TABLE (VEX_W_0F5C_P_2
) },
4864 { VEX_LEN_TABLE (VEX_LEN_0F5C_P_3
) },
4867 /* PREFIX_VEX_0F5D */
4869 { VEX_W_TABLE (VEX_W_0F5D_P_0
) },
4870 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_1
) },
4871 { VEX_W_TABLE (VEX_W_0F5D_P_2
) },
4872 { VEX_LEN_TABLE (VEX_LEN_0F5D_P_3
) },
4875 /* PREFIX_VEX_0F5E */
4877 { VEX_W_TABLE (VEX_W_0F5E_P_0
) },
4878 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_1
) },
4879 { VEX_W_TABLE (VEX_W_0F5E_P_2
) },
4880 { VEX_LEN_TABLE (VEX_LEN_0F5E_P_3
) },
4883 /* PREFIX_VEX_0F5F */
4885 { VEX_W_TABLE (VEX_W_0F5F_P_0
) },
4886 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_1
) },
4887 { VEX_W_TABLE (VEX_W_0F5F_P_2
) },
4888 { VEX_LEN_TABLE (VEX_LEN_0F5F_P_3
) },
4891 /* PREFIX_VEX_0F60 */
4895 { VEX_W_TABLE (VEX_W_0F60_P_2
) },
4898 /* PREFIX_VEX_0F61 */
4902 { VEX_W_TABLE (VEX_W_0F61_P_2
) },
4905 /* PREFIX_VEX_0F62 */
4909 { VEX_W_TABLE (VEX_W_0F62_P_2
) },
4912 /* PREFIX_VEX_0F63 */
4916 { VEX_W_TABLE (VEX_W_0F63_P_2
) },
4919 /* PREFIX_VEX_0F64 */
4923 { VEX_W_TABLE (VEX_W_0F64_P_2
) },
4926 /* PREFIX_VEX_0F65 */
4930 { VEX_W_TABLE (VEX_W_0F65_P_2
) },
4933 /* PREFIX_VEX_0F66 */
4937 { VEX_W_TABLE (VEX_W_0F66_P_2
) },
4940 /* PREFIX_VEX_0F67 */
4944 { VEX_W_TABLE (VEX_W_0F67_P_2
) },
4947 /* PREFIX_VEX_0F68 */
4951 { VEX_W_TABLE (VEX_W_0F68_P_2
) },
4954 /* PREFIX_VEX_0F69 */
4958 { VEX_W_TABLE (VEX_W_0F69_P_2
) },
4961 /* PREFIX_VEX_0F6A */
4965 { VEX_W_TABLE (VEX_W_0F6A_P_2
) },
4968 /* PREFIX_VEX_0F6B */
4972 { VEX_W_TABLE (VEX_W_0F6B_P_2
) },
4975 /* PREFIX_VEX_0F6C */
4979 { VEX_W_TABLE (VEX_W_0F6C_P_2
) },
4982 /* PREFIX_VEX_0F6D */
4986 { VEX_W_TABLE (VEX_W_0F6D_P_2
) },
4989 /* PREFIX_VEX_0F6E */
4993 { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2
) },
4996 /* PREFIX_VEX_0F6F */
4999 { VEX_W_TABLE (VEX_W_0F6F_P_1
) },
5000 { VEX_W_TABLE (VEX_W_0F6F_P_2
) },
5003 /* PREFIX_VEX_0F70 */
5006 { VEX_W_TABLE (VEX_W_0F70_P_1
) },
5007 { VEX_W_TABLE (VEX_W_0F70_P_2
) },
5008 { VEX_W_TABLE (VEX_W_0F70_P_3
) },
5011 /* PREFIX_VEX_0F71_REG_2 */
5015 { VEX_W_TABLE (VEX_W_0F71_R_2_P_2
) },
5018 /* PREFIX_VEX_0F71_REG_4 */
5022 { VEX_W_TABLE (VEX_W_0F71_R_4_P_2
) },
5025 /* PREFIX_VEX_0F71_REG_6 */
5029 { VEX_W_TABLE (VEX_W_0F71_R_6_P_2
) },
5032 /* PREFIX_VEX_0F72_REG_2 */
5036 { VEX_W_TABLE (VEX_W_0F72_R_2_P_2
) },
5039 /* PREFIX_VEX_0F72_REG_4 */
5043 { VEX_W_TABLE (VEX_W_0F72_R_4_P_2
) },
5046 /* PREFIX_VEX_0F72_REG_6 */
5050 { VEX_W_TABLE (VEX_W_0F72_R_6_P_2
) },
5053 /* PREFIX_VEX_0F73_REG_2 */
5057 { VEX_W_TABLE (VEX_W_0F73_R_2_P_2
) },
5060 /* PREFIX_VEX_0F73_REG_3 */
5064 { VEX_W_TABLE (VEX_W_0F73_R_3_P_2
) },
5067 /* PREFIX_VEX_0F73_REG_6 */
5071 { VEX_W_TABLE (VEX_W_0F73_R_6_P_2
) },
5074 /* PREFIX_VEX_0F73_REG_7 */
5078 { VEX_W_TABLE (VEX_W_0F73_R_7_P_2
) },
5081 /* PREFIX_VEX_0F74 */
5085 { VEX_W_TABLE (VEX_W_0F74_P_2
) },
5088 /* PREFIX_VEX_0F75 */
5092 { VEX_W_TABLE (VEX_W_0F75_P_2
) },
5095 /* PREFIX_VEX_0F76 */
5099 { VEX_W_TABLE (VEX_W_0F76_P_2
) },
5102 /* PREFIX_VEX_0F77 */
5104 { VEX_W_TABLE (VEX_W_0F77_P_0
) },
5107 /* PREFIX_VEX_0F7C */
5111 { VEX_W_TABLE (VEX_W_0F7C_P_2
) },
5112 { VEX_W_TABLE (VEX_W_0F7C_P_3
) },
5115 /* PREFIX_VEX_0F7D */
5119 { VEX_W_TABLE (VEX_W_0F7D_P_2
) },
5120 { VEX_W_TABLE (VEX_W_0F7D_P_3
) },
5123 /* PREFIX_VEX_0F7E */
5126 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1
) },
5127 { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2
) },
5130 /* PREFIX_VEX_0F7F */
5133 { VEX_W_TABLE (VEX_W_0F7F_P_1
) },
5134 { VEX_W_TABLE (VEX_W_0F7F_P_2
) },
5137 /* PREFIX_VEX_0F90 */
5139 { VEX_LEN_TABLE (VEX_LEN_0F90_P_0
) },
5141 { VEX_LEN_TABLE (VEX_LEN_0F90_P_2
) },
5144 /* PREFIX_VEX_0F91 */
5146 { VEX_LEN_TABLE (VEX_LEN_0F91_P_0
) },
5148 { VEX_LEN_TABLE (VEX_LEN_0F91_P_2
) },
5151 /* PREFIX_VEX_0F92 */
5153 { VEX_LEN_TABLE (VEX_LEN_0F92_P_0
) },
5155 { VEX_LEN_TABLE (VEX_LEN_0F92_P_2
) },
5156 { VEX_LEN_TABLE (VEX_LEN_0F92_P_3
) },
5159 /* PREFIX_VEX_0F93 */
5161 { VEX_LEN_TABLE (VEX_LEN_0F93_P_0
) },
5163 { VEX_LEN_TABLE (VEX_LEN_0F93_P_2
) },
5164 { VEX_LEN_TABLE (VEX_LEN_0F93_P_3
) },
5167 /* PREFIX_VEX_0F98 */
5169 { VEX_LEN_TABLE (VEX_LEN_0F98_P_0
) },
5171 { VEX_LEN_TABLE (VEX_LEN_0F98_P_2
) },
5174 /* PREFIX_VEX_0F99 */
5176 { VEX_LEN_TABLE (VEX_LEN_0F99_P_0
) },
5178 { VEX_LEN_TABLE (VEX_LEN_0F99_P_2
) },
5181 /* PREFIX_VEX_0FC2 */
5183 { VEX_W_TABLE (VEX_W_0FC2_P_0
) },
5184 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_1
) },
5185 { VEX_W_TABLE (VEX_W_0FC2_P_2
) },
5186 { VEX_LEN_TABLE (VEX_LEN_0FC2_P_3
) },
5189 /* PREFIX_VEX_0FC4 */
5193 { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2
) },
5196 /* PREFIX_VEX_0FC5 */
5200 { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2
) },
5203 /* PREFIX_VEX_0FD0 */
5207 { VEX_W_TABLE (VEX_W_0FD0_P_2
) },
5208 { VEX_W_TABLE (VEX_W_0FD0_P_3
) },
5211 /* PREFIX_VEX_0FD1 */
5215 { VEX_W_TABLE (VEX_W_0FD1_P_2
) },
5218 /* PREFIX_VEX_0FD2 */
5222 { VEX_W_TABLE (VEX_W_0FD2_P_2
) },
5225 /* PREFIX_VEX_0FD3 */
5229 { VEX_W_TABLE (VEX_W_0FD3_P_2
) },
5232 /* PREFIX_VEX_0FD4 */
5236 { VEX_W_TABLE (VEX_W_0FD4_P_2
) },
5239 /* PREFIX_VEX_0FD5 */
5243 { VEX_W_TABLE (VEX_W_0FD5_P_2
) },
5246 /* PREFIX_VEX_0FD6 */
5250 { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2
) },
5253 /* PREFIX_VEX_0FD7 */
5257 { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2
) },
5260 /* PREFIX_VEX_0FD8 */
5264 { VEX_W_TABLE (VEX_W_0FD8_P_2
) },
5267 /* PREFIX_VEX_0FD9 */
5271 { VEX_W_TABLE (VEX_W_0FD9_P_2
) },
5274 /* PREFIX_VEX_0FDA */
5278 { VEX_W_TABLE (VEX_W_0FDA_P_2
) },
5281 /* PREFIX_VEX_0FDB */
5285 { VEX_W_TABLE (VEX_W_0FDB_P_2
) },
5288 /* PREFIX_VEX_0FDC */
5292 { VEX_W_TABLE (VEX_W_0FDC_P_2
) },
5295 /* PREFIX_VEX_0FDD */
5299 { VEX_W_TABLE (VEX_W_0FDD_P_2
) },
5302 /* PREFIX_VEX_0FDE */
5306 { VEX_W_TABLE (VEX_W_0FDE_P_2
) },
5309 /* PREFIX_VEX_0FDF */
5313 { VEX_W_TABLE (VEX_W_0FDF_P_2
) },
5316 /* PREFIX_VEX_0FE0 */
5320 { VEX_W_TABLE (VEX_W_0FE0_P_2
) },
5323 /* PREFIX_VEX_0FE1 */
5327 { VEX_W_TABLE (VEX_W_0FE1_P_2
) },
5330 /* PREFIX_VEX_0FE2 */
5334 { VEX_W_TABLE (VEX_W_0FE2_P_2
) },
5337 /* PREFIX_VEX_0FE3 */
5341 { VEX_W_TABLE (VEX_W_0FE3_P_2
) },
5344 /* PREFIX_VEX_0FE4 */
5348 { VEX_W_TABLE (VEX_W_0FE4_P_2
) },
5351 /* PREFIX_VEX_0FE5 */
5355 { VEX_W_TABLE (VEX_W_0FE5_P_2
) },
5358 /* PREFIX_VEX_0FE6 */
5361 { VEX_W_TABLE (VEX_W_0FE6_P_1
) },
5362 { VEX_W_TABLE (VEX_W_0FE6_P_2
) },
5363 { VEX_W_TABLE (VEX_W_0FE6_P_3
) },
5366 /* PREFIX_VEX_0FE7 */
5370 { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2
) },
5373 /* PREFIX_VEX_0FE8 */
5377 { VEX_W_TABLE (VEX_W_0FE8_P_2
) },
5380 /* PREFIX_VEX_0FE9 */
5384 { VEX_W_TABLE (VEX_W_0FE9_P_2
) },
5387 /* PREFIX_VEX_0FEA */
5391 { VEX_W_TABLE (VEX_W_0FEA_P_2
) },
5394 /* PREFIX_VEX_0FEB */
5398 { VEX_W_TABLE (VEX_W_0FEB_P_2
) },
5401 /* PREFIX_VEX_0FEC */
5405 { VEX_W_TABLE (VEX_W_0FEC_P_2
) },
5408 /* PREFIX_VEX_0FED */
5412 { VEX_W_TABLE (VEX_W_0FED_P_2
) },
5415 /* PREFIX_VEX_0FEE */
5419 { VEX_W_TABLE (VEX_W_0FEE_P_2
) },
5422 /* PREFIX_VEX_0FEF */
5426 { VEX_W_TABLE (VEX_W_0FEF_P_2
) },
5429 /* PREFIX_VEX_0FF0 */
5434 { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3
) },
5437 /* PREFIX_VEX_0FF1 */
5441 { VEX_W_TABLE (VEX_W_0FF1_P_2
) },
5444 /* PREFIX_VEX_0FF2 */
5448 { VEX_W_TABLE (VEX_W_0FF2_P_2
) },
5451 /* PREFIX_VEX_0FF3 */
5455 { VEX_W_TABLE (VEX_W_0FF3_P_2
) },
5458 /* PREFIX_VEX_0FF4 */
5462 { VEX_W_TABLE (VEX_W_0FF4_P_2
) },
5465 /* PREFIX_VEX_0FF5 */
5469 { VEX_W_TABLE (VEX_W_0FF5_P_2
) },
5472 /* PREFIX_VEX_0FF6 */
5476 { VEX_W_TABLE (VEX_W_0FF6_P_2
) },
5479 /* PREFIX_VEX_0FF7 */
5483 { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2
) },
5486 /* PREFIX_VEX_0FF8 */
5490 { VEX_W_TABLE (VEX_W_0FF8_P_2
) },
5493 /* PREFIX_VEX_0FF9 */
5497 { VEX_W_TABLE (VEX_W_0FF9_P_2
) },
5500 /* PREFIX_VEX_0FFA */
5504 { VEX_W_TABLE (VEX_W_0FFA_P_2
) },
5507 /* PREFIX_VEX_0FFB */
5511 { VEX_W_TABLE (VEX_W_0FFB_P_2
) },
5514 /* PREFIX_VEX_0FFC */
5518 { VEX_W_TABLE (VEX_W_0FFC_P_2
) },
5521 /* PREFIX_VEX_0FFD */
5525 { VEX_W_TABLE (VEX_W_0FFD_P_2
) },
5528 /* PREFIX_VEX_0FFE */
5532 { VEX_W_TABLE (VEX_W_0FFE_P_2
) },
5535 /* PREFIX_VEX_0F3800 */
5539 { VEX_W_TABLE (VEX_W_0F3800_P_2
) },
5542 /* PREFIX_VEX_0F3801 */
5546 { VEX_W_TABLE (VEX_W_0F3801_P_2
) },
5549 /* PREFIX_VEX_0F3802 */
5553 { VEX_W_TABLE (VEX_W_0F3802_P_2
) },
5556 /* PREFIX_VEX_0F3803 */
5560 { VEX_W_TABLE (VEX_W_0F3803_P_2
) },
5563 /* PREFIX_VEX_0F3804 */
5567 { VEX_W_TABLE (VEX_W_0F3804_P_2
) },
5570 /* PREFIX_VEX_0F3805 */
5574 { VEX_W_TABLE (VEX_W_0F3805_P_2
) },
5577 /* PREFIX_VEX_0F3806 */
5581 { VEX_W_TABLE (VEX_W_0F3806_P_2
) },
5584 /* PREFIX_VEX_0F3807 */
5588 { VEX_W_TABLE (VEX_W_0F3807_P_2
) },
5591 /* PREFIX_VEX_0F3808 */
5595 { VEX_W_TABLE (VEX_W_0F3808_P_2
) },
5598 /* PREFIX_VEX_0F3809 */
5602 { VEX_W_TABLE (VEX_W_0F3809_P_2
) },
5605 /* PREFIX_VEX_0F380A */
5609 { VEX_W_TABLE (VEX_W_0F380A_P_2
) },
5612 /* PREFIX_VEX_0F380B */
5616 { VEX_W_TABLE (VEX_W_0F380B_P_2
) },
5619 /* PREFIX_VEX_0F380C */
5623 { VEX_W_TABLE (VEX_W_0F380C_P_2
) },
5626 /* PREFIX_VEX_0F380D */
5630 { VEX_W_TABLE (VEX_W_0F380D_P_2
) },
5633 /* PREFIX_VEX_0F380E */
5637 { VEX_W_TABLE (VEX_W_0F380E_P_2
) },
5640 /* PREFIX_VEX_0F380F */
5644 { VEX_W_TABLE (VEX_W_0F380F_P_2
) },
5647 /* PREFIX_VEX_0F3813 */
5651 { "vcvtph2ps", { XM
, EXxmmq
}, 0 },
5654 /* PREFIX_VEX_0F3816 */
5658 { VEX_LEN_TABLE (VEX_LEN_0F3816_P_2
) },
5661 /* PREFIX_VEX_0F3817 */
5665 { VEX_W_TABLE (VEX_W_0F3817_P_2
) },
5668 /* PREFIX_VEX_0F3818 */
5672 { VEX_W_TABLE (VEX_W_0F3818_P_2
) },
5675 /* PREFIX_VEX_0F3819 */
5679 { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2
) },
5682 /* PREFIX_VEX_0F381A */
5686 { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2
) },
5689 /* PREFIX_VEX_0F381C */
5693 { VEX_W_TABLE (VEX_W_0F381C_P_2
) },
5696 /* PREFIX_VEX_0F381D */
5700 { VEX_W_TABLE (VEX_W_0F381D_P_2
) },
5703 /* PREFIX_VEX_0F381E */
5707 { VEX_W_TABLE (VEX_W_0F381E_P_2
) },
5710 /* PREFIX_VEX_0F3820 */
5714 { VEX_W_TABLE (VEX_W_0F3820_P_2
) },
5717 /* PREFIX_VEX_0F3821 */
5721 { VEX_W_TABLE (VEX_W_0F3821_P_2
) },
5724 /* PREFIX_VEX_0F3822 */
5728 { VEX_W_TABLE (VEX_W_0F3822_P_2
) },
5731 /* PREFIX_VEX_0F3823 */
5735 { VEX_W_TABLE (VEX_W_0F3823_P_2
) },
5738 /* PREFIX_VEX_0F3824 */
5742 { VEX_W_TABLE (VEX_W_0F3824_P_2
) },
5745 /* PREFIX_VEX_0F3825 */
5749 { VEX_W_TABLE (VEX_W_0F3825_P_2
) },
5752 /* PREFIX_VEX_0F3828 */
5756 { VEX_W_TABLE (VEX_W_0F3828_P_2
) },
5759 /* PREFIX_VEX_0F3829 */
5763 { VEX_W_TABLE (VEX_W_0F3829_P_2
) },
5766 /* PREFIX_VEX_0F382A */
5770 { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2
) },
5773 /* PREFIX_VEX_0F382B */
5777 { VEX_W_TABLE (VEX_W_0F382B_P_2
) },
5780 /* PREFIX_VEX_0F382C */
5784 { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2
) },
5787 /* PREFIX_VEX_0F382D */
5791 { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2
) },
5794 /* PREFIX_VEX_0F382E */
5798 { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2
) },
5801 /* PREFIX_VEX_0F382F */
5805 { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2
) },
5808 /* PREFIX_VEX_0F3830 */
5812 { VEX_W_TABLE (VEX_W_0F3830_P_2
) },
5815 /* PREFIX_VEX_0F3831 */
5819 { VEX_W_TABLE (VEX_W_0F3831_P_2
) },
5822 /* PREFIX_VEX_0F3832 */
5826 { VEX_W_TABLE (VEX_W_0F3832_P_2
) },
5829 /* PREFIX_VEX_0F3833 */
5833 { VEX_W_TABLE (VEX_W_0F3833_P_2
) },
5836 /* PREFIX_VEX_0F3834 */
5840 { VEX_W_TABLE (VEX_W_0F3834_P_2
) },
5843 /* PREFIX_VEX_0F3835 */
5847 { VEX_W_TABLE (VEX_W_0F3835_P_2
) },
5850 /* PREFIX_VEX_0F3836 */
5854 { VEX_LEN_TABLE (VEX_LEN_0F3836_P_2
) },
5857 /* PREFIX_VEX_0F3837 */
5861 { VEX_W_TABLE (VEX_W_0F3837_P_2
) },
5864 /* PREFIX_VEX_0F3838 */
5868 { VEX_W_TABLE (VEX_W_0F3838_P_2
) },
5871 /* PREFIX_VEX_0F3839 */
5875 { VEX_W_TABLE (VEX_W_0F3839_P_2
) },
5878 /* PREFIX_VEX_0F383A */
5882 { VEX_W_TABLE (VEX_W_0F383A_P_2
) },
5885 /* PREFIX_VEX_0F383B */
5889 { VEX_W_TABLE (VEX_W_0F383B_P_2
) },
5892 /* PREFIX_VEX_0F383C */
5896 { VEX_W_TABLE (VEX_W_0F383C_P_2
) },
5899 /* PREFIX_VEX_0F383D */
5903 { VEX_W_TABLE (VEX_W_0F383D_P_2
) },
5906 /* PREFIX_VEX_0F383E */
5910 { VEX_W_TABLE (VEX_W_0F383E_P_2
) },
5913 /* PREFIX_VEX_0F383F */
5917 { VEX_W_TABLE (VEX_W_0F383F_P_2
) },
5920 /* PREFIX_VEX_0F3840 */
5924 { VEX_W_TABLE (VEX_W_0F3840_P_2
) },
5927 /* PREFIX_VEX_0F3841 */
5931 { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2
) },
5934 /* PREFIX_VEX_0F3845 */
5938 { "vpsrlv%LW", { XM
, Vex
, EXx
}, 0 },
5941 /* PREFIX_VEX_0F3846 */
5945 { VEX_W_TABLE (VEX_W_0F3846_P_2
) },
5948 /* PREFIX_VEX_0F3847 */
5952 { "vpsllv%LW", { XM
, Vex
, EXx
}, 0 },
5955 /* PREFIX_VEX_0F3858 */
5959 { VEX_W_TABLE (VEX_W_0F3858_P_2
) },
5962 /* PREFIX_VEX_0F3859 */
5966 { VEX_W_TABLE (VEX_W_0F3859_P_2
) },
5969 /* PREFIX_VEX_0F385A */
5973 { MOD_TABLE (MOD_VEX_0F385A_PREFIX_2
) },
5976 /* PREFIX_VEX_0F3878 */
5980 { VEX_W_TABLE (VEX_W_0F3878_P_2
) },
5983 /* PREFIX_VEX_0F3879 */
5987 { VEX_W_TABLE (VEX_W_0F3879_P_2
) },
5990 /* PREFIX_VEX_0F388C */
5994 { MOD_TABLE (MOD_VEX_0F388C_PREFIX_2
) },
5997 /* PREFIX_VEX_0F388E */
6001 { MOD_TABLE (MOD_VEX_0F388E_PREFIX_2
) },
6004 /* PREFIX_VEX_0F3890 */
6008 { "vpgatherd%LW", { XM
, MVexVSIBDWpX
, Vex
}, 0 },
6011 /* PREFIX_VEX_0F3891 */
6015 { "vpgatherq%LW", { XMGatherQ
, MVexVSIBQWpX
, VexGatherQ
}, 0 },
6018 /* PREFIX_VEX_0F3892 */
6022 { "vgatherdp%XW", { XM
, MVexVSIBDWpX
, Vex
}, 0 },
6025 /* PREFIX_VEX_0F3893 */
6029 { "vgatherqp%XW", { XMGatherQ
, MVexVSIBQWpX
, VexGatherQ
}, 0 },
6032 /* PREFIX_VEX_0F3896 */
6036 { "vfmaddsub132p%XW", { XM
, Vex
, EXx
}, 0 },
6039 /* PREFIX_VEX_0F3897 */
6043 { "vfmsubadd132p%XW", { XM
, Vex
, EXx
}, 0 },
6046 /* PREFIX_VEX_0F3898 */
6050 { "vfmadd132p%XW", { XM
, Vex
, EXx
}, 0 },
6053 /* PREFIX_VEX_0F3899 */
6057 { "vfmadd132s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6060 /* PREFIX_VEX_0F389A */
6064 { "vfmsub132p%XW", { XM
, Vex
, EXx
}, 0 },
6067 /* PREFIX_VEX_0F389B */
6071 { "vfmsub132s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6074 /* PREFIX_VEX_0F389C */
6078 { "vfnmadd132p%XW", { XM
, Vex
, EXx
}, 0 },
6081 /* PREFIX_VEX_0F389D */
6085 { "vfnmadd132s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6088 /* PREFIX_VEX_0F389E */
6092 { "vfnmsub132p%XW", { XM
, Vex
, EXx
}, 0 },
6095 /* PREFIX_VEX_0F389F */
6099 { "vfnmsub132s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6102 /* PREFIX_VEX_0F38A6 */
6106 { "vfmaddsub213p%XW", { XM
, Vex
, EXx
}, 0 },
6110 /* PREFIX_VEX_0F38A7 */
6114 { "vfmsubadd213p%XW", { XM
, Vex
, EXx
}, 0 },
6117 /* PREFIX_VEX_0F38A8 */
6121 { "vfmadd213p%XW", { XM
, Vex
, EXx
}, 0 },
6124 /* PREFIX_VEX_0F38A9 */
6128 { "vfmadd213s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6131 /* PREFIX_VEX_0F38AA */
6135 { "vfmsub213p%XW", { XM
, Vex
, EXx
}, 0 },
6138 /* PREFIX_VEX_0F38AB */
6142 { "vfmsub213s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6145 /* PREFIX_VEX_0F38AC */
6149 { "vfnmadd213p%XW", { XM
, Vex
, EXx
}, 0 },
6152 /* PREFIX_VEX_0F38AD */
6156 { "vfnmadd213s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6159 /* PREFIX_VEX_0F38AE */
6163 { "vfnmsub213p%XW", { XM
, Vex
, EXx
}, 0 },
6166 /* PREFIX_VEX_0F38AF */
6170 { "vfnmsub213s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6173 /* PREFIX_VEX_0F38B6 */
6177 { "vfmaddsub231p%XW", { XM
, Vex
, EXx
}, 0 },
6180 /* PREFIX_VEX_0F38B7 */
6184 { "vfmsubadd231p%XW", { XM
, Vex
, EXx
}, 0 },
6187 /* PREFIX_VEX_0F38B8 */
6191 { "vfmadd231p%XW", { XM
, Vex
, EXx
}, 0 },
6194 /* PREFIX_VEX_0F38B9 */
6198 { "vfmadd231s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6201 /* PREFIX_VEX_0F38BA */
6205 { "vfmsub231p%XW", { XM
, Vex
, EXx
}, 0 },
6208 /* PREFIX_VEX_0F38BB */
6212 { "vfmsub231s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6215 /* PREFIX_VEX_0F38BC */
6219 { "vfnmadd231p%XW", { XM
, Vex
, EXx
}, 0 },
6222 /* PREFIX_VEX_0F38BD */
6226 { "vfnmadd231s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6229 /* PREFIX_VEX_0F38BE */
6233 { "vfnmsub231p%XW", { XM
, Vex
, EXx
}, 0 },
6236 /* PREFIX_VEX_0F38BF */
6240 { "vfnmsub231s%XW", { XMScalar
, VexScalar
, EXVexWdqScalar
}, 0 },
6243 /* PREFIX_VEX_0F38DB */
6247 { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2
) },
6250 /* PREFIX_VEX_0F38DC */
6254 { VEX_LEN_TABLE (VEX_LEN_0F38DC_P_2
) },
6257 /* PREFIX_VEX_0F38DD */
6261 { VEX_LEN_TABLE (VEX_LEN_0F38DD_P_2
) },
6264 /* PREFIX_VEX_0F38DE */
6268 { VEX_LEN_TABLE (VEX_LEN_0F38DE_P_2
) },
6271 /* PREFIX_VEX_0F38DF */
6275 { VEX_LEN_TABLE (VEX_LEN_0F38DF_P_2
) },
6278 /* PREFIX_VEX_0F38F2 */
6280 { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0
) },
6283 /* PREFIX_VEX_0F38F3_REG_1 */
6285 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0
) },
6288 /* PREFIX_VEX_0F38F3_REG_2 */
6290 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0
) },
6293 /* PREFIX_VEX_0F38F3_REG_3 */
6295 { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0
) },
6298 /* PREFIX_VEX_0F38F5 */
6300 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_0
) },
6301 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_1
) },
6303 { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_3
) },
6306 /* PREFIX_VEX_0F38F6 */
6311 { VEX_LEN_TABLE (VEX_LEN_0F38F6_P_3
) },
6314 /* PREFIX_VEX_0F38F7 */
6316 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0
) },
6317 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_1
) },
6318 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_2
) },
6319 { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_3
) },
6322 /* PREFIX_VEX_0F3A00 */
6326 { VEX_LEN_TABLE (VEX_LEN_0F3A00_P_2
) },
6329 /* PREFIX_VEX_0F3A01 */
6333 { VEX_LEN_TABLE (VEX_LEN_0F3A01_P_2
) },
6336 /* PREFIX_VEX_0F3A02 */
6340 { VEX_W_TABLE (VEX_W_0F3A02_P_2
) },
6343 /* PREFIX_VEX_0F3A04 */
6347 { VEX_W_TABLE (VEX_W_0F3A04_P_2
) },
6350 /* PREFIX_VEX_0F3A05 */
6354 { VEX_W_TABLE (VEX_W_0F3A05_P_2
) },
6357 /* PREFIX_VEX_0F3A06 */
6361 { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2
) },
6364 /* PREFIX_VEX_0F3A08 */
6368 { VEX_W_TABLE (VEX_W_0F3A08_P_2
) },
6371 /* PREFIX_VEX_0F3A09 */
6375 { VEX_W_TABLE (VEX_W_0F3A09_P_2
) },
6378 /* PREFIX_VEX_0F3A0A */
6382 { VEX_LEN_TABLE (VEX_LEN_0F3A0A_P_2
) },
6385 /* PREFIX_VEX_0F3A0B */
6389 { VEX_LEN_TABLE (VEX_LEN_0F3A0B_P_2
) },
6392 /* PREFIX_VEX_0F3A0C */
6396 { VEX_W_TABLE (VEX_W_0F3A0C_P_2
) },
6399 /* PREFIX_VEX_0F3A0D */
6403 { VEX_W_TABLE (VEX_W_0F3A0D_P_2
) },
6406 /* PREFIX_VEX_0F3A0E */
6410 { VEX_W_TABLE (VEX_W_0F3A0E_P_2
) },
6413 /* PREFIX_VEX_0F3A0F */
6417 { VEX_W_TABLE (VEX_W_0F3A0F_P_2
) },
6420 /* PREFIX_VEX_0F3A14 */
6424 { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2
) },
6427 /* PREFIX_VEX_0F3A15 */
6431 { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2
) },
6434 /* PREFIX_VEX_0F3A16 */
6438 { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2
) },
6441 /* PREFIX_VEX_0F3A17 */
6445 { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2
) },
6448 /* PREFIX_VEX_0F3A18 */
6452 { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2
) },
6455 /* PREFIX_VEX_0F3A19 */
6459 { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2
) },
6462 /* PREFIX_VEX_0F3A1D */
6466 { "vcvtps2ph", { EXxmmq
, XM
, Ib
}, 0 },
6469 /* PREFIX_VEX_0F3A20 */
6473 { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2
) },
6476 /* PREFIX_VEX_0F3A21 */
6480 { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2
) },
6483 /* PREFIX_VEX_0F3A22 */
6487 { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2
) },
6490 /* PREFIX_VEX_0F3A30 */
6494 { VEX_LEN_TABLE (VEX_LEN_0F3A30_P_2
) },
6497 /* PREFIX_VEX_0F3A31 */
6501 { VEX_LEN_TABLE (VEX_LEN_0F3A31_P_2
) },
6504 /* PREFIX_VEX_0F3A32 */
6508 { VEX_LEN_TABLE (VEX_LEN_0F3A32_P_2
) },
6511 /* PREFIX_VEX_0F3A33 */
6515 { VEX_LEN_TABLE (VEX_LEN_0F3A33_P_2
) },
6518 /* PREFIX_VEX_0F3A38 */
6522 { VEX_LEN_TABLE (VEX_LEN_0F3A38_P_2
) },
6525 /* PREFIX_VEX_0F3A39 */
6529 { VEX_LEN_TABLE (VEX_LEN_0F3A39_P_2
) },
6532 /* PREFIX_VEX_0F3A40 */
6536 { VEX_W_TABLE (VEX_W_0F3A40_P_2
) },
6539 /* PREFIX_VEX_0F3A41 */
6543 { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2
) },
6546 /* PREFIX_VEX_0F3A42 */
6550 { VEX_W_TABLE (VEX_W_0F3A42_P_2
) },
6553 /* PREFIX_VEX_0F3A44 */
6557 { VEX_LEN_TABLE (VEX_LEN_0F3A44_P_2
) },
6560 /* PREFIX_VEX_0F3A46 */
6564 { VEX_LEN_TABLE (VEX_LEN_0F3A46_P_2
) },
6567 /* PREFIX_VEX_0F3A48 */
6571 { VEX_W_TABLE (VEX_W_0F3A48_P_2
) },
6574 /* PREFIX_VEX_0F3A49 */
6578 { VEX_W_TABLE (VEX_W_0F3A49_P_2
) },
6581 /* PREFIX_VEX_0F3A4A */
6585 { VEX_W_TABLE (VEX_W_0F3A4A_P_2
) },
6588 /* PREFIX_VEX_0F3A4B */
6592 { VEX_W_TABLE (VEX_W_0F3A4B_P_2
) },
6595 /* PREFIX_VEX_0F3A4C */
6599 { VEX_W_TABLE (VEX_W_0F3A4C_P_2
) },
6602 /* PREFIX_VEX_0F3A5C */
6606 { "vfmaddsubps", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6609 /* PREFIX_VEX_0F3A5D */
6613 { "vfmaddsubpd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6616 /* PREFIX_VEX_0F3A5E */
6620 { "vfmsubaddps", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6623 /* PREFIX_VEX_0F3A5F */
6627 { "vfmsubaddpd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6630 /* PREFIX_VEX_0F3A60 */
6634 { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2
) },
6638 /* PREFIX_VEX_0F3A61 */
6642 { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2
) },
6645 /* PREFIX_VEX_0F3A62 */
6649 { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2
) },
6652 /* PREFIX_VEX_0F3A63 */
6656 { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2
) },
6659 /* PREFIX_VEX_0F3A68 */
6663 { "vfmaddps", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6666 /* PREFIX_VEX_0F3A69 */
6670 { "vfmaddpd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6673 /* PREFIX_VEX_0F3A6A */
6677 { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2
) },
6680 /* PREFIX_VEX_0F3A6B */
6684 { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2
) },
6687 /* PREFIX_VEX_0F3A6C */
6691 { "vfmsubps", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6694 /* PREFIX_VEX_0F3A6D */
6698 { "vfmsubpd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6701 /* PREFIX_VEX_0F3A6E */
6705 { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2
) },
6708 /* PREFIX_VEX_0F3A6F */
6712 { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2
) },
6715 /* PREFIX_VEX_0F3A78 */
6719 { "vfnmaddps", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6722 /* PREFIX_VEX_0F3A79 */
6726 { "vfnmaddpd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6729 /* PREFIX_VEX_0F3A7A */
6733 { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2
) },
6736 /* PREFIX_VEX_0F3A7B */
6740 { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2
) },
6743 /* PREFIX_VEX_0F3A7C */
6747 { "vfnmsubps", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6751 /* PREFIX_VEX_0F3A7D */
6755 { "vfnmsubpd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
6758 /* PREFIX_VEX_0F3A7E */
6762 { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2
) },
6765 /* PREFIX_VEX_0F3A7F */
6769 { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2
) },
6772 /* PREFIX_VEX_0F3ADF */
6776 { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2
) },
6779 /* PREFIX_VEX_0F3AF0 */
6784 { VEX_LEN_TABLE (VEX_LEN_0F3AF0_P_3
) },
6787 #define NEED_PREFIX_TABLE
6788 #include "i386-dis-evex.h"
6789 #undef NEED_PREFIX_TABLE
6792 static const struct dis386 x86_64_table
[][2] = {
6795 { "pushP", { es
}, 0 },
6800 { "popP", { es
}, 0 },
6805 { "pushP", { cs
}, 0 },
6810 { "pushP", { ss
}, 0 },
6815 { "popP", { ss
}, 0 },
6820 { "pushP", { ds
}, 0 },
6825 { "popP", { ds
}, 0 },
6830 { "daa", { XX
}, 0 },
6835 { "das", { XX
}, 0 },
6840 { "aaa", { XX
}, 0 },
6845 { "aas", { XX
}, 0 },
6850 { "pushaP", { XX
}, 0 },
6855 { "popaP", { XX
}, 0 },
6860 { MOD_TABLE (MOD_62_32BIT
) },
6861 { EVEX_TABLE (EVEX_0F
) },
6866 { "arpl", { Ew
, Gw
}, 0 },
6867 { "movs{lq|xd}", { Gv
, Ed
}, 0 },
6872 { "ins{R|}", { Yzr
, indirDX
}, 0 },
6873 { "ins{G|}", { Yzr
, indirDX
}, 0 },
6878 { "outs{R|}", { indirDXr
, Xz
}, 0 },
6879 { "outs{G|}", { indirDXr
, Xz
}, 0 },
6884 { "Jcall{T|}", { Ap
}, 0 },
6889 { MOD_TABLE (MOD_C4_32BIT
) },
6890 { VEX_C4_TABLE (VEX_0F
) },
6895 { MOD_TABLE (MOD_C5_32BIT
) },
6896 { VEX_C5_TABLE (VEX_0F
) },
6901 { "into", { XX
}, 0 },
6906 { "aam", { Ib
}, 0 },
6911 { "aad", { Ib
}, 0 },
6916 { "callP", { Jv
, BND
}, 0 },
6917 { "call@", { Jv
, BND
}, 0 }
6922 { "jmpP", { Jv
, BND
}, 0 },
6923 { "jmp@", { Jv
, BND
}, 0 }
6928 { "Jjmp{T|}", { Ap
}, 0 },
6931 /* X86_64_0F01_REG_0 */
6933 { "sgdt{Q|IQ}", { M
}, 0 },
6934 { "sgdt", { M
}, 0 },
6937 /* X86_64_0F01_REG_1 */
6939 { "sidt{Q|IQ}", { M
}, 0 },
6940 { "sidt", { M
}, 0 },
6943 /* X86_64_0F01_REG_2 */
6945 { "lgdt{Q|Q}", { M
}, 0 },
6946 { "lgdt", { M
}, 0 },
6949 /* X86_64_0F01_REG_3 */
6951 { "lidt{Q|Q}", { M
}, 0 },
6952 { "lidt", { M
}, 0 },
6956 static const struct dis386 three_byte_table
[][256] = {
6958 /* THREE_BYTE_0F38 */
6961 { "pshufb", { MX
, EM
}, PREFIX_OPCODE
},
6962 { "phaddw", { MX
, EM
}, PREFIX_OPCODE
},
6963 { "phaddd", { MX
, EM
}, PREFIX_OPCODE
},
6964 { "phaddsw", { MX
, EM
}, PREFIX_OPCODE
},
6965 { "pmaddubsw", { MX
, EM
}, PREFIX_OPCODE
},
6966 { "phsubw", { MX
, EM
}, PREFIX_OPCODE
},
6967 { "phsubd", { MX
, EM
}, PREFIX_OPCODE
},
6968 { "phsubsw", { MX
, EM
}, PREFIX_OPCODE
},
6970 { "psignb", { MX
, EM
}, PREFIX_OPCODE
},
6971 { "psignw", { MX
, EM
}, PREFIX_OPCODE
},
6972 { "psignd", { MX
, EM
}, PREFIX_OPCODE
},
6973 { "pmulhrsw", { MX
, EM
}, PREFIX_OPCODE
},
6979 { PREFIX_TABLE (PREFIX_0F3810
) },
6983 { PREFIX_TABLE (PREFIX_0F3814
) },
6984 { PREFIX_TABLE (PREFIX_0F3815
) },
6986 { PREFIX_TABLE (PREFIX_0F3817
) },
6992 { "pabsb", { MX
, EM
}, PREFIX_OPCODE
},
6993 { "pabsw", { MX
, EM
}, PREFIX_OPCODE
},
6994 { "pabsd", { MX
, EM
}, PREFIX_OPCODE
},
6997 { PREFIX_TABLE (PREFIX_0F3820
) },
6998 { PREFIX_TABLE (PREFIX_0F3821
) },
6999 { PREFIX_TABLE (PREFIX_0F3822
) },
7000 { PREFIX_TABLE (PREFIX_0F3823
) },
7001 { PREFIX_TABLE (PREFIX_0F3824
) },
7002 { PREFIX_TABLE (PREFIX_0F3825
) },
7006 { PREFIX_TABLE (PREFIX_0F3828
) },
7007 { PREFIX_TABLE (PREFIX_0F3829
) },
7008 { PREFIX_TABLE (PREFIX_0F382A
) },
7009 { PREFIX_TABLE (PREFIX_0F382B
) },
7015 { PREFIX_TABLE (PREFIX_0F3830
) },
7016 { PREFIX_TABLE (PREFIX_0F3831
) },
7017 { PREFIX_TABLE (PREFIX_0F3832
) },
7018 { PREFIX_TABLE (PREFIX_0F3833
) },
7019 { PREFIX_TABLE (PREFIX_0F3834
) },
7020 { PREFIX_TABLE (PREFIX_0F3835
) },
7022 { PREFIX_TABLE (PREFIX_0F3837
) },
7024 { PREFIX_TABLE (PREFIX_0F3838
) },
7025 { PREFIX_TABLE (PREFIX_0F3839
) },
7026 { PREFIX_TABLE (PREFIX_0F383A
) },
7027 { PREFIX_TABLE (PREFIX_0F383B
) },
7028 { PREFIX_TABLE (PREFIX_0F383C
) },
7029 { PREFIX_TABLE (PREFIX_0F383D
) },
7030 { PREFIX_TABLE (PREFIX_0F383E
) },
7031 { PREFIX_TABLE (PREFIX_0F383F
) },
7033 { PREFIX_TABLE (PREFIX_0F3840
) },
7034 { PREFIX_TABLE (PREFIX_0F3841
) },
7105 { PREFIX_TABLE (PREFIX_0F3880
) },
7106 { PREFIX_TABLE (PREFIX_0F3881
) },
7107 { PREFIX_TABLE (PREFIX_0F3882
) },
7186 { PREFIX_TABLE (PREFIX_0F38C8
) },
7187 { PREFIX_TABLE (PREFIX_0F38C9
) },
7188 { PREFIX_TABLE (PREFIX_0F38CA
) },
7189 { PREFIX_TABLE (PREFIX_0F38CB
) },
7190 { PREFIX_TABLE (PREFIX_0F38CC
) },
7191 { PREFIX_TABLE (PREFIX_0F38CD
) },
7207 { PREFIX_TABLE (PREFIX_0F38DB
) },
7208 { PREFIX_TABLE (PREFIX_0F38DC
) },
7209 { PREFIX_TABLE (PREFIX_0F38DD
) },
7210 { PREFIX_TABLE (PREFIX_0F38DE
) },
7211 { PREFIX_TABLE (PREFIX_0F38DF
) },
7231 { PREFIX_TABLE (PREFIX_0F38F0
) },
7232 { PREFIX_TABLE (PREFIX_0F38F1
) },
7237 { PREFIX_TABLE (PREFIX_0F38F6
) },
7249 /* THREE_BYTE_0F3A */
7261 { PREFIX_TABLE (PREFIX_0F3A08
) },
7262 { PREFIX_TABLE (PREFIX_0F3A09
) },
7263 { PREFIX_TABLE (PREFIX_0F3A0A
) },
7264 { PREFIX_TABLE (PREFIX_0F3A0B
) },
7265 { PREFIX_TABLE (PREFIX_0F3A0C
) },
7266 { PREFIX_TABLE (PREFIX_0F3A0D
) },
7267 { PREFIX_TABLE (PREFIX_0F3A0E
) },
7268 { "palignr", { MX
, EM
, Ib
}, PREFIX_OPCODE
},
7274 { PREFIX_TABLE (PREFIX_0F3A14
) },
7275 { PREFIX_TABLE (PREFIX_0F3A15
) },
7276 { PREFIX_TABLE (PREFIX_0F3A16
) },
7277 { PREFIX_TABLE (PREFIX_0F3A17
) },
7288 { PREFIX_TABLE (PREFIX_0F3A20
) },
7289 { PREFIX_TABLE (PREFIX_0F3A21
) },
7290 { PREFIX_TABLE (PREFIX_0F3A22
) },
7324 { PREFIX_TABLE (PREFIX_0F3A40
) },
7325 { PREFIX_TABLE (PREFIX_0F3A41
) },
7326 { PREFIX_TABLE (PREFIX_0F3A42
) },
7328 { PREFIX_TABLE (PREFIX_0F3A44
) },
7360 { PREFIX_TABLE (PREFIX_0F3A60
) },
7361 { PREFIX_TABLE (PREFIX_0F3A61
) },
7362 { PREFIX_TABLE (PREFIX_0F3A62
) },
7363 { PREFIX_TABLE (PREFIX_0F3A63
) },
7481 { PREFIX_TABLE (PREFIX_0F3ACC
) },
7502 { PREFIX_TABLE (PREFIX_0F3ADF
) },
7541 /* THREE_BYTE_0F7A */
7580 { "ptest", { XX
}, PREFIX_OPCODE
},
7617 { "phaddbw", { XM
, EXq
}, PREFIX_OPCODE
},
7618 { "phaddbd", { XM
, EXq
}, PREFIX_OPCODE
},
7619 { "phaddbq", { XM
, EXq
}, PREFIX_OPCODE
},
7622 { "phaddwd", { XM
, EXq
}, PREFIX_OPCODE
},
7623 { "phaddwq", { XM
, EXq
}, PREFIX_OPCODE
},
7628 { "phadddq", { XM
, EXq
}, PREFIX_OPCODE
},
7635 { "phaddubw", { XM
, EXq
}, PREFIX_OPCODE
},
7636 { "phaddubd", { XM
, EXq
}, PREFIX_OPCODE
},
7637 { "phaddubq", { XM
, EXq
}, PREFIX_OPCODE
},
7640 { "phadduwd", { XM
, EXq
}, PREFIX_OPCODE
},
7641 { "phadduwq", { XM
, EXq
}, PREFIX_OPCODE
},
7646 { "phaddudq", { XM
, EXq
}, PREFIX_OPCODE
},
7653 { "phsubbw", { XM
, EXq
}, PREFIX_OPCODE
},
7654 { "phsubbd", { XM
, EXq
}, PREFIX_OPCODE
},
7655 { "phsubbq", { XM
, EXq
}, PREFIX_OPCODE
},
7834 static const struct dis386 xop_table
[][256] = {
7987 { "vpmacssww", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
7988 { "vpmacsswd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
7989 { "vpmacssdql", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
7997 { "vpmacssdd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
7998 { "vpmacssdqh", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8005 { "vpmacsww", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8006 { "vpmacswd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8007 { "vpmacsdql", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8015 { "vpmacsdd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8016 { "vpmacsdqh", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8020 { "vpcmov", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8021 { "vpperm", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8024 { "vpmadcsswd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8042 { "vpmadcswd", { XMVexW
, Vex
, EXVexW
, EXVexW
, VexI4
}, 0 },
8054 { "vprotb", { XM
, Vex_2src_1
, Ib
}, 0 },
8055 { "vprotw", { XM
, Vex_2src_1
, Ib
}, 0 },
8056 { "vprotd", { XM
, Vex_2src_1
, Ib
}, 0 },
8057 { "vprotq", { XM
, Vex_2src_1
, Ib
}, 0 },
8067 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CC
) },
8068 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CD
) },
8069 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CE
) },
8070 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CF
) },
8103 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EC
) },
8104 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_ED
) },
8105 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EE
) },
8106 { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EF
) },
8130 { REG_TABLE (REG_XOP_TBM_01
) },
8131 { REG_TABLE (REG_XOP_TBM_02
) },
8149 { REG_TABLE (REG_XOP_LWPCB
) },
8273 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80
) },
8274 { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81
) },
8275 { "vfrczss", { XM
, EXd
}, 0 },
8276 { "vfrczsd", { XM
, EXq
}, 0 },
8291 { "vprotb", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8292 { "vprotw", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8293 { "vprotd", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8294 { "vprotq", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8295 { "vpshlb", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8296 { "vpshlw", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8297 { "vpshld", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8298 { "vpshlq", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8300 { "vpshab", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8301 { "vpshaw", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8302 { "vpshad", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8303 { "vpshaq", { XM
, Vex_2src_1
, Vex_2src_2
}, 0 },
8346 { "vphaddbw", { XM
, EXxmm
}, 0 },
8347 { "vphaddbd", { XM
, EXxmm
}, 0 },
8348 { "vphaddbq", { XM
, EXxmm
}, 0 },
8351 { "vphaddwd", { XM
, EXxmm
}, 0 },
8352 { "vphaddwq", { XM
, EXxmm
}, 0 },
8357 { "vphadddq", { XM
, EXxmm
}, 0 },
8364 { "vphaddubw", { XM
, EXxmm
}, 0 },
8365 { "vphaddubd", { XM
, EXxmm
}, 0 },
8366 { "vphaddubq", { XM
, EXxmm
}, 0 },
8369 { "vphadduwd", { XM
, EXxmm
}, 0 },
8370 { "vphadduwq", { XM
, EXxmm
}, 0 },
8375 { "vphaddudq", { XM
, EXxmm
}, 0 },
8382 { "vphsubbw", { XM
, EXxmm
}, 0 },
8383 { "vphsubwd", { XM
, EXxmm
}, 0 },
8384 { "vphsubdq", { XM
, EXxmm
}, 0 },
8438 { "bextr", { Gv
, Ev
, Iq
}, 0 },
8440 { REG_TABLE (REG_XOP_LWP
) },
8710 static const struct dis386 vex_table
[][256] = {
8732 { PREFIX_TABLE (PREFIX_VEX_0F10
) },
8733 { PREFIX_TABLE (PREFIX_VEX_0F11
) },
8734 { PREFIX_TABLE (PREFIX_VEX_0F12
) },
8735 { MOD_TABLE (MOD_VEX_0F13
) },
8736 { VEX_W_TABLE (VEX_W_0F14
) },
8737 { VEX_W_TABLE (VEX_W_0F15
) },
8738 { PREFIX_TABLE (PREFIX_VEX_0F16
) },
8739 { MOD_TABLE (MOD_VEX_0F17
) },
8759 { VEX_W_TABLE (VEX_W_0F28
) },
8760 { VEX_W_TABLE (VEX_W_0F29
) },
8761 { PREFIX_TABLE (PREFIX_VEX_0F2A
) },
8762 { MOD_TABLE (MOD_VEX_0F2B
) },
8763 { PREFIX_TABLE (PREFIX_VEX_0F2C
) },
8764 { PREFIX_TABLE (PREFIX_VEX_0F2D
) },
8765 { PREFIX_TABLE (PREFIX_VEX_0F2E
) },
8766 { PREFIX_TABLE (PREFIX_VEX_0F2F
) },
8787 { PREFIX_TABLE (PREFIX_VEX_0F41
) },
8788 { PREFIX_TABLE (PREFIX_VEX_0F42
) },
8790 { PREFIX_TABLE (PREFIX_VEX_0F44
) },
8791 { PREFIX_TABLE (PREFIX_VEX_0F45
) },
8792 { PREFIX_TABLE (PREFIX_VEX_0F46
) },
8793 { PREFIX_TABLE (PREFIX_VEX_0F47
) },
8797 { PREFIX_TABLE (PREFIX_VEX_0F4A
) },
8798 { PREFIX_TABLE (PREFIX_VEX_0F4B
) },
8804 { MOD_TABLE (MOD_VEX_0F50
) },
8805 { PREFIX_TABLE (PREFIX_VEX_0F51
) },
8806 { PREFIX_TABLE (PREFIX_VEX_0F52
) },
8807 { PREFIX_TABLE (PREFIX_VEX_0F53
) },
8808 { "vandpX", { XM
, Vex
, EXx
}, 0 },
8809 { "vandnpX", { XM
, Vex
, EXx
}, 0 },
8810 { "vorpX", { XM
, Vex
, EXx
}, 0 },
8811 { "vxorpX", { XM
, Vex
, EXx
}, 0 },
8813 { PREFIX_TABLE (PREFIX_VEX_0F58
) },
8814 { PREFIX_TABLE (PREFIX_VEX_0F59
) },
8815 { PREFIX_TABLE (PREFIX_VEX_0F5A
) },
8816 { PREFIX_TABLE (PREFIX_VEX_0F5B
) },
8817 { PREFIX_TABLE (PREFIX_VEX_0F5C
) },
8818 { PREFIX_TABLE (PREFIX_VEX_0F5D
) },
8819 { PREFIX_TABLE (PREFIX_VEX_0F5E
) },
8820 { PREFIX_TABLE (PREFIX_VEX_0F5F
) },
8822 { PREFIX_TABLE (PREFIX_VEX_0F60
) },
8823 { PREFIX_TABLE (PREFIX_VEX_0F61
) },
8824 { PREFIX_TABLE (PREFIX_VEX_0F62
) },
8825 { PREFIX_TABLE (PREFIX_VEX_0F63
) },
8826 { PREFIX_TABLE (PREFIX_VEX_0F64
) },
8827 { PREFIX_TABLE (PREFIX_VEX_0F65
) },
8828 { PREFIX_TABLE (PREFIX_VEX_0F66
) },
8829 { PREFIX_TABLE (PREFIX_VEX_0F67
) },
8831 { PREFIX_TABLE (PREFIX_VEX_0F68
) },
8832 { PREFIX_TABLE (PREFIX_VEX_0F69
) },
8833 { PREFIX_TABLE (PREFIX_VEX_0F6A
) },
8834 { PREFIX_TABLE (PREFIX_VEX_0F6B
) },
8835 { PREFIX_TABLE (PREFIX_VEX_0F6C
) },
8836 { PREFIX_TABLE (PREFIX_VEX_0F6D
) },
8837 { PREFIX_TABLE (PREFIX_VEX_0F6E
) },
8838 { PREFIX_TABLE (PREFIX_VEX_0F6F
) },
8840 { PREFIX_TABLE (PREFIX_VEX_0F70
) },
8841 { REG_TABLE (REG_VEX_0F71
) },
8842 { REG_TABLE (REG_VEX_0F72
) },
8843 { REG_TABLE (REG_VEX_0F73
) },
8844 { PREFIX_TABLE (PREFIX_VEX_0F74
) },
8845 { PREFIX_TABLE (PREFIX_VEX_0F75
) },
8846 { PREFIX_TABLE (PREFIX_VEX_0F76
) },
8847 { PREFIX_TABLE (PREFIX_VEX_0F77
) },
8853 { PREFIX_TABLE (PREFIX_VEX_0F7C
) },
8854 { PREFIX_TABLE (PREFIX_VEX_0F7D
) },
8855 { PREFIX_TABLE (PREFIX_VEX_0F7E
) },
8856 { PREFIX_TABLE (PREFIX_VEX_0F7F
) },
8876 { PREFIX_TABLE (PREFIX_VEX_0F90
) },
8877 { PREFIX_TABLE (PREFIX_VEX_0F91
) },
8878 { PREFIX_TABLE (PREFIX_VEX_0F92
) },
8879 { PREFIX_TABLE (PREFIX_VEX_0F93
) },
8885 { PREFIX_TABLE (PREFIX_VEX_0F98
) },
8886 { PREFIX_TABLE (PREFIX_VEX_0F99
) },
8909 { REG_TABLE (REG_VEX_0FAE
) },
8932 { PREFIX_TABLE (PREFIX_VEX_0FC2
) },
8934 { PREFIX_TABLE (PREFIX_VEX_0FC4
) },
8935 { PREFIX_TABLE (PREFIX_VEX_0FC5
) },
8936 { "vshufpX", { XM
, Vex
, EXx
, Ib
}, 0 },
8948 { PREFIX_TABLE (PREFIX_VEX_0FD0
) },
8949 { PREFIX_TABLE (PREFIX_VEX_0FD1
) },
8950 { PREFIX_TABLE (PREFIX_VEX_0FD2
) },
8951 { PREFIX_TABLE (PREFIX_VEX_0FD3
) },
8952 { PREFIX_TABLE (PREFIX_VEX_0FD4
) },
8953 { PREFIX_TABLE (PREFIX_VEX_0FD5
) },
8954 { PREFIX_TABLE (PREFIX_VEX_0FD6
) },
8955 { PREFIX_TABLE (PREFIX_VEX_0FD7
) },
8957 { PREFIX_TABLE (PREFIX_VEX_0FD8
) },
8958 { PREFIX_TABLE (PREFIX_VEX_0FD9
) },
8959 { PREFIX_TABLE (PREFIX_VEX_0FDA
) },
8960 { PREFIX_TABLE (PREFIX_VEX_0FDB
) },
8961 { PREFIX_TABLE (PREFIX_VEX_0FDC
) },
8962 { PREFIX_TABLE (PREFIX_VEX_0FDD
) },
8963 { PREFIX_TABLE (PREFIX_VEX_0FDE
) },
8964 { PREFIX_TABLE (PREFIX_VEX_0FDF
) },
8966 { PREFIX_TABLE (PREFIX_VEX_0FE0
) },
8967 { PREFIX_TABLE (PREFIX_VEX_0FE1
) },
8968 { PREFIX_TABLE (PREFIX_VEX_0FE2
) },
8969 { PREFIX_TABLE (PREFIX_VEX_0FE3
) },
8970 { PREFIX_TABLE (PREFIX_VEX_0FE4
) },
8971 { PREFIX_TABLE (PREFIX_VEX_0FE5
) },
8972 { PREFIX_TABLE (PREFIX_VEX_0FE6
) },
8973 { PREFIX_TABLE (PREFIX_VEX_0FE7
) },
8975 { PREFIX_TABLE (PREFIX_VEX_0FE8
) },
8976 { PREFIX_TABLE (PREFIX_VEX_0FE9
) },
8977 { PREFIX_TABLE (PREFIX_VEX_0FEA
) },
8978 { PREFIX_TABLE (PREFIX_VEX_0FEB
) },
8979 { PREFIX_TABLE (PREFIX_VEX_0FEC
) },
8980 { PREFIX_TABLE (PREFIX_VEX_0FED
) },
8981 { PREFIX_TABLE (PREFIX_VEX_0FEE
) },
8982 { PREFIX_TABLE (PREFIX_VEX_0FEF
) },
8984 { PREFIX_TABLE (PREFIX_VEX_0FF0
) },
8985 { PREFIX_TABLE (PREFIX_VEX_0FF1
) },
8986 { PREFIX_TABLE (PREFIX_VEX_0FF2
) },
8987 { PREFIX_TABLE (PREFIX_VEX_0FF3
) },
8988 { PREFIX_TABLE (PREFIX_VEX_0FF4
) },
8989 { PREFIX_TABLE (PREFIX_VEX_0FF5
) },
8990 { PREFIX_TABLE (PREFIX_VEX_0FF6
) },
8991 { PREFIX_TABLE (PREFIX_VEX_0FF7
) },
8993 { PREFIX_TABLE (PREFIX_VEX_0FF8
) },
8994 { PREFIX_TABLE (PREFIX_VEX_0FF9
) },
8995 { PREFIX_TABLE (PREFIX_VEX_0FFA
) },
8996 { PREFIX_TABLE (PREFIX_VEX_0FFB
) },
8997 { PREFIX_TABLE (PREFIX_VEX_0FFC
) },
8998 { PREFIX_TABLE (PREFIX_VEX_0FFD
) },
8999 { PREFIX_TABLE (PREFIX_VEX_0FFE
) },
9005 { PREFIX_TABLE (PREFIX_VEX_0F3800
) },
9006 { PREFIX_TABLE (PREFIX_VEX_0F3801
) },
9007 { PREFIX_TABLE (PREFIX_VEX_0F3802
) },
9008 { PREFIX_TABLE (PREFIX_VEX_0F3803
) },
9009 { PREFIX_TABLE (PREFIX_VEX_0F3804
) },
9010 { PREFIX_TABLE (PREFIX_VEX_0F3805
) },
9011 { PREFIX_TABLE (PREFIX_VEX_0F3806
) },
9012 { PREFIX_TABLE (PREFIX_VEX_0F3807
) },
9014 { PREFIX_TABLE (PREFIX_VEX_0F3808
) },
9015 { PREFIX_TABLE (PREFIX_VEX_0F3809
) },
9016 { PREFIX_TABLE (PREFIX_VEX_0F380A
) },
9017 { PREFIX_TABLE (PREFIX_VEX_0F380B
) },
9018 { PREFIX_TABLE (PREFIX_VEX_0F380C
) },
9019 { PREFIX_TABLE (PREFIX_VEX_0F380D
) },
9020 { PREFIX_TABLE (PREFIX_VEX_0F380E
) },
9021 { PREFIX_TABLE (PREFIX_VEX_0F380F
) },
9026 { PREFIX_TABLE (PREFIX_VEX_0F3813
) },
9029 { PREFIX_TABLE (PREFIX_VEX_0F3816
) },
9030 { PREFIX_TABLE (PREFIX_VEX_0F3817
) },
9032 { PREFIX_TABLE (PREFIX_VEX_0F3818
) },
9033 { PREFIX_TABLE (PREFIX_VEX_0F3819
) },
9034 { PREFIX_TABLE (PREFIX_VEX_0F381A
) },
9036 { PREFIX_TABLE (PREFIX_VEX_0F381C
) },
9037 { PREFIX_TABLE (PREFIX_VEX_0F381D
) },
9038 { PREFIX_TABLE (PREFIX_VEX_0F381E
) },
9041 { PREFIX_TABLE (PREFIX_VEX_0F3820
) },
9042 { PREFIX_TABLE (PREFIX_VEX_0F3821
) },
9043 { PREFIX_TABLE (PREFIX_VEX_0F3822
) },
9044 { PREFIX_TABLE (PREFIX_VEX_0F3823
) },
9045 { PREFIX_TABLE (PREFIX_VEX_0F3824
) },
9046 { PREFIX_TABLE (PREFIX_VEX_0F3825
) },
9050 { PREFIX_TABLE (PREFIX_VEX_0F3828
) },
9051 { PREFIX_TABLE (PREFIX_VEX_0F3829
) },
9052 { PREFIX_TABLE (PREFIX_VEX_0F382A
) },
9053 { PREFIX_TABLE (PREFIX_VEX_0F382B
) },
9054 { PREFIX_TABLE (PREFIX_VEX_0F382C
) },
9055 { PREFIX_TABLE (PREFIX_VEX_0F382D
) },
9056 { PREFIX_TABLE (PREFIX_VEX_0F382E
) },
9057 { PREFIX_TABLE (PREFIX_VEX_0F382F
) },
9059 { PREFIX_TABLE (PREFIX_VEX_0F3830
) },
9060 { PREFIX_TABLE (PREFIX_VEX_0F3831
) },
9061 { PREFIX_TABLE (PREFIX_VEX_0F3832
) },
9062 { PREFIX_TABLE (PREFIX_VEX_0F3833
) },
9063 { PREFIX_TABLE (PREFIX_VEX_0F3834
) },
9064 { PREFIX_TABLE (PREFIX_VEX_0F3835
) },
9065 { PREFIX_TABLE (PREFIX_VEX_0F3836
) },
9066 { PREFIX_TABLE (PREFIX_VEX_0F3837
) },
9068 { PREFIX_TABLE (PREFIX_VEX_0F3838
) },
9069 { PREFIX_TABLE (PREFIX_VEX_0F3839
) },
9070 { PREFIX_TABLE (PREFIX_VEX_0F383A
) },
9071 { PREFIX_TABLE (PREFIX_VEX_0F383B
) },
9072 { PREFIX_TABLE (PREFIX_VEX_0F383C
) },
9073 { PREFIX_TABLE (PREFIX_VEX_0F383D
) },
9074 { PREFIX_TABLE (PREFIX_VEX_0F383E
) },
9075 { PREFIX_TABLE (PREFIX_VEX_0F383F
) },
9077 { PREFIX_TABLE (PREFIX_VEX_0F3840
) },
9078 { PREFIX_TABLE (PREFIX_VEX_0F3841
) },
9082 { PREFIX_TABLE (PREFIX_VEX_0F3845
) },
9083 { PREFIX_TABLE (PREFIX_VEX_0F3846
) },
9084 { PREFIX_TABLE (PREFIX_VEX_0F3847
) },
9104 { PREFIX_TABLE (PREFIX_VEX_0F3858
) },
9105 { PREFIX_TABLE (PREFIX_VEX_0F3859
) },
9106 { PREFIX_TABLE (PREFIX_VEX_0F385A
) },
9140 { PREFIX_TABLE (PREFIX_VEX_0F3878
) },
9141 { PREFIX_TABLE (PREFIX_VEX_0F3879
) },
9162 { PREFIX_TABLE (PREFIX_VEX_0F388C
) },
9164 { PREFIX_TABLE (PREFIX_VEX_0F388E
) },
9167 { PREFIX_TABLE (PREFIX_VEX_0F3890
) },
9168 { PREFIX_TABLE (PREFIX_VEX_0F3891
) },
9169 { PREFIX_TABLE (PREFIX_VEX_0F3892
) },
9170 { PREFIX_TABLE (PREFIX_VEX_0F3893
) },
9173 { PREFIX_TABLE (PREFIX_VEX_0F3896
) },
9174 { PREFIX_TABLE (PREFIX_VEX_0F3897
) },
9176 { PREFIX_TABLE (PREFIX_VEX_0F3898
) },
9177 { PREFIX_TABLE (PREFIX_VEX_0F3899
) },
9178 { PREFIX_TABLE (PREFIX_VEX_0F389A
) },
9179 { PREFIX_TABLE (PREFIX_VEX_0F389B
) },
9180 { PREFIX_TABLE (PREFIX_VEX_0F389C
) },
9181 { PREFIX_TABLE (PREFIX_VEX_0F389D
) },
9182 { PREFIX_TABLE (PREFIX_VEX_0F389E
) },
9183 { PREFIX_TABLE (PREFIX_VEX_0F389F
) },
9191 { PREFIX_TABLE (PREFIX_VEX_0F38A6
) },
9192 { PREFIX_TABLE (PREFIX_VEX_0F38A7
) },
9194 { PREFIX_TABLE (PREFIX_VEX_0F38A8
) },
9195 { PREFIX_TABLE (PREFIX_VEX_0F38A9
) },
9196 { PREFIX_TABLE (PREFIX_VEX_0F38AA
) },
9197 { PREFIX_TABLE (PREFIX_VEX_0F38AB
) },
9198 { PREFIX_TABLE (PREFIX_VEX_0F38AC
) },
9199 { PREFIX_TABLE (PREFIX_VEX_0F38AD
) },
9200 { PREFIX_TABLE (PREFIX_VEX_0F38AE
) },
9201 { PREFIX_TABLE (PREFIX_VEX_0F38AF
) },
9209 { PREFIX_TABLE (PREFIX_VEX_0F38B6
) },
9210 { PREFIX_TABLE (PREFIX_VEX_0F38B7
) },
9212 { PREFIX_TABLE (PREFIX_VEX_0F38B8
) },
9213 { PREFIX_TABLE (PREFIX_VEX_0F38B9
) },
9214 { PREFIX_TABLE (PREFIX_VEX_0F38BA
) },
9215 { PREFIX_TABLE (PREFIX_VEX_0F38BB
) },
9216 { PREFIX_TABLE (PREFIX_VEX_0F38BC
) },
9217 { PREFIX_TABLE (PREFIX_VEX_0F38BD
) },
9218 { PREFIX_TABLE (PREFIX_VEX_0F38BE
) },
9219 { PREFIX_TABLE (PREFIX_VEX_0F38BF
) },
9251 { PREFIX_TABLE (PREFIX_VEX_0F38DB
) },
9252 { PREFIX_TABLE (PREFIX_VEX_0F38DC
) },
9253 { PREFIX_TABLE (PREFIX_VEX_0F38DD
) },
9254 { PREFIX_TABLE (PREFIX_VEX_0F38DE
) },
9255 { PREFIX_TABLE (PREFIX_VEX_0F38DF
) },
9277 { PREFIX_TABLE (PREFIX_VEX_0F38F2
) },
9278 { REG_TABLE (REG_VEX_0F38F3
) },
9280 { PREFIX_TABLE (PREFIX_VEX_0F38F5
) },
9281 { PREFIX_TABLE (PREFIX_VEX_0F38F6
) },
9282 { PREFIX_TABLE (PREFIX_VEX_0F38F7
) },
9296 { PREFIX_TABLE (PREFIX_VEX_0F3A00
) },
9297 { PREFIX_TABLE (PREFIX_VEX_0F3A01
) },
9298 { PREFIX_TABLE (PREFIX_VEX_0F3A02
) },
9300 { PREFIX_TABLE (PREFIX_VEX_0F3A04
) },
9301 { PREFIX_TABLE (PREFIX_VEX_0F3A05
) },
9302 { PREFIX_TABLE (PREFIX_VEX_0F3A06
) },
9305 { PREFIX_TABLE (PREFIX_VEX_0F3A08
) },
9306 { PREFIX_TABLE (PREFIX_VEX_0F3A09
) },
9307 { PREFIX_TABLE (PREFIX_VEX_0F3A0A
) },
9308 { PREFIX_TABLE (PREFIX_VEX_0F3A0B
) },
9309 { PREFIX_TABLE (PREFIX_VEX_0F3A0C
) },
9310 { PREFIX_TABLE (PREFIX_VEX_0F3A0D
) },
9311 { PREFIX_TABLE (PREFIX_VEX_0F3A0E
) },
9312 { PREFIX_TABLE (PREFIX_VEX_0F3A0F
) },
9318 { PREFIX_TABLE (PREFIX_VEX_0F3A14
) },
9319 { PREFIX_TABLE (PREFIX_VEX_0F3A15
) },
9320 { PREFIX_TABLE (PREFIX_VEX_0F3A16
) },
9321 { PREFIX_TABLE (PREFIX_VEX_0F3A17
) },
9323 { PREFIX_TABLE (PREFIX_VEX_0F3A18
) },
9324 { PREFIX_TABLE (PREFIX_VEX_0F3A19
) },
9328 { PREFIX_TABLE (PREFIX_VEX_0F3A1D
) },
9332 { PREFIX_TABLE (PREFIX_VEX_0F3A20
) },
9333 { PREFIX_TABLE (PREFIX_VEX_0F3A21
) },
9334 { PREFIX_TABLE (PREFIX_VEX_0F3A22
) },
9350 { PREFIX_TABLE (PREFIX_VEX_0F3A30
) },
9351 { PREFIX_TABLE (PREFIX_VEX_0F3A31
) },
9352 { PREFIX_TABLE (PREFIX_VEX_0F3A32
) },
9353 { PREFIX_TABLE (PREFIX_VEX_0F3A33
) },
9359 { PREFIX_TABLE (PREFIX_VEX_0F3A38
) },
9360 { PREFIX_TABLE (PREFIX_VEX_0F3A39
) },
9368 { PREFIX_TABLE (PREFIX_VEX_0F3A40
) },
9369 { PREFIX_TABLE (PREFIX_VEX_0F3A41
) },
9370 { PREFIX_TABLE (PREFIX_VEX_0F3A42
) },
9372 { PREFIX_TABLE (PREFIX_VEX_0F3A44
) },
9374 { PREFIX_TABLE (PREFIX_VEX_0F3A46
) },
9377 { PREFIX_TABLE (PREFIX_VEX_0F3A48
) },
9378 { PREFIX_TABLE (PREFIX_VEX_0F3A49
) },
9379 { PREFIX_TABLE (PREFIX_VEX_0F3A4A
) },
9380 { PREFIX_TABLE (PREFIX_VEX_0F3A4B
) },
9381 { PREFIX_TABLE (PREFIX_VEX_0F3A4C
) },
9399 { PREFIX_TABLE (PREFIX_VEX_0F3A5C
) },
9400 { PREFIX_TABLE (PREFIX_VEX_0F3A5D
) },
9401 { PREFIX_TABLE (PREFIX_VEX_0F3A5E
) },
9402 { PREFIX_TABLE (PREFIX_VEX_0F3A5F
) },
9404 { PREFIX_TABLE (PREFIX_VEX_0F3A60
) },
9405 { PREFIX_TABLE (PREFIX_VEX_0F3A61
) },
9406 { PREFIX_TABLE (PREFIX_VEX_0F3A62
) },
9407 { PREFIX_TABLE (PREFIX_VEX_0F3A63
) },
9413 { PREFIX_TABLE (PREFIX_VEX_0F3A68
) },
9414 { PREFIX_TABLE (PREFIX_VEX_0F3A69
) },
9415 { PREFIX_TABLE (PREFIX_VEX_0F3A6A
) },
9416 { PREFIX_TABLE (PREFIX_VEX_0F3A6B
) },
9417 { PREFIX_TABLE (PREFIX_VEX_0F3A6C
) },
9418 { PREFIX_TABLE (PREFIX_VEX_0F3A6D
) },
9419 { PREFIX_TABLE (PREFIX_VEX_0F3A6E
) },
9420 { PREFIX_TABLE (PREFIX_VEX_0F3A6F
) },
9431 { PREFIX_TABLE (PREFIX_VEX_0F3A78
) },
9432 { PREFIX_TABLE (PREFIX_VEX_0F3A79
) },
9433 { PREFIX_TABLE (PREFIX_VEX_0F3A7A
) },
9434 { PREFIX_TABLE (PREFIX_VEX_0F3A7B
) },
9435 { PREFIX_TABLE (PREFIX_VEX_0F3A7C
) },
9436 { PREFIX_TABLE (PREFIX_VEX_0F3A7D
) },
9437 { PREFIX_TABLE (PREFIX_VEX_0F3A7E
) },
9438 { PREFIX_TABLE (PREFIX_VEX_0F3A7F
) },
9546 { PREFIX_TABLE (PREFIX_VEX_0F3ADF
) },
9566 { PREFIX_TABLE (PREFIX_VEX_0F3AF0
) },
9586 #define NEED_OPCODE_TABLE
9587 #include "i386-dis-evex.h"
9588 #undef NEED_OPCODE_TABLE
9589 static const struct dis386 vex_len_table
[][2] = {
9590 /* VEX_LEN_0F10_P_1 */
9592 { VEX_W_TABLE (VEX_W_0F10_P_1
) },
9593 { VEX_W_TABLE (VEX_W_0F10_P_1
) },
9596 /* VEX_LEN_0F10_P_3 */
9598 { VEX_W_TABLE (VEX_W_0F10_P_3
) },
9599 { VEX_W_TABLE (VEX_W_0F10_P_3
) },
9602 /* VEX_LEN_0F11_P_1 */
9604 { VEX_W_TABLE (VEX_W_0F11_P_1
) },
9605 { VEX_W_TABLE (VEX_W_0F11_P_1
) },
9608 /* VEX_LEN_0F11_P_3 */
9610 { VEX_W_TABLE (VEX_W_0F11_P_3
) },
9611 { VEX_W_TABLE (VEX_W_0F11_P_3
) },
9614 /* VEX_LEN_0F12_P_0_M_0 */
9616 { VEX_W_TABLE (VEX_W_0F12_P_0_M_0
) },
9619 /* VEX_LEN_0F12_P_0_M_1 */
9621 { VEX_W_TABLE (VEX_W_0F12_P_0_M_1
) },
9624 /* VEX_LEN_0F12_P_2 */
9626 { VEX_W_TABLE (VEX_W_0F12_P_2
) },
9629 /* VEX_LEN_0F13_M_0 */
9631 { VEX_W_TABLE (VEX_W_0F13_M_0
) },
9634 /* VEX_LEN_0F16_P_0_M_0 */
9636 { VEX_W_TABLE (VEX_W_0F16_P_0_M_0
) },
9639 /* VEX_LEN_0F16_P_0_M_1 */
9641 { VEX_W_TABLE (VEX_W_0F16_P_0_M_1
) },
9644 /* VEX_LEN_0F16_P_2 */
9646 { VEX_W_TABLE (VEX_W_0F16_P_2
) },
9649 /* VEX_LEN_0F17_M_0 */
9651 { VEX_W_TABLE (VEX_W_0F17_M_0
) },
9654 /* VEX_LEN_0F2A_P_1 */
9656 { "vcvtsi2ss%LQ", { XMScalar
, VexScalar
, Ev
}, 0 },
9657 { "vcvtsi2ss%LQ", { XMScalar
, VexScalar
, Ev
}, 0 },
9660 /* VEX_LEN_0F2A_P_3 */
9662 { "vcvtsi2sd%LQ", { XMScalar
, VexScalar
, Ev
}, 0 },
9663 { "vcvtsi2sd%LQ", { XMScalar
, VexScalar
, Ev
}, 0 },
9666 /* VEX_LEN_0F2C_P_1 */
9668 { "vcvttss2siY", { Gv
, EXdScalar
}, 0 },
9669 { "vcvttss2siY", { Gv
, EXdScalar
}, 0 },
9672 /* VEX_LEN_0F2C_P_3 */
9674 { "vcvttsd2siY", { Gv
, EXqScalar
}, 0 },
9675 { "vcvttsd2siY", { Gv
, EXqScalar
}, 0 },
9678 /* VEX_LEN_0F2D_P_1 */
9680 { "vcvtss2siY", { Gv
, EXdScalar
}, 0 },
9681 { "vcvtss2siY", { Gv
, EXdScalar
}, 0 },
9684 /* VEX_LEN_0F2D_P_3 */
9686 { "vcvtsd2siY", { Gv
, EXqScalar
}, 0 },
9687 { "vcvtsd2siY", { Gv
, EXqScalar
}, 0 },
9690 /* VEX_LEN_0F2E_P_0 */
9692 { VEX_W_TABLE (VEX_W_0F2E_P_0
) },
9693 { VEX_W_TABLE (VEX_W_0F2E_P_0
) },
9696 /* VEX_LEN_0F2E_P_2 */
9698 { VEX_W_TABLE (VEX_W_0F2E_P_2
) },
9699 { VEX_W_TABLE (VEX_W_0F2E_P_2
) },
9702 /* VEX_LEN_0F2F_P_0 */
9704 { VEX_W_TABLE (VEX_W_0F2F_P_0
) },
9705 { VEX_W_TABLE (VEX_W_0F2F_P_0
) },
9708 /* VEX_LEN_0F2F_P_2 */
9710 { VEX_W_TABLE (VEX_W_0F2F_P_2
) },
9711 { VEX_W_TABLE (VEX_W_0F2F_P_2
) },
9714 /* VEX_LEN_0F41_P_0 */
9717 { VEX_W_TABLE (VEX_W_0F41_P_0_LEN_1
) },
9719 /* VEX_LEN_0F41_P_2 */
9722 { VEX_W_TABLE (VEX_W_0F41_P_2_LEN_1
) },
9724 /* VEX_LEN_0F42_P_0 */
9727 { VEX_W_TABLE (VEX_W_0F42_P_0_LEN_1
) },
9729 /* VEX_LEN_0F42_P_2 */
9732 { VEX_W_TABLE (VEX_W_0F42_P_2_LEN_1
) },
9734 /* VEX_LEN_0F44_P_0 */
9736 { VEX_W_TABLE (VEX_W_0F44_P_0_LEN_0
) },
9738 /* VEX_LEN_0F44_P_2 */
9740 { VEX_W_TABLE (VEX_W_0F44_P_2_LEN_0
) },
9742 /* VEX_LEN_0F45_P_0 */
9745 { VEX_W_TABLE (VEX_W_0F45_P_0_LEN_1
) },
9747 /* VEX_LEN_0F45_P_2 */
9750 { VEX_W_TABLE (VEX_W_0F45_P_2_LEN_1
) },
9752 /* VEX_LEN_0F46_P_0 */
9755 { VEX_W_TABLE (VEX_W_0F46_P_0_LEN_1
) },
9757 /* VEX_LEN_0F46_P_2 */
9760 { VEX_W_TABLE (VEX_W_0F46_P_2_LEN_1
) },
9762 /* VEX_LEN_0F47_P_0 */
9765 { VEX_W_TABLE (VEX_W_0F47_P_0_LEN_1
) },
9767 /* VEX_LEN_0F47_P_2 */
9770 { VEX_W_TABLE (VEX_W_0F47_P_2_LEN_1
) },
9772 /* VEX_LEN_0F4A_P_0 */
9775 { VEX_W_TABLE (VEX_W_0F4A_P_0_LEN_1
) },
9777 /* VEX_LEN_0F4A_P_2 */
9780 { VEX_W_TABLE (VEX_W_0F4A_P_2_LEN_1
) },
9782 /* VEX_LEN_0F4B_P_0 */
9785 { VEX_W_TABLE (VEX_W_0F4B_P_0_LEN_1
) },
9787 /* VEX_LEN_0F4B_P_2 */
9790 { VEX_W_TABLE (VEX_W_0F4B_P_2_LEN_1
) },
9793 /* VEX_LEN_0F51_P_1 */
9795 { VEX_W_TABLE (VEX_W_0F51_P_1
) },
9796 { VEX_W_TABLE (VEX_W_0F51_P_1
) },
9799 /* VEX_LEN_0F51_P_3 */
9801 { VEX_W_TABLE (VEX_W_0F51_P_3
) },
9802 { VEX_W_TABLE (VEX_W_0F51_P_3
) },
9805 /* VEX_LEN_0F52_P_1 */
9807 { VEX_W_TABLE (VEX_W_0F52_P_1
) },
9808 { VEX_W_TABLE (VEX_W_0F52_P_1
) },
9811 /* VEX_LEN_0F53_P_1 */
9813 { VEX_W_TABLE (VEX_W_0F53_P_1
) },
9814 { VEX_W_TABLE (VEX_W_0F53_P_1
) },
9817 /* VEX_LEN_0F58_P_1 */
9819 { VEX_W_TABLE (VEX_W_0F58_P_1
) },
9820 { VEX_W_TABLE (VEX_W_0F58_P_1
) },
9823 /* VEX_LEN_0F58_P_3 */
9825 { VEX_W_TABLE (VEX_W_0F58_P_3
) },
9826 { VEX_W_TABLE (VEX_W_0F58_P_3
) },
9829 /* VEX_LEN_0F59_P_1 */
9831 { VEX_W_TABLE (VEX_W_0F59_P_1
) },
9832 { VEX_W_TABLE (VEX_W_0F59_P_1
) },
9835 /* VEX_LEN_0F59_P_3 */
9837 { VEX_W_TABLE (VEX_W_0F59_P_3
) },
9838 { VEX_W_TABLE (VEX_W_0F59_P_3
) },
9841 /* VEX_LEN_0F5A_P_1 */
9843 { VEX_W_TABLE (VEX_W_0F5A_P_1
) },
9844 { VEX_W_TABLE (VEX_W_0F5A_P_1
) },
9847 /* VEX_LEN_0F5A_P_3 */
9849 { VEX_W_TABLE (VEX_W_0F5A_P_3
) },
9850 { VEX_W_TABLE (VEX_W_0F5A_P_3
) },
9853 /* VEX_LEN_0F5C_P_1 */
9855 { VEX_W_TABLE (VEX_W_0F5C_P_1
) },
9856 { VEX_W_TABLE (VEX_W_0F5C_P_1
) },
9859 /* VEX_LEN_0F5C_P_3 */
9861 { VEX_W_TABLE (VEX_W_0F5C_P_3
) },
9862 { VEX_W_TABLE (VEX_W_0F5C_P_3
) },
9865 /* VEX_LEN_0F5D_P_1 */
9867 { VEX_W_TABLE (VEX_W_0F5D_P_1
) },
9868 { VEX_W_TABLE (VEX_W_0F5D_P_1
) },
9871 /* VEX_LEN_0F5D_P_3 */
9873 { VEX_W_TABLE (VEX_W_0F5D_P_3
) },
9874 { VEX_W_TABLE (VEX_W_0F5D_P_3
) },
9877 /* VEX_LEN_0F5E_P_1 */
9879 { VEX_W_TABLE (VEX_W_0F5E_P_1
) },
9880 { VEX_W_TABLE (VEX_W_0F5E_P_1
) },
9883 /* VEX_LEN_0F5E_P_3 */
9885 { VEX_W_TABLE (VEX_W_0F5E_P_3
) },
9886 { VEX_W_TABLE (VEX_W_0F5E_P_3
) },
9889 /* VEX_LEN_0F5F_P_1 */
9891 { VEX_W_TABLE (VEX_W_0F5F_P_1
) },
9892 { VEX_W_TABLE (VEX_W_0F5F_P_1
) },
9895 /* VEX_LEN_0F5F_P_3 */
9897 { VEX_W_TABLE (VEX_W_0F5F_P_3
) },
9898 { VEX_W_TABLE (VEX_W_0F5F_P_3
) },
9901 /* VEX_LEN_0F6E_P_2 */
9903 { "vmovK", { XMScalar
, Edq
}, 0 },
9904 { "vmovK", { XMScalar
, Edq
}, 0 },
9907 /* VEX_LEN_0F7E_P_1 */
9909 { VEX_W_TABLE (VEX_W_0F7E_P_1
) },
9910 { VEX_W_TABLE (VEX_W_0F7E_P_1
) },
9913 /* VEX_LEN_0F7E_P_2 */
9915 { "vmovK", { Edq
, XMScalar
}, 0 },
9916 { "vmovK", { Edq
, XMScalar
}, 0 },
9919 /* VEX_LEN_0F90_P_0 */
9921 { VEX_W_TABLE (VEX_W_0F90_P_0_LEN_0
) },
9924 /* VEX_LEN_0F90_P_2 */
9926 { VEX_W_TABLE (VEX_W_0F90_P_2_LEN_0
) },
9929 /* VEX_LEN_0F91_P_0 */
9931 { VEX_W_TABLE (VEX_W_0F91_P_0_LEN_0
) },
9934 /* VEX_LEN_0F91_P_2 */
9936 { VEX_W_TABLE (VEX_W_0F91_P_2_LEN_0
) },
9939 /* VEX_LEN_0F92_P_0 */
9941 { VEX_W_TABLE (VEX_W_0F92_P_0_LEN_0
) },
9944 /* VEX_LEN_0F92_P_2 */
9946 { VEX_W_TABLE (VEX_W_0F92_P_2_LEN_0
) },
9949 /* VEX_LEN_0F92_P_3 */
9951 { VEX_W_TABLE (VEX_W_0F92_P_3_LEN_0
) },
9954 /* VEX_LEN_0F93_P_0 */
9956 { VEX_W_TABLE (VEX_W_0F93_P_0_LEN_0
) },
9959 /* VEX_LEN_0F93_P_2 */
9961 { VEX_W_TABLE (VEX_W_0F93_P_2_LEN_0
) },
9964 /* VEX_LEN_0F93_P_3 */
9966 { VEX_W_TABLE (VEX_W_0F93_P_3_LEN_0
) },
9969 /* VEX_LEN_0F98_P_0 */
9971 { VEX_W_TABLE (VEX_W_0F98_P_0_LEN_0
) },
9974 /* VEX_LEN_0F98_P_2 */
9976 { VEX_W_TABLE (VEX_W_0F98_P_2_LEN_0
) },
9979 /* VEX_LEN_0F99_P_0 */
9981 { VEX_W_TABLE (VEX_W_0F99_P_0_LEN_0
) },
9984 /* VEX_LEN_0F99_P_2 */
9986 { VEX_W_TABLE (VEX_W_0F99_P_2_LEN_0
) },
9989 /* VEX_LEN_0FAE_R_2_M_0 */
9991 { VEX_W_TABLE (VEX_W_0FAE_R_2_M_0
) },
9994 /* VEX_LEN_0FAE_R_3_M_0 */
9996 { VEX_W_TABLE (VEX_W_0FAE_R_3_M_0
) },
9999 /* VEX_LEN_0FC2_P_1 */
10001 { VEX_W_TABLE (VEX_W_0FC2_P_1
) },
10002 { VEX_W_TABLE (VEX_W_0FC2_P_1
) },
10005 /* VEX_LEN_0FC2_P_3 */
10007 { VEX_W_TABLE (VEX_W_0FC2_P_3
) },
10008 { VEX_W_TABLE (VEX_W_0FC2_P_3
) },
10011 /* VEX_LEN_0FC4_P_2 */
10013 { VEX_W_TABLE (VEX_W_0FC4_P_2
) },
10016 /* VEX_LEN_0FC5_P_2 */
10018 { VEX_W_TABLE (VEX_W_0FC5_P_2
) },
10021 /* VEX_LEN_0FD6_P_2 */
10023 { VEX_W_TABLE (VEX_W_0FD6_P_2
) },
10024 { VEX_W_TABLE (VEX_W_0FD6_P_2
) },
10027 /* VEX_LEN_0FF7_P_2 */
10029 { VEX_W_TABLE (VEX_W_0FF7_P_2
) },
10032 /* VEX_LEN_0F3816_P_2 */
10035 { VEX_W_TABLE (VEX_W_0F3816_P_2
) },
10038 /* VEX_LEN_0F3819_P_2 */
10041 { VEX_W_TABLE (VEX_W_0F3819_P_2
) },
10044 /* VEX_LEN_0F381A_P_2_M_0 */
10047 { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0
) },
10050 /* VEX_LEN_0F3836_P_2 */
10053 { VEX_W_TABLE (VEX_W_0F3836_P_2
) },
10056 /* VEX_LEN_0F3841_P_2 */
10058 { VEX_W_TABLE (VEX_W_0F3841_P_2
) },
10061 /* VEX_LEN_0F385A_P_2_M_0 */
10064 { VEX_W_TABLE (VEX_W_0F385A_P_2_M_0
) },
10067 /* VEX_LEN_0F38DB_P_2 */
10069 { VEX_W_TABLE (VEX_W_0F38DB_P_2
) },
10072 /* VEX_LEN_0F38DC_P_2 */
10074 { VEX_W_TABLE (VEX_W_0F38DC_P_2
) },
10077 /* VEX_LEN_0F38DD_P_2 */
10079 { VEX_W_TABLE (VEX_W_0F38DD_P_2
) },
10082 /* VEX_LEN_0F38DE_P_2 */
10084 { VEX_W_TABLE (VEX_W_0F38DE_P_2
) },
10087 /* VEX_LEN_0F38DF_P_2 */
10089 { VEX_W_TABLE (VEX_W_0F38DF_P_2
) },
10092 /* VEX_LEN_0F38F2_P_0 */
10094 { "andnS", { Gdq
, VexGdq
, Edq
}, 0 },
10097 /* VEX_LEN_0F38F3_R_1_P_0 */
10099 { "blsrS", { VexGdq
, Edq
}, 0 },
10102 /* VEX_LEN_0F38F3_R_2_P_0 */
10104 { "blsmskS", { VexGdq
, Edq
}, 0 },
10107 /* VEX_LEN_0F38F3_R_3_P_0 */
10109 { "blsiS", { VexGdq
, Edq
}, 0 },
10112 /* VEX_LEN_0F38F5_P_0 */
10114 { "bzhiS", { Gdq
, Edq
, VexGdq
}, 0 },
10117 /* VEX_LEN_0F38F5_P_1 */
10119 { "pextS", { Gdq
, VexGdq
, Edq
}, 0 },
10122 /* VEX_LEN_0F38F5_P_3 */
10124 { "pdepS", { Gdq
, VexGdq
, Edq
}, 0 },
10127 /* VEX_LEN_0F38F6_P_3 */
10129 { "mulxS", { Gdq
, VexGdq
, Edq
}, 0 },
10132 /* VEX_LEN_0F38F7_P_0 */
10134 { "bextrS", { Gdq
, Edq
, VexGdq
}, 0 },
10137 /* VEX_LEN_0F38F7_P_1 */
10139 { "sarxS", { Gdq
, Edq
, VexGdq
}, 0 },
10142 /* VEX_LEN_0F38F7_P_2 */
10144 { "shlxS", { Gdq
, Edq
, VexGdq
}, 0 },
10147 /* VEX_LEN_0F38F7_P_3 */
10149 { "shrxS", { Gdq
, Edq
, VexGdq
}, 0 },
10152 /* VEX_LEN_0F3A00_P_2 */
10155 { VEX_W_TABLE (VEX_W_0F3A00_P_2
) },
10158 /* VEX_LEN_0F3A01_P_2 */
10161 { VEX_W_TABLE (VEX_W_0F3A01_P_2
) },
10164 /* VEX_LEN_0F3A06_P_2 */
10167 { VEX_W_TABLE (VEX_W_0F3A06_P_2
) },
10170 /* VEX_LEN_0F3A0A_P_2 */
10172 { VEX_W_TABLE (VEX_W_0F3A0A_P_2
) },
10173 { VEX_W_TABLE (VEX_W_0F3A0A_P_2
) },
10176 /* VEX_LEN_0F3A0B_P_2 */
10178 { VEX_W_TABLE (VEX_W_0F3A0B_P_2
) },
10179 { VEX_W_TABLE (VEX_W_0F3A0B_P_2
) },
10182 /* VEX_LEN_0F3A14_P_2 */
10184 { VEX_W_TABLE (VEX_W_0F3A14_P_2
) },
10187 /* VEX_LEN_0F3A15_P_2 */
10189 { VEX_W_TABLE (VEX_W_0F3A15_P_2
) },
10192 /* VEX_LEN_0F3A16_P_2 */
10194 { "vpextrK", { Edq
, XM
, Ib
}, 0 },
10197 /* VEX_LEN_0F3A17_P_2 */
10199 { "vextractps", { Edqd
, XM
, Ib
}, 0 },
10202 /* VEX_LEN_0F3A18_P_2 */
10205 { VEX_W_TABLE (VEX_W_0F3A18_P_2
) },
10208 /* VEX_LEN_0F3A19_P_2 */
10211 { VEX_W_TABLE (VEX_W_0F3A19_P_2
) },
10214 /* VEX_LEN_0F3A20_P_2 */
10216 { VEX_W_TABLE (VEX_W_0F3A20_P_2
) },
10219 /* VEX_LEN_0F3A21_P_2 */
10221 { VEX_W_TABLE (VEX_W_0F3A21_P_2
) },
10224 /* VEX_LEN_0F3A22_P_2 */
10226 { "vpinsrK", { XM
, Vex128
, Edq
, Ib
}, 0 },
10229 /* VEX_LEN_0F3A30_P_2 */
10231 { VEX_W_TABLE (VEX_W_0F3A30_P_2_LEN_0
) },
10234 /* VEX_LEN_0F3A31_P_2 */
10236 { VEX_W_TABLE (VEX_W_0F3A31_P_2_LEN_0
) },
10239 /* VEX_LEN_0F3A32_P_2 */
10241 { VEX_W_TABLE (VEX_W_0F3A32_P_2_LEN_0
) },
10244 /* VEX_LEN_0F3A33_P_2 */
10246 { VEX_W_TABLE (VEX_W_0F3A33_P_2_LEN_0
) },
10249 /* VEX_LEN_0F3A38_P_2 */
10252 { VEX_W_TABLE (VEX_W_0F3A38_P_2
) },
10255 /* VEX_LEN_0F3A39_P_2 */
10258 { VEX_W_TABLE (VEX_W_0F3A39_P_2
) },
10261 /* VEX_LEN_0F3A41_P_2 */
10263 { VEX_W_TABLE (VEX_W_0F3A41_P_2
) },
10266 /* VEX_LEN_0F3A44_P_2 */
10268 { VEX_W_TABLE (VEX_W_0F3A44_P_2
) },
10271 /* VEX_LEN_0F3A46_P_2 */
10274 { VEX_W_TABLE (VEX_W_0F3A46_P_2
) },
10277 /* VEX_LEN_0F3A60_P_2 */
10279 { VEX_W_TABLE (VEX_W_0F3A60_P_2
) },
10282 /* VEX_LEN_0F3A61_P_2 */
10284 { VEX_W_TABLE (VEX_W_0F3A61_P_2
) },
10287 /* VEX_LEN_0F3A62_P_2 */
10289 { VEX_W_TABLE (VEX_W_0F3A62_P_2
) },
10292 /* VEX_LEN_0F3A63_P_2 */
10294 { VEX_W_TABLE (VEX_W_0F3A63_P_2
) },
10297 /* VEX_LEN_0F3A6A_P_2 */
10299 { "vfmaddss", { XMVexW
, Vex128
, EXdVexW
, EXdVexW
, VexI4
}, 0 },
10302 /* VEX_LEN_0F3A6B_P_2 */
10304 { "vfmaddsd", { XMVexW
, Vex128
, EXqVexW
, EXqVexW
, VexI4
}, 0 },
10307 /* VEX_LEN_0F3A6E_P_2 */
10309 { "vfmsubss", { XMVexW
, Vex128
, EXdVexW
, EXdVexW
, VexI4
}, 0 },
10312 /* VEX_LEN_0F3A6F_P_2 */
10314 { "vfmsubsd", { XMVexW
, Vex128
, EXqVexW
, EXqVexW
, VexI4
}, 0 },
10317 /* VEX_LEN_0F3A7A_P_2 */
10319 { "vfnmaddss", { XMVexW
, Vex128
, EXdVexW
, EXdVexW
, VexI4
}, 0 },
10322 /* VEX_LEN_0F3A7B_P_2 */
10324 { "vfnmaddsd", { XMVexW
, Vex128
, EXqVexW
, EXqVexW
, VexI4
}, 0 },
10327 /* VEX_LEN_0F3A7E_P_2 */
10329 { "vfnmsubss", { XMVexW
, Vex128
, EXdVexW
, EXdVexW
, VexI4
}, 0 },
10332 /* VEX_LEN_0F3A7F_P_2 */
10334 { "vfnmsubsd", { XMVexW
, Vex128
, EXqVexW
, EXqVexW
, VexI4
}, 0 },
10337 /* VEX_LEN_0F3ADF_P_2 */
10339 { VEX_W_TABLE (VEX_W_0F3ADF_P_2
) },
10342 /* VEX_LEN_0F3AF0_P_3 */
10344 { "rorxS", { Gdq
, Edq
, Ib
}, 0 },
10347 /* VEX_LEN_0FXOP_08_CC */
10349 { "vpcomb", { XM
, Vex128
, EXx
, Ib
}, 0 },
10352 /* VEX_LEN_0FXOP_08_CD */
10354 { "vpcomw", { XM
, Vex128
, EXx
, Ib
}, 0 },
10357 /* VEX_LEN_0FXOP_08_CE */
10359 { "vpcomd", { XM
, Vex128
, EXx
, Ib
}, 0 },
10362 /* VEX_LEN_0FXOP_08_CF */
10364 { "vpcomq", { XM
, Vex128
, EXx
, Ib
}, 0 },
10367 /* VEX_LEN_0FXOP_08_EC */
10369 { "vpcomub", { XM
, Vex128
, EXx
, Ib
}, 0 },
10372 /* VEX_LEN_0FXOP_08_ED */
10374 { "vpcomuw", { XM
, Vex128
, EXx
, Ib
}, 0 },
10377 /* VEX_LEN_0FXOP_08_EE */
10379 { "vpcomud", { XM
, Vex128
, EXx
, Ib
}, 0 },
10382 /* VEX_LEN_0FXOP_08_EF */
10384 { "vpcomuq", { XM
, Vex128
, EXx
, Ib
}, 0 },
10387 /* VEX_LEN_0FXOP_09_80 */
10389 { "vfrczps", { XM
, EXxmm
}, 0 },
10390 { "vfrczps", { XM
, EXymmq
}, 0 },
10393 /* VEX_LEN_0FXOP_09_81 */
10395 { "vfrczpd", { XM
, EXxmm
}, 0 },
10396 { "vfrczpd", { XM
, EXymmq
}, 0 },
10400 static const struct dis386 vex_w_table
[][2] = {
10402 /* VEX_W_0F10_P_0 */
10403 { "vmovups", { XM
, EXx
}, 0 },
10406 /* VEX_W_0F10_P_1 */
10407 { "vmovss", { XMVexScalar
, VexScalar
, EXdScalar
}, 0 },
10410 /* VEX_W_0F10_P_2 */
10411 { "vmovupd", { XM
, EXx
}, 0 },
10414 /* VEX_W_0F10_P_3 */
10415 { "vmovsd", { XMVexScalar
, VexScalar
, EXqScalar
}, 0 },
10418 /* VEX_W_0F11_P_0 */
10419 { "vmovups", { EXxS
, XM
}, 0 },
10422 /* VEX_W_0F11_P_1 */
10423 { "vmovss", { EXdVexScalarS
, VexScalar
, XMScalar
}, 0 },
10426 /* VEX_W_0F11_P_2 */
10427 { "vmovupd", { EXxS
, XM
}, 0 },
10430 /* VEX_W_0F11_P_3 */
10431 { "vmovsd", { EXqVexScalarS
, VexScalar
, XMScalar
}, 0 },
10434 /* VEX_W_0F12_P_0_M_0 */
10435 { "vmovlps", { XM
, Vex128
, EXq
}, 0 },
10438 /* VEX_W_0F12_P_0_M_1 */
10439 { "vmovhlps", { XM
, Vex128
, EXq
}, 0 },
10442 /* VEX_W_0F12_P_1 */
10443 { "vmovsldup", { XM
, EXx
}, 0 },
10446 /* VEX_W_0F12_P_2 */
10447 { "vmovlpd", { XM
, Vex128
, EXq
}, 0 },
10450 /* VEX_W_0F12_P_3 */
10451 { "vmovddup", { XM
, EXymmq
}, 0 },
10454 /* VEX_W_0F13_M_0 */
10455 { "vmovlpX", { EXq
, XM
}, 0 },
10459 { "vunpcklpX", { XM
, Vex
, EXx
}, 0 },
10463 { "vunpckhpX", { XM
, Vex
, EXx
}, 0 },
10466 /* VEX_W_0F16_P_0_M_0 */
10467 { "vmovhps", { XM
, Vex128
, EXq
}, 0 },
10470 /* VEX_W_0F16_P_0_M_1 */
10471 { "vmovlhps", { XM
, Vex128
, EXq
}, 0 },
10474 /* VEX_W_0F16_P_1 */
10475 { "vmovshdup", { XM
, EXx
}, 0 },
10478 /* VEX_W_0F16_P_2 */
10479 { "vmovhpd", { XM
, Vex128
, EXq
}, 0 },
10482 /* VEX_W_0F17_M_0 */
10483 { "vmovhpX", { EXq
, XM
}, 0 },
10487 { "vmovapX", { XM
, EXx
}, 0 },
10491 { "vmovapX", { EXxS
, XM
}, 0 },
10494 /* VEX_W_0F2B_M_0 */
10495 { "vmovntpX", { Mx
, XM
}, 0 },
10498 /* VEX_W_0F2E_P_0 */
10499 { "vucomiss", { XMScalar
, EXdScalar
}, 0 },
10502 /* VEX_W_0F2E_P_2 */
10503 { "vucomisd", { XMScalar
, EXqScalar
}, 0 },
10506 /* VEX_W_0F2F_P_0 */
10507 { "vcomiss", { XMScalar
, EXdScalar
}, 0 },
10510 /* VEX_W_0F2F_P_2 */
10511 { "vcomisd", { XMScalar
, EXqScalar
}, 0 },
10514 /* VEX_W_0F41_P_0_LEN_1 */
10515 { MOD_TABLE (MOD_VEX_W_0_0F41_P_0_LEN_1
) },
10516 { MOD_TABLE (MOD_VEX_W_1_0F41_P_0_LEN_1
) },
10519 /* VEX_W_0F41_P_2_LEN_1 */
10520 { MOD_TABLE (MOD_VEX_W_0_0F41_P_2_LEN_1
) },
10521 { MOD_TABLE (MOD_VEX_W_1_0F41_P_2_LEN_1
) }
10524 /* VEX_W_0F42_P_0_LEN_1 */
10525 { MOD_TABLE (MOD_VEX_W_0_0F42_P_0_LEN_1
) },
10526 { MOD_TABLE (MOD_VEX_W_1_0F42_P_0_LEN_1
) },
10529 /* VEX_W_0F42_P_2_LEN_1 */
10530 { MOD_TABLE (MOD_VEX_W_0_0F42_P_2_LEN_1
) },
10531 { MOD_TABLE (MOD_VEX_W_1_0F42_P_2_LEN_1
) },
10534 /* VEX_W_0F44_P_0_LEN_0 */
10535 { MOD_TABLE (MOD_VEX_W_0_0F44_P_0_LEN_1
) },
10536 { MOD_TABLE (MOD_VEX_W_1_0F44_P_0_LEN_1
) },
10539 /* VEX_W_0F44_P_2_LEN_0 */
10540 { MOD_TABLE (MOD_VEX_W_0_0F44_P_2_LEN_1
) },
10541 { MOD_TABLE (MOD_VEX_W_1_0F44_P_2_LEN_1
) },
10544 /* VEX_W_0F45_P_0_LEN_1 */
10545 { MOD_TABLE (MOD_VEX_W_0_0F45_P_0_LEN_1
) },
10546 { MOD_TABLE (MOD_VEX_W_1_0F45_P_0_LEN_1
) },
10549 /* VEX_W_0F45_P_2_LEN_1 */
10550 { MOD_TABLE (MOD_VEX_W_0_0F45_P_2_LEN_1
) },
10551 { MOD_TABLE (MOD_VEX_W_1_0F45_P_2_LEN_1
) },
10554 /* VEX_W_0F46_P_0_LEN_1 */
10555 { MOD_TABLE (MOD_VEX_W_0_0F46_P_0_LEN_1
) },
10556 { MOD_TABLE (MOD_VEX_W_1_0F46_P_0_LEN_1
) },
10559 /* VEX_W_0F46_P_2_LEN_1 */
10560 { MOD_TABLE (MOD_VEX_W_0_0F46_P_2_LEN_1
) },
10561 { MOD_TABLE (MOD_VEX_W_1_0F46_P_2_LEN_1
) },
10564 /* VEX_W_0F47_P_0_LEN_1 */
10565 { MOD_TABLE (MOD_VEX_W_0_0F47_P_0_LEN_1
) },
10566 { MOD_TABLE (MOD_VEX_W_1_0F47_P_0_LEN_1
) },
10569 /* VEX_W_0F47_P_2_LEN_1 */
10570 { MOD_TABLE (MOD_VEX_W_0_0F47_P_2_LEN_1
) },
10571 { MOD_TABLE (MOD_VEX_W_1_0F47_P_2_LEN_1
) },
10574 /* VEX_W_0F4A_P_0_LEN_1 */
10575 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_0_LEN_1
) },
10576 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_0_LEN_1
) },
10579 /* VEX_W_0F4A_P_2_LEN_1 */
10580 { MOD_TABLE (MOD_VEX_W_0_0F4A_P_2_LEN_1
) },
10581 { MOD_TABLE (MOD_VEX_W_1_0F4A_P_2_LEN_1
) },
10584 /* VEX_W_0F4B_P_0_LEN_1 */
10585 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_0_LEN_1
) },
10586 { MOD_TABLE (MOD_VEX_W_1_0F4B_P_0_LEN_1
) },
10589 /* VEX_W_0F4B_P_2_LEN_1 */
10590 { MOD_TABLE (MOD_VEX_W_0_0F4B_P_2_LEN_1
) },
10593 /* VEX_W_0F50_M_0 */
10594 { "vmovmskpX", { Gdq
, XS
}, 0 },
10597 /* VEX_W_0F51_P_0 */
10598 { "vsqrtps", { XM
, EXx
}, 0 },
10601 /* VEX_W_0F51_P_1 */
10602 { "vsqrtss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10605 /* VEX_W_0F51_P_2 */
10606 { "vsqrtpd", { XM
, EXx
}, 0 },
10609 /* VEX_W_0F51_P_3 */
10610 { "vsqrtsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
10613 /* VEX_W_0F52_P_0 */
10614 { "vrsqrtps", { XM
, EXx
}, 0 },
10617 /* VEX_W_0F52_P_1 */
10618 { "vrsqrtss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10621 /* VEX_W_0F53_P_0 */
10622 { "vrcpps", { XM
, EXx
}, 0 },
10625 /* VEX_W_0F53_P_1 */
10626 { "vrcpss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10629 /* VEX_W_0F58_P_0 */
10630 { "vaddps", { XM
, Vex
, EXx
}, 0 },
10633 /* VEX_W_0F58_P_1 */
10634 { "vaddss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10637 /* VEX_W_0F58_P_2 */
10638 { "vaddpd", { XM
, Vex
, EXx
}, 0 },
10641 /* VEX_W_0F58_P_3 */
10642 { "vaddsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
10645 /* VEX_W_0F59_P_0 */
10646 { "vmulps", { XM
, Vex
, EXx
}, 0 },
10649 /* VEX_W_0F59_P_1 */
10650 { "vmulss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10653 /* VEX_W_0F59_P_2 */
10654 { "vmulpd", { XM
, Vex
, EXx
}, 0 },
10657 /* VEX_W_0F59_P_3 */
10658 { "vmulsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
10661 /* VEX_W_0F5A_P_0 */
10662 { "vcvtps2pd", { XM
, EXxmmq
}, 0 },
10665 /* VEX_W_0F5A_P_1 */
10666 { "vcvtss2sd", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10669 /* VEX_W_0F5A_P_3 */
10670 { "vcvtsd2ss", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
10673 /* VEX_W_0F5B_P_0 */
10674 { "vcvtdq2ps", { XM
, EXx
}, 0 },
10677 /* VEX_W_0F5B_P_1 */
10678 { "vcvttps2dq", { XM
, EXx
}, 0 },
10681 /* VEX_W_0F5B_P_2 */
10682 { "vcvtps2dq", { XM
, EXx
}, 0 },
10685 /* VEX_W_0F5C_P_0 */
10686 { "vsubps", { XM
, Vex
, EXx
}, 0 },
10689 /* VEX_W_0F5C_P_1 */
10690 { "vsubss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10693 /* VEX_W_0F5C_P_2 */
10694 { "vsubpd", { XM
, Vex
, EXx
}, 0 },
10697 /* VEX_W_0F5C_P_3 */
10698 { "vsubsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
10701 /* VEX_W_0F5D_P_0 */
10702 { "vminps", { XM
, Vex
, EXx
}, 0 },
10705 /* VEX_W_0F5D_P_1 */
10706 { "vminss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10709 /* VEX_W_0F5D_P_2 */
10710 { "vminpd", { XM
, Vex
, EXx
}, 0 },
10713 /* VEX_W_0F5D_P_3 */
10714 { "vminsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
10717 /* VEX_W_0F5E_P_0 */
10718 { "vdivps", { XM
, Vex
, EXx
}, 0 },
10721 /* VEX_W_0F5E_P_1 */
10722 { "vdivss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10725 /* VEX_W_0F5E_P_2 */
10726 { "vdivpd", { XM
, Vex
, EXx
}, 0 },
10729 /* VEX_W_0F5E_P_3 */
10730 { "vdivsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
10733 /* VEX_W_0F5F_P_0 */
10734 { "vmaxps", { XM
, Vex
, EXx
}, 0 },
10737 /* VEX_W_0F5F_P_1 */
10738 { "vmaxss", { XMScalar
, VexScalar
, EXdScalar
}, 0 },
10741 /* VEX_W_0F5F_P_2 */
10742 { "vmaxpd", { XM
, Vex
, EXx
}, 0 },
10745 /* VEX_W_0F5F_P_3 */
10746 { "vmaxsd", { XMScalar
, VexScalar
, EXqScalar
}, 0 },
10749 /* VEX_W_0F60_P_2 */
10750 { "vpunpcklbw", { XM
, Vex
, EXx
}, 0 },
10753 /* VEX_W_0F61_P_2 */
10754 { "vpunpcklwd", { XM
, Vex
, EXx
}, 0 },
10757 /* VEX_W_0F62_P_2 */
10758 { "vpunpckldq", { XM
, Vex
, EXx
}, 0 },
10761 /* VEX_W_0F63_P_2 */
10762 { "vpacksswb", { XM
, Vex
, EXx
}, 0 },
10765 /* VEX_W_0F64_P_2 */
10766 { "vpcmpgtb", { XM
, Vex
, EXx
}, 0 },
10769 /* VEX_W_0F65_P_2 */
10770 { "vpcmpgtw", { XM
, Vex
, EXx
}, 0 },
10773 /* VEX_W_0F66_P_2 */
10774 { "vpcmpgtd", { XM
, Vex
, EXx
}, 0 },
10777 /* VEX_W_0F67_P_2 */
10778 { "vpackuswb", { XM
, Vex
, EXx
}, 0 },
10781 /* VEX_W_0F68_P_2 */
10782 { "vpunpckhbw", { XM
, Vex
, EXx
}, 0 },
10785 /* VEX_W_0F69_P_2 */
10786 { "vpunpckhwd", { XM
, Vex
, EXx
}, 0 },
10789 /* VEX_W_0F6A_P_2 */
10790 { "vpunpckhdq", { XM
, Vex
, EXx
}, 0 },
10793 /* VEX_W_0F6B_P_2 */
10794 { "vpackssdw", { XM
, Vex
, EXx
}, 0 },
10797 /* VEX_W_0F6C_P_2 */
10798 { "vpunpcklqdq", { XM
, Vex
, EXx
}, 0 },
10801 /* VEX_W_0F6D_P_2 */
10802 { "vpunpckhqdq", { XM
, Vex
, EXx
}, 0 },
10805 /* VEX_W_0F6F_P_1 */
10806 { "vmovdqu", { XM
, EXx
}, 0 },
10809 /* VEX_W_0F6F_P_2 */
10810 { "vmovdqa", { XM
, EXx
}, 0 },
10813 /* VEX_W_0F70_P_1 */
10814 { "vpshufhw", { XM
, EXx
, Ib
}, 0 },
10817 /* VEX_W_0F70_P_2 */
10818 { "vpshufd", { XM
, EXx
, Ib
}, 0 },
10821 /* VEX_W_0F70_P_3 */
10822 { "vpshuflw", { XM
, EXx
, Ib
}, 0 },
10825 /* VEX_W_0F71_R_2_P_2 */
10826 { "vpsrlw", { Vex
, XS
, Ib
}, 0 },
10829 /* VEX_W_0F71_R_4_P_2 */
10830 { "vpsraw", { Vex
, XS
, Ib
}, 0 },
10833 /* VEX_W_0F71_R_6_P_2 */
10834 { "vpsllw", { Vex
, XS
, Ib
}, 0 },
10837 /* VEX_W_0F72_R_2_P_2 */
10838 { "vpsrld", { Vex
, XS
, Ib
}, 0 },
10841 /* VEX_W_0F72_R_4_P_2 */
10842 { "vpsrad", { Vex
, XS
, Ib
}, 0 },
10845 /* VEX_W_0F72_R_6_P_2 */
10846 { "vpslld", { Vex
, XS
, Ib
}, 0 },
10849 /* VEX_W_0F73_R_2_P_2 */
10850 { "vpsrlq", { Vex
, XS
, Ib
}, 0 },
10853 /* VEX_W_0F73_R_3_P_2 */
10854 { "vpsrldq", { Vex
, XS
, Ib
}, 0 },
10857 /* VEX_W_0F73_R_6_P_2 */
10858 { "vpsllq", { Vex
, XS
, Ib
}, 0 },
10861 /* VEX_W_0F73_R_7_P_2 */
10862 { "vpslldq", { Vex
, XS
, Ib
}, 0 },
10865 /* VEX_W_0F74_P_2 */
10866 { "vpcmpeqb", { XM
, Vex
, EXx
}, 0 },
10869 /* VEX_W_0F75_P_2 */
10870 { "vpcmpeqw", { XM
, Vex
, EXx
}, 0 },
10873 /* VEX_W_0F76_P_2 */
10874 { "vpcmpeqd", { XM
, Vex
, EXx
}, 0 },
10877 /* VEX_W_0F77_P_0 */
10878 { "", { VZERO
}, 0 },
10881 /* VEX_W_0F7C_P_2 */
10882 { "vhaddpd", { XM
, Vex
, EXx
}, 0 },
10885 /* VEX_W_0F7C_P_3 */
10886 { "vhaddps", { XM
, Vex
, EXx
}, 0 },
10889 /* VEX_W_0F7D_P_2 */
10890 { "vhsubpd", { XM
, Vex
, EXx
}, 0 },
10893 /* VEX_W_0F7D_P_3 */
10894 { "vhsubps", { XM
, Vex
, EXx
}, 0 },
10897 /* VEX_W_0F7E_P_1 */
10898 { "vmovq", { XMScalar
, EXqScalar
}, 0 },
10901 /* VEX_W_0F7F_P_1 */
10902 { "vmovdqu", { EXxS
, XM
}, 0 },
10905 /* VEX_W_0F7F_P_2 */
10906 { "vmovdqa", { EXxS
, XM
}, 0 },
10909 /* VEX_W_0F90_P_0_LEN_0 */
10910 { "kmovw", { MaskG
, MaskE
}, 0 },
10911 { "kmovq", { MaskG
, MaskE
}, 0 },
10914 /* VEX_W_0F90_P_2_LEN_0 */
10915 { "kmovb", { MaskG
, MaskBDE
}, 0 },
10916 { "kmovd", { MaskG
, MaskBDE
}, 0 },
10919 /* VEX_W_0F91_P_0_LEN_0 */
10920 { MOD_TABLE (MOD_VEX_W_0_0F91_P_0_LEN_0
) },
10921 { MOD_TABLE (MOD_VEX_W_1_0F91_P_0_LEN_0
) },
10924 /* VEX_W_0F91_P_2_LEN_0 */
10925 { MOD_TABLE (MOD_VEX_W_0_0F91_P_2_LEN_0
) },
10926 { MOD_TABLE (MOD_VEX_W_1_0F91_P_2_LEN_0
) },
10929 /* VEX_W_0F92_P_0_LEN_0 */
10930 { MOD_TABLE (MOD_VEX_W_0_0F92_P_0_LEN_0
) },
10933 /* VEX_W_0F92_P_2_LEN_0 */
10934 { MOD_TABLE (MOD_VEX_W_0_0F92_P_2_LEN_0
) },
10937 /* VEX_W_0F92_P_3_LEN_0 */
10938 { MOD_TABLE (MOD_VEX_W_0_0F92_P_3_LEN_0
) },
10939 { MOD_TABLE (MOD_VEX_W_1_0F92_P_3_LEN_0
) },
10942 /* VEX_W_0F93_P_0_LEN_0 */
10943 { MOD_TABLE (MOD_VEX_W_0_0F93_P_0_LEN_0
) },
10946 /* VEX_W_0F93_P_2_LEN_0 */
10947 { MOD_TABLE (MOD_VEX_W_0_0F93_P_2_LEN_0
) },
10950 /* VEX_W_0F93_P_3_LEN_0 */
10951 { MOD_TABLE (MOD_VEX_W_0_0F93_P_3_LEN_0
) },
10952 { MOD_TABLE (MOD_VEX_W_1_0F93_P_3_LEN_0
) },
10955 /* VEX_W_0F98_P_0_LEN_0 */
10956 { MOD_TABLE (MOD_VEX_W_0_0F98_P_0_LEN_0
) },
10957 { MOD_TABLE (MOD_VEX_W_1_0F98_P_0_LEN_0
) },
10960 /* VEX_W_0F98_P_2_LEN_0 */
10961 { MOD_TABLE (MOD_VEX_W_0_0F98_P_2_LEN_0
) },
10962 { MOD_TABLE (MOD_VEX_W_1_0F98_P_2_LEN_0
) },
10965 /* VEX_W_0F99_P_0_LEN_0 */
10966 { MOD_TABLE (MOD_VEX_W_0_0F99_P_0_LEN_0
) },
10967 { MOD_TABLE (MOD_VEX_W_1_0F99_P_0_LEN_0
) },
10970 /* VEX_W_0F99_P_2_LEN_0 */
10971 { MOD_TABLE (MOD_VEX_W_0_0F99_P_2_LEN_0
) },
10972 { MOD_TABLE (MOD_VEX_W_1_0F99_P_2_LEN_0
) },
10975 /* VEX_W_0FAE_R_2_M_0 */
10976 { "vldmxcsr", { Md
}, 0 },
10979 /* VEX_W_0FAE_R_3_M_0 */
10980 { "vstmxcsr", { Md
}, 0 },
10983 /* VEX_W_0FC2_P_0 */
10984 { "vcmpps", { XM
, Vex
, EXx
, VCMP
}, 0 },
10987 /* VEX_W_0FC2_P_1 */
10988 { "vcmpss", { XMScalar
, VexScalar
, EXdScalar
, VCMP
}, 0 },
10991 /* VEX_W_0FC2_P_2 */
10992 { "vcmppd", { XM
, Vex
, EXx
, VCMP
}, 0 },
10995 /* VEX_W_0FC2_P_3 */
10996 { "vcmpsd", { XMScalar
, VexScalar
, EXqScalar
, VCMP
}, 0 },
10999 /* VEX_W_0FC4_P_2 */
11000 { "vpinsrw", { XM
, Vex128
, Edqw
, Ib
}, 0 },
11003 /* VEX_W_0FC5_P_2 */
11004 { "vpextrw", { Gdq
, XS
, Ib
}, 0 },
11007 /* VEX_W_0FD0_P_2 */
11008 { "vaddsubpd", { XM
, Vex
, EXx
}, 0 },
11011 /* VEX_W_0FD0_P_3 */
11012 { "vaddsubps", { XM
, Vex
, EXx
}, 0 },
11015 /* VEX_W_0FD1_P_2 */
11016 { "vpsrlw", { XM
, Vex
, EXxmm
}, 0 },
11019 /* VEX_W_0FD2_P_2 */
11020 { "vpsrld", { XM
, Vex
, EXxmm
}, 0 },
11023 /* VEX_W_0FD3_P_2 */
11024 { "vpsrlq", { XM
, Vex
, EXxmm
}, 0 },
11027 /* VEX_W_0FD4_P_2 */
11028 { "vpaddq", { XM
, Vex
, EXx
}, 0 },
11031 /* VEX_W_0FD5_P_2 */
11032 { "vpmullw", { XM
, Vex
, EXx
}, 0 },
11035 /* VEX_W_0FD6_P_2 */
11036 { "vmovq", { EXqScalarS
, XMScalar
}, 0 },
11039 /* VEX_W_0FD7_P_2_M_1 */
11040 { "vpmovmskb", { Gdq
, XS
}, 0 },
11043 /* VEX_W_0FD8_P_2 */
11044 { "vpsubusb", { XM
, Vex
, EXx
}, 0 },
11047 /* VEX_W_0FD9_P_2 */
11048 { "vpsubusw", { XM
, Vex
, EXx
}, 0 },
11051 /* VEX_W_0FDA_P_2 */
11052 { "vpminub", { XM
, Vex
, EXx
}, 0 },
11055 /* VEX_W_0FDB_P_2 */
11056 { "vpand", { XM
, Vex
, EXx
}, 0 },
11059 /* VEX_W_0FDC_P_2 */
11060 { "vpaddusb", { XM
, Vex
, EXx
}, 0 },
11063 /* VEX_W_0FDD_P_2 */
11064 { "vpaddusw", { XM
, Vex
, EXx
}, 0 },
11067 /* VEX_W_0FDE_P_2 */
11068 { "vpmaxub", { XM
, Vex
, EXx
}, 0 },
11071 /* VEX_W_0FDF_P_2 */
11072 { "vpandn", { XM
, Vex
, EXx
}, 0 },
11075 /* VEX_W_0FE0_P_2 */
11076 { "vpavgb", { XM
, Vex
, EXx
}, 0 },
11079 /* VEX_W_0FE1_P_2 */
11080 { "vpsraw", { XM
, Vex
, EXxmm
}, 0 },
11083 /* VEX_W_0FE2_P_2 */
11084 { "vpsrad", { XM
, Vex
, EXxmm
}, 0 },
11087 /* VEX_W_0FE3_P_2 */
11088 { "vpavgw", { XM
, Vex
, EXx
}, 0 },
11091 /* VEX_W_0FE4_P_2 */
11092 { "vpmulhuw", { XM
, Vex
, EXx
}, 0 },
11095 /* VEX_W_0FE5_P_2 */
11096 { "vpmulhw", { XM
, Vex
, EXx
}, 0 },
11099 /* VEX_W_0FE6_P_1 */
11100 { "vcvtdq2pd", { XM
, EXxmmq
}, 0 },
11103 /* VEX_W_0FE6_P_2 */
11104 { "vcvttpd2dq%XY", { XMM
, EXx
}, 0 },
11107 /* VEX_W_0FE6_P_3 */
11108 { "vcvtpd2dq%XY", { XMM
, EXx
}, 0 },
11111 /* VEX_W_0FE7_P_2_M_0 */
11112 { "vmovntdq", { Mx
, XM
}, 0 },
11115 /* VEX_W_0FE8_P_2 */
11116 { "vpsubsb", { XM
, Vex
, EXx
}, 0 },
11119 /* VEX_W_0FE9_P_2 */
11120 { "vpsubsw", { XM
, Vex
, EXx
}, 0 },
11123 /* VEX_W_0FEA_P_2 */
11124 { "vpminsw", { XM
, Vex
, EXx
}, 0 },
11127 /* VEX_W_0FEB_P_2 */
11128 { "vpor", { XM
, Vex
, EXx
}, 0 },
11131 /* VEX_W_0FEC_P_2 */
11132 { "vpaddsb", { XM
, Vex
, EXx
}, 0 },
11135 /* VEX_W_0FED_P_2 */
11136 { "vpaddsw", { XM
, Vex
, EXx
}, 0 },
11139 /* VEX_W_0FEE_P_2 */
11140 { "vpmaxsw", { XM
, Vex
, EXx
}, 0 },
11143 /* VEX_W_0FEF_P_2 */
11144 { "vpxor", { XM
, Vex
, EXx
}, 0 },
11147 /* VEX_W_0FF0_P_3_M_0 */
11148 { "vlddqu", { XM
, M
}, 0 },
11151 /* VEX_W_0FF1_P_2 */
11152 { "vpsllw", { XM
, Vex
, EXxmm
}, 0 },
11155 /* VEX_W_0FF2_P_2 */
11156 { "vpslld", { XM
, Vex
, EXxmm
}, 0 },
11159 /* VEX_W_0FF3_P_2 */
11160 { "vpsllq", { XM
, Vex
, EXxmm
}, 0 },
11163 /* VEX_W_0FF4_P_2 */
11164 { "vpmuludq", { XM
, Vex
, EXx
}, 0 },
11167 /* VEX_W_0FF5_P_2 */
11168 { "vpmaddwd", { XM
, Vex
, EXx
}, 0 },
11171 /* VEX_W_0FF6_P_2 */
11172 { "vpsadbw", { XM
, Vex
, EXx
}, 0 },
11175 /* VEX_W_0FF7_P_2 */
11176 { "vmaskmovdqu", { XM
, XS
}, 0 },
11179 /* VEX_W_0FF8_P_2 */
11180 { "vpsubb", { XM
, Vex
, EXx
}, 0 },
11183 /* VEX_W_0FF9_P_2 */
11184 { "vpsubw", { XM
, Vex
, EXx
}, 0 },
11187 /* VEX_W_0FFA_P_2 */
11188 { "vpsubd", { XM
, Vex
, EXx
}, 0 },
11191 /* VEX_W_0FFB_P_2 */
11192 { "vpsubq", { XM
, Vex
, EXx
}, 0 },
11195 /* VEX_W_0FFC_P_2 */
11196 { "vpaddb", { XM
, Vex
, EXx
}, 0 },
11199 /* VEX_W_0FFD_P_2 */
11200 { "vpaddw", { XM
, Vex
, EXx
}, 0 },
11203 /* VEX_W_0FFE_P_2 */
11204 { "vpaddd", { XM
, Vex
, EXx
}, 0 },
11207 /* VEX_W_0F3800_P_2 */
11208 { "vpshufb", { XM
, Vex
, EXx
}, 0 },
11211 /* VEX_W_0F3801_P_2 */
11212 { "vphaddw", { XM
, Vex
, EXx
}, 0 },
11215 /* VEX_W_0F3802_P_2 */
11216 { "vphaddd", { XM
, Vex
, EXx
}, 0 },
11219 /* VEX_W_0F3803_P_2 */
11220 { "vphaddsw", { XM
, Vex
, EXx
}, 0 },
11223 /* VEX_W_0F3804_P_2 */
11224 { "vpmaddubsw", { XM
, Vex
, EXx
}, 0 },
11227 /* VEX_W_0F3805_P_2 */
11228 { "vphsubw", { XM
, Vex
, EXx
}, 0 },
11231 /* VEX_W_0F3806_P_2 */
11232 { "vphsubd", { XM
, Vex
, EXx
}, 0 },
11235 /* VEX_W_0F3807_P_2 */
11236 { "vphsubsw", { XM
, Vex
, EXx
}, 0 },
11239 /* VEX_W_0F3808_P_2 */
11240 { "vpsignb", { XM
, Vex
, EXx
}, 0 },
11243 /* VEX_W_0F3809_P_2 */
11244 { "vpsignw", { XM
, Vex
, EXx
}, 0 },
11247 /* VEX_W_0F380A_P_2 */
11248 { "vpsignd", { XM
, Vex
, EXx
}, 0 },
11251 /* VEX_W_0F380B_P_2 */
11252 { "vpmulhrsw", { XM
, Vex
, EXx
}, 0 },
11255 /* VEX_W_0F380C_P_2 */
11256 { "vpermilps", { XM
, Vex
, EXx
}, 0 },
11259 /* VEX_W_0F380D_P_2 */
11260 { "vpermilpd", { XM
, Vex
, EXx
}, 0 },
11263 /* VEX_W_0F380E_P_2 */
11264 { "vtestps", { XM
, EXx
}, 0 },
11267 /* VEX_W_0F380F_P_2 */
11268 { "vtestpd", { XM
, EXx
}, 0 },
11271 /* VEX_W_0F3816_P_2 */
11272 { "vpermps", { XM
, Vex
, EXx
}, 0 },
11275 /* VEX_W_0F3817_P_2 */
11276 { "vptest", { XM
, EXx
}, 0 },
11279 /* VEX_W_0F3818_P_2 */
11280 { "vbroadcastss", { XM
, EXxmm_md
}, 0 },
11283 /* VEX_W_0F3819_P_2 */
11284 { "vbroadcastsd", { XM
, EXxmm_mq
}, 0 },
11287 /* VEX_W_0F381A_P_2_M_0 */
11288 { "vbroadcastf128", { XM
, Mxmm
}, 0 },
11291 /* VEX_W_0F381C_P_2 */
11292 { "vpabsb", { XM
, EXx
}, 0 },
11295 /* VEX_W_0F381D_P_2 */
11296 { "vpabsw", { XM
, EXx
}, 0 },
11299 /* VEX_W_0F381E_P_2 */
11300 { "vpabsd", { XM
, EXx
}, 0 },
11303 /* VEX_W_0F3820_P_2 */
11304 { "vpmovsxbw", { XM
, EXxmmq
}, 0 },
11307 /* VEX_W_0F3821_P_2 */
11308 { "vpmovsxbd", { XM
, EXxmmqd
}, 0 },
11311 /* VEX_W_0F3822_P_2 */
11312 { "vpmovsxbq", { XM
, EXxmmdw
}, 0 },
11315 /* VEX_W_0F3823_P_2 */
11316 { "vpmovsxwd", { XM
, EXxmmq
}, 0 },
11319 /* VEX_W_0F3824_P_2 */
11320 { "vpmovsxwq", { XM
, EXxmmqd
}, 0 },
11323 /* VEX_W_0F3825_P_2 */
11324 { "vpmovsxdq", { XM
, EXxmmq
}, 0 },
11327 /* VEX_W_0F3828_P_2 */
11328 { "vpmuldq", { XM
, Vex
, EXx
}, 0 },
11331 /* VEX_W_0F3829_P_2 */
11332 { "vpcmpeqq", { XM
, Vex
, EXx
}, 0 },
11335 /* VEX_W_0F382A_P_2_M_0 */
11336 { "vmovntdqa", { XM
, Mx
}, 0 },
11339 /* VEX_W_0F382B_P_2 */
11340 { "vpackusdw", { XM
, Vex
, EXx
}, 0 },
11343 /* VEX_W_0F382C_P_2_M_0 */
11344 { "vmaskmovps", { XM
, Vex
, Mx
}, 0 },
11347 /* VEX_W_0F382D_P_2_M_0 */
11348 { "vmaskmovpd", { XM
, Vex
, Mx
}, 0 },
11351 /* VEX_W_0F382E_P_2_M_0 */
11352 { "vmaskmovps", { Mx
, Vex
, XM
}, 0 },
11355 /* VEX_W_0F382F_P_2_M_0 */
11356 { "vmaskmovpd", { Mx
, Vex
, XM
}, 0 },
11359 /* VEX_W_0F3830_P_2 */
11360 { "vpmovzxbw", { XM
, EXxmmq
}, 0 },
11363 /* VEX_W_0F3831_P_2 */
11364 { "vpmovzxbd", { XM
, EXxmmqd
}, 0 },
11367 /* VEX_W_0F3832_P_2 */
11368 { "vpmovzxbq", { XM
, EXxmmdw
}, 0 },
11371 /* VEX_W_0F3833_P_2 */
11372 { "vpmovzxwd", { XM
, EXxmmq
}, 0 },
11375 /* VEX_W_0F3834_P_2 */
11376 { "vpmovzxwq", { XM
, EXxmmqd
}, 0 },
11379 /* VEX_W_0F3835_P_2 */
11380 { "vpmovzxdq", { XM
, EXxmmq
}, 0 },
11383 /* VEX_W_0F3836_P_2 */
11384 { "vpermd", { XM
, Vex
, EXx
}, 0 },
11387 /* VEX_W_0F3837_P_2 */
11388 { "vpcmpgtq", { XM
, Vex
, EXx
}, 0 },
11391 /* VEX_W_0F3838_P_2 */
11392 { "vpminsb", { XM
, Vex
, EXx
}, 0 },
11395 /* VEX_W_0F3839_P_2 */
11396 { "vpminsd", { XM
, Vex
, EXx
}, 0 },
11399 /* VEX_W_0F383A_P_2 */
11400 { "vpminuw", { XM
, Vex
, EXx
}, 0 },
11403 /* VEX_W_0F383B_P_2 */
11404 { "vpminud", { XM
, Vex
, EXx
}, 0 },
11407 /* VEX_W_0F383C_P_2 */
11408 { "vpmaxsb", { XM
, Vex
, EXx
}, 0 },
11411 /* VEX_W_0F383D_P_2 */
11412 { "vpmaxsd", { XM
, Vex
, EXx
}, 0 },
11415 /* VEX_W_0F383E_P_2 */
11416 { "vpmaxuw", { XM
, Vex
, EXx
}, 0 },
11419 /* VEX_W_0F383F_P_2 */
11420 { "vpmaxud", { XM
, Vex
, EXx
}, 0 },
11423 /* VEX_W_0F3840_P_2 */
11424 { "vpmulld", { XM
, Vex
, EXx
}, 0 },
11427 /* VEX_W_0F3841_P_2 */
11428 { "vphminposuw", { XM
, EXx
}, 0 },
11431 /* VEX_W_0F3846_P_2 */
11432 { "vpsravd", { XM
, Vex
, EXx
}, 0 },
11435 /* VEX_W_0F3858_P_2 */
11436 { "vpbroadcastd", { XM
, EXxmm_md
}, 0 },
11439 /* VEX_W_0F3859_P_2 */
11440 { "vpbroadcastq", { XM
, EXxmm_mq
}, 0 },
11443 /* VEX_W_0F385A_P_2_M_0 */
11444 { "vbroadcasti128", { XM
, Mxmm
}, 0 },
11447 /* VEX_W_0F3878_P_2 */
11448 { "vpbroadcastb", { XM
, EXxmm_mb
}, 0 },
11451 /* VEX_W_0F3879_P_2 */
11452 { "vpbroadcastw", { XM
, EXxmm_mw
}, 0 },
11455 /* VEX_W_0F38DB_P_2 */
11456 { "vaesimc", { XM
, EXx
}, 0 },
11459 /* VEX_W_0F38DC_P_2 */
11460 { "vaesenc", { XM
, Vex128
, EXx
}, 0 },
11463 /* VEX_W_0F38DD_P_2 */
11464 { "vaesenclast", { XM
, Vex128
, EXx
}, 0 },
11467 /* VEX_W_0F38DE_P_2 */
11468 { "vaesdec", { XM
, Vex128
, EXx
}, 0 },
11471 /* VEX_W_0F38DF_P_2 */
11472 { "vaesdeclast", { XM
, Vex128
, EXx
}, 0 },
11475 /* VEX_W_0F3A00_P_2 */
11477 { "vpermq", { XM
, EXx
, Ib
}, 0 },
11480 /* VEX_W_0F3A01_P_2 */
11482 { "vpermpd", { XM
, EXx
, Ib
}, 0 },
11485 /* VEX_W_0F3A02_P_2 */
11486 { "vpblendd", { XM
, Vex
, EXx
, Ib
}, 0 },
11489 /* VEX_W_0F3A04_P_2 */
11490 { "vpermilps", { XM
, EXx
, Ib
}, 0 },
11493 /* VEX_W_0F3A05_P_2 */
11494 { "vpermilpd", { XM
, EXx
, Ib
}, 0 },
11497 /* VEX_W_0F3A06_P_2 */
11498 { "vperm2f128", { XM
, Vex256
, EXx
, Ib
}, 0 },
11501 /* VEX_W_0F3A08_P_2 */
11502 { "vroundps", { XM
, EXx
, Ib
}, 0 },
11505 /* VEX_W_0F3A09_P_2 */
11506 { "vroundpd", { XM
, EXx
, Ib
}, 0 },
11509 /* VEX_W_0F3A0A_P_2 */
11510 { "vroundss", { XMScalar
, VexScalar
, EXdScalar
, Ib
}, 0 },
11513 /* VEX_W_0F3A0B_P_2 */
11514 { "vroundsd", { XMScalar
, VexScalar
, EXqScalar
, Ib
}, 0 },
11517 /* VEX_W_0F3A0C_P_2 */
11518 { "vblendps", { XM
, Vex
, EXx
, Ib
}, 0 },
11521 /* VEX_W_0F3A0D_P_2 */
11522 { "vblendpd", { XM
, Vex
, EXx
, Ib
}, 0 },
11525 /* VEX_W_0F3A0E_P_2 */
11526 { "vpblendw", { XM
, Vex
, EXx
, Ib
}, 0 },
11529 /* VEX_W_0F3A0F_P_2 */
11530 { "vpalignr", { XM
, Vex
, EXx
, Ib
}, 0 },
11533 /* VEX_W_0F3A14_P_2 */
11534 { "vpextrb", { Edqb
, XM
, Ib
}, 0 },
11537 /* VEX_W_0F3A15_P_2 */
11538 { "vpextrw", { Edqw
, XM
, Ib
}, 0 },
11541 /* VEX_W_0F3A18_P_2 */
11542 { "vinsertf128", { XM
, Vex256
, EXxmm
, Ib
}, 0 },
11545 /* VEX_W_0F3A19_P_2 */
11546 { "vextractf128", { EXxmm
, XM
, Ib
}, 0 },
11549 /* VEX_W_0F3A20_P_2 */
11550 { "vpinsrb", { XM
, Vex128
, Edqb
, Ib
}, 0 },
11553 /* VEX_W_0F3A21_P_2 */
11554 { "vinsertps", { XM
, Vex128
, EXd
, Ib
}, 0 },
11557 /* VEX_W_0F3A30_P_2_LEN_0 */
11558 { MOD_TABLE (MOD_VEX_W_0_0F3A30_P_2_LEN_0
) },
11559 { MOD_TABLE (MOD_VEX_W_1_0F3A30_P_2_LEN_0
) },
11562 /* VEX_W_0F3A31_P_2_LEN_0 */
11563 { MOD_TABLE (MOD_VEX_W_0_0F3A31_P_2_LEN_0
) },
11564 { MOD_TABLE (MOD_VEX_W_1_0F3A31_P_2_LEN_0
) },
11567 /* VEX_W_0F3A32_P_2_LEN_0 */
11568 { MOD_TABLE (MOD_VEX_W_0_0F3A32_P_2_LEN_0
) },
11569 { MOD_TABLE (MOD_VEX_W_1_0F3A32_P_2_LEN_0
) },
11572 /* VEX_W_0F3A33_P_2_LEN_0 */
11573 { MOD_TABLE (MOD_VEX_W_0_0F3A33_P_2_LEN_0
) },
11574 { MOD_TABLE (MOD_VEX_W_1_0F3A33_P_2_LEN_0
) },
11577 /* VEX_W_0F3A38_P_2 */
11578 { "vinserti128", { XM
, Vex256
, EXxmm
, Ib
}, 0 },
11581 /* VEX_W_0F3A39_P_2 */
11582 { "vextracti128", { EXxmm
, XM
, Ib
}, 0 },
11585 /* VEX_W_0F3A40_P_2 */
11586 { "vdpps", { XM
, Vex
, EXx
, Ib
}, 0 },
11589 /* VEX_W_0F3A41_P_2 */
11590 { "vdppd", { XM
, Vex128
, EXx
, Ib
}, 0 },
11593 /* VEX_W_0F3A42_P_2 */
11594 { "vmpsadbw", { XM
, Vex
, EXx
, Ib
}, 0 },
11597 /* VEX_W_0F3A44_P_2 */
11598 { "vpclmulqdq", { XM
, Vex128
, EXx
, PCLMUL
}, 0 },
11601 /* VEX_W_0F3A46_P_2 */
11602 { "vperm2i128", { XM
, Vex256
, EXx
, Ib
}, 0 },
11605 /* VEX_W_0F3A48_P_2 */
11606 { "vpermil2ps", { XMVexW
, Vex
, EXVexImmW
, EXVexImmW
, EXVexImmW
}, 0 },
11607 { "vpermil2ps", { XMVexW
, Vex
, EXVexImmW
, EXVexImmW
, EXVexImmW
}, 0 },
11610 /* VEX_W_0F3A49_P_2 */
11611 { "vpermil2pd", { XMVexW
, Vex
, EXVexImmW
, EXVexImmW
, EXVexImmW
}, 0 },
11612 { "vpermil2pd", { XMVexW
, Vex
, EXVexImmW
, EXVexImmW
, EXVexImmW
}, 0 },
11615 /* VEX_W_0F3A4A_P_2 */
11616 { "vblendvps", { XM
, Vex
, EXx
, XMVexI4
}, 0 },
11619 /* VEX_W_0F3A4B_P_2 */
11620 { "vblendvpd", { XM
, Vex
, EXx
, XMVexI4
}, 0 },
11623 /* VEX_W_0F3A4C_P_2 */
11624 { "vpblendvb", { XM
, Vex
, EXx
, XMVexI4
}, 0 },
11627 /* VEX_W_0F3A60_P_2 */
11628 { "vpcmpestrm", { XM
, EXx
, Ib
}, 0 },
11631 /* VEX_W_0F3A61_P_2 */
11632 { "vpcmpestri", { XM
, EXx
, Ib
}, 0 },
11635 /* VEX_W_0F3A62_P_2 */
11636 { "vpcmpistrm", { XM
, EXx
, Ib
}, 0 },
11639 /* VEX_W_0F3A63_P_2 */
11640 { "vpcmpistri", { XM
, EXx
, Ib
}, 0 },
11643 /* VEX_W_0F3ADF_P_2 */
11644 { "vaeskeygenassist", { XM
, EXx
, Ib
}, 0 },
11646 #define NEED_VEX_W_TABLE
11647 #include "i386-dis-evex.h"
11648 #undef NEED_VEX_W_TABLE
11651 static const struct dis386 mod_table
[][2] = {
11654 { "leaS", { Gv
, M
}, 0 },
11659 { RM_TABLE (RM_C6_REG_7
) },
11664 { RM_TABLE (RM_C7_REG_7
) },
11668 { "Jcall^", { indirEp
}, 0 },
11672 { "Jjmp^", { indirEp
}, 0 },
11675 /* MOD_0F01_REG_0 */
11676 { X86_64_TABLE (X86_64_0F01_REG_0
) },
11677 { RM_TABLE (RM_0F01_REG_0
) },
11680 /* MOD_0F01_REG_1 */
11681 { X86_64_TABLE (X86_64_0F01_REG_1
) },
11682 { RM_TABLE (RM_0F01_REG_1
) },
11685 /* MOD_0F01_REG_2 */
11686 { X86_64_TABLE (X86_64_0F01_REG_2
) },
11687 { RM_TABLE (RM_0F01_REG_2
) },
11690 /* MOD_0F01_REG_3 */
11691 { X86_64_TABLE (X86_64_0F01_REG_3
) },
11692 { RM_TABLE (RM_0F01_REG_3
) },
11695 /* MOD_0F01_REG_5 */
11697 { RM_TABLE (RM_0F01_REG_5
) },
11700 /* MOD_0F01_REG_7 */
11701 { "invlpg", { Mb
}, 0 },
11702 { RM_TABLE (RM_0F01_REG_7
) },
11705 /* MOD_0F12_PREFIX_0 */
11706 { "movlps", { XM
, EXq
}, PREFIX_OPCODE
},
11707 { "movhlps", { XM
, EXq
}, PREFIX_OPCODE
},
11711 { "movlpX", { EXq
, XM
}, PREFIX_OPCODE
},
11714 /* MOD_0F16_PREFIX_0 */
11715 { "movhps", { XM
, EXq
}, 0 },
11716 { "movlhps", { XM
, EXq
}, 0 },
11720 { "movhpX", { EXq
, XM
}, PREFIX_OPCODE
},
11723 /* MOD_0F18_REG_0 */
11724 { "prefetchnta", { Mb
}, 0 },
11727 /* MOD_0F18_REG_1 */
11728 { "prefetcht0", { Mb
}, 0 },
11731 /* MOD_0F18_REG_2 */
11732 { "prefetcht1", { Mb
}, 0 },
11735 /* MOD_0F18_REG_3 */
11736 { "prefetcht2", { Mb
}, 0 },
11739 /* MOD_0F18_REG_4 */
11740 { "nop/reserved", { Mb
}, 0 },
11743 /* MOD_0F18_REG_5 */
11744 { "nop/reserved", { Mb
}, 0 },
11747 /* MOD_0F18_REG_6 */
11748 { "nop/reserved", { Mb
}, 0 },
11751 /* MOD_0F18_REG_7 */
11752 { "nop/reserved", { Mb
}, 0 },
11755 /* MOD_0F1A_PREFIX_0 */
11756 { "bndldx", { Gbnd
, Ev_bnd
}, 0 },
11757 { "nopQ", { Ev
}, 0 },
11760 /* MOD_0F1B_PREFIX_0 */
11761 { "bndstx", { Ev_bnd
, Gbnd
}, 0 },
11762 { "nopQ", { Ev
}, 0 },
11765 /* MOD_0F1B_PREFIX_1 */
11766 { "bndmk", { Gbnd
, Ev_bnd
}, 0 },
11767 { "nopQ", { Ev
}, 0 },
11772 { "movL", { Rd
, Td
}, 0 },
11777 { "movL", { Td
, Rd
}, 0 },
11780 /* MOD_0F2B_PREFIX_0 */
11781 {"movntps", { Mx
, XM
}, PREFIX_OPCODE
},
11784 /* MOD_0F2B_PREFIX_1 */
11785 {"movntss", { Md
, XM
}, PREFIX_OPCODE
},
11788 /* MOD_0F2B_PREFIX_2 */
11789 {"movntpd", { Mx
, XM
}, PREFIX_OPCODE
},
11792 /* MOD_0F2B_PREFIX_3 */
11793 {"movntsd", { Mq
, XM
}, PREFIX_OPCODE
},
11798 { "movmskpX", { Gdq
, XS
}, PREFIX_OPCODE
},
11801 /* MOD_0F71_REG_2 */
11803 { "psrlw", { MS
, Ib
}, 0 },
11806 /* MOD_0F71_REG_4 */
11808 { "psraw", { MS
, Ib
}, 0 },
11811 /* MOD_0F71_REG_6 */
11813 { "psllw", { MS
, Ib
}, 0 },
11816 /* MOD_0F72_REG_2 */
11818 { "psrld", { MS
, Ib
}, 0 },
11821 /* MOD_0F72_REG_4 */
11823 { "psrad", { MS
, Ib
}, 0 },
11826 /* MOD_0F72_REG_6 */
11828 { "pslld", { MS
, Ib
}, 0 },
11831 /* MOD_0F73_REG_2 */
11833 { "psrlq", { MS
, Ib
}, 0 },
11836 /* MOD_0F73_REG_3 */
11838 { PREFIX_TABLE (PREFIX_0F73_REG_3
) },
11841 /* MOD_0F73_REG_6 */
11843 { "psllq", { MS
, Ib
}, 0 },
11846 /* MOD_0F73_REG_7 */
11848 { PREFIX_TABLE (PREFIX_0F73_REG_7
) },
11851 /* MOD_0FAE_REG_0 */
11852 { "fxsave", { FXSAVE
}, 0 },
11853 { PREFIX_TABLE (PREFIX_0FAE_REG_0
) },
11856 /* MOD_0FAE_REG_1 */
11857 { "fxrstor", { FXSAVE
}, 0 },
11858 { PREFIX_TABLE (PREFIX_0FAE_REG_1
) },
11861 /* MOD_0FAE_REG_2 */
11862 { "ldmxcsr", { Md
}, 0 },
11863 { PREFIX_TABLE (PREFIX_0FAE_REG_2
) },
11866 /* MOD_0FAE_REG_3 */
11867 { "stmxcsr", { Md
}, 0 },
11868 { PREFIX_TABLE (PREFIX_0FAE_REG_3
) },
11871 /* MOD_0FAE_REG_4 */
11872 { "xsave", { FXSAVE
}, 0 },
11875 /* MOD_0FAE_REG_5 */
11876 { "xrstor", { FXSAVE
}, 0 },
11877 { RM_TABLE (RM_0FAE_REG_5
) },
11880 /* MOD_0FAE_REG_6 */
11881 { PREFIX_TABLE (PREFIX_0FAE_REG_6
) },
11882 { RM_TABLE (RM_0FAE_REG_6
) },
11885 /* MOD_0FAE_REG_7 */
11886 { PREFIX_TABLE (PREFIX_0FAE_REG_7
) },
11887 { RM_TABLE (RM_0FAE_REG_7
) },
11891 { "lssS", { Gv
, Mp
}, 0 },
11895 { "lfsS", { Gv
, Mp
}, 0 },
11899 { "lgsS", { Gv
, Mp
}, 0 },
11903 { PREFIX_TABLE (PREFIX_MOD_0_0FC3
) },
11906 /* MOD_0FC7_REG_3 */
11907 { "xrstors", { FXSAVE
}, 0 },
11910 /* MOD_0FC7_REG_4 */
11911 { "xsavec", { FXSAVE
}, 0 },
11914 /* MOD_0FC7_REG_5 */
11915 { "xsaves", { FXSAVE
}, 0 },
11918 /* MOD_0FC7_REG_6 */
11919 { PREFIX_TABLE (PREFIX_MOD_0_0FC7_REG_6
) },
11920 { PREFIX_TABLE (PREFIX_MOD_3_0FC7_REG_6
) }
11923 /* MOD_0FC7_REG_7 */
11924 { "vmptrst", { Mq
}, 0 },
11925 { PREFIX_TABLE (PREFIX_MOD_3_0FC7_REG_7
) }
11930 { "pmovmskb", { Gdq
, MS
}, 0 },
11933 /* MOD_0FE7_PREFIX_2 */
11934 { "movntdq", { Mx
, XM
}, 0 },
11937 /* MOD_0FF0_PREFIX_3 */
11938 { "lddqu", { XM
, M
}, 0 },
11941 /* MOD_0F382A_PREFIX_2 */
11942 { "movntdqa", { XM
, Mx
}, 0 },
11946 { "bound{S|}", { Gv
, Ma
}, 0 },
11947 { EVEX_TABLE (EVEX_0F
) },
11951 { "lesS", { Gv
, Mp
}, 0 },
11952 { VEX_C4_TABLE (VEX_0F
) },
11956 { "ldsS", { Gv
, Mp
}, 0 },
11957 { VEX_C5_TABLE (VEX_0F
) },
11960 /* MOD_VEX_0F12_PREFIX_0 */
11961 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0
) },
11962 { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1
) },
11966 { VEX_LEN_TABLE (VEX_LEN_0F13_M_0
) },
11969 /* MOD_VEX_0F16_PREFIX_0 */
11970 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0
) },
11971 { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1
) },
11975 { VEX_LEN_TABLE (VEX_LEN_0F17_M_0
) },
11979 { VEX_W_TABLE (VEX_W_0F2B_M_0
) },
11982 /* MOD_VEX_W_0_0F41_P_0_LEN_1 */
11984 { "kandw", { MaskG
, MaskVex
, MaskR
}, 0 },
11987 /* MOD_VEX_W_1_0F41_P_0_LEN_1 */
11989 { "kandq", { MaskG
, MaskVex
, MaskR
}, 0 },
11992 /* MOD_VEX_W_0_0F41_P_2_LEN_1 */
11994 { "kandb", { MaskG
, MaskVex
, MaskR
}, 0 },
11997 /* MOD_VEX_W_1_0F41_P_2_LEN_1 */
11999 { "kandd", { MaskG
, MaskVex
, MaskR
}, 0 },
12002 /* MOD_VEX_W_0_0F42_P_0_LEN_1 */
12004 { "kandnw", { MaskG
, MaskVex
, MaskR
}, 0 },
12007 /* MOD_VEX_W_1_0F42_P_0_LEN_1 */
12009 { "kandnq", { MaskG
, MaskVex
, MaskR
}, 0 },
12012 /* MOD_VEX_W_0_0F42_P_2_LEN_1 */
12014 { "kandnb", { MaskG
, MaskVex
, MaskR
}, 0 },
12017 /* MOD_VEX_W_1_0F42_P_2_LEN_1 */
12019 { "kandnd", { MaskG
, MaskVex
, MaskR
}, 0 },
12022 /* MOD_VEX_W_0_0F44_P_0_LEN_0 */
12024 { "knotw", { MaskG
, MaskR
}, 0 },
12027 /* MOD_VEX_W_1_0F44_P_0_LEN_0 */
12029 { "knotq", { MaskG
, MaskR
}, 0 },
12032 /* MOD_VEX_W_0_0F44_P_2_LEN_0 */
12034 { "knotb", { MaskG
, MaskR
}, 0 },
12037 /* MOD_VEX_W_1_0F44_P_2_LEN_0 */
12039 { "knotd", { MaskG
, MaskR
}, 0 },
12042 /* MOD_VEX_W_0_0F45_P_0_LEN_1 */
12044 { "korw", { MaskG
, MaskVex
, MaskR
}, 0 },
12047 /* MOD_VEX_W_1_0F45_P_0_LEN_1 */
12049 { "korq", { MaskG
, MaskVex
, MaskR
}, 0 },
12052 /* MOD_VEX_W_0_0F45_P_2_LEN_1 */
12054 { "korb", { MaskG
, MaskVex
, MaskR
}, 0 },
12057 /* MOD_VEX_W_1_0F45_P_2_LEN_1 */
12059 { "kord", { MaskG
, MaskVex
, MaskR
}, 0 },
12062 /* MOD_VEX_W_0_0F46_P_0_LEN_1 */
12064 { "kxnorw", { MaskG
, MaskVex
, MaskR
}, 0 },
12067 /* MOD_VEX_W_1_0F46_P_0_LEN_1 */
12069 { "kxnorq", { MaskG
, MaskVex
, MaskR
}, 0 },
12072 /* MOD_VEX_W_0_0F46_P_2_LEN_1 */
12074 { "kxnorb", { MaskG
, MaskVex
, MaskR
}, 0 },
12077 /* MOD_VEX_W_1_0F46_P_2_LEN_1 */
12079 { "kxnord", { MaskG
, MaskVex
, MaskR
}, 0 },
12082 /* MOD_VEX_W_0_0F47_P_0_LEN_1 */
12084 { "kxorw", { MaskG
, MaskVex
, MaskR
}, 0 },
12087 /* MOD_VEX_W_1_0F47_P_0_LEN_1 */
12089 { "kxorq", { MaskG
, MaskVex
, MaskR
}, 0 },
12092 /* MOD_VEX_W_0_0F47_P_2_LEN_1 */
12094 { "kxorb", { MaskG
, MaskVex
, MaskR
}, 0 },
12097 /* MOD_VEX_W_1_0F47_P_2_LEN_1 */
12099 { "kxord", { MaskG
, MaskVex
, MaskR
}, 0 },
12102 /* MOD_VEX_W_0_0F4A_P_0_LEN_1 */
12104 { "kaddw", { MaskG
, MaskVex
, MaskR
}, 0 },
12107 /* MOD_VEX_W_1_0F4A_P_0_LEN_1 */
12109 { "kaddq", { MaskG
, MaskVex
, MaskR
}, 0 },
12112 /* MOD_VEX_W_0_0F4A_P_2_LEN_1 */
12114 { "kaddb", { MaskG
, MaskVex
, MaskR
}, 0 },
12117 /* MOD_VEX_W_1_0F4A_P_2_LEN_1 */
12119 { "kaddd", { MaskG
, MaskVex
, MaskR
}, 0 },
12122 /* MOD_VEX_W_0_0F4B_P_0_LEN_1 */
12124 { "kunpckwd", { MaskG
, MaskVex
, MaskR
}, 0 },
12127 /* MOD_VEX_W_1_0F4B_P_0_LEN_1 */
12129 { "kunpckdq", { MaskG
, MaskVex
, MaskR
}, 0 },
12132 /* MOD_VEX_W_0_0F4B_P_2_LEN_1 */
12134 { "kunpckbw", { MaskG
, MaskVex
, MaskR
}, 0 },
12139 { VEX_W_TABLE (VEX_W_0F50_M_0
) },
12142 /* MOD_VEX_0F71_REG_2 */
12144 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2
) },
12147 /* MOD_VEX_0F71_REG_4 */
12149 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4
) },
12152 /* MOD_VEX_0F71_REG_6 */
12154 { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6
) },
12157 /* MOD_VEX_0F72_REG_2 */
12159 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2
) },
12162 /* MOD_VEX_0F72_REG_4 */
12164 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4
) },
12167 /* MOD_VEX_0F72_REG_6 */
12169 { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6
) },
12172 /* MOD_VEX_0F73_REG_2 */
12174 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2
) },
12177 /* MOD_VEX_0F73_REG_3 */
12179 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3
) },
12182 /* MOD_VEX_0F73_REG_6 */
12184 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6
) },
12187 /* MOD_VEX_0F73_REG_7 */
12189 { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7
) },
12192 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
12193 { "kmovw", { Ew
, MaskG
}, 0 },
12197 /* MOD_VEX_W_0_0F91_P_0_LEN_0 */
12198 { "kmovq", { Eq
, MaskG
}, 0 },
12202 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
12203 { "kmovb", { Eb
, MaskG
}, 0 },
12207 /* MOD_VEX_W_0_0F91_P_2_LEN_0 */
12208 { "kmovd", { Ed
, MaskG
}, 0 },
12212 /* MOD_VEX_W_0_0F92_P_0_LEN_0 */
12214 { "kmovw", { MaskG
, Rdq
}, 0 },
12217 /* MOD_VEX_W_0_0F92_P_2_LEN_0 */
12219 { "kmovb", { MaskG
, Rdq
}, 0 },
12222 /* MOD_VEX_W_0_0F92_P_3_LEN_0 */
12224 { "kmovd", { MaskG
, Rdq
}, 0 },
12227 /* MOD_VEX_W_1_0F92_P_3_LEN_0 */
12229 { "kmovq", { MaskG
, Rdq
}, 0 },
12232 /* MOD_VEX_W_0_0F93_P_0_LEN_0 */
12234 { "kmovw", { Gdq
, MaskR
}, 0 },
12237 /* MOD_VEX_W_0_0F93_P_2_LEN_0 */
12239 { "kmovb", { Gdq
, MaskR
}, 0 },
12242 /* MOD_VEX_W_0_0F93_P_3_LEN_0 */
12244 { "kmovd", { Gdq
, MaskR
}, 0 },
12247 /* MOD_VEX_W_1_0F93_P_3_LEN_0 */
12249 { "kmovq", { Gdq
, MaskR
}, 0 },
12252 /* MOD_VEX_W_0_0F98_P_0_LEN_0 */
12254 { "kortestw", { MaskG
, MaskR
}, 0 },
12257 /* MOD_VEX_W_1_0F98_P_0_LEN_0 */
12259 { "kortestq", { MaskG
, MaskR
}, 0 },
12262 /* MOD_VEX_W_0_0F98_P_2_LEN_0 */
12264 { "kortestb", { MaskG
, MaskR
}, 0 },
12267 /* MOD_VEX_W_1_0F98_P_2_LEN_0 */
12269 { "kortestd", { MaskG
, MaskR
}, 0 },
12272 /* MOD_VEX_W_0_0F99_P_0_LEN_0 */
12274 { "ktestw", { MaskG
, MaskR
}, 0 },
12277 /* MOD_VEX_W_1_0F99_P_0_LEN_0 */
12279 { "ktestq", { MaskG
, MaskR
}, 0 },
12282 /* MOD_VEX_W_0_0F99_P_2_LEN_0 */
12284 { "ktestb", { MaskG
, MaskR
}, 0 },
12287 /* MOD_VEX_W_1_0F99_P_2_LEN_0 */
12289 { "ktestd", { MaskG
, MaskR
}, 0 },
12292 /* MOD_VEX_0FAE_REG_2 */
12293 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0
) },
12296 /* MOD_VEX_0FAE_REG_3 */
12297 { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0
) },
12300 /* MOD_VEX_0FD7_PREFIX_2 */
12302 { VEX_W_TABLE (VEX_W_0FD7_P_2_M_1
) },
12305 /* MOD_VEX_0FE7_PREFIX_2 */
12306 { VEX_W_TABLE (VEX_W_0FE7_P_2_M_0
) },
12309 /* MOD_VEX_0FF0_PREFIX_3 */
12310 { VEX_W_TABLE (VEX_W_0FF0_P_3_M_0
) },
12313 /* MOD_VEX_0F381A_PREFIX_2 */
12314 { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0
) },
12317 /* MOD_VEX_0F382A_PREFIX_2 */
12318 { VEX_W_TABLE (VEX_W_0F382A_P_2_M_0
) },
12321 /* MOD_VEX_0F382C_PREFIX_2 */
12322 { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0
) },
12325 /* MOD_VEX_0F382D_PREFIX_2 */
12326 { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0
) },
12329 /* MOD_VEX_0F382E_PREFIX_2 */
12330 { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0
) },
12333 /* MOD_VEX_0F382F_PREFIX_2 */
12334 { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0
) },
12337 /* MOD_VEX_0F385A_PREFIX_2 */
12338 { VEX_LEN_TABLE (VEX_LEN_0F385A_P_2_M_0
) },
12341 /* MOD_VEX_0F388C_PREFIX_2 */
12342 { "vpmaskmov%LW", { XM
, Vex
, Mx
}, 0 },
12345 /* MOD_VEX_0F388E_PREFIX_2 */
12346 { "vpmaskmov%LW", { Mx
, Vex
, XM
}, 0 },
12349 /* MOD_VEX_W_0_0F3A30_P_2_LEN_0 */
12351 { "kshiftrb", { MaskG
, MaskR
, Ib
}, 0 },
12354 /* MOD_VEX_W_1_0F3A30_P_2_LEN_0 */
12356 { "kshiftrw", { MaskG
, MaskR
, Ib
}, 0 },
12359 /* MOD_VEX_W_0_0F3A31_P_2_LEN_0 */
12361 { "kshiftrd", { MaskG
, MaskR
, Ib
}, 0 },
12364 /* MOD_VEX_W_1_0F3A31_P_2_LEN_0 */
12366 { "kshiftrq", { MaskG
, MaskR
, Ib
}, 0 },
12369 /* MOD_VEX_W_0_0F3A32_P_2_LEN_0 */
12371 { "kshiftlb", { MaskG
, MaskR
, Ib
}, 0 },
12374 /* MOD_VEX_W_1_0F3A32_P_2_LEN_0 */
12376 { "kshiftlw", { MaskG
, MaskR
, Ib
}, 0 },
12379 /* MOD_VEX_W_0_0F3A33_P_2_LEN_0 */
12381 { "kshiftld", { MaskG
, MaskR
, Ib
}, 0 },
12384 /* MOD_VEX_W_1_0F3A33_P_2_LEN_0 */
12386 { "kshiftlq", { MaskG
, MaskR
, Ib
}, 0 },
12388 #define NEED_MOD_TABLE
12389 #include "i386-dis-evex.h"
12390 #undef NEED_MOD_TABLE
12393 static const struct dis386 rm_table
[][8] = {
12396 { "xabort", { Skip_MODRM
, Ib
}, 0 },
12400 { "xbeginT", { Skip_MODRM
, Jv
}, 0 },
12403 /* RM_0F01_REG_0 */
12405 { "vmcall", { Skip_MODRM
}, 0 },
12406 { "vmlaunch", { Skip_MODRM
}, 0 },
12407 { "vmresume", { Skip_MODRM
}, 0 },
12408 { "vmxoff", { Skip_MODRM
}, 0 },
12411 /* RM_0F01_REG_1 */
12412 { "monitor", { { OP_Monitor
, 0 } }, 0 },
12413 { "mwait", { { OP_Mwait
, 0 } }, 0 },
12414 { "clac", { Skip_MODRM
}, 0 },
12415 { "stac", { Skip_MODRM
}, 0 },
12419 { "encls", { Skip_MODRM
}, 0 },
12422 /* RM_0F01_REG_2 */
12423 { "xgetbv", { Skip_MODRM
}, 0 },
12424 { "xsetbv", { Skip_MODRM
}, 0 },
12427 { "vmfunc", { Skip_MODRM
}, 0 },
12428 { "xend", { Skip_MODRM
}, 0 },
12429 { "xtest", { Skip_MODRM
}, 0 },
12430 { "enclu", { Skip_MODRM
}, 0 },
12433 /* RM_0F01_REG_3 */
12434 { "vmrun", { Skip_MODRM
}, 0 },
12435 { "vmmcall", { Skip_MODRM
}, 0 },
12436 { "vmload", { Skip_MODRM
}, 0 },
12437 { "vmsave", { Skip_MODRM
}, 0 },
12438 { "stgi", { Skip_MODRM
}, 0 },
12439 { "clgi", { Skip_MODRM
}, 0 },
12440 { "skinit", { Skip_MODRM
}, 0 },
12441 { "invlpga", { Skip_MODRM
}, 0 },
12444 /* RM_0F01_REG_5 */
12451 { "rdpkru", { Skip_MODRM
}, 0 },
12452 { "wrpkru", { Skip_MODRM
}, 0 },
12455 /* RM_0F01_REG_7 */
12456 { "swapgs", { Skip_MODRM
}, 0 },
12457 { "rdtscp", { Skip_MODRM
}, 0 },
12458 { "monitorx", { { OP_Monitor
, 0 } }, 0 },
12459 { "mwaitx", { { OP_Mwaitx
, 0 } }, 0 },
12460 { "clzero", { Skip_MODRM
}, 0 },
12463 /* RM_0FAE_REG_5 */
12464 { "lfence", { Skip_MODRM
}, 0 },
12467 /* RM_0FAE_REG_6 */
12468 { "mfence", { Skip_MODRM
}, 0 },
12471 /* RM_0FAE_REG_7 */
12472 { PREFIX_TABLE (PREFIX_RM_0_0FAE_REG_7
) },
12476 #define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
12478 /* We use the high bit to indicate different name for the same
12480 #define REP_PREFIX (0xf3 | 0x100)
12481 #define XACQUIRE_PREFIX (0xf2 | 0x200)
12482 #define XRELEASE_PREFIX (0xf3 | 0x400)
12483 #define BND_PREFIX (0xf2 | 0x400)
12488 int newrex
, i
, length
;
12494 last_lock_prefix
= -1;
12495 last_repz_prefix
= -1;
12496 last_repnz_prefix
= -1;
12497 last_data_prefix
= -1;
12498 last_addr_prefix
= -1;
12499 last_rex_prefix
= -1;
12500 last_seg_prefix
= -1;
12502 active_seg_prefix
= 0;
12503 for (i
= 0; i
< (int) ARRAY_SIZE (all_prefixes
); i
++)
12504 all_prefixes
[i
] = 0;
12507 /* The maximum instruction length is 15bytes. */
12508 while (length
< MAX_CODE_LENGTH
- 1)
12510 FETCH_DATA (the_info
, codep
+ 1);
12514 /* REX prefixes family. */
12531 if (address_mode
== mode_64bit
)
12535 last_rex_prefix
= i
;
12538 prefixes
|= PREFIX_REPZ
;
12539 last_repz_prefix
= i
;
12542 prefixes
|= PREFIX_REPNZ
;
12543 last_repnz_prefix
= i
;
12546 prefixes
|= PREFIX_LOCK
;
12547 last_lock_prefix
= i
;
12550 prefixes
|= PREFIX_CS
;
12551 last_seg_prefix
= i
;
12552 active_seg_prefix
= PREFIX_CS
;
12555 prefixes
|= PREFIX_SS
;
12556 last_seg_prefix
= i
;
12557 active_seg_prefix
= PREFIX_SS
;
12560 prefixes
|= PREFIX_DS
;
12561 last_seg_prefix
= i
;
12562 active_seg_prefix
= PREFIX_DS
;
12565 prefixes
|= PREFIX_ES
;
12566 last_seg_prefix
= i
;
12567 active_seg_prefix
= PREFIX_ES
;
12570 prefixes
|= PREFIX_FS
;
12571 last_seg_prefix
= i
;
12572 active_seg_prefix
= PREFIX_FS
;
12575 prefixes
|= PREFIX_GS
;
12576 last_seg_prefix
= i
;
12577 active_seg_prefix
= PREFIX_GS
;
12580 prefixes
|= PREFIX_DATA
;
12581 last_data_prefix
= i
;
12584 prefixes
|= PREFIX_ADDR
;
12585 last_addr_prefix
= i
;
12588 /* fwait is really an instruction. If there are prefixes
12589 before the fwait, they belong to the fwait, *not* to the
12590 following instruction. */
12592 if (prefixes
|| rex
)
12594 prefixes
|= PREFIX_FWAIT
;
12596 /* This ensures that the previous REX prefixes are noticed
12597 as unused prefixes, as in the return case below. */
12601 prefixes
= PREFIX_FWAIT
;
12606 /* Rex is ignored when followed by another prefix. */
12612 if (*codep
!= FWAIT_OPCODE
)
12613 all_prefixes
[i
++] = *codep
;
12621 /* Return the name of the prefix byte PREF, or NULL if PREF is not a
12624 static const char *
12625 prefix_name (int pref
, int sizeflag
)
12627 static const char *rexes
[16] =
12630 "rex.B", /* 0x41 */
12631 "rex.X", /* 0x42 */
12632 "rex.XB", /* 0x43 */
12633 "rex.R", /* 0x44 */
12634 "rex.RB", /* 0x45 */
12635 "rex.RX", /* 0x46 */
12636 "rex.RXB", /* 0x47 */
12637 "rex.W", /* 0x48 */
12638 "rex.WB", /* 0x49 */
12639 "rex.WX", /* 0x4a */
12640 "rex.WXB", /* 0x4b */
12641 "rex.WR", /* 0x4c */
12642 "rex.WRB", /* 0x4d */
12643 "rex.WRX", /* 0x4e */
12644 "rex.WRXB", /* 0x4f */
12649 /* REX prefixes family. */
12666 return rexes
[pref
- 0x40];
12686 return (sizeflag
& DFLAG
) ? "data16" : "data32";
12688 if (address_mode
== mode_64bit
)
12689 return (sizeflag
& AFLAG
) ? "addr32" : "addr64";
12691 return (sizeflag
& AFLAG
) ? "addr16" : "addr32";
12696 case XACQUIRE_PREFIX
:
12698 case XRELEASE_PREFIX
:
12707 static char op_out
[MAX_OPERANDS
][100];
12708 static int op_ad
, op_index
[MAX_OPERANDS
];
12709 static int two_source_ops
;
12710 static bfd_vma op_address
[MAX_OPERANDS
];
12711 static bfd_vma op_riprel
[MAX_OPERANDS
];
12712 static bfd_vma start_pc
;
12715 * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
12716 * (see topic "Redundant prefixes" in the "Differences from 8086"
12717 * section of the "Virtual 8086 Mode" chapter.)
12718 * 'pc' should be the address of this instruction, it will
12719 * be used to print the target address if this is a relative jump or call
12720 * The function returns the length of this instruction in bytes.
12723 static char intel_syntax
;
12724 static char intel_mnemonic
= !SYSV386_COMPAT
;
12725 static char open_char
;
12726 static char close_char
;
12727 static char separator_char
;
12728 static char scale_char
;
12736 static enum x86_64_isa isa64
;
12738 /* Here for backwards compatibility. When gdb stops using
12739 print_insn_i386_att and print_insn_i386_intel these functions can
12740 disappear, and print_insn_i386 be merged into print_insn. */
12742 print_insn_i386_att (bfd_vma pc
, disassemble_info
*info
)
12746 return print_insn (pc
, info
);
12750 print_insn_i386_intel (bfd_vma pc
, disassemble_info
*info
)
12754 return print_insn (pc
, info
);
12758 print_insn_i386 (bfd_vma pc
, disassemble_info
*info
)
12762 return print_insn (pc
, info
);
12766 print_i386_disassembler_options (FILE *stream
)
12768 fprintf (stream
, _("\n\
12769 The following i386/x86-64 specific disassembler options are supported for use\n\
12770 with the -M switch (multiple options should be separated by commas):\n"));
12772 fprintf (stream
, _(" x86-64 Disassemble in 64bit mode\n"));
12773 fprintf (stream
, _(" i386 Disassemble in 32bit mode\n"));
12774 fprintf (stream
, _(" i8086 Disassemble in 16bit mode\n"));
12775 fprintf (stream
, _(" att Display instruction in AT&T syntax\n"));
12776 fprintf (stream
, _(" intel Display instruction in Intel syntax\n"));
12777 fprintf (stream
, _(" att-mnemonic\n"
12778 " Display instruction in AT&T mnemonic\n"));
12779 fprintf (stream
, _(" intel-mnemonic\n"
12780 " Display instruction in Intel mnemonic\n"));
12781 fprintf (stream
, _(" addr64 Assume 64bit address size\n"));
12782 fprintf (stream
, _(" addr32 Assume 32bit address size\n"));
12783 fprintf (stream
, _(" addr16 Assume 16bit address size\n"));
12784 fprintf (stream
, _(" data32 Assume 32bit data size\n"));
12785 fprintf (stream
, _(" data16 Assume 16bit data size\n"));
12786 fprintf (stream
, _(" suffix Always display instruction suffix in AT&T syntax\n"));
12787 fprintf (stream
, _(" amd64 Display instruction in AMD64 ISA\n"));
12788 fprintf (stream
, _(" intel64 Display instruction in Intel64 ISA\n"));
12792 static const struct dis386 bad_opcode
= { "(bad)", { XX
}, 0 };
12794 /* Get a pointer to struct dis386 with a valid name. */
12796 static const struct dis386
*
12797 get_valid_dis386 (const struct dis386
*dp
, disassemble_info
*info
)
12799 int vindex
, vex_table_index
;
12801 if (dp
->name
!= NULL
)
12804 switch (dp
->op
[0].bytemode
)
12806 case USE_REG_TABLE
:
12807 dp
= ®_table
[dp
->op
[1].bytemode
][modrm
.reg
];
12810 case USE_MOD_TABLE
:
12811 vindex
= modrm
.mod
== 0x3 ? 1 : 0;
12812 dp
= &mod_table
[dp
->op
[1].bytemode
][vindex
];
12816 dp
= &rm_table
[dp
->op
[1].bytemode
][modrm
.rm
];
12819 case USE_PREFIX_TABLE
:
12822 /* The prefix in VEX is implicit. */
12823 switch (vex
.prefix
)
12828 case REPE_PREFIX_OPCODE
:
12831 case DATA_PREFIX_OPCODE
:
12834 case REPNE_PREFIX_OPCODE
:
12844 int last_prefix
= -1;
12847 /* We check PREFIX_REPNZ and PREFIX_REPZ before PREFIX_DATA.
12848 When there are multiple PREFIX_REPNZ and PREFIX_REPZ, the
12850 if ((prefixes
& (PREFIX_REPZ
| PREFIX_REPNZ
)) != 0)
12852 if (last_repz_prefix
> last_repnz_prefix
)
12855 prefix
= PREFIX_REPZ
;
12856 last_prefix
= last_repz_prefix
;
12861 prefix
= PREFIX_REPNZ
;
12862 last_prefix
= last_repnz_prefix
;
12865 /* Check if prefix should be ignored. */
12866 if ((((prefix_table
[dp
->op
[1].bytemode
][vindex
].prefix_requirement
12867 & PREFIX_IGNORED
) >> PREFIX_IGNORED_SHIFT
)
12872 if (vindex
== 0 && (prefixes
& PREFIX_DATA
) != 0)
12875 prefix
= PREFIX_DATA
;
12876 last_prefix
= last_data_prefix
;
12881 used_prefixes
|= prefix
;
12882 all_prefixes
[last_prefix
] = 0;
12885 dp
= &prefix_table
[dp
->op
[1].bytemode
][vindex
];
12888 case USE_X86_64_TABLE
:
12889 vindex
= address_mode
== mode_64bit
? 1 : 0;
12890 dp
= &x86_64_table
[dp
->op
[1].bytemode
][vindex
];
12893 case USE_3BYTE_TABLE
:
12894 FETCH_DATA (info
, codep
+ 2);
12896 dp
= &three_byte_table
[dp
->op
[1].bytemode
][vindex
];
12898 modrm
.mod
= (*codep
>> 6) & 3;
12899 modrm
.reg
= (*codep
>> 3) & 7;
12900 modrm
.rm
= *codep
& 7;
12903 case USE_VEX_LEN_TABLE
:
12907 switch (vex
.length
)
12920 dp
= &vex_len_table
[dp
->op
[1].bytemode
][vindex
];
12923 case USE_XOP_8F_TABLE
:
12924 FETCH_DATA (info
, codep
+ 3);
12925 /* All bits in the REX prefix are ignored. */
12927 rex
= ~(*codep
>> 5) & 0x7;
12929 /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
12930 switch ((*codep
& 0x1f))
12936 vex_table_index
= XOP_08
;
12939 vex_table_index
= XOP_09
;
12942 vex_table_index
= XOP_0A
;
12946 vex
.w
= *codep
& 0x80;
12947 if (vex
.w
&& address_mode
== mode_64bit
)
12950 vex
.register_specifier
= (~(*codep
>> 3)) & 0xf;
12951 if (address_mode
!= mode_64bit
12952 && vex
.register_specifier
> 0x7)
12958 vex
.length
= (*codep
& 0x4) ? 256 : 128;
12959 switch ((*codep
& 0x3))
12965 vex
.prefix
= DATA_PREFIX_OPCODE
;
12968 vex
.prefix
= REPE_PREFIX_OPCODE
;
12971 vex
.prefix
= REPNE_PREFIX_OPCODE
;
12978 dp
= &xop_table
[vex_table_index
][vindex
];
12981 FETCH_DATA (info
, codep
+ 1);
12982 modrm
.mod
= (*codep
>> 6) & 3;
12983 modrm
.reg
= (*codep
>> 3) & 7;
12984 modrm
.rm
= *codep
& 7;
12987 case USE_VEX_C4_TABLE
:
12989 FETCH_DATA (info
, codep
+ 3);
12990 /* All bits in the REX prefix are ignored. */
12992 rex
= ~(*codep
>> 5) & 0x7;
12993 switch ((*codep
& 0x1f))
12999 vex_table_index
= VEX_0F
;
13002 vex_table_index
= VEX_0F38
;
13005 vex_table_index
= VEX_0F3A
;
13009 vex
.w
= *codep
& 0x80;
13010 if (vex
.w
&& address_mode
== mode_64bit
)
13013 vex
.register_specifier
= (~(*codep
>> 3)) & 0xf;
13014 if (address_mode
!= mode_64bit
13015 && vex
.register_specifier
> 0x7)
13021 vex
.length
= (*codep
& 0x4) ? 256 : 128;
13022 switch ((*codep
& 0x3))
13028 vex
.prefix
= DATA_PREFIX_OPCODE
;
13031 vex
.prefix
= REPE_PREFIX_OPCODE
;
13034 vex
.prefix
= REPNE_PREFIX_OPCODE
;
13041 dp
= &vex_table
[vex_table_index
][vindex
];
13043 /* There is no MODRM byte for VEX [82|77]. */
13044 if (vindex
!= 0x77 && vindex
!= 0x82)
13046 FETCH_DATA (info
, codep
+ 1);
13047 modrm
.mod
= (*codep
>> 6) & 3;
13048 modrm
.reg
= (*codep
>> 3) & 7;
13049 modrm
.rm
= *codep
& 7;
13053 case USE_VEX_C5_TABLE
:
13055 FETCH_DATA (info
, codep
+ 2);
13056 /* All bits in the REX prefix are ignored. */
13058 rex
= (*codep
& 0x80) ? 0 : REX_R
;
13060 vex
.register_specifier
= (~(*codep
>> 3)) & 0xf;
13061 if (address_mode
!= mode_64bit
13062 && vex
.register_specifier
> 0x7)
13070 vex
.length
= (*codep
& 0x4) ? 256 : 128;
13071 switch ((*codep
& 0x3))
13077 vex
.prefix
= DATA_PREFIX_OPCODE
;
13080 vex
.prefix
= REPE_PREFIX_OPCODE
;
13083 vex
.prefix
= REPNE_PREFIX_OPCODE
;
13090 dp
= &vex_table
[dp
->op
[1].bytemode
][vindex
];
13092 /* There is no MODRM byte for VEX [82|77]. */
13093 if (vindex
!= 0x77 && vindex
!= 0x82)
13095 FETCH_DATA (info
, codep
+ 1);
13096 modrm
.mod
= (*codep
>> 6) & 3;
13097 modrm
.reg
= (*codep
>> 3) & 7;
13098 modrm
.rm
= *codep
& 7;
13102 case USE_VEX_W_TABLE
:
13106 dp
= &vex_w_table
[dp
->op
[1].bytemode
][vex
.w
? 1 : 0];
13109 case USE_EVEX_TABLE
:
13110 two_source_ops
= 0;
13113 FETCH_DATA (info
, codep
+ 4);
13114 /* All bits in the REX prefix are ignored. */
13116 /* The first byte after 0x62. */
13117 rex
= ~(*codep
>> 5) & 0x7;
13118 vex
.r
= *codep
& 0x10;
13119 switch ((*codep
& 0xf))
13122 return &bad_opcode
;
13124 vex_table_index
= EVEX_0F
;
13127 vex_table_index
= EVEX_0F38
;
13130 vex_table_index
= EVEX_0F3A
;
13134 /* The second byte after 0x62. */
13136 vex
.w
= *codep
& 0x80;
13137 if (vex
.w
&& address_mode
== mode_64bit
)
13140 vex
.register_specifier
= (~(*codep
>> 3)) & 0xf;
13141 if (address_mode
!= mode_64bit
)
13143 /* In 16/32-bit mode silently ignore following bits. */
13147 vex
.register_specifier
&= 0x7;
13151 if (!(*codep
& 0x4))
13152 return &bad_opcode
;
13154 switch ((*codep
& 0x3))
13160 vex
.prefix
= DATA_PREFIX_OPCODE
;
13163 vex
.prefix
= REPE_PREFIX_OPCODE
;
13166 vex
.prefix
= REPNE_PREFIX_OPCODE
;
13170 /* The third byte after 0x62. */
13173 /* Remember the static rounding bits. */
13174 vex
.ll
= (*codep
>> 5) & 3;
13175 vex
.b
= (*codep
& 0x10) != 0;
13177 vex
.v
= *codep
& 0x8;
13178 vex
.mask_register_specifier
= *codep
& 0x7;
13179 vex
.zeroing
= *codep
& 0x80;
13185 dp
= &evex_table
[vex_table_index
][vindex
];
13187 FETCH_DATA (info
, codep
+ 1);
13188 modrm
.mod
= (*codep
>> 6) & 3;
13189 modrm
.reg
= (*codep
>> 3) & 7;
13190 modrm
.rm
= *codep
& 7;
13192 /* Set vector length. */
13193 if (modrm
.mod
== 3 && vex
.b
)
13209 return &bad_opcode
;
13222 if (dp
->name
!= NULL
)
13225 return get_valid_dis386 (dp
, info
);
13229 get_sib (disassemble_info
*info
, int sizeflag
)
13231 /* If modrm.mod == 3, operand must be register. */
13233 && ((sizeflag
& AFLAG
) || address_mode
== mode_64bit
)
13237 FETCH_DATA (info
, codep
+ 2);
13238 sib
.index
= (codep
[1] >> 3) & 7;
13239 sib
.scale
= (codep
[1] >> 6) & 3;
13240 sib
.base
= codep
[1] & 7;
13245 print_insn (bfd_vma pc
, disassemble_info
*info
)
13247 const struct dis386
*dp
;
13249 char *op_txt
[MAX_OPERANDS
];
13251 int sizeflag
, orig_sizeflag
;
13253 struct dis_private priv
;
13256 priv
.orig_sizeflag
= AFLAG
| DFLAG
;
13257 if ((info
->mach
& bfd_mach_i386_i386
) != 0)
13258 address_mode
= mode_32bit
;
13259 else if (info
->mach
== bfd_mach_i386_i8086
)
13261 address_mode
= mode_16bit
;
13262 priv
.orig_sizeflag
= 0;
13265 address_mode
= mode_64bit
;
13267 if (intel_syntax
== (char) -1)
13268 intel_syntax
= (info
->mach
& bfd_mach_i386_intel_syntax
) != 0;
13270 for (p
= info
->disassembler_options
; p
!= NULL
; )
13272 if (CONST_STRNEQ (p
, "amd64"))
13274 else if (CONST_STRNEQ (p
, "intel64"))
13276 else if (CONST_STRNEQ (p
, "x86-64"))
13278 address_mode
= mode_64bit
;
13279 priv
.orig_sizeflag
= AFLAG
| DFLAG
;
13281 else if (CONST_STRNEQ (p
, "i386"))
13283 address_mode
= mode_32bit
;
13284 priv
.orig_sizeflag
= AFLAG
| DFLAG
;
13286 else if (CONST_STRNEQ (p
, "i8086"))
13288 address_mode
= mode_16bit
;
13289 priv
.orig_sizeflag
= 0;
13291 else if (CONST_STRNEQ (p
, "intel"))
13294 if (CONST_STRNEQ (p
+ 5, "-mnemonic"))
13295 intel_mnemonic
= 1;
13297 else if (CONST_STRNEQ (p
, "att"))
13300 if (CONST_STRNEQ (p
+ 3, "-mnemonic"))
13301 intel_mnemonic
= 0;
13303 else if (CONST_STRNEQ (p
, "addr"))
13305 if (address_mode
== mode_64bit
)
13307 if (p
[4] == '3' && p
[5] == '2')
13308 priv
.orig_sizeflag
&= ~AFLAG
;
13309 else if (p
[4] == '6' && p
[5] == '4')
13310 priv
.orig_sizeflag
|= AFLAG
;
13314 if (p
[4] == '1' && p
[5] == '6')
13315 priv
.orig_sizeflag
&= ~AFLAG
;
13316 else if (p
[4] == '3' && p
[5] == '2')
13317 priv
.orig_sizeflag
|= AFLAG
;
13320 else if (CONST_STRNEQ (p
, "data"))
13322 if (p
[4] == '1' && p
[5] == '6')
13323 priv
.orig_sizeflag
&= ~DFLAG
;
13324 else if (p
[4] == '3' && p
[5] == '2')
13325 priv
.orig_sizeflag
|= DFLAG
;
13327 else if (CONST_STRNEQ (p
, "suffix"))
13328 priv
.orig_sizeflag
|= SUFFIX_ALWAYS
;
13330 p
= strchr (p
, ',');
13335 if (address_mode
== mode_64bit
&& sizeof (bfd_vma
) < 8)
13337 (*info
->fprintf_func
) (info
->stream
,
13338 _("64-bit address is disabled"));
13344 names64
= intel_names64
;
13345 names32
= intel_names32
;
13346 names16
= intel_names16
;
13347 names8
= intel_names8
;
13348 names8rex
= intel_names8rex
;
13349 names_seg
= intel_names_seg
;
13350 names_mm
= intel_names_mm
;
13351 names_bnd
= intel_names_bnd
;
13352 names_xmm
= intel_names_xmm
;
13353 names_ymm
= intel_names_ymm
;
13354 names_zmm
= intel_names_zmm
;
13355 index64
= intel_index64
;
13356 index32
= intel_index32
;
13357 names_mask
= intel_names_mask
;
13358 index16
= intel_index16
;
13361 separator_char
= '+';
13366 names64
= att_names64
;
13367 names32
= att_names32
;
13368 names16
= att_names16
;
13369 names8
= att_names8
;
13370 names8rex
= att_names8rex
;
13371 names_seg
= att_names_seg
;
13372 names_mm
= att_names_mm
;
13373 names_bnd
= att_names_bnd
;
13374 names_xmm
= att_names_xmm
;
13375 names_ymm
= att_names_ymm
;
13376 names_zmm
= att_names_zmm
;
13377 index64
= att_index64
;
13378 index32
= att_index32
;
13379 names_mask
= att_names_mask
;
13380 index16
= att_index16
;
13383 separator_char
= ',';
13387 /* The output looks better if we put 7 bytes on a line, since that
13388 puts most long word instructions on a single line. Use 8 bytes
13390 if ((info
->mach
& bfd_mach_l1om
) != 0)
13391 info
->bytes_per_line
= 8;
13393 info
->bytes_per_line
= 7;
13395 info
->private_data
= &priv
;
13396 priv
.max_fetched
= priv
.the_buffer
;
13397 priv
.insn_start
= pc
;
13400 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
13408 start_codep
= priv
.the_buffer
;
13409 codep
= priv
.the_buffer
;
13411 if (OPCODES_SIGSETJMP (priv
.bailout
) != 0)
13415 /* Getting here means we tried for data but didn't get it. That
13416 means we have an incomplete instruction of some sort. Just
13417 print the first byte as a prefix or a .byte pseudo-op. */
13418 if (codep
> priv
.the_buffer
)
13420 name
= prefix_name (priv
.the_buffer
[0], priv
.orig_sizeflag
);
13422 (*info
->fprintf_func
) (info
->stream
, "%s", name
);
13425 /* Just print the first byte as a .byte instruction. */
13426 (*info
->fprintf_func
) (info
->stream
, ".byte 0x%x",
13427 (unsigned int) priv
.the_buffer
[0]);
13437 sizeflag
= priv
.orig_sizeflag
;
13439 if (!ckprefix () || rex_used
)
13441 /* Too many prefixes or unused REX prefixes. */
13443 i
< (int) ARRAY_SIZE (all_prefixes
) && all_prefixes
[i
];
13445 (*info
->fprintf_func
) (info
->stream
, "%s%s",
13447 prefix_name (all_prefixes
[i
], sizeflag
));
13451 insn_codep
= codep
;
13453 FETCH_DATA (info
, codep
+ 1);
13454 two_source_ops
= (*codep
== 0x62) || (*codep
== 0xc8);
13456 if (((prefixes
& PREFIX_FWAIT
)
13457 && ((*codep
< 0xd8) || (*codep
> 0xdf))))
13459 /* Handle prefixes before fwait. */
13460 for (i
= 0; i
< fwait_prefix
&& all_prefixes
[i
];
13462 (*info
->fprintf_func
) (info
->stream
, "%s ",
13463 prefix_name (all_prefixes
[i
], sizeflag
));
13464 (*info
->fprintf_func
) (info
->stream
, "fwait");
13468 if (*codep
== 0x0f)
13470 unsigned char threebyte
;
13473 FETCH_DATA (info
, codep
+ 1);
13474 threebyte
= *codep
;
13475 dp
= &dis386_twobyte
[threebyte
];
13476 need_modrm
= twobyte_has_modrm
[*codep
];
13481 dp
= &dis386
[*codep
];
13482 need_modrm
= onebyte_has_modrm
[*codep
];
13486 /* Save sizeflag for printing the extra prefixes later before updating
13487 it for mnemonic and operand processing. The prefix names depend
13488 only on the address mode. */
13489 orig_sizeflag
= sizeflag
;
13490 if (prefixes
& PREFIX_ADDR
)
13492 if ((prefixes
& PREFIX_DATA
))
13498 FETCH_DATA (info
, codep
+ 1);
13499 modrm
.mod
= (*codep
>> 6) & 3;
13500 modrm
.reg
= (*codep
>> 3) & 7;
13501 modrm
.rm
= *codep
& 7;
13509 if (dp
->name
== NULL
&& dp
->op
[0].bytemode
== FLOATCODE
)
13511 get_sib (info
, sizeflag
);
13512 dofloat (sizeflag
);
13516 dp
= get_valid_dis386 (dp
, info
);
13517 if (dp
!= NULL
&& putop (dp
->name
, sizeflag
) == 0)
13519 get_sib (info
, sizeflag
);
13520 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
13523 op_ad
= MAX_OPERANDS
- 1 - i
;
13525 (*dp
->op
[i
].rtn
) (dp
->op
[i
].bytemode
, sizeflag
);
13526 /* For EVEX instruction after the last operand masking
13527 should be printed. */
13528 if (i
== 0 && vex
.evex
)
13530 /* Don't print {%k0}. */
13531 if (vex
.mask_register_specifier
)
13534 oappend (names_mask
[vex
.mask_register_specifier
]);
13544 /* Check if the REX prefix is used. */
13545 if (rex_ignored
== 0 && (rex
^ rex_used
) == 0 && last_rex_prefix
>= 0)
13546 all_prefixes
[last_rex_prefix
] = 0;
13548 /* Check if the SEG prefix is used. */
13549 if ((prefixes
& (PREFIX_CS
| PREFIX_SS
| PREFIX_DS
| PREFIX_ES
13550 | PREFIX_FS
| PREFIX_GS
)) != 0
13551 && (used_prefixes
& active_seg_prefix
) != 0)
13552 all_prefixes
[last_seg_prefix
] = 0;
13554 /* Check if the ADDR prefix is used. */
13555 if ((prefixes
& PREFIX_ADDR
) != 0
13556 && (used_prefixes
& PREFIX_ADDR
) != 0)
13557 all_prefixes
[last_addr_prefix
] = 0;
13559 /* Check if the DATA prefix is used. */
13560 if ((prefixes
& PREFIX_DATA
) != 0
13561 && (used_prefixes
& PREFIX_DATA
) != 0)
13562 all_prefixes
[last_data_prefix
] = 0;
13564 /* Print the extra prefixes. */
13566 for (i
= 0; i
< (int) ARRAY_SIZE (all_prefixes
); i
++)
13567 if (all_prefixes
[i
])
13570 name
= prefix_name (all_prefixes
[i
], orig_sizeflag
);
13573 prefix_length
+= strlen (name
) + 1;
13574 (*info
->fprintf_func
) (info
->stream
, "%s ", name
);
13577 /* If the mandatory PREFIX_REPZ/PREFIX_REPNZ/PREFIX_DATA prefix is
13578 unused, opcode is invalid. Since the PREFIX_DATA prefix may be
13579 used by putop and MMX/SSE operand and may be overriden by the
13580 PREFIX_REPZ/PREFIX_REPNZ fix, we check the PREFIX_DATA prefix
13582 if (dp
->prefix_requirement
== PREFIX_OPCODE
13583 && dp
!= &bad_opcode
13585 & (PREFIX_REPZ
| PREFIX_REPNZ
)) != 0
13587 & (PREFIX_REPZ
| PREFIX_REPNZ
)) == 0)
13589 & (PREFIX_REPZ
| PREFIX_REPNZ
| PREFIX_DATA
))
13591 && (used_prefixes
& PREFIX_DATA
) == 0))))
13593 (*info
->fprintf_func
) (info
->stream
, "(bad)");
13594 return end_codep
- priv
.the_buffer
;
13597 /* Check maximum code length. */
13598 if ((codep
- start_codep
) > MAX_CODE_LENGTH
)
13600 (*info
->fprintf_func
) (info
->stream
, "(bad)");
13601 return MAX_CODE_LENGTH
;
13604 obufp
= mnemonicendp
;
13605 for (i
= strlen (obuf
) + prefix_length
; i
< 6; i
++)
13608 (*info
->fprintf_func
) (info
->stream
, "%s", obuf
);
13610 /* The enter and bound instructions are printed with operands in the same
13611 order as the intel book; everything else is printed in reverse order. */
13612 if (intel_syntax
|| two_source_ops
)
13616 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
13617 op_txt
[i
] = op_out
[i
];
13619 if (intel_syntax
&& dp
&& dp
->op
[2].rtn
== OP_Rounding
13620 && dp
->op
[3].rtn
== OP_E
&& dp
->op
[4].rtn
== NULL
)
13622 op_txt
[2] = op_out
[3];
13623 op_txt
[3] = op_out
[2];
13626 for (i
= 0; i
< (MAX_OPERANDS
>> 1); ++i
)
13628 op_ad
= op_index
[i
];
13629 op_index
[i
] = op_index
[MAX_OPERANDS
- 1 - i
];
13630 op_index
[MAX_OPERANDS
- 1 - i
] = op_ad
;
13631 riprel
= op_riprel
[i
];
13632 op_riprel
[i
] = op_riprel
[MAX_OPERANDS
- 1 - i
];
13633 op_riprel
[MAX_OPERANDS
- 1 - i
] = riprel
;
13638 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
13639 op_txt
[MAX_OPERANDS
- 1 - i
] = op_out
[i
];
13643 for (i
= 0; i
< MAX_OPERANDS
; ++i
)
13647 (*info
->fprintf_func
) (info
->stream
, ",");
13648 if (op_index
[i
] != -1 && !op_riprel
[i
])
13649 (*info
->print_address_func
) ((bfd_vma
) op_address
[op_index
[i
]], info
);
13651 (*info
->fprintf_func
) (info
->stream
, "%s", op_txt
[i
]);
13655 for (i
= 0; i
< MAX_OPERANDS
; i
++)
13656 if (op_index
[i
] != -1 && op_riprel
[i
])
13658 (*info
->fprintf_func
) (info
->stream
, " # ");
13659 (*info
->print_address_func
) ((bfd_vma
) (start_pc
+ (codep
- start_codep
)
13660 + op_address
[op_index
[i
]]), info
);
13663 return codep
- priv
.the_buffer
;
13666 static const char *float_mem
[] = {
13741 static const unsigned char float_mem_mode
[] = {
13816 #define ST { OP_ST, 0 }
13817 #define STi { OP_STi, 0 }
13819 #define FGRPd9_2 NULL, { { NULL, 0 } }, 0
13820 #define FGRPd9_4 NULL, { { NULL, 1 } }, 0
13821 #define FGRPd9_5 NULL, { { NULL, 2 } }, 0
13822 #define FGRPd9_6 NULL, { { NULL, 3 } }, 0
13823 #define FGRPd9_7 NULL, { { NULL, 4 } }, 0
13824 #define FGRPda_5 NULL, { { NULL, 5 } }, 0
13825 #define FGRPdb_4 NULL, { { NULL, 6 } }, 0
13826 #define FGRPde_3 NULL, { { NULL, 7 } }, 0
13827 #define FGRPdf_4 NULL, { { NULL, 8 } }, 0
13829 static const struct dis386 float_reg
[][8] = {
13832 { "fadd", { ST
, STi
}, 0 },
13833 { "fmul", { ST
, STi
}, 0 },
13834 { "fcom", { STi
}, 0 },
13835 { "fcomp", { STi
}, 0 },
13836 { "fsub", { ST
, STi
}, 0 },
13837 { "fsubr", { ST
, STi
}, 0 },
13838 { "fdiv", { ST
, STi
}, 0 },
13839 { "fdivr", { ST
, STi
}, 0 },
13843 { "fld", { STi
}, 0 },
13844 { "fxch", { STi
}, 0 },
13854 { "fcmovb", { ST
, STi
}, 0 },
13855 { "fcmove", { ST
, STi
}, 0 },
13856 { "fcmovbe",{ ST
, STi
}, 0 },
13857 { "fcmovu", { ST
, STi
}, 0 },
13865 { "fcmovnb",{ ST
, STi
}, 0 },
13866 { "fcmovne",{ ST
, STi
}, 0 },
13867 { "fcmovnbe",{ ST
, STi
}, 0 },
13868 { "fcmovnu",{ ST
, STi
}, 0 },
13870 { "fucomi", { ST
, STi
}, 0 },
13871 { "fcomi", { ST
, STi
}, 0 },
13876 { "fadd", { STi
, ST
}, 0 },
13877 { "fmul", { STi
, ST
}, 0 },
13880 { "fsub!M", { STi
, ST
}, 0 },
13881 { "fsubM", { STi
, ST
}, 0 },
13882 { "fdiv!M", { STi
, ST
}, 0 },
13883 { "fdivM", { STi
, ST
}, 0 },
13887 { "ffree", { STi
}, 0 },
13889 { "fst", { STi
}, 0 },
13890 { "fstp", { STi
}, 0 },
13891 { "fucom", { STi
}, 0 },
13892 { "fucomp", { STi
}, 0 },
13898 { "faddp", { STi
, ST
}, 0 },
13899 { "fmulp", { STi
, ST
}, 0 },
13902 { "fsub!Mp", { STi
, ST
}, 0 },
13903 { "fsubMp", { STi
, ST
}, 0 },
13904 { "fdiv!Mp", { STi
, ST
}, 0 },
13905 { "fdivMp", { STi
, ST
}, 0 },
13909 { "ffreep", { STi
}, 0 },
13914 { "fucomip", { ST
, STi
}, 0 },
13915 { "fcomip", { ST
, STi
}, 0 },
13920 static char *fgrps
[][8] = {
13923 "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13928 "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
13933 "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
13938 "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
13943 "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
13948 "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13953 "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
13954 "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
13959 "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13964 "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
13969 swap_operand (void)
13971 mnemonicendp
[0] = '.';
13972 mnemonicendp
[1] = 's';
13977 OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED
,
13978 int sizeflag ATTRIBUTE_UNUSED
)
13980 /* Skip mod/rm byte. */
13986 dofloat (int sizeflag
)
13988 const struct dis386
*dp
;
13989 unsigned char floatop
;
13991 floatop
= codep
[-1];
13993 if (modrm
.mod
!= 3)
13995 int fp_indx
= (floatop
- 0xd8) * 8 + modrm
.reg
;
13997 putop (float_mem
[fp_indx
], sizeflag
);
14000 OP_E (float_mem_mode
[fp_indx
], sizeflag
);
14003 /* Skip mod/rm byte. */
14007 dp
= &float_reg
[floatop
- 0xd8][modrm
.reg
];
14008 if (dp
->name
== NULL
)
14010 putop (fgrps
[dp
->op
[0].bytemode
][modrm
.rm
], sizeflag
);
14012 /* Instruction fnstsw is only one with strange arg. */
14013 if (floatop
== 0xdf && codep
[-1] == 0xe0)
14014 strcpy (op_out
[0], names16
[0]);
14018 putop (dp
->name
, sizeflag
);
14023 (*dp
->op
[0].rtn
) (dp
->op
[0].bytemode
, sizeflag
);
14028 (*dp
->op
[1].rtn
) (dp
->op
[1].bytemode
, sizeflag
);
14032 /* Like oappend (below), but S is a string starting with '%'.
14033 In Intel syntax, the '%' is elided. */
14035 oappend_maybe_intel (const char *s
)
14037 oappend (s
+ intel_syntax
);
14041 OP_ST (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
14043 oappend_maybe_intel ("%st");
14047 OP_STi (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
14049 sprintf (scratchbuf
, "%%st(%d)", modrm
.rm
);
14050 oappend_maybe_intel (scratchbuf
);
14053 /* Capital letters in template are macros. */
14055 putop (const char *in_template
, int sizeflag
)
14060 unsigned int l
= 0, len
= 1;
14063 #define SAVE_LAST(c) \
14064 if (l < len && l < sizeof (last)) \
14069 for (p
= in_template
; *p
; p
++)
14086 while (*++p
!= '|')
14087 if (*p
== '}' || *p
== '\0')
14090 /* Fall through. */
14095 while (*++p
!= '}')
14106 if (modrm
.mod
!= 3 || (sizeflag
& SUFFIX_ALWAYS
))
14110 if (l
== 0 && len
== 1)
14115 if (sizeflag
& SUFFIX_ALWAYS
)
14128 if (address_mode
== mode_64bit
14129 && !(prefixes
& PREFIX_ADDR
))
14140 if (intel_syntax
&& !alt
)
14142 if ((prefixes
& PREFIX_DATA
) || (sizeflag
& SUFFIX_ALWAYS
))
14144 if (sizeflag
& DFLAG
)
14145 *obufp
++ = intel_syntax
? 'd' : 'l';
14147 *obufp
++ = intel_syntax
? 'w' : 's';
14148 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14152 if (intel_syntax
|| !(sizeflag
& SUFFIX_ALWAYS
))
14155 if (modrm
.mod
== 3)
14161 if (sizeflag
& DFLAG
)
14162 *obufp
++ = intel_syntax
? 'd' : 'l';
14165 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14171 case 'E': /* For jcxz/jecxz */
14172 if (address_mode
== mode_64bit
)
14174 if (sizeflag
& AFLAG
)
14180 if (sizeflag
& AFLAG
)
14182 used_prefixes
|= (prefixes
& PREFIX_ADDR
);
14187 if ((prefixes
& PREFIX_ADDR
) || (sizeflag
& SUFFIX_ALWAYS
))
14189 if (sizeflag
& AFLAG
)
14190 *obufp
++ = address_mode
== mode_64bit
? 'q' : 'l';
14192 *obufp
++ = address_mode
== mode_64bit
? 'l' : 'w';
14193 used_prefixes
|= (prefixes
& PREFIX_ADDR
);
14197 if (intel_syntax
|| (obufp
[-1] != 's' && !(sizeflag
& SUFFIX_ALWAYS
)))
14199 if ((rex
& REX_W
) || (sizeflag
& DFLAG
))
14203 if (!(rex
& REX_W
))
14204 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14209 if ((prefixes
& (PREFIX_CS
| PREFIX_DS
)) == PREFIX_CS
14210 || (prefixes
& (PREFIX_CS
| PREFIX_DS
)) == PREFIX_DS
)
14212 used_prefixes
|= prefixes
& (PREFIX_CS
| PREFIX_DS
);
14215 if (prefixes
& PREFIX_DS
)
14234 if (l
!= 0 || len
!= 1)
14236 if (l
!= 1 || len
!= 2 || last
[0] != 'X')
14241 if (!need_vex
|| !vex
.evex
)
14244 || ((modrm
.mod
== 3 || vex
.b
) && !(sizeflag
& SUFFIX_ALWAYS
)))
14246 switch (vex
.length
)
14264 if (address_mode
== mode_64bit
&& (sizeflag
& SUFFIX_ALWAYS
))
14269 /* Fall through. */
14272 if (l
!= 0 || len
!= 1)
14280 if (sizeflag
& SUFFIX_ALWAYS
)
14284 if (intel_mnemonic
!= cond
)
14288 if ((prefixes
& PREFIX_FWAIT
) == 0)
14291 used_prefixes
|= PREFIX_FWAIT
;
14297 else if (intel_syntax
&& (sizeflag
& DFLAG
))
14301 if (!(rex
& REX_W
))
14302 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14306 && address_mode
== mode_64bit
14307 && isa64
== intel64
)
14312 /* Fall through. */
14315 && address_mode
== mode_64bit
14316 && ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
14321 /* Fall through. */
14324 if (l
== 0 && len
== 1)
14329 if ((rex
& REX_W
) == 0
14330 && (prefixes
& PREFIX_DATA
))
14332 if ((sizeflag
& DFLAG
) == 0)
14334 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14338 if ((prefixes
& PREFIX_DATA
)
14340 || (sizeflag
& SUFFIX_ALWAYS
))
14347 if (sizeflag
& DFLAG
)
14351 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14357 if (l
!= 1 || len
!= 2 || last
[0] != 'L')
14363 if ((prefixes
& PREFIX_DATA
)
14365 || (sizeflag
& SUFFIX_ALWAYS
))
14372 if (sizeflag
& DFLAG
)
14373 *obufp
++ = intel_syntax
? 'd' : 'l';
14376 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14384 if (address_mode
== mode_64bit
14385 && ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
14387 if (modrm
.mod
!= 3 || (sizeflag
& SUFFIX_ALWAYS
))
14391 /* Fall through. */
14394 if (l
== 0 && len
== 1)
14397 if (intel_syntax
&& !alt
)
14400 if (modrm
.mod
!= 3 || (sizeflag
& SUFFIX_ALWAYS
))
14406 if (sizeflag
& DFLAG
)
14407 *obufp
++ = intel_syntax
? 'd' : 'l';
14410 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14416 if (l
!= 1 || len
!= 2 || last
[0] != 'L')
14422 || (modrm
.mod
== 3 && !(sizeflag
& SUFFIX_ALWAYS
)))
14437 else if (sizeflag
& DFLAG
)
14446 if (intel_syntax
&& !p
[1]
14447 && ((rex
& REX_W
) || (sizeflag
& DFLAG
)))
14449 if (!(rex
& REX_W
))
14450 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14453 if (l
== 0 && len
== 1)
14457 if (address_mode
== mode_64bit
14458 && ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
14460 if (sizeflag
& SUFFIX_ALWAYS
)
14482 /* Fall through. */
14485 if (l
== 0 && len
== 1)
14490 if (sizeflag
& SUFFIX_ALWAYS
)
14496 if (sizeflag
& DFLAG
)
14500 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14514 if (address_mode
== mode_64bit
14515 && !(prefixes
& PREFIX_ADDR
))
14526 if (l
!= 0 || len
!= 1)
14531 if (need_vex
&& vex
.prefix
)
14533 if (vex
.prefix
== DATA_PREFIX_OPCODE
)
14540 if (prefixes
& PREFIX_DATA
)
14544 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14548 if (l
== 0 && len
== 1)
14550 if (intel_syntax
|| !(sizeflag
& SUFFIX_ALWAYS
))
14561 if (l
!= 1 || len
!= 2 || last
[0] != 'X')
14569 || ((modrm
.mod
== 3 || vex
.b
) && !(sizeflag
& SUFFIX_ALWAYS
)))
14571 switch (vex
.length
)
14587 if (l
== 0 && len
== 1)
14589 /* operand size flag for cwtl, cbtw */
14598 else if (sizeflag
& DFLAG
)
14602 if (!(rex
& REX_W
))
14603 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14610 && last
[0] != 'L'))
14617 if (last
[0] == 'X')
14618 *obufp
++ = vex
.w
? 'd': 's';
14620 *obufp
++ = vex
.w
? 'q': 'd';
14626 if ((prefixes
& PREFIX_DATA
) || (sizeflag
& SUFFIX_ALWAYS
))
14628 if (sizeflag
& DFLAG
)
14632 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14638 if (address_mode
== mode_64bit
14639 && (isa64
== intel64
14640 || ((sizeflag
& DFLAG
) || (rex
& REX_W
))))
14642 else if ((prefixes
& PREFIX_DATA
))
14644 if (!(sizeflag
& DFLAG
))
14646 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14653 mnemonicendp
= obufp
;
14658 oappend (const char *s
)
14660 obufp
= stpcpy (obufp
, s
);
14666 /* Only print the active segment register. */
14667 if (!active_seg_prefix
)
14670 used_prefixes
|= active_seg_prefix
;
14671 switch (active_seg_prefix
)
14674 oappend_maybe_intel ("%cs:");
14677 oappend_maybe_intel ("%ds:");
14680 oappend_maybe_intel ("%ss:");
14683 oappend_maybe_intel ("%es:");
14686 oappend_maybe_intel ("%fs:");
14689 oappend_maybe_intel ("%gs:");
14697 OP_indirE (int bytemode
, int sizeflag
)
14701 OP_E (bytemode
, sizeflag
);
14705 print_operand_value (char *buf
, int hex
, bfd_vma disp
)
14707 if (address_mode
== mode_64bit
)
14715 sprintf_vma (tmp
, disp
);
14716 for (i
= 0; tmp
[i
] == '0' && tmp
[i
+ 1]; i
++);
14717 strcpy (buf
+ 2, tmp
+ i
);
14721 bfd_signed_vma v
= disp
;
14728 /* Check for possible overflow on 0x8000000000000000. */
14731 strcpy (buf
, "9223372036854775808");
14745 tmp
[28 - i
] = (v
% 10) + '0';
14749 strcpy (buf
, tmp
+ 29 - i
);
14755 sprintf (buf
, "0x%x", (unsigned int) disp
);
14757 sprintf (buf
, "%d", (int) disp
);
14761 /* Put DISP in BUF as signed hex number. */
14764 print_displacement (char *buf
, bfd_vma disp
)
14766 bfd_signed_vma val
= disp
;
14775 /* Check for possible overflow. */
14778 switch (address_mode
)
14781 strcpy (buf
+ j
, "0x8000000000000000");
14784 strcpy (buf
+ j
, "0x80000000");
14787 strcpy (buf
+ j
, "0x8000");
14797 sprintf_vma (tmp
, (bfd_vma
) val
);
14798 for (i
= 0; tmp
[i
] == '0'; i
++)
14800 if (tmp
[i
] == '\0')
14802 strcpy (buf
+ j
, tmp
+ i
);
14806 intel_operand_size (int bytemode
, int sizeflag
)
14810 && (bytemode
== x_mode
14811 || bytemode
== evex_half_bcst_xmmq_mode
))
14814 oappend ("QWORD PTR ");
14816 oappend ("DWORD PTR ");
14825 oappend ("BYTE PTR ");
14830 case dqw_swap_mode
:
14831 oappend ("WORD PTR ");
14834 if (address_mode
== mode_64bit
&& isa64
== intel64
)
14836 oappend ("QWORD PTR ");
14840 if (address_mode
== mode_64bit
&& ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
14842 oappend ("QWORD PTR ");
14851 oappend ("QWORD PTR ");
14854 if ((sizeflag
& DFLAG
) || bytemode
== dq_mode
)
14855 oappend ("DWORD PTR ");
14857 oappend ("WORD PTR ");
14858 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14862 if ((rex
& REX_W
) || (sizeflag
& DFLAG
))
14864 oappend ("WORD PTR ");
14865 if (!(rex
& REX_W
))
14866 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14869 if (sizeflag
& DFLAG
)
14870 oappend ("QWORD PTR ");
14872 oappend ("DWORD PTR ");
14873 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14876 case d_scalar_mode
:
14877 case d_scalar_swap_mode
:
14880 oappend ("DWORD PTR ");
14883 case q_scalar_mode
:
14884 case q_scalar_swap_mode
:
14886 oappend ("QWORD PTR ");
14889 if (address_mode
== mode_64bit
)
14890 oappend ("QWORD PTR ");
14892 oappend ("DWORD PTR ");
14895 if (sizeflag
& DFLAG
)
14896 oappend ("FWORD PTR ");
14898 oappend ("DWORD PTR ");
14899 used_prefixes
|= (prefixes
& PREFIX_DATA
);
14902 oappend ("TBYTE PTR ");
14906 case evex_x_gscat_mode
:
14907 case evex_x_nobcst_mode
:
14910 switch (vex
.length
)
14913 oappend ("XMMWORD PTR ");
14916 oappend ("YMMWORD PTR ");
14919 oappend ("ZMMWORD PTR ");
14926 oappend ("XMMWORD PTR ");
14929 oappend ("XMMWORD PTR ");
14932 oappend ("YMMWORD PTR ");
14935 case evex_half_bcst_xmmq_mode
:
14939 switch (vex
.length
)
14942 oappend ("QWORD PTR ");
14945 oappend ("XMMWORD PTR ");
14948 oappend ("YMMWORD PTR ");
14958 switch (vex
.length
)
14963 oappend ("BYTE PTR ");
14973 switch (vex
.length
)
14978 oappend ("WORD PTR ");
14988 switch (vex
.length
)
14993 oappend ("DWORD PTR ");
15003 switch (vex
.length
)
15008 oappend ("QWORD PTR ");
15018 switch (vex
.length
)
15021 oappend ("WORD PTR ");
15024 oappend ("DWORD PTR ");
15027 oappend ("QWORD PTR ");
15037 switch (vex
.length
)
15040 oappend ("DWORD PTR ");
15043 oappend ("QWORD PTR ");
15046 oappend ("XMMWORD PTR ");
15056 switch (vex
.length
)
15059 oappend ("QWORD PTR ");
15062 oappend ("YMMWORD PTR ");
15065 oappend ("ZMMWORD PTR ");
15075 switch (vex
.length
)
15079 oappend ("XMMWORD PTR ");
15086 oappend ("OWORD PTR ");
15089 case vex_w_dq_mode
:
15090 case vex_scalar_w_dq_mode
:
15095 oappend ("QWORD PTR ");
15097 oappend ("DWORD PTR ");
15099 case vex_vsib_d_w_dq_mode
:
15100 case vex_vsib_q_w_dq_mode
:
15107 oappend ("QWORD PTR ");
15109 oappend ("DWORD PTR ");
15113 switch (vex
.length
)
15116 oappend ("XMMWORD PTR ");
15119 oappend ("YMMWORD PTR ");
15122 oappend ("ZMMWORD PTR ");
15129 case vex_vsib_q_w_d_mode
:
15130 case vex_vsib_d_w_d_mode
:
15131 if (!need_vex
|| !vex
.evex
)
15134 switch (vex
.length
)
15137 oappend ("QWORD PTR ");
15140 oappend ("XMMWORD PTR ");
15143 oappend ("YMMWORD PTR ");
15151 if (!need_vex
|| vex
.length
!= 128)
15154 oappend ("DWORD PTR ");
15156 oappend ("BYTE PTR ");
15162 oappend ("QWORD PTR ");
15164 oappend ("WORD PTR ");
15173 OP_E_register (int bytemode
, int sizeflag
)
15175 int reg
= modrm
.rm
;
15176 const char **names
;
15182 if ((sizeflag
& SUFFIX_ALWAYS
)
15183 && (bytemode
== b_swap_mode
15184 || bytemode
== v_swap_mode
15185 || bytemode
== dqw_swap_mode
))
15211 names
= address_mode
== mode_64bit
? names64
: names32
;
15217 if (address_mode
== mode_64bit
&& isa64
== intel64
)
15223 if (address_mode
== mode_64bit
&& ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
15236 case dqw_swap_mode
:
15242 if ((sizeflag
& DFLAG
)
15243 || (bytemode
!= v_mode
15244 && bytemode
!= v_swap_mode
))
15248 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15253 names
= names_mask
;
15258 oappend (INTERNAL_DISASSEMBLER_ERROR
);
15261 oappend (names
[reg
]);
15265 OP_E_memory (int bytemode
, int sizeflag
)
15268 int add
= (rex
& REX_B
) ? 8 : 0;
15274 /* In EVEX, if operand doesn't allow broadcast, vex.b should be 0. */
15276 && bytemode
!= x_mode
15277 && bytemode
!= xmmq_mode
15278 && bytemode
!= evex_half_bcst_xmmq_mode
)
15287 case dqw_swap_mode
:
15294 case vex_vsib_d_w_dq_mode
:
15295 case vex_vsib_d_w_d_mode
:
15296 case vex_vsib_q_w_dq_mode
:
15297 case vex_vsib_q_w_d_mode
:
15298 case evex_x_gscat_mode
:
15300 shift
= vex
.w
? 3 : 2;
15303 case evex_half_bcst_xmmq_mode
:
15307 shift
= vex
.w
? 3 : 2;
15310 /* Fall through if vex.b == 0. */
15314 case evex_x_nobcst_mode
:
15316 switch (vex
.length
)
15339 case q_scalar_mode
:
15341 case q_scalar_swap_mode
:
15347 case d_scalar_mode
:
15349 case d_scalar_swap_mode
:
15361 /* Make necessary corrections to shift for modes that need it.
15362 For these modes we currently have shift 4, 5 or 6 depending on
15363 vex.length (it corresponds to xmmword, ymmword or zmmword
15364 operand). We might want to make it 3, 4 or 5 (e.g. for
15365 xmmq_mode). In case of broadcast enabled the corrections
15366 aren't needed, as element size is always 32 or 64 bits. */
15368 && (bytemode
== xmmq_mode
15369 || bytemode
== evex_half_bcst_xmmq_mode
))
15371 else if (bytemode
== xmmqd_mode
)
15373 else if (bytemode
== xmmdw_mode
)
15375 else if (bytemode
== ymmq_mode
&& vex
.length
== 128)
15383 intel_operand_size (bytemode
, sizeflag
);
15386 if ((sizeflag
& AFLAG
) || address_mode
== mode_64bit
)
15388 /* 32/64 bit address mode */
15397 int addr32flag
= !((sizeflag
& AFLAG
)
15398 || bytemode
== v_bnd_mode
15399 || bytemode
== bnd_mode
);
15400 const char **indexes64
= names64
;
15401 const char **indexes32
= names32
;
15411 vindex
= sib
.index
;
15417 case vex_vsib_d_w_dq_mode
:
15418 case vex_vsib_d_w_d_mode
:
15419 case vex_vsib_q_w_dq_mode
:
15420 case vex_vsib_q_w_d_mode
:
15430 switch (vex
.length
)
15433 indexes64
= indexes32
= names_xmm
;
15437 || bytemode
== vex_vsib_q_w_dq_mode
15438 || bytemode
== vex_vsib_q_w_d_mode
)
15439 indexes64
= indexes32
= names_ymm
;
15441 indexes64
= indexes32
= names_xmm
;
15445 || bytemode
== vex_vsib_q_w_dq_mode
15446 || bytemode
== vex_vsib_q_w_d_mode
)
15447 indexes64
= indexes32
= names_zmm
;
15449 indexes64
= indexes32
= names_ymm
;
15456 haveindex
= vindex
!= 4;
15463 rbase
= base
+ add
;
15471 if (address_mode
== mode_64bit
&& !havesib
)
15477 FETCH_DATA (the_info
, codep
+ 1);
15479 if ((disp
& 0x80) != 0)
15481 if (vex
.evex
&& shift
> 0)
15489 /* In 32bit mode, we need index register to tell [offset] from
15490 [eiz*1 + offset]. */
15491 needindex
= (havesib
15494 && address_mode
== mode_32bit
);
15495 havedisp
= (havebase
15497 || (havesib
&& (haveindex
|| scale
!= 0)));
15500 if (modrm
.mod
!= 0 || base
== 5)
15502 if (havedisp
|| riprel
)
15503 print_displacement (scratchbuf
, disp
);
15505 print_operand_value (scratchbuf
, 1, disp
);
15506 oappend (scratchbuf
);
15510 oappend (sizeflag
& AFLAG
? "(%rip)" : "(%eip)");
15514 if ((havebase
|| haveindex
|| riprel
)
15515 && (bytemode
!= v_bnd_mode
)
15516 && (bytemode
!= bnd_mode
))
15517 used_prefixes
|= PREFIX_ADDR
;
15519 if (havedisp
|| (intel_syntax
&& riprel
))
15521 *obufp
++ = open_char
;
15522 if (intel_syntax
&& riprel
)
15525 oappend (sizeflag
& AFLAG
? "rip" : "eip");
15529 oappend (address_mode
== mode_64bit
&& !addr32flag
15530 ? names64
[rbase
] : names32
[rbase
]);
15533 /* ESP/RSP won't allow index. If base isn't ESP/RSP,
15534 print index to tell base + index from base. */
15538 || (havebase
&& base
!= ESP_REG_NUM
))
15540 if (!intel_syntax
|| havebase
)
15542 *obufp
++ = separator_char
;
15546 oappend (address_mode
== mode_64bit
&& !addr32flag
15547 ? indexes64
[vindex
] : indexes32
[vindex
]);
15549 oappend (address_mode
== mode_64bit
&& !addr32flag
15550 ? index64
: index32
);
15552 *obufp
++ = scale_char
;
15554 sprintf (scratchbuf
, "%d", 1 << scale
);
15555 oappend (scratchbuf
);
15559 && (disp
|| modrm
.mod
!= 0 || base
== 5))
15561 if (!havedisp
|| (bfd_signed_vma
) disp
>= 0)
15566 else if (modrm
.mod
!= 1 && disp
!= -disp
)
15570 disp
= - (bfd_signed_vma
) disp
;
15574 print_displacement (scratchbuf
, disp
);
15576 print_operand_value (scratchbuf
, 1, disp
);
15577 oappend (scratchbuf
);
15580 *obufp
++ = close_char
;
15583 else if (intel_syntax
)
15585 if (modrm
.mod
!= 0 || base
== 5)
15587 if (!active_seg_prefix
)
15589 oappend (names_seg
[ds_reg
- es_reg
]);
15592 print_operand_value (scratchbuf
, 1, disp
);
15593 oappend (scratchbuf
);
15599 /* 16 bit address mode */
15600 used_prefixes
|= prefixes
& PREFIX_ADDR
;
15607 if ((disp
& 0x8000) != 0)
15612 FETCH_DATA (the_info
, codep
+ 1);
15614 if ((disp
& 0x80) != 0)
15619 if ((disp
& 0x8000) != 0)
15625 if (modrm
.mod
!= 0 || modrm
.rm
== 6)
15627 print_displacement (scratchbuf
, disp
);
15628 oappend (scratchbuf
);
15631 if (modrm
.mod
!= 0 || modrm
.rm
!= 6)
15633 *obufp
++ = open_char
;
15635 oappend (index16
[modrm
.rm
]);
15637 && (disp
|| modrm
.mod
!= 0 || modrm
.rm
== 6))
15639 if ((bfd_signed_vma
) disp
>= 0)
15644 else if (modrm
.mod
!= 1)
15648 disp
= - (bfd_signed_vma
) disp
;
15651 print_displacement (scratchbuf
, disp
);
15652 oappend (scratchbuf
);
15655 *obufp
++ = close_char
;
15658 else if (intel_syntax
)
15660 if (!active_seg_prefix
)
15662 oappend (names_seg
[ds_reg
- es_reg
]);
15665 print_operand_value (scratchbuf
, 1, disp
& 0xffff);
15666 oappend (scratchbuf
);
15669 if (vex
.evex
&& vex
.b
15670 && (bytemode
== x_mode
15671 || bytemode
== xmmq_mode
15672 || bytemode
== evex_half_bcst_xmmq_mode
))
15675 || bytemode
== xmmq_mode
15676 || bytemode
== evex_half_bcst_xmmq_mode
)
15678 switch (vex
.length
)
15681 oappend ("{1to2}");
15684 oappend ("{1to4}");
15687 oappend ("{1to8}");
15695 switch (vex
.length
)
15698 oappend ("{1to4}");
15701 oappend ("{1to8}");
15704 oappend ("{1to16}");
15714 OP_E (int bytemode
, int sizeflag
)
15716 /* Skip mod/rm byte. */
15720 if (modrm
.mod
== 3)
15721 OP_E_register (bytemode
, sizeflag
);
15723 OP_E_memory (bytemode
, sizeflag
);
15727 OP_G (int bytemode
, int sizeflag
)
15738 oappend (names8rex
[modrm
.reg
+ add
]);
15740 oappend (names8
[modrm
.reg
+ add
]);
15743 oappend (names16
[modrm
.reg
+ add
]);
15748 oappend (names32
[modrm
.reg
+ add
]);
15751 oappend (names64
[modrm
.reg
+ add
]);
15754 oappend (names_bnd
[modrm
.reg
]);
15761 case dqw_swap_mode
:
15764 oappend (names64
[modrm
.reg
+ add
]);
15767 if ((sizeflag
& DFLAG
) || bytemode
!= v_mode
)
15768 oappend (names32
[modrm
.reg
+ add
]);
15770 oappend (names16
[modrm
.reg
+ add
]);
15771 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15775 if (address_mode
== mode_64bit
)
15776 oappend (names64
[modrm
.reg
+ add
]);
15778 oappend (names32
[modrm
.reg
+ add
]);
15782 oappend (names_mask
[modrm
.reg
+ add
]);
15785 oappend (INTERNAL_DISASSEMBLER_ERROR
);
15798 FETCH_DATA (the_info
, codep
+ 8);
15799 a
= *codep
++ & 0xff;
15800 a
|= (*codep
++ & 0xff) << 8;
15801 a
|= (*codep
++ & 0xff) << 16;
15802 a
|= (*codep
++ & 0xffu
) << 24;
15803 b
= *codep
++ & 0xff;
15804 b
|= (*codep
++ & 0xff) << 8;
15805 b
|= (*codep
++ & 0xff) << 16;
15806 b
|= (*codep
++ & 0xffu
) << 24;
15807 x
= a
+ ((bfd_vma
) b
<< 32);
15815 static bfd_signed_vma
15818 bfd_signed_vma x
= 0;
15820 FETCH_DATA (the_info
, codep
+ 4);
15821 x
= *codep
++ & (bfd_signed_vma
) 0xff;
15822 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 8;
15823 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 16;
15824 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 24;
15828 static bfd_signed_vma
15831 bfd_signed_vma x
= 0;
15833 FETCH_DATA (the_info
, codep
+ 4);
15834 x
= *codep
++ & (bfd_signed_vma
) 0xff;
15835 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 8;
15836 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 16;
15837 x
|= (*codep
++ & (bfd_signed_vma
) 0xff) << 24;
15839 x
= (x
^ ((bfd_signed_vma
) 1 << 31)) - ((bfd_signed_vma
) 1 << 31);
15849 FETCH_DATA (the_info
, codep
+ 2);
15850 x
= *codep
++ & 0xff;
15851 x
|= (*codep
++ & 0xff) << 8;
15856 set_op (bfd_vma op
, int riprel
)
15858 op_index
[op_ad
] = op_ad
;
15859 if (address_mode
== mode_64bit
)
15861 op_address
[op_ad
] = op
;
15862 op_riprel
[op_ad
] = riprel
;
15866 /* Mask to get a 32-bit address. */
15867 op_address
[op_ad
] = op
& 0xffffffff;
15868 op_riprel
[op_ad
] = riprel
& 0xffffffff;
15873 OP_REG (int code
, int sizeflag
)
15880 case es_reg
: case ss_reg
: case cs_reg
:
15881 case ds_reg
: case fs_reg
: case gs_reg
:
15882 oappend (names_seg
[code
- es_reg
]);
15894 case ax_reg
: case cx_reg
: case dx_reg
: case bx_reg
:
15895 case sp_reg
: case bp_reg
: case si_reg
: case di_reg
:
15896 s
= names16
[code
- ax_reg
+ add
];
15898 case al_reg
: case ah_reg
: case cl_reg
: case ch_reg
:
15899 case dl_reg
: case dh_reg
: case bl_reg
: case bh_reg
:
15902 s
= names8rex
[code
- al_reg
+ add
];
15904 s
= names8
[code
- al_reg
];
15906 case rAX_reg
: case rCX_reg
: case rDX_reg
: case rBX_reg
:
15907 case rSP_reg
: case rBP_reg
: case rSI_reg
: case rDI_reg
:
15908 if (address_mode
== mode_64bit
15909 && ((sizeflag
& DFLAG
) || (rex
& REX_W
)))
15911 s
= names64
[code
- rAX_reg
+ add
];
15914 code
+= eAX_reg
- rAX_reg
;
15915 /* Fall through. */
15916 case eAX_reg
: case eCX_reg
: case eDX_reg
: case eBX_reg
:
15917 case eSP_reg
: case eBP_reg
: case eSI_reg
: case eDI_reg
:
15920 s
= names64
[code
- eAX_reg
+ add
];
15923 if (sizeflag
& DFLAG
)
15924 s
= names32
[code
- eAX_reg
+ add
];
15926 s
= names16
[code
- eAX_reg
+ add
];
15927 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15931 s
= INTERNAL_DISASSEMBLER_ERROR
;
15938 OP_IMREG (int code
, int sizeflag
)
15950 case ax_reg
: case cx_reg
: case dx_reg
: case bx_reg
:
15951 case sp_reg
: case bp_reg
: case si_reg
: case di_reg
:
15952 s
= names16
[code
- ax_reg
];
15954 case es_reg
: case ss_reg
: case cs_reg
:
15955 case ds_reg
: case fs_reg
: case gs_reg
:
15956 s
= names_seg
[code
- es_reg
];
15958 case al_reg
: case ah_reg
: case cl_reg
: case ch_reg
:
15959 case dl_reg
: case dh_reg
: case bl_reg
: case bh_reg
:
15962 s
= names8rex
[code
- al_reg
];
15964 s
= names8
[code
- al_reg
];
15966 case eAX_reg
: case eCX_reg
: case eDX_reg
: case eBX_reg
:
15967 case eSP_reg
: case eBP_reg
: case eSI_reg
: case eDI_reg
:
15970 s
= names64
[code
- eAX_reg
];
15973 if (sizeflag
& DFLAG
)
15974 s
= names32
[code
- eAX_reg
];
15976 s
= names16
[code
- eAX_reg
];
15977 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15980 case z_mode_ax_reg
:
15981 if ((rex
& REX_W
) || (sizeflag
& DFLAG
))
15985 if (!(rex
& REX_W
))
15986 used_prefixes
|= (prefixes
& PREFIX_DATA
);
15989 s
= INTERNAL_DISASSEMBLER_ERROR
;
15996 OP_I (int bytemode
, int sizeflag
)
15999 bfd_signed_vma mask
= -1;
16004 FETCH_DATA (the_info
, codep
+ 1);
16009 if (address_mode
== mode_64bit
)
16014 /* Fall through. */
16021 if (sizeflag
& DFLAG
)
16031 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16043 oappend (INTERNAL_DISASSEMBLER_ERROR
);
16048 scratchbuf
[0] = '$';
16049 print_operand_value (scratchbuf
+ 1, 1, op
);
16050 oappend_maybe_intel (scratchbuf
);
16051 scratchbuf
[0] = '\0';
16055 OP_I64 (int bytemode
, int sizeflag
)
16058 bfd_signed_vma mask
= -1;
16060 if (address_mode
!= mode_64bit
)
16062 OP_I (bytemode
, sizeflag
);
16069 FETCH_DATA (the_info
, codep
+ 1);
16079 if (sizeflag
& DFLAG
)
16089 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16097 oappend (INTERNAL_DISASSEMBLER_ERROR
);
16102 scratchbuf
[0] = '$';
16103 print_operand_value (scratchbuf
+ 1, 1, op
);
16104 oappend_maybe_intel (scratchbuf
);
16105 scratchbuf
[0] = '\0';
16109 OP_sI (int bytemode
, int sizeflag
)
16117 FETCH_DATA (the_info
, codep
+ 1);
16119 if ((op
& 0x80) != 0)
16121 if (bytemode
== b_T_mode
)
16123 if (address_mode
!= mode_64bit
16124 || !((sizeflag
& DFLAG
) || (rex
& REX_W
)))
16126 /* The operand-size prefix is overridden by a REX prefix. */
16127 if ((sizeflag
& DFLAG
) || (rex
& REX_W
))
16135 if (!(rex
& REX_W
))
16137 if (sizeflag
& DFLAG
)
16145 /* The operand-size prefix is overridden by a REX prefix. */
16146 if ((sizeflag
& DFLAG
) || (rex
& REX_W
))
16152 oappend (INTERNAL_DISASSEMBLER_ERROR
);
16156 scratchbuf
[0] = '$';
16157 print_operand_value (scratchbuf
+ 1, 1, op
);
16158 oappend_maybe_intel (scratchbuf
);
16162 OP_J (int bytemode
, int sizeflag
)
16166 bfd_vma segment
= 0;
16171 FETCH_DATA (the_info
, codep
+ 1);
16173 if ((disp
& 0x80) != 0)
16177 if (isa64
== amd64
)
16179 if ((sizeflag
& DFLAG
)
16180 || (address_mode
== mode_64bit
16181 && (isa64
!= amd64
|| (rex
& REX_W
))))
16186 if ((disp
& 0x8000) != 0)
16188 /* In 16bit mode, address is wrapped around at 64k within
16189 the same segment. Otherwise, a data16 prefix on a jump
16190 instruction means that the pc is masked to 16 bits after
16191 the displacement is added! */
16193 if ((prefixes
& PREFIX_DATA
) == 0)
16194 segment
= ((start_pc
+ (codep
- start_codep
))
16195 & ~((bfd_vma
) 0xffff));
16197 if (address_mode
!= mode_64bit
16198 || (isa64
== amd64
&& !(rex
& REX_W
)))
16199 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16202 oappend (INTERNAL_DISASSEMBLER_ERROR
);
16205 disp
= ((start_pc
+ (codep
- start_codep
) + disp
) & mask
) | segment
;
16207 print_operand_value (scratchbuf
, 1, disp
);
16208 oappend (scratchbuf
);
16212 OP_SEG (int bytemode
, int sizeflag
)
16214 if (bytemode
== w_mode
)
16215 oappend (names_seg
[modrm
.reg
]);
16217 OP_E (modrm
.mod
== 3 ? bytemode
: w_mode
, sizeflag
);
16221 OP_DIR (int dummy ATTRIBUTE_UNUSED
, int sizeflag
)
16225 if (sizeflag
& DFLAG
)
16235 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16237 sprintf (scratchbuf
, "0x%x:0x%x", seg
, offset
);
16239 sprintf (scratchbuf
, "$0x%x,$0x%x", seg
, offset
);
16240 oappend (scratchbuf
);
16244 OP_OFF (int bytemode
, int sizeflag
)
16248 if (intel_syntax
&& (sizeflag
& SUFFIX_ALWAYS
))
16249 intel_operand_size (bytemode
, sizeflag
);
16252 if ((sizeflag
& AFLAG
) || address_mode
== mode_64bit
)
16259 if (!active_seg_prefix
)
16261 oappend (names_seg
[ds_reg
- es_reg
]);
16265 print_operand_value (scratchbuf
, 1, off
);
16266 oappend (scratchbuf
);
16270 OP_OFF64 (int bytemode
, int sizeflag
)
16274 if (address_mode
!= mode_64bit
16275 || (prefixes
& PREFIX_ADDR
))
16277 OP_OFF (bytemode
, sizeflag
);
16281 if (intel_syntax
&& (sizeflag
& SUFFIX_ALWAYS
))
16282 intel_operand_size (bytemode
, sizeflag
);
16289 if (!active_seg_prefix
)
16291 oappend (names_seg
[ds_reg
- es_reg
]);
16295 print_operand_value (scratchbuf
, 1, off
);
16296 oappend (scratchbuf
);
16300 ptr_reg (int code
, int sizeflag
)
16304 *obufp
++ = open_char
;
16305 used_prefixes
|= (prefixes
& PREFIX_ADDR
);
16306 if (address_mode
== mode_64bit
)
16308 if (!(sizeflag
& AFLAG
))
16309 s
= names32
[code
- eAX_reg
];
16311 s
= names64
[code
- eAX_reg
];
16313 else if (sizeflag
& AFLAG
)
16314 s
= names32
[code
- eAX_reg
];
16316 s
= names16
[code
- eAX_reg
];
16318 *obufp
++ = close_char
;
16323 OP_ESreg (int code
, int sizeflag
)
16329 case 0x6d: /* insw/insl */
16330 intel_operand_size (z_mode
, sizeflag
);
16332 case 0xa5: /* movsw/movsl/movsq */
16333 case 0xa7: /* cmpsw/cmpsl/cmpsq */
16334 case 0xab: /* stosw/stosl */
16335 case 0xaf: /* scasw/scasl */
16336 intel_operand_size (v_mode
, sizeflag
);
16339 intel_operand_size (b_mode
, sizeflag
);
16342 oappend_maybe_intel ("%es:");
16343 ptr_reg (code
, sizeflag
);
16347 OP_DSreg (int code
, int sizeflag
)
16353 case 0x6f: /* outsw/outsl */
16354 intel_operand_size (z_mode
, sizeflag
);
16356 case 0xa5: /* movsw/movsl/movsq */
16357 case 0xa7: /* cmpsw/cmpsl/cmpsq */
16358 case 0xad: /* lodsw/lodsl/lodsq */
16359 intel_operand_size (v_mode
, sizeflag
);
16362 intel_operand_size (b_mode
, sizeflag
);
16365 /* Set active_seg_prefix to PREFIX_DS if it is unset so that the
16366 default segment register DS is printed. */
16367 if (!active_seg_prefix
)
16368 active_seg_prefix
= PREFIX_DS
;
16370 ptr_reg (code
, sizeflag
);
16374 OP_C (int dummy ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16382 else if (address_mode
!= mode_64bit
&& (prefixes
& PREFIX_LOCK
))
16384 all_prefixes
[last_lock_prefix
] = 0;
16385 used_prefixes
|= PREFIX_LOCK
;
16390 sprintf (scratchbuf
, "%%cr%d", modrm
.reg
+ add
);
16391 oappend_maybe_intel (scratchbuf
);
16395 OP_D (int dummy ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16404 sprintf (scratchbuf
, "db%d", modrm
.reg
+ add
);
16406 sprintf (scratchbuf
, "%%db%d", modrm
.reg
+ add
);
16407 oappend (scratchbuf
);
16411 OP_T (int dummy ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16413 sprintf (scratchbuf
, "%%tr%d", modrm
.reg
);
16414 oappend_maybe_intel (scratchbuf
);
16418 OP_R (int bytemode
, int sizeflag
)
16420 /* Skip mod/rm byte. */
16423 OP_E_register (bytemode
, sizeflag
);
16427 OP_MMX (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16429 int reg
= modrm
.reg
;
16430 const char **names
;
16432 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16433 if (prefixes
& PREFIX_DATA
)
16442 oappend (names
[reg
]);
16446 OP_XMM (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
16448 int reg
= modrm
.reg
;
16449 const char **names
;
16461 && bytemode
!= xmm_mode
16462 && bytemode
!= xmmq_mode
16463 && bytemode
!= evex_half_bcst_xmmq_mode
16464 && bytemode
!= ymm_mode
16465 && bytemode
!= scalar_mode
)
16467 switch (vex
.length
)
16474 || (bytemode
!= vex_vsib_q_w_dq_mode
16475 && bytemode
!= vex_vsib_q_w_d_mode
))
16487 else if (bytemode
== xmmq_mode
16488 || bytemode
== evex_half_bcst_xmmq_mode
)
16490 switch (vex
.length
)
16503 else if (bytemode
== ymm_mode
)
16507 oappend (names
[reg
]);
16511 OP_EM (int bytemode
, int sizeflag
)
16514 const char **names
;
16516 if (modrm
.mod
!= 3)
16519 && (bytemode
== v_mode
|| bytemode
== v_swap_mode
))
16521 bytemode
= (prefixes
& PREFIX_DATA
) ? x_mode
: q_mode
;
16522 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16524 OP_E (bytemode
, sizeflag
);
16528 if ((sizeflag
& SUFFIX_ALWAYS
) && bytemode
== v_swap_mode
)
16531 /* Skip mod/rm byte. */
16534 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16536 if (prefixes
& PREFIX_DATA
)
16545 oappend (names
[reg
]);
16548 /* cvt* are the only instructions in sse2 which have
16549 both SSE and MMX operands and also have 0x66 prefix
16550 in their opcode. 0x66 was originally used to differentiate
16551 between SSE and MMX instruction(operands). So we have to handle the
16552 cvt* separately using OP_EMC and OP_MXC */
16554 OP_EMC (int bytemode
, int sizeflag
)
16556 if (modrm
.mod
!= 3)
16558 if (intel_syntax
&& bytemode
== v_mode
)
16560 bytemode
= (prefixes
& PREFIX_DATA
) ? x_mode
: q_mode
;
16561 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16563 OP_E (bytemode
, sizeflag
);
16567 /* Skip mod/rm byte. */
16570 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16571 oappend (names_mm
[modrm
.rm
]);
16575 OP_MXC (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16577 used_prefixes
|= (prefixes
& PREFIX_DATA
);
16578 oappend (names_mm
[modrm
.reg
]);
16582 OP_EX (int bytemode
, int sizeflag
)
16585 const char **names
;
16587 /* Skip mod/rm byte. */
16591 if (modrm
.mod
!= 3)
16593 OP_E_memory (bytemode
, sizeflag
);
16608 if ((sizeflag
& SUFFIX_ALWAYS
)
16609 && (bytemode
== x_swap_mode
16610 || bytemode
== d_swap_mode
16611 || bytemode
== dqw_swap_mode
16612 || bytemode
== d_scalar_swap_mode
16613 || bytemode
== q_swap_mode
16614 || bytemode
== q_scalar_swap_mode
))
16618 && bytemode
!= xmm_mode
16619 && bytemode
!= xmmdw_mode
16620 && bytemode
!= xmmqd_mode
16621 && bytemode
!= xmm_mb_mode
16622 && bytemode
!= xmm_mw_mode
16623 && bytemode
!= xmm_md_mode
16624 && bytemode
!= xmm_mq_mode
16625 && bytemode
!= xmm_mdq_mode
16626 && bytemode
!= xmmq_mode
16627 && bytemode
!= evex_half_bcst_xmmq_mode
16628 && bytemode
!= ymm_mode
16629 && bytemode
!= d_scalar_mode
16630 && bytemode
!= d_scalar_swap_mode
16631 && bytemode
!= q_scalar_mode
16632 && bytemode
!= q_scalar_swap_mode
16633 && bytemode
!= vex_scalar_w_dq_mode
)
16635 switch (vex
.length
)
16650 else if (bytemode
== xmmq_mode
16651 || bytemode
== evex_half_bcst_xmmq_mode
)
16653 switch (vex
.length
)
16666 else if (bytemode
== ymm_mode
)
16670 oappend (names
[reg
]);
16674 OP_MS (int bytemode
, int sizeflag
)
16676 if (modrm
.mod
== 3)
16677 OP_EM (bytemode
, sizeflag
);
16683 OP_XS (int bytemode
, int sizeflag
)
16685 if (modrm
.mod
== 3)
16686 OP_EX (bytemode
, sizeflag
);
16692 OP_M (int bytemode
, int sizeflag
)
16694 if (modrm
.mod
== 3)
16695 /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
16698 OP_E (bytemode
, sizeflag
);
16702 OP_0f07 (int bytemode
, int sizeflag
)
16704 if (modrm
.mod
!= 3 || modrm
.rm
!= 0)
16707 OP_E (bytemode
, sizeflag
);
16710 /* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
16711 32bit mode and "xchg %rax,%rax" in 64bit mode. */
16714 NOP_Fixup1 (int bytemode
, int sizeflag
)
16716 if ((prefixes
& PREFIX_DATA
) != 0
16719 && address_mode
== mode_64bit
))
16720 OP_REG (bytemode
, sizeflag
);
16722 strcpy (obuf
, "nop");
16726 NOP_Fixup2 (int bytemode
, int sizeflag
)
16728 if ((prefixes
& PREFIX_DATA
) != 0
16731 && address_mode
== mode_64bit
))
16732 OP_IMREG (bytemode
, sizeflag
);
16735 static const char *const Suffix3DNow
[] = {
16736 /* 00 */ NULL
, NULL
, NULL
, NULL
,
16737 /* 04 */ NULL
, NULL
, NULL
, NULL
,
16738 /* 08 */ NULL
, NULL
, NULL
, NULL
,
16739 /* 0C */ "pi2fw", "pi2fd", NULL
, NULL
,
16740 /* 10 */ NULL
, NULL
, NULL
, NULL
,
16741 /* 14 */ NULL
, NULL
, NULL
, NULL
,
16742 /* 18 */ NULL
, NULL
, NULL
, NULL
,
16743 /* 1C */ "pf2iw", "pf2id", NULL
, NULL
,
16744 /* 20 */ NULL
, NULL
, NULL
, NULL
,
16745 /* 24 */ NULL
, NULL
, NULL
, NULL
,
16746 /* 28 */ NULL
, NULL
, NULL
, NULL
,
16747 /* 2C */ NULL
, NULL
, NULL
, NULL
,
16748 /* 30 */ NULL
, NULL
, NULL
, NULL
,
16749 /* 34 */ NULL
, NULL
, NULL
, NULL
,
16750 /* 38 */ NULL
, NULL
, NULL
, NULL
,
16751 /* 3C */ NULL
, NULL
, NULL
, NULL
,
16752 /* 40 */ NULL
, NULL
, NULL
, NULL
,
16753 /* 44 */ NULL
, NULL
, NULL
, NULL
,
16754 /* 48 */ NULL
, NULL
, NULL
, NULL
,
16755 /* 4C */ NULL
, NULL
, NULL
, NULL
,
16756 /* 50 */ NULL
, NULL
, NULL
, NULL
,
16757 /* 54 */ NULL
, NULL
, NULL
, NULL
,
16758 /* 58 */ NULL
, NULL
, NULL
, NULL
,
16759 /* 5C */ NULL
, NULL
, NULL
, NULL
,
16760 /* 60 */ NULL
, NULL
, NULL
, NULL
,
16761 /* 64 */ NULL
, NULL
, NULL
, NULL
,
16762 /* 68 */ NULL
, NULL
, NULL
, NULL
,
16763 /* 6C */ NULL
, NULL
, NULL
, NULL
,
16764 /* 70 */ NULL
, NULL
, NULL
, NULL
,
16765 /* 74 */ NULL
, NULL
, NULL
, NULL
,
16766 /* 78 */ NULL
, NULL
, NULL
, NULL
,
16767 /* 7C */ NULL
, NULL
, NULL
, NULL
,
16768 /* 80 */ NULL
, NULL
, NULL
, NULL
,
16769 /* 84 */ NULL
, NULL
, NULL
, NULL
,
16770 /* 88 */ NULL
, NULL
, "pfnacc", NULL
,
16771 /* 8C */ NULL
, NULL
, "pfpnacc", NULL
,
16772 /* 90 */ "pfcmpge", NULL
, NULL
, NULL
,
16773 /* 94 */ "pfmin", NULL
, "pfrcp", "pfrsqrt",
16774 /* 98 */ NULL
, NULL
, "pfsub", NULL
,
16775 /* 9C */ NULL
, NULL
, "pfadd", NULL
,
16776 /* A0 */ "pfcmpgt", NULL
, NULL
, NULL
,
16777 /* A4 */ "pfmax", NULL
, "pfrcpit1", "pfrsqit1",
16778 /* A8 */ NULL
, NULL
, "pfsubr", NULL
,
16779 /* AC */ NULL
, NULL
, "pfacc", NULL
,
16780 /* B0 */ "pfcmpeq", NULL
, NULL
, NULL
,
16781 /* B4 */ "pfmul", NULL
, "pfrcpit2", "pmulhrw",
16782 /* B8 */ NULL
, NULL
, NULL
, "pswapd",
16783 /* BC */ NULL
, NULL
, NULL
, "pavgusb",
16784 /* C0 */ NULL
, NULL
, NULL
, NULL
,
16785 /* C4 */ NULL
, NULL
, NULL
, NULL
,
16786 /* C8 */ NULL
, NULL
, NULL
, NULL
,
16787 /* CC */ NULL
, NULL
, NULL
, NULL
,
16788 /* D0 */ NULL
, NULL
, NULL
, NULL
,
16789 /* D4 */ NULL
, NULL
, NULL
, NULL
,
16790 /* D8 */ NULL
, NULL
, NULL
, NULL
,
16791 /* DC */ NULL
, NULL
, NULL
, NULL
,
16792 /* E0 */ NULL
, NULL
, NULL
, NULL
,
16793 /* E4 */ NULL
, NULL
, NULL
, NULL
,
16794 /* E8 */ NULL
, NULL
, NULL
, NULL
,
16795 /* EC */ NULL
, NULL
, NULL
, NULL
,
16796 /* F0 */ NULL
, NULL
, NULL
, NULL
,
16797 /* F4 */ NULL
, NULL
, NULL
, NULL
,
16798 /* F8 */ NULL
, NULL
, NULL
, NULL
,
16799 /* FC */ NULL
, NULL
, NULL
, NULL
,
16803 OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16805 const char *mnemonic
;
16807 FETCH_DATA (the_info
, codep
+ 1);
16808 /* AMD 3DNow! instructions are specified by an opcode suffix in the
16809 place where an 8-bit immediate would normally go. ie. the last
16810 byte of the instruction. */
16811 obufp
= mnemonicendp
;
16812 mnemonic
= Suffix3DNow
[*codep
++ & 0xff];
16814 oappend (mnemonic
);
16817 /* Since a variable sized modrm/sib chunk is between the start
16818 of the opcode (0x0f0f) and the opcode suffix, we need to do
16819 all the modrm processing first, and don't know until now that
16820 we have a bad opcode. This necessitates some cleaning up. */
16821 op_out
[0][0] = '\0';
16822 op_out
[1][0] = '\0';
16825 mnemonicendp
= obufp
;
16828 static struct op simd_cmp_op
[] =
16830 { STRING_COMMA_LEN ("eq") },
16831 { STRING_COMMA_LEN ("lt") },
16832 { STRING_COMMA_LEN ("le") },
16833 { STRING_COMMA_LEN ("unord") },
16834 { STRING_COMMA_LEN ("neq") },
16835 { STRING_COMMA_LEN ("nlt") },
16836 { STRING_COMMA_LEN ("nle") },
16837 { STRING_COMMA_LEN ("ord") }
16841 CMP_Fixup (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16843 unsigned int cmp_type
;
16845 FETCH_DATA (the_info
, codep
+ 1);
16846 cmp_type
= *codep
++ & 0xff;
16847 if (cmp_type
< ARRAY_SIZE (simd_cmp_op
))
16850 char *p
= mnemonicendp
- 2;
16854 sprintf (p
, "%s%s", simd_cmp_op
[cmp_type
].name
, suffix
);
16855 mnemonicendp
+= simd_cmp_op
[cmp_type
].len
;
16859 /* We have a reserved extension byte. Output it directly. */
16860 scratchbuf
[0] = '$';
16861 print_operand_value (scratchbuf
+ 1, 1, cmp_type
);
16862 oappend_maybe_intel (scratchbuf
);
16863 scratchbuf
[0] = '\0';
16868 OP_Mwaitx (int bytemode ATTRIBUTE_UNUSED
,
16869 int sizeflag ATTRIBUTE_UNUSED
)
16871 /* mwaitx %eax,%ecx,%ebx */
16874 const char **names
= (address_mode
== mode_64bit
16875 ? names64
: names32
);
16876 strcpy (op_out
[0], names
[0]);
16877 strcpy (op_out
[1], names
[1]);
16878 strcpy (op_out
[2], names
[3]);
16879 two_source_ops
= 1;
16881 /* Skip mod/rm byte. */
16887 OP_Mwait (int bytemode ATTRIBUTE_UNUSED
,
16888 int sizeflag ATTRIBUTE_UNUSED
)
16890 /* mwait %eax,%ecx */
16893 const char **names
= (address_mode
== mode_64bit
16894 ? names64
: names32
);
16895 strcpy (op_out
[0], names
[0]);
16896 strcpy (op_out
[1], names
[1]);
16897 two_source_ops
= 1;
16899 /* Skip mod/rm byte. */
16905 OP_Monitor (int bytemode ATTRIBUTE_UNUSED
,
16906 int sizeflag ATTRIBUTE_UNUSED
)
16908 /* monitor %eax,%ecx,%edx" */
16911 const char **op1_names
;
16912 const char **names
= (address_mode
== mode_64bit
16913 ? names64
: names32
);
16915 if (!(prefixes
& PREFIX_ADDR
))
16916 op1_names
= (address_mode
== mode_16bit
16917 ? names16
: names
);
16920 /* Remove "addr16/addr32". */
16921 all_prefixes
[last_addr_prefix
] = 0;
16922 op1_names
= (address_mode
!= mode_32bit
16923 ? names32
: names16
);
16924 used_prefixes
|= PREFIX_ADDR
;
16926 strcpy (op_out
[0], op1_names
[0]);
16927 strcpy (op_out
[1], names
[1]);
16928 strcpy (op_out
[2], names
[2]);
16929 two_source_ops
= 1;
16931 /* Skip mod/rm byte. */
16939 /* Throw away prefixes and 1st. opcode byte. */
16940 codep
= insn_codep
+ 1;
16945 REP_Fixup (int bytemode
, int sizeflag
)
16947 /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
16949 if (prefixes
& PREFIX_REPZ
)
16950 all_prefixes
[last_repz_prefix
] = REP_PREFIX
;
16957 OP_IMREG (bytemode
, sizeflag
);
16960 OP_ESreg (bytemode
, sizeflag
);
16963 OP_DSreg (bytemode
, sizeflag
);
16971 /* For BND-prefixed instructions 0xF2 prefix should be displayed as
16975 BND_Fixup (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
16977 if (prefixes
& PREFIX_REPNZ
)
16978 all_prefixes
[last_repnz_prefix
] = BND_PREFIX
;
16981 /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
16982 "xacquire"/"xrelease" for memory operand if there is a LOCK prefix.
16986 HLE_Fixup1 (int bytemode
, int sizeflag
)
16989 && (prefixes
& PREFIX_LOCK
) != 0)
16991 if (prefixes
& PREFIX_REPZ
)
16992 all_prefixes
[last_repz_prefix
] = XRELEASE_PREFIX
;
16993 if (prefixes
& PREFIX_REPNZ
)
16994 all_prefixes
[last_repnz_prefix
] = XACQUIRE_PREFIX
;
16997 OP_E (bytemode
, sizeflag
);
17000 /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
17001 "xacquire"/"xrelease" for memory operand. No check for LOCK prefix.
17005 HLE_Fixup2 (int bytemode
, int sizeflag
)
17007 if (modrm
.mod
!= 3)
17009 if (prefixes
& PREFIX_REPZ
)
17010 all_prefixes
[last_repz_prefix
] = XRELEASE_PREFIX
;
17011 if (prefixes
& PREFIX_REPNZ
)
17012 all_prefixes
[last_repnz_prefix
] = XACQUIRE_PREFIX
;
17015 OP_E (bytemode
, sizeflag
);
17018 /* Similar to OP_E. But the 0xf3 prefixes should be displayed as
17019 "xrelease" for memory operand. No check for LOCK prefix. */
17022 HLE_Fixup3 (int bytemode
, int sizeflag
)
17025 && last_repz_prefix
> last_repnz_prefix
17026 && (prefixes
& PREFIX_REPZ
) != 0)
17027 all_prefixes
[last_repz_prefix
] = XRELEASE_PREFIX
;
17029 OP_E (bytemode
, sizeflag
);
17033 CMPXCHG8B_Fixup (int bytemode
, int sizeflag
)
17038 /* Change cmpxchg8b to cmpxchg16b. */
17039 char *p
= mnemonicendp
- 2;
17040 mnemonicendp
= stpcpy (p
, "16b");
17043 else if ((prefixes
& PREFIX_LOCK
) != 0)
17045 if (prefixes
& PREFIX_REPZ
)
17046 all_prefixes
[last_repz_prefix
] = XRELEASE_PREFIX
;
17047 if (prefixes
& PREFIX_REPNZ
)
17048 all_prefixes
[last_repnz_prefix
] = XACQUIRE_PREFIX
;
17051 OP_M (bytemode
, sizeflag
);
17055 XMM_Fixup (int reg
, int sizeflag ATTRIBUTE_UNUSED
)
17057 const char **names
;
17061 switch (vex
.length
)
17075 oappend (names
[reg
]);
17079 CRC32_Fixup (int bytemode
, int sizeflag
)
17081 /* Add proper suffix to "crc32". */
17082 char *p
= mnemonicendp
;
17101 if (sizeflag
& DFLAG
)
17105 used_prefixes
|= (prefixes
& PREFIX_DATA
);
17109 oappend (INTERNAL_DISASSEMBLER_ERROR
);
17116 if (modrm
.mod
== 3)
17120 /* Skip mod/rm byte. */
17125 add
= (rex
& REX_B
) ? 8 : 0;
17126 if (bytemode
== b_mode
)
17130 oappend (names8rex
[modrm
.rm
+ add
]);
17132 oappend (names8
[modrm
.rm
+ add
]);
17138 oappend (names64
[modrm
.rm
+ add
]);
17139 else if ((prefixes
& PREFIX_DATA
))
17140 oappend (names16
[modrm
.rm
+ add
]);
17142 oappend (names32
[modrm
.rm
+ add
]);
17146 OP_E (bytemode
, sizeflag
);
17150 FXSAVE_Fixup (int bytemode
, int sizeflag
)
17152 /* Add proper suffix to "fxsave" and "fxrstor". */
17156 char *p
= mnemonicendp
;
17162 OP_M (bytemode
, sizeflag
);
17165 /* Display the destination register operand for instructions with
17169 OP_VEX (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
17172 const char **names
;
17180 reg
= vex
.register_specifier
;
17187 if (bytemode
== vex_scalar_mode
)
17189 oappend (names_xmm
[reg
]);
17193 switch (vex
.length
)
17200 case vex_vsib_q_w_dq_mode
:
17201 case vex_vsib_q_w_d_mode
:
17212 names
= names_mask
;
17226 case vex_vsib_q_w_dq_mode
:
17227 case vex_vsib_q_w_d_mode
:
17228 names
= vex
.w
? names_ymm
: names_xmm
;
17232 names
= names_mask
;
17246 oappend (names
[reg
]);
17249 /* Get the VEX immediate byte without moving codep. */
17251 static unsigned char
17252 get_vex_imm8 (int sizeflag
, int opnum
)
17254 int bytes_before_imm
= 0;
17256 if (modrm
.mod
!= 3)
17258 /* There are SIB/displacement bytes. */
17259 if ((sizeflag
& AFLAG
) || address_mode
== mode_64bit
)
17261 /* 32/64 bit address mode */
17262 int base
= modrm
.rm
;
17264 /* Check SIB byte. */
17267 FETCH_DATA (the_info
, codep
+ 1);
17269 /* When decoding the third source, don't increase
17270 bytes_before_imm as this has already been incremented
17271 by one in OP_E_memory while decoding the second
17274 bytes_before_imm
++;
17277 /* Don't increase bytes_before_imm when decoding the third source,
17278 it has already been incremented by OP_E_memory while decoding
17279 the second source operand. */
17285 /* When modrm.rm == 5 or modrm.rm == 4 and base in
17286 SIB == 5, there is a 4 byte displacement. */
17288 /* No displacement. */
17291 /* 4 byte displacement. */
17292 bytes_before_imm
+= 4;
17295 /* 1 byte displacement. */
17296 bytes_before_imm
++;
17303 /* 16 bit address mode */
17304 /* Don't increase bytes_before_imm when decoding the third source,
17305 it has already been incremented by OP_E_memory while decoding
17306 the second source operand. */
17312 /* When modrm.rm == 6, there is a 2 byte displacement. */
17314 /* No displacement. */
17317 /* 2 byte displacement. */
17318 bytes_before_imm
+= 2;
17321 /* 1 byte displacement: when decoding the third source,
17322 don't increase bytes_before_imm as this has already
17323 been incremented by one in OP_E_memory while decoding
17324 the second source operand. */
17326 bytes_before_imm
++;
17334 FETCH_DATA (the_info
, codep
+ bytes_before_imm
+ 1);
17335 return codep
[bytes_before_imm
];
17339 OP_EX_VexReg (int bytemode
, int sizeflag
, int reg
)
17341 const char **names
;
17343 if (reg
== -1 && modrm
.mod
!= 3)
17345 OP_E_memory (bytemode
, sizeflag
);
17357 else if (reg
> 7 && address_mode
!= mode_64bit
)
17361 switch (vex
.length
)
17372 oappend (names
[reg
]);
17376 OP_EX_VexImmW (int bytemode
, int sizeflag
)
17379 static unsigned char vex_imm8
;
17381 if (vex_w_done
== 0)
17385 /* Skip mod/rm byte. */
17389 vex_imm8
= get_vex_imm8 (sizeflag
, 0);
17392 reg
= vex_imm8
>> 4;
17394 OP_EX_VexReg (bytemode
, sizeflag
, reg
);
17396 else if (vex_w_done
== 1)
17401 reg
= vex_imm8
>> 4;
17403 OP_EX_VexReg (bytemode
, sizeflag
, reg
);
17407 /* Output the imm8 directly. */
17408 scratchbuf
[0] = '$';
17409 print_operand_value (scratchbuf
+ 1, 1, vex_imm8
& 0xf);
17410 oappend_maybe_intel (scratchbuf
);
17411 scratchbuf
[0] = '\0';
17417 OP_Vex_2src (int bytemode
, int sizeflag
)
17419 if (modrm
.mod
== 3)
17421 int reg
= modrm
.rm
;
17425 oappend (names_xmm
[reg
]);
17430 && (bytemode
== v_mode
|| bytemode
== v_swap_mode
))
17432 bytemode
= (prefixes
& PREFIX_DATA
) ? x_mode
: q_mode
;
17433 used_prefixes
|= (prefixes
& PREFIX_DATA
);
17435 OP_E (bytemode
, sizeflag
);
17440 OP_Vex_2src_1 (int bytemode
, int sizeflag
)
17442 if (modrm
.mod
== 3)
17444 /* Skip mod/rm byte. */
17450 oappend (names_xmm
[vex
.register_specifier
]);
17452 OP_Vex_2src (bytemode
, sizeflag
);
17456 OP_Vex_2src_2 (int bytemode
, int sizeflag
)
17459 OP_Vex_2src (bytemode
, sizeflag
);
17461 oappend (names_xmm
[vex
.register_specifier
]);
17465 OP_EX_VexW (int bytemode
, int sizeflag
)
17473 /* Skip mod/rm byte. */
17478 reg
= get_vex_imm8 (sizeflag
, 0) >> 4;
17483 reg
= get_vex_imm8 (sizeflag
, 1) >> 4;
17486 OP_EX_VexReg (bytemode
, sizeflag
, reg
);
17490 VEXI4_Fixup (int bytemode ATTRIBUTE_UNUSED
,
17491 int sizeflag ATTRIBUTE_UNUSED
)
17493 /* Skip the immediate byte and check for invalid bits. */
17494 FETCH_DATA (the_info
, codep
+ 1);
17495 if (*codep
++ & 0xf)
17500 OP_REG_VexI4 (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
17503 const char **names
;
17505 FETCH_DATA (the_info
, codep
+ 1);
17508 if (bytemode
!= x_mode
)
17515 if (reg
> 7 && address_mode
!= mode_64bit
)
17518 switch (vex
.length
)
17529 oappend (names
[reg
]);
17533 OP_XMM_VexW (int bytemode
, int sizeflag
)
17535 /* Turn off the REX.W bit since it is used for swapping operands
17538 OP_XMM (bytemode
, sizeflag
);
17542 OP_EX_Vex (int bytemode
, int sizeflag
)
17544 if (modrm
.mod
!= 3)
17546 if (vex
.register_specifier
!= 0)
17550 OP_EX (bytemode
, sizeflag
);
17554 OP_XMM_Vex (int bytemode
, int sizeflag
)
17556 if (modrm
.mod
!= 3)
17558 if (vex
.register_specifier
!= 0)
17562 OP_XMM (bytemode
, sizeflag
);
17566 VZERO_Fixup (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
17568 switch (vex
.length
)
17571 mnemonicendp
= stpcpy (obuf
, "vzeroupper");
17574 mnemonicendp
= stpcpy (obuf
, "vzeroall");
17581 static struct op vex_cmp_op
[] =
17583 { STRING_COMMA_LEN ("eq") },
17584 { STRING_COMMA_LEN ("lt") },
17585 { STRING_COMMA_LEN ("le") },
17586 { STRING_COMMA_LEN ("unord") },
17587 { STRING_COMMA_LEN ("neq") },
17588 { STRING_COMMA_LEN ("nlt") },
17589 { STRING_COMMA_LEN ("nle") },
17590 { STRING_COMMA_LEN ("ord") },
17591 { STRING_COMMA_LEN ("eq_uq") },
17592 { STRING_COMMA_LEN ("nge") },
17593 { STRING_COMMA_LEN ("ngt") },
17594 { STRING_COMMA_LEN ("false") },
17595 { STRING_COMMA_LEN ("neq_oq") },
17596 { STRING_COMMA_LEN ("ge") },
17597 { STRING_COMMA_LEN ("gt") },
17598 { STRING_COMMA_LEN ("true") },
17599 { STRING_COMMA_LEN ("eq_os") },
17600 { STRING_COMMA_LEN ("lt_oq") },
17601 { STRING_COMMA_LEN ("le_oq") },
17602 { STRING_COMMA_LEN ("unord_s") },
17603 { STRING_COMMA_LEN ("neq_us") },
17604 { STRING_COMMA_LEN ("nlt_uq") },
17605 { STRING_COMMA_LEN ("nle_uq") },
17606 { STRING_COMMA_LEN ("ord_s") },
17607 { STRING_COMMA_LEN ("eq_us") },
17608 { STRING_COMMA_LEN ("nge_uq") },
17609 { STRING_COMMA_LEN ("ngt_uq") },
17610 { STRING_COMMA_LEN ("false_os") },
17611 { STRING_COMMA_LEN ("neq_os") },
17612 { STRING_COMMA_LEN ("ge_oq") },
17613 { STRING_COMMA_LEN ("gt_oq") },
17614 { STRING_COMMA_LEN ("true_us") },
17618 VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
17620 unsigned int cmp_type
;
17622 FETCH_DATA (the_info
, codep
+ 1);
17623 cmp_type
= *codep
++ & 0xff;
17624 if (cmp_type
< ARRAY_SIZE (vex_cmp_op
))
17627 char *p
= mnemonicendp
- 2;
17631 sprintf (p
, "%s%s", vex_cmp_op
[cmp_type
].name
, suffix
);
17632 mnemonicendp
+= vex_cmp_op
[cmp_type
].len
;
17636 /* We have a reserved extension byte. Output it directly. */
17637 scratchbuf
[0] = '$';
17638 print_operand_value (scratchbuf
+ 1, 1, cmp_type
);
17639 oappend_maybe_intel (scratchbuf
);
17640 scratchbuf
[0] = '\0';
17645 VPCMP_Fixup (int bytemode ATTRIBUTE_UNUSED
,
17646 int sizeflag ATTRIBUTE_UNUSED
)
17648 unsigned int cmp_type
;
17653 FETCH_DATA (the_info
, codep
+ 1);
17654 cmp_type
= *codep
++ & 0xff;
17655 /* There are aliases for immediates 0, 1, 2, 4, 5, 6.
17656 If it's the case, print suffix, otherwise - print the immediate. */
17657 if (cmp_type
< ARRAY_SIZE (simd_cmp_op
)
17662 char *p
= mnemonicendp
- 2;
17664 /* vpcmp* can have both one- and two-lettered suffix. */
17678 sprintf (p
, "%s%s", simd_cmp_op
[cmp_type
].name
, suffix
);
17679 mnemonicendp
+= simd_cmp_op
[cmp_type
].len
;
17683 /* We have a reserved extension byte. Output it directly. */
17684 scratchbuf
[0] = '$';
17685 print_operand_value (scratchbuf
+ 1, 1, cmp_type
);
17686 oappend_maybe_intel (scratchbuf
);
17687 scratchbuf
[0] = '\0';
17691 static const struct op pclmul_op
[] =
17693 { STRING_COMMA_LEN ("lql") },
17694 { STRING_COMMA_LEN ("hql") },
17695 { STRING_COMMA_LEN ("lqh") },
17696 { STRING_COMMA_LEN ("hqh") }
17700 PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED
,
17701 int sizeflag ATTRIBUTE_UNUSED
)
17703 unsigned int pclmul_type
;
17705 FETCH_DATA (the_info
, codep
+ 1);
17706 pclmul_type
= *codep
++ & 0xff;
17707 switch (pclmul_type
)
17718 if (pclmul_type
< ARRAY_SIZE (pclmul_op
))
17721 char *p
= mnemonicendp
- 3;
17726 sprintf (p
, "%s%s", pclmul_op
[pclmul_type
].name
, suffix
);
17727 mnemonicendp
+= pclmul_op
[pclmul_type
].len
;
17731 /* We have a reserved extension byte. Output it directly. */
17732 scratchbuf
[0] = '$';
17733 print_operand_value (scratchbuf
+ 1, 1, pclmul_type
);
17734 oappend_maybe_intel (scratchbuf
);
17735 scratchbuf
[0] = '\0';
17740 MOVBE_Fixup (int bytemode
, int sizeflag
)
17742 /* Add proper suffix to "movbe". */
17743 char *p
= mnemonicendp
;
17752 if (sizeflag
& SUFFIX_ALWAYS
)
17758 if (sizeflag
& DFLAG
)
17762 used_prefixes
|= (prefixes
& PREFIX_DATA
);
17767 oappend (INTERNAL_DISASSEMBLER_ERROR
);
17774 OP_M (bytemode
, sizeflag
);
17778 OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
17781 const char **names
;
17783 /* Skip mod/rm byte. */
17797 oappend (names
[reg
]);
17801 OP_LWP_E (int bytemode ATTRIBUTE_UNUSED
, int sizeflag ATTRIBUTE_UNUSED
)
17803 const char **names
;
17810 oappend (names
[vex
.register_specifier
]);
17814 OP_Mask (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
17817 || (bytemode
!= mask_mode
&& bytemode
!= mask_bd_mode
))
17821 if ((rex
& REX_R
) != 0 || !vex
.r
)
17827 oappend (names_mask
[modrm
.reg
]);
17831 OP_Rounding (int bytemode
, int sizeflag ATTRIBUTE_UNUSED
)
17834 || (bytemode
!= evex_rounding_mode
17835 && bytemode
!= evex_sae_mode
))
17837 if (modrm
.mod
== 3 && vex
.b
)
17840 case evex_rounding_mode
:
17841 oappend (names_rounding
[vex
.ll
]);
17843 case evex_sae_mode
: