mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 10:39:25 +08:00
fd6942ab42
* 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.
14 lines
455 B
ArmAsm
14 lines
455 B
ArmAsm
.file "memchr.S"
|
|
|
|
.section .text
|
|
|
|
.global _memchr
|
|
.type _memchr,@function
|
|
_memchr:
|
|
cmp #0, r3 ; If r3 is 0 suntil.b will do nothing and not set any flags...
|
|
stz #1, r1 ; ...so store 1 into r1. It will be decremented by the SUB later.
|
|
suntil.b ; Search until *r1 == r2 or r3 bytes have been examined.
|
|
stnz #1, r1 ; If no match was found return NULL.
|
|
sub #1, r1 ; suntil.b leaves r1 pointing at the address *after* the match.
|
|
rts
|