patch-2.4.22 linux-2.4.22/arch/arm/lib/memchr.S

Next file: linux-2.4.22/arch/arm/lib/muldi3.c
Previous file: linux-2.4.22/arch/arm/lib/longlong.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/arm/lib/memchr.S linux-2.4.22/arch/arm/lib/memchr.S
@@ -15,11 +15,11 @@
 	.text
 	.align	5
 ENTRY(memchr)
-1:	ldrb	r3, [r0], #1
+1:	subs	r2, r2, #1
+	bmi	2f
+	ldrb	r3, [r0], #1
 	teq	r3, r1
-	beq	2f
-	subs	r2, r2, #1
-	bpl	1b
+	bne	1b
+	sub	r0, r0, #1
 2:	movne	r0, #0
-	subeq	r0, r0, #1
 	RETINSTR(mov,pc,lr)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)