aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-09-27 14:15:44 +0200
committerJan Beulich <jbeulich@suse.com>2023-09-27 14:15:44 +0200
commitf94f390ef87756a7f7bdfe98b7bd09e947211710 (patch)
treea49f91de36bc4036218c994369190c9fdcddb10a /gas/config
parenta6f3add0027e42f78b2f1366a7b4cdee418987ce (diff)
downloadgdb-f94f390ef87756a7f7bdfe98b7bd09e947211710.zip
gdb-f94f390ef87756a7f7bdfe98b7bd09e947211710.tar.gz
gdb-f94f390ef87756a7f7bdfe98b7bd09e947211710.tar.bz2
x86: fold VAES/VPCLMULQDQ VEX and EVEX templates
Following the folding of some generic AVX/AVX2 templates with their AVX512F counterpart ones, do this for VAES and VPCLMULQDQ ones as well.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 8e5a16e..80cc0ee 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1944,7 +1944,17 @@ cpu_flags_match (const insn_template *t)
cpu = cpu_flags_and (x, cpu);
if (!cpu_flags_all_zero (&cpu))
{
- if (x.bitfield.cpuavx)
+ if (t->cpu.bitfield.cpuavx && t->cpu.bitfield.cpuavx512f)
+ {
+ if ((need_evex_encoding ()
+ ? cpu.bitfield.cpuavx512f
+ : cpu.bitfield.cpuavx)
+ && (!x.bitfield.cpugfni || cpu.bitfield.cpugfni)
+ && (!x.bitfield.cpuvaes || cpu.bitfield.cpuvaes)
+ && (!x.bitfield.cpuvpclmulqdq || cpu.bitfield.cpuvpclmulqdq))
+ match |= CPU_FLAGS_ARCH_MATCH;
+ }
+ else if (x.bitfield.cpuavx)
{
/* We need to check a few extra flags with AVX. */
if (cpu.bitfield.cpuavx
@@ -1961,9 +1971,7 @@ cpu_flags_match (const insn_template *t)
{
/* We need to check a few extra flags with AVX512F. */
if (cpu.bitfield.cpuavx512f
- && (!x.bitfield.cpugfni || cpu.bitfield.cpugfni)
- && (!x.bitfield.cpuvaes || cpu.bitfield.cpuvaes)
- && (!x.bitfield.cpuvpclmulqdq || cpu.bitfield.cpuvpclmulqdq))
+ && (!x.bitfield.cpugfni || cpu.bitfield.cpugfni))
match |= CPU_FLAGS_ARCH_MATCH;
}
else