]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86: simplify check_byte_reg()
authorJan Beulich <jbeulich@suse.com>
Mon, 8 Jun 2020 06:40:22 +0000 (08:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 8 Jun 2020 06:40:22 +0000 (08:40 +0200)
With the introduction of what right now is the very first conditional
in the function's loop (commit dc821c5f9ae5 ["x86: replace Reg8, Reg16,
Reg32, and Reg64"]), the last if() in the same loop has become
pointless - retain just its body.

gas/ChangeLog
gas/config/tc-i386.c

index d40008148d21a52ed31619291e1ef5ef90532d5f..27ffa3c52b829caa4c362d9de12d076a980a0c3e 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-08  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386.c (check_byte_reg): Drop dead conditional
+       around as_bad().
+
 2020-06-08  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (check_register): Split RegTR handling, to
index cfb3b992cd81a4e451e207214998c1af40709526..e0ebf80d8aaa8977b56a77f05ae53aed8c79d5dd 100644 (file)
@@ -7132,21 +7132,10 @@ check_byte_reg (void)
        continue;
 
       /* Any other register is bad.  */
-      if (i.types[op].bitfield.class == Reg
-         || i.types[op].bitfield.class == RegMMX
-         || i.types[op].bitfield.class == RegSIMD
-         || i.types[op].bitfield.class == SReg
-         || i.types[op].bitfield.class == RegCR
-         || i.types[op].bitfield.class == RegDR
-         || i.types[op].bitfield.class == RegTR)
-       {
-         as_bad (_("`%s%s' not allowed with `%s%c'"),
-                 register_prefix,
-                 i.op[op].regs->reg_name,
-                 i.tm.name,
-                 i.suffix);
-         return 0;
-       }
+      as_bad (_("`%s%s' not allowed with `%s%c'"),
+             register_prefix, i.op[op].regs->reg_name,
+             i.tm.name, i.suffix);
+      return 0;
     }
   return 1;
 }