glibc/sysdeps/aarch64/multiarch
Siddhesh Poyarekar 436e4d5b96 [aarch64] Add an ASIMD variant of strlen for falkor
This variant of strlen uses vector loads and operations to reduce the
size of the code and also eliminate the non-ascii fallback.  This
works very well for falkor because of its two vector units and
efficient vector ops.  In the best case it reduces latency of cases in
bench-strlen by 48%, with gains throughout the benchmark.
strlen-walk also sees uniform gains in the 5%-15% range.

Overall the routine appears to work better than the stock one for falkor
regardless of the benchmark, length of string or cache state.

The same cannot be said of a53 and a72 though.  a53 performance was
greatly reduced and for a72 it was a bit of a mixed bag, slightly on the
negative side but I reckon it might be fast in some situations.

	* sysdeps/aarch64/strlen.S (__strlen): Rename to STRLEN.
	[!STRLEN](STRLEN): Set to __strlen.
	* sysdeps/aarch64/multiarch/strlen.c: New file.
	* sysdeps/aarch64/multiarch/strlen_generic.S: Likewise.
	* sysdeps/aarch64/multiarch/strlen_asimd.S: Likewise.
	* sysdeps/aarch64/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add strlen.
	* sysdeps/aarch64/multiarch/Makefile (sysdep_routines): Add
	strlen_generic and strlen_asimd.

Reviewed-By: szabolcs.nagy@arm.com
CC: pinskia@gmail.com
2018-08-15 23:01:33 +05:30
..
ifunc-impl-list.c [aarch64] Add an ASIMD variant of strlen for falkor 2018-08-15 23:01:33 +05:30
init-arch.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
Makefile [aarch64] Add an ASIMD variant of strlen for falkor 2018-08-15 23:01:33 +05:30
memcpy_falkor.S aarch64,falkor: Use vector registers for memcpy 2018-06-29 22:45:59 +05:30
memcpy_generic.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memcpy_thunderx2.S IFUNC for Cavium ThunderX2 2018-02-22 08:38:47 -08:00
memcpy_thunderx.S IFUNC for Cavium ThunderX2 2018-02-22 08:38:47 -08:00
memcpy.c aarch64: add HXT Phecda core memory operation ifuncs 2018-06-12 21:29:11 +05:30
memmove_falkor.S aarch64,falkor: Use vector registers for memmove 2018-06-29 22:45:07 +05:30
memmove.c aarch64: add HXT Phecda core memory operation ifuncs 2018-06-12 21:29:11 +05:30
memset_falkor.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memset_generic.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
memset.c aarch64: add HXT Phecda core memory operation ifuncs 2018-06-12 21:29:11 +05:30
rtld-memset.S Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
strlen_asimd.S [aarch64] Add an ASIMD variant of strlen for falkor 2018-08-15 23:01:33 +05:30
strlen_generic.S [aarch64] Add an ASIMD variant of strlen for falkor 2018-08-15 23:01:33 +05:30
strlen.c [aarch64] Add an ASIMD variant of strlen for falkor 2018-08-15 23:01:33 +05:30