From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1386) id E6693385843D; Wed, 30 Nov 2022 08:10:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6693385843D Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jan Beulich To: bfd-cvs@sourceware.org Subject: [binutils-gdb] x86/Intel: adjustment to restricted suffix derivation X-Act-Checkin: binutils-gdb X-Git-Author: Jan Beulich X-Git-Refname: refs/heads/master X-Git-Oldrev: 4943d587f9a908bd8e05bb4312b4bebcc15992bb X-Git-Newrev: fcaf78fe4d05b0516304f6b8a3be1ba1d74cbbeb Message-Id: <20221130081034.E6693385843D@sourceware.org> Date: Wed, 30 Nov 2022 08:10:34 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2022 08:10:35 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dfcaf78fe4d05= b0516304f6b8a3be1ba1d74cbbeb commit fcaf78fe4d05b0516304f6b8a3be1ba1d74cbbeb Author: Jan Beulich Date: Wed Nov 30 09:10:17 2022 +0100 x86/Intel: adjustment to restricted suffix derivation =20 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_f= loat) abort (); } =20 + /* 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; =20 if (!t->operand_types[op].bitfield.baseindex)