about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-03-09 06:37:45 -0800
committerDavid S. Miller <davem@davemloft.net>2010-03-09 06:37:45 -0800
commit2fe000dfd673859eb3b1e1c9739de66445d9fe08 (patch)
tree8ca9544bbd9d8a873a0b418d14f87015f9e00369 /sysdeps
parentd6d1c4c87c3f2e60d9aab570aefc3e63d0467f33 (diff)
downloadglibc-2fe000dfd673859eb3b1e1c9739de66445d9fe08.tar.gz
glibc-2fe000dfd673859eb3b1e1c9739de66445d9fe08.tar.xz
glibc-2fe000dfd673859eb3b1e1c9739de66445d9fe08.zip
sparc32: Fix non-v9 build failure in memcpy.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/sparc/sparc32/memcpy.S23
1 files changed, 20 insertions, 3 deletions
diff --git a/sysdeps/sparc/sparc32/memcpy.S b/sysdeps/sparc/sparc32/memcpy.S
index c9c7c40e81..748a0862fe 100644
--- a/sysdeps/sparc/sparc32/memcpy.S
+++ b/sysdeps/sparc/sparc32/memcpy.S
@@ -117,10 +117,27 @@ ENTRY(memcpy)		/* %o0=dst %o1=src %o2=len */
 	bleu		90f
 	 andcc		%o1, 3, %g0
 
-	bne		78b
-3:	 andcc		%o1, 4, %g0
+	be		78f
+	 andcc		%o1, 4, %g0
 
-	be		2f
+	andcc		%o1, 1, %g0
+	be		4f
+	 andcc		%o1, 2, %g0
+
+	ldub		[%o1], %g2
+	add		%o1, 1, %o1
+	stb		%g2, [%o0]
+	sub		%o2, 1, %o2
+	bne		77f
+	 add		%o0, 1, %o0
+4:	lduh		[%o1], %g2
+	add		%o1, 2, %o1
+	sth		%g2, [%o0]
+	sub		%o2, 2, %o2
+	add		%o0, 2, %o0
+
+77:	andcc		%o1, 4, %g0
+78:	be		2f
 	 mov		%o2, %g1
 
 	ld		[%o1], %o4