4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-15 10:39:25 +08:00
Nick Clifton fd6942ab42 newlib:
* configure.host: Add support for RX architecture.
        * libc/include/machine/ieeefp.h: Likewise.
        * libc/include/machine/setjmp.h: Likewise.
        * libc/include/machine/configure.in: Likewise.
        * libc/include/machine/configure: Regenerate.
        * libc/machine/rx: New directory.
        * libc/machine/rx/*: New files to support RX architecture.

libgloss:
        * configure.in: Add support for RX sub-directory.
        * configure: Regenerate.
        * rx: New directory.
        * rx/*: New files to support RX architecture.
2009-10-26 10:05:23 +00:00

19 lines
565 B
ArmAsm

.file "strncpy.S"
.section .text
.global _strncpy
.type _strncpy,@function
_strncpy:
mov r1, r4 ; Save a copy of the dest pointer.
mov r3, r5 ; Save a copy of the byte count
smovu ; Copy the bytes
cmp #0, r3 ; If we have copied the number of bytes requested
beq 1f ; then skip the next bit:
add r4, r5, r1 ; Point to the last byte that we are supposed to write.
sub r3, r1 ; Subtract the number of bytes left to be written.
mov #0, r2 ; Fill the remaining bytes with NULs,
sstr.b
1:
mov r4, r1 ; Return the destination pointer
rts