diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-07-16 07:48:53 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-07-16 07:48:53 +0000 |
commit | 6041792ec6b89f5e9eae79d8addbb0f706f9addd (patch) | |
tree | 05a286d63fb8d9fddb81195e6ff80a2f6ad8b2be /newlib/libc/machine/microblaze/strcpy.c | |
parent | f6ddaa2a292bc9e4d5190a413c0b4c1fa7c81374 (diff) | |
download | cygnal-6041792ec6b89f5e9eae79d8addbb0f706f9addd.tar.gz cygnal-6041792ec6b89f5e9eae79d8addbb0f706f9addd.tar.bz2 cygnal-6041792ec6b89f5e9eae79d8addbb0f706f9addd.zip |
* configure.host: Change to microblaze*.
* libc/include/machine/ieeefp.h: Add __MICROBLAZEEL__.
* libc/machine/microblaze/mb_endian.h: New file.
* newlib/libc/machine/microblaze/strcmp.c: Add little endian support.
* newlib/libc/machine/microblaze/strcpy.c: Likewise.
* newlib/libc/machine/microblaze/strlen.c: Likewise.
* configure.in: Change to microblaze*.
* configure: Regenerate.
* microblaze/xilinx.ld: Remove OUTPUT_FORMAT.
Diffstat (limited to 'newlib/libc/machine/microblaze/strcpy.c')
-rw-r--r-- | newlib/libc/machine/microblaze/strcpy.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/newlib/libc/machine/microblaze/strcpy.c b/newlib/libc/machine/microblaze/strcpy.c index 6f0ad05e7..d5430a305 100644 --- a/newlib/libc/machine/microblaze/strcpy.c +++ b/newlib/libc/machine/microblaze/strcpy.c @@ -131,18 +131,22 @@ _DEFUN (strcpy, (dst0, src0), #else - asm volatile (" \ - or r9, r0, r0 /* Index register */ \n\ +#include "mb_endian.h" + + asm volatile (" \n\ + or r9, r0, r0 /* Index register */ \n\ check_alignment: \n\ andi r3, r5, 3 \n\ andi r4, r6, 3 \n\ bnei r3, try_align_args \n\ bnei r4, regular_strcpy /* At this point we dont have a choice */ \n\ -cpy_loop: \n\ - lw r3, r6, r9 \n\ +cpy_loop: \n" + LOAD4BYTES("r3", "r6", "r9") +" \n\ pcmpbf r4, r0, r3 \n\ - bnei r4, cpy_bytes /* If r4 != 0, then null present within string */\n\ - sw r3, r5, r9 \n\ + bnei r4, cpy_bytes /* If r4 != 0, then null present within string */\n" + STORE4BYTES("r3", "r5", "r9") +" \n\ brid cpy_loop \n\ addik r9, r9, 4 \n\ cpy_bytes: \n\ |