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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [newlib-1.18.0/] [newlib/] [libc/] [machine/] [rx/] [memchr.S] - Rev 859

Go to most recent revision | Compare with Previous | Blame | View Log

        .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

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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