diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-02-10 14:18:28 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-02-23 14:18:18 -0300 |
commit | 4e81019f301fa353f3d25ae5daf9141ad1462f60 (patch) | |
tree | fbcd5d9c509d3f8a589fc0edcd29c7060fcb6b57 /sysdeps/powerpc/powerpc64 | |
parent | 68122d8a0476a40cdeff7339d7611bc1759e518d (diff) | |
download | glibc-4e81019f301fa353f3d25ae5daf9141ad1462f60.tar.gz glibc-4e81019f301fa353f3d25ae5daf9141ad1462f60.tar.xz glibc-4e81019f301fa353f3d25ae5daf9141ad1462f60.zip |
powerpc: Remove powerpc64 bzero optimizations
The symbol is not present in current POSIX specification and compiler already generates memset call.
Diffstat (limited to 'sysdeps/powerpc/powerpc64')
-rw-r--r-- | sysdeps/powerpc/powerpc64/bzero.S | 20 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/le/power10/memset.S | 12 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/memset.S | 13 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/bzero.c | 54 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c | 21 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/memset-power10.S | 3 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/memset-power4.S | 3 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/memset-power6.S | 3 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/memset-power7.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/memset-power8.S | 3 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S | 16 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/power4/memset.S | 12 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/power6/memset.S | 12 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/power7/memset.S | 12 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/power8/memset.S | 12 |
15 files changed, 1 insertions, 197 deletions
diff --git a/sysdeps/powerpc/powerpc64/bzero.S b/sysdeps/powerpc/powerpc64/bzero.S deleted file mode 100644 index a7ca73cc39..0000000000 --- a/sysdeps/powerpc/powerpc64/bzero.S +++ /dev/null @@ -1,20 +0,0 @@ -/* Optimized bzero `implementation' for PowerPC64. - 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/>. */ - -/* This code was moved into memset.S to solve a double stub call problem. - @local would have worked but it is not supported in PowerPC64 asm. */ diff --git a/sysdeps/powerpc/powerpc64/le/power10/memset.S b/sysdeps/powerpc/powerpc64/le/power10/memset.S index bee6d8b31b..0f43b002bf 100644 --- a/sysdeps/powerpc/powerpc64/le/power10/memset.S +++ b/sysdeps/powerpc/powerpc64/le/power10/memset.S @@ -242,15 +242,3 @@ L(bcdz_tail): END_GEN_TB (MEMSET,TB_TOCLESS) libc_hidden_builtin_def (memset) - -/* Copied from bzero.S to prevent the linker from inserting a stub - between bzero and memset. */ -ENTRY_TOCLESS (__bzero) - CALL_MCOUNT 2 - mr r5,r4 - li r4,0 - b L(_memset) -END (__bzero) -#ifndef __bzero -weak_alias (__bzero, bzero) -#endif diff --git a/sysdeps/powerpc/powerpc64/memset.S b/sysdeps/powerpc/powerpc64/memset.S index 34ee8ffca4..b813cd3c6b 100644 --- a/sysdeps/powerpc/powerpc64/memset.S +++ b/sysdeps/powerpc/powerpc64/memset.S @@ -253,16 +253,3 @@ L(medium_28t): blr END_GEN_TB (MEMSET,TB_TOCLESS) libc_hidden_builtin_def (memset) - -#ifndef NO_BZERO_IMPL -/* Copied from bzero.S to prevent the linker from inserting a stub - between bzero and memset. */ -ENTRY (__bzero) - CALL_MCOUNT 3 - mr r5,r4 - li r4,0 - b L(_memset) -END_GEN_TB (__bzero,TB_TOCLESS) - -weak_alias (__bzero, bzero) -#endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/bzero.c b/sysdeps/powerpc/powerpc64/multiarch/bzero.c deleted file mode 100644 index f83d6da55b..0000000000 --- a/sysdeps/powerpc/powerpc64/multiarch/bzero.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Multiple versions of bzero. PowerPC64 version. - 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_power4 attribute_hidden; -extern __typeof (bzero) __bzero_power6 attribute_hidden; -extern __typeof (bzero) __bzero_power7 attribute_hidden; -extern __typeof (bzero) __bzero_power8 attribute_hidden; -# ifdef __LITTLE_ENDIAN__ -extern __typeof (bzero) __bzero_power10 attribute_hidden; -# endif - -libc_ifunc (__bzero, -# ifdef __LITTLE_ENDIAN__ - (hwcap2 & PPC_FEATURE2_ARCH_3_1 - && hwcap2 & PPC_FEATURE2_HAS_ISEL - && hwcap & PPC_FEATURE_HAS_VSX) - ? __bzero_power10 : -# endif - (hwcap2 & PPC_FEATURE2_ARCH_2_07 - && hwcap & PPC_FEATURE_HAS_ALTIVEC) - ? __bzero_power8 : - (hwcap & PPC_FEATURE_HAS_VSX) - ? __bzero_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05 - && hwcap & PPC_FEATURE_HAS_ALTIVEC) - ? __bzero_power6 : - (hwcap & PPC_FEATURE_POWER4) - ? __bzero_power4 - : __bzero_ppc); - -weak_alias (__bzero, bzero) -#endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c index 280b8616b2..ac533a9886 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c @@ -223,27 +223,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __memcmp_power4) IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_ppc)) - /* Support sysdeps/powerpc/powerpc64/multiarch/bzero.c. */ - IFUNC_IMPL (i, name, bzero, -#ifdef __LITTLE_ENDIAN__ - IFUNC_IMPL_ADD (array, i, bzero, - hwcap2 & PPC_FEATURE2_ARCH_3_1 - && hwcap2 & PPC_FEATURE2_HAS_ISEL - && hwcap & PPC_FEATURE_HAS_VSX, - __bzero_power10) -#endif - IFUNC_IMPL_ADD (array, i, bzero, hwcap2 & PPC_FEATURE2_ARCH_2_07 - && hwcap & PPC_FEATURE_HAS_ALTIVEC, - __bzero_power8) - 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 - && hwcap & PPC_FEATURE_HAS_ALTIVEC, - __bzero_power6) - IFUNC_IMPL_ADD (array, i, bzero, hwcap & PPC_FEATURE_POWER4, - __bzero_power4) - IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ppc)) - /* Support sysdeps/powerpc/powerpc64/multiarch/mempcpy.c. */ IFUNC_IMPL (i, name, mempcpy, IFUNC_IMPL_ADD (array, i, mempcpy, diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset-power10.S b/sysdeps/powerpc/powerpc64/multiarch/memset-power10.S index ead0b67926..ba5bee1c7a 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/memset-power10.S +++ b/sysdeps/powerpc/powerpc64/multiarch/memset-power10.S @@ -21,7 +21,4 @@ #undef libc_hidden_builtin_def #define libc_hidden_builtin_def(name) -#undef __bzero -#define __bzero __bzero_power10 - #include <sysdeps/powerpc/powerpc64/le/power10/memset.S> diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset-power4.S b/sysdeps/powerpc/powerpc64/multiarch/memset-power4.S index 6f5631d03d..4ee567c6f9 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/memset-power4.S +++ b/sysdeps/powerpc/powerpc64/multiarch/memset-power4.S @@ -21,7 +21,4 @@ #undef libc_hidden_builtin_def #define libc_hidden_builtin_def(name) -#undef __bzero -#define __bzero __bzero_power4 - #include <sysdeps/powerpc/powerpc64/power4/memset.S> diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset-power6.S b/sysdeps/powerpc/powerpc64/multiarch/memset-power6.S index b81f4f0d64..9f5e7d1b37 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/memset-power6.S +++ b/sysdeps/powerpc/powerpc64/multiarch/memset-power6.S @@ -21,7 +21,4 @@ #undef libc_hidden_builtin_def #define libc_hidden_builtin_def(name) -#undef __bzero -#define __bzero __bzero_power6 - #include <sysdeps/powerpc/powerpc64/power6/memset.S> diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset-power7.S b/sysdeps/powerpc/powerpc64/multiarch/memset-power7.S index a8ca12db83..6fd92d5afc 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/memset-power7.S +++ b/sysdeps/powerpc/powerpc64/multiarch/memset-power7.S @@ -21,6 +21,4 @@ #undef libc_hidden_builtin_def #define libc_hidden_builtin_def(name) -#undef __bzero -#define __bzero __bzero_power7 #include <sysdeps/powerpc/powerpc64/power7/memset.S> diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset-power8.S b/sysdeps/powerpc/powerpc64/multiarch/memset-power8.S index b06587aa2d..43cc5c7339 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/memset-power8.S +++ b/sysdeps/powerpc/powerpc64/multiarch/memset-power8.S @@ -21,7 +21,4 @@ #undef libc_hidden_builtin_def #define libc_hidden_builtin_def(name) -#undef __bzero -#define __bzero __bzero_power8 - #include <sysdeps/powerpc/powerpc64/power8/memset.S> diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S index 876954d36b..30b25ef15f 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S +++ b/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S @@ -1,4 +1,4 @@ -/* Default memset/bzero implementation for PowerPC64. +/* Default memset implementation for PowerPC64. Copyright (C) 2013-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -18,17 +18,6 @@ #include <sysdep.h> -/* Copied from bzero.S to prevent the linker from inserting a stub - between bzero and memset. NOTE: this code should be positioned - before ENTRY/END_GEN_TB redefinition. */ -ENTRY (__bzero_ppc) - CALL_MCOUNT 3 - mr r5,r4 - li r4,0 - b L(_memset) -END_GEN_TB (__bzero_ppc,TB_TOCLESS) - - #if defined SHARED && IS_IN (libc) # define MEMSET __memset_ppc @@ -36,7 +25,4 @@ END_GEN_TB (__bzero_ppc,TB_TOCLESS) # define libc_hidden_builtin_def(name) #endif -/* Do not implement __bzero at powerpc64/memset.S. */ -#define NO_BZERO_IMPL - #include <sysdeps/powerpc/powerpc64/memset.S> diff --git a/sysdeps/powerpc/powerpc64/power4/memset.S b/sysdeps/powerpc/powerpc64/power4/memset.S index dfc136261b..0f14a5198a 100644 --- a/sysdeps/powerpc/powerpc64/power4/memset.S +++ b/sysdeps/powerpc/powerpc64/power4/memset.S @@ -237,15 +237,3 @@ L(medium_28t): blr END_GEN_TB (MEMSET,TB_TOCLESS) libc_hidden_builtin_def (memset) - -/* Copied from bzero.S to prevent the linker from inserting a stub - between bzero and memset. */ -ENTRY_TOCLESS (__bzero) - CALL_MCOUNT 3 - mr r5,r4 - li r4,0 - b L(_memset) -END (__bzero) -#ifndef __bzero -weak_alias (__bzero, bzero) -#endif diff --git a/sysdeps/powerpc/powerpc64/power6/memset.S b/sysdeps/powerpc/powerpc64/power6/memset.S index 7ad82c38e6..140a756348 100644 --- a/sysdeps/powerpc/powerpc64/power6/memset.S +++ b/sysdeps/powerpc/powerpc64/power6/memset.S @@ -381,15 +381,3 @@ L(medium_28t): blr END_GEN_TB (MEMSET,TB_TOCLESS) libc_hidden_builtin_def (memset) - -/* Copied from bzero.S to prevent the linker from inserting a stub - between bzero and memset. */ -ENTRY_TOCLESS (__bzero) - CALL_MCOUNT 3 - mr r5,r4 - li r4,0 - b L(_memset) -END (__bzero) -#ifndef __bzero -weak_alias (__bzero, bzero) -#endif diff --git a/sysdeps/powerpc/powerpc64/power7/memset.S b/sysdeps/powerpc/powerpc64/power7/memset.S index 31aa0f91cf..358199a805 100644 --- a/sysdeps/powerpc/powerpc64/power7/memset.S +++ b/sysdeps/powerpc/powerpc64/power7/memset.S @@ -384,15 +384,3 @@ L(small): END_GEN_TB (MEMSET,TB_TOCLESS) libc_hidden_builtin_def (memset) - -/* Copied from bzero.S to prevent the linker from inserting a stub - between bzero and memset. */ -ENTRY_TOCLESS (__bzero) - CALL_MCOUNT 3 - mr r5,r4 - li r4,0 - b L(_memset) -END (__bzero) -#ifndef __bzero -weak_alias (__bzero, bzero) -#endif diff --git a/sysdeps/powerpc/powerpc64/power8/memset.S b/sysdeps/powerpc/powerpc64/power8/memset.S index 9ecb6f3067..70cace14ef 100644 --- a/sysdeps/powerpc/powerpc64/power8/memset.S +++ b/sysdeps/powerpc/powerpc64/power8/memset.S @@ -504,15 +504,3 @@ L(LE7_tail5): END_GEN_TB (MEMSET,TB_TOCLESS) libc_hidden_builtin_def (memset) - -/* Copied from bzero.S to prevent the linker from inserting a stub - between bzero and memset. */ -ENTRY_TOCLESS (__bzero) - CALL_MCOUNT 3 - mr r5,r4 - li r4,0 - b L(_memset) -END (__bzero) -#ifndef __bzero -weak_alias (__bzero, bzero) -#endif |