OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [machine/] [rx/] [memchr.S] - Blame information for rev 207

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
        .file   "memchr.S"
2
 
3
        .section .text
4
 
5
        .global  _memchr
6
        .type    _memchr,@function
7
_memchr:
8
        cmp     #0, r3          ; If r3 is 0 suntil.b will do nothing and not set any flags...
9
        stz     #1, r1          ; ...so store 1 into r1.  It will be decremented by the SUB later.
10
        suntil.b                ; Search until *r1 == r2 or r3 bytes have been examined.
11
        stnz    #1, r1          ; If no match was found return NULL.
12
        sub     #1, r1          ; suntil.b leaves r1 pointing at the address *after* the match.
13
        rts

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.