00db10
From cca51a74315c37614042113b004505b150d305d7 Mon Sep 17 00:00:00 2001
00db10
From: Stefan Liebler <stli@linux.vnet.ibm.com>
00db10
Date: Thu, 8 Oct 2015 10:54:21 +0200
00db10
Subject: [PATCH 10/30] S390: Optimize strlen and wcslen.
00db10
00db10
upstream-commit-id: 9472f35a0a6dbbda82ce103aaf0f5013f5d46e34
00db10
https://www.sourceware.org/ml/libc-alpha/2015-07/msg00089.html
00db10
00db10
This patch provides optimized versions of strlen and wcslen with the z13 vector
00db10
instructions.
00db10
The helper macro IFUNC_VX_IMPL is introduced and is used to register all
00db10
__<func>_c() and __<func>_vx() functions within __libc_ifunc_impl_list()
00db10
to the ifunc test framework.
00db10
00db10
ChangeLog:
00db10
00db10
	* sysdeps/s390/multiarch/Makefile: New File.
00db10
	* sysdeps/s390/multiarch/strlen-c.c: Likewise.
00db10
	* sysdeps/s390/multiarch/strlen-vx.S: Likewise.
00db10
	* sysdeps/s390/multiarch/strlen.c: Likewise.
00db10
	* sysdeps/s390/multiarch/wcslen-c.c: Likewise.
00db10
	* sysdeps/s390/multiarch/wcslen-vx.S: Likewise.
00db10
	* sysdeps/s390/multiarch/wcslen.c: Likewise.
00db10
	* string/strlen.c (STRLEN): Define and use macro.
00db10
	* sysdeps/s390/multiarch/ifunc-impl-list.c
00db10
	(IFUNC_VX_IMPL): New macro function.
00db10
	(__libc_ifunc_impl_list): Add ifunc test for strlen, wcslen.
00db10
	* benchtests/Makefile (wcsmbs-bench): New variable.
00db10
	(string-bench-all): Added wcsmbs-bench.
00db10
	* benchtests/bench-wcslen.c: New File.
00db10
---
00db10
 benchtests/Makefile                      |  3 +-
00db10
 benchtests/bench-wcslen.c                | 20 +++++++
00db10
 string/strlen.c                          |  7 ++-
00db10
 sysdeps/s390/multiarch/Makefile          |  7 +++
00db10
 sysdeps/s390/multiarch/ifunc-impl-list.c | 14 +++++
00db10
 sysdeps/s390/multiarch/strlen-c.c        | 28 ++++++++++
00db10
 sysdeps/s390/multiarch/strlen-vx.S       | 84 +++++++++++++++++++++++++++++
00db10
 sysdeps/s390/multiarch/strlen.c          | 27 ++++++++++
00db10
 sysdeps/s390/multiarch/wcslen-c.c        | 25 +++++++++
00db10
 sysdeps/s390/multiarch/wcslen-vx.S       | 91 ++++++++++++++++++++++++++++++++
00db10
 sysdeps/s390/multiarch/wcslen.c          | 28 ++++++++++
00db10
 11 files changed, 331 insertions(+), 3 deletions(-)
00db10
 create mode 100644 benchtests/bench-wcslen.c
00db10
 create mode 100644 sysdeps/s390/multiarch/Makefile
00db10
 create mode 100644 sysdeps/s390/multiarch/strlen-c.c
00db10
 create mode 100644 sysdeps/s390/multiarch/strlen-vx.S
00db10
 create mode 100644 sysdeps/s390/multiarch/strlen.c
00db10
 create mode 100644 sysdeps/s390/multiarch/wcslen-c.c
00db10
 create mode 100644 sysdeps/s390/multiarch/wcslen-vx.S
00db10
 create mode 100644 sysdeps/s390/multiarch/wcslen.c
00db10
00db10
diff --git a/benchtests/Makefile b/benchtests/Makefile
00db10
index 9b02bc7..09ab87f 100644
00db10
--- a/benchtests/Makefile
00db10
+++ b/benchtests/Makefile
00db10
@@ -38,7 +38,8 @@ string-bench := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \
00db10
 		strcat strchr strchrnul strcmp strcpy strcspn strlen \
00db10
 		strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \
00db10
 		strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok
00db10
-string-bench-all := $(string-bench)
00db10
+wcsmbs-bench := wcslen
00db10
+string-bench-all := $(string-bench) ${wcsmbs-bench}
00db10
 
00db10
 stdlib-bench := strtod
00db10
 
