aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-opc.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-10-14 05:02:13 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-10-14 05:02:31 -0700
commit58bf9b6a7ff56d53f851f78e02c255440de9258a (patch)
tree06c1757cf3fb5b11be78e993f1bf75af4814d19d /opcodes/i386-opc.h
parentc1fa250ae1604d3337cf63279503a737c9377574 (diff)
downloadfsf-binutils-gdb-58bf9b6a7ff56d53f851f78e02c255440de9258a.zip
fsf-binutils-gdb-58bf9b6a7ff56d53f851f78e02c255440de9258a.tar.gz
fsf-binutils-gdb-58bf9b6a7ff56d53f851f78e02c255440de9258a.tar.bz2
x86: Support Intel AVX VNNI
Intel AVX VNNI instructions are marked with CpuVEX_PREFIX. Without the pseudo {vex} prefix, mnemonics of Intel VNNI instructions are encoded with the EVEX prefix. The pseudo {vex} prefix can be used to encode mnemonics of Intel VNNI instructions with the VEX prefix. gas/ * NEWS: Add Intel AVX VNNI. * config/tc-i386.c (cpu_arch): Add .avx_vnni and noavx_vnni. (cpu_flags_match): Support CpuVEX_PREFIX. * doc/c-i386.texi: Document .avx_vnni, noavx_vnni and how to encode Intel VNNI instructions with VEX prefix. * testsuite/gas/i386/avx-vnni.d: New file. * testsuite/gas/i386/avx-vnni.s: Likewise. * testsuite/gas/i386/x86-64-avx-vnni.d: Likewise. * testsuite/gas/i386/x86-64-avx-vnni.s: Likewise. * testsuite/gas/i386/i386.exp: Run AVX VNNI tests. opcodes/ * i386-dis.c (PREFIX_VEX_0F3850): New. (PREFIX_VEX_0F3851): Likewise. (PREFIX_VEX_0F3852): Likewise. (PREFIX_VEX_0F3853): Likewise. (VEX_W_0F3850_P_2): Likewise. (VEX_W_0F3851_P_2): Likewise. (VEX_W_0F3852_P_2): Likewise. (VEX_W_0F3853_P_2): Likewise. (prefix_table): Add PREFIX_VEX_0F3850, PREFIX_VEX_0F3851, PREFIX_VEX_0F3852 and PREFIX_VEX_0F3853. (vex_table): Add VEX_W_0F3850_P_2, VEX_W_0F3851_P_2, VEX_W_0F3852_P_2 and VEX_W_0F3853_P_2. (putop): Add support for "XV" to print "{vex3}" pseudo prefix. * i386-gen.c (cpu_flag_init): Clear the CpuAVX_VNNI bit in CPU_UNKNOWN_FLAGS. Add CPU_AVX_VNNI_FLAGS and CPU_ANY_AVX_VNNI_FLAGS. (cpu_flags): Add CpuAVX_VNNI and CpuVEX_PREFIX. * i386-opc.h (CpuAVX_VNNI): New. (CpuVEX_PREFIX): Likewise. (i386_cpu_flags): Add cpuavx_vnni and cpuvex_prefix. * i386-opc.tbl: Add Intel AVX VNNI instructions. * i386-init.h: Regenerated. * i386-tbl.h: Likewise.
Diffstat (limited to 'opcodes/i386-opc.h')
-rw-r--r--opcodes/i386-opc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h
index ee3b092..2e90c58 100644
--- a/opcodes/i386-opc.h
+++ b/opcodes/i386-opc.h
@@ -212,6 +212,10 @@ enum
CpuAVX512_VP2INTERSECT,
/* TDX Instructions support required. */
CpuTDX,
+ /* Intel AVX VNNI Instructions support required. */
+ CpuAVX_VNNI,
+ /* Intel AVX Instructions support via {vex} prefix required. */
+ CpuVEX_PREFIX,
/* mwaitx instruction required */
CpuMWAITX,
/* Clzero instruction required */
@@ -382,6 +386,8 @@ typedef union i386_cpu_flags
unsigned int cpuavx512_bf16:1;
unsigned int cpuavx512_vp2intersect:1;
unsigned int cputdx:1;
+ unsigned int cpuavx_vnni:1;
+ unsigned int cpuvex_prefix:1;
unsigned int cpumwaitx:1;
unsigned int cpuclzero:1;
unsigned int cpuospke:1;