forked from pool/glibc
Andreas Schwab
f869647ca8
- math-c++-compat.patch: Do not use __builtin_types_compatible_p in C++ mode (BZ #21930) - Add iconvconfig to baselibs.conf (bsc#1051042) - resolv-context-leak.patch: Fix leaks of resolver contexts - dl-runtime-resolve-opt-avx512f.patch: Use _dl_runtime_resolve_opt only with AVX512F (BZ #21871) - libpthread-compat-wrappers.patch: Don't use IFUNC resolver for longjmp or system in libpthread (BZ #21041) OBS-URL: https://build.opensuse.org/request/show/519281 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=472
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
[BZ #21871]
|
|
* sysdeps/x86/cpu-features.c (init_cpu_features): Set
|
|
bit_arch_Use_dl_runtime_resolve_opt only with AVX512F.
|
|
|
|
Index: glibc-2.26/sysdeps/x86/cpu-features.c
|
|
===================================================================
|
|
--- glibc-2.26.orig/sysdeps/x86/cpu-features.c
|
|
+++ glibc-2.26/sysdeps/x86/cpu-features.c
|
|
@@ -244,10 +244,13 @@ init_cpu_features (struct cpu_features *
|
|
|= bit_arch_Prefer_No_AVX512;
|
|
|
|
/* To avoid SSE transition penalty, use _dl_runtime_resolve_slow.
|
|
- If XGETBV suports ECX == 1, use _dl_runtime_resolve_opt. */
|
|
+ If XGETBV suports ECX == 1, use _dl_runtime_resolve_opt.
|
|
+ Use _dl_runtime_resolve_opt only with AVX512F since it is
|
|
+ slower than _dl_runtime_resolve_slow with AVX. */
|
|
cpu_features->feature[index_arch_Use_dl_runtime_resolve_slow]
|
|
|= bit_arch_Use_dl_runtime_resolve_slow;
|
|
- if (cpu_features->max_cpuid >= 0xd)
|
|
+ if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable)
|
|
+ && cpu_features->max_cpuid >= 0xd)
|
|
{
|
|
unsigned int eax;
|
|
|