15796c8dcSSimon Schubert /* Print i386 instructions for GDB, the GNU debugger.
25796c8dcSSimon Schubert Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3*ef5ccd6cSJohn Marino 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
45796c8dcSSimon Schubert Free Software Foundation, Inc.
55796c8dcSSimon Schubert
65796c8dcSSimon Schubert This file is part of the GNU opcodes library.
75796c8dcSSimon Schubert
85796c8dcSSimon Schubert This library is free software; you can redistribute it and/or modify
95796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by
105796c8dcSSimon Schubert the Free Software Foundation; either version 3, or (at your option)
115796c8dcSSimon Schubert any later version.
125796c8dcSSimon Schubert
135796c8dcSSimon Schubert It is distributed in the hope that it will be useful, but WITHOUT
145796c8dcSSimon Schubert ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
155796c8dcSSimon Schubert or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
165796c8dcSSimon Schubert License for more details.
175796c8dcSSimon Schubert
185796c8dcSSimon Schubert You should have received a copy of the GNU General Public License
195796c8dcSSimon Schubert along with this program; if not, write to the Free Software
205796c8dcSSimon Schubert Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
215796c8dcSSimon Schubert MA 02110-1301, USA. */
225796c8dcSSimon Schubert
235796c8dcSSimon Schubert
245796c8dcSSimon Schubert /* 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
255796c8dcSSimon Schubert July 1988
265796c8dcSSimon Schubert modified by John Hassey (hassey@dg-rtp.dg.com)
275796c8dcSSimon Schubert x86-64 support added by Jan Hubicka (jh@suse.cz)
285796c8dcSSimon Schubert VIA PadLock support by Michal Ludvig (mludvig@suse.cz). */
295796c8dcSSimon Schubert
305796c8dcSSimon Schubert /* The main tables describing the instructions is essentially a copy
315796c8dcSSimon Schubert of the "Opcode Map" chapter (Appendix A) of the Intel 80386
325796c8dcSSimon Schubert Programmers Manual. Usually, there is a capital letter, followed
335796c8dcSSimon Schubert by a small letter. The capital letter tell the addressing mode,
345796c8dcSSimon Schubert and the small letter tells about the operand size. Refer to
355796c8dcSSimon Schubert the Intel manual for details. */
365796c8dcSSimon Schubert
375796c8dcSSimon Schubert #include "sysdep.h"
385796c8dcSSimon Schubert #include "dis-asm.h"
395796c8dcSSimon Schubert #include "opintl.h"
405796c8dcSSimon Schubert #include "opcode/i386.h"
415796c8dcSSimon Schubert #include "libiberty.h"
425796c8dcSSimon Schubert
435796c8dcSSimon Schubert #include <setjmp.h>
445796c8dcSSimon Schubert
455796c8dcSSimon Schubert static int print_insn (bfd_vma, disassemble_info *);
465796c8dcSSimon Schubert static void dofloat (int);
475796c8dcSSimon Schubert static void OP_ST (int, int);
485796c8dcSSimon Schubert static void OP_STi (int, int);
495796c8dcSSimon Schubert static int putop (const char *, int);
505796c8dcSSimon Schubert static void oappend (const char *);
515796c8dcSSimon Schubert static void append_seg (void);
525796c8dcSSimon Schubert static void OP_indirE (int, int);
535796c8dcSSimon Schubert static void print_operand_value (char *, int, bfd_vma);
545796c8dcSSimon Schubert static void OP_E_register (int, int);
555796c8dcSSimon Schubert static void OP_E_memory (int, int);
565796c8dcSSimon Schubert static void print_displacement (char *, bfd_vma);
575796c8dcSSimon Schubert static void OP_E (int, int);
585796c8dcSSimon Schubert static void OP_G (int, int);
595796c8dcSSimon Schubert static bfd_vma get64 (void);
605796c8dcSSimon Schubert static bfd_signed_vma get32 (void);
615796c8dcSSimon Schubert static bfd_signed_vma get32s (void);
625796c8dcSSimon Schubert static int get16 (void);
635796c8dcSSimon Schubert static void set_op (bfd_vma, int);
645796c8dcSSimon Schubert static void OP_Skip_MODRM (int, int);
655796c8dcSSimon Schubert static void OP_REG (int, int);
665796c8dcSSimon Schubert static void OP_IMREG (int, int);
675796c8dcSSimon Schubert static void OP_I (int, int);
685796c8dcSSimon Schubert static void OP_I64 (int, int);
695796c8dcSSimon Schubert static void OP_sI (int, int);
705796c8dcSSimon Schubert static void OP_J (int, int);
715796c8dcSSimon Schubert static void OP_SEG (int, int);
725796c8dcSSimon Schubert static void OP_DIR (int, int);
735796c8dcSSimon Schubert static void OP_OFF (int, int);
745796c8dcSSimon Schubert static void OP_OFF64 (int, int);
755796c8dcSSimon Schubert static void ptr_reg (int, int);
765796c8dcSSimon Schubert static void OP_ESreg (int, int);
775796c8dcSSimon Schubert static void OP_DSreg (int, int);
785796c8dcSSimon Schubert static void OP_C (int, int);
795796c8dcSSimon Schubert static void OP_D (int, int);
805796c8dcSSimon Schubert static void OP_T (int, int);
815796c8dcSSimon Schubert static void OP_R (int, int);
825796c8dcSSimon Schubert static void OP_MMX (int, int);
835796c8dcSSimon Schubert static void OP_XMM (int, int);
845796c8dcSSimon Schubert static void OP_EM (int, int);
855796c8dcSSimon Schubert static void OP_EX (int, int);
865796c8dcSSimon Schubert static void OP_EMC (int,int);
875796c8dcSSimon Schubert static void OP_MXC (int,int);
885796c8dcSSimon Schubert static void OP_MS (int, int);
895796c8dcSSimon Schubert static void OP_XS (int, int);
905796c8dcSSimon Schubert static void OP_M (int, int);
915796c8dcSSimon Schubert static void OP_VEX (int, int);
925796c8dcSSimon Schubert static void OP_EX_Vex (int, int);
935796c8dcSSimon Schubert static void OP_EX_VexW (int, int);
94cf7f2e2dSJohn Marino static void OP_EX_VexImmW (int, int);
955796c8dcSSimon Schubert static void OP_XMM_Vex (int, int);
965796c8dcSSimon Schubert static void OP_XMM_VexW (int, int);
975796c8dcSSimon Schubert static void OP_REG_VexI4 (int, int);
985796c8dcSSimon Schubert static void PCLMUL_Fixup (int, int);
995796c8dcSSimon Schubert static void VEXI4_Fixup (int, int);
1005796c8dcSSimon Schubert static void VZERO_Fixup (int, int);
1015796c8dcSSimon Schubert static void VCMP_Fixup (int, int);
1025796c8dcSSimon Schubert static void OP_0f07 (int, int);
1035796c8dcSSimon Schubert static void OP_Monitor (int, int);
1045796c8dcSSimon Schubert static void OP_Mwait (int, int);
1055796c8dcSSimon Schubert static void NOP_Fixup1 (int, int);
1065796c8dcSSimon Schubert static void NOP_Fixup2 (int, int);
1075796c8dcSSimon Schubert static void OP_3DNowSuffix (int, int);
1085796c8dcSSimon Schubert static void CMP_Fixup (int, int);
1095796c8dcSSimon Schubert static void BadOp (void);
1105796c8dcSSimon Schubert static void REP_Fixup (int, int);
111*ef5ccd6cSJohn Marino static void HLE_Fixup1 (int, int);
112*ef5ccd6cSJohn Marino static void HLE_Fixup2 (int, int);
113*ef5ccd6cSJohn Marino static void HLE_Fixup3 (int, int);
1145796c8dcSSimon Schubert static void CMPXCHG8B_Fixup (int, int);
1155796c8dcSSimon Schubert static void XMM_Fixup (int, int);
1165796c8dcSSimon Schubert static void CRC32_Fixup (int, int);
117cf7f2e2dSJohn Marino static void FXSAVE_Fixup (int, int);
118cf7f2e2dSJohn Marino static void OP_LWPCB_E (int, int);
119cf7f2e2dSJohn Marino static void OP_LWP_E (int, int);
120cf7f2e2dSJohn Marino static void OP_Vex_2src_1 (int, int);
121cf7f2e2dSJohn Marino static void OP_Vex_2src_2 (int, int);
1225796c8dcSSimon Schubert
1235796c8dcSSimon Schubert static void MOVBE_Fixup (int, int);
1245796c8dcSSimon Schubert
1255796c8dcSSimon Schubert struct dis_private {
1265796c8dcSSimon Schubert /* Points to first byte not fetched. */
1275796c8dcSSimon Schubert bfd_byte *max_fetched;
1285796c8dcSSimon Schubert bfd_byte the_buffer[MAX_MNEM_SIZE];
1295796c8dcSSimon Schubert bfd_vma insn_start;
1305796c8dcSSimon Schubert int orig_sizeflag;
1315796c8dcSSimon Schubert jmp_buf bailout;
1325796c8dcSSimon Schubert };
1335796c8dcSSimon Schubert
1345796c8dcSSimon Schubert enum address_mode
1355796c8dcSSimon Schubert {
1365796c8dcSSimon Schubert mode_16bit,
1375796c8dcSSimon Schubert mode_32bit,
1385796c8dcSSimon Schubert mode_64bit
1395796c8dcSSimon Schubert };
1405796c8dcSSimon Schubert
1415796c8dcSSimon Schubert enum address_mode address_mode;
1425796c8dcSSimon Schubert
1435796c8dcSSimon Schubert /* Flags for the prefixes for the current instruction. See below. */
1445796c8dcSSimon Schubert static int prefixes;
1455796c8dcSSimon Schubert
1465796c8dcSSimon Schubert /* REX prefix the current instruction. See below. */
1475796c8dcSSimon Schubert static int rex;
1485796c8dcSSimon Schubert /* Bits of REX we've already used. */
1495796c8dcSSimon Schubert static int rex_used;
150cf7f2e2dSJohn Marino /* REX bits in original REX prefix ignored. */
1515796c8dcSSimon Schubert static int rex_ignored;
1525796c8dcSSimon Schubert /* Mark parts used in the REX prefix. When we are testing for
1535796c8dcSSimon Schubert empty prefix (for 8bit register REX extension), just mask it
1545796c8dcSSimon Schubert out. Otherwise test for REX bit is excuse for existence of REX
1555796c8dcSSimon Schubert only in case value is nonzero. */
1565796c8dcSSimon Schubert #define USED_REX(value) \
1575796c8dcSSimon Schubert { \
1585796c8dcSSimon Schubert if (value) \
1595796c8dcSSimon Schubert { \
1605796c8dcSSimon Schubert if ((rex & value)) \
1615796c8dcSSimon Schubert rex_used |= (value) | REX_OPCODE; \
1625796c8dcSSimon Schubert } \
1635796c8dcSSimon Schubert else \
1645796c8dcSSimon Schubert rex_used |= REX_OPCODE; \
1655796c8dcSSimon Schubert }
1665796c8dcSSimon Schubert
1675796c8dcSSimon Schubert /* Flags for prefixes which we somehow handled when printing the
1685796c8dcSSimon Schubert current instruction. */
1695796c8dcSSimon Schubert static int used_prefixes;
1705796c8dcSSimon Schubert
1715796c8dcSSimon Schubert /* Flags stored in PREFIXES. */
1725796c8dcSSimon Schubert #define PREFIX_REPZ 1
1735796c8dcSSimon Schubert #define PREFIX_REPNZ 2
1745796c8dcSSimon Schubert #define PREFIX_LOCK 4
1755796c8dcSSimon Schubert #define PREFIX_CS 8
1765796c8dcSSimon Schubert #define PREFIX_SS 0x10
1775796c8dcSSimon Schubert #define PREFIX_DS 0x20
1785796c8dcSSimon Schubert #define PREFIX_ES 0x40
1795796c8dcSSimon Schubert #define PREFIX_FS 0x80
1805796c8dcSSimon Schubert #define PREFIX_GS 0x100
1815796c8dcSSimon Schubert #define PREFIX_DATA 0x200
1825796c8dcSSimon Schubert #define PREFIX_ADDR 0x400
1835796c8dcSSimon Schubert #define PREFIX_FWAIT 0x800
1845796c8dcSSimon Schubert
1855796c8dcSSimon Schubert /* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
1865796c8dcSSimon Schubert to ADDR (exclusive) are valid. Returns 1 for success, longjmps
1875796c8dcSSimon Schubert on error. */
1885796c8dcSSimon Schubert #define FETCH_DATA(info, addr) \
1895796c8dcSSimon Schubert ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
1905796c8dcSSimon Schubert ? 1 : fetch_data ((info), (addr)))
1915796c8dcSSimon Schubert
1925796c8dcSSimon Schubert static int
fetch_data(struct disassemble_info * info,bfd_byte * addr)1935796c8dcSSimon Schubert fetch_data (struct disassemble_info *info, bfd_byte *addr)
1945796c8dcSSimon Schubert {
1955796c8dcSSimon Schubert int status;
1965796c8dcSSimon Schubert struct dis_private *priv = (struct dis_private *) info->private_data;
1975796c8dcSSimon Schubert bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
1985796c8dcSSimon Schubert
1995796c8dcSSimon Schubert if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
2005796c8dcSSimon Schubert status = (*info->read_memory_func) (start,
2015796c8dcSSimon Schubert priv->max_fetched,
2025796c8dcSSimon Schubert addr - priv->max_fetched,
2035796c8dcSSimon Schubert info);
2045796c8dcSSimon Schubert else
2055796c8dcSSimon Schubert status = -1;
2065796c8dcSSimon Schubert if (status != 0)
2075796c8dcSSimon Schubert {
2085796c8dcSSimon Schubert /* If we did manage to read at least one byte, then
2095796c8dcSSimon Schubert print_insn_i386 will do something sensible. Otherwise, print
2105796c8dcSSimon Schubert an error. We do that here because this is where we know
2115796c8dcSSimon Schubert STATUS. */
2125796c8dcSSimon Schubert if (priv->max_fetched == priv->the_buffer)
2135796c8dcSSimon Schubert (*info->memory_error_func) (status, start, info);
2145796c8dcSSimon Schubert longjmp (priv->bailout, 1);
2155796c8dcSSimon Schubert }
2165796c8dcSSimon Schubert else
2175796c8dcSSimon Schubert priv->max_fetched = addr;
2185796c8dcSSimon Schubert return 1;
2195796c8dcSSimon Schubert }
2205796c8dcSSimon Schubert
2215796c8dcSSimon Schubert #define XX { NULL, 0 }
222cf7f2e2dSJohn Marino #define Bad_Opcode NULL, { { NULL, 0 } }
2235796c8dcSSimon Schubert
2245796c8dcSSimon Schubert #define Eb { OP_E, b_mode }
2255796c8dcSSimon Schubert #define EbS { OP_E, b_swap_mode }
2265796c8dcSSimon Schubert #define Ev { OP_E, v_mode }
2275796c8dcSSimon Schubert #define EvS { OP_E, v_swap_mode }
2285796c8dcSSimon Schubert #define Ed { OP_E, d_mode }
2295796c8dcSSimon Schubert #define Edq { OP_E, dq_mode }
2305796c8dcSSimon Schubert #define Edqw { OP_E, dqw_mode }
2315796c8dcSSimon Schubert #define Edqb { OP_E, dqb_mode }
2325796c8dcSSimon Schubert #define Edqd { OP_E, dqd_mode }
2335796c8dcSSimon Schubert #define Eq { OP_E, q_mode }
2345796c8dcSSimon Schubert #define indirEv { OP_indirE, stack_v_mode }
2355796c8dcSSimon Schubert #define indirEp { OP_indirE, f_mode }
2365796c8dcSSimon Schubert #define stackEv { OP_E, stack_v_mode }
2375796c8dcSSimon Schubert #define Em { OP_E, m_mode }
2385796c8dcSSimon Schubert #define Ew { OP_E, w_mode }
2395796c8dcSSimon Schubert #define M { OP_M, 0 } /* lea, lgdt, etc. */
2405796c8dcSSimon Schubert #define Ma { OP_M, a_mode }
2415796c8dcSSimon Schubert #define Mb { OP_M, b_mode }
2425796c8dcSSimon Schubert #define Md { OP_M, d_mode }
2435796c8dcSSimon Schubert #define Mo { OP_M, o_mode }
2445796c8dcSSimon Schubert #define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
2455796c8dcSSimon Schubert #define Mq { OP_M, q_mode }
2465796c8dcSSimon Schubert #define Mx { OP_M, x_mode }
2475796c8dcSSimon Schubert #define Mxmm { OP_M, xmm_mode }
2485796c8dcSSimon Schubert #define Gb { OP_G, b_mode }
2495796c8dcSSimon Schubert #define Gv { OP_G, v_mode }
2505796c8dcSSimon Schubert #define Gd { OP_G, d_mode }
2515796c8dcSSimon Schubert #define Gdq { OP_G, dq_mode }
2525796c8dcSSimon Schubert #define Gm { OP_G, m_mode }
2535796c8dcSSimon Schubert #define Gw { OP_G, w_mode }
2545796c8dcSSimon Schubert #define Rd { OP_R, d_mode }
2555796c8dcSSimon Schubert #define Rm { OP_R, m_mode }
2565796c8dcSSimon Schubert #define Ib { OP_I, b_mode }
2575796c8dcSSimon Schubert #define sIb { OP_sI, b_mode } /* sign extened byte */
258c50c785cSJohn Marino #define sIbT { OP_sI, b_T_mode } /* sign extened byte like 'T' */
2595796c8dcSSimon Schubert #define Iv { OP_I, v_mode }
260c50c785cSJohn Marino #define sIv { OP_sI, v_mode }
2615796c8dcSSimon Schubert #define Iq { OP_I, q_mode }
2625796c8dcSSimon Schubert #define Iv64 { OP_I64, v_mode }
2635796c8dcSSimon Schubert #define Iw { OP_I, w_mode }
2645796c8dcSSimon Schubert #define I1 { OP_I, const_1_mode }
2655796c8dcSSimon Schubert #define Jb { OP_J, b_mode }
2665796c8dcSSimon Schubert #define Jv { OP_J, v_mode }
2675796c8dcSSimon Schubert #define Cm { OP_C, m_mode }
2685796c8dcSSimon Schubert #define Dm { OP_D, m_mode }
2695796c8dcSSimon Schubert #define Td { OP_T, d_mode }
2705796c8dcSSimon Schubert #define Skip_MODRM { OP_Skip_MODRM, 0 }
2715796c8dcSSimon Schubert
2725796c8dcSSimon Schubert #define RMeAX { OP_REG, eAX_reg }
2735796c8dcSSimon Schubert #define RMeBX { OP_REG, eBX_reg }
2745796c8dcSSimon Schubert #define RMeCX { OP_REG, eCX_reg }
2755796c8dcSSimon Schubert #define RMeDX { OP_REG, eDX_reg }
2765796c8dcSSimon Schubert #define RMeSP { OP_REG, eSP_reg }
2775796c8dcSSimon Schubert #define RMeBP { OP_REG, eBP_reg }
2785796c8dcSSimon Schubert #define RMeSI { OP_REG, eSI_reg }
2795796c8dcSSimon Schubert #define RMeDI { OP_REG, eDI_reg }
2805796c8dcSSimon Schubert #define RMrAX { OP_REG, rAX_reg }
2815796c8dcSSimon Schubert #define RMrBX { OP_REG, rBX_reg }
2825796c8dcSSimon Schubert #define RMrCX { OP_REG, rCX_reg }
2835796c8dcSSimon Schubert #define RMrDX { OP_REG, rDX_reg }
2845796c8dcSSimon Schubert #define RMrSP { OP_REG, rSP_reg }
2855796c8dcSSimon Schubert #define RMrBP { OP_REG, rBP_reg }
2865796c8dcSSimon Schubert #define RMrSI { OP_REG, rSI_reg }
2875796c8dcSSimon Schubert #define RMrDI { OP_REG, rDI_reg }
2885796c8dcSSimon Schubert #define RMAL { OP_REG, al_reg }
2895796c8dcSSimon Schubert #define RMCL { OP_REG, cl_reg }
2905796c8dcSSimon Schubert #define RMDL { OP_REG, dl_reg }
2915796c8dcSSimon Schubert #define RMBL { OP_REG, bl_reg }
2925796c8dcSSimon Schubert #define RMAH { OP_REG, ah_reg }
2935796c8dcSSimon Schubert #define RMCH { OP_REG, ch_reg }
2945796c8dcSSimon Schubert #define RMDH { OP_REG, dh_reg }
2955796c8dcSSimon Schubert #define RMBH { OP_REG, bh_reg }
2965796c8dcSSimon Schubert #define RMAX { OP_REG, ax_reg }
2975796c8dcSSimon Schubert #define RMDX { OP_REG, dx_reg }
2985796c8dcSSimon Schubert
2995796c8dcSSimon Schubert #define eAX { OP_IMREG, eAX_reg }
3005796c8dcSSimon Schubert #define eBX { OP_IMREG, eBX_reg }
3015796c8dcSSimon Schubert #define eCX { OP_IMREG, eCX_reg }
3025796c8dcSSimon Schubert #define eDX { OP_IMREG, eDX_reg }
3035796c8dcSSimon Schubert #define eSP { OP_IMREG, eSP_reg }
3045796c8dcSSimon Schubert #define eBP { OP_IMREG, eBP_reg }
3055796c8dcSSimon Schubert #define eSI { OP_IMREG, eSI_reg }
3065796c8dcSSimon Schubert #define eDI { OP_IMREG, eDI_reg }
3075796c8dcSSimon Schubert #define AL { OP_IMREG, al_reg }
3085796c8dcSSimon Schubert #define CL { OP_IMREG, cl_reg }
3095796c8dcSSimon Schubert #define DL { OP_IMREG, dl_reg }
3105796c8dcSSimon Schubert #define BL { OP_IMREG, bl_reg }
3115796c8dcSSimon Schubert #define AH { OP_IMREG, ah_reg }
3125796c8dcSSimon Schubert #define CH { OP_IMREG, ch_reg }
3135796c8dcSSimon Schubert #define DH { OP_IMREG, dh_reg }
3145796c8dcSSimon Schubert #define BH { OP_IMREG, bh_reg }
3155796c8dcSSimon Schubert #define AX { OP_IMREG, ax_reg }
3165796c8dcSSimon Schubert #define DX { OP_IMREG, dx_reg }
3175796c8dcSSimon Schubert #define zAX { OP_IMREG, z_mode_ax_reg }
3185796c8dcSSimon Schubert #define indirDX { OP_IMREG, indir_dx_reg }
3195796c8dcSSimon Schubert
3205796c8dcSSimon Schubert #define Sw { OP_SEG, w_mode }
3215796c8dcSSimon Schubert #define Sv { OP_SEG, v_mode }
3225796c8dcSSimon Schubert #define Ap { OP_DIR, 0 }
3235796c8dcSSimon Schubert #define Ob { OP_OFF64, b_mode }
3245796c8dcSSimon Schubert #define Ov { OP_OFF64, v_mode }
3255796c8dcSSimon Schubert #define Xb { OP_DSreg, eSI_reg }
3265796c8dcSSimon Schubert #define Xv { OP_DSreg, eSI_reg }
3275796c8dcSSimon Schubert #define Xz { OP_DSreg, eSI_reg }
3285796c8dcSSimon Schubert #define Yb { OP_ESreg, eDI_reg }
3295796c8dcSSimon Schubert #define Yv { OP_ESreg, eDI_reg }
3305796c8dcSSimon Schubert #define DSBX { OP_DSreg, eBX_reg }
3315796c8dcSSimon Schubert
3325796c8dcSSimon Schubert #define es { OP_REG, es_reg }
3335796c8dcSSimon Schubert #define ss { OP_REG, ss_reg }
3345796c8dcSSimon Schubert #define cs { OP_REG, cs_reg }
3355796c8dcSSimon Schubert #define ds { OP_REG, ds_reg }
3365796c8dcSSimon Schubert #define fs { OP_REG, fs_reg }
3375796c8dcSSimon Schubert #define gs { OP_REG, gs_reg }
3385796c8dcSSimon Schubert
3395796c8dcSSimon Schubert #define MX { OP_MMX, 0 }
3405796c8dcSSimon Schubert #define XM { OP_XMM, 0 }
341cf7f2e2dSJohn Marino #define XMScalar { OP_XMM, scalar_mode }
342a45ae5f8SJohn Marino #define XMGatherQ { OP_XMM, vex_vsib_q_w_dq_mode }
3435796c8dcSSimon Schubert #define XMM { OP_XMM, xmm_mode }
3445796c8dcSSimon Schubert #define EM { OP_EM, v_mode }
3455796c8dcSSimon Schubert #define EMS { OP_EM, v_swap_mode }
3465796c8dcSSimon Schubert #define EMd { OP_EM, d_mode }
3475796c8dcSSimon Schubert #define EMx { OP_EM, x_mode }
3485796c8dcSSimon Schubert #define EXw { OP_EX, w_mode }
3495796c8dcSSimon Schubert #define EXd { OP_EX, d_mode }
350cf7f2e2dSJohn Marino #define EXdScalar { OP_EX, d_scalar_mode }
3515796c8dcSSimon Schubert #define EXdS { OP_EX, d_swap_mode }
3525796c8dcSSimon Schubert #define EXq { OP_EX, q_mode }
353cf7f2e2dSJohn Marino #define EXqScalar { OP_EX, q_scalar_mode }
354cf7f2e2dSJohn Marino #define EXqScalarS { OP_EX, q_scalar_swap_mode }
3555796c8dcSSimon Schubert #define EXqS { OP_EX, q_swap_mode }
3565796c8dcSSimon Schubert #define EXx { OP_EX, x_mode }
3575796c8dcSSimon Schubert #define EXxS { OP_EX, x_swap_mode }
3585796c8dcSSimon Schubert #define EXxmm { OP_EX, xmm_mode }
3595796c8dcSSimon Schubert #define EXxmmq { OP_EX, xmmq_mode }
360a45ae5f8SJohn Marino #define EXxmm_mb { OP_EX, xmm_mb_mode }
361a45ae5f8SJohn Marino #define EXxmm_mw { OP_EX, xmm_mw_mode }
362a45ae5f8SJohn Marino #define EXxmm_md { OP_EX, xmm_md_mode }
363a45ae5f8SJohn Marino #define EXxmm_mq { OP_EX, xmm_mq_mode }
364a45ae5f8SJohn Marino #define EXxmmdw { OP_EX, xmmdw_mode }
365a45ae5f8SJohn Marino #define EXxmmqd { OP_EX, xmmqd_mode }
3665796c8dcSSimon Schubert #define EXymmq { OP_EX, ymmq_mode }
3675796c8dcSSimon Schubert #define EXVexWdq { OP_EX, vex_w_dq_mode }
368cf7f2e2dSJohn Marino #define EXVexWdqScalar { OP_EX, vex_scalar_w_dq_mode }
3695796c8dcSSimon Schubert #define MS { OP_MS, v_mode }
3705796c8dcSSimon Schubert #define XS { OP_XS, v_mode }
3715796c8dcSSimon Schubert #define EMCq { OP_EMC, q_mode }
3725796c8dcSSimon Schubert #define MXC { OP_MXC, 0 }
3735796c8dcSSimon Schubert #define OPSUF { OP_3DNowSuffix, 0 }
3745796c8dcSSimon Schubert #define CMP { CMP_Fixup, 0 }
3755796c8dcSSimon Schubert #define XMM0 { XMM_Fixup, 0 }
376cf7f2e2dSJohn Marino #define FXSAVE { FXSAVE_Fixup, 0 }
377cf7f2e2dSJohn Marino #define Vex_2src_1 { OP_Vex_2src_1, 0 }
378cf7f2e2dSJohn Marino #define Vex_2src_2 { OP_Vex_2src_2, 0 }
3795796c8dcSSimon Schubert
3805796c8dcSSimon Schubert #define Vex { OP_VEX, vex_mode }
381cf7f2e2dSJohn Marino #define VexScalar { OP_VEX, vex_scalar_mode }
382a45ae5f8SJohn Marino #define VexGatherQ { OP_VEX, vex_vsib_q_w_dq_mode }
3835796c8dcSSimon Schubert #define Vex128 { OP_VEX, vex128_mode }
3845796c8dcSSimon Schubert #define Vex256 { OP_VEX, vex256_mode }
385c50c785cSJohn Marino #define VexGdq { OP_VEX, dq_mode }
3865796c8dcSSimon Schubert #define VexI4 { VEXI4_Fixup, 0}
3875796c8dcSSimon Schubert #define EXdVex { OP_EX_Vex, d_mode }
3885796c8dcSSimon Schubert #define EXdVexS { OP_EX_Vex, d_swap_mode }
389cf7f2e2dSJohn Marino #define EXdVexScalarS { OP_EX_Vex, d_scalar_swap_mode }
3905796c8dcSSimon Schubert #define EXqVex { OP_EX_Vex, q_mode }
3915796c8dcSSimon Schubert #define EXqVexS { OP_EX_Vex, q_swap_mode }
392cf7f2e2dSJohn Marino #define EXqVexScalarS { OP_EX_Vex, q_scalar_swap_mode }
3935796c8dcSSimon Schubert #define EXVexW { OP_EX_VexW, x_mode }
3945796c8dcSSimon Schubert #define EXdVexW { OP_EX_VexW, d_mode }
3955796c8dcSSimon Schubert #define EXqVexW { OP_EX_VexW, q_mode }
396cf7f2e2dSJohn Marino #define EXVexImmW { OP_EX_VexImmW, x_mode }
3975796c8dcSSimon Schubert #define XMVex { OP_XMM_Vex, 0 }
398cf7f2e2dSJohn Marino #define XMVexScalar { OP_XMM_Vex, scalar_mode }
3995796c8dcSSimon Schubert #define XMVexW { OP_XMM_VexW, 0 }
4005796c8dcSSimon Schubert #define XMVexI4 { OP_REG_VexI4, x_mode }
4015796c8dcSSimon Schubert #define PCLMUL { PCLMUL_Fixup, 0 }
4025796c8dcSSimon Schubert #define VZERO { VZERO_Fixup, 0 }
4035796c8dcSSimon Schubert #define VCMP { VCMP_Fixup, 0 }
4045796c8dcSSimon Schubert
405a45ae5f8SJohn Marino #define MVexVSIBDWpX { OP_M, vex_vsib_d_w_dq_mode }
406a45ae5f8SJohn Marino #define MVexVSIBQWpX { OP_M, vex_vsib_q_w_dq_mode }
407a45ae5f8SJohn Marino
4085796c8dcSSimon Schubert /* Used handle "rep" prefix for string instructions. */
4095796c8dcSSimon Schubert #define Xbr { REP_Fixup, eSI_reg }
4105796c8dcSSimon Schubert #define Xvr { REP_Fixup, eSI_reg }
4115796c8dcSSimon Schubert #define Ybr { REP_Fixup, eDI_reg }
4125796c8dcSSimon Schubert #define Yvr { REP_Fixup, eDI_reg }
4135796c8dcSSimon Schubert #define Yzr { REP_Fixup, eDI_reg }
4145796c8dcSSimon Schubert #define indirDXr { REP_Fixup, indir_dx_reg }
4155796c8dcSSimon Schubert #define ALr { REP_Fixup, al_reg }
4165796c8dcSSimon Schubert #define eAXr { REP_Fixup, eAX_reg }
4175796c8dcSSimon Schubert
418*ef5ccd6cSJohn Marino /* Used handle HLE prefix for lockable instructions. */
419*ef5ccd6cSJohn Marino #define Ebh1 { HLE_Fixup1, b_mode }
420*ef5ccd6cSJohn Marino #define Evh1 { HLE_Fixup1, v_mode }
421*ef5ccd6cSJohn Marino #define Ebh2 { HLE_Fixup2, b_mode }
422*ef5ccd6cSJohn Marino #define Evh2 { HLE_Fixup2, v_mode }
423*ef5ccd6cSJohn Marino #define Ebh3 { HLE_Fixup3, b_mode }
424*ef5ccd6cSJohn Marino #define Evh3 { HLE_Fixup3, v_mode }
425*ef5ccd6cSJohn Marino
4265796c8dcSSimon Schubert #define cond_jump_flag { NULL, cond_jump_mode }
4275796c8dcSSimon Schubert #define loop_jcxz_flag { NULL, loop_jcxz_mode }
4285796c8dcSSimon Schubert
4295796c8dcSSimon Schubert /* bits in sizeflag */
4305796c8dcSSimon Schubert #define SUFFIX_ALWAYS 4
4315796c8dcSSimon Schubert #define AFLAG 2
4325796c8dcSSimon Schubert #define DFLAG 1
4335796c8dcSSimon Schubert
434cf7f2e2dSJohn Marino enum
435cf7f2e2dSJohn Marino {
4365796c8dcSSimon Schubert /* byte operand */
437cf7f2e2dSJohn Marino b_mode = 1,
4385796c8dcSSimon Schubert /* byte operand with operand swapped */
439cf7f2e2dSJohn Marino b_swap_mode,
440c50c785cSJohn Marino /* byte operand, sign extend like 'T' suffix */
441c50c785cSJohn Marino b_T_mode,
4425796c8dcSSimon Schubert /* operand size depends on prefixes */
443cf7f2e2dSJohn Marino v_mode,
4445796c8dcSSimon Schubert /* operand size depends on prefixes with operand swapped */
445cf7f2e2dSJohn Marino v_swap_mode,
4465796c8dcSSimon Schubert /* word operand */
447cf7f2e2dSJohn Marino w_mode,
4485796c8dcSSimon Schubert /* double word operand */
449cf7f2e2dSJohn Marino d_mode,
4505796c8dcSSimon Schubert /* double word operand with operand swapped */
451cf7f2e2dSJohn Marino d_swap_mode,
4525796c8dcSSimon Schubert /* quad word operand */
453cf7f2e2dSJohn Marino q_mode,
4545796c8dcSSimon Schubert /* quad word operand with operand swapped */
455cf7f2e2dSJohn Marino q_swap_mode,
4565796c8dcSSimon Schubert /* ten-byte operand */
457cf7f2e2dSJohn Marino t_mode,
4585796c8dcSSimon Schubert /* 16-byte XMM or 32-byte YMM operand */
459cf7f2e2dSJohn Marino x_mode,
4605796c8dcSSimon Schubert /* 16-byte XMM or 32-byte YMM operand with operand swapped */
461cf7f2e2dSJohn Marino x_swap_mode,
4625796c8dcSSimon Schubert /* 16-byte XMM operand */
463cf7f2e2dSJohn Marino xmm_mode,
4645796c8dcSSimon Schubert /* 16-byte XMM or quad word operand */
465cf7f2e2dSJohn Marino xmmq_mode,
466a45ae5f8SJohn Marino /* XMM register or byte memory operand */
467a45ae5f8SJohn Marino xmm_mb_mode,
468a45ae5f8SJohn Marino /* XMM register or word memory operand */
469a45ae5f8SJohn Marino xmm_mw_mode,
470a45ae5f8SJohn Marino /* XMM register or double word memory operand */
471a45ae5f8SJohn Marino xmm_md_mode,
472a45ae5f8SJohn Marino /* XMM register or quad word memory operand */
473a45ae5f8SJohn Marino xmm_mq_mode,
474a45ae5f8SJohn Marino /* 16-byte XMM, word or double word operand */
475a45ae5f8SJohn Marino xmmdw_mode,
476a45ae5f8SJohn Marino /* 16-byte XMM, double word or quad word operand */
477a45ae5f8SJohn Marino xmmqd_mode,
4785796c8dcSSimon Schubert /* 32-byte YMM or quad word operand */
479cf7f2e2dSJohn Marino ymmq_mode,
480a45ae5f8SJohn Marino /* 32-byte YMM or 16-byte word operand */
481a45ae5f8SJohn Marino ymmxmm_mode,
4825796c8dcSSimon Schubert /* d_mode in 32bit, q_mode in 64bit mode. */
483cf7f2e2dSJohn Marino m_mode,
4845796c8dcSSimon Schubert /* pair of v_mode operands */
485cf7f2e2dSJohn Marino a_mode,
486cf7f2e2dSJohn Marino cond_jump_mode,
487cf7f2e2dSJohn Marino loop_jcxz_mode,
4885796c8dcSSimon Schubert /* operand size depends on REX prefixes. */
489cf7f2e2dSJohn Marino dq_mode,
4905796c8dcSSimon Schubert /* registers like dq_mode, memory like w_mode. */
491cf7f2e2dSJohn Marino dqw_mode,
4925796c8dcSSimon Schubert /* 4- or 6-byte pointer operand */
493cf7f2e2dSJohn Marino f_mode,
494cf7f2e2dSJohn Marino const_1_mode,
4955796c8dcSSimon Schubert /* v_mode for stack-related opcodes. */
496cf7f2e2dSJohn Marino stack_v_mode,
4975796c8dcSSimon Schubert /* non-quad operand size depends on prefixes */
498cf7f2e2dSJohn Marino z_mode,
4995796c8dcSSimon Schubert /* 16-byte operand */
500cf7f2e2dSJohn Marino o_mode,
5015796c8dcSSimon Schubert /* registers like dq_mode, memory like b_mode. */
502cf7f2e2dSJohn Marino dqb_mode,
5035796c8dcSSimon Schubert /* registers like dq_mode, memory like d_mode. */
504cf7f2e2dSJohn Marino dqd_mode,
5055796c8dcSSimon Schubert /* normal vex mode */
506cf7f2e2dSJohn Marino vex_mode,
5075796c8dcSSimon Schubert /* 128bit vex mode */
508cf7f2e2dSJohn Marino vex128_mode,
5095796c8dcSSimon Schubert /* 256bit vex mode */
510cf7f2e2dSJohn Marino vex256_mode,
5115796c8dcSSimon Schubert /* operand size depends on the VEX.W bit. */
512cf7f2e2dSJohn Marino vex_w_dq_mode,
5135796c8dcSSimon Schubert
514a45ae5f8SJohn Marino /* Similar to vex_w_dq_mode, with VSIB dword indices. */
515a45ae5f8SJohn Marino vex_vsib_d_w_dq_mode,
516a45ae5f8SJohn Marino /* Similar to vex_w_dq_mode, with VSIB qword indices. */
517a45ae5f8SJohn Marino vex_vsib_q_w_dq_mode,
518a45ae5f8SJohn Marino
519cf7f2e2dSJohn Marino /* scalar, ignore vector length. */
520cf7f2e2dSJohn Marino scalar_mode,
521cf7f2e2dSJohn Marino /* like d_mode, ignore vector length. */
522cf7f2e2dSJohn Marino d_scalar_mode,
523cf7f2e2dSJohn Marino /* like d_swap_mode, ignore vector length. */
524cf7f2e2dSJohn Marino d_scalar_swap_mode,
525cf7f2e2dSJohn Marino /* like q_mode, ignore vector length. */
526cf7f2e2dSJohn Marino q_scalar_mode,
527cf7f2e2dSJohn Marino /* like q_swap_mode, ignore vector length. */
528cf7f2e2dSJohn Marino q_scalar_swap_mode,
529cf7f2e2dSJohn Marino /* like vex_mode, ignore vector length. */
530cf7f2e2dSJohn Marino vex_scalar_mode,
531cf7f2e2dSJohn Marino /* like vex_w_dq_mode, ignore vector length. */
532cf7f2e2dSJohn Marino vex_scalar_w_dq_mode,
5335796c8dcSSimon Schubert
534cf7f2e2dSJohn Marino es_reg,
535cf7f2e2dSJohn Marino cs_reg,
536cf7f2e2dSJohn Marino ss_reg,
537cf7f2e2dSJohn Marino ds_reg,
538cf7f2e2dSJohn Marino fs_reg,
539cf7f2e2dSJohn Marino gs_reg,
5405796c8dcSSimon Schubert
541cf7f2e2dSJohn Marino eAX_reg,
542cf7f2e2dSJohn Marino eCX_reg,
543cf7f2e2dSJohn Marino eDX_reg,
544cf7f2e2dSJohn Marino eBX_reg,
545cf7f2e2dSJohn Marino eSP_reg,
546cf7f2e2dSJohn Marino eBP_reg,
547cf7f2e2dSJohn Marino eSI_reg,
548cf7f2e2dSJohn Marino eDI_reg,
5495796c8dcSSimon Schubert
550cf7f2e2dSJohn Marino al_reg,
551cf7f2e2dSJohn Marino cl_reg,
552cf7f2e2dSJohn Marino dl_reg,
553cf7f2e2dSJohn Marino bl_reg,
554cf7f2e2dSJohn Marino ah_reg,
555cf7f2e2dSJohn Marino ch_reg,
556cf7f2e2dSJohn Marino dh_reg,
557cf7f2e2dSJohn Marino bh_reg,
5585796c8dcSSimon Schubert
559cf7f2e2dSJohn Marino ax_reg,
560cf7f2e2dSJohn Marino cx_reg,
561cf7f2e2dSJohn Marino dx_reg,
562cf7f2e2dSJohn Marino bx_reg,
563cf7f2e2dSJohn Marino sp_reg,
564cf7f2e2dSJohn Marino bp_reg,
565cf7f2e2dSJohn Marino si_reg,
566cf7f2e2dSJohn Marino di_reg,
5675796c8dcSSimon Schubert
568cf7f2e2dSJohn Marino rAX_reg,
569cf7f2e2dSJohn Marino rCX_reg,
570cf7f2e2dSJohn Marino rDX_reg,
571cf7f2e2dSJohn Marino rBX_reg,
572cf7f2e2dSJohn Marino rSP_reg,
573cf7f2e2dSJohn Marino rBP_reg,
574cf7f2e2dSJohn Marino rSI_reg,
575cf7f2e2dSJohn Marino rDI_reg,
5765796c8dcSSimon Schubert
577cf7f2e2dSJohn Marino z_mode_ax_reg,
578cf7f2e2dSJohn Marino indir_dx_reg
579cf7f2e2dSJohn Marino };
5805796c8dcSSimon Schubert
581cf7f2e2dSJohn Marino enum
582cf7f2e2dSJohn Marino {
583cf7f2e2dSJohn Marino FLOATCODE = 1,
584cf7f2e2dSJohn Marino USE_REG_TABLE,
585cf7f2e2dSJohn Marino USE_MOD_TABLE,
586cf7f2e2dSJohn Marino USE_RM_TABLE,
587cf7f2e2dSJohn Marino USE_PREFIX_TABLE,
588cf7f2e2dSJohn Marino USE_X86_64_TABLE,
589cf7f2e2dSJohn Marino USE_3BYTE_TABLE,
590cf7f2e2dSJohn Marino USE_XOP_8F_TABLE,
591cf7f2e2dSJohn Marino USE_VEX_C4_TABLE,
592cf7f2e2dSJohn Marino USE_VEX_C5_TABLE,
593cf7f2e2dSJohn Marino USE_VEX_LEN_TABLE,
594cf7f2e2dSJohn Marino USE_VEX_W_TABLE
595cf7f2e2dSJohn Marino };
5965796c8dcSSimon Schubert
5975796c8dcSSimon Schubert #define FLOAT NULL, { { NULL, FLOATCODE } }
5985796c8dcSSimon Schubert
5995796c8dcSSimon Schubert #define DIS386(T, I) NULL, { { NULL, (T)}, { NULL, (I) } }
6005796c8dcSSimon Schubert #define REG_TABLE(I) DIS386 (USE_REG_TABLE, (I))
6015796c8dcSSimon Schubert #define MOD_TABLE(I) DIS386 (USE_MOD_TABLE, (I))
6025796c8dcSSimon Schubert #define RM_TABLE(I) DIS386 (USE_RM_TABLE, (I))
6035796c8dcSSimon Schubert #define PREFIX_TABLE(I) DIS386 (USE_PREFIX_TABLE, (I))
6045796c8dcSSimon Schubert #define X86_64_TABLE(I) DIS386 (USE_X86_64_TABLE, (I))
6055796c8dcSSimon Schubert #define THREE_BYTE_TABLE(I) DIS386 (USE_3BYTE_TABLE, (I))
606cf7f2e2dSJohn Marino #define XOP_8F_TABLE(I) DIS386 (USE_XOP_8F_TABLE, (I))
6075796c8dcSSimon Schubert #define VEX_C4_TABLE(I) DIS386 (USE_VEX_C4_TABLE, (I))
6085796c8dcSSimon Schubert #define VEX_C5_TABLE(I) DIS386 (USE_VEX_C5_TABLE, (I))
6095796c8dcSSimon Schubert #define VEX_LEN_TABLE(I) DIS386 (USE_VEX_LEN_TABLE, (I))
610cf7f2e2dSJohn Marino #define VEX_W_TABLE(I) DIS386 (USE_VEX_W_TABLE, (I))
6115796c8dcSSimon Schubert
612cf7f2e2dSJohn Marino enum
613cf7f2e2dSJohn Marino {
614cf7f2e2dSJohn Marino REG_80 = 0,
615cf7f2e2dSJohn Marino REG_81,
616cf7f2e2dSJohn Marino REG_82,
617cf7f2e2dSJohn Marino REG_8F,
618cf7f2e2dSJohn Marino REG_C0,
619cf7f2e2dSJohn Marino REG_C1,
620cf7f2e2dSJohn Marino REG_C6,
621cf7f2e2dSJohn Marino REG_C7,
622cf7f2e2dSJohn Marino REG_D0,
623cf7f2e2dSJohn Marino REG_D1,
624cf7f2e2dSJohn Marino REG_D2,
625cf7f2e2dSJohn Marino REG_D3,
626cf7f2e2dSJohn Marino REG_F6,
627cf7f2e2dSJohn Marino REG_F7,
628cf7f2e2dSJohn Marino REG_FE,
629cf7f2e2dSJohn Marino REG_FF,
630cf7f2e2dSJohn Marino REG_0F00,
631cf7f2e2dSJohn Marino REG_0F01,
632cf7f2e2dSJohn Marino REG_0F0D,
633cf7f2e2dSJohn Marino REG_0F18,
634cf7f2e2dSJohn Marino REG_0F71,
635cf7f2e2dSJohn Marino REG_0F72,
636cf7f2e2dSJohn Marino REG_0F73,
637cf7f2e2dSJohn Marino REG_0FA6,
638cf7f2e2dSJohn Marino REG_0FA7,
639cf7f2e2dSJohn Marino REG_0FAE,
640cf7f2e2dSJohn Marino REG_0FBA,
641cf7f2e2dSJohn Marino REG_0FC7,
642c50c785cSJohn Marino REG_VEX_0F71,
643c50c785cSJohn Marino REG_VEX_0F72,
644c50c785cSJohn Marino REG_VEX_0F73,
645c50c785cSJohn Marino REG_VEX_0FAE,
646c50c785cSJohn Marino REG_VEX_0F38F3,
647cf7f2e2dSJohn Marino REG_XOP_LWPCB,
648c50c785cSJohn Marino REG_XOP_LWP,
649c50c785cSJohn Marino REG_XOP_TBM_01,
650c50c785cSJohn Marino REG_XOP_TBM_02
651cf7f2e2dSJohn Marino };
6525796c8dcSSimon Schubert
653cf7f2e2dSJohn Marino enum
654cf7f2e2dSJohn Marino {
655cf7f2e2dSJohn Marino MOD_8D = 0,
656*ef5ccd6cSJohn Marino MOD_C6_REG_7,
657*ef5ccd6cSJohn Marino MOD_C7_REG_7,
658cf7f2e2dSJohn Marino MOD_0F01_REG_0,
659cf7f2e2dSJohn Marino MOD_0F01_REG_1,
660cf7f2e2dSJohn Marino MOD_0F01_REG_2,
661cf7f2e2dSJohn Marino MOD_0F01_REG_3,
662cf7f2e2dSJohn Marino MOD_0F01_REG_7,
663cf7f2e2dSJohn Marino MOD_0F12_PREFIX_0,
664cf7f2e2dSJohn Marino MOD_0F13,
665cf7f2e2dSJohn Marino MOD_0F16_PREFIX_0,
666cf7f2e2dSJohn Marino MOD_0F17,
667cf7f2e2dSJohn Marino MOD_0F18_REG_0,
668cf7f2e2dSJohn Marino MOD_0F18_REG_1,
669cf7f2e2dSJohn Marino MOD_0F18_REG_2,
670cf7f2e2dSJohn Marino MOD_0F18_REG_3,
671*ef5ccd6cSJohn Marino MOD_0F18_REG_4,
672*ef5ccd6cSJohn Marino MOD_0F18_REG_5,
673*ef5ccd6cSJohn Marino MOD_0F18_REG_6,
674*ef5ccd6cSJohn Marino MOD_0F18_REG_7,
675cf7f2e2dSJohn Marino MOD_0F20,
676cf7f2e2dSJohn Marino MOD_0F21,
677cf7f2e2dSJohn Marino MOD_0F22,
678cf7f2e2dSJohn Marino MOD_0F23,
679cf7f2e2dSJohn Marino MOD_0F24,
680cf7f2e2dSJohn Marino MOD_0F26,
681cf7f2e2dSJohn Marino MOD_0F2B_PREFIX_0,
682cf7f2e2dSJohn Marino MOD_0F2B_PREFIX_1,
683cf7f2e2dSJohn Marino MOD_0F2B_PREFIX_2,
684cf7f2e2dSJohn Marino MOD_0F2B_PREFIX_3,
685cf7f2e2dSJohn Marino MOD_0F51,
686cf7f2e2dSJohn Marino MOD_0F71_REG_2,
687cf7f2e2dSJohn Marino MOD_0F71_REG_4,
688cf7f2e2dSJohn Marino MOD_0F71_REG_6,
689cf7f2e2dSJohn Marino MOD_0F72_REG_2,
690cf7f2e2dSJohn Marino MOD_0F72_REG_4,
691cf7f2e2dSJohn Marino MOD_0F72_REG_6,
692cf7f2e2dSJohn Marino MOD_0F73_REG_2,
693cf7f2e2dSJohn Marino MOD_0F73_REG_3,
694cf7f2e2dSJohn Marino MOD_0F73_REG_6,
695cf7f2e2dSJohn Marino MOD_0F73_REG_7,
696cf7f2e2dSJohn Marino MOD_0FAE_REG_0,
697cf7f2e2dSJohn Marino MOD_0FAE_REG_1,
698cf7f2e2dSJohn Marino MOD_0FAE_REG_2,
699cf7f2e2dSJohn Marino MOD_0FAE_REG_3,
700cf7f2e2dSJohn Marino MOD_0FAE_REG_4,
701cf7f2e2dSJohn Marino MOD_0FAE_REG_5,
702cf7f2e2dSJohn Marino MOD_0FAE_REG_6,
703cf7f2e2dSJohn Marino MOD_0FAE_REG_7,
704cf7f2e2dSJohn Marino MOD_0FB2,
705cf7f2e2dSJohn Marino MOD_0FB4,
706cf7f2e2dSJohn Marino MOD_0FB5,
707cf7f2e2dSJohn Marino MOD_0FC7_REG_6,
708cf7f2e2dSJohn Marino MOD_0FC7_REG_7,
709cf7f2e2dSJohn Marino MOD_0FD7,
710cf7f2e2dSJohn Marino MOD_0FE7_PREFIX_2,
711cf7f2e2dSJohn Marino MOD_0FF0_PREFIX_3,
712cf7f2e2dSJohn Marino MOD_0F382A_PREFIX_2,
713cf7f2e2dSJohn Marino MOD_62_32BIT,
714cf7f2e2dSJohn Marino MOD_C4_32BIT,
715cf7f2e2dSJohn Marino MOD_C5_32BIT,
716c50c785cSJohn Marino MOD_VEX_0F12_PREFIX_0,
717c50c785cSJohn Marino MOD_VEX_0F13,
718c50c785cSJohn Marino MOD_VEX_0F16_PREFIX_0,
719c50c785cSJohn Marino MOD_VEX_0F17,
720c50c785cSJohn Marino MOD_VEX_0F2B,
721c50c785cSJohn Marino MOD_VEX_0F50,
722c50c785cSJohn Marino MOD_VEX_0F71_REG_2,
723c50c785cSJohn Marino MOD_VEX_0F71_REG_4,
724c50c785cSJohn Marino MOD_VEX_0F71_REG_6,
725c50c785cSJohn Marino MOD_VEX_0F72_REG_2,
726c50c785cSJohn Marino MOD_VEX_0F72_REG_4,
727c50c785cSJohn Marino MOD_VEX_0F72_REG_6,
728c50c785cSJohn Marino MOD_VEX_0F73_REG_2,
729c50c785cSJohn Marino MOD_VEX_0F73_REG_3,
730c50c785cSJohn Marino MOD_VEX_0F73_REG_6,
731c50c785cSJohn Marino MOD_VEX_0F73_REG_7,
732c50c785cSJohn Marino MOD_VEX_0FAE_REG_2,
733c50c785cSJohn Marino MOD_VEX_0FAE_REG_3,
734c50c785cSJohn Marino MOD_VEX_0FD7_PREFIX_2,
735c50c785cSJohn Marino MOD_VEX_0FE7_PREFIX_2,
736c50c785cSJohn Marino MOD_VEX_0FF0_PREFIX_3,
737c50c785cSJohn Marino MOD_VEX_0F381A_PREFIX_2,
738c50c785cSJohn Marino MOD_VEX_0F382A_PREFIX_2,
739c50c785cSJohn Marino MOD_VEX_0F382C_PREFIX_2,
740c50c785cSJohn Marino MOD_VEX_0F382D_PREFIX_2,
741c50c785cSJohn Marino MOD_VEX_0F382E_PREFIX_2,
742a45ae5f8SJohn Marino MOD_VEX_0F382F_PREFIX_2,
743a45ae5f8SJohn Marino MOD_VEX_0F385A_PREFIX_2,
744a45ae5f8SJohn Marino MOD_VEX_0F388C_PREFIX_2,
745a45ae5f8SJohn Marino MOD_VEX_0F388E_PREFIX_2,
746cf7f2e2dSJohn Marino };
7475796c8dcSSimon Schubert
748cf7f2e2dSJohn Marino enum
749cf7f2e2dSJohn Marino {
750*ef5ccd6cSJohn Marino RM_C6_REG_7 = 0,
751*ef5ccd6cSJohn Marino RM_C7_REG_7,
752*ef5ccd6cSJohn Marino RM_0F01_REG_0,
753cf7f2e2dSJohn Marino RM_0F01_REG_1,
754cf7f2e2dSJohn Marino RM_0F01_REG_2,
755cf7f2e2dSJohn Marino RM_0F01_REG_3,
756cf7f2e2dSJohn Marino RM_0F01_REG_7,
757cf7f2e2dSJohn Marino RM_0FAE_REG_5,
758cf7f2e2dSJohn Marino RM_0FAE_REG_6,
759cf7f2e2dSJohn Marino RM_0FAE_REG_7
760cf7f2e2dSJohn Marino };
7615796c8dcSSimon Schubert
762cf7f2e2dSJohn Marino enum
763cf7f2e2dSJohn Marino {
764cf7f2e2dSJohn Marino PREFIX_90 = 0,
765cf7f2e2dSJohn Marino PREFIX_0F10,
766cf7f2e2dSJohn Marino PREFIX_0F11,
767cf7f2e2dSJohn Marino PREFIX_0F12,
768cf7f2e2dSJohn Marino PREFIX_0F16,
769cf7f2e2dSJohn Marino PREFIX_0F2A,
770cf7f2e2dSJohn Marino PREFIX_0F2B,
771cf7f2e2dSJohn Marino PREFIX_0F2C,
772cf7f2e2dSJohn Marino PREFIX_0F2D,
773cf7f2e2dSJohn Marino PREFIX_0F2E,
774cf7f2e2dSJohn Marino PREFIX_0F2F,
775cf7f2e2dSJohn Marino PREFIX_0F51,
776cf7f2e2dSJohn Marino PREFIX_0F52,
777cf7f2e2dSJohn Marino PREFIX_0F53,
778cf7f2e2dSJohn Marino PREFIX_0F58,
779cf7f2e2dSJohn Marino PREFIX_0F59,
780cf7f2e2dSJohn Marino PREFIX_0F5A,
781cf7f2e2dSJohn Marino PREFIX_0F5B,
782cf7f2e2dSJohn Marino PREFIX_0F5C,
783cf7f2e2dSJohn Marino PREFIX_0F5D,
784cf7f2e2dSJohn Marino PREFIX_0F5E,
785cf7f2e2dSJohn Marino PREFIX_0F5F,
786cf7f2e2dSJohn Marino PREFIX_0F60,
787cf7f2e2dSJohn Marino PREFIX_0F61,
788cf7f2e2dSJohn Marino PREFIX_0F62,
789cf7f2e2dSJohn Marino PREFIX_0F6C,
790cf7f2e2dSJohn Marino PREFIX_0F6D,
791cf7f2e2dSJohn Marino PREFIX_0F6F,
792cf7f2e2dSJohn Marino PREFIX_0F70,
793cf7f2e2dSJohn Marino PREFIX_0F73_REG_3,
794cf7f2e2dSJohn Marino PREFIX_0F73_REG_7,
795cf7f2e2dSJohn Marino PREFIX_0F78,
796cf7f2e2dSJohn Marino PREFIX_0F79,
797cf7f2e2dSJohn Marino PREFIX_0F7C,
798cf7f2e2dSJohn Marino PREFIX_0F7D,
799cf7f2e2dSJohn Marino PREFIX_0F7E,
800cf7f2e2dSJohn Marino PREFIX_0F7F,
801cf7f2e2dSJohn Marino PREFIX_0FAE_REG_0,
802cf7f2e2dSJohn Marino PREFIX_0FAE_REG_1,
803cf7f2e2dSJohn Marino PREFIX_0FAE_REG_2,
804cf7f2e2dSJohn Marino PREFIX_0FAE_REG_3,
805cf7f2e2dSJohn Marino PREFIX_0FB8,
806c50c785cSJohn Marino PREFIX_0FBC,
807cf7f2e2dSJohn Marino PREFIX_0FBD,
808cf7f2e2dSJohn Marino PREFIX_0FC2,
809cf7f2e2dSJohn Marino PREFIX_0FC3,
810cf7f2e2dSJohn Marino PREFIX_0FC7_REG_6,
811cf7f2e2dSJohn Marino PREFIX_0FD0,
812cf7f2e2dSJohn Marino PREFIX_0FD6,
813cf7f2e2dSJohn Marino PREFIX_0FE6,
814cf7f2e2dSJohn Marino PREFIX_0FE7,
815cf7f2e2dSJohn Marino PREFIX_0FF0,
816cf7f2e2dSJohn Marino PREFIX_0FF7,
817cf7f2e2dSJohn Marino PREFIX_0F3810,
818cf7f2e2dSJohn Marino PREFIX_0F3814,
819cf7f2e2dSJohn Marino PREFIX_0F3815,
820cf7f2e2dSJohn Marino PREFIX_0F3817,
821cf7f2e2dSJohn Marino PREFIX_0F3820,
822cf7f2e2dSJohn Marino PREFIX_0F3821,
823cf7f2e2dSJohn Marino PREFIX_0F3822,
824cf7f2e2dSJohn Marino PREFIX_0F3823,
825cf7f2e2dSJohn Marino PREFIX_0F3824,
826cf7f2e2dSJohn Marino PREFIX_0F3825,
827cf7f2e2dSJohn Marino PREFIX_0F3828,
828cf7f2e2dSJohn Marino PREFIX_0F3829,
829cf7f2e2dSJohn Marino PREFIX_0F382A,
830cf7f2e2dSJohn Marino PREFIX_0F382B,
831cf7f2e2dSJohn Marino PREFIX_0F3830,
832cf7f2e2dSJohn Marino PREFIX_0F3831,
833cf7f2e2dSJohn Marino PREFIX_0F3832,
834cf7f2e2dSJohn Marino PREFIX_0F3833,
835cf7f2e2dSJohn Marino PREFIX_0F3834,
836cf7f2e2dSJohn Marino PREFIX_0F3835,
837cf7f2e2dSJohn Marino PREFIX_0F3837,
838cf7f2e2dSJohn Marino PREFIX_0F3838,
839cf7f2e2dSJohn Marino PREFIX_0F3839,
840cf7f2e2dSJohn Marino PREFIX_0F383A,
841cf7f2e2dSJohn Marino PREFIX_0F383B,
842cf7f2e2dSJohn Marino PREFIX_0F383C,
843cf7f2e2dSJohn Marino PREFIX_0F383D,
844cf7f2e2dSJohn Marino PREFIX_0F383E,
845cf7f2e2dSJohn Marino PREFIX_0F383F,
846cf7f2e2dSJohn Marino PREFIX_0F3840,
847cf7f2e2dSJohn Marino PREFIX_0F3841,
848cf7f2e2dSJohn Marino PREFIX_0F3880,
849cf7f2e2dSJohn Marino PREFIX_0F3881,
850a45ae5f8SJohn Marino PREFIX_0F3882,
851cf7f2e2dSJohn Marino PREFIX_0F38DB,
852cf7f2e2dSJohn Marino PREFIX_0F38DC,
853cf7f2e2dSJohn Marino PREFIX_0F38DD,
854cf7f2e2dSJohn Marino PREFIX_0F38DE,
855cf7f2e2dSJohn Marino PREFIX_0F38DF,
856cf7f2e2dSJohn Marino PREFIX_0F38F0,
857cf7f2e2dSJohn Marino PREFIX_0F38F1,
858*ef5ccd6cSJohn Marino PREFIX_0F38F6,
859cf7f2e2dSJohn Marino PREFIX_0F3A08,
860cf7f2e2dSJohn Marino PREFIX_0F3A09,
861cf7f2e2dSJohn Marino PREFIX_0F3A0A,
862cf7f2e2dSJohn Marino PREFIX_0F3A0B,
863cf7f2e2dSJohn Marino PREFIX_0F3A0C,
864cf7f2e2dSJohn Marino PREFIX_0F3A0D,
865cf7f2e2dSJohn Marino PREFIX_0F3A0E,
866cf7f2e2dSJohn Marino PREFIX_0F3A14,
867cf7f2e2dSJohn Marino PREFIX_0F3A15,
868cf7f2e2dSJohn Marino PREFIX_0F3A16,
869cf7f2e2dSJohn Marino PREFIX_0F3A17,
870cf7f2e2dSJohn Marino PREFIX_0F3A20,
871cf7f2e2dSJohn Marino PREFIX_0F3A21,
872cf7f2e2dSJohn Marino PREFIX_0F3A22,
873cf7f2e2dSJohn Marino PREFIX_0F3A40,
874cf7f2e2dSJohn Marino PREFIX_0F3A41,
875cf7f2e2dSJohn Marino PREFIX_0F3A42,
876cf7f2e2dSJohn Marino PREFIX_0F3A44,
877cf7f2e2dSJohn Marino PREFIX_0F3A60,
878cf7f2e2dSJohn Marino PREFIX_0F3A61,
879cf7f2e2dSJohn Marino PREFIX_0F3A62,
880cf7f2e2dSJohn Marino PREFIX_0F3A63,
881cf7f2e2dSJohn Marino PREFIX_0F3ADF,
882c50c785cSJohn Marino PREFIX_VEX_0F10,
883c50c785cSJohn Marino PREFIX_VEX_0F11,
884c50c785cSJohn Marino PREFIX_VEX_0F12,
885c50c785cSJohn Marino PREFIX_VEX_0F16,
886c50c785cSJohn Marino PREFIX_VEX_0F2A,
887c50c785cSJohn Marino PREFIX_VEX_0F2C,
888c50c785cSJohn Marino PREFIX_VEX_0F2D,
889c50c785cSJohn Marino PREFIX_VEX_0F2E,
890c50c785cSJohn Marino PREFIX_VEX_0F2F,
891c50c785cSJohn Marino PREFIX_VEX_0F51,
892c50c785cSJohn Marino PREFIX_VEX_0F52,
893c50c785cSJohn Marino PREFIX_VEX_0F53,
894c50c785cSJohn Marino PREFIX_VEX_0F58,
895c50c785cSJohn Marino PREFIX_VEX_0F59,
896c50c785cSJohn Marino PREFIX_VEX_0F5A,
897c50c785cSJohn Marino PREFIX_VEX_0F5B,
898c50c785cSJohn Marino PREFIX_VEX_0F5C,
899c50c785cSJohn Marino PREFIX_VEX_0F5D,
900c50c785cSJohn Marino PREFIX_VEX_0F5E,
901c50c785cSJohn Marino PREFIX_VEX_0F5F,
902c50c785cSJohn Marino PREFIX_VEX_0F60,
903c50c785cSJohn Marino PREFIX_VEX_0F61,
904c50c785cSJohn Marino PREFIX_VEX_0F62,
905c50c785cSJohn Marino PREFIX_VEX_0F63,
906c50c785cSJohn Marino PREFIX_VEX_0F64,
907c50c785cSJohn Marino PREFIX_VEX_0F65,
908c50c785cSJohn Marino PREFIX_VEX_0F66,
909c50c785cSJohn Marino PREFIX_VEX_0F67,
910c50c785cSJohn Marino PREFIX_VEX_0F68,
911c50c785cSJohn Marino PREFIX_VEX_0F69,
912c50c785cSJohn Marino PREFIX_VEX_0F6A,
913c50c785cSJohn Marino PREFIX_VEX_0F6B,
914c50c785cSJohn Marino PREFIX_VEX_0F6C,
915c50c785cSJohn Marino PREFIX_VEX_0F6D,
916c50c785cSJohn Marino PREFIX_VEX_0F6E,
917c50c785cSJohn Marino PREFIX_VEX_0F6F,
918c50c785cSJohn Marino PREFIX_VEX_0F70,
919c50c785cSJohn Marino PREFIX_VEX_0F71_REG_2,
920c50c785cSJohn Marino PREFIX_VEX_0F71_REG_4,
921c50c785cSJohn Marino PREFIX_VEX_0F71_REG_6,
922c50c785cSJohn Marino PREFIX_VEX_0F72_REG_2,
923c50c785cSJohn Marino PREFIX_VEX_0F72_REG_4,
924c50c785cSJohn Marino PREFIX_VEX_0F72_REG_6,
925c50c785cSJohn Marino PREFIX_VEX_0F73_REG_2,
926c50c785cSJohn Marino PREFIX_VEX_0F73_REG_3,
927c50c785cSJohn Marino PREFIX_VEX_0F73_REG_6,
928c50c785cSJohn Marino PREFIX_VEX_0F73_REG_7,
929c50c785cSJohn Marino PREFIX_VEX_0F74,
930c50c785cSJohn Marino PREFIX_VEX_0F75,
931c50c785cSJohn Marino PREFIX_VEX_0F76,
932c50c785cSJohn Marino PREFIX_VEX_0F77,
933c50c785cSJohn Marino PREFIX_VEX_0F7C,
934c50c785cSJohn Marino PREFIX_VEX_0F7D,
935c50c785cSJohn Marino PREFIX_VEX_0F7E,
936c50c785cSJohn Marino PREFIX_VEX_0F7F,
937c50c785cSJohn Marino PREFIX_VEX_0FC2,
938c50c785cSJohn Marino PREFIX_VEX_0FC4,
939c50c785cSJohn Marino PREFIX_VEX_0FC5,
940c50c785cSJohn Marino PREFIX_VEX_0FD0,
941c50c785cSJohn Marino PREFIX_VEX_0FD1,
942c50c785cSJohn Marino PREFIX_VEX_0FD2,
943c50c785cSJohn Marino PREFIX_VEX_0FD3,
944c50c785cSJohn Marino PREFIX_VEX_0FD4,
945c50c785cSJohn Marino PREFIX_VEX_0FD5,
946c50c785cSJohn Marino PREFIX_VEX_0FD6,
947c50c785cSJohn Marino PREFIX_VEX_0FD7,
948c50c785cSJohn Marino PREFIX_VEX_0FD8,
949c50c785cSJohn Marino PREFIX_VEX_0FD9,
950c50c785cSJohn Marino PREFIX_VEX_0FDA,
951c50c785cSJohn Marino PREFIX_VEX_0FDB,
952c50c785cSJohn Marino PREFIX_VEX_0FDC,
953c50c785cSJohn Marino PREFIX_VEX_0FDD,
954c50c785cSJohn Marino PREFIX_VEX_0FDE,
955c50c785cSJohn Marino PREFIX_VEX_0FDF,
956c50c785cSJohn Marino PREFIX_VEX_0FE0,
957c50c785cSJohn Marino PREFIX_VEX_0FE1,
958c50c785cSJohn Marino PREFIX_VEX_0FE2,
959c50c785cSJohn Marino PREFIX_VEX_0FE3,
960c50c785cSJohn Marino PREFIX_VEX_0FE4,
961c50c785cSJohn Marino PREFIX_VEX_0FE5,
962c50c785cSJohn Marino PREFIX_VEX_0FE6,
963c50c785cSJohn Marino PREFIX_VEX_0FE7,
964c50c785cSJohn Marino PREFIX_VEX_0FE8,
965c50c785cSJohn Marino PREFIX_VEX_0FE9,
966c50c785cSJohn Marino PREFIX_VEX_0FEA,
967c50c785cSJohn Marino PREFIX_VEX_0FEB,
968c50c785cSJohn Marino PREFIX_VEX_0FEC,
969c50c785cSJohn Marino PREFIX_VEX_0FED,
970c50c785cSJohn Marino PREFIX_VEX_0FEE,
971c50c785cSJohn Marino PREFIX_VEX_0FEF,
972c50c785cSJohn Marino PREFIX_VEX_0FF0,
973c50c785cSJohn Marino PREFIX_VEX_0FF1,
974c50c785cSJohn Marino PREFIX_VEX_0FF2,
975c50c785cSJohn Marino PREFIX_VEX_0FF3,
976c50c785cSJohn Marino PREFIX_VEX_0FF4,
977c50c785cSJohn Marino PREFIX_VEX_0FF5,
978c50c785cSJohn Marino PREFIX_VEX_0FF6,
979c50c785cSJohn Marino PREFIX_VEX_0FF7,
980c50c785cSJohn Marino PREFIX_VEX_0FF8,
981c50c785cSJohn Marino PREFIX_VEX_0FF9,
982c50c785cSJohn Marino PREFIX_VEX_0FFA,
983c50c785cSJohn Marino PREFIX_VEX_0FFB,
984c50c785cSJohn Marino PREFIX_VEX_0FFC,
985c50c785cSJohn Marino PREFIX_VEX_0FFD,
986c50c785cSJohn Marino PREFIX_VEX_0FFE,
987c50c785cSJohn Marino PREFIX_VEX_0F3800,
988c50c785cSJohn Marino PREFIX_VEX_0F3801,
989c50c785cSJohn Marino PREFIX_VEX_0F3802,
990c50c785cSJohn Marino PREFIX_VEX_0F3803,
991c50c785cSJohn Marino PREFIX_VEX_0F3804,
992c50c785cSJohn Marino PREFIX_VEX_0F3805,
993c50c785cSJohn Marino PREFIX_VEX_0F3806,
994c50c785cSJohn Marino PREFIX_VEX_0F3807,
995c50c785cSJohn Marino PREFIX_VEX_0F3808,
996c50c785cSJohn Marino PREFIX_VEX_0F3809,
997c50c785cSJohn Marino PREFIX_VEX_0F380A,
998c50c785cSJohn Marino PREFIX_VEX_0F380B,
999c50c785cSJohn Marino PREFIX_VEX_0F380C,
1000c50c785cSJohn Marino PREFIX_VEX_0F380D,
1001c50c785cSJohn Marino PREFIX_VEX_0F380E,
1002c50c785cSJohn Marino PREFIX_VEX_0F380F,
1003c50c785cSJohn Marino PREFIX_VEX_0F3813,
1004a45ae5f8SJohn Marino PREFIX_VEX_0F3816,
1005c50c785cSJohn Marino PREFIX_VEX_0F3817,
1006c50c785cSJohn Marino PREFIX_VEX_0F3818,
1007c50c785cSJohn Marino PREFIX_VEX_0F3819,
1008c50c785cSJohn Marino PREFIX_VEX_0F381A,
1009c50c785cSJohn Marino PREFIX_VEX_0F381C,
1010c50c785cSJohn Marino PREFIX_VEX_0F381D,
1011c50c785cSJohn Marino PREFIX_VEX_0F381E,
1012c50c785cSJohn Marino PREFIX_VEX_0F3820,
1013c50c785cSJohn Marino PREFIX_VEX_0F3821,
1014c50c785cSJohn Marino PREFIX_VEX_0F3822,
1015c50c785cSJohn Marino PREFIX_VEX_0F3823,
1016c50c785cSJohn Marino PREFIX_VEX_0F3824,
1017c50c785cSJohn Marino PREFIX_VEX_0F3825,
1018c50c785cSJohn Marino PREFIX_VEX_0F3828,
1019c50c785cSJohn Marino PREFIX_VEX_0F3829,
1020c50c785cSJohn Marino PREFIX_VEX_0F382A,
1021c50c785cSJohn Marino PREFIX_VEX_0F382B,
1022c50c785cSJohn Marino PREFIX_VEX_0F382C,
1023c50c785cSJohn Marino PREFIX_VEX_0F382D,
1024c50c785cSJohn Marino PREFIX_VEX_0F382E,
1025c50c785cSJohn Marino PREFIX_VEX_0F382F,
1026c50c785cSJohn Marino PREFIX_VEX_0F3830,
1027c50c785cSJohn Marino PREFIX_VEX_0F3831,
1028c50c785cSJohn Marino PREFIX_VEX_0F3832,
1029c50c785cSJohn Marino PREFIX_VEX_0F3833,
1030c50c785cSJohn Marino PREFIX_VEX_0F3834,
1031c50c785cSJohn Marino PREFIX_VEX_0F3835,
1032a45ae5f8SJohn Marino PREFIX_VEX_0F3836,
1033c50c785cSJohn Marino PREFIX_VEX_0F3837,
1034c50c785cSJohn Marino PREFIX_VEX_0F3838,
1035c50c785cSJohn Marino PREFIX_VEX_0F3839,
1036c50c785cSJohn Marino PREFIX_VEX_0F383A,
1037c50c785cSJohn Marino PREFIX_VEX_0F383B,
1038c50c785cSJohn Marino PREFIX_VEX_0F383C,
1039c50c785cSJohn Marino PREFIX_VEX_0F383D,
1040c50c785cSJohn Marino PREFIX_VEX_0F383E,
1041c50c785cSJohn Marino PREFIX_VEX_0F383F,
1042c50c785cSJohn Marino PREFIX_VEX_0F3840,
1043c50c785cSJohn Marino PREFIX_VEX_0F3841,
1044a45ae5f8SJohn Marino PREFIX_VEX_0F3845,
1045a45ae5f8SJohn Marino PREFIX_VEX_0F3846,
1046a45ae5f8SJohn Marino PREFIX_VEX_0F3847,
1047a45ae5f8SJohn Marino PREFIX_VEX_0F3858,
1048a45ae5f8SJohn Marino PREFIX_VEX_0F3859,
1049a45ae5f8SJohn Marino PREFIX_VEX_0F385A,
1050a45ae5f8SJohn Marino PREFIX_VEX_0F3878,
1051a45ae5f8SJohn Marino PREFIX_VEX_0F3879,
1052a45ae5f8SJohn Marino PREFIX_VEX_0F388C,
1053a45ae5f8SJohn Marino PREFIX_VEX_0F388E,
1054a45ae5f8SJohn Marino PREFIX_VEX_0F3890,
1055a45ae5f8SJohn Marino PREFIX_VEX_0F3891,
1056a45ae5f8SJohn Marino PREFIX_VEX_0F3892,
1057a45ae5f8SJohn Marino PREFIX_VEX_0F3893,
1058c50c785cSJohn Marino PREFIX_VEX_0F3896,
1059c50c785cSJohn Marino PREFIX_VEX_0F3897,
1060c50c785cSJohn Marino PREFIX_VEX_0F3898,
1061c50c785cSJohn Marino PREFIX_VEX_0F3899,
1062c50c785cSJohn Marino PREFIX_VEX_0F389A,
1063c50c785cSJohn Marino PREFIX_VEX_0F389B,
1064c50c785cSJohn Marino PREFIX_VEX_0F389C,
1065c50c785cSJohn Marino PREFIX_VEX_0F389D,
1066c50c785cSJohn Marino PREFIX_VEX_0F389E,
1067c50c785cSJohn Marino PREFIX_VEX_0F389F,
1068c50c785cSJohn Marino PREFIX_VEX_0F38A6,
1069c50c785cSJohn Marino PREFIX_VEX_0F38A7,
1070c50c785cSJohn Marino PREFIX_VEX_0F38A8,
1071c50c785cSJohn Marino PREFIX_VEX_0F38A9,
1072c50c785cSJohn Marino PREFIX_VEX_0F38AA,
1073c50c785cSJohn Marino PREFIX_VEX_0F38AB,
1074c50c785cSJohn Marino PREFIX_VEX_0F38AC,
1075c50c785cSJohn Marino PREFIX_VEX_0F38AD,
1076c50c785cSJohn Marino PREFIX_VEX_0F38AE,
1077c50c785cSJohn Marino PREFIX_VEX_0F38AF,
1078c50c785cSJohn Marino PREFIX_VEX_0F38B6,
1079c50c785cSJohn Marino PREFIX_VEX_0F38B7,
1080c50c785cSJohn Marino PREFIX_VEX_0F38B8,
1081c50c785cSJohn Marino PREFIX_VEX_0F38B9,
1082c50c785cSJohn Marino PREFIX_VEX_0F38BA,
1083c50c785cSJohn Marino PREFIX_VEX_0F38BB,
1084c50c785cSJohn Marino PREFIX_VEX_0F38BC,
1085c50c785cSJohn Marino PREFIX_VEX_0F38BD,
1086c50c785cSJohn Marino PREFIX_VEX_0F38BE,
1087c50c785cSJohn Marino PREFIX_VEX_0F38BF,
1088c50c785cSJohn Marino PREFIX_VEX_0F38DB,
1089c50c785cSJohn Marino PREFIX_VEX_0F38DC,
1090c50c785cSJohn Marino PREFIX_VEX_0F38DD,
1091c50c785cSJohn Marino PREFIX_VEX_0F38DE,
1092c50c785cSJohn Marino PREFIX_VEX_0F38DF,
1093c50c785cSJohn Marino PREFIX_VEX_0F38F2,
1094c50c785cSJohn Marino PREFIX_VEX_0F38F3_REG_1,
1095c50c785cSJohn Marino PREFIX_VEX_0F38F3_REG_2,
1096c50c785cSJohn Marino PREFIX_VEX_0F38F3_REG_3,
1097a45ae5f8SJohn Marino PREFIX_VEX_0F38F5,
1098a45ae5f8SJohn Marino PREFIX_VEX_0F38F6,
1099c50c785cSJohn Marino PREFIX_VEX_0F38F7,
1100a45ae5f8SJohn Marino PREFIX_VEX_0F3A00,
1101a45ae5f8SJohn Marino PREFIX_VEX_0F3A01,
1102a45ae5f8SJohn Marino PREFIX_VEX_0F3A02,
1103c50c785cSJohn Marino PREFIX_VEX_0F3A04,
1104c50c785cSJohn Marino PREFIX_VEX_0F3A05,
1105c50c785cSJohn Marino PREFIX_VEX_0F3A06,
1106c50c785cSJohn Marino PREFIX_VEX_0F3A08,
1107c50c785cSJohn Marino PREFIX_VEX_0F3A09,
1108c50c785cSJohn Marino PREFIX_VEX_0F3A0A,
1109c50c785cSJohn Marino PREFIX_VEX_0F3A0B,
1110c50c785cSJohn Marino PREFIX_VEX_0F3A0C,
1111c50c785cSJohn Marino PREFIX_VEX_0F3A0D,
1112c50c785cSJohn Marino PREFIX_VEX_0F3A0E,
1113c50c785cSJohn Marino PREFIX_VEX_0F3A0F,
1114c50c785cSJohn Marino PREFIX_VEX_0F3A14,
1115c50c785cSJohn Marino PREFIX_VEX_0F3A15,
1116c50c785cSJohn Marino PREFIX_VEX_0F3A16,
1117c50c785cSJohn Marino PREFIX_VEX_0F3A17,
1118c50c785cSJohn Marino PREFIX_VEX_0F3A18,
1119c50c785cSJohn Marino PREFIX_VEX_0F3A19,
1120c50c785cSJohn Marino PREFIX_VEX_0F3A1D,
1121c50c785cSJohn Marino PREFIX_VEX_0F3A20,
1122c50c785cSJohn Marino PREFIX_VEX_0F3A21,
1123c50c785cSJohn Marino PREFIX_VEX_0F3A22,
1124a45ae5f8SJohn Marino PREFIX_VEX_0F3A38,
1125a45ae5f8SJohn Marino PREFIX_VEX_0F3A39,
1126c50c785cSJohn Marino PREFIX_VEX_0F3A40,
1127c50c785cSJohn Marino PREFIX_VEX_0F3A41,
1128c50c785cSJohn Marino PREFIX_VEX_0F3A42,
1129c50c785cSJohn Marino PREFIX_VEX_0F3A44,
1130a45ae5f8SJohn Marino PREFIX_VEX_0F3A46,
1131c50c785cSJohn Marino PREFIX_VEX_0F3A48,
1132c50c785cSJohn Marino PREFIX_VEX_0F3A49,
1133c50c785cSJohn Marino PREFIX_VEX_0F3A4A,
1134c50c785cSJohn Marino PREFIX_VEX_0F3A4B,
1135c50c785cSJohn Marino PREFIX_VEX_0F3A4C,
1136c50c785cSJohn Marino PREFIX_VEX_0F3A5C,
1137c50c785cSJohn Marino PREFIX_VEX_0F3A5D,
1138c50c785cSJohn Marino PREFIX_VEX_0F3A5E,
1139c50c785cSJohn Marino PREFIX_VEX_0F3A5F,
1140c50c785cSJohn Marino PREFIX_VEX_0F3A60,
1141c50c785cSJohn Marino PREFIX_VEX_0F3A61,
1142c50c785cSJohn Marino PREFIX_VEX_0F3A62,
1143c50c785cSJohn Marino PREFIX_VEX_0F3A63,
1144c50c785cSJohn Marino PREFIX_VEX_0F3A68,
1145c50c785cSJohn Marino PREFIX_VEX_0F3A69,
1146c50c785cSJohn Marino PREFIX_VEX_0F3A6A,
1147c50c785cSJohn Marino PREFIX_VEX_0F3A6B,
1148c50c785cSJohn Marino PREFIX_VEX_0F3A6C,
1149c50c785cSJohn Marino PREFIX_VEX_0F3A6D,
1150c50c785cSJohn Marino PREFIX_VEX_0F3A6E,
1151c50c785cSJohn Marino PREFIX_VEX_0F3A6F,
1152c50c785cSJohn Marino PREFIX_VEX_0F3A78,
1153c50c785cSJohn Marino PREFIX_VEX_0F3A79,
1154c50c785cSJohn Marino PREFIX_VEX_0F3A7A,
1155c50c785cSJohn Marino PREFIX_VEX_0F3A7B,
1156c50c785cSJohn Marino PREFIX_VEX_0F3A7C,
1157c50c785cSJohn Marino PREFIX_VEX_0F3A7D,
1158c50c785cSJohn Marino PREFIX_VEX_0F3A7E,
1159c50c785cSJohn Marino PREFIX_VEX_0F3A7F,
1160a45ae5f8SJohn Marino PREFIX_VEX_0F3ADF,
1161a45ae5f8SJohn Marino PREFIX_VEX_0F3AF0
1162cf7f2e2dSJohn Marino };
11635796c8dcSSimon Schubert
1164cf7f2e2dSJohn Marino enum
1165cf7f2e2dSJohn Marino {
1166cf7f2e2dSJohn Marino X86_64_06 = 0,
1167cf7f2e2dSJohn Marino X86_64_07,
1168cf7f2e2dSJohn Marino X86_64_0D,
1169cf7f2e2dSJohn Marino X86_64_16,
1170cf7f2e2dSJohn Marino X86_64_17,
1171cf7f2e2dSJohn Marino X86_64_1E,
1172cf7f2e2dSJohn Marino X86_64_1F,
1173cf7f2e2dSJohn Marino X86_64_27,
1174cf7f2e2dSJohn Marino X86_64_2F,
1175cf7f2e2dSJohn Marino X86_64_37,
1176cf7f2e2dSJohn Marino X86_64_3F,
1177cf7f2e2dSJohn Marino X86_64_60,
1178cf7f2e2dSJohn Marino X86_64_61,
1179cf7f2e2dSJohn Marino X86_64_62,
1180cf7f2e2dSJohn Marino X86_64_63,
1181cf7f2e2dSJohn Marino X86_64_6D,
1182cf7f2e2dSJohn Marino X86_64_6F,
1183cf7f2e2dSJohn Marino X86_64_9A,
1184cf7f2e2dSJohn Marino X86_64_C4,
1185cf7f2e2dSJohn Marino X86_64_C5,
1186cf7f2e2dSJohn Marino X86_64_CE,
1187cf7f2e2dSJohn Marino X86_64_D4,
1188cf7f2e2dSJohn Marino X86_64_D5,
1189cf7f2e2dSJohn Marino X86_64_EA,
1190cf7f2e2dSJohn Marino X86_64_0F01_REG_0,
1191cf7f2e2dSJohn Marino X86_64_0F01_REG_1,
1192cf7f2e2dSJohn Marino X86_64_0F01_REG_2,
1193cf7f2e2dSJohn Marino X86_64_0F01_REG_3
1194cf7f2e2dSJohn Marino };
11955796c8dcSSimon Schubert
1196cf7f2e2dSJohn Marino enum
1197cf7f2e2dSJohn Marino {
1198cf7f2e2dSJohn Marino THREE_BYTE_0F38 = 0,
1199cf7f2e2dSJohn Marino THREE_BYTE_0F3A,
1200cf7f2e2dSJohn Marino THREE_BYTE_0F7A
1201cf7f2e2dSJohn Marino };
12025796c8dcSSimon Schubert
1203cf7f2e2dSJohn Marino enum
1204cf7f2e2dSJohn Marino {
1205cf7f2e2dSJohn Marino XOP_08 = 0,
1206cf7f2e2dSJohn Marino XOP_09,
1207cf7f2e2dSJohn Marino XOP_0A
1208cf7f2e2dSJohn Marino };
12095796c8dcSSimon Schubert
1210cf7f2e2dSJohn Marino enum
1211cf7f2e2dSJohn Marino {
1212cf7f2e2dSJohn Marino VEX_0F = 0,
1213cf7f2e2dSJohn Marino VEX_0F38,
1214cf7f2e2dSJohn Marino VEX_0F3A
1215cf7f2e2dSJohn Marino };
1216cf7f2e2dSJohn Marino
1217cf7f2e2dSJohn Marino enum
1218cf7f2e2dSJohn Marino {
1219c50c785cSJohn Marino VEX_LEN_0F10_P_1 = 0,
1220c50c785cSJohn Marino VEX_LEN_0F10_P_3,
1221c50c785cSJohn Marino VEX_LEN_0F11_P_1,
1222c50c785cSJohn Marino VEX_LEN_0F11_P_3,
1223c50c785cSJohn Marino VEX_LEN_0F12_P_0_M_0,
1224c50c785cSJohn Marino VEX_LEN_0F12_P_0_M_1,
1225c50c785cSJohn Marino VEX_LEN_0F12_P_2,
1226c50c785cSJohn Marino VEX_LEN_0F13_M_0,
1227c50c785cSJohn Marino VEX_LEN_0F16_P_0_M_0,
1228c50c785cSJohn Marino VEX_LEN_0F16_P_0_M_1,
1229c50c785cSJohn Marino VEX_LEN_0F16_P_2,
1230c50c785cSJohn Marino VEX_LEN_0F17_M_0,
1231c50c785cSJohn Marino VEX_LEN_0F2A_P_1,
1232c50c785cSJohn Marino VEX_LEN_0F2A_P_3,
1233c50c785cSJohn Marino VEX_LEN_0F2C_P_1,
1234c50c785cSJohn Marino VEX_LEN_0F2C_P_3,
1235c50c785cSJohn Marino VEX_LEN_0F2D_P_1,
1236c50c785cSJohn Marino VEX_LEN_0F2D_P_3,
1237c50c785cSJohn Marino VEX_LEN_0F2E_P_0,
1238c50c785cSJohn Marino VEX_LEN_0F2E_P_2,
1239c50c785cSJohn Marino VEX_LEN_0F2F_P_0,
1240c50c785cSJohn Marino VEX_LEN_0F2F_P_2,
1241c50c785cSJohn Marino VEX_LEN_0F51_P_1,
1242c50c785cSJohn Marino VEX_LEN_0F51_P_3,
1243c50c785cSJohn Marino VEX_LEN_0F52_P_1,
1244c50c785cSJohn Marino VEX_LEN_0F53_P_1,
1245c50c785cSJohn Marino VEX_LEN_0F58_P_1,
1246c50c785cSJohn Marino VEX_LEN_0F58_P_3,
1247c50c785cSJohn Marino VEX_LEN_0F59_P_1,
1248c50c785cSJohn Marino VEX_LEN_0F59_P_3,
1249c50c785cSJohn Marino VEX_LEN_0F5A_P_1,
1250c50c785cSJohn Marino VEX_LEN_0F5A_P_3,
1251c50c785cSJohn Marino VEX_LEN_0F5C_P_1,
1252c50c785cSJohn Marino VEX_LEN_0F5C_P_3,
1253c50c785cSJohn Marino VEX_LEN_0F5D_P_1,
1254c50c785cSJohn Marino VEX_LEN_0F5D_P_3,
1255c50c785cSJohn Marino VEX_LEN_0F5E_P_1,
1256c50c785cSJohn Marino VEX_LEN_0F5E_P_3,
1257c50c785cSJohn Marino VEX_LEN_0F5F_P_1,
1258c50c785cSJohn Marino VEX_LEN_0F5F_P_3,
1259c50c785cSJohn Marino VEX_LEN_0F6E_P_2,
1260c50c785cSJohn Marino VEX_LEN_0F7E_P_1,
1261c50c785cSJohn Marino VEX_LEN_0F7E_P_2,
1262c50c785cSJohn Marino VEX_LEN_0FAE_R_2_M_0,
1263c50c785cSJohn Marino VEX_LEN_0FAE_R_3_M_0,
1264c50c785cSJohn Marino VEX_LEN_0FC2_P_1,
1265c50c785cSJohn Marino VEX_LEN_0FC2_P_3,
1266c50c785cSJohn Marino VEX_LEN_0FC4_P_2,
1267c50c785cSJohn Marino VEX_LEN_0FC5_P_2,
1268c50c785cSJohn Marino VEX_LEN_0FD6_P_2,
1269c50c785cSJohn Marino VEX_LEN_0FF7_P_2,
1270a45ae5f8SJohn Marino VEX_LEN_0F3816_P_2,
1271a45ae5f8SJohn Marino VEX_LEN_0F3819_P_2,
1272c50c785cSJohn Marino VEX_LEN_0F381A_P_2_M_0,
1273a45ae5f8SJohn Marino VEX_LEN_0F3836_P_2,
1274c50c785cSJohn Marino VEX_LEN_0F3841_P_2,
1275a45ae5f8SJohn Marino VEX_LEN_0F385A_P_2_M_0,
1276c50c785cSJohn Marino VEX_LEN_0F38DB_P_2,
1277c50c785cSJohn Marino VEX_LEN_0F38DC_P_2,
1278c50c785cSJohn Marino VEX_LEN_0F38DD_P_2,
1279c50c785cSJohn Marino VEX_LEN_0F38DE_P_2,
1280c50c785cSJohn Marino VEX_LEN_0F38DF_P_2,
1281c50c785cSJohn Marino VEX_LEN_0F38F2_P_0,
1282c50c785cSJohn Marino VEX_LEN_0F38F3_R_1_P_0,
1283c50c785cSJohn Marino VEX_LEN_0F38F3_R_2_P_0,
1284c50c785cSJohn Marino VEX_LEN_0F38F3_R_3_P_0,
1285a45ae5f8SJohn Marino VEX_LEN_0F38F5_P_0,
1286a45ae5f8SJohn Marino VEX_LEN_0F38F5_P_1,
1287a45ae5f8SJohn Marino VEX_LEN_0F38F5_P_3,
1288a45ae5f8SJohn Marino VEX_LEN_0F38F6_P_3,
1289c50c785cSJohn Marino VEX_LEN_0F38F7_P_0,
1290a45ae5f8SJohn Marino VEX_LEN_0F38F7_P_1,
1291a45ae5f8SJohn Marino VEX_LEN_0F38F7_P_2,
1292a45ae5f8SJohn Marino VEX_LEN_0F38F7_P_3,
1293a45ae5f8SJohn Marino VEX_LEN_0F3A00_P_2,
1294a45ae5f8SJohn Marino VEX_LEN_0F3A01_P_2,
1295c50c785cSJohn Marino VEX_LEN_0F3A06_P_2,
1296c50c785cSJohn Marino VEX_LEN_0F3A0A_P_2,
1297c50c785cSJohn Marino VEX_LEN_0F3A0B_P_2,
1298c50c785cSJohn Marino VEX_LEN_0F3A14_P_2,
1299c50c785cSJohn Marino VEX_LEN_0F3A15_P_2,
1300c50c785cSJohn Marino VEX_LEN_0F3A16_P_2,
1301c50c785cSJohn Marino VEX_LEN_0F3A17_P_2,
1302c50c785cSJohn Marino VEX_LEN_0F3A18_P_2,
1303c50c785cSJohn Marino VEX_LEN_0F3A19_P_2,
1304c50c785cSJohn Marino VEX_LEN_0F3A20_P_2,
1305c50c785cSJohn Marino VEX_LEN_0F3A21_P_2,
1306c50c785cSJohn Marino VEX_LEN_0F3A22_P_2,
1307a45ae5f8SJohn Marino VEX_LEN_0F3A38_P_2,
1308a45ae5f8SJohn Marino VEX_LEN_0F3A39_P_2,
1309c50c785cSJohn Marino VEX_LEN_0F3A41_P_2,
1310c50c785cSJohn Marino VEX_LEN_0F3A44_P_2,
1311a45ae5f8SJohn Marino VEX_LEN_0F3A46_P_2,
1312c50c785cSJohn Marino VEX_LEN_0F3A60_P_2,
1313c50c785cSJohn Marino VEX_LEN_0F3A61_P_2,
1314c50c785cSJohn Marino VEX_LEN_0F3A62_P_2,
1315c50c785cSJohn Marino VEX_LEN_0F3A63_P_2,
1316c50c785cSJohn Marino VEX_LEN_0F3A6A_P_2,
1317c50c785cSJohn Marino VEX_LEN_0F3A6B_P_2,
1318c50c785cSJohn Marino VEX_LEN_0F3A6E_P_2,
1319c50c785cSJohn Marino VEX_LEN_0F3A6F_P_2,
1320c50c785cSJohn Marino VEX_LEN_0F3A7A_P_2,
1321c50c785cSJohn Marino VEX_LEN_0F3A7B_P_2,
1322c50c785cSJohn Marino VEX_LEN_0F3A7E_P_2,
1323c50c785cSJohn Marino VEX_LEN_0F3A7F_P_2,
1324c50c785cSJohn Marino VEX_LEN_0F3ADF_P_2,
1325a45ae5f8SJohn Marino VEX_LEN_0F3AF0_P_3,
1326*ef5ccd6cSJohn Marino VEX_LEN_0FXOP_08_CC,
1327*ef5ccd6cSJohn Marino VEX_LEN_0FXOP_08_CD,
1328*ef5ccd6cSJohn Marino VEX_LEN_0FXOP_08_CE,
1329*ef5ccd6cSJohn Marino VEX_LEN_0FXOP_08_CF,
1330*ef5ccd6cSJohn Marino VEX_LEN_0FXOP_08_EC,
1331*ef5ccd6cSJohn Marino VEX_LEN_0FXOP_08_ED,
1332*ef5ccd6cSJohn Marino VEX_LEN_0FXOP_08_EE,
1333*ef5ccd6cSJohn Marino VEX_LEN_0FXOP_08_EF,
1334c50c785cSJohn Marino VEX_LEN_0FXOP_09_80,
1335c50c785cSJohn Marino VEX_LEN_0FXOP_09_81
1336cf7f2e2dSJohn Marino };
1337cf7f2e2dSJohn Marino
1338cf7f2e2dSJohn Marino enum
1339cf7f2e2dSJohn Marino {
1340c50c785cSJohn Marino VEX_W_0F10_P_0 = 0,
1341c50c785cSJohn Marino VEX_W_0F10_P_1,
1342c50c785cSJohn Marino VEX_W_0F10_P_2,
1343c50c785cSJohn Marino VEX_W_0F10_P_3,
1344c50c785cSJohn Marino VEX_W_0F11_P_0,
1345c50c785cSJohn Marino VEX_W_0F11_P_1,
1346c50c785cSJohn Marino VEX_W_0F11_P_2,
1347c50c785cSJohn Marino VEX_W_0F11_P_3,
1348c50c785cSJohn Marino VEX_W_0F12_P_0_M_0,
1349c50c785cSJohn Marino VEX_W_0F12_P_0_M_1,
1350c50c785cSJohn Marino VEX_W_0F12_P_1,
1351c50c785cSJohn Marino VEX_W_0F12_P_2,
1352c50c785cSJohn Marino VEX_W_0F12_P_3,
1353c50c785cSJohn Marino VEX_W_0F13_M_0,
1354c50c785cSJohn Marino VEX_W_0F14,
1355c50c785cSJohn Marino VEX_W_0F15,
1356c50c785cSJohn Marino VEX_W_0F16_P_0_M_0,
1357c50c785cSJohn Marino VEX_W_0F16_P_0_M_1,
1358c50c785cSJohn Marino VEX_W_0F16_P_1,
1359c50c785cSJohn Marino VEX_W_0F16_P_2,
1360c50c785cSJohn Marino VEX_W_0F17_M_0,
1361c50c785cSJohn Marino VEX_W_0F28,
1362c50c785cSJohn Marino VEX_W_0F29,
1363c50c785cSJohn Marino VEX_W_0F2B_M_0,
1364c50c785cSJohn Marino VEX_W_0F2E_P_0,
1365c50c785cSJohn Marino VEX_W_0F2E_P_2,
1366c50c785cSJohn Marino VEX_W_0F2F_P_0,
1367c50c785cSJohn Marino VEX_W_0F2F_P_2,
1368c50c785cSJohn Marino VEX_W_0F50_M_0,
1369c50c785cSJohn Marino VEX_W_0F51_P_0,
1370c50c785cSJohn Marino VEX_W_0F51_P_1,
1371c50c785cSJohn Marino VEX_W_0F51_P_2,
1372c50c785cSJohn Marino VEX_W_0F51_P_3,
1373c50c785cSJohn Marino VEX_W_0F52_P_0,
1374c50c785cSJohn Marino VEX_W_0F52_P_1,
1375c50c785cSJohn Marino VEX_W_0F53_P_0,
1376c50c785cSJohn Marino VEX_W_0F53_P_1,
1377c50c785cSJohn Marino VEX_W_0F58_P_0,
1378c50c785cSJohn Marino VEX_W_0F58_P_1,
1379c50c785cSJohn Marino VEX_W_0F58_P_2,
1380c50c785cSJohn Marino VEX_W_0F58_P_3,
1381c50c785cSJohn Marino VEX_W_0F59_P_0,
1382c50c785cSJohn Marino VEX_W_0F59_P_1,
1383c50c785cSJohn Marino VEX_W_0F59_P_2,
1384c50c785cSJohn Marino VEX_W_0F59_P_3,
1385c50c785cSJohn Marino VEX_W_0F5A_P_0,
1386c50c785cSJohn Marino VEX_W_0F5A_P_1,
1387c50c785cSJohn Marino VEX_W_0F5A_P_3,
1388c50c785cSJohn Marino VEX_W_0F5B_P_0,
1389c50c785cSJohn Marino VEX_W_0F5B_P_1,
1390c50c785cSJohn Marino VEX_W_0F5B_P_2,
1391c50c785cSJohn Marino VEX_W_0F5C_P_0,
1392c50c785cSJohn Marino VEX_W_0F5C_P_1,
1393c50c785cSJohn Marino VEX_W_0F5C_P_2,
1394c50c785cSJohn Marino VEX_W_0F5C_P_3,
1395c50c785cSJohn Marino VEX_W_0F5D_P_0,
1396c50c785cSJohn Marino VEX_W_0F5D_P_1,
1397c50c785cSJohn Marino VEX_W_0F5D_P_2,
1398c50c785cSJohn Marino VEX_W_0F5D_P_3,
1399c50c785cSJohn Marino VEX_W_0F5E_P_0,
1400c50c785cSJohn Marino VEX_W_0F5E_P_1,
1401c50c785cSJohn Marino VEX_W_0F5E_P_2,
1402c50c785cSJohn Marino VEX_W_0F5E_P_3,
1403c50c785cSJohn Marino VEX_W_0F5F_P_0,
1404c50c785cSJohn Marino VEX_W_0F5F_P_1,
1405c50c785cSJohn Marino VEX_W_0F5F_P_2,
1406c50c785cSJohn Marino VEX_W_0F5F_P_3,
1407c50c785cSJohn Marino VEX_W_0F60_P_2,
1408c50c785cSJohn Marino VEX_W_0F61_P_2,
1409c50c785cSJohn Marino VEX_W_0F62_P_2,
1410c50c785cSJohn Marino VEX_W_0F63_P_2,
1411c50c785cSJohn Marino VEX_W_0F64_P_2,
1412c50c785cSJohn Marino VEX_W_0F65_P_2,
1413c50c785cSJohn Marino VEX_W_0F66_P_2,
1414c50c785cSJohn Marino VEX_W_0F67_P_2,
1415c50c785cSJohn Marino VEX_W_0F68_P_2,
1416c50c785cSJohn Marino VEX_W_0F69_P_2,
1417c50c785cSJohn Marino VEX_W_0F6A_P_2,
1418c50c785cSJohn Marino VEX_W_0F6B_P_2,
1419c50c785cSJohn Marino VEX_W_0F6C_P_2,
1420c50c785cSJohn Marino VEX_W_0F6D_P_2,
1421c50c785cSJohn Marino VEX_W_0F6F_P_1,
1422c50c785cSJohn Marino VEX_W_0F6F_P_2,
1423c50c785cSJohn Marino VEX_W_0F70_P_1,
1424c50c785cSJohn Marino VEX_W_0F70_P_2,
1425c50c785cSJohn Marino VEX_W_0F70_P_3,
1426c50c785cSJohn Marino VEX_W_0F71_R_2_P_2,
1427c50c785cSJohn Marino VEX_W_0F71_R_4_P_2,
1428c50c785cSJohn Marino VEX_W_0F71_R_6_P_2,
1429c50c785cSJohn Marino VEX_W_0F72_R_2_P_2,
1430c50c785cSJohn Marino VEX_W_0F72_R_4_P_2,
1431c50c785cSJohn Marino VEX_W_0F72_R_6_P_2,
1432c50c785cSJohn Marino VEX_W_0F73_R_2_P_2,
1433c50c785cSJohn Marino VEX_W_0F73_R_3_P_2,
1434c50c785cSJohn Marino VEX_W_0F73_R_6_P_2,
1435c50c785cSJohn Marino VEX_W_0F73_R_7_P_2,
1436c50c785cSJohn Marino VEX_W_0F74_P_2,
1437c50c785cSJohn Marino VEX_W_0F75_P_2,
1438c50c785cSJohn Marino VEX_W_0F76_P_2,
1439c50c785cSJohn Marino VEX_W_0F77_P_0,
1440c50c785cSJohn Marino VEX_W_0F7C_P_2,
1441c50c785cSJohn Marino VEX_W_0F7C_P_3,
1442c50c785cSJohn Marino VEX_W_0F7D_P_2,
1443c50c785cSJohn Marino VEX_W_0F7D_P_3,
1444c50c785cSJohn Marino VEX_W_0F7E_P_1,
1445c50c785cSJohn Marino VEX_W_0F7F_P_1,
1446c50c785cSJohn Marino VEX_W_0F7F_P_2,
1447c50c785cSJohn Marino VEX_W_0FAE_R_2_M_0,
1448c50c785cSJohn Marino VEX_W_0FAE_R_3_M_0,
1449c50c785cSJohn Marino VEX_W_0FC2_P_0,
1450c50c785cSJohn Marino VEX_W_0FC2_P_1,
1451c50c785cSJohn Marino VEX_W_0FC2_P_2,
1452c50c785cSJohn Marino VEX_W_0FC2_P_3,
1453c50c785cSJohn Marino VEX_W_0FC4_P_2,
1454c50c785cSJohn Marino VEX_W_0FC5_P_2,
1455c50c785cSJohn Marino VEX_W_0FD0_P_2,
1456c50c785cSJohn Marino VEX_W_0FD0_P_3,
1457c50c785cSJohn Marino VEX_W_0FD1_P_2,
1458c50c785cSJohn Marino VEX_W_0FD2_P_2,
1459c50c785cSJohn Marino VEX_W_0FD3_P_2,
1460c50c785cSJohn Marino VEX_W_0FD4_P_2,
1461c50c785cSJohn Marino VEX_W_0FD5_P_2,
1462c50c785cSJohn Marino VEX_W_0FD6_P_2,
1463c50c785cSJohn Marino VEX_W_0FD7_P_2_M_1,
1464c50c785cSJohn Marino VEX_W_0FD8_P_2,
1465c50c785cSJohn Marino VEX_W_0FD9_P_2,
1466c50c785cSJohn Marino VEX_W_0FDA_P_2,
1467c50c785cSJohn Marino VEX_W_0FDB_P_2,
1468c50c785cSJohn Marino VEX_W_0FDC_P_2,
1469c50c785cSJohn Marino VEX_W_0FDD_P_2,
1470c50c785cSJohn Marino VEX_W_0FDE_P_2,
1471c50c785cSJohn Marino VEX_W_0FDF_P_2,
1472c50c785cSJohn Marino VEX_W_0FE0_P_2,
1473c50c785cSJohn Marino VEX_W_0FE1_P_2,
1474c50c785cSJohn Marino VEX_W_0FE2_P_2,
1475c50c785cSJohn Marino VEX_W_0FE3_P_2,
1476c50c785cSJohn Marino VEX_W_0FE4_P_2,
1477c50c785cSJohn Marino VEX_W_0FE5_P_2,
1478c50c785cSJohn Marino VEX_W_0FE6_P_1,
1479c50c785cSJohn Marino VEX_W_0FE6_P_2,
1480c50c785cSJohn Marino VEX_W_0FE6_P_3,
1481c50c785cSJohn Marino VEX_W_0FE7_P_2_M_0,
1482c50c785cSJohn Marino VEX_W_0FE8_P_2,
1483c50c785cSJohn Marino VEX_W_0FE9_P_2,
1484c50c785cSJohn Marino VEX_W_0FEA_P_2,
1485c50c785cSJohn Marino VEX_W_0FEB_P_2,
1486c50c785cSJohn Marino VEX_W_0FEC_P_2,
1487c50c785cSJohn Marino VEX_W_0FED_P_2,
1488c50c785cSJohn Marino VEX_W_0FEE_P_2,
1489c50c785cSJohn Marino VEX_W_0FEF_P_2,
1490c50c785cSJohn Marino VEX_W_0FF0_P_3_M_0,
1491c50c785cSJohn Marino VEX_W_0FF1_P_2,
1492c50c785cSJohn Marino VEX_W_0FF2_P_2,
1493c50c785cSJohn Marino VEX_W_0FF3_P_2,
1494c50c785cSJohn Marino VEX_W_0FF4_P_2,
1495c50c785cSJohn Marino VEX_W_0FF5_P_2,
1496c50c785cSJohn Marino VEX_W_0FF6_P_2,
1497c50c785cSJohn Marino VEX_W_0FF7_P_2,
1498c50c785cSJohn Marino VEX_W_0FF8_P_2,
1499c50c785cSJohn Marino VEX_W_0FF9_P_2,
1500c50c785cSJohn Marino VEX_W_0FFA_P_2,
1501c50c785cSJohn Marino VEX_W_0FFB_P_2,
1502c50c785cSJohn Marino VEX_W_0FFC_P_2,
1503c50c785cSJohn Marino VEX_W_0FFD_P_2,
1504c50c785cSJohn Marino VEX_W_0FFE_P_2,
1505c50c785cSJohn Marino VEX_W_0F3800_P_2,
1506c50c785cSJohn Marino VEX_W_0F3801_P_2,
1507c50c785cSJohn Marino VEX_W_0F3802_P_2,
1508c50c785cSJohn Marino VEX_W_0F3803_P_2,
1509c50c785cSJohn Marino VEX_W_0F3804_P_2,
1510c50c785cSJohn Marino VEX_W_0F3805_P_2,
1511c50c785cSJohn Marino VEX_W_0F3806_P_2,
1512c50c785cSJohn Marino VEX_W_0F3807_P_2,
1513c50c785cSJohn Marino VEX_W_0F3808_P_2,
1514c50c785cSJohn Marino VEX_W_0F3809_P_2,
1515c50c785cSJohn Marino VEX_W_0F380A_P_2,
1516c50c785cSJohn Marino VEX_W_0F380B_P_2,
1517c50c785cSJohn Marino VEX_W_0F380C_P_2,
1518c50c785cSJohn Marino VEX_W_0F380D_P_2,
1519c50c785cSJohn Marino VEX_W_0F380E_P_2,
1520c50c785cSJohn Marino VEX_W_0F380F_P_2,
1521a45ae5f8SJohn Marino VEX_W_0F3816_P_2,
1522c50c785cSJohn Marino VEX_W_0F3817_P_2,
1523a45ae5f8SJohn Marino VEX_W_0F3818_P_2,
1524a45ae5f8SJohn Marino VEX_W_0F3819_P_2,
1525c50c785cSJohn Marino VEX_W_0F381A_P_2_M_0,
1526c50c785cSJohn Marino VEX_W_0F381C_P_2,
1527c50c785cSJohn Marino VEX_W_0F381D_P_2,
1528c50c785cSJohn Marino VEX_W_0F381E_P_2,
1529c50c785cSJohn Marino VEX_W_0F3820_P_2,
1530c50c785cSJohn Marino VEX_W_0F3821_P_2,
1531c50c785cSJohn Marino VEX_W_0F3822_P_2,
1532c50c785cSJohn Marino VEX_W_0F3823_P_2,
1533c50c785cSJohn Marino VEX_W_0F3824_P_2,
1534c50c785cSJohn Marino VEX_W_0F3825_P_2,
1535c50c785cSJohn Marino VEX_W_0F3828_P_2,
1536c50c785cSJohn Marino VEX_W_0F3829_P_2,
1537c50c785cSJohn Marino VEX_W_0F382A_P_2_M_0,
1538c50c785cSJohn Marino VEX_W_0F382B_P_2,
1539c50c785cSJohn Marino VEX_W_0F382C_P_2_M_0,
1540c50c785cSJohn Marino VEX_W_0F382D_P_2_M_0,
1541c50c785cSJohn Marino VEX_W_0F382E_P_2_M_0,
1542c50c785cSJohn Marino VEX_W_0F382F_P_2_M_0,
1543c50c785cSJohn Marino VEX_W_0F3830_P_2,
1544c50c785cSJohn Marino VEX_W_0F3831_P_2,
1545c50c785cSJohn Marino VEX_W_0F3832_P_2,
1546c50c785cSJohn Marino VEX_W_0F3833_P_2,
1547c50c785cSJohn Marino VEX_W_0F3834_P_2,
1548c50c785cSJohn Marino VEX_W_0F3835_P_2,
1549a45ae5f8SJohn Marino VEX_W_0F3836_P_2,
1550c50c785cSJohn Marino VEX_W_0F3837_P_2,
1551c50c785cSJohn Marino VEX_W_0F3838_P_2,
1552c50c785cSJohn Marino VEX_W_0F3839_P_2,
1553c50c785cSJohn Marino VEX_W_0F383A_P_2,
1554c50c785cSJohn Marino VEX_W_0F383B_P_2,
1555c50c785cSJohn Marino VEX_W_0F383C_P_2,
1556c50c785cSJohn Marino VEX_W_0F383D_P_2,
1557c50c785cSJohn Marino VEX_W_0F383E_P_2,
1558c50c785cSJohn Marino VEX_W_0F383F_P_2,
1559c50c785cSJohn Marino VEX_W_0F3840_P_2,
1560c50c785cSJohn Marino VEX_W_0F3841_P_2,
1561a45ae5f8SJohn Marino VEX_W_0F3846_P_2,
1562a45ae5f8SJohn Marino VEX_W_0F3858_P_2,
1563a45ae5f8SJohn Marino VEX_W_0F3859_P_2,
1564a45ae5f8SJohn Marino VEX_W_0F385A_P_2_M_0,
1565a45ae5f8SJohn Marino VEX_W_0F3878_P_2,
1566a45ae5f8SJohn Marino VEX_W_0F3879_P_2,
1567c50c785cSJohn Marino VEX_W_0F38DB_P_2,
1568c50c785cSJohn Marino VEX_W_0F38DC_P_2,
1569c50c785cSJohn Marino VEX_W_0F38DD_P_2,
1570c50c785cSJohn Marino VEX_W_0F38DE_P_2,
1571c50c785cSJohn Marino VEX_W_0F38DF_P_2,
1572a45ae5f8SJohn Marino VEX_W_0F3A00_P_2,
1573a45ae5f8SJohn Marino VEX_W_0F3A01_P_2,
1574a45ae5f8SJohn Marino VEX_W_0F3A02_P_2,
1575c50c785cSJohn Marino VEX_W_0F3A04_P_2,
1576c50c785cSJohn Marino VEX_W_0F3A05_P_2,
1577c50c785cSJohn Marino VEX_W_0F3A06_P_2,
1578c50c785cSJohn Marino VEX_W_0F3A08_P_2,
1579c50c785cSJohn Marino VEX_W_0F3A09_P_2,
1580c50c785cSJohn Marino VEX_W_0F3A0A_P_2,
1581c50c785cSJohn Marino VEX_W_0F3A0B_P_2,
1582c50c785cSJohn Marino VEX_W_0F3A0C_P_2,
1583c50c785cSJohn Marino VEX_W_0F3A0D_P_2,
1584c50c785cSJohn Marino VEX_W_0F3A0E_P_2,
1585c50c785cSJohn Marino VEX_W_0F3A0F_P_2,
1586c50c785cSJohn Marino VEX_W_0F3A14_P_2,
1587c50c785cSJohn Marino VEX_W_0F3A15_P_2,
1588c50c785cSJohn Marino VEX_W_0F3A18_P_2,
1589c50c785cSJohn Marino VEX_W_0F3A19_P_2,
1590c50c785cSJohn Marino VEX_W_0F3A20_P_2,
1591c50c785cSJohn Marino VEX_W_0F3A21_P_2,
1592a45ae5f8SJohn Marino VEX_W_0F3A38_P_2,
1593a45ae5f8SJohn Marino VEX_W_0F3A39_P_2,
1594c50c785cSJohn Marino VEX_W_0F3A40_P_2,
1595c50c785cSJohn Marino VEX_W_0F3A41_P_2,
1596c50c785cSJohn Marino VEX_W_0F3A42_P_2,
1597c50c785cSJohn Marino VEX_W_0F3A44_P_2,
1598a45ae5f8SJohn Marino VEX_W_0F3A46_P_2,
1599c50c785cSJohn Marino VEX_W_0F3A48_P_2,
1600c50c785cSJohn Marino VEX_W_0F3A49_P_2,
1601c50c785cSJohn Marino VEX_W_0F3A4A_P_2,
1602c50c785cSJohn Marino VEX_W_0F3A4B_P_2,
1603c50c785cSJohn Marino VEX_W_0F3A4C_P_2,
1604c50c785cSJohn Marino VEX_W_0F3A60_P_2,
1605c50c785cSJohn Marino VEX_W_0F3A61_P_2,
1606c50c785cSJohn Marino VEX_W_0F3A62_P_2,
1607c50c785cSJohn Marino VEX_W_0F3A63_P_2,
1608c50c785cSJohn Marino VEX_W_0F3ADF_P_2
1609cf7f2e2dSJohn Marino };
16105796c8dcSSimon Schubert
16115796c8dcSSimon Schubert typedef void (*op_rtn) (int bytemode, int sizeflag);
16125796c8dcSSimon Schubert
16135796c8dcSSimon Schubert struct dis386 {
16145796c8dcSSimon Schubert const char *name;
16155796c8dcSSimon Schubert struct
16165796c8dcSSimon Schubert {
16175796c8dcSSimon Schubert op_rtn rtn;
16185796c8dcSSimon Schubert int bytemode;
16195796c8dcSSimon Schubert } op[MAX_OPERANDS];
16205796c8dcSSimon Schubert };
16215796c8dcSSimon Schubert
16225796c8dcSSimon Schubert /* Upper case letters in the instruction names here are macros.
16235796c8dcSSimon Schubert 'A' => print 'b' if no register operands or suffix_always is true
16245796c8dcSSimon Schubert 'B' => print 'b' if suffix_always is true
16255796c8dcSSimon Schubert 'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
16265796c8dcSSimon Schubert size prefix
16275796c8dcSSimon Schubert 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
16285796c8dcSSimon Schubert suffix_always is true
16295796c8dcSSimon Schubert 'E' => print 'e' if 32-bit form of jcxz
16305796c8dcSSimon Schubert 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
16315796c8dcSSimon Schubert 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
16325796c8dcSSimon Schubert 'H' => print ",pt" or ",pn" branch hint
16335796c8dcSSimon Schubert 'I' => honor following macro letter even in Intel mode (implemented only
16345796c8dcSSimon Schubert for some of the macro letters)
16355796c8dcSSimon Schubert 'J' => print 'l'
16365796c8dcSSimon Schubert 'K' => print 'd' or 'q' if rex prefix is present.
16375796c8dcSSimon Schubert 'L' => print 'l' if suffix_always is true
16385796c8dcSSimon Schubert 'M' => print 'r' if intel_mnemonic is false.
16395796c8dcSSimon Schubert 'N' => print 'n' if instruction has no wait "prefix"
16405796c8dcSSimon Schubert 'O' => print 'd' or 'o' (or 'q' in Intel mode)
16415796c8dcSSimon Schubert 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
16425796c8dcSSimon Schubert or suffix_always is true. print 'q' if rex prefix is present.
16435796c8dcSSimon Schubert 'Q' => print 'w', 'l' or 'q' for memory operand or suffix_always
16445796c8dcSSimon Schubert is true
16455796c8dcSSimon Schubert 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' in Intel mode)
16465796c8dcSSimon Schubert 'S' => print 'w', 'l' or 'q' if suffix_always is true
16475796c8dcSSimon Schubert 'T' => print 'q' in 64bit mode and behave as 'P' otherwise
16485796c8dcSSimon Schubert 'U' => print 'q' in 64bit mode and behave as 'Q' otherwise
16495796c8dcSSimon Schubert 'V' => print 'q' in 64bit mode and behave as 'S' otherwise
16505796c8dcSSimon Schubert 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
16515796c8dcSSimon Schubert 'X' => print 's', 'd' depending on data16 prefix (for XMM)
16525796c8dcSSimon Schubert 'Y' => 'q' if instruction has an REX 64bit overwrite prefix and
16535796c8dcSSimon Schubert suffix_always is true.
16545796c8dcSSimon Schubert 'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
16555796c8dcSSimon Schubert '!' => change condition from true to false or from false to true.
16565796c8dcSSimon Schubert '%' => add 1 upper case letter to the macro.
16575796c8dcSSimon Schubert
16585796c8dcSSimon Schubert 2 upper case letter macros:
16595796c8dcSSimon Schubert "XY" => print 'x' or 'y' if no register operands or suffix_always
16605796c8dcSSimon Schubert is true.
1661cf7f2e2dSJohn Marino "XW" => print 's', 'd' depending on the VEX.W bit (for FMA)
1662cf7f2e2dSJohn Marino "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand
16635796c8dcSSimon Schubert or suffix_always is true
1664cf7f2e2dSJohn Marino "LB" => print "abs" in 64bit mode and behave as 'B' otherwise
1665cf7f2e2dSJohn Marino "LS" => print "abs" in 64bit mode and behave as 'S' otherwise
1666cf7f2e2dSJohn Marino "LV" => print "abs" for 64bit operand and behave as 'S' otherwise
1667a45ae5f8SJohn Marino "LW" => print 'd', 'q' depending on the VEX.W bit
16685796c8dcSSimon Schubert
16695796c8dcSSimon Schubert Many of the above letters print nothing in Intel mode. See "putop"
16705796c8dcSSimon Schubert for the details.
16715796c8dcSSimon Schubert
16725796c8dcSSimon Schubert Braces '{' and '}', and vertical bars '|', indicate alternative
16735796c8dcSSimon Schubert mnemonic strings for AT&T and Intel. */
16745796c8dcSSimon Schubert
16755796c8dcSSimon Schubert static const struct dis386 dis386[] = {
16765796c8dcSSimon Schubert /* 00 */
1677*ef5ccd6cSJohn Marino { "addB", { Ebh1, Gb } },
1678*ef5ccd6cSJohn Marino { "addS", { Evh1, Gv } },
16795796c8dcSSimon Schubert { "addB", { Gb, EbS } },
16805796c8dcSSimon Schubert { "addS", { Gv, EvS } },
16815796c8dcSSimon Schubert { "addB", { AL, Ib } },
16825796c8dcSSimon Schubert { "addS", { eAX, Iv } },
16835796c8dcSSimon Schubert { X86_64_TABLE (X86_64_06) },
16845796c8dcSSimon Schubert { X86_64_TABLE (X86_64_07) },
16855796c8dcSSimon Schubert /* 08 */
1686*ef5ccd6cSJohn Marino { "orB", { Ebh1, Gb } },
1687*ef5ccd6cSJohn Marino { "orS", { Evh1, Gv } },
16885796c8dcSSimon Schubert { "orB", { Gb, EbS } },
16895796c8dcSSimon Schubert { "orS", { Gv, EvS } },
16905796c8dcSSimon Schubert { "orB", { AL, Ib } },
16915796c8dcSSimon Schubert { "orS", { eAX, Iv } },
16925796c8dcSSimon Schubert { X86_64_TABLE (X86_64_0D) },
1693cf7f2e2dSJohn Marino { Bad_Opcode }, /* 0x0f extended opcode escape */
16945796c8dcSSimon Schubert /* 10 */
1695*ef5ccd6cSJohn Marino { "adcB", { Ebh1, Gb } },
1696*ef5ccd6cSJohn Marino { "adcS", { Evh1, Gv } },
16975796c8dcSSimon Schubert { "adcB", { Gb, EbS } },
16985796c8dcSSimon Schubert { "adcS", { Gv, EvS } },
16995796c8dcSSimon Schubert { "adcB", { AL, Ib } },
17005796c8dcSSimon Schubert { "adcS", { eAX, Iv } },
17015796c8dcSSimon Schubert { X86_64_TABLE (X86_64_16) },
17025796c8dcSSimon Schubert { X86_64_TABLE (X86_64_17) },
17035796c8dcSSimon Schubert /* 18 */
1704*ef5ccd6cSJohn Marino { "sbbB", { Ebh1, Gb } },
1705*ef5ccd6cSJohn Marino { "sbbS", { Evh1, Gv } },
17065796c8dcSSimon Schubert { "sbbB", { Gb, EbS } },
17075796c8dcSSimon Schubert { "sbbS", { Gv, EvS } },
17085796c8dcSSimon Schubert { "sbbB", { AL, Ib } },
17095796c8dcSSimon Schubert { "sbbS", { eAX, Iv } },
17105796c8dcSSimon Schubert { X86_64_TABLE (X86_64_1E) },
17115796c8dcSSimon Schubert { X86_64_TABLE (X86_64_1F) },
17125796c8dcSSimon Schubert /* 20 */
1713*ef5ccd6cSJohn Marino { "andB", { Ebh1, Gb } },
1714*ef5ccd6cSJohn Marino { "andS", { Evh1, Gv } },
17155796c8dcSSimon Schubert { "andB", { Gb, EbS } },
17165796c8dcSSimon Schubert { "andS", { Gv, EvS } },
17175796c8dcSSimon Schubert { "andB", { AL, Ib } },
17185796c8dcSSimon Schubert { "andS", { eAX, Iv } },
1719cf7f2e2dSJohn Marino { Bad_Opcode }, /* SEG ES prefix */
17205796c8dcSSimon Schubert { X86_64_TABLE (X86_64_27) },
17215796c8dcSSimon Schubert /* 28 */
1722*ef5ccd6cSJohn Marino { "subB", { Ebh1, Gb } },
1723*ef5ccd6cSJohn Marino { "subS", { Evh1, Gv } },
17245796c8dcSSimon Schubert { "subB", { Gb, EbS } },
17255796c8dcSSimon Schubert { "subS", { Gv, EvS } },
17265796c8dcSSimon Schubert { "subB", { AL, Ib } },
17275796c8dcSSimon Schubert { "subS", { eAX, Iv } },
1728cf7f2e2dSJohn Marino { Bad_Opcode }, /* SEG CS prefix */
17295796c8dcSSimon Schubert { X86_64_TABLE (X86_64_2F) },
17305796c8dcSSimon Schubert /* 30 */
1731*ef5ccd6cSJohn Marino { "xorB", { Ebh1, Gb } },
1732*ef5ccd6cSJohn Marino { "xorS", { Evh1, Gv } },
17335796c8dcSSimon Schubert { "xorB", { Gb, EbS } },
17345796c8dcSSimon Schubert { "xorS", { Gv, EvS } },
17355796c8dcSSimon Schubert { "xorB", { AL, Ib } },
17365796c8dcSSimon Schubert { "xorS", { eAX, Iv } },
1737cf7f2e2dSJohn Marino { Bad_Opcode }, /* SEG SS prefix */
17385796c8dcSSimon Schubert { X86_64_TABLE (X86_64_37) },
17395796c8dcSSimon Schubert /* 38 */
17405796c8dcSSimon Schubert { "cmpB", { Eb, Gb } },
17415796c8dcSSimon Schubert { "cmpS", { Ev, Gv } },
17425796c8dcSSimon Schubert { "cmpB", { Gb, EbS } },
17435796c8dcSSimon Schubert { "cmpS", { Gv, EvS } },
17445796c8dcSSimon Schubert { "cmpB", { AL, Ib } },
17455796c8dcSSimon Schubert { "cmpS", { eAX, Iv } },
1746cf7f2e2dSJohn Marino { Bad_Opcode }, /* SEG DS prefix */
17475796c8dcSSimon Schubert { X86_64_TABLE (X86_64_3F) },
17485796c8dcSSimon Schubert /* 40 */
17495796c8dcSSimon Schubert { "inc{S|}", { RMeAX } },
17505796c8dcSSimon Schubert { "inc{S|}", { RMeCX } },
17515796c8dcSSimon Schubert { "inc{S|}", { RMeDX } },
17525796c8dcSSimon Schubert { "inc{S|}", { RMeBX } },
17535796c8dcSSimon Schubert { "inc{S|}", { RMeSP } },
17545796c8dcSSimon Schubert { "inc{S|}", { RMeBP } },
17555796c8dcSSimon Schubert { "inc{S|}", { RMeSI } },
17565796c8dcSSimon Schubert { "inc{S|}", { RMeDI } },
17575796c8dcSSimon Schubert /* 48 */
17585796c8dcSSimon Schubert { "dec{S|}", { RMeAX } },
17595796c8dcSSimon Schubert { "dec{S|}", { RMeCX } },
17605796c8dcSSimon Schubert { "dec{S|}", { RMeDX } },
17615796c8dcSSimon Schubert { "dec{S|}", { RMeBX } },
17625796c8dcSSimon Schubert { "dec{S|}", { RMeSP } },
17635796c8dcSSimon Schubert { "dec{S|}", { RMeBP } },
17645796c8dcSSimon Schubert { "dec{S|}", { RMeSI } },
17655796c8dcSSimon Schubert { "dec{S|}", { RMeDI } },
17665796c8dcSSimon Schubert /* 50 */
17675796c8dcSSimon Schubert { "pushV", { RMrAX } },
17685796c8dcSSimon Schubert { "pushV", { RMrCX } },
17695796c8dcSSimon Schubert { "pushV", { RMrDX } },
17705796c8dcSSimon Schubert { "pushV", { RMrBX } },
17715796c8dcSSimon Schubert { "pushV", { RMrSP } },
17725796c8dcSSimon Schubert { "pushV", { RMrBP } },
17735796c8dcSSimon Schubert { "pushV", { RMrSI } },
17745796c8dcSSimon Schubert { "pushV", { RMrDI } },
17755796c8dcSSimon Schubert /* 58 */
17765796c8dcSSimon Schubert { "popV", { RMrAX } },
17775796c8dcSSimon Schubert { "popV", { RMrCX } },
17785796c8dcSSimon Schubert { "popV", { RMrDX } },
17795796c8dcSSimon Schubert { "popV", { RMrBX } },
17805796c8dcSSimon Schubert { "popV", { RMrSP } },
17815796c8dcSSimon Schubert { "popV", { RMrBP } },
17825796c8dcSSimon Schubert { "popV", { RMrSI } },
17835796c8dcSSimon Schubert { "popV", { RMrDI } },
17845796c8dcSSimon Schubert /* 60 */
17855796c8dcSSimon Schubert { X86_64_TABLE (X86_64_60) },
17865796c8dcSSimon Schubert { X86_64_TABLE (X86_64_61) },
17875796c8dcSSimon Schubert { X86_64_TABLE (X86_64_62) },
17885796c8dcSSimon Schubert { X86_64_TABLE (X86_64_63) },
1789cf7f2e2dSJohn Marino { Bad_Opcode }, /* seg fs */
1790cf7f2e2dSJohn Marino { Bad_Opcode }, /* seg gs */
1791cf7f2e2dSJohn Marino { Bad_Opcode }, /* op size prefix */
1792cf7f2e2dSJohn Marino { Bad_Opcode }, /* adr size prefix */
17935796c8dcSSimon Schubert /* 68 */
1794c50c785cSJohn Marino { "pushT", { sIv } },
17955796c8dcSSimon Schubert { "imulS", { Gv, Ev, Iv } },
1796c50c785cSJohn Marino { "pushT", { sIbT } },
17975796c8dcSSimon Schubert { "imulS", { Gv, Ev, sIb } },
17985796c8dcSSimon Schubert { "ins{b|}", { Ybr, indirDX } },
17995796c8dcSSimon Schubert { X86_64_TABLE (X86_64_6D) },
18005796c8dcSSimon Schubert { "outs{b|}", { indirDXr, Xb } },
18015796c8dcSSimon Schubert { X86_64_TABLE (X86_64_6F) },
18025796c8dcSSimon Schubert /* 70 */
18035796c8dcSSimon Schubert { "joH", { Jb, XX, cond_jump_flag } },
18045796c8dcSSimon Schubert { "jnoH", { Jb, XX, cond_jump_flag } },
18055796c8dcSSimon Schubert { "jbH", { Jb, XX, cond_jump_flag } },
18065796c8dcSSimon Schubert { "jaeH", { Jb, XX, cond_jump_flag } },
18075796c8dcSSimon Schubert { "jeH", { Jb, XX, cond_jump_flag } },
18085796c8dcSSimon Schubert { "jneH", { Jb, XX, cond_jump_flag } },
18095796c8dcSSimon Schubert { "jbeH", { Jb, XX, cond_jump_flag } },
18105796c8dcSSimon Schubert { "jaH", { Jb, XX, cond_jump_flag } },
18115796c8dcSSimon Schubert /* 78 */
18125796c8dcSSimon Schubert { "jsH", { Jb, XX, cond_jump_flag } },
18135796c8dcSSimon Schubert { "jnsH", { Jb, XX, cond_jump_flag } },
18145796c8dcSSimon Schubert { "jpH", { Jb, XX, cond_jump_flag } },
18155796c8dcSSimon Schubert { "jnpH", { Jb, XX, cond_jump_flag } },
18165796c8dcSSimon Schubert { "jlH", { Jb, XX, cond_jump_flag } },
18175796c8dcSSimon Schubert { "jgeH", { Jb, XX, cond_jump_flag } },
18185796c8dcSSimon Schubert { "jleH", { Jb, XX, cond_jump_flag } },
18195796c8dcSSimon Schubert { "jgH", { Jb, XX, cond_jump_flag } },
18205796c8dcSSimon Schubert /* 80 */
18215796c8dcSSimon Schubert { REG_TABLE (REG_80) },
18225796c8dcSSimon Schubert { REG_TABLE (REG_81) },
1823cf7f2e2dSJohn Marino { Bad_Opcode },
18245796c8dcSSimon Schubert { REG_TABLE (REG_82) },
18255796c8dcSSimon Schubert { "testB", { Eb, Gb } },
18265796c8dcSSimon Schubert { "testS", { Ev, Gv } },
1827*ef5ccd6cSJohn Marino { "xchgB", { Ebh2, Gb } },
1828*ef5ccd6cSJohn Marino { "xchgS", { Evh2, Gv } },
18295796c8dcSSimon Schubert /* 88 */
1830*ef5ccd6cSJohn Marino { "movB", { Ebh3, Gb } },
1831*ef5ccd6cSJohn Marino { "movS", { Evh3, Gv } },
18325796c8dcSSimon Schubert { "movB", { Gb, EbS } },
18335796c8dcSSimon Schubert { "movS", { Gv, EvS } },
18345796c8dcSSimon Schubert { "movD", { Sv, Sw } },
18355796c8dcSSimon Schubert { MOD_TABLE (MOD_8D) },
18365796c8dcSSimon Schubert { "movD", { Sw, Sv } },
18375796c8dcSSimon Schubert { REG_TABLE (REG_8F) },
18385796c8dcSSimon Schubert /* 90 */
18395796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_90) },
18405796c8dcSSimon Schubert { "xchgS", { RMeCX, eAX } },
18415796c8dcSSimon Schubert { "xchgS", { RMeDX, eAX } },
18425796c8dcSSimon Schubert { "xchgS", { RMeBX, eAX } },
18435796c8dcSSimon Schubert { "xchgS", { RMeSP, eAX } },
18445796c8dcSSimon Schubert { "xchgS", { RMeBP, eAX } },
18455796c8dcSSimon Schubert { "xchgS", { RMeSI, eAX } },
18465796c8dcSSimon Schubert { "xchgS", { RMeDI, eAX } },
18475796c8dcSSimon Schubert /* 98 */
18485796c8dcSSimon Schubert { "cW{t|}R", { XX } },
18495796c8dcSSimon Schubert { "cR{t|}O", { XX } },
18505796c8dcSSimon Schubert { X86_64_TABLE (X86_64_9A) },
1851cf7f2e2dSJohn Marino { Bad_Opcode }, /* fwait */
18525796c8dcSSimon Schubert { "pushfT", { XX } },
18535796c8dcSSimon Schubert { "popfT", { XX } },
18545796c8dcSSimon Schubert { "sahf", { XX } },
18555796c8dcSSimon Schubert { "lahf", { XX } },
18565796c8dcSSimon Schubert /* a0 */
1857cf7f2e2dSJohn Marino { "mov%LB", { AL, Ob } },
1858cf7f2e2dSJohn Marino { "mov%LS", { eAX, Ov } },
1859cf7f2e2dSJohn Marino { "mov%LB", { Ob, AL } },
1860cf7f2e2dSJohn Marino { "mov%LS", { Ov, eAX } },
18615796c8dcSSimon Schubert { "movs{b|}", { Ybr, Xb } },
18625796c8dcSSimon Schubert { "movs{R|}", { Yvr, Xv } },
18635796c8dcSSimon Schubert { "cmps{b|}", { Xb, Yb } },
18645796c8dcSSimon Schubert { "cmps{R|}", { Xv, Yv } },
18655796c8dcSSimon Schubert /* a8 */
18665796c8dcSSimon Schubert { "testB", { AL, Ib } },
18675796c8dcSSimon Schubert { "testS", { eAX, Iv } },
18685796c8dcSSimon Schubert { "stosB", { Ybr, AL } },
18695796c8dcSSimon Schubert { "stosS", { Yvr, eAX } },
18705796c8dcSSimon Schubert { "lodsB", { ALr, Xb } },
18715796c8dcSSimon Schubert { "lodsS", { eAXr, Xv } },
18725796c8dcSSimon Schubert { "scasB", { AL, Yb } },
18735796c8dcSSimon Schubert { "scasS", { eAX, Yv } },
18745796c8dcSSimon Schubert /* b0 */
18755796c8dcSSimon Schubert { "movB", { RMAL, Ib } },
18765796c8dcSSimon Schubert { "movB", { RMCL, Ib } },
18775796c8dcSSimon Schubert { "movB", { RMDL, Ib } },
18785796c8dcSSimon Schubert { "movB", { RMBL, Ib } },
18795796c8dcSSimon Schubert { "movB", { RMAH, Ib } },
18805796c8dcSSimon Schubert { "movB", { RMCH, Ib } },
18815796c8dcSSimon Schubert { "movB", { RMDH, Ib } },
18825796c8dcSSimon Schubert { "movB", { RMBH, Ib } },
18835796c8dcSSimon Schubert /* b8 */
1884cf7f2e2dSJohn Marino { "mov%LV", { RMeAX, Iv64 } },
1885cf7f2e2dSJohn Marino { "mov%LV", { RMeCX, Iv64 } },
1886cf7f2e2dSJohn Marino { "mov%LV", { RMeDX, Iv64 } },
1887cf7f2e2dSJohn Marino { "mov%LV", { RMeBX, Iv64 } },
1888cf7f2e2dSJohn Marino { "mov%LV", { RMeSP, Iv64 } },
1889cf7f2e2dSJohn Marino { "mov%LV", { RMeBP, Iv64 } },
1890cf7f2e2dSJohn Marino { "mov%LV", { RMeSI, Iv64 } },
1891cf7f2e2dSJohn Marino { "mov%LV", { RMeDI, Iv64 } },
18925796c8dcSSimon Schubert /* c0 */
18935796c8dcSSimon Schubert { REG_TABLE (REG_C0) },
18945796c8dcSSimon Schubert { REG_TABLE (REG_C1) },
18955796c8dcSSimon Schubert { "retT", { Iw } },
18965796c8dcSSimon Schubert { "retT", { XX } },
18975796c8dcSSimon Schubert { X86_64_TABLE (X86_64_C4) },
18985796c8dcSSimon Schubert { X86_64_TABLE (X86_64_C5) },
18995796c8dcSSimon Schubert { REG_TABLE (REG_C6) },
19005796c8dcSSimon Schubert { REG_TABLE (REG_C7) },
19015796c8dcSSimon Schubert /* c8 */
19025796c8dcSSimon Schubert { "enterT", { Iw, Ib } },
19035796c8dcSSimon Schubert { "leaveT", { XX } },
19045796c8dcSSimon Schubert { "Jret{|f}P", { Iw } },
19055796c8dcSSimon Schubert { "Jret{|f}P", { XX } },
19065796c8dcSSimon Schubert { "int3", { XX } },
19075796c8dcSSimon Schubert { "int", { Ib } },
19085796c8dcSSimon Schubert { X86_64_TABLE (X86_64_CE) },
19095796c8dcSSimon Schubert { "iretP", { XX } },
19105796c8dcSSimon Schubert /* d0 */
19115796c8dcSSimon Schubert { REG_TABLE (REG_D0) },
19125796c8dcSSimon Schubert { REG_TABLE (REG_D1) },
19135796c8dcSSimon Schubert { REG_TABLE (REG_D2) },
19145796c8dcSSimon Schubert { REG_TABLE (REG_D3) },
19155796c8dcSSimon Schubert { X86_64_TABLE (X86_64_D4) },
19165796c8dcSSimon Schubert { X86_64_TABLE (X86_64_D5) },
1917cf7f2e2dSJohn Marino { Bad_Opcode },
19185796c8dcSSimon Schubert { "xlat", { DSBX } },
19195796c8dcSSimon Schubert /* d8 */
19205796c8dcSSimon Schubert { FLOAT },
19215796c8dcSSimon Schubert { FLOAT },
19225796c8dcSSimon Schubert { FLOAT },
19235796c8dcSSimon Schubert { FLOAT },
19245796c8dcSSimon Schubert { FLOAT },
19255796c8dcSSimon Schubert { FLOAT },
19265796c8dcSSimon Schubert { FLOAT },
19275796c8dcSSimon Schubert { FLOAT },
19285796c8dcSSimon Schubert /* e0 */
19295796c8dcSSimon Schubert { "loopneFH", { Jb, XX, loop_jcxz_flag } },
19305796c8dcSSimon Schubert { "loopeFH", { Jb, XX, loop_jcxz_flag } },
19315796c8dcSSimon Schubert { "loopFH", { Jb, XX, loop_jcxz_flag } },
19325796c8dcSSimon Schubert { "jEcxzH", { Jb, XX, loop_jcxz_flag } },
19335796c8dcSSimon Schubert { "inB", { AL, Ib } },
19345796c8dcSSimon Schubert { "inG", { zAX, Ib } },
19355796c8dcSSimon Schubert { "outB", { Ib, AL } },
19365796c8dcSSimon Schubert { "outG", { Ib, zAX } },
19375796c8dcSSimon Schubert /* e8 */
19385796c8dcSSimon Schubert { "callT", { Jv } },
19395796c8dcSSimon Schubert { "jmpT", { Jv } },
19405796c8dcSSimon Schubert { X86_64_TABLE (X86_64_EA) },
19415796c8dcSSimon Schubert { "jmp", { Jb } },
19425796c8dcSSimon Schubert { "inB", { AL, indirDX } },
19435796c8dcSSimon Schubert { "inG", { zAX, indirDX } },
19445796c8dcSSimon Schubert { "outB", { indirDX, AL } },
19455796c8dcSSimon Schubert { "outG", { indirDX, zAX } },
19465796c8dcSSimon Schubert /* f0 */
1947cf7f2e2dSJohn Marino { Bad_Opcode }, /* lock prefix */
19485796c8dcSSimon Schubert { "icebp", { XX } },
1949cf7f2e2dSJohn Marino { Bad_Opcode }, /* repne */
1950cf7f2e2dSJohn Marino { Bad_Opcode }, /* repz */
19515796c8dcSSimon Schubert { "hlt", { XX } },
19525796c8dcSSimon Schubert { "cmc", { XX } },
19535796c8dcSSimon Schubert { REG_TABLE (REG_F6) },
19545796c8dcSSimon Schubert { REG_TABLE (REG_F7) },
19555796c8dcSSimon Schubert /* f8 */
19565796c8dcSSimon Schubert { "clc", { XX } },
19575796c8dcSSimon Schubert { "stc", { XX } },
19585796c8dcSSimon Schubert { "cli", { XX } },
19595796c8dcSSimon Schubert { "sti", { XX } },
19605796c8dcSSimon Schubert { "cld", { XX } },
19615796c8dcSSimon Schubert { "std", { XX } },
19625796c8dcSSimon Schubert { REG_TABLE (REG_FE) },
19635796c8dcSSimon Schubert { REG_TABLE (REG_FF) },
19645796c8dcSSimon Schubert };
19655796c8dcSSimon Schubert
19665796c8dcSSimon Schubert static const struct dis386 dis386_twobyte[] = {
19675796c8dcSSimon Schubert /* 00 */
19685796c8dcSSimon Schubert { REG_TABLE (REG_0F00 ) },
19695796c8dcSSimon Schubert { REG_TABLE (REG_0F01 ) },
19705796c8dcSSimon Schubert { "larS", { Gv, Ew } },
19715796c8dcSSimon Schubert { "lslS", { Gv, Ew } },
1972cf7f2e2dSJohn Marino { Bad_Opcode },
19735796c8dcSSimon Schubert { "syscall", { XX } },
19745796c8dcSSimon Schubert { "clts", { XX } },
19755796c8dcSSimon Schubert { "sysretP", { XX } },
19765796c8dcSSimon Schubert /* 08 */
19775796c8dcSSimon Schubert { "invd", { XX } },
19785796c8dcSSimon Schubert { "wbinvd", { XX } },
1979cf7f2e2dSJohn Marino { Bad_Opcode },
1980c50c785cSJohn Marino { "ud2", { XX } },
1981cf7f2e2dSJohn Marino { Bad_Opcode },
19825796c8dcSSimon Schubert { REG_TABLE (REG_0F0D) },
19835796c8dcSSimon Schubert { "femms", { XX } },
19845796c8dcSSimon Schubert { "", { MX, EM, OPSUF } }, /* See OP_3DNowSuffix. */
19855796c8dcSSimon Schubert /* 10 */
19865796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F10) },
19875796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F11) },
19885796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F12) },
19895796c8dcSSimon Schubert { MOD_TABLE (MOD_0F13) },
19905796c8dcSSimon Schubert { "unpcklpX", { XM, EXx } },
19915796c8dcSSimon Schubert { "unpckhpX", { XM, EXx } },
19925796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F16) },
19935796c8dcSSimon Schubert { MOD_TABLE (MOD_0F17) },
19945796c8dcSSimon Schubert /* 18 */
19955796c8dcSSimon Schubert { REG_TABLE (REG_0F18) },
19965796c8dcSSimon Schubert { "nopQ", { Ev } },
19975796c8dcSSimon Schubert { "nopQ", { Ev } },
19985796c8dcSSimon Schubert { "nopQ", { Ev } },
19995796c8dcSSimon Schubert { "nopQ", { Ev } },
20005796c8dcSSimon Schubert { "nopQ", { Ev } },
20015796c8dcSSimon Schubert { "nopQ", { Ev } },
20025796c8dcSSimon Schubert { "nopQ", { Ev } },
20035796c8dcSSimon Schubert /* 20 */
20045796c8dcSSimon Schubert { MOD_TABLE (MOD_0F20) },
20055796c8dcSSimon Schubert { MOD_TABLE (MOD_0F21) },
20065796c8dcSSimon Schubert { MOD_TABLE (MOD_0F22) },
20075796c8dcSSimon Schubert { MOD_TABLE (MOD_0F23) },
20085796c8dcSSimon Schubert { MOD_TABLE (MOD_0F24) },
2009cf7f2e2dSJohn Marino { Bad_Opcode },
20105796c8dcSSimon Schubert { MOD_TABLE (MOD_0F26) },
2011cf7f2e2dSJohn Marino { Bad_Opcode },
20125796c8dcSSimon Schubert /* 28 */
20135796c8dcSSimon Schubert { "movapX", { XM, EXx } },
20145796c8dcSSimon Schubert { "movapX", { EXxS, XM } },
20155796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F2A) },
20165796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F2B) },
20175796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F2C) },
20185796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F2D) },
20195796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F2E) },
20205796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F2F) },
20215796c8dcSSimon Schubert /* 30 */
20225796c8dcSSimon Schubert { "wrmsr", { XX } },
20235796c8dcSSimon Schubert { "rdtsc", { XX } },
20245796c8dcSSimon Schubert { "rdmsr", { XX } },
20255796c8dcSSimon Schubert { "rdpmc", { XX } },
20265796c8dcSSimon Schubert { "sysenter", { XX } },
20275796c8dcSSimon Schubert { "sysexit", { XX } },
2028cf7f2e2dSJohn Marino { Bad_Opcode },
20295796c8dcSSimon Schubert { "getsec", { XX } },
20305796c8dcSSimon Schubert /* 38 */
20315796c8dcSSimon Schubert { THREE_BYTE_TABLE (THREE_BYTE_0F38) },
2032cf7f2e2dSJohn Marino { Bad_Opcode },
20335796c8dcSSimon Schubert { THREE_BYTE_TABLE (THREE_BYTE_0F3A) },
2034cf7f2e2dSJohn Marino { Bad_Opcode },
2035cf7f2e2dSJohn Marino { Bad_Opcode },
2036cf7f2e2dSJohn Marino { Bad_Opcode },
2037cf7f2e2dSJohn Marino { Bad_Opcode },
2038cf7f2e2dSJohn Marino { Bad_Opcode },
20395796c8dcSSimon Schubert /* 40 */
20405796c8dcSSimon Schubert { "cmovoS", { Gv, Ev } },
20415796c8dcSSimon Schubert { "cmovnoS", { Gv, Ev } },
20425796c8dcSSimon Schubert { "cmovbS", { Gv, Ev } },
20435796c8dcSSimon Schubert { "cmovaeS", { Gv, Ev } },
20445796c8dcSSimon Schubert { "cmoveS", { Gv, Ev } },
20455796c8dcSSimon Schubert { "cmovneS", { Gv, Ev } },
20465796c8dcSSimon Schubert { "cmovbeS", { Gv, Ev } },
20475796c8dcSSimon Schubert { "cmovaS", { Gv, Ev } },
20485796c8dcSSimon Schubert /* 48 */
20495796c8dcSSimon Schubert { "cmovsS", { Gv, Ev } },
20505796c8dcSSimon Schubert { "cmovnsS", { Gv, Ev } },
20515796c8dcSSimon Schubert { "cmovpS", { Gv, Ev } },
20525796c8dcSSimon Schubert { "cmovnpS", { Gv, Ev } },
20535796c8dcSSimon Schubert { "cmovlS", { Gv, Ev } },
20545796c8dcSSimon Schubert { "cmovgeS", { Gv, Ev } },
20555796c8dcSSimon Schubert { "cmovleS", { Gv, Ev } },
20565796c8dcSSimon Schubert { "cmovgS", { Gv, Ev } },
20575796c8dcSSimon Schubert /* 50 */
20585796c8dcSSimon Schubert { MOD_TABLE (MOD_0F51) },
20595796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F51) },
20605796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F52) },
20615796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F53) },
20625796c8dcSSimon Schubert { "andpX", { XM, EXx } },
20635796c8dcSSimon Schubert { "andnpX", { XM, EXx } },
20645796c8dcSSimon Schubert { "orpX", { XM, EXx } },
20655796c8dcSSimon Schubert { "xorpX", { XM, EXx } },
20665796c8dcSSimon Schubert /* 58 */
20675796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F58) },
20685796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F59) },
20695796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F5A) },
20705796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F5B) },
20715796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F5C) },
20725796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F5D) },
20735796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F5E) },
20745796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F5F) },
20755796c8dcSSimon Schubert /* 60 */
20765796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F60) },
20775796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F61) },
20785796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F62) },
20795796c8dcSSimon Schubert { "packsswb", { MX, EM } },
20805796c8dcSSimon Schubert { "pcmpgtb", { MX, EM } },
20815796c8dcSSimon Schubert { "pcmpgtw", { MX, EM } },
20825796c8dcSSimon Schubert { "pcmpgtd", { MX, EM } },
20835796c8dcSSimon Schubert { "packuswb", { MX, EM } },
20845796c8dcSSimon Schubert /* 68 */
20855796c8dcSSimon Schubert { "punpckhbw", { MX, EM } },
20865796c8dcSSimon Schubert { "punpckhwd", { MX, EM } },
20875796c8dcSSimon Schubert { "punpckhdq", { MX, EM } },
20885796c8dcSSimon Schubert { "packssdw", { MX, EM } },
20895796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F6C) },
20905796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F6D) },
20915796c8dcSSimon Schubert { "movK", { MX, Edq } },
20925796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F6F) },
20935796c8dcSSimon Schubert /* 70 */
20945796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F70) },
20955796c8dcSSimon Schubert { REG_TABLE (REG_0F71) },
20965796c8dcSSimon Schubert { REG_TABLE (REG_0F72) },
20975796c8dcSSimon Schubert { REG_TABLE (REG_0F73) },
20985796c8dcSSimon Schubert { "pcmpeqb", { MX, EM } },
20995796c8dcSSimon Schubert { "pcmpeqw", { MX, EM } },
21005796c8dcSSimon Schubert { "pcmpeqd", { MX, EM } },
21015796c8dcSSimon Schubert { "emms", { XX } },
21025796c8dcSSimon Schubert /* 78 */
21035796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F78) },
21045796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F79) },
21055796c8dcSSimon Schubert { THREE_BYTE_TABLE (THREE_BYTE_0F7A) },
2106cf7f2e2dSJohn Marino { Bad_Opcode },
21075796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F7C) },
21085796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F7D) },
21095796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F7E) },
21105796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F7F) },
21115796c8dcSSimon Schubert /* 80 */
21125796c8dcSSimon Schubert { "joH", { Jv, XX, cond_jump_flag } },
21135796c8dcSSimon Schubert { "jnoH", { Jv, XX, cond_jump_flag } },
21145796c8dcSSimon Schubert { "jbH", { Jv, XX, cond_jump_flag } },
21155796c8dcSSimon Schubert { "jaeH", { Jv, XX, cond_jump_flag } },
21165796c8dcSSimon Schubert { "jeH", { Jv, XX, cond_jump_flag } },
21175796c8dcSSimon Schubert { "jneH", { Jv, XX, cond_jump_flag } },
21185796c8dcSSimon Schubert { "jbeH", { Jv, XX, cond_jump_flag } },
21195796c8dcSSimon Schubert { "jaH", { Jv, XX, cond_jump_flag } },
21205796c8dcSSimon Schubert /* 88 */
21215796c8dcSSimon Schubert { "jsH", { Jv, XX, cond_jump_flag } },
21225796c8dcSSimon Schubert { "jnsH", { Jv, XX, cond_jump_flag } },
21235796c8dcSSimon Schubert { "jpH", { Jv, XX, cond_jump_flag } },
21245796c8dcSSimon Schubert { "jnpH", { Jv, XX, cond_jump_flag } },
21255796c8dcSSimon Schubert { "jlH", { Jv, XX, cond_jump_flag } },
21265796c8dcSSimon Schubert { "jgeH", { Jv, XX, cond_jump_flag } },
21275796c8dcSSimon Schubert { "jleH", { Jv, XX, cond_jump_flag } },
21285796c8dcSSimon Schubert { "jgH", { Jv, XX, cond_jump_flag } },
21295796c8dcSSimon Schubert /* 90 */
21305796c8dcSSimon Schubert { "seto", { Eb } },
21315796c8dcSSimon Schubert { "setno", { Eb } },
21325796c8dcSSimon Schubert { "setb", { Eb } },
21335796c8dcSSimon Schubert { "setae", { Eb } },
21345796c8dcSSimon Schubert { "sete", { Eb } },
21355796c8dcSSimon Schubert { "setne", { Eb } },
21365796c8dcSSimon Schubert { "setbe", { Eb } },
21375796c8dcSSimon Schubert { "seta", { Eb } },
21385796c8dcSSimon Schubert /* 98 */
21395796c8dcSSimon Schubert { "sets", { Eb } },
21405796c8dcSSimon Schubert { "setns", { Eb } },
21415796c8dcSSimon Schubert { "setp", { Eb } },
21425796c8dcSSimon Schubert { "setnp", { Eb } },
21435796c8dcSSimon Schubert { "setl", { Eb } },
21445796c8dcSSimon Schubert { "setge", { Eb } },
21455796c8dcSSimon Schubert { "setle", { Eb } },
21465796c8dcSSimon Schubert { "setg", { Eb } },
21475796c8dcSSimon Schubert /* a0 */
21485796c8dcSSimon Schubert { "pushT", { fs } },
21495796c8dcSSimon Schubert { "popT", { fs } },
21505796c8dcSSimon Schubert { "cpuid", { XX } },
21515796c8dcSSimon Schubert { "btS", { Ev, Gv } },
21525796c8dcSSimon Schubert { "shldS", { Ev, Gv, Ib } },
21535796c8dcSSimon Schubert { "shldS", { Ev, Gv, CL } },
21545796c8dcSSimon Schubert { REG_TABLE (REG_0FA6) },
21555796c8dcSSimon Schubert { REG_TABLE (REG_0FA7) },
21565796c8dcSSimon Schubert /* a8 */
21575796c8dcSSimon Schubert { "pushT", { gs } },
21585796c8dcSSimon Schubert { "popT", { gs } },
21595796c8dcSSimon Schubert { "rsm", { XX } },
2160*ef5ccd6cSJohn Marino { "btsS", { Evh1, Gv } },
21615796c8dcSSimon Schubert { "shrdS", { Ev, Gv, Ib } },
21625796c8dcSSimon Schubert { "shrdS", { Ev, Gv, CL } },
21635796c8dcSSimon Schubert { REG_TABLE (REG_0FAE) },
21645796c8dcSSimon Schubert { "imulS", { Gv, Ev } },
21655796c8dcSSimon Schubert /* b0 */
2166*ef5ccd6cSJohn Marino { "cmpxchgB", { Ebh1, Gb } },
2167*ef5ccd6cSJohn Marino { "cmpxchgS", { Evh1, Gv } },
21685796c8dcSSimon Schubert { MOD_TABLE (MOD_0FB2) },
2169*ef5ccd6cSJohn Marino { "btrS", { Evh1, Gv } },
21705796c8dcSSimon Schubert { MOD_TABLE (MOD_0FB4) },
21715796c8dcSSimon Schubert { MOD_TABLE (MOD_0FB5) },
21725796c8dcSSimon Schubert { "movz{bR|x}", { Gv, Eb } },
21735796c8dcSSimon Schubert { "movz{wR|x}", { Gv, Ew } }, /* yes, there really is movzww ! */
21745796c8dcSSimon Schubert /* b8 */
21755796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FB8) },
2176c50c785cSJohn Marino { "ud1", { XX } },
21775796c8dcSSimon Schubert { REG_TABLE (REG_0FBA) },
2178*ef5ccd6cSJohn Marino { "btcS", { Evh1, Gv } },
2179c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_0FBC) },
21805796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FBD) },
21815796c8dcSSimon Schubert { "movs{bR|x}", { Gv, Eb } },
21825796c8dcSSimon Schubert { "movs{wR|x}", { Gv, Ew } }, /* yes, there really is movsww ! */
21835796c8dcSSimon Schubert /* c0 */
2184*ef5ccd6cSJohn Marino { "xaddB", { Ebh1, Gb } },
2185*ef5ccd6cSJohn Marino { "xaddS", { Evh1, Gv } },
21865796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FC2) },
21875796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FC3) },
21885796c8dcSSimon Schubert { "pinsrw", { MX, Edqw, Ib } },
21895796c8dcSSimon Schubert { "pextrw", { Gdq, MS, Ib } },
21905796c8dcSSimon Schubert { "shufpX", { XM, EXx, Ib } },
21915796c8dcSSimon Schubert { REG_TABLE (REG_0FC7) },
21925796c8dcSSimon Schubert /* c8 */
21935796c8dcSSimon Schubert { "bswap", { RMeAX } },
21945796c8dcSSimon Schubert { "bswap", { RMeCX } },
21955796c8dcSSimon Schubert { "bswap", { RMeDX } },
21965796c8dcSSimon Schubert { "bswap", { RMeBX } },
21975796c8dcSSimon Schubert { "bswap", { RMeSP } },
21985796c8dcSSimon Schubert { "bswap", { RMeBP } },
21995796c8dcSSimon Schubert { "bswap", { RMeSI } },
22005796c8dcSSimon Schubert { "bswap", { RMeDI } },
22015796c8dcSSimon Schubert /* d0 */
22025796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FD0) },
22035796c8dcSSimon Schubert { "psrlw", { MX, EM } },
22045796c8dcSSimon Schubert { "psrld", { MX, EM } },
22055796c8dcSSimon Schubert { "psrlq", { MX, EM } },
22065796c8dcSSimon Schubert { "paddq", { MX, EM } },
22075796c8dcSSimon Schubert { "pmullw", { MX, EM } },
22085796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FD6) },
22095796c8dcSSimon Schubert { MOD_TABLE (MOD_0FD7) },
22105796c8dcSSimon Schubert /* d8 */
22115796c8dcSSimon Schubert { "psubusb", { MX, EM } },
22125796c8dcSSimon Schubert { "psubusw", { MX, EM } },
22135796c8dcSSimon Schubert { "pminub", { MX, EM } },
22145796c8dcSSimon Schubert { "pand", { MX, EM } },
22155796c8dcSSimon Schubert { "paddusb", { MX, EM } },
22165796c8dcSSimon Schubert { "paddusw", { MX, EM } },
22175796c8dcSSimon Schubert { "pmaxub", { MX, EM } },
22185796c8dcSSimon Schubert { "pandn", { MX, EM } },
22195796c8dcSSimon Schubert /* e0 */
22205796c8dcSSimon Schubert { "pavgb", { MX, EM } },
22215796c8dcSSimon Schubert { "psraw", { MX, EM } },
22225796c8dcSSimon Schubert { "psrad", { MX, EM } },
22235796c8dcSSimon Schubert { "pavgw", { MX, EM } },
22245796c8dcSSimon Schubert { "pmulhuw", { MX, EM } },
22255796c8dcSSimon Schubert { "pmulhw", { MX, EM } },
22265796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FE6) },
22275796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FE7) },
22285796c8dcSSimon Schubert /* e8 */
22295796c8dcSSimon Schubert { "psubsb", { MX, EM } },
22305796c8dcSSimon Schubert { "psubsw", { MX, EM } },
22315796c8dcSSimon Schubert { "pminsw", { MX, EM } },
22325796c8dcSSimon Schubert { "por", { MX, EM } },
22335796c8dcSSimon Schubert { "paddsb", { MX, EM } },
22345796c8dcSSimon Schubert { "paddsw", { MX, EM } },
22355796c8dcSSimon Schubert { "pmaxsw", { MX, EM } },
22365796c8dcSSimon Schubert { "pxor", { MX, EM } },
22375796c8dcSSimon Schubert /* f0 */
22385796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FF0) },
22395796c8dcSSimon Schubert { "psllw", { MX, EM } },
22405796c8dcSSimon Schubert { "pslld", { MX, EM } },
22415796c8dcSSimon Schubert { "psllq", { MX, EM } },
22425796c8dcSSimon Schubert { "pmuludq", { MX, EM } },
22435796c8dcSSimon Schubert { "pmaddwd", { MX, EM } },
22445796c8dcSSimon Schubert { "psadbw", { MX, EM } },
22455796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FF7) },
22465796c8dcSSimon Schubert /* f8 */
22475796c8dcSSimon Schubert { "psubb", { MX, EM } },
22485796c8dcSSimon Schubert { "psubw", { MX, EM } },
22495796c8dcSSimon Schubert { "psubd", { MX, EM } },
22505796c8dcSSimon Schubert { "psubq", { MX, EM } },
22515796c8dcSSimon Schubert { "paddb", { MX, EM } },
22525796c8dcSSimon Schubert { "paddw", { MX, EM } },
22535796c8dcSSimon Schubert { "paddd", { MX, EM } },
2254cf7f2e2dSJohn Marino { Bad_Opcode },
22555796c8dcSSimon Schubert };
22565796c8dcSSimon Schubert
22575796c8dcSSimon Schubert static const unsigned char onebyte_has_modrm[256] = {
22585796c8dcSSimon Schubert /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
22595796c8dcSSimon Schubert /* ------------------------------- */
22605796c8dcSSimon Schubert /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
22615796c8dcSSimon Schubert /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
22625796c8dcSSimon Schubert /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
22635796c8dcSSimon Schubert /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
22645796c8dcSSimon Schubert /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
22655796c8dcSSimon Schubert /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
22665796c8dcSSimon Schubert /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
22675796c8dcSSimon Schubert /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
22685796c8dcSSimon Schubert /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
22695796c8dcSSimon Schubert /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
22705796c8dcSSimon Schubert /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
22715796c8dcSSimon Schubert /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
22725796c8dcSSimon Schubert /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
22735796c8dcSSimon Schubert /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
22745796c8dcSSimon Schubert /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
22755796c8dcSSimon Schubert /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
22765796c8dcSSimon Schubert /* ------------------------------- */
22775796c8dcSSimon Schubert /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
22785796c8dcSSimon Schubert };
22795796c8dcSSimon Schubert
22805796c8dcSSimon Schubert static const unsigned char twobyte_has_modrm[256] = {
22815796c8dcSSimon Schubert /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
22825796c8dcSSimon Schubert /* ------------------------------- */
22835796c8dcSSimon Schubert /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
22845796c8dcSSimon Schubert /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
22855796c8dcSSimon Schubert /* 20 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 2f */
22865796c8dcSSimon Schubert /* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
22875796c8dcSSimon Schubert /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
22885796c8dcSSimon Schubert /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
22895796c8dcSSimon Schubert /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
22905796c8dcSSimon Schubert /* 70 */ 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1, /* 7f */
22915796c8dcSSimon Schubert /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
22925796c8dcSSimon Schubert /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
22935796c8dcSSimon Schubert /* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
22945796c8dcSSimon Schubert /* b0 */ 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, /* bf */
22955796c8dcSSimon Schubert /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
22965796c8dcSSimon Schubert /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
22975796c8dcSSimon Schubert /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
22985796c8dcSSimon Schubert /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
22995796c8dcSSimon Schubert /* ------------------------------- */
23005796c8dcSSimon Schubert /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
23015796c8dcSSimon Schubert };
23025796c8dcSSimon Schubert
23035796c8dcSSimon Schubert static char obuf[100];
23045796c8dcSSimon Schubert static char *obufp;
23055796c8dcSSimon Schubert static char *mnemonicendp;
23065796c8dcSSimon Schubert static char scratchbuf[100];
23075796c8dcSSimon Schubert static unsigned char *start_codep;
23085796c8dcSSimon Schubert static unsigned char *insn_codep;
23095796c8dcSSimon Schubert static unsigned char *codep;
2310cf7f2e2dSJohn Marino static int last_lock_prefix;
2311cf7f2e2dSJohn Marino static int last_repz_prefix;
2312cf7f2e2dSJohn Marino static int last_repnz_prefix;
2313cf7f2e2dSJohn Marino static int last_data_prefix;
2314cf7f2e2dSJohn Marino static int last_addr_prefix;
2315cf7f2e2dSJohn Marino static int last_rex_prefix;
2316cf7f2e2dSJohn Marino static int last_seg_prefix;
2317cf7f2e2dSJohn Marino #define MAX_CODE_LENGTH 15
2318cf7f2e2dSJohn Marino /* We can up to 14 prefixes since the maximum instruction length is
2319cf7f2e2dSJohn Marino 15bytes. */
2320cf7f2e2dSJohn Marino static int all_prefixes[MAX_CODE_LENGTH - 1];
23215796c8dcSSimon Schubert static disassemble_info *the_info;
23225796c8dcSSimon Schubert static struct
23235796c8dcSSimon Schubert {
23245796c8dcSSimon Schubert int mod;
23255796c8dcSSimon Schubert int reg;
23265796c8dcSSimon Schubert int rm;
23275796c8dcSSimon Schubert }
23285796c8dcSSimon Schubert modrm;
23295796c8dcSSimon Schubert static unsigned char need_modrm;
23305796c8dcSSimon Schubert static struct
23315796c8dcSSimon Schubert {
2332cf7f2e2dSJohn Marino int scale;
2333cf7f2e2dSJohn Marino int index;
2334cf7f2e2dSJohn Marino int base;
2335cf7f2e2dSJohn Marino }
2336cf7f2e2dSJohn Marino sib;
2337cf7f2e2dSJohn Marino static struct
2338cf7f2e2dSJohn Marino {
23395796c8dcSSimon Schubert int register_specifier;
23405796c8dcSSimon Schubert int length;
23415796c8dcSSimon Schubert int prefix;
23425796c8dcSSimon Schubert int w;
23435796c8dcSSimon Schubert }
23445796c8dcSSimon Schubert vex;
23455796c8dcSSimon Schubert static unsigned char need_vex;
23465796c8dcSSimon Schubert static unsigned char need_vex_reg;
23475796c8dcSSimon Schubert static unsigned char vex_w_done;
23485796c8dcSSimon Schubert
23495796c8dcSSimon Schubert struct op
23505796c8dcSSimon Schubert {
23515796c8dcSSimon Schubert const char *name;
23525796c8dcSSimon Schubert unsigned int len;
23535796c8dcSSimon Schubert };
23545796c8dcSSimon Schubert
23555796c8dcSSimon Schubert /* If we are accessing mod/rm/reg without need_modrm set, then the
23565796c8dcSSimon Schubert values are stale. Hitting this abort likely indicates that you
23575796c8dcSSimon Schubert need to update onebyte_has_modrm or twobyte_has_modrm. */
23585796c8dcSSimon Schubert #define MODRM_CHECK if (!need_modrm) abort ()
23595796c8dcSSimon Schubert
23605796c8dcSSimon Schubert static const char **names64;
23615796c8dcSSimon Schubert static const char **names32;
23625796c8dcSSimon Schubert static const char **names16;
23635796c8dcSSimon Schubert static const char **names8;
23645796c8dcSSimon Schubert static const char **names8rex;
23655796c8dcSSimon Schubert static const char **names_seg;
23665796c8dcSSimon Schubert static const char *index64;
23675796c8dcSSimon Schubert static const char *index32;
23685796c8dcSSimon Schubert static const char **index16;
23695796c8dcSSimon Schubert
23705796c8dcSSimon Schubert static const char *intel_names64[] = {
23715796c8dcSSimon Schubert "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
23725796c8dcSSimon Schubert "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
23735796c8dcSSimon Schubert };
23745796c8dcSSimon Schubert static const char *intel_names32[] = {
23755796c8dcSSimon Schubert "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
23765796c8dcSSimon Schubert "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
23775796c8dcSSimon Schubert };
23785796c8dcSSimon Schubert static const char *intel_names16[] = {
23795796c8dcSSimon Schubert "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
23805796c8dcSSimon Schubert "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
23815796c8dcSSimon Schubert };
23825796c8dcSSimon Schubert static const char *intel_names8[] = {
23835796c8dcSSimon Schubert "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
23845796c8dcSSimon Schubert };
23855796c8dcSSimon Schubert static const char *intel_names8rex[] = {
23865796c8dcSSimon Schubert "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
23875796c8dcSSimon Schubert "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
23885796c8dcSSimon Schubert };
23895796c8dcSSimon Schubert static const char *intel_names_seg[] = {
23905796c8dcSSimon Schubert "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
23915796c8dcSSimon Schubert };
23925796c8dcSSimon Schubert static const char *intel_index64 = "riz";
23935796c8dcSSimon Schubert static const char *intel_index32 = "eiz";
23945796c8dcSSimon Schubert static const char *intel_index16[] = {
23955796c8dcSSimon Schubert "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
23965796c8dcSSimon Schubert };
23975796c8dcSSimon Schubert
23985796c8dcSSimon Schubert static const char *att_names64[] = {
23995796c8dcSSimon Schubert "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
24005796c8dcSSimon Schubert "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
24015796c8dcSSimon Schubert };
24025796c8dcSSimon Schubert static const char *att_names32[] = {
24035796c8dcSSimon Schubert "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
24045796c8dcSSimon Schubert "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
24055796c8dcSSimon Schubert };
24065796c8dcSSimon Schubert static const char *att_names16[] = {
24075796c8dcSSimon Schubert "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
24085796c8dcSSimon Schubert "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
24095796c8dcSSimon Schubert };
24105796c8dcSSimon Schubert static const char *att_names8[] = {
24115796c8dcSSimon Schubert "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
24125796c8dcSSimon Schubert };
24135796c8dcSSimon Schubert static const char *att_names8rex[] = {
24145796c8dcSSimon Schubert "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
24155796c8dcSSimon Schubert "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
24165796c8dcSSimon Schubert };
24175796c8dcSSimon Schubert static const char *att_names_seg[] = {
24185796c8dcSSimon Schubert "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
24195796c8dcSSimon Schubert };
24205796c8dcSSimon Schubert static const char *att_index64 = "%riz";
24215796c8dcSSimon Schubert static const char *att_index32 = "%eiz";
24225796c8dcSSimon Schubert static const char *att_index16[] = {
24235796c8dcSSimon Schubert "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
24245796c8dcSSimon Schubert };
24255796c8dcSSimon Schubert
2426cf7f2e2dSJohn Marino static const char **names_mm;
2427cf7f2e2dSJohn Marino static const char *intel_names_mm[] = {
2428cf7f2e2dSJohn Marino "mm0", "mm1", "mm2", "mm3",
2429cf7f2e2dSJohn Marino "mm4", "mm5", "mm6", "mm7"
2430cf7f2e2dSJohn Marino };
2431cf7f2e2dSJohn Marino static const char *att_names_mm[] = {
2432cf7f2e2dSJohn Marino "%mm0", "%mm1", "%mm2", "%mm3",
2433cf7f2e2dSJohn Marino "%mm4", "%mm5", "%mm6", "%mm7"
2434cf7f2e2dSJohn Marino };
2435cf7f2e2dSJohn Marino
2436cf7f2e2dSJohn Marino static const char **names_xmm;
2437cf7f2e2dSJohn Marino static const char *intel_names_xmm[] = {
2438cf7f2e2dSJohn Marino "xmm0", "xmm1", "xmm2", "xmm3",
2439cf7f2e2dSJohn Marino "xmm4", "xmm5", "xmm6", "xmm7",
2440cf7f2e2dSJohn Marino "xmm8", "xmm9", "xmm10", "xmm11",
2441cf7f2e2dSJohn Marino "xmm12", "xmm13", "xmm14", "xmm15"
2442cf7f2e2dSJohn Marino };
2443cf7f2e2dSJohn Marino static const char *att_names_xmm[] = {
2444cf7f2e2dSJohn Marino "%xmm0", "%xmm1", "%xmm2", "%xmm3",
2445cf7f2e2dSJohn Marino "%xmm4", "%xmm5", "%xmm6", "%xmm7",
2446cf7f2e2dSJohn Marino "%xmm8", "%xmm9", "%xmm10", "%xmm11",
2447cf7f2e2dSJohn Marino "%xmm12", "%xmm13", "%xmm14", "%xmm15"
2448cf7f2e2dSJohn Marino };
2449cf7f2e2dSJohn Marino
2450cf7f2e2dSJohn Marino static const char **names_ymm;
2451cf7f2e2dSJohn Marino static const char *intel_names_ymm[] = {
2452cf7f2e2dSJohn Marino "ymm0", "ymm1", "ymm2", "ymm3",
2453cf7f2e2dSJohn Marino "ymm4", "ymm5", "ymm6", "ymm7",
2454cf7f2e2dSJohn Marino "ymm8", "ymm9", "ymm10", "ymm11",
2455cf7f2e2dSJohn Marino "ymm12", "ymm13", "ymm14", "ymm15"
2456cf7f2e2dSJohn Marino };
2457cf7f2e2dSJohn Marino static const char *att_names_ymm[] = {
2458cf7f2e2dSJohn Marino "%ymm0", "%ymm1", "%ymm2", "%ymm3",
2459cf7f2e2dSJohn Marino "%ymm4", "%ymm5", "%ymm6", "%ymm7",
2460cf7f2e2dSJohn Marino "%ymm8", "%ymm9", "%ymm10", "%ymm11",
2461cf7f2e2dSJohn Marino "%ymm12", "%ymm13", "%ymm14", "%ymm15"
2462cf7f2e2dSJohn Marino };
2463cf7f2e2dSJohn Marino
24645796c8dcSSimon Schubert static const struct dis386 reg_table[][8] = {
24655796c8dcSSimon Schubert /* REG_80 */
24665796c8dcSSimon Schubert {
2467*ef5ccd6cSJohn Marino { "addA", { Ebh1, Ib } },
2468*ef5ccd6cSJohn Marino { "orA", { Ebh1, Ib } },
2469*ef5ccd6cSJohn Marino { "adcA", { Ebh1, Ib } },
2470*ef5ccd6cSJohn Marino { "sbbA", { Ebh1, Ib } },
2471*ef5ccd6cSJohn Marino { "andA", { Ebh1, Ib } },
2472*ef5ccd6cSJohn Marino { "subA", { Ebh1, Ib } },
2473*ef5ccd6cSJohn Marino { "xorA", { Ebh1, Ib } },
24745796c8dcSSimon Schubert { "cmpA", { Eb, Ib } },
24755796c8dcSSimon Schubert },
24765796c8dcSSimon Schubert /* REG_81 */
24775796c8dcSSimon Schubert {
2478*ef5ccd6cSJohn Marino { "addQ", { Evh1, Iv } },
2479*ef5ccd6cSJohn Marino { "orQ", { Evh1, Iv } },
2480*ef5ccd6cSJohn Marino { "adcQ", { Evh1, Iv } },
2481*ef5ccd6cSJohn Marino { "sbbQ", { Evh1, Iv } },
2482*ef5ccd6cSJohn Marino { "andQ", { Evh1, Iv } },
2483*ef5ccd6cSJohn Marino { "subQ", { Evh1, Iv } },
2484*ef5ccd6cSJohn Marino { "xorQ", { Evh1, Iv } },
24855796c8dcSSimon Schubert { "cmpQ", { Ev, Iv } },
24865796c8dcSSimon Schubert },
24875796c8dcSSimon Schubert /* REG_82 */
24885796c8dcSSimon Schubert {
2489*ef5ccd6cSJohn Marino { "addQ", { Evh1, sIb } },
2490*ef5ccd6cSJohn Marino { "orQ", { Evh1, sIb } },
2491*ef5ccd6cSJohn Marino { "adcQ", { Evh1, sIb } },
2492*ef5ccd6cSJohn Marino { "sbbQ", { Evh1, sIb } },
2493*ef5ccd6cSJohn Marino { "andQ", { Evh1, sIb } },
2494*ef5ccd6cSJohn Marino { "subQ", { Evh1, sIb } },
2495*ef5ccd6cSJohn Marino { "xorQ", { Evh1, sIb } },
24965796c8dcSSimon Schubert { "cmpQ", { Ev, sIb } },
24975796c8dcSSimon Schubert },
24985796c8dcSSimon Schubert /* REG_8F */
24995796c8dcSSimon Schubert {
25005796c8dcSSimon Schubert { "popU", { stackEv } },
2501cf7f2e2dSJohn Marino { XOP_8F_TABLE (XOP_09) },
2502cf7f2e2dSJohn Marino { Bad_Opcode },
2503cf7f2e2dSJohn Marino { Bad_Opcode },
2504cf7f2e2dSJohn Marino { Bad_Opcode },
2505cf7f2e2dSJohn Marino { XOP_8F_TABLE (XOP_09) },
25065796c8dcSSimon Schubert },
25075796c8dcSSimon Schubert /* REG_C0 */
25085796c8dcSSimon Schubert {
25095796c8dcSSimon Schubert { "rolA", { Eb, Ib } },
25105796c8dcSSimon Schubert { "rorA", { Eb, Ib } },
25115796c8dcSSimon Schubert { "rclA", { Eb, Ib } },
25125796c8dcSSimon Schubert { "rcrA", { Eb, Ib } },
25135796c8dcSSimon Schubert { "shlA", { Eb, Ib } },
25145796c8dcSSimon Schubert { "shrA", { Eb, Ib } },
2515cf7f2e2dSJohn Marino { Bad_Opcode },
25165796c8dcSSimon Schubert { "sarA", { Eb, Ib } },
25175796c8dcSSimon Schubert },
25185796c8dcSSimon Schubert /* REG_C1 */
25195796c8dcSSimon Schubert {
25205796c8dcSSimon Schubert { "rolQ", { Ev, Ib } },
25215796c8dcSSimon Schubert { "rorQ", { Ev, Ib } },
25225796c8dcSSimon Schubert { "rclQ", { Ev, Ib } },
25235796c8dcSSimon Schubert { "rcrQ", { Ev, Ib } },
25245796c8dcSSimon Schubert { "shlQ", { Ev, Ib } },
25255796c8dcSSimon Schubert { "shrQ", { Ev, Ib } },
2526cf7f2e2dSJohn Marino { Bad_Opcode },
25275796c8dcSSimon Schubert { "sarQ", { Ev, Ib } },
25285796c8dcSSimon Schubert },
25295796c8dcSSimon Schubert /* REG_C6 */
25305796c8dcSSimon Schubert {
2531*ef5ccd6cSJohn Marino { "movA", { Ebh3, Ib } },
2532*ef5ccd6cSJohn Marino { Bad_Opcode },
2533*ef5ccd6cSJohn Marino { Bad_Opcode },
2534*ef5ccd6cSJohn Marino { Bad_Opcode },
2535*ef5ccd6cSJohn Marino { Bad_Opcode },
2536*ef5ccd6cSJohn Marino { Bad_Opcode },
2537*ef5ccd6cSJohn Marino { Bad_Opcode },
2538*ef5ccd6cSJohn Marino { MOD_TABLE (MOD_C6_REG_7) },
25395796c8dcSSimon Schubert },
25405796c8dcSSimon Schubert /* REG_C7 */
25415796c8dcSSimon Schubert {
2542*ef5ccd6cSJohn Marino { "movQ", { Evh3, Iv } },
2543*ef5ccd6cSJohn Marino { Bad_Opcode },
2544*ef5ccd6cSJohn Marino { Bad_Opcode },
2545*ef5ccd6cSJohn Marino { Bad_Opcode },
2546*ef5ccd6cSJohn Marino { Bad_Opcode },
2547*ef5ccd6cSJohn Marino { Bad_Opcode },
2548*ef5ccd6cSJohn Marino { Bad_Opcode },
2549*ef5ccd6cSJohn Marino { MOD_TABLE (MOD_C7_REG_7) },
25505796c8dcSSimon Schubert },
25515796c8dcSSimon Schubert /* REG_D0 */
25525796c8dcSSimon Schubert {
25535796c8dcSSimon Schubert { "rolA", { Eb, I1 } },
25545796c8dcSSimon Schubert { "rorA", { Eb, I1 } },
25555796c8dcSSimon Schubert { "rclA", { Eb, I1 } },
25565796c8dcSSimon Schubert { "rcrA", { Eb, I1 } },
25575796c8dcSSimon Schubert { "shlA", { Eb, I1 } },
25585796c8dcSSimon Schubert { "shrA", { Eb, I1 } },
2559cf7f2e2dSJohn Marino { Bad_Opcode },
25605796c8dcSSimon Schubert { "sarA", { Eb, I1 } },
25615796c8dcSSimon Schubert },
25625796c8dcSSimon Schubert /* REG_D1 */
25635796c8dcSSimon Schubert {
25645796c8dcSSimon Schubert { "rolQ", { Ev, I1 } },
25655796c8dcSSimon Schubert { "rorQ", { Ev, I1 } },
25665796c8dcSSimon Schubert { "rclQ", { Ev, I1 } },
25675796c8dcSSimon Schubert { "rcrQ", { Ev, I1 } },
25685796c8dcSSimon Schubert { "shlQ", { Ev, I1 } },
25695796c8dcSSimon Schubert { "shrQ", { Ev, I1 } },
2570cf7f2e2dSJohn Marino { Bad_Opcode },
25715796c8dcSSimon Schubert { "sarQ", { Ev, I1 } },
25725796c8dcSSimon Schubert },
25735796c8dcSSimon Schubert /* REG_D2 */
25745796c8dcSSimon Schubert {
25755796c8dcSSimon Schubert { "rolA", { Eb, CL } },
25765796c8dcSSimon Schubert { "rorA", { Eb, CL } },
25775796c8dcSSimon Schubert { "rclA", { Eb, CL } },
25785796c8dcSSimon Schubert { "rcrA", { Eb, CL } },
25795796c8dcSSimon Schubert { "shlA", { Eb, CL } },
25805796c8dcSSimon Schubert { "shrA", { Eb, CL } },
2581cf7f2e2dSJohn Marino { Bad_Opcode },
25825796c8dcSSimon Schubert { "sarA", { Eb, CL } },
25835796c8dcSSimon Schubert },
25845796c8dcSSimon Schubert /* REG_D3 */
25855796c8dcSSimon Schubert {
25865796c8dcSSimon Schubert { "rolQ", { Ev, CL } },
25875796c8dcSSimon Schubert { "rorQ", { Ev, CL } },
25885796c8dcSSimon Schubert { "rclQ", { Ev, CL } },
25895796c8dcSSimon Schubert { "rcrQ", { Ev, CL } },
25905796c8dcSSimon Schubert { "shlQ", { Ev, CL } },
25915796c8dcSSimon Schubert { "shrQ", { Ev, CL } },
2592cf7f2e2dSJohn Marino { Bad_Opcode },
25935796c8dcSSimon Schubert { "sarQ", { Ev, CL } },
25945796c8dcSSimon Schubert },
25955796c8dcSSimon Schubert /* REG_F6 */
25965796c8dcSSimon Schubert {
25975796c8dcSSimon Schubert { "testA", { Eb, Ib } },
2598cf7f2e2dSJohn Marino { Bad_Opcode },
2599*ef5ccd6cSJohn Marino { "notA", { Ebh1 } },
2600*ef5ccd6cSJohn Marino { "negA", { Ebh1 } },
26015796c8dcSSimon Schubert { "mulA", { Eb } }, /* Don't print the implicit %al register, */
26025796c8dcSSimon Schubert { "imulA", { Eb } }, /* to distinguish these opcodes from other */
26035796c8dcSSimon Schubert { "divA", { Eb } }, /* mul/imul opcodes. Do the same for div */
26045796c8dcSSimon Schubert { "idivA", { Eb } }, /* and idiv for consistency. */
26055796c8dcSSimon Schubert },
26065796c8dcSSimon Schubert /* REG_F7 */
26075796c8dcSSimon Schubert {
26085796c8dcSSimon Schubert { "testQ", { Ev, Iv } },
2609cf7f2e2dSJohn Marino { Bad_Opcode },
2610*ef5ccd6cSJohn Marino { "notQ", { Evh1 } },
2611*ef5ccd6cSJohn Marino { "negQ", { Evh1 } },
26125796c8dcSSimon Schubert { "mulQ", { Ev } }, /* Don't print the implicit register. */
26135796c8dcSSimon Schubert { "imulQ", { Ev } },
26145796c8dcSSimon Schubert { "divQ", { Ev } },
26155796c8dcSSimon Schubert { "idivQ", { Ev } },
26165796c8dcSSimon Schubert },
26175796c8dcSSimon Schubert /* REG_FE */
26185796c8dcSSimon Schubert {
2619*ef5ccd6cSJohn Marino { "incA", { Ebh1 } },
2620*ef5ccd6cSJohn Marino { "decA", { Ebh1 } },
26215796c8dcSSimon Schubert },
26225796c8dcSSimon Schubert /* REG_FF */
26235796c8dcSSimon Schubert {
2624*ef5ccd6cSJohn Marino { "incQ", { Evh1 } },
2625*ef5ccd6cSJohn Marino { "decQ", { Evh1 } },
2626c50c785cSJohn Marino { "call{T|}", { indirEv } },
2627c50c785cSJohn Marino { "Jcall{T|}", { indirEp } },
2628c50c785cSJohn Marino { "jmp{T|}", { indirEv } },
2629c50c785cSJohn Marino { "Jjmp{T|}", { indirEp } },
26305796c8dcSSimon Schubert { "pushU", { stackEv } },
2631cf7f2e2dSJohn Marino { Bad_Opcode },
26325796c8dcSSimon Schubert },
26335796c8dcSSimon Schubert /* REG_0F00 */
26345796c8dcSSimon Schubert {
26355796c8dcSSimon Schubert { "sldtD", { Sv } },
26365796c8dcSSimon Schubert { "strD", { Sv } },
26375796c8dcSSimon Schubert { "lldt", { Ew } },
26385796c8dcSSimon Schubert { "ltr", { Ew } },
26395796c8dcSSimon Schubert { "verr", { Ew } },
26405796c8dcSSimon Schubert { "verw", { Ew } },
2641cf7f2e2dSJohn Marino { Bad_Opcode },
2642cf7f2e2dSJohn Marino { Bad_Opcode },
26435796c8dcSSimon Schubert },
26445796c8dcSSimon Schubert /* REG_0F01 */
26455796c8dcSSimon Schubert {
26465796c8dcSSimon Schubert { MOD_TABLE (MOD_0F01_REG_0) },
26475796c8dcSSimon Schubert { MOD_TABLE (MOD_0F01_REG_1) },
26485796c8dcSSimon Schubert { MOD_TABLE (MOD_0F01_REG_2) },
26495796c8dcSSimon Schubert { MOD_TABLE (MOD_0F01_REG_3) },
26505796c8dcSSimon Schubert { "smswD", { Sv } },
2651cf7f2e2dSJohn Marino { Bad_Opcode },
26525796c8dcSSimon Schubert { "lmsw", { Ew } },
26535796c8dcSSimon Schubert { MOD_TABLE (MOD_0F01_REG_7) },
26545796c8dcSSimon Schubert },
26555796c8dcSSimon Schubert /* REG_0F0D */
26565796c8dcSSimon Schubert {
2657c50c785cSJohn Marino { "prefetch", { Mb } },
2658c50c785cSJohn Marino { "prefetchw", { Mb } },
2659*ef5ccd6cSJohn Marino { "prefetch", { Mb } },
2660*ef5ccd6cSJohn Marino { "prefetch", { Mb } },
2661*ef5ccd6cSJohn Marino { "prefetch", { Mb } },
2662*ef5ccd6cSJohn Marino { "prefetch", { Mb } },
2663*ef5ccd6cSJohn Marino { "prefetch", { Mb } },
2664*ef5ccd6cSJohn Marino { "prefetch", { Mb } },
26655796c8dcSSimon Schubert },
26665796c8dcSSimon Schubert /* REG_0F18 */
26675796c8dcSSimon Schubert {
26685796c8dcSSimon Schubert { MOD_TABLE (MOD_0F18_REG_0) },
26695796c8dcSSimon Schubert { MOD_TABLE (MOD_0F18_REG_1) },
26705796c8dcSSimon Schubert { MOD_TABLE (MOD_0F18_REG_2) },
26715796c8dcSSimon Schubert { MOD_TABLE (MOD_0F18_REG_3) },
2672*ef5ccd6cSJohn Marino { MOD_TABLE (MOD_0F18_REG_4) },
2673*ef5ccd6cSJohn Marino { MOD_TABLE (MOD_0F18_REG_5) },
2674*ef5ccd6cSJohn Marino { MOD_TABLE (MOD_0F18_REG_6) },
2675*ef5ccd6cSJohn Marino { MOD_TABLE (MOD_0F18_REG_7) },
26765796c8dcSSimon Schubert },
26775796c8dcSSimon Schubert /* REG_0F71 */
26785796c8dcSSimon Schubert {
2679cf7f2e2dSJohn Marino { Bad_Opcode },
2680cf7f2e2dSJohn Marino { Bad_Opcode },
26815796c8dcSSimon Schubert { MOD_TABLE (MOD_0F71_REG_2) },
2682cf7f2e2dSJohn Marino { Bad_Opcode },
26835796c8dcSSimon Schubert { MOD_TABLE (MOD_0F71_REG_4) },
2684cf7f2e2dSJohn Marino { Bad_Opcode },
26855796c8dcSSimon Schubert { MOD_TABLE (MOD_0F71_REG_6) },
26865796c8dcSSimon Schubert },
26875796c8dcSSimon Schubert /* REG_0F72 */
26885796c8dcSSimon Schubert {
2689cf7f2e2dSJohn Marino { Bad_Opcode },
2690cf7f2e2dSJohn Marino { Bad_Opcode },
26915796c8dcSSimon Schubert { MOD_TABLE (MOD_0F72_REG_2) },
2692cf7f2e2dSJohn Marino { Bad_Opcode },
26935796c8dcSSimon Schubert { MOD_TABLE (MOD_0F72_REG_4) },
2694cf7f2e2dSJohn Marino { Bad_Opcode },
26955796c8dcSSimon Schubert { MOD_TABLE (MOD_0F72_REG_6) },
26965796c8dcSSimon Schubert },
26975796c8dcSSimon Schubert /* REG_0F73 */
26985796c8dcSSimon Schubert {
2699cf7f2e2dSJohn Marino { Bad_Opcode },
2700cf7f2e2dSJohn Marino { Bad_Opcode },
27015796c8dcSSimon Schubert { MOD_TABLE (MOD_0F73_REG_2) },
27025796c8dcSSimon Schubert { MOD_TABLE (MOD_0F73_REG_3) },
2703cf7f2e2dSJohn Marino { Bad_Opcode },
2704cf7f2e2dSJohn Marino { Bad_Opcode },
27055796c8dcSSimon Schubert { MOD_TABLE (MOD_0F73_REG_6) },
27065796c8dcSSimon Schubert { MOD_TABLE (MOD_0F73_REG_7) },
27075796c8dcSSimon Schubert },
27085796c8dcSSimon Schubert /* REG_0FA6 */
27095796c8dcSSimon Schubert {
27105796c8dcSSimon Schubert { "montmul", { { OP_0f07, 0 } } },
27115796c8dcSSimon Schubert { "xsha1", { { OP_0f07, 0 } } },
27125796c8dcSSimon Schubert { "xsha256", { { OP_0f07, 0 } } },
27135796c8dcSSimon Schubert },
27145796c8dcSSimon Schubert /* REG_0FA7 */
27155796c8dcSSimon Schubert {
27165796c8dcSSimon Schubert { "xstore-rng", { { OP_0f07, 0 } } },
27175796c8dcSSimon Schubert { "xcrypt-ecb", { { OP_0f07, 0 } } },
27185796c8dcSSimon Schubert { "xcrypt-cbc", { { OP_0f07, 0 } } },
27195796c8dcSSimon Schubert { "xcrypt-ctr", { { OP_0f07, 0 } } },
27205796c8dcSSimon Schubert { "xcrypt-cfb", { { OP_0f07, 0 } } },
27215796c8dcSSimon Schubert { "xcrypt-ofb", { { OP_0f07, 0 } } },
27225796c8dcSSimon Schubert },
27235796c8dcSSimon Schubert /* REG_0FAE */
27245796c8dcSSimon Schubert {
27255796c8dcSSimon Schubert { MOD_TABLE (MOD_0FAE_REG_0) },
27265796c8dcSSimon Schubert { MOD_TABLE (MOD_0FAE_REG_1) },
27275796c8dcSSimon Schubert { MOD_TABLE (MOD_0FAE_REG_2) },
27285796c8dcSSimon Schubert { MOD_TABLE (MOD_0FAE_REG_3) },
27295796c8dcSSimon Schubert { MOD_TABLE (MOD_0FAE_REG_4) },
27305796c8dcSSimon Schubert { MOD_TABLE (MOD_0FAE_REG_5) },
27315796c8dcSSimon Schubert { MOD_TABLE (MOD_0FAE_REG_6) },
27325796c8dcSSimon Schubert { MOD_TABLE (MOD_0FAE_REG_7) },
27335796c8dcSSimon Schubert },
27345796c8dcSSimon Schubert /* REG_0FBA */
27355796c8dcSSimon Schubert {
2736cf7f2e2dSJohn Marino { Bad_Opcode },
2737cf7f2e2dSJohn Marino { Bad_Opcode },
2738cf7f2e2dSJohn Marino { Bad_Opcode },
2739cf7f2e2dSJohn Marino { Bad_Opcode },
27405796c8dcSSimon Schubert { "btQ", { Ev, Ib } },
2741*ef5ccd6cSJohn Marino { "btsQ", { Evh1, Ib } },
2742*ef5ccd6cSJohn Marino { "btrQ", { Evh1, Ib } },
2743*ef5ccd6cSJohn Marino { "btcQ", { Evh1, Ib } },
27445796c8dcSSimon Schubert },
27455796c8dcSSimon Schubert /* REG_0FC7 */
27465796c8dcSSimon Schubert {
2747cf7f2e2dSJohn Marino { Bad_Opcode },
27485796c8dcSSimon Schubert { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } } },
2749cf7f2e2dSJohn Marino { Bad_Opcode },
2750cf7f2e2dSJohn Marino { Bad_Opcode },
2751cf7f2e2dSJohn Marino { Bad_Opcode },
2752cf7f2e2dSJohn Marino { Bad_Opcode },
27535796c8dcSSimon Schubert { MOD_TABLE (MOD_0FC7_REG_6) },
27545796c8dcSSimon Schubert { MOD_TABLE (MOD_0FC7_REG_7) },
27555796c8dcSSimon Schubert },
2756c50c785cSJohn Marino /* REG_VEX_0F71 */
27575796c8dcSSimon Schubert {
2758cf7f2e2dSJohn Marino { Bad_Opcode },
2759cf7f2e2dSJohn Marino { Bad_Opcode },
2760c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F71_REG_2) },
2761cf7f2e2dSJohn Marino { Bad_Opcode },
2762c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F71_REG_4) },
2763cf7f2e2dSJohn Marino { Bad_Opcode },
2764c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F71_REG_6) },
27655796c8dcSSimon Schubert },
2766c50c785cSJohn Marino /* REG_VEX_0F72 */
27675796c8dcSSimon Schubert {
2768cf7f2e2dSJohn Marino { Bad_Opcode },
2769cf7f2e2dSJohn Marino { Bad_Opcode },
2770c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F72_REG_2) },
2771cf7f2e2dSJohn Marino { Bad_Opcode },
2772c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F72_REG_4) },
2773cf7f2e2dSJohn Marino { Bad_Opcode },
2774c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F72_REG_6) },
27755796c8dcSSimon Schubert },
2776c50c785cSJohn Marino /* REG_VEX_0F73 */
27775796c8dcSSimon Schubert {
2778cf7f2e2dSJohn Marino { Bad_Opcode },
2779cf7f2e2dSJohn Marino { Bad_Opcode },
2780c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F73_REG_2) },
2781c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F73_REG_3) },
2782cf7f2e2dSJohn Marino { Bad_Opcode },
2783cf7f2e2dSJohn Marino { Bad_Opcode },
2784c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F73_REG_6) },
2785c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F73_REG_7) },
27865796c8dcSSimon Schubert },
2787c50c785cSJohn Marino /* REG_VEX_0FAE */
27885796c8dcSSimon Schubert {
2789cf7f2e2dSJohn Marino { Bad_Opcode },
2790cf7f2e2dSJohn Marino { Bad_Opcode },
2791c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0FAE_REG_2) },
2792c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0FAE_REG_3) },
2793c50c785cSJohn Marino },
2794c50c785cSJohn Marino /* REG_VEX_0F38F3 */
2795c50c785cSJohn Marino {
2796c50c785cSJohn Marino { Bad_Opcode },
2797c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_1) },
2798c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_2) },
2799c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38F3_REG_3) },
2800cf7f2e2dSJohn Marino },
2801cf7f2e2dSJohn Marino /* REG_XOP_LWPCB */
2802cf7f2e2dSJohn Marino {
2803cf7f2e2dSJohn Marino { "llwpcb", { { OP_LWPCB_E, 0 } } },
2804cf7f2e2dSJohn Marino { "slwpcb", { { OP_LWPCB_E, 0 } } },
2805cf7f2e2dSJohn Marino },
2806cf7f2e2dSJohn Marino /* REG_XOP_LWP */
2807cf7f2e2dSJohn Marino {
2808cf7f2e2dSJohn Marino { "lwpins", { { OP_LWP_E, 0 }, Ed, Iq } },
2809cf7f2e2dSJohn Marino { "lwpval", { { OP_LWP_E, 0 }, Ed, Iq } },
28105796c8dcSSimon Schubert },
2811c50c785cSJohn Marino /* REG_XOP_TBM_01 */
2812c50c785cSJohn Marino {
2813c50c785cSJohn Marino { Bad_Opcode },
2814c50c785cSJohn Marino { "blcfill", { { OP_LWP_E, 0 }, Ev } },
2815c50c785cSJohn Marino { "blsfill", { { OP_LWP_E, 0 }, Ev } },
2816c50c785cSJohn Marino { "blcs", { { OP_LWP_E, 0 }, Ev } },
2817c50c785cSJohn Marino { "tzmsk", { { OP_LWP_E, 0 }, Ev } },
2818c50c785cSJohn Marino { "blcic", { { OP_LWP_E, 0 }, Ev } },
2819c50c785cSJohn Marino { "blsic", { { OP_LWP_E, 0 }, Ev } },
2820c50c785cSJohn Marino { "t1mskc", { { OP_LWP_E, 0 }, Ev } },
2821c50c785cSJohn Marino },
2822c50c785cSJohn Marino /* REG_XOP_TBM_02 */
2823c50c785cSJohn Marino {
2824c50c785cSJohn Marino { Bad_Opcode },
2825c50c785cSJohn Marino { "blcmsk", { { OP_LWP_E, 0 }, Ev } },
2826c50c785cSJohn Marino { Bad_Opcode },
2827c50c785cSJohn Marino { Bad_Opcode },
2828c50c785cSJohn Marino { Bad_Opcode },
2829c50c785cSJohn Marino { Bad_Opcode },
2830c50c785cSJohn Marino { "blci", { { OP_LWP_E, 0 }, Ev } },
2831c50c785cSJohn Marino },
28325796c8dcSSimon Schubert };
28335796c8dcSSimon Schubert
28345796c8dcSSimon Schubert static const struct dis386 prefix_table[][4] = {
28355796c8dcSSimon Schubert /* PREFIX_90 */
28365796c8dcSSimon Schubert {
28375796c8dcSSimon Schubert { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
28385796c8dcSSimon Schubert { "pause", { XX } },
28395796c8dcSSimon Schubert { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
28405796c8dcSSimon Schubert },
28415796c8dcSSimon Schubert
28425796c8dcSSimon Schubert /* PREFIX_0F10 */
28435796c8dcSSimon Schubert {
28445796c8dcSSimon Schubert { "movups", { XM, EXx } },
28455796c8dcSSimon Schubert { "movss", { XM, EXd } },
28465796c8dcSSimon Schubert { "movupd", { XM, EXx } },
28475796c8dcSSimon Schubert { "movsd", { XM, EXq } },
28485796c8dcSSimon Schubert },
28495796c8dcSSimon Schubert
28505796c8dcSSimon Schubert /* PREFIX_0F11 */
28515796c8dcSSimon Schubert {
28525796c8dcSSimon Schubert { "movups", { EXxS, XM } },
28535796c8dcSSimon Schubert { "movss", { EXdS, XM } },
28545796c8dcSSimon Schubert { "movupd", { EXxS, XM } },
28555796c8dcSSimon Schubert { "movsd", { EXqS, XM } },
28565796c8dcSSimon Schubert },
28575796c8dcSSimon Schubert
28585796c8dcSSimon Schubert /* PREFIX_0F12 */
28595796c8dcSSimon Schubert {
28605796c8dcSSimon Schubert { MOD_TABLE (MOD_0F12_PREFIX_0) },
28615796c8dcSSimon Schubert { "movsldup", { XM, EXx } },
28625796c8dcSSimon Schubert { "movlpd", { XM, EXq } },
28635796c8dcSSimon Schubert { "movddup", { XM, EXq } },
28645796c8dcSSimon Schubert },
28655796c8dcSSimon Schubert
28665796c8dcSSimon Schubert /* PREFIX_0F16 */
28675796c8dcSSimon Schubert {
28685796c8dcSSimon Schubert { MOD_TABLE (MOD_0F16_PREFIX_0) },
28695796c8dcSSimon Schubert { "movshdup", { XM, EXx } },
28705796c8dcSSimon Schubert { "movhpd", { XM, EXq } },
28715796c8dcSSimon Schubert },
28725796c8dcSSimon Schubert
28735796c8dcSSimon Schubert /* PREFIX_0F2A */
28745796c8dcSSimon Schubert {
28755796c8dcSSimon Schubert { "cvtpi2ps", { XM, EMCq } },
28765796c8dcSSimon Schubert { "cvtsi2ss%LQ", { XM, Ev } },
28775796c8dcSSimon Schubert { "cvtpi2pd", { XM, EMCq } },
28785796c8dcSSimon Schubert { "cvtsi2sd%LQ", { XM, Ev } },
28795796c8dcSSimon Schubert },
28805796c8dcSSimon Schubert
28815796c8dcSSimon Schubert /* PREFIX_0F2B */
28825796c8dcSSimon Schubert {
28835796c8dcSSimon Schubert { MOD_TABLE (MOD_0F2B_PREFIX_0) },
28845796c8dcSSimon Schubert { MOD_TABLE (MOD_0F2B_PREFIX_1) },
28855796c8dcSSimon Schubert { MOD_TABLE (MOD_0F2B_PREFIX_2) },
28865796c8dcSSimon Schubert { MOD_TABLE (MOD_0F2B_PREFIX_3) },
28875796c8dcSSimon Schubert },
28885796c8dcSSimon Schubert
28895796c8dcSSimon Schubert /* PREFIX_0F2C */
28905796c8dcSSimon Schubert {
28915796c8dcSSimon Schubert { "cvttps2pi", { MXC, EXq } },
28925796c8dcSSimon Schubert { "cvttss2siY", { Gv, EXd } },
28935796c8dcSSimon Schubert { "cvttpd2pi", { MXC, EXx } },
28945796c8dcSSimon Schubert { "cvttsd2siY", { Gv, EXq } },
28955796c8dcSSimon Schubert },
28965796c8dcSSimon Schubert
28975796c8dcSSimon Schubert /* PREFIX_0F2D */
28985796c8dcSSimon Schubert {
28995796c8dcSSimon Schubert { "cvtps2pi", { MXC, EXq } },
29005796c8dcSSimon Schubert { "cvtss2siY", { Gv, EXd } },
29015796c8dcSSimon Schubert { "cvtpd2pi", { MXC, EXx } },
29025796c8dcSSimon Schubert { "cvtsd2siY", { Gv, EXq } },
29035796c8dcSSimon Schubert },
29045796c8dcSSimon Schubert
29055796c8dcSSimon Schubert /* PREFIX_0F2E */
29065796c8dcSSimon Schubert {
29075796c8dcSSimon Schubert { "ucomiss",{ XM, EXd } },
2908cf7f2e2dSJohn Marino { Bad_Opcode },
29095796c8dcSSimon Schubert { "ucomisd",{ XM, EXq } },
29105796c8dcSSimon Schubert },
29115796c8dcSSimon Schubert
29125796c8dcSSimon Schubert /* PREFIX_0F2F */
29135796c8dcSSimon Schubert {
29145796c8dcSSimon Schubert { "comiss", { XM, EXd } },
2915cf7f2e2dSJohn Marino { Bad_Opcode },
29165796c8dcSSimon Schubert { "comisd", { XM, EXq } },
29175796c8dcSSimon Schubert },
29185796c8dcSSimon Schubert
29195796c8dcSSimon Schubert /* PREFIX_0F51 */
29205796c8dcSSimon Schubert {
29215796c8dcSSimon Schubert { "sqrtps", { XM, EXx } },
29225796c8dcSSimon Schubert { "sqrtss", { XM, EXd } },
29235796c8dcSSimon Schubert { "sqrtpd", { XM, EXx } },
29245796c8dcSSimon Schubert { "sqrtsd", { XM, EXq } },
29255796c8dcSSimon Schubert },
29265796c8dcSSimon Schubert
29275796c8dcSSimon Schubert /* PREFIX_0F52 */
29285796c8dcSSimon Schubert {
29295796c8dcSSimon Schubert { "rsqrtps",{ XM, EXx } },
29305796c8dcSSimon Schubert { "rsqrtss",{ XM, EXd } },
29315796c8dcSSimon Schubert },
29325796c8dcSSimon Schubert
29335796c8dcSSimon Schubert /* PREFIX_0F53 */
29345796c8dcSSimon Schubert {
29355796c8dcSSimon Schubert { "rcpps", { XM, EXx } },
29365796c8dcSSimon Schubert { "rcpss", { XM, EXd } },
29375796c8dcSSimon Schubert },
29385796c8dcSSimon Schubert
29395796c8dcSSimon Schubert /* PREFIX_0F58 */
29405796c8dcSSimon Schubert {
29415796c8dcSSimon Schubert { "addps", { XM, EXx } },
29425796c8dcSSimon Schubert { "addss", { XM, EXd } },
29435796c8dcSSimon Schubert { "addpd", { XM, EXx } },
29445796c8dcSSimon Schubert { "addsd", { XM, EXq } },
29455796c8dcSSimon Schubert },
29465796c8dcSSimon Schubert
29475796c8dcSSimon Schubert /* PREFIX_0F59 */
29485796c8dcSSimon Schubert {
29495796c8dcSSimon Schubert { "mulps", { XM, EXx } },
29505796c8dcSSimon Schubert { "mulss", { XM, EXd } },
29515796c8dcSSimon Schubert { "mulpd", { XM, EXx } },
29525796c8dcSSimon Schubert { "mulsd", { XM, EXq } },
29535796c8dcSSimon Schubert },
29545796c8dcSSimon Schubert
29555796c8dcSSimon Schubert /* PREFIX_0F5A */
29565796c8dcSSimon Schubert {
29575796c8dcSSimon Schubert { "cvtps2pd", { XM, EXq } },
29585796c8dcSSimon Schubert { "cvtss2sd", { XM, EXd } },
29595796c8dcSSimon Schubert { "cvtpd2ps", { XM, EXx } },
29605796c8dcSSimon Schubert { "cvtsd2ss", { XM, EXq } },
29615796c8dcSSimon Schubert },
29625796c8dcSSimon Schubert
29635796c8dcSSimon Schubert /* PREFIX_0F5B */
29645796c8dcSSimon Schubert {
29655796c8dcSSimon Schubert { "cvtdq2ps", { XM, EXx } },
29665796c8dcSSimon Schubert { "cvttps2dq", { XM, EXx } },
29675796c8dcSSimon Schubert { "cvtps2dq", { XM, EXx } },
29685796c8dcSSimon Schubert },
29695796c8dcSSimon Schubert
29705796c8dcSSimon Schubert /* PREFIX_0F5C */
29715796c8dcSSimon Schubert {
29725796c8dcSSimon Schubert { "subps", { XM, EXx } },
29735796c8dcSSimon Schubert { "subss", { XM, EXd } },
29745796c8dcSSimon Schubert { "subpd", { XM, EXx } },
29755796c8dcSSimon Schubert { "subsd", { XM, EXq } },
29765796c8dcSSimon Schubert },
29775796c8dcSSimon Schubert
29785796c8dcSSimon Schubert /* PREFIX_0F5D */
29795796c8dcSSimon Schubert {
29805796c8dcSSimon Schubert { "minps", { XM, EXx } },
29815796c8dcSSimon Schubert { "minss", { XM, EXd } },
29825796c8dcSSimon Schubert { "minpd", { XM, EXx } },
29835796c8dcSSimon Schubert { "minsd", { XM, EXq } },
29845796c8dcSSimon Schubert },
29855796c8dcSSimon Schubert
29865796c8dcSSimon Schubert /* PREFIX_0F5E */
29875796c8dcSSimon Schubert {
29885796c8dcSSimon Schubert { "divps", { XM, EXx } },
29895796c8dcSSimon Schubert { "divss", { XM, EXd } },
29905796c8dcSSimon Schubert { "divpd", { XM, EXx } },
29915796c8dcSSimon Schubert { "divsd", { XM, EXq } },
29925796c8dcSSimon Schubert },
29935796c8dcSSimon Schubert
29945796c8dcSSimon Schubert /* PREFIX_0F5F */
29955796c8dcSSimon Schubert {
29965796c8dcSSimon Schubert { "maxps", { XM, EXx } },
29975796c8dcSSimon Schubert { "maxss", { XM, EXd } },
29985796c8dcSSimon Schubert { "maxpd", { XM, EXx } },
29995796c8dcSSimon Schubert { "maxsd", { XM, EXq } },
30005796c8dcSSimon Schubert },
30015796c8dcSSimon Schubert
30025796c8dcSSimon Schubert /* PREFIX_0F60 */
30035796c8dcSSimon Schubert {
30045796c8dcSSimon Schubert { "punpcklbw",{ MX, EMd } },
3005cf7f2e2dSJohn Marino { Bad_Opcode },
30065796c8dcSSimon Schubert { "punpcklbw",{ MX, EMx } },
30075796c8dcSSimon Schubert },
30085796c8dcSSimon Schubert
30095796c8dcSSimon Schubert /* PREFIX_0F61 */
30105796c8dcSSimon Schubert {
30115796c8dcSSimon Schubert { "punpcklwd",{ MX, EMd } },
3012cf7f2e2dSJohn Marino { Bad_Opcode },
30135796c8dcSSimon Schubert { "punpcklwd",{ MX, EMx } },
30145796c8dcSSimon Schubert },
30155796c8dcSSimon Schubert
30165796c8dcSSimon Schubert /* PREFIX_0F62 */
30175796c8dcSSimon Schubert {
30185796c8dcSSimon Schubert { "punpckldq",{ MX, EMd } },
3019cf7f2e2dSJohn Marino { Bad_Opcode },
30205796c8dcSSimon Schubert { "punpckldq",{ MX, EMx } },
30215796c8dcSSimon Schubert },
30225796c8dcSSimon Schubert
30235796c8dcSSimon Schubert /* PREFIX_0F6C */
30245796c8dcSSimon Schubert {
3025cf7f2e2dSJohn Marino { Bad_Opcode },
3026cf7f2e2dSJohn Marino { Bad_Opcode },
30275796c8dcSSimon Schubert { "punpcklqdq", { XM, EXx } },
30285796c8dcSSimon Schubert },
30295796c8dcSSimon Schubert
30305796c8dcSSimon Schubert /* PREFIX_0F6D */
30315796c8dcSSimon Schubert {
3032cf7f2e2dSJohn Marino { Bad_Opcode },
3033cf7f2e2dSJohn Marino { Bad_Opcode },
30345796c8dcSSimon Schubert { "punpckhqdq", { XM, EXx } },
30355796c8dcSSimon Schubert },
30365796c8dcSSimon Schubert
30375796c8dcSSimon Schubert /* PREFIX_0F6F */
30385796c8dcSSimon Schubert {
30395796c8dcSSimon Schubert { "movq", { MX, EM } },
30405796c8dcSSimon Schubert { "movdqu", { XM, EXx } },
30415796c8dcSSimon Schubert { "movdqa", { XM, EXx } },
30425796c8dcSSimon Schubert },
30435796c8dcSSimon Schubert
30445796c8dcSSimon Schubert /* PREFIX_0F70 */
30455796c8dcSSimon Schubert {
30465796c8dcSSimon Schubert { "pshufw", { MX, EM, Ib } },
30475796c8dcSSimon Schubert { "pshufhw",{ XM, EXx, Ib } },
30485796c8dcSSimon Schubert { "pshufd", { XM, EXx, Ib } },
30495796c8dcSSimon Schubert { "pshuflw",{ XM, EXx, Ib } },
30505796c8dcSSimon Schubert },
30515796c8dcSSimon Schubert
30525796c8dcSSimon Schubert /* PREFIX_0F73_REG_3 */
30535796c8dcSSimon Schubert {
3054cf7f2e2dSJohn Marino { Bad_Opcode },
3055cf7f2e2dSJohn Marino { Bad_Opcode },
30565796c8dcSSimon Schubert { "psrldq", { XS, Ib } },
30575796c8dcSSimon Schubert },
30585796c8dcSSimon Schubert
30595796c8dcSSimon Schubert /* PREFIX_0F73_REG_7 */
30605796c8dcSSimon Schubert {
3061cf7f2e2dSJohn Marino { Bad_Opcode },
3062cf7f2e2dSJohn Marino { Bad_Opcode },
30635796c8dcSSimon Schubert { "pslldq", { XS, Ib } },
30645796c8dcSSimon Schubert },
30655796c8dcSSimon Schubert
30665796c8dcSSimon Schubert /* PREFIX_0F78 */
30675796c8dcSSimon Schubert {
30685796c8dcSSimon Schubert {"vmread", { Em, Gm } },
3069cf7f2e2dSJohn Marino { Bad_Opcode },
30705796c8dcSSimon Schubert {"extrq", { XS, Ib, Ib } },
30715796c8dcSSimon Schubert {"insertq", { XM, XS, Ib, Ib } },
30725796c8dcSSimon Schubert },
30735796c8dcSSimon Schubert
30745796c8dcSSimon Schubert /* PREFIX_0F79 */
30755796c8dcSSimon Schubert {
30765796c8dcSSimon Schubert {"vmwrite", { Gm, Em } },
3077cf7f2e2dSJohn Marino { Bad_Opcode },
30785796c8dcSSimon Schubert {"extrq", { XM, XS } },
30795796c8dcSSimon Schubert {"insertq", { XM, XS } },
30805796c8dcSSimon Schubert },
30815796c8dcSSimon Schubert
30825796c8dcSSimon Schubert /* PREFIX_0F7C */
30835796c8dcSSimon Schubert {
3084cf7f2e2dSJohn Marino { Bad_Opcode },
3085cf7f2e2dSJohn Marino { Bad_Opcode },
30865796c8dcSSimon Schubert { "haddpd", { XM, EXx } },
30875796c8dcSSimon Schubert { "haddps", { XM, EXx } },
30885796c8dcSSimon Schubert },
30895796c8dcSSimon Schubert
30905796c8dcSSimon Schubert /* PREFIX_0F7D */
30915796c8dcSSimon Schubert {
3092cf7f2e2dSJohn Marino { Bad_Opcode },
3093cf7f2e2dSJohn Marino { Bad_Opcode },
30945796c8dcSSimon Schubert { "hsubpd", { XM, EXx } },
30955796c8dcSSimon Schubert { "hsubps", { XM, EXx } },
30965796c8dcSSimon Schubert },
30975796c8dcSSimon Schubert
30985796c8dcSSimon Schubert /* PREFIX_0F7E */
30995796c8dcSSimon Schubert {
31005796c8dcSSimon Schubert { "movK", { Edq, MX } },
31015796c8dcSSimon Schubert { "movq", { XM, EXq } },
31025796c8dcSSimon Schubert { "movK", { Edq, XM } },
31035796c8dcSSimon Schubert },
31045796c8dcSSimon Schubert
31055796c8dcSSimon Schubert /* PREFIX_0F7F */
31065796c8dcSSimon Schubert {
31075796c8dcSSimon Schubert { "movq", { EMS, MX } },
31085796c8dcSSimon Schubert { "movdqu", { EXxS, XM } },
31095796c8dcSSimon Schubert { "movdqa", { EXxS, XM } },
3110cf7f2e2dSJohn Marino },
3111cf7f2e2dSJohn Marino
3112cf7f2e2dSJohn Marino /* PREFIX_0FAE_REG_0 */
3113cf7f2e2dSJohn Marino {
3114cf7f2e2dSJohn Marino { Bad_Opcode },
3115cf7f2e2dSJohn Marino { "rdfsbase", { Ev } },
3116cf7f2e2dSJohn Marino },
3117cf7f2e2dSJohn Marino
3118cf7f2e2dSJohn Marino /* PREFIX_0FAE_REG_1 */
3119cf7f2e2dSJohn Marino {
3120cf7f2e2dSJohn Marino { Bad_Opcode },
3121cf7f2e2dSJohn Marino { "rdgsbase", { Ev } },
3122cf7f2e2dSJohn Marino },
3123cf7f2e2dSJohn Marino
3124cf7f2e2dSJohn Marino /* PREFIX_0FAE_REG_2 */
3125cf7f2e2dSJohn Marino {
3126cf7f2e2dSJohn Marino { Bad_Opcode },
3127cf7f2e2dSJohn Marino { "wrfsbase", { Ev } },
3128cf7f2e2dSJohn Marino },
3129cf7f2e2dSJohn Marino
3130cf7f2e2dSJohn Marino /* PREFIX_0FAE_REG_3 */
3131cf7f2e2dSJohn Marino {
3132cf7f2e2dSJohn Marino { Bad_Opcode },
3133cf7f2e2dSJohn Marino { "wrgsbase", { Ev } },
31345796c8dcSSimon Schubert },
31355796c8dcSSimon Schubert
31365796c8dcSSimon Schubert /* PREFIX_0FB8 */
31375796c8dcSSimon Schubert {
3138cf7f2e2dSJohn Marino { Bad_Opcode },
31395796c8dcSSimon Schubert { "popcntS", { Gv, Ev } },
31405796c8dcSSimon Schubert },
31415796c8dcSSimon Schubert
3142c50c785cSJohn Marino /* PREFIX_0FBC */
3143c50c785cSJohn Marino {
3144c50c785cSJohn Marino { "bsfS", { Gv, Ev } },
3145c50c785cSJohn Marino { "tzcntS", { Gv, Ev } },
3146c50c785cSJohn Marino { "bsfS", { Gv, Ev } },
3147c50c785cSJohn Marino },
3148c50c785cSJohn Marino
31495796c8dcSSimon Schubert /* PREFIX_0FBD */
31505796c8dcSSimon Schubert {
31515796c8dcSSimon Schubert { "bsrS", { Gv, Ev } },
31525796c8dcSSimon Schubert { "lzcntS", { Gv, Ev } },
31535796c8dcSSimon Schubert { "bsrS", { Gv, Ev } },
31545796c8dcSSimon Schubert },
31555796c8dcSSimon Schubert
31565796c8dcSSimon Schubert /* PREFIX_0FC2 */
31575796c8dcSSimon Schubert {
31585796c8dcSSimon Schubert { "cmpps", { XM, EXx, CMP } },
31595796c8dcSSimon Schubert { "cmpss", { XM, EXd, CMP } },
31605796c8dcSSimon Schubert { "cmppd", { XM, EXx, CMP } },
31615796c8dcSSimon Schubert { "cmpsd", { XM, EXq, CMP } },
31625796c8dcSSimon Schubert },
31635796c8dcSSimon Schubert
31645796c8dcSSimon Schubert /* PREFIX_0FC3 */
31655796c8dcSSimon Schubert {
31665796c8dcSSimon Schubert { "movntiS", { Ma, Gv } },
31675796c8dcSSimon Schubert },
31685796c8dcSSimon Schubert
31695796c8dcSSimon Schubert /* PREFIX_0FC7_REG_6 */
31705796c8dcSSimon Schubert {
31715796c8dcSSimon Schubert { "vmptrld",{ Mq } },
31725796c8dcSSimon Schubert { "vmxon", { Mq } },
31735796c8dcSSimon Schubert { "vmclear",{ Mq } },
31745796c8dcSSimon Schubert },
31755796c8dcSSimon Schubert
31765796c8dcSSimon Schubert /* PREFIX_0FD0 */
31775796c8dcSSimon Schubert {
3178cf7f2e2dSJohn Marino { Bad_Opcode },
3179cf7f2e2dSJohn Marino { Bad_Opcode },
31805796c8dcSSimon Schubert { "addsubpd", { XM, EXx } },
31815796c8dcSSimon Schubert { "addsubps", { XM, EXx } },
31825796c8dcSSimon Schubert },
31835796c8dcSSimon Schubert
31845796c8dcSSimon Schubert /* PREFIX_0FD6 */
31855796c8dcSSimon Schubert {
3186cf7f2e2dSJohn Marino { Bad_Opcode },
31875796c8dcSSimon Schubert { "movq2dq",{ XM, MS } },
31885796c8dcSSimon Schubert { "movq", { EXqS, XM } },
31895796c8dcSSimon Schubert { "movdq2q",{ MX, XS } },
31905796c8dcSSimon Schubert },
31915796c8dcSSimon Schubert
31925796c8dcSSimon Schubert /* PREFIX_0FE6 */
31935796c8dcSSimon Schubert {
3194cf7f2e2dSJohn Marino { Bad_Opcode },
31955796c8dcSSimon Schubert { "cvtdq2pd", { XM, EXq } },
31965796c8dcSSimon Schubert { "cvttpd2dq", { XM, EXx } },
31975796c8dcSSimon Schubert { "cvtpd2dq", { XM, EXx } },
31985796c8dcSSimon Schubert },
31995796c8dcSSimon Schubert
32005796c8dcSSimon Schubert /* PREFIX_0FE7 */
32015796c8dcSSimon Schubert {
32025796c8dcSSimon Schubert { "movntq", { Mq, MX } },
3203cf7f2e2dSJohn Marino { Bad_Opcode },
32045796c8dcSSimon Schubert { MOD_TABLE (MOD_0FE7_PREFIX_2) },
32055796c8dcSSimon Schubert },
32065796c8dcSSimon Schubert
32075796c8dcSSimon Schubert /* PREFIX_0FF0 */
32085796c8dcSSimon Schubert {
3209cf7f2e2dSJohn Marino { Bad_Opcode },
3210cf7f2e2dSJohn Marino { Bad_Opcode },
3211cf7f2e2dSJohn Marino { Bad_Opcode },
32125796c8dcSSimon Schubert { MOD_TABLE (MOD_0FF0_PREFIX_3) },
32135796c8dcSSimon Schubert },
32145796c8dcSSimon Schubert
32155796c8dcSSimon Schubert /* PREFIX_0FF7 */
32165796c8dcSSimon Schubert {
32175796c8dcSSimon Schubert { "maskmovq", { MX, MS } },
3218cf7f2e2dSJohn Marino { Bad_Opcode },
32195796c8dcSSimon Schubert { "maskmovdqu", { XM, XS } },
32205796c8dcSSimon Schubert },
32215796c8dcSSimon Schubert
32225796c8dcSSimon Schubert /* PREFIX_0F3810 */
32235796c8dcSSimon Schubert {
3224cf7f2e2dSJohn Marino { Bad_Opcode },
3225cf7f2e2dSJohn Marino { Bad_Opcode },
32265796c8dcSSimon Schubert { "pblendvb", { XM, EXx, XMM0 } },
32275796c8dcSSimon Schubert },
32285796c8dcSSimon Schubert
32295796c8dcSSimon Schubert /* PREFIX_0F3814 */
32305796c8dcSSimon Schubert {
3231cf7f2e2dSJohn Marino { Bad_Opcode },
3232cf7f2e2dSJohn Marino { Bad_Opcode },
32335796c8dcSSimon Schubert { "blendvps", { XM, EXx, XMM0 } },
32345796c8dcSSimon Schubert },
32355796c8dcSSimon Schubert
32365796c8dcSSimon Schubert /* PREFIX_0F3815 */
32375796c8dcSSimon Schubert {
3238cf7f2e2dSJohn Marino { Bad_Opcode },
3239cf7f2e2dSJohn Marino { Bad_Opcode },
32405796c8dcSSimon Schubert { "blendvpd", { XM, EXx, XMM0 } },
32415796c8dcSSimon Schubert },
32425796c8dcSSimon Schubert
32435796c8dcSSimon Schubert /* PREFIX_0F3817 */
32445796c8dcSSimon Schubert {
3245cf7f2e2dSJohn Marino { Bad_Opcode },
3246cf7f2e2dSJohn Marino { Bad_Opcode },
32475796c8dcSSimon Schubert { "ptest", { XM, EXx } },
32485796c8dcSSimon Schubert },
32495796c8dcSSimon Schubert
32505796c8dcSSimon Schubert /* PREFIX_0F3820 */
32515796c8dcSSimon Schubert {
3252cf7f2e2dSJohn Marino { Bad_Opcode },
3253cf7f2e2dSJohn Marino { Bad_Opcode },
32545796c8dcSSimon Schubert { "pmovsxbw", { XM, EXq } },
32555796c8dcSSimon Schubert },
32565796c8dcSSimon Schubert
32575796c8dcSSimon Schubert /* PREFIX_0F3821 */
32585796c8dcSSimon Schubert {
3259cf7f2e2dSJohn Marino { Bad_Opcode },
3260cf7f2e2dSJohn Marino { Bad_Opcode },
32615796c8dcSSimon Schubert { "pmovsxbd", { XM, EXd } },
32625796c8dcSSimon Schubert },
32635796c8dcSSimon Schubert
32645796c8dcSSimon Schubert /* PREFIX_0F3822 */
32655796c8dcSSimon Schubert {
3266cf7f2e2dSJohn Marino { Bad_Opcode },
3267cf7f2e2dSJohn Marino { Bad_Opcode },
32685796c8dcSSimon Schubert { "pmovsxbq", { XM, EXw } },
32695796c8dcSSimon Schubert },
32705796c8dcSSimon Schubert
32715796c8dcSSimon Schubert /* PREFIX_0F3823 */
32725796c8dcSSimon Schubert {
3273cf7f2e2dSJohn Marino { Bad_Opcode },
3274cf7f2e2dSJohn Marino { Bad_Opcode },
32755796c8dcSSimon Schubert { "pmovsxwd", { XM, EXq } },
32765796c8dcSSimon Schubert },
32775796c8dcSSimon Schubert
32785796c8dcSSimon Schubert /* PREFIX_0F3824 */
32795796c8dcSSimon Schubert {
3280cf7f2e2dSJohn Marino { Bad_Opcode },
3281cf7f2e2dSJohn Marino { Bad_Opcode },
32825796c8dcSSimon Schubert { "pmovsxwq", { XM, EXd } },
32835796c8dcSSimon Schubert },
32845796c8dcSSimon Schubert
32855796c8dcSSimon Schubert /* PREFIX_0F3825 */
32865796c8dcSSimon Schubert {
3287cf7f2e2dSJohn Marino { Bad_Opcode },
3288cf7f2e2dSJohn Marino { Bad_Opcode },
32895796c8dcSSimon Schubert { "pmovsxdq", { XM, EXq } },
32905796c8dcSSimon Schubert },
32915796c8dcSSimon Schubert
32925796c8dcSSimon Schubert /* PREFIX_0F3828 */
32935796c8dcSSimon Schubert {
3294cf7f2e2dSJohn Marino { Bad_Opcode },
3295cf7f2e2dSJohn Marino { Bad_Opcode },
32965796c8dcSSimon Schubert { "pmuldq", { XM, EXx } },
32975796c8dcSSimon Schubert },
32985796c8dcSSimon Schubert
32995796c8dcSSimon Schubert /* PREFIX_0F3829 */
33005796c8dcSSimon Schubert {
3301cf7f2e2dSJohn Marino { Bad_Opcode },
3302cf7f2e2dSJohn Marino { Bad_Opcode },
33035796c8dcSSimon Schubert { "pcmpeqq", { XM, EXx } },
33045796c8dcSSimon Schubert },
33055796c8dcSSimon Schubert
33065796c8dcSSimon Schubert /* PREFIX_0F382A */
33075796c8dcSSimon Schubert {
3308cf7f2e2dSJohn Marino { Bad_Opcode },
3309cf7f2e2dSJohn Marino { Bad_Opcode },
33105796c8dcSSimon Schubert { MOD_TABLE (MOD_0F382A_PREFIX_2) },
33115796c8dcSSimon Schubert },
33125796c8dcSSimon Schubert
33135796c8dcSSimon Schubert /* PREFIX_0F382B */
33145796c8dcSSimon Schubert {
3315cf7f2e2dSJohn Marino { Bad_Opcode },
3316cf7f2e2dSJohn Marino { Bad_Opcode },
33175796c8dcSSimon Schubert { "packusdw", { XM, EXx } },
33185796c8dcSSimon Schubert },
33195796c8dcSSimon Schubert
33205796c8dcSSimon Schubert /* PREFIX_0F3830 */
33215796c8dcSSimon Schubert {
3322cf7f2e2dSJohn Marino { Bad_Opcode },
3323cf7f2e2dSJohn Marino { Bad_Opcode },
33245796c8dcSSimon Schubert { "pmovzxbw", { XM, EXq } },
33255796c8dcSSimon Schubert },
33265796c8dcSSimon Schubert
33275796c8dcSSimon Schubert /* PREFIX_0F3831 */
33285796c8dcSSimon Schubert {
3329cf7f2e2dSJohn Marino { Bad_Opcode },
3330cf7f2e2dSJohn Marino { Bad_Opcode },
33315796c8dcSSimon Schubert { "pmovzxbd", { XM, EXd } },
33325796c8dcSSimon Schubert },
33335796c8dcSSimon Schubert
33345796c8dcSSimon Schubert /* PREFIX_0F3832 */
33355796c8dcSSimon Schubert {
3336cf7f2e2dSJohn Marino { Bad_Opcode },
3337cf7f2e2dSJohn Marino { Bad_Opcode },
33385796c8dcSSimon Schubert { "pmovzxbq", { XM, EXw } },
33395796c8dcSSimon Schubert },
33405796c8dcSSimon Schubert
33415796c8dcSSimon Schubert /* PREFIX_0F3833 */
33425796c8dcSSimon Schubert {
3343cf7f2e2dSJohn Marino { Bad_Opcode },
3344cf7f2e2dSJohn Marino { Bad_Opcode },
33455796c8dcSSimon Schubert { "pmovzxwd", { XM, EXq } },
33465796c8dcSSimon Schubert },
33475796c8dcSSimon Schubert
33485796c8dcSSimon Schubert /* PREFIX_0F3834 */
33495796c8dcSSimon Schubert {
3350cf7f2e2dSJohn Marino { Bad_Opcode },
3351cf7f2e2dSJohn Marino { Bad_Opcode },
33525796c8dcSSimon Schubert { "pmovzxwq", { XM, EXd } },
33535796c8dcSSimon Schubert },
33545796c8dcSSimon Schubert
33555796c8dcSSimon Schubert /* PREFIX_0F3835 */
33565796c8dcSSimon Schubert {
3357cf7f2e2dSJohn Marino { Bad_Opcode },
3358cf7f2e2dSJohn Marino { Bad_Opcode },
33595796c8dcSSimon Schubert { "pmovzxdq", { XM, EXq } },
33605796c8dcSSimon Schubert },
33615796c8dcSSimon Schubert
33625796c8dcSSimon Schubert /* PREFIX_0F3837 */
33635796c8dcSSimon Schubert {
3364cf7f2e2dSJohn Marino { Bad_Opcode },
3365cf7f2e2dSJohn Marino { Bad_Opcode },
33665796c8dcSSimon Schubert { "pcmpgtq", { XM, EXx } },
33675796c8dcSSimon Schubert },
33685796c8dcSSimon Schubert
33695796c8dcSSimon Schubert /* PREFIX_0F3838 */
33705796c8dcSSimon Schubert {
3371cf7f2e2dSJohn Marino { Bad_Opcode },
3372cf7f2e2dSJohn Marino { Bad_Opcode },
33735796c8dcSSimon Schubert { "pminsb", { XM, EXx } },
33745796c8dcSSimon Schubert },
33755796c8dcSSimon Schubert
33765796c8dcSSimon Schubert /* PREFIX_0F3839 */
33775796c8dcSSimon Schubert {
3378cf7f2e2dSJohn Marino { Bad_Opcode },
3379cf7f2e2dSJohn Marino { Bad_Opcode },
33805796c8dcSSimon Schubert { "pminsd", { XM, EXx } },
33815796c8dcSSimon Schubert },
33825796c8dcSSimon Schubert
33835796c8dcSSimon Schubert /* PREFIX_0F383A */
33845796c8dcSSimon Schubert {
3385cf7f2e2dSJohn Marino { Bad_Opcode },
3386cf7f2e2dSJohn Marino { Bad_Opcode },
33875796c8dcSSimon Schubert { "pminuw", { XM, EXx } },
33885796c8dcSSimon Schubert },
33895796c8dcSSimon Schubert
33905796c8dcSSimon Schubert /* PREFIX_0F383B */
33915796c8dcSSimon Schubert {
3392cf7f2e2dSJohn Marino { Bad_Opcode },
3393cf7f2e2dSJohn Marino { Bad_Opcode },
33945796c8dcSSimon Schubert { "pminud", { XM, EXx } },
33955796c8dcSSimon Schubert },
33965796c8dcSSimon Schubert
33975796c8dcSSimon Schubert /* PREFIX_0F383C */
33985796c8dcSSimon Schubert {
3399cf7f2e2dSJohn Marino { Bad_Opcode },
3400cf7f2e2dSJohn Marino { Bad_Opcode },
34015796c8dcSSimon Schubert { "pmaxsb", { XM, EXx } },
34025796c8dcSSimon Schubert },
34035796c8dcSSimon Schubert
34045796c8dcSSimon Schubert /* PREFIX_0F383D */
34055796c8dcSSimon Schubert {
3406cf7f2e2dSJohn Marino { Bad_Opcode },
3407cf7f2e2dSJohn Marino { Bad_Opcode },
34085796c8dcSSimon Schubert { "pmaxsd", { XM, EXx } },
34095796c8dcSSimon Schubert },
34105796c8dcSSimon Schubert
34115796c8dcSSimon Schubert /* PREFIX_0F383E */
34125796c8dcSSimon Schubert {
3413cf7f2e2dSJohn Marino { Bad_Opcode },
3414cf7f2e2dSJohn Marino { Bad_Opcode },
34155796c8dcSSimon Schubert { "pmaxuw", { XM, EXx } },
34165796c8dcSSimon Schubert },
34175796c8dcSSimon Schubert
34185796c8dcSSimon Schubert /* PREFIX_0F383F */
34195796c8dcSSimon Schubert {
3420cf7f2e2dSJohn Marino { Bad_Opcode },
3421cf7f2e2dSJohn Marino { Bad_Opcode },
34225796c8dcSSimon Schubert { "pmaxud", { XM, EXx } },
34235796c8dcSSimon Schubert },
34245796c8dcSSimon Schubert
34255796c8dcSSimon Schubert /* PREFIX_0F3840 */
34265796c8dcSSimon Schubert {
3427cf7f2e2dSJohn Marino { Bad_Opcode },
3428cf7f2e2dSJohn Marino { Bad_Opcode },
34295796c8dcSSimon Schubert { "pmulld", { XM, EXx } },
34305796c8dcSSimon Schubert },
34315796c8dcSSimon Schubert
34325796c8dcSSimon Schubert /* PREFIX_0F3841 */
34335796c8dcSSimon Schubert {
3434cf7f2e2dSJohn Marino { Bad_Opcode },
3435cf7f2e2dSJohn Marino { Bad_Opcode },
34365796c8dcSSimon Schubert { "phminposuw", { XM, EXx } },
34375796c8dcSSimon Schubert },
34385796c8dcSSimon Schubert
34395796c8dcSSimon Schubert /* PREFIX_0F3880 */
34405796c8dcSSimon Schubert {
3441cf7f2e2dSJohn Marino { Bad_Opcode },
3442cf7f2e2dSJohn Marino { Bad_Opcode },
34435796c8dcSSimon Schubert { "invept", { Gm, Mo } },
34445796c8dcSSimon Schubert },
34455796c8dcSSimon Schubert
34465796c8dcSSimon Schubert /* PREFIX_0F3881 */
34475796c8dcSSimon Schubert {
3448cf7f2e2dSJohn Marino { Bad_Opcode },
3449cf7f2e2dSJohn Marino { Bad_Opcode },
34505796c8dcSSimon Schubert { "invvpid", { Gm, Mo } },
34515796c8dcSSimon Schubert },
34525796c8dcSSimon Schubert
3453a45ae5f8SJohn Marino /* PREFIX_0F3882 */
3454a45ae5f8SJohn Marino {
3455a45ae5f8SJohn Marino { Bad_Opcode },
3456a45ae5f8SJohn Marino { Bad_Opcode },
3457a45ae5f8SJohn Marino { "invpcid", { Gm, M } },
3458a45ae5f8SJohn Marino },
3459a45ae5f8SJohn Marino
34605796c8dcSSimon Schubert /* PREFIX_0F38DB */
34615796c8dcSSimon Schubert {
3462cf7f2e2dSJohn Marino { Bad_Opcode },
3463cf7f2e2dSJohn Marino { Bad_Opcode },
34645796c8dcSSimon Schubert { "aesimc", { XM, EXx } },
34655796c8dcSSimon Schubert },
34665796c8dcSSimon Schubert
34675796c8dcSSimon Schubert /* PREFIX_0F38DC */
34685796c8dcSSimon Schubert {
3469cf7f2e2dSJohn Marino { Bad_Opcode },
3470cf7f2e2dSJohn Marino { Bad_Opcode },
34715796c8dcSSimon Schubert { "aesenc", { XM, EXx } },
34725796c8dcSSimon Schubert },
34735796c8dcSSimon Schubert
34745796c8dcSSimon Schubert /* PREFIX_0F38DD */
34755796c8dcSSimon Schubert {
3476cf7f2e2dSJohn Marino { Bad_Opcode },
3477cf7f2e2dSJohn Marino { Bad_Opcode },
34785796c8dcSSimon Schubert { "aesenclast", { XM, EXx } },
34795796c8dcSSimon Schubert },
34805796c8dcSSimon Schubert
34815796c8dcSSimon Schubert /* PREFIX_0F38DE */
34825796c8dcSSimon Schubert {
3483cf7f2e2dSJohn Marino { Bad_Opcode },
3484cf7f2e2dSJohn Marino { Bad_Opcode },
34855796c8dcSSimon Schubert { "aesdec", { XM, EXx } },
34865796c8dcSSimon Schubert },
34875796c8dcSSimon Schubert
34885796c8dcSSimon Schubert /* PREFIX_0F38DF */
34895796c8dcSSimon Schubert {
3490cf7f2e2dSJohn Marino { Bad_Opcode },
3491cf7f2e2dSJohn Marino { Bad_Opcode },
34925796c8dcSSimon Schubert { "aesdeclast", { XM, EXx } },
34935796c8dcSSimon Schubert },
34945796c8dcSSimon Schubert
34955796c8dcSSimon Schubert /* PREFIX_0F38F0 */
34965796c8dcSSimon Schubert {
34975796c8dcSSimon Schubert { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
3498cf7f2e2dSJohn Marino { Bad_Opcode },
34995796c8dcSSimon Schubert { "movbeS", { Gv, { MOVBE_Fixup, v_mode } } },
35005796c8dcSSimon Schubert { "crc32", { Gdq, { CRC32_Fixup, b_mode } } },
35015796c8dcSSimon Schubert },
35025796c8dcSSimon Schubert
35035796c8dcSSimon Schubert /* PREFIX_0F38F1 */
35045796c8dcSSimon Schubert {
35055796c8dcSSimon Schubert { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
3506cf7f2e2dSJohn Marino { Bad_Opcode },
35075796c8dcSSimon Schubert { "movbeS", { { MOVBE_Fixup, v_mode }, Gv } },
35085796c8dcSSimon Schubert { "crc32", { Gdq, { CRC32_Fixup, v_mode } } },
35095796c8dcSSimon Schubert },
35105796c8dcSSimon Schubert
3511*ef5ccd6cSJohn Marino /* PREFIX_0F38F6 */
3512*ef5ccd6cSJohn Marino {
3513*ef5ccd6cSJohn Marino { Bad_Opcode },
3514*ef5ccd6cSJohn Marino { "adoxS", { Gdq, Edq} },
3515*ef5ccd6cSJohn Marino { "adcxS", { Gdq, Edq} },
3516*ef5ccd6cSJohn Marino { Bad_Opcode },
3517*ef5ccd6cSJohn Marino },
3518*ef5ccd6cSJohn Marino
35195796c8dcSSimon Schubert /* PREFIX_0F3A08 */
35205796c8dcSSimon Schubert {
3521cf7f2e2dSJohn Marino { Bad_Opcode },
3522cf7f2e2dSJohn Marino { Bad_Opcode },
35235796c8dcSSimon Schubert { "roundps", { XM, EXx, Ib } },
35245796c8dcSSimon Schubert },
35255796c8dcSSimon Schubert
35265796c8dcSSimon Schubert /* PREFIX_0F3A09 */
35275796c8dcSSimon Schubert {
3528cf7f2e2dSJohn Marino { Bad_Opcode },
3529cf7f2e2dSJohn Marino { Bad_Opcode },
35305796c8dcSSimon Schubert { "roundpd", { XM, EXx, Ib } },
35315796c8dcSSimon Schubert },
35325796c8dcSSimon Schubert
35335796c8dcSSimon Schubert /* PREFIX_0F3A0A */
35345796c8dcSSimon Schubert {
3535cf7f2e2dSJohn Marino { Bad_Opcode },
3536cf7f2e2dSJohn Marino { Bad_Opcode },
35375796c8dcSSimon Schubert { "roundss", { XM, EXd, Ib } },
35385796c8dcSSimon Schubert },
35395796c8dcSSimon Schubert
35405796c8dcSSimon Schubert /* PREFIX_0F3A0B */
35415796c8dcSSimon Schubert {
3542cf7f2e2dSJohn Marino { Bad_Opcode },
3543cf7f2e2dSJohn Marino { Bad_Opcode },
35445796c8dcSSimon Schubert { "roundsd", { XM, EXq, Ib } },
35455796c8dcSSimon Schubert },
35465796c8dcSSimon Schubert
35475796c8dcSSimon Schubert /* PREFIX_0F3A0C */
35485796c8dcSSimon Schubert {
3549cf7f2e2dSJohn Marino { Bad_Opcode },
3550cf7f2e2dSJohn Marino { Bad_Opcode },
35515796c8dcSSimon Schubert { "blendps", { XM, EXx, Ib } },
35525796c8dcSSimon Schubert },
35535796c8dcSSimon Schubert
35545796c8dcSSimon Schubert /* PREFIX_0F3A0D */
35555796c8dcSSimon Schubert {
3556cf7f2e2dSJohn Marino { Bad_Opcode },
3557cf7f2e2dSJohn Marino { Bad_Opcode },
35585796c8dcSSimon Schubert { "blendpd", { XM, EXx, Ib } },
35595796c8dcSSimon Schubert },
35605796c8dcSSimon Schubert
35615796c8dcSSimon Schubert /* PREFIX_0F3A0E */
35625796c8dcSSimon Schubert {
3563cf7f2e2dSJohn Marino { Bad_Opcode },
3564cf7f2e2dSJohn Marino { Bad_Opcode },
35655796c8dcSSimon Schubert { "pblendw", { XM, EXx, Ib } },
35665796c8dcSSimon Schubert },
35675796c8dcSSimon Schubert
35685796c8dcSSimon Schubert /* PREFIX_0F3A14 */
35695796c8dcSSimon Schubert {
3570cf7f2e2dSJohn Marino { Bad_Opcode },
3571cf7f2e2dSJohn Marino { Bad_Opcode },
35725796c8dcSSimon Schubert { "pextrb", { Edqb, XM, Ib } },
35735796c8dcSSimon Schubert },
35745796c8dcSSimon Schubert
35755796c8dcSSimon Schubert /* PREFIX_0F3A15 */
35765796c8dcSSimon Schubert {
3577cf7f2e2dSJohn Marino { Bad_Opcode },
3578cf7f2e2dSJohn Marino { Bad_Opcode },
35795796c8dcSSimon Schubert { "pextrw", { Edqw, XM, Ib } },
35805796c8dcSSimon Schubert },
35815796c8dcSSimon Schubert
35825796c8dcSSimon Schubert /* PREFIX_0F3A16 */
35835796c8dcSSimon Schubert {
3584cf7f2e2dSJohn Marino { Bad_Opcode },
3585cf7f2e2dSJohn Marino { Bad_Opcode },
35865796c8dcSSimon Schubert { "pextrK", { Edq, XM, Ib } },
35875796c8dcSSimon Schubert },
35885796c8dcSSimon Schubert
35895796c8dcSSimon Schubert /* PREFIX_0F3A17 */
35905796c8dcSSimon Schubert {
3591cf7f2e2dSJohn Marino { Bad_Opcode },
3592cf7f2e2dSJohn Marino { Bad_Opcode },
35935796c8dcSSimon Schubert { "extractps", { Edqd, XM, Ib } },
35945796c8dcSSimon Schubert },
35955796c8dcSSimon Schubert
35965796c8dcSSimon Schubert /* PREFIX_0F3A20 */
35975796c8dcSSimon Schubert {
3598cf7f2e2dSJohn Marino { Bad_Opcode },
3599cf7f2e2dSJohn Marino { Bad_Opcode },
36005796c8dcSSimon Schubert { "pinsrb", { XM, Edqb, Ib } },
36015796c8dcSSimon Schubert },
36025796c8dcSSimon Schubert
36035796c8dcSSimon Schubert /* PREFIX_0F3A21 */
36045796c8dcSSimon Schubert {
3605cf7f2e2dSJohn Marino { Bad_Opcode },
3606cf7f2e2dSJohn Marino { Bad_Opcode },
36075796c8dcSSimon Schubert { "insertps", { XM, EXd, Ib } },
36085796c8dcSSimon Schubert },
36095796c8dcSSimon Schubert
36105796c8dcSSimon Schubert /* PREFIX_0F3A22 */
36115796c8dcSSimon Schubert {
3612cf7f2e2dSJohn Marino { Bad_Opcode },
3613cf7f2e2dSJohn Marino { Bad_Opcode },
36145796c8dcSSimon Schubert { "pinsrK", { XM, Edq, Ib } },
36155796c8dcSSimon Schubert },
36165796c8dcSSimon Schubert
36175796c8dcSSimon Schubert /* PREFIX_0F3A40 */
36185796c8dcSSimon Schubert {
3619cf7f2e2dSJohn Marino { Bad_Opcode },
3620cf7f2e2dSJohn Marino { Bad_Opcode },
36215796c8dcSSimon Schubert { "dpps", { XM, EXx, Ib } },
36225796c8dcSSimon Schubert },
36235796c8dcSSimon Schubert
36245796c8dcSSimon Schubert /* PREFIX_0F3A41 */
36255796c8dcSSimon Schubert {
3626cf7f2e2dSJohn Marino { Bad_Opcode },
3627cf7f2e2dSJohn Marino { Bad_Opcode },
36285796c8dcSSimon Schubert { "dppd", { XM, EXx, Ib } },
36295796c8dcSSimon Schubert },
36305796c8dcSSimon Schubert
36315796c8dcSSimon Schubert /* PREFIX_0F3A42 */
36325796c8dcSSimon Schubert {
3633cf7f2e2dSJohn Marino { Bad_Opcode },
3634cf7f2e2dSJohn Marino { Bad_Opcode },
36355796c8dcSSimon Schubert { "mpsadbw", { XM, EXx, Ib } },
36365796c8dcSSimon Schubert },
36375796c8dcSSimon Schubert
36385796c8dcSSimon Schubert /* PREFIX_0F3A44 */
36395796c8dcSSimon Schubert {
3640cf7f2e2dSJohn Marino { Bad_Opcode },
3641cf7f2e2dSJohn Marino { Bad_Opcode },
36425796c8dcSSimon Schubert { "pclmulqdq", { XM, EXx, PCLMUL } },
36435796c8dcSSimon Schubert },
36445796c8dcSSimon Schubert
36455796c8dcSSimon Schubert /* PREFIX_0F3A60 */
36465796c8dcSSimon Schubert {
3647cf7f2e2dSJohn Marino { Bad_Opcode },
3648cf7f2e2dSJohn Marino { Bad_Opcode },
36495796c8dcSSimon Schubert { "pcmpestrm", { XM, EXx, Ib } },
36505796c8dcSSimon Schubert },
36515796c8dcSSimon Schubert
36525796c8dcSSimon Schubert /* PREFIX_0F3A61 */
36535796c8dcSSimon Schubert {
3654cf7f2e2dSJohn Marino { Bad_Opcode },
3655cf7f2e2dSJohn Marino { Bad_Opcode },
36565796c8dcSSimon Schubert { "pcmpestri", { XM, EXx, Ib } },
36575796c8dcSSimon Schubert },
36585796c8dcSSimon Schubert
36595796c8dcSSimon Schubert /* PREFIX_0F3A62 */
36605796c8dcSSimon Schubert {
3661cf7f2e2dSJohn Marino { Bad_Opcode },
3662cf7f2e2dSJohn Marino { Bad_Opcode },
36635796c8dcSSimon Schubert { "pcmpistrm", { XM, EXx, Ib } },
36645796c8dcSSimon Schubert },
36655796c8dcSSimon Schubert
36665796c8dcSSimon Schubert /* PREFIX_0F3A63 */
36675796c8dcSSimon Schubert {
3668cf7f2e2dSJohn Marino { Bad_Opcode },
3669cf7f2e2dSJohn Marino { Bad_Opcode },
36705796c8dcSSimon Schubert { "pcmpistri", { XM, EXx, Ib } },
36715796c8dcSSimon Schubert },
36725796c8dcSSimon Schubert
36735796c8dcSSimon Schubert /* PREFIX_0F3ADF */
36745796c8dcSSimon Schubert {
3675cf7f2e2dSJohn Marino { Bad_Opcode },
3676cf7f2e2dSJohn Marino { Bad_Opcode },
36775796c8dcSSimon Schubert { "aeskeygenassist", { XM, EXx, Ib } },
36785796c8dcSSimon Schubert },
36795796c8dcSSimon Schubert
3680c50c785cSJohn Marino /* PREFIX_VEX_0F10 */
36815796c8dcSSimon Schubert {
3682c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F10_P_0) },
3683c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F10_P_1) },
3684c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F10_P_2) },
3685c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F10_P_3) },
36865796c8dcSSimon Schubert },
36875796c8dcSSimon Schubert
3688c50c785cSJohn Marino /* PREFIX_VEX_0F11 */
36895796c8dcSSimon Schubert {
3690c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F11_P_0) },
3691c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F11_P_1) },
3692c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F11_P_2) },
3693c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F11_P_3) },
36945796c8dcSSimon Schubert },
36955796c8dcSSimon Schubert
3696c50c785cSJohn Marino /* PREFIX_VEX_0F12 */
36975796c8dcSSimon Schubert {
3698c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F12_PREFIX_0) },
3699c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F12_P_1) },
3700c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F12_P_2) },
3701c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F12_P_3) },
37025796c8dcSSimon Schubert },
37035796c8dcSSimon Schubert
3704c50c785cSJohn Marino /* PREFIX_VEX_0F16 */
37055796c8dcSSimon Schubert {
3706c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F16_PREFIX_0) },
3707c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F16_P_1) },
3708c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F16_P_2) },
37095796c8dcSSimon Schubert },
37105796c8dcSSimon Schubert
3711c50c785cSJohn Marino /* PREFIX_VEX_0F2A */
37125796c8dcSSimon Schubert {
3713cf7f2e2dSJohn Marino { Bad_Opcode },
3714c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2A_P_1) },
3715cf7f2e2dSJohn Marino { Bad_Opcode },
3716c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2A_P_3) },
37175796c8dcSSimon Schubert },
37185796c8dcSSimon Schubert
3719c50c785cSJohn Marino /* PREFIX_VEX_0F2C */
37205796c8dcSSimon Schubert {
3721cf7f2e2dSJohn Marino { Bad_Opcode },
3722c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2C_P_1) },
3723cf7f2e2dSJohn Marino { Bad_Opcode },
3724c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2C_P_3) },
37255796c8dcSSimon Schubert },
37265796c8dcSSimon Schubert
3727c50c785cSJohn Marino /* PREFIX_VEX_0F2D */
37285796c8dcSSimon Schubert {
3729cf7f2e2dSJohn Marino { Bad_Opcode },
3730c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2D_P_1) },
3731cf7f2e2dSJohn Marino { Bad_Opcode },
3732c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2D_P_3) },
37335796c8dcSSimon Schubert },
37345796c8dcSSimon Schubert
3735c50c785cSJohn Marino /* PREFIX_VEX_0F2E */
37365796c8dcSSimon Schubert {
3737c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2E_P_0) },
3738cf7f2e2dSJohn Marino { Bad_Opcode },
3739c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2E_P_2) },
37405796c8dcSSimon Schubert },
37415796c8dcSSimon Schubert
3742c50c785cSJohn Marino /* PREFIX_VEX_0F2F */
37435796c8dcSSimon Schubert {
3744c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2F_P_0) },
3745cf7f2e2dSJohn Marino { Bad_Opcode },
3746c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F2F_P_2) },
37475796c8dcSSimon Schubert },
37485796c8dcSSimon Schubert
3749c50c785cSJohn Marino /* PREFIX_VEX_0F51 */
37505796c8dcSSimon Schubert {
3751c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F51_P_0) },
3752c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F51_P_1) },
3753c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F51_P_2) },
3754c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F51_P_3) },
37555796c8dcSSimon Schubert },
37565796c8dcSSimon Schubert
3757c50c785cSJohn Marino /* PREFIX_VEX_0F52 */
37585796c8dcSSimon Schubert {
3759c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F52_P_0) },
3760c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F52_P_1) },
37615796c8dcSSimon Schubert },
37625796c8dcSSimon Schubert
3763c50c785cSJohn Marino /* PREFIX_VEX_0F53 */
37645796c8dcSSimon Schubert {
3765c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F53_P_0) },
3766c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F53_P_1) },
37675796c8dcSSimon Schubert },
37685796c8dcSSimon Schubert
3769c50c785cSJohn Marino /* PREFIX_VEX_0F58 */
37705796c8dcSSimon Schubert {
3771c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F58_P_0) },
3772c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F58_P_1) },
3773c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F58_P_2) },
3774c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F58_P_3) },
37755796c8dcSSimon Schubert },
37765796c8dcSSimon Schubert
3777c50c785cSJohn Marino /* PREFIX_VEX_0F59 */
37785796c8dcSSimon Schubert {
3779c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F59_P_0) },
3780c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F59_P_1) },
3781c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F59_P_2) },
3782c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F59_P_3) },
37835796c8dcSSimon Schubert },
37845796c8dcSSimon Schubert
3785c50c785cSJohn Marino /* PREFIX_VEX_0F5A */
37865796c8dcSSimon Schubert {
3787c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5A_P_0) },
3788c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5A_P_1) },
37895796c8dcSSimon Schubert { "vcvtpd2ps%XY", { XMM, EXx } },
3790c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5A_P_3) },
37915796c8dcSSimon Schubert },
37925796c8dcSSimon Schubert
3793c50c785cSJohn Marino /* PREFIX_VEX_0F5B */
37945796c8dcSSimon Schubert {
3795c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5B_P_0) },
3796c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5B_P_1) },
3797c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5B_P_2) },
37985796c8dcSSimon Schubert },
37995796c8dcSSimon Schubert
3800c50c785cSJohn Marino /* PREFIX_VEX_0F5C */
38015796c8dcSSimon Schubert {
3802c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5C_P_0) },
3803c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5C_P_1) },
3804c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5C_P_2) },
3805c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5C_P_3) },
38065796c8dcSSimon Schubert },
38075796c8dcSSimon Schubert
3808c50c785cSJohn Marino /* PREFIX_VEX_0F5D */
38095796c8dcSSimon Schubert {
3810c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5D_P_0) },
3811c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5D_P_1) },
3812c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5D_P_2) },
3813c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5D_P_3) },
38145796c8dcSSimon Schubert },
38155796c8dcSSimon Schubert
3816c50c785cSJohn Marino /* PREFIX_VEX_0F5E */
38175796c8dcSSimon Schubert {
3818c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5E_P_0) },
3819c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5E_P_1) },
3820c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5E_P_2) },
3821c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5E_P_3) },
38225796c8dcSSimon Schubert },
38235796c8dcSSimon Schubert
3824c50c785cSJohn Marino /* PREFIX_VEX_0F5F */
38255796c8dcSSimon Schubert {
3826c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5F_P_0) },
3827c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5F_P_1) },
3828c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5F_P_2) },
3829c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F5F_P_3) },
38305796c8dcSSimon Schubert },
38315796c8dcSSimon Schubert
3832c50c785cSJohn Marino /* PREFIX_VEX_0F60 */
38335796c8dcSSimon Schubert {
3834cf7f2e2dSJohn Marino { Bad_Opcode },
3835cf7f2e2dSJohn Marino { Bad_Opcode },
3836a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F60_P_2) },
38375796c8dcSSimon Schubert },
38385796c8dcSSimon Schubert
3839c50c785cSJohn Marino /* PREFIX_VEX_0F61 */
38405796c8dcSSimon Schubert {
3841cf7f2e2dSJohn Marino { Bad_Opcode },
3842cf7f2e2dSJohn Marino { Bad_Opcode },
3843a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F61_P_2) },
38445796c8dcSSimon Schubert },
38455796c8dcSSimon Schubert
3846c50c785cSJohn Marino /* PREFIX_VEX_0F62 */
38475796c8dcSSimon Schubert {
3848cf7f2e2dSJohn Marino { Bad_Opcode },
3849cf7f2e2dSJohn Marino { Bad_Opcode },
3850a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F62_P_2) },
38515796c8dcSSimon Schubert },
38525796c8dcSSimon Schubert
3853c50c785cSJohn Marino /* PREFIX_VEX_0F63 */
38545796c8dcSSimon Schubert {
3855cf7f2e2dSJohn Marino { Bad_Opcode },
3856cf7f2e2dSJohn Marino { Bad_Opcode },
3857a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F63_P_2) },
38585796c8dcSSimon Schubert },
38595796c8dcSSimon Schubert
3860c50c785cSJohn Marino /* PREFIX_VEX_0F64 */
38615796c8dcSSimon Schubert {
3862cf7f2e2dSJohn Marino { Bad_Opcode },
3863cf7f2e2dSJohn Marino { Bad_Opcode },
3864a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F64_P_2) },
38655796c8dcSSimon Schubert },
38665796c8dcSSimon Schubert
3867c50c785cSJohn Marino /* PREFIX_VEX_0F65 */
38685796c8dcSSimon Schubert {
3869cf7f2e2dSJohn Marino { Bad_Opcode },
3870cf7f2e2dSJohn Marino { Bad_Opcode },
3871a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F65_P_2) },
38725796c8dcSSimon Schubert },
38735796c8dcSSimon Schubert
3874c50c785cSJohn Marino /* PREFIX_VEX_0F66 */
38755796c8dcSSimon Schubert {
3876cf7f2e2dSJohn Marino { Bad_Opcode },
3877cf7f2e2dSJohn Marino { Bad_Opcode },
3878a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F66_P_2) },
38795796c8dcSSimon Schubert },
38805796c8dcSSimon Schubert
3881c50c785cSJohn Marino /* PREFIX_VEX_0F67 */
38825796c8dcSSimon Schubert {
3883cf7f2e2dSJohn Marino { Bad_Opcode },
3884cf7f2e2dSJohn Marino { Bad_Opcode },
3885a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F67_P_2) },
38865796c8dcSSimon Schubert },
38875796c8dcSSimon Schubert
3888c50c785cSJohn Marino /* PREFIX_VEX_0F68 */
38895796c8dcSSimon Schubert {
3890cf7f2e2dSJohn Marino { Bad_Opcode },
3891cf7f2e2dSJohn Marino { Bad_Opcode },
3892a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F68_P_2) },
38935796c8dcSSimon Schubert },
38945796c8dcSSimon Schubert
3895c50c785cSJohn Marino /* PREFIX_VEX_0F69 */
38965796c8dcSSimon Schubert {
3897cf7f2e2dSJohn Marino { Bad_Opcode },
3898cf7f2e2dSJohn Marino { Bad_Opcode },
3899a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F69_P_2) },
39005796c8dcSSimon Schubert },
39015796c8dcSSimon Schubert
3902c50c785cSJohn Marino /* PREFIX_VEX_0F6A */
39035796c8dcSSimon Schubert {
3904cf7f2e2dSJohn Marino { Bad_Opcode },
3905cf7f2e2dSJohn Marino { Bad_Opcode },
3906a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F6A_P_2) },
39075796c8dcSSimon Schubert },
39085796c8dcSSimon Schubert
3909c50c785cSJohn Marino /* PREFIX_VEX_0F6B */
39105796c8dcSSimon Schubert {
3911cf7f2e2dSJohn Marino { Bad_Opcode },
3912cf7f2e2dSJohn Marino { Bad_Opcode },
3913a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F6B_P_2) },
39145796c8dcSSimon Schubert },
39155796c8dcSSimon Schubert
3916c50c785cSJohn Marino /* PREFIX_VEX_0F6C */
39175796c8dcSSimon Schubert {
3918cf7f2e2dSJohn Marino { Bad_Opcode },
3919cf7f2e2dSJohn Marino { Bad_Opcode },
3920a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F6C_P_2) },
39215796c8dcSSimon Schubert },
39225796c8dcSSimon Schubert
3923c50c785cSJohn Marino /* PREFIX_VEX_0F6D */
39245796c8dcSSimon Schubert {
3925cf7f2e2dSJohn Marino { Bad_Opcode },
3926cf7f2e2dSJohn Marino { Bad_Opcode },
3927a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F6D_P_2) },
39285796c8dcSSimon Schubert },
39295796c8dcSSimon Schubert
3930c50c785cSJohn Marino /* PREFIX_VEX_0F6E */
39315796c8dcSSimon Schubert {
3932cf7f2e2dSJohn Marino { Bad_Opcode },
3933cf7f2e2dSJohn Marino { Bad_Opcode },
3934c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F6E_P_2) },
39355796c8dcSSimon Schubert },
39365796c8dcSSimon Schubert
3937c50c785cSJohn Marino /* PREFIX_VEX_0F6F */
39385796c8dcSSimon Schubert {
3939cf7f2e2dSJohn Marino { Bad_Opcode },
3940c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F6F_P_1) },
3941c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F6F_P_2) },
39425796c8dcSSimon Schubert },
39435796c8dcSSimon Schubert
3944c50c785cSJohn Marino /* PREFIX_VEX_0F70 */
39455796c8dcSSimon Schubert {
3946cf7f2e2dSJohn Marino { Bad_Opcode },
3947a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F70_P_1) },
3948a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F70_P_2) },
3949a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F70_P_3) },
39505796c8dcSSimon Schubert },
39515796c8dcSSimon Schubert
3952c50c785cSJohn Marino /* PREFIX_VEX_0F71_REG_2 */
39535796c8dcSSimon Schubert {
3954cf7f2e2dSJohn Marino { Bad_Opcode },
3955cf7f2e2dSJohn Marino { Bad_Opcode },
3956a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F71_R_2_P_2) },
39575796c8dcSSimon Schubert },
39585796c8dcSSimon Schubert
3959c50c785cSJohn Marino /* PREFIX_VEX_0F71_REG_4 */
39605796c8dcSSimon Schubert {
3961cf7f2e2dSJohn Marino { Bad_Opcode },
3962cf7f2e2dSJohn Marino { Bad_Opcode },
3963a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F71_R_4_P_2) },
39645796c8dcSSimon Schubert },
39655796c8dcSSimon Schubert
3966c50c785cSJohn Marino /* PREFIX_VEX_0F71_REG_6 */
39675796c8dcSSimon Schubert {
3968cf7f2e2dSJohn Marino { Bad_Opcode },
3969cf7f2e2dSJohn Marino { Bad_Opcode },
3970a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F71_R_6_P_2) },
39715796c8dcSSimon Schubert },
39725796c8dcSSimon Schubert
3973c50c785cSJohn Marino /* PREFIX_VEX_0F72_REG_2 */
39745796c8dcSSimon Schubert {
3975cf7f2e2dSJohn Marino { Bad_Opcode },
3976cf7f2e2dSJohn Marino { Bad_Opcode },
3977a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F72_R_2_P_2) },
39785796c8dcSSimon Schubert },
39795796c8dcSSimon Schubert
3980c50c785cSJohn Marino /* PREFIX_VEX_0F72_REG_4 */
39815796c8dcSSimon Schubert {
3982cf7f2e2dSJohn Marino { Bad_Opcode },
3983cf7f2e2dSJohn Marino { Bad_Opcode },
3984a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F72_R_4_P_2) },
39855796c8dcSSimon Schubert },
39865796c8dcSSimon Schubert
3987c50c785cSJohn Marino /* PREFIX_VEX_0F72_REG_6 */
39885796c8dcSSimon Schubert {
3989cf7f2e2dSJohn Marino { Bad_Opcode },
3990cf7f2e2dSJohn Marino { Bad_Opcode },
3991a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F72_R_6_P_2) },
39925796c8dcSSimon Schubert },
39935796c8dcSSimon Schubert
3994c50c785cSJohn Marino /* PREFIX_VEX_0F73_REG_2 */
39955796c8dcSSimon Schubert {
3996cf7f2e2dSJohn Marino { Bad_Opcode },
3997cf7f2e2dSJohn Marino { Bad_Opcode },
3998a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F73_R_2_P_2) },
39995796c8dcSSimon Schubert },
40005796c8dcSSimon Schubert
4001c50c785cSJohn Marino /* PREFIX_VEX_0F73_REG_3 */
40025796c8dcSSimon Schubert {
4003cf7f2e2dSJohn Marino { Bad_Opcode },
4004cf7f2e2dSJohn Marino { Bad_Opcode },
4005a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F73_R_3_P_2) },
40065796c8dcSSimon Schubert },
40075796c8dcSSimon Schubert
4008c50c785cSJohn Marino /* PREFIX_VEX_0F73_REG_6 */
40095796c8dcSSimon Schubert {
4010cf7f2e2dSJohn Marino { Bad_Opcode },
4011cf7f2e2dSJohn Marino { Bad_Opcode },
4012a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F73_R_6_P_2) },
40135796c8dcSSimon Schubert },
40145796c8dcSSimon Schubert
4015c50c785cSJohn Marino /* PREFIX_VEX_0F73_REG_7 */
40165796c8dcSSimon Schubert {
4017cf7f2e2dSJohn Marino { Bad_Opcode },
4018cf7f2e2dSJohn Marino { Bad_Opcode },
4019a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F73_R_7_P_2) },
40205796c8dcSSimon Schubert },
40215796c8dcSSimon Schubert
4022c50c785cSJohn Marino /* PREFIX_VEX_0F74 */
40235796c8dcSSimon Schubert {
4024cf7f2e2dSJohn Marino { Bad_Opcode },
4025cf7f2e2dSJohn Marino { Bad_Opcode },
4026a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F74_P_2) },
40275796c8dcSSimon Schubert },
40285796c8dcSSimon Schubert
4029c50c785cSJohn Marino /* PREFIX_VEX_0F75 */
40305796c8dcSSimon Schubert {
4031cf7f2e2dSJohn Marino { Bad_Opcode },
4032cf7f2e2dSJohn Marino { Bad_Opcode },
4033a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F75_P_2) },
40345796c8dcSSimon Schubert },
40355796c8dcSSimon Schubert
4036c50c785cSJohn Marino /* PREFIX_VEX_0F76 */
40375796c8dcSSimon Schubert {
4038cf7f2e2dSJohn Marino { Bad_Opcode },
4039cf7f2e2dSJohn Marino { Bad_Opcode },
4040a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F76_P_2) },
40415796c8dcSSimon Schubert },
40425796c8dcSSimon Schubert
4043c50c785cSJohn Marino /* PREFIX_VEX_0F77 */
40445796c8dcSSimon Schubert {
4045c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F77_P_0) },
40465796c8dcSSimon Schubert },
40475796c8dcSSimon Schubert
4048c50c785cSJohn Marino /* PREFIX_VEX_0F7C */
40495796c8dcSSimon Schubert {
4050cf7f2e2dSJohn Marino { Bad_Opcode },
4051cf7f2e2dSJohn Marino { Bad_Opcode },
4052c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F7C_P_2) },
4053c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F7C_P_3) },
40545796c8dcSSimon Schubert },
40555796c8dcSSimon Schubert
4056c50c785cSJohn Marino /* PREFIX_VEX_0F7D */
40575796c8dcSSimon Schubert {
4058cf7f2e2dSJohn Marino { Bad_Opcode },
4059cf7f2e2dSJohn Marino { Bad_Opcode },
4060c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F7D_P_2) },
4061c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F7D_P_3) },
40625796c8dcSSimon Schubert },
40635796c8dcSSimon Schubert
4064c50c785cSJohn Marino /* PREFIX_VEX_0F7E */
40655796c8dcSSimon Schubert {
4066cf7f2e2dSJohn Marino { Bad_Opcode },
4067c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1) },
4068c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2) },
40695796c8dcSSimon Schubert },
40705796c8dcSSimon Schubert
4071c50c785cSJohn Marino /* PREFIX_VEX_0F7F */
40725796c8dcSSimon Schubert {
4073cf7f2e2dSJohn Marino { Bad_Opcode },
4074c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F7F_P_1) },
4075c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F7F_P_2) },
40765796c8dcSSimon Schubert },
40775796c8dcSSimon Schubert
4078c50c785cSJohn Marino /* PREFIX_VEX_0FC2 */
40795796c8dcSSimon Schubert {
4080c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FC2_P_0) },
4081c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FC2_P_1) },
4082c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FC2_P_2) },
4083c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FC2_P_3) },
40845796c8dcSSimon Schubert },
40855796c8dcSSimon Schubert
4086c50c785cSJohn Marino /* PREFIX_VEX_0FC4 */
40875796c8dcSSimon Schubert {
4088cf7f2e2dSJohn Marino { Bad_Opcode },
4089cf7f2e2dSJohn Marino { Bad_Opcode },
4090c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FC4_P_2) },
40915796c8dcSSimon Schubert },
40925796c8dcSSimon Schubert
4093c50c785cSJohn Marino /* PREFIX_VEX_0FC5 */
40945796c8dcSSimon Schubert {
4095cf7f2e2dSJohn Marino { Bad_Opcode },
4096cf7f2e2dSJohn Marino { Bad_Opcode },
4097c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FC5_P_2) },
40985796c8dcSSimon Schubert },
40995796c8dcSSimon Schubert
4100c50c785cSJohn Marino /* PREFIX_VEX_0FD0 */
41015796c8dcSSimon Schubert {
4102cf7f2e2dSJohn Marino { Bad_Opcode },
4103cf7f2e2dSJohn Marino { Bad_Opcode },
4104c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FD0_P_2) },
4105c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FD0_P_3) },
41065796c8dcSSimon Schubert },
41075796c8dcSSimon Schubert
4108c50c785cSJohn Marino /* PREFIX_VEX_0FD1 */
41095796c8dcSSimon Schubert {
4110cf7f2e2dSJohn Marino { Bad_Opcode },
4111cf7f2e2dSJohn Marino { Bad_Opcode },
4112a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FD1_P_2) },
41135796c8dcSSimon Schubert },
41145796c8dcSSimon Schubert
4115c50c785cSJohn Marino /* PREFIX_VEX_0FD2 */
41165796c8dcSSimon Schubert {
4117cf7f2e2dSJohn Marino { Bad_Opcode },
4118cf7f2e2dSJohn Marino { Bad_Opcode },
4119a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FD2_P_2) },
41205796c8dcSSimon Schubert },
41215796c8dcSSimon Schubert
4122c50c785cSJohn Marino /* PREFIX_VEX_0FD3 */
41235796c8dcSSimon Schubert {
4124cf7f2e2dSJohn Marino { Bad_Opcode },
4125cf7f2e2dSJohn Marino { Bad_Opcode },
4126a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FD3_P_2) },
41275796c8dcSSimon Schubert },
41285796c8dcSSimon Schubert
4129c50c785cSJohn Marino /* PREFIX_VEX_0FD4 */
41305796c8dcSSimon Schubert {
4131cf7f2e2dSJohn Marino { Bad_Opcode },
4132cf7f2e2dSJohn Marino { Bad_Opcode },
4133a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FD4_P_2) },
41345796c8dcSSimon Schubert },
41355796c8dcSSimon Schubert
4136c50c785cSJohn Marino /* PREFIX_VEX_0FD5 */
41375796c8dcSSimon Schubert {
4138cf7f2e2dSJohn Marino { Bad_Opcode },
4139cf7f2e2dSJohn Marino { Bad_Opcode },
4140a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FD5_P_2) },
41415796c8dcSSimon Schubert },
41425796c8dcSSimon Schubert
4143c50c785cSJohn Marino /* PREFIX_VEX_0FD6 */
41445796c8dcSSimon Schubert {
4145cf7f2e2dSJohn Marino { Bad_Opcode },
4146cf7f2e2dSJohn Marino { Bad_Opcode },
4147c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FD6_P_2) },
41485796c8dcSSimon Schubert },
41495796c8dcSSimon Schubert
4150c50c785cSJohn Marino /* PREFIX_VEX_0FD7 */
41515796c8dcSSimon Schubert {
4152cf7f2e2dSJohn Marino { Bad_Opcode },
4153cf7f2e2dSJohn Marino { Bad_Opcode },
4154c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0FD7_PREFIX_2) },
41555796c8dcSSimon Schubert },
41565796c8dcSSimon Schubert
4157c50c785cSJohn Marino /* PREFIX_VEX_0FD8 */
41585796c8dcSSimon Schubert {
4159cf7f2e2dSJohn Marino { Bad_Opcode },
4160cf7f2e2dSJohn Marino { Bad_Opcode },
4161a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FD8_P_2) },
41625796c8dcSSimon Schubert },
41635796c8dcSSimon Schubert
4164c50c785cSJohn Marino /* PREFIX_VEX_0FD9 */
41655796c8dcSSimon Schubert {
4166cf7f2e2dSJohn Marino { Bad_Opcode },
4167cf7f2e2dSJohn Marino { Bad_Opcode },
4168a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FD9_P_2) },
41695796c8dcSSimon Schubert },
41705796c8dcSSimon Schubert
4171c50c785cSJohn Marino /* PREFIX_VEX_0FDA */
41725796c8dcSSimon Schubert {
4173cf7f2e2dSJohn Marino { Bad_Opcode },
4174cf7f2e2dSJohn Marino { Bad_Opcode },
4175a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FDA_P_2) },
41765796c8dcSSimon Schubert },
41775796c8dcSSimon Schubert
4178c50c785cSJohn Marino /* PREFIX_VEX_0FDB */
41795796c8dcSSimon Schubert {
4180cf7f2e2dSJohn Marino { Bad_Opcode },
4181cf7f2e2dSJohn Marino { Bad_Opcode },
4182a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FDB_P_2) },
41835796c8dcSSimon Schubert },
41845796c8dcSSimon Schubert
4185c50c785cSJohn Marino /* PREFIX_VEX_0FDC */
41865796c8dcSSimon Schubert {
4187cf7f2e2dSJohn Marino { Bad_Opcode },
4188cf7f2e2dSJohn Marino { Bad_Opcode },
4189a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FDC_P_2) },
41905796c8dcSSimon Schubert },
41915796c8dcSSimon Schubert
4192c50c785cSJohn Marino /* PREFIX_VEX_0FDD */
41935796c8dcSSimon Schubert {
4194cf7f2e2dSJohn Marino { Bad_Opcode },
4195cf7f2e2dSJohn Marino { Bad_Opcode },
4196a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FDD_P_2) },
41975796c8dcSSimon Schubert },
41985796c8dcSSimon Schubert
4199c50c785cSJohn Marino /* PREFIX_VEX_0FDE */
42005796c8dcSSimon Schubert {
4201cf7f2e2dSJohn Marino { Bad_Opcode },
4202cf7f2e2dSJohn Marino { Bad_Opcode },
4203a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FDE_P_2) },
42045796c8dcSSimon Schubert },
42055796c8dcSSimon Schubert
4206c50c785cSJohn Marino /* PREFIX_VEX_0FDF */
42075796c8dcSSimon Schubert {
4208cf7f2e2dSJohn Marino { Bad_Opcode },
4209cf7f2e2dSJohn Marino { Bad_Opcode },
4210a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FDF_P_2) },
42115796c8dcSSimon Schubert },
42125796c8dcSSimon Schubert
4213c50c785cSJohn Marino /* PREFIX_VEX_0FE0 */
42145796c8dcSSimon Schubert {
4215cf7f2e2dSJohn Marino { Bad_Opcode },
4216cf7f2e2dSJohn Marino { Bad_Opcode },
4217a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FE0_P_2) },
42185796c8dcSSimon Schubert },
42195796c8dcSSimon Schubert
4220c50c785cSJohn Marino /* PREFIX_VEX_0FE1 */
42215796c8dcSSimon Schubert {
4222cf7f2e2dSJohn Marino { Bad_Opcode },
4223cf7f2e2dSJohn Marino { Bad_Opcode },
4224a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FE1_P_2) },
42255796c8dcSSimon Schubert },
42265796c8dcSSimon Schubert
4227c50c785cSJohn Marino /* PREFIX_VEX_0FE2 */
42285796c8dcSSimon Schubert {
4229cf7f2e2dSJohn Marino { Bad_Opcode },
4230cf7f2e2dSJohn Marino { Bad_Opcode },
4231a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FE2_P_2) },
42325796c8dcSSimon Schubert },
42335796c8dcSSimon Schubert
4234c50c785cSJohn Marino /* PREFIX_VEX_0FE3 */
42355796c8dcSSimon Schubert {
4236cf7f2e2dSJohn Marino { Bad_Opcode },
4237cf7f2e2dSJohn Marino { Bad_Opcode },
4238a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FE3_P_2) },
42395796c8dcSSimon Schubert },
42405796c8dcSSimon Schubert
4241c50c785cSJohn Marino /* PREFIX_VEX_0FE4 */
42425796c8dcSSimon Schubert {
4243cf7f2e2dSJohn Marino { Bad_Opcode },
4244cf7f2e2dSJohn Marino { Bad_Opcode },
4245a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FE4_P_2) },
42465796c8dcSSimon Schubert },
42475796c8dcSSimon Schubert
4248c50c785cSJohn Marino /* PREFIX_VEX_0FE5 */
42495796c8dcSSimon Schubert {
4250cf7f2e2dSJohn Marino { Bad_Opcode },
4251cf7f2e2dSJohn Marino { Bad_Opcode },
4252a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FE5_P_2) },
42535796c8dcSSimon Schubert },
42545796c8dcSSimon Schubert
4255c50c785cSJohn Marino /* PREFIX_VEX_0FE6 */
42565796c8dcSSimon Schubert {
4257cf7f2e2dSJohn Marino { Bad_Opcode },
4258c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FE6_P_1) },
4259c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FE6_P_2) },
4260c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FE6_P_3) },
42615796c8dcSSimon Schubert },
42625796c8dcSSimon Schubert
4263c50c785cSJohn Marino /* PREFIX_VEX_0FE7 */
42645796c8dcSSimon Schubert {
4265cf7f2e2dSJohn Marino { Bad_Opcode },
4266cf7f2e2dSJohn Marino { Bad_Opcode },
4267c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0FE7_PREFIX_2) },
42685796c8dcSSimon Schubert },
42695796c8dcSSimon Schubert
4270c50c785cSJohn Marino /* PREFIX_VEX_0FE8 */
42715796c8dcSSimon Schubert {
4272cf7f2e2dSJohn Marino { Bad_Opcode },
4273cf7f2e2dSJohn Marino { Bad_Opcode },
4274a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FE8_P_2) },
42755796c8dcSSimon Schubert },
42765796c8dcSSimon Schubert
4277c50c785cSJohn Marino /* PREFIX_VEX_0FE9 */
42785796c8dcSSimon Schubert {
4279cf7f2e2dSJohn Marino { Bad_Opcode },
4280cf7f2e2dSJohn Marino { Bad_Opcode },
4281a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FE9_P_2) },
42825796c8dcSSimon Schubert },
42835796c8dcSSimon Schubert
4284c50c785cSJohn Marino /* PREFIX_VEX_0FEA */
42855796c8dcSSimon Schubert {
4286cf7f2e2dSJohn Marino { Bad_Opcode },
4287cf7f2e2dSJohn Marino { Bad_Opcode },
4288a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FEA_P_2) },
42895796c8dcSSimon Schubert },
42905796c8dcSSimon Schubert
4291c50c785cSJohn Marino /* PREFIX_VEX_0FEB */
42925796c8dcSSimon Schubert {
4293cf7f2e2dSJohn Marino { Bad_Opcode },
4294cf7f2e2dSJohn Marino { Bad_Opcode },
4295a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FEB_P_2) },
42965796c8dcSSimon Schubert },
42975796c8dcSSimon Schubert
4298c50c785cSJohn Marino /* PREFIX_VEX_0FEC */
42995796c8dcSSimon Schubert {
4300cf7f2e2dSJohn Marino { Bad_Opcode },
4301cf7f2e2dSJohn Marino { Bad_Opcode },
4302a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FEC_P_2) },
43035796c8dcSSimon Schubert },
43045796c8dcSSimon Schubert
4305c50c785cSJohn Marino /* PREFIX_VEX_0FED */
43065796c8dcSSimon Schubert {
4307cf7f2e2dSJohn Marino { Bad_Opcode },
4308cf7f2e2dSJohn Marino { Bad_Opcode },
4309a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FED_P_2) },
43105796c8dcSSimon Schubert },
43115796c8dcSSimon Schubert
4312c50c785cSJohn Marino /* PREFIX_VEX_0FEE */
43135796c8dcSSimon Schubert {
4314cf7f2e2dSJohn Marino { Bad_Opcode },
4315cf7f2e2dSJohn Marino { Bad_Opcode },
4316a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FEE_P_2) },
43175796c8dcSSimon Schubert },
43185796c8dcSSimon Schubert
4319c50c785cSJohn Marino /* PREFIX_VEX_0FEF */
43205796c8dcSSimon Schubert {
4321cf7f2e2dSJohn Marino { Bad_Opcode },
4322cf7f2e2dSJohn Marino { Bad_Opcode },
4323a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FEF_P_2) },
43245796c8dcSSimon Schubert },
43255796c8dcSSimon Schubert
4326c50c785cSJohn Marino /* PREFIX_VEX_0FF0 */
43275796c8dcSSimon Schubert {
4328cf7f2e2dSJohn Marino { Bad_Opcode },
4329cf7f2e2dSJohn Marino { Bad_Opcode },
4330cf7f2e2dSJohn Marino { Bad_Opcode },
4331c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0FF0_PREFIX_3) },
43325796c8dcSSimon Schubert },
43335796c8dcSSimon Schubert
4334c50c785cSJohn Marino /* PREFIX_VEX_0FF1 */
43355796c8dcSSimon Schubert {
4336cf7f2e2dSJohn Marino { Bad_Opcode },
4337cf7f2e2dSJohn Marino { Bad_Opcode },
4338a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FF1_P_2) },
43395796c8dcSSimon Schubert },
43405796c8dcSSimon Schubert
4341c50c785cSJohn Marino /* PREFIX_VEX_0FF2 */
43425796c8dcSSimon Schubert {
4343cf7f2e2dSJohn Marino { Bad_Opcode },
4344cf7f2e2dSJohn Marino { Bad_Opcode },
4345a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FF2_P_2) },
43465796c8dcSSimon Schubert },
43475796c8dcSSimon Schubert
4348c50c785cSJohn Marino /* PREFIX_VEX_0FF3 */
43495796c8dcSSimon Schubert {
4350cf7f2e2dSJohn Marino { Bad_Opcode },
4351cf7f2e2dSJohn Marino { Bad_Opcode },
4352a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FF3_P_2) },
43535796c8dcSSimon Schubert },
43545796c8dcSSimon Schubert
4355c50c785cSJohn Marino /* PREFIX_VEX_0FF4 */
43565796c8dcSSimon Schubert {
4357cf7f2e2dSJohn Marino { Bad_Opcode },
4358cf7f2e2dSJohn Marino { Bad_Opcode },
4359a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FF4_P_2) },
43605796c8dcSSimon Schubert },
43615796c8dcSSimon Schubert
4362c50c785cSJohn Marino /* PREFIX_VEX_0FF5 */
43635796c8dcSSimon Schubert {
4364cf7f2e2dSJohn Marino { Bad_Opcode },
4365cf7f2e2dSJohn Marino { Bad_Opcode },
4366a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FF5_P_2) },
43675796c8dcSSimon Schubert },
43685796c8dcSSimon Schubert
4369c50c785cSJohn Marino /* PREFIX_VEX_0FF6 */
43705796c8dcSSimon Schubert {
4371cf7f2e2dSJohn Marino { Bad_Opcode },
4372cf7f2e2dSJohn Marino { Bad_Opcode },
4373a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FF6_P_2) },
43745796c8dcSSimon Schubert },
43755796c8dcSSimon Schubert
4376c50c785cSJohn Marino /* PREFIX_VEX_0FF7 */
43775796c8dcSSimon Schubert {
4378cf7f2e2dSJohn Marino { Bad_Opcode },
4379cf7f2e2dSJohn Marino { Bad_Opcode },
4380c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FF7_P_2) },
43815796c8dcSSimon Schubert },
43825796c8dcSSimon Schubert
4383c50c785cSJohn Marino /* PREFIX_VEX_0FF8 */
43845796c8dcSSimon Schubert {
4385cf7f2e2dSJohn Marino { Bad_Opcode },
4386cf7f2e2dSJohn Marino { Bad_Opcode },
4387a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FF8_P_2) },
43885796c8dcSSimon Schubert },
43895796c8dcSSimon Schubert
4390c50c785cSJohn Marino /* PREFIX_VEX_0FF9 */
43915796c8dcSSimon Schubert {
4392cf7f2e2dSJohn Marino { Bad_Opcode },
4393cf7f2e2dSJohn Marino { Bad_Opcode },
4394a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FF9_P_2) },
43955796c8dcSSimon Schubert },
43965796c8dcSSimon Schubert
4397c50c785cSJohn Marino /* PREFIX_VEX_0FFA */
43985796c8dcSSimon Schubert {
4399cf7f2e2dSJohn Marino { Bad_Opcode },
4400cf7f2e2dSJohn Marino { Bad_Opcode },
4401a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FFA_P_2) },
44025796c8dcSSimon Schubert },
44035796c8dcSSimon Schubert
4404c50c785cSJohn Marino /* PREFIX_VEX_0FFB */
44055796c8dcSSimon Schubert {
4406cf7f2e2dSJohn Marino { Bad_Opcode },
4407cf7f2e2dSJohn Marino { Bad_Opcode },
4408a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FFB_P_2) },
44095796c8dcSSimon Schubert },
44105796c8dcSSimon Schubert
4411c50c785cSJohn Marino /* PREFIX_VEX_0FFC */
44125796c8dcSSimon Schubert {
4413cf7f2e2dSJohn Marino { Bad_Opcode },
4414cf7f2e2dSJohn Marino { Bad_Opcode },
4415a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FFC_P_2) },
44165796c8dcSSimon Schubert },
44175796c8dcSSimon Schubert
4418c50c785cSJohn Marino /* PREFIX_VEX_0FFD */
44195796c8dcSSimon Schubert {
4420cf7f2e2dSJohn Marino { Bad_Opcode },
4421cf7f2e2dSJohn Marino { Bad_Opcode },
4422a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FFD_P_2) },
44235796c8dcSSimon Schubert },
44245796c8dcSSimon Schubert
4425c50c785cSJohn Marino /* PREFIX_VEX_0FFE */
44265796c8dcSSimon Schubert {
4427cf7f2e2dSJohn Marino { Bad_Opcode },
4428cf7f2e2dSJohn Marino { Bad_Opcode },
4429a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FFE_P_2) },
44305796c8dcSSimon Schubert },
44315796c8dcSSimon Schubert
4432c50c785cSJohn Marino /* PREFIX_VEX_0F3800 */
44335796c8dcSSimon Schubert {
4434cf7f2e2dSJohn Marino { Bad_Opcode },
4435cf7f2e2dSJohn Marino { Bad_Opcode },
4436a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3800_P_2) },
44375796c8dcSSimon Schubert },
44385796c8dcSSimon Schubert
4439c50c785cSJohn Marino /* PREFIX_VEX_0F3801 */
44405796c8dcSSimon Schubert {
4441cf7f2e2dSJohn Marino { Bad_Opcode },
4442cf7f2e2dSJohn Marino { Bad_Opcode },
4443a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3801_P_2) },
44445796c8dcSSimon Schubert },
44455796c8dcSSimon Schubert
4446c50c785cSJohn Marino /* PREFIX_VEX_0F3802 */
44475796c8dcSSimon Schubert {
4448cf7f2e2dSJohn Marino { Bad_Opcode },
4449cf7f2e2dSJohn Marino { Bad_Opcode },
4450a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3802_P_2) },
44515796c8dcSSimon Schubert },
44525796c8dcSSimon Schubert
4453c50c785cSJohn Marino /* PREFIX_VEX_0F3803 */
44545796c8dcSSimon Schubert {
4455cf7f2e2dSJohn Marino { Bad_Opcode },
4456cf7f2e2dSJohn Marino { Bad_Opcode },
4457a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3803_P_2) },
44585796c8dcSSimon Schubert },
44595796c8dcSSimon Schubert
4460c50c785cSJohn Marino /* PREFIX_VEX_0F3804 */
44615796c8dcSSimon Schubert {
4462cf7f2e2dSJohn Marino { Bad_Opcode },
4463cf7f2e2dSJohn Marino { Bad_Opcode },
4464a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3804_P_2) },
44655796c8dcSSimon Schubert },
44665796c8dcSSimon Schubert
4467c50c785cSJohn Marino /* PREFIX_VEX_0F3805 */
44685796c8dcSSimon Schubert {
4469cf7f2e2dSJohn Marino { Bad_Opcode },
4470cf7f2e2dSJohn Marino { Bad_Opcode },
4471a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3805_P_2) },
44725796c8dcSSimon Schubert },
44735796c8dcSSimon Schubert
4474c50c785cSJohn Marino /* PREFIX_VEX_0F3806 */
44755796c8dcSSimon Schubert {
4476cf7f2e2dSJohn Marino { Bad_Opcode },
4477cf7f2e2dSJohn Marino { Bad_Opcode },
4478a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3806_P_2) },
44795796c8dcSSimon Schubert },
44805796c8dcSSimon Schubert
4481c50c785cSJohn Marino /* PREFIX_VEX_0F3807 */
44825796c8dcSSimon Schubert {
4483cf7f2e2dSJohn Marino { Bad_Opcode },
4484cf7f2e2dSJohn Marino { Bad_Opcode },
4485a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3807_P_2) },
44865796c8dcSSimon Schubert },
44875796c8dcSSimon Schubert
4488c50c785cSJohn Marino /* PREFIX_VEX_0F3808 */
44895796c8dcSSimon Schubert {
4490cf7f2e2dSJohn Marino { Bad_Opcode },
4491cf7f2e2dSJohn Marino { Bad_Opcode },
4492a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3808_P_2) },
44935796c8dcSSimon Schubert },
44945796c8dcSSimon Schubert
4495c50c785cSJohn Marino /* PREFIX_VEX_0F3809 */
44965796c8dcSSimon Schubert {
4497cf7f2e2dSJohn Marino { Bad_Opcode },
4498cf7f2e2dSJohn Marino { Bad_Opcode },
4499a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3809_P_2) },
45005796c8dcSSimon Schubert },
45015796c8dcSSimon Schubert
4502c50c785cSJohn Marino /* PREFIX_VEX_0F380A */
45035796c8dcSSimon Schubert {
4504cf7f2e2dSJohn Marino { Bad_Opcode },
4505cf7f2e2dSJohn Marino { Bad_Opcode },
4506a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F380A_P_2) },
45075796c8dcSSimon Schubert },
45085796c8dcSSimon Schubert
4509c50c785cSJohn Marino /* PREFIX_VEX_0F380B */
45105796c8dcSSimon Schubert {
4511cf7f2e2dSJohn Marino { Bad_Opcode },
4512cf7f2e2dSJohn Marino { Bad_Opcode },
4513a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F380B_P_2) },
45145796c8dcSSimon Schubert },
45155796c8dcSSimon Schubert
4516c50c785cSJohn Marino /* PREFIX_VEX_0F380C */
45175796c8dcSSimon Schubert {
4518cf7f2e2dSJohn Marino { Bad_Opcode },
4519cf7f2e2dSJohn Marino { Bad_Opcode },
4520c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F380C_P_2) },
45215796c8dcSSimon Schubert },
45225796c8dcSSimon Schubert
4523c50c785cSJohn Marino /* PREFIX_VEX_0F380D */
45245796c8dcSSimon Schubert {
4525cf7f2e2dSJohn Marino { Bad_Opcode },
4526cf7f2e2dSJohn Marino { Bad_Opcode },
4527c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F380D_P_2) },
45285796c8dcSSimon Schubert },
45295796c8dcSSimon Schubert
4530c50c785cSJohn Marino /* PREFIX_VEX_0F380E */
45315796c8dcSSimon Schubert {
4532cf7f2e2dSJohn Marino { Bad_Opcode },
4533cf7f2e2dSJohn Marino { Bad_Opcode },
4534c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F380E_P_2) },
45355796c8dcSSimon Schubert },
45365796c8dcSSimon Schubert
4537c50c785cSJohn Marino /* PREFIX_VEX_0F380F */
45385796c8dcSSimon Schubert {
4539cf7f2e2dSJohn Marino { Bad_Opcode },
4540cf7f2e2dSJohn Marino { Bad_Opcode },
4541c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F380F_P_2) },
4542cf7f2e2dSJohn Marino },
4543cf7f2e2dSJohn Marino
4544c50c785cSJohn Marino /* PREFIX_VEX_0F3813 */
4545cf7f2e2dSJohn Marino {
4546cf7f2e2dSJohn Marino { Bad_Opcode },
4547cf7f2e2dSJohn Marino { Bad_Opcode },
4548cf7f2e2dSJohn Marino { "vcvtph2ps", { XM, EXxmmq } },
45495796c8dcSSimon Schubert },
45505796c8dcSSimon Schubert
4551a45ae5f8SJohn Marino /* PREFIX_VEX_0F3816 */
4552a45ae5f8SJohn Marino {
4553a45ae5f8SJohn Marino { Bad_Opcode },
4554a45ae5f8SJohn Marino { Bad_Opcode },
4555a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3816_P_2) },
4556a45ae5f8SJohn Marino },
4557a45ae5f8SJohn Marino
4558c50c785cSJohn Marino /* PREFIX_VEX_0F3817 */
45595796c8dcSSimon Schubert {
4560cf7f2e2dSJohn Marino { Bad_Opcode },
4561cf7f2e2dSJohn Marino { Bad_Opcode },
4562c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3817_P_2) },
45635796c8dcSSimon Schubert },
45645796c8dcSSimon Schubert
4565c50c785cSJohn Marino /* PREFIX_VEX_0F3818 */
45665796c8dcSSimon Schubert {
4567cf7f2e2dSJohn Marino { Bad_Opcode },
4568cf7f2e2dSJohn Marino { Bad_Opcode },
4569a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3818_P_2) },
45705796c8dcSSimon Schubert },
45715796c8dcSSimon Schubert
4572c50c785cSJohn Marino /* PREFIX_VEX_0F3819 */
45735796c8dcSSimon Schubert {
4574cf7f2e2dSJohn Marino { Bad_Opcode },
4575cf7f2e2dSJohn Marino { Bad_Opcode },
4576a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3819_P_2) },
45775796c8dcSSimon Schubert },
45785796c8dcSSimon Schubert
4579c50c785cSJohn Marino /* PREFIX_VEX_0F381A */
45805796c8dcSSimon Schubert {
4581cf7f2e2dSJohn Marino { Bad_Opcode },
4582cf7f2e2dSJohn Marino { Bad_Opcode },
4583c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F381A_PREFIX_2) },
45845796c8dcSSimon Schubert },
45855796c8dcSSimon Schubert
4586c50c785cSJohn Marino /* PREFIX_VEX_0F381C */
45875796c8dcSSimon Schubert {
4588cf7f2e2dSJohn Marino { Bad_Opcode },
4589cf7f2e2dSJohn Marino { Bad_Opcode },
4590a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F381C_P_2) },
45915796c8dcSSimon Schubert },
45925796c8dcSSimon Schubert
4593c50c785cSJohn Marino /* PREFIX_VEX_0F381D */
45945796c8dcSSimon Schubert {
4595cf7f2e2dSJohn Marino { Bad_Opcode },
4596cf7f2e2dSJohn Marino { Bad_Opcode },
4597a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F381D_P_2) },
45985796c8dcSSimon Schubert },
45995796c8dcSSimon Schubert
4600c50c785cSJohn Marino /* PREFIX_VEX_0F381E */
46015796c8dcSSimon Schubert {
4602cf7f2e2dSJohn Marino { Bad_Opcode },
4603cf7f2e2dSJohn Marino { Bad_Opcode },
4604a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F381E_P_2) },
46055796c8dcSSimon Schubert },
46065796c8dcSSimon Schubert
4607c50c785cSJohn Marino /* PREFIX_VEX_0F3820 */
46085796c8dcSSimon Schubert {
4609cf7f2e2dSJohn Marino { Bad_Opcode },
4610cf7f2e2dSJohn Marino { Bad_Opcode },
4611a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3820_P_2) },
46125796c8dcSSimon Schubert },
46135796c8dcSSimon Schubert
4614c50c785cSJohn Marino /* PREFIX_VEX_0F3821 */
46155796c8dcSSimon Schubert {
4616cf7f2e2dSJohn Marino { Bad_Opcode },
4617cf7f2e2dSJohn Marino { Bad_Opcode },
4618a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3821_P_2) },
46195796c8dcSSimon Schubert },
46205796c8dcSSimon Schubert
4621c50c785cSJohn Marino /* PREFIX_VEX_0F3822 */
46225796c8dcSSimon Schubert {
4623cf7f2e2dSJohn Marino { Bad_Opcode },
4624cf7f2e2dSJohn Marino { Bad_Opcode },
4625a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3822_P_2) },
46265796c8dcSSimon Schubert },
46275796c8dcSSimon Schubert
4628c50c785cSJohn Marino /* PREFIX_VEX_0F3823 */
46295796c8dcSSimon Schubert {
4630cf7f2e2dSJohn Marino { Bad_Opcode },
4631cf7f2e2dSJohn Marino { Bad_Opcode },
4632a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3823_P_2) },
46335796c8dcSSimon Schubert },
46345796c8dcSSimon Schubert
4635c50c785cSJohn Marino /* PREFIX_VEX_0F3824 */
46365796c8dcSSimon Schubert {
4637cf7f2e2dSJohn Marino { Bad_Opcode },
4638cf7f2e2dSJohn Marino { Bad_Opcode },
4639a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3824_P_2) },
46405796c8dcSSimon Schubert },
46415796c8dcSSimon Schubert
4642c50c785cSJohn Marino /* PREFIX_VEX_0F3825 */
46435796c8dcSSimon Schubert {
4644cf7f2e2dSJohn Marino { Bad_Opcode },
4645cf7f2e2dSJohn Marino { Bad_Opcode },
4646a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3825_P_2) },
46475796c8dcSSimon Schubert },
46485796c8dcSSimon Schubert
4649c50c785cSJohn Marino /* PREFIX_VEX_0F3828 */
46505796c8dcSSimon Schubert {
4651cf7f2e2dSJohn Marino { Bad_Opcode },
4652cf7f2e2dSJohn Marino { Bad_Opcode },
4653a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3828_P_2) },
46545796c8dcSSimon Schubert },
46555796c8dcSSimon Schubert
4656c50c785cSJohn Marino /* PREFIX_VEX_0F3829 */
46575796c8dcSSimon Schubert {
4658cf7f2e2dSJohn Marino { Bad_Opcode },
4659cf7f2e2dSJohn Marino { Bad_Opcode },
4660a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3829_P_2) },
46615796c8dcSSimon Schubert },
46625796c8dcSSimon Schubert
4663c50c785cSJohn Marino /* PREFIX_VEX_0F382A */
46645796c8dcSSimon Schubert {
4665cf7f2e2dSJohn Marino { Bad_Opcode },
4666cf7f2e2dSJohn Marino { Bad_Opcode },
4667c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F382A_PREFIX_2) },
46685796c8dcSSimon Schubert },
46695796c8dcSSimon Schubert
4670c50c785cSJohn Marino /* PREFIX_VEX_0F382B */
46715796c8dcSSimon Schubert {
4672cf7f2e2dSJohn Marino { Bad_Opcode },
4673cf7f2e2dSJohn Marino { Bad_Opcode },
4674a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F382B_P_2) },
46755796c8dcSSimon Schubert },
46765796c8dcSSimon Schubert
4677c50c785cSJohn Marino /* PREFIX_VEX_0F382C */
46785796c8dcSSimon Schubert {
4679cf7f2e2dSJohn Marino { Bad_Opcode },
4680cf7f2e2dSJohn Marino { Bad_Opcode },
4681c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F382C_PREFIX_2) },
46825796c8dcSSimon Schubert },
46835796c8dcSSimon Schubert
4684c50c785cSJohn Marino /* PREFIX_VEX_0F382D */
46855796c8dcSSimon Schubert {
4686cf7f2e2dSJohn Marino { Bad_Opcode },
4687cf7f2e2dSJohn Marino { Bad_Opcode },
4688c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F382D_PREFIX_2) },
46895796c8dcSSimon Schubert },
46905796c8dcSSimon Schubert
4691c50c785cSJohn Marino /* PREFIX_VEX_0F382E */
46925796c8dcSSimon Schubert {
4693cf7f2e2dSJohn Marino { Bad_Opcode },
4694cf7f2e2dSJohn Marino { Bad_Opcode },
4695c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F382E_PREFIX_2) },
46965796c8dcSSimon Schubert },
46975796c8dcSSimon Schubert
4698c50c785cSJohn Marino /* PREFIX_VEX_0F382F */
46995796c8dcSSimon Schubert {
4700cf7f2e2dSJohn Marino { Bad_Opcode },
4701cf7f2e2dSJohn Marino { Bad_Opcode },
4702c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F382F_PREFIX_2) },
47035796c8dcSSimon Schubert },
47045796c8dcSSimon Schubert
4705c50c785cSJohn Marino /* PREFIX_VEX_0F3830 */
47065796c8dcSSimon Schubert {
4707cf7f2e2dSJohn Marino { Bad_Opcode },
4708cf7f2e2dSJohn Marino { Bad_Opcode },
4709a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3830_P_2) },
47105796c8dcSSimon Schubert },
47115796c8dcSSimon Schubert
4712c50c785cSJohn Marino /* PREFIX_VEX_0F3831 */
47135796c8dcSSimon Schubert {
4714cf7f2e2dSJohn Marino { Bad_Opcode },
4715cf7f2e2dSJohn Marino { Bad_Opcode },
4716a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3831_P_2) },
47175796c8dcSSimon Schubert },
47185796c8dcSSimon Schubert
4719c50c785cSJohn Marino /* PREFIX_VEX_0F3832 */
47205796c8dcSSimon Schubert {
4721cf7f2e2dSJohn Marino { Bad_Opcode },
4722cf7f2e2dSJohn Marino { Bad_Opcode },
4723a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3832_P_2) },
47245796c8dcSSimon Schubert },
47255796c8dcSSimon Schubert
4726c50c785cSJohn Marino /* PREFIX_VEX_0F3833 */
47275796c8dcSSimon Schubert {
4728cf7f2e2dSJohn Marino { Bad_Opcode },
4729cf7f2e2dSJohn Marino { Bad_Opcode },
4730a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3833_P_2) },
47315796c8dcSSimon Schubert },
47325796c8dcSSimon Schubert
4733c50c785cSJohn Marino /* PREFIX_VEX_0F3834 */
47345796c8dcSSimon Schubert {
4735cf7f2e2dSJohn Marino { Bad_Opcode },
4736cf7f2e2dSJohn Marino { Bad_Opcode },
4737a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3834_P_2) },
47385796c8dcSSimon Schubert },
47395796c8dcSSimon Schubert
4740c50c785cSJohn Marino /* PREFIX_VEX_0F3835 */
47415796c8dcSSimon Schubert {
4742cf7f2e2dSJohn Marino { Bad_Opcode },
4743cf7f2e2dSJohn Marino { Bad_Opcode },
4744a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3835_P_2) },
4745a45ae5f8SJohn Marino },
4746a45ae5f8SJohn Marino
4747a45ae5f8SJohn Marino /* PREFIX_VEX_0F3836 */
4748a45ae5f8SJohn Marino {
4749a45ae5f8SJohn Marino { Bad_Opcode },
4750a45ae5f8SJohn Marino { Bad_Opcode },
4751a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3836_P_2) },
47525796c8dcSSimon Schubert },
47535796c8dcSSimon Schubert
4754c50c785cSJohn Marino /* PREFIX_VEX_0F3837 */
47555796c8dcSSimon Schubert {
4756cf7f2e2dSJohn Marino { Bad_Opcode },
4757cf7f2e2dSJohn Marino { Bad_Opcode },
4758a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3837_P_2) },
47595796c8dcSSimon Schubert },
47605796c8dcSSimon Schubert
4761c50c785cSJohn Marino /* PREFIX_VEX_0F3838 */
47625796c8dcSSimon Schubert {
4763cf7f2e2dSJohn Marino { Bad_Opcode },
4764cf7f2e2dSJohn Marino { Bad_Opcode },
4765a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3838_P_2) },
47665796c8dcSSimon Schubert },
47675796c8dcSSimon Schubert
4768c50c785cSJohn Marino /* PREFIX_VEX_0F3839 */
47695796c8dcSSimon Schubert {
4770cf7f2e2dSJohn Marino { Bad_Opcode },
4771cf7f2e2dSJohn Marino { Bad_Opcode },
4772a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3839_P_2) },
47735796c8dcSSimon Schubert },
47745796c8dcSSimon Schubert
4775c50c785cSJohn Marino /* PREFIX_VEX_0F383A */
47765796c8dcSSimon Schubert {
4777cf7f2e2dSJohn Marino { Bad_Opcode },
4778cf7f2e2dSJohn Marino { Bad_Opcode },
4779a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F383A_P_2) },
47805796c8dcSSimon Schubert },
47815796c8dcSSimon Schubert
4782c50c785cSJohn Marino /* PREFIX_VEX_0F383B */
47835796c8dcSSimon Schubert {
4784cf7f2e2dSJohn Marino { Bad_Opcode },
4785cf7f2e2dSJohn Marino { Bad_Opcode },
4786a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F383B_P_2) },
47875796c8dcSSimon Schubert },
47885796c8dcSSimon Schubert
4789c50c785cSJohn Marino /* PREFIX_VEX_0F383C */
47905796c8dcSSimon Schubert {
4791cf7f2e2dSJohn Marino { Bad_Opcode },
4792cf7f2e2dSJohn Marino { Bad_Opcode },
4793a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F383C_P_2) },
47945796c8dcSSimon Schubert },
47955796c8dcSSimon Schubert
4796c50c785cSJohn Marino /* PREFIX_VEX_0F383D */
47975796c8dcSSimon Schubert {
4798cf7f2e2dSJohn Marino { Bad_Opcode },
4799cf7f2e2dSJohn Marino { Bad_Opcode },
4800a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F383D_P_2) },
48015796c8dcSSimon Schubert },
48025796c8dcSSimon Schubert
4803c50c785cSJohn Marino /* PREFIX_VEX_0F383E */
48045796c8dcSSimon Schubert {
4805cf7f2e2dSJohn Marino { Bad_Opcode },
4806cf7f2e2dSJohn Marino { Bad_Opcode },
4807a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F383E_P_2) },
48085796c8dcSSimon Schubert },
48095796c8dcSSimon Schubert
4810c50c785cSJohn Marino /* PREFIX_VEX_0F383F */
48115796c8dcSSimon Schubert {
4812cf7f2e2dSJohn Marino { Bad_Opcode },
4813cf7f2e2dSJohn Marino { Bad_Opcode },
4814a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F383F_P_2) },
48155796c8dcSSimon Schubert },
48165796c8dcSSimon Schubert
4817c50c785cSJohn Marino /* PREFIX_VEX_0F3840 */
48185796c8dcSSimon Schubert {
4819cf7f2e2dSJohn Marino { Bad_Opcode },
4820cf7f2e2dSJohn Marino { Bad_Opcode },
4821a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3840_P_2) },
48225796c8dcSSimon Schubert },
48235796c8dcSSimon Schubert
4824c50c785cSJohn Marino /* PREFIX_VEX_0F3841 */
48255796c8dcSSimon Schubert {
4826cf7f2e2dSJohn Marino { Bad_Opcode },
4827cf7f2e2dSJohn Marino { Bad_Opcode },
4828c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3841_P_2) },
48295796c8dcSSimon Schubert },
48305796c8dcSSimon Schubert
4831a45ae5f8SJohn Marino /* PREFIX_VEX_0F3845 */
4832a45ae5f8SJohn Marino {
4833a45ae5f8SJohn Marino { Bad_Opcode },
4834a45ae5f8SJohn Marino { Bad_Opcode },
4835a45ae5f8SJohn Marino { "vpsrlv%LW", { XM, Vex, EXx } },
4836a45ae5f8SJohn Marino },
4837a45ae5f8SJohn Marino
4838a45ae5f8SJohn Marino /* PREFIX_VEX_0F3846 */
4839a45ae5f8SJohn Marino {
4840a45ae5f8SJohn Marino { Bad_Opcode },
4841a45ae5f8SJohn Marino { Bad_Opcode },
4842a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3846_P_2) },
4843a45ae5f8SJohn Marino },
4844a45ae5f8SJohn Marino
4845a45ae5f8SJohn Marino /* PREFIX_VEX_0F3847 */
4846a45ae5f8SJohn Marino {
4847a45ae5f8SJohn Marino { Bad_Opcode },
4848a45ae5f8SJohn Marino { Bad_Opcode },
4849a45ae5f8SJohn Marino { "vpsllv%LW", { XM, Vex, EXx } },
4850a45ae5f8SJohn Marino },
4851a45ae5f8SJohn Marino
4852a45ae5f8SJohn Marino /* PREFIX_VEX_0F3858 */
4853a45ae5f8SJohn Marino {
4854a45ae5f8SJohn Marino { Bad_Opcode },
4855a45ae5f8SJohn Marino { Bad_Opcode },
4856a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3858_P_2) },
4857a45ae5f8SJohn Marino },
4858a45ae5f8SJohn Marino
4859a45ae5f8SJohn Marino /* PREFIX_VEX_0F3859 */
4860a45ae5f8SJohn Marino {
4861a45ae5f8SJohn Marino { Bad_Opcode },
4862a45ae5f8SJohn Marino { Bad_Opcode },
4863a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3859_P_2) },
4864a45ae5f8SJohn Marino },
4865a45ae5f8SJohn Marino
4866a45ae5f8SJohn Marino /* PREFIX_VEX_0F385A */
4867a45ae5f8SJohn Marino {
4868a45ae5f8SJohn Marino { Bad_Opcode },
4869a45ae5f8SJohn Marino { Bad_Opcode },
4870a45ae5f8SJohn Marino { MOD_TABLE (MOD_VEX_0F385A_PREFIX_2) },
4871a45ae5f8SJohn Marino },
4872a45ae5f8SJohn Marino
4873a45ae5f8SJohn Marino /* PREFIX_VEX_0F3878 */
4874a45ae5f8SJohn Marino {
4875a45ae5f8SJohn Marino { Bad_Opcode },
4876a45ae5f8SJohn Marino { Bad_Opcode },
4877a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3878_P_2) },
4878a45ae5f8SJohn Marino },
4879a45ae5f8SJohn Marino
4880a45ae5f8SJohn Marino /* PREFIX_VEX_0F3879 */
4881a45ae5f8SJohn Marino {
4882a45ae5f8SJohn Marino { Bad_Opcode },
4883a45ae5f8SJohn Marino { Bad_Opcode },
4884a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3879_P_2) },
4885a45ae5f8SJohn Marino },
4886a45ae5f8SJohn Marino
4887a45ae5f8SJohn Marino /* PREFIX_VEX_0F388C */
4888a45ae5f8SJohn Marino {
4889a45ae5f8SJohn Marino { Bad_Opcode },
4890a45ae5f8SJohn Marino { Bad_Opcode },
4891a45ae5f8SJohn Marino { MOD_TABLE (MOD_VEX_0F388C_PREFIX_2) },
4892a45ae5f8SJohn Marino },
4893a45ae5f8SJohn Marino
4894a45ae5f8SJohn Marino /* PREFIX_VEX_0F388E */
4895a45ae5f8SJohn Marino {
4896a45ae5f8SJohn Marino { Bad_Opcode },
4897a45ae5f8SJohn Marino { Bad_Opcode },
4898a45ae5f8SJohn Marino { MOD_TABLE (MOD_VEX_0F388E_PREFIX_2) },
4899a45ae5f8SJohn Marino },
4900a45ae5f8SJohn Marino
4901a45ae5f8SJohn Marino /* PREFIX_VEX_0F3890 */
4902a45ae5f8SJohn Marino {
4903a45ae5f8SJohn Marino { Bad_Opcode },
4904a45ae5f8SJohn Marino { Bad_Opcode },
4905a45ae5f8SJohn Marino { "vpgatherd%LW", { XM, MVexVSIBDWpX, Vex } },
4906a45ae5f8SJohn Marino },
4907a45ae5f8SJohn Marino
4908a45ae5f8SJohn Marino /* PREFIX_VEX_0F3891 */
4909a45ae5f8SJohn Marino {
4910a45ae5f8SJohn Marino { Bad_Opcode },
4911a45ae5f8SJohn Marino { Bad_Opcode },
4912a45ae5f8SJohn Marino { "vpgatherq%LW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ } },
4913a45ae5f8SJohn Marino },
4914a45ae5f8SJohn Marino
4915a45ae5f8SJohn Marino /* PREFIX_VEX_0F3892 */
4916a45ae5f8SJohn Marino {
4917a45ae5f8SJohn Marino { Bad_Opcode },
4918a45ae5f8SJohn Marino { Bad_Opcode },
4919a45ae5f8SJohn Marino { "vgatherdp%XW", { XM, MVexVSIBDWpX, Vex } },
4920a45ae5f8SJohn Marino },
4921a45ae5f8SJohn Marino
4922a45ae5f8SJohn Marino /* PREFIX_VEX_0F3893 */
4923a45ae5f8SJohn Marino {
4924a45ae5f8SJohn Marino { Bad_Opcode },
4925a45ae5f8SJohn Marino { Bad_Opcode },
4926a45ae5f8SJohn Marino { "vgatherqp%XW", { XMGatherQ, MVexVSIBQWpX, VexGatherQ } },
4927a45ae5f8SJohn Marino },
4928a45ae5f8SJohn Marino
4929c50c785cSJohn Marino /* PREFIX_VEX_0F3896 */
49305796c8dcSSimon Schubert {
4931cf7f2e2dSJohn Marino { Bad_Opcode },
4932cf7f2e2dSJohn Marino { Bad_Opcode },
49335796c8dcSSimon Schubert { "vfmaddsub132p%XW", { XM, Vex, EXx } },
49345796c8dcSSimon Schubert },
49355796c8dcSSimon Schubert
4936c50c785cSJohn Marino /* PREFIX_VEX_0F3897 */
49375796c8dcSSimon Schubert {
4938cf7f2e2dSJohn Marino { Bad_Opcode },
4939cf7f2e2dSJohn Marino { Bad_Opcode },
49405796c8dcSSimon Schubert { "vfmsubadd132p%XW", { XM, Vex, EXx } },
49415796c8dcSSimon Schubert },
49425796c8dcSSimon Schubert
4943c50c785cSJohn Marino /* PREFIX_VEX_0F3898 */
49445796c8dcSSimon Schubert {
4945cf7f2e2dSJohn Marino { Bad_Opcode },
4946cf7f2e2dSJohn Marino { Bad_Opcode },
49475796c8dcSSimon Schubert { "vfmadd132p%XW", { XM, Vex, EXx } },
49485796c8dcSSimon Schubert },
49495796c8dcSSimon Schubert
4950c50c785cSJohn Marino /* PREFIX_VEX_0F3899 */
49515796c8dcSSimon Schubert {
4952cf7f2e2dSJohn Marino { Bad_Opcode },
4953cf7f2e2dSJohn Marino { Bad_Opcode },
4954cf7f2e2dSJohn Marino { "vfmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
49555796c8dcSSimon Schubert },
49565796c8dcSSimon Schubert
4957c50c785cSJohn Marino /* PREFIX_VEX_0F389A */
49585796c8dcSSimon Schubert {
4959cf7f2e2dSJohn Marino { Bad_Opcode },
4960cf7f2e2dSJohn Marino { Bad_Opcode },
49615796c8dcSSimon Schubert { "vfmsub132p%XW", { XM, Vex, EXx } },
49625796c8dcSSimon Schubert },
49635796c8dcSSimon Schubert
4964c50c785cSJohn Marino /* PREFIX_VEX_0F389B */
49655796c8dcSSimon Schubert {
4966cf7f2e2dSJohn Marino { Bad_Opcode },
4967cf7f2e2dSJohn Marino { Bad_Opcode },
4968cf7f2e2dSJohn Marino { "vfmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
49695796c8dcSSimon Schubert },
49705796c8dcSSimon Schubert
4971c50c785cSJohn Marino /* PREFIX_VEX_0F389C */
49725796c8dcSSimon Schubert {
4973cf7f2e2dSJohn Marino { Bad_Opcode },
4974cf7f2e2dSJohn Marino { Bad_Opcode },
49755796c8dcSSimon Schubert { "vfnmadd132p%XW", { XM, Vex, EXx } },
49765796c8dcSSimon Schubert },
49775796c8dcSSimon Schubert
4978c50c785cSJohn Marino /* PREFIX_VEX_0F389D */
49795796c8dcSSimon Schubert {
4980cf7f2e2dSJohn Marino { Bad_Opcode },
4981cf7f2e2dSJohn Marino { Bad_Opcode },
4982cf7f2e2dSJohn Marino { "vfnmadd132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
49835796c8dcSSimon Schubert },
49845796c8dcSSimon Schubert
4985c50c785cSJohn Marino /* PREFIX_VEX_0F389E */
49865796c8dcSSimon Schubert {
4987cf7f2e2dSJohn Marino { Bad_Opcode },
4988cf7f2e2dSJohn Marino { Bad_Opcode },
49895796c8dcSSimon Schubert { "vfnmsub132p%XW", { XM, Vex, EXx } },
49905796c8dcSSimon Schubert },
49915796c8dcSSimon Schubert
4992c50c785cSJohn Marino /* PREFIX_VEX_0F389F */
49935796c8dcSSimon Schubert {
4994cf7f2e2dSJohn Marino { Bad_Opcode },
4995cf7f2e2dSJohn Marino { Bad_Opcode },
4996cf7f2e2dSJohn Marino { "vfnmsub132s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
49975796c8dcSSimon Schubert },
49985796c8dcSSimon Schubert
4999c50c785cSJohn Marino /* PREFIX_VEX_0F38A6 */
50005796c8dcSSimon Schubert {
5001cf7f2e2dSJohn Marino { Bad_Opcode },
5002cf7f2e2dSJohn Marino { Bad_Opcode },
50035796c8dcSSimon Schubert { "vfmaddsub213p%XW", { XM, Vex, EXx } },
5004cf7f2e2dSJohn Marino { Bad_Opcode },
50055796c8dcSSimon Schubert },
50065796c8dcSSimon Schubert
5007c50c785cSJohn Marino /* PREFIX_VEX_0F38A7 */
50085796c8dcSSimon Schubert {
5009cf7f2e2dSJohn Marino { Bad_Opcode },
5010cf7f2e2dSJohn Marino { Bad_Opcode },
50115796c8dcSSimon Schubert { "vfmsubadd213p%XW", { XM, Vex, EXx } },
50125796c8dcSSimon Schubert },
50135796c8dcSSimon Schubert
5014c50c785cSJohn Marino /* PREFIX_VEX_0F38A8 */
50155796c8dcSSimon Schubert {
5016cf7f2e2dSJohn Marino { Bad_Opcode },
5017cf7f2e2dSJohn Marino { Bad_Opcode },
50185796c8dcSSimon Schubert { "vfmadd213p%XW", { XM, Vex, EXx } },
50195796c8dcSSimon Schubert },
50205796c8dcSSimon Schubert
5021c50c785cSJohn Marino /* PREFIX_VEX_0F38A9 */
50225796c8dcSSimon Schubert {
5023cf7f2e2dSJohn Marino { Bad_Opcode },
5024cf7f2e2dSJohn Marino { Bad_Opcode },
5025cf7f2e2dSJohn Marino { "vfmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
50265796c8dcSSimon Schubert },
50275796c8dcSSimon Schubert
5028c50c785cSJohn Marino /* PREFIX_VEX_0F38AA */
50295796c8dcSSimon Schubert {
5030cf7f2e2dSJohn Marino { Bad_Opcode },
5031cf7f2e2dSJohn Marino { Bad_Opcode },
50325796c8dcSSimon Schubert { "vfmsub213p%XW", { XM, Vex, EXx } },
50335796c8dcSSimon Schubert },
50345796c8dcSSimon Schubert
5035c50c785cSJohn Marino /* PREFIX_VEX_0F38AB */
50365796c8dcSSimon Schubert {
5037cf7f2e2dSJohn Marino { Bad_Opcode },
5038cf7f2e2dSJohn Marino { Bad_Opcode },
5039cf7f2e2dSJohn Marino { "vfmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
50405796c8dcSSimon Schubert },
50415796c8dcSSimon Schubert
5042c50c785cSJohn Marino /* PREFIX_VEX_0F38AC */
50435796c8dcSSimon Schubert {
5044cf7f2e2dSJohn Marino { Bad_Opcode },
5045cf7f2e2dSJohn Marino { Bad_Opcode },
50465796c8dcSSimon Schubert { "vfnmadd213p%XW", { XM, Vex, EXx } },
50475796c8dcSSimon Schubert },
50485796c8dcSSimon Schubert
5049c50c785cSJohn Marino /* PREFIX_VEX_0F38AD */
50505796c8dcSSimon Schubert {
5051cf7f2e2dSJohn Marino { Bad_Opcode },
5052cf7f2e2dSJohn Marino { Bad_Opcode },
5053cf7f2e2dSJohn Marino { "vfnmadd213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
50545796c8dcSSimon Schubert },
50555796c8dcSSimon Schubert
5056c50c785cSJohn Marino /* PREFIX_VEX_0F38AE */
50575796c8dcSSimon Schubert {
5058cf7f2e2dSJohn Marino { Bad_Opcode },
5059cf7f2e2dSJohn Marino { Bad_Opcode },
50605796c8dcSSimon Schubert { "vfnmsub213p%XW", { XM, Vex, EXx } },
50615796c8dcSSimon Schubert },
50625796c8dcSSimon Schubert
5063c50c785cSJohn Marino /* PREFIX_VEX_0F38AF */
50645796c8dcSSimon Schubert {
5065cf7f2e2dSJohn Marino { Bad_Opcode },
5066cf7f2e2dSJohn Marino { Bad_Opcode },
5067cf7f2e2dSJohn Marino { "vfnmsub213s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
50685796c8dcSSimon Schubert },
50695796c8dcSSimon Schubert
5070c50c785cSJohn Marino /* PREFIX_VEX_0F38B6 */
50715796c8dcSSimon Schubert {
5072cf7f2e2dSJohn Marino { Bad_Opcode },
5073cf7f2e2dSJohn Marino { Bad_Opcode },
50745796c8dcSSimon Schubert { "vfmaddsub231p%XW", { XM, Vex, EXx } },
50755796c8dcSSimon Schubert },
50765796c8dcSSimon Schubert
5077c50c785cSJohn Marino /* PREFIX_VEX_0F38B7 */
50785796c8dcSSimon Schubert {
5079cf7f2e2dSJohn Marino { Bad_Opcode },
5080cf7f2e2dSJohn Marino { Bad_Opcode },
50815796c8dcSSimon Schubert { "vfmsubadd231p%XW", { XM, Vex, EXx } },
50825796c8dcSSimon Schubert },
50835796c8dcSSimon Schubert
5084c50c785cSJohn Marino /* PREFIX_VEX_0F38B8 */
50855796c8dcSSimon Schubert {
5086cf7f2e2dSJohn Marino { Bad_Opcode },
5087cf7f2e2dSJohn Marino { Bad_Opcode },
50885796c8dcSSimon Schubert { "vfmadd231p%XW", { XM, Vex, EXx } },
50895796c8dcSSimon Schubert },
50905796c8dcSSimon Schubert
5091c50c785cSJohn Marino /* PREFIX_VEX_0F38B9 */
50925796c8dcSSimon Schubert {
5093cf7f2e2dSJohn Marino { Bad_Opcode },
5094cf7f2e2dSJohn Marino { Bad_Opcode },
5095cf7f2e2dSJohn Marino { "vfmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
50965796c8dcSSimon Schubert },
50975796c8dcSSimon Schubert
5098c50c785cSJohn Marino /* PREFIX_VEX_0F38BA */
50995796c8dcSSimon Schubert {
5100cf7f2e2dSJohn Marino { Bad_Opcode },
5101cf7f2e2dSJohn Marino { Bad_Opcode },
51025796c8dcSSimon Schubert { "vfmsub231p%XW", { XM, Vex, EXx } },
51035796c8dcSSimon Schubert },
51045796c8dcSSimon Schubert
5105c50c785cSJohn Marino /* PREFIX_VEX_0F38BB */
51065796c8dcSSimon Schubert {
5107cf7f2e2dSJohn Marino { Bad_Opcode },
5108cf7f2e2dSJohn Marino { Bad_Opcode },
5109cf7f2e2dSJohn Marino { "vfmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
51105796c8dcSSimon Schubert },
51115796c8dcSSimon Schubert
5112c50c785cSJohn Marino /* PREFIX_VEX_0F38BC */
51135796c8dcSSimon Schubert {
5114cf7f2e2dSJohn Marino { Bad_Opcode },
5115cf7f2e2dSJohn Marino { Bad_Opcode },
51165796c8dcSSimon Schubert { "vfnmadd231p%XW", { XM, Vex, EXx } },
51175796c8dcSSimon Schubert },
51185796c8dcSSimon Schubert
5119c50c785cSJohn Marino /* PREFIX_VEX_0F38BD */
51205796c8dcSSimon Schubert {
5121cf7f2e2dSJohn Marino { Bad_Opcode },
5122cf7f2e2dSJohn Marino { Bad_Opcode },
5123cf7f2e2dSJohn Marino { "vfnmadd231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
51245796c8dcSSimon Schubert },
51255796c8dcSSimon Schubert
5126c50c785cSJohn Marino /* PREFIX_VEX_0F38BE */
51275796c8dcSSimon Schubert {
5128cf7f2e2dSJohn Marino { Bad_Opcode },
5129cf7f2e2dSJohn Marino { Bad_Opcode },
51305796c8dcSSimon Schubert { "vfnmsub231p%XW", { XM, Vex, EXx } },
51315796c8dcSSimon Schubert },
51325796c8dcSSimon Schubert
5133c50c785cSJohn Marino /* PREFIX_VEX_0F38BF */
51345796c8dcSSimon Schubert {
5135cf7f2e2dSJohn Marino { Bad_Opcode },
5136cf7f2e2dSJohn Marino { Bad_Opcode },
5137cf7f2e2dSJohn Marino { "vfnmsub231s%XW", { XMScalar, VexScalar, EXVexWdqScalar } },
51385796c8dcSSimon Schubert },
51395796c8dcSSimon Schubert
5140c50c785cSJohn Marino /* PREFIX_VEX_0F38DB */
51415796c8dcSSimon Schubert {
5142cf7f2e2dSJohn Marino { Bad_Opcode },
5143cf7f2e2dSJohn Marino { Bad_Opcode },
5144c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38DB_P_2) },
51455796c8dcSSimon Schubert },
51465796c8dcSSimon Schubert
5147c50c785cSJohn Marino /* PREFIX_VEX_0F38DC */
51485796c8dcSSimon Schubert {
5149cf7f2e2dSJohn Marino { Bad_Opcode },
5150cf7f2e2dSJohn Marino { Bad_Opcode },
5151c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38DC_P_2) },
51525796c8dcSSimon Schubert },
51535796c8dcSSimon Schubert
5154c50c785cSJohn Marino /* PREFIX_VEX_0F38DD */
51555796c8dcSSimon Schubert {
5156cf7f2e2dSJohn Marino { Bad_Opcode },
5157cf7f2e2dSJohn Marino { Bad_Opcode },
5158c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38DD_P_2) },
51595796c8dcSSimon Schubert },
51605796c8dcSSimon Schubert
5161c50c785cSJohn Marino /* PREFIX_VEX_0F38DE */
51625796c8dcSSimon Schubert {
5163cf7f2e2dSJohn Marino { Bad_Opcode },
5164cf7f2e2dSJohn Marino { Bad_Opcode },
5165c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38DE_P_2) },
51665796c8dcSSimon Schubert },
51675796c8dcSSimon Schubert
5168c50c785cSJohn Marino /* PREFIX_VEX_0F38DF */
51695796c8dcSSimon Schubert {
5170cf7f2e2dSJohn Marino { Bad_Opcode },
5171cf7f2e2dSJohn Marino { Bad_Opcode },
5172c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38DF_P_2) },
51735796c8dcSSimon Schubert },
51745796c8dcSSimon Schubert
5175c50c785cSJohn Marino /* PREFIX_VEX_0F38F2 */
5176c50c785cSJohn Marino {
5177c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F2_P_0) },
5178c50c785cSJohn Marino },
5179c50c785cSJohn Marino
5180c50c785cSJohn Marino /* PREFIX_VEX_0F38F3_REG_1 */
5181c50c785cSJohn Marino {
5182c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_1_P_0) },
5183c50c785cSJohn Marino },
5184c50c785cSJohn Marino
5185c50c785cSJohn Marino /* PREFIX_VEX_0F38F3_REG_2 */
5186c50c785cSJohn Marino {
5187c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_2_P_0) },
5188c50c785cSJohn Marino },
5189c50c785cSJohn Marino
5190c50c785cSJohn Marino /* PREFIX_VEX_0F38F3_REG_3 */
5191c50c785cSJohn Marino {
5192c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F3_R_3_P_0) },
5193c50c785cSJohn Marino },
5194c50c785cSJohn Marino
5195a45ae5f8SJohn Marino /* PREFIX_VEX_0F38F5 */
5196a45ae5f8SJohn Marino {
5197a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_0) },
5198a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_1) },
5199a45ae5f8SJohn Marino { Bad_Opcode },
5200a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F5_P_3) },
5201a45ae5f8SJohn Marino },
5202a45ae5f8SJohn Marino
5203a45ae5f8SJohn Marino /* PREFIX_VEX_0F38F6 */
5204a45ae5f8SJohn Marino {
5205a45ae5f8SJohn Marino { Bad_Opcode },
5206a45ae5f8SJohn Marino { Bad_Opcode },
5207a45ae5f8SJohn Marino { Bad_Opcode },
5208a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F6_P_3) },
5209a45ae5f8SJohn Marino },
5210a45ae5f8SJohn Marino
5211c50c785cSJohn Marino /* PREFIX_VEX_0F38F7 */
5212c50c785cSJohn Marino {
5213c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_0) },
5214a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_1) },
5215a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_2) },
5216a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F38F7_P_3) },
5217a45ae5f8SJohn Marino },
5218a45ae5f8SJohn Marino
5219a45ae5f8SJohn Marino /* PREFIX_VEX_0F3A00 */
5220a45ae5f8SJohn Marino {
5221a45ae5f8SJohn Marino { Bad_Opcode },
5222a45ae5f8SJohn Marino { Bad_Opcode },
5223a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A00_P_2) },
5224a45ae5f8SJohn Marino },
5225a45ae5f8SJohn Marino
5226a45ae5f8SJohn Marino /* PREFIX_VEX_0F3A01 */
5227a45ae5f8SJohn Marino {
5228a45ae5f8SJohn Marino { Bad_Opcode },
5229a45ae5f8SJohn Marino { Bad_Opcode },
5230a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A01_P_2) },
5231a45ae5f8SJohn Marino },
5232a45ae5f8SJohn Marino
5233a45ae5f8SJohn Marino /* PREFIX_VEX_0F3A02 */
5234a45ae5f8SJohn Marino {
5235a45ae5f8SJohn Marino { Bad_Opcode },
5236a45ae5f8SJohn Marino { Bad_Opcode },
5237a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A02_P_2) },
5238c50c785cSJohn Marino },
5239c50c785cSJohn Marino
5240c50c785cSJohn Marino /* PREFIX_VEX_0F3A04 */
52415796c8dcSSimon Schubert {
5242cf7f2e2dSJohn Marino { Bad_Opcode },
5243cf7f2e2dSJohn Marino { Bad_Opcode },
5244c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A04_P_2) },
52455796c8dcSSimon Schubert },
52465796c8dcSSimon Schubert
5247c50c785cSJohn Marino /* PREFIX_VEX_0F3A05 */
52485796c8dcSSimon Schubert {
5249cf7f2e2dSJohn Marino { Bad_Opcode },
5250cf7f2e2dSJohn Marino { Bad_Opcode },
5251c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A05_P_2) },
52525796c8dcSSimon Schubert },
52535796c8dcSSimon Schubert
5254c50c785cSJohn Marino /* PREFIX_VEX_0F3A06 */
52555796c8dcSSimon Schubert {
5256cf7f2e2dSJohn Marino { Bad_Opcode },
5257cf7f2e2dSJohn Marino { Bad_Opcode },
5258c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A06_P_2) },
52595796c8dcSSimon Schubert },
52605796c8dcSSimon Schubert
5261c50c785cSJohn Marino /* PREFIX_VEX_0F3A08 */
52625796c8dcSSimon Schubert {
5263cf7f2e2dSJohn Marino { Bad_Opcode },
5264cf7f2e2dSJohn Marino { Bad_Opcode },
5265c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A08_P_2) },
52665796c8dcSSimon Schubert },
52675796c8dcSSimon Schubert
5268c50c785cSJohn Marino /* PREFIX_VEX_0F3A09 */
52695796c8dcSSimon Schubert {
5270cf7f2e2dSJohn Marino { Bad_Opcode },
5271cf7f2e2dSJohn Marino { Bad_Opcode },
5272c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A09_P_2) },
52735796c8dcSSimon Schubert },
52745796c8dcSSimon Schubert
5275c50c785cSJohn Marino /* PREFIX_VEX_0F3A0A */
52765796c8dcSSimon Schubert {
5277cf7f2e2dSJohn Marino { Bad_Opcode },
5278cf7f2e2dSJohn Marino { Bad_Opcode },
5279c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A0A_P_2) },
52805796c8dcSSimon Schubert },
52815796c8dcSSimon Schubert
5282c50c785cSJohn Marino /* PREFIX_VEX_0F3A0B */
52835796c8dcSSimon Schubert {
5284cf7f2e2dSJohn Marino { Bad_Opcode },
5285cf7f2e2dSJohn Marino { Bad_Opcode },
5286c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A0B_P_2) },
52875796c8dcSSimon Schubert },
52885796c8dcSSimon Schubert
5289c50c785cSJohn Marino /* PREFIX_VEX_0F3A0C */
52905796c8dcSSimon Schubert {
5291cf7f2e2dSJohn Marino { Bad_Opcode },
5292cf7f2e2dSJohn Marino { Bad_Opcode },
5293c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A0C_P_2) },
52945796c8dcSSimon Schubert },
52955796c8dcSSimon Schubert
5296c50c785cSJohn Marino /* PREFIX_VEX_0F3A0D */
52975796c8dcSSimon Schubert {
5298cf7f2e2dSJohn Marino { Bad_Opcode },
5299cf7f2e2dSJohn Marino { Bad_Opcode },
5300c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A0D_P_2) },
53015796c8dcSSimon Schubert },
53025796c8dcSSimon Schubert
5303c50c785cSJohn Marino /* PREFIX_VEX_0F3A0E */
53045796c8dcSSimon Schubert {
5305cf7f2e2dSJohn Marino { Bad_Opcode },
5306cf7f2e2dSJohn Marino { Bad_Opcode },
5307a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A0E_P_2) },
53085796c8dcSSimon Schubert },
53095796c8dcSSimon Schubert
5310c50c785cSJohn Marino /* PREFIX_VEX_0F3A0F */
53115796c8dcSSimon Schubert {
5312cf7f2e2dSJohn Marino { Bad_Opcode },
5313cf7f2e2dSJohn Marino { Bad_Opcode },
5314a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A0F_P_2) },
53155796c8dcSSimon Schubert },
53165796c8dcSSimon Schubert
5317c50c785cSJohn Marino /* PREFIX_VEX_0F3A14 */
53185796c8dcSSimon Schubert {
5319cf7f2e2dSJohn Marino { Bad_Opcode },
5320cf7f2e2dSJohn Marino { Bad_Opcode },
5321c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A14_P_2) },
53225796c8dcSSimon Schubert },
53235796c8dcSSimon Schubert
5324c50c785cSJohn Marino /* PREFIX_VEX_0F3A15 */
53255796c8dcSSimon Schubert {
5326cf7f2e2dSJohn Marino { Bad_Opcode },
5327cf7f2e2dSJohn Marino { Bad_Opcode },
5328c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A15_P_2) },
53295796c8dcSSimon Schubert },
53305796c8dcSSimon Schubert
5331c50c785cSJohn Marino /* PREFIX_VEX_0F3A16 */
53325796c8dcSSimon Schubert {
5333cf7f2e2dSJohn Marino { Bad_Opcode },
5334cf7f2e2dSJohn Marino { Bad_Opcode },
5335c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A16_P_2) },
53365796c8dcSSimon Schubert },
53375796c8dcSSimon Schubert
5338c50c785cSJohn Marino /* PREFIX_VEX_0F3A17 */
53395796c8dcSSimon Schubert {
5340cf7f2e2dSJohn Marino { Bad_Opcode },
5341cf7f2e2dSJohn Marino { Bad_Opcode },
5342c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A17_P_2) },
53435796c8dcSSimon Schubert },
53445796c8dcSSimon Schubert
5345c50c785cSJohn Marino /* PREFIX_VEX_0F3A18 */
53465796c8dcSSimon Schubert {
5347cf7f2e2dSJohn Marino { Bad_Opcode },
5348cf7f2e2dSJohn Marino { Bad_Opcode },
5349c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A18_P_2) },
53505796c8dcSSimon Schubert },
53515796c8dcSSimon Schubert
5352c50c785cSJohn Marino /* PREFIX_VEX_0F3A19 */
53535796c8dcSSimon Schubert {
5354cf7f2e2dSJohn Marino { Bad_Opcode },
5355cf7f2e2dSJohn Marino { Bad_Opcode },
5356c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A19_P_2) },
5357cf7f2e2dSJohn Marino },
5358cf7f2e2dSJohn Marino
5359c50c785cSJohn Marino /* PREFIX_VEX_0F3A1D */
5360cf7f2e2dSJohn Marino {
5361cf7f2e2dSJohn Marino { Bad_Opcode },
5362cf7f2e2dSJohn Marino { Bad_Opcode },
5363cf7f2e2dSJohn Marino { "vcvtps2ph", { EXxmmq, XM, Ib } },
53645796c8dcSSimon Schubert },
53655796c8dcSSimon Schubert
5366c50c785cSJohn Marino /* PREFIX_VEX_0F3A20 */
53675796c8dcSSimon Schubert {
5368cf7f2e2dSJohn Marino { Bad_Opcode },
5369cf7f2e2dSJohn Marino { Bad_Opcode },
5370c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A20_P_2) },
53715796c8dcSSimon Schubert },
53725796c8dcSSimon Schubert
5373c50c785cSJohn Marino /* PREFIX_VEX_0F3A21 */
53745796c8dcSSimon Schubert {
5375cf7f2e2dSJohn Marino { Bad_Opcode },
5376cf7f2e2dSJohn Marino { Bad_Opcode },
5377c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A21_P_2) },
53785796c8dcSSimon Schubert },
53795796c8dcSSimon Schubert
5380c50c785cSJohn Marino /* PREFIX_VEX_0F3A22 */
53815796c8dcSSimon Schubert {
5382cf7f2e2dSJohn Marino { Bad_Opcode },
5383cf7f2e2dSJohn Marino { Bad_Opcode },
5384c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A22_P_2) },
53855796c8dcSSimon Schubert },
53865796c8dcSSimon Schubert
5387a45ae5f8SJohn Marino /* PREFIX_VEX_0F3A38 */
5388a45ae5f8SJohn Marino {
5389a45ae5f8SJohn Marino { Bad_Opcode },
5390a45ae5f8SJohn Marino { Bad_Opcode },
5391a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A38_P_2) },
5392a45ae5f8SJohn Marino },
5393a45ae5f8SJohn Marino
5394a45ae5f8SJohn Marino /* PREFIX_VEX_0F3A39 */
5395a45ae5f8SJohn Marino {
5396a45ae5f8SJohn Marino { Bad_Opcode },
5397a45ae5f8SJohn Marino { Bad_Opcode },
5398a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A39_P_2) },
5399a45ae5f8SJohn Marino },
5400a45ae5f8SJohn Marino
5401c50c785cSJohn Marino /* PREFIX_VEX_0F3A40 */
54025796c8dcSSimon Schubert {
5403cf7f2e2dSJohn Marino { Bad_Opcode },
5404cf7f2e2dSJohn Marino { Bad_Opcode },
5405c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A40_P_2) },
54065796c8dcSSimon Schubert },
54075796c8dcSSimon Schubert
5408c50c785cSJohn Marino /* PREFIX_VEX_0F3A41 */
54095796c8dcSSimon Schubert {
5410cf7f2e2dSJohn Marino { Bad_Opcode },
5411cf7f2e2dSJohn Marino { Bad_Opcode },
5412c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A41_P_2) },
54135796c8dcSSimon Schubert },
54145796c8dcSSimon Schubert
5415c50c785cSJohn Marino /* PREFIX_VEX_0F3A42 */
54165796c8dcSSimon Schubert {
5417cf7f2e2dSJohn Marino { Bad_Opcode },
5418cf7f2e2dSJohn Marino { Bad_Opcode },
5419a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A42_P_2) },
54205796c8dcSSimon Schubert },
54215796c8dcSSimon Schubert
5422c50c785cSJohn Marino /* PREFIX_VEX_0F3A44 */
54235796c8dcSSimon Schubert {
5424cf7f2e2dSJohn Marino { Bad_Opcode },
5425cf7f2e2dSJohn Marino { Bad_Opcode },
5426c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A44_P_2) },
5427cf7f2e2dSJohn Marino },
5428cf7f2e2dSJohn Marino
5429a45ae5f8SJohn Marino /* PREFIX_VEX_0F3A46 */
5430a45ae5f8SJohn Marino {
5431a45ae5f8SJohn Marino { Bad_Opcode },
5432a45ae5f8SJohn Marino { Bad_Opcode },
5433a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A46_P_2) },
5434a45ae5f8SJohn Marino },
5435a45ae5f8SJohn Marino
5436c50c785cSJohn Marino /* PREFIX_VEX_0F3A48 */
5437cf7f2e2dSJohn Marino {
5438cf7f2e2dSJohn Marino { Bad_Opcode },
5439cf7f2e2dSJohn Marino { Bad_Opcode },
5440c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A48_P_2) },
5441cf7f2e2dSJohn Marino },
5442cf7f2e2dSJohn Marino
5443c50c785cSJohn Marino /* PREFIX_VEX_0F3A49 */
5444cf7f2e2dSJohn Marino {
5445cf7f2e2dSJohn Marino { Bad_Opcode },
5446cf7f2e2dSJohn Marino { Bad_Opcode },
5447c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A49_P_2) },
54485796c8dcSSimon Schubert },
54495796c8dcSSimon Schubert
5450c50c785cSJohn Marino /* PREFIX_VEX_0F3A4A */
54515796c8dcSSimon Schubert {
5452cf7f2e2dSJohn Marino { Bad_Opcode },
5453cf7f2e2dSJohn Marino { Bad_Opcode },
5454c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A4A_P_2) },
54555796c8dcSSimon Schubert },
54565796c8dcSSimon Schubert
5457c50c785cSJohn Marino /* PREFIX_VEX_0F3A4B */
54585796c8dcSSimon Schubert {
5459cf7f2e2dSJohn Marino { Bad_Opcode },
5460cf7f2e2dSJohn Marino { Bad_Opcode },
5461c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A4B_P_2) },
54625796c8dcSSimon Schubert },
54635796c8dcSSimon Schubert
5464c50c785cSJohn Marino /* PREFIX_VEX_0F3A4C */
54655796c8dcSSimon Schubert {
5466cf7f2e2dSJohn Marino { Bad_Opcode },
5467cf7f2e2dSJohn Marino { Bad_Opcode },
5468a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A4C_P_2) },
54695796c8dcSSimon Schubert },
54705796c8dcSSimon Schubert
5471c50c785cSJohn Marino /* PREFIX_VEX_0F3A5C */
54725796c8dcSSimon Schubert {
5473cf7f2e2dSJohn Marino { Bad_Opcode },
5474cf7f2e2dSJohn Marino { Bad_Opcode },
5475cf7f2e2dSJohn Marino { "vfmaddsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
54765796c8dcSSimon Schubert },
54775796c8dcSSimon Schubert
5478c50c785cSJohn Marino /* PREFIX_VEX_0F3A5D */
54795796c8dcSSimon Schubert {
5480cf7f2e2dSJohn Marino { Bad_Opcode },
5481cf7f2e2dSJohn Marino { Bad_Opcode },
5482cf7f2e2dSJohn Marino { "vfmaddsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
54835796c8dcSSimon Schubert },
54845796c8dcSSimon Schubert
5485c50c785cSJohn Marino /* PREFIX_VEX_0F3A5E */
54865796c8dcSSimon Schubert {
5487cf7f2e2dSJohn Marino { Bad_Opcode },
5488cf7f2e2dSJohn Marino { Bad_Opcode },
5489cf7f2e2dSJohn Marino { "vfmsubaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
54905796c8dcSSimon Schubert },
54915796c8dcSSimon Schubert
5492c50c785cSJohn Marino /* PREFIX_VEX_0F3A5F */
54935796c8dcSSimon Schubert {
5494cf7f2e2dSJohn Marino { Bad_Opcode },
5495cf7f2e2dSJohn Marino { Bad_Opcode },
5496cf7f2e2dSJohn Marino { "vfmsubaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
54975796c8dcSSimon Schubert },
54985796c8dcSSimon Schubert
5499c50c785cSJohn Marino /* PREFIX_VEX_0F3A60 */
55005796c8dcSSimon Schubert {
5501cf7f2e2dSJohn Marino { Bad_Opcode },
5502cf7f2e2dSJohn Marino { Bad_Opcode },
5503c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A60_P_2) },
5504cf7f2e2dSJohn Marino { Bad_Opcode },
55055796c8dcSSimon Schubert },
55065796c8dcSSimon Schubert
5507c50c785cSJohn Marino /* PREFIX_VEX_0F3A61 */
55085796c8dcSSimon Schubert {
5509cf7f2e2dSJohn Marino { Bad_Opcode },
5510cf7f2e2dSJohn Marino { Bad_Opcode },
5511c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A61_P_2) },
55125796c8dcSSimon Schubert },
55135796c8dcSSimon Schubert
5514c50c785cSJohn Marino /* PREFIX_VEX_0F3A62 */
55155796c8dcSSimon Schubert {
5516cf7f2e2dSJohn Marino { Bad_Opcode },
5517cf7f2e2dSJohn Marino { Bad_Opcode },
5518c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A62_P_2) },
55195796c8dcSSimon Schubert },
55205796c8dcSSimon Schubert
5521c50c785cSJohn Marino /* PREFIX_VEX_0F3A63 */
55225796c8dcSSimon Schubert {
5523cf7f2e2dSJohn Marino { Bad_Opcode },
5524cf7f2e2dSJohn Marino { Bad_Opcode },
5525c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A63_P_2) },
55265796c8dcSSimon Schubert },
55275796c8dcSSimon Schubert
5528c50c785cSJohn Marino /* PREFIX_VEX_0F3A68 */
55295796c8dcSSimon Schubert {
5530cf7f2e2dSJohn Marino { Bad_Opcode },
5531cf7f2e2dSJohn Marino { Bad_Opcode },
5532cf7f2e2dSJohn Marino { "vfmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
55335796c8dcSSimon Schubert },
55345796c8dcSSimon Schubert
5535c50c785cSJohn Marino /* PREFIX_VEX_0F3A69 */
55365796c8dcSSimon Schubert {
5537cf7f2e2dSJohn Marino { Bad_Opcode },
5538cf7f2e2dSJohn Marino { Bad_Opcode },
5539cf7f2e2dSJohn Marino { "vfmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
55405796c8dcSSimon Schubert },
55415796c8dcSSimon Schubert
5542c50c785cSJohn Marino /* PREFIX_VEX_0F3A6A */
55435796c8dcSSimon Schubert {
5544cf7f2e2dSJohn Marino { Bad_Opcode },
5545cf7f2e2dSJohn Marino { Bad_Opcode },
5546c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A6A_P_2) },
55475796c8dcSSimon Schubert },
55485796c8dcSSimon Schubert
5549c50c785cSJohn Marino /* PREFIX_VEX_0F3A6B */
55505796c8dcSSimon Schubert {
5551cf7f2e2dSJohn Marino { Bad_Opcode },
5552cf7f2e2dSJohn Marino { Bad_Opcode },
5553c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A6B_P_2) },
55545796c8dcSSimon Schubert },
55555796c8dcSSimon Schubert
5556c50c785cSJohn Marino /* PREFIX_VEX_0F3A6C */
55575796c8dcSSimon Schubert {
5558cf7f2e2dSJohn Marino { Bad_Opcode },
5559cf7f2e2dSJohn Marino { Bad_Opcode },
5560cf7f2e2dSJohn Marino { "vfmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
55615796c8dcSSimon Schubert },
55625796c8dcSSimon Schubert
5563c50c785cSJohn Marino /* PREFIX_VEX_0F3A6D */
55645796c8dcSSimon Schubert {
5565cf7f2e2dSJohn Marino { Bad_Opcode },
5566cf7f2e2dSJohn Marino { Bad_Opcode },
5567cf7f2e2dSJohn Marino { "vfmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
55685796c8dcSSimon Schubert },
55695796c8dcSSimon Schubert
5570c50c785cSJohn Marino /* PREFIX_VEX_0F3A6E */
55715796c8dcSSimon Schubert {
5572cf7f2e2dSJohn Marino { Bad_Opcode },
5573cf7f2e2dSJohn Marino { Bad_Opcode },
5574c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A6E_P_2) },
55755796c8dcSSimon Schubert },
55765796c8dcSSimon Schubert
5577c50c785cSJohn Marino /* PREFIX_VEX_0F3A6F */
55785796c8dcSSimon Schubert {
5579cf7f2e2dSJohn Marino { Bad_Opcode },
5580cf7f2e2dSJohn Marino { Bad_Opcode },
5581c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A6F_P_2) },
55825796c8dcSSimon Schubert },
55835796c8dcSSimon Schubert
5584c50c785cSJohn Marino /* PREFIX_VEX_0F3A78 */
55855796c8dcSSimon Schubert {
5586cf7f2e2dSJohn Marino { Bad_Opcode },
5587cf7f2e2dSJohn Marino { Bad_Opcode },
5588cf7f2e2dSJohn Marino { "vfnmaddps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
55895796c8dcSSimon Schubert },
55905796c8dcSSimon Schubert
5591c50c785cSJohn Marino /* PREFIX_VEX_0F3A79 */
55925796c8dcSSimon Schubert {
5593cf7f2e2dSJohn Marino { Bad_Opcode },
5594cf7f2e2dSJohn Marino { Bad_Opcode },
5595cf7f2e2dSJohn Marino { "vfnmaddpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
55965796c8dcSSimon Schubert },
55975796c8dcSSimon Schubert
5598c50c785cSJohn Marino /* PREFIX_VEX_0F3A7A */
55995796c8dcSSimon Schubert {
5600cf7f2e2dSJohn Marino { Bad_Opcode },
5601cf7f2e2dSJohn Marino { Bad_Opcode },
5602c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A7A_P_2) },
56035796c8dcSSimon Schubert },
56045796c8dcSSimon Schubert
5605c50c785cSJohn Marino /* PREFIX_VEX_0F3A7B */
56065796c8dcSSimon Schubert {
5607cf7f2e2dSJohn Marino { Bad_Opcode },
5608cf7f2e2dSJohn Marino { Bad_Opcode },
5609c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A7B_P_2) },
56105796c8dcSSimon Schubert },
56115796c8dcSSimon Schubert
5612c50c785cSJohn Marino /* PREFIX_VEX_0F3A7C */
56135796c8dcSSimon Schubert {
5614cf7f2e2dSJohn Marino { Bad_Opcode },
5615cf7f2e2dSJohn Marino { Bad_Opcode },
5616cf7f2e2dSJohn Marino { "vfnmsubps", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
5617cf7f2e2dSJohn Marino { Bad_Opcode },
56185796c8dcSSimon Schubert },
56195796c8dcSSimon Schubert
5620c50c785cSJohn Marino /* PREFIX_VEX_0F3A7D */
56215796c8dcSSimon Schubert {
5622cf7f2e2dSJohn Marino { Bad_Opcode },
5623cf7f2e2dSJohn Marino { Bad_Opcode },
5624cf7f2e2dSJohn Marino { "vfnmsubpd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
56255796c8dcSSimon Schubert },
56265796c8dcSSimon Schubert
5627c50c785cSJohn Marino /* PREFIX_VEX_0F3A7E */
56285796c8dcSSimon Schubert {
5629cf7f2e2dSJohn Marino { Bad_Opcode },
5630cf7f2e2dSJohn Marino { Bad_Opcode },
5631c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A7E_P_2) },
56325796c8dcSSimon Schubert },
56335796c8dcSSimon Schubert
5634c50c785cSJohn Marino /* PREFIX_VEX_0F3A7F */
56355796c8dcSSimon Schubert {
5636cf7f2e2dSJohn Marino { Bad_Opcode },
5637cf7f2e2dSJohn Marino { Bad_Opcode },
5638c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3A7F_P_2) },
56395796c8dcSSimon Schubert },
56405796c8dcSSimon Schubert
5641c50c785cSJohn Marino /* PREFIX_VEX_0F3ADF */
56425796c8dcSSimon Schubert {
5643cf7f2e2dSJohn Marino { Bad_Opcode },
5644cf7f2e2dSJohn Marino { Bad_Opcode },
5645c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3ADF_P_2) },
56465796c8dcSSimon Schubert },
5647a45ae5f8SJohn Marino
5648a45ae5f8SJohn Marino /* PREFIX_VEX_0F3AF0 */
5649a45ae5f8SJohn Marino {
5650a45ae5f8SJohn Marino { Bad_Opcode },
5651a45ae5f8SJohn Marino { Bad_Opcode },
5652a45ae5f8SJohn Marino { Bad_Opcode },
5653a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F3AF0_P_3) },
5654a45ae5f8SJohn Marino },
56555796c8dcSSimon Schubert };
56565796c8dcSSimon Schubert
56575796c8dcSSimon Schubert static const struct dis386 x86_64_table[][2] = {
56585796c8dcSSimon Schubert /* X86_64_06 */
56595796c8dcSSimon Schubert {
5660c50c785cSJohn Marino { "pushP", { es } },
56615796c8dcSSimon Schubert },
56625796c8dcSSimon Schubert
56635796c8dcSSimon Schubert /* X86_64_07 */
56645796c8dcSSimon Schubert {
5665c50c785cSJohn Marino { "popP", { es } },
56665796c8dcSSimon Schubert },
56675796c8dcSSimon Schubert
56685796c8dcSSimon Schubert /* X86_64_0D */
56695796c8dcSSimon Schubert {
5670c50c785cSJohn Marino { "pushP", { cs } },
56715796c8dcSSimon Schubert },
56725796c8dcSSimon Schubert
56735796c8dcSSimon Schubert /* X86_64_16 */
56745796c8dcSSimon Schubert {
5675c50c785cSJohn Marino { "pushP", { ss } },
56765796c8dcSSimon Schubert },
56775796c8dcSSimon Schubert
56785796c8dcSSimon Schubert /* X86_64_17 */
56795796c8dcSSimon Schubert {
5680c50c785cSJohn Marino { "popP", { ss } },
56815796c8dcSSimon Schubert },
56825796c8dcSSimon Schubert
56835796c8dcSSimon Schubert /* X86_64_1E */
56845796c8dcSSimon Schubert {
5685c50c785cSJohn Marino { "pushP", { ds } },
56865796c8dcSSimon Schubert },
56875796c8dcSSimon Schubert
56885796c8dcSSimon Schubert /* X86_64_1F */
56895796c8dcSSimon Schubert {
5690c50c785cSJohn Marino { "popP", { ds } },
56915796c8dcSSimon Schubert },
56925796c8dcSSimon Schubert
56935796c8dcSSimon Schubert /* X86_64_27 */
56945796c8dcSSimon Schubert {
56955796c8dcSSimon Schubert { "daa", { XX } },
56965796c8dcSSimon Schubert },
56975796c8dcSSimon Schubert
56985796c8dcSSimon Schubert /* X86_64_2F */
56995796c8dcSSimon Schubert {
57005796c8dcSSimon Schubert { "das", { XX } },
57015796c8dcSSimon Schubert },
57025796c8dcSSimon Schubert
57035796c8dcSSimon Schubert /* X86_64_37 */
57045796c8dcSSimon Schubert {
57055796c8dcSSimon Schubert { "aaa", { XX } },
57065796c8dcSSimon Schubert },
57075796c8dcSSimon Schubert
57085796c8dcSSimon Schubert /* X86_64_3F */
57095796c8dcSSimon Schubert {
57105796c8dcSSimon Schubert { "aas", { XX } },
57115796c8dcSSimon Schubert },
57125796c8dcSSimon Schubert
57135796c8dcSSimon Schubert /* X86_64_60 */
57145796c8dcSSimon Schubert {
5715c50c785cSJohn Marino { "pushaP", { XX } },
57165796c8dcSSimon Schubert },
57175796c8dcSSimon Schubert
57185796c8dcSSimon Schubert /* X86_64_61 */
57195796c8dcSSimon Schubert {
5720c50c785cSJohn Marino { "popaP", { XX } },
57215796c8dcSSimon Schubert },
57225796c8dcSSimon Schubert
57235796c8dcSSimon Schubert /* X86_64_62 */
57245796c8dcSSimon Schubert {
57255796c8dcSSimon Schubert { MOD_TABLE (MOD_62_32BIT) },
57265796c8dcSSimon Schubert },
57275796c8dcSSimon Schubert
57285796c8dcSSimon Schubert /* X86_64_63 */
57295796c8dcSSimon Schubert {
57305796c8dcSSimon Schubert { "arpl", { Ew, Gw } },
57315796c8dcSSimon Schubert { "movs{lq|xd}", { Gv, Ed } },
57325796c8dcSSimon Schubert },
57335796c8dcSSimon Schubert
57345796c8dcSSimon Schubert /* X86_64_6D */
57355796c8dcSSimon Schubert {
57365796c8dcSSimon Schubert { "ins{R|}", { Yzr, indirDX } },
57375796c8dcSSimon Schubert { "ins{G|}", { Yzr, indirDX } },
57385796c8dcSSimon Schubert },
57395796c8dcSSimon Schubert
57405796c8dcSSimon Schubert /* X86_64_6F */
57415796c8dcSSimon Schubert {
57425796c8dcSSimon Schubert { "outs{R|}", { indirDXr, Xz } },
57435796c8dcSSimon Schubert { "outs{G|}", { indirDXr, Xz } },
57445796c8dcSSimon Schubert },
57455796c8dcSSimon Schubert
57465796c8dcSSimon Schubert /* X86_64_9A */
57475796c8dcSSimon Schubert {
57485796c8dcSSimon Schubert { "Jcall{T|}", { Ap } },
57495796c8dcSSimon Schubert },
57505796c8dcSSimon Schubert
57515796c8dcSSimon Schubert /* X86_64_C4 */
57525796c8dcSSimon Schubert {
57535796c8dcSSimon Schubert { MOD_TABLE (MOD_C4_32BIT) },
57545796c8dcSSimon Schubert { VEX_C4_TABLE (VEX_0F) },
57555796c8dcSSimon Schubert },
57565796c8dcSSimon Schubert
57575796c8dcSSimon Schubert /* X86_64_C5 */
57585796c8dcSSimon Schubert {
57595796c8dcSSimon Schubert { MOD_TABLE (MOD_C5_32BIT) },
57605796c8dcSSimon Schubert { VEX_C5_TABLE (VEX_0F) },
57615796c8dcSSimon Schubert },
57625796c8dcSSimon Schubert
57635796c8dcSSimon Schubert /* X86_64_CE */
57645796c8dcSSimon Schubert {
57655796c8dcSSimon Schubert { "into", { XX } },
57665796c8dcSSimon Schubert },
57675796c8dcSSimon Schubert
57685796c8dcSSimon Schubert /* X86_64_D4 */
57695796c8dcSSimon Schubert {
5770c50c785cSJohn Marino { "aam", { Ib } },
57715796c8dcSSimon Schubert },
57725796c8dcSSimon Schubert
57735796c8dcSSimon Schubert /* X86_64_D5 */
57745796c8dcSSimon Schubert {
5775c50c785cSJohn Marino { "aad", { Ib } },
57765796c8dcSSimon Schubert },
57775796c8dcSSimon Schubert
57785796c8dcSSimon Schubert /* X86_64_EA */
57795796c8dcSSimon Schubert {
57805796c8dcSSimon Schubert { "Jjmp{T|}", { Ap } },
57815796c8dcSSimon Schubert },
57825796c8dcSSimon Schubert
57835796c8dcSSimon Schubert /* X86_64_0F01_REG_0 */
57845796c8dcSSimon Schubert {
57855796c8dcSSimon Schubert { "sgdt{Q|IQ}", { M } },
57865796c8dcSSimon Schubert { "sgdt", { M } },
57875796c8dcSSimon Schubert },
57885796c8dcSSimon Schubert
57895796c8dcSSimon Schubert /* X86_64_0F01_REG_1 */
57905796c8dcSSimon Schubert {
57915796c8dcSSimon Schubert { "sidt{Q|IQ}", { M } },
57925796c8dcSSimon Schubert { "sidt", { M } },
57935796c8dcSSimon Schubert },
57945796c8dcSSimon Schubert
57955796c8dcSSimon Schubert /* X86_64_0F01_REG_2 */
57965796c8dcSSimon Schubert {
57975796c8dcSSimon Schubert { "lgdt{Q|Q}", { M } },
57985796c8dcSSimon Schubert { "lgdt", { M } },
57995796c8dcSSimon Schubert },
58005796c8dcSSimon Schubert
58015796c8dcSSimon Schubert /* X86_64_0F01_REG_3 */
58025796c8dcSSimon Schubert {
58035796c8dcSSimon Schubert { "lidt{Q|Q}", { M } },
58045796c8dcSSimon Schubert { "lidt", { M } },
58055796c8dcSSimon Schubert },
58065796c8dcSSimon Schubert };
58075796c8dcSSimon Schubert
58085796c8dcSSimon Schubert static const struct dis386 three_byte_table[][256] = {
58095796c8dcSSimon Schubert
58105796c8dcSSimon Schubert /* THREE_BYTE_0F38 */
58115796c8dcSSimon Schubert {
58125796c8dcSSimon Schubert /* 00 */
58135796c8dcSSimon Schubert { "pshufb", { MX, EM } },
58145796c8dcSSimon Schubert { "phaddw", { MX, EM } },
58155796c8dcSSimon Schubert { "phaddd", { MX, EM } },
58165796c8dcSSimon Schubert { "phaddsw", { MX, EM } },
58175796c8dcSSimon Schubert { "pmaddubsw", { MX, EM } },
58185796c8dcSSimon Schubert { "phsubw", { MX, EM } },
58195796c8dcSSimon Schubert { "phsubd", { MX, EM } },
58205796c8dcSSimon Schubert { "phsubsw", { MX, EM } },
58215796c8dcSSimon Schubert /* 08 */
58225796c8dcSSimon Schubert { "psignb", { MX, EM } },
58235796c8dcSSimon Schubert { "psignw", { MX, EM } },
58245796c8dcSSimon Schubert { "psignd", { MX, EM } },
58255796c8dcSSimon Schubert { "pmulhrsw", { MX, EM } },
5826cf7f2e2dSJohn Marino { Bad_Opcode },
5827cf7f2e2dSJohn Marino { Bad_Opcode },
5828cf7f2e2dSJohn Marino { Bad_Opcode },
5829cf7f2e2dSJohn Marino { Bad_Opcode },
58305796c8dcSSimon Schubert /* 10 */
58315796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3810) },
5832cf7f2e2dSJohn Marino { Bad_Opcode },
5833cf7f2e2dSJohn Marino { Bad_Opcode },
5834cf7f2e2dSJohn Marino { Bad_Opcode },
58355796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3814) },
58365796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3815) },
5837cf7f2e2dSJohn Marino { Bad_Opcode },
58385796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3817) },
58395796c8dcSSimon Schubert /* 18 */
5840cf7f2e2dSJohn Marino { Bad_Opcode },
5841cf7f2e2dSJohn Marino { Bad_Opcode },
5842cf7f2e2dSJohn Marino { Bad_Opcode },
5843cf7f2e2dSJohn Marino { Bad_Opcode },
58445796c8dcSSimon Schubert { "pabsb", { MX, EM } },
58455796c8dcSSimon Schubert { "pabsw", { MX, EM } },
58465796c8dcSSimon Schubert { "pabsd", { MX, EM } },
5847cf7f2e2dSJohn Marino { Bad_Opcode },
58485796c8dcSSimon Schubert /* 20 */
58495796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3820) },
58505796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3821) },
58515796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3822) },
58525796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3823) },
58535796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3824) },
58545796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3825) },
5855cf7f2e2dSJohn Marino { Bad_Opcode },
5856cf7f2e2dSJohn Marino { Bad_Opcode },
58575796c8dcSSimon Schubert /* 28 */
58585796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3828) },
58595796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3829) },
58605796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F382A) },
58615796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F382B) },
5862cf7f2e2dSJohn Marino { Bad_Opcode },
5863cf7f2e2dSJohn Marino { Bad_Opcode },
5864cf7f2e2dSJohn Marino { Bad_Opcode },
5865cf7f2e2dSJohn Marino { Bad_Opcode },
58665796c8dcSSimon Schubert /* 30 */
58675796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3830) },
58685796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3831) },
58695796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3832) },
58705796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3833) },
58715796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3834) },
58725796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3835) },
5873cf7f2e2dSJohn Marino { Bad_Opcode },
58745796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3837) },
58755796c8dcSSimon Schubert /* 38 */
58765796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3838) },
58775796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3839) },
58785796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F383A) },
58795796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F383B) },
58805796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F383C) },
58815796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F383D) },
58825796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F383E) },
58835796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F383F) },
58845796c8dcSSimon Schubert /* 40 */
58855796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3840) },
58865796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3841) },
5887cf7f2e2dSJohn Marino { Bad_Opcode },
5888cf7f2e2dSJohn Marino { Bad_Opcode },
5889cf7f2e2dSJohn Marino { Bad_Opcode },
5890cf7f2e2dSJohn Marino { Bad_Opcode },
5891cf7f2e2dSJohn Marino { Bad_Opcode },
5892cf7f2e2dSJohn Marino { Bad_Opcode },
58935796c8dcSSimon Schubert /* 48 */
5894cf7f2e2dSJohn Marino { Bad_Opcode },
5895cf7f2e2dSJohn Marino { Bad_Opcode },
5896cf7f2e2dSJohn Marino { Bad_Opcode },
5897cf7f2e2dSJohn Marino { Bad_Opcode },
5898cf7f2e2dSJohn Marino { Bad_Opcode },
5899cf7f2e2dSJohn Marino { Bad_Opcode },
5900cf7f2e2dSJohn Marino { Bad_Opcode },
5901cf7f2e2dSJohn Marino { Bad_Opcode },
59025796c8dcSSimon Schubert /* 50 */
5903cf7f2e2dSJohn Marino { Bad_Opcode },
5904cf7f2e2dSJohn Marino { Bad_Opcode },
5905cf7f2e2dSJohn Marino { Bad_Opcode },
5906cf7f2e2dSJohn Marino { Bad_Opcode },
5907cf7f2e2dSJohn Marino { Bad_Opcode },
5908cf7f2e2dSJohn Marino { Bad_Opcode },
5909cf7f2e2dSJohn Marino { Bad_Opcode },
5910cf7f2e2dSJohn Marino { Bad_Opcode },
59115796c8dcSSimon Schubert /* 58 */
5912cf7f2e2dSJohn Marino { Bad_Opcode },
5913cf7f2e2dSJohn Marino { Bad_Opcode },
5914cf7f2e2dSJohn Marino { Bad_Opcode },
5915cf7f2e2dSJohn Marino { Bad_Opcode },
5916cf7f2e2dSJohn Marino { Bad_Opcode },
5917cf7f2e2dSJohn Marino { Bad_Opcode },
5918cf7f2e2dSJohn Marino { Bad_Opcode },
5919cf7f2e2dSJohn Marino { Bad_Opcode },
59205796c8dcSSimon Schubert /* 60 */
5921cf7f2e2dSJohn Marino { Bad_Opcode },
5922cf7f2e2dSJohn Marino { Bad_Opcode },
5923cf7f2e2dSJohn Marino { Bad_Opcode },
5924cf7f2e2dSJohn Marino { Bad_Opcode },
5925cf7f2e2dSJohn Marino { Bad_Opcode },
5926cf7f2e2dSJohn Marino { Bad_Opcode },
5927cf7f2e2dSJohn Marino { Bad_Opcode },
5928cf7f2e2dSJohn Marino { Bad_Opcode },
59295796c8dcSSimon Schubert /* 68 */
5930cf7f2e2dSJohn Marino { Bad_Opcode },
5931cf7f2e2dSJohn Marino { Bad_Opcode },
5932cf7f2e2dSJohn Marino { Bad_Opcode },
5933cf7f2e2dSJohn Marino { Bad_Opcode },
5934cf7f2e2dSJohn Marino { Bad_Opcode },
5935cf7f2e2dSJohn Marino { Bad_Opcode },
5936cf7f2e2dSJohn Marino { Bad_Opcode },
5937cf7f2e2dSJohn Marino { Bad_Opcode },
59385796c8dcSSimon Schubert /* 70 */
5939cf7f2e2dSJohn Marino { Bad_Opcode },
5940cf7f2e2dSJohn Marino { Bad_Opcode },
5941cf7f2e2dSJohn Marino { Bad_Opcode },
5942cf7f2e2dSJohn Marino { Bad_Opcode },
5943cf7f2e2dSJohn Marino { Bad_Opcode },
5944cf7f2e2dSJohn Marino { Bad_Opcode },
5945cf7f2e2dSJohn Marino { Bad_Opcode },
5946cf7f2e2dSJohn Marino { Bad_Opcode },
59475796c8dcSSimon Schubert /* 78 */
5948cf7f2e2dSJohn Marino { Bad_Opcode },
5949cf7f2e2dSJohn Marino { Bad_Opcode },
5950cf7f2e2dSJohn Marino { Bad_Opcode },
5951cf7f2e2dSJohn Marino { Bad_Opcode },
5952cf7f2e2dSJohn Marino { Bad_Opcode },
5953cf7f2e2dSJohn Marino { Bad_Opcode },
5954cf7f2e2dSJohn Marino { Bad_Opcode },
5955cf7f2e2dSJohn Marino { Bad_Opcode },
59565796c8dcSSimon Schubert /* 80 */
59575796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3880) },
59585796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3881) },
5959a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_0F3882) },
5960cf7f2e2dSJohn Marino { Bad_Opcode },
5961cf7f2e2dSJohn Marino { Bad_Opcode },
5962cf7f2e2dSJohn Marino { Bad_Opcode },
5963cf7f2e2dSJohn Marino { Bad_Opcode },
5964cf7f2e2dSJohn Marino { Bad_Opcode },
59655796c8dcSSimon Schubert /* 88 */
5966cf7f2e2dSJohn Marino { Bad_Opcode },
5967cf7f2e2dSJohn Marino { Bad_Opcode },
5968cf7f2e2dSJohn Marino { Bad_Opcode },
5969cf7f2e2dSJohn Marino { Bad_Opcode },
5970cf7f2e2dSJohn Marino { Bad_Opcode },
5971cf7f2e2dSJohn Marino { Bad_Opcode },
5972cf7f2e2dSJohn Marino { Bad_Opcode },
5973cf7f2e2dSJohn Marino { Bad_Opcode },
59745796c8dcSSimon Schubert /* 90 */
5975cf7f2e2dSJohn Marino { Bad_Opcode },
5976cf7f2e2dSJohn Marino { Bad_Opcode },
5977cf7f2e2dSJohn Marino { Bad_Opcode },
5978cf7f2e2dSJohn Marino { Bad_Opcode },
5979cf7f2e2dSJohn Marino { Bad_Opcode },
5980cf7f2e2dSJohn Marino { Bad_Opcode },
5981cf7f2e2dSJohn Marino { Bad_Opcode },
5982cf7f2e2dSJohn Marino { Bad_Opcode },
59835796c8dcSSimon Schubert /* 98 */
5984cf7f2e2dSJohn Marino { Bad_Opcode },
5985cf7f2e2dSJohn Marino { Bad_Opcode },
5986cf7f2e2dSJohn Marino { Bad_Opcode },
5987cf7f2e2dSJohn Marino { Bad_Opcode },
5988cf7f2e2dSJohn Marino { Bad_Opcode },
5989cf7f2e2dSJohn Marino { Bad_Opcode },
5990cf7f2e2dSJohn Marino { Bad_Opcode },
5991cf7f2e2dSJohn Marino { Bad_Opcode },
59925796c8dcSSimon Schubert /* a0 */
5993cf7f2e2dSJohn Marino { Bad_Opcode },
5994cf7f2e2dSJohn Marino { Bad_Opcode },
5995cf7f2e2dSJohn Marino { Bad_Opcode },
5996cf7f2e2dSJohn Marino { Bad_Opcode },
5997cf7f2e2dSJohn Marino { Bad_Opcode },
5998cf7f2e2dSJohn Marino { Bad_Opcode },
5999cf7f2e2dSJohn Marino { Bad_Opcode },
6000cf7f2e2dSJohn Marino { Bad_Opcode },
60015796c8dcSSimon Schubert /* a8 */
6002cf7f2e2dSJohn Marino { Bad_Opcode },
6003cf7f2e2dSJohn Marino { Bad_Opcode },
6004cf7f2e2dSJohn Marino { Bad_Opcode },
6005cf7f2e2dSJohn Marino { Bad_Opcode },
6006cf7f2e2dSJohn Marino { Bad_Opcode },
6007cf7f2e2dSJohn Marino { Bad_Opcode },
6008cf7f2e2dSJohn Marino { Bad_Opcode },
6009cf7f2e2dSJohn Marino { Bad_Opcode },
60105796c8dcSSimon Schubert /* b0 */
6011cf7f2e2dSJohn Marino { Bad_Opcode },
6012cf7f2e2dSJohn Marino { Bad_Opcode },
6013cf7f2e2dSJohn Marino { Bad_Opcode },
6014cf7f2e2dSJohn Marino { Bad_Opcode },
6015cf7f2e2dSJohn Marino { Bad_Opcode },
6016cf7f2e2dSJohn Marino { Bad_Opcode },
6017cf7f2e2dSJohn Marino { Bad_Opcode },
6018cf7f2e2dSJohn Marino { Bad_Opcode },
60195796c8dcSSimon Schubert /* b8 */
6020cf7f2e2dSJohn Marino { Bad_Opcode },
6021cf7f2e2dSJohn Marino { Bad_Opcode },
6022cf7f2e2dSJohn Marino { Bad_Opcode },
6023cf7f2e2dSJohn Marino { Bad_Opcode },
6024cf7f2e2dSJohn Marino { Bad_Opcode },
6025cf7f2e2dSJohn Marino { Bad_Opcode },
6026cf7f2e2dSJohn Marino { Bad_Opcode },
6027cf7f2e2dSJohn Marino { Bad_Opcode },
60285796c8dcSSimon Schubert /* c0 */
6029cf7f2e2dSJohn Marino { Bad_Opcode },
6030cf7f2e2dSJohn Marino { Bad_Opcode },
6031cf7f2e2dSJohn Marino { Bad_Opcode },
6032cf7f2e2dSJohn Marino { Bad_Opcode },
6033cf7f2e2dSJohn Marino { Bad_Opcode },
6034cf7f2e2dSJohn Marino { Bad_Opcode },
6035cf7f2e2dSJohn Marino { Bad_Opcode },
6036cf7f2e2dSJohn Marino { Bad_Opcode },
60375796c8dcSSimon Schubert /* c8 */
6038cf7f2e2dSJohn Marino { Bad_Opcode },
6039cf7f2e2dSJohn Marino { Bad_Opcode },
6040cf7f2e2dSJohn Marino { Bad_Opcode },
6041cf7f2e2dSJohn Marino { Bad_Opcode },
6042cf7f2e2dSJohn Marino { Bad_Opcode },
6043cf7f2e2dSJohn Marino { Bad_Opcode },
6044cf7f2e2dSJohn Marino { Bad_Opcode },
6045cf7f2e2dSJohn Marino { Bad_Opcode },
60465796c8dcSSimon Schubert /* d0 */
6047cf7f2e2dSJohn Marino { Bad_Opcode },
6048cf7f2e2dSJohn Marino { Bad_Opcode },
6049cf7f2e2dSJohn Marino { Bad_Opcode },
6050cf7f2e2dSJohn Marino { Bad_Opcode },
6051cf7f2e2dSJohn Marino { Bad_Opcode },
6052cf7f2e2dSJohn Marino { Bad_Opcode },
6053cf7f2e2dSJohn Marino { Bad_Opcode },
6054cf7f2e2dSJohn Marino { Bad_Opcode },
60555796c8dcSSimon Schubert /* d8 */
6056cf7f2e2dSJohn Marino { Bad_Opcode },
6057cf7f2e2dSJohn Marino { Bad_Opcode },
6058cf7f2e2dSJohn Marino { Bad_Opcode },
60595796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F38DB) },
60605796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F38DC) },
60615796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F38DD) },
60625796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F38DE) },
60635796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F38DF) },
60645796c8dcSSimon Schubert /* e0 */
6065cf7f2e2dSJohn Marino { Bad_Opcode },
6066cf7f2e2dSJohn Marino { Bad_Opcode },
6067cf7f2e2dSJohn Marino { Bad_Opcode },
6068cf7f2e2dSJohn Marino { Bad_Opcode },
6069cf7f2e2dSJohn Marino { Bad_Opcode },
6070cf7f2e2dSJohn Marino { Bad_Opcode },
6071cf7f2e2dSJohn Marino { Bad_Opcode },
6072cf7f2e2dSJohn Marino { Bad_Opcode },
60735796c8dcSSimon Schubert /* e8 */
6074cf7f2e2dSJohn Marino { Bad_Opcode },
6075cf7f2e2dSJohn Marino { Bad_Opcode },
6076cf7f2e2dSJohn Marino { Bad_Opcode },
6077cf7f2e2dSJohn Marino { Bad_Opcode },
6078cf7f2e2dSJohn Marino { Bad_Opcode },
6079cf7f2e2dSJohn Marino { Bad_Opcode },
6080cf7f2e2dSJohn Marino { Bad_Opcode },
6081cf7f2e2dSJohn Marino { Bad_Opcode },
60825796c8dcSSimon Schubert /* f0 */
60835796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F38F0) },
60845796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F38F1) },
6085cf7f2e2dSJohn Marino { Bad_Opcode },
6086cf7f2e2dSJohn Marino { Bad_Opcode },
6087cf7f2e2dSJohn Marino { Bad_Opcode },
6088cf7f2e2dSJohn Marino { Bad_Opcode },
6089*ef5ccd6cSJohn Marino { PREFIX_TABLE (PREFIX_0F38F6) },
6090cf7f2e2dSJohn Marino { Bad_Opcode },
60915796c8dcSSimon Schubert /* f8 */
6092cf7f2e2dSJohn Marino { Bad_Opcode },
6093cf7f2e2dSJohn Marino { Bad_Opcode },
6094cf7f2e2dSJohn Marino { Bad_Opcode },
6095cf7f2e2dSJohn Marino { Bad_Opcode },
6096cf7f2e2dSJohn Marino { Bad_Opcode },
6097cf7f2e2dSJohn Marino { Bad_Opcode },
6098cf7f2e2dSJohn Marino { Bad_Opcode },
6099cf7f2e2dSJohn Marino { Bad_Opcode },
61005796c8dcSSimon Schubert },
61015796c8dcSSimon Schubert /* THREE_BYTE_0F3A */
61025796c8dcSSimon Schubert {
61035796c8dcSSimon Schubert /* 00 */
6104cf7f2e2dSJohn Marino { Bad_Opcode },
6105cf7f2e2dSJohn Marino { Bad_Opcode },
6106cf7f2e2dSJohn Marino { Bad_Opcode },
6107cf7f2e2dSJohn Marino { Bad_Opcode },
6108cf7f2e2dSJohn Marino { Bad_Opcode },
6109cf7f2e2dSJohn Marino { Bad_Opcode },
6110cf7f2e2dSJohn Marino { Bad_Opcode },
6111cf7f2e2dSJohn Marino { Bad_Opcode },
61125796c8dcSSimon Schubert /* 08 */
61135796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A08) },
61145796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A09) },
61155796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A0A) },
61165796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A0B) },
61175796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A0C) },
61185796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A0D) },
61195796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A0E) },
61205796c8dcSSimon Schubert { "palignr", { MX, EM, Ib } },
61215796c8dcSSimon Schubert /* 10 */
6122cf7f2e2dSJohn Marino { Bad_Opcode },
6123cf7f2e2dSJohn Marino { Bad_Opcode },
6124cf7f2e2dSJohn Marino { Bad_Opcode },
6125cf7f2e2dSJohn Marino { Bad_Opcode },
61265796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A14) },
61275796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A15) },
61285796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A16) },
61295796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A17) },
61305796c8dcSSimon Schubert /* 18 */
6131cf7f2e2dSJohn Marino { Bad_Opcode },
6132cf7f2e2dSJohn Marino { Bad_Opcode },
6133cf7f2e2dSJohn Marino { Bad_Opcode },
6134cf7f2e2dSJohn Marino { Bad_Opcode },
6135cf7f2e2dSJohn Marino { Bad_Opcode },
6136cf7f2e2dSJohn Marino { Bad_Opcode },
6137cf7f2e2dSJohn Marino { Bad_Opcode },
6138cf7f2e2dSJohn Marino { Bad_Opcode },
61395796c8dcSSimon Schubert /* 20 */
61405796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A20) },
61415796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A21) },
61425796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A22) },
6143cf7f2e2dSJohn Marino { Bad_Opcode },
6144cf7f2e2dSJohn Marino { Bad_Opcode },
6145cf7f2e2dSJohn Marino { Bad_Opcode },
6146cf7f2e2dSJohn Marino { Bad_Opcode },
6147cf7f2e2dSJohn Marino { Bad_Opcode },
61485796c8dcSSimon Schubert /* 28 */
6149cf7f2e2dSJohn Marino { Bad_Opcode },
6150cf7f2e2dSJohn Marino { Bad_Opcode },
6151cf7f2e2dSJohn Marino { Bad_Opcode },
6152cf7f2e2dSJohn Marino { Bad_Opcode },
6153cf7f2e2dSJohn Marino { Bad_Opcode },
6154cf7f2e2dSJohn Marino { Bad_Opcode },
6155cf7f2e2dSJohn Marino { Bad_Opcode },
6156cf7f2e2dSJohn Marino { Bad_Opcode },
61575796c8dcSSimon Schubert /* 30 */
6158cf7f2e2dSJohn Marino { Bad_Opcode },
6159cf7f2e2dSJohn Marino { Bad_Opcode },
6160cf7f2e2dSJohn Marino { Bad_Opcode },
6161cf7f2e2dSJohn Marino { Bad_Opcode },
6162cf7f2e2dSJohn Marino { Bad_Opcode },
6163cf7f2e2dSJohn Marino { Bad_Opcode },
6164cf7f2e2dSJohn Marino { Bad_Opcode },
6165cf7f2e2dSJohn Marino { Bad_Opcode },
61665796c8dcSSimon Schubert /* 38 */
6167cf7f2e2dSJohn Marino { Bad_Opcode },
6168cf7f2e2dSJohn Marino { Bad_Opcode },
6169cf7f2e2dSJohn Marino { Bad_Opcode },
6170cf7f2e2dSJohn Marino { Bad_Opcode },
6171cf7f2e2dSJohn Marino { Bad_Opcode },
6172cf7f2e2dSJohn Marino { Bad_Opcode },
6173cf7f2e2dSJohn Marino { Bad_Opcode },
6174cf7f2e2dSJohn Marino { Bad_Opcode },
61755796c8dcSSimon Schubert /* 40 */
61765796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A40) },
61775796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A41) },
61785796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A42) },
6179cf7f2e2dSJohn Marino { Bad_Opcode },
61805796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A44) },
6181cf7f2e2dSJohn Marino { Bad_Opcode },
6182cf7f2e2dSJohn Marino { Bad_Opcode },
6183cf7f2e2dSJohn Marino { Bad_Opcode },
61845796c8dcSSimon Schubert /* 48 */
6185cf7f2e2dSJohn Marino { Bad_Opcode },
6186cf7f2e2dSJohn Marino { Bad_Opcode },
6187cf7f2e2dSJohn Marino { Bad_Opcode },
6188cf7f2e2dSJohn Marino { Bad_Opcode },
6189cf7f2e2dSJohn Marino { Bad_Opcode },
6190cf7f2e2dSJohn Marino { Bad_Opcode },
6191cf7f2e2dSJohn Marino { Bad_Opcode },
6192cf7f2e2dSJohn Marino { Bad_Opcode },
61935796c8dcSSimon Schubert /* 50 */
6194cf7f2e2dSJohn Marino { Bad_Opcode },
6195cf7f2e2dSJohn Marino { Bad_Opcode },
6196cf7f2e2dSJohn Marino { Bad_Opcode },
6197cf7f2e2dSJohn Marino { Bad_Opcode },
6198cf7f2e2dSJohn Marino { Bad_Opcode },
6199cf7f2e2dSJohn Marino { Bad_Opcode },
6200cf7f2e2dSJohn Marino { Bad_Opcode },
6201cf7f2e2dSJohn Marino { Bad_Opcode },
62025796c8dcSSimon Schubert /* 58 */
6203cf7f2e2dSJohn Marino { Bad_Opcode },
6204cf7f2e2dSJohn Marino { Bad_Opcode },
6205cf7f2e2dSJohn Marino { Bad_Opcode },
6206cf7f2e2dSJohn Marino { Bad_Opcode },
6207cf7f2e2dSJohn Marino { Bad_Opcode },
6208cf7f2e2dSJohn Marino { Bad_Opcode },
6209cf7f2e2dSJohn Marino { Bad_Opcode },
6210cf7f2e2dSJohn Marino { Bad_Opcode },
62115796c8dcSSimon Schubert /* 60 */
62125796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A60) },
62135796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A61) },
62145796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A62) },
62155796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3A63) },
6216cf7f2e2dSJohn Marino { Bad_Opcode },
6217cf7f2e2dSJohn Marino { Bad_Opcode },
6218cf7f2e2dSJohn Marino { Bad_Opcode },
6219cf7f2e2dSJohn Marino { Bad_Opcode },
62205796c8dcSSimon Schubert /* 68 */
6221cf7f2e2dSJohn Marino { Bad_Opcode },
6222cf7f2e2dSJohn Marino { Bad_Opcode },
6223cf7f2e2dSJohn Marino { Bad_Opcode },
6224cf7f2e2dSJohn Marino { Bad_Opcode },
6225cf7f2e2dSJohn Marino { Bad_Opcode },
6226cf7f2e2dSJohn Marino { Bad_Opcode },
6227cf7f2e2dSJohn Marino { Bad_Opcode },
6228cf7f2e2dSJohn Marino { Bad_Opcode },
62295796c8dcSSimon Schubert /* 70 */
6230cf7f2e2dSJohn Marino { Bad_Opcode },
6231cf7f2e2dSJohn Marino { Bad_Opcode },
6232cf7f2e2dSJohn Marino { Bad_Opcode },
6233cf7f2e2dSJohn Marino { Bad_Opcode },
6234cf7f2e2dSJohn Marino { Bad_Opcode },
6235cf7f2e2dSJohn Marino { Bad_Opcode },
6236cf7f2e2dSJohn Marino { Bad_Opcode },
6237cf7f2e2dSJohn Marino { Bad_Opcode },
62385796c8dcSSimon Schubert /* 78 */
6239cf7f2e2dSJohn Marino { Bad_Opcode },
6240cf7f2e2dSJohn Marino { Bad_Opcode },
6241cf7f2e2dSJohn Marino { Bad_Opcode },
6242cf7f2e2dSJohn Marino { Bad_Opcode },
6243cf7f2e2dSJohn Marino { Bad_Opcode },
6244cf7f2e2dSJohn Marino { Bad_Opcode },
6245cf7f2e2dSJohn Marino { Bad_Opcode },
6246cf7f2e2dSJohn Marino { Bad_Opcode },
62475796c8dcSSimon Schubert /* 80 */
6248cf7f2e2dSJohn Marino { Bad_Opcode },
6249cf7f2e2dSJohn Marino { Bad_Opcode },
6250cf7f2e2dSJohn Marino { Bad_Opcode },
6251cf7f2e2dSJohn Marino { Bad_Opcode },
6252cf7f2e2dSJohn Marino { Bad_Opcode },
6253cf7f2e2dSJohn Marino { Bad_Opcode },
6254cf7f2e2dSJohn Marino { Bad_Opcode },
6255cf7f2e2dSJohn Marino { Bad_Opcode },
62565796c8dcSSimon Schubert /* 88 */
6257cf7f2e2dSJohn Marino { Bad_Opcode },
6258cf7f2e2dSJohn Marino { Bad_Opcode },
6259cf7f2e2dSJohn Marino { Bad_Opcode },
6260cf7f2e2dSJohn Marino { Bad_Opcode },
6261cf7f2e2dSJohn Marino { Bad_Opcode },
6262cf7f2e2dSJohn Marino { Bad_Opcode },
6263cf7f2e2dSJohn Marino { Bad_Opcode },
6264cf7f2e2dSJohn Marino { Bad_Opcode },
62655796c8dcSSimon Schubert /* 90 */
6266cf7f2e2dSJohn Marino { Bad_Opcode },
6267cf7f2e2dSJohn Marino { Bad_Opcode },
6268cf7f2e2dSJohn Marino { Bad_Opcode },
6269cf7f2e2dSJohn Marino { Bad_Opcode },
6270cf7f2e2dSJohn Marino { Bad_Opcode },
6271cf7f2e2dSJohn Marino { Bad_Opcode },
6272cf7f2e2dSJohn Marino { Bad_Opcode },
6273cf7f2e2dSJohn Marino { Bad_Opcode },
62745796c8dcSSimon Schubert /* 98 */
6275cf7f2e2dSJohn Marino { Bad_Opcode },
6276cf7f2e2dSJohn Marino { Bad_Opcode },
6277cf7f2e2dSJohn Marino { Bad_Opcode },
6278cf7f2e2dSJohn Marino { Bad_Opcode },
6279cf7f2e2dSJohn Marino { Bad_Opcode },
6280cf7f2e2dSJohn Marino { Bad_Opcode },
6281cf7f2e2dSJohn Marino { Bad_Opcode },
6282cf7f2e2dSJohn Marino { Bad_Opcode },
62835796c8dcSSimon Schubert /* a0 */
6284cf7f2e2dSJohn Marino { Bad_Opcode },
6285cf7f2e2dSJohn Marino { Bad_Opcode },
6286cf7f2e2dSJohn Marino { Bad_Opcode },
6287cf7f2e2dSJohn Marino { Bad_Opcode },
6288cf7f2e2dSJohn Marino { Bad_Opcode },
6289cf7f2e2dSJohn Marino { Bad_Opcode },
6290cf7f2e2dSJohn Marino { Bad_Opcode },
6291cf7f2e2dSJohn Marino { Bad_Opcode },
62925796c8dcSSimon Schubert /* a8 */
6293cf7f2e2dSJohn Marino { Bad_Opcode },
6294cf7f2e2dSJohn Marino { Bad_Opcode },
6295cf7f2e2dSJohn Marino { Bad_Opcode },
6296cf7f2e2dSJohn Marino { Bad_Opcode },
6297cf7f2e2dSJohn Marino { Bad_Opcode },
6298cf7f2e2dSJohn Marino { Bad_Opcode },
6299cf7f2e2dSJohn Marino { Bad_Opcode },
6300cf7f2e2dSJohn Marino { Bad_Opcode },
63015796c8dcSSimon Schubert /* b0 */
6302cf7f2e2dSJohn Marino { Bad_Opcode },
6303cf7f2e2dSJohn Marino { Bad_Opcode },
6304cf7f2e2dSJohn Marino { Bad_Opcode },
6305cf7f2e2dSJohn Marino { Bad_Opcode },
6306cf7f2e2dSJohn Marino { Bad_Opcode },
6307cf7f2e2dSJohn Marino { Bad_Opcode },
6308cf7f2e2dSJohn Marino { Bad_Opcode },
6309cf7f2e2dSJohn Marino { Bad_Opcode },
63105796c8dcSSimon Schubert /* b8 */
6311cf7f2e2dSJohn Marino { Bad_Opcode },
6312cf7f2e2dSJohn Marino { Bad_Opcode },
6313cf7f2e2dSJohn Marino { Bad_Opcode },
6314cf7f2e2dSJohn Marino { Bad_Opcode },
6315cf7f2e2dSJohn Marino { Bad_Opcode },
6316cf7f2e2dSJohn Marino { Bad_Opcode },
6317cf7f2e2dSJohn Marino { Bad_Opcode },
6318cf7f2e2dSJohn Marino { Bad_Opcode },
63195796c8dcSSimon Schubert /* c0 */
6320cf7f2e2dSJohn Marino { Bad_Opcode },
6321cf7f2e2dSJohn Marino { Bad_Opcode },
6322cf7f2e2dSJohn Marino { Bad_Opcode },
6323cf7f2e2dSJohn Marino { Bad_Opcode },
6324cf7f2e2dSJohn Marino { Bad_Opcode },
6325cf7f2e2dSJohn Marino { Bad_Opcode },
6326cf7f2e2dSJohn Marino { Bad_Opcode },
6327cf7f2e2dSJohn Marino { Bad_Opcode },
63285796c8dcSSimon Schubert /* c8 */
6329cf7f2e2dSJohn Marino { Bad_Opcode },
6330cf7f2e2dSJohn Marino { Bad_Opcode },
6331cf7f2e2dSJohn Marino { Bad_Opcode },
6332cf7f2e2dSJohn Marino { Bad_Opcode },
6333cf7f2e2dSJohn Marino { Bad_Opcode },
6334cf7f2e2dSJohn Marino { Bad_Opcode },
6335cf7f2e2dSJohn Marino { Bad_Opcode },
6336cf7f2e2dSJohn Marino { Bad_Opcode },
63375796c8dcSSimon Schubert /* d0 */
6338cf7f2e2dSJohn Marino { Bad_Opcode },
6339cf7f2e2dSJohn Marino { Bad_Opcode },
6340cf7f2e2dSJohn Marino { Bad_Opcode },
6341cf7f2e2dSJohn Marino { Bad_Opcode },
6342cf7f2e2dSJohn Marino { Bad_Opcode },
6343cf7f2e2dSJohn Marino { Bad_Opcode },
6344cf7f2e2dSJohn Marino { Bad_Opcode },
6345cf7f2e2dSJohn Marino { Bad_Opcode },
63465796c8dcSSimon Schubert /* d8 */
6347cf7f2e2dSJohn Marino { Bad_Opcode },
6348cf7f2e2dSJohn Marino { Bad_Opcode },
6349cf7f2e2dSJohn Marino { Bad_Opcode },
6350cf7f2e2dSJohn Marino { Bad_Opcode },
6351cf7f2e2dSJohn Marino { Bad_Opcode },
6352cf7f2e2dSJohn Marino { Bad_Opcode },
6353cf7f2e2dSJohn Marino { Bad_Opcode },
63545796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F3ADF) },
63555796c8dcSSimon Schubert /* e0 */
6356cf7f2e2dSJohn Marino { Bad_Opcode },
6357cf7f2e2dSJohn Marino { Bad_Opcode },
6358cf7f2e2dSJohn Marino { Bad_Opcode },
6359cf7f2e2dSJohn Marino { Bad_Opcode },
6360cf7f2e2dSJohn Marino { Bad_Opcode },
6361cf7f2e2dSJohn Marino { Bad_Opcode },
6362cf7f2e2dSJohn Marino { Bad_Opcode },
6363cf7f2e2dSJohn Marino { Bad_Opcode },
63645796c8dcSSimon Schubert /* e8 */
6365cf7f2e2dSJohn Marino { Bad_Opcode },
6366cf7f2e2dSJohn Marino { Bad_Opcode },
6367cf7f2e2dSJohn Marino { Bad_Opcode },
6368cf7f2e2dSJohn Marino { Bad_Opcode },
6369cf7f2e2dSJohn Marino { Bad_Opcode },
6370cf7f2e2dSJohn Marino { Bad_Opcode },
6371cf7f2e2dSJohn Marino { Bad_Opcode },
6372cf7f2e2dSJohn Marino { Bad_Opcode },
63735796c8dcSSimon Schubert /* f0 */
6374cf7f2e2dSJohn Marino { Bad_Opcode },
6375cf7f2e2dSJohn Marino { Bad_Opcode },
6376cf7f2e2dSJohn Marino { Bad_Opcode },
6377cf7f2e2dSJohn Marino { Bad_Opcode },
6378cf7f2e2dSJohn Marino { Bad_Opcode },
6379cf7f2e2dSJohn Marino { Bad_Opcode },
6380cf7f2e2dSJohn Marino { Bad_Opcode },
6381cf7f2e2dSJohn Marino { Bad_Opcode },
63825796c8dcSSimon Schubert /* f8 */
6383cf7f2e2dSJohn Marino { Bad_Opcode },
6384cf7f2e2dSJohn Marino { Bad_Opcode },
6385cf7f2e2dSJohn Marino { Bad_Opcode },
6386cf7f2e2dSJohn Marino { Bad_Opcode },
6387cf7f2e2dSJohn Marino { Bad_Opcode },
6388cf7f2e2dSJohn Marino { Bad_Opcode },
6389cf7f2e2dSJohn Marino { Bad_Opcode },
6390cf7f2e2dSJohn Marino { Bad_Opcode },
63915796c8dcSSimon Schubert },
63925796c8dcSSimon Schubert
63935796c8dcSSimon Schubert /* THREE_BYTE_0F7A */
63945796c8dcSSimon Schubert {
63955796c8dcSSimon Schubert /* 00 */
6396cf7f2e2dSJohn Marino { Bad_Opcode },
6397cf7f2e2dSJohn Marino { Bad_Opcode },
6398cf7f2e2dSJohn Marino { Bad_Opcode },
6399cf7f2e2dSJohn Marino { Bad_Opcode },
6400cf7f2e2dSJohn Marino { Bad_Opcode },
6401cf7f2e2dSJohn Marino { Bad_Opcode },
6402cf7f2e2dSJohn Marino { Bad_Opcode },
6403cf7f2e2dSJohn Marino { Bad_Opcode },
64045796c8dcSSimon Schubert /* 08 */
6405cf7f2e2dSJohn Marino { Bad_Opcode },
6406cf7f2e2dSJohn Marino { Bad_Opcode },
6407cf7f2e2dSJohn Marino { Bad_Opcode },
6408cf7f2e2dSJohn Marino { Bad_Opcode },
6409cf7f2e2dSJohn Marino { Bad_Opcode },
6410cf7f2e2dSJohn Marino { Bad_Opcode },
6411cf7f2e2dSJohn Marino { Bad_Opcode },
6412cf7f2e2dSJohn Marino { Bad_Opcode },
64135796c8dcSSimon Schubert /* 10 */
6414cf7f2e2dSJohn Marino { Bad_Opcode },
6415cf7f2e2dSJohn Marino { Bad_Opcode },
6416cf7f2e2dSJohn Marino { Bad_Opcode },
6417cf7f2e2dSJohn Marino { Bad_Opcode },
6418cf7f2e2dSJohn Marino { Bad_Opcode },
6419cf7f2e2dSJohn Marino { Bad_Opcode },
6420cf7f2e2dSJohn Marino { Bad_Opcode },
6421cf7f2e2dSJohn Marino { Bad_Opcode },
64225796c8dcSSimon Schubert /* 18 */
6423cf7f2e2dSJohn Marino { Bad_Opcode },
6424cf7f2e2dSJohn Marino { Bad_Opcode },
6425cf7f2e2dSJohn Marino { Bad_Opcode },
6426cf7f2e2dSJohn Marino { Bad_Opcode },
6427cf7f2e2dSJohn Marino { Bad_Opcode },
6428cf7f2e2dSJohn Marino { Bad_Opcode },
6429cf7f2e2dSJohn Marino { Bad_Opcode },
6430cf7f2e2dSJohn Marino { Bad_Opcode },
64315796c8dcSSimon Schubert /* 20 */
64325796c8dcSSimon Schubert { "ptest", { XX } },
6433cf7f2e2dSJohn Marino { Bad_Opcode },
6434cf7f2e2dSJohn Marino { Bad_Opcode },
6435cf7f2e2dSJohn Marino { Bad_Opcode },
6436cf7f2e2dSJohn Marino { Bad_Opcode },
6437cf7f2e2dSJohn Marino { Bad_Opcode },
6438cf7f2e2dSJohn Marino { Bad_Opcode },
6439cf7f2e2dSJohn Marino { Bad_Opcode },
64405796c8dcSSimon Schubert /* 28 */
6441cf7f2e2dSJohn Marino { Bad_Opcode },
6442cf7f2e2dSJohn Marino { Bad_Opcode },
6443cf7f2e2dSJohn Marino { Bad_Opcode },
6444cf7f2e2dSJohn Marino { Bad_Opcode },
6445cf7f2e2dSJohn Marino { Bad_Opcode },
6446cf7f2e2dSJohn Marino { Bad_Opcode },
6447cf7f2e2dSJohn Marino { Bad_Opcode },
6448cf7f2e2dSJohn Marino { Bad_Opcode },
64495796c8dcSSimon Schubert /* 30 */
6450cf7f2e2dSJohn Marino { Bad_Opcode },
6451cf7f2e2dSJohn Marino { Bad_Opcode },
6452cf7f2e2dSJohn Marino { Bad_Opcode },
6453cf7f2e2dSJohn Marino { Bad_Opcode },
6454cf7f2e2dSJohn Marino { Bad_Opcode },
6455cf7f2e2dSJohn Marino { Bad_Opcode },
6456cf7f2e2dSJohn Marino { Bad_Opcode },
6457cf7f2e2dSJohn Marino { Bad_Opcode },
64585796c8dcSSimon Schubert /* 38 */
6459cf7f2e2dSJohn Marino { Bad_Opcode },
6460cf7f2e2dSJohn Marino { Bad_Opcode },
6461cf7f2e2dSJohn Marino { Bad_Opcode },
6462cf7f2e2dSJohn Marino { Bad_Opcode },
6463cf7f2e2dSJohn Marino { Bad_Opcode },
6464cf7f2e2dSJohn Marino { Bad_Opcode },
6465cf7f2e2dSJohn Marino { Bad_Opcode },
6466cf7f2e2dSJohn Marino { Bad_Opcode },
64675796c8dcSSimon Schubert /* 40 */
6468cf7f2e2dSJohn Marino { Bad_Opcode },
64695796c8dcSSimon Schubert { "phaddbw", { XM, EXq } },
64705796c8dcSSimon Schubert { "phaddbd", { XM, EXq } },
64715796c8dcSSimon Schubert { "phaddbq", { XM, EXq } },
6472cf7f2e2dSJohn Marino { Bad_Opcode },
6473cf7f2e2dSJohn Marino { Bad_Opcode },
64745796c8dcSSimon Schubert { "phaddwd", { XM, EXq } },
64755796c8dcSSimon Schubert { "phaddwq", { XM, EXq } },
64765796c8dcSSimon Schubert /* 48 */
6477cf7f2e2dSJohn Marino { Bad_Opcode },
6478cf7f2e2dSJohn Marino { Bad_Opcode },
6479cf7f2e2dSJohn Marino { Bad_Opcode },
64805796c8dcSSimon Schubert { "phadddq", { XM, EXq } },
6481cf7f2e2dSJohn Marino { Bad_Opcode },
6482cf7f2e2dSJohn Marino { Bad_Opcode },
6483cf7f2e2dSJohn Marino { Bad_Opcode },
6484cf7f2e2dSJohn Marino { Bad_Opcode },
64855796c8dcSSimon Schubert /* 50 */
6486cf7f2e2dSJohn Marino { Bad_Opcode },
64875796c8dcSSimon Schubert { "phaddubw", { XM, EXq } },
64885796c8dcSSimon Schubert { "phaddubd", { XM, EXq } },
64895796c8dcSSimon Schubert { "phaddubq", { XM, EXq } },
6490cf7f2e2dSJohn Marino { Bad_Opcode },
6491cf7f2e2dSJohn Marino { Bad_Opcode },
64925796c8dcSSimon Schubert { "phadduwd", { XM, EXq } },
64935796c8dcSSimon Schubert { "phadduwq", { XM, EXq } },
64945796c8dcSSimon Schubert /* 58 */
6495cf7f2e2dSJohn Marino { Bad_Opcode },
6496cf7f2e2dSJohn Marino { Bad_Opcode },
6497cf7f2e2dSJohn Marino { Bad_Opcode },
64985796c8dcSSimon Schubert { "phaddudq", { XM, EXq } },
6499cf7f2e2dSJohn Marino { Bad_Opcode },
6500cf7f2e2dSJohn Marino { Bad_Opcode },
6501cf7f2e2dSJohn Marino { Bad_Opcode },
6502cf7f2e2dSJohn Marino { Bad_Opcode },
65035796c8dcSSimon Schubert /* 60 */
6504cf7f2e2dSJohn Marino { Bad_Opcode },
65055796c8dcSSimon Schubert { "phsubbw", { XM, EXq } },
65065796c8dcSSimon Schubert { "phsubbd", { XM, EXq } },
65075796c8dcSSimon Schubert { "phsubbq", { XM, EXq } },
6508cf7f2e2dSJohn Marino { Bad_Opcode },
6509cf7f2e2dSJohn Marino { Bad_Opcode },
6510cf7f2e2dSJohn Marino { Bad_Opcode },
6511cf7f2e2dSJohn Marino { Bad_Opcode },
65125796c8dcSSimon Schubert /* 68 */
6513cf7f2e2dSJohn Marino { Bad_Opcode },
6514cf7f2e2dSJohn Marino { Bad_Opcode },
6515cf7f2e2dSJohn Marino { Bad_Opcode },
6516cf7f2e2dSJohn Marino { Bad_Opcode },
6517cf7f2e2dSJohn Marino { Bad_Opcode },
6518cf7f2e2dSJohn Marino { Bad_Opcode },
6519cf7f2e2dSJohn Marino { Bad_Opcode },
6520cf7f2e2dSJohn Marino { Bad_Opcode },
65215796c8dcSSimon Schubert /* 70 */
6522cf7f2e2dSJohn Marino { Bad_Opcode },
6523cf7f2e2dSJohn Marino { Bad_Opcode },
6524cf7f2e2dSJohn Marino { Bad_Opcode },
6525cf7f2e2dSJohn Marino { Bad_Opcode },
6526cf7f2e2dSJohn Marino { Bad_Opcode },
6527cf7f2e2dSJohn Marino { Bad_Opcode },
6528cf7f2e2dSJohn Marino { Bad_Opcode },
6529cf7f2e2dSJohn Marino { Bad_Opcode },
65305796c8dcSSimon Schubert /* 78 */
6531cf7f2e2dSJohn Marino { Bad_Opcode },
6532cf7f2e2dSJohn Marino { Bad_Opcode },
6533cf7f2e2dSJohn Marino { Bad_Opcode },
6534cf7f2e2dSJohn Marino { Bad_Opcode },
6535cf7f2e2dSJohn Marino { Bad_Opcode },
6536cf7f2e2dSJohn Marino { Bad_Opcode },
6537cf7f2e2dSJohn Marino { Bad_Opcode },
6538cf7f2e2dSJohn Marino { Bad_Opcode },
65395796c8dcSSimon Schubert /* 80 */
6540cf7f2e2dSJohn Marino { Bad_Opcode },
6541cf7f2e2dSJohn Marino { Bad_Opcode },
6542cf7f2e2dSJohn Marino { Bad_Opcode },
6543cf7f2e2dSJohn Marino { Bad_Opcode },
6544cf7f2e2dSJohn Marino { Bad_Opcode },
6545cf7f2e2dSJohn Marino { Bad_Opcode },
6546cf7f2e2dSJohn Marino { Bad_Opcode },
6547cf7f2e2dSJohn Marino { Bad_Opcode },
65485796c8dcSSimon Schubert /* 88 */
6549cf7f2e2dSJohn Marino { Bad_Opcode },
6550cf7f2e2dSJohn Marino { Bad_Opcode },
6551cf7f2e2dSJohn Marino { Bad_Opcode },
6552cf7f2e2dSJohn Marino { Bad_Opcode },
6553cf7f2e2dSJohn Marino { Bad_Opcode },
6554cf7f2e2dSJohn Marino { Bad_Opcode },
6555cf7f2e2dSJohn Marino { Bad_Opcode },
6556cf7f2e2dSJohn Marino { Bad_Opcode },
65575796c8dcSSimon Schubert /* 90 */
6558cf7f2e2dSJohn Marino { Bad_Opcode },
6559cf7f2e2dSJohn Marino { Bad_Opcode },
6560cf7f2e2dSJohn Marino { Bad_Opcode },
6561cf7f2e2dSJohn Marino { Bad_Opcode },
6562cf7f2e2dSJohn Marino { Bad_Opcode },
6563cf7f2e2dSJohn Marino { Bad_Opcode },
6564cf7f2e2dSJohn Marino { Bad_Opcode },
6565cf7f2e2dSJohn Marino { Bad_Opcode },
65665796c8dcSSimon Schubert /* 98 */
6567cf7f2e2dSJohn Marino { Bad_Opcode },
6568cf7f2e2dSJohn Marino { Bad_Opcode },
6569cf7f2e2dSJohn Marino { Bad_Opcode },
6570cf7f2e2dSJohn Marino { Bad_Opcode },
6571cf7f2e2dSJohn Marino { Bad_Opcode },
6572cf7f2e2dSJohn Marino { Bad_Opcode },
6573cf7f2e2dSJohn Marino { Bad_Opcode },
6574cf7f2e2dSJohn Marino { Bad_Opcode },
65755796c8dcSSimon Schubert /* a0 */
6576cf7f2e2dSJohn Marino { Bad_Opcode },
6577cf7f2e2dSJohn Marino { Bad_Opcode },
6578cf7f2e2dSJohn Marino { Bad_Opcode },
6579cf7f2e2dSJohn Marino { Bad_Opcode },
6580cf7f2e2dSJohn Marino { Bad_Opcode },
6581cf7f2e2dSJohn Marino { Bad_Opcode },
6582cf7f2e2dSJohn Marino { Bad_Opcode },
6583cf7f2e2dSJohn Marino { Bad_Opcode },
65845796c8dcSSimon Schubert /* a8 */
6585cf7f2e2dSJohn Marino { Bad_Opcode },
6586cf7f2e2dSJohn Marino { Bad_Opcode },
6587cf7f2e2dSJohn Marino { Bad_Opcode },
6588cf7f2e2dSJohn Marino { Bad_Opcode },
6589cf7f2e2dSJohn Marino { Bad_Opcode },
6590cf7f2e2dSJohn Marino { Bad_Opcode },
6591cf7f2e2dSJohn Marino { Bad_Opcode },
6592cf7f2e2dSJohn Marino { Bad_Opcode },
65935796c8dcSSimon Schubert /* b0 */
6594cf7f2e2dSJohn Marino { Bad_Opcode },
6595cf7f2e2dSJohn Marino { Bad_Opcode },
6596cf7f2e2dSJohn Marino { Bad_Opcode },
6597cf7f2e2dSJohn Marino { Bad_Opcode },
6598cf7f2e2dSJohn Marino { Bad_Opcode },
6599cf7f2e2dSJohn Marino { Bad_Opcode },
6600cf7f2e2dSJohn Marino { Bad_Opcode },
6601cf7f2e2dSJohn Marino { Bad_Opcode },
66025796c8dcSSimon Schubert /* b8 */
6603cf7f2e2dSJohn Marino { Bad_Opcode },
6604cf7f2e2dSJohn Marino { Bad_Opcode },
6605cf7f2e2dSJohn Marino { Bad_Opcode },
6606cf7f2e2dSJohn Marino { Bad_Opcode },
6607cf7f2e2dSJohn Marino { Bad_Opcode },
6608cf7f2e2dSJohn Marino { Bad_Opcode },
6609cf7f2e2dSJohn Marino { Bad_Opcode },
6610cf7f2e2dSJohn Marino { Bad_Opcode },
66115796c8dcSSimon Schubert /* c0 */
6612cf7f2e2dSJohn Marino { Bad_Opcode },
6613cf7f2e2dSJohn Marino { Bad_Opcode },
6614cf7f2e2dSJohn Marino { Bad_Opcode },
6615cf7f2e2dSJohn Marino { Bad_Opcode },
6616cf7f2e2dSJohn Marino { Bad_Opcode },
6617cf7f2e2dSJohn Marino { Bad_Opcode },
6618cf7f2e2dSJohn Marino { Bad_Opcode },
6619cf7f2e2dSJohn Marino { Bad_Opcode },
66205796c8dcSSimon Schubert /* c8 */
6621cf7f2e2dSJohn Marino { Bad_Opcode },
6622cf7f2e2dSJohn Marino { Bad_Opcode },
6623cf7f2e2dSJohn Marino { Bad_Opcode },
6624cf7f2e2dSJohn Marino { Bad_Opcode },
6625cf7f2e2dSJohn Marino { Bad_Opcode },
6626cf7f2e2dSJohn Marino { Bad_Opcode },
6627cf7f2e2dSJohn Marino { Bad_Opcode },
6628cf7f2e2dSJohn Marino { Bad_Opcode },
66295796c8dcSSimon Schubert /* d0 */
6630cf7f2e2dSJohn Marino { Bad_Opcode },
6631cf7f2e2dSJohn Marino { Bad_Opcode },
6632cf7f2e2dSJohn Marino { Bad_Opcode },
6633cf7f2e2dSJohn Marino { Bad_Opcode },
6634cf7f2e2dSJohn Marino { Bad_Opcode },
6635cf7f2e2dSJohn Marino { Bad_Opcode },
6636cf7f2e2dSJohn Marino { Bad_Opcode },
6637cf7f2e2dSJohn Marino { Bad_Opcode },
66385796c8dcSSimon Schubert /* d8 */
6639cf7f2e2dSJohn Marino { Bad_Opcode },
6640cf7f2e2dSJohn Marino { Bad_Opcode },
6641cf7f2e2dSJohn Marino { Bad_Opcode },
6642cf7f2e2dSJohn Marino { Bad_Opcode },
6643cf7f2e2dSJohn Marino { Bad_Opcode },
6644cf7f2e2dSJohn Marino { Bad_Opcode },
6645cf7f2e2dSJohn Marino { Bad_Opcode },
6646cf7f2e2dSJohn Marino { Bad_Opcode },
66475796c8dcSSimon Schubert /* e0 */
6648cf7f2e2dSJohn Marino { Bad_Opcode },
6649cf7f2e2dSJohn Marino { Bad_Opcode },
6650cf7f2e2dSJohn Marino { Bad_Opcode },
6651cf7f2e2dSJohn Marino { Bad_Opcode },
6652cf7f2e2dSJohn Marino { Bad_Opcode },
6653cf7f2e2dSJohn Marino { Bad_Opcode },
6654cf7f2e2dSJohn Marino { Bad_Opcode },
6655cf7f2e2dSJohn Marino { Bad_Opcode },
66565796c8dcSSimon Schubert /* e8 */
6657cf7f2e2dSJohn Marino { Bad_Opcode },
6658cf7f2e2dSJohn Marino { Bad_Opcode },
6659cf7f2e2dSJohn Marino { Bad_Opcode },
6660cf7f2e2dSJohn Marino { Bad_Opcode },
6661cf7f2e2dSJohn Marino { Bad_Opcode },
6662cf7f2e2dSJohn Marino { Bad_Opcode },
6663cf7f2e2dSJohn Marino { Bad_Opcode },
6664cf7f2e2dSJohn Marino { Bad_Opcode },
66655796c8dcSSimon Schubert /* f0 */
6666cf7f2e2dSJohn Marino { Bad_Opcode },
6667cf7f2e2dSJohn Marino { Bad_Opcode },
6668cf7f2e2dSJohn Marino { Bad_Opcode },
6669cf7f2e2dSJohn Marino { Bad_Opcode },
6670cf7f2e2dSJohn Marino { Bad_Opcode },
6671cf7f2e2dSJohn Marino { Bad_Opcode },
6672cf7f2e2dSJohn Marino { Bad_Opcode },
6673cf7f2e2dSJohn Marino { Bad_Opcode },
66745796c8dcSSimon Schubert /* f8 */
6675cf7f2e2dSJohn Marino { Bad_Opcode },
6676cf7f2e2dSJohn Marino { Bad_Opcode },
6677cf7f2e2dSJohn Marino { Bad_Opcode },
6678cf7f2e2dSJohn Marino { Bad_Opcode },
6679cf7f2e2dSJohn Marino { Bad_Opcode },
6680cf7f2e2dSJohn Marino { Bad_Opcode },
6681cf7f2e2dSJohn Marino { Bad_Opcode },
6682cf7f2e2dSJohn Marino { Bad_Opcode },
66835796c8dcSSimon Schubert },
66845796c8dcSSimon Schubert };
66855796c8dcSSimon Schubert
6686cf7f2e2dSJohn Marino static const struct dis386 xop_table[][256] = {
6687cf7f2e2dSJohn Marino /* XOP_08 */
6688cf7f2e2dSJohn Marino {
6689cf7f2e2dSJohn Marino /* 00 */
6690cf7f2e2dSJohn Marino { Bad_Opcode },
6691cf7f2e2dSJohn Marino { Bad_Opcode },
6692cf7f2e2dSJohn Marino { Bad_Opcode },
6693cf7f2e2dSJohn Marino { Bad_Opcode },
6694cf7f2e2dSJohn Marino { Bad_Opcode },
6695cf7f2e2dSJohn Marino { Bad_Opcode },
6696cf7f2e2dSJohn Marino { Bad_Opcode },
6697cf7f2e2dSJohn Marino { Bad_Opcode },
6698cf7f2e2dSJohn Marino /* 08 */
6699cf7f2e2dSJohn Marino { Bad_Opcode },
6700cf7f2e2dSJohn Marino { Bad_Opcode },
6701cf7f2e2dSJohn Marino { Bad_Opcode },
6702cf7f2e2dSJohn Marino { Bad_Opcode },
6703cf7f2e2dSJohn Marino { Bad_Opcode },
6704cf7f2e2dSJohn Marino { Bad_Opcode },
6705cf7f2e2dSJohn Marino { Bad_Opcode },
6706cf7f2e2dSJohn Marino { Bad_Opcode },
6707cf7f2e2dSJohn Marino /* 10 */
6708a45ae5f8SJohn Marino { Bad_Opcode },
6709cf7f2e2dSJohn Marino { Bad_Opcode },
6710cf7f2e2dSJohn Marino { Bad_Opcode },
6711cf7f2e2dSJohn Marino { Bad_Opcode },
6712cf7f2e2dSJohn Marino { Bad_Opcode },
6713cf7f2e2dSJohn Marino { Bad_Opcode },
6714cf7f2e2dSJohn Marino { Bad_Opcode },
6715cf7f2e2dSJohn Marino { Bad_Opcode },
6716cf7f2e2dSJohn Marino /* 18 */
6717cf7f2e2dSJohn Marino { Bad_Opcode },
6718cf7f2e2dSJohn Marino { Bad_Opcode },
6719cf7f2e2dSJohn Marino { Bad_Opcode },
6720cf7f2e2dSJohn Marino { Bad_Opcode },
6721cf7f2e2dSJohn Marino { Bad_Opcode },
6722cf7f2e2dSJohn Marino { Bad_Opcode },
6723cf7f2e2dSJohn Marino { Bad_Opcode },
6724cf7f2e2dSJohn Marino { Bad_Opcode },
6725cf7f2e2dSJohn Marino /* 20 */
6726cf7f2e2dSJohn Marino { Bad_Opcode },
6727cf7f2e2dSJohn Marino { Bad_Opcode },
6728cf7f2e2dSJohn Marino { Bad_Opcode },
6729cf7f2e2dSJohn Marino { Bad_Opcode },
6730cf7f2e2dSJohn Marino { Bad_Opcode },
6731cf7f2e2dSJohn Marino { Bad_Opcode },
6732cf7f2e2dSJohn Marino { Bad_Opcode },
6733cf7f2e2dSJohn Marino { Bad_Opcode },
6734cf7f2e2dSJohn Marino /* 28 */
6735cf7f2e2dSJohn Marino { Bad_Opcode },
6736cf7f2e2dSJohn Marino { Bad_Opcode },
6737cf7f2e2dSJohn Marino { Bad_Opcode },
6738cf7f2e2dSJohn Marino { Bad_Opcode },
6739cf7f2e2dSJohn Marino { Bad_Opcode },
6740cf7f2e2dSJohn Marino { Bad_Opcode },
6741cf7f2e2dSJohn Marino { Bad_Opcode },
6742cf7f2e2dSJohn Marino { Bad_Opcode },
6743cf7f2e2dSJohn Marino /* 30 */
6744cf7f2e2dSJohn Marino { Bad_Opcode },
6745cf7f2e2dSJohn Marino { Bad_Opcode },
6746cf7f2e2dSJohn Marino { Bad_Opcode },
6747cf7f2e2dSJohn Marino { Bad_Opcode },
6748cf7f2e2dSJohn Marino { Bad_Opcode },
6749cf7f2e2dSJohn Marino { Bad_Opcode },
6750cf7f2e2dSJohn Marino { Bad_Opcode },
6751cf7f2e2dSJohn Marino { Bad_Opcode },
6752cf7f2e2dSJohn Marino /* 38 */
6753cf7f2e2dSJohn Marino { Bad_Opcode },
6754cf7f2e2dSJohn Marino { Bad_Opcode },
6755cf7f2e2dSJohn Marino { Bad_Opcode },
6756cf7f2e2dSJohn Marino { Bad_Opcode },
6757cf7f2e2dSJohn Marino { Bad_Opcode },
6758cf7f2e2dSJohn Marino { Bad_Opcode },
6759cf7f2e2dSJohn Marino { Bad_Opcode },
6760cf7f2e2dSJohn Marino { Bad_Opcode },
6761cf7f2e2dSJohn Marino /* 40 */
6762cf7f2e2dSJohn Marino { Bad_Opcode },
6763cf7f2e2dSJohn Marino { Bad_Opcode },
6764cf7f2e2dSJohn Marino { Bad_Opcode },
6765cf7f2e2dSJohn Marino { Bad_Opcode },
6766cf7f2e2dSJohn Marino { Bad_Opcode },
6767cf7f2e2dSJohn Marino { Bad_Opcode },
6768cf7f2e2dSJohn Marino { Bad_Opcode },
6769cf7f2e2dSJohn Marino { Bad_Opcode },
6770cf7f2e2dSJohn Marino /* 48 */
6771cf7f2e2dSJohn Marino { Bad_Opcode },
6772cf7f2e2dSJohn Marino { Bad_Opcode },
6773cf7f2e2dSJohn Marino { Bad_Opcode },
6774cf7f2e2dSJohn Marino { Bad_Opcode },
6775cf7f2e2dSJohn Marino { Bad_Opcode },
6776cf7f2e2dSJohn Marino { Bad_Opcode },
6777cf7f2e2dSJohn Marino { Bad_Opcode },
6778cf7f2e2dSJohn Marino { Bad_Opcode },
6779cf7f2e2dSJohn Marino /* 50 */
6780cf7f2e2dSJohn Marino { Bad_Opcode },
6781cf7f2e2dSJohn Marino { Bad_Opcode },
6782cf7f2e2dSJohn Marino { Bad_Opcode },
6783cf7f2e2dSJohn Marino { Bad_Opcode },
6784cf7f2e2dSJohn Marino { Bad_Opcode },
6785cf7f2e2dSJohn Marino { Bad_Opcode },
6786cf7f2e2dSJohn Marino { Bad_Opcode },
6787cf7f2e2dSJohn Marino { Bad_Opcode },
6788cf7f2e2dSJohn Marino /* 58 */
6789cf7f2e2dSJohn Marino { Bad_Opcode },
6790cf7f2e2dSJohn Marino { Bad_Opcode },
6791cf7f2e2dSJohn Marino { Bad_Opcode },
6792cf7f2e2dSJohn Marino { Bad_Opcode },
6793cf7f2e2dSJohn Marino { Bad_Opcode },
6794cf7f2e2dSJohn Marino { Bad_Opcode },
6795cf7f2e2dSJohn Marino { Bad_Opcode },
6796cf7f2e2dSJohn Marino { Bad_Opcode },
6797cf7f2e2dSJohn Marino /* 60 */
6798cf7f2e2dSJohn Marino { Bad_Opcode },
6799cf7f2e2dSJohn Marino { Bad_Opcode },
6800cf7f2e2dSJohn Marino { Bad_Opcode },
6801cf7f2e2dSJohn Marino { Bad_Opcode },
6802cf7f2e2dSJohn Marino { Bad_Opcode },
6803cf7f2e2dSJohn Marino { Bad_Opcode },
6804cf7f2e2dSJohn Marino { Bad_Opcode },
6805cf7f2e2dSJohn Marino { Bad_Opcode },
6806cf7f2e2dSJohn Marino /* 68 */
6807cf7f2e2dSJohn Marino { Bad_Opcode },
6808cf7f2e2dSJohn Marino { Bad_Opcode },
6809cf7f2e2dSJohn Marino { Bad_Opcode },
6810cf7f2e2dSJohn Marino { Bad_Opcode },
6811cf7f2e2dSJohn Marino { Bad_Opcode },
6812cf7f2e2dSJohn Marino { Bad_Opcode },
6813cf7f2e2dSJohn Marino { Bad_Opcode },
6814cf7f2e2dSJohn Marino { Bad_Opcode },
6815cf7f2e2dSJohn Marino /* 70 */
6816cf7f2e2dSJohn Marino { Bad_Opcode },
6817cf7f2e2dSJohn Marino { Bad_Opcode },
6818cf7f2e2dSJohn Marino { Bad_Opcode },
6819cf7f2e2dSJohn Marino { Bad_Opcode },
6820cf7f2e2dSJohn Marino { Bad_Opcode },
6821cf7f2e2dSJohn Marino { Bad_Opcode },
6822cf7f2e2dSJohn Marino { Bad_Opcode },
6823cf7f2e2dSJohn Marino { Bad_Opcode },
6824cf7f2e2dSJohn Marino /* 78 */
6825cf7f2e2dSJohn Marino { Bad_Opcode },
6826cf7f2e2dSJohn Marino { Bad_Opcode },
6827cf7f2e2dSJohn Marino { Bad_Opcode },
6828cf7f2e2dSJohn Marino { Bad_Opcode },
6829cf7f2e2dSJohn Marino { Bad_Opcode },
6830cf7f2e2dSJohn Marino { Bad_Opcode },
6831cf7f2e2dSJohn Marino { Bad_Opcode },
6832cf7f2e2dSJohn Marino { Bad_Opcode },
6833cf7f2e2dSJohn Marino /* 80 */
6834cf7f2e2dSJohn Marino { Bad_Opcode },
6835cf7f2e2dSJohn Marino { Bad_Opcode },
6836cf7f2e2dSJohn Marino { Bad_Opcode },
6837cf7f2e2dSJohn Marino { Bad_Opcode },
6838cf7f2e2dSJohn Marino { Bad_Opcode },
6839cf7f2e2dSJohn Marino { "vpmacssww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6840cf7f2e2dSJohn Marino { "vpmacsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6841cf7f2e2dSJohn Marino { "vpmacssdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6842cf7f2e2dSJohn Marino /* 88 */
6843cf7f2e2dSJohn Marino { Bad_Opcode },
6844cf7f2e2dSJohn Marino { Bad_Opcode },
6845cf7f2e2dSJohn Marino { Bad_Opcode },
6846cf7f2e2dSJohn Marino { Bad_Opcode },
6847cf7f2e2dSJohn Marino { Bad_Opcode },
6848cf7f2e2dSJohn Marino { Bad_Opcode },
6849cf7f2e2dSJohn Marino { "vpmacssdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6850cf7f2e2dSJohn Marino { "vpmacssdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6851cf7f2e2dSJohn Marino /* 90 */
6852cf7f2e2dSJohn Marino { Bad_Opcode },
6853cf7f2e2dSJohn Marino { Bad_Opcode },
6854cf7f2e2dSJohn Marino { Bad_Opcode },
6855cf7f2e2dSJohn Marino { Bad_Opcode },
6856cf7f2e2dSJohn Marino { Bad_Opcode },
6857cf7f2e2dSJohn Marino { "vpmacsww", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6858cf7f2e2dSJohn Marino { "vpmacswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6859cf7f2e2dSJohn Marino { "vpmacsdql", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6860cf7f2e2dSJohn Marino /* 98 */
6861cf7f2e2dSJohn Marino { Bad_Opcode },
6862cf7f2e2dSJohn Marino { Bad_Opcode },
6863cf7f2e2dSJohn Marino { Bad_Opcode },
6864cf7f2e2dSJohn Marino { Bad_Opcode },
6865cf7f2e2dSJohn Marino { Bad_Opcode },
6866cf7f2e2dSJohn Marino { Bad_Opcode },
6867cf7f2e2dSJohn Marino { "vpmacsdd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6868cf7f2e2dSJohn Marino { "vpmacsdqh", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6869cf7f2e2dSJohn Marino /* a0 */
6870cf7f2e2dSJohn Marino { Bad_Opcode },
6871cf7f2e2dSJohn Marino { Bad_Opcode },
6872cf7f2e2dSJohn Marino { "vpcmov", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6873cf7f2e2dSJohn Marino { "vpperm", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6874cf7f2e2dSJohn Marino { Bad_Opcode },
6875cf7f2e2dSJohn Marino { Bad_Opcode },
6876cf7f2e2dSJohn Marino { "vpmadcsswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6877cf7f2e2dSJohn Marino { Bad_Opcode },
6878cf7f2e2dSJohn Marino /* a8 */
6879cf7f2e2dSJohn Marino { Bad_Opcode },
6880cf7f2e2dSJohn Marino { Bad_Opcode },
6881cf7f2e2dSJohn Marino { Bad_Opcode },
6882cf7f2e2dSJohn Marino { Bad_Opcode },
6883cf7f2e2dSJohn Marino { Bad_Opcode },
6884cf7f2e2dSJohn Marino { Bad_Opcode },
6885cf7f2e2dSJohn Marino { Bad_Opcode },
6886cf7f2e2dSJohn Marino { Bad_Opcode },
6887cf7f2e2dSJohn Marino /* b0 */
6888cf7f2e2dSJohn Marino { Bad_Opcode },
6889cf7f2e2dSJohn Marino { Bad_Opcode },
6890cf7f2e2dSJohn Marino { Bad_Opcode },
6891cf7f2e2dSJohn Marino { Bad_Opcode },
6892cf7f2e2dSJohn Marino { Bad_Opcode },
6893cf7f2e2dSJohn Marino { Bad_Opcode },
6894cf7f2e2dSJohn Marino { "vpmadcswd", { XMVexW, Vex, EXVexW, EXVexW, VexI4 } },
6895cf7f2e2dSJohn Marino { Bad_Opcode },
6896cf7f2e2dSJohn Marino /* b8 */
6897cf7f2e2dSJohn Marino { Bad_Opcode },
6898cf7f2e2dSJohn Marino { Bad_Opcode },
6899cf7f2e2dSJohn Marino { Bad_Opcode },
6900cf7f2e2dSJohn Marino { Bad_Opcode },
6901cf7f2e2dSJohn Marino { Bad_Opcode },
6902cf7f2e2dSJohn Marino { Bad_Opcode },
6903cf7f2e2dSJohn Marino { Bad_Opcode },
6904cf7f2e2dSJohn Marino { Bad_Opcode },
6905cf7f2e2dSJohn Marino /* c0 */
6906cf7f2e2dSJohn Marino { "vprotb", { XM, Vex_2src_1, Ib } },
6907cf7f2e2dSJohn Marino { "vprotw", { XM, Vex_2src_1, Ib } },
6908cf7f2e2dSJohn Marino { "vprotd", { XM, Vex_2src_1, Ib } },
6909cf7f2e2dSJohn Marino { "vprotq", { XM, Vex_2src_1, Ib } },
6910cf7f2e2dSJohn Marino { Bad_Opcode },
6911cf7f2e2dSJohn Marino { Bad_Opcode },
6912cf7f2e2dSJohn Marino { Bad_Opcode },
6913cf7f2e2dSJohn Marino { Bad_Opcode },
6914cf7f2e2dSJohn Marino /* c8 */
6915cf7f2e2dSJohn Marino { Bad_Opcode },
6916cf7f2e2dSJohn Marino { Bad_Opcode },
6917cf7f2e2dSJohn Marino { Bad_Opcode },
6918cf7f2e2dSJohn Marino { Bad_Opcode },
6919*ef5ccd6cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CC) },
6920*ef5ccd6cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CD) },
6921*ef5ccd6cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CE) },
6922*ef5ccd6cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_CF) },
6923cf7f2e2dSJohn Marino /* d0 */
6924cf7f2e2dSJohn Marino { Bad_Opcode },
6925cf7f2e2dSJohn Marino { Bad_Opcode },
6926cf7f2e2dSJohn Marino { Bad_Opcode },
6927cf7f2e2dSJohn Marino { Bad_Opcode },
6928cf7f2e2dSJohn Marino { Bad_Opcode },
6929cf7f2e2dSJohn Marino { Bad_Opcode },
6930cf7f2e2dSJohn Marino { Bad_Opcode },
6931cf7f2e2dSJohn Marino { Bad_Opcode },
6932cf7f2e2dSJohn Marino /* d8 */
6933cf7f2e2dSJohn Marino { Bad_Opcode },
6934cf7f2e2dSJohn Marino { Bad_Opcode },
6935cf7f2e2dSJohn Marino { Bad_Opcode },
6936cf7f2e2dSJohn Marino { Bad_Opcode },
6937cf7f2e2dSJohn Marino { Bad_Opcode },
6938cf7f2e2dSJohn Marino { Bad_Opcode },
6939cf7f2e2dSJohn Marino { Bad_Opcode },
6940cf7f2e2dSJohn Marino { Bad_Opcode },
6941cf7f2e2dSJohn Marino /* e0 */
6942cf7f2e2dSJohn Marino { Bad_Opcode },
6943cf7f2e2dSJohn Marino { Bad_Opcode },
6944cf7f2e2dSJohn Marino { Bad_Opcode },
6945cf7f2e2dSJohn Marino { Bad_Opcode },
6946cf7f2e2dSJohn Marino { Bad_Opcode },
6947cf7f2e2dSJohn Marino { Bad_Opcode },
6948cf7f2e2dSJohn Marino { Bad_Opcode },
6949cf7f2e2dSJohn Marino { Bad_Opcode },
6950cf7f2e2dSJohn Marino /* e8 */
6951cf7f2e2dSJohn Marino { Bad_Opcode },
6952cf7f2e2dSJohn Marino { Bad_Opcode },
6953cf7f2e2dSJohn Marino { Bad_Opcode },
6954cf7f2e2dSJohn Marino { Bad_Opcode },
6955*ef5ccd6cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EC) },
6956*ef5ccd6cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_ED) },
6957*ef5ccd6cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EE) },
6958*ef5ccd6cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_08_EF) },
6959cf7f2e2dSJohn Marino /* f0 */
6960cf7f2e2dSJohn Marino { Bad_Opcode },
6961cf7f2e2dSJohn Marino { Bad_Opcode },
6962cf7f2e2dSJohn Marino { Bad_Opcode },
6963cf7f2e2dSJohn Marino { Bad_Opcode },
6964cf7f2e2dSJohn Marino { Bad_Opcode },
6965cf7f2e2dSJohn Marino { Bad_Opcode },
6966cf7f2e2dSJohn Marino { Bad_Opcode },
6967cf7f2e2dSJohn Marino { Bad_Opcode },
6968cf7f2e2dSJohn Marino /* f8 */
6969cf7f2e2dSJohn Marino { Bad_Opcode },
6970cf7f2e2dSJohn Marino { Bad_Opcode },
6971cf7f2e2dSJohn Marino { Bad_Opcode },
6972cf7f2e2dSJohn Marino { Bad_Opcode },
6973cf7f2e2dSJohn Marino { Bad_Opcode },
6974cf7f2e2dSJohn Marino { Bad_Opcode },
6975cf7f2e2dSJohn Marino { Bad_Opcode },
6976cf7f2e2dSJohn Marino { Bad_Opcode },
6977cf7f2e2dSJohn Marino },
6978cf7f2e2dSJohn Marino /* XOP_09 */
6979cf7f2e2dSJohn Marino {
6980cf7f2e2dSJohn Marino /* 00 */
6981cf7f2e2dSJohn Marino { Bad_Opcode },
6982c50c785cSJohn Marino { REG_TABLE (REG_XOP_TBM_01) },
6983c50c785cSJohn Marino { REG_TABLE (REG_XOP_TBM_02) },
6984cf7f2e2dSJohn Marino { Bad_Opcode },
6985cf7f2e2dSJohn Marino { Bad_Opcode },
6986cf7f2e2dSJohn Marino { Bad_Opcode },
6987cf7f2e2dSJohn Marino { Bad_Opcode },
6988cf7f2e2dSJohn Marino { Bad_Opcode },
6989cf7f2e2dSJohn Marino /* 08 */
6990cf7f2e2dSJohn Marino { Bad_Opcode },
6991cf7f2e2dSJohn Marino { Bad_Opcode },
6992cf7f2e2dSJohn Marino { Bad_Opcode },
6993cf7f2e2dSJohn Marino { Bad_Opcode },
6994cf7f2e2dSJohn Marino { Bad_Opcode },
6995cf7f2e2dSJohn Marino { Bad_Opcode },
6996cf7f2e2dSJohn Marino { Bad_Opcode },
6997cf7f2e2dSJohn Marino { Bad_Opcode },
6998cf7f2e2dSJohn Marino /* 10 */
6999cf7f2e2dSJohn Marino { Bad_Opcode },
7000cf7f2e2dSJohn Marino { Bad_Opcode },
7001cf7f2e2dSJohn Marino { REG_TABLE (REG_XOP_LWPCB) },
7002cf7f2e2dSJohn Marino { Bad_Opcode },
7003cf7f2e2dSJohn Marino { Bad_Opcode },
7004cf7f2e2dSJohn Marino { Bad_Opcode },
7005cf7f2e2dSJohn Marino { Bad_Opcode },
7006cf7f2e2dSJohn Marino { Bad_Opcode },
7007cf7f2e2dSJohn Marino /* 18 */
7008cf7f2e2dSJohn Marino { Bad_Opcode },
7009cf7f2e2dSJohn Marino { Bad_Opcode },
7010cf7f2e2dSJohn Marino { Bad_Opcode },
7011cf7f2e2dSJohn Marino { Bad_Opcode },
7012cf7f2e2dSJohn Marino { Bad_Opcode },
7013cf7f2e2dSJohn Marino { Bad_Opcode },
7014cf7f2e2dSJohn Marino { Bad_Opcode },
7015cf7f2e2dSJohn Marino { Bad_Opcode },
7016cf7f2e2dSJohn Marino /* 20 */
7017cf7f2e2dSJohn Marino { Bad_Opcode },
7018cf7f2e2dSJohn Marino { Bad_Opcode },
7019cf7f2e2dSJohn Marino { Bad_Opcode },
7020cf7f2e2dSJohn Marino { Bad_Opcode },
7021cf7f2e2dSJohn Marino { Bad_Opcode },
7022cf7f2e2dSJohn Marino { Bad_Opcode },
7023cf7f2e2dSJohn Marino { Bad_Opcode },
7024cf7f2e2dSJohn Marino { Bad_Opcode },
7025cf7f2e2dSJohn Marino /* 28 */
7026cf7f2e2dSJohn Marino { Bad_Opcode },
7027cf7f2e2dSJohn Marino { Bad_Opcode },
7028cf7f2e2dSJohn Marino { Bad_Opcode },
7029cf7f2e2dSJohn Marino { Bad_Opcode },
7030cf7f2e2dSJohn Marino { Bad_Opcode },
7031cf7f2e2dSJohn Marino { Bad_Opcode },
7032cf7f2e2dSJohn Marino { Bad_Opcode },
7033cf7f2e2dSJohn Marino { Bad_Opcode },
7034cf7f2e2dSJohn Marino /* 30 */
7035cf7f2e2dSJohn Marino { Bad_Opcode },
7036cf7f2e2dSJohn Marino { Bad_Opcode },
7037cf7f2e2dSJohn Marino { Bad_Opcode },
7038cf7f2e2dSJohn Marino { Bad_Opcode },
7039cf7f2e2dSJohn Marino { Bad_Opcode },
7040cf7f2e2dSJohn Marino { Bad_Opcode },
7041cf7f2e2dSJohn Marino { Bad_Opcode },
7042cf7f2e2dSJohn Marino { Bad_Opcode },
7043cf7f2e2dSJohn Marino /* 38 */
7044cf7f2e2dSJohn Marino { Bad_Opcode },
7045cf7f2e2dSJohn Marino { Bad_Opcode },
7046cf7f2e2dSJohn Marino { Bad_Opcode },
7047cf7f2e2dSJohn Marino { Bad_Opcode },
7048cf7f2e2dSJohn Marino { Bad_Opcode },
7049cf7f2e2dSJohn Marino { Bad_Opcode },
7050cf7f2e2dSJohn Marino { Bad_Opcode },
7051cf7f2e2dSJohn Marino { Bad_Opcode },
7052cf7f2e2dSJohn Marino /* 40 */
7053cf7f2e2dSJohn Marino { Bad_Opcode },
7054cf7f2e2dSJohn Marino { Bad_Opcode },
7055cf7f2e2dSJohn Marino { Bad_Opcode },
7056cf7f2e2dSJohn Marino { Bad_Opcode },
7057cf7f2e2dSJohn Marino { Bad_Opcode },
7058cf7f2e2dSJohn Marino { Bad_Opcode },
7059cf7f2e2dSJohn Marino { Bad_Opcode },
7060cf7f2e2dSJohn Marino { Bad_Opcode },
7061cf7f2e2dSJohn Marino /* 48 */
7062cf7f2e2dSJohn Marino { Bad_Opcode },
7063cf7f2e2dSJohn Marino { Bad_Opcode },
7064cf7f2e2dSJohn Marino { Bad_Opcode },
7065cf7f2e2dSJohn Marino { Bad_Opcode },
7066cf7f2e2dSJohn Marino { Bad_Opcode },
7067cf7f2e2dSJohn Marino { Bad_Opcode },
7068cf7f2e2dSJohn Marino { Bad_Opcode },
7069cf7f2e2dSJohn Marino { Bad_Opcode },
7070cf7f2e2dSJohn Marino /* 50 */
7071cf7f2e2dSJohn Marino { Bad_Opcode },
7072cf7f2e2dSJohn Marino { Bad_Opcode },
7073cf7f2e2dSJohn Marino { Bad_Opcode },
7074cf7f2e2dSJohn Marino { Bad_Opcode },
7075cf7f2e2dSJohn Marino { Bad_Opcode },
7076cf7f2e2dSJohn Marino { Bad_Opcode },
7077cf7f2e2dSJohn Marino { Bad_Opcode },
7078cf7f2e2dSJohn Marino { Bad_Opcode },
7079cf7f2e2dSJohn Marino /* 58 */
7080cf7f2e2dSJohn Marino { Bad_Opcode },
7081cf7f2e2dSJohn Marino { Bad_Opcode },
7082cf7f2e2dSJohn Marino { Bad_Opcode },
7083cf7f2e2dSJohn Marino { Bad_Opcode },
7084cf7f2e2dSJohn Marino { Bad_Opcode },
7085cf7f2e2dSJohn Marino { Bad_Opcode },
7086cf7f2e2dSJohn Marino { Bad_Opcode },
7087cf7f2e2dSJohn Marino { Bad_Opcode },
7088cf7f2e2dSJohn Marino /* 60 */
7089cf7f2e2dSJohn Marino { Bad_Opcode },
7090cf7f2e2dSJohn Marino { Bad_Opcode },
7091cf7f2e2dSJohn Marino { Bad_Opcode },
7092cf7f2e2dSJohn Marino { Bad_Opcode },
7093cf7f2e2dSJohn Marino { Bad_Opcode },
7094cf7f2e2dSJohn Marino { Bad_Opcode },
7095cf7f2e2dSJohn Marino { Bad_Opcode },
7096cf7f2e2dSJohn Marino { Bad_Opcode },
7097cf7f2e2dSJohn Marino /* 68 */
7098cf7f2e2dSJohn Marino { Bad_Opcode },
7099cf7f2e2dSJohn Marino { Bad_Opcode },
7100cf7f2e2dSJohn Marino { Bad_Opcode },
7101cf7f2e2dSJohn Marino { Bad_Opcode },
7102cf7f2e2dSJohn Marino { Bad_Opcode },
7103cf7f2e2dSJohn Marino { Bad_Opcode },
7104cf7f2e2dSJohn Marino { Bad_Opcode },
7105cf7f2e2dSJohn Marino { Bad_Opcode },
7106cf7f2e2dSJohn Marino /* 70 */
7107cf7f2e2dSJohn Marino { Bad_Opcode },
7108cf7f2e2dSJohn Marino { Bad_Opcode },
7109cf7f2e2dSJohn Marino { Bad_Opcode },
7110cf7f2e2dSJohn Marino { Bad_Opcode },
7111cf7f2e2dSJohn Marino { Bad_Opcode },
7112cf7f2e2dSJohn Marino { Bad_Opcode },
7113cf7f2e2dSJohn Marino { Bad_Opcode },
7114cf7f2e2dSJohn Marino { Bad_Opcode },
7115cf7f2e2dSJohn Marino /* 78 */
7116cf7f2e2dSJohn Marino { Bad_Opcode },
7117cf7f2e2dSJohn Marino { Bad_Opcode },
7118cf7f2e2dSJohn Marino { Bad_Opcode },
7119cf7f2e2dSJohn Marino { Bad_Opcode },
7120cf7f2e2dSJohn Marino { Bad_Opcode },
7121cf7f2e2dSJohn Marino { Bad_Opcode },
7122cf7f2e2dSJohn Marino { Bad_Opcode },
7123cf7f2e2dSJohn Marino { Bad_Opcode },
7124cf7f2e2dSJohn Marino /* 80 */
7125c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_80) },
7126c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FXOP_09_81) },
7127cf7f2e2dSJohn Marino { "vfrczss", { XM, EXd } },
7128cf7f2e2dSJohn Marino { "vfrczsd", { XM, EXq } },
7129cf7f2e2dSJohn Marino { Bad_Opcode },
7130cf7f2e2dSJohn Marino { Bad_Opcode },
7131cf7f2e2dSJohn Marino { Bad_Opcode },
7132cf7f2e2dSJohn Marino { Bad_Opcode },
7133cf7f2e2dSJohn Marino /* 88 */
7134cf7f2e2dSJohn Marino { Bad_Opcode },
7135cf7f2e2dSJohn Marino { Bad_Opcode },
7136cf7f2e2dSJohn Marino { Bad_Opcode },
7137cf7f2e2dSJohn Marino { Bad_Opcode },
7138cf7f2e2dSJohn Marino { Bad_Opcode },
7139cf7f2e2dSJohn Marino { Bad_Opcode },
7140cf7f2e2dSJohn Marino { Bad_Opcode },
7141cf7f2e2dSJohn Marino { Bad_Opcode },
7142cf7f2e2dSJohn Marino /* 90 */
7143cf7f2e2dSJohn Marino { "vprotb", { XM, Vex_2src_1, Vex_2src_2 } },
7144cf7f2e2dSJohn Marino { "vprotw", { XM, Vex_2src_1, Vex_2src_2 } },
7145cf7f2e2dSJohn Marino { "vprotd", { XM, Vex_2src_1, Vex_2src_2 } },
7146cf7f2e2dSJohn Marino { "vprotq", { XM, Vex_2src_1, Vex_2src_2 } },
7147cf7f2e2dSJohn Marino { "vpshlb", { XM, Vex_2src_1, Vex_2src_2 } },
7148cf7f2e2dSJohn Marino { "vpshlw", { XM, Vex_2src_1, Vex_2src_2 } },
7149cf7f2e2dSJohn Marino { "vpshld", { XM, Vex_2src_1, Vex_2src_2 } },
7150cf7f2e2dSJohn Marino { "vpshlq", { XM, Vex_2src_1, Vex_2src_2 } },
7151cf7f2e2dSJohn Marino /* 98 */
7152cf7f2e2dSJohn Marino { "vpshab", { XM, Vex_2src_1, Vex_2src_2 } },
7153cf7f2e2dSJohn Marino { "vpshaw", { XM, Vex_2src_1, Vex_2src_2 } },
7154cf7f2e2dSJohn Marino { "vpshad", { XM, Vex_2src_1, Vex_2src_2 } },
7155cf7f2e2dSJohn Marino { "vpshaq", { XM, Vex_2src_1, Vex_2src_2 } },
7156cf7f2e2dSJohn Marino { Bad_Opcode },
7157cf7f2e2dSJohn Marino { Bad_Opcode },
7158cf7f2e2dSJohn Marino { Bad_Opcode },
7159cf7f2e2dSJohn Marino { Bad_Opcode },
7160cf7f2e2dSJohn Marino /* a0 */
7161cf7f2e2dSJohn Marino { Bad_Opcode },
7162cf7f2e2dSJohn Marino { Bad_Opcode },
7163cf7f2e2dSJohn Marino { Bad_Opcode },
7164cf7f2e2dSJohn Marino { Bad_Opcode },
7165cf7f2e2dSJohn Marino { Bad_Opcode },
7166cf7f2e2dSJohn Marino { Bad_Opcode },
7167cf7f2e2dSJohn Marino { Bad_Opcode },
7168cf7f2e2dSJohn Marino { Bad_Opcode },
7169cf7f2e2dSJohn Marino /* a8 */
7170cf7f2e2dSJohn Marino { Bad_Opcode },
7171cf7f2e2dSJohn Marino { Bad_Opcode },
7172cf7f2e2dSJohn Marino { Bad_Opcode },
7173cf7f2e2dSJohn Marino { Bad_Opcode },
7174cf7f2e2dSJohn Marino { Bad_Opcode },
7175cf7f2e2dSJohn Marino { Bad_Opcode },
7176cf7f2e2dSJohn Marino { Bad_Opcode },
7177cf7f2e2dSJohn Marino { Bad_Opcode },
7178cf7f2e2dSJohn Marino /* b0 */
7179cf7f2e2dSJohn Marino { Bad_Opcode },
7180cf7f2e2dSJohn Marino { Bad_Opcode },
7181cf7f2e2dSJohn Marino { Bad_Opcode },
7182cf7f2e2dSJohn Marino { Bad_Opcode },
7183cf7f2e2dSJohn Marino { Bad_Opcode },
7184cf7f2e2dSJohn Marino { Bad_Opcode },
7185cf7f2e2dSJohn Marino { Bad_Opcode },
7186cf7f2e2dSJohn Marino { Bad_Opcode },
7187cf7f2e2dSJohn Marino /* b8 */
7188cf7f2e2dSJohn Marino { Bad_Opcode },
7189cf7f2e2dSJohn Marino { Bad_Opcode },
7190cf7f2e2dSJohn Marino { Bad_Opcode },
7191cf7f2e2dSJohn Marino { Bad_Opcode },
7192cf7f2e2dSJohn Marino { Bad_Opcode },
7193cf7f2e2dSJohn Marino { Bad_Opcode },
7194cf7f2e2dSJohn Marino { Bad_Opcode },
7195cf7f2e2dSJohn Marino { Bad_Opcode },
7196cf7f2e2dSJohn Marino /* c0 */
7197cf7f2e2dSJohn Marino { Bad_Opcode },
7198cf7f2e2dSJohn Marino { "vphaddbw", { XM, EXxmm } },
7199cf7f2e2dSJohn Marino { "vphaddbd", { XM, EXxmm } },
7200cf7f2e2dSJohn Marino { "vphaddbq", { XM, EXxmm } },
7201cf7f2e2dSJohn Marino { Bad_Opcode },
7202cf7f2e2dSJohn Marino { Bad_Opcode },
7203cf7f2e2dSJohn Marino { "vphaddwd", { XM, EXxmm } },
7204cf7f2e2dSJohn Marino { "vphaddwq", { XM, EXxmm } },
7205cf7f2e2dSJohn Marino /* c8 */
7206cf7f2e2dSJohn Marino { Bad_Opcode },
7207cf7f2e2dSJohn Marino { Bad_Opcode },
7208cf7f2e2dSJohn Marino { Bad_Opcode },
7209cf7f2e2dSJohn Marino { "vphadddq", { XM, EXxmm } },
7210cf7f2e2dSJohn Marino { Bad_Opcode },
7211cf7f2e2dSJohn Marino { Bad_Opcode },
7212cf7f2e2dSJohn Marino { Bad_Opcode },
7213cf7f2e2dSJohn Marino { Bad_Opcode },
7214cf7f2e2dSJohn Marino /* d0 */
7215cf7f2e2dSJohn Marino { Bad_Opcode },
7216cf7f2e2dSJohn Marino { "vphaddubw", { XM, EXxmm } },
7217cf7f2e2dSJohn Marino { "vphaddubd", { XM, EXxmm } },
7218cf7f2e2dSJohn Marino { "vphaddubq", { XM, EXxmm } },
7219cf7f2e2dSJohn Marino { Bad_Opcode },
7220cf7f2e2dSJohn Marino { Bad_Opcode },
7221cf7f2e2dSJohn Marino { "vphadduwd", { XM, EXxmm } },
7222cf7f2e2dSJohn Marino { "vphadduwq", { XM, EXxmm } },
7223cf7f2e2dSJohn Marino /* d8 */
7224cf7f2e2dSJohn Marino { Bad_Opcode },
7225cf7f2e2dSJohn Marino { Bad_Opcode },
7226cf7f2e2dSJohn Marino { Bad_Opcode },
7227cf7f2e2dSJohn Marino { "vphaddudq", { XM, EXxmm } },
7228cf7f2e2dSJohn Marino { Bad_Opcode },
7229cf7f2e2dSJohn Marino { Bad_Opcode },
7230cf7f2e2dSJohn Marino { Bad_Opcode },
7231cf7f2e2dSJohn Marino { Bad_Opcode },
7232cf7f2e2dSJohn Marino /* e0 */
7233cf7f2e2dSJohn Marino { Bad_Opcode },
7234cf7f2e2dSJohn Marino { "vphsubbw", { XM, EXxmm } },
7235cf7f2e2dSJohn Marino { "vphsubwd", { XM, EXxmm } },
7236cf7f2e2dSJohn Marino { "vphsubdq", { XM, EXxmm } },
7237cf7f2e2dSJohn Marino { Bad_Opcode },
7238cf7f2e2dSJohn Marino { Bad_Opcode },
7239cf7f2e2dSJohn Marino { Bad_Opcode },
7240cf7f2e2dSJohn Marino { Bad_Opcode },
7241cf7f2e2dSJohn Marino /* e8 */
7242cf7f2e2dSJohn Marino { Bad_Opcode },
7243cf7f2e2dSJohn Marino { Bad_Opcode },
7244cf7f2e2dSJohn Marino { Bad_Opcode },
7245cf7f2e2dSJohn Marino { Bad_Opcode },
7246cf7f2e2dSJohn Marino { Bad_Opcode },
7247cf7f2e2dSJohn Marino { Bad_Opcode },
7248cf7f2e2dSJohn Marino { Bad_Opcode },
7249cf7f2e2dSJohn Marino { Bad_Opcode },
7250cf7f2e2dSJohn Marino /* f0 */
7251cf7f2e2dSJohn Marino { Bad_Opcode },
7252cf7f2e2dSJohn Marino { Bad_Opcode },
7253cf7f2e2dSJohn Marino { Bad_Opcode },
7254cf7f2e2dSJohn Marino { Bad_Opcode },
7255cf7f2e2dSJohn Marino { Bad_Opcode },
7256cf7f2e2dSJohn Marino { Bad_Opcode },
7257cf7f2e2dSJohn Marino { Bad_Opcode },
7258cf7f2e2dSJohn Marino { Bad_Opcode },
7259cf7f2e2dSJohn Marino /* f8 */
7260cf7f2e2dSJohn Marino { Bad_Opcode },
7261cf7f2e2dSJohn Marino { Bad_Opcode },
7262cf7f2e2dSJohn Marino { Bad_Opcode },
7263cf7f2e2dSJohn Marino { Bad_Opcode },
7264cf7f2e2dSJohn Marino { Bad_Opcode },
7265cf7f2e2dSJohn Marino { Bad_Opcode },
7266cf7f2e2dSJohn Marino { Bad_Opcode },
7267cf7f2e2dSJohn Marino { Bad_Opcode },
7268cf7f2e2dSJohn Marino },
7269cf7f2e2dSJohn Marino /* XOP_0A */
7270cf7f2e2dSJohn Marino {
7271cf7f2e2dSJohn Marino /* 00 */
7272cf7f2e2dSJohn Marino { Bad_Opcode },
7273cf7f2e2dSJohn Marino { Bad_Opcode },
7274cf7f2e2dSJohn Marino { Bad_Opcode },
7275cf7f2e2dSJohn Marino { Bad_Opcode },
7276cf7f2e2dSJohn Marino { Bad_Opcode },
7277cf7f2e2dSJohn Marino { Bad_Opcode },
7278cf7f2e2dSJohn Marino { Bad_Opcode },
7279cf7f2e2dSJohn Marino { Bad_Opcode },
7280cf7f2e2dSJohn Marino /* 08 */
7281cf7f2e2dSJohn Marino { Bad_Opcode },
7282cf7f2e2dSJohn Marino { Bad_Opcode },
7283cf7f2e2dSJohn Marino { Bad_Opcode },
7284cf7f2e2dSJohn Marino { Bad_Opcode },
7285cf7f2e2dSJohn Marino { Bad_Opcode },
7286cf7f2e2dSJohn Marino { Bad_Opcode },
7287cf7f2e2dSJohn Marino { Bad_Opcode },
7288cf7f2e2dSJohn Marino { Bad_Opcode },
7289cf7f2e2dSJohn Marino /* 10 */
7290c50c785cSJohn Marino { "bextr", { Gv, Ev, Iq } },
7291cf7f2e2dSJohn Marino { Bad_Opcode },
7292cf7f2e2dSJohn Marino { REG_TABLE (REG_XOP_LWP) },
7293cf7f2e2dSJohn Marino { Bad_Opcode },
7294cf7f2e2dSJohn Marino { Bad_Opcode },
7295cf7f2e2dSJohn Marino { Bad_Opcode },
7296cf7f2e2dSJohn Marino { Bad_Opcode },
7297cf7f2e2dSJohn Marino { Bad_Opcode },
7298cf7f2e2dSJohn Marino /* 18 */
7299cf7f2e2dSJohn Marino { Bad_Opcode },
7300cf7f2e2dSJohn Marino { Bad_Opcode },
7301cf7f2e2dSJohn Marino { Bad_Opcode },
7302cf7f2e2dSJohn Marino { Bad_Opcode },
7303cf7f2e2dSJohn Marino { Bad_Opcode },
7304cf7f2e2dSJohn Marino { Bad_Opcode },
7305cf7f2e2dSJohn Marino { Bad_Opcode },
7306cf7f2e2dSJohn Marino { Bad_Opcode },
7307cf7f2e2dSJohn Marino /* 20 */
7308cf7f2e2dSJohn Marino { Bad_Opcode },
7309cf7f2e2dSJohn Marino { Bad_Opcode },
7310cf7f2e2dSJohn Marino { Bad_Opcode },
7311cf7f2e2dSJohn Marino { Bad_Opcode },
7312cf7f2e2dSJohn Marino { Bad_Opcode },
7313cf7f2e2dSJohn Marino { Bad_Opcode },
7314cf7f2e2dSJohn Marino { Bad_Opcode },
7315cf7f2e2dSJohn Marino { Bad_Opcode },
7316cf7f2e2dSJohn Marino /* 28 */
7317cf7f2e2dSJohn Marino { Bad_Opcode },
7318cf7f2e2dSJohn Marino { Bad_Opcode },
7319cf7f2e2dSJohn Marino { Bad_Opcode },
7320cf7f2e2dSJohn Marino { Bad_Opcode },
7321cf7f2e2dSJohn Marino { Bad_Opcode },
7322cf7f2e2dSJohn Marino { Bad_Opcode },
7323cf7f2e2dSJohn Marino { Bad_Opcode },
7324cf7f2e2dSJohn Marino { Bad_Opcode },
7325cf7f2e2dSJohn Marino /* 30 */
7326cf7f2e2dSJohn Marino { Bad_Opcode },
7327cf7f2e2dSJohn Marino { Bad_Opcode },
7328cf7f2e2dSJohn Marino { Bad_Opcode },
7329cf7f2e2dSJohn Marino { Bad_Opcode },
7330cf7f2e2dSJohn Marino { Bad_Opcode },
7331cf7f2e2dSJohn Marino { Bad_Opcode },
7332cf7f2e2dSJohn Marino { Bad_Opcode },
7333cf7f2e2dSJohn Marino { Bad_Opcode },
7334cf7f2e2dSJohn Marino /* 38 */
7335cf7f2e2dSJohn Marino { Bad_Opcode },
7336cf7f2e2dSJohn Marino { Bad_Opcode },
7337cf7f2e2dSJohn Marino { Bad_Opcode },
7338cf7f2e2dSJohn Marino { Bad_Opcode },
7339cf7f2e2dSJohn Marino { Bad_Opcode },
7340cf7f2e2dSJohn Marino { Bad_Opcode },
7341cf7f2e2dSJohn Marino { Bad_Opcode },
7342cf7f2e2dSJohn Marino { Bad_Opcode },
7343cf7f2e2dSJohn Marino /* 40 */
7344cf7f2e2dSJohn Marino { Bad_Opcode },
7345cf7f2e2dSJohn Marino { Bad_Opcode },
7346cf7f2e2dSJohn Marino { Bad_Opcode },
7347cf7f2e2dSJohn Marino { Bad_Opcode },
7348cf7f2e2dSJohn Marino { Bad_Opcode },
7349cf7f2e2dSJohn Marino { Bad_Opcode },
7350cf7f2e2dSJohn Marino { Bad_Opcode },
7351cf7f2e2dSJohn Marino { Bad_Opcode },
7352cf7f2e2dSJohn Marino /* 48 */
7353cf7f2e2dSJohn Marino { Bad_Opcode },
7354cf7f2e2dSJohn Marino { Bad_Opcode },
7355cf7f2e2dSJohn Marino { Bad_Opcode },
7356cf7f2e2dSJohn Marino { Bad_Opcode },
7357cf7f2e2dSJohn Marino { Bad_Opcode },
7358cf7f2e2dSJohn Marino { Bad_Opcode },
7359cf7f2e2dSJohn Marino { Bad_Opcode },
7360cf7f2e2dSJohn Marino { Bad_Opcode },
7361cf7f2e2dSJohn Marino /* 50 */
7362cf7f2e2dSJohn Marino { Bad_Opcode },
7363cf7f2e2dSJohn Marino { Bad_Opcode },
7364cf7f2e2dSJohn Marino { Bad_Opcode },
7365cf7f2e2dSJohn Marino { Bad_Opcode },
7366cf7f2e2dSJohn Marino { Bad_Opcode },
7367cf7f2e2dSJohn Marino { Bad_Opcode },
7368cf7f2e2dSJohn Marino { Bad_Opcode },
7369cf7f2e2dSJohn Marino { Bad_Opcode },
7370cf7f2e2dSJohn Marino /* 58 */
7371cf7f2e2dSJohn Marino { Bad_Opcode },
7372cf7f2e2dSJohn Marino { Bad_Opcode },
7373cf7f2e2dSJohn Marino { Bad_Opcode },
7374cf7f2e2dSJohn Marino { Bad_Opcode },
7375cf7f2e2dSJohn Marino { Bad_Opcode },
7376cf7f2e2dSJohn Marino { Bad_Opcode },
7377cf7f2e2dSJohn Marino { Bad_Opcode },
7378cf7f2e2dSJohn Marino { Bad_Opcode },
7379cf7f2e2dSJohn Marino /* 60 */
7380cf7f2e2dSJohn Marino { Bad_Opcode },
7381cf7f2e2dSJohn Marino { Bad_Opcode },
7382cf7f2e2dSJohn Marino { Bad_Opcode },
7383cf7f2e2dSJohn Marino { Bad_Opcode },
7384cf7f2e2dSJohn Marino { Bad_Opcode },
7385cf7f2e2dSJohn Marino { Bad_Opcode },
7386cf7f2e2dSJohn Marino { Bad_Opcode },
7387cf7f2e2dSJohn Marino { Bad_Opcode },
7388cf7f2e2dSJohn Marino /* 68 */
7389cf7f2e2dSJohn Marino { Bad_Opcode },
7390cf7f2e2dSJohn Marino { Bad_Opcode },
7391cf7f2e2dSJohn Marino { Bad_Opcode },
7392cf7f2e2dSJohn Marino { Bad_Opcode },
7393cf7f2e2dSJohn Marino { Bad_Opcode },
7394cf7f2e2dSJohn Marino { Bad_Opcode },
7395cf7f2e2dSJohn Marino { Bad_Opcode },
7396cf7f2e2dSJohn Marino { Bad_Opcode },
7397cf7f2e2dSJohn Marino /* 70 */
7398cf7f2e2dSJohn Marino { Bad_Opcode },
7399cf7f2e2dSJohn Marino { Bad_Opcode },
7400cf7f2e2dSJohn Marino { Bad_Opcode },
7401cf7f2e2dSJohn Marino { Bad_Opcode },
7402cf7f2e2dSJohn Marino { Bad_Opcode },
7403cf7f2e2dSJohn Marino { Bad_Opcode },
7404cf7f2e2dSJohn Marino { Bad_Opcode },
7405cf7f2e2dSJohn Marino { Bad_Opcode },
7406cf7f2e2dSJohn Marino /* 78 */
7407cf7f2e2dSJohn Marino { Bad_Opcode },
7408cf7f2e2dSJohn Marino { Bad_Opcode },
7409cf7f2e2dSJohn Marino { Bad_Opcode },
7410cf7f2e2dSJohn Marino { Bad_Opcode },
7411cf7f2e2dSJohn Marino { Bad_Opcode },
7412cf7f2e2dSJohn Marino { Bad_Opcode },
7413cf7f2e2dSJohn Marino { Bad_Opcode },
7414cf7f2e2dSJohn Marino { Bad_Opcode },
7415cf7f2e2dSJohn Marino /* 80 */
7416cf7f2e2dSJohn Marino { Bad_Opcode },
7417cf7f2e2dSJohn Marino { Bad_Opcode },
7418cf7f2e2dSJohn Marino { Bad_Opcode },
7419cf7f2e2dSJohn Marino { Bad_Opcode },
7420cf7f2e2dSJohn Marino { Bad_Opcode },
7421cf7f2e2dSJohn Marino { Bad_Opcode },
7422cf7f2e2dSJohn Marino { Bad_Opcode },
7423cf7f2e2dSJohn Marino { Bad_Opcode },
7424cf7f2e2dSJohn Marino /* 88 */
7425cf7f2e2dSJohn Marino { Bad_Opcode },
7426cf7f2e2dSJohn Marino { Bad_Opcode },
7427cf7f2e2dSJohn Marino { Bad_Opcode },
7428cf7f2e2dSJohn Marino { Bad_Opcode },
7429cf7f2e2dSJohn Marino { Bad_Opcode },
7430cf7f2e2dSJohn Marino { Bad_Opcode },
7431cf7f2e2dSJohn Marino { Bad_Opcode },
7432cf7f2e2dSJohn Marino { Bad_Opcode },
7433cf7f2e2dSJohn Marino /* 90 */
7434cf7f2e2dSJohn Marino { Bad_Opcode },
7435cf7f2e2dSJohn Marino { Bad_Opcode },
7436cf7f2e2dSJohn Marino { Bad_Opcode },
7437cf7f2e2dSJohn Marino { Bad_Opcode },
7438cf7f2e2dSJohn Marino { Bad_Opcode },
7439cf7f2e2dSJohn Marino { Bad_Opcode },
7440cf7f2e2dSJohn Marino { Bad_Opcode },
7441cf7f2e2dSJohn Marino { Bad_Opcode },
7442cf7f2e2dSJohn Marino /* 98 */
7443cf7f2e2dSJohn Marino { Bad_Opcode },
7444cf7f2e2dSJohn Marino { Bad_Opcode },
7445cf7f2e2dSJohn Marino { Bad_Opcode },
7446cf7f2e2dSJohn Marino { Bad_Opcode },
7447cf7f2e2dSJohn Marino { Bad_Opcode },
7448cf7f2e2dSJohn Marino { Bad_Opcode },
7449cf7f2e2dSJohn Marino { Bad_Opcode },
7450cf7f2e2dSJohn Marino { Bad_Opcode },
7451cf7f2e2dSJohn Marino /* a0 */
7452cf7f2e2dSJohn Marino { Bad_Opcode },
7453cf7f2e2dSJohn Marino { Bad_Opcode },
7454cf7f2e2dSJohn Marino { Bad_Opcode },
7455cf7f2e2dSJohn Marino { Bad_Opcode },
7456cf7f2e2dSJohn Marino { Bad_Opcode },
7457cf7f2e2dSJohn Marino { Bad_Opcode },
7458cf7f2e2dSJohn Marino { Bad_Opcode },
7459cf7f2e2dSJohn Marino { Bad_Opcode },
7460cf7f2e2dSJohn Marino /* a8 */
7461cf7f2e2dSJohn Marino { Bad_Opcode },
7462cf7f2e2dSJohn Marino { Bad_Opcode },
7463cf7f2e2dSJohn Marino { Bad_Opcode },
7464cf7f2e2dSJohn Marino { Bad_Opcode },
7465cf7f2e2dSJohn Marino { Bad_Opcode },
7466cf7f2e2dSJohn Marino { Bad_Opcode },
7467cf7f2e2dSJohn Marino { Bad_Opcode },
7468cf7f2e2dSJohn Marino { Bad_Opcode },
7469cf7f2e2dSJohn Marino /* b0 */
7470cf7f2e2dSJohn Marino { Bad_Opcode },
7471cf7f2e2dSJohn Marino { Bad_Opcode },
7472cf7f2e2dSJohn Marino { Bad_Opcode },
7473cf7f2e2dSJohn Marino { Bad_Opcode },
7474cf7f2e2dSJohn Marino { Bad_Opcode },
7475cf7f2e2dSJohn Marino { Bad_Opcode },
7476cf7f2e2dSJohn Marino { Bad_Opcode },
7477cf7f2e2dSJohn Marino { Bad_Opcode },
7478cf7f2e2dSJohn Marino /* b8 */
7479cf7f2e2dSJohn Marino { Bad_Opcode },
7480cf7f2e2dSJohn Marino { Bad_Opcode },
7481cf7f2e2dSJohn Marino { Bad_Opcode },
7482cf7f2e2dSJohn Marino { Bad_Opcode },
7483cf7f2e2dSJohn Marino { Bad_Opcode },
7484cf7f2e2dSJohn Marino { Bad_Opcode },
7485cf7f2e2dSJohn Marino { Bad_Opcode },
7486cf7f2e2dSJohn Marino { Bad_Opcode },
7487cf7f2e2dSJohn Marino /* c0 */
7488cf7f2e2dSJohn Marino { Bad_Opcode },
7489cf7f2e2dSJohn Marino { Bad_Opcode },
7490cf7f2e2dSJohn Marino { Bad_Opcode },
7491cf7f2e2dSJohn Marino { Bad_Opcode },
7492cf7f2e2dSJohn Marino { Bad_Opcode },
7493cf7f2e2dSJohn Marino { Bad_Opcode },
7494cf7f2e2dSJohn Marino { Bad_Opcode },
7495cf7f2e2dSJohn Marino { Bad_Opcode },
7496cf7f2e2dSJohn Marino /* c8 */
7497cf7f2e2dSJohn Marino { Bad_Opcode },
7498cf7f2e2dSJohn Marino { Bad_Opcode },
7499cf7f2e2dSJohn Marino { Bad_Opcode },
7500cf7f2e2dSJohn Marino { Bad_Opcode },
7501cf7f2e2dSJohn Marino { Bad_Opcode },
7502cf7f2e2dSJohn Marino { Bad_Opcode },
7503cf7f2e2dSJohn Marino { Bad_Opcode },
7504cf7f2e2dSJohn Marino { Bad_Opcode },
7505cf7f2e2dSJohn Marino /* d0 */
7506cf7f2e2dSJohn Marino { Bad_Opcode },
7507cf7f2e2dSJohn Marino { Bad_Opcode },
7508cf7f2e2dSJohn Marino { Bad_Opcode },
7509cf7f2e2dSJohn Marino { Bad_Opcode },
7510cf7f2e2dSJohn Marino { Bad_Opcode },
7511cf7f2e2dSJohn Marino { Bad_Opcode },
7512cf7f2e2dSJohn Marino { Bad_Opcode },
7513cf7f2e2dSJohn Marino { Bad_Opcode },
7514cf7f2e2dSJohn Marino /* d8 */
7515cf7f2e2dSJohn Marino { Bad_Opcode },
7516cf7f2e2dSJohn Marino { Bad_Opcode },
7517cf7f2e2dSJohn Marino { Bad_Opcode },
7518cf7f2e2dSJohn Marino { Bad_Opcode },
7519cf7f2e2dSJohn Marino { Bad_Opcode },
7520cf7f2e2dSJohn Marino { Bad_Opcode },
7521cf7f2e2dSJohn Marino { Bad_Opcode },
7522cf7f2e2dSJohn Marino { Bad_Opcode },
7523cf7f2e2dSJohn Marino /* e0 */
7524cf7f2e2dSJohn Marino { Bad_Opcode },
7525cf7f2e2dSJohn Marino { Bad_Opcode },
7526cf7f2e2dSJohn Marino { Bad_Opcode },
7527cf7f2e2dSJohn Marino { Bad_Opcode },
7528cf7f2e2dSJohn Marino { Bad_Opcode },
7529cf7f2e2dSJohn Marino { Bad_Opcode },
7530cf7f2e2dSJohn Marino { Bad_Opcode },
7531cf7f2e2dSJohn Marino { Bad_Opcode },
7532cf7f2e2dSJohn Marino /* e8 */
7533cf7f2e2dSJohn Marino { Bad_Opcode },
7534cf7f2e2dSJohn Marino { Bad_Opcode },
7535cf7f2e2dSJohn Marino { Bad_Opcode },
7536cf7f2e2dSJohn Marino { Bad_Opcode },
7537cf7f2e2dSJohn Marino { Bad_Opcode },
7538cf7f2e2dSJohn Marino { Bad_Opcode },
7539cf7f2e2dSJohn Marino { Bad_Opcode },
7540cf7f2e2dSJohn Marino { Bad_Opcode },
7541cf7f2e2dSJohn Marino /* f0 */
7542cf7f2e2dSJohn Marino { Bad_Opcode },
7543cf7f2e2dSJohn Marino { Bad_Opcode },
7544cf7f2e2dSJohn Marino { Bad_Opcode },
7545cf7f2e2dSJohn Marino { Bad_Opcode },
7546cf7f2e2dSJohn Marino { Bad_Opcode },
7547cf7f2e2dSJohn Marino { Bad_Opcode },
7548cf7f2e2dSJohn Marino { Bad_Opcode },
7549cf7f2e2dSJohn Marino { Bad_Opcode },
7550cf7f2e2dSJohn Marino /* f8 */
7551cf7f2e2dSJohn Marino { Bad_Opcode },
7552cf7f2e2dSJohn Marino { Bad_Opcode },
7553cf7f2e2dSJohn Marino { Bad_Opcode },
7554cf7f2e2dSJohn Marino { Bad_Opcode },
7555cf7f2e2dSJohn Marino { Bad_Opcode },
7556cf7f2e2dSJohn Marino { Bad_Opcode },
7557cf7f2e2dSJohn Marino { Bad_Opcode },
7558cf7f2e2dSJohn Marino { Bad_Opcode },
7559cf7f2e2dSJohn Marino },
7560cf7f2e2dSJohn Marino };
75615796c8dcSSimon Schubert
75625796c8dcSSimon Schubert static const struct dis386 vex_table[][256] = {
75635796c8dcSSimon Schubert /* VEX_0F */
75645796c8dcSSimon Schubert {
75655796c8dcSSimon Schubert /* 00 */
7566cf7f2e2dSJohn Marino { Bad_Opcode },
7567cf7f2e2dSJohn Marino { Bad_Opcode },
7568cf7f2e2dSJohn Marino { Bad_Opcode },
7569cf7f2e2dSJohn Marino { Bad_Opcode },
7570cf7f2e2dSJohn Marino { Bad_Opcode },
7571cf7f2e2dSJohn Marino { Bad_Opcode },
7572cf7f2e2dSJohn Marino { Bad_Opcode },
7573cf7f2e2dSJohn Marino { Bad_Opcode },
75745796c8dcSSimon Schubert /* 08 */
7575cf7f2e2dSJohn Marino { Bad_Opcode },
7576cf7f2e2dSJohn Marino { Bad_Opcode },
7577cf7f2e2dSJohn Marino { Bad_Opcode },
7578cf7f2e2dSJohn Marino { Bad_Opcode },
7579cf7f2e2dSJohn Marino { Bad_Opcode },
7580cf7f2e2dSJohn Marino { Bad_Opcode },
7581cf7f2e2dSJohn Marino { Bad_Opcode },
7582cf7f2e2dSJohn Marino { Bad_Opcode },
75835796c8dcSSimon Schubert /* 10 */
7584c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F10) },
7585c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F11) },
7586c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F12) },
7587c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F13) },
7588c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F14) },
7589c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F15) },
7590c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F16) },
7591c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F17) },
75925796c8dcSSimon Schubert /* 18 */
7593cf7f2e2dSJohn Marino { Bad_Opcode },
7594cf7f2e2dSJohn Marino { Bad_Opcode },
7595cf7f2e2dSJohn Marino { Bad_Opcode },
7596cf7f2e2dSJohn Marino { Bad_Opcode },
7597cf7f2e2dSJohn Marino { Bad_Opcode },
7598cf7f2e2dSJohn Marino { Bad_Opcode },
7599cf7f2e2dSJohn Marino { Bad_Opcode },
7600cf7f2e2dSJohn Marino { Bad_Opcode },
76015796c8dcSSimon Schubert /* 20 */
7602cf7f2e2dSJohn Marino { Bad_Opcode },
7603cf7f2e2dSJohn Marino { Bad_Opcode },
7604cf7f2e2dSJohn Marino { Bad_Opcode },
7605cf7f2e2dSJohn Marino { Bad_Opcode },
7606cf7f2e2dSJohn Marino { Bad_Opcode },
7607cf7f2e2dSJohn Marino { Bad_Opcode },
7608cf7f2e2dSJohn Marino { Bad_Opcode },
7609cf7f2e2dSJohn Marino { Bad_Opcode },
76105796c8dcSSimon Schubert /* 28 */
7611c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F28) },
7612c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F29) },
7613c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F2A) },
7614c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F2B) },
7615c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F2C) },
7616c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F2D) },
7617c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F2E) },
7618c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F2F) },
76195796c8dcSSimon Schubert /* 30 */
7620cf7f2e2dSJohn Marino { Bad_Opcode },
7621cf7f2e2dSJohn Marino { Bad_Opcode },
7622cf7f2e2dSJohn Marino { Bad_Opcode },
7623cf7f2e2dSJohn Marino { Bad_Opcode },
7624cf7f2e2dSJohn Marino { Bad_Opcode },
7625cf7f2e2dSJohn Marino { Bad_Opcode },
7626cf7f2e2dSJohn Marino { Bad_Opcode },
7627cf7f2e2dSJohn Marino { Bad_Opcode },
76285796c8dcSSimon Schubert /* 38 */
7629cf7f2e2dSJohn Marino { Bad_Opcode },
7630cf7f2e2dSJohn Marino { Bad_Opcode },
7631cf7f2e2dSJohn Marino { Bad_Opcode },
7632cf7f2e2dSJohn Marino { Bad_Opcode },
7633cf7f2e2dSJohn Marino { Bad_Opcode },
7634cf7f2e2dSJohn Marino { Bad_Opcode },
7635cf7f2e2dSJohn Marino { Bad_Opcode },
7636cf7f2e2dSJohn Marino { Bad_Opcode },
76375796c8dcSSimon Schubert /* 40 */
7638cf7f2e2dSJohn Marino { Bad_Opcode },
7639cf7f2e2dSJohn Marino { Bad_Opcode },
7640cf7f2e2dSJohn Marino { Bad_Opcode },
7641cf7f2e2dSJohn Marino { Bad_Opcode },
7642cf7f2e2dSJohn Marino { Bad_Opcode },
7643cf7f2e2dSJohn Marino { Bad_Opcode },
7644cf7f2e2dSJohn Marino { Bad_Opcode },
7645cf7f2e2dSJohn Marino { Bad_Opcode },
76465796c8dcSSimon Schubert /* 48 */
7647cf7f2e2dSJohn Marino { Bad_Opcode },
7648cf7f2e2dSJohn Marino { Bad_Opcode },
7649cf7f2e2dSJohn Marino { Bad_Opcode },
7650cf7f2e2dSJohn Marino { Bad_Opcode },
7651cf7f2e2dSJohn Marino { Bad_Opcode },
7652cf7f2e2dSJohn Marino { Bad_Opcode },
7653cf7f2e2dSJohn Marino { Bad_Opcode },
7654cf7f2e2dSJohn Marino { Bad_Opcode },
76555796c8dcSSimon Schubert /* 50 */
7656c50c785cSJohn Marino { MOD_TABLE (MOD_VEX_0F50) },
7657c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F51) },
7658c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F52) },
7659c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F53) },
76605796c8dcSSimon Schubert { "vandpX", { XM, Vex, EXx } },
76615796c8dcSSimon Schubert { "vandnpX", { XM, Vex, EXx } },
76625796c8dcSSimon Schubert { "vorpX", { XM, Vex, EXx } },
76635796c8dcSSimon Schubert { "vxorpX", { XM, Vex, EXx } },
76645796c8dcSSimon Schubert /* 58 */
7665c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F58) },
7666c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F59) },
7667c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F5A) },
7668c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F5B) },
7669c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F5C) },
7670c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F5D) },
7671c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F5E) },
7672c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F5F) },
76735796c8dcSSimon Schubert /* 60 */
7674c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F60) },
7675c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F61) },
7676c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F62) },
7677c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F63) },
7678c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F64) },
7679c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F65) },
7680c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F66) },
7681c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F67) },
76825796c8dcSSimon Schubert /* 68 */
7683c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F68) },
7684c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F69) },
7685c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F6A) },
7686c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F6B) },
7687c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F6C) },
7688c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F6D) },
7689c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F6E) },
7690c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F6F) },
76915796c8dcSSimon Schubert /* 70 */
7692c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F70) },
7693c50c785cSJohn Marino { REG_TABLE (REG_VEX_0F71) },
7694c50c785cSJohn Marino { REG_TABLE (REG_VEX_0F72) },
7695c50c785cSJohn Marino { REG_TABLE (REG_VEX_0F73) },
7696c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F74) },
7697c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F75) },
7698c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F76) },
7699c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F77) },
77005796c8dcSSimon Schubert /* 78 */
7701cf7f2e2dSJohn Marino { Bad_Opcode },
7702cf7f2e2dSJohn Marino { Bad_Opcode },
7703cf7f2e2dSJohn Marino { Bad_Opcode },
7704cf7f2e2dSJohn Marino { Bad_Opcode },
7705c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F7C) },
7706c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F7D) },
7707c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F7E) },
7708c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F7F) },
77095796c8dcSSimon Schubert /* 80 */
7710cf7f2e2dSJohn Marino { Bad_Opcode },
7711cf7f2e2dSJohn Marino { Bad_Opcode },
7712cf7f2e2dSJohn Marino { Bad_Opcode },
7713cf7f2e2dSJohn Marino { Bad_Opcode },
7714cf7f2e2dSJohn Marino { Bad_Opcode },
7715cf7f2e2dSJohn Marino { Bad_Opcode },
7716cf7f2e2dSJohn Marino { Bad_Opcode },
7717cf7f2e2dSJohn Marino { Bad_Opcode },
77185796c8dcSSimon Schubert /* 88 */
7719cf7f2e2dSJohn Marino { Bad_Opcode },
7720cf7f2e2dSJohn Marino { Bad_Opcode },
7721cf7f2e2dSJohn Marino { Bad_Opcode },
7722cf7f2e2dSJohn Marino { Bad_Opcode },
7723cf7f2e2dSJohn Marino { Bad_Opcode },
7724cf7f2e2dSJohn Marino { Bad_Opcode },
7725cf7f2e2dSJohn Marino { Bad_Opcode },
7726cf7f2e2dSJohn Marino { Bad_Opcode },
77275796c8dcSSimon Schubert /* 90 */
7728cf7f2e2dSJohn Marino { Bad_Opcode },
7729cf7f2e2dSJohn Marino { Bad_Opcode },
7730cf7f2e2dSJohn Marino { Bad_Opcode },
7731cf7f2e2dSJohn Marino { Bad_Opcode },
7732cf7f2e2dSJohn Marino { Bad_Opcode },
7733cf7f2e2dSJohn Marino { Bad_Opcode },
7734cf7f2e2dSJohn Marino { Bad_Opcode },
7735cf7f2e2dSJohn Marino { Bad_Opcode },
77365796c8dcSSimon Schubert /* 98 */
7737cf7f2e2dSJohn Marino { Bad_Opcode },
7738cf7f2e2dSJohn Marino { Bad_Opcode },
7739cf7f2e2dSJohn Marino { Bad_Opcode },
7740cf7f2e2dSJohn Marino { Bad_Opcode },
7741cf7f2e2dSJohn Marino { Bad_Opcode },
7742cf7f2e2dSJohn Marino { Bad_Opcode },
7743cf7f2e2dSJohn Marino { Bad_Opcode },
7744cf7f2e2dSJohn Marino { Bad_Opcode },
77455796c8dcSSimon Schubert /* a0 */
7746cf7f2e2dSJohn Marino { Bad_Opcode },
7747cf7f2e2dSJohn Marino { Bad_Opcode },
7748cf7f2e2dSJohn Marino { Bad_Opcode },
7749cf7f2e2dSJohn Marino { Bad_Opcode },
7750cf7f2e2dSJohn Marino { Bad_Opcode },
7751cf7f2e2dSJohn Marino { Bad_Opcode },
7752cf7f2e2dSJohn Marino { Bad_Opcode },
7753cf7f2e2dSJohn Marino { Bad_Opcode },
77545796c8dcSSimon Schubert /* a8 */
7755cf7f2e2dSJohn Marino { Bad_Opcode },
7756cf7f2e2dSJohn Marino { Bad_Opcode },
7757cf7f2e2dSJohn Marino { Bad_Opcode },
7758cf7f2e2dSJohn Marino { Bad_Opcode },
7759cf7f2e2dSJohn Marino { Bad_Opcode },
7760cf7f2e2dSJohn Marino { Bad_Opcode },
7761c50c785cSJohn Marino { REG_TABLE (REG_VEX_0FAE) },
7762cf7f2e2dSJohn Marino { Bad_Opcode },
77635796c8dcSSimon Schubert /* b0 */
7764cf7f2e2dSJohn Marino { Bad_Opcode },
7765cf7f2e2dSJohn Marino { Bad_Opcode },
7766cf7f2e2dSJohn Marino { Bad_Opcode },
7767cf7f2e2dSJohn Marino { Bad_Opcode },
7768cf7f2e2dSJohn Marino { Bad_Opcode },
7769cf7f2e2dSJohn Marino { Bad_Opcode },
7770cf7f2e2dSJohn Marino { Bad_Opcode },
7771cf7f2e2dSJohn Marino { Bad_Opcode },
77725796c8dcSSimon Schubert /* b8 */
7773cf7f2e2dSJohn Marino { Bad_Opcode },
7774cf7f2e2dSJohn Marino { Bad_Opcode },
7775cf7f2e2dSJohn Marino { Bad_Opcode },
7776cf7f2e2dSJohn Marino { Bad_Opcode },
7777cf7f2e2dSJohn Marino { Bad_Opcode },
7778cf7f2e2dSJohn Marino { Bad_Opcode },
7779cf7f2e2dSJohn Marino { Bad_Opcode },
7780cf7f2e2dSJohn Marino { Bad_Opcode },
77815796c8dcSSimon Schubert /* c0 */
7782cf7f2e2dSJohn Marino { Bad_Opcode },
7783cf7f2e2dSJohn Marino { Bad_Opcode },
7784c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FC2) },
7785cf7f2e2dSJohn Marino { Bad_Opcode },
7786c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FC4) },
7787c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FC5) },
77885796c8dcSSimon Schubert { "vshufpX", { XM, Vex, EXx, Ib } },
7789cf7f2e2dSJohn Marino { Bad_Opcode },
77905796c8dcSSimon Schubert /* c8 */
7791cf7f2e2dSJohn Marino { Bad_Opcode },
7792cf7f2e2dSJohn Marino { Bad_Opcode },
7793cf7f2e2dSJohn Marino { Bad_Opcode },
7794cf7f2e2dSJohn Marino { Bad_Opcode },
7795cf7f2e2dSJohn Marino { Bad_Opcode },
7796cf7f2e2dSJohn Marino { Bad_Opcode },
7797cf7f2e2dSJohn Marino { Bad_Opcode },
7798cf7f2e2dSJohn Marino { Bad_Opcode },
77995796c8dcSSimon Schubert /* d0 */
7800c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD0) },
7801c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD1) },
7802c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD2) },
7803c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD3) },
7804c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD4) },
7805c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD5) },
7806c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD6) },
7807c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD7) },
78085796c8dcSSimon Schubert /* d8 */
7809c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD8) },
7810c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FD9) },
7811c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FDA) },
7812c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FDB) },
7813c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FDC) },
7814c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FDD) },
7815c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FDE) },
7816c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FDF) },
78175796c8dcSSimon Schubert /* e0 */
7818c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE0) },
7819c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE1) },
7820c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE2) },
7821c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE3) },
7822c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE4) },
7823c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE5) },
7824c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE6) },
7825c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE7) },
78265796c8dcSSimon Schubert /* e8 */
7827c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE8) },
7828c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FE9) },
7829c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FEA) },
7830c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FEB) },
7831c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FEC) },
7832c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FED) },
7833c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FEE) },
7834c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FEF) },
78355796c8dcSSimon Schubert /* f0 */
7836c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF0) },
7837c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF1) },
7838c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF2) },
7839c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF3) },
7840c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF4) },
7841c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF5) },
7842c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF6) },
7843c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF7) },
78445796c8dcSSimon Schubert /* f8 */
7845c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF8) },
7846c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FF9) },
7847c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FFA) },
7848c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FFB) },
7849c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FFC) },
7850c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FFD) },
7851c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0FFE) },
7852cf7f2e2dSJohn Marino { Bad_Opcode },
78535796c8dcSSimon Schubert },
78545796c8dcSSimon Schubert /* VEX_0F38 */
78555796c8dcSSimon Schubert {
78565796c8dcSSimon Schubert /* 00 */
7857c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3800) },
7858c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3801) },
7859c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3802) },
7860c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3803) },
7861c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3804) },
7862c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3805) },
7863c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3806) },
7864c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3807) },
78655796c8dcSSimon Schubert /* 08 */
7866c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3808) },
7867c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3809) },
7868c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F380A) },
7869c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F380B) },
7870c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F380C) },
7871c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F380D) },
7872c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F380E) },
7873c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F380F) },
78745796c8dcSSimon Schubert /* 10 */
7875cf7f2e2dSJohn Marino { Bad_Opcode },
7876cf7f2e2dSJohn Marino { Bad_Opcode },
7877cf7f2e2dSJohn Marino { Bad_Opcode },
7878c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3813) },
7879cf7f2e2dSJohn Marino { Bad_Opcode },
7880cf7f2e2dSJohn Marino { Bad_Opcode },
7881a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3816) },
7882c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3817) },
78835796c8dcSSimon Schubert /* 18 */
7884c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3818) },
7885c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3819) },
7886c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F381A) },
7887cf7f2e2dSJohn Marino { Bad_Opcode },
7888c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F381C) },
7889c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F381D) },
7890c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F381E) },
7891cf7f2e2dSJohn Marino { Bad_Opcode },
78925796c8dcSSimon Schubert /* 20 */
7893c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3820) },
7894c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3821) },
7895c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3822) },
7896c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3823) },
7897c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3824) },
7898c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3825) },
7899cf7f2e2dSJohn Marino { Bad_Opcode },
7900cf7f2e2dSJohn Marino { Bad_Opcode },
79015796c8dcSSimon Schubert /* 28 */
7902c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3828) },
7903c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3829) },
7904c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F382A) },
7905c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F382B) },
7906c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F382C) },
7907c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F382D) },
7908c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F382E) },
7909c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F382F) },
79105796c8dcSSimon Schubert /* 30 */
7911c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3830) },
7912c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3831) },
7913c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3832) },
7914c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3833) },
7915c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3834) },
7916c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3835) },
7917a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3836) },
7918c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3837) },
79195796c8dcSSimon Schubert /* 38 */
7920c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3838) },
7921c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3839) },
7922c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F383A) },
7923c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F383B) },
7924c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F383C) },
7925c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F383D) },
7926c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F383E) },
7927c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F383F) },
79285796c8dcSSimon Schubert /* 40 */
7929c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3840) },
7930c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3841) },
7931cf7f2e2dSJohn Marino { Bad_Opcode },
7932cf7f2e2dSJohn Marino { Bad_Opcode },
7933cf7f2e2dSJohn Marino { Bad_Opcode },
7934a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3845) },
7935a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3846) },
7936a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3847) },
79375796c8dcSSimon Schubert /* 48 */
7938cf7f2e2dSJohn Marino { Bad_Opcode },
7939cf7f2e2dSJohn Marino { Bad_Opcode },
7940cf7f2e2dSJohn Marino { Bad_Opcode },
7941cf7f2e2dSJohn Marino { Bad_Opcode },
7942cf7f2e2dSJohn Marino { Bad_Opcode },
7943cf7f2e2dSJohn Marino { Bad_Opcode },
7944cf7f2e2dSJohn Marino { Bad_Opcode },
7945cf7f2e2dSJohn Marino { Bad_Opcode },
79465796c8dcSSimon Schubert /* 50 */
7947cf7f2e2dSJohn Marino { Bad_Opcode },
7948cf7f2e2dSJohn Marino { Bad_Opcode },
7949cf7f2e2dSJohn Marino { Bad_Opcode },
7950cf7f2e2dSJohn Marino { Bad_Opcode },
7951cf7f2e2dSJohn Marino { Bad_Opcode },
7952cf7f2e2dSJohn Marino { Bad_Opcode },
7953cf7f2e2dSJohn Marino { Bad_Opcode },
7954cf7f2e2dSJohn Marino { Bad_Opcode },
79555796c8dcSSimon Schubert /* 58 */
7956a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3858) },
7957a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3859) },
7958a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F385A) },
7959cf7f2e2dSJohn Marino { Bad_Opcode },
7960cf7f2e2dSJohn Marino { Bad_Opcode },
7961cf7f2e2dSJohn Marino { Bad_Opcode },
7962cf7f2e2dSJohn Marino { Bad_Opcode },
7963cf7f2e2dSJohn Marino { Bad_Opcode },
79645796c8dcSSimon Schubert /* 60 */
7965cf7f2e2dSJohn Marino { Bad_Opcode },
7966cf7f2e2dSJohn Marino { Bad_Opcode },
7967cf7f2e2dSJohn Marino { Bad_Opcode },
7968cf7f2e2dSJohn Marino { Bad_Opcode },
7969cf7f2e2dSJohn Marino { Bad_Opcode },
7970cf7f2e2dSJohn Marino { Bad_Opcode },
7971cf7f2e2dSJohn Marino { Bad_Opcode },
7972cf7f2e2dSJohn Marino { Bad_Opcode },
79735796c8dcSSimon Schubert /* 68 */
7974cf7f2e2dSJohn Marino { Bad_Opcode },
7975cf7f2e2dSJohn Marino { Bad_Opcode },
7976cf7f2e2dSJohn Marino { Bad_Opcode },
7977cf7f2e2dSJohn Marino { Bad_Opcode },
7978cf7f2e2dSJohn Marino { Bad_Opcode },
7979cf7f2e2dSJohn Marino { Bad_Opcode },
7980cf7f2e2dSJohn Marino { Bad_Opcode },
7981cf7f2e2dSJohn Marino { Bad_Opcode },
79825796c8dcSSimon Schubert /* 70 */
7983cf7f2e2dSJohn Marino { Bad_Opcode },
7984cf7f2e2dSJohn Marino { Bad_Opcode },
7985cf7f2e2dSJohn Marino { Bad_Opcode },
7986cf7f2e2dSJohn Marino { Bad_Opcode },
7987cf7f2e2dSJohn Marino { Bad_Opcode },
7988cf7f2e2dSJohn Marino { Bad_Opcode },
7989cf7f2e2dSJohn Marino { Bad_Opcode },
7990cf7f2e2dSJohn Marino { Bad_Opcode },
79915796c8dcSSimon Schubert /* 78 */
7992a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3878) },
7993a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3879) },
7994cf7f2e2dSJohn Marino { Bad_Opcode },
7995cf7f2e2dSJohn Marino { Bad_Opcode },
7996cf7f2e2dSJohn Marino { Bad_Opcode },
7997cf7f2e2dSJohn Marino { Bad_Opcode },
7998cf7f2e2dSJohn Marino { Bad_Opcode },
7999cf7f2e2dSJohn Marino { Bad_Opcode },
80005796c8dcSSimon Schubert /* 80 */
8001cf7f2e2dSJohn Marino { Bad_Opcode },
8002cf7f2e2dSJohn Marino { Bad_Opcode },
8003cf7f2e2dSJohn Marino { Bad_Opcode },
8004cf7f2e2dSJohn Marino { Bad_Opcode },
8005cf7f2e2dSJohn Marino { Bad_Opcode },
8006cf7f2e2dSJohn Marino { Bad_Opcode },
8007cf7f2e2dSJohn Marino { Bad_Opcode },
8008cf7f2e2dSJohn Marino { Bad_Opcode },
80095796c8dcSSimon Schubert /* 88 */
8010cf7f2e2dSJohn Marino { Bad_Opcode },
8011cf7f2e2dSJohn Marino { Bad_Opcode },
8012cf7f2e2dSJohn Marino { Bad_Opcode },
8013cf7f2e2dSJohn Marino { Bad_Opcode },
8014a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F388C) },
8015cf7f2e2dSJohn Marino { Bad_Opcode },
8016a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F388E) },
8017cf7f2e2dSJohn Marino { Bad_Opcode },
80185796c8dcSSimon Schubert /* 90 */
8019a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3890) },
8020a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3891) },
8021a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3892) },
8022a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3893) },
8023cf7f2e2dSJohn Marino { Bad_Opcode },
8024cf7f2e2dSJohn Marino { Bad_Opcode },
8025c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3896) },
8026c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3897) },
80275796c8dcSSimon Schubert /* 98 */
8028c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3898) },
8029c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3899) },
8030c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F389A) },
8031c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F389B) },
8032c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F389C) },
8033c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F389D) },
8034c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F389E) },
8035c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F389F) },
80365796c8dcSSimon Schubert /* a0 */
8037cf7f2e2dSJohn Marino { Bad_Opcode },
8038cf7f2e2dSJohn Marino { Bad_Opcode },
8039cf7f2e2dSJohn Marino { Bad_Opcode },
8040cf7f2e2dSJohn Marino { Bad_Opcode },
8041cf7f2e2dSJohn Marino { Bad_Opcode },
8042cf7f2e2dSJohn Marino { Bad_Opcode },
8043c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38A6) },
8044c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38A7) },
80455796c8dcSSimon Schubert /* a8 */
8046c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38A8) },
8047c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38A9) },
8048c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38AA) },
8049c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38AB) },
8050c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38AC) },
8051c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38AD) },
8052c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38AE) },
8053c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38AF) },
80545796c8dcSSimon Schubert /* b0 */
8055cf7f2e2dSJohn Marino { Bad_Opcode },
8056cf7f2e2dSJohn Marino { Bad_Opcode },
8057cf7f2e2dSJohn Marino { Bad_Opcode },
8058cf7f2e2dSJohn Marino { Bad_Opcode },
8059cf7f2e2dSJohn Marino { Bad_Opcode },
8060cf7f2e2dSJohn Marino { Bad_Opcode },
8061c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38B6) },
8062c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38B7) },
80635796c8dcSSimon Schubert /* b8 */
8064c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38B8) },
8065c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38B9) },
8066c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38BA) },
8067c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38BB) },
8068c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38BC) },
8069c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38BD) },
8070c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38BE) },
8071c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38BF) },
80725796c8dcSSimon Schubert /* c0 */
8073cf7f2e2dSJohn Marino { Bad_Opcode },
8074cf7f2e2dSJohn Marino { Bad_Opcode },
8075cf7f2e2dSJohn Marino { Bad_Opcode },
8076cf7f2e2dSJohn Marino { Bad_Opcode },
8077cf7f2e2dSJohn Marino { Bad_Opcode },
8078cf7f2e2dSJohn Marino { Bad_Opcode },
8079cf7f2e2dSJohn Marino { Bad_Opcode },
8080cf7f2e2dSJohn Marino { Bad_Opcode },
80815796c8dcSSimon Schubert /* c8 */
8082cf7f2e2dSJohn Marino { Bad_Opcode },
8083cf7f2e2dSJohn Marino { Bad_Opcode },
8084cf7f2e2dSJohn Marino { Bad_Opcode },
8085cf7f2e2dSJohn Marino { Bad_Opcode },
8086cf7f2e2dSJohn Marino { Bad_Opcode },
8087cf7f2e2dSJohn Marino { Bad_Opcode },
8088cf7f2e2dSJohn Marino { Bad_Opcode },
8089cf7f2e2dSJohn Marino { Bad_Opcode },
80905796c8dcSSimon Schubert /* d0 */
8091cf7f2e2dSJohn Marino { Bad_Opcode },
8092cf7f2e2dSJohn Marino { Bad_Opcode },
8093cf7f2e2dSJohn Marino { Bad_Opcode },
8094cf7f2e2dSJohn Marino { Bad_Opcode },
8095cf7f2e2dSJohn Marino { Bad_Opcode },
8096cf7f2e2dSJohn Marino { Bad_Opcode },
8097cf7f2e2dSJohn Marino { Bad_Opcode },
8098cf7f2e2dSJohn Marino { Bad_Opcode },
80995796c8dcSSimon Schubert /* d8 */
8100cf7f2e2dSJohn Marino { Bad_Opcode },
8101cf7f2e2dSJohn Marino { Bad_Opcode },
8102cf7f2e2dSJohn Marino { Bad_Opcode },
8103c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38DB) },
8104c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38DC) },
8105c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38DD) },
8106c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38DE) },
8107c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38DF) },
81085796c8dcSSimon Schubert /* e0 */
8109cf7f2e2dSJohn Marino { Bad_Opcode },
8110cf7f2e2dSJohn Marino { Bad_Opcode },
8111cf7f2e2dSJohn Marino { Bad_Opcode },
8112cf7f2e2dSJohn Marino { Bad_Opcode },
8113cf7f2e2dSJohn Marino { Bad_Opcode },
8114cf7f2e2dSJohn Marino { Bad_Opcode },
8115cf7f2e2dSJohn Marino { Bad_Opcode },
8116cf7f2e2dSJohn Marino { Bad_Opcode },
81175796c8dcSSimon Schubert /* e8 */
8118cf7f2e2dSJohn Marino { Bad_Opcode },
8119cf7f2e2dSJohn Marino { Bad_Opcode },
8120cf7f2e2dSJohn Marino { Bad_Opcode },
8121cf7f2e2dSJohn Marino { Bad_Opcode },
8122cf7f2e2dSJohn Marino { Bad_Opcode },
8123cf7f2e2dSJohn Marino { Bad_Opcode },
8124cf7f2e2dSJohn Marino { Bad_Opcode },
8125cf7f2e2dSJohn Marino { Bad_Opcode },
81265796c8dcSSimon Schubert /* f0 */
8127cf7f2e2dSJohn Marino { Bad_Opcode },
8128cf7f2e2dSJohn Marino { Bad_Opcode },
8129c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38F2) },
8130c50c785cSJohn Marino { REG_TABLE (REG_VEX_0F38F3) },
8131cf7f2e2dSJohn Marino { Bad_Opcode },
8132a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38F5) },
8133a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38F6) },
8134c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F38F7) },
81355796c8dcSSimon Schubert /* f8 */
8136cf7f2e2dSJohn Marino { Bad_Opcode },
8137cf7f2e2dSJohn Marino { Bad_Opcode },
8138cf7f2e2dSJohn Marino { Bad_Opcode },
8139cf7f2e2dSJohn Marino { Bad_Opcode },
8140cf7f2e2dSJohn Marino { Bad_Opcode },
8141cf7f2e2dSJohn Marino { Bad_Opcode },
8142cf7f2e2dSJohn Marino { Bad_Opcode },
8143cf7f2e2dSJohn Marino { Bad_Opcode },
81445796c8dcSSimon Schubert },
81455796c8dcSSimon Schubert /* VEX_0F3A */
81465796c8dcSSimon Schubert {
81475796c8dcSSimon Schubert /* 00 */
8148a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A00) },
8149a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A01) },
8150a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A02) },
8151cf7f2e2dSJohn Marino { Bad_Opcode },
8152c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A04) },
8153c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A05) },
8154c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A06) },
8155cf7f2e2dSJohn Marino { Bad_Opcode },
81565796c8dcSSimon Schubert /* 08 */
8157c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A08) },
8158c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A09) },
8159c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A0A) },
8160c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A0B) },
8161c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A0C) },
8162c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A0D) },
8163c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A0E) },
8164c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A0F) },
81655796c8dcSSimon Schubert /* 10 */
8166cf7f2e2dSJohn Marino { Bad_Opcode },
8167cf7f2e2dSJohn Marino { Bad_Opcode },
8168cf7f2e2dSJohn Marino { Bad_Opcode },
8169cf7f2e2dSJohn Marino { Bad_Opcode },
8170c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A14) },
8171c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A15) },
8172c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A16) },
8173c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A17) },
81745796c8dcSSimon Schubert /* 18 */
8175c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A18) },
8176c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A19) },
8177cf7f2e2dSJohn Marino { Bad_Opcode },
8178cf7f2e2dSJohn Marino { Bad_Opcode },
8179cf7f2e2dSJohn Marino { Bad_Opcode },
8180c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A1D) },
8181cf7f2e2dSJohn Marino { Bad_Opcode },
8182cf7f2e2dSJohn Marino { Bad_Opcode },
81835796c8dcSSimon Schubert /* 20 */
8184c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A20) },
8185c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A21) },
8186c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A22) },
8187cf7f2e2dSJohn Marino { Bad_Opcode },
8188cf7f2e2dSJohn Marino { Bad_Opcode },
8189cf7f2e2dSJohn Marino { Bad_Opcode },
8190cf7f2e2dSJohn Marino { Bad_Opcode },
8191cf7f2e2dSJohn Marino { Bad_Opcode },
81925796c8dcSSimon Schubert /* 28 */
8193cf7f2e2dSJohn Marino { Bad_Opcode },
8194cf7f2e2dSJohn Marino { Bad_Opcode },
8195cf7f2e2dSJohn Marino { Bad_Opcode },
8196cf7f2e2dSJohn Marino { Bad_Opcode },
8197cf7f2e2dSJohn Marino { Bad_Opcode },
8198cf7f2e2dSJohn Marino { Bad_Opcode },
8199cf7f2e2dSJohn Marino { Bad_Opcode },
8200cf7f2e2dSJohn Marino { Bad_Opcode },
82015796c8dcSSimon Schubert /* 30 */
8202cf7f2e2dSJohn Marino { Bad_Opcode },
8203cf7f2e2dSJohn Marino { Bad_Opcode },
8204cf7f2e2dSJohn Marino { Bad_Opcode },
8205cf7f2e2dSJohn Marino { Bad_Opcode },
8206cf7f2e2dSJohn Marino { Bad_Opcode },
8207cf7f2e2dSJohn Marino { Bad_Opcode },
8208cf7f2e2dSJohn Marino { Bad_Opcode },
8209cf7f2e2dSJohn Marino { Bad_Opcode },
82105796c8dcSSimon Schubert /* 38 */
8211a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A38) },
8212a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A39) },
8213cf7f2e2dSJohn Marino { Bad_Opcode },
8214cf7f2e2dSJohn Marino { Bad_Opcode },
8215cf7f2e2dSJohn Marino { Bad_Opcode },
8216cf7f2e2dSJohn Marino { Bad_Opcode },
8217cf7f2e2dSJohn Marino { Bad_Opcode },
8218cf7f2e2dSJohn Marino { Bad_Opcode },
82195796c8dcSSimon Schubert /* 40 */
8220c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A40) },
8221c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A41) },
8222c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A42) },
8223cf7f2e2dSJohn Marino { Bad_Opcode },
8224c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A44) },
8225cf7f2e2dSJohn Marino { Bad_Opcode },
8226a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A46) },
8227cf7f2e2dSJohn Marino { Bad_Opcode },
82285796c8dcSSimon Schubert /* 48 */
8229c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A48) },
8230c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A49) },
8231c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A4A) },
8232c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A4B) },
8233c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A4C) },
8234cf7f2e2dSJohn Marino { Bad_Opcode },
8235cf7f2e2dSJohn Marino { Bad_Opcode },
8236cf7f2e2dSJohn Marino { Bad_Opcode },
82375796c8dcSSimon Schubert /* 50 */
8238cf7f2e2dSJohn Marino { Bad_Opcode },
8239cf7f2e2dSJohn Marino { Bad_Opcode },
8240cf7f2e2dSJohn Marino { Bad_Opcode },
8241cf7f2e2dSJohn Marino { Bad_Opcode },
8242cf7f2e2dSJohn Marino { Bad_Opcode },
8243cf7f2e2dSJohn Marino { Bad_Opcode },
8244cf7f2e2dSJohn Marino { Bad_Opcode },
8245cf7f2e2dSJohn Marino { Bad_Opcode },
82465796c8dcSSimon Schubert /* 58 */
8247cf7f2e2dSJohn Marino { Bad_Opcode },
8248cf7f2e2dSJohn Marino { Bad_Opcode },
8249cf7f2e2dSJohn Marino { Bad_Opcode },
8250cf7f2e2dSJohn Marino { Bad_Opcode },
8251c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A5C) },
8252c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A5D) },
8253c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A5E) },
8254c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A5F) },
82555796c8dcSSimon Schubert /* 60 */
8256c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A60) },
8257c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A61) },
8258c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A62) },
8259c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A63) },
8260cf7f2e2dSJohn Marino { Bad_Opcode },
8261cf7f2e2dSJohn Marino { Bad_Opcode },
8262cf7f2e2dSJohn Marino { Bad_Opcode },
8263cf7f2e2dSJohn Marino { Bad_Opcode },
82645796c8dcSSimon Schubert /* 68 */
8265c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A68) },
8266c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A69) },
8267c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A6A) },
8268c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A6B) },
8269c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A6C) },
8270c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A6D) },
8271c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A6E) },
8272c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A6F) },
82735796c8dcSSimon Schubert /* 70 */
8274cf7f2e2dSJohn Marino { Bad_Opcode },
8275cf7f2e2dSJohn Marino { Bad_Opcode },
8276cf7f2e2dSJohn Marino { Bad_Opcode },
8277cf7f2e2dSJohn Marino { Bad_Opcode },
8278cf7f2e2dSJohn Marino { Bad_Opcode },
8279cf7f2e2dSJohn Marino { Bad_Opcode },
8280cf7f2e2dSJohn Marino { Bad_Opcode },
8281cf7f2e2dSJohn Marino { Bad_Opcode },
82825796c8dcSSimon Schubert /* 78 */
8283c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A78) },
8284c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A79) },
8285c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A7A) },
8286c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A7B) },
8287c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A7C) },
8288c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A7D) },
8289c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A7E) },
8290c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3A7F) },
82915796c8dcSSimon Schubert /* 80 */
8292cf7f2e2dSJohn Marino { Bad_Opcode },
8293cf7f2e2dSJohn Marino { Bad_Opcode },
8294cf7f2e2dSJohn Marino { Bad_Opcode },
8295cf7f2e2dSJohn Marino { Bad_Opcode },
8296cf7f2e2dSJohn Marino { Bad_Opcode },
8297cf7f2e2dSJohn Marino { Bad_Opcode },
8298cf7f2e2dSJohn Marino { Bad_Opcode },
8299cf7f2e2dSJohn Marino { Bad_Opcode },
83005796c8dcSSimon Schubert /* 88 */
8301cf7f2e2dSJohn Marino { Bad_Opcode },
8302cf7f2e2dSJohn Marino { Bad_Opcode },
8303cf7f2e2dSJohn Marino { Bad_Opcode },
8304cf7f2e2dSJohn Marino { Bad_Opcode },
8305cf7f2e2dSJohn Marino { Bad_Opcode },
8306cf7f2e2dSJohn Marino { Bad_Opcode },
8307cf7f2e2dSJohn Marino { Bad_Opcode },
8308cf7f2e2dSJohn Marino { Bad_Opcode },
83095796c8dcSSimon Schubert /* 90 */
8310cf7f2e2dSJohn Marino { Bad_Opcode },
8311cf7f2e2dSJohn Marino { Bad_Opcode },
8312cf7f2e2dSJohn Marino { Bad_Opcode },
8313cf7f2e2dSJohn Marino { Bad_Opcode },
8314cf7f2e2dSJohn Marino { Bad_Opcode },
8315cf7f2e2dSJohn Marino { Bad_Opcode },
8316cf7f2e2dSJohn Marino { Bad_Opcode },
8317cf7f2e2dSJohn Marino { Bad_Opcode },
83185796c8dcSSimon Schubert /* 98 */
8319cf7f2e2dSJohn Marino { Bad_Opcode },
8320cf7f2e2dSJohn Marino { Bad_Opcode },
8321cf7f2e2dSJohn Marino { Bad_Opcode },
8322cf7f2e2dSJohn Marino { Bad_Opcode },
8323cf7f2e2dSJohn Marino { Bad_Opcode },
8324cf7f2e2dSJohn Marino { Bad_Opcode },
8325cf7f2e2dSJohn Marino { Bad_Opcode },
8326cf7f2e2dSJohn Marino { Bad_Opcode },
83275796c8dcSSimon Schubert /* a0 */
8328cf7f2e2dSJohn Marino { Bad_Opcode },
8329cf7f2e2dSJohn Marino { Bad_Opcode },
8330cf7f2e2dSJohn Marino { Bad_Opcode },
8331cf7f2e2dSJohn Marino { Bad_Opcode },
8332cf7f2e2dSJohn Marino { Bad_Opcode },
8333cf7f2e2dSJohn Marino { Bad_Opcode },
8334cf7f2e2dSJohn Marino { Bad_Opcode },
8335cf7f2e2dSJohn Marino { Bad_Opcode },
83365796c8dcSSimon Schubert /* a8 */
8337cf7f2e2dSJohn Marino { Bad_Opcode },
8338cf7f2e2dSJohn Marino { Bad_Opcode },
8339cf7f2e2dSJohn Marino { Bad_Opcode },
8340cf7f2e2dSJohn Marino { Bad_Opcode },
8341cf7f2e2dSJohn Marino { Bad_Opcode },
8342cf7f2e2dSJohn Marino { Bad_Opcode },
8343cf7f2e2dSJohn Marino { Bad_Opcode },
8344cf7f2e2dSJohn Marino { Bad_Opcode },
83455796c8dcSSimon Schubert /* b0 */
8346cf7f2e2dSJohn Marino { Bad_Opcode },
8347cf7f2e2dSJohn Marino { Bad_Opcode },
8348cf7f2e2dSJohn Marino { Bad_Opcode },
8349cf7f2e2dSJohn Marino { Bad_Opcode },
8350cf7f2e2dSJohn Marino { Bad_Opcode },
8351cf7f2e2dSJohn Marino { Bad_Opcode },
8352cf7f2e2dSJohn Marino { Bad_Opcode },
8353cf7f2e2dSJohn Marino { Bad_Opcode },
83545796c8dcSSimon Schubert /* b8 */
8355cf7f2e2dSJohn Marino { Bad_Opcode },
8356cf7f2e2dSJohn Marino { Bad_Opcode },
8357cf7f2e2dSJohn Marino { Bad_Opcode },
8358cf7f2e2dSJohn Marino { Bad_Opcode },
8359cf7f2e2dSJohn Marino { Bad_Opcode },
8360cf7f2e2dSJohn Marino { Bad_Opcode },
8361cf7f2e2dSJohn Marino { Bad_Opcode },
8362cf7f2e2dSJohn Marino { Bad_Opcode },
83635796c8dcSSimon Schubert /* c0 */
8364cf7f2e2dSJohn Marino { Bad_Opcode },
8365cf7f2e2dSJohn Marino { Bad_Opcode },
8366cf7f2e2dSJohn Marino { Bad_Opcode },
8367cf7f2e2dSJohn Marino { Bad_Opcode },
8368cf7f2e2dSJohn Marino { Bad_Opcode },
8369cf7f2e2dSJohn Marino { Bad_Opcode },
8370cf7f2e2dSJohn Marino { Bad_Opcode },
8371cf7f2e2dSJohn Marino { Bad_Opcode },
83725796c8dcSSimon Schubert /* c8 */
8373cf7f2e2dSJohn Marino { Bad_Opcode },
8374cf7f2e2dSJohn Marino { Bad_Opcode },
8375cf7f2e2dSJohn Marino { Bad_Opcode },
8376cf7f2e2dSJohn Marino { Bad_Opcode },
8377cf7f2e2dSJohn Marino { Bad_Opcode },
8378cf7f2e2dSJohn Marino { Bad_Opcode },
8379cf7f2e2dSJohn Marino { Bad_Opcode },
8380cf7f2e2dSJohn Marino { Bad_Opcode },
83815796c8dcSSimon Schubert /* d0 */
8382cf7f2e2dSJohn Marino { Bad_Opcode },
8383cf7f2e2dSJohn Marino { Bad_Opcode },
8384cf7f2e2dSJohn Marino { Bad_Opcode },
8385cf7f2e2dSJohn Marino { Bad_Opcode },
8386cf7f2e2dSJohn Marino { Bad_Opcode },
8387cf7f2e2dSJohn Marino { Bad_Opcode },
8388cf7f2e2dSJohn Marino { Bad_Opcode },
8389cf7f2e2dSJohn Marino { Bad_Opcode },
83905796c8dcSSimon Schubert /* d8 */
8391cf7f2e2dSJohn Marino { Bad_Opcode },
8392cf7f2e2dSJohn Marino { Bad_Opcode },
8393cf7f2e2dSJohn Marino { Bad_Opcode },
8394cf7f2e2dSJohn Marino { Bad_Opcode },
8395cf7f2e2dSJohn Marino { Bad_Opcode },
8396cf7f2e2dSJohn Marino { Bad_Opcode },
8397cf7f2e2dSJohn Marino { Bad_Opcode },
8398c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3ADF) },
83995796c8dcSSimon Schubert /* e0 */
8400cf7f2e2dSJohn Marino { Bad_Opcode },
8401cf7f2e2dSJohn Marino { Bad_Opcode },
8402cf7f2e2dSJohn Marino { Bad_Opcode },
8403cf7f2e2dSJohn Marino { Bad_Opcode },
8404cf7f2e2dSJohn Marino { Bad_Opcode },
8405cf7f2e2dSJohn Marino { Bad_Opcode },
8406cf7f2e2dSJohn Marino { Bad_Opcode },
8407cf7f2e2dSJohn Marino { Bad_Opcode },
84085796c8dcSSimon Schubert /* e8 */
8409cf7f2e2dSJohn Marino { Bad_Opcode },
8410cf7f2e2dSJohn Marino { Bad_Opcode },
8411cf7f2e2dSJohn Marino { Bad_Opcode },
8412cf7f2e2dSJohn Marino { Bad_Opcode },
8413cf7f2e2dSJohn Marino { Bad_Opcode },
8414cf7f2e2dSJohn Marino { Bad_Opcode },
8415cf7f2e2dSJohn Marino { Bad_Opcode },
8416cf7f2e2dSJohn Marino { Bad_Opcode },
84175796c8dcSSimon Schubert /* f0 */
8418a45ae5f8SJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F3AF0) },
8419cf7f2e2dSJohn Marino { Bad_Opcode },
8420cf7f2e2dSJohn Marino { Bad_Opcode },
8421cf7f2e2dSJohn Marino { Bad_Opcode },
8422cf7f2e2dSJohn Marino { Bad_Opcode },
8423cf7f2e2dSJohn Marino { Bad_Opcode },
8424cf7f2e2dSJohn Marino { Bad_Opcode },
8425cf7f2e2dSJohn Marino { Bad_Opcode },
84265796c8dcSSimon Schubert /* f8 */
8427cf7f2e2dSJohn Marino { Bad_Opcode },
8428cf7f2e2dSJohn Marino { Bad_Opcode },
8429cf7f2e2dSJohn Marino { Bad_Opcode },
8430cf7f2e2dSJohn Marino { Bad_Opcode },
8431cf7f2e2dSJohn Marino { Bad_Opcode },
8432cf7f2e2dSJohn Marino { Bad_Opcode },
8433cf7f2e2dSJohn Marino { Bad_Opcode },
8434cf7f2e2dSJohn Marino { Bad_Opcode },
84355796c8dcSSimon Schubert },
84365796c8dcSSimon Schubert };
84375796c8dcSSimon Schubert
84385796c8dcSSimon Schubert static const struct dis386 vex_len_table[][2] = {
8439c50c785cSJohn Marino /* VEX_LEN_0F10_P_1 */
84405796c8dcSSimon Schubert {
8441c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F10_P_1) },
8442c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F10_P_1) },
84435796c8dcSSimon Schubert },
84445796c8dcSSimon Schubert
8445c50c785cSJohn Marino /* VEX_LEN_0F10_P_3 */
84465796c8dcSSimon Schubert {
8447c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F10_P_3) },
8448c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F10_P_3) },
84495796c8dcSSimon Schubert },
84505796c8dcSSimon Schubert
8451c50c785cSJohn Marino /* VEX_LEN_0F11_P_1 */
84525796c8dcSSimon Schubert {
8453c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F11_P_1) },
8454c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F11_P_1) },
84555796c8dcSSimon Schubert },
84565796c8dcSSimon Schubert
8457c50c785cSJohn Marino /* VEX_LEN_0F11_P_3 */
84585796c8dcSSimon Schubert {
8459c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F11_P_3) },
8460c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F11_P_3) },
84615796c8dcSSimon Schubert },
84625796c8dcSSimon Schubert
8463c50c785cSJohn Marino /* VEX_LEN_0F12_P_0_M_0 */
84645796c8dcSSimon Schubert {
8465c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F12_P_0_M_0) },
84665796c8dcSSimon Schubert },
84675796c8dcSSimon Schubert
8468c50c785cSJohn Marino /* VEX_LEN_0F12_P_0_M_1 */
84695796c8dcSSimon Schubert {
8470c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F12_P_0_M_1) },
84715796c8dcSSimon Schubert },
84725796c8dcSSimon Schubert
8473c50c785cSJohn Marino /* VEX_LEN_0F12_P_2 */
84745796c8dcSSimon Schubert {
8475c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F12_P_2) },
84765796c8dcSSimon Schubert },
84775796c8dcSSimon Schubert
8478c50c785cSJohn Marino /* VEX_LEN_0F13_M_0 */
84795796c8dcSSimon Schubert {
8480c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F13_M_0) },
84815796c8dcSSimon Schubert },
84825796c8dcSSimon Schubert
8483c50c785cSJohn Marino /* VEX_LEN_0F16_P_0_M_0 */
84845796c8dcSSimon Schubert {
8485c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F16_P_0_M_0) },
84865796c8dcSSimon Schubert },
84875796c8dcSSimon Schubert
8488c50c785cSJohn Marino /* VEX_LEN_0F16_P_0_M_1 */
84895796c8dcSSimon Schubert {
8490c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F16_P_0_M_1) },
84915796c8dcSSimon Schubert },
84925796c8dcSSimon Schubert
8493c50c785cSJohn Marino /* VEX_LEN_0F16_P_2 */
84945796c8dcSSimon Schubert {
8495c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F16_P_2) },
84965796c8dcSSimon Schubert },
84975796c8dcSSimon Schubert
8498c50c785cSJohn Marino /* VEX_LEN_0F17_M_0 */
84995796c8dcSSimon Schubert {
8500c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F17_M_0) },
85015796c8dcSSimon Schubert },
85025796c8dcSSimon Schubert
8503c50c785cSJohn Marino /* VEX_LEN_0F2A_P_1 */
85045796c8dcSSimon Schubert {
8505cf7f2e2dSJohn Marino { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev } },
8506cf7f2e2dSJohn Marino { "vcvtsi2ss%LQ", { XMScalar, VexScalar, Ev } },
85075796c8dcSSimon Schubert },
85085796c8dcSSimon Schubert
8509c50c785cSJohn Marino /* VEX_LEN_0F2A_P_3 */
85105796c8dcSSimon Schubert {
8511cf7f2e2dSJohn Marino { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev } },
8512cf7f2e2dSJohn Marino { "vcvtsi2sd%LQ", { XMScalar, VexScalar, Ev } },
85135796c8dcSSimon Schubert },
85145796c8dcSSimon Schubert
8515c50c785cSJohn Marino /* VEX_LEN_0F2C_P_1 */
85165796c8dcSSimon Schubert {
8517cf7f2e2dSJohn Marino { "vcvttss2siY", { Gv, EXdScalar } },
8518cf7f2e2dSJohn Marino { "vcvttss2siY", { Gv, EXdScalar } },
85195796c8dcSSimon Schubert },
85205796c8dcSSimon Schubert
8521c50c785cSJohn Marino /* VEX_LEN_0F2C_P_3 */
85225796c8dcSSimon Schubert {
8523cf7f2e2dSJohn Marino { "vcvttsd2siY", { Gv, EXqScalar } },
8524cf7f2e2dSJohn Marino { "vcvttsd2siY", { Gv, EXqScalar } },
85255796c8dcSSimon Schubert },
85265796c8dcSSimon Schubert
8527c50c785cSJohn Marino /* VEX_LEN_0F2D_P_1 */
85285796c8dcSSimon Schubert {
8529cf7f2e2dSJohn Marino { "vcvtss2siY", { Gv, EXdScalar } },
8530cf7f2e2dSJohn Marino { "vcvtss2siY", { Gv, EXdScalar } },
85315796c8dcSSimon Schubert },
85325796c8dcSSimon Schubert
8533c50c785cSJohn Marino /* VEX_LEN_0F2D_P_3 */
85345796c8dcSSimon Schubert {
8535cf7f2e2dSJohn Marino { "vcvtsd2siY", { Gv, EXqScalar } },
8536cf7f2e2dSJohn Marino { "vcvtsd2siY", { Gv, EXqScalar } },
85375796c8dcSSimon Schubert },
85385796c8dcSSimon Schubert
8539c50c785cSJohn Marino /* VEX_LEN_0F2E_P_0 */
85405796c8dcSSimon Schubert {
8541c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F2E_P_0) },
8542c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F2E_P_0) },
85435796c8dcSSimon Schubert },
85445796c8dcSSimon Schubert
8545c50c785cSJohn Marino /* VEX_LEN_0F2E_P_2 */
85465796c8dcSSimon Schubert {
8547c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F2E_P_2) },
8548c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F2E_P_2) },
85495796c8dcSSimon Schubert },
85505796c8dcSSimon Schubert
8551c50c785cSJohn Marino /* VEX_LEN_0F2F_P_0 */
85525796c8dcSSimon Schubert {
8553c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F2F_P_0) },
8554c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F2F_P_0) },
85555796c8dcSSimon Schubert },
85565796c8dcSSimon Schubert
8557c50c785cSJohn Marino /* VEX_LEN_0F2F_P_2 */
85585796c8dcSSimon Schubert {
8559c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F2F_P_2) },
8560c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F2F_P_2) },
85615796c8dcSSimon Schubert },
85625796c8dcSSimon Schubert
8563c50c785cSJohn Marino /* VEX_LEN_0F51_P_1 */
85645796c8dcSSimon Schubert {
8565c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F51_P_1) },
8566c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F51_P_1) },
85675796c8dcSSimon Schubert },
85685796c8dcSSimon Schubert
8569c50c785cSJohn Marino /* VEX_LEN_0F51_P_3 */
85705796c8dcSSimon Schubert {
8571c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F51_P_3) },
8572c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F51_P_3) },
85735796c8dcSSimon Schubert },
85745796c8dcSSimon Schubert
8575c50c785cSJohn Marino /* VEX_LEN_0F52_P_1 */
85765796c8dcSSimon Schubert {
8577c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F52_P_1) },
8578c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F52_P_1) },
85795796c8dcSSimon Schubert },
85805796c8dcSSimon Schubert
8581c50c785cSJohn Marino /* VEX_LEN_0F53_P_1 */
85825796c8dcSSimon Schubert {
8583c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F53_P_1) },
8584c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F53_P_1) },
85855796c8dcSSimon Schubert },
85865796c8dcSSimon Schubert
8587c50c785cSJohn Marino /* VEX_LEN_0F58_P_1 */
85885796c8dcSSimon Schubert {
8589c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F58_P_1) },
8590c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F58_P_1) },
85915796c8dcSSimon Schubert },
85925796c8dcSSimon Schubert
8593c50c785cSJohn Marino /* VEX_LEN_0F58_P_3 */
85945796c8dcSSimon Schubert {
8595c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F58_P_3) },
8596c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F58_P_3) },
85975796c8dcSSimon Schubert },
85985796c8dcSSimon Schubert
8599c50c785cSJohn Marino /* VEX_LEN_0F59_P_1 */
86005796c8dcSSimon Schubert {
8601c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F59_P_1) },
8602c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F59_P_1) },
86035796c8dcSSimon Schubert },
86045796c8dcSSimon Schubert
8605c50c785cSJohn Marino /* VEX_LEN_0F59_P_3 */
86065796c8dcSSimon Schubert {
8607c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F59_P_3) },
8608c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F59_P_3) },
86095796c8dcSSimon Schubert },
86105796c8dcSSimon Schubert
8611c50c785cSJohn Marino /* VEX_LEN_0F5A_P_1 */
86125796c8dcSSimon Schubert {
8613c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5A_P_1) },
8614c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5A_P_1) },
86155796c8dcSSimon Schubert },
86165796c8dcSSimon Schubert
8617c50c785cSJohn Marino /* VEX_LEN_0F5A_P_3 */
86185796c8dcSSimon Schubert {
8619c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5A_P_3) },
8620c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5A_P_3) },
86215796c8dcSSimon Schubert },
86225796c8dcSSimon Schubert
8623c50c785cSJohn Marino /* VEX_LEN_0F5C_P_1 */
86245796c8dcSSimon Schubert {
8625c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5C_P_1) },
8626c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5C_P_1) },
86275796c8dcSSimon Schubert },
86285796c8dcSSimon Schubert
8629c50c785cSJohn Marino /* VEX_LEN_0F5C_P_3 */
86305796c8dcSSimon Schubert {
8631c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5C_P_3) },
8632c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5C_P_3) },
86335796c8dcSSimon Schubert },
86345796c8dcSSimon Schubert
8635c50c785cSJohn Marino /* VEX_LEN_0F5D_P_1 */
86365796c8dcSSimon Schubert {
8637c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5D_P_1) },
8638c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5D_P_1) },
86395796c8dcSSimon Schubert },
86405796c8dcSSimon Schubert
8641c50c785cSJohn Marino /* VEX_LEN_0F5D_P_3 */
86425796c8dcSSimon Schubert {
8643c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5D_P_3) },
8644c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5D_P_3) },
86455796c8dcSSimon Schubert },
86465796c8dcSSimon Schubert
8647c50c785cSJohn Marino /* VEX_LEN_0F5E_P_1 */
86485796c8dcSSimon Schubert {
8649c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5E_P_1) },
8650c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5E_P_1) },
86515796c8dcSSimon Schubert },
86525796c8dcSSimon Schubert
8653c50c785cSJohn Marino /* VEX_LEN_0F5E_P_3 */
86545796c8dcSSimon Schubert {
8655c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5E_P_3) },
8656c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5E_P_3) },
86575796c8dcSSimon Schubert },
86585796c8dcSSimon Schubert
8659c50c785cSJohn Marino /* VEX_LEN_0F5F_P_1 */
86605796c8dcSSimon Schubert {
8661c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5F_P_1) },
8662c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5F_P_1) },
86635796c8dcSSimon Schubert },
86645796c8dcSSimon Schubert
8665c50c785cSJohn Marino /* VEX_LEN_0F5F_P_3 */
86665796c8dcSSimon Schubert {
8667c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5F_P_3) },
8668c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F5F_P_3) },
86695796c8dcSSimon Schubert },
86705796c8dcSSimon Schubert
8671c50c785cSJohn Marino /* VEX_LEN_0F6E_P_2 */
86725796c8dcSSimon Schubert {
8673cf7f2e2dSJohn Marino { "vmovK", { XMScalar, Edq } },
8674cf7f2e2dSJohn Marino { "vmovK", { XMScalar, Edq } },
86755796c8dcSSimon Schubert },
86765796c8dcSSimon Schubert
8677c50c785cSJohn Marino /* VEX_LEN_0F7E_P_1 */
86785796c8dcSSimon Schubert {
8679c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F7E_P_1) },
8680c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F7E_P_1) },
86815796c8dcSSimon Schubert },
86825796c8dcSSimon Schubert
8683c50c785cSJohn Marino /* VEX_LEN_0F7E_P_2 */
86845796c8dcSSimon Schubert {
8685cf7f2e2dSJohn Marino { "vmovK", { Edq, XMScalar } },
8686cf7f2e2dSJohn Marino { "vmovK", { Edq, XMScalar } },
86875796c8dcSSimon Schubert },
86885796c8dcSSimon Schubert
8689c50c785cSJohn Marino /* VEX_LEN_0FAE_R_2_M_0 */
86905796c8dcSSimon Schubert {
8691c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FAE_R_2_M_0) },
86925796c8dcSSimon Schubert },
86935796c8dcSSimon Schubert
8694c50c785cSJohn Marino /* VEX_LEN_0FAE_R_3_M_0 */
86955796c8dcSSimon Schubert {
8696c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FAE_R_3_M_0) },
86975796c8dcSSimon Schubert },
86985796c8dcSSimon Schubert
8699c50c785cSJohn Marino /* VEX_LEN_0FC2_P_1 */
87005796c8dcSSimon Schubert {
8701c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FC2_P_1) },
8702c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FC2_P_1) },
87035796c8dcSSimon Schubert },
87045796c8dcSSimon Schubert
8705c50c785cSJohn Marino /* VEX_LEN_0FC2_P_3 */
87065796c8dcSSimon Schubert {
8707c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FC2_P_3) },
8708c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FC2_P_3) },
87095796c8dcSSimon Schubert },
87105796c8dcSSimon Schubert
8711c50c785cSJohn Marino /* VEX_LEN_0FC4_P_2 */
87125796c8dcSSimon Schubert {
8713c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FC4_P_2) },
87145796c8dcSSimon Schubert },
87155796c8dcSSimon Schubert
8716c50c785cSJohn Marino /* VEX_LEN_0FC5_P_2 */
87175796c8dcSSimon Schubert {
8718c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FC5_P_2) },
87195796c8dcSSimon Schubert },
87205796c8dcSSimon Schubert
8721c50c785cSJohn Marino /* VEX_LEN_0FD6_P_2 */
87225796c8dcSSimon Schubert {
8723c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FD6_P_2) },
8724c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FD6_P_2) },
87255796c8dcSSimon Schubert },
87265796c8dcSSimon Schubert
8727c50c785cSJohn Marino /* VEX_LEN_0FF7_P_2 */
87285796c8dcSSimon Schubert {
8729c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FF7_P_2) },
87305796c8dcSSimon Schubert },
87315796c8dcSSimon Schubert
8732a45ae5f8SJohn Marino /* VEX_LEN_0F3816_P_2 */
87335796c8dcSSimon Schubert {
8734cf7f2e2dSJohn Marino { Bad_Opcode },
8735a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3816_P_2) },
8736a45ae5f8SJohn Marino },
8737a45ae5f8SJohn Marino
8738a45ae5f8SJohn Marino /* VEX_LEN_0F3819_P_2 */
8739a45ae5f8SJohn Marino {
8740a45ae5f8SJohn Marino { Bad_Opcode },
8741a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3819_P_2) },
87425796c8dcSSimon Schubert },
87435796c8dcSSimon Schubert
8744c50c785cSJohn Marino /* VEX_LEN_0F381A_P_2_M_0 */
87455796c8dcSSimon Schubert {
8746cf7f2e2dSJohn Marino { Bad_Opcode },
8747c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F381A_P_2_M_0) },
87485796c8dcSSimon Schubert },
87495796c8dcSSimon Schubert
8750a45ae5f8SJohn Marino /* VEX_LEN_0F3836_P_2 */
87515796c8dcSSimon Schubert {
8752a45ae5f8SJohn Marino { Bad_Opcode },
8753a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3836_P_2) },
87545796c8dcSSimon Schubert },
87555796c8dcSSimon Schubert
8756c50c785cSJohn Marino /* VEX_LEN_0F3841_P_2 */
87575796c8dcSSimon Schubert {
8758c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3841_P_2) },
87595796c8dcSSimon Schubert },
87605796c8dcSSimon Schubert
8761a45ae5f8SJohn Marino /* VEX_LEN_0F385A_P_2_M_0 */
8762a45ae5f8SJohn Marino {
8763a45ae5f8SJohn Marino { Bad_Opcode },
8764a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F385A_P_2_M_0) },
8765a45ae5f8SJohn Marino },
8766a45ae5f8SJohn Marino
8767c50c785cSJohn Marino /* VEX_LEN_0F38DB_P_2 */
87685796c8dcSSimon Schubert {
8769c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F38DB_P_2) },
87705796c8dcSSimon Schubert },
87715796c8dcSSimon Schubert
8772c50c785cSJohn Marino /* VEX_LEN_0F38DC_P_2 */
87735796c8dcSSimon Schubert {
8774c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F38DC_P_2) },
87755796c8dcSSimon Schubert },
87765796c8dcSSimon Schubert
8777c50c785cSJohn Marino /* VEX_LEN_0F38DD_P_2 */
87785796c8dcSSimon Schubert {
8779c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F38DD_P_2) },
87805796c8dcSSimon Schubert },
87815796c8dcSSimon Schubert
8782c50c785cSJohn Marino /* VEX_LEN_0F38DE_P_2 */
87835796c8dcSSimon Schubert {
8784c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F38DE_P_2) },
87855796c8dcSSimon Schubert },
87865796c8dcSSimon Schubert
8787c50c785cSJohn Marino /* VEX_LEN_0F38DF_P_2 */
87885796c8dcSSimon Schubert {
8789c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F38DF_P_2) },
87905796c8dcSSimon Schubert },
87915796c8dcSSimon Schubert
8792c50c785cSJohn Marino /* VEX_LEN_0F38F2_P_0 */
8793c50c785cSJohn Marino {
8794c50c785cSJohn Marino { "andnS", { Gdq, VexGdq, Edq } },
8795c50c785cSJohn Marino },
8796c50c785cSJohn Marino
8797c50c785cSJohn Marino /* VEX_LEN_0F38F3_R_1_P_0 */
8798c50c785cSJohn Marino {
8799c50c785cSJohn Marino { "blsrS", { VexGdq, Edq } },
8800c50c785cSJohn Marino },
8801c50c785cSJohn Marino
8802c50c785cSJohn Marino /* VEX_LEN_0F38F3_R_2_P_0 */
8803c50c785cSJohn Marino {
8804c50c785cSJohn Marino { "blsmskS", { VexGdq, Edq } },
8805c50c785cSJohn Marino },
8806c50c785cSJohn Marino
8807c50c785cSJohn Marino /* VEX_LEN_0F38F3_R_3_P_0 */
8808c50c785cSJohn Marino {
8809c50c785cSJohn Marino { "blsiS", { VexGdq, Edq } },
8810c50c785cSJohn Marino },
8811c50c785cSJohn Marino
8812a45ae5f8SJohn Marino /* VEX_LEN_0F38F5_P_0 */
8813a45ae5f8SJohn Marino {
8814a45ae5f8SJohn Marino { "bzhiS", { Gdq, Edq, VexGdq } },
8815a45ae5f8SJohn Marino },
8816a45ae5f8SJohn Marino
8817a45ae5f8SJohn Marino /* VEX_LEN_0F38F5_P_1 */
8818a45ae5f8SJohn Marino {
8819a45ae5f8SJohn Marino { "pextS", { Gdq, VexGdq, Edq } },
8820a45ae5f8SJohn Marino },
8821a45ae5f8SJohn Marino
8822a45ae5f8SJohn Marino /* VEX_LEN_0F38F5_P_3 */
8823a45ae5f8SJohn Marino {
8824a45ae5f8SJohn Marino { "pdepS", { Gdq, VexGdq, Edq } },
8825a45ae5f8SJohn Marino },
8826a45ae5f8SJohn Marino
8827a45ae5f8SJohn Marino /* VEX_LEN_0F38F6_P_3 */
8828a45ae5f8SJohn Marino {
8829a45ae5f8SJohn Marino { "mulxS", { Gdq, VexGdq, Edq } },
8830a45ae5f8SJohn Marino },
8831a45ae5f8SJohn Marino
8832c50c785cSJohn Marino /* VEX_LEN_0F38F7_P_0 */
8833c50c785cSJohn Marino {
8834c50c785cSJohn Marino { "bextrS", { Gdq, Edq, VexGdq } },
8835c50c785cSJohn Marino },
8836c50c785cSJohn Marino
8837a45ae5f8SJohn Marino /* VEX_LEN_0F38F7_P_1 */
8838a45ae5f8SJohn Marino {
8839a45ae5f8SJohn Marino { "sarxS", { Gdq, Edq, VexGdq } },
8840a45ae5f8SJohn Marino },
8841a45ae5f8SJohn Marino
8842a45ae5f8SJohn Marino /* VEX_LEN_0F38F7_P_2 */
8843a45ae5f8SJohn Marino {
8844a45ae5f8SJohn Marino { "shlxS", { Gdq, Edq, VexGdq } },
8845a45ae5f8SJohn Marino },
8846a45ae5f8SJohn Marino
8847a45ae5f8SJohn Marino /* VEX_LEN_0F38F7_P_3 */
8848a45ae5f8SJohn Marino {
8849a45ae5f8SJohn Marino { "shrxS", { Gdq, Edq, VexGdq } },
8850a45ae5f8SJohn Marino },
8851a45ae5f8SJohn Marino
8852a45ae5f8SJohn Marino /* VEX_LEN_0F3A00_P_2 */
8853a45ae5f8SJohn Marino {
8854a45ae5f8SJohn Marino { Bad_Opcode },
8855a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A00_P_2) },
8856a45ae5f8SJohn Marino },
8857a45ae5f8SJohn Marino
8858a45ae5f8SJohn Marino /* VEX_LEN_0F3A01_P_2 */
8859a45ae5f8SJohn Marino {
8860a45ae5f8SJohn Marino { Bad_Opcode },
8861a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A01_P_2) },
8862a45ae5f8SJohn Marino },
8863a45ae5f8SJohn Marino
8864c50c785cSJohn Marino /* VEX_LEN_0F3A06_P_2 */
88655796c8dcSSimon Schubert {
8866cf7f2e2dSJohn Marino { Bad_Opcode },
8867c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A06_P_2) },
88685796c8dcSSimon Schubert },
88695796c8dcSSimon Schubert
8870c50c785cSJohn Marino /* VEX_LEN_0F3A0A_P_2 */
88715796c8dcSSimon Schubert {
8872c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
8873c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A0A_P_2) },
88745796c8dcSSimon Schubert },
88755796c8dcSSimon Schubert
8876c50c785cSJohn Marino /* VEX_LEN_0F3A0B_P_2 */
88775796c8dcSSimon Schubert {
8878c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
8879c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A0B_P_2) },
88805796c8dcSSimon Schubert },
88815796c8dcSSimon Schubert
8882c50c785cSJohn Marino /* VEX_LEN_0F3A14_P_2 */
88835796c8dcSSimon Schubert {
8884c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A14_P_2) },
88855796c8dcSSimon Schubert },
88865796c8dcSSimon Schubert
8887c50c785cSJohn Marino /* VEX_LEN_0F3A15_P_2 */
88885796c8dcSSimon Schubert {
8889c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A15_P_2) },
88905796c8dcSSimon Schubert },
88915796c8dcSSimon Schubert
8892c50c785cSJohn Marino /* VEX_LEN_0F3A16_P_2 */
88935796c8dcSSimon Schubert {
88945796c8dcSSimon Schubert { "vpextrK", { Edq, XM, Ib } },
88955796c8dcSSimon Schubert },
88965796c8dcSSimon Schubert
8897c50c785cSJohn Marino /* VEX_LEN_0F3A17_P_2 */
88985796c8dcSSimon Schubert {
88995796c8dcSSimon Schubert { "vextractps", { Edqd, XM, Ib } },
89005796c8dcSSimon Schubert },
89015796c8dcSSimon Schubert
8902c50c785cSJohn Marino /* VEX_LEN_0F3A18_P_2 */
89035796c8dcSSimon Schubert {
8904cf7f2e2dSJohn Marino { Bad_Opcode },
8905c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A18_P_2) },
89065796c8dcSSimon Schubert },
89075796c8dcSSimon Schubert
8908c50c785cSJohn Marino /* VEX_LEN_0F3A19_P_2 */
89095796c8dcSSimon Schubert {
8910cf7f2e2dSJohn Marino { Bad_Opcode },
8911c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A19_P_2) },
89125796c8dcSSimon Schubert },
89135796c8dcSSimon Schubert
8914c50c785cSJohn Marino /* VEX_LEN_0F3A20_P_2 */
89155796c8dcSSimon Schubert {
8916c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A20_P_2) },
89175796c8dcSSimon Schubert },
89185796c8dcSSimon Schubert
8919c50c785cSJohn Marino /* VEX_LEN_0F3A21_P_2 */
89205796c8dcSSimon Schubert {
8921c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A21_P_2) },
89225796c8dcSSimon Schubert },
89235796c8dcSSimon Schubert
8924c50c785cSJohn Marino /* VEX_LEN_0F3A22_P_2 */
89255796c8dcSSimon Schubert {
89265796c8dcSSimon Schubert { "vpinsrK", { XM, Vex128, Edq, Ib } },
89275796c8dcSSimon Schubert },
89285796c8dcSSimon Schubert
8929a45ae5f8SJohn Marino /* VEX_LEN_0F3A38_P_2 */
8930a45ae5f8SJohn Marino {
8931a45ae5f8SJohn Marino { Bad_Opcode },
8932a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A38_P_2) },
8933a45ae5f8SJohn Marino },
8934a45ae5f8SJohn Marino
8935a45ae5f8SJohn Marino /* VEX_LEN_0F3A39_P_2 */
8936a45ae5f8SJohn Marino {
8937a45ae5f8SJohn Marino { Bad_Opcode },
8938a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A39_P_2) },
8939a45ae5f8SJohn Marino },
8940a45ae5f8SJohn Marino
8941c50c785cSJohn Marino /* VEX_LEN_0F3A41_P_2 */
89425796c8dcSSimon Schubert {
8943c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A41_P_2) },
89445796c8dcSSimon Schubert },
89455796c8dcSSimon Schubert
8946c50c785cSJohn Marino /* VEX_LEN_0F3A44_P_2 */
89475796c8dcSSimon Schubert {
8948c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A44_P_2) },
89495796c8dcSSimon Schubert },
89505796c8dcSSimon Schubert
8951a45ae5f8SJohn Marino /* VEX_LEN_0F3A46_P_2 */
89525796c8dcSSimon Schubert {
8953a45ae5f8SJohn Marino { Bad_Opcode },
8954a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F3A46_P_2) },
89555796c8dcSSimon Schubert },
89565796c8dcSSimon Schubert
8957c50c785cSJohn Marino /* VEX_LEN_0F3A60_P_2 */
89585796c8dcSSimon Schubert {
8959c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A60_P_2) },
89605796c8dcSSimon Schubert },
89615796c8dcSSimon Schubert
8962c50c785cSJohn Marino /* VEX_LEN_0F3A61_P_2 */
89635796c8dcSSimon Schubert {
8964c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A61_P_2) },
89655796c8dcSSimon Schubert },
89665796c8dcSSimon Schubert
8967c50c785cSJohn Marino /* VEX_LEN_0F3A62_P_2 */
89685796c8dcSSimon Schubert {
8969c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A62_P_2) },
89705796c8dcSSimon Schubert },
89715796c8dcSSimon Schubert
8972c50c785cSJohn Marino /* VEX_LEN_0F3A63_P_2 */
89735796c8dcSSimon Schubert {
8974c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3A63_P_2) },
89755796c8dcSSimon Schubert },
89765796c8dcSSimon Schubert
8977c50c785cSJohn Marino /* VEX_LEN_0F3A6A_P_2 */
89785796c8dcSSimon Schubert {
8979cf7f2e2dSJohn Marino { "vfmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
89805796c8dcSSimon Schubert },
89815796c8dcSSimon Schubert
8982c50c785cSJohn Marino /* VEX_LEN_0F3A6B_P_2 */
89835796c8dcSSimon Schubert {
8984cf7f2e2dSJohn Marino { "vfmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
89855796c8dcSSimon Schubert },
89865796c8dcSSimon Schubert
8987c50c785cSJohn Marino /* VEX_LEN_0F3A6E_P_2 */
89885796c8dcSSimon Schubert {
8989cf7f2e2dSJohn Marino { "vfmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
89905796c8dcSSimon Schubert },
89915796c8dcSSimon Schubert
8992c50c785cSJohn Marino /* VEX_LEN_0F3A6F_P_2 */
89935796c8dcSSimon Schubert {
8994cf7f2e2dSJohn Marino { "vfmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
89955796c8dcSSimon Schubert },
89965796c8dcSSimon Schubert
8997c50c785cSJohn Marino /* VEX_LEN_0F3A7A_P_2 */
89985796c8dcSSimon Schubert {
8999cf7f2e2dSJohn Marino { "vfnmaddss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
90005796c8dcSSimon Schubert },
90015796c8dcSSimon Schubert
9002c50c785cSJohn Marino /* VEX_LEN_0F3A7B_P_2 */
90035796c8dcSSimon Schubert {
9004cf7f2e2dSJohn Marino { "vfnmaddsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
90055796c8dcSSimon Schubert },
90065796c8dcSSimon Schubert
9007c50c785cSJohn Marino /* VEX_LEN_0F3A7E_P_2 */
90085796c8dcSSimon Schubert {
9009cf7f2e2dSJohn Marino { "vfnmsubss", { XMVexW, Vex128, EXdVexW, EXdVexW, VexI4 } },
90105796c8dcSSimon Schubert },
90115796c8dcSSimon Schubert
9012c50c785cSJohn Marino /* VEX_LEN_0F3A7F_P_2 */
90135796c8dcSSimon Schubert {
9014cf7f2e2dSJohn Marino { "vfnmsubsd", { XMVexW, Vex128, EXqVexW, EXqVexW, VexI4 } },
90155796c8dcSSimon Schubert },
90165796c8dcSSimon Schubert
9017c50c785cSJohn Marino /* VEX_LEN_0F3ADF_P_2 */
90185796c8dcSSimon Schubert {
9019c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F3ADF_P_2) },
9020cf7f2e2dSJohn Marino },
9021cf7f2e2dSJohn Marino
9022a45ae5f8SJohn Marino /* VEX_LEN_0F3AF0_P_3 */
9023a45ae5f8SJohn Marino {
9024a45ae5f8SJohn Marino { "rorxS", { Gdq, Edq, Ib } },
9025a45ae5f8SJohn Marino },
9026a45ae5f8SJohn Marino
9027*ef5ccd6cSJohn Marino /* VEX_LEN_0FXOP_08_CC */
9028*ef5ccd6cSJohn Marino {
9029*ef5ccd6cSJohn Marino { "vpcomb", { XM, Vex128, EXx, Ib } },
9030*ef5ccd6cSJohn Marino },
9031*ef5ccd6cSJohn Marino
9032*ef5ccd6cSJohn Marino /* VEX_LEN_0FXOP_08_CD */
9033*ef5ccd6cSJohn Marino {
9034*ef5ccd6cSJohn Marino { "vpcomw", { XM, Vex128, EXx, Ib } },
9035*ef5ccd6cSJohn Marino },
9036*ef5ccd6cSJohn Marino
9037*ef5ccd6cSJohn Marino /* VEX_LEN_0FXOP_08_CE */
9038*ef5ccd6cSJohn Marino {
9039*ef5ccd6cSJohn Marino { "vpcomd", { XM, Vex128, EXx, Ib } },
9040*ef5ccd6cSJohn Marino },
9041*ef5ccd6cSJohn Marino
9042*ef5ccd6cSJohn Marino /* VEX_LEN_0FXOP_08_CF */
9043*ef5ccd6cSJohn Marino {
9044*ef5ccd6cSJohn Marino { "vpcomq", { XM, Vex128, EXx, Ib } },
9045*ef5ccd6cSJohn Marino },
9046*ef5ccd6cSJohn Marino
9047*ef5ccd6cSJohn Marino /* VEX_LEN_0FXOP_08_EC */
9048*ef5ccd6cSJohn Marino {
9049*ef5ccd6cSJohn Marino { "vpcomub", { XM, Vex128, EXx, Ib } },
9050*ef5ccd6cSJohn Marino },
9051*ef5ccd6cSJohn Marino
9052*ef5ccd6cSJohn Marino /* VEX_LEN_0FXOP_08_ED */
9053*ef5ccd6cSJohn Marino {
9054*ef5ccd6cSJohn Marino { "vpcomuw", { XM, Vex128, EXx, Ib } },
9055*ef5ccd6cSJohn Marino },
9056*ef5ccd6cSJohn Marino
9057*ef5ccd6cSJohn Marino /* VEX_LEN_0FXOP_08_EE */
9058*ef5ccd6cSJohn Marino {
9059*ef5ccd6cSJohn Marino { "vpcomud", { XM, Vex128, EXx, Ib } },
9060*ef5ccd6cSJohn Marino },
9061*ef5ccd6cSJohn Marino
9062*ef5ccd6cSJohn Marino /* VEX_LEN_0FXOP_08_EF */
9063*ef5ccd6cSJohn Marino {
9064*ef5ccd6cSJohn Marino { "vpcomuq", { XM, Vex128, EXx, Ib } },
9065*ef5ccd6cSJohn Marino },
9066*ef5ccd6cSJohn Marino
9067c50c785cSJohn Marino /* VEX_LEN_0FXOP_09_80 */
9068cf7f2e2dSJohn Marino {
9069cf7f2e2dSJohn Marino { "vfrczps", { XM, EXxmm } },
9070cf7f2e2dSJohn Marino { "vfrczps", { XM, EXymmq } },
9071cf7f2e2dSJohn Marino },
9072cf7f2e2dSJohn Marino
9073c50c785cSJohn Marino /* VEX_LEN_0FXOP_09_81 */
9074cf7f2e2dSJohn Marino {
9075cf7f2e2dSJohn Marino { "vfrczpd", { XM, EXxmm } },
9076cf7f2e2dSJohn Marino { "vfrczpd", { XM, EXymmq } },
9077cf7f2e2dSJohn Marino },
9078cf7f2e2dSJohn Marino };
9079cf7f2e2dSJohn Marino
9080cf7f2e2dSJohn Marino static const struct dis386 vex_w_table[][2] = {
9081cf7f2e2dSJohn Marino {
9082c50c785cSJohn Marino /* VEX_W_0F10_P_0 */
9083cf7f2e2dSJohn Marino { "vmovups", { XM, EXx } },
9084cf7f2e2dSJohn Marino },
9085cf7f2e2dSJohn Marino {
9086c50c785cSJohn Marino /* VEX_W_0F10_P_1 */
9087cf7f2e2dSJohn Marino { "vmovss", { XMVexScalar, VexScalar, EXdScalar } },
9088cf7f2e2dSJohn Marino },
9089cf7f2e2dSJohn Marino {
9090c50c785cSJohn Marino /* VEX_W_0F10_P_2 */
9091cf7f2e2dSJohn Marino { "vmovupd", { XM, EXx } },
9092cf7f2e2dSJohn Marino },
9093cf7f2e2dSJohn Marino {
9094c50c785cSJohn Marino /* VEX_W_0F10_P_3 */
9095cf7f2e2dSJohn Marino { "vmovsd", { XMVexScalar, VexScalar, EXqScalar } },
9096cf7f2e2dSJohn Marino },
9097cf7f2e2dSJohn Marino {
9098c50c785cSJohn Marino /* VEX_W_0F11_P_0 */
9099cf7f2e2dSJohn Marino { "vmovups", { EXxS, XM } },
9100cf7f2e2dSJohn Marino },
9101cf7f2e2dSJohn Marino {
9102c50c785cSJohn Marino /* VEX_W_0F11_P_1 */
9103cf7f2e2dSJohn Marino { "vmovss", { EXdVexScalarS, VexScalar, XMScalar } },
9104cf7f2e2dSJohn Marino },
9105cf7f2e2dSJohn Marino {
9106c50c785cSJohn Marino /* VEX_W_0F11_P_2 */
9107cf7f2e2dSJohn Marino { "vmovupd", { EXxS, XM } },
9108cf7f2e2dSJohn Marino },
9109cf7f2e2dSJohn Marino {
9110c50c785cSJohn Marino /* VEX_W_0F11_P_3 */
9111cf7f2e2dSJohn Marino { "vmovsd", { EXqVexScalarS, VexScalar, XMScalar } },
9112cf7f2e2dSJohn Marino },
9113cf7f2e2dSJohn Marino {
9114c50c785cSJohn Marino /* VEX_W_0F12_P_0_M_0 */
9115cf7f2e2dSJohn Marino { "vmovlps", { XM, Vex128, EXq } },
9116cf7f2e2dSJohn Marino },
9117cf7f2e2dSJohn Marino {
9118c50c785cSJohn Marino /* VEX_W_0F12_P_0_M_1 */
9119cf7f2e2dSJohn Marino { "vmovhlps", { XM, Vex128, EXq } },
9120cf7f2e2dSJohn Marino },
9121cf7f2e2dSJohn Marino {
9122c50c785cSJohn Marino /* VEX_W_0F12_P_1 */
9123cf7f2e2dSJohn Marino { "vmovsldup", { XM, EXx } },
9124cf7f2e2dSJohn Marino },
9125cf7f2e2dSJohn Marino {
9126c50c785cSJohn Marino /* VEX_W_0F12_P_2 */
9127cf7f2e2dSJohn Marino { "vmovlpd", { XM, Vex128, EXq } },
9128cf7f2e2dSJohn Marino },
9129cf7f2e2dSJohn Marino {
9130c50c785cSJohn Marino /* VEX_W_0F12_P_3 */
9131cf7f2e2dSJohn Marino { "vmovddup", { XM, EXymmq } },
9132cf7f2e2dSJohn Marino },
9133cf7f2e2dSJohn Marino {
9134c50c785cSJohn Marino /* VEX_W_0F13_M_0 */
9135cf7f2e2dSJohn Marino { "vmovlpX", { EXq, XM } },
9136cf7f2e2dSJohn Marino },
9137cf7f2e2dSJohn Marino {
9138c50c785cSJohn Marino /* VEX_W_0F14 */
9139cf7f2e2dSJohn Marino { "vunpcklpX", { XM, Vex, EXx } },
9140cf7f2e2dSJohn Marino },
9141cf7f2e2dSJohn Marino {
9142c50c785cSJohn Marino /* VEX_W_0F15 */
9143cf7f2e2dSJohn Marino { "vunpckhpX", { XM, Vex, EXx } },
9144cf7f2e2dSJohn Marino },
9145cf7f2e2dSJohn Marino {
9146c50c785cSJohn Marino /* VEX_W_0F16_P_0_M_0 */
9147cf7f2e2dSJohn Marino { "vmovhps", { XM, Vex128, EXq } },
9148cf7f2e2dSJohn Marino },
9149cf7f2e2dSJohn Marino {
9150c50c785cSJohn Marino /* VEX_W_0F16_P_0_M_1 */
9151cf7f2e2dSJohn Marino { "vmovlhps", { XM, Vex128, EXq } },
9152cf7f2e2dSJohn Marino },
9153cf7f2e2dSJohn Marino {
9154c50c785cSJohn Marino /* VEX_W_0F16_P_1 */
9155cf7f2e2dSJohn Marino { "vmovshdup", { XM, EXx } },
9156cf7f2e2dSJohn Marino },
9157cf7f2e2dSJohn Marino {
9158c50c785cSJohn Marino /* VEX_W_0F16_P_2 */
9159cf7f2e2dSJohn Marino { "vmovhpd", { XM, Vex128, EXq } },
9160cf7f2e2dSJohn Marino },
9161cf7f2e2dSJohn Marino {
9162c50c785cSJohn Marino /* VEX_W_0F17_M_0 */
9163cf7f2e2dSJohn Marino { "vmovhpX", { EXq, XM } },
9164cf7f2e2dSJohn Marino },
9165cf7f2e2dSJohn Marino {
9166c50c785cSJohn Marino /* VEX_W_0F28 */
9167cf7f2e2dSJohn Marino { "vmovapX", { XM, EXx } },
9168cf7f2e2dSJohn Marino },
9169cf7f2e2dSJohn Marino {
9170c50c785cSJohn Marino /* VEX_W_0F29 */
9171cf7f2e2dSJohn Marino { "vmovapX", { EXxS, XM } },
9172cf7f2e2dSJohn Marino },
9173cf7f2e2dSJohn Marino {
9174c50c785cSJohn Marino /* VEX_W_0F2B_M_0 */
9175cf7f2e2dSJohn Marino { "vmovntpX", { Mx, XM } },
9176cf7f2e2dSJohn Marino },
9177cf7f2e2dSJohn Marino {
9178c50c785cSJohn Marino /* VEX_W_0F2E_P_0 */
9179cf7f2e2dSJohn Marino { "vucomiss", { XMScalar, EXdScalar } },
9180cf7f2e2dSJohn Marino },
9181cf7f2e2dSJohn Marino {
9182c50c785cSJohn Marino /* VEX_W_0F2E_P_2 */
9183cf7f2e2dSJohn Marino { "vucomisd", { XMScalar, EXqScalar } },
9184cf7f2e2dSJohn Marino },
9185cf7f2e2dSJohn Marino {
9186c50c785cSJohn Marino /* VEX_W_0F2F_P_0 */
9187cf7f2e2dSJohn Marino { "vcomiss", { XMScalar, EXdScalar } },
9188cf7f2e2dSJohn Marino },
9189cf7f2e2dSJohn Marino {
9190c50c785cSJohn Marino /* VEX_W_0F2F_P_2 */
9191cf7f2e2dSJohn Marino { "vcomisd", { XMScalar, EXqScalar } },
9192cf7f2e2dSJohn Marino },
9193cf7f2e2dSJohn Marino {
9194c50c785cSJohn Marino /* VEX_W_0F50_M_0 */
9195cf7f2e2dSJohn Marino { "vmovmskpX", { Gdq, XS } },
9196cf7f2e2dSJohn Marino },
9197cf7f2e2dSJohn Marino {
9198c50c785cSJohn Marino /* VEX_W_0F51_P_0 */
9199cf7f2e2dSJohn Marino { "vsqrtps", { XM, EXx } },
9200cf7f2e2dSJohn Marino },
9201cf7f2e2dSJohn Marino {
9202c50c785cSJohn Marino /* VEX_W_0F51_P_1 */
9203cf7f2e2dSJohn Marino { "vsqrtss", { XMScalar, VexScalar, EXdScalar } },
9204cf7f2e2dSJohn Marino },
9205cf7f2e2dSJohn Marino {
9206c50c785cSJohn Marino /* VEX_W_0F51_P_2 */
9207cf7f2e2dSJohn Marino { "vsqrtpd", { XM, EXx } },
9208cf7f2e2dSJohn Marino },
9209cf7f2e2dSJohn Marino {
9210c50c785cSJohn Marino /* VEX_W_0F51_P_3 */
9211cf7f2e2dSJohn Marino { "vsqrtsd", { XMScalar, VexScalar, EXqScalar } },
9212cf7f2e2dSJohn Marino },
9213cf7f2e2dSJohn Marino {
9214c50c785cSJohn Marino /* VEX_W_0F52_P_0 */
9215cf7f2e2dSJohn Marino { "vrsqrtps", { XM, EXx } },
9216cf7f2e2dSJohn Marino },
9217cf7f2e2dSJohn Marino {
9218c50c785cSJohn Marino /* VEX_W_0F52_P_1 */
9219cf7f2e2dSJohn Marino { "vrsqrtss", { XMScalar, VexScalar, EXdScalar } },
9220cf7f2e2dSJohn Marino },
9221cf7f2e2dSJohn Marino {
9222c50c785cSJohn Marino /* VEX_W_0F53_P_0 */
9223cf7f2e2dSJohn Marino { "vrcpps", { XM, EXx } },
9224cf7f2e2dSJohn Marino },
9225cf7f2e2dSJohn Marino {
9226c50c785cSJohn Marino /* VEX_W_0F53_P_1 */
9227cf7f2e2dSJohn Marino { "vrcpss", { XMScalar, VexScalar, EXdScalar } },
9228cf7f2e2dSJohn Marino },
9229cf7f2e2dSJohn Marino {
9230c50c785cSJohn Marino /* VEX_W_0F58_P_0 */
9231cf7f2e2dSJohn Marino { "vaddps", { XM, Vex, EXx } },
9232cf7f2e2dSJohn Marino },
9233cf7f2e2dSJohn Marino {
9234c50c785cSJohn Marino /* VEX_W_0F58_P_1 */
9235cf7f2e2dSJohn Marino { "vaddss", { XMScalar, VexScalar, EXdScalar } },
9236cf7f2e2dSJohn Marino },
9237cf7f2e2dSJohn Marino {
9238c50c785cSJohn Marino /* VEX_W_0F58_P_2 */
9239cf7f2e2dSJohn Marino { "vaddpd", { XM, Vex, EXx } },
9240cf7f2e2dSJohn Marino },
9241cf7f2e2dSJohn Marino {
9242c50c785cSJohn Marino /* VEX_W_0F58_P_3 */
9243cf7f2e2dSJohn Marino { "vaddsd", { XMScalar, VexScalar, EXqScalar } },
9244cf7f2e2dSJohn Marino },
9245cf7f2e2dSJohn Marino {
9246c50c785cSJohn Marino /* VEX_W_0F59_P_0 */
9247cf7f2e2dSJohn Marino { "vmulps", { XM, Vex, EXx } },
9248cf7f2e2dSJohn Marino },
9249cf7f2e2dSJohn Marino {
9250c50c785cSJohn Marino /* VEX_W_0F59_P_1 */
9251cf7f2e2dSJohn Marino { "vmulss", { XMScalar, VexScalar, EXdScalar } },
9252cf7f2e2dSJohn Marino },
9253cf7f2e2dSJohn Marino {
9254c50c785cSJohn Marino /* VEX_W_0F59_P_2 */
9255cf7f2e2dSJohn Marino { "vmulpd", { XM, Vex, EXx } },
9256cf7f2e2dSJohn Marino },
9257cf7f2e2dSJohn Marino {
9258c50c785cSJohn Marino /* VEX_W_0F59_P_3 */
9259cf7f2e2dSJohn Marino { "vmulsd", { XMScalar, VexScalar, EXqScalar } },
9260cf7f2e2dSJohn Marino },
9261cf7f2e2dSJohn Marino {
9262c50c785cSJohn Marino /* VEX_W_0F5A_P_0 */
9263cf7f2e2dSJohn Marino { "vcvtps2pd", { XM, EXxmmq } },
9264cf7f2e2dSJohn Marino },
9265cf7f2e2dSJohn Marino {
9266c50c785cSJohn Marino /* VEX_W_0F5A_P_1 */
9267cf7f2e2dSJohn Marino { "vcvtss2sd", { XMScalar, VexScalar, EXdScalar } },
9268cf7f2e2dSJohn Marino },
9269cf7f2e2dSJohn Marino {
9270c50c785cSJohn Marino /* VEX_W_0F5A_P_3 */
9271cf7f2e2dSJohn Marino { "vcvtsd2ss", { XMScalar, VexScalar, EXqScalar } },
9272cf7f2e2dSJohn Marino },
9273cf7f2e2dSJohn Marino {
9274c50c785cSJohn Marino /* VEX_W_0F5B_P_0 */
9275cf7f2e2dSJohn Marino { "vcvtdq2ps", { XM, EXx } },
9276cf7f2e2dSJohn Marino },
9277cf7f2e2dSJohn Marino {
9278c50c785cSJohn Marino /* VEX_W_0F5B_P_1 */
9279cf7f2e2dSJohn Marino { "vcvttps2dq", { XM, EXx } },
9280cf7f2e2dSJohn Marino },
9281cf7f2e2dSJohn Marino {
9282c50c785cSJohn Marino /* VEX_W_0F5B_P_2 */
9283cf7f2e2dSJohn Marino { "vcvtps2dq", { XM, EXx } },
9284cf7f2e2dSJohn Marino },
9285cf7f2e2dSJohn Marino {
9286c50c785cSJohn Marino /* VEX_W_0F5C_P_0 */
9287cf7f2e2dSJohn Marino { "vsubps", { XM, Vex, EXx } },
9288cf7f2e2dSJohn Marino },
9289cf7f2e2dSJohn Marino {
9290c50c785cSJohn Marino /* VEX_W_0F5C_P_1 */
9291cf7f2e2dSJohn Marino { "vsubss", { XMScalar, VexScalar, EXdScalar } },
9292cf7f2e2dSJohn Marino },
9293cf7f2e2dSJohn Marino {
9294c50c785cSJohn Marino /* VEX_W_0F5C_P_2 */
9295cf7f2e2dSJohn Marino { "vsubpd", { XM, Vex, EXx } },
9296cf7f2e2dSJohn Marino },
9297cf7f2e2dSJohn Marino {
9298c50c785cSJohn Marino /* VEX_W_0F5C_P_3 */
9299cf7f2e2dSJohn Marino { "vsubsd", { XMScalar, VexScalar, EXqScalar } },
9300cf7f2e2dSJohn Marino },
9301cf7f2e2dSJohn Marino {
9302c50c785cSJohn Marino /* VEX_W_0F5D_P_0 */
9303cf7f2e2dSJohn Marino { "vminps", { XM, Vex, EXx } },
9304cf7f2e2dSJohn Marino },
9305cf7f2e2dSJohn Marino {
9306c50c785cSJohn Marino /* VEX_W_0F5D_P_1 */
9307cf7f2e2dSJohn Marino { "vminss", { XMScalar, VexScalar, EXdScalar } },
9308cf7f2e2dSJohn Marino },
9309cf7f2e2dSJohn Marino {
9310c50c785cSJohn Marino /* VEX_W_0F5D_P_2 */
9311cf7f2e2dSJohn Marino { "vminpd", { XM, Vex, EXx } },
9312cf7f2e2dSJohn Marino },
9313cf7f2e2dSJohn Marino {
9314c50c785cSJohn Marino /* VEX_W_0F5D_P_3 */
9315cf7f2e2dSJohn Marino { "vminsd", { XMScalar, VexScalar, EXqScalar } },
9316cf7f2e2dSJohn Marino },
9317cf7f2e2dSJohn Marino {
9318c50c785cSJohn Marino /* VEX_W_0F5E_P_0 */
9319cf7f2e2dSJohn Marino { "vdivps", { XM, Vex, EXx } },
9320cf7f2e2dSJohn Marino },
9321cf7f2e2dSJohn Marino {
9322c50c785cSJohn Marino /* VEX_W_0F5E_P_1 */
9323cf7f2e2dSJohn Marino { "vdivss", { XMScalar, VexScalar, EXdScalar } },
9324cf7f2e2dSJohn Marino },
9325cf7f2e2dSJohn Marino {
9326c50c785cSJohn Marino /* VEX_W_0F5E_P_2 */
9327cf7f2e2dSJohn Marino { "vdivpd", { XM, Vex, EXx } },
9328cf7f2e2dSJohn Marino },
9329cf7f2e2dSJohn Marino {
9330c50c785cSJohn Marino /* VEX_W_0F5E_P_3 */
9331cf7f2e2dSJohn Marino { "vdivsd", { XMScalar, VexScalar, EXqScalar } },
9332cf7f2e2dSJohn Marino },
9333cf7f2e2dSJohn Marino {
9334c50c785cSJohn Marino /* VEX_W_0F5F_P_0 */
9335cf7f2e2dSJohn Marino { "vmaxps", { XM, Vex, EXx } },
9336cf7f2e2dSJohn Marino },
9337cf7f2e2dSJohn Marino {
9338c50c785cSJohn Marino /* VEX_W_0F5F_P_1 */
9339cf7f2e2dSJohn Marino { "vmaxss", { XMScalar, VexScalar, EXdScalar } },
9340cf7f2e2dSJohn Marino },
9341cf7f2e2dSJohn Marino {
9342c50c785cSJohn Marino /* VEX_W_0F5F_P_2 */
9343cf7f2e2dSJohn Marino { "vmaxpd", { XM, Vex, EXx } },
9344cf7f2e2dSJohn Marino },
9345cf7f2e2dSJohn Marino {
9346c50c785cSJohn Marino /* VEX_W_0F5F_P_3 */
9347cf7f2e2dSJohn Marino { "vmaxsd", { XMScalar, VexScalar, EXqScalar } },
9348cf7f2e2dSJohn Marino },
9349cf7f2e2dSJohn Marino {
9350c50c785cSJohn Marino /* VEX_W_0F60_P_2 */
9351a45ae5f8SJohn Marino { "vpunpcklbw", { XM, Vex, EXx } },
9352cf7f2e2dSJohn Marino },
9353cf7f2e2dSJohn Marino {
9354c50c785cSJohn Marino /* VEX_W_0F61_P_2 */
9355a45ae5f8SJohn Marino { "vpunpcklwd", { XM, Vex, EXx } },
9356cf7f2e2dSJohn Marino },
9357cf7f2e2dSJohn Marino {
9358c50c785cSJohn Marino /* VEX_W_0F62_P_2 */
9359a45ae5f8SJohn Marino { "vpunpckldq", { XM, Vex, EXx } },
9360cf7f2e2dSJohn Marino },
9361cf7f2e2dSJohn Marino {
9362c50c785cSJohn Marino /* VEX_W_0F63_P_2 */
9363a45ae5f8SJohn Marino { "vpacksswb", { XM, Vex, EXx } },
9364cf7f2e2dSJohn Marino },
9365cf7f2e2dSJohn Marino {
9366c50c785cSJohn Marino /* VEX_W_0F64_P_2 */
9367a45ae5f8SJohn Marino { "vpcmpgtb", { XM, Vex, EXx } },
9368cf7f2e2dSJohn Marino },
9369cf7f2e2dSJohn Marino {
9370c50c785cSJohn Marino /* VEX_W_0F65_P_2 */
9371a45ae5f8SJohn Marino { "vpcmpgtw", { XM, Vex, EXx } },
9372cf7f2e2dSJohn Marino },
9373cf7f2e2dSJohn Marino {
9374c50c785cSJohn Marino /* VEX_W_0F66_P_2 */
9375a45ae5f8SJohn Marino { "vpcmpgtd", { XM, Vex, EXx } },
9376cf7f2e2dSJohn Marino },
9377cf7f2e2dSJohn Marino {
9378c50c785cSJohn Marino /* VEX_W_0F67_P_2 */
9379a45ae5f8SJohn Marino { "vpackuswb", { XM, Vex, EXx } },
9380cf7f2e2dSJohn Marino },
9381cf7f2e2dSJohn Marino {
9382c50c785cSJohn Marino /* VEX_W_0F68_P_2 */
9383a45ae5f8SJohn Marino { "vpunpckhbw", { XM, Vex, EXx } },
9384cf7f2e2dSJohn Marino },
9385cf7f2e2dSJohn Marino {
9386c50c785cSJohn Marino /* VEX_W_0F69_P_2 */
9387a45ae5f8SJohn Marino { "vpunpckhwd", { XM, Vex, EXx } },
9388cf7f2e2dSJohn Marino },
9389cf7f2e2dSJohn Marino {
9390c50c785cSJohn Marino /* VEX_W_0F6A_P_2 */
9391a45ae5f8SJohn Marino { "vpunpckhdq", { XM, Vex, EXx } },
9392cf7f2e2dSJohn Marino },
9393cf7f2e2dSJohn Marino {
9394c50c785cSJohn Marino /* VEX_W_0F6B_P_2 */
9395a45ae5f8SJohn Marino { "vpackssdw", { XM, Vex, EXx } },
9396cf7f2e2dSJohn Marino },
9397cf7f2e2dSJohn Marino {
9398c50c785cSJohn Marino /* VEX_W_0F6C_P_2 */
9399a45ae5f8SJohn Marino { "vpunpcklqdq", { XM, Vex, EXx } },
9400cf7f2e2dSJohn Marino },
9401cf7f2e2dSJohn Marino {
9402c50c785cSJohn Marino /* VEX_W_0F6D_P_2 */
9403a45ae5f8SJohn Marino { "vpunpckhqdq", { XM, Vex, EXx } },
9404cf7f2e2dSJohn Marino },
9405cf7f2e2dSJohn Marino {
9406c50c785cSJohn Marino /* VEX_W_0F6F_P_1 */
9407cf7f2e2dSJohn Marino { "vmovdqu", { XM, EXx } },
9408cf7f2e2dSJohn Marino },
9409cf7f2e2dSJohn Marino {
9410c50c785cSJohn Marino /* VEX_W_0F6F_P_2 */
9411cf7f2e2dSJohn Marino { "vmovdqa", { XM, EXx } },
9412cf7f2e2dSJohn Marino },
9413cf7f2e2dSJohn Marino {
9414c50c785cSJohn Marino /* VEX_W_0F70_P_1 */
9415cf7f2e2dSJohn Marino { "vpshufhw", { XM, EXx, Ib } },
9416cf7f2e2dSJohn Marino },
9417cf7f2e2dSJohn Marino {
9418c50c785cSJohn Marino /* VEX_W_0F70_P_2 */
9419cf7f2e2dSJohn Marino { "vpshufd", { XM, EXx, Ib } },
9420cf7f2e2dSJohn Marino },
9421cf7f2e2dSJohn Marino {
9422c50c785cSJohn Marino /* VEX_W_0F70_P_3 */
9423cf7f2e2dSJohn Marino { "vpshuflw", { XM, EXx, Ib } },
9424cf7f2e2dSJohn Marino },
9425cf7f2e2dSJohn Marino {
9426c50c785cSJohn Marino /* VEX_W_0F71_R_2_P_2 */
9427a45ae5f8SJohn Marino { "vpsrlw", { Vex, XS, Ib } },
9428cf7f2e2dSJohn Marino },
9429cf7f2e2dSJohn Marino {
9430c50c785cSJohn Marino /* VEX_W_0F71_R_4_P_2 */
9431a45ae5f8SJohn Marino { "vpsraw", { Vex, XS, Ib } },
9432cf7f2e2dSJohn Marino },
9433cf7f2e2dSJohn Marino {
9434c50c785cSJohn Marino /* VEX_W_0F71_R_6_P_2 */
9435a45ae5f8SJohn Marino { "vpsllw", { Vex, XS, Ib } },
9436cf7f2e2dSJohn Marino },
9437cf7f2e2dSJohn Marino {
9438c50c785cSJohn Marino /* VEX_W_0F72_R_2_P_2 */
9439a45ae5f8SJohn Marino { "vpsrld", { Vex, XS, Ib } },
9440cf7f2e2dSJohn Marino },
9441cf7f2e2dSJohn Marino {
9442c50c785cSJohn Marino /* VEX_W_0F72_R_4_P_2 */
9443a45ae5f8SJohn Marino { "vpsrad", { Vex, XS, Ib } },
9444cf7f2e2dSJohn Marino },
9445cf7f2e2dSJohn Marino {
9446c50c785cSJohn Marino /* VEX_W_0F72_R_6_P_2 */
9447a45ae5f8SJohn Marino { "vpslld", { Vex, XS, Ib } },
9448cf7f2e2dSJohn Marino },
9449cf7f2e2dSJohn Marino {
9450c50c785cSJohn Marino /* VEX_W_0F73_R_2_P_2 */
9451a45ae5f8SJohn Marino { "vpsrlq", { Vex, XS, Ib } },
9452cf7f2e2dSJohn Marino },
9453cf7f2e2dSJohn Marino {
9454c50c785cSJohn Marino /* VEX_W_0F73_R_3_P_2 */
9455a45ae5f8SJohn Marino { "vpsrldq", { Vex, XS, Ib } },
9456cf7f2e2dSJohn Marino },
9457cf7f2e2dSJohn Marino {
9458c50c785cSJohn Marino /* VEX_W_0F73_R_6_P_2 */
9459a45ae5f8SJohn Marino { "vpsllq", { Vex, XS, Ib } },
9460cf7f2e2dSJohn Marino },
9461cf7f2e2dSJohn Marino {
9462c50c785cSJohn Marino /* VEX_W_0F73_R_7_P_2 */
9463a45ae5f8SJohn Marino { "vpslldq", { Vex, XS, Ib } },
9464cf7f2e2dSJohn Marino },
9465cf7f2e2dSJohn Marino {
9466c50c785cSJohn Marino /* VEX_W_0F74_P_2 */
9467a45ae5f8SJohn Marino { "vpcmpeqb", { XM, Vex, EXx } },
9468cf7f2e2dSJohn Marino },
9469cf7f2e2dSJohn Marino {
9470c50c785cSJohn Marino /* VEX_W_0F75_P_2 */
9471a45ae5f8SJohn Marino { "vpcmpeqw", { XM, Vex, EXx } },
9472cf7f2e2dSJohn Marino },
9473cf7f2e2dSJohn Marino {
9474c50c785cSJohn Marino /* VEX_W_0F76_P_2 */
9475a45ae5f8SJohn Marino { "vpcmpeqd", { XM, Vex, EXx } },
9476cf7f2e2dSJohn Marino },
9477cf7f2e2dSJohn Marino {
9478c50c785cSJohn Marino /* VEX_W_0F77_P_0 */
9479cf7f2e2dSJohn Marino { "", { VZERO } },
9480cf7f2e2dSJohn Marino },
9481cf7f2e2dSJohn Marino {
9482c50c785cSJohn Marino /* VEX_W_0F7C_P_2 */
9483cf7f2e2dSJohn Marino { "vhaddpd", { XM, Vex, EXx } },
9484cf7f2e2dSJohn Marino },
9485cf7f2e2dSJohn Marino {
9486c50c785cSJohn Marino /* VEX_W_0F7C_P_3 */
9487cf7f2e2dSJohn Marino { "vhaddps", { XM, Vex, EXx } },
9488cf7f2e2dSJohn Marino },
9489cf7f2e2dSJohn Marino {
9490c50c785cSJohn Marino /* VEX_W_0F7D_P_2 */
9491cf7f2e2dSJohn Marino { "vhsubpd", { XM, Vex, EXx } },
9492cf7f2e2dSJohn Marino },
9493cf7f2e2dSJohn Marino {
9494c50c785cSJohn Marino /* VEX_W_0F7D_P_3 */
9495cf7f2e2dSJohn Marino { "vhsubps", { XM, Vex, EXx } },
9496cf7f2e2dSJohn Marino },
9497cf7f2e2dSJohn Marino {
9498c50c785cSJohn Marino /* VEX_W_0F7E_P_1 */
9499cf7f2e2dSJohn Marino { "vmovq", { XMScalar, EXqScalar } },
9500cf7f2e2dSJohn Marino },
9501cf7f2e2dSJohn Marino {
9502c50c785cSJohn Marino /* VEX_W_0F7F_P_1 */
9503cf7f2e2dSJohn Marino { "vmovdqu", { EXxS, XM } },
9504cf7f2e2dSJohn Marino },
9505cf7f2e2dSJohn Marino {
9506c50c785cSJohn Marino /* VEX_W_0F7F_P_2 */
9507cf7f2e2dSJohn Marino { "vmovdqa", { EXxS, XM } },
9508cf7f2e2dSJohn Marino },
9509cf7f2e2dSJohn Marino {
9510c50c785cSJohn Marino /* VEX_W_0FAE_R_2_M_0 */
9511cf7f2e2dSJohn Marino { "vldmxcsr", { Md } },
9512cf7f2e2dSJohn Marino },
9513cf7f2e2dSJohn Marino {
9514c50c785cSJohn Marino /* VEX_W_0FAE_R_3_M_0 */
9515cf7f2e2dSJohn Marino { "vstmxcsr", { Md } },
9516cf7f2e2dSJohn Marino },
9517cf7f2e2dSJohn Marino {
9518c50c785cSJohn Marino /* VEX_W_0FC2_P_0 */
9519cf7f2e2dSJohn Marino { "vcmpps", { XM, Vex, EXx, VCMP } },
9520cf7f2e2dSJohn Marino },
9521cf7f2e2dSJohn Marino {
9522c50c785cSJohn Marino /* VEX_W_0FC2_P_1 */
9523cf7f2e2dSJohn Marino { "vcmpss", { XMScalar, VexScalar, EXdScalar, VCMP } },
9524cf7f2e2dSJohn Marino },
9525cf7f2e2dSJohn Marino {
9526c50c785cSJohn Marino /* VEX_W_0FC2_P_2 */
9527cf7f2e2dSJohn Marino { "vcmppd", { XM, Vex, EXx, VCMP } },
9528cf7f2e2dSJohn Marino },
9529cf7f2e2dSJohn Marino {
9530c50c785cSJohn Marino /* VEX_W_0FC2_P_3 */
9531cf7f2e2dSJohn Marino { "vcmpsd", { XMScalar, VexScalar, EXqScalar, VCMP } },
9532cf7f2e2dSJohn Marino },
9533cf7f2e2dSJohn Marino {
9534c50c785cSJohn Marino /* VEX_W_0FC4_P_2 */
9535cf7f2e2dSJohn Marino { "vpinsrw", { XM, Vex128, Edqw, Ib } },
9536cf7f2e2dSJohn Marino },
9537cf7f2e2dSJohn Marino {
9538c50c785cSJohn Marino /* VEX_W_0FC5_P_2 */
9539cf7f2e2dSJohn Marino { "vpextrw", { Gdq, XS, Ib } },
9540cf7f2e2dSJohn Marino },
9541cf7f2e2dSJohn Marino {
9542c50c785cSJohn Marino /* VEX_W_0FD0_P_2 */
9543cf7f2e2dSJohn Marino { "vaddsubpd", { XM, Vex, EXx } },
9544cf7f2e2dSJohn Marino },
9545cf7f2e2dSJohn Marino {
9546c50c785cSJohn Marino /* VEX_W_0FD0_P_3 */
9547cf7f2e2dSJohn Marino { "vaddsubps", { XM, Vex, EXx } },
9548cf7f2e2dSJohn Marino },
9549cf7f2e2dSJohn Marino {
9550c50c785cSJohn Marino /* VEX_W_0FD1_P_2 */
9551a45ae5f8SJohn Marino { "vpsrlw", { XM, Vex, EXxmm } },
9552cf7f2e2dSJohn Marino },
9553cf7f2e2dSJohn Marino {
9554c50c785cSJohn Marino /* VEX_W_0FD2_P_2 */
9555a45ae5f8SJohn Marino { "vpsrld", { XM, Vex, EXxmm } },
9556cf7f2e2dSJohn Marino },
9557cf7f2e2dSJohn Marino {
9558c50c785cSJohn Marino /* VEX_W_0FD3_P_2 */
9559a45ae5f8SJohn Marino { "vpsrlq", { XM, Vex, EXxmm } },
9560cf7f2e2dSJohn Marino },
9561cf7f2e2dSJohn Marino {
9562c50c785cSJohn Marino /* VEX_W_0FD4_P_2 */
9563a45ae5f8SJohn Marino { "vpaddq", { XM, Vex, EXx } },
9564cf7f2e2dSJohn Marino },
9565cf7f2e2dSJohn Marino {
9566c50c785cSJohn Marino /* VEX_W_0FD5_P_2 */
9567a45ae5f8SJohn Marino { "vpmullw", { XM, Vex, EXx } },
9568cf7f2e2dSJohn Marino },
9569cf7f2e2dSJohn Marino {
9570c50c785cSJohn Marino /* VEX_W_0FD6_P_2 */
9571cf7f2e2dSJohn Marino { "vmovq", { EXqScalarS, XMScalar } },
9572cf7f2e2dSJohn Marino },
9573cf7f2e2dSJohn Marino {
9574c50c785cSJohn Marino /* VEX_W_0FD7_P_2_M_1 */
9575cf7f2e2dSJohn Marino { "vpmovmskb", { Gdq, XS } },
9576cf7f2e2dSJohn Marino },
9577cf7f2e2dSJohn Marino {
9578c50c785cSJohn Marino /* VEX_W_0FD8_P_2 */
9579a45ae5f8SJohn Marino { "vpsubusb", { XM, Vex, EXx } },
9580cf7f2e2dSJohn Marino },
9581cf7f2e2dSJohn Marino {
9582c50c785cSJohn Marino /* VEX_W_0FD9_P_2 */
9583a45ae5f8SJohn Marino { "vpsubusw", { XM, Vex, EXx } },
9584cf7f2e2dSJohn Marino },
9585cf7f2e2dSJohn Marino {
9586c50c785cSJohn Marino /* VEX_W_0FDA_P_2 */
9587a45ae5f8SJohn Marino { "vpminub", { XM, Vex, EXx } },
9588cf7f2e2dSJohn Marino },
9589cf7f2e2dSJohn Marino {
9590c50c785cSJohn Marino /* VEX_W_0FDB_P_2 */
9591a45ae5f8SJohn Marino { "vpand", { XM, Vex, EXx } },
9592cf7f2e2dSJohn Marino },
9593cf7f2e2dSJohn Marino {
9594c50c785cSJohn Marino /* VEX_W_0FDC_P_2 */
9595a45ae5f8SJohn Marino { "vpaddusb", { XM, Vex, EXx } },
9596cf7f2e2dSJohn Marino },
9597cf7f2e2dSJohn Marino {
9598c50c785cSJohn Marino /* VEX_W_0FDD_P_2 */
9599a45ae5f8SJohn Marino { "vpaddusw", { XM, Vex, EXx } },
9600cf7f2e2dSJohn Marino },
9601cf7f2e2dSJohn Marino {
9602c50c785cSJohn Marino /* VEX_W_0FDE_P_2 */
9603a45ae5f8SJohn Marino { "vpmaxub", { XM, Vex, EXx } },
9604cf7f2e2dSJohn Marino },
9605cf7f2e2dSJohn Marino {
9606c50c785cSJohn Marino /* VEX_W_0FDF_P_2 */
9607a45ae5f8SJohn Marino { "vpandn", { XM, Vex, EXx } },
9608cf7f2e2dSJohn Marino },
9609cf7f2e2dSJohn Marino {
9610c50c785cSJohn Marino /* VEX_W_0FE0_P_2 */
9611a45ae5f8SJohn Marino { "vpavgb", { XM, Vex, EXx } },
9612cf7f2e2dSJohn Marino },
9613cf7f2e2dSJohn Marino {
9614c50c785cSJohn Marino /* VEX_W_0FE1_P_2 */
9615a45ae5f8SJohn Marino { "vpsraw", { XM, Vex, EXxmm } },
9616cf7f2e2dSJohn Marino },
9617cf7f2e2dSJohn Marino {
9618c50c785cSJohn Marino /* VEX_W_0FE2_P_2 */
9619a45ae5f8SJohn Marino { "vpsrad", { XM, Vex, EXxmm } },
9620cf7f2e2dSJohn Marino },
9621cf7f2e2dSJohn Marino {
9622c50c785cSJohn Marino /* VEX_W_0FE3_P_2 */
9623a45ae5f8SJohn Marino { "vpavgw", { XM, Vex, EXx } },
9624cf7f2e2dSJohn Marino },
9625cf7f2e2dSJohn Marino {
9626c50c785cSJohn Marino /* VEX_W_0FE4_P_2 */
9627a45ae5f8SJohn Marino { "vpmulhuw", { XM, Vex, EXx } },
9628cf7f2e2dSJohn Marino },
9629cf7f2e2dSJohn Marino {
9630c50c785cSJohn Marino /* VEX_W_0FE5_P_2 */
9631a45ae5f8SJohn Marino { "vpmulhw", { XM, Vex, EXx } },
9632cf7f2e2dSJohn Marino },
9633cf7f2e2dSJohn Marino {
9634c50c785cSJohn Marino /* VEX_W_0FE6_P_1 */
9635cf7f2e2dSJohn Marino { "vcvtdq2pd", { XM, EXxmmq } },
9636cf7f2e2dSJohn Marino },
9637cf7f2e2dSJohn Marino {
9638c50c785cSJohn Marino /* VEX_W_0FE6_P_2 */
9639cf7f2e2dSJohn Marino { "vcvttpd2dq%XY", { XMM, EXx } },
9640cf7f2e2dSJohn Marino },
9641cf7f2e2dSJohn Marino {
9642c50c785cSJohn Marino /* VEX_W_0FE6_P_3 */
9643cf7f2e2dSJohn Marino { "vcvtpd2dq%XY", { XMM, EXx } },
9644cf7f2e2dSJohn Marino },
9645cf7f2e2dSJohn Marino {
9646c50c785cSJohn Marino /* VEX_W_0FE7_P_2_M_0 */
9647cf7f2e2dSJohn Marino { "vmovntdq", { Mx, XM } },
9648cf7f2e2dSJohn Marino },
9649cf7f2e2dSJohn Marino {
9650c50c785cSJohn Marino /* VEX_W_0FE8_P_2 */
9651a45ae5f8SJohn Marino { "vpsubsb", { XM, Vex, EXx } },
9652cf7f2e2dSJohn Marino },
9653cf7f2e2dSJohn Marino {
9654c50c785cSJohn Marino /* VEX_W_0FE9_P_2 */
9655a45ae5f8SJohn Marino { "vpsubsw", { XM, Vex, EXx } },
9656cf7f2e2dSJohn Marino },
9657cf7f2e2dSJohn Marino {
9658c50c785cSJohn Marino /* VEX_W_0FEA_P_2 */
9659a45ae5f8SJohn Marino { "vpminsw", { XM, Vex, EXx } },
9660cf7f2e2dSJohn Marino },
9661cf7f2e2dSJohn Marino {
9662c50c785cSJohn Marino /* VEX_W_0FEB_P_2 */
9663a45ae5f8SJohn Marino { "vpor", { XM, Vex, EXx } },
9664cf7f2e2dSJohn Marino },
9665cf7f2e2dSJohn Marino {
9666c50c785cSJohn Marino /* VEX_W_0FEC_P_2 */
9667a45ae5f8SJohn Marino { "vpaddsb", { XM, Vex, EXx } },
9668cf7f2e2dSJohn Marino },
9669cf7f2e2dSJohn Marino {
9670c50c785cSJohn Marino /* VEX_W_0FED_P_2 */
9671a45ae5f8SJohn Marino { "vpaddsw", { XM, Vex, EXx } },
9672cf7f2e2dSJohn Marino },
9673cf7f2e2dSJohn Marino {
9674c50c785cSJohn Marino /* VEX_W_0FEE_P_2 */
9675a45ae5f8SJohn Marino { "vpmaxsw", { XM, Vex, EXx } },
9676cf7f2e2dSJohn Marino },
9677cf7f2e2dSJohn Marino {
9678c50c785cSJohn Marino /* VEX_W_0FEF_P_2 */
9679a45ae5f8SJohn Marino { "vpxor", { XM, Vex, EXx } },
9680cf7f2e2dSJohn Marino },
9681cf7f2e2dSJohn Marino {
9682c50c785cSJohn Marino /* VEX_W_0FF0_P_3_M_0 */
9683cf7f2e2dSJohn Marino { "vlddqu", { XM, M } },
9684cf7f2e2dSJohn Marino },
9685cf7f2e2dSJohn Marino {
9686c50c785cSJohn Marino /* VEX_W_0FF1_P_2 */
9687a45ae5f8SJohn Marino { "vpsllw", { XM, Vex, EXxmm } },
9688cf7f2e2dSJohn Marino },
9689cf7f2e2dSJohn Marino {
9690c50c785cSJohn Marino /* VEX_W_0FF2_P_2 */
9691a45ae5f8SJohn Marino { "vpslld", { XM, Vex, EXxmm } },
9692cf7f2e2dSJohn Marino },
9693cf7f2e2dSJohn Marino {
9694c50c785cSJohn Marino /* VEX_W_0FF3_P_2 */
9695a45ae5f8SJohn Marino { "vpsllq", { XM, Vex, EXxmm } },
9696cf7f2e2dSJohn Marino },
9697cf7f2e2dSJohn Marino {
9698c50c785cSJohn Marino /* VEX_W_0FF4_P_2 */
9699a45ae5f8SJohn Marino { "vpmuludq", { XM, Vex, EXx } },
9700cf7f2e2dSJohn Marino },
9701cf7f2e2dSJohn Marino {
9702c50c785cSJohn Marino /* VEX_W_0FF5_P_2 */
9703a45ae5f8SJohn Marino { "vpmaddwd", { XM, Vex, EXx } },
9704cf7f2e2dSJohn Marino },
9705cf7f2e2dSJohn Marino {
9706c50c785cSJohn Marino /* VEX_W_0FF6_P_2 */
9707a45ae5f8SJohn Marino { "vpsadbw", { XM, Vex, EXx } },
9708cf7f2e2dSJohn Marino },
9709cf7f2e2dSJohn Marino {
9710c50c785cSJohn Marino /* VEX_W_0FF7_P_2 */
9711cf7f2e2dSJohn Marino { "vmaskmovdqu", { XM, XS } },
9712cf7f2e2dSJohn Marino },
9713cf7f2e2dSJohn Marino {
9714c50c785cSJohn Marino /* VEX_W_0FF8_P_2 */
9715a45ae5f8SJohn Marino { "vpsubb", { XM, Vex, EXx } },
9716cf7f2e2dSJohn Marino },
9717cf7f2e2dSJohn Marino {
9718c50c785cSJohn Marino /* VEX_W_0FF9_P_2 */
9719a45ae5f8SJohn Marino { "vpsubw", { XM, Vex, EXx } },
9720cf7f2e2dSJohn Marino },
9721cf7f2e2dSJohn Marino {
9722c50c785cSJohn Marino /* VEX_W_0FFA_P_2 */
9723a45ae5f8SJohn Marino { "vpsubd", { XM, Vex, EXx } },
9724cf7f2e2dSJohn Marino },
9725cf7f2e2dSJohn Marino {
9726c50c785cSJohn Marino /* VEX_W_0FFB_P_2 */
9727a45ae5f8SJohn Marino { "vpsubq", { XM, Vex, EXx } },
9728cf7f2e2dSJohn Marino },
9729cf7f2e2dSJohn Marino {
9730c50c785cSJohn Marino /* VEX_W_0FFC_P_2 */
9731a45ae5f8SJohn Marino { "vpaddb", { XM, Vex, EXx } },
9732cf7f2e2dSJohn Marino },
9733cf7f2e2dSJohn Marino {
9734c50c785cSJohn Marino /* VEX_W_0FFD_P_2 */
9735a45ae5f8SJohn Marino { "vpaddw", { XM, Vex, EXx } },
9736cf7f2e2dSJohn Marino },
9737cf7f2e2dSJohn Marino {
9738c50c785cSJohn Marino /* VEX_W_0FFE_P_2 */
9739a45ae5f8SJohn Marino { "vpaddd", { XM, Vex, EXx } },
9740cf7f2e2dSJohn Marino },
9741cf7f2e2dSJohn Marino {
9742c50c785cSJohn Marino /* VEX_W_0F3800_P_2 */
9743a45ae5f8SJohn Marino { "vpshufb", { XM, Vex, EXx } },
9744cf7f2e2dSJohn Marino },
9745cf7f2e2dSJohn Marino {
9746c50c785cSJohn Marino /* VEX_W_0F3801_P_2 */
9747a45ae5f8SJohn Marino { "vphaddw", { XM, Vex, EXx } },
9748cf7f2e2dSJohn Marino },
9749cf7f2e2dSJohn Marino {
9750c50c785cSJohn Marino /* VEX_W_0F3802_P_2 */
9751a45ae5f8SJohn Marino { "vphaddd", { XM, Vex, EXx } },
9752cf7f2e2dSJohn Marino },
9753cf7f2e2dSJohn Marino {
9754c50c785cSJohn Marino /* VEX_W_0F3803_P_2 */
9755a45ae5f8SJohn Marino { "vphaddsw", { XM, Vex, EXx } },
9756cf7f2e2dSJohn Marino },
9757cf7f2e2dSJohn Marino {
9758c50c785cSJohn Marino /* VEX_W_0F3804_P_2 */
9759a45ae5f8SJohn Marino { "vpmaddubsw", { XM, Vex, EXx } },
9760cf7f2e2dSJohn Marino },
9761cf7f2e2dSJohn Marino {
9762c50c785cSJohn Marino /* VEX_W_0F3805_P_2 */
9763a45ae5f8SJohn Marino { "vphsubw", { XM, Vex, EXx } },
9764cf7f2e2dSJohn Marino },
9765cf7f2e2dSJohn Marino {
9766c50c785cSJohn Marino /* VEX_W_0F3806_P_2 */
9767a45ae5f8SJohn Marino { "vphsubd", { XM, Vex, EXx } },
9768cf7f2e2dSJohn Marino },
9769cf7f2e2dSJohn Marino {
9770c50c785cSJohn Marino /* VEX_W_0F3807_P_2 */
9771a45ae5f8SJohn Marino { "vphsubsw", { XM, Vex, EXx } },
9772cf7f2e2dSJohn Marino },
9773cf7f2e2dSJohn Marino {
9774c50c785cSJohn Marino /* VEX_W_0F3808_P_2 */
9775a45ae5f8SJohn Marino { "vpsignb", { XM, Vex, EXx } },
9776cf7f2e2dSJohn Marino },
9777cf7f2e2dSJohn Marino {
9778c50c785cSJohn Marino /* VEX_W_0F3809_P_2 */
9779a45ae5f8SJohn Marino { "vpsignw", { XM, Vex, EXx } },
9780cf7f2e2dSJohn Marino },
9781cf7f2e2dSJohn Marino {
9782c50c785cSJohn Marino /* VEX_W_0F380A_P_2 */
9783a45ae5f8SJohn Marino { "vpsignd", { XM, Vex, EXx } },
9784cf7f2e2dSJohn Marino },
9785cf7f2e2dSJohn Marino {
9786c50c785cSJohn Marino /* VEX_W_0F380B_P_2 */
9787a45ae5f8SJohn Marino { "vpmulhrsw", { XM, Vex, EXx } },
9788cf7f2e2dSJohn Marino },
9789cf7f2e2dSJohn Marino {
9790c50c785cSJohn Marino /* VEX_W_0F380C_P_2 */
9791cf7f2e2dSJohn Marino { "vpermilps", { XM, Vex, EXx } },
9792cf7f2e2dSJohn Marino },
9793cf7f2e2dSJohn Marino {
9794c50c785cSJohn Marino /* VEX_W_0F380D_P_2 */
9795cf7f2e2dSJohn Marino { "vpermilpd", { XM, Vex, EXx } },
9796cf7f2e2dSJohn Marino },
9797cf7f2e2dSJohn Marino {
9798c50c785cSJohn Marino /* VEX_W_0F380E_P_2 */
9799cf7f2e2dSJohn Marino { "vtestps", { XM, EXx } },
9800cf7f2e2dSJohn Marino },
9801cf7f2e2dSJohn Marino {
9802c50c785cSJohn Marino /* VEX_W_0F380F_P_2 */
9803cf7f2e2dSJohn Marino { "vtestpd", { XM, EXx } },
9804cf7f2e2dSJohn Marino },
9805cf7f2e2dSJohn Marino {
9806a45ae5f8SJohn Marino /* VEX_W_0F3816_P_2 */
9807a45ae5f8SJohn Marino { "vpermps", { XM, Vex, EXx } },
9808a45ae5f8SJohn Marino },
9809a45ae5f8SJohn Marino {
9810c50c785cSJohn Marino /* VEX_W_0F3817_P_2 */
9811cf7f2e2dSJohn Marino { "vptest", { XM, EXx } },
9812cf7f2e2dSJohn Marino },
9813cf7f2e2dSJohn Marino {
9814a45ae5f8SJohn Marino /* VEX_W_0F3818_P_2 */
9815a45ae5f8SJohn Marino { "vbroadcastss", { XM, EXxmm_md } },
9816cf7f2e2dSJohn Marino },
9817cf7f2e2dSJohn Marino {
9818a45ae5f8SJohn Marino /* VEX_W_0F3819_P_2 */
9819a45ae5f8SJohn Marino { "vbroadcastsd", { XM, EXxmm_mq } },
9820cf7f2e2dSJohn Marino },
9821cf7f2e2dSJohn Marino {
9822c50c785cSJohn Marino /* VEX_W_0F381A_P_2_M_0 */
9823cf7f2e2dSJohn Marino { "vbroadcastf128", { XM, Mxmm } },
9824cf7f2e2dSJohn Marino },
9825cf7f2e2dSJohn Marino {
9826c50c785cSJohn Marino /* VEX_W_0F381C_P_2 */
9827cf7f2e2dSJohn Marino { "vpabsb", { XM, EXx } },
9828cf7f2e2dSJohn Marino },
9829cf7f2e2dSJohn Marino {
9830c50c785cSJohn Marino /* VEX_W_0F381D_P_2 */
9831cf7f2e2dSJohn Marino { "vpabsw", { XM, EXx } },
9832cf7f2e2dSJohn Marino },
9833cf7f2e2dSJohn Marino {
9834c50c785cSJohn Marino /* VEX_W_0F381E_P_2 */
9835cf7f2e2dSJohn Marino { "vpabsd", { XM, EXx } },
9836cf7f2e2dSJohn Marino },
9837cf7f2e2dSJohn Marino {
9838c50c785cSJohn Marino /* VEX_W_0F3820_P_2 */
9839a45ae5f8SJohn Marino { "vpmovsxbw", { XM, EXxmmq } },
9840cf7f2e2dSJohn Marino },
9841cf7f2e2dSJohn Marino {
9842c50c785cSJohn Marino /* VEX_W_0F3821_P_2 */
9843a45ae5f8SJohn Marino { "vpmovsxbd", { XM, EXxmmqd } },
9844cf7f2e2dSJohn Marino },
9845cf7f2e2dSJohn Marino {
9846c50c785cSJohn Marino /* VEX_W_0F3822_P_2 */
9847a45ae5f8SJohn Marino { "vpmovsxbq", { XM, EXxmmdw } },
9848cf7f2e2dSJohn Marino },
9849cf7f2e2dSJohn Marino {
9850c50c785cSJohn Marino /* VEX_W_0F3823_P_2 */
9851a45ae5f8SJohn Marino { "vpmovsxwd", { XM, EXxmmq } },
9852cf7f2e2dSJohn Marino },
9853cf7f2e2dSJohn Marino {
9854c50c785cSJohn Marino /* VEX_W_0F3824_P_2 */
9855a45ae5f8SJohn Marino { "vpmovsxwq", { XM, EXxmmqd } },
9856cf7f2e2dSJohn Marino },
9857cf7f2e2dSJohn Marino {
9858c50c785cSJohn Marino /* VEX_W_0F3825_P_2 */
9859a45ae5f8SJohn Marino { "vpmovsxdq", { XM, EXxmmq } },
9860cf7f2e2dSJohn Marino },
9861cf7f2e2dSJohn Marino {
9862c50c785cSJohn Marino /* VEX_W_0F3828_P_2 */
9863a45ae5f8SJohn Marino { "vpmuldq", { XM, Vex, EXx } },
9864cf7f2e2dSJohn Marino },
9865cf7f2e2dSJohn Marino {
9866c50c785cSJohn Marino /* VEX_W_0F3829_P_2 */
9867a45ae5f8SJohn Marino { "vpcmpeqq", { XM, Vex, EXx } },
9868cf7f2e2dSJohn Marino },
9869cf7f2e2dSJohn Marino {
9870c50c785cSJohn Marino /* VEX_W_0F382A_P_2_M_0 */
9871cf7f2e2dSJohn Marino { "vmovntdqa", { XM, Mx } },
9872cf7f2e2dSJohn Marino },
9873cf7f2e2dSJohn Marino {
9874c50c785cSJohn Marino /* VEX_W_0F382B_P_2 */
9875a45ae5f8SJohn Marino { "vpackusdw", { XM, Vex, EXx } },
9876cf7f2e2dSJohn Marino },
9877cf7f2e2dSJohn Marino {
9878c50c785cSJohn Marino /* VEX_W_0F382C_P_2_M_0 */
9879cf7f2e2dSJohn Marino { "vmaskmovps", { XM, Vex, Mx } },
9880cf7f2e2dSJohn Marino },
9881cf7f2e2dSJohn Marino {
9882c50c785cSJohn Marino /* VEX_W_0F382D_P_2_M_0 */
9883cf7f2e2dSJohn Marino { "vmaskmovpd", { XM, Vex, Mx } },
9884cf7f2e2dSJohn Marino },
9885cf7f2e2dSJohn Marino {
9886c50c785cSJohn Marino /* VEX_W_0F382E_P_2_M_0 */
9887cf7f2e2dSJohn Marino { "vmaskmovps", { Mx, Vex, XM } },
9888cf7f2e2dSJohn Marino },
9889cf7f2e2dSJohn Marino {
9890c50c785cSJohn Marino /* VEX_W_0F382F_P_2_M_0 */
9891cf7f2e2dSJohn Marino { "vmaskmovpd", { Mx, Vex, XM } },
9892cf7f2e2dSJohn Marino },
9893cf7f2e2dSJohn Marino {
9894c50c785cSJohn Marino /* VEX_W_0F3830_P_2 */
9895a45ae5f8SJohn Marino { "vpmovzxbw", { XM, EXxmmq } },
9896cf7f2e2dSJohn Marino },
9897cf7f2e2dSJohn Marino {
9898c50c785cSJohn Marino /* VEX_W_0F3831_P_2 */
9899a45ae5f8SJohn Marino { "vpmovzxbd", { XM, EXxmmqd } },
9900cf7f2e2dSJohn Marino },
9901cf7f2e2dSJohn Marino {
9902c50c785cSJohn Marino /* VEX_W_0F3832_P_2 */
9903a45ae5f8SJohn Marino { "vpmovzxbq", { XM, EXxmmdw } },
9904cf7f2e2dSJohn Marino },
9905cf7f2e2dSJohn Marino {
9906c50c785cSJohn Marino /* VEX_W_0F3833_P_2 */
9907a45ae5f8SJohn Marino { "vpmovzxwd", { XM, EXxmmq } },
9908cf7f2e2dSJohn Marino },
9909cf7f2e2dSJohn Marino {
9910c50c785cSJohn Marino /* VEX_W_0F3834_P_2 */
9911a45ae5f8SJohn Marino { "vpmovzxwq", { XM, EXxmmqd } },
9912cf7f2e2dSJohn Marino },
9913cf7f2e2dSJohn Marino {
9914c50c785cSJohn Marino /* VEX_W_0F3835_P_2 */
9915a45ae5f8SJohn Marino { "vpmovzxdq", { XM, EXxmmq } },
9916a45ae5f8SJohn Marino },
9917a45ae5f8SJohn Marino {
9918a45ae5f8SJohn Marino /* VEX_W_0F3836_P_2 */
9919a45ae5f8SJohn Marino { "vpermd", { XM, Vex, EXx } },
9920cf7f2e2dSJohn Marino },
9921cf7f2e2dSJohn Marino {
9922c50c785cSJohn Marino /* VEX_W_0F3837_P_2 */
9923a45ae5f8SJohn Marino { "vpcmpgtq", { XM, Vex, EXx } },
9924cf7f2e2dSJohn Marino },
9925cf7f2e2dSJohn Marino {
9926c50c785cSJohn Marino /* VEX_W_0F3838_P_2 */
9927a45ae5f8SJohn Marino { "vpminsb", { XM, Vex, EXx } },
9928cf7f2e2dSJohn Marino },
9929cf7f2e2dSJohn Marino {
9930c50c785cSJohn Marino /* VEX_W_0F3839_P_2 */
9931a45ae5f8SJohn Marino { "vpminsd", { XM, Vex, EXx } },
9932cf7f2e2dSJohn Marino },
9933cf7f2e2dSJohn Marino {
9934c50c785cSJohn Marino /* VEX_W_0F383A_P_2 */
9935a45ae5f8SJohn Marino { "vpminuw", { XM, Vex, EXx } },
9936cf7f2e2dSJohn Marino },
9937cf7f2e2dSJohn Marino {
9938c50c785cSJohn Marino /* VEX_W_0F383B_P_2 */
9939a45ae5f8SJohn Marino { "vpminud", { XM, Vex, EXx } },
9940cf7f2e2dSJohn Marino },
9941cf7f2e2dSJohn Marino {
9942c50c785cSJohn Marino /* VEX_W_0F383C_P_2 */
9943a45ae5f8SJohn Marino { "vpmaxsb", { XM, Vex, EXx } },
9944cf7f2e2dSJohn Marino },
9945cf7f2e2dSJohn Marino {
9946c50c785cSJohn Marino /* VEX_W_0F383D_P_2 */
9947a45ae5f8SJohn Marino { "vpmaxsd", { XM, Vex, EXx } },
9948cf7f2e2dSJohn Marino },
9949cf7f2e2dSJohn Marino {
9950c50c785cSJohn Marino /* VEX_W_0F383E_P_2 */
9951a45ae5f8SJohn Marino { "vpmaxuw", { XM, Vex, EXx } },
9952cf7f2e2dSJohn Marino },
9953cf7f2e2dSJohn Marino {
9954c50c785cSJohn Marino /* VEX_W_0F383F_P_2 */
9955a45ae5f8SJohn Marino { "vpmaxud", { XM, Vex, EXx } },
9956cf7f2e2dSJohn Marino },
9957cf7f2e2dSJohn Marino {
9958c50c785cSJohn Marino /* VEX_W_0F3840_P_2 */
9959a45ae5f8SJohn Marino { "vpmulld", { XM, Vex, EXx } },
9960cf7f2e2dSJohn Marino },
9961cf7f2e2dSJohn Marino {
9962c50c785cSJohn Marino /* VEX_W_0F3841_P_2 */
9963cf7f2e2dSJohn Marino { "vphminposuw", { XM, EXx } },
9964cf7f2e2dSJohn Marino },
9965cf7f2e2dSJohn Marino {
9966a45ae5f8SJohn Marino /* VEX_W_0F3846_P_2 */
9967a45ae5f8SJohn Marino { "vpsravd", { XM, Vex, EXx } },
9968a45ae5f8SJohn Marino },
9969a45ae5f8SJohn Marino {
9970a45ae5f8SJohn Marino /* VEX_W_0F3858_P_2 */
9971a45ae5f8SJohn Marino { "vpbroadcastd", { XM, EXxmm_md } },
9972a45ae5f8SJohn Marino },
9973a45ae5f8SJohn Marino {
9974a45ae5f8SJohn Marino /* VEX_W_0F3859_P_2 */
9975a45ae5f8SJohn Marino { "vpbroadcastq", { XM, EXxmm_mq } },
9976a45ae5f8SJohn Marino },
9977a45ae5f8SJohn Marino {
9978a45ae5f8SJohn Marino /* VEX_W_0F385A_P_2_M_0 */
9979a45ae5f8SJohn Marino { "vbroadcasti128", { XM, Mxmm } },
9980a45ae5f8SJohn Marino },
9981a45ae5f8SJohn Marino {
9982a45ae5f8SJohn Marino /* VEX_W_0F3878_P_2 */
9983a45ae5f8SJohn Marino { "vpbroadcastb", { XM, EXxmm_mb } },
9984a45ae5f8SJohn Marino },
9985a45ae5f8SJohn Marino {
9986a45ae5f8SJohn Marino /* VEX_W_0F3879_P_2 */
9987a45ae5f8SJohn Marino { "vpbroadcastw", { XM, EXxmm_mw } },
9988a45ae5f8SJohn Marino },
9989a45ae5f8SJohn Marino {
9990c50c785cSJohn Marino /* VEX_W_0F38DB_P_2 */
9991cf7f2e2dSJohn Marino { "vaesimc", { XM, EXx } },
9992cf7f2e2dSJohn Marino },
9993cf7f2e2dSJohn Marino {
9994c50c785cSJohn Marino /* VEX_W_0F38DC_P_2 */
9995cf7f2e2dSJohn Marino { "vaesenc", { XM, Vex128, EXx } },
9996cf7f2e2dSJohn Marino },
9997cf7f2e2dSJohn Marino {
9998c50c785cSJohn Marino /* VEX_W_0F38DD_P_2 */
9999cf7f2e2dSJohn Marino { "vaesenclast", { XM, Vex128, EXx } },
10000cf7f2e2dSJohn Marino },
10001cf7f2e2dSJohn Marino {
10002c50c785cSJohn Marino /* VEX_W_0F38DE_P_2 */
10003cf7f2e2dSJohn Marino { "vaesdec", { XM, Vex128, EXx } },
10004cf7f2e2dSJohn Marino },
10005cf7f2e2dSJohn Marino {
10006c50c785cSJohn Marino /* VEX_W_0F38DF_P_2 */
10007cf7f2e2dSJohn Marino { "vaesdeclast", { XM, Vex128, EXx } },
10008cf7f2e2dSJohn Marino },
10009cf7f2e2dSJohn Marino {
10010a45ae5f8SJohn Marino /* VEX_W_0F3A00_P_2 */
10011a45ae5f8SJohn Marino { Bad_Opcode },
10012a45ae5f8SJohn Marino { "vpermq", { XM, EXx, Ib } },
10013a45ae5f8SJohn Marino },
10014a45ae5f8SJohn Marino {
10015a45ae5f8SJohn Marino /* VEX_W_0F3A01_P_2 */
10016a45ae5f8SJohn Marino { Bad_Opcode },
10017a45ae5f8SJohn Marino { "vpermpd", { XM, EXx, Ib } },
10018a45ae5f8SJohn Marino },
10019a45ae5f8SJohn Marino {
10020a45ae5f8SJohn Marino /* VEX_W_0F3A02_P_2 */
10021a45ae5f8SJohn Marino { "vpblendd", { XM, Vex, EXx, Ib } },
10022a45ae5f8SJohn Marino },
10023a45ae5f8SJohn Marino {
10024c50c785cSJohn Marino /* VEX_W_0F3A04_P_2 */
10025cf7f2e2dSJohn Marino { "vpermilps", { XM, EXx, Ib } },
10026cf7f2e2dSJohn Marino },
10027cf7f2e2dSJohn Marino {
10028c50c785cSJohn Marino /* VEX_W_0F3A05_P_2 */
10029cf7f2e2dSJohn Marino { "vpermilpd", { XM, EXx, Ib } },
10030cf7f2e2dSJohn Marino },
10031cf7f2e2dSJohn Marino {
10032c50c785cSJohn Marino /* VEX_W_0F3A06_P_2 */
10033cf7f2e2dSJohn Marino { "vperm2f128", { XM, Vex256, EXx, Ib } },
10034cf7f2e2dSJohn Marino },
10035cf7f2e2dSJohn Marino {
10036c50c785cSJohn Marino /* VEX_W_0F3A08_P_2 */
10037cf7f2e2dSJohn Marino { "vroundps", { XM, EXx, Ib } },
10038cf7f2e2dSJohn Marino },
10039cf7f2e2dSJohn Marino {
10040c50c785cSJohn Marino /* VEX_W_0F3A09_P_2 */
10041cf7f2e2dSJohn Marino { "vroundpd", { XM, EXx, Ib } },
10042cf7f2e2dSJohn Marino },
10043cf7f2e2dSJohn Marino {
10044c50c785cSJohn Marino /* VEX_W_0F3A0A_P_2 */
10045cf7f2e2dSJohn Marino { "vroundss", { XMScalar, VexScalar, EXdScalar, Ib } },
10046cf7f2e2dSJohn Marino },
10047cf7f2e2dSJohn Marino {
10048c50c785cSJohn Marino /* VEX_W_0F3A0B_P_2 */
10049cf7f2e2dSJohn Marino { "vroundsd", { XMScalar, VexScalar, EXqScalar, Ib } },
10050cf7f2e2dSJohn Marino },
10051cf7f2e2dSJohn Marino {
10052c50c785cSJohn Marino /* VEX_W_0F3A0C_P_2 */
10053cf7f2e2dSJohn Marino { "vblendps", { XM, Vex, EXx, Ib } },
10054cf7f2e2dSJohn Marino },
10055cf7f2e2dSJohn Marino {
10056c50c785cSJohn Marino /* VEX_W_0F3A0D_P_2 */
10057cf7f2e2dSJohn Marino { "vblendpd", { XM, Vex, EXx, Ib } },
10058cf7f2e2dSJohn Marino },
10059cf7f2e2dSJohn Marino {
10060c50c785cSJohn Marino /* VEX_W_0F3A0E_P_2 */
10061a45ae5f8SJohn Marino { "vpblendw", { XM, Vex, EXx, Ib } },
10062cf7f2e2dSJohn Marino },
10063cf7f2e2dSJohn Marino {
10064c50c785cSJohn Marino /* VEX_W_0F3A0F_P_2 */
10065a45ae5f8SJohn Marino { "vpalignr", { XM, Vex, EXx, Ib } },
10066cf7f2e2dSJohn Marino },
10067cf7f2e2dSJohn Marino {
10068c50c785cSJohn Marino /* VEX_W_0F3A14_P_2 */
10069cf7f2e2dSJohn Marino { "vpextrb", { Edqb, XM, Ib } },
10070cf7f2e2dSJohn Marino },
10071cf7f2e2dSJohn Marino {
10072c50c785cSJohn Marino /* VEX_W_0F3A15_P_2 */
10073cf7f2e2dSJohn Marino { "vpextrw", { Edqw, XM, Ib } },
10074cf7f2e2dSJohn Marino },
10075cf7f2e2dSJohn Marino {
10076c50c785cSJohn Marino /* VEX_W_0F3A18_P_2 */
10077cf7f2e2dSJohn Marino { "vinsertf128", { XM, Vex256, EXxmm, Ib } },
10078cf7f2e2dSJohn Marino },
10079cf7f2e2dSJohn Marino {
10080c50c785cSJohn Marino /* VEX_W_0F3A19_P_2 */
10081cf7f2e2dSJohn Marino { "vextractf128", { EXxmm, XM, Ib } },
10082cf7f2e2dSJohn Marino },
10083cf7f2e2dSJohn Marino {
10084c50c785cSJohn Marino /* VEX_W_0F3A20_P_2 */
10085cf7f2e2dSJohn Marino { "vpinsrb", { XM, Vex128, Edqb, Ib } },
10086cf7f2e2dSJohn Marino },
10087cf7f2e2dSJohn Marino {
10088c50c785cSJohn Marino /* VEX_W_0F3A21_P_2 */
10089cf7f2e2dSJohn Marino { "vinsertps", { XM, Vex128, EXd, Ib } },
10090cf7f2e2dSJohn Marino },
10091cf7f2e2dSJohn Marino {
10092a45ae5f8SJohn Marino /* VEX_W_0F3A38_P_2 */
10093a45ae5f8SJohn Marino { "vinserti128", { XM, Vex256, EXxmm, Ib } },
10094a45ae5f8SJohn Marino },
10095a45ae5f8SJohn Marino {
10096a45ae5f8SJohn Marino /* VEX_W_0F3A39_P_2 */
10097a45ae5f8SJohn Marino { "vextracti128", { EXxmm, XM, Ib } },
10098a45ae5f8SJohn Marino },
10099a45ae5f8SJohn Marino {
10100c50c785cSJohn Marino /* VEX_W_0F3A40_P_2 */
10101cf7f2e2dSJohn Marino { "vdpps", { XM, Vex, EXx, Ib } },
10102cf7f2e2dSJohn Marino },
10103cf7f2e2dSJohn Marino {
10104c50c785cSJohn Marino /* VEX_W_0F3A41_P_2 */
10105cf7f2e2dSJohn Marino { "vdppd", { XM, Vex128, EXx, Ib } },
10106cf7f2e2dSJohn Marino },
10107cf7f2e2dSJohn Marino {
10108c50c785cSJohn Marino /* VEX_W_0F3A42_P_2 */
10109a45ae5f8SJohn Marino { "vmpsadbw", { XM, Vex, EXx, Ib } },
10110cf7f2e2dSJohn Marino },
10111cf7f2e2dSJohn Marino {
10112c50c785cSJohn Marino /* VEX_W_0F3A44_P_2 */
10113cf7f2e2dSJohn Marino { "vpclmulqdq", { XM, Vex128, EXx, PCLMUL } },
10114cf7f2e2dSJohn Marino },
10115cf7f2e2dSJohn Marino {
10116a45ae5f8SJohn Marino /* VEX_W_0F3A46_P_2 */
10117a45ae5f8SJohn Marino { "vperm2i128", { XM, Vex256, EXx, Ib } },
10118a45ae5f8SJohn Marino },
10119a45ae5f8SJohn Marino {
10120c50c785cSJohn Marino /* VEX_W_0F3A48_P_2 */
10121cf7f2e2dSJohn Marino { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
10122cf7f2e2dSJohn Marino { "vpermil2ps", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
10123cf7f2e2dSJohn Marino },
10124cf7f2e2dSJohn Marino {
10125c50c785cSJohn Marino /* VEX_W_0F3A49_P_2 */
10126cf7f2e2dSJohn Marino { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
10127cf7f2e2dSJohn Marino { "vpermil2pd", { XMVexW, Vex, EXVexImmW, EXVexImmW, EXVexImmW } },
10128cf7f2e2dSJohn Marino },
10129cf7f2e2dSJohn Marino {
10130c50c785cSJohn Marino /* VEX_W_0F3A4A_P_2 */
10131cf7f2e2dSJohn Marino { "vblendvps", { XM, Vex, EXx, XMVexI4 } },
10132cf7f2e2dSJohn Marino },
10133cf7f2e2dSJohn Marino {
10134c50c785cSJohn Marino /* VEX_W_0F3A4B_P_2 */
10135cf7f2e2dSJohn Marino { "vblendvpd", { XM, Vex, EXx, XMVexI4 } },
10136cf7f2e2dSJohn Marino },
10137cf7f2e2dSJohn Marino {
10138c50c785cSJohn Marino /* VEX_W_0F3A4C_P_2 */
10139a45ae5f8SJohn Marino { "vpblendvb", { XM, Vex, EXx, XMVexI4 } },
10140cf7f2e2dSJohn Marino },
10141cf7f2e2dSJohn Marino {
10142c50c785cSJohn Marino /* VEX_W_0F3A60_P_2 */
10143cf7f2e2dSJohn Marino { "vpcmpestrm", { XM, EXx, Ib } },
10144cf7f2e2dSJohn Marino },
10145cf7f2e2dSJohn Marino {
10146c50c785cSJohn Marino /* VEX_W_0F3A61_P_2 */
10147cf7f2e2dSJohn Marino { "vpcmpestri", { XM, EXx, Ib } },
10148cf7f2e2dSJohn Marino },
10149cf7f2e2dSJohn Marino {
10150c50c785cSJohn Marino /* VEX_W_0F3A62_P_2 */
10151cf7f2e2dSJohn Marino { "vpcmpistrm", { XM, EXx, Ib } },
10152cf7f2e2dSJohn Marino },
10153cf7f2e2dSJohn Marino {
10154c50c785cSJohn Marino /* VEX_W_0F3A63_P_2 */
10155cf7f2e2dSJohn Marino { "vpcmpistri", { XM, EXx, Ib } },
10156cf7f2e2dSJohn Marino },
10157cf7f2e2dSJohn Marino {
10158c50c785cSJohn Marino /* VEX_W_0F3ADF_P_2 */
101595796c8dcSSimon Schubert { "vaeskeygenassist", { XM, EXx, Ib } },
101605796c8dcSSimon Schubert },
101615796c8dcSSimon Schubert };
101625796c8dcSSimon Schubert
101635796c8dcSSimon Schubert static const struct dis386 mod_table[][2] = {
101645796c8dcSSimon Schubert {
101655796c8dcSSimon Schubert /* MOD_8D */
101665796c8dcSSimon Schubert { "leaS", { Gv, M } },
101675796c8dcSSimon Schubert },
101685796c8dcSSimon Schubert {
10169*ef5ccd6cSJohn Marino /* MOD_C6_REG_7 */
10170*ef5ccd6cSJohn Marino { Bad_Opcode },
10171*ef5ccd6cSJohn Marino { RM_TABLE (RM_C6_REG_7) },
10172*ef5ccd6cSJohn Marino },
10173*ef5ccd6cSJohn Marino {
10174*ef5ccd6cSJohn Marino /* MOD_C7_REG_7 */
10175*ef5ccd6cSJohn Marino { Bad_Opcode },
10176*ef5ccd6cSJohn Marino { RM_TABLE (RM_C7_REG_7) },
10177*ef5ccd6cSJohn Marino },
10178*ef5ccd6cSJohn Marino {
101795796c8dcSSimon Schubert /* MOD_0F01_REG_0 */
101805796c8dcSSimon Schubert { X86_64_TABLE (X86_64_0F01_REG_0) },
101815796c8dcSSimon Schubert { RM_TABLE (RM_0F01_REG_0) },
101825796c8dcSSimon Schubert },
101835796c8dcSSimon Schubert {
101845796c8dcSSimon Schubert /* MOD_0F01_REG_1 */
101855796c8dcSSimon Schubert { X86_64_TABLE (X86_64_0F01_REG_1) },
101865796c8dcSSimon Schubert { RM_TABLE (RM_0F01_REG_1) },
101875796c8dcSSimon Schubert },
101885796c8dcSSimon Schubert {
101895796c8dcSSimon Schubert /* MOD_0F01_REG_2 */
101905796c8dcSSimon Schubert { X86_64_TABLE (X86_64_0F01_REG_2) },
101915796c8dcSSimon Schubert { RM_TABLE (RM_0F01_REG_2) },
101925796c8dcSSimon Schubert },
101935796c8dcSSimon Schubert {
101945796c8dcSSimon Schubert /* MOD_0F01_REG_3 */
101955796c8dcSSimon Schubert { X86_64_TABLE (X86_64_0F01_REG_3) },
101965796c8dcSSimon Schubert { RM_TABLE (RM_0F01_REG_3) },
101975796c8dcSSimon Schubert },
101985796c8dcSSimon Schubert {
101995796c8dcSSimon Schubert /* MOD_0F01_REG_7 */
102005796c8dcSSimon Schubert { "invlpg", { Mb } },
102015796c8dcSSimon Schubert { RM_TABLE (RM_0F01_REG_7) },
102025796c8dcSSimon Schubert },
102035796c8dcSSimon Schubert {
102045796c8dcSSimon Schubert /* MOD_0F12_PREFIX_0 */
102055796c8dcSSimon Schubert { "movlps", { XM, EXq } },
102065796c8dcSSimon Schubert { "movhlps", { XM, EXq } },
102075796c8dcSSimon Schubert },
102085796c8dcSSimon Schubert {
102095796c8dcSSimon Schubert /* MOD_0F13 */
102105796c8dcSSimon Schubert { "movlpX", { EXq, XM } },
102115796c8dcSSimon Schubert },
102125796c8dcSSimon Schubert {
102135796c8dcSSimon Schubert /* MOD_0F16_PREFIX_0 */
102145796c8dcSSimon Schubert { "movhps", { XM, EXq } },
102155796c8dcSSimon Schubert { "movlhps", { XM, EXq } },
102165796c8dcSSimon Schubert },
102175796c8dcSSimon Schubert {
102185796c8dcSSimon Schubert /* MOD_0F17 */
102195796c8dcSSimon Schubert { "movhpX", { EXq, XM } },
102205796c8dcSSimon Schubert },
102215796c8dcSSimon Schubert {
102225796c8dcSSimon Schubert /* MOD_0F18_REG_0 */
102235796c8dcSSimon Schubert { "prefetchnta", { Mb } },
102245796c8dcSSimon Schubert },
102255796c8dcSSimon Schubert {
102265796c8dcSSimon Schubert /* MOD_0F18_REG_1 */
102275796c8dcSSimon Schubert { "prefetcht0", { Mb } },
102285796c8dcSSimon Schubert },
102295796c8dcSSimon Schubert {
102305796c8dcSSimon Schubert /* MOD_0F18_REG_2 */
102315796c8dcSSimon Schubert { "prefetcht1", { Mb } },
102325796c8dcSSimon Schubert },
102335796c8dcSSimon Schubert {
102345796c8dcSSimon Schubert /* MOD_0F18_REG_3 */
102355796c8dcSSimon Schubert { "prefetcht2", { Mb } },
102365796c8dcSSimon Schubert },
102375796c8dcSSimon Schubert {
10238*ef5ccd6cSJohn Marino /* MOD_0F18_REG_4 */
10239*ef5ccd6cSJohn Marino { "nop/reserved", { Mb } },
10240*ef5ccd6cSJohn Marino },
10241*ef5ccd6cSJohn Marino {
10242*ef5ccd6cSJohn Marino /* MOD_0F18_REG_5 */
10243*ef5ccd6cSJohn Marino { "nop/reserved", { Mb } },
10244*ef5ccd6cSJohn Marino },
10245*ef5ccd6cSJohn Marino {
10246*ef5ccd6cSJohn Marino /* MOD_0F18_REG_6 */
10247*ef5ccd6cSJohn Marino { "nop/reserved", { Mb } },
10248*ef5ccd6cSJohn Marino },
10249*ef5ccd6cSJohn Marino {
10250*ef5ccd6cSJohn Marino /* MOD_0F18_REG_7 */
10251*ef5ccd6cSJohn Marino { "nop/reserved", { Mb } },
10252*ef5ccd6cSJohn Marino },
10253*ef5ccd6cSJohn Marino {
102545796c8dcSSimon Schubert /* MOD_0F20 */
10255cf7f2e2dSJohn Marino { Bad_Opcode },
102565796c8dcSSimon Schubert { "movZ", { Rm, Cm } },
102575796c8dcSSimon Schubert },
102585796c8dcSSimon Schubert {
102595796c8dcSSimon Schubert /* MOD_0F21 */
10260cf7f2e2dSJohn Marino { Bad_Opcode },
102615796c8dcSSimon Schubert { "movZ", { Rm, Dm } },
102625796c8dcSSimon Schubert },
102635796c8dcSSimon Schubert {
102645796c8dcSSimon Schubert /* MOD_0F22 */
10265cf7f2e2dSJohn Marino { Bad_Opcode },
102665796c8dcSSimon Schubert { "movZ", { Cm, Rm } },
102675796c8dcSSimon Schubert },
102685796c8dcSSimon Schubert {
102695796c8dcSSimon Schubert /* MOD_0F23 */
10270cf7f2e2dSJohn Marino { Bad_Opcode },
102715796c8dcSSimon Schubert { "movZ", { Dm, Rm } },
102725796c8dcSSimon Schubert },
102735796c8dcSSimon Schubert {
102745796c8dcSSimon Schubert /* MOD_0F24 */
10275cf7f2e2dSJohn Marino { Bad_Opcode },
102765796c8dcSSimon Schubert { "movL", { Rd, Td } },
102775796c8dcSSimon Schubert },
102785796c8dcSSimon Schubert {
102795796c8dcSSimon Schubert /* MOD_0F26 */
10280cf7f2e2dSJohn Marino { Bad_Opcode },
102815796c8dcSSimon Schubert { "movL", { Td, Rd } },
102825796c8dcSSimon Schubert },
102835796c8dcSSimon Schubert {
102845796c8dcSSimon Schubert /* MOD_0F2B_PREFIX_0 */
102855796c8dcSSimon Schubert {"movntps", { Mx, XM } },
102865796c8dcSSimon Schubert },
102875796c8dcSSimon Schubert {
102885796c8dcSSimon Schubert /* MOD_0F2B_PREFIX_1 */
102895796c8dcSSimon Schubert {"movntss", { Md, XM } },
102905796c8dcSSimon Schubert },
102915796c8dcSSimon Schubert {
102925796c8dcSSimon Schubert /* MOD_0F2B_PREFIX_2 */
102935796c8dcSSimon Schubert {"movntpd", { Mx, XM } },
102945796c8dcSSimon Schubert },
102955796c8dcSSimon Schubert {
102965796c8dcSSimon Schubert /* MOD_0F2B_PREFIX_3 */
102975796c8dcSSimon Schubert {"movntsd", { Mq, XM } },
102985796c8dcSSimon Schubert },
102995796c8dcSSimon Schubert {
103005796c8dcSSimon Schubert /* MOD_0F51 */
10301cf7f2e2dSJohn Marino { Bad_Opcode },
103025796c8dcSSimon Schubert { "movmskpX", { Gdq, XS } },
103035796c8dcSSimon Schubert },
103045796c8dcSSimon Schubert {
103055796c8dcSSimon Schubert /* MOD_0F71_REG_2 */
10306cf7f2e2dSJohn Marino { Bad_Opcode },
103075796c8dcSSimon Schubert { "psrlw", { MS, Ib } },
103085796c8dcSSimon Schubert },
103095796c8dcSSimon Schubert {
103105796c8dcSSimon Schubert /* MOD_0F71_REG_4 */
10311cf7f2e2dSJohn Marino { Bad_Opcode },
103125796c8dcSSimon Schubert { "psraw", { MS, Ib } },
103135796c8dcSSimon Schubert },
103145796c8dcSSimon Schubert {
103155796c8dcSSimon Schubert /* MOD_0F71_REG_6 */
10316cf7f2e2dSJohn Marino { Bad_Opcode },
103175796c8dcSSimon Schubert { "psllw", { MS, Ib } },
103185796c8dcSSimon Schubert },
103195796c8dcSSimon Schubert {
103205796c8dcSSimon Schubert /* MOD_0F72_REG_2 */
10321cf7f2e2dSJohn Marino { Bad_Opcode },
103225796c8dcSSimon Schubert { "psrld", { MS, Ib } },
103235796c8dcSSimon Schubert },
103245796c8dcSSimon Schubert {
103255796c8dcSSimon Schubert /* MOD_0F72_REG_4 */
10326cf7f2e2dSJohn Marino { Bad_Opcode },
103275796c8dcSSimon Schubert { "psrad", { MS, Ib } },
103285796c8dcSSimon Schubert },
103295796c8dcSSimon Schubert {
103305796c8dcSSimon Schubert /* MOD_0F72_REG_6 */
10331cf7f2e2dSJohn Marino { Bad_Opcode },
103325796c8dcSSimon Schubert { "pslld", { MS, Ib } },
103335796c8dcSSimon Schubert },
103345796c8dcSSimon Schubert {
103355796c8dcSSimon Schubert /* MOD_0F73_REG_2 */
10336cf7f2e2dSJohn Marino { Bad_Opcode },
103375796c8dcSSimon Schubert { "psrlq", { MS, Ib } },
103385796c8dcSSimon Schubert },
103395796c8dcSSimon Schubert {
103405796c8dcSSimon Schubert /* MOD_0F73_REG_3 */
10341cf7f2e2dSJohn Marino { Bad_Opcode },
103425796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F73_REG_3) },
103435796c8dcSSimon Schubert },
103445796c8dcSSimon Schubert {
103455796c8dcSSimon Schubert /* MOD_0F73_REG_6 */
10346cf7f2e2dSJohn Marino { Bad_Opcode },
103475796c8dcSSimon Schubert { "psllq", { MS, Ib } },
103485796c8dcSSimon Schubert },
103495796c8dcSSimon Schubert {
103505796c8dcSSimon Schubert /* MOD_0F73_REG_7 */
10351cf7f2e2dSJohn Marino { Bad_Opcode },
103525796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0F73_REG_7) },
103535796c8dcSSimon Schubert },
103545796c8dcSSimon Schubert {
103555796c8dcSSimon Schubert /* MOD_0FAE_REG_0 */
10356cf7f2e2dSJohn Marino { "fxsave", { FXSAVE } },
10357cf7f2e2dSJohn Marino { PREFIX_TABLE (PREFIX_0FAE_REG_0) },
103585796c8dcSSimon Schubert },
103595796c8dcSSimon Schubert {
103605796c8dcSSimon Schubert /* MOD_0FAE_REG_1 */
10361cf7f2e2dSJohn Marino { "fxrstor", { FXSAVE } },
10362cf7f2e2dSJohn Marino { PREFIX_TABLE (PREFIX_0FAE_REG_1) },
103635796c8dcSSimon Schubert },
103645796c8dcSSimon Schubert {
103655796c8dcSSimon Schubert /* MOD_0FAE_REG_2 */
103665796c8dcSSimon Schubert { "ldmxcsr", { Md } },
10367cf7f2e2dSJohn Marino { PREFIX_TABLE (PREFIX_0FAE_REG_2) },
103685796c8dcSSimon Schubert },
103695796c8dcSSimon Schubert {
103705796c8dcSSimon Schubert /* MOD_0FAE_REG_3 */
103715796c8dcSSimon Schubert { "stmxcsr", { Md } },
10372cf7f2e2dSJohn Marino { PREFIX_TABLE (PREFIX_0FAE_REG_3) },
103735796c8dcSSimon Schubert },
103745796c8dcSSimon Schubert {
103755796c8dcSSimon Schubert /* MOD_0FAE_REG_4 */
10376cf7f2e2dSJohn Marino { "xsave", { FXSAVE } },
103775796c8dcSSimon Schubert },
103785796c8dcSSimon Schubert {
103795796c8dcSSimon Schubert /* MOD_0FAE_REG_5 */
10380cf7f2e2dSJohn Marino { "xrstor", { FXSAVE } },
103815796c8dcSSimon Schubert { RM_TABLE (RM_0FAE_REG_5) },
103825796c8dcSSimon Schubert },
103835796c8dcSSimon Schubert {
103845796c8dcSSimon Schubert /* MOD_0FAE_REG_6 */
10385cf7f2e2dSJohn Marino { "xsaveopt", { FXSAVE } },
103865796c8dcSSimon Schubert { RM_TABLE (RM_0FAE_REG_6) },
103875796c8dcSSimon Schubert },
103885796c8dcSSimon Schubert {
103895796c8dcSSimon Schubert /* MOD_0FAE_REG_7 */
103905796c8dcSSimon Schubert { "clflush", { Mb } },
103915796c8dcSSimon Schubert { RM_TABLE (RM_0FAE_REG_7) },
103925796c8dcSSimon Schubert },
103935796c8dcSSimon Schubert {
103945796c8dcSSimon Schubert /* MOD_0FB2 */
103955796c8dcSSimon Schubert { "lssS", { Gv, Mp } },
103965796c8dcSSimon Schubert },
103975796c8dcSSimon Schubert {
103985796c8dcSSimon Schubert /* MOD_0FB4 */
103995796c8dcSSimon Schubert { "lfsS", { Gv, Mp } },
104005796c8dcSSimon Schubert },
104015796c8dcSSimon Schubert {
104025796c8dcSSimon Schubert /* MOD_0FB5 */
104035796c8dcSSimon Schubert { "lgsS", { Gv, Mp } },
104045796c8dcSSimon Schubert },
104055796c8dcSSimon Schubert {
104065796c8dcSSimon Schubert /* MOD_0FC7_REG_6 */
104075796c8dcSSimon Schubert { PREFIX_TABLE (PREFIX_0FC7_REG_6) },
10408cf7f2e2dSJohn Marino { "rdrand", { Ev } },
104095796c8dcSSimon Schubert },
104105796c8dcSSimon Schubert {
104115796c8dcSSimon Schubert /* MOD_0FC7_REG_7 */
104125796c8dcSSimon Schubert { "vmptrst", { Mq } },
10413*ef5ccd6cSJohn Marino { "rdseed", { Ev } },
104145796c8dcSSimon Schubert },
104155796c8dcSSimon Schubert {
104165796c8dcSSimon Schubert /* MOD_0FD7 */
10417cf7f2e2dSJohn Marino { Bad_Opcode },
104185796c8dcSSimon Schubert { "pmovmskb", { Gdq, MS } },
104195796c8dcSSimon Schubert },
104205796c8dcSSimon Schubert {
104215796c8dcSSimon Schubert /* MOD_0FE7_PREFIX_2 */
104225796c8dcSSimon Schubert { "movntdq", { Mx, XM } },
104235796c8dcSSimon Schubert },
104245796c8dcSSimon Schubert {
104255796c8dcSSimon Schubert /* MOD_0FF0_PREFIX_3 */
104265796c8dcSSimon Schubert { "lddqu", { XM, M } },
104275796c8dcSSimon Schubert },
104285796c8dcSSimon Schubert {
104295796c8dcSSimon Schubert /* MOD_0F382A_PREFIX_2 */
104305796c8dcSSimon Schubert { "movntdqa", { XM, Mx } },
104315796c8dcSSimon Schubert },
104325796c8dcSSimon Schubert {
104335796c8dcSSimon Schubert /* MOD_62_32BIT */
104345796c8dcSSimon Schubert { "bound{S|}", { Gv, Ma } },
104355796c8dcSSimon Schubert },
104365796c8dcSSimon Schubert {
104375796c8dcSSimon Schubert /* MOD_C4_32BIT */
104385796c8dcSSimon Schubert { "lesS", { Gv, Mp } },
104395796c8dcSSimon Schubert { VEX_C4_TABLE (VEX_0F) },
104405796c8dcSSimon Schubert },
104415796c8dcSSimon Schubert {
104425796c8dcSSimon Schubert /* MOD_C5_32BIT */
104435796c8dcSSimon Schubert { "ldsS", { Gv, Mp } },
104445796c8dcSSimon Schubert { VEX_C5_TABLE (VEX_0F) },
104455796c8dcSSimon Schubert },
104465796c8dcSSimon Schubert {
10447c50c785cSJohn Marino /* MOD_VEX_0F12_PREFIX_0 */
10448c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_0) },
10449c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F12_P_0_M_1) },
104505796c8dcSSimon Schubert },
104515796c8dcSSimon Schubert {
10452c50c785cSJohn Marino /* MOD_VEX_0F13 */
10453c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F13_M_0) },
104545796c8dcSSimon Schubert },
104555796c8dcSSimon Schubert {
10456c50c785cSJohn Marino /* MOD_VEX_0F16_PREFIX_0 */
10457c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_0) },
10458c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F16_P_0_M_1) },
104595796c8dcSSimon Schubert },
104605796c8dcSSimon Schubert {
10461c50c785cSJohn Marino /* MOD_VEX_0F17 */
10462c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F17_M_0) },
104635796c8dcSSimon Schubert },
104645796c8dcSSimon Schubert {
10465c50c785cSJohn Marino /* MOD_VEX_0F2B */
10466c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F2B_M_0) },
104675796c8dcSSimon Schubert },
104685796c8dcSSimon Schubert {
10469c50c785cSJohn Marino /* MOD_VEX_0F50 */
10470cf7f2e2dSJohn Marino { Bad_Opcode },
10471c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F50_M_0) },
104725796c8dcSSimon Schubert },
104735796c8dcSSimon Schubert {
10474c50c785cSJohn Marino /* MOD_VEX_0F71_REG_2 */
10475cf7f2e2dSJohn Marino { Bad_Opcode },
10476c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F71_REG_2) },
104775796c8dcSSimon Schubert },
104785796c8dcSSimon Schubert {
10479c50c785cSJohn Marino /* MOD_VEX_0F71_REG_4 */
10480cf7f2e2dSJohn Marino { Bad_Opcode },
10481c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F71_REG_4) },
104825796c8dcSSimon Schubert },
104835796c8dcSSimon Schubert {
10484c50c785cSJohn Marino /* MOD_VEX_0F71_REG_6 */
10485cf7f2e2dSJohn Marino { Bad_Opcode },
10486c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F71_REG_6) },
104875796c8dcSSimon Schubert },
104885796c8dcSSimon Schubert {
10489c50c785cSJohn Marino /* MOD_VEX_0F72_REG_2 */
10490cf7f2e2dSJohn Marino { Bad_Opcode },
10491c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F72_REG_2) },
104925796c8dcSSimon Schubert },
104935796c8dcSSimon Schubert {
10494c50c785cSJohn Marino /* MOD_VEX_0F72_REG_4 */
10495cf7f2e2dSJohn Marino { Bad_Opcode },
10496c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F72_REG_4) },
104975796c8dcSSimon Schubert },
104985796c8dcSSimon Schubert {
10499c50c785cSJohn Marino /* MOD_VEX_0F72_REG_6 */
10500cf7f2e2dSJohn Marino { Bad_Opcode },
10501c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F72_REG_6) },
105025796c8dcSSimon Schubert },
105035796c8dcSSimon Schubert {
10504c50c785cSJohn Marino /* MOD_VEX_0F73_REG_2 */
10505cf7f2e2dSJohn Marino { Bad_Opcode },
10506c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F73_REG_2) },
105075796c8dcSSimon Schubert },
105085796c8dcSSimon Schubert {
10509c50c785cSJohn Marino /* MOD_VEX_0F73_REG_3 */
10510cf7f2e2dSJohn Marino { Bad_Opcode },
10511c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F73_REG_3) },
105125796c8dcSSimon Schubert },
105135796c8dcSSimon Schubert {
10514c50c785cSJohn Marino /* MOD_VEX_0F73_REG_6 */
10515cf7f2e2dSJohn Marino { Bad_Opcode },
10516c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F73_REG_6) },
105175796c8dcSSimon Schubert },
105185796c8dcSSimon Schubert {
10519c50c785cSJohn Marino /* MOD_VEX_0F73_REG_7 */
10520cf7f2e2dSJohn Marino { Bad_Opcode },
10521c50c785cSJohn Marino { PREFIX_TABLE (PREFIX_VEX_0F73_REG_7) },
105225796c8dcSSimon Schubert },
105235796c8dcSSimon Schubert {
10524c50c785cSJohn Marino /* MOD_VEX_0FAE_REG_2 */
10525c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FAE_R_2_M_0) },
105265796c8dcSSimon Schubert },
105275796c8dcSSimon Schubert {
10528c50c785cSJohn Marino /* MOD_VEX_0FAE_REG_3 */
10529c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0FAE_R_3_M_0) },
105305796c8dcSSimon Schubert },
105315796c8dcSSimon Schubert {
10532c50c785cSJohn Marino /* MOD_VEX_0FD7_PREFIX_2 */
10533cf7f2e2dSJohn Marino { Bad_Opcode },
10534a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0FD7_P_2_M_1) },
105355796c8dcSSimon Schubert },
105365796c8dcSSimon Schubert {
10537c50c785cSJohn Marino /* MOD_VEX_0FE7_PREFIX_2 */
10538c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FE7_P_2_M_0) },
105395796c8dcSSimon Schubert },
105405796c8dcSSimon Schubert {
10541c50c785cSJohn Marino /* MOD_VEX_0FF0_PREFIX_3 */
10542c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0FF0_P_3_M_0) },
105435796c8dcSSimon Schubert },
105445796c8dcSSimon Schubert {
10545c50c785cSJohn Marino /* MOD_VEX_0F381A_PREFIX_2 */
10546c50c785cSJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F381A_P_2_M_0) },
105475796c8dcSSimon Schubert },
105485796c8dcSSimon Schubert {
10549c50c785cSJohn Marino /* MOD_VEX_0F382A_PREFIX_2 */
10550a45ae5f8SJohn Marino { VEX_W_TABLE (VEX_W_0F382A_P_2_M_0) },
105515796c8dcSSimon Schubert },
105525796c8dcSSimon Schubert {
10553c50c785cSJohn Marino /* MOD_VEX_0F382C_PREFIX_2 */
10554c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F382C_P_2_M_0) },
105555796c8dcSSimon Schubert },
105565796c8dcSSimon Schubert {
10557c50c785cSJohn Marino /* MOD_VEX_0F382D_PREFIX_2 */
10558c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F382D_P_2_M_0) },
105595796c8dcSSimon Schubert },
105605796c8dcSSimon Schubert {
10561c50c785cSJohn Marino /* MOD_VEX_0F382E_PREFIX_2 */
10562c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F382E_P_2_M_0) },
105635796c8dcSSimon Schubert },
105645796c8dcSSimon Schubert {
10565c50c785cSJohn Marino /* MOD_VEX_0F382F_PREFIX_2 */
10566c50c785cSJohn Marino { VEX_W_TABLE (VEX_W_0F382F_P_2_M_0) },
105675796c8dcSSimon Schubert },
10568a45ae5f8SJohn Marino {
10569a45ae5f8SJohn Marino /* MOD_VEX_0F385A_PREFIX_2 */
10570a45ae5f8SJohn Marino { VEX_LEN_TABLE (VEX_LEN_0F385A_P_2_M_0) },
10571a45ae5f8SJohn Marino },
10572a45ae5f8SJohn Marino {
10573a45ae5f8SJohn Marino /* MOD_VEX_0F388C_PREFIX_2 */
10574a45ae5f8SJohn Marino { "vpmaskmov%LW", { XM, Vex, Mx } },
10575a45ae5f8SJohn Marino },
10576a45ae5f8SJohn Marino {
10577a45ae5f8SJohn Marino /* MOD_VEX_0F388E_PREFIX_2 */
10578a45ae5f8SJohn Marino { "vpmaskmov%LW", { Mx, Vex, XM } },
10579a45ae5f8SJohn Marino },
105805796c8dcSSimon Schubert };
105815796c8dcSSimon Schubert
105825796c8dcSSimon Schubert static const struct dis386 rm_table[][8] = {
105835796c8dcSSimon Schubert {
10584*ef5ccd6cSJohn Marino /* RM_C6_REG_7 */
10585*ef5ccd6cSJohn Marino { "xabort", { Skip_MODRM, Ib } },
10586*ef5ccd6cSJohn Marino },
10587*ef5ccd6cSJohn Marino {
10588*ef5ccd6cSJohn Marino /* RM_C7_REG_7 */
10589*ef5ccd6cSJohn Marino { "xbeginT", { Skip_MODRM, Jv } },
10590*ef5ccd6cSJohn Marino },
10591*ef5ccd6cSJohn Marino {
105925796c8dcSSimon Schubert /* RM_0F01_REG_0 */
10593cf7f2e2dSJohn Marino { Bad_Opcode },
105945796c8dcSSimon Schubert { "vmcall", { Skip_MODRM } },
105955796c8dcSSimon Schubert { "vmlaunch", { Skip_MODRM } },
105965796c8dcSSimon Schubert { "vmresume", { Skip_MODRM } },
105975796c8dcSSimon Schubert { "vmxoff", { Skip_MODRM } },
105985796c8dcSSimon Schubert },
105995796c8dcSSimon Schubert {
106005796c8dcSSimon Schubert /* RM_0F01_REG_1 */
106015796c8dcSSimon Schubert { "monitor", { { OP_Monitor, 0 } } },
106025796c8dcSSimon Schubert { "mwait", { { OP_Mwait, 0 } } },
10603*ef5ccd6cSJohn Marino { "clac", { Skip_MODRM } },
10604*ef5ccd6cSJohn Marino { "stac", { Skip_MODRM } },
106055796c8dcSSimon Schubert },
106065796c8dcSSimon Schubert {
106075796c8dcSSimon Schubert /* RM_0F01_REG_2 */
106085796c8dcSSimon Schubert { "xgetbv", { Skip_MODRM } },
106095796c8dcSSimon Schubert { "xsetbv", { Skip_MODRM } },
10610*ef5ccd6cSJohn Marino { Bad_Opcode },
10611*ef5ccd6cSJohn Marino { Bad_Opcode },
10612*ef5ccd6cSJohn Marino { "vmfunc", { Skip_MODRM } },
10613*ef5ccd6cSJohn Marino { "xend", { Skip_MODRM } },
10614*ef5ccd6cSJohn Marino { "xtest", { Skip_MODRM } },
10615*ef5ccd6cSJohn Marino { Bad_Opcode },
106165796c8dcSSimon Schubert },
106175796c8dcSSimon Schubert {
106185796c8dcSSimon Schubert /* RM_0F01_REG_3 */
106195796c8dcSSimon Schubert { "vmrun", { Skip_MODRM } },
106205796c8dcSSimon Schubert { "vmmcall", { Skip_MODRM } },
106215796c8dcSSimon Schubert { "vmload", { Skip_MODRM } },
106225796c8dcSSimon Schubert { "vmsave", { Skip_MODRM } },
106235796c8dcSSimon Schubert { "stgi", { Skip_MODRM } },
106245796c8dcSSimon Schubert { "clgi", { Skip_MODRM } },
106255796c8dcSSimon Schubert { "skinit", { Skip_MODRM } },
106265796c8dcSSimon Schubert { "invlpga", { Skip_MODRM } },
106275796c8dcSSimon Schubert },
106285796c8dcSSimon Schubert {
106295796c8dcSSimon Schubert /* RM_0F01_REG_7 */
106305796c8dcSSimon Schubert { "swapgs", { Skip_MODRM } },
106315796c8dcSSimon Schubert { "rdtscp", { Skip_MODRM } },
106325796c8dcSSimon Schubert },
106335796c8dcSSimon Schubert {
106345796c8dcSSimon Schubert /* RM_0FAE_REG_5 */
106355796c8dcSSimon Schubert { "lfence", { Skip_MODRM } },
106365796c8dcSSimon Schubert },
106375796c8dcSSimon Schubert {
106385796c8dcSSimon Schubert /* RM_0FAE_REG_6 */
106395796c8dcSSimon Schubert { "mfence", { Skip_MODRM } },
106405796c8dcSSimon Schubert },
106415796c8dcSSimon Schubert {
106425796c8dcSSimon Schubert /* RM_0FAE_REG_7 */
106435796c8dcSSimon Schubert { "sfence", { Skip_MODRM } },
106445796c8dcSSimon Schubert },
106455796c8dcSSimon Schubert };
106465796c8dcSSimon Schubert
106475796c8dcSSimon Schubert #define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
106485796c8dcSSimon Schubert
10649cf7f2e2dSJohn Marino /* We use the high bit to indicate different name for the same
10650cf7f2e2dSJohn Marino prefix. */
10651cf7f2e2dSJohn Marino #define ADDR16_PREFIX (0x67 | 0x100)
10652cf7f2e2dSJohn Marino #define ADDR32_PREFIX (0x67 | 0x200)
10653cf7f2e2dSJohn Marino #define DATA16_PREFIX (0x66 | 0x100)
10654cf7f2e2dSJohn Marino #define DATA32_PREFIX (0x66 | 0x200)
10655cf7f2e2dSJohn Marino #define REP_PREFIX (0xf3 | 0x100)
10656*ef5ccd6cSJohn Marino #define XACQUIRE_PREFIX (0xf2 | 0x200)
10657*ef5ccd6cSJohn Marino #define XRELEASE_PREFIX (0xf3 | 0x400)
10658cf7f2e2dSJohn Marino
10659cf7f2e2dSJohn Marino static int
ckprefix(void)106605796c8dcSSimon Schubert ckprefix (void)
106615796c8dcSSimon Schubert {
10662cf7f2e2dSJohn Marino int newrex, i, length;
106635796c8dcSSimon Schubert rex = 0;
106645796c8dcSSimon Schubert rex_ignored = 0;
106655796c8dcSSimon Schubert prefixes = 0;
106665796c8dcSSimon Schubert used_prefixes = 0;
106675796c8dcSSimon Schubert rex_used = 0;
10668cf7f2e2dSJohn Marino last_lock_prefix = -1;
10669cf7f2e2dSJohn Marino last_repz_prefix = -1;
10670cf7f2e2dSJohn Marino last_repnz_prefix = -1;
10671cf7f2e2dSJohn Marino last_data_prefix = -1;
10672cf7f2e2dSJohn Marino last_addr_prefix = -1;
10673cf7f2e2dSJohn Marino last_rex_prefix = -1;
10674cf7f2e2dSJohn Marino last_seg_prefix = -1;
10675cf7f2e2dSJohn Marino for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
10676cf7f2e2dSJohn Marino all_prefixes[i] = 0;
10677cf7f2e2dSJohn Marino i = 0;
10678cf7f2e2dSJohn Marino length = 0;
10679cf7f2e2dSJohn Marino /* The maximum instruction length is 15bytes. */
10680cf7f2e2dSJohn Marino while (length < MAX_CODE_LENGTH - 1)
106815796c8dcSSimon Schubert {
106825796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
106835796c8dcSSimon Schubert newrex = 0;
106845796c8dcSSimon Schubert switch (*codep)
106855796c8dcSSimon Schubert {
106865796c8dcSSimon Schubert /* REX prefixes family. */
106875796c8dcSSimon Schubert case 0x40:
106885796c8dcSSimon Schubert case 0x41:
106895796c8dcSSimon Schubert case 0x42:
106905796c8dcSSimon Schubert case 0x43:
106915796c8dcSSimon Schubert case 0x44:
106925796c8dcSSimon Schubert case 0x45:
106935796c8dcSSimon Schubert case 0x46:
106945796c8dcSSimon Schubert case 0x47:
106955796c8dcSSimon Schubert case 0x48:
106965796c8dcSSimon Schubert case 0x49:
106975796c8dcSSimon Schubert case 0x4a:
106985796c8dcSSimon Schubert case 0x4b:
106995796c8dcSSimon Schubert case 0x4c:
107005796c8dcSSimon Schubert case 0x4d:
107015796c8dcSSimon Schubert case 0x4e:
107025796c8dcSSimon Schubert case 0x4f:
107035796c8dcSSimon Schubert if (address_mode == mode_64bit)
107045796c8dcSSimon Schubert newrex = *codep;
107055796c8dcSSimon Schubert else
10706cf7f2e2dSJohn Marino return 1;
10707cf7f2e2dSJohn Marino last_rex_prefix = i;
107085796c8dcSSimon Schubert break;
107095796c8dcSSimon Schubert case 0xf3:
107105796c8dcSSimon Schubert prefixes |= PREFIX_REPZ;
10711cf7f2e2dSJohn Marino last_repz_prefix = i;
107125796c8dcSSimon Schubert break;
107135796c8dcSSimon Schubert case 0xf2:
107145796c8dcSSimon Schubert prefixes |= PREFIX_REPNZ;
10715cf7f2e2dSJohn Marino last_repnz_prefix = i;
107165796c8dcSSimon Schubert break;
107175796c8dcSSimon Schubert case 0xf0:
107185796c8dcSSimon Schubert prefixes |= PREFIX_LOCK;
10719cf7f2e2dSJohn Marino last_lock_prefix = i;
107205796c8dcSSimon Schubert break;
107215796c8dcSSimon Schubert case 0x2e:
107225796c8dcSSimon Schubert prefixes |= PREFIX_CS;
10723cf7f2e2dSJohn Marino last_seg_prefix = i;
107245796c8dcSSimon Schubert break;
107255796c8dcSSimon Schubert case 0x36:
107265796c8dcSSimon Schubert prefixes |= PREFIX_SS;
10727cf7f2e2dSJohn Marino last_seg_prefix = i;
107285796c8dcSSimon Schubert break;
107295796c8dcSSimon Schubert case 0x3e:
107305796c8dcSSimon Schubert prefixes |= PREFIX_DS;
10731cf7f2e2dSJohn Marino last_seg_prefix = i;
107325796c8dcSSimon Schubert break;
107335796c8dcSSimon Schubert case 0x26:
107345796c8dcSSimon Schubert prefixes |= PREFIX_ES;
10735cf7f2e2dSJohn Marino last_seg_prefix = i;
107365796c8dcSSimon Schubert break;
107375796c8dcSSimon Schubert case 0x64:
107385796c8dcSSimon Schubert prefixes |= PREFIX_FS;
10739cf7f2e2dSJohn Marino last_seg_prefix = i;
107405796c8dcSSimon Schubert break;
107415796c8dcSSimon Schubert case 0x65:
107425796c8dcSSimon Schubert prefixes |= PREFIX_GS;
10743cf7f2e2dSJohn Marino last_seg_prefix = i;
107445796c8dcSSimon Schubert break;
107455796c8dcSSimon Schubert case 0x66:
107465796c8dcSSimon Schubert prefixes |= PREFIX_DATA;
10747cf7f2e2dSJohn Marino last_data_prefix = i;
107485796c8dcSSimon Schubert break;
107495796c8dcSSimon Schubert case 0x67:
107505796c8dcSSimon Schubert prefixes |= PREFIX_ADDR;
10751cf7f2e2dSJohn Marino last_addr_prefix = i;
107525796c8dcSSimon Schubert break;
107535796c8dcSSimon Schubert case FWAIT_OPCODE:
107545796c8dcSSimon Schubert /* fwait is really an instruction. If there are prefixes
107555796c8dcSSimon Schubert before the fwait, they belong to the fwait, *not* to the
107565796c8dcSSimon Schubert following instruction. */
107575796c8dcSSimon Schubert if (prefixes || rex)
107585796c8dcSSimon Schubert {
107595796c8dcSSimon Schubert prefixes |= PREFIX_FWAIT;
107605796c8dcSSimon Schubert codep++;
10761*ef5ccd6cSJohn Marino /* This ensures that the previous REX prefixes are noticed
10762*ef5ccd6cSJohn Marino as unused prefixes, as in the return case below. */
10763*ef5ccd6cSJohn Marino rex_used = rex;
10764cf7f2e2dSJohn Marino return 1;
107655796c8dcSSimon Schubert }
107665796c8dcSSimon Schubert prefixes = PREFIX_FWAIT;
107675796c8dcSSimon Schubert break;
107685796c8dcSSimon Schubert default:
10769cf7f2e2dSJohn Marino return 1;
107705796c8dcSSimon Schubert }
107715796c8dcSSimon Schubert /* Rex is ignored when followed by another prefix. */
107725796c8dcSSimon Schubert if (rex)
107735796c8dcSSimon Schubert {
107745796c8dcSSimon Schubert rex_used = rex;
10775cf7f2e2dSJohn Marino return 1;
107765796c8dcSSimon Schubert }
10777cf7f2e2dSJohn Marino if (*codep != FWAIT_OPCODE)
10778cf7f2e2dSJohn Marino all_prefixes[i++] = *codep;
107795796c8dcSSimon Schubert rex = newrex;
107805796c8dcSSimon Schubert codep++;
10781cf7f2e2dSJohn Marino length++;
10782cf7f2e2dSJohn Marino }
10783cf7f2e2dSJohn Marino return 0;
10784cf7f2e2dSJohn Marino }
10785cf7f2e2dSJohn Marino
10786cf7f2e2dSJohn Marino static int
seg_prefix(int pref)10787cf7f2e2dSJohn Marino seg_prefix (int pref)
10788cf7f2e2dSJohn Marino {
10789cf7f2e2dSJohn Marino switch (pref)
10790cf7f2e2dSJohn Marino {
10791cf7f2e2dSJohn Marino case 0x2e:
10792cf7f2e2dSJohn Marino return PREFIX_CS;
10793cf7f2e2dSJohn Marino case 0x36:
10794cf7f2e2dSJohn Marino return PREFIX_SS;
10795cf7f2e2dSJohn Marino case 0x3e:
10796cf7f2e2dSJohn Marino return PREFIX_DS;
10797cf7f2e2dSJohn Marino case 0x26:
10798cf7f2e2dSJohn Marino return PREFIX_ES;
10799cf7f2e2dSJohn Marino case 0x64:
10800cf7f2e2dSJohn Marino return PREFIX_FS;
10801cf7f2e2dSJohn Marino case 0x65:
10802cf7f2e2dSJohn Marino return PREFIX_GS;
10803cf7f2e2dSJohn Marino default:
10804cf7f2e2dSJohn Marino return 0;
108055796c8dcSSimon Schubert }
108065796c8dcSSimon Schubert }
108075796c8dcSSimon Schubert
108085796c8dcSSimon Schubert /* Return the name of the prefix byte PREF, or NULL if PREF is not a
108095796c8dcSSimon Schubert prefix byte. */
108105796c8dcSSimon Schubert
108115796c8dcSSimon Schubert static const char *
prefix_name(int pref,int sizeflag)108125796c8dcSSimon Schubert prefix_name (int pref, int sizeflag)
108135796c8dcSSimon Schubert {
108145796c8dcSSimon Schubert static const char *rexes [16] =
108155796c8dcSSimon Schubert {
108165796c8dcSSimon Schubert "rex", /* 0x40 */
108175796c8dcSSimon Schubert "rex.B", /* 0x41 */
108185796c8dcSSimon Schubert "rex.X", /* 0x42 */
108195796c8dcSSimon Schubert "rex.XB", /* 0x43 */
108205796c8dcSSimon Schubert "rex.R", /* 0x44 */
108215796c8dcSSimon Schubert "rex.RB", /* 0x45 */
108225796c8dcSSimon Schubert "rex.RX", /* 0x46 */
108235796c8dcSSimon Schubert "rex.RXB", /* 0x47 */
108245796c8dcSSimon Schubert "rex.W", /* 0x48 */
108255796c8dcSSimon Schubert "rex.WB", /* 0x49 */
108265796c8dcSSimon Schubert "rex.WX", /* 0x4a */
108275796c8dcSSimon Schubert "rex.WXB", /* 0x4b */
108285796c8dcSSimon Schubert "rex.WR", /* 0x4c */
108295796c8dcSSimon Schubert "rex.WRB", /* 0x4d */
108305796c8dcSSimon Schubert "rex.WRX", /* 0x4e */
108315796c8dcSSimon Schubert "rex.WRXB", /* 0x4f */
108325796c8dcSSimon Schubert };
108335796c8dcSSimon Schubert
108345796c8dcSSimon Schubert switch (pref)
108355796c8dcSSimon Schubert {
108365796c8dcSSimon Schubert /* REX prefixes family. */
108375796c8dcSSimon Schubert case 0x40:
108385796c8dcSSimon Schubert case 0x41:
108395796c8dcSSimon Schubert case 0x42:
108405796c8dcSSimon Schubert case 0x43:
108415796c8dcSSimon Schubert case 0x44:
108425796c8dcSSimon Schubert case 0x45:
108435796c8dcSSimon Schubert case 0x46:
108445796c8dcSSimon Schubert case 0x47:
108455796c8dcSSimon Schubert case 0x48:
108465796c8dcSSimon Schubert case 0x49:
108475796c8dcSSimon Schubert case 0x4a:
108485796c8dcSSimon Schubert case 0x4b:
108495796c8dcSSimon Schubert case 0x4c:
108505796c8dcSSimon Schubert case 0x4d:
108515796c8dcSSimon Schubert case 0x4e:
108525796c8dcSSimon Schubert case 0x4f:
108535796c8dcSSimon Schubert return rexes [pref - 0x40];
108545796c8dcSSimon Schubert case 0xf3:
108555796c8dcSSimon Schubert return "repz";
108565796c8dcSSimon Schubert case 0xf2:
108575796c8dcSSimon Schubert return "repnz";
108585796c8dcSSimon Schubert case 0xf0:
108595796c8dcSSimon Schubert return "lock";
108605796c8dcSSimon Schubert case 0x2e:
108615796c8dcSSimon Schubert return "cs";
108625796c8dcSSimon Schubert case 0x36:
108635796c8dcSSimon Schubert return "ss";
108645796c8dcSSimon Schubert case 0x3e:
108655796c8dcSSimon Schubert return "ds";
108665796c8dcSSimon Schubert case 0x26:
108675796c8dcSSimon Schubert return "es";
108685796c8dcSSimon Schubert case 0x64:
108695796c8dcSSimon Schubert return "fs";
108705796c8dcSSimon Schubert case 0x65:
108715796c8dcSSimon Schubert return "gs";
108725796c8dcSSimon Schubert case 0x66:
108735796c8dcSSimon Schubert return (sizeflag & DFLAG) ? "data16" : "data32";
108745796c8dcSSimon Schubert case 0x67:
108755796c8dcSSimon Schubert if (address_mode == mode_64bit)
108765796c8dcSSimon Schubert return (sizeflag & AFLAG) ? "addr32" : "addr64";
108775796c8dcSSimon Schubert else
108785796c8dcSSimon Schubert return (sizeflag & AFLAG) ? "addr16" : "addr32";
108795796c8dcSSimon Schubert case FWAIT_OPCODE:
108805796c8dcSSimon Schubert return "fwait";
10881cf7f2e2dSJohn Marino case ADDR16_PREFIX:
10882cf7f2e2dSJohn Marino return "addr16";
10883cf7f2e2dSJohn Marino case ADDR32_PREFIX:
10884cf7f2e2dSJohn Marino return "addr32";
10885cf7f2e2dSJohn Marino case DATA16_PREFIX:
10886cf7f2e2dSJohn Marino return "data16";
10887cf7f2e2dSJohn Marino case DATA32_PREFIX:
10888cf7f2e2dSJohn Marino return "data32";
10889cf7f2e2dSJohn Marino case REP_PREFIX:
10890cf7f2e2dSJohn Marino return "rep";
10891*ef5ccd6cSJohn Marino case XACQUIRE_PREFIX:
10892*ef5ccd6cSJohn Marino return "xacquire";
10893*ef5ccd6cSJohn Marino case XRELEASE_PREFIX:
10894*ef5ccd6cSJohn Marino return "xrelease";
108955796c8dcSSimon Schubert default:
108965796c8dcSSimon Schubert return NULL;
108975796c8dcSSimon Schubert }
108985796c8dcSSimon Schubert }
108995796c8dcSSimon Schubert
109005796c8dcSSimon Schubert static char op_out[MAX_OPERANDS][100];
109015796c8dcSSimon Schubert static int op_ad, op_index[MAX_OPERANDS];
109025796c8dcSSimon Schubert static int two_source_ops;
109035796c8dcSSimon Schubert static bfd_vma op_address[MAX_OPERANDS];
109045796c8dcSSimon Schubert static bfd_vma op_riprel[MAX_OPERANDS];
109055796c8dcSSimon Schubert static bfd_vma start_pc;
109065796c8dcSSimon Schubert
109075796c8dcSSimon Schubert /*
109085796c8dcSSimon Schubert * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
109095796c8dcSSimon Schubert * (see topic "Redundant prefixes" in the "Differences from 8086"
109105796c8dcSSimon Schubert * section of the "Virtual 8086 Mode" chapter.)
109115796c8dcSSimon Schubert * 'pc' should be the address of this instruction, it will
109125796c8dcSSimon Schubert * be used to print the target address if this is a relative jump or call
109135796c8dcSSimon Schubert * The function returns the length of this instruction in bytes.
109145796c8dcSSimon Schubert */
109155796c8dcSSimon Schubert
109165796c8dcSSimon Schubert static char intel_syntax;
109175796c8dcSSimon Schubert static char intel_mnemonic = !SYSV386_COMPAT;
109185796c8dcSSimon Schubert static char open_char;
109195796c8dcSSimon Schubert static char close_char;
109205796c8dcSSimon Schubert static char separator_char;
109215796c8dcSSimon Schubert static char scale_char;
109225796c8dcSSimon Schubert
109235796c8dcSSimon Schubert /* Here for backwards compatibility. When gdb stops using
109245796c8dcSSimon Schubert print_insn_i386_att and print_insn_i386_intel these functions can
109255796c8dcSSimon Schubert disappear, and print_insn_i386 be merged into print_insn. */
109265796c8dcSSimon Schubert int
print_insn_i386_att(bfd_vma pc,disassemble_info * info)109275796c8dcSSimon Schubert print_insn_i386_att (bfd_vma pc, disassemble_info *info)
109285796c8dcSSimon Schubert {
109295796c8dcSSimon Schubert intel_syntax = 0;
109305796c8dcSSimon Schubert
109315796c8dcSSimon Schubert return print_insn (pc, info);
109325796c8dcSSimon Schubert }
109335796c8dcSSimon Schubert
109345796c8dcSSimon Schubert int
print_insn_i386_intel(bfd_vma pc,disassemble_info * info)109355796c8dcSSimon Schubert print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
109365796c8dcSSimon Schubert {
109375796c8dcSSimon Schubert intel_syntax = 1;
109385796c8dcSSimon Schubert
109395796c8dcSSimon Schubert return print_insn (pc, info);
109405796c8dcSSimon Schubert }
109415796c8dcSSimon Schubert
109425796c8dcSSimon Schubert int
print_insn_i386(bfd_vma pc,disassemble_info * info)109435796c8dcSSimon Schubert print_insn_i386 (bfd_vma pc, disassemble_info *info)
109445796c8dcSSimon Schubert {
109455796c8dcSSimon Schubert intel_syntax = -1;
109465796c8dcSSimon Schubert
109475796c8dcSSimon Schubert return print_insn (pc, info);
109485796c8dcSSimon Schubert }
109495796c8dcSSimon Schubert
109505796c8dcSSimon Schubert void
print_i386_disassembler_options(FILE * stream)109515796c8dcSSimon Schubert print_i386_disassembler_options (FILE *stream)
109525796c8dcSSimon Schubert {
109535796c8dcSSimon Schubert fprintf (stream, _("\n\
109545796c8dcSSimon Schubert The following i386/x86-64 specific disassembler options are supported for use\n\
109555796c8dcSSimon Schubert with the -M switch (multiple options should be separated by commas):\n"));
109565796c8dcSSimon Schubert
109575796c8dcSSimon Schubert fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
109585796c8dcSSimon Schubert fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
109595796c8dcSSimon Schubert fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
109605796c8dcSSimon Schubert fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
109615796c8dcSSimon Schubert fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
109625796c8dcSSimon Schubert fprintf (stream, _(" att-mnemonic\n"
109635796c8dcSSimon Schubert " Display instruction in AT&T mnemonic\n"));
109645796c8dcSSimon Schubert fprintf (stream, _(" intel-mnemonic\n"
109655796c8dcSSimon Schubert " Display instruction in Intel mnemonic\n"));
109665796c8dcSSimon Schubert fprintf (stream, _(" addr64 Assume 64bit address size\n"));
109675796c8dcSSimon Schubert fprintf (stream, _(" addr32 Assume 32bit address size\n"));
109685796c8dcSSimon Schubert fprintf (stream, _(" addr16 Assume 16bit address size\n"));
109695796c8dcSSimon Schubert fprintf (stream, _(" data32 Assume 32bit data size\n"));
109705796c8dcSSimon Schubert fprintf (stream, _(" data16 Assume 16bit data size\n"));
109715796c8dcSSimon Schubert fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
109725796c8dcSSimon Schubert }
109735796c8dcSSimon Schubert
10974cf7f2e2dSJohn Marino /* Bad opcode. */
10975cf7f2e2dSJohn Marino static const struct dis386 bad_opcode = { "(bad)", { XX } };
10976cf7f2e2dSJohn Marino
109775796c8dcSSimon Schubert /* Get a pointer to struct dis386 with a valid name. */
109785796c8dcSSimon Schubert
109795796c8dcSSimon Schubert static const struct dis386 *
get_valid_dis386(const struct dis386 * dp,disassemble_info * info)109805796c8dcSSimon Schubert get_valid_dis386 (const struct dis386 *dp, disassemble_info *info)
109815796c8dcSSimon Schubert {
10982cf7f2e2dSJohn Marino int vindex, vex_table_index;
109835796c8dcSSimon Schubert
109845796c8dcSSimon Schubert if (dp->name != NULL)
109855796c8dcSSimon Schubert return dp;
109865796c8dcSSimon Schubert
109875796c8dcSSimon Schubert switch (dp->op[0].bytemode)
109885796c8dcSSimon Schubert {
109895796c8dcSSimon Schubert case USE_REG_TABLE:
109905796c8dcSSimon Schubert dp = ®_table[dp->op[1].bytemode][modrm.reg];
109915796c8dcSSimon Schubert break;
109925796c8dcSSimon Schubert
109935796c8dcSSimon Schubert case USE_MOD_TABLE:
10994cf7f2e2dSJohn Marino vindex = modrm.mod == 0x3 ? 1 : 0;
10995cf7f2e2dSJohn Marino dp = &mod_table[dp->op[1].bytemode][vindex];
109965796c8dcSSimon Schubert break;
109975796c8dcSSimon Schubert
109985796c8dcSSimon Schubert case USE_RM_TABLE:
109995796c8dcSSimon Schubert dp = &rm_table[dp->op[1].bytemode][modrm.rm];
110005796c8dcSSimon Schubert break;
110015796c8dcSSimon Schubert
110025796c8dcSSimon Schubert case USE_PREFIX_TABLE:
110035796c8dcSSimon Schubert if (need_vex)
110045796c8dcSSimon Schubert {
110055796c8dcSSimon Schubert /* The prefix in VEX is implicit. */
110065796c8dcSSimon Schubert switch (vex.prefix)
110075796c8dcSSimon Schubert {
110085796c8dcSSimon Schubert case 0:
11009cf7f2e2dSJohn Marino vindex = 0;
110105796c8dcSSimon Schubert break;
110115796c8dcSSimon Schubert case REPE_PREFIX_OPCODE:
11012cf7f2e2dSJohn Marino vindex = 1;
110135796c8dcSSimon Schubert break;
110145796c8dcSSimon Schubert case DATA_PREFIX_OPCODE:
11015cf7f2e2dSJohn Marino vindex = 2;
110165796c8dcSSimon Schubert break;
110175796c8dcSSimon Schubert case REPNE_PREFIX_OPCODE:
11018cf7f2e2dSJohn Marino vindex = 3;
110195796c8dcSSimon Schubert break;
110205796c8dcSSimon Schubert default:
110215796c8dcSSimon Schubert abort ();
110225796c8dcSSimon Schubert break;
110235796c8dcSSimon Schubert }
110245796c8dcSSimon Schubert }
110255796c8dcSSimon Schubert else
110265796c8dcSSimon Schubert {
11027cf7f2e2dSJohn Marino vindex = 0;
110285796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_REPZ);
110295796c8dcSSimon Schubert if (prefixes & PREFIX_REPZ)
110305796c8dcSSimon Schubert {
11031cf7f2e2dSJohn Marino vindex = 1;
11032cf7f2e2dSJohn Marino all_prefixes[last_repz_prefix] = 0;
110335796c8dcSSimon Schubert }
110345796c8dcSSimon Schubert else
110355796c8dcSSimon Schubert {
110365796c8dcSSimon Schubert /* We should check PREFIX_REPNZ and PREFIX_REPZ before
110375796c8dcSSimon Schubert PREFIX_DATA. */
110385796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_REPNZ);
110395796c8dcSSimon Schubert if (prefixes & PREFIX_REPNZ)
110405796c8dcSSimon Schubert {
11041cf7f2e2dSJohn Marino vindex = 3;
11042cf7f2e2dSJohn Marino all_prefixes[last_repnz_prefix] = 0;
110435796c8dcSSimon Schubert }
110445796c8dcSSimon Schubert else
110455796c8dcSSimon Schubert {
110465796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
110475796c8dcSSimon Schubert if (prefixes & PREFIX_DATA)
110485796c8dcSSimon Schubert {
11049cf7f2e2dSJohn Marino vindex = 2;
11050cf7f2e2dSJohn Marino all_prefixes[last_data_prefix] = 0;
110515796c8dcSSimon Schubert }
110525796c8dcSSimon Schubert }
110535796c8dcSSimon Schubert }
110545796c8dcSSimon Schubert }
11055cf7f2e2dSJohn Marino dp = &prefix_table[dp->op[1].bytemode][vindex];
110565796c8dcSSimon Schubert break;
110575796c8dcSSimon Schubert
110585796c8dcSSimon Schubert case USE_X86_64_TABLE:
11059cf7f2e2dSJohn Marino vindex = address_mode == mode_64bit ? 1 : 0;
11060cf7f2e2dSJohn Marino dp = &x86_64_table[dp->op[1].bytemode][vindex];
110615796c8dcSSimon Schubert break;
110625796c8dcSSimon Schubert
110635796c8dcSSimon Schubert case USE_3BYTE_TABLE:
110645796c8dcSSimon Schubert FETCH_DATA (info, codep + 2);
11065cf7f2e2dSJohn Marino vindex = *codep++;
11066cf7f2e2dSJohn Marino dp = &three_byte_table[dp->op[1].bytemode][vindex];
110675796c8dcSSimon Schubert modrm.mod = (*codep >> 6) & 3;
110685796c8dcSSimon Schubert modrm.reg = (*codep >> 3) & 7;
110695796c8dcSSimon Schubert modrm.rm = *codep & 7;
110705796c8dcSSimon Schubert break;
110715796c8dcSSimon Schubert
110725796c8dcSSimon Schubert case USE_VEX_LEN_TABLE:
110735796c8dcSSimon Schubert if (!need_vex)
110745796c8dcSSimon Schubert abort ();
110755796c8dcSSimon Schubert
110765796c8dcSSimon Schubert switch (vex.length)
110775796c8dcSSimon Schubert {
110785796c8dcSSimon Schubert case 128:
11079cf7f2e2dSJohn Marino vindex = 0;
110805796c8dcSSimon Schubert break;
110815796c8dcSSimon Schubert case 256:
11082cf7f2e2dSJohn Marino vindex = 1;
110835796c8dcSSimon Schubert break;
110845796c8dcSSimon Schubert default:
110855796c8dcSSimon Schubert abort ();
110865796c8dcSSimon Schubert break;
110875796c8dcSSimon Schubert }
110885796c8dcSSimon Schubert
11089cf7f2e2dSJohn Marino dp = &vex_len_table[dp->op[1].bytemode][vindex];
110905796c8dcSSimon Schubert break;
110915796c8dcSSimon Schubert
11092cf7f2e2dSJohn Marino case USE_XOP_8F_TABLE:
110935796c8dcSSimon Schubert FETCH_DATA (info, codep + 3);
110945796c8dcSSimon Schubert /* All bits in the REX prefix are ignored. */
110955796c8dcSSimon Schubert rex_ignored = rex;
110965796c8dcSSimon Schubert rex = ~(*codep >> 5) & 0x7;
11097cf7f2e2dSJohn Marino
11098cf7f2e2dSJohn Marino /* VEX_TABLE_INDEX is the mmmmm part of the XOP byte 1 "RCB.mmmmm". */
110995796c8dcSSimon Schubert switch ((*codep & 0x1f))
111005796c8dcSSimon Schubert {
111015796c8dcSSimon Schubert default:
11102cf7f2e2dSJohn Marino dp = &bad_opcode;
11103cf7f2e2dSJohn Marino return dp;
11104cf7f2e2dSJohn Marino case 0x8:
11105cf7f2e2dSJohn Marino vex_table_index = XOP_08;
111065796c8dcSSimon Schubert break;
11107cf7f2e2dSJohn Marino case 0x9:
11108cf7f2e2dSJohn Marino vex_table_index = XOP_09;
111095796c8dcSSimon Schubert break;
11110cf7f2e2dSJohn Marino case 0xa:
11111cf7f2e2dSJohn Marino vex_table_index = XOP_0A;
111125796c8dcSSimon Schubert break;
111135796c8dcSSimon Schubert }
111145796c8dcSSimon Schubert codep++;
111155796c8dcSSimon Schubert vex.w = *codep & 0x80;
111165796c8dcSSimon Schubert if (vex.w && address_mode == mode_64bit)
111175796c8dcSSimon Schubert rex |= REX_W;
111185796c8dcSSimon Schubert
111195796c8dcSSimon Schubert vex.register_specifier = (~(*codep >> 3)) & 0xf;
111205796c8dcSSimon Schubert if (address_mode != mode_64bit
111215796c8dcSSimon Schubert && vex.register_specifier > 0x7)
11122cf7f2e2dSJohn Marino {
11123cf7f2e2dSJohn Marino dp = &bad_opcode;
11124cf7f2e2dSJohn Marino return dp;
11125cf7f2e2dSJohn Marino }
111265796c8dcSSimon Schubert
111275796c8dcSSimon Schubert vex.length = (*codep & 0x4) ? 256 : 128;
111285796c8dcSSimon Schubert switch ((*codep & 0x3))
111295796c8dcSSimon Schubert {
111305796c8dcSSimon Schubert case 0:
111315796c8dcSSimon Schubert vex.prefix = 0;
111325796c8dcSSimon Schubert break;
111335796c8dcSSimon Schubert case 1:
111345796c8dcSSimon Schubert vex.prefix = DATA_PREFIX_OPCODE;
111355796c8dcSSimon Schubert break;
111365796c8dcSSimon Schubert case 2:
111375796c8dcSSimon Schubert vex.prefix = REPE_PREFIX_OPCODE;
111385796c8dcSSimon Schubert break;
111395796c8dcSSimon Schubert case 3:
111405796c8dcSSimon Schubert vex.prefix = REPNE_PREFIX_OPCODE;
111415796c8dcSSimon Schubert break;
111425796c8dcSSimon Schubert }
111435796c8dcSSimon Schubert need_vex = 1;
111445796c8dcSSimon Schubert need_vex_reg = 1;
111455796c8dcSSimon Schubert codep++;
11146cf7f2e2dSJohn Marino vindex = *codep++;
11147cf7f2e2dSJohn Marino dp = &xop_table[vex_table_index][vindex];
11148cf7f2e2dSJohn Marino
11149cf7f2e2dSJohn Marino FETCH_DATA (info, codep + 1);
11150cf7f2e2dSJohn Marino modrm.mod = (*codep >> 6) & 3;
11151cf7f2e2dSJohn Marino modrm.reg = (*codep >> 3) & 7;
11152cf7f2e2dSJohn Marino modrm.rm = *codep & 7;
11153cf7f2e2dSJohn Marino break;
11154cf7f2e2dSJohn Marino
11155cf7f2e2dSJohn Marino case USE_VEX_C4_TABLE:
11156cf7f2e2dSJohn Marino FETCH_DATA (info, codep + 3);
11157cf7f2e2dSJohn Marino /* All bits in the REX prefix are ignored. */
11158cf7f2e2dSJohn Marino rex_ignored = rex;
11159cf7f2e2dSJohn Marino rex = ~(*codep >> 5) & 0x7;
11160cf7f2e2dSJohn Marino switch ((*codep & 0x1f))
11161cf7f2e2dSJohn Marino {
11162cf7f2e2dSJohn Marino default:
11163cf7f2e2dSJohn Marino dp = &bad_opcode;
11164cf7f2e2dSJohn Marino return dp;
11165cf7f2e2dSJohn Marino case 0x1:
11166cf7f2e2dSJohn Marino vex_table_index = VEX_0F;
11167cf7f2e2dSJohn Marino break;
11168cf7f2e2dSJohn Marino case 0x2:
11169cf7f2e2dSJohn Marino vex_table_index = VEX_0F38;
11170cf7f2e2dSJohn Marino break;
11171cf7f2e2dSJohn Marino case 0x3:
11172cf7f2e2dSJohn Marino vex_table_index = VEX_0F3A;
11173cf7f2e2dSJohn Marino break;
11174cf7f2e2dSJohn Marino }
11175cf7f2e2dSJohn Marino codep++;
11176cf7f2e2dSJohn Marino vex.w = *codep & 0x80;
11177cf7f2e2dSJohn Marino if (vex.w && address_mode == mode_64bit)
11178cf7f2e2dSJohn Marino rex |= REX_W;
11179cf7f2e2dSJohn Marino
11180cf7f2e2dSJohn Marino vex.register_specifier = (~(*codep >> 3)) & 0xf;
11181cf7f2e2dSJohn Marino if (address_mode != mode_64bit
11182cf7f2e2dSJohn Marino && vex.register_specifier > 0x7)
11183cf7f2e2dSJohn Marino {
11184cf7f2e2dSJohn Marino dp = &bad_opcode;
11185cf7f2e2dSJohn Marino return dp;
11186cf7f2e2dSJohn Marino }
11187cf7f2e2dSJohn Marino
11188cf7f2e2dSJohn Marino vex.length = (*codep & 0x4) ? 256 : 128;
11189cf7f2e2dSJohn Marino switch ((*codep & 0x3))
11190cf7f2e2dSJohn Marino {
11191cf7f2e2dSJohn Marino case 0:
11192cf7f2e2dSJohn Marino vex.prefix = 0;
11193cf7f2e2dSJohn Marino break;
11194cf7f2e2dSJohn Marino case 1:
11195cf7f2e2dSJohn Marino vex.prefix = DATA_PREFIX_OPCODE;
11196cf7f2e2dSJohn Marino break;
11197cf7f2e2dSJohn Marino case 2:
11198cf7f2e2dSJohn Marino vex.prefix = REPE_PREFIX_OPCODE;
11199cf7f2e2dSJohn Marino break;
11200cf7f2e2dSJohn Marino case 3:
11201cf7f2e2dSJohn Marino vex.prefix = REPNE_PREFIX_OPCODE;
11202cf7f2e2dSJohn Marino break;
11203cf7f2e2dSJohn Marino }
11204cf7f2e2dSJohn Marino need_vex = 1;
11205cf7f2e2dSJohn Marino need_vex_reg = 1;
11206cf7f2e2dSJohn Marino codep++;
11207cf7f2e2dSJohn Marino vindex = *codep++;
11208cf7f2e2dSJohn Marino dp = &vex_table[vex_table_index][vindex];
112095796c8dcSSimon Schubert /* There is no MODRM byte for VEX [82|77]. */
11210cf7f2e2dSJohn Marino if (vindex != 0x77 && vindex != 0x82)
112115796c8dcSSimon Schubert {
112125796c8dcSSimon Schubert FETCH_DATA (info, codep + 1);
112135796c8dcSSimon Schubert modrm.mod = (*codep >> 6) & 3;
112145796c8dcSSimon Schubert modrm.reg = (*codep >> 3) & 7;
112155796c8dcSSimon Schubert modrm.rm = *codep & 7;
112165796c8dcSSimon Schubert }
112175796c8dcSSimon Schubert break;
112185796c8dcSSimon Schubert
112195796c8dcSSimon Schubert case USE_VEX_C5_TABLE:
112205796c8dcSSimon Schubert FETCH_DATA (info, codep + 2);
112215796c8dcSSimon Schubert /* All bits in the REX prefix are ignored. */
112225796c8dcSSimon Schubert rex_ignored = rex;
112235796c8dcSSimon Schubert rex = (*codep & 0x80) ? 0 : REX_R;
112245796c8dcSSimon Schubert
112255796c8dcSSimon Schubert vex.register_specifier = (~(*codep >> 3)) & 0xf;
112265796c8dcSSimon Schubert if (address_mode != mode_64bit
112275796c8dcSSimon Schubert && vex.register_specifier > 0x7)
11228cf7f2e2dSJohn Marino {
11229cf7f2e2dSJohn Marino dp = &bad_opcode;
11230cf7f2e2dSJohn Marino return dp;
11231cf7f2e2dSJohn Marino }
11232cf7f2e2dSJohn Marino
11233cf7f2e2dSJohn Marino vex.w = 0;
112345796c8dcSSimon Schubert
112355796c8dcSSimon Schubert vex.length = (*codep & 0x4) ? 256 : 128;
112365796c8dcSSimon Schubert switch ((*codep & 0x3))
112375796c8dcSSimon Schubert {
112385796c8dcSSimon Schubert case 0:
112395796c8dcSSimon Schubert vex.prefix = 0;
112405796c8dcSSimon Schubert break;
112415796c8dcSSimon Schubert case 1:
112425796c8dcSSimon Schubert vex.prefix = DATA_PREFIX_OPCODE;
112435796c8dcSSimon Schubert break;
112445796c8dcSSimon Schubert case 2:
112455796c8dcSSimon Schubert vex.prefix = REPE_PREFIX_OPCODE;
112465796c8dcSSimon Schubert break;
112475796c8dcSSimon Schubert case 3:
112485796c8dcSSimon Schubert vex.prefix = REPNE_PREFIX_OPCODE;
112495796c8dcSSimon Schubert break;
112505796c8dcSSimon Schubert }
112515796c8dcSSimon Schubert need_vex = 1;
112525796c8dcSSimon Schubert need_vex_reg = 1;
112535796c8dcSSimon Schubert codep++;
11254cf7f2e2dSJohn Marino vindex = *codep++;
11255cf7f2e2dSJohn Marino dp = &vex_table[dp->op[1].bytemode][vindex];
112565796c8dcSSimon Schubert /* There is no MODRM byte for VEX [82|77]. */
11257cf7f2e2dSJohn Marino if (vindex != 0x77 && vindex != 0x82)
112585796c8dcSSimon Schubert {
112595796c8dcSSimon Schubert FETCH_DATA (info, codep + 1);
112605796c8dcSSimon Schubert modrm.mod = (*codep >> 6) & 3;
112615796c8dcSSimon Schubert modrm.reg = (*codep >> 3) & 7;
112625796c8dcSSimon Schubert modrm.rm = *codep & 7;
112635796c8dcSSimon Schubert }
112645796c8dcSSimon Schubert break;
112655796c8dcSSimon Schubert
11266cf7f2e2dSJohn Marino case USE_VEX_W_TABLE:
11267cf7f2e2dSJohn Marino if (!need_vex)
11268cf7f2e2dSJohn Marino abort ();
11269cf7f2e2dSJohn Marino
11270cf7f2e2dSJohn Marino dp = &vex_w_table[dp->op[1].bytemode][vex.w ? 1 : 0];
11271cf7f2e2dSJohn Marino break;
11272cf7f2e2dSJohn Marino
11273cf7f2e2dSJohn Marino case 0:
11274cf7f2e2dSJohn Marino dp = &bad_opcode;
11275cf7f2e2dSJohn Marino break;
11276cf7f2e2dSJohn Marino
112775796c8dcSSimon Schubert default:
112785796c8dcSSimon Schubert abort ();
112795796c8dcSSimon Schubert }
112805796c8dcSSimon Schubert
112815796c8dcSSimon Schubert if (dp->name != NULL)
112825796c8dcSSimon Schubert return dp;
112835796c8dcSSimon Schubert else
112845796c8dcSSimon Schubert return get_valid_dis386 (dp, info);
112855796c8dcSSimon Schubert }
112865796c8dcSSimon Schubert
11287cf7f2e2dSJohn Marino static void
get_sib(disassemble_info * info)11288cf7f2e2dSJohn Marino get_sib (disassemble_info *info)
11289cf7f2e2dSJohn Marino {
11290cf7f2e2dSJohn Marino /* If modrm.mod == 3, operand must be register. */
11291cf7f2e2dSJohn Marino if (need_modrm
11292cf7f2e2dSJohn Marino && address_mode != mode_16bit
11293cf7f2e2dSJohn Marino && modrm.mod != 3
11294cf7f2e2dSJohn Marino && modrm.rm == 4)
11295cf7f2e2dSJohn Marino {
11296cf7f2e2dSJohn Marino FETCH_DATA (info, codep + 2);
11297cf7f2e2dSJohn Marino sib.index = (codep [1] >> 3) & 7;
11298cf7f2e2dSJohn Marino sib.scale = (codep [1] >> 6) & 3;
11299cf7f2e2dSJohn Marino sib.base = codep [1] & 7;
11300cf7f2e2dSJohn Marino }
11301cf7f2e2dSJohn Marino }
11302cf7f2e2dSJohn Marino
113035796c8dcSSimon Schubert static int
print_insn(bfd_vma pc,disassemble_info * info)113045796c8dcSSimon Schubert print_insn (bfd_vma pc, disassemble_info *info)
113055796c8dcSSimon Schubert {
113065796c8dcSSimon Schubert const struct dis386 *dp;
113075796c8dcSSimon Schubert int i;
113085796c8dcSSimon Schubert char *op_txt[MAX_OPERANDS];
113095796c8dcSSimon Schubert int needcomma;
113105796c8dcSSimon Schubert int sizeflag;
113115796c8dcSSimon Schubert const char *p;
113125796c8dcSSimon Schubert struct dis_private priv;
11313cf7f2e2dSJohn Marino int prefix_length;
11314cf7f2e2dSJohn Marino int default_prefixes;
113155796c8dcSSimon Schubert
11316a45ae5f8SJohn Marino priv.orig_sizeflag = AFLAG | DFLAG;
11317a45ae5f8SJohn Marino if ((info->mach & bfd_mach_i386_i386) != 0)
113185796c8dcSSimon Schubert address_mode = mode_32bit;
11319a45ae5f8SJohn Marino else if (info->mach == bfd_mach_i386_i8086)
11320a45ae5f8SJohn Marino {
11321a45ae5f8SJohn Marino address_mode = mode_16bit;
11322a45ae5f8SJohn Marino priv.orig_sizeflag = 0;
11323a45ae5f8SJohn Marino }
11324a45ae5f8SJohn Marino else
11325a45ae5f8SJohn Marino address_mode = mode_64bit;
113265796c8dcSSimon Schubert
113275796c8dcSSimon Schubert if (intel_syntax == (char) -1)
11328a45ae5f8SJohn Marino intel_syntax = (info->mach & bfd_mach_i386_intel_syntax) != 0;
113295796c8dcSSimon Schubert
113305796c8dcSSimon Schubert for (p = info->disassembler_options; p != NULL; )
113315796c8dcSSimon Schubert {
113325796c8dcSSimon Schubert if (CONST_STRNEQ (p, "x86-64"))
113335796c8dcSSimon Schubert {
113345796c8dcSSimon Schubert address_mode = mode_64bit;
113355796c8dcSSimon Schubert priv.orig_sizeflag = AFLAG | DFLAG;
113365796c8dcSSimon Schubert }
113375796c8dcSSimon Schubert else if (CONST_STRNEQ (p, "i386"))
113385796c8dcSSimon Schubert {
113395796c8dcSSimon Schubert address_mode = mode_32bit;
113405796c8dcSSimon Schubert priv.orig_sizeflag = AFLAG | DFLAG;
113415796c8dcSSimon Schubert }
113425796c8dcSSimon Schubert else if (CONST_STRNEQ (p, "i8086"))
113435796c8dcSSimon Schubert {
113445796c8dcSSimon Schubert address_mode = mode_16bit;
113455796c8dcSSimon Schubert priv.orig_sizeflag = 0;
113465796c8dcSSimon Schubert }
113475796c8dcSSimon Schubert else if (CONST_STRNEQ (p, "intel"))
113485796c8dcSSimon Schubert {
113495796c8dcSSimon Schubert intel_syntax = 1;
113505796c8dcSSimon Schubert if (CONST_STRNEQ (p + 5, "-mnemonic"))
113515796c8dcSSimon Schubert intel_mnemonic = 1;
113525796c8dcSSimon Schubert }
113535796c8dcSSimon Schubert else if (CONST_STRNEQ (p, "att"))
113545796c8dcSSimon Schubert {
113555796c8dcSSimon Schubert intel_syntax = 0;
113565796c8dcSSimon Schubert if (CONST_STRNEQ (p + 3, "-mnemonic"))
113575796c8dcSSimon Schubert intel_mnemonic = 0;
113585796c8dcSSimon Schubert }
113595796c8dcSSimon Schubert else if (CONST_STRNEQ (p, "addr"))
113605796c8dcSSimon Schubert {
113615796c8dcSSimon Schubert if (address_mode == mode_64bit)
113625796c8dcSSimon Schubert {
113635796c8dcSSimon Schubert if (p[4] == '3' && p[5] == '2')
113645796c8dcSSimon Schubert priv.orig_sizeflag &= ~AFLAG;
113655796c8dcSSimon Schubert else if (p[4] == '6' && p[5] == '4')
113665796c8dcSSimon Schubert priv.orig_sizeflag |= AFLAG;
113675796c8dcSSimon Schubert }
113685796c8dcSSimon Schubert else
113695796c8dcSSimon Schubert {
113705796c8dcSSimon Schubert if (p[4] == '1' && p[5] == '6')
113715796c8dcSSimon Schubert priv.orig_sizeflag &= ~AFLAG;
113725796c8dcSSimon Schubert else if (p[4] == '3' && p[5] == '2')
113735796c8dcSSimon Schubert priv.orig_sizeflag |= AFLAG;
113745796c8dcSSimon Schubert }
113755796c8dcSSimon Schubert }
113765796c8dcSSimon Schubert else if (CONST_STRNEQ (p, "data"))
113775796c8dcSSimon Schubert {
113785796c8dcSSimon Schubert if (p[4] == '1' && p[5] == '6')
113795796c8dcSSimon Schubert priv.orig_sizeflag &= ~DFLAG;
113805796c8dcSSimon Schubert else if (p[4] == '3' && p[5] == '2')
113815796c8dcSSimon Schubert priv.orig_sizeflag |= DFLAG;
113825796c8dcSSimon Schubert }
113835796c8dcSSimon Schubert else if (CONST_STRNEQ (p, "suffix"))
113845796c8dcSSimon Schubert priv.orig_sizeflag |= SUFFIX_ALWAYS;
113855796c8dcSSimon Schubert
113865796c8dcSSimon Schubert p = strchr (p, ',');
113875796c8dcSSimon Schubert if (p != NULL)
113885796c8dcSSimon Schubert p++;
113895796c8dcSSimon Schubert }
113905796c8dcSSimon Schubert
113915796c8dcSSimon Schubert if (intel_syntax)
113925796c8dcSSimon Schubert {
113935796c8dcSSimon Schubert names64 = intel_names64;
113945796c8dcSSimon Schubert names32 = intel_names32;
113955796c8dcSSimon Schubert names16 = intel_names16;
113965796c8dcSSimon Schubert names8 = intel_names8;
113975796c8dcSSimon Schubert names8rex = intel_names8rex;
113985796c8dcSSimon Schubert names_seg = intel_names_seg;
11399cf7f2e2dSJohn Marino names_mm = intel_names_mm;
11400cf7f2e2dSJohn Marino names_xmm = intel_names_xmm;
11401cf7f2e2dSJohn Marino names_ymm = intel_names_ymm;
114025796c8dcSSimon Schubert index64 = intel_index64;
114035796c8dcSSimon Schubert index32 = intel_index32;
114045796c8dcSSimon Schubert index16 = intel_index16;
114055796c8dcSSimon Schubert open_char = '[';
114065796c8dcSSimon Schubert close_char = ']';
114075796c8dcSSimon Schubert separator_char = '+';
114085796c8dcSSimon Schubert scale_char = '*';
114095796c8dcSSimon Schubert }
114105796c8dcSSimon Schubert else
114115796c8dcSSimon Schubert {
114125796c8dcSSimon Schubert names64 = att_names64;
114135796c8dcSSimon Schubert names32 = att_names32;
114145796c8dcSSimon Schubert names16 = att_names16;
114155796c8dcSSimon Schubert names8 = att_names8;
114165796c8dcSSimon Schubert names8rex = att_names8rex;
114175796c8dcSSimon Schubert names_seg = att_names_seg;
11418cf7f2e2dSJohn Marino names_mm = att_names_mm;
11419cf7f2e2dSJohn Marino names_xmm = att_names_xmm;
11420cf7f2e2dSJohn Marino names_ymm = att_names_ymm;
114215796c8dcSSimon Schubert index64 = att_index64;
114225796c8dcSSimon Schubert index32 = att_index32;
114235796c8dcSSimon Schubert index16 = att_index16;
114245796c8dcSSimon Schubert open_char = '(';
114255796c8dcSSimon Schubert close_char = ')';
114265796c8dcSSimon Schubert separator_char = ',';
114275796c8dcSSimon Schubert scale_char = ',';
114285796c8dcSSimon Schubert }
114295796c8dcSSimon Schubert
114305796c8dcSSimon Schubert /* The output looks better if we put 7 bytes on a line, since that
114315796c8dcSSimon Schubert puts most long word instructions on a single line. Use 8 bytes
114325796c8dcSSimon Schubert for Intel L1OM. */
11433a45ae5f8SJohn Marino if ((info->mach & bfd_mach_l1om) != 0)
114345796c8dcSSimon Schubert info->bytes_per_line = 8;
114355796c8dcSSimon Schubert else
114365796c8dcSSimon Schubert info->bytes_per_line = 7;
114375796c8dcSSimon Schubert
114385796c8dcSSimon Schubert info->private_data = &priv;
114395796c8dcSSimon Schubert priv.max_fetched = priv.the_buffer;
114405796c8dcSSimon Schubert priv.insn_start = pc;
114415796c8dcSSimon Schubert
114425796c8dcSSimon Schubert obuf[0] = 0;
114435796c8dcSSimon Schubert for (i = 0; i < MAX_OPERANDS; ++i)
114445796c8dcSSimon Schubert {
114455796c8dcSSimon Schubert op_out[i][0] = 0;
114465796c8dcSSimon Schubert op_index[i] = -1;
114475796c8dcSSimon Schubert }
114485796c8dcSSimon Schubert
114495796c8dcSSimon Schubert the_info = info;
114505796c8dcSSimon Schubert start_pc = pc;
114515796c8dcSSimon Schubert start_codep = priv.the_buffer;
114525796c8dcSSimon Schubert codep = priv.the_buffer;
114535796c8dcSSimon Schubert
114545796c8dcSSimon Schubert if (setjmp (priv.bailout) != 0)
114555796c8dcSSimon Schubert {
114565796c8dcSSimon Schubert const char *name;
114575796c8dcSSimon Schubert
114585796c8dcSSimon Schubert /* Getting here means we tried for data but didn't get it. That
114595796c8dcSSimon Schubert means we have an incomplete instruction of some sort. Just
114605796c8dcSSimon Schubert print the first byte as a prefix or a .byte pseudo-op. */
114615796c8dcSSimon Schubert if (codep > priv.the_buffer)
114625796c8dcSSimon Schubert {
114635796c8dcSSimon Schubert name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
114645796c8dcSSimon Schubert if (name != NULL)
114655796c8dcSSimon Schubert (*info->fprintf_func) (info->stream, "%s", name);
114665796c8dcSSimon Schubert else
114675796c8dcSSimon Schubert {
114685796c8dcSSimon Schubert /* Just print the first byte as a .byte instruction. */
114695796c8dcSSimon Schubert (*info->fprintf_func) (info->stream, ".byte 0x%x",
114705796c8dcSSimon Schubert (unsigned int) priv.the_buffer[0]);
114715796c8dcSSimon Schubert }
114725796c8dcSSimon Schubert
114735796c8dcSSimon Schubert return 1;
114745796c8dcSSimon Schubert }
114755796c8dcSSimon Schubert
114765796c8dcSSimon Schubert return -1;
114775796c8dcSSimon Schubert }
114785796c8dcSSimon Schubert
114795796c8dcSSimon Schubert obufp = obuf;
11480cf7f2e2dSJohn Marino sizeflag = priv.orig_sizeflag;
11481cf7f2e2dSJohn Marino
11482cf7f2e2dSJohn Marino if (!ckprefix () || rex_used)
11483cf7f2e2dSJohn Marino {
11484cf7f2e2dSJohn Marino /* Too many prefixes or unused REX prefixes. */
11485cf7f2e2dSJohn Marino for (i = 0;
11486a45ae5f8SJohn Marino i < (int) ARRAY_SIZE (all_prefixes) && all_prefixes[i];
11487cf7f2e2dSJohn Marino i++)
11488*ef5ccd6cSJohn Marino (*info->fprintf_func) (info->stream, "%s%s",
11489*ef5ccd6cSJohn Marino i == 0 ? "" : " ",
11490cf7f2e2dSJohn Marino prefix_name (all_prefixes[i], sizeflag));
11491*ef5ccd6cSJohn Marino return i;
11492cf7f2e2dSJohn Marino }
114935796c8dcSSimon Schubert
114945796c8dcSSimon Schubert insn_codep = codep;
114955796c8dcSSimon Schubert
114965796c8dcSSimon Schubert FETCH_DATA (info, codep + 1);
114975796c8dcSSimon Schubert two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
114985796c8dcSSimon Schubert
114995796c8dcSSimon Schubert if (((prefixes & PREFIX_FWAIT)
11500cf7f2e2dSJohn Marino && ((*codep < 0xd8) || (*codep > 0xdf))))
115015796c8dcSSimon Schubert {
11502cf7f2e2dSJohn Marino (*info->fprintf_func) (info->stream, "fwait");
115035796c8dcSSimon Schubert return 1;
115045796c8dcSSimon Schubert }
115055796c8dcSSimon Schubert
115065796c8dcSSimon Schubert if (*codep == 0x0f)
115075796c8dcSSimon Schubert {
115085796c8dcSSimon Schubert unsigned char threebyte;
115095796c8dcSSimon Schubert FETCH_DATA (info, codep + 2);
115105796c8dcSSimon Schubert threebyte = *++codep;
115115796c8dcSSimon Schubert dp = &dis386_twobyte[threebyte];
115125796c8dcSSimon Schubert need_modrm = twobyte_has_modrm[*codep];
115135796c8dcSSimon Schubert codep++;
115145796c8dcSSimon Schubert }
115155796c8dcSSimon Schubert else
115165796c8dcSSimon Schubert {
115175796c8dcSSimon Schubert dp = &dis386[*codep];
115185796c8dcSSimon Schubert need_modrm = onebyte_has_modrm[*codep];
115195796c8dcSSimon Schubert codep++;
115205796c8dcSSimon Schubert }
115215796c8dcSSimon Schubert
115225796c8dcSSimon Schubert if ((prefixes & PREFIX_REPZ))
115235796c8dcSSimon Schubert used_prefixes |= PREFIX_REPZ;
115245796c8dcSSimon Schubert if ((prefixes & PREFIX_REPNZ))
115255796c8dcSSimon Schubert used_prefixes |= PREFIX_REPNZ;
115265796c8dcSSimon Schubert if ((prefixes & PREFIX_LOCK))
115275796c8dcSSimon Schubert used_prefixes |= PREFIX_LOCK;
115285796c8dcSSimon Schubert
11529cf7f2e2dSJohn Marino default_prefixes = 0;
115305796c8dcSSimon Schubert if (prefixes & PREFIX_ADDR)
115315796c8dcSSimon Schubert {
115325796c8dcSSimon Schubert sizeflag ^= AFLAG;
115335796c8dcSSimon Schubert if (dp->op[2].bytemode != loop_jcxz_mode || intel_syntax)
115345796c8dcSSimon Schubert {
115355796c8dcSSimon Schubert if ((sizeflag & AFLAG) || address_mode == mode_64bit)
11536cf7f2e2dSJohn Marino all_prefixes[last_addr_prefix] = ADDR32_PREFIX;
115375796c8dcSSimon Schubert else
11538cf7f2e2dSJohn Marino all_prefixes[last_addr_prefix] = ADDR16_PREFIX;
11539cf7f2e2dSJohn Marino default_prefixes |= PREFIX_ADDR;
115405796c8dcSSimon Schubert }
115415796c8dcSSimon Schubert }
115425796c8dcSSimon Schubert
115435796c8dcSSimon Schubert if ((prefixes & PREFIX_DATA))
115445796c8dcSSimon Schubert {
115455796c8dcSSimon Schubert sizeflag ^= DFLAG;
115465796c8dcSSimon Schubert if (dp->op[2].bytemode == cond_jump_mode
115475796c8dcSSimon Schubert && dp->op[0].bytemode == v_mode
115485796c8dcSSimon Schubert && !intel_syntax)
115495796c8dcSSimon Schubert {
115505796c8dcSSimon Schubert if (sizeflag & DFLAG)
11551cf7f2e2dSJohn Marino all_prefixes[last_data_prefix] = DATA32_PREFIX;
115525796c8dcSSimon Schubert else
11553cf7f2e2dSJohn Marino all_prefixes[last_data_prefix] = DATA16_PREFIX;
11554cf7f2e2dSJohn Marino default_prefixes |= PREFIX_DATA;
11555cf7f2e2dSJohn Marino }
11556cf7f2e2dSJohn Marino else if (rex & REX_W)
11557cf7f2e2dSJohn Marino {
11558cf7f2e2dSJohn Marino /* REX_W will override PREFIX_DATA. */
11559cf7f2e2dSJohn Marino default_prefixes |= PREFIX_DATA;
115605796c8dcSSimon Schubert }
115615796c8dcSSimon Schubert }
115625796c8dcSSimon Schubert
115635796c8dcSSimon Schubert if (need_modrm)
115645796c8dcSSimon Schubert {
115655796c8dcSSimon Schubert FETCH_DATA (info, codep + 1);
115665796c8dcSSimon Schubert modrm.mod = (*codep >> 6) & 3;
115675796c8dcSSimon Schubert modrm.reg = (*codep >> 3) & 7;
115685796c8dcSSimon Schubert modrm.rm = *codep & 7;
115695796c8dcSSimon Schubert }
115705796c8dcSSimon Schubert
11571cf7f2e2dSJohn Marino need_vex = 0;
11572cf7f2e2dSJohn Marino need_vex_reg = 0;
11573cf7f2e2dSJohn Marino vex_w_done = 0;
11574cf7f2e2dSJohn Marino
115755796c8dcSSimon Schubert if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
115765796c8dcSSimon Schubert {
11577cf7f2e2dSJohn Marino get_sib (info);
115785796c8dcSSimon Schubert dofloat (sizeflag);
115795796c8dcSSimon Schubert }
115805796c8dcSSimon Schubert else
115815796c8dcSSimon Schubert {
115825796c8dcSSimon Schubert dp = get_valid_dis386 (dp, info);
115835796c8dcSSimon Schubert if (dp != NULL && putop (dp->name, sizeflag) == 0)
115845796c8dcSSimon Schubert {
11585cf7f2e2dSJohn Marino get_sib (info);
115865796c8dcSSimon Schubert for (i = 0; i < MAX_OPERANDS; ++i)
115875796c8dcSSimon Schubert {
115885796c8dcSSimon Schubert obufp = op_out[i];
115895796c8dcSSimon Schubert op_ad = MAX_OPERANDS - 1 - i;
115905796c8dcSSimon Schubert if (dp->op[i].rtn)
115915796c8dcSSimon Schubert (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
115925796c8dcSSimon Schubert }
115935796c8dcSSimon Schubert }
115945796c8dcSSimon Schubert }
115955796c8dcSSimon Schubert
115965796c8dcSSimon Schubert /* See if any prefixes were not used. If so, print the first one
115975796c8dcSSimon Schubert separately. If we don't do this, we'll wind up printing an
115985796c8dcSSimon Schubert instruction stream which does not precisely correspond to the
115995796c8dcSSimon Schubert bytes we are disassembling. */
11600cf7f2e2dSJohn Marino if ((prefixes & ~(used_prefixes | default_prefixes)) != 0)
11601cf7f2e2dSJohn Marino {
11602cf7f2e2dSJohn Marino for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
11603cf7f2e2dSJohn Marino if (all_prefixes[i])
116045796c8dcSSimon Schubert {
116055796c8dcSSimon Schubert const char *name;
11606cf7f2e2dSJohn Marino name = prefix_name (all_prefixes[i], priv.orig_sizeflag);
116075796c8dcSSimon Schubert if (name == NULL)
116085796c8dcSSimon Schubert name = INTERNAL_DISASSEMBLER_ERROR;
116095796c8dcSSimon Schubert (*info->fprintf_func) (info->stream, "%s", name);
116105796c8dcSSimon Schubert return 1;
116115796c8dcSSimon Schubert }
11612cf7f2e2dSJohn Marino }
11613cf7f2e2dSJohn Marino
11614cf7f2e2dSJohn Marino /* Check if the REX prefix is used. */
11615cf7f2e2dSJohn Marino if (rex_ignored == 0 && (rex ^ rex_used) == 0)
11616cf7f2e2dSJohn Marino all_prefixes[last_rex_prefix] = 0;
11617cf7f2e2dSJohn Marino
11618cf7f2e2dSJohn Marino /* Check if the SEG prefix is used. */
11619cf7f2e2dSJohn Marino if ((prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS | PREFIX_ES
11620cf7f2e2dSJohn Marino | PREFIX_FS | PREFIX_GS)) != 0
11621cf7f2e2dSJohn Marino && (used_prefixes
11622cf7f2e2dSJohn Marino & seg_prefix (all_prefixes[last_seg_prefix])) != 0)
11623cf7f2e2dSJohn Marino all_prefixes[last_seg_prefix] = 0;
11624cf7f2e2dSJohn Marino
11625cf7f2e2dSJohn Marino /* Check if the ADDR prefix is used. */
11626cf7f2e2dSJohn Marino if ((prefixes & PREFIX_ADDR) != 0
11627cf7f2e2dSJohn Marino && (used_prefixes & PREFIX_ADDR) != 0)
11628cf7f2e2dSJohn Marino all_prefixes[last_addr_prefix] = 0;
11629cf7f2e2dSJohn Marino
11630cf7f2e2dSJohn Marino /* Check if the DATA prefix is used. */
11631cf7f2e2dSJohn Marino if ((prefixes & PREFIX_DATA) != 0
11632cf7f2e2dSJohn Marino && (used_prefixes & PREFIX_DATA) != 0)
11633cf7f2e2dSJohn Marino all_prefixes[last_data_prefix] = 0;
11634cf7f2e2dSJohn Marino
11635cf7f2e2dSJohn Marino prefix_length = 0;
11636cf7f2e2dSJohn Marino for (i = 0; i < (int) ARRAY_SIZE (all_prefixes); i++)
11637cf7f2e2dSJohn Marino if (all_prefixes[i])
116385796c8dcSSimon Schubert {
116395796c8dcSSimon Schubert const char *name;
11640cf7f2e2dSJohn Marino name = prefix_name (all_prefixes[i], sizeflag);
116415796c8dcSSimon Schubert if (name == NULL)
11642cf7f2e2dSJohn Marino abort ();
11643cf7f2e2dSJohn Marino prefix_length += strlen (name) + 1;
116445796c8dcSSimon Schubert (*info->fprintf_func) (info->stream, "%s ", name);
116455796c8dcSSimon Schubert }
116465796c8dcSSimon Schubert
11647cf7f2e2dSJohn Marino /* Check maximum code length. */
11648cf7f2e2dSJohn Marino if ((codep - start_codep) > MAX_CODE_LENGTH)
11649cf7f2e2dSJohn Marino {
11650cf7f2e2dSJohn Marino (*info->fprintf_func) (info->stream, "(bad)");
11651cf7f2e2dSJohn Marino return MAX_CODE_LENGTH;
11652cf7f2e2dSJohn Marino }
116535796c8dcSSimon Schubert
116545796c8dcSSimon Schubert obufp = mnemonicendp;
11655cf7f2e2dSJohn Marino for (i = strlen (obuf) + prefix_length; i < 6; i++)
116565796c8dcSSimon Schubert oappend (" ");
116575796c8dcSSimon Schubert oappend (" ");
116585796c8dcSSimon Schubert (*info->fprintf_func) (info->stream, "%s", obuf);
116595796c8dcSSimon Schubert
116605796c8dcSSimon Schubert /* The enter and bound instructions are printed with operands in the same
116615796c8dcSSimon Schubert order as the intel book; everything else is printed in reverse order. */
116625796c8dcSSimon Schubert if (intel_syntax || two_source_ops)
116635796c8dcSSimon Schubert {
116645796c8dcSSimon Schubert bfd_vma riprel;
116655796c8dcSSimon Schubert
116665796c8dcSSimon Schubert for (i = 0; i < MAX_OPERANDS; ++i)
116675796c8dcSSimon Schubert op_txt[i] = op_out[i];
116685796c8dcSSimon Schubert
116695796c8dcSSimon Schubert for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
116705796c8dcSSimon Schubert {
116715796c8dcSSimon Schubert op_ad = op_index[i];
116725796c8dcSSimon Schubert op_index[i] = op_index[MAX_OPERANDS - 1 - i];
116735796c8dcSSimon Schubert op_index[MAX_OPERANDS - 1 - i] = op_ad;
116745796c8dcSSimon Schubert riprel = op_riprel[i];
116755796c8dcSSimon Schubert op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
116765796c8dcSSimon Schubert op_riprel[MAX_OPERANDS - 1 - i] = riprel;
116775796c8dcSSimon Schubert }
116785796c8dcSSimon Schubert }
116795796c8dcSSimon Schubert else
116805796c8dcSSimon Schubert {
116815796c8dcSSimon Schubert for (i = 0; i < MAX_OPERANDS; ++i)
116825796c8dcSSimon Schubert op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
116835796c8dcSSimon Schubert }
116845796c8dcSSimon Schubert
116855796c8dcSSimon Schubert needcomma = 0;
116865796c8dcSSimon Schubert for (i = 0; i < MAX_OPERANDS; ++i)
116875796c8dcSSimon Schubert if (*op_txt[i])
116885796c8dcSSimon Schubert {
116895796c8dcSSimon Schubert if (needcomma)
116905796c8dcSSimon Schubert (*info->fprintf_func) (info->stream, ",");
116915796c8dcSSimon Schubert if (op_index[i] != -1 && !op_riprel[i])
116925796c8dcSSimon Schubert (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
116935796c8dcSSimon Schubert else
116945796c8dcSSimon Schubert (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
116955796c8dcSSimon Schubert needcomma = 1;
116965796c8dcSSimon Schubert }
116975796c8dcSSimon Schubert
116985796c8dcSSimon Schubert for (i = 0; i < MAX_OPERANDS; i++)
116995796c8dcSSimon Schubert if (op_index[i] != -1 && op_riprel[i])
117005796c8dcSSimon Schubert {
117015796c8dcSSimon Schubert (*info->fprintf_func) (info->stream, " # ");
117025796c8dcSSimon Schubert (*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
117035796c8dcSSimon Schubert + op_address[op_index[i]]), info);
117045796c8dcSSimon Schubert break;
117055796c8dcSSimon Schubert }
117065796c8dcSSimon Schubert return codep - priv.the_buffer;
117075796c8dcSSimon Schubert }
117085796c8dcSSimon Schubert
117095796c8dcSSimon Schubert static const char *float_mem[] = {
117105796c8dcSSimon Schubert /* d8 */
117115796c8dcSSimon Schubert "fadd{s|}",
117125796c8dcSSimon Schubert "fmul{s|}",
117135796c8dcSSimon Schubert "fcom{s|}",
117145796c8dcSSimon Schubert "fcomp{s|}",
117155796c8dcSSimon Schubert "fsub{s|}",
117165796c8dcSSimon Schubert "fsubr{s|}",
117175796c8dcSSimon Schubert "fdiv{s|}",
117185796c8dcSSimon Schubert "fdivr{s|}",
117195796c8dcSSimon Schubert /* d9 */
117205796c8dcSSimon Schubert "fld{s|}",
117215796c8dcSSimon Schubert "(bad)",
117225796c8dcSSimon Schubert "fst{s|}",
117235796c8dcSSimon Schubert "fstp{s|}",
117245796c8dcSSimon Schubert "fldenvIC",
117255796c8dcSSimon Schubert "fldcw",
117265796c8dcSSimon Schubert "fNstenvIC",
117275796c8dcSSimon Schubert "fNstcw",
117285796c8dcSSimon Schubert /* da */
117295796c8dcSSimon Schubert "fiadd{l|}",
117305796c8dcSSimon Schubert "fimul{l|}",
117315796c8dcSSimon Schubert "ficom{l|}",
117325796c8dcSSimon Schubert "ficomp{l|}",
117335796c8dcSSimon Schubert "fisub{l|}",
117345796c8dcSSimon Schubert "fisubr{l|}",
117355796c8dcSSimon Schubert "fidiv{l|}",
117365796c8dcSSimon Schubert "fidivr{l|}",
117375796c8dcSSimon Schubert /* db */
117385796c8dcSSimon Schubert "fild{l|}",
117395796c8dcSSimon Schubert "fisttp{l|}",
117405796c8dcSSimon Schubert "fist{l|}",
117415796c8dcSSimon Schubert "fistp{l|}",
117425796c8dcSSimon Schubert "(bad)",
117435796c8dcSSimon Schubert "fld{t||t|}",
117445796c8dcSSimon Schubert "(bad)",
117455796c8dcSSimon Schubert "fstp{t||t|}",
117465796c8dcSSimon Schubert /* dc */
117475796c8dcSSimon Schubert "fadd{l|}",
117485796c8dcSSimon Schubert "fmul{l|}",
117495796c8dcSSimon Schubert "fcom{l|}",
117505796c8dcSSimon Schubert "fcomp{l|}",
117515796c8dcSSimon Schubert "fsub{l|}",
117525796c8dcSSimon Schubert "fsubr{l|}",
117535796c8dcSSimon Schubert "fdiv{l|}",
117545796c8dcSSimon Schubert "fdivr{l|}",
117555796c8dcSSimon Schubert /* dd */
117565796c8dcSSimon Schubert "fld{l|}",
117575796c8dcSSimon Schubert "fisttp{ll|}",
117585796c8dcSSimon Schubert "fst{l||}",
117595796c8dcSSimon Schubert "fstp{l|}",
117605796c8dcSSimon Schubert "frstorIC",
117615796c8dcSSimon Schubert "(bad)",
117625796c8dcSSimon Schubert "fNsaveIC",
117635796c8dcSSimon Schubert "fNstsw",
117645796c8dcSSimon Schubert /* de */
117655796c8dcSSimon Schubert "fiadd",
117665796c8dcSSimon Schubert "fimul",
117675796c8dcSSimon Schubert "ficom",
117685796c8dcSSimon Schubert "ficomp",
117695796c8dcSSimon Schubert "fisub",
117705796c8dcSSimon Schubert "fisubr",
117715796c8dcSSimon Schubert "fidiv",
117725796c8dcSSimon Schubert "fidivr",
117735796c8dcSSimon Schubert /* df */
117745796c8dcSSimon Schubert "fild",
117755796c8dcSSimon Schubert "fisttp",
117765796c8dcSSimon Schubert "fist",
117775796c8dcSSimon Schubert "fistp",
117785796c8dcSSimon Schubert "fbld",
117795796c8dcSSimon Schubert "fild{ll|}",
117805796c8dcSSimon Schubert "fbstp",
117815796c8dcSSimon Schubert "fistp{ll|}",
117825796c8dcSSimon Schubert };
117835796c8dcSSimon Schubert
117845796c8dcSSimon Schubert static const unsigned char float_mem_mode[] = {
117855796c8dcSSimon Schubert /* d8 */
117865796c8dcSSimon Schubert d_mode,
117875796c8dcSSimon Schubert d_mode,
117885796c8dcSSimon Schubert d_mode,
117895796c8dcSSimon Schubert d_mode,
117905796c8dcSSimon Schubert d_mode,
117915796c8dcSSimon Schubert d_mode,
117925796c8dcSSimon Schubert d_mode,
117935796c8dcSSimon Schubert d_mode,
117945796c8dcSSimon Schubert /* d9 */
117955796c8dcSSimon Schubert d_mode,
117965796c8dcSSimon Schubert 0,
117975796c8dcSSimon Schubert d_mode,
117985796c8dcSSimon Schubert d_mode,
117995796c8dcSSimon Schubert 0,
118005796c8dcSSimon Schubert w_mode,
118015796c8dcSSimon Schubert 0,
118025796c8dcSSimon Schubert w_mode,
118035796c8dcSSimon Schubert /* da */
118045796c8dcSSimon Schubert d_mode,
118055796c8dcSSimon Schubert d_mode,
118065796c8dcSSimon Schubert d_mode,
118075796c8dcSSimon Schubert d_mode,
118085796c8dcSSimon Schubert d_mode,
118095796c8dcSSimon Schubert d_mode,
118105796c8dcSSimon Schubert d_mode,
118115796c8dcSSimon Schubert d_mode,
118125796c8dcSSimon Schubert /* db */
118135796c8dcSSimon Schubert d_mode,
118145796c8dcSSimon Schubert d_mode,
118155796c8dcSSimon Schubert d_mode,
118165796c8dcSSimon Schubert d_mode,
118175796c8dcSSimon Schubert 0,
118185796c8dcSSimon Schubert t_mode,
118195796c8dcSSimon Schubert 0,
118205796c8dcSSimon Schubert t_mode,
118215796c8dcSSimon Schubert /* dc */
118225796c8dcSSimon Schubert q_mode,
118235796c8dcSSimon Schubert q_mode,
118245796c8dcSSimon Schubert q_mode,
118255796c8dcSSimon Schubert q_mode,
118265796c8dcSSimon Schubert q_mode,
118275796c8dcSSimon Schubert q_mode,
118285796c8dcSSimon Schubert q_mode,
118295796c8dcSSimon Schubert q_mode,
118305796c8dcSSimon Schubert /* dd */
118315796c8dcSSimon Schubert q_mode,
118325796c8dcSSimon Schubert q_mode,
118335796c8dcSSimon Schubert q_mode,
118345796c8dcSSimon Schubert q_mode,
118355796c8dcSSimon Schubert 0,
118365796c8dcSSimon Schubert 0,
118375796c8dcSSimon Schubert 0,
118385796c8dcSSimon Schubert w_mode,
118395796c8dcSSimon Schubert /* de */
118405796c8dcSSimon Schubert w_mode,
118415796c8dcSSimon Schubert w_mode,
118425796c8dcSSimon Schubert w_mode,
118435796c8dcSSimon Schubert w_mode,
118445796c8dcSSimon Schubert w_mode,
118455796c8dcSSimon Schubert w_mode,
118465796c8dcSSimon Schubert w_mode,
118475796c8dcSSimon Schubert w_mode,
118485796c8dcSSimon Schubert /* df */
118495796c8dcSSimon Schubert w_mode,
118505796c8dcSSimon Schubert w_mode,
118515796c8dcSSimon Schubert w_mode,
118525796c8dcSSimon Schubert w_mode,
118535796c8dcSSimon Schubert t_mode,
118545796c8dcSSimon Schubert q_mode,
118555796c8dcSSimon Schubert t_mode,
118565796c8dcSSimon Schubert q_mode
118575796c8dcSSimon Schubert };
118585796c8dcSSimon Schubert
118595796c8dcSSimon Schubert #define ST { OP_ST, 0 }
118605796c8dcSSimon Schubert #define STi { OP_STi, 0 }
118615796c8dcSSimon Schubert
118625796c8dcSSimon Schubert #define FGRPd9_2 NULL, { { NULL, 0 } }
118635796c8dcSSimon Schubert #define FGRPd9_4 NULL, { { NULL, 1 } }
118645796c8dcSSimon Schubert #define FGRPd9_5 NULL, { { NULL, 2 } }
118655796c8dcSSimon Schubert #define FGRPd9_6 NULL, { { NULL, 3 } }
118665796c8dcSSimon Schubert #define FGRPd9_7 NULL, { { NULL, 4 } }
118675796c8dcSSimon Schubert #define FGRPda_5 NULL, { { NULL, 5 } }
118685796c8dcSSimon Schubert #define FGRPdb_4 NULL, { { NULL, 6 } }
118695796c8dcSSimon Schubert #define FGRPde_3 NULL, { { NULL, 7 } }
118705796c8dcSSimon Schubert #define FGRPdf_4 NULL, { { NULL, 8 } }
118715796c8dcSSimon Schubert
118725796c8dcSSimon Schubert static const struct dis386 float_reg[][8] = {
118735796c8dcSSimon Schubert /* d8 */
118745796c8dcSSimon Schubert {
118755796c8dcSSimon Schubert { "fadd", { ST, STi } },
118765796c8dcSSimon Schubert { "fmul", { ST, STi } },
118775796c8dcSSimon Schubert { "fcom", { STi } },
118785796c8dcSSimon Schubert { "fcomp", { STi } },
118795796c8dcSSimon Schubert { "fsub", { ST, STi } },
118805796c8dcSSimon Schubert { "fsubr", { ST, STi } },
118815796c8dcSSimon Schubert { "fdiv", { ST, STi } },
118825796c8dcSSimon Schubert { "fdivr", { ST, STi } },
118835796c8dcSSimon Schubert },
118845796c8dcSSimon Schubert /* d9 */
118855796c8dcSSimon Schubert {
118865796c8dcSSimon Schubert { "fld", { STi } },
118875796c8dcSSimon Schubert { "fxch", { STi } },
118885796c8dcSSimon Schubert { FGRPd9_2 },
11889cf7f2e2dSJohn Marino { Bad_Opcode },
118905796c8dcSSimon Schubert { FGRPd9_4 },
118915796c8dcSSimon Schubert { FGRPd9_5 },
118925796c8dcSSimon Schubert { FGRPd9_6 },
118935796c8dcSSimon Schubert { FGRPd9_7 },
118945796c8dcSSimon Schubert },
118955796c8dcSSimon Schubert /* da */
118965796c8dcSSimon Schubert {
118975796c8dcSSimon Schubert { "fcmovb", { ST, STi } },
118985796c8dcSSimon Schubert { "fcmove", { ST, STi } },
118995796c8dcSSimon Schubert { "fcmovbe",{ ST, STi } },
119005796c8dcSSimon Schubert { "fcmovu", { ST, STi } },
11901cf7f2e2dSJohn Marino { Bad_Opcode },
119025796c8dcSSimon Schubert { FGRPda_5 },
11903cf7f2e2dSJohn Marino { Bad_Opcode },
11904cf7f2e2dSJohn Marino { Bad_Opcode },
119055796c8dcSSimon Schubert },
119065796c8dcSSimon Schubert /* db */
119075796c8dcSSimon Schubert {
119085796c8dcSSimon Schubert { "fcmovnb",{ ST, STi } },
119095796c8dcSSimon Schubert { "fcmovne",{ ST, STi } },
119105796c8dcSSimon Schubert { "fcmovnbe",{ ST, STi } },
119115796c8dcSSimon Schubert { "fcmovnu",{ ST, STi } },
119125796c8dcSSimon Schubert { FGRPdb_4 },
119135796c8dcSSimon Schubert { "fucomi", { ST, STi } },
119145796c8dcSSimon Schubert { "fcomi", { ST, STi } },
11915cf7f2e2dSJohn Marino { Bad_Opcode },
119165796c8dcSSimon Schubert },
119175796c8dcSSimon Schubert /* dc */
119185796c8dcSSimon Schubert {
119195796c8dcSSimon Schubert { "fadd", { STi, ST } },
119205796c8dcSSimon Schubert { "fmul", { STi, ST } },
11921cf7f2e2dSJohn Marino { Bad_Opcode },
11922cf7f2e2dSJohn Marino { Bad_Opcode },
119235796c8dcSSimon Schubert { "fsub!M", { STi, ST } },
119245796c8dcSSimon Schubert { "fsubM", { STi, ST } },
119255796c8dcSSimon Schubert { "fdiv!M", { STi, ST } },
119265796c8dcSSimon Schubert { "fdivM", { STi, ST } },
119275796c8dcSSimon Schubert },
119285796c8dcSSimon Schubert /* dd */
119295796c8dcSSimon Schubert {
119305796c8dcSSimon Schubert { "ffree", { STi } },
11931cf7f2e2dSJohn Marino { Bad_Opcode },
119325796c8dcSSimon Schubert { "fst", { STi } },
119335796c8dcSSimon Schubert { "fstp", { STi } },
119345796c8dcSSimon Schubert { "fucom", { STi } },
119355796c8dcSSimon Schubert { "fucomp", { STi } },
11936cf7f2e2dSJohn Marino { Bad_Opcode },
11937cf7f2e2dSJohn Marino { Bad_Opcode },
119385796c8dcSSimon Schubert },
119395796c8dcSSimon Schubert /* de */
119405796c8dcSSimon Schubert {
119415796c8dcSSimon Schubert { "faddp", { STi, ST } },
119425796c8dcSSimon Schubert { "fmulp", { STi, ST } },
11943cf7f2e2dSJohn Marino { Bad_Opcode },
119445796c8dcSSimon Schubert { FGRPde_3 },
119455796c8dcSSimon Schubert { "fsub!Mp", { STi, ST } },
119465796c8dcSSimon Schubert { "fsubMp", { STi, ST } },
119475796c8dcSSimon Schubert { "fdiv!Mp", { STi, ST } },
119485796c8dcSSimon Schubert { "fdivMp", { STi, ST } },
119495796c8dcSSimon Schubert },
119505796c8dcSSimon Schubert /* df */
119515796c8dcSSimon Schubert {
119525796c8dcSSimon Schubert { "ffreep", { STi } },
11953cf7f2e2dSJohn Marino { Bad_Opcode },
11954cf7f2e2dSJohn Marino { Bad_Opcode },
11955cf7f2e2dSJohn Marino { Bad_Opcode },
119565796c8dcSSimon Schubert { FGRPdf_4 },
119575796c8dcSSimon Schubert { "fucomip", { ST, STi } },
119585796c8dcSSimon Schubert { "fcomip", { ST, STi } },
11959cf7f2e2dSJohn Marino { Bad_Opcode },
119605796c8dcSSimon Schubert },
119615796c8dcSSimon Schubert };
119625796c8dcSSimon Schubert
119635796c8dcSSimon Schubert static char *fgrps[][8] = {
119645796c8dcSSimon Schubert /* d9_2 0 */
119655796c8dcSSimon Schubert {
119665796c8dcSSimon Schubert "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
119675796c8dcSSimon Schubert },
119685796c8dcSSimon Schubert
119695796c8dcSSimon Schubert /* d9_4 1 */
119705796c8dcSSimon Schubert {
119715796c8dcSSimon Schubert "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
119725796c8dcSSimon Schubert },
119735796c8dcSSimon Schubert
119745796c8dcSSimon Schubert /* d9_5 2 */
119755796c8dcSSimon Schubert {
119765796c8dcSSimon Schubert "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
119775796c8dcSSimon Schubert },
119785796c8dcSSimon Schubert
119795796c8dcSSimon Schubert /* d9_6 3 */
119805796c8dcSSimon Schubert {
119815796c8dcSSimon Schubert "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
119825796c8dcSSimon Schubert },
119835796c8dcSSimon Schubert
119845796c8dcSSimon Schubert /* d9_7 4 */
119855796c8dcSSimon Schubert {
119865796c8dcSSimon Schubert "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
119875796c8dcSSimon Schubert },
119885796c8dcSSimon Schubert
119895796c8dcSSimon Schubert /* da_5 5 */
119905796c8dcSSimon Schubert {
119915796c8dcSSimon Schubert "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
119925796c8dcSSimon Schubert },
119935796c8dcSSimon Schubert
119945796c8dcSSimon Schubert /* db_4 6 */
119955796c8dcSSimon Schubert {
119965796c8dcSSimon Schubert "fNeni(8087 only)","fNdisi(8087 only)","fNclex","fNinit",
119975796c8dcSSimon Schubert "fNsetpm(287 only)","frstpm(287 only)","(bad)","(bad)",
119985796c8dcSSimon Schubert },
119995796c8dcSSimon Schubert
120005796c8dcSSimon Schubert /* de_3 7 */
120015796c8dcSSimon Schubert {
120025796c8dcSSimon Schubert "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
120035796c8dcSSimon Schubert },
120045796c8dcSSimon Schubert
120055796c8dcSSimon Schubert /* df_4 8 */
120065796c8dcSSimon Schubert {
120075796c8dcSSimon Schubert "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
120085796c8dcSSimon Schubert },
120095796c8dcSSimon Schubert };
120105796c8dcSSimon Schubert
120115796c8dcSSimon Schubert static void
swap_operand(void)120125796c8dcSSimon Schubert swap_operand (void)
120135796c8dcSSimon Schubert {
120145796c8dcSSimon Schubert mnemonicendp[0] = '.';
120155796c8dcSSimon Schubert mnemonicendp[1] = 's';
120165796c8dcSSimon Schubert mnemonicendp += 2;
120175796c8dcSSimon Schubert }
120185796c8dcSSimon Schubert
120195796c8dcSSimon Schubert static void
OP_Skip_MODRM(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)120205796c8dcSSimon Schubert OP_Skip_MODRM (int bytemode ATTRIBUTE_UNUSED,
120215796c8dcSSimon Schubert int sizeflag ATTRIBUTE_UNUSED)
120225796c8dcSSimon Schubert {
120235796c8dcSSimon Schubert /* Skip mod/rm byte. */
120245796c8dcSSimon Schubert MODRM_CHECK;
120255796c8dcSSimon Schubert codep++;
120265796c8dcSSimon Schubert }
120275796c8dcSSimon Schubert
120285796c8dcSSimon Schubert static void
dofloat(int sizeflag)120295796c8dcSSimon Schubert dofloat (int sizeflag)
120305796c8dcSSimon Schubert {
120315796c8dcSSimon Schubert const struct dis386 *dp;
120325796c8dcSSimon Schubert unsigned char floatop;
120335796c8dcSSimon Schubert
120345796c8dcSSimon Schubert floatop = codep[-1];
120355796c8dcSSimon Schubert
120365796c8dcSSimon Schubert if (modrm.mod != 3)
120375796c8dcSSimon Schubert {
120385796c8dcSSimon Schubert int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
120395796c8dcSSimon Schubert
120405796c8dcSSimon Schubert putop (float_mem[fp_indx], sizeflag);
120415796c8dcSSimon Schubert obufp = op_out[0];
120425796c8dcSSimon Schubert op_ad = 2;
120435796c8dcSSimon Schubert OP_E (float_mem_mode[fp_indx], sizeflag);
120445796c8dcSSimon Schubert return;
120455796c8dcSSimon Schubert }
120465796c8dcSSimon Schubert /* Skip mod/rm byte. */
120475796c8dcSSimon Schubert MODRM_CHECK;
120485796c8dcSSimon Schubert codep++;
120495796c8dcSSimon Schubert
120505796c8dcSSimon Schubert dp = &float_reg[floatop - 0xd8][modrm.reg];
120515796c8dcSSimon Schubert if (dp->name == NULL)
120525796c8dcSSimon Schubert {
120535796c8dcSSimon Schubert putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
120545796c8dcSSimon Schubert
120555796c8dcSSimon Schubert /* Instruction fnstsw is only one with strange arg. */
120565796c8dcSSimon Schubert if (floatop == 0xdf && codep[-1] == 0xe0)
120575796c8dcSSimon Schubert strcpy (op_out[0], names16[0]);
120585796c8dcSSimon Schubert }
120595796c8dcSSimon Schubert else
120605796c8dcSSimon Schubert {
120615796c8dcSSimon Schubert putop (dp->name, sizeflag);
120625796c8dcSSimon Schubert
120635796c8dcSSimon Schubert obufp = op_out[0];
120645796c8dcSSimon Schubert op_ad = 2;
120655796c8dcSSimon Schubert if (dp->op[0].rtn)
120665796c8dcSSimon Schubert (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
120675796c8dcSSimon Schubert
120685796c8dcSSimon Schubert obufp = op_out[1];
120695796c8dcSSimon Schubert op_ad = 1;
120705796c8dcSSimon Schubert if (dp->op[1].rtn)
120715796c8dcSSimon Schubert (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
120725796c8dcSSimon Schubert }
120735796c8dcSSimon Schubert }
120745796c8dcSSimon Schubert
120755796c8dcSSimon Schubert static void
OP_ST(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)120765796c8dcSSimon Schubert OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
120775796c8dcSSimon Schubert {
120785796c8dcSSimon Schubert oappend ("%st" + intel_syntax);
120795796c8dcSSimon Schubert }
120805796c8dcSSimon Schubert
120815796c8dcSSimon Schubert static void
OP_STi(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)120825796c8dcSSimon Schubert OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
120835796c8dcSSimon Schubert {
120845796c8dcSSimon Schubert sprintf (scratchbuf, "%%st(%d)", modrm.rm);
120855796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
120865796c8dcSSimon Schubert }
120875796c8dcSSimon Schubert
120885796c8dcSSimon Schubert /* Capital letters in template are macros. */
120895796c8dcSSimon Schubert static int
putop(const char * in_template,int sizeflag)120905796c8dcSSimon Schubert putop (const char *in_template, int sizeflag)
120915796c8dcSSimon Schubert {
120925796c8dcSSimon Schubert const char *p;
120935796c8dcSSimon Schubert int alt = 0;
120945796c8dcSSimon Schubert int cond = 1;
120955796c8dcSSimon Schubert unsigned int l = 0, len = 1;
120965796c8dcSSimon Schubert char last[4];
120975796c8dcSSimon Schubert
120985796c8dcSSimon Schubert #define SAVE_LAST(c) \
120995796c8dcSSimon Schubert if (l < len && l < sizeof (last)) \
121005796c8dcSSimon Schubert last[l++] = c; \
121015796c8dcSSimon Schubert else \
121025796c8dcSSimon Schubert abort ();
121035796c8dcSSimon Schubert
121045796c8dcSSimon Schubert for (p = in_template; *p; p++)
121055796c8dcSSimon Schubert {
121065796c8dcSSimon Schubert switch (*p)
121075796c8dcSSimon Schubert {
121085796c8dcSSimon Schubert default:
121095796c8dcSSimon Schubert *obufp++ = *p;
121105796c8dcSSimon Schubert break;
121115796c8dcSSimon Schubert case '%':
121125796c8dcSSimon Schubert len++;
121135796c8dcSSimon Schubert break;
121145796c8dcSSimon Schubert case '!':
121155796c8dcSSimon Schubert cond = 0;
121165796c8dcSSimon Schubert break;
121175796c8dcSSimon Schubert case '{':
121185796c8dcSSimon Schubert alt = 0;
121195796c8dcSSimon Schubert if (intel_syntax)
121205796c8dcSSimon Schubert {
121215796c8dcSSimon Schubert while (*++p != '|')
121225796c8dcSSimon Schubert if (*p == '}' || *p == '\0')
121235796c8dcSSimon Schubert abort ();
121245796c8dcSSimon Schubert }
121255796c8dcSSimon Schubert /* Fall through. */
121265796c8dcSSimon Schubert case 'I':
121275796c8dcSSimon Schubert alt = 1;
121285796c8dcSSimon Schubert continue;
121295796c8dcSSimon Schubert case '|':
121305796c8dcSSimon Schubert while (*++p != '}')
121315796c8dcSSimon Schubert {
121325796c8dcSSimon Schubert if (*p == '\0')
121335796c8dcSSimon Schubert abort ();
121345796c8dcSSimon Schubert }
121355796c8dcSSimon Schubert break;
121365796c8dcSSimon Schubert case '}':
121375796c8dcSSimon Schubert break;
121385796c8dcSSimon Schubert case 'A':
121395796c8dcSSimon Schubert if (intel_syntax)
121405796c8dcSSimon Schubert break;
121415796c8dcSSimon Schubert if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
121425796c8dcSSimon Schubert *obufp++ = 'b';
121435796c8dcSSimon Schubert break;
121445796c8dcSSimon Schubert case 'B':
12145cf7f2e2dSJohn Marino if (l == 0 && len == 1)
12146cf7f2e2dSJohn Marino {
12147cf7f2e2dSJohn Marino case_B:
121485796c8dcSSimon Schubert if (intel_syntax)
121495796c8dcSSimon Schubert break;
121505796c8dcSSimon Schubert if (sizeflag & SUFFIX_ALWAYS)
121515796c8dcSSimon Schubert *obufp++ = 'b';
12152cf7f2e2dSJohn Marino }
12153cf7f2e2dSJohn Marino else
12154cf7f2e2dSJohn Marino {
12155cf7f2e2dSJohn Marino if (l != 1
12156cf7f2e2dSJohn Marino || len != 2
12157cf7f2e2dSJohn Marino || last[0] != 'L')
12158cf7f2e2dSJohn Marino {
12159cf7f2e2dSJohn Marino SAVE_LAST (*p);
12160cf7f2e2dSJohn Marino break;
12161cf7f2e2dSJohn Marino }
12162cf7f2e2dSJohn Marino
12163cf7f2e2dSJohn Marino if (address_mode == mode_64bit
12164cf7f2e2dSJohn Marino && !(prefixes & PREFIX_ADDR))
12165cf7f2e2dSJohn Marino {
12166cf7f2e2dSJohn Marino *obufp++ = 'a';
12167cf7f2e2dSJohn Marino *obufp++ = 'b';
12168cf7f2e2dSJohn Marino *obufp++ = 's';
12169cf7f2e2dSJohn Marino }
12170cf7f2e2dSJohn Marino
12171cf7f2e2dSJohn Marino goto case_B;
12172cf7f2e2dSJohn Marino }
121735796c8dcSSimon Schubert break;
121745796c8dcSSimon Schubert case 'C':
121755796c8dcSSimon Schubert if (intel_syntax && !alt)
121765796c8dcSSimon Schubert break;
121775796c8dcSSimon Schubert if ((prefixes & PREFIX_DATA) || (sizeflag & SUFFIX_ALWAYS))
121785796c8dcSSimon Schubert {
121795796c8dcSSimon Schubert if (sizeflag & DFLAG)
121805796c8dcSSimon Schubert *obufp++ = intel_syntax ? 'd' : 'l';
121815796c8dcSSimon Schubert else
121825796c8dcSSimon Schubert *obufp++ = intel_syntax ? 'w' : 's';
121835796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
121845796c8dcSSimon Schubert }
121855796c8dcSSimon Schubert break;
121865796c8dcSSimon Schubert case 'D':
121875796c8dcSSimon Schubert if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
121885796c8dcSSimon Schubert break;
121895796c8dcSSimon Schubert USED_REX (REX_W);
121905796c8dcSSimon Schubert if (modrm.mod == 3)
121915796c8dcSSimon Schubert {
121925796c8dcSSimon Schubert if (rex & REX_W)
121935796c8dcSSimon Schubert *obufp++ = 'q';
12194cf7f2e2dSJohn Marino else
12195cf7f2e2dSJohn Marino {
12196cf7f2e2dSJohn Marino if (sizeflag & DFLAG)
121975796c8dcSSimon Schubert *obufp++ = intel_syntax ? 'd' : 'l';
121985796c8dcSSimon Schubert else
121995796c8dcSSimon Schubert *obufp++ = 'w';
122005796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
122015796c8dcSSimon Schubert }
12202cf7f2e2dSJohn Marino }
122035796c8dcSSimon Schubert else
122045796c8dcSSimon Schubert *obufp++ = 'w';
122055796c8dcSSimon Schubert break;
122065796c8dcSSimon Schubert case 'E': /* For jcxz/jecxz */
122075796c8dcSSimon Schubert if (address_mode == mode_64bit)
122085796c8dcSSimon Schubert {
122095796c8dcSSimon Schubert if (sizeflag & AFLAG)
122105796c8dcSSimon Schubert *obufp++ = 'r';
122115796c8dcSSimon Schubert else
122125796c8dcSSimon Schubert *obufp++ = 'e';
122135796c8dcSSimon Schubert }
122145796c8dcSSimon Schubert else
122155796c8dcSSimon Schubert if (sizeflag & AFLAG)
122165796c8dcSSimon Schubert *obufp++ = 'e';
122175796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_ADDR);
122185796c8dcSSimon Schubert break;
122195796c8dcSSimon Schubert case 'F':
122205796c8dcSSimon Schubert if (intel_syntax)
122215796c8dcSSimon Schubert break;
122225796c8dcSSimon Schubert if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
122235796c8dcSSimon Schubert {
122245796c8dcSSimon Schubert if (sizeflag & AFLAG)
122255796c8dcSSimon Schubert *obufp++ = address_mode == mode_64bit ? 'q' : 'l';
122265796c8dcSSimon Schubert else
122275796c8dcSSimon Schubert *obufp++ = address_mode == mode_64bit ? 'l' : 'w';
122285796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_ADDR);
122295796c8dcSSimon Schubert }
122305796c8dcSSimon Schubert break;
122315796c8dcSSimon Schubert case 'G':
122325796c8dcSSimon Schubert if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
122335796c8dcSSimon Schubert break;
122345796c8dcSSimon Schubert if ((rex & REX_W) || (sizeflag & DFLAG))
122355796c8dcSSimon Schubert *obufp++ = 'l';
122365796c8dcSSimon Schubert else
122375796c8dcSSimon Schubert *obufp++ = 'w';
122385796c8dcSSimon Schubert if (!(rex & REX_W))
122395796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
122405796c8dcSSimon Schubert break;
122415796c8dcSSimon Schubert case 'H':
122425796c8dcSSimon Schubert if (intel_syntax)
122435796c8dcSSimon Schubert break;
122445796c8dcSSimon Schubert if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
122455796c8dcSSimon Schubert || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
122465796c8dcSSimon Schubert {
122475796c8dcSSimon Schubert used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
122485796c8dcSSimon Schubert *obufp++ = ',';
122495796c8dcSSimon Schubert *obufp++ = 'p';
122505796c8dcSSimon Schubert if (prefixes & PREFIX_DS)
122515796c8dcSSimon Schubert *obufp++ = 't';
122525796c8dcSSimon Schubert else
122535796c8dcSSimon Schubert *obufp++ = 'n';
122545796c8dcSSimon Schubert }
122555796c8dcSSimon Schubert break;
122565796c8dcSSimon Schubert case 'J':
122575796c8dcSSimon Schubert if (intel_syntax)
122585796c8dcSSimon Schubert break;
122595796c8dcSSimon Schubert *obufp++ = 'l';
122605796c8dcSSimon Schubert break;
122615796c8dcSSimon Schubert case 'K':
122625796c8dcSSimon Schubert USED_REX (REX_W);
122635796c8dcSSimon Schubert if (rex & REX_W)
122645796c8dcSSimon Schubert *obufp++ = 'q';
122655796c8dcSSimon Schubert else
122665796c8dcSSimon Schubert *obufp++ = 'd';
122675796c8dcSSimon Schubert break;
122685796c8dcSSimon Schubert case 'Z':
122695796c8dcSSimon Schubert if (intel_syntax)
122705796c8dcSSimon Schubert break;
122715796c8dcSSimon Schubert if (address_mode == mode_64bit && (sizeflag & SUFFIX_ALWAYS))
122725796c8dcSSimon Schubert {
122735796c8dcSSimon Schubert *obufp++ = 'q';
122745796c8dcSSimon Schubert break;
122755796c8dcSSimon Schubert }
122765796c8dcSSimon Schubert /* Fall through. */
122775796c8dcSSimon Schubert goto case_L;
122785796c8dcSSimon Schubert case 'L':
122795796c8dcSSimon Schubert if (l != 0 || len != 1)
122805796c8dcSSimon Schubert {
122815796c8dcSSimon Schubert SAVE_LAST (*p);
122825796c8dcSSimon Schubert break;
122835796c8dcSSimon Schubert }
122845796c8dcSSimon Schubert case_L:
122855796c8dcSSimon Schubert if (intel_syntax)
122865796c8dcSSimon Schubert break;
122875796c8dcSSimon Schubert if (sizeflag & SUFFIX_ALWAYS)
122885796c8dcSSimon Schubert *obufp++ = 'l';
122895796c8dcSSimon Schubert break;
122905796c8dcSSimon Schubert case 'M':
122915796c8dcSSimon Schubert if (intel_mnemonic != cond)
122925796c8dcSSimon Schubert *obufp++ = 'r';
122935796c8dcSSimon Schubert break;
122945796c8dcSSimon Schubert case 'N':
122955796c8dcSSimon Schubert if ((prefixes & PREFIX_FWAIT) == 0)
122965796c8dcSSimon Schubert *obufp++ = 'n';
122975796c8dcSSimon Schubert else
122985796c8dcSSimon Schubert used_prefixes |= PREFIX_FWAIT;
122995796c8dcSSimon Schubert break;
123005796c8dcSSimon Schubert case 'O':
123015796c8dcSSimon Schubert USED_REX (REX_W);
123025796c8dcSSimon Schubert if (rex & REX_W)
123035796c8dcSSimon Schubert *obufp++ = 'o';
123045796c8dcSSimon Schubert else if (intel_syntax && (sizeflag & DFLAG))
123055796c8dcSSimon Schubert *obufp++ = 'q';
123065796c8dcSSimon Schubert else
123075796c8dcSSimon Schubert *obufp++ = 'd';
123085796c8dcSSimon Schubert if (!(rex & REX_W))
123095796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
123105796c8dcSSimon Schubert break;
123115796c8dcSSimon Schubert case 'T':
12312c50c785cSJohn Marino if (!intel_syntax
12313c50c785cSJohn Marino && address_mode == mode_64bit
12314*ef5ccd6cSJohn Marino && ((sizeflag & DFLAG) || (rex & REX_W)))
123155796c8dcSSimon Schubert {
123165796c8dcSSimon Schubert *obufp++ = 'q';
123175796c8dcSSimon Schubert break;
123185796c8dcSSimon Schubert }
123195796c8dcSSimon Schubert /* Fall through. */
123205796c8dcSSimon Schubert case 'P':
123215796c8dcSSimon Schubert if (intel_syntax)
12322c50c785cSJohn Marino {
12323c50c785cSJohn Marino if ((rex & REX_W) == 0
12324c50c785cSJohn Marino && (prefixes & PREFIX_DATA))
12325c50c785cSJohn Marino {
12326c50c785cSJohn Marino if ((sizeflag & DFLAG) == 0)
12327c50c785cSJohn Marino *obufp++ = 'w';
12328c50c785cSJohn Marino used_prefixes |= (prefixes & PREFIX_DATA);
12329c50c785cSJohn Marino }
123305796c8dcSSimon Schubert break;
12331c50c785cSJohn Marino }
123325796c8dcSSimon Schubert if ((prefixes & PREFIX_DATA)
123335796c8dcSSimon Schubert || (rex & REX_W)
123345796c8dcSSimon Schubert || (sizeflag & SUFFIX_ALWAYS))
123355796c8dcSSimon Schubert {
123365796c8dcSSimon Schubert USED_REX (REX_W);
123375796c8dcSSimon Schubert if (rex & REX_W)
123385796c8dcSSimon Schubert *obufp++ = 'q';
123395796c8dcSSimon Schubert else
123405796c8dcSSimon Schubert {
123415796c8dcSSimon Schubert if (sizeflag & DFLAG)
123425796c8dcSSimon Schubert *obufp++ = 'l';
123435796c8dcSSimon Schubert else
123445796c8dcSSimon Schubert *obufp++ = 'w';
123455796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
123465796c8dcSSimon Schubert }
12347cf7f2e2dSJohn Marino }
123485796c8dcSSimon Schubert break;
123495796c8dcSSimon Schubert case 'U':
123505796c8dcSSimon Schubert if (intel_syntax)
123515796c8dcSSimon Schubert break;
12352*ef5ccd6cSJohn Marino if (address_mode == mode_64bit
12353*ef5ccd6cSJohn Marino && ((sizeflag & DFLAG) || (rex & REX_W)))
123545796c8dcSSimon Schubert {
123555796c8dcSSimon Schubert if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
123565796c8dcSSimon Schubert *obufp++ = 'q';
123575796c8dcSSimon Schubert break;
123585796c8dcSSimon Schubert }
123595796c8dcSSimon Schubert /* Fall through. */
123605796c8dcSSimon Schubert goto case_Q;
123615796c8dcSSimon Schubert case 'Q':
123625796c8dcSSimon Schubert if (l == 0 && len == 1)
123635796c8dcSSimon Schubert {
123645796c8dcSSimon Schubert case_Q:
123655796c8dcSSimon Schubert if (intel_syntax && !alt)
123665796c8dcSSimon Schubert break;
123675796c8dcSSimon Schubert USED_REX (REX_W);
123685796c8dcSSimon Schubert if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
123695796c8dcSSimon Schubert {
123705796c8dcSSimon Schubert if (rex & REX_W)
123715796c8dcSSimon Schubert *obufp++ = 'q';
123725796c8dcSSimon Schubert else
123735796c8dcSSimon Schubert {
123745796c8dcSSimon Schubert if (sizeflag & DFLAG)
123755796c8dcSSimon Schubert *obufp++ = intel_syntax ? 'd' : 'l';
123765796c8dcSSimon Schubert else
123775796c8dcSSimon Schubert *obufp++ = 'w';
123785796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
123795796c8dcSSimon Schubert }
123805796c8dcSSimon Schubert }
12381cf7f2e2dSJohn Marino }
123825796c8dcSSimon Schubert else
123835796c8dcSSimon Schubert {
123845796c8dcSSimon Schubert if (l != 1 || len != 2 || last[0] != 'L')
123855796c8dcSSimon Schubert {
123865796c8dcSSimon Schubert SAVE_LAST (*p);
123875796c8dcSSimon Schubert break;
123885796c8dcSSimon Schubert }
123895796c8dcSSimon Schubert if (intel_syntax
123905796c8dcSSimon Schubert || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
123915796c8dcSSimon Schubert break;
123925796c8dcSSimon Schubert if ((rex & REX_W))
123935796c8dcSSimon Schubert {
123945796c8dcSSimon Schubert USED_REX (REX_W);
123955796c8dcSSimon Schubert *obufp++ = 'q';
123965796c8dcSSimon Schubert }
123975796c8dcSSimon Schubert else
123985796c8dcSSimon Schubert *obufp++ = 'l';
123995796c8dcSSimon Schubert }
124005796c8dcSSimon Schubert break;
124015796c8dcSSimon Schubert case 'R':
124025796c8dcSSimon Schubert USED_REX (REX_W);
124035796c8dcSSimon Schubert if (rex & REX_W)
124045796c8dcSSimon Schubert *obufp++ = 'q';
124055796c8dcSSimon Schubert else if (sizeflag & DFLAG)
124065796c8dcSSimon Schubert {
124075796c8dcSSimon Schubert if (intel_syntax)
124085796c8dcSSimon Schubert *obufp++ = 'd';
124095796c8dcSSimon Schubert else
124105796c8dcSSimon Schubert *obufp++ = 'l';
124115796c8dcSSimon Schubert }
124125796c8dcSSimon Schubert else
124135796c8dcSSimon Schubert *obufp++ = 'w';
124145796c8dcSSimon Schubert if (intel_syntax && !p[1]
124155796c8dcSSimon Schubert && ((rex & REX_W) || (sizeflag & DFLAG)))
124165796c8dcSSimon Schubert *obufp++ = 'e';
124175796c8dcSSimon Schubert if (!(rex & REX_W))
124185796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
124195796c8dcSSimon Schubert break;
124205796c8dcSSimon Schubert case 'V':
12421cf7f2e2dSJohn Marino if (l == 0 && len == 1)
12422cf7f2e2dSJohn Marino {
124235796c8dcSSimon Schubert if (intel_syntax)
124245796c8dcSSimon Schubert break;
12425*ef5ccd6cSJohn Marino if (address_mode == mode_64bit
12426*ef5ccd6cSJohn Marino && ((sizeflag & DFLAG) || (rex & REX_W)))
124275796c8dcSSimon Schubert {
124285796c8dcSSimon Schubert if (sizeflag & SUFFIX_ALWAYS)
124295796c8dcSSimon Schubert *obufp++ = 'q';
124305796c8dcSSimon Schubert break;
124315796c8dcSSimon Schubert }
12432cf7f2e2dSJohn Marino }
12433cf7f2e2dSJohn Marino else
12434cf7f2e2dSJohn Marino {
12435cf7f2e2dSJohn Marino if (l != 1
12436cf7f2e2dSJohn Marino || len != 2
12437cf7f2e2dSJohn Marino || last[0] != 'L')
12438cf7f2e2dSJohn Marino {
12439cf7f2e2dSJohn Marino SAVE_LAST (*p);
12440cf7f2e2dSJohn Marino break;
12441cf7f2e2dSJohn Marino }
12442cf7f2e2dSJohn Marino
12443cf7f2e2dSJohn Marino if (rex & REX_W)
12444cf7f2e2dSJohn Marino {
12445cf7f2e2dSJohn Marino *obufp++ = 'a';
12446cf7f2e2dSJohn Marino *obufp++ = 'b';
12447cf7f2e2dSJohn Marino *obufp++ = 's';
12448cf7f2e2dSJohn Marino }
12449cf7f2e2dSJohn Marino }
124505796c8dcSSimon Schubert /* Fall through. */
12451cf7f2e2dSJohn Marino goto case_S;
124525796c8dcSSimon Schubert case 'S':
12453cf7f2e2dSJohn Marino if (l == 0 && len == 1)
12454cf7f2e2dSJohn Marino {
12455cf7f2e2dSJohn Marino case_S:
124565796c8dcSSimon Schubert if (intel_syntax)
124575796c8dcSSimon Schubert break;
124585796c8dcSSimon Schubert if (sizeflag & SUFFIX_ALWAYS)
124595796c8dcSSimon Schubert {
124605796c8dcSSimon Schubert if (rex & REX_W)
124615796c8dcSSimon Schubert *obufp++ = 'q';
124625796c8dcSSimon Schubert else
124635796c8dcSSimon Schubert {
124645796c8dcSSimon Schubert if (sizeflag & DFLAG)
124655796c8dcSSimon Schubert *obufp++ = 'l';
124665796c8dcSSimon Schubert else
124675796c8dcSSimon Schubert *obufp++ = 'w';
124685796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
124695796c8dcSSimon Schubert }
124705796c8dcSSimon Schubert }
12471cf7f2e2dSJohn Marino }
12472cf7f2e2dSJohn Marino else
12473cf7f2e2dSJohn Marino {
12474cf7f2e2dSJohn Marino if (l != 1
12475cf7f2e2dSJohn Marino || len != 2
12476cf7f2e2dSJohn Marino || last[0] != 'L')
12477cf7f2e2dSJohn Marino {
12478cf7f2e2dSJohn Marino SAVE_LAST (*p);
12479cf7f2e2dSJohn Marino break;
12480cf7f2e2dSJohn Marino }
12481cf7f2e2dSJohn Marino
12482cf7f2e2dSJohn Marino if (address_mode == mode_64bit
12483cf7f2e2dSJohn Marino && !(prefixes & PREFIX_ADDR))
12484cf7f2e2dSJohn Marino {
12485cf7f2e2dSJohn Marino *obufp++ = 'a';
12486cf7f2e2dSJohn Marino *obufp++ = 'b';
12487cf7f2e2dSJohn Marino *obufp++ = 's';
12488cf7f2e2dSJohn Marino }
12489cf7f2e2dSJohn Marino
12490cf7f2e2dSJohn Marino goto case_S;
12491cf7f2e2dSJohn Marino }
124925796c8dcSSimon Schubert break;
124935796c8dcSSimon Schubert case 'X':
124945796c8dcSSimon Schubert if (l != 0 || len != 1)
124955796c8dcSSimon Schubert {
124965796c8dcSSimon Schubert SAVE_LAST (*p);
124975796c8dcSSimon Schubert break;
124985796c8dcSSimon Schubert }
124995796c8dcSSimon Schubert if (need_vex && vex.prefix)
125005796c8dcSSimon Schubert {
125015796c8dcSSimon Schubert if (vex.prefix == DATA_PREFIX_OPCODE)
125025796c8dcSSimon Schubert *obufp++ = 'd';
125035796c8dcSSimon Schubert else
125045796c8dcSSimon Schubert *obufp++ = 's';
125055796c8dcSSimon Schubert }
12506cf7f2e2dSJohn Marino else
12507cf7f2e2dSJohn Marino {
12508cf7f2e2dSJohn Marino if (prefixes & PREFIX_DATA)
125095796c8dcSSimon Schubert *obufp++ = 'd';
125105796c8dcSSimon Schubert else
125115796c8dcSSimon Schubert *obufp++ = 's';
125125796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
12513cf7f2e2dSJohn Marino }
125145796c8dcSSimon Schubert break;
125155796c8dcSSimon Schubert case 'Y':
125165796c8dcSSimon Schubert if (l == 0 && len == 1)
125175796c8dcSSimon Schubert {
125185796c8dcSSimon Schubert if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
125195796c8dcSSimon Schubert break;
125205796c8dcSSimon Schubert if (rex & REX_W)
125215796c8dcSSimon Schubert {
125225796c8dcSSimon Schubert USED_REX (REX_W);
125235796c8dcSSimon Schubert *obufp++ = 'q';
125245796c8dcSSimon Schubert }
125255796c8dcSSimon Schubert break;
125265796c8dcSSimon Schubert }
125275796c8dcSSimon Schubert else
125285796c8dcSSimon Schubert {
125295796c8dcSSimon Schubert if (l != 1 || len != 2 || last[0] != 'X')
125305796c8dcSSimon Schubert {
125315796c8dcSSimon Schubert SAVE_LAST (*p);
125325796c8dcSSimon Schubert break;
125335796c8dcSSimon Schubert }
125345796c8dcSSimon Schubert if (!need_vex)
125355796c8dcSSimon Schubert abort ();
125365796c8dcSSimon Schubert if (intel_syntax
125375796c8dcSSimon Schubert || (modrm.mod == 3 && !(sizeflag & SUFFIX_ALWAYS)))
125385796c8dcSSimon Schubert break;
125395796c8dcSSimon Schubert switch (vex.length)
125405796c8dcSSimon Schubert {
125415796c8dcSSimon Schubert case 128:
125425796c8dcSSimon Schubert *obufp++ = 'x';
125435796c8dcSSimon Schubert break;
125445796c8dcSSimon Schubert case 256:
125455796c8dcSSimon Schubert *obufp++ = 'y';
125465796c8dcSSimon Schubert break;
125475796c8dcSSimon Schubert default:
125485796c8dcSSimon Schubert abort ();
125495796c8dcSSimon Schubert }
125505796c8dcSSimon Schubert }
125515796c8dcSSimon Schubert break;
125525796c8dcSSimon Schubert case 'W':
125535796c8dcSSimon Schubert if (l == 0 && len == 1)
125545796c8dcSSimon Schubert {
125555796c8dcSSimon Schubert /* operand size flag for cwtl, cbtw */
125565796c8dcSSimon Schubert USED_REX (REX_W);
125575796c8dcSSimon Schubert if (rex & REX_W)
125585796c8dcSSimon Schubert {
125595796c8dcSSimon Schubert if (intel_syntax)
125605796c8dcSSimon Schubert *obufp++ = 'd';
125615796c8dcSSimon Schubert else
125625796c8dcSSimon Schubert *obufp++ = 'l';
125635796c8dcSSimon Schubert }
125645796c8dcSSimon Schubert else if (sizeflag & DFLAG)
125655796c8dcSSimon Schubert *obufp++ = 'w';
125665796c8dcSSimon Schubert else
125675796c8dcSSimon Schubert *obufp++ = 'b';
125685796c8dcSSimon Schubert if (!(rex & REX_W))
125695796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
125705796c8dcSSimon Schubert }
125715796c8dcSSimon Schubert else
125725796c8dcSSimon Schubert {
12573a45ae5f8SJohn Marino if (l != 1
12574a45ae5f8SJohn Marino || len != 2
12575a45ae5f8SJohn Marino || (last[0] != 'X'
12576a45ae5f8SJohn Marino && last[0] != 'L'))
125775796c8dcSSimon Schubert {
125785796c8dcSSimon Schubert SAVE_LAST (*p);
125795796c8dcSSimon Schubert break;
125805796c8dcSSimon Schubert }
125815796c8dcSSimon Schubert if (!need_vex)
125825796c8dcSSimon Schubert abort ();
12583a45ae5f8SJohn Marino if (last[0] == 'X')
125845796c8dcSSimon Schubert *obufp++ = vex.w ? 'd': 's';
12585a45ae5f8SJohn Marino else
12586a45ae5f8SJohn Marino *obufp++ = vex.w ? 'q': 'd';
125875796c8dcSSimon Schubert }
125885796c8dcSSimon Schubert break;
125895796c8dcSSimon Schubert }
125905796c8dcSSimon Schubert alt = 0;
125915796c8dcSSimon Schubert }
125925796c8dcSSimon Schubert *obufp = 0;
125935796c8dcSSimon Schubert mnemonicendp = obufp;
125945796c8dcSSimon Schubert return 0;
125955796c8dcSSimon Schubert }
125965796c8dcSSimon Schubert
125975796c8dcSSimon Schubert static void
oappend(const char * s)125985796c8dcSSimon Schubert oappend (const char *s)
125995796c8dcSSimon Schubert {
126005796c8dcSSimon Schubert obufp = stpcpy (obufp, s);
126015796c8dcSSimon Schubert }
126025796c8dcSSimon Schubert
126035796c8dcSSimon Schubert static void
append_seg(void)126045796c8dcSSimon Schubert append_seg (void)
126055796c8dcSSimon Schubert {
126065796c8dcSSimon Schubert if (prefixes & PREFIX_CS)
126075796c8dcSSimon Schubert {
126085796c8dcSSimon Schubert used_prefixes |= PREFIX_CS;
126095796c8dcSSimon Schubert oappend ("%cs:" + intel_syntax);
126105796c8dcSSimon Schubert }
126115796c8dcSSimon Schubert if (prefixes & PREFIX_DS)
126125796c8dcSSimon Schubert {
126135796c8dcSSimon Schubert used_prefixes |= PREFIX_DS;
126145796c8dcSSimon Schubert oappend ("%ds:" + intel_syntax);
126155796c8dcSSimon Schubert }
126165796c8dcSSimon Schubert if (prefixes & PREFIX_SS)
126175796c8dcSSimon Schubert {
126185796c8dcSSimon Schubert used_prefixes |= PREFIX_SS;
126195796c8dcSSimon Schubert oappend ("%ss:" + intel_syntax);
126205796c8dcSSimon Schubert }
126215796c8dcSSimon Schubert if (prefixes & PREFIX_ES)
126225796c8dcSSimon Schubert {
126235796c8dcSSimon Schubert used_prefixes |= PREFIX_ES;
126245796c8dcSSimon Schubert oappend ("%es:" + intel_syntax);
126255796c8dcSSimon Schubert }
126265796c8dcSSimon Schubert if (prefixes & PREFIX_FS)
126275796c8dcSSimon Schubert {
126285796c8dcSSimon Schubert used_prefixes |= PREFIX_FS;
126295796c8dcSSimon Schubert oappend ("%fs:" + intel_syntax);
126305796c8dcSSimon Schubert }
126315796c8dcSSimon Schubert if (prefixes & PREFIX_GS)
126325796c8dcSSimon Schubert {
126335796c8dcSSimon Schubert used_prefixes |= PREFIX_GS;
126345796c8dcSSimon Schubert oappend ("%gs:" + intel_syntax);
126355796c8dcSSimon Schubert }
126365796c8dcSSimon Schubert }
126375796c8dcSSimon Schubert
126385796c8dcSSimon Schubert static void
OP_indirE(int bytemode,int sizeflag)126395796c8dcSSimon Schubert OP_indirE (int bytemode, int sizeflag)
126405796c8dcSSimon Schubert {
126415796c8dcSSimon Schubert if (!intel_syntax)
126425796c8dcSSimon Schubert oappend ("*");
126435796c8dcSSimon Schubert OP_E (bytemode, sizeflag);
126445796c8dcSSimon Schubert }
126455796c8dcSSimon Schubert
126465796c8dcSSimon Schubert static void
print_operand_value(char * buf,int hex,bfd_vma disp)126475796c8dcSSimon Schubert print_operand_value (char *buf, int hex, bfd_vma disp)
126485796c8dcSSimon Schubert {
126495796c8dcSSimon Schubert if (address_mode == mode_64bit)
126505796c8dcSSimon Schubert {
126515796c8dcSSimon Schubert if (hex)
126525796c8dcSSimon Schubert {
126535796c8dcSSimon Schubert char tmp[30];
126545796c8dcSSimon Schubert int i;
126555796c8dcSSimon Schubert buf[0] = '0';
126565796c8dcSSimon Schubert buf[1] = 'x';
126575796c8dcSSimon Schubert sprintf_vma (tmp, disp);
126585796c8dcSSimon Schubert for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
126595796c8dcSSimon Schubert strcpy (buf + 2, tmp + i);
126605796c8dcSSimon Schubert }
126615796c8dcSSimon Schubert else
126625796c8dcSSimon Schubert {
126635796c8dcSSimon Schubert bfd_signed_vma v = disp;
126645796c8dcSSimon Schubert char tmp[30];
126655796c8dcSSimon Schubert int i;
126665796c8dcSSimon Schubert if (v < 0)
126675796c8dcSSimon Schubert {
126685796c8dcSSimon Schubert *(buf++) = '-';
126695796c8dcSSimon Schubert v = -disp;
126705796c8dcSSimon Schubert /* Check for possible overflow on 0x8000000000000000. */
126715796c8dcSSimon Schubert if (v < 0)
126725796c8dcSSimon Schubert {
126735796c8dcSSimon Schubert strcpy (buf, "9223372036854775808");
126745796c8dcSSimon Schubert return;
126755796c8dcSSimon Schubert }
126765796c8dcSSimon Schubert }
126775796c8dcSSimon Schubert if (!v)
126785796c8dcSSimon Schubert {
126795796c8dcSSimon Schubert strcpy (buf, "0");
126805796c8dcSSimon Schubert return;
126815796c8dcSSimon Schubert }
126825796c8dcSSimon Schubert
126835796c8dcSSimon Schubert i = 0;
126845796c8dcSSimon Schubert tmp[29] = 0;
126855796c8dcSSimon Schubert while (v)
126865796c8dcSSimon Schubert {
126875796c8dcSSimon Schubert tmp[28 - i] = (v % 10) + '0';
126885796c8dcSSimon Schubert v /= 10;
126895796c8dcSSimon Schubert i++;
126905796c8dcSSimon Schubert }
126915796c8dcSSimon Schubert strcpy (buf, tmp + 29 - i);
126925796c8dcSSimon Schubert }
126935796c8dcSSimon Schubert }
126945796c8dcSSimon Schubert else
126955796c8dcSSimon Schubert {
126965796c8dcSSimon Schubert if (hex)
126975796c8dcSSimon Schubert sprintf (buf, "0x%x", (unsigned int) disp);
126985796c8dcSSimon Schubert else
126995796c8dcSSimon Schubert sprintf (buf, "%d", (int) disp);
127005796c8dcSSimon Schubert }
127015796c8dcSSimon Schubert }
127025796c8dcSSimon Schubert
127035796c8dcSSimon Schubert /* Put DISP in BUF as signed hex number. */
127045796c8dcSSimon Schubert
127055796c8dcSSimon Schubert static void
print_displacement(char * buf,bfd_vma disp)127065796c8dcSSimon Schubert print_displacement (char *buf, bfd_vma disp)
127075796c8dcSSimon Schubert {
127085796c8dcSSimon Schubert bfd_signed_vma val = disp;
127095796c8dcSSimon Schubert char tmp[30];
127105796c8dcSSimon Schubert int i, j = 0;
127115796c8dcSSimon Schubert
127125796c8dcSSimon Schubert if (val < 0)
127135796c8dcSSimon Schubert {
127145796c8dcSSimon Schubert buf[j++] = '-';
127155796c8dcSSimon Schubert val = -disp;
127165796c8dcSSimon Schubert
127175796c8dcSSimon Schubert /* Check for possible overflow. */
127185796c8dcSSimon Schubert if (val < 0)
127195796c8dcSSimon Schubert {
127205796c8dcSSimon Schubert switch (address_mode)
127215796c8dcSSimon Schubert {
127225796c8dcSSimon Schubert case mode_64bit:
127235796c8dcSSimon Schubert strcpy (buf + j, "0x8000000000000000");
127245796c8dcSSimon Schubert break;
127255796c8dcSSimon Schubert case mode_32bit:
127265796c8dcSSimon Schubert strcpy (buf + j, "0x80000000");
127275796c8dcSSimon Schubert break;
127285796c8dcSSimon Schubert case mode_16bit:
127295796c8dcSSimon Schubert strcpy (buf + j, "0x8000");
127305796c8dcSSimon Schubert break;
127315796c8dcSSimon Schubert }
127325796c8dcSSimon Schubert return;
127335796c8dcSSimon Schubert }
127345796c8dcSSimon Schubert }
127355796c8dcSSimon Schubert
127365796c8dcSSimon Schubert buf[j++] = '0';
127375796c8dcSSimon Schubert buf[j++] = 'x';
127385796c8dcSSimon Schubert
127395796c8dcSSimon Schubert sprintf_vma (tmp, (bfd_vma) val);
127405796c8dcSSimon Schubert for (i = 0; tmp[i] == '0'; i++)
127415796c8dcSSimon Schubert continue;
127425796c8dcSSimon Schubert if (tmp[i] == '\0')
127435796c8dcSSimon Schubert i--;
127445796c8dcSSimon Schubert strcpy (buf + j, tmp + i);
127455796c8dcSSimon Schubert }
127465796c8dcSSimon Schubert
127475796c8dcSSimon Schubert static void
intel_operand_size(int bytemode,int sizeflag)127485796c8dcSSimon Schubert intel_operand_size (int bytemode, int sizeflag)
127495796c8dcSSimon Schubert {
127505796c8dcSSimon Schubert switch (bytemode)
127515796c8dcSSimon Schubert {
127525796c8dcSSimon Schubert case b_mode:
127535796c8dcSSimon Schubert case b_swap_mode:
127545796c8dcSSimon Schubert case dqb_mode:
127555796c8dcSSimon Schubert oappend ("BYTE PTR ");
127565796c8dcSSimon Schubert break;
127575796c8dcSSimon Schubert case w_mode:
127585796c8dcSSimon Schubert case dqw_mode:
127595796c8dcSSimon Schubert oappend ("WORD PTR ");
127605796c8dcSSimon Schubert break;
127615796c8dcSSimon Schubert case stack_v_mode:
12762*ef5ccd6cSJohn Marino if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
127635796c8dcSSimon Schubert {
127645796c8dcSSimon Schubert oappend ("QWORD PTR ");
127655796c8dcSSimon Schubert break;
127665796c8dcSSimon Schubert }
127675796c8dcSSimon Schubert /* FALLTHRU */
127685796c8dcSSimon Schubert case v_mode:
127695796c8dcSSimon Schubert case v_swap_mode:
127705796c8dcSSimon Schubert case dq_mode:
127715796c8dcSSimon Schubert USED_REX (REX_W);
127725796c8dcSSimon Schubert if (rex & REX_W)
127735796c8dcSSimon Schubert oappend ("QWORD PTR ");
12774cf7f2e2dSJohn Marino else
12775cf7f2e2dSJohn Marino {
12776cf7f2e2dSJohn Marino if ((sizeflag & DFLAG) || bytemode == dq_mode)
127775796c8dcSSimon Schubert oappend ("DWORD PTR ");
127785796c8dcSSimon Schubert else
127795796c8dcSSimon Schubert oappend ("WORD PTR ");
127805796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
12781cf7f2e2dSJohn Marino }
127825796c8dcSSimon Schubert break;
127835796c8dcSSimon Schubert case z_mode:
127845796c8dcSSimon Schubert if ((rex & REX_W) || (sizeflag & DFLAG))
127855796c8dcSSimon Schubert *obufp++ = 'D';
127865796c8dcSSimon Schubert oappend ("WORD PTR ");
127875796c8dcSSimon Schubert if (!(rex & REX_W))
127885796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
127895796c8dcSSimon Schubert break;
127905796c8dcSSimon Schubert case a_mode:
127915796c8dcSSimon Schubert if (sizeflag & DFLAG)
127925796c8dcSSimon Schubert oappend ("QWORD PTR ");
127935796c8dcSSimon Schubert else
127945796c8dcSSimon Schubert oappend ("DWORD PTR ");
127955796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
127965796c8dcSSimon Schubert break;
127975796c8dcSSimon Schubert case d_mode:
12798cf7f2e2dSJohn Marino case d_scalar_mode:
12799cf7f2e2dSJohn Marino case d_scalar_swap_mode:
128005796c8dcSSimon Schubert case d_swap_mode:
128015796c8dcSSimon Schubert case dqd_mode:
128025796c8dcSSimon Schubert oappend ("DWORD PTR ");
128035796c8dcSSimon Schubert break;
128045796c8dcSSimon Schubert case q_mode:
12805cf7f2e2dSJohn Marino case q_scalar_mode:
12806cf7f2e2dSJohn Marino case q_scalar_swap_mode:
128075796c8dcSSimon Schubert case q_swap_mode:
128085796c8dcSSimon Schubert oappend ("QWORD PTR ");
128095796c8dcSSimon Schubert break;
128105796c8dcSSimon Schubert case m_mode:
128115796c8dcSSimon Schubert if (address_mode == mode_64bit)
128125796c8dcSSimon Schubert oappend ("QWORD PTR ");
128135796c8dcSSimon Schubert else
128145796c8dcSSimon Schubert oappend ("DWORD PTR ");
128155796c8dcSSimon Schubert break;
128165796c8dcSSimon Schubert case f_mode:
128175796c8dcSSimon Schubert if (sizeflag & DFLAG)
128185796c8dcSSimon Schubert oappend ("FWORD PTR ");
128195796c8dcSSimon Schubert else
128205796c8dcSSimon Schubert oappend ("DWORD PTR ");
128215796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
128225796c8dcSSimon Schubert break;
128235796c8dcSSimon Schubert case t_mode:
128245796c8dcSSimon Schubert oappend ("TBYTE PTR ");
128255796c8dcSSimon Schubert break;
128265796c8dcSSimon Schubert case x_mode:
128275796c8dcSSimon Schubert case x_swap_mode:
128285796c8dcSSimon Schubert if (need_vex)
128295796c8dcSSimon Schubert {
128305796c8dcSSimon Schubert switch (vex.length)
128315796c8dcSSimon Schubert {
128325796c8dcSSimon Schubert case 128:
128335796c8dcSSimon Schubert oappend ("XMMWORD PTR ");
128345796c8dcSSimon Schubert break;
128355796c8dcSSimon Schubert case 256:
128365796c8dcSSimon Schubert oappend ("YMMWORD PTR ");
128375796c8dcSSimon Schubert break;
128385796c8dcSSimon Schubert default:
128395796c8dcSSimon Schubert abort ();
128405796c8dcSSimon Schubert }
128415796c8dcSSimon Schubert }
128425796c8dcSSimon Schubert else
128435796c8dcSSimon Schubert oappend ("XMMWORD PTR ");
128445796c8dcSSimon Schubert break;
128455796c8dcSSimon Schubert case xmm_mode:
128465796c8dcSSimon Schubert oappend ("XMMWORD PTR ");
128475796c8dcSSimon Schubert break;
128485796c8dcSSimon Schubert case xmmq_mode:
128495796c8dcSSimon Schubert if (!need_vex)
128505796c8dcSSimon Schubert abort ();
128515796c8dcSSimon Schubert
128525796c8dcSSimon Schubert switch (vex.length)
128535796c8dcSSimon Schubert {
128545796c8dcSSimon Schubert case 128:
128555796c8dcSSimon Schubert oappend ("QWORD PTR ");
128565796c8dcSSimon Schubert break;
128575796c8dcSSimon Schubert case 256:
128585796c8dcSSimon Schubert oappend ("XMMWORD PTR ");
128595796c8dcSSimon Schubert break;
128605796c8dcSSimon Schubert default:
128615796c8dcSSimon Schubert abort ();
128625796c8dcSSimon Schubert }
128635796c8dcSSimon Schubert break;
12864a45ae5f8SJohn Marino case xmm_mb_mode:
12865a45ae5f8SJohn Marino if (!need_vex)
12866a45ae5f8SJohn Marino abort ();
12867a45ae5f8SJohn Marino
12868a45ae5f8SJohn Marino switch (vex.length)
12869a45ae5f8SJohn Marino {
12870a45ae5f8SJohn Marino case 128:
12871a45ae5f8SJohn Marino case 256:
12872a45ae5f8SJohn Marino oappend ("BYTE PTR ");
12873a45ae5f8SJohn Marino break;
12874a45ae5f8SJohn Marino default:
12875a45ae5f8SJohn Marino abort ();
12876a45ae5f8SJohn Marino }
12877a45ae5f8SJohn Marino break;
12878a45ae5f8SJohn Marino case xmm_mw_mode:
12879a45ae5f8SJohn Marino if (!need_vex)
12880a45ae5f8SJohn Marino abort ();
12881a45ae5f8SJohn Marino
12882a45ae5f8SJohn Marino switch (vex.length)
12883a45ae5f8SJohn Marino {
12884a45ae5f8SJohn Marino case 128:
12885a45ae5f8SJohn Marino case 256:
12886a45ae5f8SJohn Marino oappend ("WORD PTR ");
12887a45ae5f8SJohn Marino break;
12888a45ae5f8SJohn Marino default:
12889a45ae5f8SJohn Marino abort ();
12890a45ae5f8SJohn Marino }
12891a45ae5f8SJohn Marino break;
12892a45ae5f8SJohn Marino case xmm_md_mode:
12893a45ae5f8SJohn Marino if (!need_vex)
12894a45ae5f8SJohn Marino abort ();
12895a45ae5f8SJohn Marino
12896a45ae5f8SJohn Marino switch (vex.length)
12897a45ae5f8SJohn Marino {
12898a45ae5f8SJohn Marino case 128:
12899a45ae5f8SJohn Marino case 256:
12900a45ae5f8SJohn Marino oappend ("DWORD PTR ");
12901a45ae5f8SJohn Marino break;
12902a45ae5f8SJohn Marino default:
12903a45ae5f8SJohn Marino abort ();
12904a45ae5f8SJohn Marino }
12905a45ae5f8SJohn Marino break;
12906a45ae5f8SJohn Marino case xmm_mq_mode:
12907a45ae5f8SJohn Marino if (!need_vex)
12908a45ae5f8SJohn Marino abort ();
12909a45ae5f8SJohn Marino
12910a45ae5f8SJohn Marino switch (vex.length)
12911a45ae5f8SJohn Marino {
12912a45ae5f8SJohn Marino case 128:
12913a45ae5f8SJohn Marino case 256:
12914a45ae5f8SJohn Marino oappend ("QWORD PTR ");
12915a45ae5f8SJohn Marino break;
12916a45ae5f8SJohn Marino default:
12917a45ae5f8SJohn Marino abort ();
12918a45ae5f8SJohn Marino }
12919a45ae5f8SJohn Marino break;
12920a45ae5f8SJohn Marino case xmmdw_mode:
12921a45ae5f8SJohn Marino if (!need_vex)
12922a45ae5f8SJohn Marino abort ();
12923a45ae5f8SJohn Marino
12924a45ae5f8SJohn Marino switch (vex.length)
12925a45ae5f8SJohn Marino {
12926a45ae5f8SJohn Marino case 128:
12927a45ae5f8SJohn Marino oappend ("WORD PTR ");
12928a45ae5f8SJohn Marino break;
12929a45ae5f8SJohn Marino case 256:
12930a45ae5f8SJohn Marino oappend ("DWORD PTR ");
12931a45ae5f8SJohn Marino break;
12932a45ae5f8SJohn Marino default:
12933a45ae5f8SJohn Marino abort ();
12934a45ae5f8SJohn Marino }
12935a45ae5f8SJohn Marino break;
12936a45ae5f8SJohn Marino case xmmqd_mode:
12937a45ae5f8SJohn Marino if (!need_vex)
12938a45ae5f8SJohn Marino abort ();
12939a45ae5f8SJohn Marino
12940a45ae5f8SJohn Marino switch (vex.length)
12941a45ae5f8SJohn Marino {
12942a45ae5f8SJohn Marino case 128:
12943a45ae5f8SJohn Marino oappend ("DWORD PTR ");
12944a45ae5f8SJohn Marino break;
12945a45ae5f8SJohn Marino case 256:
12946a45ae5f8SJohn Marino oappend ("QWORD PTR ");
12947a45ae5f8SJohn Marino break;
12948a45ae5f8SJohn Marino default:
12949a45ae5f8SJohn Marino abort ();
12950a45ae5f8SJohn Marino }
12951a45ae5f8SJohn Marino break;
129525796c8dcSSimon Schubert case ymmq_mode:
129535796c8dcSSimon Schubert if (!need_vex)
129545796c8dcSSimon Schubert abort ();
129555796c8dcSSimon Schubert
129565796c8dcSSimon Schubert switch (vex.length)
129575796c8dcSSimon Schubert {
129585796c8dcSSimon Schubert case 128:
129595796c8dcSSimon Schubert oappend ("QWORD PTR ");
129605796c8dcSSimon Schubert break;
129615796c8dcSSimon Schubert case 256:
129625796c8dcSSimon Schubert oappend ("YMMWORD PTR ");
129635796c8dcSSimon Schubert break;
129645796c8dcSSimon Schubert default:
129655796c8dcSSimon Schubert abort ();
129665796c8dcSSimon Schubert }
129675796c8dcSSimon Schubert break;
12968a45ae5f8SJohn Marino case ymmxmm_mode:
12969a45ae5f8SJohn Marino if (!need_vex)
12970a45ae5f8SJohn Marino abort ();
12971a45ae5f8SJohn Marino
12972a45ae5f8SJohn Marino switch (vex.length)
12973a45ae5f8SJohn Marino {
12974a45ae5f8SJohn Marino case 128:
12975a45ae5f8SJohn Marino case 256:
12976a45ae5f8SJohn Marino oappend ("XMMWORD PTR ");
12977a45ae5f8SJohn Marino break;
12978a45ae5f8SJohn Marino default:
12979a45ae5f8SJohn Marino abort ();
12980a45ae5f8SJohn Marino }
12981a45ae5f8SJohn Marino break;
129825796c8dcSSimon Schubert case o_mode:
129835796c8dcSSimon Schubert oappend ("OWORD PTR ");
129845796c8dcSSimon Schubert break;
129855796c8dcSSimon Schubert case vex_w_dq_mode:
12986cf7f2e2dSJohn Marino case vex_scalar_w_dq_mode:
12987a45ae5f8SJohn Marino case vex_vsib_d_w_dq_mode:
12988a45ae5f8SJohn Marino case vex_vsib_q_w_dq_mode:
129895796c8dcSSimon Schubert if (!need_vex)
129905796c8dcSSimon Schubert abort ();
129915796c8dcSSimon Schubert
129925796c8dcSSimon Schubert if (vex.w)
129935796c8dcSSimon Schubert oappend ("QWORD PTR ");
129945796c8dcSSimon Schubert else
129955796c8dcSSimon Schubert oappend ("DWORD PTR ");
129965796c8dcSSimon Schubert break;
129975796c8dcSSimon Schubert default:
129985796c8dcSSimon Schubert break;
129995796c8dcSSimon Schubert }
130005796c8dcSSimon Schubert }
130015796c8dcSSimon Schubert
130025796c8dcSSimon Schubert static void
OP_E_register(int bytemode,int sizeflag)130035796c8dcSSimon Schubert OP_E_register (int bytemode, int sizeflag)
130045796c8dcSSimon Schubert {
130055796c8dcSSimon Schubert int reg = modrm.rm;
130065796c8dcSSimon Schubert const char **names;
130075796c8dcSSimon Schubert
130085796c8dcSSimon Schubert USED_REX (REX_B);
130095796c8dcSSimon Schubert if ((rex & REX_B))
130105796c8dcSSimon Schubert reg += 8;
130115796c8dcSSimon Schubert
130125796c8dcSSimon Schubert if ((sizeflag & SUFFIX_ALWAYS)
130135796c8dcSSimon Schubert && (bytemode == b_swap_mode || bytemode == v_swap_mode))
130145796c8dcSSimon Schubert swap_operand ();
130155796c8dcSSimon Schubert
130165796c8dcSSimon Schubert switch (bytemode)
130175796c8dcSSimon Schubert {
130185796c8dcSSimon Schubert case b_mode:
130195796c8dcSSimon Schubert case b_swap_mode:
130205796c8dcSSimon Schubert USED_REX (0);
130215796c8dcSSimon Schubert if (rex)
130225796c8dcSSimon Schubert names = names8rex;
130235796c8dcSSimon Schubert else
130245796c8dcSSimon Schubert names = names8;
130255796c8dcSSimon Schubert break;
130265796c8dcSSimon Schubert case w_mode:
130275796c8dcSSimon Schubert names = names16;
130285796c8dcSSimon Schubert break;
130295796c8dcSSimon Schubert case d_mode:
130305796c8dcSSimon Schubert names = names32;
130315796c8dcSSimon Schubert break;
130325796c8dcSSimon Schubert case q_mode:
130335796c8dcSSimon Schubert names = names64;
130345796c8dcSSimon Schubert break;
130355796c8dcSSimon Schubert case m_mode:
130365796c8dcSSimon Schubert names = address_mode == mode_64bit ? names64 : names32;
130375796c8dcSSimon Schubert break;
130385796c8dcSSimon Schubert case stack_v_mode:
13039*ef5ccd6cSJohn Marino if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W)))
130405796c8dcSSimon Schubert {
130415796c8dcSSimon Schubert names = names64;
130425796c8dcSSimon Schubert break;
130435796c8dcSSimon Schubert }
130445796c8dcSSimon Schubert bytemode = v_mode;
130455796c8dcSSimon Schubert /* FALLTHRU */
130465796c8dcSSimon Schubert case v_mode:
130475796c8dcSSimon Schubert case v_swap_mode:
130485796c8dcSSimon Schubert case dq_mode:
130495796c8dcSSimon Schubert case dqb_mode:
130505796c8dcSSimon Schubert case dqd_mode:
130515796c8dcSSimon Schubert case dqw_mode:
130525796c8dcSSimon Schubert USED_REX (REX_W);
130535796c8dcSSimon Schubert if (rex & REX_W)
130545796c8dcSSimon Schubert names = names64;
13055cf7f2e2dSJohn Marino else
13056cf7f2e2dSJohn Marino {
13057cf7f2e2dSJohn Marino if ((sizeflag & DFLAG)
130585796c8dcSSimon Schubert || (bytemode != v_mode
130595796c8dcSSimon Schubert && bytemode != v_swap_mode))
130605796c8dcSSimon Schubert names = names32;
130615796c8dcSSimon Schubert else
130625796c8dcSSimon Schubert names = names16;
130635796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
13064cf7f2e2dSJohn Marino }
130655796c8dcSSimon Schubert break;
130665796c8dcSSimon Schubert case 0:
130675796c8dcSSimon Schubert return;
130685796c8dcSSimon Schubert default:
130695796c8dcSSimon Schubert oappend (INTERNAL_DISASSEMBLER_ERROR);
130705796c8dcSSimon Schubert return;
130715796c8dcSSimon Schubert }
130725796c8dcSSimon Schubert oappend (names[reg]);
130735796c8dcSSimon Schubert }
130745796c8dcSSimon Schubert
130755796c8dcSSimon Schubert static void
OP_E_memory(int bytemode,int sizeflag)130765796c8dcSSimon Schubert OP_E_memory (int bytemode, int sizeflag)
130775796c8dcSSimon Schubert {
130785796c8dcSSimon Schubert bfd_vma disp = 0;
130795796c8dcSSimon Schubert int add = (rex & REX_B) ? 8 : 0;
130805796c8dcSSimon Schubert int riprel = 0;
130815796c8dcSSimon Schubert
130825796c8dcSSimon Schubert USED_REX (REX_B);
130835796c8dcSSimon Schubert if (intel_syntax)
130845796c8dcSSimon Schubert intel_operand_size (bytemode, sizeflag);
130855796c8dcSSimon Schubert append_seg ();
130865796c8dcSSimon Schubert
130875796c8dcSSimon Schubert if ((sizeflag & AFLAG) || address_mode == mode_64bit)
130885796c8dcSSimon Schubert {
130895796c8dcSSimon Schubert /* 32/64 bit address mode */
130905796c8dcSSimon Schubert int havedisp;
130915796c8dcSSimon Schubert int havesib;
130925796c8dcSSimon Schubert int havebase;
130935796c8dcSSimon Schubert int haveindex;
130945796c8dcSSimon Schubert int needindex;
130955796c8dcSSimon Schubert int base, rbase;
13096cf7f2e2dSJohn Marino int vindex = 0;
130975796c8dcSSimon Schubert int scale = 0;
13098a45ae5f8SJohn Marino const char **indexes64 = names64;
13099a45ae5f8SJohn Marino const char **indexes32 = names32;
131005796c8dcSSimon Schubert
131015796c8dcSSimon Schubert havesib = 0;
131025796c8dcSSimon Schubert havebase = 1;
131035796c8dcSSimon Schubert haveindex = 0;
131045796c8dcSSimon Schubert base = modrm.rm;
131055796c8dcSSimon Schubert
131065796c8dcSSimon Schubert if (base == 4)
131075796c8dcSSimon Schubert {
131085796c8dcSSimon Schubert havesib = 1;
13109cf7f2e2dSJohn Marino vindex = sib.index;
131105796c8dcSSimon Schubert USED_REX (REX_X);
131115796c8dcSSimon Schubert if (rex & REX_X)
13112cf7f2e2dSJohn Marino vindex += 8;
13113a45ae5f8SJohn Marino switch (bytemode)
13114a45ae5f8SJohn Marino {
13115a45ae5f8SJohn Marino case vex_vsib_d_w_dq_mode:
13116a45ae5f8SJohn Marino case vex_vsib_q_w_dq_mode:
13117a45ae5f8SJohn Marino if (!need_vex)
13118a45ae5f8SJohn Marino abort ();
13119a45ae5f8SJohn Marino
13120a45ae5f8SJohn Marino haveindex = 1;
13121a45ae5f8SJohn Marino switch (vex.length)
13122a45ae5f8SJohn Marino {
13123a45ae5f8SJohn Marino case 128:
13124a45ae5f8SJohn Marino indexes64 = indexes32 = names_xmm;
13125a45ae5f8SJohn Marino break;
13126a45ae5f8SJohn Marino case 256:
13127a45ae5f8SJohn Marino if (!vex.w || bytemode == vex_vsib_q_w_dq_mode)
13128a45ae5f8SJohn Marino indexes64 = indexes32 = names_ymm;
13129a45ae5f8SJohn Marino else
13130a45ae5f8SJohn Marino indexes64 = indexes32 = names_xmm;
13131a45ae5f8SJohn Marino break;
13132a45ae5f8SJohn Marino default:
13133a45ae5f8SJohn Marino abort ();
13134a45ae5f8SJohn Marino }
13135a45ae5f8SJohn Marino break;
13136a45ae5f8SJohn Marino default:
13137cf7f2e2dSJohn Marino haveindex = vindex != 4;
13138a45ae5f8SJohn Marino break;
13139a45ae5f8SJohn Marino }
13140a45ae5f8SJohn Marino scale = sib.scale;
13141a45ae5f8SJohn Marino base = sib.base;
131425796c8dcSSimon Schubert codep++;
131435796c8dcSSimon Schubert }
131445796c8dcSSimon Schubert rbase = base + add;
131455796c8dcSSimon Schubert
131465796c8dcSSimon Schubert switch (modrm.mod)
131475796c8dcSSimon Schubert {
131485796c8dcSSimon Schubert case 0:
131495796c8dcSSimon Schubert if (base == 5)
131505796c8dcSSimon Schubert {
131515796c8dcSSimon Schubert havebase = 0;
131525796c8dcSSimon Schubert if (address_mode == mode_64bit && !havesib)
131535796c8dcSSimon Schubert riprel = 1;
131545796c8dcSSimon Schubert disp = get32s ();
131555796c8dcSSimon Schubert }
131565796c8dcSSimon Schubert break;
131575796c8dcSSimon Schubert case 1:
131585796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
131595796c8dcSSimon Schubert disp = *codep++;
131605796c8dcSSimon Schubert if ((disp & 0x80) != 0)
131615796c8dcSSimon Schubert disp -= 0x100;
131625796c8dcSSimon Schubert break;
131635796c8dcSSimon Schubert case 2:
131645796c8dcSSimon Schubert disp = get32s ();
131655796c8dcSSimon Schubert break;
131665796c8dcSSimon Schubert }
131675796c8dcSSimon Schubert
131685796c8dcSSimon Schubert /* In 32bit mode, we need index register to tell [offset] from
131695796c8dcSSimon Schubert [eiz*1 + offset]. */
131705796c8dcSSimon Schubert needindex = (havesib
131715796c8dcSSimon Schubert && !havebase
131725796c8dcSSimon Schubert && !haveindex
131735796c8dcSSimon Schubert && address_mode == mode_32bit);
131745796c8dcSSimon Schubert havedisp = (havebase
131755796c8dcSSimon Schubert || needindex
131765796c8dcSSimon Schubert || (havesib && (haveindex || scale != 0)));
131775796c8dcSSimon Schubert
131785796c8dcSSimon Schubert if (!intel_syntax)
131795796c8dcSSimon Schubert if (modrm.mod != 0 || base == 5)
131805796c8dcSSimon Schubert {
131815796c8dcSSimon Schubert if (havedisp || riprel)
131825796c8dcSSimon Schubert print_displacement (scratchbuf, disp);
131835796c8dcSSimon Schubert else
131845796c8dcSSimon Schubert print_operand_value (scratchbuf, 1, disp);
131855796c8dcSSimon Schubert oappend (scratchbuf);
131865796c8dcSSimon Schubert if (riprel)
131875796c8dcSSimon Schubert {
131885796c8dcSSimon Schubert set_op (disp, 1);
131895796c8dcSSimon Schubert oappend (sizeflag & AFLAG ? "(%rip)" : "(%eip)");
131905796c8dcSSimon Schubert }
131915796c8dcSSimon Schubert }
131925796c8dcSSimon Schubert
131935796c8dcSSimon Schubert if (havebase || haveindex || riprel)
131945796c8dcSSimon Schubert used_prefixes |= PREFIX_ADDR;
131955796c8dcSSimon Schubert
131965796c8dcSSimon Schubert if (havedisp || (intel_syntax && riprel))
131975796c8dcSSimon Schubert {
131985796c8dcSSimon Schubert *obufp++ = open_char;
131995796c8dcSSimon Schubert if (intel_syntax && riprel)
132005796c8dcSSimon Schubert {
132015796c8dcSSimon Schubert set_op (disp, 1);
132025796c8dcSSimon Schubert oappend (sizeflag & AFLAG ? "rip" : "eip");
132035796c8dcSSimon Schubert }
132045796c8dcSSimon Schubert *obufp = '\0';
132055796c8dcSSimon Schubert if (havebase)
132065796c8dcSSimon Schubert oappend (address_mode == mode_64bit && (sizeflag & AFLAG)
132075796c8dcSSimon Schubert ? names64[rbase] : names32[rbase]);
132085796c8dcSSimon Schubert if (havesib)
132095796c8dcSSimon Schubert {
132105796c8dcSSimon Schubert /* ESP/RSP won't allow index. If base isn't ESP/RSP,
132115796c8dcSSimon Schubert print index to tell base + index from base. */
132125796c8dcSSimon Schubert if (scale != 0
132135796c8dcSSimon Schubert || needindex
132145796c8dcSSimon Schubert || haveindex
132155796c8dcSSimon Schubert || (havebase && base != ESP_REG_NUM))
132165796c8dcSSimon Schubert {
132175796c8dcSSimon Schubert if (!intel_syntax || havebase)
132185796c8dcSSimon Schubert {
132195796c8dcSSimon Schubert *obufp++ = separator_char;
132205796c8dcSSimon Schubert *obufp = '\0';
132215796c8dcSSimon Schubert }
132225796c8dcSSimon Schubert if (haveindex)
132235796c8dcSSimon Schubert oappend (address_mode == mode_64bit
132245796c8dcSSimon Schubert && (sizeflag & AFLAG)
13225a45ae5f8SJohn Marino ? indexes64[vindex] : indexes32[vindex]);
132265796c8dcSSimon Schubert else
132275796c8dcSSimon Schubert oappend (address_mode == mode_64bit
132285796c8dcSSimon Schubert && (sizeflag & AFLAG)
132295796c8dcSSimon Schubert ? index64 : index32);
132305796c8dcSSimon Schubert
132315796c8dcSSimon Schubert *obufp++ = scale_char;
132325796c8dcSSimon Schubert *obufp = '\0';
132335796c8dcSSimon Schubert sprintf (scratchbuf, "%d", 1 << scale);
132345796c8dcSSimon Schubert oappend (scratchbuf);
132355796c8dcSSimon Schubert }
132365796c8dcSSimon Schubert }
132375796c8dcSSimon Schubert if (intel_syntax
132385796c8dcSSimon Schubert && (disp || modrm.mod != 0 || base == 5))
132395796c8dcSSimon Schubert {
132405796c8dcSSimon Schubert if (!havedisp || (bfd_signed_vma) disp >= 0)
132415796c8dcSSimon Schubert {
132425796c8dcSSimon Schubert *obufp++ = '+';
132435796c8dcSSimon Schubert *obufp = '\0';
132445796c8dcSSimon Schubert }
132455796c8dcSSimon Schubert else if (modrm.mod != 1 && disp != -disp)
132465796c8dcSSimon Schubert {
132475796c8dcSSimon Schubert *obufp++ = '-';
132485796c8dcSSimon Schubert *obufp = '\0';
132495796c8dcSSimon Schubert disp = - (bfd_signed_vma) disp;
132505796c8dcSSimon Schubert }
132515796c8dcSSimon Schubert
132525796c8dcSSimon Schubert if (havedisp)
132535796c8dcSSimon Schubert print_displacement (scratchbuf, disp);
132545796c8dcSSimon Schubert else
132555796c8dcSSimon Schubert print_operand_value (scratchbuf, 1, disp);
132565796c8dcSSimon Schubert oappend (scratchbuf);
132575796c8dcSSimon Schubert }
132585796c8dcSSimon Schubert
132595796c8dcSSimon Schubert *obufp++ = close_char;
132605796c8dcSSimon Schubert *obufp = '\0';
132615796c8dcSSimon Schubert }
132625796c8dcSSimon Schubert else if (intel_syntax)
132635796c8dcSSimon Schubert {
132645796c8dcSSimon Schubert if (modrm.mod != 0 || base == 5)
132655796c8dcSSimon Schubert {
132665796c8dcSSimon Schubert if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
132675796c8dcSSimon Schubert | PREFIX_ES | PREFIX_FS | PREFIX_GS))
132685796c8dcSSimon Schubert ;
132695796c8dcSSimon Schubert else
132705796c8dcSSimon Schubert {
132715796c8dcSSimon Schubert oappend (names_seg[ds_reg - es_reg]);
132725796c8dcSSimon Schubert oappend (":");
132735796c8dcSSimon Schubert }
132745796c8dcSSimon Schubert print_operand_value (scratchbuf, 1, disp);
132755796c8dcSSimon Schubert oappend (scratchbuf);
132765796c8dcSSimon Schubert }
132775796c8dcSSimon Schubert }
132785796c8dcSSimon Schubert }
132795796c8dcSSimon Schubert else
13280cf7f2e2dSJohn Marino {
13281cf7f2e2dSJohn Marino /* 16 bit address mode */
13282cf7f2e2dSJohn Marino used_prefixes |= prefixes & PREFIX_ADDR;
132835796c8dcSSimon Schubert switch (modrm.mod)
132845796c8dcSSimon Schubert {
132855796c8dcSSimon Schubert case 0:
132865796c8dcSSimon Schubert if (modrm.rm == 6)
132875796c8dcSSimon Schubert {
132885796c8dcSSimon Schubert disp = get16 ();
132895796c8dcSSimon Schubert if ((disp & 0x8000) != 0)
132905796c8dcSSimon Schubert disp -= 0x10000;
132915796c8dcSSimon Schubert }
132925796c8dcSSimon Schubert break;
132935796c8dcSSimon Schubert case 1:
132945796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
132955796c8dcSSimon Schubert disp = *codep++;
132965796c8dcSSimon Schubert if ((disp & 0x80) != 0)
132975796c8dcSSimon Schubert disp -= 0x100;
132985796c8dcSSimon Schubert break;
132995796c8dcSSimon Schubert case 2:
133005796c8dcSSimon Schubert disp = get16 ();
133015796c8dcSSimon Schubert if ((disp & 0x8000) != 0)
133025796c8dcSSimon Schubert disp -= 0x10000;
133035796c8dcSSimon Schubert break;
133045796c8dcSSimon Schubert }
133055796c8dcSSimon Schubert
133065796c8dcSSimon Schubert if (!intel_syntax)
133075796c8dcSSimon Schubert if (modrm.mod != 0 || modrm.rm == 6)
133085796c8dcSSimon Schubert {
133095796c8dcSSimon Schubert print_displacement (scratchbuf, disp);
133105796c8dcSSimon Schubert oappend (scratchbuf);
133115796c8dcSSimon Schubert }
133125796c8dcSSimon Schubert
133135796c8dcSSimon Schubert if (modrm.mod != 0 || modrm.rm != 6)
133145796c8dcSSimon Schubert {
133155796c8dcSSimon Schubert *obufp++ = open_char;
133165796c8dcSSimon Schubert *obufp = '\0';
133175796c8dcSSimon Schubert oappend (index16[modrm.rm]);
133185796c8dcSSimon Schubert if (intel_syntax
133195796c8dcSSimon Schubert && (disp || modrm.mod != 0 || modrm.rm == 6))
133205796c8dcSSimon Schubert {
133215796c8dcSSimon Schubert if ((bfd_signed_vma) disp >= 0)
133225796c8dcSSimon Schubert {
133235796c8dcSSimon Schubert *obufp++ = '+';
133245796c8dcSSimon Schubert *obufp = '\0';
133255796c8dcSSimon Schubert }
133265796c8dcSSimon Schubert else if (modrm.mod != 1)
133275796c8dcSSimon Schubert {
133285796c8dcSSimon Schubert *obufp++ = '-';
133295796c8dcSSimon Schubert *obufp = '\0';
133305796c8dcSSimon Schubert disp = - (bfd_signed_vma) disp;
133315796c8dcSSimon Schubert }
133325796c8dcSSimon Schubert
133335796c8dcSSimon Schubert print_displacement (scratchbuf, disp);
133345796c8dcSSimon Schubert oappend (scratchbuf);
133355796c8dcSSimon Schubert }
133365796c8dcSSimon Schubert
133375796c8dcSSimon Schubert *obufp++ = close_char;
133385796c8dcSSimon Schubert *obufp = '\0';
133395796c8dcSSimon Schubert }
133405796c8dcSSimon Schubert else if (intel_syntax)
133415796c8dcSSimon Schubert {
133425796c8dcSSimon Schubert if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
133435796c8dcSSimon Schubert | PREFIX_ES | PREFIX_FS | PREFIX_GS))
133445796c8dcSSimon Schubert ;
133455796c8dcSSimon Schubert else
133465796c8dcSSimon Schubert {
133475796c8dcSSimon Schubert oappend (names_seg[ds_reg - es_reg]);
133485796c8dcSSimon Schubert oappend (":");
133495796c8dcSSimon Schubert }
133505796c8dcSSimon Schubert print_operand_value (scratchbuf, 1, disp & 0xffff);
133515796c8dcSSimon Schubert oappend (scratchbuf);
133525796c8dcSSimon Schubert }
133535796c8dcSSimon Schubert }
133545796c8dcSSimon Schubert }
133555796c8dcSSimon Schubert
133565796c8dcSSimon Schubert static void
OP_E(int bytemode,int sizeflag)13357cf7f2e2dSJohn Marino OP_E (int bytemode, int sizeflag)
133585796c8dcSSimon Schubert {
133595796c8dcSSimon Schubert /* Skip mod/rm byte. */
133605796c8dcSSimon Schubert MODRM_CHECK;
133615796c8dcSSimon Schubert codep++;
133625796c8dcSSimon Schubert
133635796c8dcSSimon Schubert if (modrm.mod == 3)
133645796c8dcSSimon Schubert OP_E_register (bytemode, sizeflag);
133655796c8dcSSimon Schubert else
133665796c8dcSSimon Schubert OP_E_memory (bytemode, sizeflag);
133675796c8dcSSimon Schubert }
133685796c8dcSSimon Schubert
133695796c8dcSSimon Schubert static void
OP_G(int bytemode,int sizeflag)133705796c8dcSSimon Schubert OP_G (int bytemode, int sizeflag)
133715796c8dcSSimon Schubert {
133725796c8dcSSimon Schubert int add = 0;
133735796c8dcSSimon Schubert USED_REX (REX_R);
133745796c8dcSSimon Schubert if (rex & REX_R)
133755796c8dcSSimon Schubert add += 8;
133765796c8dcSSimon Schubert switch (bytemode)
133775796c8dcSSimon Schubert {
133785796c8dcSSimon Schubert case b_mode:
133795796c8dcSSimon Schubert USED_REX (0);
133805796c8dcSSimon Schubert if (rex)
133815796c8dcSSimon Schubert oappend (names8rex[modrm.reg + add]);
133825796c8dcSSimon Schubert else
133835796c8dcSSimon Schubert oappend (names8[modrm.reg + add]);
133845796c8dcSSimon Schubert break;
133855796c8dcSSimon Schubert case w_mode:
133865796c8dcSSimon Schubert oappend (names16[modrm.reg + add]);
133875796c8dcSSimon Schubert break;
133885796c8dcSSimon Schubert case d_mode:
133895796c8dcSSimon Schubert oappend (names32[modrm.reg + add]);
133905796c8dcSSimon Schubert break;
133915796c8dcSSimon Schubert case q_mode:
133925796c8dcSSimon Schubert oappend (names64[modrm.reg + add]);
133935796c8dcSSimon Schubert break;
133945796c8dcSSimon Schubert case v_mode:
133955796c8dcSSimon Schubert case dq_mode:
133965796c8dcSSimon Schubert case dqb_mode:
133975796c8dcSSimon Schubert case dqd_mode:
133985796c8dcSSimon Schubert case dqw_mode:
133995796c8dcSSimon Schubert USED_REX (REX_W);
134005796c8dcSSimon Schubert if (rex & REX_W)
134015796c8dcSSimon Schubert oappend (names64[modrm.reg + add]);
13402cf7f2e2dSJohn Marino else
13403cf7f2e2dSJohn Marino {
13404cf7f2e2dSJohn Marino if ((sizeflag & DFLAG) || bytemode != v_mode)
134055796c8dcSSimon Schubert oappend (names32[modrm.reg + add]);
134065796c8dcSSimon Schubert else
134075796c8dcSSimon Schubert oappend (names16[modrm.reg + add]);
134085796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
13409cf7f2e2dSJohn Marino }
134105796c8dcSSimon Schubert break;
134115796c8dcSSimon Schubert case m_mode:
134125796c8dcSSimon Schubert if (address_mode == mode_64bit)
134135796c8dcSSimon Schubert oappend (names64[modrm.reg + add]);
134145796c8dcSSimon Schubert else
134155796c8dcSSimon Schubert oappend (names32[modrm.reg + add]);
134165796c8dcSSimon Schubert break;
134175796c8dcSSimon Schubert default:
134185796c8dcSSimon Schubert oappend (INTERNAL_DISASSEMBLER_ERROR);
134195796c8dcSSimon Schubert break;
134205796c8dcSSimon Schubert }
134215796c8dcSSimon Schubert }
134225796c8dcSSimon Schubert
134235796c8dcSSimon Schubert static bfd_vma
get64(void)134245796c8dcSSimon Schubert get64 (void)
134255796c8dcSSimon Schubert {
134265796c8dcSSimon Schubert bfd_vma x;
134275796c8dcSSimon Schubert #ifdef BFD64
134285796c8dcSSimon Schubert unsigned int a;
134295796c8dcSSimon Schubert unsigned int b;
134305796c8dcSSimon Schubert
134315796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 8);
134325796c8dcSSimon Schubert a = *codep++ & 0xff;
134335796c8dcSSimon Schubert a |= (*codep++ & 0xff) << 8;
134345796c8dcSSimon Schubert a |= (*codep++ & 0xff) << 16;
134355796c8dcSSimon Schubert a |= (*codep++ & 0xff) << 24;
134365796c8dcSSimon Schubert b = *codep++ & 0xff;
134375796c8dcSSimon Schubert b |= (*codep++ & 0xff) << 8;
134385796c8dcSSimon Schubert b |= (*codep++ & 0xff) << 16;
134395796c8dcSSimon Schubert b |= (*codep++ & 0xff) << 24;
134405796c8dcSSimon Schubert x = a + ((bfd_vma) b << 32);
134415796c8dcSSimon Schubert #else
134425796c8dcSSimon Schubert abort ();
134435796c8dcSSimon Schubert x = 0;
134445796c8dcSSimon Schubert #endif
134455796c8dcSSimon Schubert return x;
134465796c8dcSSimon Schubert }
134475796c8dcSSimon Schubert
134485796c8dcSSimon Schubert static bfd_signed_vma
get32(void)134495796c8dcSSimon Schubert get32 (void)
134505796c8dcSSimon Schubert {
134515796c8dcSSimon Schubert bfd_signed_vma x = 0;
134525796c8dcSSimon Schubert
134535796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 4);
134545796c8dcSSimon Schubert x = *codep++ & (bfd_signed_vma) 0xff;
134555796c8dcSSimon Schubert x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
134565796c8dcSSimon Schubert x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
134575796c8dcSSimon Schubert x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
134585796c8dcSSimon Schubert return x;
134595796c8dcSSimon Schubert }
134605796c8dcSSimon Schubert
134615796c8dcSSimon Schubert static bfd_signed_vma
get32s(void)134625796c8dcSSimon Schubert get32s (void)
134635796c8dcSSimon Schubert {
134645796c8dcSSimon Schubert bfd_signed_vma x = 0;
134655796c8dcSSimon Schubert
134665796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 4);
134675796c8dcSSimon Schubert x = *codep++ & (bfd_signed_vma) 0xff;
134685796c8dcSSimon Schubert x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
134695796c8dcSSimon Schubert x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
134705796c8dcSSimon Schubert x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
134715796c8dcSSimon Schubert
134725796c8dcSSimon Schubert x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
134735796c8dcSSimon Schubert
134745796c8dcSSimon Schubert return x;
134755796c8dcSSimon Schubert }
134765796c8dcSSimon Schubert
134775796c8dcSSimon Schubert static int
get16(void)134785796c8dcSSimon Schubert get16 (void)
134795796c8dcSSimon Schubert {
134805796c8dcSSimon Schubert int x = 0;
134815796c8dcSSimon Schubert
134825796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 2);
134835796c8dcSSimon Schubert x = *codep++ & 0xff;
134845796c8dcSSimon Schubert x |= (*codep++ & 0xff) << 8;
134855796c8dcSSimon Schubert return x;
134865796c8dcSSimon Schubert }
134875796c8dcSSimon Schubert
134885796c8dcSSimon Schubert static void
set_op(bfd_vma op,int riprel)134895796c8dcSSimon Schubert set_op (bfd_vma op, int riprel)
134905796c8dcSSimon Schubert {
134915796c8dcSSimon Schubert op_index[op_ad] = op_ad;
134925796c8dcSSimon Schubert if (address_mode == mode_64bit)
134935796c8dcSSimon Schubert {
134945796c8dcSSimon Schubert op_address[op_ad] = op;
134955796c8dcSSimon Schubert op_riprel[op_ad] = riprel;
134965796c8dcSSimon Schubert }
134975796c8dcSSimon Schubert else
134985796c8dcSSimon Schubert {
134995796c8dcSSimon Schubert /* Mask to get a 32-bit address. */
135005796c8dcSSimon Schubert op_address[op_ad] = op & 0xffffffff;
135015796c8dcSSimon Schubert op_riprel[op_ad] = riprel & 0xffffffff;
135025796c8dcSSimon Schubert }
135035796c8dcSSimon Schubert }
135045796c8dcSSimon Schubert
135055796c8dcSSimon Schubert static void
OP_REG(int code,int sizeflag)135065796c8dcSSimon Schubert OP_REG (int code, int sizeflag)
135075796c8dcSSimon Schubert {
135085796c8dcSSimon Schubert const char *s;
135095796c8dcSSimon Schubert int add;
13510*ef5ccd6cSJohn Marino
13511*ef5ccd6cSJohn Marino switch (code)
13512*ef5ccd6cSJohn Marino {
13513*ef5ccd6cSJohn Marino case es_reg: case ss_reg: case cs_reg:
13514*ef5ccd6cSJohn Marino case ds_reg: case fs_reg: case gs_reg:
13515*ef5ccd6cSJohn Marino oappend (names_seg[code - es_reg]);
13516*ef5ccd6cSJohn Marino return;
13517*ef5ccd6cSJohn Marino }
13518*ef5ccd6cSJohn Marino
135195796c8dcSSimon Schubert USED_REX (REX_B);
135205796c8dcSSimon Schubert if (rex & REX_B)
135215796c8dcSSimon Schubert add = 8;
135225796c8dcSSimon Schubert else
135235796c8dcSSimon Schubert add = 0;
135245796c8dcSSimon Schubert
135255796c8dcSSimon Schubert switch (code)
135265796c8dcSSimon Schubert {
135275796c8dcSSimon Schubert case ax_reg: case cx_reg: case dx_reg: case bx_reg:
135285796c8dcSSimon Schubert case sp_reg: case bp_reg: case si_reg: case di_reg:
135295796c8dcSSimon Schubert s = names16[code - ax_reg + add];
135305796c8dcSSimon Schubert break;
135315796c8dcSSimon Schubert case al_reg: case ah_reg: case cl_reg: case ch_reg:
135325796c8dcSSimon Schubert case dl_reg: case dh_reg: case bl_reg: case bh_reg:
135335796c8dcSSimon Schubert USED_REX (0);
135345796c8dcSSimon Schubert if (rex)
135355796c8dcSSimon Schubert s = names8rex[code - al_reg + add];
135365796c8dcSSimon Schubert else
135375796c8dcSSimon Schubert s = names8[code - al_reg];
135385796c8dcSSimon Schubert break;
135395796c8dcSSimon Schubert case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
135405796c8dcSSimon Schubert case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
13541*ef5ccd6cSJohn Marino if (address_mode == mode_64bit
13542*ef5ccd6cSJohn Marino && ((sizeflag & DFLAG) || (rex & REX_W)))
135435796c8dcSSimon Schubert {
135445796c8dcSSimon Schubert s = names64[code - rAX_reg + add];
135455796c8dcSSimon Schubert break;
135465796c8dcSSimon Schubert }
135475796c8dcSSimon Schubert code += eAX_reg - rAX_reg;
135485796c8dcSSimon Schubert /* Fall through. */
135495796c8dcSSimon Schubert case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
135505796c8dcSSimon Schubert case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
135515796c8dcSSimon Schubert USED_REX (REX_W);
135525796c8dcSSimon Schubert if (rex & REX_W)
135535796c8dcSSimon Schubert s = names64[code - eAX_reg + add];
13554cf7f2e2dSJohn Marino else
13555cf7f2e2dSJohn Marino {
13556cf7f2e2dSJohn Marino if (sizeflag & DFLAG)
135575796c8dcSSimon Schubert s = names32[code - eAX_reg + add];
135585796c8dcSSimon Schubert else
135595796c8dcSSimon Schubert s = names16[code - eAX_reg + add];
135605796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
13561cf7f2e2dSJohn Marino }
135625796c8dcSSimon Schubert break;
135635796c8dcSSimon Schubert default:
135645796c8dcSSimon Schubert s = INTERNAL_DISASSEMBLER_ERROR;
135655796c8dcSSimon Schubert break;
135665796c8dcSSimon Schubert }
135675796c8dcSSimon Schubert oappend (s);
135685796c8dcSSimon Schubert }
135695796c8dcSSimon Schubert
135705796c8dcSSimon Schubert static void
OP_IMREG(int code,int sizeflag)135715796c8dcSSimon Schubert OP_IMREG (int code, int sizeflag)
135725796c8dcSSimon Schubert {
135735796c8dcSSimon Schubert const char *s;
135745796c8dcSSimon Schubert
135755796c8dcSSimon Schubert switch (code)
135765796c8dcSSimon Schubert {
135775796c8dcSSimon Schubert case indir_dx_reg:
135785796c8dcSSimon Schubert if (intel_syntax)
135795796c8dcSSimon Schubert s = "dx";
135805796c8dcSSimon Schubert else
135815796c8dcSSimon Schubert s = "(%dx)";
135825796c8dcSSimon Schubert break;
135835796c8dcSSimon Schubert case ax_reg: case cx_reg: case dx_reg: case bx_reg:
135845796c8dcSSimon Schubert case sp_reg: case bp_reg: case si_reg: case di_reg:
135855796c8dcSSimon Schubert s = names16[code - ax_reg];
135865796c8dcSSimon Schubert break;
135875796c8dcSSimon Schubert case es_reg: case ss_reg: case cs_reg:
135885796c8dcSSimon Schubert case ds_reg: case fs_reg: case gs_reg:
135895796c8dcSSimon Schubert s = names_seg[code - es_reg];
135905796c8dcSSimon Schubert break;
135915796c8dcSSimon Schubert case al_reg: case ah_reg: case cl_reg: case ch_reg:
135925796c8dcSSimon Schubert case dl_reg: case dh_reg: case bl_reg: case bh_reg:
135935796c8dcSSimon Schubert USED_REX (0);
135945796c8dcSSimon Schubert if (rex)
135955796c8dcSSimon Schubert s = names8rex[code - al_reg];
135965796c8dcSSimon Schubert else
135975796c8dcSSimon Schubert s = names8[code - al_reg];
135985796c8dcSSimon Schubert break;
135995796c8dcSSimon Schubert case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
136005796c8dcSSimon Schubert case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
136015796c8dcSSimon Schubert USED_REX (REX_W);
136025796c8dcSSimon Schubert if (rex & REX_W)
136035796c8dcSSimon Schubert s = names64[code - eAX_reg];
13604cf7f2e2dSJohn Marino else
13605cf7f2e2dSJohn Marino {
13606cf7f2e2dSJohn Marino if (sizeflag & DFLAG)
136075796c8dcSSimon Schubert s = names32[code - eAX_reg];
136085796c8dcSSimon Schubert else
136095796c8dcSSimon Schubert s = names16[code - eAX_reg];
136105796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
13611cf7f2e2dSJohn Marino }
136125796c8dcSSimon Schubert break;
136135796c8dcSSimon Schubert case z_mode_ax_reg:
136145796c8dcSSimon Schubert if ((rex & REX_W) || (sizeflag & DFLAG))
136155796c8dcSSimon Schubert s = *names32;
136165796c8dcSSimon Schubert else
136175796c8dcSSimon Schubert s = *names16;
136185796c8dcSSimon Schubert if (!(rex & REX_W))
136195796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
136205796c8dcSSimon Schubert break;
136215796c8dcSSimon Schubert default:
136225796c8dcSSimon Schubert s = INTERNAL_DISASSEMBLER_ERROR;
136235796c8dcSSimon Schubert break;
136245796c8dcSSimon Schubert }
136255796c8dcSSimon Schubert oappend (s);
136265796c8dcSSimon Schubert }
136275796c8dcSSimon Schubert
136285796c8dcSSimon Schubert static void
OP_I(int bytemode,int sizeflag)136295796c8dcSSimon Schubert OP_I (int bytemode, int sizeflag)
136305796c8dcSSimon Schubert {
136315796c8dcSSimon Schubert bfd_signed_vma op;
136325796c8dcSSimon Schubert bfd_signed_vma mask = -1;
136335796c8dcSSimon Schubert
136345796c8dcSSimon Schubert switch (bytemode)
136355796c8dcSSimon Schubert {
136365796c8dcSSimon Schubert case b_mode:
136375796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
136385796c8dcSSimon Schubert op = *codep++;
136395796c8dcSSimon Schubert mask = 0xff;
136405796c8dcSSimon Schubert break;
136415796c8dcSSimon Schubert case q_mode:
136425796c8dcSSimon Schubert if (address_mode == mode_64bit)
136435796c8dcSSimon Schubert {
136445796c8dcSSimon Schubert op = get32s ();
136455796c8dcSSimon Schubert break;
136465796c8dcSSimon Schubert }
136475796c8dcSSimon Schubert /* Fall through. */
136485796c8dcSSimon Schubert case v_mode:
136495796c8dcSSimon Schubert USED_REX (REX_W);
136505796c8dcSSimon Schubert if (rex & REX_W)
136515796c8dcSSimon Schubert op = get32s ();
13652cf7f2e2dSJohn Marino else
13653cf7f2e2dSJohn Marino {
13654cf7f2e2dSJohn Marino if (sizeflag & DFLAG)
136555796c8dcSSimon Schubert {
136565796c8dcSSimon Schubert op = get32 ();
136575796c8dcSSimon Schubert mask = 0xffffffff;
136585796c8dcSSimon Schubert }
136595796c8dcSSimon Schubert else
136605796c8dcSSimon Schubert {
136615796c8dcSSimon Schubert op = get16 ();
136625796c8dcSSimon Schubert mask = 0xfffff;
136635796c8dcSSimon Schubert }
136645796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
13665cf7f2e2dSJohn Marino }
136665796c8dcSSimon Schubert break;
136675796c8dcSSimon Schubert case w_mode:
136685796c8dcSSimon Schubert mask = 0xfffff;
136695796c8dcSSimon Schubert op = get16 ();
136705796c8dcSSimon Schubert break;
136715796c8dcSSimon Schubert case const_1_mode:
136725796c8dcSSimon Schubert if (intel_syntax)
136735796c8dcSSimon Schubert oappend ("1");
136745796c8dcSSimon Schubert return;
136755796c8dcSSimon Schubert default:
136765796c8dcSSimon Schubert oappend (INTERNAL_DISASSEMBLER_ERROR);
136775796c8dcSSimon Schubert return;
136785796c8dcSSimon Schubert }
136795796c8dcSSimon Schubert
136805796c8dcSSimon Schubert op &= mask;
136815796c8dcSSimon Schubert scratchbuf[0] = '$';
136825796c8dcSSimon Schubert print_operand_value (scratchbuf + 1, 1, op);
136835796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
136845796c8dcSSimon Schubert scratchbuf[0] = '\0';
136855796c8dcSSimon Schubert }
136865796c8dcSSimon Schubert
136875796c8dcSSimon Schubert static void
OP_I64(int bytemode,int sizeflag)136885796c8dcSSimon Schubert OP_I64 (int bytemode, int sizeflag)
136895796c8dcSSimon Schubert {
136905796c8dcSSimon Schubert bfd_signed_vma op;
136915796c8dcSSimon Schubert bfd_signed_vma mask = -1;
136925796c8dcSSimon Schubert
136935796c8dcSSimon Schubert if (address_mode != mode_64bit)
136945796c8dcSSimon Schubert {
136955796c8dcSSimon Schubert OP_I (bytemode, sizeflag);
136965796c8dcSSimon Schubert return;
136975796c8dcSSimon Schubert }
136985796c8dcSSimon Schubert
136995796c8dcSSimon Schubert switch (bytemode)
137005796c8dcSSimon Schubert {
137015796c8dcSSimon Schubert case b_mode:
137025796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
137035796c8dcSSimon Schubert op = *codep++;
137045796c8dcSSimon Schubert mask = 0xff;
137055796c8dcSSimon Schubert break;
137065796c8dcSSimon Schubert case v_mode:
137075796c8dcSSimon Schubert USED_REX (REX_W);
137085796c8dcSSimon Schubert if (rex & REX_W)
137095796c8dcSSimon Schubert op = get64 ();
13710cf7f2e2dSJohn Marino else
13711cf7f2e2dSJohn Marino {
13712cf7f2e2dSJohn Marino if (sizeflag & DFLAG)
137135796c8dcSSimon Schubert {
137145796c8dcSSimon Schubert op = get32 ();
137155796c8dcSSimon Schubert mask = 0xffffffff;
137165796c8dcSSimon Schubert }
137175796c8dcSSimon Schubert else
137185796c8dcSSimon Schubert {
137195796c8dcSSimon Schubert op = get16 ();
137205796c8dcSSimon Schubert mask = 0xfffff;
137215796c8dcSSimon Schubert }
137225796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
13723cf7f2e2dSJohn Marino }
137245796c8dcSSimon Schubert break;
137255796c8dcSSimon Schubert case w_mode:
137265796c8dcSSimon Schubert mask = 0xfffff;
137275796c8dcSSimon Schubert op = get16 ();
137285796c8dcSSimon Schubert break;
137295796c8dcSSimon Schubert default:
137305796c8dcSSimon Schubert oappend (INTERNAL_DISASSEMBLER_ERROR);
137315796c8dcSSimon Schubert return;
137325796c8dcSSimon Schubert }
137335796c8dcSSimon Schubert
137345796c8dcSSimon Schubert op &= mask;
137355796c8dcSSimon Schubert scratchbuf[0] = '$';
137365796c8dcSSimon Schubert print_operand_value (scratchbuf + 1, 1, op);
137375796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
137385796c8dcSSimon Schubert scratchbuf[0] = '\0';
137395796c8dcSSimon Schubert }
137405796c8dcSSimon Schubert
137415796c8dcSSimon Schubert static void
OP_sI(int bytemode,int sizeflag)137425796c8dcSSimon Schubert OP_sI (int bytemode, int sizeflag)
137435796c8dcSSimon Schubert {
137445796c8dcSSimon Schubert bfd_signed_vma op;
137455796c8dcSSimon Schubert
137465796c8dcSSimon Schubert switch (bytemode)
137475796c8dcSSimon Schubert {
137485796c8dcSSimon Schubert case b_mode:
13749c50c785cSJohn Marino case b_T_mode:
137505796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
137515796c8dcSSimon Schubert op = *codep++;
137525796c8dcSSimon Schubert if ((op & 0x80) != 0)
137535796c8dcSSimon Schubert op -= 0x100;
13754c50c785cSJohn Marino if (bytemode == b_T_mode)
13755c50c785cSJohn Marino {
13756c50c785cSJohn Marino if (address_mode != mode_64bit
13757*ef5ccd6cSJohn Marino || !((sizeflag & DFLAG) || (rex & REX_W)))
13758cf7f2e2dSJohn Marino {
13759*ef5ccd6cSJohn Marino /* The operand-size prefix is overridden by a REX prefix. */
13760*ef5ccd6cSJohn Marino if ((sizeflag & DFLAG) || (rex & REX_W))
13761c50c785cSJohn Marino op &= 0xffffffff;
13762c50c785cSJohn Marino else
13763c50c785cSJohn Marino op &= 0xffff;
13764c50c785cSJohn Marino }
137655796c8dcSSimon Schubert }
137665796c8dcSSimon Schubert else
137675796c8dcSSimon Schubert {
13768c50c785cSJohn Marino if (!(rex & REX_W))
13769c50c785cSJohn Marino {
13770c50c785cSJohn Marino if (sizeflag & DFLAG)
13771c50c785cSJohn Marino op &= 0xffffffff;
13772c50c785cSJohn Marino else
13773c50c785cSJohn Marino op &= 0xffff;
137745796c8dcSSimon Schubert }
13775cf7f2e2dSJohn Marino }
137765796c8dcSSimon Schubert break;
13777c50c785cSJohn Marino case v_mode:
13778*ef5ccd6cSJohn Marino /* The operand-size prefix is overridden by a REX prefix. */
13779*ef5ccd6cSJohn Marino if ((sizeflag & DFLAG) || (rex & REX_W))
13780c50c785cSJohn Marino op = get32s ();
13781c50c785cSJohn Marino else
137825796c8dcSSimon Schubert op = get16 ();
137835796c8dcSSimon Schubert break;
137845796c8dcSSimon Schubert default:
137855796c8dcSSimon Schubert oappend (INTERNAL_DISASSEMBLER_ERROR);
137865796c8dcSSimon Schubert return;
137875796c8dcSSimon Schubert }
137885796c8dcSSimon Schubert
137895796c8dcSSimon Schubert scratchbuf[0] = '$';
137905796c8dcSSimon Schubert print_operand_value (scratchbuf + 1, 1, op);
137915796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
137925796c8dcSSimon Schubert }
137935796c8dcSSimon Schubert
137945796c8dcSSimon Schubert static void
OP_J(int bytemode,int sizeflag)137955796c8dcSSimon Schubert OP_J (int bytemode, int sizeflag)
137965796c8dcSSimon Schubert {
137975796c8dcSSimon Schubert bfd_vma disp;
137985796c8dcSSimon Schubert bfd_vma mask = -1;
137995796c8dcSSimon Schubert bfd_vma segment = 0;
138005796c8dcSSimon Schubert
138015796c8dcSSimon Schubert switch (bytemode)
138025796c8dcSSimon Schubert {
138035796c8dcSSimon Schubert case b_mode:
138045796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
138055796c8dcSSimon Schubert disp = *codep++;
138065796c8dcSSimon Schubert if ((disp & 0x80) != 0)
138075796c8dcSSimon Schubert disp -= 0x100;
138085796c8dcSSimon Schubert break;
138095796c8dcSSimon Schubert case v_mode:
13810cf7f2e2dSJohn Marino USED_REX (REX_W);
138115796c8dcSSimon Schubert if ((sizeflag & DFLAG) || (rex & REX_W))
138125796c8dcSSimon Schubert disp = get32s ();
138135796c8dcSSimon Schubert else
138145796c8dcSSimon Schubert {
138155796c8dcSSimon Schubert disp = get16 ();
138165796c8dcSSimon Schubert if ((disp & 0x8000) != 0)
138175796c8dcSSimon Schubert disp -= 0x10000;
138185796c8dcSSimon Schubert /* In 16bit mode, address is wrapped around at 64k within
138195796c8dcSSimon Schubert the same segment. Otherwise, a data16 prefix on a jump
138205796c8dcSSimon Schubert instruction means that the pc is masked to 16 bits after
138215796c8dcSSimon Schubert the displacement is added! */
138225796c8dcSSimon Schubert mask = 0xffff;
138235796c8dcSSimon Schubert if ((prefixes & PREFIX_DATA) == 0)
138245796c8dcSSimon Schubert segment = ((start_pc + codep - start_codep)
138255796c8dcSSimon Schubert & ~((bfd_vma) 0xffff));
138265796c8dcSSimon Schubert }
13827cf7f2e2dSJohn Marino if (!(rex & REX_W))
138285796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
138295796c8dcSSimon Schubert break;
138305796c8dcSSimon Schubert default:
138315796c8dcSSimon Schubert oappend (INTERNAL_DISASSEMBLER_ERROR);
138325796c8dcSSimon Schubert return;
138335796c8dcSSimon Schubert }
13834c50c785cSJohn Marino disp = ((start_pc + (codep - start_codep) + disp) & mask) | segment;
138355796c8dcSSimon Schubert set_op (disp, 0);
138365796c8dcSSimon Schubert print_operand_value (scratchbuf, 1, disp);
138375796c8dcSSimon Schubert oappend (scratchbuf);
138385796c8dcSSimon Schubert }
138395796c8dcSSimon Schubert
138405796c8dcSSimon Schubert static void
OP_SEG(int bytemode,int sizeflag)138415796c8dcSSimon Schubert OP_SEG (int bytemode, int sizeflag)
138425796c8dcSSimon Schubert {
138435796c8dcSSimon Schubert if (bytemode == w_mode)
138445796c8dcSSimon Schubert oappend (names_seg[modrm.reg]);
138455796c8dcSSimon Schubert else
138465796c8dcSSimon Schubert OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
138475796c8dcSSimon Schubert }
138485796c8dcSSimon Schubert
138495796c8dcSSimon Schubert static void
OP_DIR(int dummy ATTRIBUTE_UNUSED,int sizeflag)138505796c8dcSSimon Schubert OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
138515796c8dcSSimon Schubert {
138525796c8dcSSimon Schubert int seg, offset;
138535796c8dcSSimon Schubert
138545796c8dcSSimon Schubert if (sizeflag & DFLAG)
138555796c8dcSSimon Schubert {
138565796c8dcSSimon Schubert offset = get32 ();
138575796c8dcSSimon Schubert seg = get16 ();
138585796c8dcSSimon Schubert }
138595796c8dcSSimon Schubert else
138605796c8dcSSimon Schubert {
138615796c8dcSSimon Schubert offset = get16 ();
138625796c8dcSSimon Schubert seg = get16 ();
138635796c8dcSSimon Schubert }
138645796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
138655796c8dcSSimon Schubert if (intel_syntax)
138665796c8dcSSimon Schubert sprintf (scratchbuf, "0x%x:0x%x", seg, offset);
138675796c8dcSSimon Schubert else
138685796c8dcSSimon Schubert sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
138695796c8dcSSimon Schubert oappend (scratchbuf);
138705796c8dcSSimon Schubert }
138715796c8dcSSimon Schubert
138725796c8dcSSimon Schubert static void
OP_OFF(int bytemode,int sizeflag)138735796c8dcSSimon Schubert OP_OFF (int bytemode, int sizeflag)
138745796c8dcSSimon Schubert {
138755796c8dcSSimon Schubert bfd_vma off;
138765796c8dcSSimon Schubert
138775796c8dcSSimon Schubert if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
138785796c8dcSSimon Schubert intel_operand_size (bytemode, sizeflag);
138795796c8dcSSimon Schubert append_seg ();
138805796c8dcSSimon Schubert
138815796c8dcSSimon Schubert if ((sizeflag & AFLAG) || address_mode == mode_64bit)
138825796c8dcSSimon Schubert off = get32 ();
138835796c8dcSSimon Schubert else
138845796c8dcSSimon Schubert off = get16 ();
138855796c8dcSSimon Schubert
138865796c8dcSSimon Schubert if (intel_syntax)
138875796c8dcSSimon Schubert {
138885796c8dcSSimon Schubert if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
138895796c8dcSSimon Schubert | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
138905796c8dcSSimon Schubert {
138915796c8dcSSimon Schubert oappend (names_seg[ds_reg - es_reg]);
138925796c8dcSSimon Schubert oappend (":");
138935796c8dcSSimon Schubert }
138945796c8dcSSimon Schubert }
138955796c8dcSSimon Schubert print_operand_value (scratchbuf, 1, off);
138965796c8dcSSimon Schubert oappend (scratchbuf);
138975796c8dcSSimon Schubert }
138985796c8dcSSimon Schubert
138995796c8dcSSimon Schubert static void
OP_OFF64(int bytemode,int sizeflag)139005796c8dcSSimon Schubert OP_OFF64 (int bytemode, int sizeflag)
139015796c8dcSSimon Schubert {
139025796c8dcSSimon Schubert bfd_vma off;
139035796c8dcSSimon Schubert
139045796c8dcSSimon Schubert if (address_mode != mode_64bit
139055796c8dcSSimon Schubert || (prefixes & PREFIX_ADDR))
139065796c8dcSSimon Schubert {
139075796c8dcSSimon Schubert OP_OFF (bytemode, sizeflag);
139085796c8dcSSimon Schubert return;
139095796c8dcSSimon Schubert }
139105796c8dcSSimon Schubert
139115796c8dcSSimon Schubert if (intel_syntax && (sizeflag & SUFFIX_ALWAYS))
139125796c8dcSSimon Schubert intel_operand_size (bytemode, sizeflag);
139135796c8dcSSimon Schubert append_seg ();
139145796c8dcSSimon Schubert
139155796c8dcSSimon Schubert off = get64 ();
139165796c8dcSSimon Schubert
139175796c8dcSSimon Schubert if (intel_syntax)
139185796c8dcSSimon Schubert {
139195796c8dcSSimon Schubert if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
139205796c8dcSSimon Schubert | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
139215796c8dcSSimon Schubert {
139225796c8dcSSimon Schubert oappend (names_seg[ds_reg - es_reg]);
139235796c8dcSSimon Schubert oappend (":");
139245796c8dcSSimon Schubert }
139255796c8dcSSimon Schubert }
139265796c8dcSSimon Schubert print_operand_value (scratchbuf, 1, off);
139275796c8dcSSimon Schubert oappend (scratchbuf);
139285796c8dcSSimon Schubert }
139295796c8dcSSimon Schubert
139305796c8dcSSimon Schubert static void
ptr_reg(int code,int sizeflag)139315796c8dcSSimon Schubert ptr_reg (int code, int sizeflag)
139325796c8dcSSimon Schubert {
139335796c8dcSSimon Schubert const char *s;
139345796c8dcSSimon Schubert
139355796c8dcSSimon Schubert *obufp++ = open_char;
139365796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_ADDR);
139375796c8dcSSimon Schubert if (address_mode == mode_64bit)
139385796c8dcSSimon Schubert {
139395796c8dcSSimon Schubert if (!(sizeflag & AFLAG))
139405796c8dcSSimon Schubert s = names32[code - eAX_reg];
139415796c8dcSSimon Schubert else
139425796c8dcSSimon Schubert s = names64[code - eAX_reg];
139435796c8dcSSimon Schubert }
139445796c8dcSSimon Schubert else if (sizeflag & AFLAG)
139455796c8dcSSimon Schubert s = names32[code - eAX_reg];
139465796c8dcSSimon Schubert else
139475796c8dcSSimon Schubert s = names16[code - eAX_reg];
139485796c8dcSSimon Schubert oappend (s);
139495796c8dcSSimon Schubert *obufp++ = close_char;
139505796c8dcSSimon Schubert *obufp = 0;
139515796c8dcSSimon Schubert }
139525796c8dcSSimon Schubert
139535796c8dcSSimon Schubert static void
OP_ESreg(int code,int sizeflag)139545796c8dcSSimon Schubert OP_ESreg (int code, int sizeflag)
139555796c8dcSSimon Schubert {
139565796c8dcSSimon Schubert if (intel_syntax)
139575796c8dcSSimon Schubert {
139585796c8dcSSimon Schubert switch (codep[-1])
139595796c8dcSSimon Schubert {
139605796c8dcSSimon Schubert case 0x6d: /* insw/insl */
139615796c8dcSSimon Schubert intel_operand_size (z_mode, sizeflag);
139625796c8dcSSimon Schubert break;
139635796c8dcSSimon Schubert case 0xa5: /* movsw/movsl/movsq */
139645796c8dcSSimon Schubert case 0xa7: /* cmpsw/cmpsl/cmpsq */
139655796c8dcSSimon Schubert case 0xab: /* stosw/stosl */
139665796c8dcSSimon Schubert case 0xaf: /* scasw/scasl */
139675796c8dcSSimon Schubert intel_operand_size (v_mode, sizeflag);
139685796c8dcSSimon Schubert break;
139695796c8dcSSimon Schubert default:
139705796c8dcSSimon Schubert intel_operand_size (b_mode, sizeflag);
139715796c8dcSSimon Schubert }
139725796c8dcSSimon Schubert }
139735796c8dcSSimon Schubert oappend ("%es:" + intel_syntax);
139745796c8dcSSimon Schubert ptr_reg (code, sizeflag);
139755796c8dcSSimon Schubert }
139765796c8dcSSimon Schubert
139775796c8dcSSimon Schubert static void
OP_DSreg(int code,int sizeflag)139785796c8dcSSimon Schubert OP_DSreg (int code, int sizeflag)
139795796c8dcSSimon Schubert {
139805796c8dcSSimon Schubert if (intel_syntax)
139815796c8dcSSimon Schubert {
139825796c8dcSSimon Schubert switch (codep[-1])
139835796c8dcSSimon Schubert {
139845796c8dcSSimon Schubert case 0x6f: /* outsw/outsl */
139855796c8dcSSimon Schubert intel_operand_size (z_mode, sizeflag);
139865796c8dcSSimon Schubert break;
139875796c8dcSSimon Schubert case 0xa5: /* movsw/movsl/movsq */
139885796c8dcSSimon Schubert case 0xa7: /* cmpsw/cmpsl/cmpsq */
139895796c8dcSSimon Schubert case 0xad: /* lodsw/lodsl/lodsq */
139905796c8dcSSimon Schubert intel_operand_size (v_mode, sizeflag);
139915796c8dcSSimon Schubert break;
139925796c8dcSSimon Schubert default:
139935796c8dcSSimon Schubert intel_operand_size (b_mode, sizeflag);
139945796c8dcSSimon Schubert }
139955796c8dcSSimon Schubert }
139965796c8dcSSimon Schubert if ((prefixes
139975796c8dcSSimon Schubert & (PREFIX_CS
139985796c8dcSSimon Schubert | PREFIX_DS
139995796c8dcSSimon Schubert | PREFIX_SS
140005796c8dcSSimon Schubert | PREFIX_ES
140015796c8dcSSimon Schubert | PREFIX_FS
140025796c8dcSSimon Schubert | PREFIX_GS)) == 0)
140035796c8dcSSimon Schubert prefixes |= PREFIX_DS;
140045796c8dcSSimon Schubert append_seg ();
140055796c8dcSSimon Schubert ptr_reg (code, sizeflag);
140065796c8dcSSimon Schubert }
140075796c8dcSSimon Schubert
140085796c8dcSSimon Schubert static void
OP_C(int dummy ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)140095796c8dcSSimon Schubert OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
140105796c8dcSSimon Schubert {
140115796c8dcSSimon Schubert int add;
140125796c8dcSSimon Schubert if (rex & REX_R)
140135796c8dcSSimon Schubert {
140145796c8dcSSimon Schubert USED_REX (REX_R);
140155796c8dcSSimon Schubert add = 8;
140165796c8dcSSimon Schubert }
140175796c8dcSSimon Schubert else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
140185796c8dcSSimon Schubert {
14019cf7f2e2dSJohn Marino all_prefixes[last_lock_prefix] = 0;
140205796c8dcSSimon Schubert used_prefixes |= PREFIX_LOCK;
140215796c8dcSSimon Schubert add = 8;
140225796c8dcSSimon Schubert }
140235796c8dcSSimon Schubert else
140245796c8dcSSimon Schubert add = 0;
140255796c8dcSSimon Schubert sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
140265796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
140275796c8dcSSimon Schubert }
140285796c8dcSSimon Schubert
140295796c8dcSSimon Schubert static void
OP_D(int dummy ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)140305796c8dcSSimon Schubert OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
140315796c8dcSSimon Schubert {
140325796c8dcSSimon Schubert int add;
140335796c8dcSSimon Schubert USED_REX (REX_R);
140345796c8dcSSimon Schubert if (rex & REX_R)
140355796c8dcSSimon Schubert add = 8;
140365796c8dcSSimon Schubert else
140375796c8dcSSimon Schubert add = 0;
140385796c8dcSSimon Schubert if (intel_syntax)
140395796c8dcSSimon Schubert sprintf (scratchbuf, "db%d", modrm.reg + add);
140405796c8dcSSimon Schubert else
140415796c8dcSSimon Schubert sprintf (scratchbuf, "%%db%d", modrm.reg + add);
140425796c8dcSSimon Schubert oappend (scratchbuf);
140435796c8dcSSimon Schubert }
140445796c8dcSSimon Schubert
140455796c8dcSSimon Schubert static void
OP_T(int dummy ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)140465796c8dcSSimon Schubert OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
140475796c8dcSSimon Schubert {
140485796c8dcSSimon Schubert sprintf (scratchbuf, "%%tr%d", modrm.reg);
140495796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
140505796c8dcSSimon Schubert }
140515796c8dcSSimon Schubert
140525796c8dcSSimon Schubert static void
OP_R(int bytemode,int sizeflag)140535796c8dcSSimon Schubert OP_R (int bytemode, int sizeflag)
140545796c8dcSSimon Schubert {
140555796c8dcSSimon Schubert if (modrm.mod == 3)
140565796c8dcSSimon Schubert OP_E (bytemode, sizeflag);
140575796c8dcSSimon Schubert else
140585796c8dcSSimon Schubert BadOp ();
140595796c8dcSSimon Schubert }
140605796c8dcSSimon Schubert
140615796c8dcSSimon Schubert static void
OP_MMX(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)140625796c8dcSSimon Schubert OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
140635796c8dcSSimon Schubert {
14064cf7f2e2dSJohn Marino int reg = modrm.reg;
14065cf7f2e2dSJohn Marino const char **names;
14066cf7f2e2dSJohn Marino
140675796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
140685796c8dcSSimon Schubert if (prefixes & PREFIX_DATA)
140695796c8dcSSimon Schubert {
14070cf7f2e2dSJohn Marino names = names_xmm;
140715796c8dcSSimon Schubert USED_REX (REX_R);
140725796c8dcSSimon Schubert if (rex & REX_R)
14073cf7f2e2dSJohn Marino reg += 8;
140745796c8dcSSimon Schubert }
140755796c8dcSSimon Schubert else
14076cf7f2e2dSJohn Marino names = names_mm;
14077cf7f2e2dSJohn Marino oappend (names[reg]);
140785796c8dcSSimon Schubert }
140795796c8dcSSimon Schubert
140805796c8dcSSimon Schubert static void
OP_XMM(int bytemode,int sizeflag ATTRIBUTE_UNUSED)140815796c8dcSSimon Schubert OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
140825796c8dcSSimon Schubert {
14083cf7f2e2dSJohn Marino int reg = modrm.reg;
14084cf7f2e2dSJohn Marino const char **names;
14085cf7f2e2dSJohn Marino
140865796c8dcSSimon Schubert USED_REX (REX_R);
140875796c8dcSSimon Schubert if (rex & REX_R)
14088cf7f2e2dSJohn Marino reg += 8;
14089cf7f2e2dSJohn Marino if (need_vex
14090cf7f2e2dSJohn Marino && bytemode != xmm_mode
14091cf7f2e2dSJohn Marino && bytemode != scalar_mode)
140925796c8dcSSimon Schubert {
140935796c8dcSSimon Schubert switch (vex.length)
140945796c8dcSSimon Schubert {
140955796c8dcSSimon Schubert case 128:
14096cf7f2e2dSJohn Marino names = names_xmm;
140975796c8dcSSimon Schubert break;
140985796c8dcSSimon Schubert case 256:
14099a45ae5f8SJohn Marino if (vex.w || bytemode != vex_vsib_q_w_dq_mode)
14100cf7f2e2dSJohn Marino names = names_ymm;
14101a45ae5f8SJohn Marino else
14102a45ae5f8SJohn Marino names = names_xmm;
141035796c8dcSSimon Schubert break;
141045796c8dcSSimon Schubert default:
141055796c8dcSSimon Schubert abort ();
141065796c8dcSSimon Schubert }
141075796c8dcSSimon Schubert }
141085796c8dcSSimon Schubert else
14109cf7f2e2dSJohn Marino names = names_xmm;
14110cf7f2e2dSJohn Marino oappend (names[reg]);
141115796c8dcSSimon Schubert }
141125796c8dcSSimon Schubert
141135796c8dcSSimon Schubert static void
OP_EM(int bytemode,int sizeflag)141145796c8dcSSimon Schubert OP_EM (int bytemode, int sizeflag)
141155796c8dcSSimon Schubert {
14116cf7f2e2dSJohn Marino int reg;
14117cf7f2e2dSJohn Marino const char **names;
14118cf7f2e2dSJohn Marino
141195796c8dcSSimon Schubert if (modrm.mod != 3)
141205796c8dcSSimon Schubert {
141215796c8dcSSimon Schubert if (intel_syntax
141225796c8dcSSimon Schubert && (bytemode == v_mode || bytemode == v_swap_mode))
141235796c8dcSSimon Schubert {
141245796c8dcSSimon Schubert bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
141255796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
141265796c8dcSSimon Schubert }
141275796c8dcSSimon Schubert OP_E (bytemode, sizeflag);
141285796c8dcSSimon Schubert return;
141295796c8dcSSimon Schubert }
141305796c8dcSSimon Schubert
141315796c8dcSSimon Schubert if ((sizeflag & SUFFIX_ALWAYS) && bytemode == v_swap_mode)
141325796c8dcSSimon Schubert swap_operand ();
141335796c8dcSSimon Schubert
141345796c8dcSSimon Schubert /* Skip mod/rm byte. */
141355796c8dcSSimon Schubert MODRM_CHECK;
141365796c8dcSSimon Schubert codep++;
141375796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
14138cf7f2e2dSJohn Marino reg = modrm.rm;
141395796c8dcSSimon Schubert if (prefixes & PREFIX_DATA)
141405796c8dcSSimon Schubert {
14141cf7f2e2dSJohn Marino names = names_xmm;
141425796c8dcSSimon Schubert USED_REX (REX_B);
141435796c8dcSSimon Schubert if (rex & REX_B)
14144cf7f2e2dSJohn Marino reg += 8;
141455796c8dcSSimon Schubert }
141465796c8dcSSimon Schubert else
14147cf7f2e2dSJohn Marino names = names_mm;
14148cf7f2e2dSJohn Marino oappend (names[reg]);
141495796c8dcSSimon Schubert }
141505796c8dcSSimon Schubert
141515796c8dcSSimon Schubert /* cvt* are the only instructions in sse2 which have
141525796c8dcSSimon Schubert both SSE and MMX operands and also have 0x66 prefix
141535796c8dcSSimon Schubert in their opcode. 0x66 was originally used to differentiate
141545796c8dcSSimon Schubert between SSE and MMX instruction(operands). So we have to handle the
141555796c8dcSSimon Schubert cvt* separately using OP_EMC and OP_MXC */
141565796c8dcSSimon Schubert static void
OP_EMC(int bytemode,int sizeflag)141575796c8dcSSimon Schubert OP_EMC (int bytemode, int sizeflag)
141585796c8dcSSimon Schubert {
141595796c8dcSSimon Schubert if (modrm.mod != 3)
141605796c8dcSSimon Schubert {
141615796c8dcSSimon Schubert if (intel_syntax && bytemode == v_mode)
141625796c8dcSSimon Schubert {
141635796c8dcSSimon Schubert bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
141645796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
141655796c8dcSSimon Schubert }
141665796c8dcSSimon Schubert OP_E (bytemode, sizeflag);
141675796c8dcSSimon Schubert return;
141685796c8dcSSimon Schubert }
141695796c8dcSSimon Schubert
141705796c8dcSSimon Schubert /* Skip mod/rm byte. */
141715796c8dcSSimon Schubert MODRM_CHECK;
141725796c8dcSSimon Schubert codep++;
141735796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
14174cf7f2e2dSJohn Marino oappend (names_mm[modrm.rm]);
141755796c8dcSSimon Schubert }
141765796c8dcSSimon Schubert
141775796c8dcSSimon Schubert static void
OP_MXC(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)141785796c8dcSSimon Schubert OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
141795796c8dcSSimon Schubert {
141805796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
14181cf7f2e2dSJohn Marino oappend (names_mm[modrm.reg]);
141825796c8dcSSimon Schubert }
141835796c8dcSSimon Schubert
141845796c8dcSSimon Schubert static void
OP_EX(int bytemode,int sizeflag)141855796c8dcSSimon Schubert OP_EX (int bytemode, int sizeflag)
141865796c8dcSSimon Schubert {
14187cf7f2e2dSJohn Marino int reg;
14188cf7f2e2dSJohn Marino const char **names;
141895796c8dcSSimon Schubert
141905796c8dcSSimon Schubert /* Skip mod/rm byte. */
141915796c8dcSSimon Schubert MODRM_CHECK;
141925796c8dcSSimon Schubert codep++;
141935796c8dcSSimon Schubert
141945796c8dcSSimon Schubert if (modrm.mod != 3)
141955796c8dcSSimon Schubert {
141965796c8dcSSimon Schubert OP_E_memory (bytemode, sizeflag);
141975796c8dcSSimon Schubert return;
141985796c8dcSSimon Schubert }
141995796c8dcSSimon Schubert
14200cf7f2e2dSJohn Marino reg = modrm.rm;
142015796c8dcSSimon Schubert USED_REX (REX_B);
142025796c8dcSSimon Schubert if (rex & REX_B)
14203cf7f2e2dSJohn Marino reg += 8;
142045796c8dcSSimon Schubert
142055796c8dcSSimon Schubert if ((sizeflag & SUFFIX_ALWAYS)
142065796c8dcSSimon Schubert && (bytemode == x_swap_mode
142075796c8dcSSimon Schubert || bytemode == d_swap_mode
14208cf7f2e2dSJohn Marino || bytemode == d_scalar_swap_mode
14209cf7f2e2dSJohn Marino || bytemode == q_swap_mode
14210cf7f2e2dSJohn Marino || bytemode == q_scalar_swap_mode))
142115796c8dcSSimon Schubert swap_operand ();
142125796c8dcSSimon Schubert
142135796c8dcSSimon Schubert if (need_vex
142145796c8dcSSimon Schubert && bytemode != xmm_mode
14215a45ae5f8SJohn Marino && bytemode != xmmdw_mode
14216a45ae5f8SJohn Marino && bytemode != xmmqd_mode
14217a45ae5f8SJohn Marino && bytemode != xmm_mb_mode
14218a45ae5f8SJohn Marino && bytemode != xmm_mw_mode
14219a45ae5f8SJohn Marino && bytemode != xmm_md_mode
14220a45ae5f8SJohn Marino && bytemode != xmm_mq_mode
14221cf7f2e2dSJohn Marino && bytemode != xmmq_mode
14222cf7f2e2dSJohn Marino && bytemode != d_scalar_mode
14223cf7f2e2dSJohn Marino && bytemode != d_scalar_swap_mode
14224cf7f2e2dSJohn Marino && bytemode != q_scalar_mode
14225cf7f2e2dSJohn Marino && bytemode != q_scalar_swap_mode
14226cf7f2e2dSJohn Marino && bytemode != vex_scalar_w_dq_mode)
142275796c8dcSSimon Schubert {
142285796c8dcSSimon Schubert switch (vex.length)
142295796c8dcSSimon Schubert {
142305796c8dcSSimon Schubert case 128:
14231cf7f2e2dSJohn Marino names = names_xmm;
142325796c8dcSSimon Schubert break;
142335796c8dcSSimon Schubert case 256:
14234cf7f2e2dSJohn Marino names = names_ymm;
142355796c8dcSSimon Schubert break;
142365796c8dcSSimon Schubert default:
142375796c8dcSSimon Schubert abort ();
142385796c8dcSSimon Schubert }
142395796c8dcSSimon Schubert }
142405796c8dcSSimon Schubert else
14241cf7f2e2dSJohn Marino names = names_xmm;
14242cf7f2e2dSJohn Marino oappend (names[reg]);
142435796c8dcSSimon Schubert }
142445796c8dcSSimon Schubert
142455796c8dcSSimon Schubert static void
OP_MS(int bytemode,int sizeflag)142465796c8dcSSimon Schubert OP_MS (int bytemode, int sizeflag)
142475796c8dcSSimon Schubert {
142485796c8dcSSimon Schubert if (modrm.mod == 3)
142495796c8dcSSimon Schubert OP_EM (bytemode, sizeflag);
142505796c8dcSSimon Schubert else
142515796c8dcSSimon Schubert BadOp ();
142525796c8dcSSimon Schubert }
142535796c8dcSSimon Schubert
142545796c8dcSSimon Schubert static void
OP_XS(int bytemode,int sizeflag)142555796c8dcSSimon Schubert OP_XS (int bytemode, int sizeflag)
142565796c8dcSSimon Schubert {
142575796c8dcSSimon Schubert if (modrm.mod == 3)
142585796c8dcSSimon Schubert OP_EX (bytemode, sizeflag);
142595796c8dcSSimon Schubert else
142605796c8dcSSimon Schubert BadOp ();
142615796c8dcSSimon Schubert }
142625796c8dcSSimon Schubert
142635796c8dcSSimon Schubert static void
OP_M(int bytemode,int sizeflag)142645796c8dcSSimon Schubert OP_M (int bytemode, int sizeflag)
142655796c8dcSSimon Schubert {
142665796c8dcSSimon Schubert if (modrm.mod == 3)
142675796c8dcSSimon Schubert /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
142685796c8dcSSimon Schubert BadOp ();
142695796c8dcSSimon Schubert else
142705796c8dcSSimon Schubert OP_E (bytemode, sizeflag);
142715796c8dcSSimon Schubert }
142725796c8dcSSimon Schubert
142735796c8dcSSimon Schubert static void
OP_0f07(int bytemode,int sizeflag)142745796c8dcSSimon Schubert OP_0f07 (int bytemode, int sizeflag)
142755796c8dcSSimon Schubert {
142765796c8dcSSimon Schubert if (modrm.mod != 3 || modrm.rm != 0)
142775796c8dcSSimon Schubert BadOp ();
142785796c8dcSSimon Schubert else
142795796c8dcSSimon Schubert OP_E (bytemode, sizeflag);
142805796c8dcSSimon Schubert }
142815796c8dcSSimon Schubert
142825796c8dcSSimon Schubert /* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
142835796c8dcSSimon Schubert 32bit mode and "xchg %rax,%rax" in 64bit mode. */
142845796c8dcSSimon Schubert
142855796c8dcSSimon Schubert static void
NOP_Fixup1(int bytemode,int sizeflag)142865796c8dcSSimon Schubert NOP_Fixup1 (int bytemode, int sizeflag)
142875796c8dcSSimon Schubert {
142885796c8dcSSimon Schubert if ((prefixes & PREFIX_DATA) != 0
142895796c8dcSSimon Schubert || (rex != 0
142905796c8dcSSimon Schubert && rex != 0x48
142915796c8dcSSimon Schubert && address_mode == mode_64bit))
142925796c8dcSSimon Schubert OP_REG (bytemode, sizeflag);
142935796c8dcSSimon Schubert else
142945796c8dcSSimon Schubert strcpy (obuf, "nop");
142955796c8dcSSimon Schubert }
142965796c8dcSSimon Schubert
142975796c8dcSSimon Schubert static void
NOP_Fixup2(int bytemode,int sizeflag)142985796c8dcSSimon Schubert NOP_Fixup2 (int bytemode, int sizeflag)
142995796c8dcSSimon Schubert {
143005796c8dcSSimon Schubert if ((prefixes & PREFIX_DATA) != 0
143015796c8dcSSimon Schubert || (rex != 0
143025796c8dcSSimon Schubert && rex != 0x48
143035796c8dcSSimon Schubert && address_mode == mode_64bit))
143045796c8dcSSimon Schubert OP_IMREG (bytemode, sizeflag);
143055796c8dcSSimon Schubert }
143065796c8dcSSimon Schubert
143075796c8dcSSimon Schubert static const char *const Suffix3DNow[] = {
143085796c8dcSSimon Schubert /* 00 */ NULL, NULL, NULL, NULL,
143095796c8dcSSimon Schubert /* 04 */ NULL, NULL, NULL, NULL,
143105796c8dcSSimon Schubert /* 08 */ NULL, NULL, NULL, NULL,
143115796c8dcSSimon Schubert /* 0C */ "pi2fw", "pi2fd", NULL, NULL,
143125796c8dcSSimon Schubert /* 10 */ NULL, NULL, NULL, NULL,
143135796c8dcSSimon Schubert /* 14 */ NULL, NULL, NULL, NULL,
143145796c8dcSSimon Schubert /* 18 */ NULL, NULL, NULL, NULL,
143155796c8dcSSimon Schubert /* 1C */ "pf2iw", "pf2id", NULL, NULL,
143165796c8dcSSimon Schubert /* 20 */ NULL, NULL, NULL, NULL,
143175796c8dcSSimon Schubert /* 24 */ NULL, NULL, NULL, NULL,
143185796c8dcSSimon Schubert /* 28 */ NULL, NULL, NULL, NULL,
143195796c8dcSSimon Schubert /* 2C */ NULL, NULL, NULL, NULL,
143205796c8dcSSimon Schubert /* 30 */ NULL, NULL, NULL, NULL,
143215796c8dcSSimon Schubert /* 34 */ NULL, NULL, NULL, NULL,
143225796c8dcSSimon Schubert /* 38 */ NULL, NULL, NULL, NULL,
143235796c8dcSSimon Schubert /* 3C */ NULL, NULL, NULL, NULL,
143245796c8dcSSimon Schubert /* 40 */ NULL, NULL, NULL, NULL,
143255796c8dcSSimon Schubert /* 44 */ NULL, NULL, NULL, NULL,
143265796c8dcSSimon Schubert /* 48 */ NULL, NULL, NULL, NULL,
143275796c8dcSSimon Schubert /* 4C */ NULL, NULL, NULL, NULL,
143285796c8dcSSimon Schubert /* 50 */ NULL, NULL, NULL, NULL,
143295796c8dcSSimon Schubert /* 54 */ NULL, NULL, NULL, NULL,
143305796c8dcSSimon Schubert /* 58 */ NULL, NULL, NULL, NULL,
143315796c8dcSSimon Schubert /* 5C */ NULL, NULL, NULL, NULL,
143325796c8dcSSimon Schubert /* 60 */ NULL, NULL, NULL, NULL,
143335796c8dcSSimon Schubert /* 64 */ NULL, NULL, NULL, NULL,
143345796c8dcSSimon Schubert /* 68 */ NULL, NULL, NULL, NULL,
143355796c8dcSSimon Schubert /* 6C */ NULL, NULL, NULL, NULL,
143365796c8dcSSimon Schubert /* 70 */ NULL, NULL, NULL, NULL,
143375796c8dcSSimon Schubert /* 74 */ NULL, NULL, NULL, NULL,
143385796c8dcSSimon Schubert /* 78 */ NULL, NULL, NULL, NULL,
143395796c8dcSSimon Schubert /* 7C */ NULL, NULL, NULL, NULL,
143405796c8dcSSimon Schubert /* 80 */ NULL, NULL, NULL, NULL,
143415796c8dcSSimon Schubert /* 84 */ NULL, NULL, NULL, NULL,
143425796c8dcSSimon Schubert /* 88 */ NULL, NULL, "pfnacc", NULL,
143435796c8dcSSimon Schubert /* 8C */ NULL, NULL, "pfpnacc", NULL,
143445796c8dcSSimon Schubert /* 90 */ "pfcmpge", NULL, NULL, NULL,
143455796c8dcSSimon Schubert /* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
143465796c8dcSSimon Schubert /* 98 */ NULL, NULL, "pfsub", NULL,
143475796c8dcSSimon Schubert /* 9C */ NULL, NULL, "pfadd", NULL,
143485796c8dcSSimon Schubert /* A0 */ "pfcmpgt", NULL, NULL, NULL,
143495796c8dcSSimon Schubert /* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
143505796c8dcSSimon Schubert /* A8 */ NULL, NULL, "pfsubr", NULL,
143515796c8dcSSimon Schubert /* AC */ NULL, NULL, "pfacc", NULL,
143525796c8dcSSimon Schubert /* B0 */ "pfcmpeq", NULL, NULL, NULL,
143535796c8dcSSimon Schubert /* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
143545796c8dcSSimon Schubert /* B8 */ NULL, NULL, NULL, "pswapd",
143555796c8dcSSimon Schubert /* BC */ NULL, NULL, NULL, "pavgusb",
143565796c8dcSSimon Schubert /* C0 */ NULL, NULL, NULL, NULL,
143575796c8dcSSimon Schubert /* C4 */ NULL, NULL, NULL, NULL,
143585796c8dcSSimon Schubert /* C8 */ NULL, NULL, NULL, NULL,
143595796c8dcSSimon Schubert /* CC */ NULL, NULL, NULL, NULL,
143605796c8dcSSimon Schubert /* D0 */ NULL, NULL, NULL, NULL,
143615796c8dcSSimon Schubert /* D4 */ NULL, NULL, NULL, NULL,
143625796c8dcSSimon Schubert /* D8 */ NULL, NULL, NULL, NULL,
143635796c8dcSSimon Schubert /* DC */ NULL, NULL, NULL, NULL,
143645796c8dcSSimon Schubert /* E0 */ NULL, NULL, NULL, NULL,
143655796c8dcSSimon Schubert /* E4 */ NULL, NULL, NULL, NULL,
143665796c8dcSSimon Schubert /* E8 */ NULL, NULL, NULL, NULL,
143675796c8dcSSimon Schubert /* EC */ NULL, NULL, NULL, NULL,
143685796c8dcSSimon Schubert /* F0 */ NULL, NULL, NULL, NULL,
143695796c8dcSSimon Schubert /* F4 */ NULL, NULL, NULL, NULL,
143705796c8dcSSimon Schubert /* F8 */ NULL, NULL, NULL, NULL,
143715796c8dcSSimon Schubert /* FC */ NULL, NULL, NULL, NULL,
143725796c8dcSSimon Schubert };
143735796c8dcSSimon Schubert
143745796c8dcSSimon Schubert static void
OP_3DNowSuffix(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)143755796c8dcSSimon Schubert OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
143765796c8dcSSimon Schubert {
143775796c8dcSSimon Schubert const char *mnemonic;
143785796c8dcSSimon Schubert
143795796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
143805796c8dcSSimon Schubert /* AMD 3DNow! instructions are specified by an opcode suffix in the
143815796c8dcSSimon Schubert place where an 8-bit immediate would normally go. ie. the last
143825796c8dcSSimon Schubert byte of the instruction. */
143835796c8dcSSimon Schubert obufp = mnemonicendp;
143845796c8dcSSimon Schubert mnemonic = Suffix3DNow[*codep++ & 0xff];
143855796c8dcSSimon Schubert if (mnemonic)
143865796c8dcSSimon Schubert oappend (mnemonic);
143875796c8dcSSimon Schubert else
143885796c8dcSSimon Schubert {
143895796c8dcSSimon Schubert /* Since a variable sized modrm/sib chunk is between the start
143905796c8dcSSimon Schubert of the opcode (0x0f0f) and the opcode suffix, we need to do
143915796c8dcSSimon Schubert all the modrm processing first, and don't know until now that
143925796c8dcSSimon Schubert we have a bad opcode. This necessitates some cleaning up. */
143935796c8dcSSimon Schubert op_out[0][0] = '\0';
143945796c8dcSSimon Schubert op_out[1][0] = '\0';
143955796c8dcSSimon Schubert BadOp ();
143965796c8dcSSimon Schubert }
143975796c8dcSSimon Schubert mnemonicendp = obufp;
143985796c8dcSSimon Schubert }
143995796c8dcSSimon Schubert
144005796c8dcSSimon Schubert static struct op simd_cmp_op[] =
144015796c8dcSSimon Schubert {
144025796c8dcSSimon Schubert { STRING_COMMA_LEN ("eq") },
144035796c8dcSSimon Schubert { STRING_COMMA_LEN ("lt") },
144045796c8dcSSimon Schubert { STRING_COMMA_LEN ("le") },
144055796c8dcSSimon Schubert { STRING_COMMA_LEN ("unord") },
144065796c8dcSSimon Schubert { STRING_COMMA_LEN ("neq") },
144075796c8dcSSimon Schubert { STRING_COMMA_LEN ("nlt") },
144085796c8dcSSimon Schubert { STRING_COMMA_LEN ("nle") },
144095796c8dcSSimon Schubert { STRING_COMMA_LEN ("ord") }
144105796c8dcSSimon Schubert };
144115796c8dcSSimon Schubert
144125796c8dcSSimon Schubert static void
CMP_Fixup(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)144135796c8dcSSimon Schubert CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
144145796c8dcSSimon Schubert {
144155796c8dcSSimon Schubert unsigned int cmp_type;
144165796c8dcSSimon Schubert
144175796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
144185796c8dcSSimon Schubert cmp_type = *codep++ & 0xff;
144195796c8dcSSimon Schubert if (cmp_type < ARRAY_SIZE (simd_cmp_op))
144205796c8dcSSimon Schubert {
144215796c8dcSSimon Schubert char suffix [3];
144225796c8dcSSimon Schubert char *p = mnemonicendp - 2;
144235796c8dcSSimon Schubert suffix[0] = p[0];
144245796c8dcSSimon Schubert suffix[1] = p[1];
144255796c8dcSSimon Schubert suffix[2] = '\0';
144265796c8dcSSimon Schubert sprintf (p, "%s%s", simd_cmp_op[cmp_type].name, suffix);
144275796c8dcSSimon Schubert mnemonicendp += simd_cmp_op[cmp_type].len;
144285796c8dcSSimon Schubert }
144295796c8dcSSimon Schubert else
144305796c8dcSSimon Schubert {
144315796c8dcSSimon Schubert /* We have a reserved extension byte. Output it directly. */
144325796c8dcSSimon Schubert scratchbuf[0] = '$';
144335796c8dcSSimon Schubert print_operand_value (scratchbuf + 1, 1, cmp_type);
144345796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
144355796c8dcSSimon Schubert scratchbuf[0] = '\0';
144365796c8dcSSimon Schubert }
144375796c8dcSSimon Schubert }
144385796c8dcSSimon Schubert
144395796c8dcSSimon Schubert static void
OP_Mwait(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)144405796c8dcSSimon Schubert OP_Mwait (int bytemode ATTRIBUTE_UNUSED,
144415796c8dcSSimon Schubert int sizeflag ATTRIBUTE_UNUSED)
144425796c8dcSSimon Schubert {
144435796c8dcSSimon Schubert /* mwait %eax,%ecx */
144445796c8dcSSimon Schubert if (!intel_syntax)
144455796c8dcSSimon Schubert {
144465796c8dcSSimon Schubert const char **names = (address_mode == mode_64bit
144475796c8dcSSimon Schubert ? names64 : names32);
144485796c8dcSSimon Schubert strcpy (op_out[0], names[0]);
144495796c8dcSSimon Schubert strcpy (op_out[1], names[1]);
144505796c8dcSSimon Schubert two_source_ops = 1;
144515796c8dcSSimon Schubert }
144525796c8dcSSimon Schubert /* Skip mod/rm byte. */
144535796c8dcSSimon Schubert MODRM_CHECK;
144545796c8dcSSimon Schubert codep++;
144555796c8dcSSimon Schubert }
144565796c8dcSSimon Schubert
144575796c8dcSSimon Schubert static void
OP_Monitor(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)144585796c8dcSSimon Schubert OP_Monitor (int bytemode ATTRIBUTE_UNUSED,
144595796c8dcSSimon Schubert int sizeflag ATTRIBUTE_UNUSED)
144605796c8dcSSimon Schubert {
144615796c8dcSSimon Schubert /* monitor %eax,%ecx,%edx" */
144625796c8dcSSimon Schubert if (!intel_syntax)
144635796c8dcSSimon Schubert {
144645796c8dcSSimon Schubert const char **op1_names;
144655796c8dcSSimon Schubert const char **names = (address_mode == mode_64bit
144665796c8dcSSimon Schubert ? names64 : names32);
144675796c8dcSSimon Schubert
144685796c8dcSSimon Schubert if (!(prefixes & PREFIX_ADDR))
144695796c8dcSSimon Schubert op1_names = (address_mode == mode_16bit
144705796c8dcSSimon Schubert ? names16 : names);
144715796c8dcSSimon Schubert else
144725796c8dcSSimon Schubert {
144735796c8dcSSimon Schubert /* Remove "addr16/addr32". */
14474cf7f2e2dSJohn Marino all_prefixes[last_addr_prefix] = 0;
144755796c8dcSSimon Schubert op1_names = (address_mode != mode_32bit
144765796c8dcSSimon Schubert ? names32 : names16);
144775796c8dcSSimon Schubert used_prefixes |= PREFIX_ADDR;
144785796c8dcSSimon Schubert }
144795796c8dcSSimon Schubert strcpy (op_out[0], op1_names[0]);
144805796c8dcSSimon Schubert strcpy (op_out[1], names[1]);
144815796c8dcSSimon Schubert strcpy (op_out[2], names[2]);
144825796c8dcSSimon Schubert two_source_ops = 1;
144835796c8dcSSimon Schubert }
144845796c8dcSSimon Schubert /* Skip mod/rm byte. */
144855796c8dcSSimon Schubert MODRM_CHECK;
144865796c8dcSSimon Schubert codep++;
144875796c8dcSSimon Schubert }
144885796c8dcSSimon Schubert
144895796c8dcSSimon Schubert static void
BadOp(void)144905796c8dcSSimon Schubert BadOp (void)
144915796c8dcSSimon Schubert {
144925796c8dcSSimon Schubert /* Throw away prefixes and 1st. opcode byte. */
144935796c8dcSSimon Schubert codep = insn_codep + 1;
144945796c8dcSSimon Schubert oappend ("(bad)");
144955796c8dcSSimon Schubert }
144965796c8dcSSimon Schubert
144975796c8dcSSimon Schubert static void
REP_Fixup(int bytemode,int sizeflag)144985796c8dcSSimon Schubert REP_Fixup (int bytemode, int sizeflag)
144995796c8dcSSimon Schubert {
145005796c8dcSSimon Schubert /* The 0xf3 prefix should be displayed as "rep" for ins, outs, movs,
145015796c8dcSSimon Schubert lods and stos. */
145025796c8dcSSimon Schubert if (prefixes & PREFIX_REPZ)
14503cf7f2e2dSJohn Marino all_prefixes[last_repz_prefix] = REP_PREFIX;
145045796c8dcSSimon Schubert
145055796c8dcSSimon Schubert switch (bytemode)
145065796c8dcSSimon Schubert {
145075796c8dcSSimon Schubert case al_reg:
145085796c8dcSSimon Schubert case eAX_reg:
145095796c8dcSSimon Schubert case indir_dx_reg:
145105796c8dcSSimon Schubert OP_IMREG (bytemode, sizeflag);
145115796c8dcSSimon Schubert break;
145125796c8dcSSimon Schubert case eDI_reg:
145135796c8dcSSimon Schubert OP_ESreg (bytemode, sizeflag);
145145796c8dcSSimon Schubert break;
145155796c8dcSSimon Schubert case eSI_reg:
145165796c8dcSSimon Schubert OP_DSreg (bytemode, sizeflag);
145175796c8dcSSimon Schubert break;
145185796c8dcSSimon Schubert default:
145195796c8dcSSimon Schubert abort ();
145205796c8dcSSimon Schubert break;
145215796c8dcSSimon Schubert }
145225796c8dcSSimon Schubert }
145235796c8dcSSimon Schubert
14524*ef5ccd6cSJohn Marino /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
14525*ef5ccd6cSJohn Marino "xacquire"/"xrelease" for memory operand if there is a LOCK prefix.
14526*ef5ccd6cSJohn Marino */
14527*ef5ccd6cSJohn Marino
14528*ef5ccd6cSJohn Marino static void
HLE_Fixup1(int bytemode,int sizeflag)14529*ef5ccd6cSJohn Marino HLE_Fixup1 (int bytemode, int sizeflag)
14530*ef5ccd6cSJohn Marino {
14531*ef5ccd6cSJohn Marino if (modrm.mod != 3
14532*ef5ccd6cSJohn Marino && (prefixes & PREFIX_LOCK) != 0)
14533*ef5ccd6cSJohn Marino {
14534*ef5ccd6cSJohn Marino if (prefixes & PREFIX_REPZ)
14535*ef5ccd6cSJohn Marino all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
14536*ef5ccd6cSJohn Marino if (prefixes & PREFIX_REPNZ)
14537*ef5ccd6cSJohn Marino all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
14538*ef5ccd6cSJohn Marino }
14539*ef5ccd6cSJohn Marino
14540*ef5ccd6cSJohn Marino OP_E (bytemode, sizeflag);
14541*ef5ccd6cSJohn Marino }
14542*ef5ccd6cSJohn Marino
14543*ef5ccd6cSJohn Marino /* Similar to OP_E. But the 0xf2/0xf3 prefixes should be displayed as
14544*ef5ccd6cSJohn Marino "xacquire"/"xrelease" for memory operand. No check for LOCK prefix.
14545*ef5ccd6cSJohn Marino */
14546*ef5ccd6cSJohn Marino
14547*ef5ccd6cSJohn Marino static void
HLE_Fixup2(int bytemode,int sizeflag)14548*ef5ccd6cSJohn Marino HLE_Fixup2 (int bytemode, int sizeflag)
14549*ef5ccd6cSJohn Marino {
14550*ef5ccd6cSJohn Marino if (modrm.mod != 3)
14551*ef5ccd6cSJohn Marino {
14552*ef5ccd6cSJohn Marino if (prefixes & PREFIX_REPZ)
14553*ef5ccd6cSJohn Marino all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
14554*ef5ccd6cSJohn Marino if (prefixes & PREFIX_REPNZ)
14555*ef5ccd6cSJohn Marino all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
14556*ef5ccd6cSJohn Marino }
14557*ef5ccd6cSJohn Marino
14558*ef5ccd6cSJohn Marino OP_E (bytemode, sizeflag);
14559*ef5ccd6cSJohn Marino }
14560*ef5ccd6cSJohn Marino
14561*ef5ccd6cSJohn Marino /* Similar to OP_E. But the 0xf3 prefixes should be displayed as
14562*ef5ccd6cSJohn Marino "xrelease" for memory operand. No check for LOCK prefix. */
14563*ef5ccd6cSJohn Marino
14564*ef5ccd6cSJohn Marino static void
HLE_Fixup3(int bytemode,int sizeflag)14565*ef5ccd6cSJohn Marino HLE_Fixup3 (int bytemode, int sizeflag)
14566*ef5ccd6cSJohn Marino {
14567*ef5ccd6cSJohn Marino if (modrm.mod != 3
14568*ef5ccd6cSJohn Marino && last_repz_prefix > last_repnz_prefix
14569*ef5ccd6cSJohn Marino && (prefixes & PREFIX_REPZ) != 0)
14570*ef5ccd6cSJohn Marino all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
14571*ef5ccd6cSJohn Marino
14572*ef5ccd6cSJohn Marino OP_E (bytemode, sizeflag);
14573*ef5ccd6cSJohn Marino }
14574*ef5ccd6cSJohn Marino
145755796c8dcSSimon Schubert static void
CMPXCHG8B_Fixup(int bytemode,int sizeflag)145765796c8dcSSimon Schubert CMPXCHG8B_Fixup (int bytemode, int sizeflag)
145775796c8dcSSimon Schubert {
145785796c8dcSSimon Schubert USED_REX (REX_W);
145795796c8dcSSimon Schubert if (rex & REX_W)
145805796c8dcSSimon Schubert {
145815796c8dcSSimon Schubert /* Change cmpxchg8b to cmpxchg16b. */
145825796c8dcSSimon Schubert char *p = mnemonicendp - 2;
145835796c8dcSSimon Schubert mnemonicendp = stpcpy (p, "16b");
145845796c8dcSSimon Schubert bytemode = o_mode;
145855796c8dcSSimon Schubert }
14586*ef5ccd6cSJohn Marino else if ((prefixes & PREFIX_LOCK) != 0)
14587*ef5ccd6cSJohn Marino {
14588*ef5ccd6cSJohn Marino if (prefixes & PREFIX_REPZ)
14589*ef5ccd6cSJohn Marino all_prefixes[last_repz_prefix] = XRELEASE_PREFIX;
14590*ef5ccd6cSJohn Marino if (prefixes & PREFIX_REPNZ)
14591*ef5ccd6cSJohn Marino all_prefixes[last_repnz_prefix] = XACQUIRE_PREFIX;
14592*ef5ccd6cSJohn Marino }
14593*ef5ccd6cSJohn Marino
145945796c8dcSSimon Schubert OP_M (bytemode, sizeflag);
145955796c8dcSSimon Schubert }
145965796c8dcSSimon Schubert
145975796c8dcSSimon Schubert static void
XMM_Fixup(int reg,int sizeflag ATTRIBUTE_UNUSED)145985796c8dcSSimon Schubert XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
145995796c8dcSSimon Schubert {
14600cf7f2e2dSJohn Marino const char **names;
14601cf7f2e2dSJohn Marino
146025796c8dcSSimon Schubert if (need_vex)
146035796c8dcSSimon Schubert {
146045796c8dcSSimon Schubert switch (vex.length)
146055796c8dcSSimon Schubert {
146065796c8dcSSimon Schubert case 128:
14607cf7f2e2dSJohn Marino names = names_xmm;
146085796c8dcSSimon Schubert break;
146095796c8dcSSimon Schubert case 256:
14610cf7f2e2dSJohn Marino names = names_ymm;
146115796c8dcSSimon Schubert break;
146125796c8dcSSimon Schubert default:
146135796c8dcSSimon Schubert abort ();
146145796c8dcSSimon Schubert }
146155796c8dcSSimon Schubert }
146165796c8dcSSimon Schubert else
14617cf7f2e2dSJohn Marino names = names_xmm;
14618cf7f2e2dSJohn Marino oappend (names[reg]);
146195796c8dcSSimon Schubert }
146205796c8dcSSimon Schubert
146215796c8dcSSimon Schubert static void
CRC32_Fixup(int bytemode,int sizeflag)146225796c8dcSSimon Schubert CRC32_Fixup (int bytemode, int sizeflag)
146235796c8dcSSimon Schubert {
146245796c8dcSSimon Schubert /* Add proper suffix to "crc32". */
146255796c8dcSSimon Schubert char *p = mnemonicendp;
146265796c8dcSSimon Schubert
146275796c8dcSSimon Schubert switch (bytemode)
146285796c8dcSSimon Schubert {
146295796c8dcSSimon Schubert case b_mode:
146305796c8dcSSimon Schubert if (intel_syntax)
146315796c8dcSSimon Schubert goto skip;
146325796c8dcSSimon Schubert
146335796c8dcSSimon Schubert *p++ = 'b';
146345796c8dcSSimon Schubert break;
146355796c8dcSSimon Schubert case v_mode:
146365796c8dcSSimon Schubert if (intel_syntax)
146375796c8dcSSimon Schubert goto skip;
146385796c8dcSSimon Schubert
146395796c8dcSSimon Schubert USED_REX (REX_W);
146405796c8dcSSimon Schubert if (rex & REX_W)
146415796c8dcSSimon Schubert *p++ = 'q';
14642cf7f2e2dSJohn Marino else
14643cf7f2e2dSJohn Marino {
14644cf7f2e2dSJohn Marino if (sizeflag & DFLAG)
146455796c8dcSSimon Schubert *p++ = 'l';
146465796c8dcSSimon Schubert else
146475796c8dcSSimon Schubert *p++ = 'w';
146485796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
14649cf7f2e2dSJohn Marino }
146505796c8dcSSimon Schubert break;
146515796c8dcSSimon Schubert default:
146525796c8dcSSimon Schubert oappend (INTERNAL_DISASSEMBLER_ERROR);
146535796c8dcSSimon Schubert break;
146545796c8dcSSimon Schubert }
146555796c8dcSSimon Schubert mnemonicendp = p;
146565796c8dcSSimon Schubert *p = '\0';
146575796c8dcSSimon Schubert
146585796c8dcSSimon Schubert skip:
146595796c8dcSSimon Schubert if (modrm.mod == 3)
146605796c8dcSSimon Schubert {
146615796c8dcSSimon Schubert int add;
146625796c8dcSSimon Schubert
146635796c8dcSSimon Schubert /* Skip mod/rm byte. */
146645796c8dcSSimon Schubert MODRM_CHECK;
146655796c8dcSSimon Schubert codep++;
146665796c8dcSSimon Schubert
146675796c8dcSSimon Schubert USED_REX (REX_B);
146685796c8dcSSimon Schubert add = (rex & REX_B) ? 8 : 0;
146695796c8dcSSimon Schubert if (bytemode == b_mode)
146705796c8dcSSimon Schubert {
146715796c8dcSSimon Schubert USED_REX (0);
146725796c8dcSSimon Schubert if (rex)
146735796c8dcSSimon Schubert oappend (names8rex[modrm.rm + add]);
146745796c8dcSSimon Schubert else
146755796c8dcSSimon Schubert oappend (names8[modrm.rm + add]);
146765796c8dcSSimon Schubert }
146775796c8dcSSimon Schubert else
146785796c8dcSSimon Schubert {
146795796c8dcSSimon Schubert USED_REX (REX_W);
146805796c8dcSSimon Schubert if (rex & REX_W)
146815796c8dcSSimon Schubert oappend (names64[modrm.rm + add]);
146825796c8dcSSimon Schubert else if ((prefixes & PREFIX_DATA))
146835796c8dcSSimon Schubert oappend (names16[modrm.rm + add]);
146845796c8dcSSimon Schubert else
146855796c8dcSSimon Schubert oappend (names32[modrm.rm + add]);
146865796c8dcSSimon Schubert }
146875796c8dcSSimon Schubert }
146885796c8dcSSimon Schubert else
146895796c8dcSSimon Schubert OP_E (bytemode, sizeflag);
146905796c8dcSSimon Schubert }
146915796c8dcSSimon Schubert
14692cf7f2e2dSJohn Marino static void
FXSAVE_Fixup(int bytemode,int sizeflag)14693cf7f2e2dSJohn Marino FXSAVE_Fixup (int bytemode, int sizeflag)
14694cf7f2e2dSJohn Marino {
14695cf7f2e2dSJohn Marino /* Add proper suffix to "fxsave" and "fxrstor". */
14696cf7f2e2dSJohn Marino USED_REX (REX_W);
14697cf7f2e2dSJohn Marino if (rex & REX_W)
14698cf7f2e2dSJohn Marino {
14699cf7f2e2dSJohn Marino char *p = mnemonicendp;
14700cf7f2e2dSJohn Marino *p++ = '6';
14701cf7f2e2dSJohn Marino *p++ = '4';
14702cf7f2e2dSJohn Marino *p = '\0';
14703cf7f2e2dSJohn Marino mnemonicendp = p;
14704cf7f2e2dSJohn Marino }
14705cf7f2e2dSJohn Marino OP_M (bytemode, sizeflag);
14706cf7f2e2dSJohn Marino }
14707cf7f2e2dSJohn Marino
147085796c8dcSSimon Schubert /* Display the destination register operand for instructions with
147095796c8dcSSimon Schubert VEX. */
147105796c8dcSSimon Schubert
147115796c8dcSSimon Schubert static void
OP_VEX(int bytemode,int sizeflag ATTRIBUTE_UNUSED)147125796c8dcSSimon Schubert OP_VEX (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
147135796c8dcSSimon Schubert {
14714cf7f2e2dSJohn Marino int reg;
14715cf7f2e2dSJohn Marino const char **names;
14716cf7f2e2dSJohn Marino
147175796c8dcSSimon Schubert if (!need_vex)
147185796c8dcSSimon Schubert abort ();
147195796c8dcSSimon Schubert
147205796c8dcSSimon Schubert if (!need_vex_reg)
147215796c8dcSSimon Schubert return;
147225796c8dcSSimon Schubert
14723cf7f2e2dSJohn Marino reg = vex.register_specifier;
14724cf7f2e2dSJohn Marino if (bytemode == vex_scalar_mode)
14725cf7f2e2dSJohn Marino {
14726cf7f2e2dSJohn Marino oappend (names_xmm[reg]);
14727cf7f2e2dSJohn Marino return;
14728cf7f2e2dSJohn Marino }
14729cf7f2e2dSJohn Marino
147305796c8dcSSimon Schubert switch (vex.length)
147315796c8dcSSimon Schubert {
147325796c8dcSSimon Schubert case 128:
147335796c8dcSSimon Schubert switch (bytemode)
147345796c8dcSSimon Schubert {
147355796c8dcSSimon Schubert case vex_mode:
147365796c8dcSSimon Schubert case vex128_mode:
14737a45ae5f8SJohn Marino case vex_vsib_q_w_dq_mode:
14738c50c785cSJohn Marino names = names_xmm;
14739c50c785cSJohn Marino break;
14740c50c785cSJohn Marino case dq_mode:
14741c50c785cSJohn Marino if (vex.w)
14742c50c785cSJohn Marino names = names64;
14743c50c785cSJohn Marino else
14744c50c785cSJohn Marino names = names32;
147455796c8dcSSimon Schubert break;
147465796c8dcSSimon Schubert default:
147475796c8dcSSimon Schubert abort ();
147485796c8dcSSimon Schubert return;
147495796c8dcSSimon Schubert }
147505796c8dcSSimon Schubert break;
147515796c8dcSSimon Schubert case 256:
147525796c8dcSSimon Schubert switch (bytemode)
147535796c8dcSSimon Schubert {
147545796c8dcSSimon Schubert case vex_mode:
147555796c8dcSSimon Schubert case vex256_mode:
14756a45ae5f8SJohn Marino names = names_ymm;
14757a45ae5f8SJohn Marino break;
14758a45ae5f8SJohn Marino case vex_vsib_q_w_dq_mode:
14759a45ae5f8SJohn Marino names = vex.w ? names_ymm : names_xmm;
147605796c8dcSSimon Schubert break;
147615796c8dcSSimon Schubert default:
147625796c8dcSSimon Schubert abort ();
147635796c8dcSSimon Schubert return;
147645796c8dcSSimon Schubert }
147655796c8dcSSimon Schubert break;
147665796c8dcSSimon Schubert default:
147675796c8dcSSimon Schubert abort ();
147685796c8dcSSimon Schubert break;
147695796c8dcSSimon Schubert }
14770cf7f2e2dSJohn Marino oappend (names[reg]);
147715796c8dcSSimon Schubert }
147725796c8dcSSimon Schubert
147735796c8dcSSimon Schubert /* Get the VEX immediate byte without moving codep. */
147745796c8dcSSimon Schubert
147755796c8dcSSimon Schubert static unsigned char
get_vex_imm8(int sizeflag,int opnum)14776cf7f2e2dSJohn Marino get_vex_imm8 (int sizeflag, int opnum)
147775796c8dcSSimon Schubert {
147785796c8dcSSimon Schubert int bytes_before_imm = 0;
147795796c8dcSSimon Schubert
147805796c8dcSSimon Schubert if (modrm.mod != 3)
147815796c8dcSSimon Schubert {
147825796c8dcSSimon Schubert /* There are SIB/displacement bytes. */
147835796c8dcSSimon Schubert if ((sizeflag & AFLAG) || address_mode == mode_64bit)
147845796c8dcSSimon Schubert {
147855796c8dcSSimon Schubert /* 32/64 bit address mode */
147865796c8dcSSimon Schubert int base = modrm.rm;
147875796c8dcSSimon Schubert
147885796c8dcSSimon Schubert /* Check SIB byte. */
147895796c8dcSSimon Schubert if (base == 4)
147905796c8dcSSimon Schubert {
147915796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
147925796c8dcSSimon Schubert base = *codep & 7;
14793cf7f2e2dSJohn Marino /* When decoding the third source, don't increase
14794cf7f2e2dSJohn Marino bytes_before_imm as this has already been incremented
14795cf7f2e2dSJohn Marino by one in OP_E_memory while decoding the second
14796cf7f2e2dSJohn Marino source operand. */
14797cf7f2e2dSJohn Marino if (opnum == 0)
147985796c8dcSSimon Schubert bytes_before_imm++;
147995796c8dcSSimon Schubert }
148005796c8dcSSimon Schubert
14801cf7f2e2dSJohn Marino /* Don't increase bytes_before_imm when decoding the third source,
14802cf7f2e2dSJohn Marino it has already been incremented by OP_E_memory while decoding
14803cf7f2e2dSJohn Marino the second source operand. */
14804cf7f2e2dSJohn Marino if (opnum == 0)
14805cf7f2e2dSJohn Marino {
148065796c8dcSSimon Schubert switch (modrm.mod)
148075796c8dcSSimon Schubert {
148085796c8dcSSimon Schubert case 0:
148095796c8dcSSimon Schubert /* When modrm.rm == 5 or modrm.rm == 4 and base in
148105796c8dcSSimon Schubert SIB == 5, there is a 4 byte displacement. */
148115796c8dcSSimon Schubert if (base != 5)
148125796c8dcSSimon Schubert /* No displacement. */
148135796c8dcSSimon Schubert break;
148145796c8dcSSimon Schubert case 2:
148155796c8dcSSimon Schubert /* 4 byte displacement. */
148165796c8dcSSimon Schubert bytes_before_imm += 4;
148175796c8dcSSimon Schubert break;
148185796c8dcSSimon Schubert case 1:
148195796c8dcSSimon Schubert /* 1 byte displacement. */
148205796c8dcSSimon Schubert bytes_before_imm++;
148215796c8dcSSimon Schubert break;
148225796c8dcSSimon Schubert }
148235796c8dcSSimon Schubert }
14824cf7f2e2dSJohn Marino }
148255796c8dcSSimon Schubert else
14826cf7f2e2dSJohn Marino {
14827cf7f2e2dSJohn Marino /* 16 bit address mode */
14828cf7f2e2dSJohn Marino /* Don't increase bytes_before_imm when decoding the third source,
14829cf7f2e2dSJohn Marino it has already been incremented by OP_E_memory while decoding
14830cf7f2e2dSJohn Marino the second source operand. */
14831cf7f2e2dSJohn Marino if (opnum == 0)
14832cf7f2e2dSJohn Marino {
148335796c8dcSSimon Schubert switch (modrm.mod)
148345796c8dcSSimon Schubert {
148355796c8dcSSimon Schubert case 0:
148365796c8dcSSimon Schubert /* When modrm.rm == 6, there is a 2 byte displacement. */
148375796c8dcSSimon Schubert if (modrm.rm != 6)
148385796c8dcSSimon Schubert /* No displacement. */
148395796c8dcSSimon Schubert break;
148405796c8dcSSimon Schubert case 2:
148415796c8dcSSimon Schubert /* 2 byte displacement. */
148425796c8dcSSimon Schubert bytes_before_imm += 2;
148435796c8dcSSimon Schubert break;
148445796c8dcSSimon Schubert case 1:
14845cf7f2e2dSJohn Marino /* 1 byte displacement: when decoding the third source,
14846cf7f2e2dSJohn Marino don't increase bytes_before_imm as this has already
14847cf7f2e2dSJohn Marino been incremented by one in OP_E_memory while decoding
14848cf7f2e2dSJohn Marino the second source operand. */
14849cf7f2e2dSJohn Marino if (opnum == 0)
148505796c8dcSSimon Schubert bytes_before_imm++;
14851cf7f2e2dSJohn Marino
148525796c8dcSSimon Schubert break;
148535796c8dcSSimon Schubert }
148545796c8dcSSimon Schubert }
148555796c8dcSSimon Schubert }
14856cf7f2e2dSJohn Marino }
148575796c8dcSSimon Schubert
148585796c8dcSSimon Schubert FETCH_DATA (the_info, codep + bytes_before_imm + 1);
148595796c8dcSSimon Schubert return codep [bytes_before_imm];
148605796c8dcSSimon Schubert }
148615796c8dcSSimon Schubert
148625796c8dcSSimon Schubert static void
OP_EX_VexReg(int bytemode,int sizeflag,int reg)148635796c8dcSSimon Schubert OP_EX_VexReg (int bytemode, int sizeflag, int reg)
148645796c8dcSSimon Schubert {
14865cf7f2e2dSJohn Marino const char **names;
14866cf7f2e2dSJohn Marino
148675796c8dcSSimon Schubert if (reg == -1 && modrm.mod != 3)
148685796c8dcSSimon Schubert {
148695796c8dcSSimon Schubert OP_E_memory (bytemode, sizeflag);
148705796c8dcSSimon Schubert return;
148715796c8dcSSimon Schubert }
148725796c8dcSSimon Schubert else
148735796c8dcSSimon Schubert {
148745796c8dcSSimon Schubert if (reg == -1)
148755796c8dcSSimon Schubert {
148765796c8dcSSimon Schubert reg = modrm.rm;
148775796c8dcSSimon Schubert USED_REX (REX_B);
148785796c8dcSSimon Schubert if (rex & REX_B)
148795796c8dcSSimon Schubert reg += 8;
148805796c8dcSSimon Schubert }
148815796c8dcSSimon Schubert else if (reg > 7 && address_mode != mode_64bit)
148825796c8dcSSimon Schubert BadOp ();
148835796c8dcSSimon Schubert }
148845796c8dcSSimon Schubert
148855796c8dcSSimon Schubert switch (vex.length)
148865796c8dcSSimon Schubert {
148875796c8dcSSimon Schubert case 128:
14888cf7f2e2dSJohn Marino names = names_xmm;
148895796c8dcSSimon Schubert break;
148905796c8dcSSimon Schubert case 256:
14891cf7f2e2dSJohn Marino names = names_ymm;
148925796c8dcSSimon Schubert break;
148935796c8dcSSimon Schubert default:
148945796c8dcSSimon Schubert abort ();
148955796c8dcSSimon Schubert }
14896cf7f2e2dSJohn Marino oappend (names[reg]);
14897cf7f2e2dSJohn Marino }
14898cf7f2e2dSJohn Marino
14899cf7f2e2dSJohn Marino static void
OP_EX_VexImmW(int bytemode,int sizeflag)14900cf7f2e2dSJohn Marino OP_EX_VexImmW (int bytemode, int sizeflag)
14901cf7f2e2dSJohn Marino {
14902cf7f2e2dSJohn Marino int reg = -1;
14903cf7f2e2dSJohn Marino static unsigned char vex_imm8;
14904cf7f2e2dSJohn Marino
14905cf7f2e2dSJohn Marino if (vex_w_done == 0)
14906cf7f2e2dSJohn Marino {
14907cf7f2e2dSJohn Marino vex_w_done = 1;
14908cf7f2e2dSJohn Marino
14909cf7f2e2dSJohn Marino /* Skip mod/rm byte. */
14910cf7f2e2dSJohn Marino MODRM_CHECK;
14911cf7f2e2dSJohn Marino codep++;
14912cf7f2e2dSJohn Marino
14913cf7f2e2dSJohn Marino vex_imm8 = get_vex_imm8 (sizeflag, 0);
14914cf7f2e2dSJohn Marino
14915cf7f2e2dSJohn Marino if (vex.w)
14916cf7f2e2dSJohn Marino reg = vex_imm8 >> 4;
14917cf7f2e2dSJohn Marino
14918cf7f2e2dSJohn Marino OP_EX_VexReg (bytemode, sizeflag, reg);
14919cf7f2e2dSJohn Marino }
14920cf7f2e2dSJohn Marino else if (vex_w_done == 1)
14921cf7f2e2dSJohn Marino {
14922cf7f2e2dSJohn Marino vex_w_done = 2;
14923cf7f2e2dSJohn Marino
14924cf7f2e2dSJohn Marino if (!vex.w)
14925cf7f2e2dSJohn Marino reg = vex_imm8 >> 4;
14926cf7f2e2dSJohn Marino
14927cf7f2e2dSJohn Marino OP_EX_VexReg (bytemode, sizeflag, reg);
14928cf7f2e2dSJohn Marino }
14929cf7f2e2dSJohn Marino else
14930cf7f2e2dSJohn Marino {
14931cf7f2e2dSJohn Marino /* Output the imm8 directly. */
14932cf7f2e2dSJohn Marino scratchbuf[0] = '$';
14933cf7f2e2dSJohn Marino print_operand_value (scratchbuf + 1, 1, vex_imm8 & 0xf);
149345796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
14935cf7f2e2dSJohn Marino scratchbuf[0] = '\0';
14936cf7f2e2dSJohn Marino codep++;
14937cf7f2e2dSJohn Marino }
14938cf7f2e2dSJohn Marino }
14939cf7f2e2dSJohn Marino
14940cf7f2e2dSJohn Marino static void
OP_Vex_2src(int bytemode,int sizeflag)14941cf7f2e2dSJohn Marino OP_Vex_2src (int bytemode, int sizeflag)
14942cf7f2e2dSJohn Marino {
14943cf7f2e2dSJohn Marino if (modrm.mod == 3)
14944cf7f2e2dSJohn Marino {
14945cf7f2e2dSJohn Marino int reg = modrm.rm;
14946cf7f2e2dSJohn Marino USED_REX (REX_B);
14947cf7f2e2dSJohn Marino if (rex & REX_B)
14948cf7f2e2dSJohn Marino reg += 8;
14949cf7f2e2dSJohn Marino oappend (names_xmm[reg]);
14950cf7f2e2dSJohn Marino }
14951cf7f2e2dSJohn Marino else
14952cf7f2e2dSJohn Marino {
14953cf7f2e2dSJohn Marino if (intel_syntax
14954cf7f2e2dSJohn Marino && (bytemode == v_mode || bytemode == v_swap_mode))
14955cf7f2e2dSJohn Marino {
14956cf7f2e2dSJohn Marino bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
14957cf7f2e2dSJohn Marino used_prefixes |= (prefixes & PREFIX_DATA);
14958cf7f2e2dSJohn Marino }
14959cf7f2e2dSJohn Marino OP_E (bytemode, sizeflag);
14960cf7f2e2dSJohn Marino }
14961cf7f2e2dSJohn Marino }
14962cf7f2e2dSJohn Marino
14963cf7f2e2dSJohn Marino static void
OP_Vex_2src_1(int bytemode,int sizeflag)14964cf7f2e2dSJohn Marino OP_Vex_2src_1 (int bytemode, int sizeflag)
14965cf7f2e2dSJohn Marino {
14966cf7f2e2dSJohn Marino if (modrm.mod == 3)
14967cf7f2e2dSJohn Marino {
14968cf7f2e2dSJohn Marino /* Skip mod/rm byte. */
14969cf7f2e2dSJohn Marino MODRM_CHECK;
14970cf7f2e2dSJohn Marino codep++;
14971cf7f2e2dSJohn Marino }
14972cf7f2e2dSJohn Marino
14973cf7f2e2dSJohn Marino if (vex.w)
14974cf7f2e2dSJohn Marino oappend (names_xmm[vex.register_specifier]);
14975cf7f2e2dSJohn Marino else
14976cf7f2e2dSJohn Marino OP_Vex_2src (bytemode, sizeflag);
14977cf7f2e2dSJohn Marino }
14978cf7f2e2dSJohn Marino
14979cf7f2e2dSJohn Marino static void
OP_Vex_2src_2(int bytemode,int sizeflag)14980cf7f2e2dSJohn Marino OP_Vex_2src_2 (int bytemode, int sizeflag)
14981cf7f2e2dSJohn Marino {
14982cf7f2e2dSJohn Marino if (vex.w)
14983cf7f2e2dSJohn Marino OP_Vex_2src (bytemode, sizeflag);
14984cf7f2e2dSJohn Marino else
14985cf7f2e2dSJohn Marino oappend (names_xmm[vex.register_specifier]);
149865796c8dcSSimon Schubert }
149875796c8dcSSimon Schubert
149885796c8dcSSimon Schubert static void
OP_EX_VexW(int bytemode,int sizeflag)149895796c8dcSSimon Schubert OP_EX_VexW (int bytemode, int sizeflag)
149905796c8dcSSimon Schubert {
149915796c8dcSSimon Schubert int reg = -1;
149925796c8dcSSimon Schubert
149935796c8dcSSimon Schubert if (!vex_w_done)
149945796c8dcSSimon Schubert {
149955796c8dcSSimon Schubert vex_w_done = 1;
14996cf7f2e2dSJohn Marino
14997cf7f2e2dSJohn Marino /* Skip mod/rm byte. */
14998cf7f2e2dSJohn Marino MODRM_CHECK;
14999cf7f2e2dSJohn Marino codep++;
15000cf7f2e2dSJohn Marino
150015796c8dcSSimon Schubert if (vex.w)
15002cf7f2e2dSJohn Marino reg = get_vex_imm8 (sizeflag, 0) >> 4;
150035796c8dcSSimon Schubert }
150045796c8dcSSimon Schubert else
150055796c8dcSSimon Schubert {
150065796c8dcSSimon Schubert if (!vex.w)
15007cf7f2e2dSJohn Marino reg = get_vex_imm8 (sizeflag, 1) >> 4;
150085796c8dcSSimon Schubert }
150095796c8dcSSimon Schubert
150105796c8dcSSimon Schubert OP_EX_VexReg (bytemode, sizeflag, reg);
150115796c8dcSSimon Schubert }
150125796c8dcSSimon Schubert
150135796c8dcSSimon Schubert static void
VEXI4_Fixup(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)150145796c8dcSSimon Schubert VEXI4_Fixup (int bytemode ATTRIBUTE_UNUSED,
150155796c8dcSSimon Schubert int sizeflag ATTRIBUTE_UNUSED)
150165796c8dcSSimon Schubert {
150175796c8dcSSimon Schubert /* Skip the immediate byte and check for invalid bits. */
150185796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
150195796c8dcSSimon Schubert if (*codep++ & 0xf)
150205796c8dcSSimon Schubert BadOp ();
150215796c8dcSSimon Schubert }
150225796c8dcSSimon Schubert
150235796c8dcSSimon Schubert static void
OP_REG_VexI4(int bytemode,int sizeflag ATTRIBUTE_UNUSED)150245796c8dcSSimon Schubert OP_REG_VexI4 (int bytemode, int sizeflag ATTRIBUTE_UNUSED)
150255796c8dcSSimon Schubert {
150265796c8dcSSimon Schubert int reg;
15027cf7f2e2dSJohn Marino const char **names;
15028cf7f2e2dSJohn Marino
150295796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
150305796c8dcSSimon Schubert reg = *codep++;
150315796c8dcSSimon Schubert
150325796c8dcSSimon Schubert if (bytemode != x_mode)
150335796c8dcSSimon Schubert abort ();
150345796c8dcSSimon Schubert
150355796c8dcSSimon Schubert if (reg & 0xf)
150365796c8dcSSimon Schubert BadOp ();
150375796c8dcSSimon Schubert
150385796c8dcSSimon Schubert reg >>= 4;
150395796c8dcSSimon Schubert if (reg > 7 && address_mode != mode_64bit)
150405796c8dcSSimon Schubert BadOp ();
150415796c8dcSSimon Schubert
150425796c8dcSSimon Schubert switch (vex.length)
150435796c8dcSSimon Schubert {
150445796c8dcSSimon Schubert case 128:
15045cf7f2e2dSJohn Marino names = names_xmm;
150465796c8dcSSimon Schubert break;
150475796c8dcSSimon Schubert case 256:
15048cf7f2e2dSJohn Marino names = names_ymm;
150495796c8dcSSimon Schubert break;
150505796c8dcSSimon Schubert default:
150515796c8dcSSimon Schubert abort ();
150525796c8dcSSimon Schubert }
15053cf7f2e2dSJohn Marino oappend (names[reg]);
150545796c8dcSSimon Schubert }
150555796c8dcSSimon Schubert
150565796c8dcSSimon Schubert static void
OP_XMM_VexW(int bytemode,int sizeflag)150575796c8dcSSimon Schubert OP_XMM_VexW (int bytemode, int sizeflag)
150585796c8dcSSimon Schubert {
150595796c8dcSSimon Schubert /* Turn off the REX.W bit since it is used for swapping operands
150605796c8dcSSimon Schubert now. */
150615796c8dcSSimon Schubert rex &= ~REX_W;
150625796c8dcSSimon Schubert OP_XMM (bytemode, sizeflag);
150635796c8dcSSimon Schubert }
150645796c8dcSSimon Schubert
150655796c8dcSSimon Schubert static void
OP_EX_Vex(int bytemode,int sizeflag)150665796c8dcSSimon Schubert OP_EX_Vex (int bytemode, int sizeflag)
150675796c8dcSSimon Schubert {
150685796c8dcSSimon Schubert if (modrm.mod != 3)
150695796c8dcSSimon Schubert {
150705796c8dcSSimon Schubert if (vex.register_specifier != 0)
150715796c8dcSSimon Schubert BadOp ();
150725796c8dcSSimon Schubert need_vex_reg = 0;
150735796c8dcSSimon Schubert }
150745796c8dcSSimon Schubert OP_EX (bytemode, sizeflag);
150755796c8dcSSimon Schubert }
150765796c8dcSSimon Schubert
150775796c8dcSSimon Schubert static void
OP_XMM_Vex(int bytemode,int sizeflag)150785796c8dcSSimon Schubert OP_XMM_Vex (int bytemode, int sizeflag)
150795796c8dcSSimon Schubert {
150805796c8dcSSimon Schubert if (modrm.mod != 3)
150815796c8dcSSimon Schubert {
150825796c8dcSSimon Schubert if (vex.register_specifier != 0)
150835796c8dcSSimon Schubert BadOp ();
150845796c8dcSSimon Schubert need_vex_reg = 0;
150855796c8dcSSimon Schubert }
150865796c8dcSSimon Schubert OP_XMM (bytemode, sizeflag);
150875796c8dcSSimon Schubert }
150885796c8dcSSimon Schubert
150895796c8dcSSimon Schubert static void
VZERO_Fixup(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)150905796c8dcSSimon Schubert VZERO_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
150915796c8dcSSimon Schubert {
150925796c8dcSSimon Schubert switch (vex.length)
150935796c8dcSSimon Schubert {
150945796c8dcSSimon Schubert case 128:
150955796c8dcSSimon Schubert mnemonicendp = stpcpy (obuf, "vzeroupper");
150965796c8dcSSimon Schubert break;
150975796c8dcSSimon Schubert case 256:
150985796c8dcSSimon Schubert mnemonicendp = stpcpy (obuf, "vzeroall");
150995796c8dcSSimon Schubert break;
151005796c8dcSSimon Schubert default:
151015796c8dcSSimon Schubert abort ();
151025796c8dcSSimon Schubert }
151035796c8dcSSimon Schubert }
151045796c8dcSSimon Schubert
151055796c8dcSSimon Schubert static struct op vex_cmp_op[] =
151065796c8dcSSimon Schubert {
151075796c8dcSSimon Schubert { STRING_COMMA_LEN ("eq") },
151085796c8dcSSimon Schubert { STRING_COMMA_LEN ("lt") },
151095796c8dcSSimon Schubert { STRING_COMMA_LEN ("le") },
151105796c8dcSSimon Schubert { STRING_COMMA_LEN ("unord") },
151115796c8dcSSimon Schubert { STRING_COMMA_LEN ("neq") },
151125796c8dcSSimon Schubert { STRING_COMMA_LEN ("nlt") },
151135796c8dcSSimon Schubert { STRING_COMMA_LEN ("nle") },
151145796c8dcSSimon Schubert { STRING_COMMA_LEN ("ord") },
151155796c8dcSSimon Schubert { STRING_COMMA_LEN ("eq_uq") },
151165796c8dcSSimon Schubert { STRING_COMMA_LEN ("nge") },
151175796c8dcSSimon Schubert { STRING_COMMA_LEN ("ngt") },
151185796c8dcSSimon Schubert { STRING_COMMA_LEN ("false") },
151195796c8dcSSimon Schubert { STRING_COMMA_LEN ("neq_oq") },
151205796c8dcSSimon Schubert { STRING_COMMA_LEN ("ge") },
151215796c8dcSSimon Schubert { STRING_COMMA_LEN ("gt") },
151225796c8dcSSimon Schubert { STRING_COMMA_LEN ("true") },
151235796c8dcSSimon Schubert { STRING_COMMA_LEN ("eq_os") },
151245796c8dcSSimon Schubert { STRING_COMMA_LEN ("lt_oq") },
151255796c8dcSSimon Schubert { STRING_COMMA_LEN ("le_oq") },
151265796c8dcSSimon Schubert { STRING_COMMA_LEN ("unord_s") },
151275796c8dcSSimon Schubert { STRING_COMMA_LEN ("neq_us") },
151285796c8dcSSimon Schubert { STRING_COMMA_LEN ("nlt_uq") },
151295796c8dcSSimon Schubert { STRING_COMMA_LEN ("nle_uq") },
151305796c8dcSSimon Schubert { STRING_COMMA_LEN ("ord_s") },
151315796c8dcSSimon Schubert { STRING_COMMA_LEN ("eq_us") },
151325796c8dcSSimon Schubert { STRING_COMMA_LEN ("nge_uq") },
151335796c8dcSSimon Schubert { STRING_COMMA_LEN ("ngt_uq") },
151345796c8dcSSimon Schubert { STRING_COMMA_LEN ("false_os") },
151355796c8dcSSimon Schubert { STRING_COMMA_LEN ("neq_os") },
151365796c8dcSSimon Schubert { STRING_COMMA_LEN ("ge_oq") },
151375796c8dcSSimon Schubert { STRING_COMMA_LEN ("gt_oq") },
151385796c8dcSSimon Schubert { STRING_COMMA_LEN ("true_us") },
151395796c8dcSSimon Schubert };
151405796c8dcSSimon Schubert
151415796c8dcSSimon Schubert static void
VCMP_Fixup(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)151425796c8dcSSimon Schubert VCMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
151435796c8dcSSimon Schubert {
151445796c8dcSSimon Schubert unsigned int cmp_type;
151455796c8dcSSimon Schubert
151465796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
151475796c8dcSSimon Schubert cmp_type = *codep++ & 0xff;
151485796c8dcSSimon Schubert if (cmp_type < ARRAY_SIZE (vex_cmp_op))
151495796c8dcSSimon Schubert {
151505796c8dcSSimon Schubert char suffix [3];
151515796c8dcSSimon Schubert char *p = mnemonicendp - 2;
151525796c8dcSSimon Schubert suffix[0] = p[0];
151535796c8dcSSimon Schubert suffix[1] = p[1];
151545796c8dcSSimon Schubert suffix[2] = '\0';
151555796c8dcSSimon Schubert sprintf (p, "%s%s", vex_cmp_op[cmp_type].name, suffix);
151565796c8dcSSimon Schubert mnemonicendp += vex_cmp_op[cmp_type].len;
151575796c8dcSSimon Schubert }
151585796c8dcSSimon Schubert else
151595796c8dcSSimon Schubert {
151605796c8dcSSimon Schubert /* We have a reserved extension byte. Output it directly. */
151615796c8dcSSimon Schubert scratchbuf[0] = '$';
151625796c8dcSSimon Schubert print_operand_value (scratchbuf + 1, 1, cmp_type);
151635796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
151645796c8dcSSimon Schubert scratchbuf[0] = '\0';
151655796c8dcSSimon Schubert }
151665796c8dcSSimon Schubert }
151675796c8dcSSimon Schubert
151685796c8dcSSimon Schubert static const struct op pclmul_op[] =
151695796c8dcSSimon Schubert {
151705796c8dcSSimon Schubert { STRING_COMMA_LEN ("lql") },
151715796c8dcSSimon Schubert { STRING_COMMA_LEN ("hql") },
151725796c8dcSSimon Schubert { STRING_COMMA_LEN ("lqh") },
151735796c8dcSSimon Schubert { STRING_COMMA_LEN ("hqh") }
151745796c8dcSSimon Schubert };
151755796c8dcSSimon Schubert
151765796c8dcSSimon Schubert static void
PCLMUL_Fixup(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)151775796c8dcSSimon Schubert PCLMUL_Fixup (int bytemode ATTRIBUTE_UNUSED,
151785796c8dcSSimon Schubert int sizeflag ATTRIBUTE_UNUSED)
151795796c8dcSSimon Schubert {
151805796c8dcSSimon Schubert unsigned int pclmul_type;
151815796c8dcSSimon Schubert
151825796c8dcSSimon Schubert FETCH_DATA (the_info, codep + 1);
151835796c8dcSSimon Schubert pclmul_type = *codep++ & 0xff;
151845796c8dcSSimon Schubert switch (pclmul_type)
151855796c8dcSSimon Schubert {
151865796c8dcSSimon Schubert case 0x10:
151875796c8dcSSimon Schubert pclmul_type = 2;
151885796c8dcSSimon Schubert break;
151895796c8dcSSimon Schubert case 0x11:
151905796c8dcSSimon Schubert pclmul_type = 3;
151915796c8dcSSimon Schubert break;
151925796c8dcSSimon Schubert default:
151935796c8dcSSimon Schubert break;
151945796c8dcSSimon Schubert }
151955796c8dcSSimon Schubert if (pclmul_type < ARRAY_SIZE (pclmul_op))
151965796c8dcSSimon Schubert {
151975796c8dcSSimon Schubert char suffix [4];
151985796c8dcSSimon Schubert char *p = mnemonicendp - 3;
151995796c8dcSSimon Schubert suffix[0] = p[0];
152005796c8dcSSimon Schubert suffix[1] = p[1];
152015796c8dcSSimon Schubert suffix[2] = p[2];
152025796c8dcSSimon Schubert suffix[3] = '\0';
152035796c8dcSSimon Schubert sprintf (p, "%s%s", pclmul_op[pclmul_type].name, suffix);
152045796c8dcSSimon Schubert mnemonicendp += pclmul_op[pclmul_type].len;
152055796c8dcSSimon Schubert }
152065796c8dcSSimon Schubert else
152075796c8dcSSimon Schubert {
152085796c8dcSSimon Schubert /* We have a reserved extension byte. Output it directly. */
152095796c8dcSSimon Schubert scratchbuf[0] = '$';
152105796c8dcSSimon Schubert print_operand_value (scratchbuf + 1, 1, pclmul_type);
152115796c8dcSSimon Schubert oappend (scratchbuf + intel_syntax);
152125796c8dcSSimon Schubert scratchbuf[0] = '\0';
152135796c8dcSSimon Schubert }
152145796c8dcSSimon Schubert }
152155796c8dcSSimon Schubert
152165796c8dcSSimon Schubert static void
MOVBE_Fixup(int bytemode,int sizeflag)152175796c8dcSSimon Schubert MOVBE_Fixup (int bytemode, int sizeflag)
152185796c8dcSSimon Schubert {
152195796c8dcSSimon Schubert /* Add proper suffix to "movbe". */
152205796c8dcSSimon Schubert char *p = mnemonicendp;
152215796c8dcSSimon Schubert
152225796c8dcSSimon Schubert switch (bytemode)
152235796c8dcSSimon Schubert {
152245796c8dcSSimon Schubert case v_mode:
152255796c8dcSSimon Schubert if (intel_syntax)
152265796c8dcSSimon Schubert goto skip;
152275796c8dcSSimon Schubert
152285796c8dcSSimon Schubert USED_REX (REX_W);
152295796c8dcSSimon Schubert if (sizeflag & SUFFIX_ALWAYS)
152305796c8dcSSimon Schubert {
152315796c8dcSSimon Schubert if (rex & REX_W)
152325796c8dcSSimon Schubert *p++ = 'q';
15233cf7f2e2dSJohn Marino else
15234cf7f2e2dSJohn Marino {
15235cf7f2e2dSJohn Marino if (sizeflag & DFLAG)
152365796c8dcSSimon Schubert *p++ = 'l';
152375796c8dcSSimon Schubert else
152385796c8dcSSimon Schubert *p++ = 'w';
152395796c8dcSSimon Schubert used_prefixes |= (prefixes & PREFIX_DATA);
15240cf7f2e2dSJohn Marino }
15241cf7f2e2dSJohn Marino }
152425796c8dcSSimon Schubert break;
152435796c8dcSSimon Schubert default:
152445796c8dcSSimon Schubert oappend (INTERNAL_DISASSEMBLER_ERROR);
152455796c8dcSSimon Schubert break;
152465796c8dcSSimon Schubert }
152475796c8dcSSimon Schubert mnemonicendp = p;
152485796c8dcSSimon Schubert *p = '\0';
152495796c8dcSSimon Schubert
152505796c8dcSSimon Schubert skip:
152515796c8dcSSimon Schubert OP_M (bytemode, sizeflag);
152525796c8dcSSimon Schubert }
15253cf7f2e2dSJohn Marino
15254cf7f2e2dSJohn Marino static void
OP_LWPCB_E(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)15255cf7f2e2dSJohn Marino OP_LWPCB_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15256cf7f2e2dSJohn Marino {
15257cf7f2e2dSJohn Marino int reg;
15258cf7f2e2dSJohn Marino const char **names;
15259cf7f2e2dSJohn Marino
15260cf7f2e2dSJohn Marino /* Skip mod/rm byte. */
15261cf7f2e2dSJohn Marino MODRM_CHECK;
15262cf7f2e2dSJohn Marino codep++;
15263cf7f2e2dSJohn Marino
15264cf7f2e2dSJohn Marino if (vex.w)
15265cf7f2e2dSJohn Marino names = names64;
15266cf7f2e2dSJohn Marino else
15267cf7f2e2dSJohn Marino names = names32;
15268cf7f2e2dSJohn Marino
15269cf7f2e2dSJohn Marino reg = modrm.rm;
15270cf7f2e2dSJohn Marino USED_REX (REX_B);
15271cf7f2e2dSJohn Marino if (rex & REX_B)
15272cf7f2e2dSJohn Marino reg += 8;
15273cf7f2e2dSJohn Marino
15274cf7f2e2dSJohn Marino oappend (names[reg]);
15275cf7f2e2dSJohn Marino }
15276cf7f2e2dSJohn Marino
15277cf7f2e2dSJohn Marino static void
OP_LWP_E(int bytemode ATTRIBUTE_UNUSED,int sizeflag ATTRIBUTE_UNUSED)15278cf7f2e2dSJohn Marino OP_LWP_E (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
15279cf7f2e2dSJohn Marino {
15280cf7f2e2dSJohn Marino const char **names;
15281cf7f2e2dSJohn Marino
15282cf7f2e2dSJohn Marino if (vex.w)
15283cf7f2e2dSJohn Marino names = names64;
15284cf7f2e2dSJohn Marino else
15285cf7f2e2dSJohn Marino names = names32;
15286cf7f2e2dSJohn Marino
15287cf7f2e2dSJohn Marino oappend (names[vex.register_specifier]);
15288cf7f2e2dSJohn Marino }
15289