Module Name: src
Committed By: matt
Date: Mon Aug 19 02:24:09 UTC 2013
Modified Files:
src/common/lib/libc/arch/arm/string: strrchr_naive.S
Log Message:
ip -> r2
teq -> cmp
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strrchr_naive.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/common/lib/libc/arch/arm/string/strrchr_naive.S
diff -u src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.1 src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.2
--- src/common/lib/libc/arch/arm/string/strrchr_naive.S:1.1 Tue Jan 15 02:03:30 2013
+++ src/common/lib/libc/arch/arm/string/strrchr_naive.S Mon Aug 19 02:24:09 2013
@@ -28,17 +28,17 @@
*/
#include <machine/asm.h>
-RCSID("$NetBSD: strrchr_naive.S,v 1.1 2013/01/15 02:03:30 matt Exp $")
+RCSID("$NetBSD: strrchr_naive.S,v 1.2 2013/08/19 02:24:09 matt Exp $")
/* LINTSTUB: char * strrchr(const char *, int) */
ENTRY(strrchr)
- mov ip, r0 /* using r0 as return value */
+ mov r2, r0 /* using r0 as return value */
mov r0, #0 /* default to no match */
and r1, r1, #0xff /* restrict to a byte value */
-1: ldrb r3, [ip], #1 /* read a byte */
+1: ldrb r3, [r2], #1 /* read a byte */
cmp r3, r1 /* does it match? */
- subeq r0, ip, #1 /* yes, set return value to point to it */
- teq r3, #0 /* was it a NUL? */
+ subeq r0, r2, #1 /* yes, set return value to point to it */
+ cmp r3, #0 /* was it a NUL? */
bne 1b /* no, get next byte */
RET
END(strrchr)