For the RX port, avoid using string instructions when __RX_DISALLOW_STRING_INSNS__ is defined.
* 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.
This commit is contained in:
@ -40,11 +40,24 @@ _start:
|
||||
mov #__stack, r0
|
||||
mvtc #__vectors, intb
|
||||
|
||||
/* Copy the .data section from ROM into RAM. */
|
||||
mov #__datastart, r1
|
||||
mov #__romdatastart, r2
|
||||
mov #__romdatacopysize, r3
|
||||
smovf
|
||||
#ifdef __RX_DISALLOW_STRING_INSNS__
|
||||
cmp #0, r3
|
||||
beq 2f
|
||||
|
||||
1: mov.b [r2+], r5
|
||||
mov.b r5, [r1+]
|
||||
sub #1, r3
|
||||
bne 1b
|
||||
2:
|
||||
#else
|
||||
smovf
|
||||
#endif
|
||||
|
||||
/* Initialise the contents of the .bss section. */
|
||||
mov #__bssstart, r1
|
||||
mov #0, r2
|
||||
mov #__bsssize, r3
|
||||
|
Reference in New Issue
Block a user