aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
diff options
context:
space:
mode:
authorRajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>2014-03-03 08:06:41 -0600
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-03-03 08:06:41 -0600
commitc7debbdfacbef150aaf9113eb05ccaf2b9e7af6c (patch)
treebaf78c9b58faa86b3996ae3745cb81fd50e2fb58 /sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
parent235eed8644eb2deebf839b13b418dbd47bb14c5a (diff)
downloadglibc-c7debbdfacbef150aaf9113eb05ccaf2b9e7af6c.tar
glibc-c7debbdfacbef150aaf9113eb05ccaf2b9e7af6c.tar.gz
glibc-c7debbdfacbef150aaf9113eb05ccaf2b9e7af6c.tar.bz2
glibc-c7debbdfacbef150aaf9113eb05ccaf2b9e7af6c.zip
PowerPC: strrchr optimization for POWER7/PPC64
This patch optimizes strrchr() for ppc64. It uses aligned memory access along with cmpb instruction and CPU prefetch to avoid cache misses for speed improvement.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c')
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
index 6bbdd4ebba..8789483780 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
@@ -238,5 +238,13 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
IFUNC_IMPL_ADD (array, i, wcscpy, 1,
__wcscpy_ppc))
+ /* Support sysdeps/powerpc/powerpc64/multiarch/strrchr.c. */
+ IFUNC_IMPL (i, name, strrchr,
+ IFUNC_IMPL_ADD (array, i, strrchr,
+ hwcap & PPC_FEATURE_HAS_VSX,
+ __strrchr_power7)
+ IFUNC_IMPL_ADD (array, i, strrchr, 1,
+ __strrchr_ppc))
+
return i;
}