diff options
author | Igor Tsimbalist <igor.v.tsimbalist@intel.com> | 2017-10-20 23:52:52 +0300 |
---|---|---|
committer | Igor Tsimbalist <igor.v.tsimbalist@intel.com> | 2017-10-23 15:58:18 +0300 |
commit | 8cfcb7659cb844dff00efbbb644c15b650fb7e8b (patch) | |
tree | e9139b9cde353c68cfb9b963743cb73453e6d81c /opcodes | |
parent | ff1982d53a1fba573e7f9a3b455f7644440cb336 (diff) | |
download | fsf-binutils-gdb-8cfcb7659cb844dff00efbbb644c15b650fb7e8b.zip fsf-binutils-gdb-8cfcb7659cb844dff00efbbb644c15b650fb7e8b.tar.gz fsf-binutils-gdb-8cfcb7659cb844dff00efbbb644c15b650fb7e8b.tar.bz2 |
Enable Intel AVX512_VNNI instructions.
Intel has disclosed a set of new instructions. The spec is
https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf
gas/
* config/tc-i386.c (cpu_arch): Add .avx512_vnni.
(cpu_noarch): Add noavx512_vnni.
* doc/c-i386.texi: Document .avx512_vnni.
* testsuite/gas/i386/i386.exp: Add AVX512_VNNI tests.
* testsuite/gas/i386/avx512vnni-intel.d: New test.
* testsuite/gas/i386/avx512vnni.d: Likewise.
* testsuite/gas/i386/avx512vnni.s: Likewise.
* testsuite/gas/i386/avx512vnni_vl-intel.d: Likewise.
* testsuite/gas/i386/avx512vnni_vl.d: Likewise.
* testsuite/gas/i386/avx512vnni_vl.s: Likewise.
* testsuite/gas/i386/x86-64-avx512vnni-intel.d: Likewise.
* testsuite/gas/i386/x86-64-avx512vnni.d: Likewise.
* testsuite/gas/i386/x86-64-avx512vnni.s: Likewise.
* testsuite/gas/i386/x86-64-avx512vnni_vl-intel.d: Likewise.
* testsuite/gas/i386/x86-64-avx512vnni_vl.d: Likewise.
* testsuite/gas/i386/x86-64-avx512vnni_vl.s: Likewise.
opcodes/
* i386-dis.c (enum): Add PREFIX_EVEX_0F3850, PREFIX_EVEX_0F3851.
* i386-dis-evex.h (evex_table): Updated.
* i386-gen.c (cpu_flag_init): Add CPU_AVX512_VNNI,
CPU_ANY_AVX512_VNNI_FLAGS. Update CPU_ANY_AVX512F_FLAGS.
(cpu_flags): Add CpuAVX512_VNNI.
* i386-opc.h (enum): Add CpuAVX512_VNNI.
(i386_cpu_flags): Add cpuavx512_vnni.
* i386-opc.tbl Add Intel AVX512_VNNI instructions.
* i386-init.h: Regenerate.
* i386-tbl.h: Likewise.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/i386-dis-evex.h | 20 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 2 | ||||
-rw-r--r-- | opcodes/i386-gen.c | 7 | ||||
-rw-r--r-- | opcodes/i386-opc.h | 5 | ||||
-rw-r--r-- | opcodes/i386-opc.tbl | 20 |
5 files changed, 48 insertions, 6 deletions
diff --git a/opcodes/i386-dis-evex.h b/opcodes/i386-dis-evex.h index ef5c963..467a2d3 100644 --- a/opcodes/i386-dis-evex.h +++ b/opcodes/i386-dis-evex.h @@ -385,8 +385,8 @@ static const struct dis386 evex_table[][256] = { { PREFIX_TABLE (PREFIX_EVEX_0F384E) }, { PREFIX_TABLE (PREFIX_EVEX_0F384F) }, /* 50 */ - { Bad_Opcode }, - { Bad_Opcode }, + { PREFIX_TABLE (PREFIX_EVEX_0F3850) }, + { PREFIX_TABLE (PREFIX_EVEX_0F3851) }, { PREFIX_TABLE (PREFIX_EVEX_0F3852) }, { PREFIX_TABLE (PREFIX_EVEX_0F3853) }, { Bad_Opcode }, @@ -2005,18 +2005,30 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, { "vrsqrt14s%XW", { XMScalar, VexScalar, EXxmm_mdq }, 0 }, }, - /* PREFIX_EVEX_0F3852 */ + /* PREFIX_EVEX_0F3850 */ + { + { Bad_Opcode }, + { Bad_Opcode }, + { "vpdpbusd", { XM, Vex, EXx }, 0 }, + }, + /* PREFIX_EVEX_0F3851 */ { { Bad_Opcode }, { Bad_Opcode }, + { "vpdpbusds", { XM, Vex, EXx }, 0 }, + }, + /* PREFIX_EVEX_0F3852 */ + { + { Bad_Opcode }, { Bad_Opcode }, + { "vpdpwssd", { XM, Vex, EXx }, 0 }, { "vp4dpwssd", { XM, Vex, EXxmm }, 0 }, }, /* PREFIX_EVEX_0F3853 */ { { Bad_Opcode }, { Bad_Opcode }, - { Bad_Opcode }, + { "vpdpwssds", { XM, Vex, EXx }, 0 }, { "vp4dpwssds", { XM, Vex, EXxmm }, 0 }, }, /* PREFIX_EVEX_0F3855 */ diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 7f3b18f..637fce3 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -1572,6 +1572,8 @@ enum PREFIX_EVEX_0F384D, PREFIX_EVEX_0F384E, PREFIX_EVEX_0F384F, + PREFIX_EVEX_0F3850, + PREFIX_EVEX_0F3851, PREFIX_EVEX_0F3852, PREFIX_EVEX_0F3853, PREFIX_EVEX_0F3855, diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index c04b364..1202376 100644 --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -225,6 +225,8 @@ static initializer cpu_flag_init[] = "CPU_AVX512F_FLAGS|CpuAVX512_VPOPCNTDQ" }, { "CPU_AVX512_VBMI2_FLAGS", "CPU_AVX512F_FLAGS|CpuAVX512_VBMI2" }, + { "CPU_AVX512_VNNI_FLAGS", + "CPU_AVX512F_FLAGS|CpuAVX512_VNNI" }, { "CPU_L1OM_FLAGS", "unknown" }, { "CPU_K1OM_FLAGS", @@ -300,7 +302,7 @@ static initializer cpu_flag_init[] = { "CPU_ANY_AVX2_FLAGS", "CpuAVX2" }, { "CPU_ANY_AVX512F_FLAGS", - "CpuVREX|CpuRegZMM|CpuRegMask|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ|CpuAVX512BW|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|CpuAVX512_4FMAPS|CpuAVX512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_VBMI2|CpuAVX512F" }, + "CpuVREX|CpuRegZMM|CpuRegMask|CpuAVX512CD|CpuAVX512ER|CpuAVX512PF|CpuAVX512DQ|CpuAVX512BW|CpuAVX512VL|CpuAVX512IFMA|CpuAVX512VBMI|CpuAVX512_4FMAPS|CpuAVX512_4VNNIW|CpuAVX512_VPOPCNTDQ|CpuAVX512_VBMI2|CpuAVX512_VNNI|CpuAVX512F" }, { "CPU_ANY_AVX512CD_FLAGS", "CpuAVX512CD" }, { "CPU_ANY_AVX512ER_FLAGS", @@ -325,6 +327,8 @@ static initializer cpu_flag_init[] = "CpuAVX512_VPOPCNTDQ" }, { "CPU_ANY_AVX512_VBMI2_FLAGS", "CpuAVX512_VBMI2" }, + { "CPU_ANY_AVX512_VNNI_FLAGS", + "CpuAVX512_VNNI" }, }; static initializer operand_type_init[] = @@ -532,6 +536,7 @@ static bitfield cpu_flags[] = BITFIELD (CpuAVX512_4VNNIW), BITFIELD (CpuAVX512_VPOPCNTDQ), BITFIELD (CpuAVX512_VBMI2), + BITFIELD (CpuAVX512_VNNI), BITFIELD (CpuMWAITX), BITFIELD (CpuCLZERO), BITFIELD (CpuOSPKE), diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h index a14f66d..34b57f5 100644 --- a/opcodes/i386-opc.h +++ b/opcodes/i386-opc.h @@ -200,6 +200,8 @@ enum CpuAVX512_VPOPCNTDQ, /* Intel AVX-512 VBMI2 Instructions support required. */ CpuAVX512_VBMI2, + /* Intel AVX-512 VNNI Instructions support required. */ + CpuAVX512_VNNI, /* mwaitx instruction required */ CpuMWAITX, /* Clzero instruction required */ @@ -243,7 +245,7 @@ enum /* If you get a compiler error for zero width of the unused field, comment it out. */ - #define CpuUnused (CpuMax + 1) +#define CpuUnused (CpuMax + 1) /* We can check if an instruction is available with array instead of bitfield. */ @@ -335,6 +337,7 @@ typedef union i386_cpu_flags unsigned int cpuavx512_4vnniw:1; unsigned int cpuavx512_vpopcntdq:1; unsigned int cpuavx512_vbmi2:1; + unsigned int cpuavx512_vnni:1; unsigned int cpumwaitx:1; unsigned int cpuclzero:1; unsigned int cpuospke:1; diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl index 0dcc17b..6b7dea7 100644 --- a/opcodes/i386-opc.tbl +++ b/opcodes/i386-opc.tbl @@ -6075,6 +6075,26 @@ vpshrdw, 4, 0x6672, None, 1, CpuAVX512_VBMI2|CpuAVX512VL, Modrm|EVex=3|Masking=3 // AVX512_VBMI2 instructions end +// AVX512_VNNI instructions + +vpdpbusd, 3, 0x6650, None, 1, CpuAVX512_VNNI, Modrm|EVex=1|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=1|Disp8MemShift=6|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegZMM|Dword|ZMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegZMM, RegZMM } +vpdpbusd, 3, 0x6650, None, 1, CpuAVX512_VNNI|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=3|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegXMM, RegXMM } +vpdpbusd, 3, 0x6650, None, 1, CpuAVX512_VNNI|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=2|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegYMM, RegYMM } + +vpdpbusds, 3, 0x6651, None, 1, CpuAVX512_VNNI, Modrm|EVex=1|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=1|Disp8MemShift=6|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegZMM|Dword|ZMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegZMM, RegZMM } +vpdpbusds, 3, 0x6651, None, 1, CpuAVX512_VNNI|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=3|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegXMM, RegXMM } +vpdpbusds, 3, 0x6651, None, 1, CpuAVX512_VNNI|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=2|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegYMM, RegYMM } + +vpdpwssd, 3, 0x6652, None, 1, CpuAVX512_VNNI, Modrm|EVex=1|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=1|Disp8MemShift=6|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegZMM|Dword|ZMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegZMM, RegZMM } +vpdpwssd, 3, 0x6652, None, 1, CpuAVX512_VNNI|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=3|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegXMM, RegXMM } +vpdpwssd, 3, 0x6652, None, 1, CpuAVX512_VNNI|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=2|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegYMM, RegYMM } + +vpdpwssds, 3, 0x6653, None, 1, CpuAVX512_VNNI, Modrm|EVex=1|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=1|Disp8MemShift=6|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegZMM|Dword|ZMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegZMM, RegZMM } +vpdpwssds, 3, 0x6653, None, 1, CpuAVX512_VNNI|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=3|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegXMM, RegXMM } +vpdpwssds, 3, 0x6653, None, 1, CpuAVX512_VNNI|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=1|VexVVVV=1|VexW=1|Broadcast=2|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegYMM, RegYMM } + +// AVX512_VNNI instructions end + // AVX512 + GFNI instructions vgf2p8affineinvqb, 4, 0x66cf, None, 1, CpuAVX512F|CpuGFNI, Modrm|EVex=1|Masking=3|VexOpcode=2|VexVVVV=1|VexW=2|VecESize=1|Broadcast=2|Disp8MemShift=6|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Imm8, RegZMM|Qword|ZMMword|Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|Vec_Disp8, RegZMM, RegZMM } |