From: Jan Beulich <jbeulich@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] x86/Intel: adjustment to restricted suffix derivation
Date: Wed, 30 Nov 2022 08:10:34 +0000 (GMT) [thread overview]
Message-ID: <20221130081034.E6693385843D@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fcaf78fe4d05b0516304f6b8a3be1ba1d74cbbeb
commit fcaf78fe4d05b0516304f6b8a3be1ba1d74cbbeb
Author: Jan Beulich <jbeulich@suse.com>
Date: Wed Nov 30 09:10:17 2022 +0100
x86/Intel: adjustment to restricted suffix derivation
In "x86/Intel: restrict suffix derivation" I think I screwed up
slightly, bringing a piece of code out of sync with its comment, and
resulting in a suffix potentially being derived when one isn't needed.
Diff:
---
gas/config/tc-i386-intel.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index 152e8e8ce24..ce4be6ac7dd 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -841,11 +841,16 @@ i386_intel_operand (char *operand_string, int got_a_float)
abort ();
}
+ /* We can skip templates with swappable operands here, as one
+ operand will be a register, which operand size can be
+ determined from. */
+ if (t->opcode_modifier.d)
+ continue;
+
/* In a few cases suffixes are permitted, but we can nevertheless
derive that these aren't going to be needed. This is only of
- interest for insns using ModR/M, plus we can skip templates with
- swappable operands here (simplifying subsequent logic). */
- if (!t->opcode_modifier.modrm || t->opcode_modifier.d)
+ interest for insns using ModR/M. */
+ if (!t->opcode_modifier.modrm)
break;
if (!t->operand_types[op].bitfield.baseindex)
reply other threads:[~2022-11-30 8:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221130081034.E6693385843D@sourceware.org \
--to=jbeulich@sourceware.org \
--cc=bfd-cvs@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).