PowerPC: multiarch memset/bzero for PowerPC64
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 13 Dec 2013 19:33:16 +0000 (14:33 -0500)
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 13 Dec 2013 19:33:16 +0000 (14:33 -0500)
17 files changed:
ChangeLog
sysdeps/powerpc/powerpc64/memset.S
sysdeps/powerpc/powerpc64/multiarch/Makefile
sysdeps/powerpc/powerpc64/multiarch/bzero-power4.S [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/bzero-power6.S [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/bzero-power7.S [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/bzero.c [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
sysdeps/powerpc/powerpc64/multiarch/memset-power4.S [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/memset-power6.S [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/memset-power7.S [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/memset.c [new file with mode: 0644]
sysdeps/powerpc/powerpc64/multiarch/rtld-memset.c [new file with mode: 0644]
sysdeps/powerpc/powerpc64/power4/memset.S
sysdeps/powerpc/powerpc64/power6/memset.S
sysdeps/powerpc/powerpc64/power7/memset.S

index 3a62a697cc31fa4cc3f0596f8c72a43f9752729d..092ebb1b14ca4d0419ba71f8a2db90652580771c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2013-12-13  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
+
+       * sysdeps/powerpc/powerpc64/memset.S (NO_BZERO_IMPL): Add macro to
+       avoid cretion of __bzero symbol.
+       * sysdeps/powerpc/powerpc64/power4/memset.S (NO_BZERO_IMPL):
+       Likewise.
+       * sysdeps/powerpc/powerpc64/power6/memset.S (NO_BZERO_IMPL):
+       Likewise.
+       * sysdeps/powerpc/powerpc64/power7/memset.S (NO_BZERO_IMPL):
+       Likewise.
+       * sysdeps/powerpc/powerpc64/multiarch/Makefile: Add memset/bzero
+       multiarch implementations.
+       * sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c
+       (__libc_ifunc_impl_list): Likewise.
+       * sysdeps/powerpc/powerpc64/multiarch/bzero-power4.S: New file.
+       * sysdeps/powerpc/powerpc64/multiarch/bzero-power6.S: New file.
+       * sysdeps/powerpc/powerpc64/multiarch/bzero-power7.S: New file.
+       * sysdeps/powerpc/powerpc64/multiarch/bzero.c: New file: multiarch
+       bzero for PPC32.
+       * sysdeps/powerpc/powerpc64/multiarch/memset-power4.S: New file.
+       * sysdeps/powerpc/powerpc64/multiarch/memset-power6.S: New file.
+       * sysdeps/powerpc/powerpc64/multiarch/memset-power7.S: New file.
+       * sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S: New file.
+       * sysdeps/powerpc/powerpc64/multiarch/memset.c: New file: multiarch
+       memset for PPC64.
+       * sysdeps/powerpc/powerpc64/multiarch/rtld-memset.c: New file.
+
 2013-12-13  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
        * string/memcmp.c (memcmp): Using macro to redefine symbol name.
index 1027a592c970b7f029bf8d4b7a663840b1b5ce3e..22c7d4e29d0762be5aa39486db2051ab8231974f 100644 (file)
@@ -247,6 +247,7 @@ L(medium_28t):
 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)
@@ -257,3 +258,4 @@ ENTRY (__bzero)
 END_GEN_TB (__bzero,TB_TOCLESS)
 
 weak_alias (__bzero, bzero)
+#endif
index 4dd2f38bbd6dbef45f7eff92220c205721646e2c..2d06551213975422dc0aa01637b9143012fe6eb9 100644 (file)
@@ -1,5 +1,6 @@
 ifeq ($(subdir),string)
 sysdep_routines += memcpy-power7 memcpy-a2 memcpy-power6 memcpy-cell \
                   memcpy-power4 memcpy-ppc64 memcmp-power7 memcmp-power4 \
-                  memcmp-ppc64
+                  memcmp-ppc64 memset-power7 memset-power6 memset-power4 \
+                  memset-ppc64 bzero-power4 bzero-power6 bzero-power7
 endif
diff --git a/sysdeps/powerpc/powerpc64/multiarch/bzero-power4.S b/sysdeps/powerpc/powerpc64/multiarch/bzero-power4.S
new file mode 100644 (file)
index 0000000..cf58fc5
--- /dev/null
@@ -0,0 +1,26 @@
+/* Optimized bzero implementation for PowerPC64/POWER4.
+   Copyright (C) 2013 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 <sysdep.h>
+
+ENTRY (__bzero_power4)
+       CALL_MCOUNT 3
+       mr      r5,r4
+       li      r4,0
+       b       __memset_power4
+END_GEN_TB (__bzero_power4,TB_TOCLESS)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/bzero-power6.S b/sysdeps/powerpc/powerpc64/multiarch/bzero-power6.S
new file mode 100644 (file)
index 0000000..ee3b919
--- /dev/null
@@ -0,0 +1,26 @@
+/* Optimized bzero implementation for PowerPC64/POWER6.
+   Copyright (C) 2013 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 <sysdep.h>
+
+ENTRY (__bzero_power6)
+       CALL_MCOUNT 3
+       mr      r5,r4
+       li      r4,0
+       b       __memset_power6
+END_GEN_TB (__bzero_power6,TB_TOCLESS)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/bzero-power7.S b/sysdeps/powerpc/powerpc64/multiarch/bzero-power7.S
new file mode 100644 (file)
index 0000000..7abc6db
--- /dev/null
@@ -0,0 +1,26 @@
+/* Optimized bzero implementation for PowerPC64/POWER7.
+   Copyright (C) 2013 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 <sysdep.h>
+
+ENTRY (__bzero_power7)
+       CALL_MCOUNT 3
+       mr      r5,r4
+       li      r4,0
+       b       __memset_power7
+END_GEN_TB (__bzero_power7,TB_TOCLESS)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/bzero.c b/sysdeps/powerpc/powerpc64/multiarch/bzero.c
new file mode 100644 (file)
index 0000000..d7b3aaa
--- /dev/null
@@ -0,0 +1,40 @@
+/* Multiple versions of bzero. PowerPC64 version.
+   Copyright (C) 2013 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/>.  */
+
+/* Define multiple versions only for definition in libc.  */
+#ifndef NOT_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;
+
+libc_ifunc (__bzero,
+            (hwcap & PPC_FEATURE_HAS_VSX)
+            ? __bzero_power7 :
+             (hwcap & PPC_FEATURE_ARCH_2_05)
+               ? __bzero_power6 :
+                 (hwcap & PPC_FEATURE_POWER4)
+               ? __bzero_power4
+            : __bzero_ppc);
+
+weak_alias (__bzero, bzero)
+#endif
index 338a71c4b547b853766612bc4952c0f1ff0e803b..5f277c1940004d63a665fe018aec1b8fc9be56f4 100644 (file)
@@ -60,6 +60,16 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
              IFUNC_IMPL_ADD (array, i, memcpy, hwcap & PPC_FEATURE_POWER4,
                              __memcpy_power4)
              IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_ppc))
+
+  /* Support sysdeps/powerpc/powerpc64/multiarch/memset.c.  */
+  IFUNC_IMPL (i, name, memset,
+             IFUNC_IMPL_ADD (array, i, memset, hwcap & PPC_FEATURE_HAS_VSX,
+                             __memset_power7)
+             IFUNC_IMPL_ADD (array, i, memset, hwcap & PPC_FEATURE_ARCH_2_05,
+                             __memset_power6)
+             IFUNC_IMPL_ADD (array, i, memset, hwcap & PPC_FEATURE_POWER4,
+                             __memset_power4)
+             IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ppc))
 #endif
 
   /* Support sysdeps/powerpc/powerpc64/multiarch/memcmp.c.  */
@@ -70,5 +80,15 @@ __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,
+             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, hwcap & PPC_FEATURE_POWER4,
+                             __bzero_power4)
+             IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ppc))
+
   return i;
 }
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset-power4.S b/sysdeps/powerpc/powerpc64/multiarch/memset-power4.S
new file mode 100644 (file)
index 0000000..aac7fb1
--- /dev/null
@@ -0,0 +1,41 @@
+/* Optimized memset implementation for PowerPC64/POWER4.
+   Copyright (C) 2013 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 <sysdep.h>
+
+#undef EALIGN
+#define EALIGN(name, alignt, words)                            \
+  .section ".text";                                            \
+  ENTRY_2(__memset_power4)                                     \
+  .align ALIGNARG(alignt);                                     \
+  EALIGN_W_##words;                                            \
+  BODY_LABEL(__memset_power4):                                 \
+  cfi_startproc;                                               \
+  LOCALENTRY(__memset_power4)
+
+#undef END_GEN_TB
+#define END_GEN_TB(name, mask)                                 \
+  cfi_endproc;                                                 \
+  TRACEBACK_MASK(__memset_power4,mask)                         \
+  END_2(__memset_power4)
+
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(name)
+
+#define NO_BZERO_IMPL
+#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
new file mode 100644 (file)
index 0000000..3144c69
--- /dev/null
@@ -0,0 +1,41 @@
+/* Optimized memset implementation for PowerPC64/POWER6.
+   Copyright (C) 2013 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 <sysdep.h>
+
+#undef EALIGN
+#define EALIGN(name, alignt, words)                            \
+  .section ".text";                                            \
+  ENTRY_2(__memset_power6)                                     \
+  .align ALIGNARG(alignt);                                     \
+  EALIGN_W_##words;                                            \
+  BODY_LABEL(__memset_power6):                                 \
+  cfi_startproc;                                               \
+  LOCALENTRY(__memset_power6)
+
+#undef END_GEN_TB
+#define END_GEN_TB(name, mask)                                 \
+  cfi_endproc;                                                 \
+  TRACEBACK_MASK(__memset_power6,mask)                         \
+  END_2(__memset_power6)
+
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(name)
+
+#define NO_BZERO_IMPL
+#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
new file mode 100644 (file)
index 0000000..ecfa963
--- /dev/null
@@ -0,0 +1,41 @@
+/* Optimized memset implementation for PowerPC64/POWER7.
+   Copyright (C) 2013 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 <sysdep.h>
+
+#undef EALIGN
+#define EALIGN(name, alignt, words)                            \
+  .section ".text";                                            \
+  ENTRY_2(__memset_power7)                                     \
+  .align ALIGNARG(alignt);                                     \
+  EALIGN_W_##words;                                            \
+  BODY_LABEL(__memset_power7):                                 \
+  cfi_startproc;                                               \
+  LOCALENTRY(__memset_power7)
+
+#undef END_GEN_TB
+#define END_GEN_TB(name, mask)                                 \
+  cfi_endproc;                                                 \
+  TRACEBACK_MASK(__memset_power7,mask)                         \
+  END_2(__memset_power7)
+
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(name)
+
+#define NO_BZERO_IMPL
+#include <sysdeps/powerpc/powerpc64/power7/memset.S>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S b/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S
new file mode 100644 (file)
index 0000000..95b98f8
--- /dev/null
@@ -0,0 +1,56 @@
+/* Default memset/bzero implementation for PowerPC64.
+   Copyright (C) 2013 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 <sysdep.h>
+
+#if defined SHARED && !defined NOT_IN_libc
+
+/* Copied from bzero.S to prevent the linker from inserting a stub
+   between bzero and memset.  */
+ENTRY (__bzero_ppc)
+        CALL_MCOUNT 3
+        mr      r5,r4
+        li      r4,0
+        b       L(_memset)
+END_GEN_TB (__bzero_ppc,TB_TOCLESS)
+
+# undef EALIGN
+# define EALIGN(name, alignt, words)                           \
+  .section ".text";                                            \
+  ENTRY_2(__memset_ppc)                                                \
+  .align ALIGNARG(alignt);                                     \
+  EALIGN_W_##words;                                            \
+  BODY_LABEL(__memset_ppc):                                    \
+  cfi_startproc;                                               \
+  LOCALENTRY(__memset_ppc)
+
+# undef END_GEN_TB
+# define END_GEN_TB(name, mask)                                        \
+  cfi_endproc;                                                 \
+  TRACEBACK_MASK(__memset_ppc,mask)                            \
+  END_2(__memset_ppc)
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)                         \
+  .globl __GI_memset; __GI_memset = __memset_ppc
+
+/* Do not implement __bzero at powerpc64/memset.S.  */
+# define NO_BZERO_IMPL
+#endif
+
+#include <sysdeps/powerpc/powerpc64/memset.S>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memset.c b/sysdeps/powerpc/powerpc64/multiarch/memset.c
new file mode 100644 (file)
index 0000000..226799e
--- /dev/null
@@ -0,0 +1,40 @@
+/* Multiple versions of memset.
+   Copyright (C) 2013 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/>.  */
+
+/* Define multiple versions only for definition in libc.  */
+#if defined SHARED && !defined NOT_IN_libc
+# include <string.h>
+# include <shlib-compat.h>
+# include "init-arch.h"
+
+extern __typeof (memset) __memset_ppc attribute_hidden;
+extern __typeof (memset) __memset_power4 attribute_hidden;
+extern __typeof (memset) __memset_power6 attribute_hidden;
+extern __typeof (memset) __memset_power7 attribute_hidden;
+
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+   ifunc symbol properly.  */
+libc_ifunc (memset,
+            (hwcap & PPC_FEATURE_HAS_VSX)
+            ? __memset_power7 :
+             (hwcap & PPC_FEATURE_ARCH_2_05)
+               ? __memset_power6 :
+                 (hwcap & PPC_FEATURE_POWER4)
+               ? __memset_power4
+            : __memset_ppc);
+#endif
diff --git a/sysdeps/powerpc/powerpc64/multiarch/rtld-memset.c b/sysdeps/powerpc/powerpc64/multiarch/rtld-memset.c
new file mode 100644 (file)
index 0000000..c74a770
--- /dev/null
@@ -0,0 +1,18 @@
+/* Copyright (C) 2013 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/powerpc64/rtld-memset.c>
index ad0d3812816b9653b41a5e80e717cdc16d97dae2..9d6fef569af1f63fafb680cc67bcfb78960520f2 100644 (file)
@@ -235,6 +235,7 @@ L(medium_28t):
 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)
@@ -245,3 +246,4 @@ ENTRY (__bzero)
 END_GEN_TB (__bzero,TB_TOCLESS)
 
 weak_alias (__bzero, bzero)
+#endif
index d61988a195498aed3ad39417bc58512ed93416a9..15a83b74fab687269281d88b1240c06f26363365 100644 (file)
@@ -379,6 +379,7 @@ L(medium_28t):
 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)
@@ -389,3 +390,4 @@ ENTRY (__bzero)
 END_GEN_TB (__bzero,TB_TOCLESS)
 
 weak_alias (__bzero, bzero)
+#endif
index 8b081e87cb2d1c51d5296824138580f9ce8e7e77..03a45c23c7723685b65a6555cc0e7c723eb7e669 100644 (file)
@@ -383,6 +383,7 @@ L(small):
 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)
@@ -393,3 +394,4 @@ ENTRY (__bzero)
 END_GEN_TB (__bzero,TB_TOCLESS)
 
 weak_alias (__bzero, bzero)
+#endif