linux/arch/arm64/lib
Robin Murphy 9e51cafd78 arm64: Better optimised memchr()
Although we implement our own assembly version of memchr(), it turns
out to be barely any better than what GCC can generate for the generic
C version (and would go wrong if the size_t argument were ever large
enough to be interpreted as negative). Unfortunately we can't import the
tuned implementation from the Arm optimized-routines library, since that
has some Advanced SIMD parts which are not really viable for general
kernel library code. What we can do, however, is pep things up with some
relatively straightforward word-at-a-time logic for larger calls.

Adding some timing to optimized-routines' memchr() test for a simple
benchmark, overall this version comes in around half as fast as the SIMD
code, but still nearly 4x faster than our existing implementation.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/58471b42f9287e039dafa9e5e7035077152438fd.1622128527.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-06-01 18:34:38 +01:00
..
clear_page.S arm64: lib: Annotate {clear, copy}_page() as position-independent 2021-03-19 12:01:19 +00:00
clear_user.S arm64: uaccess cleanup macro naming 2020-12-02 19:49:11 +00:00
copy_from_user.S arm64: uaccess cleanup macro naming 2020-12-02 19:49:11 +00:00
copy_in_user.S arm64: uaccess cleanup macro naming 2020-12-02 19:49:11 +00:00
copy_page.S arm64: lib: Annotate {clear, copy}_page() as position-independent 2021-03-19 12:01:19 +00:00
copy_template.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
copy_to_user.S arm64: uaccess cleanup macro naming 2020-12-02 19:49:11 +00:00
crc32.S arm64: lib: Consistently enable crc32 extension 2020-04-28 14:36:32 +01:00
csum.c arm64: csum: Disable KASAN for do_csum() 2020-04-15 21:36:41 +01:00
delay.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
error-inject.c arm64: Add support for function error injection 2019-08-07 13:53:09 +01:00
Makefile arm64: Import latest memcpy()/memmove() implementation 2021-06-01 18:34:38 +01:00
memchr.S arm64: Better optimised memchr() 2021-06-01 18:34:38 +01:00
memcmp.S arm64: Import latest version of Cortex Strings' memcmp 2021-06-01 18:34:37 +01:00
memcpy.S arm64: Import latest memcpy()/memmove() implementation 2021-06-01 18:34:38 +01:00
memset.S arm64: Change .weak to SYM_FUNC_START_WEAK_PI for arch/arm64/lib/mem*.S 2020-10-30 08:32:31 +00:00
mte.S arm64: kasan: simplify and inline MTE functions 2021-02-26 09:41:03 -08:00
strchr.S arm64: lib: Use modern annotations for assembly functions 2020-01-08 12:23:02 +00:00
strcmp.S arm64: Import latest version of Cortex Strings' strcmp 2021-06-01 18:34:37 +01:00
strlen.S arm64: Import updated version of Cortex Strings' strlen 2021-06-01 18:34:37 +01:00
strncmp.S arm64: Import latest version of Cortex Strings' strncmp 2021-06-01 18:34:38 +01:00
strnlen.S arm64: lib: Use modern annotations for assembly functions 2020-01-08 12:23:02 +00:00
strrchr.S arm64: lib: Use modern annotations for assembly functions 2020-01-08 12:23:02 +00:00
tishift.S arm64: lib: Use modern annotations for assembly functions 2020-01-08 12:23:02 +00:00
uaccess_flushcache.c arm64: uaccess: simplify __copy_user_flushcache() 2020-12-02 19:49:10 +00:00
xor-neon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00