diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2018-12-18 13:57:17 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2018-12-18 13:57:17 +0100 |
commit | 89bfcbdf9d3d36eff0d544f655991149a7ae680b (patch) | |
tree | 6e088f94fdca1c5fee42e0ed5dfed5c02b12e228 /sysdeps/s390/multiarch/ifunc-impl-list.c | |
parent | 196655ba54ebdcdcc0468bcb6e136757b013d350 (diff) | |
download | glibc-89bfcbdf9d3d36eff0d544f655991149a7ae680b.tar.gz glibc-89bfcbdf9d3d36eff0d544f655991149a7ae680b.tar.xz glibc-89bfcbdf9d3d36eff0d544f655991149a7ae680b.zip |
S390: Refactor memrchr ifunc handling.
The ifunc handling for memrchr 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. ChangeLog: * sysdeps/s390/multiarch/Makefile (sysdep_routines): Remove memrchr variants. * sysdeps/s390/Makefile (sysdep_routines): Add memrchr variants. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Refactor ifunc handling for memrchr. * sysdeps/s390/multiarch/memrchr-c.c: Move to ... * sysdeps/s390/memrchr-c.c: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/memrchr-vx.S: Move to ... * sysdeps/s390/memrchr-vx.S: ... here and adjust ifunc handling. * sysdeps/s390/multiarch/memrchr.c: Move to ... * sysdeps/s390/memrchr.c: ... here and adjust ifunc handling. * sysdeps/s390/ifunc-memrchr.h: New file.
Diffstat (limited to 'sysdeps/s390/multiarch/ifunc-impl-list.c')
-rw-r--r-- | sysdeps/s390/multiarch/ifunc-impl-list.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c index b8917747f0..0f01b99691 100644 --- a/sysdeps/s390/multiarch/ifunc-impl-list.c +++ b/sysdeps/s390/multiarch/ifunc-impl-list.c @@ -45,6 +45,7 @@ #include <ifunc-memchr.h> #include <ifunc-rawmemchr.h> #include <ifunc-memccpy.h> +#include <ifunc-memrchr.h> /* Maximum number of IFUNC implementations. */ #define MAX_IFUNC 3 @@ -411,6 +412,18 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, ) #endif /* HAVE_MEMCCPY_IFUNC */ +#if HAVE_MEMRCHR_IFUNC + IFUNC_IMPL (i, name, memrchr, +# if HAVE_MEMRCHR_Z13 + IFUNC_IMPL_ADD (array, i, memrchr, + dl_hwcap & HWCAP_S390_VX, MEMRCHR_Z13) +# endif +# if HAVE_MEMRCHR_C + IFUNC_IMPL_ADD (array, i, memrchr, 1, MEMRCHR_C) +# endif + ) +#endif /* HAVE_MEMRCHR_IFUNC */ + #ifdef HAVE_S390_VX_ASM_SUPPORT # define IFUNC_VX_IMPL(FUNC) \ @@ -457,8 +470,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_VX_IMPL (wmemcmp); - IFUNC_VX_IMPL (memrchr); - #endif /* HAVE_S390_VX_ASM_SUPPORT */ return i; |