diff options
author | Cui,Lili <lili.cui@intel.com> | 2020-10-15 10:45:08 +0800 |
---|---|---|
committer | Cui,Lili <lili.cui@intel.com> | 2020-10-16 11:37:09 +0800 |
commit | 57392598795ca9a9bae18858bf66b5a62ba1b71f (patch) | |
tree | 7a4925aee977039e6e849a11b5a6f22a45cdd329 /gas/config/tc-i386.c | |
parent | 51a8a7c2e3cc0730831963651a55d23d1fae624d (diff) | |
download | binutils-57392598795ca9a9bae18858bf66b5a62ba1b71f.zip binutils-57392598795ca9a9bae18858bf66b5a62ba1b71f.tar.gz binutils-57392598795ca9a9bae18858bf66b5a62ba1b71f.tar.bz2 |
Enhancement for avx-vnni patch
1. Rename CpuVEX_PREFIX to PseudoVexPrefix and
move it from cpu_flags to opcode_modifiers.
2. Delete {vex2} invalid test.
3. Use VexW0 and VexVVVV in the AVX-VNNI instructions.
gas/
* config/tc-i386.c: Move Pseudo Prefix check to match_template.
* testsuite/gas/i386/avx-vnni-inval.l: New file.
* testsuite/gas/i386/avx-vnni-inval.s: Likewise.
* testsuite/gas/i386/avx-vnni.d: Delete invalid {vex2} test.
* testsuite/gas/i386/avx-vnni.s: Likewise.
* testsuite/gas/i386/i386.exp: Add AVX VNNI invalid tests.
* testsuite/gas/i386/x86-64-avx-vnni-inval.l: New file.
* testsuite/gas/i386/x86-64-avx-vnni-inval.s: Likewise.
* testsuite/gas/i386/x86-64-avx-vnni.d: Delete invalid {vex2} test.
* testsuite/gas/i386/x86-64-avx-vnni.s: Likewise.
opcodes/
* i386-opc.tbl: Rename CpuVEX_PREFIX to PseudoVexPrefix
and move it from cpu_flags to opcode_modifiers.
Use VexW0 and VexVVVV in the AVX-VNNI instructions.
* i386-gen.c: Likewise.
* i386-opc.h: Likewise.
* i386-opc.h: Likewise.
* i386-init.h: Regenerated.
* i386-tbl.h: Likewise.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index a081064a..487454f 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1973,14 +1973,7 @@ cpu_flags_match (const insn_template *t) cpu = cpu_flags_and (x, cpu); if (!cpu_flags_all_zero (&cpu)) { - if (x.bitfield.cpuvex_prefix) - { - /* We need to check a few extra flags with VEX_PREFIX. */ - if (i.vec_encoding == vex_encoding_vex - || i.vec_encoding == vex_encoding_vex3) - match |= CPU_FLAGS_ARCH_MATCH; - } - else if (x.bitfield.cpuavx) + if (x.bitfield.cpuavx) { /* We need to check a few extra flags with AVX. */ if (cpu.bitfield.cpuavx @@ -6265,6 +6258,13 @@ match_template (char mnem_suffix) if (cpu_flags_match (t) != CPU_FLAGS_PERFECT_MATCH) continue; + /* Check Pseudo Prefix. */ + i.error = unsupported; + if (t->opcode_modifier.pseudovexprefix + && !(i.vec_encoding == vex_encoding_vex + || i.vec_encoding == vex_encoding_vex3)) + continue; + /* Check AT&T mnemonic. */ i.error = unsupported_with_intel_mnemonic; if (intel_mnemonic && t->opcode_modifier.attmnemonic) |