Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/arch/arm/string ip -> r2



details:   https://anonhg.NetBSD.org/src/rev/50882a3ac7e5
branches:  trunk
changeset: 789436:50882a3ac7e5
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Aug 19 02:24:09 2013 +0000

description:
ip -> r2
teq -> cmp

diffstat:

 common/lib/libc/arch/arm/string/strrchr_naive.S |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r 1063df9aa9c0 -r 50882a3ac7e5 common/lib/libc/arch/arm/string/strrchr_naive.S
--- a/common/lib/libc/arch/arm/string/strrchr_naive.S   Mon Aug 19 02:22:25 2013 +0000
+++ b/common/lib/libc/arch/arm/string/strrchr_naive.S   Mon Aug 19 02:24:09 2013 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index