1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

S390: Optimize strnlen and wcsnlen.

This patch provides optimized versions of strnlen and wcsnlen with the z13
vector instructions.

ChangeLog:

	* sysdeps/s390/multiarch/strnlen-c.c: New File.
	* sysdeps/s390/multiarch/strnlen-vx.S: Likewise.
	* sysdeps/s390/multiarch/strnlen.c: Likewise.
	* sysdeps/s390/multiarch/wcsnlen-c.c: Likewise.
	* sysdeps/s390/multiarch/wcsnlen-vx.S: Likewise.
	* sysdeps/s390/multiarch/wcsnlen.c: Likewise.
	* sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strnlen and
	wcsnlen functions.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc test for strnlen, wcsnlen.
	* wcsmbs/wcsnlen.c: Use WCSNLEN if defined.
	* string/test-strnlen.c: Add wcsnlen support.
	* wcsmbs/test-wcsnlen.c: New File.
	* wcsmbs/Makefile (strop-tests): Add wcsnlen.
	* benchtests/bench-strnlen.c: Add wcsnlen support.
	* benchtests/bench-wcsnlen.c: New File.
	* benchtests/Makefile (wcsmbs-bench): Add wcsnlen.
This commit is contained in:
Stefan Liebler
2015-08-26 10:26:20 +02:00
committed by Andreas Krebbel
parent 9472f35a0a
commit fcf40ebe26
16 changed files with 570 additions and 61 deletions

View File

@@ -82,6 +82,9 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
IFUNC_VX_IMPL (strlen);
IFUNC_VX_IMPL (wcslen);
IFUNC_VX_IMPL (strnlen);
IFUNC_VX_IMPL (wcsnlen);
#endif /* HAVE_S390_VX_ASM_SUPPORT */
return i;