diff options
author | Patrick McGehearty <patrick.mcgehearty@oracle.com> | 2017-12-13 18:14:17 -0200 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-12-14 08:48:19 -0200 |
commit | e6a1c5dc776dd6b562e0aae17dbb61e396a81fb3 (patch) | |
tree | aef723c8d6802c2037d83824bf0a905dfe758974 /sysdeps/sparc/sparc32/sparcv9 | |
parent | 1b6e07f8e06240eff4f0d0a53161508de582cbc6 (diff) | |
download | glibc-e6a1c5dc776dd6b562e0aae17dbb61e396a81fb3.tar.gz |
sparc: M7 optimized memset/bzero
Support added to identify Sparc M7/T7/S7/M8/T8 processor capability.
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)
Tested in sparcv9-*-* and sparc64-*-* targets in both multi and
non-multi arch configurations.
Patrick McGehearty <patrick.mcgehearty@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.
* NEWS: Mention sparc m7 optimized memcpy, mempcpy, memmove, and
memset.
Diffstat (limited to 'sysdeps/sparc/sparc32/sparcv9')
-rw-r--r-- | sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara7.S | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile index 869f063ca1..a6d08f3a00 100644 --- a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile @@ -10,5 +10,5 @@ ifeq ($(subdir),string) sysdep_routines += memcpy-ultra3 memcpy-niagara1 memcpy-niagara2 \ memset-niagara1 memcpy-niagara4 memset-niagara4 \ memcpy-ultra1 memset-ultra1 memcpy-memmove-niagara7 \ - memmove-ultra1 + memmove-ultra1 memset-niagara7 endif diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara7.S b/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara7.S new file mode 100644 index 0000000000..de91aa4d5a --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara7.S @@ -0,0 +1,2 @@ +#define XCC icc +#include <sparc64/multiarch/memset-niagara7.S> |