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

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

diff -urN linux-2.4.21/arch/arm/lib/strchr.S linux-2.4.22/arch/arm/lib/strchr.S
@@ -15,11 +15,12 @@
 		.text
 		.align	5
 ENTRY(strchr)
+		and	r1, r1, #0xff
 1:		ldrb	r2, [r0], #1
 		teq	r2, r1
 		teqne	r2, #0
 		bne	1b
-		teq	r2, #0
-		moveq	r0, #0
-		subne	r0, r0, #1
+		teq	r2, r1
+		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)