x86: convert SReg from bitfield to enumerator
[deliverable/binutils-gdb.git] / opcodes / i386-opc.h
index e9b1f9280ed9f87237d866f3b6d2864b00cabac6..e8cf895a51933c3b7f720c772b5326c09b883927 100644 (file)
@@ -702,12 +702,22 @@ typedef struct i386_opcode_modifier
   unsigned int intel64:1;
 } i386_opcode_modifier;
 
+/* Operand classes.  */
+
+#define CLASS_WIDTH 4
+enum operand_class
+{
+  ClassNone,
+  Reg, /* GPRs and FP regs, distinguished by operand size */
+  SReg, /* Segment register */
+};
+
 /* Position of operand_type bits.  */
 
 enum
 {
-  /* Register (qualified by Byte, Word, etc) */
-  Reg = 0,
+  /* Class */
+  Class = CLASS_WIDTH - 1,
   /* MMX register */
   RegMMX,
   /* Vector registers */
@@ -720,8 +730,6 @@ enum
   Debug,
   /* Test register */
   Test,
-  /* Segment register */
-  SReg,
   /* 1 bit immediate */
   Imm1,
   /* 8 bit immediate */
@@ -791,7 +799,7 @@ enum
   /* Bound register.  */
   RegBND,
 
-  /* The number of bitfields in i386_operand_type.  */
+  /* The number of bits in i386_operand_type.  */
   OTNum
 };
 
@@ -808,14 +816,13 @@ typedef union i386_operand_type
 {
   struct
     {
-      unsigned int reg:1;
+      unsigned int class:CLASS_WIDTH;
       unsigned int regmmx:1;
       unsigned int regsimd:1;
       unsigned int regmask:1;
       unsigned int control:1;
       unsigned int debug:1;
       unsigned int test:1;
-      unsigned int sreg:1;
       unsigned int imm1:1;
       unsigned int imm8:1;
       unsigned int imm8s:1;
This page took 0.026143 seconds and 4 git commands to generate.