|
|
bdc76f |
commit 421749d693c4147017bc55f5ac3227c3a6e4bf31
|
|
|
bdc76f |
Author: Stefan Liebler <stli@linux.ibm.com>
|
|
|
bdc76f |
Date: Fri Mar 22 11:14:09 2019 +0100
|
|
|
bdc76f |
|
|
|
bdc76f |
S390: Add arch13 memmem ifunc variant.
|
|
|
bdc76f |
|
|
|
bdc76f |
This patch introduces the new arch13 ifunc variant for memmem.
|
|
|
bdc76f |
For needles longer than 9 bytes it is relying on the common-code
|
|
|
bdc76f |
implementation. For shorter needles it is using the new vstrs instruction
|
|
|
bdc76f |
which is able to search a substring within a vector register.
|
|
|
bdc76f |
|
|
|
bdc76f |
ChangeLog:
|
|
|
bdc76f |
|
|
|
bdc76f |
* sysdeps/s390/Makefile (sysdep_routines): Add memmem-arch13.
|
|
|
bdc76f |
* sysdeps/s390/ifunc-memmem.h (HAVE_MEMMEM_ARCH13, MEMMEM_ARCH13,
|
|
|
bdc76f |
MEMMEM_Z13_ONLY_USED_AS_FALLBACK, HAVE_MEMMEM_IFUNC_AND_ARCH13_SUPPORT):
|
|
|
bdc76f |
New defines.
|
|
|
bdc76f |
* sysdeps/s390/memmem-arch13.S: New file.
|
|
|
bdc76f |
* sysdeps/s390/memmem-vx.c: Omit GI symbol for z13 memmem ifunc variant
|
|
|
bdc76f |
if it is only used as fallback.
|
|
|
bdc76f |
* sysdeps/s390/memmem.c (memmem): Add arch13 variant in ifunc selector.
|
|
|
bdc76f |
* sysdeps/s390/multiarch/ifunc-impl-list.c
|
|
|
bdc76f |
(__libc_ifunc_impl_list): Add ifunc variant for arch13 memmem.
|
|
|
bdc76f |
|
|
|
bdc76f |
diff --git a/sysdeps/s390/Makefile b/sysdeps/s390/Makefile
|
|
|
bdc76f |
index 7287b1833da9500f..8bc82e523f9049db 100644
|
|
|
bdc76f |
--- a/sysdeps/s390/Makefile
|
|
|
bdc76f |
+++ b/sysdeps/s390/Makefile
|
|
|
bdc76f |
@@ -36,7 +36,7 @@ sysdep_routines += bzero memset memset-z900 \
|
|
|
bdc76f |
mempcpy memcpy memcpy-z900 \
|
|
|
bdc76f |
memmove memmove-c \
|
|
|
bdc76f |
strstr strstr-arch13 strstr-vx strstr-c \
|
|
|
bdc76f |
- memmem memmem-vx memmem-c \
|
|
|
bdc76f |
+ memmem memmem-arch13 memmem-vx memmem-c \
|
|
|
bdc76f |
strlen strlen-vx strlen-c \
|
|
|
bdc76f |
strnlen strnlen-vx strnlen-c \
|
|
|
bdc76f |
strcpy strcpy-vx strcpy-z900 \
|
|
|
bdc76f |
diff --git a/sysdeps/s390/ifunc-memmem.h b/sysdeps/s390/ifunc-memmem.h
|
|
|
bdc76f |
index 0f860d8d40080acf..48079b22b070f381 100644
|
|
|
bdc76f |
--- a/sysdeps/s390/ifunc-memmem.h
|
|
|
bdc76f |
+++ b/sysdeps/s390/ifunc-memmem.h
|
|
|
bdc76f |
@@ -17,7 +17,7 @@
|
|
|
bdc76f |
<http://www.gnu.org/licenses/>. */
|
|
|
bdc76f |
|
|
|
bdc76f |
#if defined USE_MULTIARCH && IS_IN (libc) \
|
|
|
bdc76f |
- && ! defined HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT
|
|
|
bdc76f |
+ && ! defined HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT
|
|
|
bdc76f |
# define HAVE_MEMMEM_IFUNC 1
|
|
|
bdc76f |
#else
|
|
|
bdc76f |
# define HAVE_MEMMEM_IFUNC 0
|
|
|
bdc76f |
@@ -29,14 +29,32 @@
|
|
|
bdc76f |
# define HAVE_MEMMEM_IFUNC_AND_VX_SUPPORT 0
|
|
|
bdc76f |
#endif
|
|
|
bdc76f |
|
|
|
bdc76f |
-#if defined HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT
|
|
|
bdc76f |
+#ifdef HAVE_S390_ARCH13_ASM_SUPPORT
|
|
|
bdc76f |
+# define HAVE_MEMMEM_IFUNC_AND_ARCH13_SUPPORT HAVE_MEMMEM_IFUNC
|
|
|
bdc76f |
+#else
|
|
|
bdc76f |
+# define HAVE_MEMMEM_IFUNC_AND_ARCH13_SUPPORT 0
|
|
|
bdc76f |
+#endif
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+#if defined HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT
|
|
|
bdc76f |
+# define MEMMEM_DEFAULT MEMMEM_ARCH13
|
|
|
bdc76f |
+# define HAVE_MEMMEM_C 0
|
|
|
bdc76f |
+# define HAVE_MEMMEM_Z13 1
|
|
|
bdc76f |
+# define MEMMEM_Z13_ONLY_USED_AS_FALLBACK 1
|
|
|
bdc76f |
+# define HAVE_MEMMEM_ARCH13 1
|
|
|
bdc76f |
+#elif defined HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT
|
|
|
bdc76f |
# define MEMMEM_DEFAULT MEMMEM_Z13
|
|
|
bdc76f |
# define HAVE_MEMMEM_C 0
|
|
|
bdc76f |
# define HAVE_MEMMEM_Z13 1
|
|
|
bdc76f |
+# define HAVE_MEMMEM_ARCH13 HAVE_MEMMEM_IFUNC_AND_ARCH13_SUPPORT
|
|
|
bdc76f |
#else
|
|
|
bdc76f |
# define MEMMEM_DEFAULT MEMMEM_C
|
|
|
bdc76f |
# define HAVE_MEMMEM_C 1
|
|
|
bdc76f |
# define HAVE_MEMMEM_Z13 HAVE_MEMMEM_IFUNC_AND_VX_SUPPORT
|
|
|
bdc76f |
+# define HAVE_MEMMEM_ARCH13 HAVE_MEMMEM_IFUNC_AND_ARCH13_SUPPORT
|
|
|
bdc76f |
+#endif
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+#ifndef MEMMEM_Z13_ONLY_USED_AS_FALLBACK
|
|
|
bdc76f |
+# define MEMMEM_Z13_ONLY_USED_AS_FALLBACK 0
|
|
|
bdc76f |
#endif
|
|
|
bdc76f |
|
|
|
bdc76f |
#if HAVE_MEMMEM_C
|
|
|
bdc76f |
@@ -50,3 +68,9 @@
|
|
|
bdc76f |
#else
|
|
|
bdc76f |
# define MEMMEM_Z13 NULL
|
|
|
bdc76f |
#endif
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+#if HAVE_MEMMEM_ARCH13
|
|
|
bdc76f |
+# define MEMMEM_ARCH13 __memmem_arch13
|
|
|
bdc76f |
+#else
|
|
|
bdc76f |
+# define MEMMEM_ARCH13 NULL
|
|
|
bdc76f |
+#endif
|
|
|
bdc76f |
diff --git a/sysdeps/s390/memmem-arch13.S b/sysdeps/s390/memmem-arch13.S
|
|
|
bdc76f |
new file mode 100644
|
|
|
bdc76f |
index 0000000000000000..b59d60acf0f6aaa0
|
|
|
bdc76f |
--- /dev/null
|
|
|
bdc76f |
+++ b/sysdeps/s390/memmem-arch13.S
|
|
|
bdc76f |
@@ -0,0 +1,161 @@
|
|
|
bdc76f |
+/* Vector optimized 32/64 bit S/390 version of memmem.
|
|
|
bdc76f |
+ Copyright (C) 2019 Free Software Foundation, Inc.
|
|
|
bdc76f |
+ This file is part of the GNU C Library.
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
bdc76f |
+ modify it under the terms of the GNU Lesser General Public
|
|
|
bdc76f |
+ License as published by the Free Software Foundation; either
|
|
|
bdc76f |
+ version 2.1 of the License, or (at your option) any later version.
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
bdc76f |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
bdc76f |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
bdc76f |
+ Lesser General Public License for more details.
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+ You should have received a copy of the GNU Lesser General Public
|
|
|
bdc76f |
+ License along with the GNU C Library; if not, see
|
|
|
bdc76f |
+ <http://www.gnu.org/licenses/>. */
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+#include <ifunc-memmem.h>
|
|
|
bdc76f |
+#if HAVE_MEMMEM_ARCH13
|
|
|
bdc76f |
+# include "sysdep.h"
|
|
|
bdc76f |
+# include "asm-syntax.h"
|
|
|
bdc76f |
+ .text
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+/* void *memmem(const void *haystack=r2, size_t haystacklen=r3,
|
|
|
bdc76f |
+ const void *needle=r4, size_t needlelen=r5);
|
|
|
bdc76f |
+ Locate a substring. */
|
|
|
bdc76f |
+ENTRY(MEMMEM_ARCH13)
|
|
|
bdc76f |
+ .machine "arch13"
|
|
|
bdc76f |
+ .machinemode "zarch_nohighgprs"
|
|
|
bdc76f |
+# if ! defined __s390x__
|
|
|
bdc76f |
+ llgfr %r3,%r3
|
|
|
bdc76f |
+ llgfr %r5,%r5
|
|
|
bdc76f |
+ llgfr %r4,%r4
|
|
|
bdc76f |
+ llgfr %r2,%r2
|
|
|
bdc76f |
+# endif /* ! defined __s390x__ */
|
|
|
bdc76f |
+ clgrjl %r3,%r5,.Lend_no_match /* Haystack < needle? */
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+ /* Jump to fallback if needle > 9. See also strstr-arch13.S. */
|
|
|
bdc76f |
+# if ! HAVE_MEMMEM_Z13
|
|
|
bdc76f |
+# error The arch13 variant of memmem needs the z13 variant of memmem!
|
|
|
bdc76f |
+# endif
|
|
|
bdc76f |
+ clgfi %r5,9
|
|
|
bdc76f |
+ jh MEMMEM_Z13
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+ aghik %r0,%r5,-1 /* vll needs highest index. */
|
|
|
bdc76f |
+ bc 4,0(%r14) /* cc==1: return if needle-len == 0. */
|
|
|
bdc76f |
+ vll %v18,%r0,0(%r4) /* Load needle. */
|
|
|
bdc76f |
+ vlvgb %v19,%r5,7 /* v19[7] contains length of needle. */
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+ clgijh %r3,16,.Lhaystack_larger_16
|
|
|
bdc76f |
+.Lhaystack_smaller_16_on_bb:
|
|
|
bdc76f |
+ aghik %r0,%r3,-1 /* vll needs highest index. */
|
|
|
bdc76f |
+ vll %v16,%r0,0(%r2) /* Load haystack. */
|
|
|
bdc76f |
+.Lhaystack_smaller_16:
|
|
|
bdc76f |
+ sgr %r3,%r5 /* r3 = largest valid match-index. */
|
|
|
bdc76f |
+ jl .Lend_no_match /* Haystack-len < needle-len? */
|
|
|
bdc76f |
+ vstrs %v20,%v16,%v18,%v19,0,0
|
|
|
bdc76f |
+ /* Vector string search without zero search where v20 will contain
|
|
|
bdc76f |
+ the index of a partial/full match or 16 (index is named k).
|
|
|
bdc76f |
+ cc=0 (no match; k=16): .Lend_no_match
|
|
|
bdc76f |
+ cc=1 (only available with zero-search): Ignore
|
|
|
bdc76f |
+ cc=2 (full match; k<16): Needle found, but could be beyond haystack!
|
|
|
bdc76f |
+ cc=3 (partial match; k<16): Always at end of v16 and thus beyond! */
|
|
|
bdc76f |
+ brc 9,.Lend_no_match /* Jump away if cc == 0 || cc == 3. */
|
|
|
bdc76f |
+ vlgvb %r1,%v20,7
|
|
|
bdc76f |
+ /* Verify that the full-match (cc=2) is valid! */
|
|
|
bdc76f |
+ clgrjh %r1,%r3,.Lend_no_match /* Jump away if match is beyond. */
|
|
|
bdc76f |
+ la %r2,0(%r1,%r2)
|
|
|
bdc76f |
+ br %r14
|
|
|
bdc76f |
+.Lend_no_match:
|
|
|
bdc76f |
+ lghi %r2,0
|
|
|
bdc76f |
+ br %r14
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+.Lhaystack_larger_16:
|
|
|
bdc76f |
+ vl %v16,0(%r2)
|
|
|
bdc76f |
+ lghi %r1,17
|
|
|
bdc76f |
+ lay %r4,-16(%r3,%r2) /* Boundary for loading with vl. */
|
|
|
bdc76f |
+ lay %r0,-64(%r3,%r2) /* Boundary for loading with 4xvl. */
|
|
|
bdc76f |
+ /* See also strstr-arch13.S:
|
|
|
bdc76f |
+ min-skip-partial-match-index = (16 - n_len) + 1 */
|
|
|
bdc76f |
+ sgr %r1,%r5
|
|
|
bdc76f |
+ clgfi %r3,64 /* Set Boundary to zero ... */
|
|
|
bdc76f |
+ la %r3,0(%r3,%r2)
|
|
|
bdc76f |
+ locghil %r0,0 /* ... if haystack < 64bytes. */
|
|
|
bdc76f |
+ jh .Lloop64
|
|
|
bdc76f |
+.Lloop:
|
|
|
bdc76f |
+ la %r2,16(%r2)
|
|
|
bdc76f |
+ /* Vector string search with zero search. cc=0 => no match. */
|
|
|
bdc76f |
+ vstrs %v20,%v16,%v18,%v19,0,0
|
|
|
bdc76f |
+ jne .Lloop_vstrs_nonzero_cc
|
|
|
bdc76f |
+ clgrjh %r2,%r4,.Lhaystack_too_small
|
|
|
bdc76f |
+.Lloop16:
|
|
|
bdc76f |
+ vl %v16,0(%r2)
|
|
|
bdc76f |
+ la %r2,16(%r2)
|
|
|
bdc76f |
+ vstrs %v20,%v16,%v18,%v19,0,0
|
|
|
bdc76f |
+ jne .Lloop_vstrs_nonzero_cc
|
|
|
bdc76f |
+ clgrjle %r2,%r4,.Lloop16
|
|
|
bdc76f |
+.Lhaystack_too_small:
|
|
|
bdc76f |
+ sgr %r3,%r2 /* r3 = (haystack + len) - curr_pos */
|
|
|
bdc76f |
+ je .Lend_no_match /* Remaining haystack is empty. */
|
|
|
bdc76f |
+ lcbb %r0,0(%r2),6
|
|
|
bdc76f |
+ jo .Lhaystack_smaller_16_on_bb
|
|
|
bdc76f |
+ vl %v16,0(%r2) /* Load haystack. */
|
|
|
bdc76f |
+ j .Lhaystack_smaller_16
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+.Lend_match_found:
|
|
|
bdc76f |
+ vlgvb %r4,%v20,7
|
|
|
bdc76f |
+ sgr %r2,%r1
|
|
|
bdc76f |
+ la %r2,0(%r4,%r2)
|
|
|
bdc76f |
+ br %r14
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+.Lloop_vstrs_nonzero_cc32:
|
|
|
bdc76f |
+ la %r2,16(%r2)
|
|
|
bdc76f |
+.Lloop_vstrs_nonzero_cc16:
|
|
|
bdc76f |
+ la %r2,16(%r2)
|
|
|
bdc76f |
+.Lloop_vstrs_nonzero_cc0:
|
|
|
bdc76f |
+ la %r2,16(%r2)
|
|
|
bdc76f |
+.Lloop_vstrs_nonzero_cc:
|
|
|
bdc76f |
+ lay %r2,-16(%r1,%r2) /* Compute next load address. */
|
|
|
bdc76f |
+ jh .Lend_match_found /* cc == 2 (full match) */
|
|
|
bdc76f |
+ clgrjh %r2,%r4,.Lhaystack_too_small
|
|
|
bdc76f |
+ vl %v16,0(%r2)
|
|
|
bdc76f |
+.Lloop_vstrs_nonzero_cc_loop:
|
|
|
bdc76f |
+ la %r2,0(%r1,%r2)
|
|
|
bdc76f |
+ vstrs %v20,%v16,%v18,%v19,0,0
|
|
|
bdc76f |
+ jh .Lend_match_found
|
|
|
bdc76f |
+ clgrjh %r2,%r4,.Lhaystack_too_small
|
|
|
bdc76f |
+ vl %v16,0(%r2) /* Next part of haystack. */
|
|
|
bdc76f |
+ jo .Lloop_vstrs_nonzero_cc_loop
|
|
|
bdc76f |
+ /* Case: no-match. */
|
|
|
bdc76f |
+ clgrjh %r2,%r0,.Lloop /* Jump away if haystack has less than 64b. */
|
|
|
bdc76f |
+.Lloop64:
|
|
|
bdc76f |
+ vstrs %v20,%v16,%v18,%v19,0,0
|
|
|
bdc76f |
+ jne .Lloop_vstrs_nonzero_cc0
|
|
|
bdc76f |
+ vl %v16,16(%r2) /* Next part of haystack. */
|
|
|
bdc76f |
+ vstrs %v20,%v16,%v18,%v19,0,0
|
|
|
bdc76f |
+ jne .Lloop_vstrs_nonzero_cc16
|
|
|
bdc76f |
+ vl %v16,32(%r2) /* Next part of haystack. */
|
|
|
bdc76f |
+ vstrs %v20,%v16,%v18,%v19,0,0
|
|
|
bdc76f |
+ jne .Lloop_vstrs_nonzero_cc32
|
|
|
bdc76f |
+ vl %v16,48(%r2) /* Next part of haystack. */
|
|
|
bdc76f |
+ la %r2,64(%r2)
|
|
|
bdc76f |
+ vstrs %v20,%v16,%v18,%v19,0,0
|
|
|
bdc76f |
+ jne .Lloop_vstrs_nonzero_cc
|
|
|
bdc76f |
+ clgrjh %r2,%r4,.Lhaystack_too_small
|
|
|
bdc76f |
+ vl %v16,0(%r2) /* Next part of haystack. */
|
|
|
bdc76f |
+ clgrjle %r2,%r0,.Lloop64
|
|
|
bdc76f |
+ j .Lloop
|
|
|
bdc76f |
+END(MEMMEM_ARCH13)
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+# if ! HAVE_MEMMEM_IFUNC
|
|
|
bdc76f |
+strong_alias (MEMMEM_ARCH13, __memmem)
|
|
|
bdc76f |
+weak_alias (__memmem, memmem)
|
|
|
bdc76f |
+# endif
|
|
|
bdc76f |
+
|
|
|
bdc76f |
+# if MEMMEM_Z13_ONLY_USED_AS_FALLBACK && defined SHARED && IS_IN (libc)
|
|
|
bdc76f |
+weak_alias (MEMMEM_ARCH13, __GI_memmem)
|
|
|
bdc76f |
+strong_alias (MEMMEM_ARCH13, __GI___memmem)
|
|
|
bdc76f |
+# endif
|
|
|
bdc76f |
+#endif
|
|
|
bdc76f |
diff --git a/sysdeps/s390/memmem-vx.c b/sysdeps/s390/memmem-vx.c
|
|
|
bdc76f |
index af6e200e4e0af1a5..e5608be77f05f2a9 100644
|
|
|
bdc76f |
--- a/sysdeps/s390/memmem-vx.c
|
|
|
bdc76f |
+++ b/sysdeps/s390/memmem-vx.c
|
|
|
bdc76f |
@@ -20,7 +20,7 @@
|
|
|
bdc76f |
|
|
|
bdc76f |
#if HAVE_MEMMEM_Z13
|
|
|
bdc76f |
# include <string.h>
|
|
|
bdc76f |
-# if HAVE_MEMMEM_IFUNC
|
|
|
bdc76f |
+# if HAVE_MEMMEM_IFUNC || MEMMEM_Z13_ONLY_USED_AS_FALLBACK
|
|
|
bdc76f |
|
|
|
bdc76f |
# ifndef _LIBC
|
|
|
bdc76f |
# define memmem MEMMEM_Z13
|
|
|
bdc76f |
@@ -32,7 +32,7 @@
|
|
|
bdc76f |
# undef libc_hidden_def
|
|
|
bdc76f |
# undef libc_hidden_weak
|
|
|
bdc76f |
|
|
|
bdc76f |
-# if HAVE_MEMMEM_C
|
|
|
bdc76f |
+# if HAVE_MEMMEM_C || MEMMEM_Z13_ONLY_USED_AS_FALLBACK
|
|
|
bdc76f |
# define libc_hidden_def(name)
|
|
|
bdc76f |
# define libc_hidden_weak(name)
|
|
|
bdc76f |
# else
|
|
|
bdc76f |
diff --git a/sysdeps/s390/memmem.c b/sysdeps/s390/memmem.c
|
|
|
bdc76f |
index 8c50b3f403eb8d1f..28871cd4b24868cc 100644
|
|
|
bdc76f |
--- a/sysdeps/s390/memmem.c
|
|
|
bdc76f |
+++ b/sysdeps/s390/memmem.c
|
|
|
bdc76f |
@@ -34,8 +34,14 @@ extern __typeof (__redirect_memmem) MEMMEM_C attribute_hidden;
|
|
|
bdc76f |
extern __typeof (__redirect_memmem) MEMMEM_Z13 attribute_hidden;
|
|
|
bdc76f |
# endif
|
|
|
bdc76f |
|
|
|
bdc76f |
+# if HAVE_MEMMEM_ARCH13
|
|
|
bdc76f |
+extern __typeof (__redirect_memmem) MEMMEM_ARCH13 attribute_hidden;
|
|
|
bdc76f |
+# endif
|
|
|
bdc76f |
+
|
|
|
bdc76f |
s390_libc_ifunc_expr (__redirect_memmem, __memmem,
|
|
|
bdc76f |
- (HAVE_MEMMEM_Z13 && (hwcap & HWCAP_S390_VX))
|
|
|
bdc76f |
+ (HAVE_MEMMEM_ARCH13 && (hwcap & HWCAP_S390_VXRS_EXT2))
|
|
|
bdc76f |
+ ? MEMMEM_ARCH13
|
|
|
bdc76f |
+ : (HAVE_MEMMEM_Z13 && (hwcap & HWCAP_S390_VX))
|
|
|
bdc76f |
? MEMMEM_Z13
|
|
|
bdc76f |
: MEMMEM_DEFAULT
|
|
|
bdc76f |
)
|
|
|
bdc76f |
diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c
|
|
|
bdc76f |
index 67a6a9c94afccd48..787d40688f4110ff 100644
|
|
|
bdc76f |
--- a/sysdeps/s390/multiarch/ifunc-impl-list.c
|
|
|
bdc76f |
+++ b/sysdeps/s390/multiarch/ifunc-impl-list.c
|
|
|
bdc76f |
@@ -202,6 +202,10 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
|
|
bdc76f |
|
|
|
bdc76f |
#if HAVE_MEMMEM_IFUNC
|
|
|
bdc76f |
IFUNC_IMPL (i, name, memmem,
|
|
|
bdc76f |
+# if HAVE_MEMMEM_ARCH13
|
|
|
bdc76f |
+ IFUNC_IMPL_ADD (array, i, memmem,
|
|
|
bdc76f |
+ dl_hwcap & HWCAP_S390_VXRS_EXT2, MEMMEM_ARCH13)
|
|
|
bdc76f |
+# endif
|
|
|
bdc76f |
# if HAVE_MEMMEM_Z13
|
|
|
bdc76f |
IFUNC_IMPL_ADD (array, i, memmem,
|
|
|
bdc76f |
dl_hwcap & HWCAP_S390_VX, MEMMEM_Z13)
|