From d7890e6947114785755ae5b1cf5310491092ee0b Mon Sep 17 00:00:00 2001 From: Amit Pawar Date: Thu, 14 Jan 2016 20:06:02 +0530 Subject: [PATCH] Set index_Fast_Unaligned_Load for Excavator family CPUs GLIBC benchtest testcases shows SSE2_Unaligned based implementations are performing faster compare to SSE2 based implementations for routines: strcmp, strcat, strncat, stpcpy, stpncpy, strcpy, strncpy and strstr. Flag index_Fast_Unaligned_Load is set for Excavator family 0x15h CPU's. This makes SSE2_Unaligned based implementations as default for these routines. [BZ #19467] * sysdeps/x86/cpu-features.c (init_cpu_features): Set index_Fast_Unaligned_Load flag for Excavator family CPUs. --- ChangeLog | 6 ++++++ sysdeps/x86/cpu-features.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 424f7312c5..054998fd42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-01-14 Amit Pawar + + [BZ #19467] + * sysdeps/x86/cpu-features.c (init_cpu_features): Set + index_Fast_Unaligned_Load flag for Excavator family CPUs. + 2016-01-02 Marcin Koƛcielnicki * sysdeps/s390/nptl/tls.h (struct tcbhead_t): Add __private_ss field. diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index e6bd4c909f..218ff2bd86 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -154,6 +154,14 @@ init_cpu_features (struct cpu_features *cpu_features) cpu_features->cpuid[COMMON_CPUID_INDEX_80000001].ebx, cpu_features->cpuid[COMMON_CPUID_INDEX_80000001].ecx, cpu_features->cpuid[COMMON_CPUID_INDEX_80000001].edx); + + if (family == 0x15) + { + /* "Excavator" */ + if (model >= 0x60 && model <= 0x7f) + cpu_features->feature[index_Fast_Unaligned_Load] + |= bit_Fast_Unaligned_Load; + } } else kind = arch_kind_other;