diff options
author | Jan Beulich <jbeulich@suse.com> | 2022-11-30 09:10:17 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2022-11-30 09:10:17 +0100 |
commit | fcaf78fe4d05b0516304f6b8a3be1ba1d74cbbeb (patch) | |
tree | afaf5968e1806a8b6346ff2d36dd04ce98ff9c15 /gas/config | |
parent | 4943d587f9a908bd8e05bb4312b4bebcc15992bb (diff) | |
download | gdb-fcaf78fe4d05b0516304f6b8a3be1ba1d74cbbeb.zip gdb-fcaf78fe4d05b0516304f6b8a3be1ba1d74cbbeb.tar.gz gdb-fcaf78fe4d05b0516304f6b8a3be1ba1d74cbbeb.tar.bz2 |
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.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386-intel.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c index 152e8e8..ce4be6a 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) |