From patchwork Fri May 2 12:07:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 886627 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp770295wrq; Fri, 2 May 2025 05:08:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2Pvu0cu92WW8upyEx8qQ6x2RiQE1Zi7vV8owN4SVrlO8nQXw58G+Nwk4I5wzJVwNt5HUwbQ==@linaro.org X-Google-Smtp-Source: AGHT+IFKSsiNX7bA44TKJhRRu+h/8IK5J04tdriurEu4Hl9BxXcBx3O674U3pulWArr8O7xCUy5W X-Received: by 2002:a05:622a:114b:b0:476:b59a:b30 with SMTP id d75a77b69052e-48c3144f6d8mr44071961cf.16.1746187700359; Fri, 02 May 2025 05:08:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1746187700; cv=pass; d=google.com; s=arc-20240605; b=bmWBy3rp0cpqvg8myWqau3oj/bi3AJflAhOX0IM0KlMy+hSeOO4Jg+t5uTCYJ2a3by 6Ptp/sYwVN2HsQG62wJwJTd0SGD182AVg1rDQjS1KQxVO0Jf4TtMq146yLPxIfxxIXM9 vBrWP/B9fPCQiKF3yvqYWNC+jJMln/8sobsvcc4rNuwNdY73uC2oKdew9KLNuj9OciHx hLWjZ7685JOslVT5kIk60ZWPmTxaoR/0hkp8tlixHiezCk0TgocWwHLFjYrX5T4EXdO2 vLa5NFLR0t29OH6f++ZJUBtuZSGItPdWUGDaT45oUG2wjW/Y5cmUK6moImo9wskMhdnE yZtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter:arc-filter:dmarc-filter:delivered-to:dkim-filter; bh=TtDdlOwZdoZu98lIzFwYQPXrb1avfn7/Ry9H7msa8gE=; fh=tr+uvgAH7BdpLnXVDxb4usrS9XRYEgOsQ/Iav9VstAw=; b=AxPXtxbo7htYtEgM6aFAJDNJJA/aaop4Jqwbt48HW5Rd1vbaVZuaEtjiIeom6ntiiJ WaPQvUYqjEY4gjS+PKNBiHciGaMzEpm8J2oaBzDI9MWgGN9g13XW3zwlS32OVtCQTAse BhnfPWNeH/sYmNKjmIemMyTVIW/a7dydfaWYP+2y4B3Q5vLffChBroyBYwf7cSP6Rsq5 1wZRMJgOatMrNNsf+TCClxJtl7C7hD/D5OXT1VxJu3CIVXN+nfhBtohO5DUfA27wvppO uX+f+zpR+M48TALwx09HDvRpwLQPtD3SuWVIrTpo547GJ40/VKOqo/beAcvqb1iCDi8t v+VA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DSHuSR8N; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d75a77b69052e-48b98246c96si27427231cf.269.2025.05.02.05.08.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 May 2025 05:08:20 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DSHuSR8N; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D6BC83858C66 for ; Fri, 2 May 2025 12:08:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6BC83858C66 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=DSHuSR8N X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 68CBC3858D20 for ; Fri, 2 May 2025 12:07:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 68CBC3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 68CBC3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1033 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1746187679; cv=none; b=hDuJLamKFWAiUmtY1WBvume2tZLPkici5GV0cp1D413hjWNnuCElKOOImABa3bmyLIrQ523bSc0B4TVHfUoufZUmv6YdxjsFhqLR0R0UCFOchRk3WWWou1C0rFtDkOuKkey3cY2AYggUq/FEc2E7WlIiFQ1H072Iu70VlgcW5PA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1746187679; c=relaxed/simple; bh=LM95G1RxDAwxzNQ2ITyWWs+kCU5Bh/g7cW0zY8GlD0U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KWpTmIajsNr0VU4PJonRmK3R7fc2pDENxGUIIxMiFTZKip1Mcdh9IyIUSvXGame5hgNKie27+O9gG3B5j9pqAizxX6TjwfCrJruS2q4NlNHlPrjgvmH+HL119dSak1vhj30mEr8FyZ9GHbHpMUpClMFSZIVqAvSH3KZ+BCJWAFY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68CBC3858D20 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-301cda78d48so2617945a91.0 for ; Fri, 02 May 2025 05:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746187678; x=1746792478; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TtDdlOwZdoZu98lIzFwYQPXrb1avfn7/Ry9H7msa8gE=; b=DSHuSR8NGtA1gUW0ci8RYTtld6oYpJLu1J07ZvkMwmMA9WzSfMQXD+TcntEQh6YpYq PwTELNCXfSS24FGQ0T29Y5jEG7bDJhfBSHvD6TXAN3PYAJ/nHY9LLv84obxzx/Aqnes/ N0HNBnbTqb1eQd5SdTE95BxyMoQ2XlOSIxLIQESHm3dESg1JZmM9xwUhd6iyGSO7CUlk ijevvgFVijYatHE+NSHDbSFipsWm59ImRdrr6WBBxm9cnvH2X/c4Q5ELgOyiLX1FnqIG 5MgH8X4PE5OD7YgUz19Er9Aehh9WlNbWKxNnIn4xAGR+GY22fekmxaiiUdktpR+Qp2Tn scrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746187678; x=1746792478; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TtDdlOwZdoZu98lIzFwYQPXrb1avfn7/Ry9H7msa8gE=; b=MRP9hTY9V+SqAX+4Y8+TBhMMdkvCXNopr5MI/Nr/MeYGwThTa3xQiHJO/Q6hD3c5cU oXWbYKHleie+gnrKXO02BI5k8W+bVVHjPm+2F50mLwYrw6pLYeKGR+4VPM9N86py1dkO aj07XSzaK0iMxa4Ror27pDx7pvNBzMIAMPFcJ3/g4abTbdB31XsHnm8+eRSdjZ2rsIUI aozgWdxUFie9W9rkws7fAP/c2K24CuMzKV9lvQB35GhRapHgnBGF2oq7swXHiDXZkH9x Gq/cZtMF1XNn/dG3gv+VsJ9pIbyBm3ie6pJznN9OKaW6DigXKqdLTVzXrT+CiHeG9G5F IoKQ== X-Gm-Message-State: AOJu0YxK+zzGfWBfvVRrV2+682AQNy8xgjHOcCk5IrwDzpWL9Uf3OHy7 8DAA+cNwFZWbcTSgO/BgqQnQqiVJI3FbUsGadKpD1/Ha7enPVZrx7wSz+iudIM3N1LqO0MnvL+M W X-Gm-Gg: ASbGncsVAFGmNpmQCxzoGmH+cfAXj0C99pHXS73XAzyNMhGu/3PwC8rCfVJGhObiUjK 9PJ2qdnErUtLTianB5zwRE22AAsqvammlwXPR8KArEH6wh82aXrUCZNbIaIP7VtHhrlYDuacYL6 zWUllDRaKiNr8BST3Hi/NhS5HGKoZI47/b3pkeN0wbCb90T2HpU3alpyivGpjoBsW/zk5bT4K+z Rcx3VnfaDwWTgFOhH6EDcTgd97+E8wwh14RSqoZO0PkMqwqfBizCz5LwimXoToSV7PxWs71hoxO 48Lve7ly16IJV0x4Anxf0X7g2VFfH7VmpEDNy3R0nPzPwOz7rlShs9/1DvpT3Tk0 X-Received: by 2002:a17:90b:1cd0:b0:2ff:5c4e:5acd with SMTP id 98e67ed59e1d1-30a4e6bf26bmr4183381a91.35.1746187677962; Fri, 02 May 2025 05:07:57 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:2a60:ca05:9353:ab0b:2163]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-30a3480f0fcsm5508509a91.32.2025.05.02.05.07.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 May 2025 05:07:57 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Peter Bergner , Sachin Monga Subject: [PATCH] powerpc: Remove POWER7 strncasecmp optimization Date: Fri, 2 May 2025 09:07:36 -0300 Message-ID: <20250502120753.1101229-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org These routines are not extensively used (gnulib documentation even recommend use a replacement [1]), and there is already a POWER8 version that uses proper vectorized instructions. [1] https://www.gnu.org/software/gnulib/manual/gnulib.html#C-strings Checked with a build for some powerpc variations. Reviewed-by: Peter Bergner --- .../powerpc32/power4/multiarch/Makefile | 7 +--- .../power4/multiarch/ifunc-impl-list.c | 15 ------- .../power4/multiarch/strncase-power7.c | 26 ------------ .../powerpc32/power4/multiarch/strncase.c | 41 ------------------ .../power4/multiarch/strncase_l-power7.c | 26 ------------ .../powerpc32/power4/multiarch/strncase_l.c | 42 ------------------- sysdeps/powerpc/powerpc64/multiarch/Makefile | 3 -- .../powerpc64/multiarch/ifunc-impl-list.c | 11 ----- .../powerpc64/multiarch/strncase-power7.c | 24 ----------- .../powerpc/powerpc64/multiarch/strncase.c | 7 +--- .../powerpc64/multiarch/strncase_l-power7.c | 30 ------------- .../powerpc/powerpc64/multiarch/strncase_l.c | 42 ------------------- 12 files changed, 4 insertions(+), 270 deletions(-) delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/strncase-power7.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l-power7.c delete mode 100644 sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/strncase-power7.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c delete mode 100644 sysdeps/powerpc/powerpc64/multiarch/strncase_l.c diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile index 0a4e828435..3a49b855ca 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/Makefile @@ -6,12 +6,9 @@ sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \ memchr-ppc32 memrchr-power7 memrchr-ppc32 rawmemchr-power7 \ rawmemchr-ppc32 strlen-power7 strlen-ppc32 strnlen-power7 \ strnlen-ppc32 \ - strcasecmp-power7 strcasecmp_l-power7 strncase-power7 \ - strncase_l-power7 strchrnul-power7 strchrnul-ppc32 \ + strcasecmp-power7 strcasecmp_l-power7 \ + strchrnul-power7 strchrnul-ppc32 \ strchr-power7 strchr-ppc32 \ wordcopy-power7 wordcopy-ppc32 \ memmove-power7 memmove-ppc - -CFLAGS-strncase-power7.c += -mcpu=power7 -funroll-loops -CFLAGS-strncase_l-power7.c += -mcpu=power7 -funroll-loops endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c index 68a3f9d657..7537f3a5c2 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c @@ -138,21 +138,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, strcasecmp_l, 1, __strcasecmp_l_ppc)) - /* Support sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c. */ - IFUNC_IMPL (i, name, strncasecmp, - IFUNC_IMPL_ADD (array, i, strncasecmp, - hwcap & PPC_FEATURE_HAS_VSX, - __strncasecmp_power7) - IFUNC_IMPL_ADD (array, i, strncasecmp, 1, __strncasecmp_ppc)) - - /* Support sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c. */ - IFUNC_IMPL (i, name, strncasecmp_l, - IFUNC_IMPL_ADD (array, i, strncasecmp_l, - hwcap & PPC_FEATURE_HAS_VSX, - __strncasecmp_l_power7) - IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1, - __strncasecmp_l_ppc)) - /* Support sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c. */ IFUNC_IMPL (i, name, strchrnul, IFUNC_IMPL_ADD (array, i, strchrnul, diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase-power7.c deleted file mode 100644 index 5b45ed579d..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase-power7.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Optimized strcasecmp_l implementation for POWER7. - Copyright (C) 2013-2025 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 __strncasecmp __strncasecmp_power7 - -extern __typeof (strncasecmp) __strncasecmp_power7 attribute_hidden; - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c deleted file mode 100644 index 3cd64337a4..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Multiple versions of strncasecmp. - Copyright (C) 2013-2025 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 -# define strncasecmp __strncasecmp_ppc -extern __typeof (__strncasecmp) __strncasecmp_ppc attribute_hidden; -extern __typeof (__strncasecmp) __strncasecmp_power7 attribute_hidden; -#endif - -#include -#undef strncasecmp - -#if IS_IN (libc) -# include -# include "init-arch.h" - -/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle - ifunc symbol properly. */ -extern __typeof (__strncasecmp) __libc_strncasecmp; -libc_ifunc (__libc_strncasecmp, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __strncasecmp_power7 - : __strncasecmp_ppc); -weak_alias (__libc_strncasecmp, strncasecmp) -#endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l-power7.c deleted file mode 100644 index d42568009d..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l-power7.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Optimized strcasecmp_l implementation for POWER7. - Copyright (C) 2013-2025 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 __strncasecmp_l __strncasecmp_l_power7 -#define USE_IN_EXTENDED_LOCALE_MODEL 1 - -extern __typeof (strncasecmp_l) __strncasecmp_l_power7 attribute_hidden; - -#include diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c deleted file mode 100644 index 388d482a3f..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Multiple versions of strncasecmp_l. - Copyright (C) 2013-2025 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 -# define strncasecmp_l __strncasecmp_l_ppc -extern __typeof (__strncasecmp_l) __strncasecmp_l_ppc attribute_hidden; -extern __typeof (__strncasecmp_l) __strncasecmp_l_power7 attribute_hidden; -#endif - -#include -#undef strncasecmp_l - -#if IS_IN (libc) -# include -# include "init-arch.h" - -/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle - ifunc symbol properly. */ -extern __typeof (__strncasecmp_l) __libc_strncasecmp_l; -libc_ifunc (__libc_strncasecmp_l, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __strncasecmp_l_power7 - : __strncasecmp_l_ppc); - -weak_alias (__libc_strncasecmp_l, strncasecmp_l) -#endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/Makefile b/sysdeps/powerpc/powerpc64/multiarch/Makefile index dc7c5b14ee..624439d8c3 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc64/multiarch/Makefile @@ -11,7 +11,6 @@ sysdep_routines += memcpy-power8-cached memcpy-power7 memcpy-a2 memcpy-power6 \ strlen-power7 strlen-ppc64 \ strnlen-power8 strnlen-power7 strnlen-ppc64 \ strcasecmp-power7 strcasecmp_l-power7 \ - strncase-power7 strncase_l-power7 \ strncmp-power8 strncmp-ppc64 \ strchr-power8 strchr-power7 strchr-ppc64 \ strchrnul-power8 strchrnul-power7 strchrnul-ppc64 \ @@ -38,8 +37,6 @@ sysdep_routines += memchr-power10 memcmp-power10 memcpy-power10 \ stpcpy-power9 strlen-power9 strncpy-power9 stpncpy-power9 \ strlen-power10 endif -CFLAGS-strncase-power7.c += -mcpu=power7 -funroll-loops -CFLAGS-strncase_l-power7.c += -mcpu=power7 -funroll-loops endif # Called during static initialization diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c index 0a31a5853c..f3acd38b22 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c @@ -311,19 +311,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, hwcap2 & PPC_FEATURE2_ARCH_2_07 && hwcap & PPC_FEATURE_HAS_ALTIVEC, __strncasecmp_power8) - IFUNC_IMPL_ADD (array, i, strncasecmp, - hwcap & PPC_FEATURE_ARCH_2_06, - __strncasecmp_power7) IFUNC_IMPL_ADD (array, i, strncasecmp, 1, __strncasecmp_ppc)) - /* Support sysdeps/powerpc/powerpc64/multiarch/strncase_l.c. */ - IFUNC_IMPL (i, name, strncasecmp_l, - IFUNC_IMPL_ADD (array, i, strncasecmp_l, - hwcap & PPC_FEATURE_ARCH_2_06, - __strncasecmp_l_power7) - IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1, - __strncasecmp_l_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/strncase-power7.c b/sysdeps/powerpc/powerpc64/multiarch/strncase-power7.c deleted file mode 100644 index a5b06858a9..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/strncase-power7.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2013-2025 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 __strncasecmp __strncasecmp_power7 - -extern __typeof (strncasecmp) __strncasecmp_power7 attribute_hidden; - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncase.c b/sysdeps/powerpc/powerpc64/multiarch/strncase.c index a83c11a6b0..807b0af4e5 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strncase.c +++ b/sysdeps/powerpc/powerpc64/multiarch/strncase.c @@ -23,15 +23,12 @@ extern __typeof (__strncasecmp) __libc_strncasecmp; extern __typeof (__strncasecmp) __strncasecmp_ppc attribute_hidden; -extern __typeof (__strncasecmp) __strncasecmp_power7 attribute_hidden; extern __typeof (__strncasecmp) __strncasecmp_power8 attribute_hidden; libc_ifunc (__libc_strncasecmp, (hwcap2 & PPC_FEATURE2_ARCH_2_07 && hwcap & PPC_FEATURE_HAS_ALTIVEC) - ? __strncasecmp_power8: - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __strncasecmp_power7 - : __strncasecmp_ppc); + ? __strncasecmp_power8 + : __strncasecmp_ppc); weak_alias (__libc_strncasecmp, strncasecmp) diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c b/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c deleted file mode 100644 index e9c9022bde..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 2013-2025 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 __strncasecmp_l __strncasecmp_l_power7 - -#undef weak_alias -#define weak_alias(a,b) - -#undef libc_hidden_def -#define libc_hidden_def(name) - -extern __typeof (strncasecmp_l) __strncasecmp_l_power7 attribute_hidden; - -#include diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c b/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c deleted file mode 100644 index 1f28448c31..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/strncase_l.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Multiple versions of strncasecmp_l - Copyright (C) 2013-2025 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 -# define strncasecmp_l __strncasecmp_l_ppc -extern __typeof (__strncasecmp_l) __strncasecmp_l_ppc attribute_hidden; -extern __typeof (__strncasecmp_l) __strncasecmp_l_power7 attribute_hidden; -#endif - -#include -#undef strncasecmp_l - -#if IS_IN (libc) -# include -# include "init-arch.h" - -/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle - ifunc symbol properly. */ -extern __typeof (__strncasecmp_l) __libc_strncasecmp_l; -libc_ifunc (__libc_strncasecmp_l, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __strncasecmp_l_power7 - : __strncasecmp_l_ppc); - -weak_alias (__libc_strncasecmp_l, strncasecmp_l) -#endif