diff options
author | Nick Clifton <nickc@redhat.com> | 2015-04-09 09:20:00 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-04-23 21:57:13 +0200 |
commit | cd0d45913525ef09f0494a2f0c8e3d6fe8fface2 (patch) | |
tree | dcbb6a0c97dc45cc7df625cbeb4d1a99f503d247 /libgloss | |
parent | 45d0b17928067ee848aae2cd5bd332129ca35c42 (diff) | |
download | cygnal-cd0d45913525ef09f0494a2f0c8e3d6fe8fface2.tar.gz cygnal-cd0d45913525ef09f0494a2f0c8e3d6fe8fface2.tar.bz2 cygnal-cd0d45913525ef09f0494a2f0c8e3d6fe8fface2.zip |
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.
Diffstat (limited to 'libgloss')
-rw-r--r-- | libgloss/ChangeLog | 5 | ||||
-rw-r--r-- | libgloss/rx/crt0.S | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index fc3674ebc..37cb4a581 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,8 @@ +2015-04-09 Nick Clifton <nickc@redhat.com> + + * rx/crt0.S (_start): If string instructions are not allowed, + avoid using SMOVF. + 2015-04-08 Nick Clifton <nickc@redhat.com> * rx/rx.ld: Add .note and DWARF3 sections. diff --git a/libgloss/rx/crt0.S b/libgloss/rx/crt0.S index 222742352..6d7089d4d 100644 --- a/libgloss/rx/crt0.S +++ b/libgloss/rx/crt0.S @@ -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 +#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 |