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

S390: Refactor strcat ifunc handling.

The ifunc handling for strcat is adjusted in order to omit ifunc
variants if those will never be used as the minimum architecture level
already supports newer CPUs by default.
Glibc internal calls will then also use the "newer" ifunc variant.

ChangeLog:

	* sysdeps/s390/multiarch/Makefile
	(sysdep_routines): Remove strcat variants.
	* sysdeps/s390/Makefile (sysdep_routines): Add strcat variants.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Refactor ifunc handling for strcat.
	* sysdeps/s390/multiarch/strcat-c.c: Move to ...
	* sysdeps/s390/strcat-c.c: ... here and adjust ifunc handling.
	* sysdeps/s390/multiarch/strcat-vx.S: Move to ...
	* sysdeps/s390/strcat-vx.S: ... here and adjust ifunc handling.
	* sysdeps/s390/multiarch/strcat.c: Move to ...
	* sysdeps/s390/strcat.c: ... here and adjust ifunc handling.
	* sysdeps/s390/ifunc-strcat.h: New file.
This commit is contained in:
Stefan Liebler
2018-12-18 13:57:12 +01:00
parent 25218822bd
commit 8e5a0afbbf
8 changed files with 123 additions and 21 deletions

View File

@@ -32,6 +32,7 @@
#include <ifunc-stpcpy.h>
#include <ifunc-strncpy.h>
#include <ifunc-stpncpy.h>
#include <ifunc-strcat.h>
/* Maximum number of IFUNC implementations. */
#define MAX_IFUNC 3
@@ -242,6 +243,17 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
)
#endif /* HAVE_STPNCPY_IFUNC */
#if HAVE_STRCAT_IFUNC
IFUNC_IMPL (i, name, strcat,
# if HAVE_STRCAT_Z13
IFUNC_IMPL_ADD (array, i, strcat,
dl_hwcap & HWCAP_S390_VX, STRCAT_Z13)
# endif
# if HAVE_STRCAT_C
IFUNC_IMPL_ADD (array, i, strcat, 1, STRCAT_C)
# endif
)
#endif /* HAVE_STRCAT_IFUNC */
#ifdef HAVE_S390_VX_ASM_SUPPORT
@@ -263,7 +275,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
IFUNC_VX_IMPL (wcpncpy);
IFUNC_VX_IMPL (strcat);
IFUNC_VX_IMPL (wcscat);
IFUNC_VX_IMPL (strncat);