Retro68/gcc/newlib/libc/machine/rx/mempcpy.S

26 lines
473 B
ArmAsm
Raw Normal View History

2017-04-11 21:13:36 +00:00
.file "mempcpy.S"
.section .text
.global _mempcpy
.type _mempcpy,@function
_mempcpy:
#ifdef __RX_DISALLOW_STRING_INSNS__
/* Do not use the string instructions - they might prefetch
bytes from outside of valid memory. This is particularly
dangerous in I/O space. */
cmp #0, r3 ; If the count is zero, do nothing
beq 2f
1: mov.b [r2+], r5
mov.b r5, [r1+]
sub #1, r3
bne 1b
2: rts
#else
2017-04-11 21:13:36 +00:00
smovf
rts
#endif
.size _mempcpy, . - _mempcpy