From patchwork Fri Jun 26 11:51:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 488788 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DDA3C140273 for ; Fri, 26 Jun 2015 22:02:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sourceware.org header.i=@sourceware.org header.b=PhKEAzad; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=TI6NggwR5ieI23XQImQSulVGJPPkddG Mauz2Pkf3cDU2koz9ClthRJLATcr6/5rbWqW5WmKEjdLOzYlcIDIHt9HeWtn3pmc LmYvS4WcRv755MwEREhhnd+QaMr4gdeUI0qlKv3Nh1aEj1dJomvTL68tDdDgSONs BSgK6sFxn6Nw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=5G+Y3NnCuxPcniaigHfpCeUD+UQ=; b=PhKEA zadLU7reC37y1XfXB204HVZLlV0yeL0EAacWoUtoN3U7FKiOJm/z2JpY7PI2wUTR myswubs6NlhfI9e1YQOn8TVa2LnxGPZ1erEUpD4IMDKhAKtqVM4HHrpmGyjKIbcc UQz3ej86Af9ynsKSD/lcSuuPoumPJAroNEmRv4= Received: (qmail 53965 invoked by alias); 26 Jun 2015 12:02:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 53815 invoked by uid 89); 26 Jun 2015 12:02:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp17.uk.ibm.com X-MailFrom: stli@linux.vnet.ibm.com X-RcptTo: libc-alpha@sourceware.org From: Stefan Liebler To: libc-alpha@sourceware.org Cc: Stefan Liebler Subject: [PATCH 19/27] S390: Optimize strrchr and wcsrchr. Date: Fri, 26 Jun 2015 13:51:44 +0200 Message-Id: <1435319512-22245-20-git-send-email-stli@linux.vnet.ibm.com> In-Reply-To: <1435319512-22245-1-git-send-email-stli@linux.vnet.ibm.com> References: <1435319512-22245-1-git-send-email-stli@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15062611-0029-0000-0000-00000539D7DB This patch provides optimized versions of strrchr and wcsrchr with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strrchr-c.c: New File. * sysdeps/s390/multiarch/strrchr-vx.S: Likewise. * sysdeps/s390/multiarch/strrchr.c: Likewise. * sysdeps/s390/multiarch/wcsrchr-c.c: Likewise. * sysdeps/s390/multiarch/wcsrchr-vx.S: Likewise. * sysdeps/s390/multiarch/wcsrchr.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strrchr and wcsrchr functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strrchr, wcsrchr. * benchtests/bench-wcsrchr.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsrchr. --- benchtests/Makefile | 2 +- benchtests/bench-wcsrchr.c | 20 +++++ sysdeps/s390/multiarch/Makefile | 6 +- sysdeps/s390/multiarch/ifunc-impl-list.c | 3 + sysdeps/s390/multiarch/strrchr-c.c | 29 +++++++ sysdeps/s390/multiarch/strrchr-vx.S | 133 ++++++++++++++++++++++++++++++ sysdeps/s390/multiarch/strrchr.c | 28 +++++++ sysdeps/s390/multiarch/wcsrchr-c.c | 25 ++++++ sysdeps/s390/multiarch/wcsrchr-vx.S | 135 +++++++++++++++++++++++++++++++ sysdeps/s390/multiarch/wcsrchr.c | 27 +++++++ 10 files changed, 405 insertions(+), 3 deletions(-) create mode 100644 benchtests/bench-wcsrchr.c create mode 100644 sysdeps/s390/multiarch/strrchr-c.c create mode 100644 sysdeps/s390/multiarch/strrchr-vx.S create mode 100644 sysdeps/s390/multiarch/strrchr.c create mode 100644 sysdeps/s390/multiarch/wcsrchr-c.c create mode 100644 sysdeps/s390/multiarch/wcsrchr-vx.S create mode 100644 sysdeps/s390/multiarch/wcsrchr.c diff --git a/benchtests/Makefile b/benchtests/Makefile index b3298d4..6a0052a 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -37,7 +37,7 @@ string-bench := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \ strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok \ strcoll wcsmbs-bench := wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat \ - wcscmp wcsncmp wcschr wcschrnul + wcscmp wcsncmp wcschr wcschrnul wcsrchr string-bench-all := $(string-bench) ${wcsmbs-bench} # We have to generate locales diff --git a/benchtests/bench-wcsrchr.c b/benchtests/bench-wcsrchr.c new file mode 100644 index 0000000..0d3923f --- /dev/null +++ b/benchtests/bench-wcsrchr.c @@ -0,0 +1,20 @@ +/* Measure wcsrchr functions. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#define WIDE 1 +#include "bench-strrchr.c" diff --git a/sysdeps/s390/multiarch/Makefile b/sysdeps/s390/multiarch/Makefile index b6b64c9..b8b141e 100644 --- a/sysdeps/s390/multiarch/Makefile +++ b/sysdeps/s390/multiarch/Makefile @@ -10,7 +10,8 @@ sysdep_routines += strlen strlen-vx strlen-c \ strcmp strcmp-vx \ strncmp strncmp-vx strncmp-c \ strchr strchr-vx strchr-c \ - strchrnul strchrnul-vx strchrnul-c + strchrnul strchrnul-vx strchrnul-c \ + strrchr strrchr-vx strrchr-c endif ifeq ($(subdir),wcsmbs) @@ -25,5 +26,6 @@ sysdep_routines += wcslen wcslen-vx wcslen-c \ wcscmp wcscmp-vx wcscmp-c \ wcsncmp wcsncmp-vx wcsncmp-c \ wcschr wcschr-vx wcschr-c \ - wcschrnul wcschrnul-vx wcschrnul-c + wcschrnul wcschrnul-vx wcschrnul-c \ + wcsrchr wcsrchr-vx wcsrchr-c endif diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c index ea474a8..ee84d80 100644 --- a/sysdeps/s390/multiarch/ifunc-impl-list.c +++ b/sysdeps/s390/multiarch/ifunc-impl-list.c @@ -115,6 +115,9 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_VX_IMPL (strchrnul); IFUNC_VX_IMPL (wcschrnul); + IFUNC_VX_IMPL (strrchr); + IFUNC_VX_IMPL (wcsrchr); + #endif /* HAVE_S390_VX_ASM_SUPPORT */ return i; diff --git a/sysdeps/s390/multiarch/strrchr-c.c b/sysdeps/s390/multiarch/strrchr-c.c new file mode 100644 index 0000000..345930a --- /dev/null +++ b/sysdeps/s390/multiarch/strrchr-c.c @@ -0,0 +1,29 @@ +/* Default strrchr implementation for S/390. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) +# define STRRCHR __strrchr_c +# undef weak_alias +# ifdef SHARED +# undef libc_hidden_builtin_def +# define libc_hidden_builtin_def(name) \ + __hidden_ver1 (__strrchr_c, __GI_strrchr, __strrchr_c); +# endif /* SHARED */ + +# include +#endif /* HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) */ diff --git a/sysdeps/s390/multiarch/strrchr-vx.S b/sysdeps/s390/multiarch/strrchr-vx.S new file mode 100644 index 0000000..4705127 --- /dev/null +++ b/sysdeps/s390/multiarch/strrchr-vx.S @@ -0,0 +1,133 @@ +/* Vector optimized 32/64 bit S/390 version of strrchr. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) + +# include "sysdep.h" +# include "asm-syntax.h" + + .text + +/* char *strrchr (const char *s, int c) + Locate the last character c in string. + + Register usage: + -r0=tmp + -r1=pointer to last occurence of c or NULL if not found. + -r2=s + -r3=c + -r4=tmp + -r5=current_len + -v16=part of s + -v17=index of found element + -v18=replicated c +*/ +ENTRY(__strrchr_vx) + .machine "z13" + .machinemode "zarch_nohighgprs" + + vlvgb %v18,%r3,0 /* Generate vector which elements are all c. + if c > 255, c will be truncated. */ + lghi %r5,0 /* current_len = 0. */ + vrepb %v18,%v18,0 + lghi %r1,0 /* Zero out return pointer. */ + + /* Align s to 16byte */ + risbg %r0,%r2,60,128+63,0 /* Test if s is aligned and + %r0 = bits 60-63 'and' 15. */ + je .Lloop1 /* If s is aligned, loop aligned. */ + lghi %r4,15 + slr %r4,%r0 /* Compute highest index to load (15-x). */ + vll %v16,%r4,0(%r2) /* Load up to 16 byte boundary (vll needs + highest index, remaining bytes are 0). */ + ahi %r4,1 /* Work with loaded byte count. */ + j .Llt16 + + /* Process s in a 16byte aligned loop. */ +.Lloop2: + aghi %r5,16 +.Lloop1: + vl %v16,0(%r5,%r2) /* Load s. */ + vfeezbs %v17,%v16,%v18 /* Find element equal with zero search. */ + jno .Lfound_from_loop /* Found c/zero (cc=0|1|2). */ + vl %v16,16(%r5,%r2) + aghi %r5,16 + vfeezbs %v17,%v16,%v18 + jno .Lfound_from_loop + vl %v16,16(%r5,%r2) + aghi %r5,16 + vfeezbs %v17,%v16,%v18 + jno .Lfound_from_loop + vl %v16,16(%r5,%r2) + aghi %r5,16 + vfeezbs %v17,%v16,%v18 + jo .Lloop2 /* No character and no zero -> loop. */ + + +.Lfound_from_loop: + vlgvb %r0,%v17,7 /* Load byte index of character. */ + lghi %r4,16 /* Byte count in v16 is 16. */ +.Lfound: + /* Found c/zero in loaded bytes, + in %r0 is found index. */ + je .Lzero /* Found zero, but no c before -> end. */ + +.Lcharacter: + /* Found character. */ + algr %r5,%r0 + la %r1,0(%r5,%r2) /* Store found character pointer. */ + aghi %r0,1 /* Start next search behind found character. */ + aghi %r5,1 /* Start next search behind found character. */ + clrje %r0,%r4,.Lloop1 /* Found character was the last loaded byte, + so load next 16bytes aligned and + loop until end of string. */ + /* Shift left processed bytes in vector register + and process remaining bytes without load */ + slr %r4,%r0 /* Calculate remaining number of bytes = + loaded byte count - (found-index + 1) */ + sll %r0,3 /* Compute byte count for vector shift left. */ + vlvgb %v17,%r0,7 + vslb %v16,%v16,%v17 /* Vector shift left by byte by number of bytes + specified in bits 1-4 of byte 7 in v17. */ + +.Llt16: + /* Loaded only 1...15bytes in v16. */ + vfeezbs %v17,%v16,%v18 + vlgvb %r0,%v17,7 /* Load byte index of zero (cc not changed) */ + clrjl %r0,%r4,.Lfound /* %r0<%r4 => found c/zero in loaded bytes. */ + /* Found something behind loaded bytes or found nothing -> ignore. */ + algfr %r5,%r4 /* Add loaded byte count to current len. */ + /* One aligned vr is fully processed, so we are now aligned, too. */ + j .Lloop1 /* Loop without adding 16. */ + + +.Lzero: + llgcr %r3,%r3 /* char c_char = (char) c; */ + clije %r3,0,.Lzero2 /* Found zero and c is zero. */ + /* Return %r1: null if character not found + or last stored character pointer. */ + lgr %r2,%r1 + br %r14 + +.Lzero2: + /* Searched c is zero, so return pointer to \0 instead of NULL. */ + algr %r5,%r0 /* Add loaded byte index of zero. */ + la %r2,0(%r5,%r2) /* Store last zero as return pointer. */ + br %r14 +END(__strrchr_vx) +#endif /* HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) */ diff --git a/sysdeps/s390/multiarch/strrchr.c b/sysdeps/s390/multiarch/strrchr.c new file mode 100644 index 0000000..5de0381 --- /dev/null +++ b/sysdeps/s390/multiarch/strrchr.c @@ -0,0 +1,28 @@ +/* Multiple versions of strrchr. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) +# include +# include + +s390_vx_libc_ifunc2 (__strrchr, strrchr) +weak_alias (strrchr, rindex) + +#else +# include +#endif /* !(defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)) */ diff --git a/sysdeps/s390/multiarch/wcsrchr-c.c b/sysdeps/s390/multiarch/wcsrchr-c.c new file mode 100644 index 0000000..b2a9900 --- /dev/null +++ b/sysdeps/s390/multiarch/wcsrchr-c.c @@ -0,0 +1,25 @@ +/* Default wcsrchr implementation for S/390. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) +# define WCSRCHR __wcsrchr_c + +# include +extern __typeof (wcsrchr) __wcsrchr_c; +# include +#endif diff --git a/sysdeps/s390/multiarch/wcsrchr-vx.S b/sysdeps/s390/multiarch/wcsrchr-vx.S new file mode 100644 index 0000000..e28f453 --- /dev/null +++ b/sysdeps/s390/multiarch/wcsrchr-vx.S @@ -0,0 +1,135 @@ +/* Vector optimized 32/64 bit S/390 version of wcsrchr. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) + +# include "sysdep.h" +# include "asm-syntax.h" + + .text + +/* wchar_t *wcsrchr (const wchar_t *s, wchar_t c) + Locate the last character c in string. + + Register usage: + -r0=tmp + -r1=pointer to last occurence of c or NULL if not found. + -r2=s + -r3=c + -r4=tmp + -r5=current_len + -v16=part of s + -v17=index of found element + -v18=replicated c +*/ +ENTRY(__wcsrchr_vx) + .machine "z13" + .machinemode "zarch_nohighgprs" + + vlvgf %v18,%r3,0 /* Generate vector which elements are all c. */ + lghi %r5,0 /* current_len = 0. */ + vrepf %v18,%v18,0 + lghi %r1,0 /* Zero out return pointer. */ + + /* Align s to 16byte */ + risbg %r0,%r2,60,128+63,0 /* Test if s is aligned and + %r0 = bits 60-63 'and' 15. */ + je .Lloop1 /* If s is aligned, loop aligned. */ + tmll %r2,3 /* Test if s is 4-byte aligned? */ + jne .Lfallback /* And use common-code variant if not. */ + lghi %r4,15 + slr %r4,%r0 /* Compute highest index to load (15-x). */ + vll %v16,%r4,0(%r2) /* Load up to 16byte boundary (vll needs + highest index, remaining bytes are 0). */ + ahi %r4,1 /* Work with loaded byte count. */ + j .Llt16 + + /* Process s in a 16byte aligned loop. */ +.Lloop2: + aghi %r5,16 +.Lloop1: + vl %v16,0(%r5,%r2) /* Load s. */ + vfeezfs %v17,%v16,%v18 /* Find element equal with zero search. */ + jno .Lfound_from_loop /* Found c/zero (cc=0|1|2). */ + vl %v16,16(%r5,%r2) + aghi %r5,16 + vfeezfs %v17,%v16,%v18 + jno .Lfound_from_loop + vl %v16,16(%r5,%r2) + aghi %r5,16 + vfeezfs %v17,%v16,%v18 + jno .Lfound_from_loop + vl %v16,16(%r5,%r2) + aghi %r5,16 + vfeezfs %v17,%v16,%v18 + jo .Lloop2 /* No character and no zero -> loop. */ + + +.Lfound_from_loop: + vlgvb %r0,%v17,7 /* Load byte index of character. */ + lghi %r4,16 /* Byte count in v16 is 16. */ +.Lfound: + /* Found c/zero in loaded bytes, + in %r0 is found index. */ + je .Lzero /* Found zero, but no c before -> end. */ + +.Lcharacter: + /* Found character. */ + algr %r5,%r0 + la %r1,0(%r5,%r2) /* Store found character pointer. */ + aghi %r0,4 /* Start next search behind found character. */ + aghi %r5,4 /* Start next search behind found character. */ + clrje %r0,%r4,.Lloop1 /* Found character was the last loaded byte, + so load next 16bytes aligned and + loop until end of string. */ + /* Shift left processed bytes in vector register + and process remaining bytes without load */ + slr %r4,%r0 /* Calculate remaining number of bytes = + loaded byte count - (found-index + 4) */ + sll %r0,3 /* Compute byte count for vector shift left. */ + vlvgb %v17,%r0,7 + vslb %v16,%v16,%v17 /* Vector shift left by byte by number of bytes + specified in bits 1-4 of byte 7 in v17. */ + +.Llt16: + /* Loaded only 1...15bytes in v16. */ + vfeezfs %v17,%v16,%v18 + vlgvb %r0,%v17,7 /* Load byte index of zero (cc not changed) */ + clrjl %r0,%r4,.Lfound /* %r0<%r4 => found c/zero in loaded bytes. */ + /* Found something behind loaded bytes or found nothing -> ignore. */ + algfr %r5,%r4 /* Add loaded byte count to current_len. */ + /* One aligned vreg is fully processed, so we are now aligned, too. */ + j .Lloop1 /* Loop without adding 16. */ + + +.Lzero: + clije %r3,0,.Lzero2 /* Found zero and c is zero. */ + /* Return %r1: null if character not found + or last stored character pointer. */ + lgr %r2,%r1 + br %r14 + +.Lzero2: + /* Searched c is zero, so return pointer to \0 instead of NULL. */ + algr %r5,%r0 /* Add loaded byte index of zero. */ + la %r2,0(%r5,%r2) /* Store last zero as return pointer. */ + br %r14 +.Lfallback: + jg __wcsrchr_c +END(__wcsrchr_vx) +#endif /* HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) */ diff --git a/sysdeps/s390/multiarch/wcsrchr.c b/sysdeps/s390/multiarch/wcsrchr.c new file mode 100644 index 0000000..c840289 --- /dev/null +++ b/sysdeps/s390/multiarch/wcsrchr.c @@ -0,0 +1,27 @@ +/* Multiple versions of wcsrchr. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) +# include +# include + +s390_vx_libc_ifunc2 (__wcsrchr, wcsrchr) + +#else +# include +#endif /* !(defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)) */