x86: drop {,reg16_}inoutportreg variables
authorJan Beulich <jbeulich@novell.com>
Wed, 11 Jul 2018 08:28:56 +0000 (10:28 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 11 Jul 2018 08:28:56 +0000 (10:28 +0200)
The checking against reg16_inoutportreg can be had with a simple test of
a bit, and the value setting from inoutportreg can be replaced by using
the actual register's reg_type field.

Note that the so far redundant 2nd instance of OPERAND_TYPE_INOUTPORTREG
is left in place, for its use in type_names[].

gas/ChangeLog
gas/config/tc-i386.c
opcodes/ChangeLog
opcodes/i386-gen.c
opcodes/i386-init.h

index e6a6d096369f651a2639b91b0f5d96a3876b9d9b..712bec557a2ab182715119772a0614d3c897399e 100644 (file)
@@ -1,3 +1,9 @@
+2018-07-11  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386.c (inoutportreg, reg16_inoutportreg): Delete.
+       (i386_att_operand): Replace uses of reg16_inoutportreg and
+       inoutportreg.
+
 2018-07-11  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (output_insn): Remove check_prefix label and
index 61c1518c2b512c240e8e4c1dea2362eb6caa74a5..baecdecd9ad9cbac06f54d81e577224617c16752 100644 (file)
@@ -1832,10 +1832,6 @@ operand_type_xor (i386_operand_type x, i386_operand_type y)
 
 static const i386_operand_type acc32 = OPERAND_TYPE_ACC32;
 static const i386_operand_type acc64 = OPERAND_TYPE_ACC64;
-static const i386_operand_type inoutportreg
-  = OPERAND_TYPE_INOUTPORTREG;
-static const i386_operand_type reg16_inoutportreg
-  = OPERAND_TYPE_REG16_INOUTPORTREG;
 static const i386_operand_type disp16 = OPERAND_TYPE_DISP16;
 static const i386_operand_type disp32 = OPERAND_TYPE_DISP32;
 static const i386_operand_type disp32s = OPERAND_TYPE_DISP32S;
@@ -9637,14 +9633,13 @@ i386_att_operand (char *operand_string)
 
       /* Special case for (%dx) while doing input/output op.  */
       if (i.base_reg
-         && operand_type_equal (&i.base_reg->reg_type,
-                                &reg16_inoutportreg)
+         && i.base_reg->reg_type.bitfield.inoutportreg
          && i.index_reg == 0
          && i.log2_scale_factor == 0
          && i.seg[i.mem_operands] == 0
          && !operand_type_check (i.types[this_operand], disp))
        {
-         i.types[this_operand] = inoutportreg;
+         i.types[this_operand] = i.base_reg->reg_type;
          return 1;
        }
 
index ec8587cd85af146ca85213f4fd4e38883d009abb..4ff2523029214dd090709c635a54078e1ef5f1f7 100644 (file)
@@ -1,3 +1,10 @@
+2018-07-11  Jan Beulich  <jbeulich@suse.com>
+
+       * i386-gen.c (operand_type_init): Remove
+       OPERAND_TYPE_REG16_INOUTPORTREG entry and one instance of
+       OPERAND_TYPE_INOUTPORTREG.
+       * i386-init.h: Re-generate.
+
 2018-07-11  Jan Beulich  <jbeulich@suse.com>
 
        * i386-opc.tbl (wrssd, wrussd): Add Dword.
index e9760271cef3f81cac32ef7ef84c8c4ca9054a7d..9b5314cfbc75d8f9ece3657662ccde3aefdddb6d 100644 (file)
@@ -444,10 +444,6 @@ static initializer operand_type_init[] =
     "Reg32|Acc|Dword" },
   { "OPERAND_TYPE_ACC64",
     "Reg64|Acc|Qword" },
-  { "OPERAND_TYPE_INOUTPORTREG",
-    "InOutPortReg" },
-  { "OPERAND_TYPE_REG16_INOUTPORTREG",
-    "Reg16|InOutPortReg" },
   { "OPERAND_TYPE_DISP16_32",
     "Disp16|Disp32" },
   { "OPERAND_TYPE_ANYDISP",
index 75ee12d9dad405faa818cf24a261cdb9c2671e82..15ef742a9bf48ec34fcb35656d85f7a7f34b88ca 100644 (file)
       0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, \
       0, 0, 0 } }
 
-#define OPERAND_TYPE_INOUTPORTREG \
-  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
-      0, 0, 0 } }
-
-#define OPERAND_TYPE_REG16_INOUTPORTREG \
-  { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
-      0, 0, 0 } }
-
 #define OPERAND_TYPE_DISP16_32 \
   { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, \
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
This page took 0.033514 seconds and 4 git commands to generate.