]> sourceware.org Git - newlib-cygwin.git/commitdiff
* libc/machine/rx/strncat.S (_strncat): Replace use of r6
authorNick Clifton <nickc@redhat.com>
Fri, 20 Nov 2009 12:54:29 +0000 (12:54 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 20 Nov 2009 12:54:29 +0000 (12:54 +0000)
        (call-saved) with r14 (call-used).

newlib/ChangeLog
newlib/libc/machine/rx/strncat.S

index e0eace851b2e7295c3f420f946b1071e04035cf8..72ca21653a82de550d802e1998eb089b45527d2b 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-20  Nick Clifton  <nickc@redhat.com>
+
+       * libc/machine/rx/strncat.S (_strncat): Replace use of r6
+       (call-saved) with r14 (call-used).
+
 2009-11-18  Dave Korn  <dave.korn.cygwin@googlemail.com>
 
        * libm/machine/i386/f_tan.S (_f_tan): Free fp stack register
index 7a0afce31bb956d02dd3b758665e9c4c56d0f39d..3bc6b75aebdeb85d206bb8283cbe2c3d60063f64 100644 (file)
@@ -10,25 +10,25 @@ _strncat:
        
        mov     r1, r4          ; Save a copy of the dest pointer.
        mov     r2, r5          ; Save a copy of the source pointer.
-       mov     r3, r         ; Save a copy of the byte count.
+       mov     r3, r14         ; Save a copy of the byte count.
        
        mov     #0,  r2         ; Search for the NUL byte.
        mov     #-1, r3         ; Search until we run out of memory.
        suntil.b                ; Find the end of the destination string.
        sub     #1, r1          ; suntil.b leaves r1 pointing to the byte beyond the NUL.
 
-       mov     r6, r3          ; Restore the limit on the number of bytes copied.
+       mov     r14, r3         ; Restore the limit on the number of bytes copied.
        mov     r5, r2          ; Restore the source pointer.
        mov     r1, r5          ; Save a copy of the dest pointer.
        smovu                   ; Copy source to destination.
 
-       add     #0, r6, r3      ; Restore the number of bytes to copy (again), but this time set the Z flag as well.
+       add     #0, r14, r3     ; Restore the number of bytes to copy (again), but this time set the Z flag as well.
        beq     1f              ; If we copied 0 bytes then we already know that the dest string is NUL terminated, so we do not have to do anything.
        mov     #0, r2          ; Otherwise we must check to see if a NUL byte
        mov     r5, r1          ;  was included in the bytes that were copied.
        suntil.b
        beq     1f              ; Z flag is set if a match was found.
-       add     r6, r5          ; Point at byte after end of copied bytes.
+       add     r14, r5         ; Point at byte after end of copied bytes.
        mov.b   #0, [r5]        ; Store a NUL there.
 1:     
        mov     r4, r1          ; Return the original dest pointer.
This page took 0.045366 seconds and 5 git commands to generate.