From patchwork Tue Jan 3 19:49:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 89727 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp8168846qgi; Tue, 3 Jan 2017 11:49:42 -0800 (PST) X-Received: by 10.84.129.35 with SMTP id 32mr139796851plb.179.1483472982051; Tue, 03 Jan 2017 11:49:42 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id q12si69902095pgc.52.2017.01.03.11.49.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jan 2017 11:49:42 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-76578-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; spf=pass (google.com: domain of libc-alpha-return-76578-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-76578-patch=linaro.org@sourceware.org; dmarc=fail (p=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=wuc31P9B7XQr7jHQaIippbYXbYOGM1DNby/w0wMZT+Kmt9dD8f94m RO6P3GEHUz2RxbYjNGTp92rqbsPDr0O+V++BPHetLKp3iCZN38fJpyK69/KHLs17 FQYg20W7MYHq4KxCChFWdMk5g9PbD8VZOYkqStLxEK8szh46wTYPSE= 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=B7X42lINw+D3HNTyjAoN9rB4MhM=; b=t/hDgkIEE56i9lwkoxMk2XkfWau2 mscqR/ewQsJiHLTH3o8JCuQOuEdpg+5HbxKgQhbPnp1ncGiZAGfuxmnT4JAyAPeX dpvVJIja3JFA6LC3Vj9kWw5Qm8OLxp9QO6z1n7EJiOZ1NpxW5KgRjT6+bhamUrrx DCeq1WKr4kzCXVE= Received: (qmail 101365 invoked by alias); 3 Jan 2017 19:49:33 -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 101350 invoked by uid 89); 3 Jan 2017 19:49:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=2.7.4, Hx-languages-length:4791 X-HELO: mail-yw0-f171.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=mjok6LQ870/pIQSlqjXlCfJQGhQZvSY6hPw/rHONOio=; b=n0QFRCuEZD3qnFzKbLJAlBdgLMX7n/BQNiA1PzS/a2DudHfIcevv6rGHqZST5RKZaO WdKz7Ug7KbugTAdOKEYQYHM/UQc/oKw5GfEyyIjxmiKFJKVkqpdVe0AOYgvKUWigAXOg 5DEmkTq0hZVfVUb+r8BWzuCTt39lVYuWSVpM48U7tBTRkVo+P6uNlBD0ReVw2fChkMM5 kpRqgItYKxCf4Poc09H2ga67/1fpD4aIOiWbVq/ZtGMWDMENwnG8TA21ELoPv7/Gf+wa WCv4Nv/RHQstRfFHknbLioYHFpXSHzPVgtR/BJ5sAlLJV+CYx8xuyeT8lhoXorAuuS8q B/pg== X-Gm-Message-State: AIkVDXIUAtz/FhdCB3FV0IVTKR86U91pYuxble5NJE7ryIt5jlirhe0+IgdtoBCwSsCJRPSt X-Received: by 10.129.96.10 with SMTP id u10mr58831746ywb.309.1483472960572; Tue, 03 Jan 2017 11:49:20 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [COMMITTED] Remove duplicate strcat implementations Date: Tue, 3 Jan 2017 17:49:13 -0200 Message-Id: <1483472953-27031-1-git-send-email-adhemerval.zanella@linaro.org> Since commit 6e46de42fe16 default strcat implementation is essentially the same for specialized ia64 and powerpc ones. This patch removes the redundant implementation and adjust powerpc64 ifunc code to use the default one. Checked on powerpc32-linux-gnu (default and power4) and ia64-linux build and on powerpc64le-linux-gnu. * sysdeps/ia64/strcat.c: Remove file. * sysdeps/powerpc/strcat.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcat-power7.c: Use default C implementation. * sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcat-ppc64.c: Likewise. --- ChangeLog | 9 ++++++ sysdeps/ia64/strcat.c | 26 ----------------- .../powerpc/powerpc64/multiarch/strcat-power7.c | 2 +- .../powerpc/powerpc64/multiarch/strcat-power8.c | 2 +- sysdeps/powerpc/powerpc64/multiarch/strcat-ppc64.c | 2 +- sysdeps/powerpc/strcat.c | 33 ---------------------- 6 files changed, 12 insertions(+), 62 deletions(-) delete mode 100644 sysdeps/ia64/strcat.c delete mode 100644 sysdeps/powerpc/strcat.c -- 2.7.4 diff --git a/sysdeps/ia64/strcat.c b/sysdeps/ia64/strcat.c deleted file mode 100644 index 3bae06b..0000000 --- a/sysdeps/ia64/strcat.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 2004-2017 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 - -char * -strcat (char *dest, const char *src) -{ - strcpy (dest + strlen (dest), src); - return dest; -} -libc_hidden_builtin_def (strcat) diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcat-power7.c b/sysdeps/powerpc/powerpc64/multiarch/strcat-power7.c index ef93a5c..22d2caa 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strcat-power7.c +++ b/sysdeps/powerpc/powerpc64/multiarch/strcat-power7.c @@ -27,4 +27,4 @@ extern typeof (strlen) __strlen_power7; #define strcpy __strcpy_power7 #define strlen __strlen_power7 -#include +#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c b/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c index af4c2f8..d6e69b1 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c +++ b/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c @@ -27,4 +27,4 @@ extern typeof (strlen) __strlen_power7; #define strcpy __strcpy_power8 #define strlen __strlen_power7 -#include +#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcat-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/strcat-ppc64.c index 1bceb64..5049fc0 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strcat-ppc64.c +++ b/sysdeps/powerpc/powerpc64/multiarch/strcat-ppc64.c @@ -26,4 +26,4 @@ extern __typeof (strcat) __strcat_ppc attribute_hidden; -#include +#include diff --git a/sysdeps/powerpc/strcat.c b/sysdeps/powerpc/strcat.c deleted file mode 100644 index 13c64db..0000000 --- a/sysdeps/powerpc/strcat.c +++ /dev/null @@ -1,33 +0,0 @@ -/* strcat version that uses fast strcpy/strlen. - Copyright (C) 1997-2017 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 - -#ifndef STRCAT -# undef strcat -# define STRCAT strcat -#endif - -/* Append SRC on the end of DEST. */ -char * -STRCAT(char *dest, const char *src) -{ - strcpy (dest + strlen (dest), src); - return dest; -} -libc_hidden_builtin_def (STRCAT)