From patchwork Thu Feb 10 19:58:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 51026 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D17CC385842B for ; Thu, 10 Feb 2022 20:04:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D17CC385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644523446; bh=TRFUgy6I3nW+mR25qKD5LCyRiru0+CwHKbosHWjLg1M=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=rSAr8fBbmVhp//c0ZZj4g0VPjzp2CA0JkIJcCN8YYqbib9JBeo+00yEIvSCqKSpcU 3wSb5VgQbG1i34HD0Q+RW5+ShFQYX+eFJcL+Rbx8C+dcm1cz4dJ+iC4R6lx9NUKrWB Gjhczq0xHa2cQVr1DsNeYyECyTNEwEhfalYdvLOc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) by sourceware.org (Postfix) with ESMTPS id D5178385840E for ; Thu, 10 Feb 2022 19:58:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D5178385840E Received: by mail-oo1-xc2a.google.com with SMTP id c7-20020a4ad207000000b002e7ab4185d2so7706930oos.6 for ; Thu, 10 Feb 2022 11:58:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TRFUgy6I3nW+mR25qKD5LCyRiru0+CwHKbosHWjLg1M=; b=Pw6UGhDJJArUufBTbmhSrM6/5IYQFMrY7uvY8kGmVIT+ioFD+zuaB30+gzsYLeCKW6 f8mgHFE0tfJ1x2f+YLQnooyvVK9fZs7vE25RCSaFw0FI9XylAVpAefxCE9dNuakbCM3a al7LccIHslJ1wf26G12HR5PnPNuZ9r6NPnhZ+C8O3fCOl2zdd3wWFNMTgfZ7ZOPOsrsS PSTk6V562jhoSy65HZ5QXvZqizYQz2Se38ZEnTJ0VMxS2NWlZe9w64IyGeDCugRH8jfi unL+Xin0NtRNOxTPOLS6GjQo4gke/mdYDwkkbf7hz1WSRYMR7Gv504dDUPNzVJytx1V0 YCzw== X-Gm-Message-State: AOAM533I0ci72XvIw9C12jqA/DjJmIi/o33PodjORGHgzPc9/pdLvWj+ Pq4ZLFJk7a0tSv+jixwwFwVh0A1/G2zPrA== X-Google-Smtp-Source: ABdhPJz2Ub5UHhhPFoWoWz1WGKqSCqBPyT6xzb55TZESmsLwMDroWH4K3mBlL4y2O0iS9eKn6+Jhlw== X-Received: by 2002:a05:6870:e606:: with SMTP id q6mr1302136oag.110.1644523134938; Thu, 10 Feb 2022 11:58:54 -0800 (PST) Received: from birita.. ([2804:431:c7ca:733:a925:765e:3799:3d34]) by smtp.gmail.com with ESMTPSA id bg34sm8859219oob.14.2022.02.10.11.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 11:58:54 -0800 (PST) To: libc-alpha@sourceware.org, Wilco Dijkstra , "H . J . Lu" , Noah Goldstein Subject: [PATCH 08/12] powerpc: Remove powerpc32 bzero optimizations Date: Thu, 10 Feb 2022 16:58:34 -0300 Message-Id: <20220210195838.1036012-9-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220210195838.1036012-1-adhemerval.zanella@linaro.org> References: <20220210195838.1036012-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TVD_SUBJ_WIPE_DEBT, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The symbol is not present in current POSIX specification and compiler already generates memset call. --- sysdeps/powerpc/powerpc32/bzero.S | 27 -------------- .../powerpc32/power4/multiarch/Makefile | 4 +- .../powerpc32/power4/multiarch/bzero-power6.S | 25 ------------- .../powerpc32/power4/multiarch/bzero-power7.S | 25 ------------- .../powerpc32/power4/multiarch/bzero-ppc32.S | 34 ----------------- .../powerpc32/power4/multiarch/bzero.c | 37 ------------------- .../power4/multiarch/ifunc-impl-list.c | 8 ---- 7 files changed, 2 insertions(+), 158 deletions(-) delete mode 100644 sysdeps/powerpc/powerpc32/bzero.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power6.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power7.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c diff --git a/sysdeps/powerpc/powerpc32/bzero.S b/sysdeps/powerpc/powerpc32/bzero.S deleted file mode 100644 index 9cc03c92df..0000000000 --- a/sysdeps/powerpc/powerpc32/bzero.S +++ /dev/null @@ -1,27 +0,0 @@ -/* Optimized bzero `implementation' for PowerPC. - Copyright (C) 1997-2022 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 - -ENTRY (__bzero) - - mr r5,r4 - li r4,0 - b memset@local -END (__bzero) -weak_alias (__bzero, bzero) diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile index 5c68f07d19..b2f9deefb8 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile @@ -1,8 +1,8 @@ ifeq ($(subdir),string) sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \ memcpy-ppc32 memcmp-power7 memcmp-ppc32 memset-power7 \ - memset-power6 memset-ppc32 bzero-power7 bzero-power6 \ - bzero-ppc32 mempcpy-power7 mempcpy-ppc32 memchr-power7 \ + memset-power6 memset-ppc32 \ + mempcpy-power7 mempcpy-ppc32 memchr-power7 \ memchr-ppc32 memrchr-power7 memrchr-ppc32 rawmemchr-power7 \ rawmemchr-ppc32 strlen-power7 strlen-ppc32 strnlen-power7 \ strnlen-ppc32 strncmp-power7 strncmp-ppc32 \ diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power6.S b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power6.S deleted file mode 100644 index b352433283..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power6.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Optimized bzero implementation for PowerPC32/POWER6. - Copyright (C) 2010-2022 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 - -ENTRY (__bzero_power6) - mr r5,r4 - li r4,0 - b __memset_power6@local -END (__bzero_power6) diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power7.S deleted file mode 100644 index 80c8ffe55a..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power7.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Optimized bzero implementation for PowerPC32/POWER7. - Copyright (C) 2010-2022 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 - -ENTRY (__bzero_power7) - mr r5,r4 - li r4,0 - b __memset_power7@local -END (__bzero_power7) diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S deleted file mode 100644 index 86711e8e22..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S +++ /dev/null @@ -1,34 +0,0 @@ -/* Optimized bzero implementation for PowerPC32/PPC32. - Copyright (C) 2010-2022 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 - -/* memset ifunc selector is not built for static and memset@local - for shared builds makes the linker point the call to the ifunc - selector. */ -#ifdef SHARED -# define MEMSET __memset_ppc -#else -# define MEMSET memset -#endif - -ENTRY (__bzero_ppc) - mr r5,r4 - li r4,0 - b MEMSET@local -END (__bzero_ppc) diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c deleted file mode 100644 index 5d9270289f..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Multiple versions of bzero. - Copyright (C) 2013-2022 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 multiple versions only for definition in libc. */ -#if IS_IN (libc) -# include -# include -# include "init-arch.h" - -extern __typeof (bzero) __bzero_ppc attribute_hidden; -extern __typeof (bzero) __bzero_power6 attribute_hidden; -extern __typeof (bzero) __bzero_power7 attribute_hidden; - -libc_ifunc (__bzero, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __bzero_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __bzero_power6 - : __bzero_ppc); - -weak_alias (__bzero, bzero) -#endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c index 9832f366bb..01890367a4 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c @@ -73,14 +73,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __memset_power6) IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ppc)) - /* Support sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c. */ - IFUNC_IMPL (i, name, bzero, - IFUNC_IMPL_ADD (array, i, bzero, hwcap & PPC_FEATURE_HAS_VSX, - __bzero_power7) - IFUNC_IMPL_ADD (array, i, bzero, hwcap & PPC_FEATURE_ARCH_2_05, - __bzero_power6) - IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ppc)) - /* Support sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c. */ IFUNC_IMPL (i, name, strlen, IFUNC_IMPL_ADD (array, i, strlen, hwcap & PPC_FEATURE_HAS_VSX,