diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2018-12-18 13:57:12 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2018-12-18 13:57:12 +0100 |
commit | 8e5a0afbbf0a96fb873e27aa064c9bacc9cfd9c6 (patch) | |
tree | dfaa0b38359217a4a4902f9241585260a70ce55f /sysdeps/s390/multiarch/ifunc-impl-list.c | |
parent | 25218822bdbfb49b8ea0f419e8a20d2b9bd47cd0 (diff) | |
download | glibc-8e5a0afbbf0a96fb873e27aa064c9bacc9cfd9c6.tar.gz |
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.
Diffstat (limited to 'sysdeps/s390/multiarch/ifunc-impl-list.c')
-rw-r--r-- | sysdeps/s390/multiarch/ifunc-impl-list.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c index 021e9f247f..1b7f3df3a3 100644 --- a/sysdeps/s390/multiarch/ifunc-impl-list.c +++ b/sysdeps/s390/multiarch/ifunc-impl-list.c @@ -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); |