aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-09-27 14:16:09 +0200
committerJan Beulich <jbeulich@suse.com>2023-09-27 14:16:09 +0200
commitda0784f961d8a14890b2a3fa3b5db5820e17deb6 (patch)
tree64376adaf9bfc65927e3a438f4c0fec7bffa5cb5 /gas/config
parentf94f390ef87756a7f7bdfe98b7bd09e947211710 (diff)
downloadgdb-da0784f961d8a14890b2a3fa3b5db5820e17deb6.zip
gdb-da0784f961d8a14890b2a3fa3b5db5820e17deb6.tar.gz
gdb-da0784f961d8a14890b2a3fa3b5db5820e17deb6.tar.bz2
x86: fold FMA VEX and EVEX templates
Following the folding of some generic AVX/AVX2 templates with their AVX512F counterpart ones, do this for FMA ones as well, requiring one further adjustment to cpu_flags_match().
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 80cc0ee..fa813aa 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1926,6 +1926,8 @@ cpu_flags_match (const insn_template *t)
{
x.bitfield.cpuavx512f = 0;
x.bitfield.cpuavx512vl = 0;
+ if (x.bitfield.cpufma && !cpu.bitfield.cpufma)
+ x.bitfield.cpuavx = 0;
}
}
}
@@ -1949,6 +1951,8 @@ cpu_flags_match (const insn_template *t)
if ((need_evex_encoding ()
? cpu.bitfield.cpuavx512f
: cpu.bitfield.cpuavx)
+ && (!x.bitfield.cpufma || cpu.bitfield.cpufma
+ || cpu_arch_flags.bitfield.cpuavx512f)
&& (!x.bitfield.cpugfni || cpu.bitfield.cpugfni)
&& (!x.bitfield.cpuvaes || cpu.bitfield.cpuvaes)
&& (!x.bitfield.cpuvpclmulqdq || cpu.bitfield.cpuvpclmulqdq))