-/* has direction bit. */
-#define D 0
-/* set if operands can be words or dwords encoded the canonical way */
-#define W (D + 1)
-/* insn has a modrm byte. */
-#define Modrm (W + 1)
-/* register is in low 3 bits of opcode */
-#define ShortForm (Modrm + 1)
-/* special case for jump insns. */
-#define Jump (ShortForm + 1)
-/* call and jump */
-#define JumpDword (Jump + 1)
-/* loop and jecxz */
-#define JumpByte (JumpDword + 1)
-/* special case for intersegment leaps/calls */
-#define JumpInterSegment (JumpByte + 1)
-/* FP insn memory format bit, sized by 0x4 */
-#define FloatMF (JumpInterSegment + 1)
-/* src/dest swap for floats. */
-#define FloatR (FloatMF + 1)
-/* has float insn direction bit. */
-#define FloatD (FloatR + 1)
-/* needs size prefix if in 32-bit mode */
-#define Size16 (FloatD + 1)
-/* needs size prefix if in 16-bit mode */
-#define Size32 (Size16 + 1)
-/* needs size prefix if in 64-bit mode */
-#define Size64 (Size32 + 1)
-/* instruction ignores operand size prefix */
-#define IgnoreSize (Size64 + 1)
-/* default insn size depends on mode */
-#define DefaultSize (IgnoreSize + 1)
-/* b suffix on instruction illegal */
-#define No_bSuf (DefaultSize + 1)
-/* w suffix on instruction illegal */
-#define No_wSuf (No_bSuf + 1)
-/* l suffix on instruction illegal */
-#define No_lSuf (No_wSuf + 1)
-/* s suffix on instruction illegal */
-#define No_sSuf (No_lSuf + 1)
-/* q suffix on instruction illegal */
-#define No_qSuf (No_sSuf + 1)
-/* x suffix on instruction illegal */
-#define No_xSuf (No_qSuf + 1)
-/* instruction needs FWAIT */
-#define FWait (No_xSuf + 1)
-/* quick test for string instructions */
-#define IsString (FWait + 1)
-/* fake an extra reg operand for clr, imul and special register
- processing for some instructions. */
-#define RegKludge (IsString + 1)
-/* opcode is a prefix */
-#define IsPrefix (RegKludge + 1)
-/* instruction has extension in 8 bit imm */
-#define ImmExt (IsPrefix + 1)
-/* instruction don't need Rex64 prefix. */
-#define NoRex64 (ImmExt + 1)
-/* instruction require Rex64 prefix. */
-#define Rex64 (NoRex64 + 1)
-/* deprecated fp insn, gets a warning */
-#define Ugh (Rex64 + 1)
-#define Drex (Ugh + 1)
-/* instruction needs DREX with multiple encodings for memory ops */
-#define Drexv (Drex + 1)
-/* special DREX for comparisons */
-#define Drexc (Drexv + 1)
-/* The last bitfield in i386_opcode_modifier. */
-#define Opcode_Modifier_Max Drexc
+enum
+{
+ /* has direction bit. */
+ D = 0,
+ /* set if operands can be words or dwords encoded the canonical way */
+ W,
+ /* Skip the current insn and use the next insn in i386-opc.tbl to swap
+ operand in encoding. */
+ S,
+ /* insn has a modrm byte. */
+ Modrm,
+ /* register is in low 3 bits of opcode */
+ ShortForm,
+ /* special case for jump insns. */
+ Jump,
+ /* call and jump */
+ JumpDword,
+ /* loop and jecxz */
+ JumpByte,
+ /* special case for intersegment leaps/calls */
+ JumpInterSegment,
+ /* FP insn memory format bit, sized by 0x4 */
+ FloatMF,
+ /* src/dest swap for floats. */
+ FloatR,
+ /* has float insn direction bit. */
+ FloatD,
+ /* needs size prefix if in 32-bit mode */
+ Size16,
+ /* needs size prefix if in 16-bit mode */
+ Size32,
+ /* needs size prefix if in 64-bit mode */
+ Size64,
+ /* instruction ignores operand size prefix and in Intel mode ignores
+ mnemonic size suffix check. */
+ IgnoreSize,
+ /* default insn size depends on mode */
+ DefaultSize,
+ /* b suffix on instruction illegal */
+ No_bSuf,
+ /* w suffix on instruction illegal */
+ No_wSuf,
+ /* l suffix on instruction illegal */
+ No_lSuf,
+ /* s suffix on instruction illegal */
+ No_sSuf,
+ /* q suffix on instruction illegal */
+ No_qSuf,
+ /* long double suffix on instruction illegal */
+ No_ldSuf,
+ /* instruction needs FWAIT */
+ FWait,
+ /* quick test for string instructions */
+ IsString,
+ /* quick test for lockable instructions */
+ IsLockable,
+ /* fake an extra reg operand for clr, imul and special register
+ processing for some instructions. */
+ RegKludge,
+ /* The first operand must be xmm0 */
+ FirstXmm0,
+ /* An implicit xmm0 as the first operand */
+ Implicit1stXmm0,
+ /* BYTE is OK in Intel syntax. */
+ ByteOkIntel,
+ /* Convert to DWORD */
+ ToDword,
+ /* Convert to QWORD */
+ ToQword,
+ /* Address prefix changes operand 0 */
+ AddrPrefixOp0,
+ /* opcode is a prefix */
+ IsPrefix,
+ /* instruction has extension in 8 bit imm */
+ ImmExt,
+ /* instruction don't need Rex64 prefix. */
+ NoRex64,
+ /* instruction require Rex64 prefix. */
+ Rex64,
+ /* deprecated fp insn, gets a warning */
+ Ugh,
+ /* insn has VEX prefix:
+ 1: 128bit VEX prefix.
+ 2: 256bit VEX prefix.
+ */
+#define VEX128 1
+#define VEX256 2
+ Vex,
+ /* insn has VEX NDS. Register-only source is encoded in Vex prefix.
+ We use VexNDS on insns with VEX DDS since the register-only source
+ is the second source register. */
+ VexNDS,
+ /* insn has VEX NDD. Register destination is encoded in Vex prefix. */
+ VexNDD,
+ /* insn has VEX NDD. Register destination is encoded in Vex prefix
+ and one of the operands can access a memory location. */
+ VexLWP,
+ /* How the VEX.W bit is used:
+ 0: Set by the REX.W bit.
+ 1: VEX.W0. Should always be 0.
+ 2: VEX.W1. Should always be 1.
+ */
+#define VEXW0 1
+#define VEXW1 2
+ VexW,
+ /* insn has VEX 0x0F opcode prefix. */
+ Vex0F,
+ /* insn has VEX 0x0F38 opcode prefix. */
+ Vex0F38,
+ /* insn has VEX 0x0F3A opcode prefix. */
+ Vex0F3A,
+ /* insn has XOP 0x08 opcode prefix. */
+ XOP08,
+ /* insn has XOP 0x09 opcode prefix. */
+ XOP09,
+ /* insn has XOP 0x0A opcode prefix. */
+ XOP0A,
+ /* number of VEX source operands:
+ 0: < 2 source operands.
+ 1: 2 source operands.
+ 2: 3 source operands.
+ */
+#define VEX2SOURCES 1
+#define VEX3SOURCES 2
+ VexSources,
+ /* instruction has VEX 8 bit imm */
+ VexImmExt,
+ /* SSE to AVX support required */
+ SSE2AVX,
+ /* No AVX equivalent */
+ NoAVX,
+ /* Compatible with old (<= 2.8.1) versions of gcc */
+ OldGcc,
+ /* AT&T mnemonic. */
+ ATTMnemonic,
+ /* AT&T syntax. */
+ ATTSyntax,
+ /* Intel syntax. */
+ IntelSyntax,
+ /* The last bitfield in i386_opcode_modifier. */
+ Opcode_Modifier_Max
+};