mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-23 13:09:58 +08:00
<sys/platform/x86.h>: Add AVX-VNNI support
Add AVX-VNNI support to <sys/platform/x86.h>.
This commit is contained in:
parent
ebe454bcca
commit
875a50ff63
@ -198,6 +198,9 @@ The supported processor features are:
|
||||
@item
|
||||
@code{AVX2} -- The AVX2 instruction extensions.
|
||||
|
||||
@item
|
||||
@code{AVX_VNNI} -- The AVX-VNNI instruction extensions.
|
||||
|
||||
@item
|
||||
@code{AVX512_4FMAPS} -- The AVX512_4FMAPS instruction extensions.
|
||||
|
||||
|
@ -119,6 +119,8 @@ update_usable (struct cpu_features *cpu_features)
|
||||
cpu_features->preferred[index_arch_AVX_Fast_Unaligned_Load]
|
||||
|= bit_arch_AVX_Fast_Unaligned_Load;
|
||||
}
|
||||
/* Determine if AVX-VNNI is usable. */
|
||||
CPU_FEATURE_SET_USABLE (cpu_features, AVX_VNNI);
|
||||
/* Determine if FMA is usable. */
|
||||
CPU_FEATURE_SET_USABLE (cpu_features, FMA);
|
||||
/* Determine if VAES is usable. */
|
||||
|
@ -311,6 +311,7 @@ extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
|
||||
/* COMMON_CPUID_INDEX_7_ECX_1. */
|
||||
|
||||
/* EAX. */
|
||||
#define bit_cpu_AVX_VNNI (1u << 4)
|
||||
#define bit_cpu_AVX512_BF16 (1u << 5)
|
||||
|
||||
/* COMMON_CPUID_INDEX_19. */
|
||||
@ -530,6 +531,7 @@ extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
|
||||
/* COMMON_CPUID_INDEX_7_ECX_1. */
|
||||
|
||||
/* EAX. */
|
||||
#define index_cpu_AVX_VNNI COMMON_CPUID_INDEX_7_ECX_1
|
||||
#define index_cpu_AVX512_BF16 COMMON_CPUID_INDEX_7_ECX_1
|
||||
|
||||
/* COMMON_CPUID_INDEX_19. */
|
||||
@ -749,6 +751,7 @@ extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
|
||||
/* COMMON_CPUID_INDEX_7_ECX_1. */
|
||||
|
||||
/* EAX. */
|
||||
#define reg_AVX_VNNI eax
|
||||
#define reg_AVX512_BF16 eax
|
||||
|
||||
/* COMMON_CPUID_INDEX_19. */
|
||||
|
@ -221,6 +221,7 @@ do_test (void)
|
||||
CHECK_CPU_FEATURE (XFD);
|
||||
CHECK_CPU_FEATURE (INVARIANT_TSC);
|
||||
CHECK_CPU_FEATURE (WBNOINVD);
|
||||
CHECK_CPU_FEATURE (AVX_VNNI);
|
||||
CHECK_CPU_FEATURE (AVX512_BF16);
|
||||
CHECK_CPU_FEATURE (AESKLE);
|
||||
CHECK_CPU_FEATURE (WIDE_KL);
|
||||
@ -376,6 +377,7 @@ do_test (void)
|
||||
CHECK_CPU_FEATURE_USABLE (XFD);
|
||||
CHECK_CPU_FEATURE_USABLE (INVARIANT_TSC);
|
||||
CHECK_CPU_FEATURE_USABLE (WBNOINVD);
|
||||
CHECK_CPU_FEATURE_USABLE (AVX_VNNI);
|
||||
CHECK_CPU_FEATURE_USABLE (AVX512_BF16);
|
||||
CHECK_CPU_FEATURE_USABLE (AESKLE);
|
||||
CHECK_CPU_FEATURE_USABLE (WIDE_KL);
|
||||
|
Loading…
Reference in New Issue
Block a user