mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-17 12:01:53 +08:00
cd0d459135
* rx/crt0.S (_start): If string instructions are not allowed, avoid using SMOVF. * libc/machine/rx/memchr.S: Add non-string insn using version. * libc/machine/rx/memcpy.S: Likewise. * libc/machine/rx/memmove.S: Likewise. * libc/machine/rx/mempcpy.S: Likewise. * libc/machine/rx/strcat.S: Likewise. * libc/machine/rx/strcmp.S: Likewise. * libc/machine/rx/strcpy.S: Likewise. * libc/machine/rx/strlen.S: Likewise. * libc/machine/rx/strncat.S: Likewise. * libc/machine/rx/strncmp.S: Likewise. * libc/machine/rx/strncpy.S: Likewise.
26 lines
473 B
ArmAsm
26 lines
473 B
ArmAsm
.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
|
|
smovf
|
|
rts
|
|
#endif
|
|
.size _mempcpy, . - _mempcpy
|