about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/multiarch
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-02-28 08:33:40 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-04-04 16:01:14 +0700
commitf82ed45d7f77838bc8cff4c0a4ff33e76bb18a35 (patch)
tree47409cd76ee762de292ddc4cbadbd164a168742e /sysdeps/powerpc/powerpc64/multiarch
parent662c2cc4e9f00ffc789b636db18617538b4d9051 (diff)
downloadglibc-f82ed45d7f77838bc8cff4c0a4ff33e76bb18a35.tar.gz
glibc-f82ed45d7f77838bc8cff4c0a4ff33e76bb18a35.tar.xz
glibc-f82ed45d7f77838bc8cff4c0a4ff33e76bb18a35.zip
powerpc: Use generic wcsrchr optimization
This patch removes the power6 wcsrchr optimization and uses generic
implementation instead.  Currently, both power6 and power7 IFUNC variant
resulting binary are essentially the same and the generic implementation
with unrolling loop set to 8 also results in similar performance.

Checked on powerpc64-linux-gnu.

	* sysdeps/powerpc/Makefile [$(subdir) == wcsmbs] (CFLAGS-wcsrchr.c):
	New rule.
	* 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/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/powerpc64/multiarch/ifunc-impl-list.c: Likewise.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch')
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/Makefile7
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c11
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power6.c19
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/wcsrchr-power7.c19
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/wcsrchr-ppc64.c18
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c36
6 files changed, 0 insertions, 110 deletions
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 <http://www.gnu.org/licenses/>.  */
-
-#include <sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c>
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 <http://www.gnu.org/licenses/>.  */
-
-#include <sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c>
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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c>
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
-   <http://www.gnu.org/licenses/>.  */
-
-#if IS_IN (libc)
-# include <wchar.h>
-# include <shlib-compat.h>
-# 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 <wcsmbs/wcsrchr.c>
-#endif