summaryrefslogtreecommitdiff
path: root/sysdeps/s390/multiarch
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.ibm.com>2018-12-18 13:57:09 +0100
committerStefan Liebler <stli@linux.ibm.com>2018-12-18 13:57:09 +0100
commitd2c4c403feddd6f0b9dbf31ca7541b37f90ee30a (patch)
tree8507beba7ee4f2d088490d3bd3b9b16308ad0e9f /sysdeps/s390/multiarch
parent8c25dddd2e32bce47dfe01ca51c8aab535dbe23d (diff)
downloadglibc-d2c4c403feddd6f0b9dbf31ca7541b37f90ee30a.tar.gz
S390: Add z13 memmem ifunc variant.
The new vector variant of memmem is using the common code implementation, but instead of calling the default mem* functions, the vector variants are called. ChangeLog: * sysdeps/s390/Makefile (sysdep_routines): Add memmem variants. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc variants for memmem. * sysdeps/s390/ifunc-memmem.h: New file. * sysdeps/s390/memmem.c: Likewise. * sysdeps/s390/memmem-c.c: Likewise. * sysdeps/s390/memmem-vx.c: Likewise.
Diffstat (limited to 'sysdeps/s390/multiarch')
-rw-r--r--sysdeps/s390/multiarch/ifunc-impl-list.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c
index 14727f8fef..da8696d917 100644
--- a/sysdeps/s390/multiarch/ifunc-impl-list.c
+++ b/sysdeps/s390/multiarch/ifunc-impl-list.c
@@ -25,6 +25,7 @@
#include <ifunc-memcmp.h>
#include <ifunc-memcpy.h>
#include <ifunc-strstr.h>
+#include <ifunc-memmem.h>
/* Maximum number of IFUNC implementations. */
#define MAX_IFUNC 3
@@ -151,6 +152,18 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
)
#endif /* HAVE_STRSTR_IFUNC */
+#if HAVE_MEMMEM_IFUNC
+ IFUNC_IMPL (i, name, memmem,
+# if HAVE_MEMMEM_Z13
+ IFUNC_IMPL_ADD (array, i, memmem,
+ dl_hwcap & HWCAP_S390_VX, MEMMEM_Z13)
+# endif
+# if HAVE_MEMMEM_C
+ IFUNC_IMPL_ADD (array, i, memmem, 1, MEMMEM_C)
+# endif
+ )
+#endif /* HAVE_MEMMEM_IFUNC */
+
#ifdef HAVE_S390_VX_ASM_SUPPORT
# define IFUNC_VX_IMPL(FUNC) \