[v2,01/11] ia64: Remove bcopy

Message ID 20220223140921.2768062-2-adhemerval.zanella@linaro.org
State Committed
Headers
Series Remove bcopy and bzero optimizations |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Adhemerval Zanella Netto Feb. 23, 2022, 2:09 p.m. UTC
  It just call memmove as the generic implementation.  The arch specific
mplementation is just to avoid the __bzero symbol creation (which
ia64 abi does not export).
---
 string/bzero.c       |  4 ++--
 sysdeps/ia64/bcopy.S | 10 ----------
 sysdeps/ia64/bzero.c |  3 +++
 3 files changed, 5 insertions(+), 12 deletions(-)
 delete mode 100644 sysdeps/ia64/bcopy.S
 create mode 100644 sysdeps/ia64/bzero.c
  

Patch

diff --git a/string/bzero.c b/string/bzero.c
index eb2af49e9e..d8b79df1c7 100644
--- a/string/bzero.c
+++ b/string/bzero.c
@@ -17,12 +17,12 @@ 
 
 #include <string.h>
 
-#undef __bzero
-
 /* Set N bytes of S to 0.  */
 void
 __bzero (void *s, size_t len)
 {
   memset (s, '\0', len);
 }
+#ifndef __bzero
 weak_alias (__bzero, bzero)
+#endif
diff --git a/sysdeps/ia64/bcopy.S b/sysdeps/ia64/bcopy.S
deleted file mode 100644
index bdabf5acdc..0000000000
--- a/sysdeps/ia64/bcopy.S
+++ /dev/null
@@ -1,10 +0,0 @@ 
-#include <sysdep.h>
-
-ENTRY(bcopy)
-	.regstk 3, 0, 0, 0
-	mov r8 = in0
-	mov in0 = in1
-	;;
-	mov in1 = r8
-	br.cond.sptk.many HIDDEN_BUILTIN_JUMPTARGET(memmove)
-END(bcopy)
diff --git a/sysdeps/ia64/bzero.c b/sysdeps/ia64/bzero.c
new file mode 100644
index 0000000000..79771f3e91
--- /dev/null
+++ b/sysdeps/ia64/bzero.c
@@ -0,0 +1,3 @@ 
+/* ia64 does not export __bzero symbol.  */
+#define __bzero bzero
+#include <string/bzero.c>