public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: binutils@sourceware.org
Subject: [PATCH 5/6] x86: simplify check_byte_reg()
Date: Wed, 3 Jun 2020 12:17:04 +0200	[thread overview]
Message-ID: <d43b1aa8-c0fb-c47f-eef5-40f2f0297e21@suse.com> (raw)
In-Reply-To: <98893054-6c55-637b-703c-0cfd349a3154@suse.com>

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/
2020-06-XX  Jan Beulich  <jbeulich@suse.com>

	* config/tc-i386.c (check_byte_reg): Drop dead conditional
	around as_bad().

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -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;
 }


  parent reply	other threads:[~2020-06-03 10:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 10:13 [PATCH 0/6] gas/x86: adjustments to register handling Jan Beulich
2020-06-03 10:15 ` [PATCH 1/6] x86: restrict use of register aliases Jan Beulich
2020-06-03 10:15 ` [PATCH 2/6] x86: also allow %st(N) in CFI directives Jan Beulich
2020-06-03 10:16 ` [PATCH 4/6] x86: restrict %tr<N> visibility Jan Beulich
2020-06-03 10:17 ` Jan Beulich [this message]
2020-06-03 10:17 ` [PATCH 6/6] x86: also handle %k<N> and %bnd<N> in debugging helpers Jan Beulich
2020-06-03 11:10 ` [PATCH 3/6] ix86: enable 2nd CFI test Jan Beulich
2020-06-03 14:26 ` [PATCH 0/6] gas/x86: adjustments to register handling H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d43b1aa8-c0fb-c47f-eef5-40f2f0297e21@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).