00db10
diff --git a/benchtests/bench-wcslen.c b/benchtests/bench-wcslen.c
00db10
new file mode 100644
00db10
index 0000000..4e9d085
00db10
--- /dev/null
00db10
+++ b/benchtests/bench-wcslen.c
00db10
@@ -0,0 +1,20 @@
00db10
+/* Measure wcslen functions.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#define WIDE 1
00db10
+#include "bench-strlen.c"
00db10
diff --git a/string/strlen.c b/string/strlen.c
00db10
index 5c1efda..d682693 100644
00db10
--- a/string/strlen.c
00db10
+++ b/string/strlen.c
00db10
@@ -23,11 +23,14 @@
00db10
 
00db10
 #undef strlen
00db10
 
00db10
+#ifndef STRLEN
00db10
+# define STRLEN strlen
00db10
+#endif
00db10
+
00db10
 /* Return the length of the null-terminated string STR.  Scan for
00db10
    the null terminator quickly by testing four bytes at a time.  */
00db10
 size_t
00db10
-strlen (str)
00db10
-     const char *str;
00db10
+STRLEN (const char *str)
00db10
 {
00db10
   const char *char_ptr;
00db10
   const unsigned long int *longword_ptr;
00db10
diff --git a/sysdeps/s390/multiarch/Makefile b/sysdeps/s390/multiarch/Makefile
00db10
new file mode 100644
00db10
index 0000000..3a98098
00db10
--- /dev/null
00db10
+++ b/sysdeps/s390/multiarch/Makefile
00db10
@@ -0,0 +1,7 @@
00db10
+ifeq ($(subdir),string)
00db10
+sysdep_routines += strlen strlen-vx strlen-c
00db10
+endif
00db10
+
00db10
+ifeq ($(subdir),wcsmbs)
00db10
+sysdep_routines += wcslen wcslen-vx wcslen-c
00db10
+endif
00db10
diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c
00db10
index c330904..e9639ef 100644
00db10
--- a/sysdeps/s390/multiarch/ifunc-impl-list.c
00db10
+++ b/sysdeps/s390/multiarch/ifunc-impl-list.c
00db10
@@ -18,6 +18,7 @@
00db10
 
00db10
 #include <assert.h>
00db10
 #include <string.h>
00db10
+#include <wchar.h>
00db10
 #include <ifunc-impl-list.h>
00db10
 #include <ifunc-resolve.h>
00db10
 
00db10
@@ -70,5 +71,18 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
00db10
 
00db10
 #endif /* SHARED */
00db10
 
00db10
+#ifdef HAVE_S390_VX_ASM_SUPPORT
00db10
+
00db10
+# define IFUNC_VX_IMPL(FUNC)						\
00db10
+  IFUNC_IMPL (i, name, FUNC,						\
00db10
+	      IFUNC_IMPL_ADD (array, i, FUNC, dl_hwcap & HWCAP_S390_VX, \
00db10
+			      __##FUNC##_vx)				\
00db10
+	      IFUNC_IMPL_ADD (array, i, FUNC, 1, __##FUNC##_c))
00db10
+
00db10
+  IFUNC_VX_IMPL (strlen);
00db10
+  IFUNC_VX_IMPL (wcslen);
00db10
+
00db10
+#endif /* HAVE_S390_VX_ASM_SUPPORT */
00db10
+
00db10
   return i;
00db10
 }
00db10
diff --git a/sysdeps/s390/multiarch/strlen-c.c b/sysdeps/s390/multiarch/strlen-c.c
00db10
new file mode 100644
00db10
index 0000000..1cbe959
00db10
--- /dev/null
00db10
+++ b/sysdeps/s390/multiarch/strlen-c.c
00db10
@@ -0,0 +1,28 @@
00db10
+/* Default strlen implementation for S/390.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#if defined HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc
00db10
+# define STRLEN  __strlen_c
00db10
+# ifdef SHARED
00db10
+#  undef libc_hidden_builtin_def
00db10
+#  define libc_hidden_builtin_def(name)			\
00db10
+  __hidden_ver1 (__strlen_c, __GI_strlen, __strlen_c);
00db10
+# endif /* SHARED */
00db10
+
00db10
+# include <string/strlen.c>
00db10
+#endif /* HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc */
00db10
diff --git a/sysdeps/s390/multiarch/strlen-vx.S b/sysdeps/s390/multiarch/strlen-vx.S
00db10
new file mode 100644
00db10
index 0000000..1a5cb23
00db10
--- /dev/null
00db10
+++ b/sysdeps/s390/multiarch/strlen-vx.S
00db10
@@ -0,0 +1,84 @@
00db10
+/* Vector optimized 32/64 bit S/390 version of strlen.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#if defined HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc
00db10
+
00db10
+# include "sysdep.h"
00db10
+# include "asm-syntax.h"
00db10
+
00db10
+	.text
00db10
+
00db10
+/* size_t strlen (const char *s)
00db10
+   Returns length of string s.
00db10
+
00db10
+   Register usage:
00db10
+   -r1=bytes to 4k-byte boundary
00db10
+   -r2=s
00db10
+   -r3=tmp
00db10
+   -r4=tmp
00db10
+   -r5=current_len and return_value
00db10
+   -v16=part of s
00db10
+*/
00db10
+ENTRY(__strlen_vx)
00db10
+	.machine "z13"
00db10
+	.machinemode "zarch_nohighgprs"
00db10
+
00db10
+	vlbb	%v16,0(%r2),6	/* Load s until next 4k-byte boundary.  */
00db10
+	lcbb	%r1,0(%r2),6	/* Get bytes to 4k-byte boundary or 16.  */
00db10
+
00db10
+	vfenezb	%v16,%v16,%v16	/* Find element not equal with zero search.  */
00db10
+	vlgvb	%r4,%v16,7	/* Load zero index or 16 if not found.  */
00db10
+	clr	%r4,%r1		/* If found zero within loaded bytes?  */
00db10
+	locgrl	%r2,%r4		/* Then copy return value.  */
00db10
+	blr	%r14		/* And return.  */
00db10
+
00db10
+	/* Align s to 16 byte.  */
00db10
+	risbgn	%r3,%r2,60,128+63,0 /* %r3 = bits 60-63 of %r2 'and' 15.  */
00db10
+	lghi	%r5,16		/* current_len = 16.  */
00db10
+	slr	%r5,%r3		/* Compute bytes to 16bytes boundary.  */
00db10
+
00db10
+	/* Find zero in 16 byte aligned loop.  */
00db10
+.Lloop:
00db10
+	vl	%v16,0(%r5,%r2)	/* Load s.  */
00db10
+	vfenezbs %v16,%v16,%v16 /* Find element not equal with zero search.  */
00db10
+	je	.Lfound		/* Jump away if zero was found.  */
00db10
+	vl	%v16,16(%r5,%r2)
00db10
+	vfenezbs %v16,%v16,%v16
00db10
+	je	.Lfound16
00db10
+	vl	%v16,32(%r5,%r2)
00db10
+	vfenezbs %v16,%v16,%v16
00db10
+	je	.Lfound32
00db10
+	vl	%v16,48(%r5,%r2)
00db10
+	vfenezbs %v16,%v16,%v16
00db10
+	je	.Lfound48
00db10
+
00db10
+	aghi	%r5,64
00db10
+	j	.Lloop		/* No zero found -> loop.  */
00db10
+
00db10
+.Lfound48:
00db10
+	aghi	%r5,16
00db10
+.Lfound32:
00db10
+	aghi	%r5,16
00db10
+.Lfound16:
00db10
+	aghi	%r5,16
00db10
+.Lfound:
00db10
+	vlgvb	%r2,%v16,7	/* Load byte index of zero.  */
00db10
+	algr	%r2,%r5
00db10
+	br	%r14
00db10
+END(__strlen_vx)
00db10
+#endif /* HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc */
00db10
diff --git a/sysdeps/s390/multiarch/strlen.c b/sysdeps/s390/multiarch/strlen.c
00db10
new file mode 100644
00db10
index 0000000..ba5863f
00db10
--- /dev/null
00db10
+++ b/sysdeps/s390/multiarch/strlen.c
00db10
@@ -0,0 +1,27 @@
00db10
+/* Multiple versions of strlen.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#if defined HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc
00db10
+# include <string.h>
00db10
+# include <ifunc-resolve.h>
00db10
+
00db10
+s390_vx_libc_ifunc2 (__strlen, strlen)
00db10
+
00db10
+#else
00db10
+# include <string/strlen.c>
00db10
+#endif /* !(defined HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc) */
00db10
diff --git a/sysdeps/s390/multiarch/wcslen-c.c b/sysdeps/s390/multiarch/wcslen-c.c
00db10
new file mode 100644
00db10
index 0000000..6dd011e
00db10
--- /dev/null
00db10
+++ b/sysdeps/s390/multiarch/wcslen-c.c
00db10
@@ -0,0 +1,25 @@
00db10
+/* Default wcslen implementation for S/390.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#if defined HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc
00db10
+# define WCSLEN  __wcslen_c
00db10
+
00db10
+# include <wchar.h>
00db10
+extern __typeof (__wcslen) __wcslen_c;
00db10
+# include <wcsmbs/wcslen.c>
00db10
+#endif
00db10
diff --git a/sysdeps/s390/multiarch/wcslen-vx.S b/sysdeps/s390/multiarch/wcslen-vx.S
00db10
new file mode 100644
00db10
index 0000000..579e66b
00db10
--- /dev/null
00db10
+++ b/sysdeps/s390/multiarch/wcslen-vx.S
00db10
@@ -0,0 +1,91 @@
00db10
+/* Vector optimized 32/64 bit S/390 version of wcslen.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#if defined HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc
00db10
+
00db10
+# include "sysdep.h"
00db10
+# include "asm-syntax.h"
00db10
+
00db10
+	.text
00db10
+
00db10
+/* size_t wcslen (const wchar_t *s)
00db10
+   Returns length of string s.
00db10
+
00db10
+   Register usage:
00db10
+   -r1=bytes to 4k-byte boundary
00db10
+   -r2=s
00db10
+   -r3=tmp
00db10
+   -r4=tmp
00db10
+   -r5=current_len and return_value
00db10
+   -v16=part of s
00db10
+*/
00db10
+ENTRY(__wcslen_vx)
00db10
+	.machine "z13"
00db10
+	.machinemode "zarch_nohighgprs"
00db10
+
00db10
+	vlbb	%v16,0(%r2),6	/* Load s until next 4k-byte boundary.  */
00db10
+	lcbb	%r1,0(%r2),6	/* Get bytes to 4k-byte boundary or 16.  */
00db10
+
00db10
+	tmll	%r2,3		/* Test if s is 4-byte aligned?   */
00db10
+	jne	.Lfallback	/* And use common-code variant if not.  */
00db10
+
00db10
+	vfenezf	%v16,%v16,%v16	/* Find element not equal with zero search.  */
00db10
+	vlgvb	%r4,%v16,7	/* Load zero index or 16 if not found.  */
00db10
+	clr	%r4,%r1		/* If found zero within loaded bytes?  */
00db10
+	locgrl	%r2,%r4		/* Then copy return value.  */
00db10
+	jl	.Lend		/* And return.  */
00db10
+
00db10
+	/* Align s to 16 byte.  */
00db10
+	risbgn	%r3,%r2,60,128+63,0 /* %r3 = bits 60-63 of %r2 'and' 15.  */
00db10
+	lghi	%r5,16		/* current_len = 16.  */
00db10
+	slr	%r5,%r3		/* Compute bytes to 16bytes boundary.  */
00db10
+
00db10
+	/* Find zero in 16byte aligned loop.  */
00db10
+.Lloop:
00db10
+	vl	%v16,0(%r5,%r2)	/* Load s.  */
00db10
+	vfenezfs %v16,%v16,%v16	/* Find element not equal with zero search.  */
00db10
+	je	.Lfound		/* Jump away if zero was found.  */
00db10
+	vl	%v16,16(%r5,%r2)
00db10
+	vfenezfs %v16,%v16,%v16
00db10
+	je	.Lfound16
00db10
+	vl	%v16,32(%r5,%r2)
00db10
+	vfenezfs %v16,%v16,%v16
00db10
+	je	.Lfound32
00db10
+	vl	%v16,48(%r5,%r2)
00db10
+	vfenezfs %v16,%v16,%v16
00db10
+	je	.Lfound48
00db10
+
00db10
+	aghi	%r5,64
00db10
+	j	.Lloop		/* No zero found -> loop.  */
00db10
+
00db10
+.Lfound48:
00db10
+	aghi	%r5,16
00db10
+.Lfound32:
00db10
+	aghi	%r5,16
00db10
+.Lfound16:
00db10
+	aghi	%r5,16
00db10
+.Lfound:
00db10
+	vlgvb	%r2,%v16,7	/* Load byte index of zero.  */
00db10
+	algr	%r2,%r5
00db10
+.Lend:
00db10
+	srlg	%r2,%r2,2	/* Convert byte-count to character-count.  */
00db10
+	br	%r14
00db10
+.Lfallback:
00db10
+	jg	__wcslen_c
00db10
+END(__wcslen_vx)
00db10
+#endif /* HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc */
00db10
diff --git a/sysdeps/s390/multiarch/wcslen.c b/sysdeps/s390/multiarch/wcslen.c
00db10
new file mode 100644
00db10
index 0000000..a7be73e
00db10
--- /dev/null
00db10
+++ b/sysdeps/s390/multiarch/wcslen.c
00db10
@@ -0,0 +1,28 @@
00db10
+/* Multiple versions of wcslen.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#if defined HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc
00db10
+# include <wchar.h>
00db10
+# include <ifunc-resolve.h>
00db10
+
00db10
+s390_vx_libc_ifunc (__wcslen)
00db10
+weak_alias (__wcslen, wcslen)
00db10
+
00db10
+#else
00db10
+# include <wcsmbs/wcslen.c>
00db10
+#endif /* !(defined HAVE_S390_VX_ASM_SUPPORT && !defined NOT_IN_libc) */
00db10
-- 
00db10
2.3.0
00db10