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/] [memmove.S] - Blame information for rev 207

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
        .file   "memmove.S"
2
 
3
        .section .text
4
        .global  _memmove
5
        .type    _memmove,@function
6
_memmove:
7
        mov     r1, r4          ; Save a copy of DEST
8
        cmp     r1, r2
9
        blt     2f              ; If SRC (r2) is less than DEST (r1) then copy backwards
10
        smovf
11
1:
12
        mov     r4, r1          ; Return DEST
13
        rts
14
2:
15
        add     r3, r1          ; The SMOVB instructions requires the DEST in r1 and the
16
        add     r3, r2          ; SRC in r2 but it needs them to point the last bytes of
17
        sub     #1, r2          ; the regions involved not the first bytes, hence these
18
        sub     #1, r1          ; additions and subtractions.
19
        smovb
20
        bra     1b

powered by: WebSVN 2.1.0

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