diff options
author | Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> | 2017-04-13 11:29:20 +0530 |
---|---|---|
committer | Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> | 2017-04-13 11:29:20 +0530 |
commit | 249dcdb71b79e4c488a46c9027e0014c0bc27044 (patch) | |
tree | a14c36ab652bb3d0bf47cac89205b57ae99793c9 /sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c | |
parent | 158d5fa0e1906e7810bdc6ecb7bf598dcc3cd17d (diff) | |
download | glibc-249dcdb71b79e4c488a46c9027e0014c0bc27044.tar.gz glibc-249dcdb71b79e4c488a46c9027e0014c0bc27044.tar.xz glibc-249dcdb71b79e4c488a46c9027e0014c0bc27044.zip |
powerpc: Optimized strncat for POWER8
With new optimized strnlen for POWER8 [1], this patch adds strncat for power8 to make use of optimized strlen and strnlen. This is faster than POWER7 current implementation for larger strings. Tested on powerpc64 and powerpc64le. [1] https://sourceware.org/ml/libc-alpha/2017-03/msg00491.html * sysdeps/powerpc/powerpc64/multiarch/Makefile (sysdep_routines): Add strncat-power8. * sysdeps/powerpc/powerpc64/multiarch/strncat.c (strncat): Add __strncat_power8 to ifunc list. * sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c (strncat): Add __strncat_power8 to list of strncat functions. * sysdeps/powerpc/powerpc64/multiarch/strncat-power8.c: New file.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c')
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c index 30a013320b..bddec1a6f8 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c @@ -292,6 +292,9 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Support sysdeps/powerpc/powerpc64/multiarch/strncat.c. */ IFUNC_IMPL (i, name, strncat, IFUNC_IMPL_ADD (array, i, strncat, + hwcap2 & PPC_FEATURE2_ARCH_2_07, + __strncat_power8) + IFUNC_IMPL_ADD (array, i, strncat, hwcap & PPC_FEATURE_HAS_VSX, __strncat_power7) IFUNC_IMPL_ADD (array, i, strncat, 1, |