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]

[PATCH][powerpc] Fix stpcpy performance for power8


Hi,

I decided to read powerpc code that according to statements only people
with good intuition could understand so I was curious what these experts
do to get good performance.

Here its most elementary problem, it wasn't turned on. Fixing that is
obvious, add implementation to ifunc. 

	* sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Fix ifunc.
 
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
index a5e1c03..3a25cf8 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpcpy.c
@@ -24,10 +24,13 @@
 
 extern __typeof (__stpcpy) __stpcpy_ppc attribute_hidden;
 extern __typeof (__stpcpy) __stpcpy_power7 attribute_hidden;
+extern __typeof (__stpcpy) __stpcpy_power8 attribute_hidden;
 
 libc_ifunc (__stpcpy,
-            (hwcap & PPC_FEATURE_HAS_VSX)
-            ? __stpcpy_power7
+            (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+            ? __stpcpy_power8 :
+              (hwcap & PPC_FEATURE_HAS_VSX)
+              ? __stpcpy_power7
             : __stpcpy_ppc);
 
 weak_alias (__stpcpy, stpcpy)


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