diff options
author | MAHESH BODAPATI <bmahi496@linux.ibm.com> | 2023-12-12 08:52:45 -0600 |
---|---|---|
committer | Rajalakshmi Srinivasaraghavan <rajis@linux.ibm.com> | 2023-12-14 14:40:14 -0600 |
commit | b9182c793caa05df5d697427c0538936e6396d4b (patch) | |
tree | 2fe92e68ae203533eb5a2cc1520d84b15b3c992e /sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c | |
parent | d0aefec49941cf6d97e2244d6aa20bafc26d5942 (diff) | |
download | glibc-b9182c793caa05df5d697427c0538936e6396d4b.tar.gz glibc-b9182c793caa05df5d697427c0538936e6396d4b.tar.xz glibc-b9182c793caa05df5d697427c0538936e6396d4b.zip |
powerpc : Add optimized memchr for POWER10
Optimized memchr for POWER10 based on existing rawmemchr and strlen. Reordering instructions and loop unrolling helped in getting better performance. Reviewed-by: Rajalakshmi Srinivasaraghavan <rajis@linux.ibm.com>
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c')
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c index 965dd17786..1a34629db9 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c @@ -226,6 +226,12 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Support sysdeps/powerpc/powerpc64/multiarch/memchr.c. */ IFUNC_IMPL (i, name, memchr, +#ifdef __LITTLE_ENDIAN__ + IFUNC_IMPL_ADD (array, i, memchr, + hwcap2 & PPC_FEATURE2_ARCH_3_1 + && hwcap & PPC_FEATURE_HAS_VSX, + __memchr_power10) +#endif IFUNC_IMPL_ADD (array, i, memchr, hwcap2 & PPC_FEATURE2_ARCH_2_07 && hwcap & PPC_FEATURE_HAS_ALTIVEC, |