diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-25 04:03:33 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-25 04:03:33 +0000 |
commit | cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8 (patch) | |
tree | 520f8e8d113184cfa7954ebd274564b8c255fa9a /libc/string/arm/_memcpy.S | |
parent | e4461be66e2655058aef358b00050bc70ac72861 (diff) | |
download | uClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.bz2 uClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.xz |
Merge from trunk. Going pretty good so far. Kind of. Okay, not really.
Diffstat (limited to 'libc/string/arm/_memcpy.S')
-rw-r--r-- | libc/string/arm/_memcpy.S | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libc/string/arm/_memcpy.S b/libc/string/arm/_memcpy.S index e8d78af23..3704f96b5 100644 --- a/libc/string/arm/_memcpy.S +++ b/libc/string/arm/_memcpy.S @@ -37,7 +37,7 @@ * by Erik Andersen <andersen@codepoet.org> */ - +#include <features.h> #include <endian.h> /* @@ -83,8 +83,11 @@ _memcpy: bcc .Lmemcpy_backwards moveq r0, #0 /* Quick abort for len=0 */ - moveq pc, lr - +#if defined(__USE_BX__) + bxeq lr +#else + moveq pc, lr +#endif stmdb sp!, {r0, lr} /* memcpy() returns dest addr */ subs r2, r2, #4 blt .Lmemcpy_fl4 /* less than 4 bytes */ @@ -389,8 +392,11 @@ _memcpy: .Lmemcpy_bl4: /* less than 4 bytes to go */ adds r2, r2, #4 +#if defined(__USE_BX__) + bxeq lr +#else moveq pc, lr /* done */ - +#endif /* copy the crud byte at a time */ cmp r2, #2 ldrb r3, [r1, #-1]! @@ -399,8 +405,11 @@ _memcpy: strgeb r3, [r0, #-1]! ldrgtb r3, [r1, #-1]! strgtb r3, [r0, #-1]! +#if defined(__USE_BX__) + bx lr +#else mov pc, lr - +#endif /* erg - unaligned destination */ .Lmemcpy_bdestul: cmp r12, #2 |