summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/multiarch/strcat.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-12-23 13:36:34 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2015-01-13 11:28:36 -0500
commit94c9680945369d63ef9ed266a29f28ebaaaeb5ce (patch)
treeb6c8f97275fb5372fc47ec058ad7f0ce0b771f5b /sysdeps/powerpc/powerpc64/multiarch/strcat.c
parent96d6fd6c4060d739abb1822e7ad633af749532b2 (diff)
downloadglibc-94c9680945369d63ef9ed266a29f28ebaaaeb5ce.tar.gz
glibc-94c9680945369d63ef9ed266a29f28ebaaaeb5ce.tar.xz
glibc-94c9680945369d63ef9ed266a29f28ebaaaeb5ce.zip
powerpc: Optimized strcat for POWER8/PPC64
With new optimized strcpy for POWER8, this patch adds an optimized
strcat which uses it along with default implementation at strings/.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch/strcat.c')
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/strcat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcat.c b/sysdeps/powerpc/powerpc64/multiarch/strcat.c
index af188d3d62..4708a9ab47 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcat.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcat.c
@@ -23,9 +23,12 @@
 
 extern __typeof (strcat) __strcat_ppc attribute_hidden;
 extern __typeof (strcat) __strcat_power7 attribute_hidden;
+extern __typeof (strcat) __strcat_power8 attribute_hidden;
 
 libc_ifunc (strcat,
-            (hwcap & PPC_FEATURE_HAS_VSX)
-            ? __strcat_power7
+            (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+            ? __strcat_power8 :
+              (hwcap & PPC_FEATURE_HAS_VSX)
+              ? __strcat_power7
             : __strcat_ppc);
 #endif