4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-15 10:19:09 +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

17 lines
509 B
ArmAsm

.file "strlen.S"
.section .text
.global _strlen
.type _strlen,@function
_strlen:
add #0, r1, r4 ; Save a copy of the string start address and set the condition flags.
beq null_string ; Test for a NULL pointer.
mov #-1, r3 ; Set a limit on the number of bytes examined.
mov #0, r2 ; Stop searching when we find a NUL byte.
suntil.b ; Search until *r1 == r2
sub #1, r1 ; suntil.b leaves r1 pointing to the byte beyond the match.
null_string:
sub r4, r1 ; Compute the length.
rts