From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1039) id 33A7A38515CB; Thu, 27 Jan 2022 22:40:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33A7A38515CB Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: H.J. Lu To: glibc-cvs@sourceware.org Subject: [glibc/release/2.28/master] x86: Add AVX512VL_Usable and AVX512BW_Usable X-Act-Checkin: glibc X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/release/2.28/master X-Git-Oldrev: b2e59f87ae10e5874bb150bd87f3b92b47b1090e X-Git-Newrev: e8078d2ac516560ce54b8383f34372853402629c Message-Id: <20220127224037.33A7A38515CB@sourceware.org> Date: Thu, 27 Jan 2022 22:40:37 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2022 22:40:37 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e8078d2ac516560ce54b8383f34372853402629c commit e8078d2ac516560ce54b8383f34372853402629c Author: H.J. Lu 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__ */