+++ /dev/null
-/* 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. */
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
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
+++ /dev/null
-/* 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
__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,
#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>
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
-#undef __bzero
-#define __bzero __bzero_power4
-
#include <sysdeps/powerpc/powerpc64/power4/memset.S>
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
-#undef __bzero
-#define __bzero __bzero_power6
-
#include <sysdeps/powerpc/powerpc64/power6/memset.S>
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
-#undef __bzero
-#define __bzero __bzero_power7
#include <sysdeps/powerpc/powerpc64/power7/memset.S>
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
-#undef __bzero
-#define __bzero __bzero_power8
-
#include <sysdeps/powerpc/powerpc64/power8/memset.S>
-/* 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.
#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
# 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>
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
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
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
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