From patchwork Mon Mar 4 19:43:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 159576 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4141728jad; Mon, 4 Mar 2019 11:44:12 -0800 (PST) X-Google-Smtp-Source: AHgI3IZJK+mXF3tCFx4mMpJDvojqAdjU5QU1/jQRMer+MFymO6mLzkHbBySZeqZM+x3VjddQaY4B X-Received: by 2002:a62:f201:: with SMTP id m1mr21544734pfh.97.1551728652400; Mon, 04 Mar 2019 11:44:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551728652; cv=none; d=google.com; s=arc-20160816; b=0PBvH/HzKuIjo+qIHX8nLN3xFVuJwc6RExMSAglpcKhdZXwF1qO9bDUbzaUU8WzvTA Fk33+htTQHRNhrrXt2WfhcgfHWNNzlB9y4ckiFQgHXv5wYl+S2tyoWBAuyO9XHQi5zE5 tls+mbtkwz3Lv+4H5aFihOPFdZ+DloDgNf5dsm2wKxub0Rw+EpgLkx2Nr4lx8ALCgr8d eiwnDLMKgpjses1ZN8Zc8lAeVQag+eZjg5dNVKjBnnY4kRAxsI75C1ZMO/tNMogZX/Q6 OX8VgXQJAtWqMeNx+n/lQO2MxB84keF+fX4jINQw8SVebjYkDTuVJ2dLgrHfQ2gAHDZ5 AQ4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:dkim-signature:delivered-to:sender :list-help:list-post:list-archive:list-subscribe:list-unsubscribe :list-id:precedence:mailing-list:dkim-signature:domainkey-signature; bh=v2dhgwKj9GFT3P3Z13HJgMxeCchsr19D9Urf2qRlzSA=; b=BXy2FWp5BV/hCnCwl+9dEQSi0pcgEUJo800dOapyoV2B4SQ/U5O8iydgJKHuQqo0w2 xSM7p7IgiaS4atFAKci78ZXXP7VkZe0yXp9fYoG+V6InLju2OEg+lQyVvyfkRm35zqw2 BIycq11dOXnGny65rY1Bk5eodIprBy9KglgZ876WPup+zmDYW/2ziv3K7Oogcm9KnoPE G2nreXylc0IF7RaX7iHdcGrPo92hcV+gz05yNuFA3gbBDNzI7RyZNonmXOKbcBhAGg0I xjbliemxomIf099WF7c5aZ5AbrmiFe9LtklCQMCnFNjgpQFclpOQeMOcnxQfD3Cm/the lUfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=r4qaMU+8; dkim=pass header.i=@linaro.org header.s=google header.b=fD6tkRwd; spf=pass (google.com: domain of libc-alpha-return-100401-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-100401-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id w186si5783754pgd.460.2019.03.04.11.44.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2019 11:44:12 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-100401-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=r4qaMU+8; dkim=pass header.i=@linaro.org header.s=google header.b=fD6tkRwd; spf=pass (google.com: domain of libc-alpha-return-100401-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-100401-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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:subject:date:message-id; q=dns; s= default; b=OYS9wKni/KVG+F5eqY4vd5VxZr4F6rqTVuiEEssYM03Ol8xspwgFi WlEF5eW5Y42AnmxcAoFANVmHAQVQls0JcrmQGuCuAiGKIbrb7xGn1bzJ9+Vzy8ml rjM93nJR1XP5afSVmPL/DC91mq3ihL8CCjh8epkwojYmgvNgmWhTUg= 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:subject:date:message-id; s=default; bh=eG9wxDw1tYnzDHn6ov0NhvrTxQQ=; b=r4qaMU+8Oplujj8hp3aWFdZndDyK tPaFqMh4050uyXaVSv1+1fy6OTjsZPQOlBByqfr4+y+O4mChhu1BmhI4OHz6tgbk rqElbNcYUQF9kl4IrDcm/36k2lmtrNXqfM+wcGMkvfoFQ5Da3UDkX59JGFSuLxvC ePN/dWv/3u2nAAY= Received: (qmail 73090 invoked by alias); 4 Mar 2019 19:44:02 -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 73070 invoked by uid 89); 4 Mar 2019 19:44:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS, TVD_SUBJ_WIPE_DEBT autolearn=ham version=3.3.2 spammy=Multiple, H*p:D*org, SRC, Wide X-HELO: mail-qk1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=v2dhgwKj9GFT3P3Z13HJgMxeCchsr19D9Urf2qRlzSA=; b=fD6tkRwdZyjipdXud7Iape+cWiWPgAPiUhL4P5y9/QNyp2TJsdQnEyonLpbtVOmtgb Dfr6lLLDO6dFBHa6oWakEAptURntywYAxmrK8SYbWwRSnqcB4CXufWpmrydLRevMrsnB kgWZR1mYAT8XTJTJCTPdxkDRbNokBNRXL9LPDEm+8mdFesUZ8WdXY/bt5ma88a3E8W9p Wu+R3GpEG1N9BVj2HRdxnnOkW5E3KJV3xwP2Aox84I6rQOu/R0FVDz927Z0PTyR/6XZ+ z+AXFwY2A/q/7GZB8kXb5JSxUHH4865+L1JVR7cBPMoNIlxS4abyqjz/tkpru9WYt2ej NgLg== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 1/3] powerpc: remove power6 wcscpy optimization Date: Mon, 4 Mar 2019 16:43:48 -0300 Message-Id: <20190304194350.16116-1-adhemerval.zanella@linaro.org> This patch removes the power6 wcscpy optimization. It is rarely int real word codo, the optimizations can be potentially implemented in generic code (which would also benefit not only powerpc), and the power6 and power7 resulting binary are essentially the same. Checked on powerpc64-linux-gnu. * sysdeps/powerpc/power6/wcscpy.c: Remove file. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power6.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power7.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcscpy-power6.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcscpy-power7.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcscpy-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcscpy.c: Likewise. * sysdeps/powerpc/powerpc64/power6/wcscpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/Makefile [$(subdir) == wcsmbs] (sysdeps_routines): Remove wcscpy-power6 and wcscpy-power7. (CFLAGS-wcscpy-power7.c, CFLAGS-wcscpy-power6.c): Remove rule. * sysdeps/powerpc/powerpc64/multiarch/Makefile: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c: Remove wcscpy optimizations. --- sysdeps/powerpc/power6/wcscpy.c | 105 ------------------ .../powerpc32/power4/multiarch/Makefile | 5 +- .../power4/multiarch/ifunc-impl-list.c | 11 -- .../power4/multiarch/wcscpy-power6.c | 22 ---- .../power4/multiarch/wcscpy-power7.c | 22 ---- .../powerpc32/power4/multiarch/wcscpy-ppc32.c | 27 ----- .../powerpc32/power4/multiarch/wcscpy.c | 36 ------ sysdeps/powerpc/powerpc64/multiarch/Makefile | 5 +- .../powerpc64/multiarch/ifunc-impl-list.c | 11 -- .../powerpc64/multiarch/wcscpy-power6.c | 19 ---- .../powerpc64/multiarch/wcscpy-power7.c | 19 ---- .../powerpc64/multiarch/wcscpy-ppc64.c | 18 --- sysdeps/powerpc/powerpc64/multiarch/wcscpy.c | 35 ------ sysdeps/powerpc/powerpc64/power6/wcscpy.c | 1 - 14 files changed, 2 insertions(+), 334 deletions(-) delete mode 100644 sysdeps/powerpc/power6/wcscpy.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power6.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power7.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcscpy-power6.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcscpy-power7.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcscpy-ppc64.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcscpy.c delete mode 100644 sysdeps/powerpc/powerpc64/power6/wcscpy.c -- 2.17.1 diff --git a/sysdeps/powerpc/power6/wcscpy.c b/sysdeps/powerpc/power6/wcscpy.c deleted file mode 100644 index 11c04b081a..0000000000 --- a/sysdeps/powerpc/power6/wcscpy.c +++ /dev/null @@ -1,105 +0,0 @@ -/* wcscpy.c - Wide Character Copy for POWER6+. - Copyright (C) 2012-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include -#include - -#ifndef WCSCPY -# define WCSCPY wcscpy -#endif - -/* Copy SRC to DEST. */ -wchar_t * -WCSCPY (wchar_t *dest, const wchar_t *src) -{ - wint_t c,d; - wchar_t *wcp, *wcp2; - - if (__alignof__ (wchar_t) >= sizeof (wchar_t)) - { - const ptrdiff_t off = dest - src; - - wcp = (wchar_t *) src; - wcp2 = wcp + 1 ; - - do - { - d = *wcp; - wcp[off] = d; - if (d == L'\0') - return dest; - wcp += 2; - - c = *wcp2; - wcp2[off] = c; - if (c == L'\0') - return dest; - wcp2 += 2; - - d = *wcp; - wcp[off] = d; - if (d == L'\0') - return dest; - wcp += 2; - - c = *wcp2; - wcp2[off] = c; - if (c == L'\0') - return dest; - wcp2 += 2; - - d = *wcp; - wcp[off] = d; - if (d == L'\0') - return dest; - wcp += 2; - - c = *wcp2; - wcp2[off] = c; - if (c == L'\0') - return dest; - wcp2 += 2; - - d = *wcp; - wcp[off] = d; - if (d == L'\0') - return dest; - wcp += 2; - - c = *wcp2; - wcp2[off] = c; - if (c == L'\0') - return dest; - wcp2 += 2; - } - while (c != L'\0'); - - } - else - { - wcp = dest; - - do - { - c = *src++; - *wcp++ = c; - } - while (c != L'\0'); - } - return dest; -} diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile index bd9d360efa..f5141bc5b5 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile @@ -18,13 +18,10 @@ endif ifeq ($(subdir),wcsmbs) sysdep_routines += wcschr-power7 wcschr-power6 wcschr-ppc32 \ - wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc32 \ - wcscpy-power7 wcscpy-power6 wcscpy-ppc32 + wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc32 CFLAGS-wcschr-power7.c += -mcpu=power7 CFLAGS-wcschr-power6.c += -mcpu=power6 CFLAGS-wcsrchr-power7.c += -mcpu=power7 CFLAGS-wcsrchr-power6.c += -mcpu=power6 -CFLAGS-wcscpy-power7.c += -mcpu=power7 -CFLAGS-wcscpy-power6.c += -mcpu=power6 endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c index bcd38e0f79..ae581d62f8 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c @@ -209,16 +209,5 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, wcsrchr, 1, __wcsrchr_ppc)) - /* Support sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c. */ - IFUNC_IMPL (i, name, wcscpy, - IFUNC_IMPL_ADD (array, i, wcscpy, - hwcap & PPC_FEATURE_HAS_VSX, - __wcscpy_power7) - IFUNC_IMPL_ADD (array, i, wcscpy, - hwcap & PPC_FEATURE_ARCH_2_05, - __wcscpy_power6) - IFUNC_IMPL_ADD (array, i, wcscpy, 1, - __wcscpy_ppc)) - return i; } diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power6.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power6.c deleted file mode 100644 index 5bb0c82462..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power6.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 2013-2019 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 - . */ - -#include - -#define WCSCPY __wcscpy_power6 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power7.c deleted file mode 100644 index 5375094b60..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power7.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 2013-2019 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 - . */ - -#include - -#define WCSCPY __wcscpy_power7 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c deleted file mode 100644 index 31e0d81ef0..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2013-2019 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 - . */ - -#include - -extern __typeof (wcscpy) __wcscpy_ppc; - -#define WCSCPY __wcscpy_ppc -#include - -#ifdef SHARED -__hidden_ver1 (__wcscpy_ppc, __GI___wcscpy, __wcscpy_ppc); -#endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c deleted file mode 100644 index 0daf55cf70..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Multiple versions of wcscpy - Copyright (C) 2013-2019 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 IS_IN (libc) -# define __wcscpy __redirect_wcscpy -# include -# undef __wcscpy -# include "init-arch.h" - -extern __typeof (__redirect_wcscpy) __wcscpy_ppc attribute_hidden; -extern __typeof (__redirect_wcscpy) __wcscpy_power6 attribute_hidden; -extern __typeof (__redirect_wcscpy) __wcscpy_power7 attribute_hidden; - -libc_ifunc_redirected (__redirect_wcscpy, __wcscpy, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __wcscpy_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __wcscpy_power6 - : __wcscpy_ppc); -weak_alias (__wcscpy, wcscpy) -#endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/Makefile b/sysdeps/powerpc/powerpc64/multiarch/Makefile index 963ea84dbf..3913ef580e 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc64/multiarch/Makefile @@ -40,13 +40,10 @@ endif ifeq ($(subdir),wcsmbs) sysdep_routines += wcschr-power7 wcschr-power6 wcschr-ppc64 \ - wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc64 \ - wcscpy-power7 wcscpy-power6 wcscpy-ppc64 \ + wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc64 CFLAGS-wcschr-power7.c += -mcpu=power7 CFLAGS-wcschr-power6.c += -mcpu=power6 CFLAGS-wcsrchr-power7.c += -mcpu=power7 CFLAGS-wcsrchr-power6.c += -mcpu=power6 -CFLAGS-wcscpy-power7.c += -mcpu=power7 -CFLAGS-wcscpy-power6.c += -mcpu=power6 endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c index 8d91d9abb9..06d33d71e0 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c @@ -282,17 +282,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, wcsrchr, 1, __wcsrchr_ppc)) - /* Support sysdeps/powerpc/powerpc64/multiarch/wcscpy.c. */ - IFUNC_IMPL (i, name, wcscpy, - IFUNC_IMPL_ADD (array, i, wcscpy, - hwcap & PPC_FEATURE_HAS_VSX, - __wcscpy_power7) - IFUNC_IMPL_ADD (array, i, wcscpy, - hwcap & PPC_FEATURE_ARCH_2_05, - __wcscpy_power6) - IFUNC_IMPL_ADD (array, i, wcscpy, 1, - __wcscpy_ppc)) - /* Support sysdeps/powerpc/powerpc64/multiarch/strrchr.c. */ IFUNC_IMPL (i, name, strrchr, IFUNC_IMPL_ADD (array, i, strrchr, diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcscpy-power6.c b/sysdeps/powerpc/powerpc64/multiarch/wcscpy-power6.c deleted file mode 100644 index abe2e0f073..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcscpy-power6.c +++ /dev/null @@ -1,19 +0,0 @@ -/* wcscpy.c - Wide Character Search for powerpc64/power6. - Copyright (C) 2013-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcscpy-power7.c b/sysdeps/powerpc/powerpc64/multiarch/wcscpy-power7.c deleted file mode 100644 index be95cd9074..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcscpy-power7.c +++ /dev/null @@ -1,19 +0,0 @@ -/* wcscpy.c - Wide Character Search for powerpc64/power7. - Copyright (C) 2013-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcscpy-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/wcscpy-ppc64.c deleted file mode 100644 index faa3c1614f..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcscpy-ppc64.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2013-2019 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 - . */ - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcscpy.c b/sysdeps/powerpc/powerpc64/multiarch/wcscpy.c deleted file mode 100644 index 3f918b27c6..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcscpy.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Multiple versions of wcscpy. - Copyright (C) 2013-2019 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 __wcscpy __redirect___wcscpy -#include -#undef __wcscpy -#include -#include "init-arch.h" - -extern __typeof (wcscpy) __wcscpy_ppc attribute_hidden; -extern __typeof (wcscpy) __wcscpy_power6 attribute_hidden; -extern __typeof (wcscpy) __wcscpy_power7 attribute_hidden; - -libc_ifunc_redirected (__redirect___wcscpy, __wcscpy, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __wcscpy_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __wcscpy_power6 - : __wcscpy_ppc); -weak_alias (__wcscpy, wcscpy) diff --git a/sysdeps/powerpc/powerpc64/power6/wcscpy.c b/sysdeps/powerpc/powerpc64/power6/wcscpy.c deleted file mode 100644 index 722c8f995b..0000000000 --- a/sysdeps/powerpc/powerpc64/power6/wcscpy.c +++ /dev/null @@ -1 +0,0 @@ -#include From patchwork Mon Mar 4 19:43:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 159577 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4141874jad; Mon, 4 Mar 2019 11:44:22 -0800 (PST) X-Google-Smtp-Source: APXvYqzTR4mOpmyMw5Hc7Vz/tOmvBKuxr5dVRzoBKf28G/eHxxUIypLaKU+IjuoeL/2cBi5uQzNp X-Received: by 2002:a17:902:778c:: with SMTP id o12mr22160952pll.112.1551728662758; Mon, 04 Mar 2019 11:44:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551728662; cv=none; d=google.com; s=arc-20160816; b=kddw+ZYwl31nlmMJU0IQ23nT7tSkpdBhhjNkxWtmIvIkTrgiXKx6DqopQadqSmAcrc I3Dq82xfPy4csuwxfW+slqYIabInJs8ZfUFPytvYmsmKHUt1dtS+3e6hlx/niHQjLtnB l/uDYVwk/lYk/HoE5Rk3YvpbGXRUBmexLDOrUYp/UAPBcpEpMygotPxSGFSuqxtOJzNU tT6gw6tRtXk+Ei07JyMOn8MD7XaboaiEmu6HUsxUN4M11L35eLhp2FhTjEeIEupX2a9w mLeJB8m+pkpOatrdCSJcKnyR32GG+jQrPIJjIOAmS40Wn5SHjOsmRywNCmG9y+uIAAvd HvlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=LfPLeXV5ZYH6twzL4sJhcodMBSJReO4vuTXLjzsBDTY=; b=a5y7XwRjc62MXptG6x8Bl37hKxJo1fDsiTGd+i4iwt5yB+A5+M0wXFWw6UuiDiis1N OQ/ZzuUtncn/ieBK/9DrJVi5V5DwPbUrnj30eyUPV6/3sjZbqtoyLplW9/YtAcFn687R 2iUKxdjt9VudjC/LCIyIdMkk7nxFm8ITF2mypdRMl8UtP3y0dZLN0OSScwDH0CsH5Qv7 FAoqTbWv2SiULGxlt8IkJwOzK2h0nu3lEOiawvcDGorOT2xF02VmmFHUiXuCyohlGDZS dNw555kVL6vgARfmh/0rcJ/q1l07ogplzANccZRnWhR0AskrmvxonyqgwakDzgpSnV/0 3hOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="f6Mc8/a0"; dkim=pass header.i=@linaro.org header.s=google header.b=VVVFJFW4; spf=pass (google.com: domain of libc-alpha-return-100402-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-100402-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id h128si5730949pgc.397.2019.03.04.11.44.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2019 11:44:22 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-100402-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="f6Mc8/a0"; dkim=pass header.i=@linaro.org header.s=google header.b=VVVFJFW4; spf=pass (google.com: domain of libc-alpha-return-100402-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-100402-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=BXOsVS0+qRFlZu7IRAR4jkydj0nFYPx 1zQ26O75jiQCKzMRY5aKQTMReJntPlyIVb9uSCj9yHnX7Pi2KmcCtVWQWCK6R9uI 7JdIUvZGsC0Hy/ZzysXTJzzYX004gsYq3CfnGti9tOlzXcmMQKo0kJGGg+wmL3Oq P7BKVhcWB4rw= 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:subject:date:message-id:in-reply-to :references; s=default; bh=dk6NNTj7kG5ZaZy5VI1fK6MRpgo=; b=f6Mc8 /a0NXJZu+uoS++1ofPhw7lzmNTCk16B6KGLU6ibBfOvLPd1851x7eOG9c4Q42IP3 P6p6zPyabJ+iBvYChd5K4LJRQMNtVdGsN+1bi1jt7eqDWYgu9IwxsgwuDF8dMX0H 82JNV85W9yVNgQr5v2UI58zH1235lE7UjWSKXc= Received: (qmail 73273 invoked by alias); 4 Mar 2019 19:44:03 -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 73147 invoked by uid 89); 4 Mar 2019 19:44:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS, TVD_SUBJ_WIPE_DEBT autolearn=ham version=3.3.2 spammy=Multiple, H*p:D*org, H*RU:209.85.160.194, Hx-spam-relays-external:209.85.160.194 X-HELO: mail-qt1-f194.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=LfPLeXV5ZYH6twzL4sJhcodMBSJReO4vuTXLjzsBDTY=; b=VVVFJFW4jXy3zXr+841JEdksKHKb5QZsq4jfaaY1EePaB7B6wRmVVEpj0Qn/ZrMtEr OiSi3hYq54FdnWNjfIWkMesEDXcRf0G3QJnpCQx8hjtK882QvJQK6nfeM39wIX3ySLvK 3zLvjW2f7WEXfNrAC9hchDbfOZdQ1w9s2b9LWp3prANOPtdUx5Can3vjjkCHkp53KxSW EcuyFqmEABZxTCM7lASGxWjI1Z7w5WtGPxHCTq54DXXPrFbQKjap9hhe8pV30yc3TLI2 PBPyNOCYnZ8EeqHJoMJx/YPj6NsEGNSNprdJA4L51rx7iqm86ZtNQil6S2Ira+yVOCwr VG+A== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 2/3] powerpc: remove power6 wcschr optimization Date: Mon, 4 Mar 2019 16:43:49 -0300 Message-Id: <20190304194350.16116-2-adhemerval.zanella@linaro.org> In-Reply-To: <20190304194350.16116-1-adhemerval.zanella@linaro.org> References: <20190304194350.16116-1-adhemerval.zanella@linaro.org> This patch removes the power6 wcschr optimization. It is rarely int real word codo, the optimizations can be potentially implemented in generic code (which would also benefit not only powerpc), and the power6 and power7 resulting binary are essentially the same. Checked on powerpc64-linux-gnu. * sysdeps/powerpc/power6/wcschr.c: Remove file. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power6.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power7.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcschr-power6.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcschr-power7.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcschr-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcschr.c: Likewise. * sysdeps/powerpc/powerpc64/power6/wcschr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/Makefile [$(subdir) == wcsmbs] (sysdeps_routines): Remove wcschr-power6 and wcschr-power7. (CFLAGS-wcschr-power7.c, CFLAGS-wcschr-power6.c): Remove rule. * sysdeps/powerpc/powerpc64/multiarch/Makefile: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c: Remove wcschr optimizations. --- sysdeps/powerpc/power6/wcschr.c | 96 ------------------- .../powerpc32/power4/multiarch/Makefile | 5 +- .../power4/multiarch/ifunc-impl-list.c | 11 --- .../power4/multiarch/wcschr-power6.c | 26 ----- .../power4/multiarch/wcschr-power7.c | 26 ----- .../powerpc32/power4/multiarch/wcschr-ppc32.c | 43 --------- .../powerpc32/power4/multiarch/wcschr.c | 41 -------- sysdeps/powerpc/powerpc64/multiarch/Makefile | 5 +- .../powerpc64/multiarch/ifunc-impl-list.c | 11 --- .../powerpc64/multiarch/wcschr-power6.c | 19 ---- .../powerpc64/multiarch/wcschr-power7.c | 19 ---- .../powerpc64/multiarch/wcschr-ppc64.c | 18 ---- sysdeps/powerpc/powerpc64/multiarch/wcschr.c | 43 --------- sysdeps/powerpc/powerpc64/power6/wcschr.c | 1 - 14 files changed, 2 insertions(+), 362 deletions(-) delete mode 100644 sysdeps/powerpc/power6/wcschr.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power6.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power7.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcschr-power6.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcschr-power7.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcschr-ppc64.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcschr.c delete mode 100644 sysdeps/powerpc/powerpc64/power6/wcschr.c -- 2.17.1 diff --git a/sysdeps/powerpc/power6/wcschr.c b/sysdeps/powerpc/power6/wcschr.c deleted file mode 100644 index e3f93569dd..0000000000 --- a/sysdeps/powerpc/power6/wcschr.c +++ /dev/null @@ -1,96 +0,0 @@ -/* wcschr.c - Wide Character Search for POWER6+. - Copyright (C) 2012-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include - -#ifndef WCSCHR -# define WCSCHR __wcschr -# define DEFAULT_WCSCHR -#endif - -/* Find the first occurrence of WC in WCS. */ -wchar_t * -WCSCHR (const wchar_t *wcs, const wchar_t wc) -{ - const wchar_t *wcs2 = wcs + 1; - - if (*wcs == wc) - return (wchar_t *) wcs; - if (*wcs == L'\0') - return NULL; - - do - { - wcs += 2; - - if (*wcs2 == wc) - return (wchar_t *) wcs2; - if (*wcs2 == L'\0') - return NULL; - wcs2 += 2; - - if (*wcs == wc) - return (wchar_t *) wcs; - if (*wcs == L'\0') - return NULL; - wcs += 2; - - if (*wcs2 == wc) - return (wchar_t *) wcs2; - if (*wcs2 == L'\0') - return NULL; - wcs2 += 2; - - if (*wcs == wc) - return (wchar_t *) wcs; - if (*wcs == L'\0') - return NULL; - wcs += 2; - - if (*wcs2 == wc) - return (wchar_t *) wcs2; - if (*wcs2 == L'\0') - return NULL; - wcs2 += 2; - - if (*wcs == wc) - return (wchar_t *) wcs; - if (*wcs == L'\0') - return NULL; - wcs += 2; - - if (*wcs2 == wc) - return (wchar_t *) wcs2; - if (*wcs2 == L'\0') - return NULL; - wcs2 += 2; - - if (*wcs == wc) - return (wchar_t *) wcs; - } - while (*wcs != L'\0'); - - return NULL; -} -#ifdef DEFAULT_WCSCHR -libc_hidden_def (__wcschr) -weak_alias (__wcschr, wcschr) -libc_hidden_weak (wcschr) -#else -libc_hidden_def (wcschr) -#endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile index f5141bc5b5..bb87c56b4d 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile @@ -17,11 +17,8 @@ CFLAGS-strncase_l-power7.c += -mcpu=power7 -funroll-loops endif ifeq ($(subdir),wcsmbs) -sysdep_routines += wcschr-power7 wcschr-power6 wcschr-ppc32 \ - wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc32 +sysdep_routines += wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc32 -CFLAGS-wcschr-power7.c += -mcpu=power7 -CFLAGS-wcschr-power6.c += -mcpu=power6 CFLAGS-wcsrchr-power7.c += -mcpu=power7 CFLAGS-wcsrchr-power6.c += -mcpu=power6 endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c index ae581d62f8..7624c3d5f0 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c @@ -187,17 +187,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_ppc)) - /* Support sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c. */ - IFUNC_IMPL (i, name, wcschr, - IFUNC_IMPL_ADD (array, i, wcschr, - hwcap & PPC_FEATURE_HAS_VSX, - __wcschr_power7) - IFUNC_IMPL_ADD (array, i, wcschr, - hwcap & PPC_FEATURE_ARCH_2_05, - __wcschr_power6) - IFUNC_IMPL_ADD (array, i, wcschr, 1, - __wcschr_ppc)) - /* Support sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c. */ IFUNC_IMPL (i, name, wcsrchr, IFUNC_IMPL_ADD (array, i, wcsrchr, diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power6.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power6.c deleted file mode 100644 index 516f0f8584..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power6.c +++ /dev/null @@ -1,26 +0,0 @@ -/* wcschr.c - Wide Character Search for powerpc32/power6. - Copyright (C) 2013-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include - -#define WCSCHR __wcschr_power6 - -#undef libc_hidden_def -#define libc_hidden_def(name) - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power7.c deleted file mode 100644 index 5dc52659e8..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power7.c +++ /dev/null @@ -1,26 +0,0 @@ -/* wcschr.c - Wide Character Search for powerpc32/power7. - Copyright (C) 2013-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include - -#define WCSCHR __wcschr_power7 - -#undef libc_hidden_def -#define libc_hidden_def(name) - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c deleted file mode 100644 index 55873fbcf4..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 2013-2019 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 - . */ - -#include - -#if IS_IN (libc) -# undef libc_hidden_weak -# define libc_hidden_weak(name) - -# undef weak_alias -# undef libc_hidden_def - -# ifdef SHARED -# define libc_hidden_def(name) \ - __hidden_ver1 (__wcschr_ppc, __GI_wcschr, __wcschr_ppc); \ - strong_alias (__wcschr_ppc, __wcschr_ppc_1); \ - __hidden_ver1 (__wcschr_ppc_1, __GI___wcschr, __wcschr_ppc_1); -# define weak_alias(name,alias) -# else -# define weak_alias(name, alias) \ - _weak_alias(__wcschr_ppc, __wcschr) -# define libc_hidden_def(name) -# endif /* SHARED */ -#endif - -extern __typeof (wcschr) __wcschr_ppc; - -#define WCSCHR __wcschr_ppc -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c deleted file mode 100644 index c8379a2dca..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Multiple versions of wcschr - Copyright (C) 2013-2019 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 IS_IN (libc) -# define wcschr __redirect_wcschr -# include -# include -# include "init-arch.h" - -extern __typeof (__redirect_wcschr) __wcschr_ppc attribute_hidden; -extern __typeof (__redirect_wcschr) __wcschr_power6 attribute_hidden; -extern __typeof (__redirect_wcschr) __wcschr_power7 attribute_hidden; - -extern __typeof (__redirect_wcschr) __libc_wcschr; - -libc_ifunc (__libc_wcschr, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __wcschr_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __wcschr_power6 - : __wcschr_ppc); -#undef wcschr -weak_alias (__libc_wcschr, wcschr) -#else -#include -#endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/Makefile b/sysdeps/powerpc/powerpc64/multiarch/Makefile index 3913ef580e..c70f4a2b5a 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc64/multiarch/Makefile @@ -39,11 +39,8 @@ CFLAGS-strncase_l-power7.c += -mcpu=power7 -funroll-loops endif ifeq ($(subdir),wcsmbs) -sysdep_routines += wcschr-power7 wcschr-power6 wcschr-ppc64 \ - wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc64 +sysdep_routines += wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc64 -CFLAGS-wcschr-power7.c += -mcpu=power7 -CFLAGS-wcschr-power6.c += -mcpu=power6 CFLAGS-wcsrchr-power7.c += -mcpu=power7 CFLAGS-wcsrchr-power6.c += -mcpu=power6 endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c index 06d33d71e0..9b1e4d141d 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c @@ -260,17 +260,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1, __strncasecmp_l_ppc)) - /* Support sysdeps/powerpc/powerpc64/multiarch/wcschr.c. */ - IFUNC_IMPL (i, name, wcschr, - IFUNC_IMPL_ADD (array, i, wcschr, - hwcap & PPC_FEATURE_HAS_VSX, - __wcschr_power7) - IFUNC_IMPL_ADD (array, i, wcschr, - hwcap & PPC_FEATURE_ARCH_2_05, - __wcschr_power6) - IFUNC_IMPL_ADD (array, i, wcschr, 1, - __wcschr_ppc)) - /* Support sysdeps/powerpc/powerpc64/multiarch/wcschr.c. */ IFUNC_IMPL (i, name, wcsrchr, IFUNC_IMPL_ADD (array, i, wcsrchr, diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcschr-power6.c b/sysdeps/powerpc/powerpc64/multiarch/wcschr-power6.c deleted file mode 100644 index 029608c512..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcschr-power6.c +++ /dev/null @@ -1,19 +0,0 @@ -/* wcschr.c - Wide Character Search for powerpc64/power6. - Copyright (C) 2013-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcschr-power7.c b/sysdeps/powerpc/powerpc64/multiarch/wcschr-power7.c deleted file mode 100644 index 9b11103976..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcschr-power7.c +++ /dev/null @@ -1,19 +0,0 @@ -/* wcschr.c - Wide Character Search for powerpc64/power7. - Copyright (C) 2013-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcschr-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/wcschr-ppc64.c deleted file mode 100644 index f956fc0aa2..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcschr-ppc64.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2013-2019 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 - . */ - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcschr.c b/sysdeps/powerpc/powerpc64/multiarch/wcschr.c deleted file mode 100644 index 0a279f0dd2..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcschr.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Multiple versions of wcschr - Copyright (C) 2013-2019 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 IS_IN (libc) -# define wcschr __redirect_wcschr -# define __wcschr __redirect___wcschr -# include -# include -# include "init-arch.h" - -extern __typeof (wcschr) __wcschr_ppc attribute_hidden; -extern __typeof (wcschr) __wcschr_power6 attribute_hidden; -extern __typeof (wcschr) __wcschr_power7 attribute_hidden; -# undef wcschr -# undef __wcschr - -libc_ifunc_redirected (__redirect___wcschr, __wcschr, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __wcschr_power7 - : (hwcap & PPC_FEATURE_ARCH_2_05) - ? __wcschr_power6 - : __wcschr_ppc); -weak_alias (__wcschr, wcschr) -#else -#undef libc_hidden_def -#define libc_hidden_def(a) -#include -#endif diff --git a/sysdeps/powerpc/powerpc64/power6/wcschr.c b/sysdeps/powerpc/powerpc64/power6/wcschr.c deleted file mode 100644 index ae04a130cc..0000000000 --- a/sysdeps/powerpc/powerpc64/power6/wcschr.c +++ /dev/null @@ -1 +0,0 @@ -#include From patchwork Mon Mar 4 19:43:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 159578 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4142012jad; Mon, 4 Mar 2019 11:44:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IYu7kI9tnrF5SSLoLd4GU4MlTcPSlpcX1ih7COvQY4K/V8d+8vGdN2XBmYcgJUglVZEVEPc X-Received: by 2002:aa7:8205:: with SMTP id k5mr21153438pfi.86.1551728672103; Mon, 04 Mar 2019 11:44:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551728672; cv=none; d=google.com; s=arc-20160816; b=O++ybOU+14xWfEQRwLXiGEYh1p9uJmsqF6HWBkkyjHWwXuxay6B2wyzLerAupUP8jc iL7DCq1kE/1ygI3Q2okz55gyP/CHPazinA222dwTy+TvFquT6K4azRe9fOKj8ZeJt17B Ae5O+l9EPKIn2dzd3kqs13J0RO1KqlxaxWekBtWeUQVg9/VBrMY6SntbJ6SV7GSFDUli YaoiAY7aZE2lt+eYsFyWLK6TaYNARgy8pW0t3U2dparCcGZwjfLz2VXWppDvghSkxv2v +LIQ0mtMuJm5Uf6Z+iXTPMl72PBPsFHHVepUqu4J7f9+DL1Bvq1svli1jUlqogxcfBFj MMSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=y0382tAC0jMJvOVyPv1TsYgLxajnVyuuzr12UEDoKss=; b=IdG4nuEpVsgAwyc16CsFAPYPMsR3PRe3wOMkSA0EbdbDLI8y/9eyKc9lYcz3ovdQI/ JgneK5jy6QD5+vsh8oIWEtBgNKvjz4aczha1gHn8ekv9eji39tAV37DjfKzhcJ+OTL8m yIYgTT/JGIdraVO9aPviS5XtQRMlY30WjaHv/2EvG5Y+oBqKLhcV+TuYV5wBjktWWLHT 7h0QhVgetnkqlY23623/MjhYRm/1FPLK9RMYk9VybkjRQ1DqwxVXn2pFiAXfz2COWUNQ qc/ULIle52j2qFu85tThA2mlwIntn0sPAE+skq7hNX/Y2dqMKYeJCRMicspdheHPbXob t6cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=rF6wT6hC; dkim=pass header.i=@linaro.org header.s=google header.b=HZ5XeYNm; spf=pass (google.com: domain of libc-alpha-return-100403-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-100403-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id p36si5844848pgl.145.2019.03.04.11.44.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2019 11:44:32 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-100403-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=rF6wT6hC; dkim=pass header.i=@linaro.org header.s=google header.b=HZ5XeYNm; spf=pass (google.com: domain of libc-alpha-return-100403-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-100403-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=QG4xUvorLdQ8e9mhBhjzVN8jmmji4Bg Ufz5Op/2hGyhj6MDWecOtLpS2G3+8gH87tltmED1IGbVFP1HebbUOFQTBraA8bDc gs8FpxLZVb3ozs9iT0Irm1ZWeEbotJGvt4iy01M3wKZ/uWRLeOqm4jp4WYivORj7 OrmFqBG85MPg= 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:subject:date:message-id:in-reply-to :references; s=default; bh=Dd4fPYV0GmyiZwPv2Dl2BGQxrhc=; b=rF6wT 6hCsr9MqH719P03bMGj7jk04sQnWrT6Ds7GilztZPzDXDjWK5JsPlBONde4B9Ham ih3WiksPiKKlW4CFFvPvCCRR2QSQaLU/MJxnkn6Mag/1fg5I1LaDGe1VKtdJ5pa8 0HgOYPhBbxS/GRBYy1AEzYbQHmqW6Ie1+1xPPo= Received: (qmail 73492 invoked by alias); 4 Mar 2019 19:44:05 -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 73317 invoked by uid 89); 4 Mar 2019 19:44:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS, TVD_SUBJ_WIPE_DEBT autolearn=ham version=3.3.2 spammy=Multiple, H*p:D*org, HX-Received:ae9, Wide X-HELO: mail-qk1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=y0382tAC0jMJvOVyPv1TsYgLxajnVyuuzr12UEDoKss=; b=HZ5XeYNmONSi/ywdJgXDqocRoMFKiA9qa99arLe4WF2NXBh7859JFFEmfs81aKlgcM 41r4QuGcfuAkLzrIf0LuDvTmtJwax30xnUbyYnLoLjUovXXf9I2gVmBpPz9nUCYqfsjN K0uXWmSwl7MblIFkx8k29Gr14odpLfM1kucnNWT2rIkJVFJ0ES4uucludBKjyNvhN0+P tWNptS3TJ/jiDaKNIyKxEytZeidpVj14omJdITZB6wogX7YGjEnvrkxc5u3sml4uSBOb t9ISN+vl7BhFwGDqdiY401QSuYz02f+Le/agiIZcdDkk7E6/BOPDhqbQwTxxpzU/KYqG GW9Q== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 3/3] powerpc: remove power6 wcsrchr optimization Date: Mon, 4 Mar 2019 16:43:50 -0300 Message-Id: <20190304194350.16116-3-adhemerval.zanella@linaro.org> In-Reply-To: <20190304194350.16116-1-adhemerval.zanella@linaro.org> References: <20190304194350.16116-1-adhemerval.zanella@linaro.org> This patch removes the power6 wcsrchr optimization. It is rarely int real word codo, the optimizations can be potentially implemented in generic code (which would also benefit not only powerpc), and the power6 and power7 resulting binary are essentially the same. Checked on powerpc64-linux-gnu. * sysdeps/powerpc/power6/wcsrchr.c: Remove file. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c: Likewise. * sysdeps/powerpc/powerpc64/power6/wcsrchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/Makefile [$(subdir) == wcsmbs] (sysdeps_routines): Remove wcsrchr-power6 and wcsrchr-power7. (CFLAGS-wcsrchr-power7.c, CFLAGS-wcsrchr-power6.c): Remove rule. * sysdeps/powerpc/powerpc64/multiarch/Makefile: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c: Remove wcsrchr optimizations. --- sysdeps/powerpc/power6/wcsrchr.c | 89 ------------------- .../powerpc32/power4/multiarch/Makefile | 7 -- .../power4/multiarch/ifunc-impl-list.c | 11 --- .../power4/multiarch/wcsrchr-power6.c | 20 ----- .../power4/multiarch/wcsrchr-power7.c | 20 ----- .../power4/multiarch/wcsrchr-ppc32.c | 26 ------ .../powerpc32/power4/multiarch/wcsrchr.c | 36 -------- sysdeps/powerpc/powerpc64/multiarch/Makefile | 7 -- .../powerpc64/multiarch/ifunc-impl-list.c | 11 --- .../powerpc64/multiarch/wcsrchr-power6.c | 19 ---- .../powerpc64/multiarch/wcsrchr-power7.c | 19 ---- .../powerpc64/multiarch/wcsrchr-ppc64.c | 18 ---- sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c | 36 -------- sysdeps/powerpc/powerpc64/power6/wcsrchr.c | 1 - 14 files changed, 320 deletions(-) delete mode 100644 sysdeps/powerpc/power6/wcsrchr.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c delete mode 100644 sysdeps/powerpc/powerpc64/power6/wcsrchr.c -- 2.17.1 diff --git a/sysdeps/powerpc/power6/wcsrchr.c b/sysdeps/powerpc/power6/wcsrchr.c deleted file mode 100644 index 1762bd276c..0000000000 --- a/sysdeps/powerpc/power6/wcsrchr.c +++ /dev/null @@ -1,89 +0,0 @@ -/* wcsrchr.c - Wide Character Reverse Search for POWER6+. - Copyright (C) 2012-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include - -#ifndef WCSRCHR -# define WCSRCHR wcsrchr -#endif - -/* Find the last occurrence of WC in WCS. */ -wchar_t * -WCSRCHR (const wchar_t *wcs, const wchar_t wc) -{ - const wchar_t *wcs2 = wcs + 1; - const wchar_t *retval = NULL; - - if (*wcs == wc) - retval = wcs; - - if (*wcs == L'\0') return (wchar_t *) retval; - - do - { - wcs+=2; - - if (*wcs2 == wc) - retval = wcs2; - if (*wcs2 == L'\0') - return (wchar_t *) retval; - wcs2+=2; - - if (*wcs == wc) - retval = wcs; - if (*wcs == L'\0') - return (wchar_t *) retval; - wcs+=2; - - if (*wcs2 == wc) - retval = wcs2; - if (*wcs2 == L'\0') - return (wchar_t *) retval; - wcs2+=2; - - if (*wcs == wc) - retval = wcs; - if (*wcs == L'\0') - return (wchar_t *) retval; - wcs+=2; - - if (*wcs2 == wc) - retval = wcs2; - if (*wcs2 == L'\0') - return (wchar_t *) retval; - wcs2+=2; - - if (*wcs == wc) - retval = wcs; - if (*wcs == L'\0') - return (wchar_t *) retval; - wcs+=2; - - if (*wcs2 == wc) - retval = wcs2; - if (*wcs2 == L'\0') - return (wchar_t *) retval; - wcs2+=2; - - if (*wcs == wc) - retval = wcs; - } - while (*wcs != L'\0'); - - return (wchar_t *) retval; -} diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile index bb87c56b4d..5c68f07d19 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile @@ -15,10 +15,3 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \ CFLAGS-strncase-power7.c += -mcpu=power7 -funroll-loops CFLAGS-strncase_l-power7.c += -mcpu=power7 -funroll-loops endif - -ifeq ($(subdir),wcsmbs) -sysdep_routines += wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc32 - -CFLAGS-wcsrchr-power7.c += -mcpu=power7 -CFLAGS-wcsrchr-power6.c += -mcpu=power6 -endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c index 7624c3d5f0..16a64beb33 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c @@ -187,16 +187,5 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_ppc)) - /* Support sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c. */ - IFUNC_IMPL (i, name, wcsrchr, - IFUNC_IMPL_ADD (array, i, wcsrchr, - hwcap & PPC_FEATURE_HAS_VSX, - __wcsrchr_power7) - IFUNC_IMPL_ADD (array, i, wcsrchr, - hwcap & PPC_FEATURE_ARCH_2_05, - __wcsrchr_power6) - IFUNC_IMPL_ADD (array, i, wcsrchr, 1, - __wcsrchr_ppc)) - return i; } diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c deleted file mode 100644 index 93c8bde9ba..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 2013-2019 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 WCSRCHR __wcsrchr_power6 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c deleted file mode 100644 index a32a9845b7..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 2013-2019 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 WCSRCHR __wcsrchr_power7 - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c deleted file mode 100644 index 690faf48b8..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 2013-2019 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 - . */ - -#include - -#if IS_IN (libc) -# define WCSRCHR __wcsrchr_ppc -#endif - -extern __typeof (wcsrchr) __wcsrchr_ppc; - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c deleted file mode 100644 index 80adc7bcd1..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Multiple versions of wcsrchr - Copyright (C) 2013-2019 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 IS_IN (libc) -# include -# include -# include "init-arch.h" - -extern __typeof (wcsrchr) __wcsrchr_ppc attribute_hidden; -extern __typeof (wcsrchr) __wcsrchr_power6 attribute_hidden; -extern __typeof (wcsrchr) __wcsrchr_power7 attribute_hidden; - -libc_ifunc (wcsrchr, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __wcsrchr_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __wcsrchr_power6 - : __wcsrchr_ppc); -#else -#include -#endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/Makefile b/sysdeps/powerpc/powerpc64/multiarch/Makefile index c70f4a2b5a..ea936bf9ed 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc64/multiarch/Makefile @@ -37,10 +37,3 @@ endif CFLAGS-strncase-power7.c += -mcpu=power7 -funroll-loops CFLAGS-strncase_l-power7.c += -mcpu=power7 -funroll-loops endif - -ifeq ($(subdir),wcsmbs) -sysdep_routines += wcsrchr-power7 wcsrchr-power6 wcsrchr-ppc64 - -CFLAGS-wcsrchr-power7.c += -mcpu=power7 -CFLAGS-wcsrchr-power6.c += -mcpu=power6 -endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c index 9b1e4d141d..c0a927d73e 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c @@ -260,17 +260,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1, __strncasecmp_l_ppc)) - /* Support sysdeps/powerpc/powerpc64/multiarch/wcschr.c. */ - IFUNC_IMPL (i, name, wcsrchr, - IFUNC_IMPL_ADD (array, i, wcsrchr, - hwcap & PPC_FEATURE_HAS_VSX, - __wcsrchr_power7) - IFUNC_IMPL_ADD (array, i, wcsrchr, - hwcap & PPC_FEATURE_ARCH_2_05, - __wcsrchr_power6) - IFUNC_IMPL_ADD (array, i, wcsrchr, 1, - __wcsrchr_ppc)) - /* Support sysdeps/powerpc/powerpc64/multiarch/strrchr.c. */ IFUNC_IMPL (i, name, strrchr, IFUNC_IMPL_ADD (array, i, strrchr, diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c b/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c deleted file mode 100644 index a68569d30c..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c +++ /dev/null @@ -1,19 +0,0 @@ -/* wcsrchr.c - Wide Character Search for powerpc64/power6. - Copyright (C) 2013-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c b/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c deleted file mode 100644 index f27553f4ab..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c +++ /dev/null @@ -1,19 +0,0 @@ -/* wcsrchr.c - Wide Character Search for powerpc64/power7. - Copyright (C) 2013-2019 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; see the file COPYING.LIB. If - not, see . */ - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c deleted file mode 100644 index b6504ebaef..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2013-2019 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 - . */ - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c b/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c deleted file mode 100644 index 52371a18b7..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Multiple versions of wcsrchr. - Copyright (C) 2013-2019 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 IS_IN (libc) -# include -# include -# include "init-arch.h" - -extern __typeof (wcsrchr) __wcsrchr_ppc attribute_hidden; -extern __typeof (wcsrchr) __wcsrchr_power6 attribute_hidden; -extern __typeof (wcsrchr) __wcsrchr_power7 attribute_hidden; - -libc_ifunc (wcsrchr, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __wcsrchr_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __wcsrchr_power6 - : __wcsrchr_ppc); -#else -#include -#endif diff --git a/sysdeps/powerpc/powerpc64/power6/wcsrchr.c b/sysdeps/powerpc/powerpc64/power6/wcsrchr.c deleted file mode 100644 index b86472d7bd..0000000000 --- a/sysdeps/powerpc/powerpc64/power6/wcsrchr.c +++ /dev/null @@ -1 +0,0 @@ -#include