summaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2017-10-20 20:29:06 -0200
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-12-11 18:36:54 -0200
commitef915cebe6e7e0ce83242d1261df2419feb3a9cc (patch)
treef764cc35f38c2392f97080f700a1300840a29866 /sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c
parent20f015e10c74ab17fae92b4f579f09b5db342be7 (diff)
downloadglibc-ef915cebe6e7e0ce83242d1261df2419feb3a9cc.tar.gz
sparc: M7 optimized memset/bzeroazanella/ifunc-c-sparc-m7
Tested in sparcv9-*-* and sparc64-*-* targets in both multi and non-multi arch configurations. Support added to identify Sparc M7/T7/S7/M8/T8 processor capability. Usual "make check" correctness tests run with no regressions. Performance tests run on Sparc S7 using new code and old niagara4 code. Optimizations for memset also apply to bzero as they share code. For memset/bzero, performance comparison with niagara4 code: For memset nonzero data, 256-1023 bytes - 60-90% gain (in cache); 5% gain (out of cache) 1K+ bytes - 80-260% gain (in cache); 40-80% gain (out of cache) For memset zero data (and bzero), 256-1023 bytes - 80-120% gain (in cache), 0% gain (out of cache) 1024+ bytes - 2-4x gain (in cache), 10-35% gain (out of cache) Jose E. Marchesi <jose.marchesi@oracle.com> Adhemerval Zanella <adhemerval.zanella@linaro.org> * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile (sysdeps_routines): Add memset-niagara7. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdes_rotuines): Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara7.S: New file. * sysdeps/sparc/sparc64/multiarch/memset-niagara7.S: Likewise. * sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add __bzero_niagara7 and __memset_niagara7. * sysdeps/sparc/sparc64/multiarch/ifunc-memset.h (IFUNC_SELECTOR): Add niagara7 option.
Diffstat (limited to 'sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c')
-rw-r--r--sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c b/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c
index a803392788..cce78f02cd 100644
--- a/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c
+++ b/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c
@@ -62,6 +62,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
IFUNC_IMPL_ADD (array, i, mempcpy, 1, __mempcpy_ultra1));
IFUNC_IMPL (i, name, bzero,
+ IFUNC_IMPL_ADD (array, i, bzero, hwcap & HWCAP_SPARC_ADP,
+ __bzero_niagara7)
IFUNC_IMPL_ADD (array, i, bzero, hwcap & HWCAP_SPARC_CRYPTO,
__bzero_niagara4)
IFUNC_IMPL_ADD (array, i, bzero, hwcap & HWCAP_SPARC_BLKINIT,
@@ -69,6 +71,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ultra1));
IFUNC_IMPL (i, name, memset,
+ IFUNC_IMPL_ADD (array, i, memset, hwcap & HWCAP_SPARC_ADP,
+ __memset_niagara7)
IFUNC_IMPL_ADD (array, i, memset, hwcap & HWCAP_SPARC_CRYPTO,
__memset_niagara4)
IFUNC_IMPL_ADD (array, i, memset, hwcap & HWCAP_SPARC_BLKINIT,