public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/release/2.28/master] x86: Add AVX512VL_Usable and AVX512BW_Usable
@ 2022-01-27 22:40 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2022-01-27 22:40 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e8078d2ac516560ce54b8383f34372853402629c
commit e8078d2ac516560ce54b8383f34372853402629c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 29 13:13:32 2021 -0700
x86: Add AVX512VL_Usable and AVX512BW_Usable
Add AVX512VL_Usable and AVX512BW_Usable for backporting string/memory
functions optimized with 256-bit EVEX.
Diff:
---
sysdeps/x86/cpu-features.c | 8 ++++++++
sysdeps/x86/cpu-features.h | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
index 5ddc8eebf4..4be4be7051 100644
--- a/sysdeps/x86/cpu-features.c
+++ b/sysdeps/x86/cpu-features.c
@@ -130,6 +130,14 @@ get_common_indeces (struct cpu_features *cpu_features,
{
cpu_features->feature[index_arch_AVX512F_Usable]
|= bit_arch_AVX512F_Usable;
+ /* Determine if AVX512VL is usable. */
+ if (CPU_FEATURES_CPU_P (cpu_features, AVX512VL))
+ cpu_features->feature[index_arch_AVX512VL_Usable]
+ |= bit_arch_AVX512VL_Usable;
+ /* Determine if AVX512BW is usable. */
+ if (CPU_FEATURES_CPU_P (cpu_features, AVX512BW))
+ cpu_features->feature[index_arch_AVX512BW_Usable]
+ |= bit_arch_AVX512BW_Usable;
/* Determine if AVX512DQ is usable. */
if (CPU_FEATURES_CPU_P (cpu_features, AVX512DQ))
cpu_features->feature[index_arch_AVX512DQ_Usable]
diff --git a/sysdeps/x86/cpu-features.h b/sysdeps/x86/cpu-features.h
index 1f60296e7b..177aa0ebc8 100644
--- a/sysdeps/x86/cpu-features.h
+++ b/sysdeps/x86/cpu-features.h
@@ -42,6 +42,8 @@
#define bit_arch_XSAVEC_Usable (1 << 22)
#define bit_arch_Prefer_FSRM (1 << 23)
#define bit_arch_Prefer_AVX2_STRCMP (1 << 24)
+#define bit_arch_AVX512VL_Usable (1 << 25)
+#define bit_arch_AVX512BW_Usable (1 << 26)
/* CPUID Feature flags. */
@@ -268,6 +270,8 @@ extern const struct cpu_features *__get_cpu_features (void)
# define index_arch_XSAVEC_Usable FEATURE_INDEX_1
# define index_arch_Prefer_FSRM FEATURE_INDEX_1
# define index_arch_Prefer_AVX2_STRCMP FEATURE_INDEX_1
+# define index_arch_AVX512VL_Usable FEATURE_INDEX_1
+# define index_arch_AVX512BW_Usable FEATURE_INDEX_1
#endif /* !__ASSEMBLER__ */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-27 22:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 22:40 [glibc/release/2.28/master] x86: Add AVX512VL_Usable and AVX512BW_Usable H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).