about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32/strlen.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc/sparc32/strlen.S')
-rw-r--r--sysdeps/sparc/sparc32/strlen.S28
1 files changed, 15 insertions, 13 deletions
diff --git a/sysdeps/sparc/sparc32/strlen.S b/sysdeps/sparc/sparc32/strlen.S
index 76466ec9dd..ed92f20e28 100644
--- a/sysdeps/sparc/sparc32/strlen.S
+++ b/sysdeps/sparc/sparc32/strlen.S
@@ -38,39 +38,41 @@
 
 	.text
 	.align		4
-10:	ldub		[%o0], %o5
+
+ENTRY(strlen)
+	mov		%o0, %o1
+	andcc		%o0, 3, %g0
+	be		20f
+	 sethi		%hi(0x80808080), %o4
+
+	ldub		[%o0], %o5
 	cmp		%o5, 0
-	be		1f
+	be		21f
 	 add		%o0, 1, %o0
 	andcc		%o0, 3, %g0
 	be		4f
 	 or		%o4, %lo(0x80808080), %o3
 	ldub		[%o0], %o5
 	cmp		%o5, 0
-	be		2f
+	be		22f
 	 add		%o0, 1, %o0
 	andcc		%o0, 3, %g0
 	be		5f
 	 sethi		%hi(0x01010101), %o4
 	ldub		[%o0], %o5
 	cmp		%o5, 0
-	be		3f
+	be		23f
 	 add		%o0, 1, %o0
 	b		11f
 	 or		%o4, %lo(0x01010101), %o2
-1:	retl
+21:	retl
 	 mov		0, %o0
-2:	retl
+22:	retl
 	 mov		1, %o0
-3:	retl
+23:	retl
 	 mov		2, %o0
 
-ENTRY(strlen)
-	mov		%o0, %o1
-	andcc		%o0, 3, %g0
-	bne		10b
-	 sethi		%hi(0x80808080), %o4
-	or		%o4, %lo(0x80808080), %o3
+20:	or		%o4, %lo(0x80808080), %o3
 4:	sethi		%hi(0x01010101), %o4
 5:	or		%o4, %lo(0x01010101), %o2
 11:	ld		[%o0], %o5