about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-28 22:35:26 -0700
committerDavid S. Miller <davem@davemloft.net>2012-03-28 22:35:26 -0700
commit88d85d4f001fac0fd7ef4e3d05ca8a7d50b0c98f (patch)
treedac097e3214f049492bbf41a575b6d846af3dd9e /sysdeps/sparc/sparc32
parente5aa83e16d02bc8f1b1a352f83e12f3f14c4d4ac (diff)
downloadglibc-88d85d4f001fac0fd7ef4e3d05ca8a7d50b0c98f.tar.gz
glibc-88d85d4f001fac0fd7ef4e3d05ca8a7d50b0c98f.tar.xz
glibc-88d85d4f001fac0fd7ef4e3d05ca8a7d50b0c98f.zip
Optimize mempcpy on sparc.
	* sysdeps/sparc/sparc32/memcpy.S: Implement mempcpy using a stub
	that branches into memcpy.
	* sysdeps/sparc/sparc64/memcpy.S: Likewise.
	* sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S: Likewise.
	* sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Likewise.
	* sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: Likewise.
	* sysdeps/sparc/sparc64/multiarch/memcpy.S: Add mempcpy multiarch
	bits.
	* sysdeps/sparc/sparc64/rtld-memcpy.c: Include generic mempcpy
	implementation too.
	* sysdeps/sparc/mempcpy.S: New file.
Diffstat (limited to 'sysdeps/sparc/sparc32')
-rw-r--r--sysdeps/sparc/sparc32/memcpy.S14
1 files changed, 12 insertions, 2 deletions
diff --git a/sysdeps/sparc/sparc32/memcpy.S b/sysdeps/sparc/sparc32/memcpy.S
index a36f1d6aa0..82fa6d1045 100644
--- a/sysdeps/sparc/sparc32/memcpy.S
+++ b/sysdeps/sparc/sparc32/memcpy.S
@@ -104,11 +104,17 @@
 	std	%t2, [%dst + offset + offset2 + 0x08];
 
 	.text
-	.align	4
+ENTRY(__mempcpy)
+	add		%o0, %o2, %g1
+	ba		101f
+	 st		%g1, [%sp + 64]
+END(__mempcpy)
 
+	.align	4
 ENTRY(memcpy)		/* %o0=dst %o1=src %o2=len */
-	sub		%o0, %o1, %o4
 	st		%o0, [%sp + 64]
+101:
+	sub		%o0, %o1, %o4
 9:	andcc		%o4, 3, %o5
 0:	bne		86f
 	 cmp		%o2, 15
@@ -641,3 +647,7 @@ ENTRY(memcpy)		/* %o0=dst %o1=src %o2=len */
 END(memcpy)
 
 libc_hidden_builtin_def (memcpy)
+
+libc_hidden_def (__mempcpy)
+weak_alias (__mempcpy, mempcpy)
+libc_hidden_builtin_def (mempcpy)