source: trunk/libs/newlib/src/newlib/libc/machine/rx/mempcpy.S

Last change on this file was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 473 bytes
Line 
1        .file   "mempcpy.S"
2
3        .section .text
4        .global  _mempcpy
5        .type    _mempcpy,@function
6_mempcpy:
7#ifdef __RX_DISALLOW_STRING_INSNS__
8        /* Do not use the string instructions - they might prefetch
9           bytes from outside of valid memory.  This is particularly
10           dangerous in I/O space.  */
11
12        cmp      #0, r3         ; If the count is zero, do nothing
13        beq      2f
14       
151:      mov.b    [r2+], r5
16        mov.b    r5, [r1+]
17        sub      #1, r3
18        bne      1b
19
202:      rts
21#else
22        smovf
23        rts
24#endif
25        .size _mempcpy, . - _mempcpy
Note: See TracBrowser for help on using the repository browser.