From patchwork Thu Feb 10 19:58:29 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: 51022 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 6934B3858427 for ; Thu, 10 Feb 2022 20:01:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6934B3858427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644523274; bh=PA5nUyiLN2rp1LHo39owGx6WO49ggu3yS+t8t9cl5sU=; 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=DBCwOm0BWR8DFH2Is8QnqnUvuszXsss34zNtXri0JamPv20Xjnm8yb7s5/H1+pLkW 15uI9Dh7JyenZh2h8uBM4+cBYtAiseGmtCWciyqwZHGOkUvP1UNC2oaKiPX9a+CIzc GGNzoTcgI8SuhWXhvKPUeaLZAhgmgz0Ce9yjg5Cg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by sourceware.org (Postfix) with ESMTPS id 82355385842D for ; Thu, 10 Feb 2022 19:58:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82355385842D Received: by mail-oo1-xc2d.google.com with SMTP id o192-20020a4a2cc9000000b00300af40d795so7683663ooo.13 for ; Thu, 10 Feb 2022 11:58:47 -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=PA5nUyiLN2rp1LHo39owGx6WO49ggu3yS+t8t9cl5sU=; b=CBw/wGPmWCzWeJCWHLG63ACxOcYwx7LHEPqG7031bvPgxKXR/Fn8v95shFX11WC2xp rIh9J8NFbH2YXUaxmzN98oPzCnNKeS6VnUIwsfMsqcYXZzNXfgX+0p/TL/+aSPH+T8// G1IHhp65Hg7RfmBIVV5D2gZmD8cOuEcy5t+pieUdkdvKI0LgWUpS3fUkUCYF8e3H4x7x TxzkAjQmGNVkRMevYRfzwAZy/5XVbBV90a+WuaBtpqvfaZu4cV6fwQNG2MSdnHWYUwuE GK/VOrACr3c0plREiAgMbShVbJTH5flYOoibOeMChedaa6hXv3AsyXPbmLAA6oKhcUrT Fx7A== X-Gm-Message-State: AOAM533MtOqdL4DGKDTQhWuxP9iqxkd/bmllA0LiIWw/MAofb4dhORBT cVseRiaM/gGxJI2PBf1bOSONBVgtLj7FKQ== X-Google-Smtp-Source: ABdhPJwJG8x5ZMmXDTiFMtKz51TsmD7v0Q7QXDV+Ki7ujCAvnhCA+eYR+atby1ipJ3fx7TgdJeXokQ== X-Received: by 2002:a05:6870:d88c:: with SMTP id dv12mr1284333oab.113.1644523126765; Thu, 10 Feb 2022 11:58:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 11:58:46 -0800 (PST) To: libc-alpha@sourceware.org, Wilco Dijkstra , "H . J . Lu" , Noah Goldstein Subject: [PATCH 03/12] i386: Remove bcopy optimizations Date: Thu, 10 Feb 2022 16:58:29 -0300 Message-Id: <20220210195838.1036012-4-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=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 symbols is not present in current POSIX specification and compiler already generates memmove call. --- sysdeps/i386/bcopy.S | 4 --- sysdeps/i386/i686/bcopy.S | 3 -- sysdeps/i386/i686/multiarch/Makefile | 6 ++-- sysdeps/i386/i686/multiarch/bcopy-ia32.S | 20 ------------- .../i686/multiarch/bcopy-sse2-unaligned.S | 4 --- sysdeps/i386/i686/multiarch/bcopy-ssse3-rep.S | 4 --- sysdeps/i386/i686/multiarch/bcopy-ssse3.S | 4 --- sysdeps/i386/i686/multiarch/bcopy.c | 30 ------------------- sysdeps/i386/i686/multiarch/ifunc-impl-list.c | 10 ------- 9 files changed, 3 insertions(+), 82 deletions(-) delete mode 100644 sysdeps/i386/bcopy.S delete mode 100644 sysdeps/i386/i686/bcopy.S delete mode 100644 sysdeps/i386/i686/multiarch/bcopy-ia32.S delete mode 100644 sysdeps/i386/i686/multiarch/bcopy-sse2-unaligned.S delete mode 100644 sysdeps/i386/i686/multiarch/bcopy-ssse3-rep.S delete mode 100644 sysdeps/i386/i686/multiarch/bcopy-ssse3.S delete mode 100644 sysdeps/i386/i686/multiarch/bcopy.c diff --git a/sysdeps/i386/bcopy.S b/sysdeps/i386/bcopy.S deleted file mode 100644 index 12b8ddb886..0000000000 --- a/sysdeps/i386/bcopy.S +++ /dev/null @@ -1,4 +0,0 @@ -#define USE_AS_MEMMOVE -#define USE_AS_BCOPY -#define MEMCPY bcopy -#include "memcpy.S" diff --git a/sysdeps/i386/i686/bcopy.S b/sysdeps/i386/i686/bcopy.S deleted file mode 100644 index 15ef9419a4..0000000000 --- a/sysdeps/i386/i686/bcopy.S +++ /dev/null @@ -1,3 +0,0 @@ -#define USE_AS_BCOPY -#define memmove bcopy -#include diff --git a/sysdeps/i386/i686/multiarch/Makefile b/sysdeps/i386/i686/multiarch/Makefile index c4897922d7..02fa02658e 100644 --- a/sysdeps/i386/i686/multiarch/Makefile +++ b/sysdeps/i386/i686/multiarch/Makefile @@ -2,7 +2,7 @@ ifeq ($(subdir),string) gen-as-const-headers += locale-defines.sym sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \ memmove-ssse3 memcpy-ssse3-rep mempcpy-ssse3-rep \ - memmove-ssse3-rep bcopy-ssse3 bcopy-ssse3-rep \ + memmove-ssse3-rep \ memset-sse2-rep bzero-sse2-rep strcmp-ssse3 \ strcmp-sse4 strncmp-c strncmp-ssse3 strncmp-sse4 \ memcmp-ssse3 memcmp-sse4 varshift \ @@ -18,10 +18,10 @@ sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \ strcasecmp_l-c strcasecmp-c strcasecmp_l-ssse3 \ strncase_l-c strncase-c strncase_l-ssse3 \ strcasecmp_l-sse4 strncase_l-sse4 \ - bcopy-sse2-unaligned memcpy-sse2-unaligned \ + memcpy-sse2-unaligned \ mempcpy-sse2-unaligned memmove-sse2-unaligned \ strcspn-c strpbrk-c strspn-c \ - bcopy-ia32 bzero-ia32 rawmemchr-ia32 \ + bzero-ia32 rawmemchr-ia32 \ memchr-ia32 memcmp-ia32 memcpy-ia32 memmove-ia32 \ mempcpy-ia32 memset-ia32 strcat-ia32 strchr-ia32 \ strrchr-ia32 strcpy-ia32 strcmp-ia32 strcspn-ia32 \ diff --git a/sysdeps/i386/i686/multiarch/bcopy-ia32.S b/sysdeps/i386/i686/multiarch/bcopy-ia32.S deleted file mode 100644 index e0fadc0f3f..0000000000 --- a/sysdeps/i386/i686/multiarch/bcopy-ia32.S +++ /dev/null @@ -1,20 +0,0 @@ -/* bcopy optimized for i686. - Copyright (C) 2017-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 bcopy __bcopy_ia32 -#include diff --git a/sysdeps/i386/i686/multiarch/bcopy-sse2-unaligned.S b/sysdeps/i386/i686/multiarch/bcopy-sse2-unaligned.S deleted file mode 100644 index efef2a10dd..0000000000 --- a/sysdeps/i386/i686/multiarch/bcopy-sse2-unaligned.S +++ /dev/null @@ -1,4 +0,0 @@ -#define USE_AS_MEMMOVE -#define USE_AS_BCOPY -#define MEMCPY __bcopy_sse2_unaligned -#include "memcpy-sse2-unaligned.S" diff --git a/sysdeps/i386/i686/multiarch/bcopy-ssse3-rep.S b/sysdeps/i386/i686/multiarch/bcopy-ssse3-rep.S deleted file mode 100644 index cbc8b420e8..0000000000 --- a/sysdeps/i386/i686/multiarch/bcopy-ssse3-rep.S +++ /dev/null @@ -1,4 +0,0 @@ -#define USE_AS_MEMMOVE -#define USE_AS_BCOPY -#define MEMCPY __bcopy_ssse3_rep -#include "memcpy-ssse3-rep.S" diff --git a/sysdeps/i386/i686/multiarch/bcopy-ssse3.S b/sysdeps/i386/i686/multiarch/bcopy-ssse3.S deleted file mode 100644 index 36aac44b9c..0000000000 --- a/sysdeps/i386/i686/multiarch/bcopy-ssse3.S +++ /dev/null @@ -1,4 +0,0 @@ -#define USE_AS_MEMMOVE -#define USE_AS_BCOPY -#define MEMCPY __bcopy_ssse3 -#include "memcpy-ssse3.S" diff --git a/sysdeps/i386/i686/multiarch/bcopy.c b/sysdeps/i386/i686/multiarch/bcopy.c deleted file mode 100644 index bc2c2ac55d..0000000000 --- a/sysdeps/i386/i686/multiarch/bcopy.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Multiple versions of bcopy. - All versions must be listed in ifunc-impl-list.c. - Copyright (C) 2017-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 the definition in libc. */ -#if IS_IN (libc) -# define bcopy __redirect_bcopy -# include -# undef bcopy - -# define SYMBOL_NAME bcopy -# include "ifunc-memmove.h" - -libc_ifunc_redirected (__redirect_bcopy, bcopy, IFUNC_SELECTOR ()); -#endif diff --git a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c index 6883b3d226..5c7a42dc97 100644 --- a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c +++ b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c @@ -36,16 +36,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, size_t i = 0; - /* Support sysdeps/i386/i686/multiarch/bcopy.S. */ - IFUNC_IMPL (i, name, bcopy, - IFUNC_IMPL_ADD (array, i, bcopy, CPU_FEATURE_USABLE (SSSE3), - __bcopy_ssse3_rep) - IFUNC_IMPL_ADD (array, i, bcopy, CPU_FEATURE_USABLE (SSSE3), - __bcopy_ssse3) - IFUNC_IMPL_ADD (array, i, bcopy, CPU_FEATURE_USABLE (SSE2), - __bcopy_sse2_unaligned) - IFUNC_IMPL_ADD (array, i, bcopy, 1, __bcopy_ia32)) - /* Support sysdeps/i386/i686/multiarch/bzero.S. */ IFUNC_IMPL (i, name, bzero, IFUNC_IMPL_ADD (array, i, bzero, CPU_FEATURE_USABLE (SSE2),