]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Set index_Fast_Unaligned_Load for Excavator family CPUs
authorAmit Pawar <Amit.Pawar@amd.com>
Thu, 14 Jan 2016 14:36:02 +0000 (20:06 +0530)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 14 Jan 2016 16:14:31 +0000 (08:14 -0800)
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
sysdeps/x86/cpu-features.c

index 424f7312c51dd7cea4efe47cfc5752c17de74057..054998fd428ab8822c65f2fd72a42ef656d4fd50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-14  Amit Pawar  <amit.pawar@amd.com>
+
+       [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  <koriakin@0x04.net>
 
        * sysdeps/s390/nptl/tls.h (struct tcbhead_t): Add __private_ss field.
index e6bd4c909f52feec1be752f862ed09453a3e57d4..218ff2bd86b5b2d2a1378a82e1bbd94671732d36 100644 (file)
@@ -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;