This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Remove ENABLE_SSSE3_ON_ATOM


The SSSE3 PALIGNR instruction is fast on all processors that have it, including Atom.
The BSF instruction is slow on several processors:
P1: 7-23 clock
P2 through Core2: 2
P4: 4
P4E: 16
Atom: 16
AMD K7: 7
K8: 8
K10: 4
VIA Nano: 3


Do we really want specific optimizations for each processor? All these processors will be obsolete in a few years anyway.


H.J. Lu wrote:
Hi,

It turns that SSSE3 isn't slow on Atom. The problem is bsf. This patch
removes ENABLE_SSSE3_ON_ATOM.  I will submit another patch for Atom later.

Thanks.


H.J. ---- 2009-08-27 H.J. Lu <hongjiu.lu@intel.com>

	* sysdeps/i386/i686/multiarch/init-arch.c (ENABLE_SSSE3_ON_ATOM):
	Removed.

	* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Don't
	turn off SSSE3 on Atom.

diff --git a/sysdeps/i386/i686/multiarch/init-arch.c b/sysdeps/i386/i686/multiarch/init-arch.c
index b371bae..00a94d8 100644
--- a/sysdeps/i386/i686/multiarch/init-arch.c
+++ b/sysdeps/i386/i686/multiarch/init-arch.c
@@ -1,3 +1 @@
-#define ENABLE_SSSE3_ON_ATOM
-
 #include <sysdeps/x86_64/multiarch/init-arch.c>
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c
index c152ab2..9a1e776 100644
--- a/sysdeps/x86_64/multiarch/init-arch.c
+++ b/sysdeps/x86_64/multiarch/init-arch.c
@@ -64,15 +64,7 @@ __init_cpu_features (void)
 	  __cpu_features.model += extended_model;
 	}
       else if (__cpu_features.family == 0x06)
-	{
-	  __cpu_features.model += extended_model;
-
-#ifndef ENABLE_SSSE3_ON_ATOM
-	  if (__cpu_features.model == 0x1c)
-	    /* Avoid SSSE3 on Atom since it is slow.  */
-	    __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx &= ~(1 << 9);
-#endif
-	}
+	__cpu_features.model += extended_model;
     }
   /* This spells out "AuthenticAMD".  */
   else if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]