about summary refs log tree commit diff
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
commit8c25dddd2e32bce47dfe01ca51c8aab535dbe23d (patch)
tree31a8c2d5200860111d1ab6be8e0cc721367cd79c /sysdeps/s390/multiarch
parentcdd927d98cc38acf55e1c6594b5c9451df8f239f (diff)
downloadglibc-8c25dddd2e32bce47dfe01ca51c8aab535dbe23d.tar.gz
glibc-8c25dddd2e32bce47dfe01ca51c8aab535dbe23d.tar.xz
glibc-8c25dddd2e32bce47dfe01ca51c8aab535dbe23d.zip
S390: Add z13 strstr ifunc variant.
The new vector variant of strstr is using the common code
implementation, but instead of calling the default
str* / mem* functions, the vector variants are called.

ChangeLog:

	* sysdeps/s390/Makefile (sysdep_routines): Add strstr variants.
	* sysdeps/s390/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Add ifunc variants for strstr.
	* sysdeps/s390/ifunc-strstr.h: New file.
	* sysdeps/s390/strstr.c: Likewise.
	* sysdeps/s390/strstr-c.c: Likewise.
	* sysdeps/s390/strstr-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 c05c63e006..14727f8fef 100644
--- a/sysdeps/s390/multiarch/ifunc-impl-list.c
+++ b/sysdeps/s390/multiarch/ifunc-impl-list.c
@@ -24,6 +24,7 @@
 #include <ifunc-memset.h>
 #include <ifunc-memcmp.h>
 #include <ifunc-memcpy.h>
+#include <ifunc-strstr.h>
 
 /* Maximum number of IFUNC implementations.  */
 #define MAX_IFUNC	3
@@ -138,6 +139,18 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 		)
 #endif /* HAVE_MEMMOVE_IFUNC  */
 
+#if HAVE_STRSTR_IFUNC
+    IFUNC_IMPL (i, name, strstr,
+# if HAVE_STRSTR_Z13
+		IFUNC_IMPL_ADD (array, i, strstr,
+				dl_hwcap & HWCAP_S390_VX, STRSTR_Z13)
+# endif
+# if HAVE_STRSTR_C
+		IFUNC_IMPL_ADD (array, i, strstr, 1, STRSTR_C)
+# endif
+		)
+#endif /* HAVE_STRSTR_IFUNC  */
+
 #ifdef HAVE_S390_VX_ASM_SUPPORT
 
 # define IFUNC_VX_IMPL(FUNC)						\