diff options
author | Jan Beulich <jbeulich@suse.com> | 2022-11-30 09:06:33 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2022-11-30 09:06:33 +0100 |
commit | ac9226cf8c496b15e369b2fcae95066f4a597a5b (patch) | |
tree | ee5644700ceb123597f406bfc9a09dbf29a7ca62 /gas | |
parent | 3df781c5a459249fcb49e20ee36bdcd7bf111f0c (diff) | |
download | gdb-ac9226cf8c496b15e369b2fcae95066f4a597a5b.zip gdb-ac9226cf8c496b15e369b2fcae95066f4a597a5b.tar.gz gdb-ac9226cf8c496b15e369b2fcae95066f4a597a5b.tar.bz2 |
x86: drop FloatR
There are just 4 templates using it, which can be easily identified by
other means, as D is set only on a very limited number of FPU templates.
Also move the respective conditional out of the code path taken by all
"reverse match" insns (it probably should have been this way already
before, to avoid the one conditional in the common case).
With this the templates which had FloatR dropped no longer differ from
their AT&T syntax + mnemonic counterparts - the only difference is now
which of the two would be recognized. For this, however, we don't need
two templates - we can simply arrange the condition for setting
Opcode_FloatR accordingly.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/config/tc-i386.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 5a88d25..8dc7425 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -6800,12 +6800,18 @@ match_template (char mnem_suffix) specific_error = progress (i.error); continue; } - /* found_reverse_match holds which of D or FloatR + /* found_reverse_match holds which variant of D we've found. */ if (!t->opcode_modifier.d) found_reverse_match = 0; else if (operand_types[0].bitfield.tbyte) - found_reverse_match = Opcode_FloatD; + { + found_reverse_match = Opcode_FloatD; + /* FSUB{,R} and FDIV{,R} may need a 2nd bit flipped. */ + if ((t->base_opcode & 0x20) + && (intel_syntax || intel_mnemonic)) + found_reverse_match |= Opcode_FloatR; + } else if (t->opcode_modifier.vexsources) { found_reverse_match = Opcode_VexW; @@ -6820,8 +6826,6 @@ match_template (char mnem_suffix) ? Opcode_ExtD : Opcode_SIMD_IntD; else found_reverse_match = Opcode_D; - if (t->opcode_modifier.floatr) - found_reverse_match |= Opcode_FloatR; } else { |