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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [machine/] [h8300/] [reg_memcpy.S] - Blame information for rev 862

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

Line No. Rev Author Line
1 148 jeremybenn
#include "setarch.h"
2
 
3
#include "defines.h"
4
 
5
        ; dst A0
6
        ; src A1
7
        ; len A2
8
        .global ___reg_memcpy
9
___reg_memcpy:
10
 
11
        MOVP    A0P,A3P ; keep copy of result
12
        ADDP    A2P,A0P ; point to end of dst
13
        ADDP    A2P,A1P ; point to end of src
14
        CMPP    A0P,A3P ; see if anything to do
15
        beq     quit
16
 
17
loop:
18
#ifdef __NORMAL_MODE__
19
        sub     #1,A1P          ; point to byte
20
#else
21
        subs    #1,A1P          ; point to byte
22
#endif
23
        mov.b   @A1P,A2L        ; get byte
24
        mov.b   A2L,@-A0P       ; save byte
25
        CMPP    A0P,A3P         ; at the front again ?
26
        bne     loop
27
 
28
        ; return with A0 pointing to dst
29
quit:   rts
30
 

powered by: WebSVN 2.1.0

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