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
|
Rev | Line | |
---|
[444] | 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 | |
---|
| 15 | 1: mov.b [r2+], r5 |
---|
| 16 | mov.b r5, [r1+] |
---|
| 17 | sub #1, r3 |
---|
| 18 | bne 1b |
---|
| 19 | |
---|
| 20 | 2: rts |
---|
| 21 | #else |
---|
| 22 | smovf |
---|
| 23 | rts |
---|
| 24 | #endif |
---|
| 25 | .size _mempcpy, . - _mempcpy |
---|
Note: See
TracBrowser
for help on using the repository browser.