powerpc: Remove powerpc32 bzero optimizations
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 10 Feb 2022 16:58:34 +0000 (13:58 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 23 Feb 2022 17:18:18 +0000 (14:18 -0300)
The symbol is not present in current POSIX specification and compiler
already generates memset call.

sysdeps/powerpc/powerpc32/bzero.S [deleted file]
sysdeps/powerpc/powerpc32/power4/multiarch/Makefile
sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power6.S [deleted file]
sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power7.S [deleted file]
sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S [deleted file]
sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c [deleted file]
sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c

diff --git a/sysdeps/powerpc/powerpc32/bzero.S b/sysdeps/powerpc/powerpc32/bzero.S
deleted file mode 100644 (file)
index 9cc03c9..0000000
+++ /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
-   <https://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-
-ENTRY (__bzero)
-
-       mr      r5,r4
-       li      r4,0
-       b       memset@local
-END (__bzero)
-weak_alias (__bzero, bzero)
index 5c68f07..b2f9dee 100644 (file)
@@ -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 (file)
index b352433..0000000
+++ /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
-   <https://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-
-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 (file)
index 80c8ffe..0000000
+++ /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
-   <https://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-
-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 (file)
index 86711e8..0000000
+++ /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
-   <https://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-
-/* 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 (file)
index 5d92702..0000000
+++ /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
-   <https://www.gnu.org/licenses/>.  */
-
-/* Define multiple versions only for definition in libc.  */
-#if IS_IN (libc)
-# include <string.h>
-# include <strings.h>
-# 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
index 9832f36..0189036 100644 (file)
@@ -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,