diff options
author | Jan Beulich <jbeulich@suse.com> | 2023-09-27 14:15:44 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2023-09-27 14:15:44 +0200 |
commit | f94f390ef87756a7f7bdfe98b7bd09e947211710 (patch) | |
tree | a49f91de36bc4036218c994369190c9fdcddb10a /gas | |
parent | a6f3add0027e42f78b2f1366a7b4cdee418987ce (diff) | |
download | gdb-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')
-rw-r--r-- | gas/config/tc-i386.c | 16 |
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 |