about summary refs log tree commit diff
path: root/sysdeps/powerpc/strcat.c
diff options
context:
space:
mode:
authorVidya Ranganathan <vidya@linux.vnet.ibm.com>2014-06-11 22:21:20 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-07-02 14:04:21 -0500
commitbc8ea38590070604006399e42469087e943fc8ec (patch)
treeb8aff1d26a239a650adf55f12e1b297db3af04af /sysdeps/powerpc/strcat.c
parentfe5f34e47092e4a3ebb41fae4aaf382c53aaaaea (diff)
downloadglibc-bc8ea38590070604006399e42469087e943fc8ec.tar.gz
glibc-bc8ea38590070604006399e42469087e943fc8ec.tar.xz
glibc-bc8ea38590070604006399e42469087e943fc8ec.zip
PowerPC: strcat optimization for PPC64/POWER7
This patch adds an ifunc power7 strcat symbol that uses the logic on
sysdeps/powerpc/strcat.c but call power7 strlen/strcpy symbols instead
of default ones.
Diffstat (limited to 'sysdeps/powerpc/strcat.c')
-rw-r--r--sysdeps/powerpc/strcat.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sysdeps/powerpc/strcat.c b/sysdeps/powerpc/strcat.c
index 06ceca70f9..4ff37eaeea 100644
--- a/sysdeps/powerpc/strcat.c
+++ b/sysdeps/powerpc/strcat.c
@@ -18,13 +18,16 @@
 
 #include <string.h>
 
-#undef strcat
+#ifndef STRCAT
+# undef strcat
+# define STRCAT  strcat
+#endif
 
 /* Append SRC on the end of DEST.  */
 char *
-strcat (char *dest, const char *src)
+STRCAT(char *dest, const char *src)
 {
   strcpy (dest + strlen (dest), src);
   return dest;
 }
-libc_hidden_builtin_def (strcat)
+libc_hidden_builtin_def (STRCAT)