summaryrefslogtreecommitdiffstats
path: root/libc/string/arm/bcopy.S
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-06-19 06:48:05 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-06-19 06:48:05 +0000
commit8b96f0d1ca80a4ba9f8b06313dac4e7a351d728d (patch)
treeaba7c0f12efda51131ffb58eea03246f27f52b13 /libc/string/arm/bcopy.S
parentee82aebd10ba586d3380d6524eae98ee259b133c (diff)
downloaduClibc-alpine-8b96f0d1ca80a4ba9f8b06313dac4e7a351d728d.tar.bz2
uClibc-alpine-8b96f0d1ca80a4ba9f8b06313dac4e7a351d728d.tar.xz
Synch arch specific part of libc/string for frv/ia64/sparc/i386/powerpc/arm/avr32/x86_64/cris/bfin
Diffstat (limited to 'libc/string/arm/bcopy.S')
-rw-r--r--libc/string/arm/bcopy.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/string/arm/bcopy.S b/libc/string/arm/bcopy.S
index db3c9e6c1..2d6e90d13 100644
--- a/libc/string/arm/bcopy.S
+++ b/libc/string/arm/bcopy.S
@@ -40,6 +40,7 @@
/* bcopy = memcpy/memmove with arguments reversed. */
#include <features.h>
+#include <bits/arm_asm.h>
#ifdef __UCLIBC_SUSV3_LEGACY__
@@ -48,12 +49,23 @@
.type bcopy,%function
.align 4
+#if defined(__thumb__) && !defined(__thumb2__)
+.thumb_func
+bcopy:
+ push {r2, lr}
+ mov ip, r0
+ mov r0, r1
+ mov r1, ip
+ bl _memcpy
+ POP_RET
+#else
bcopy:
/* switch the source and destination registers */
eor r0, r1, r0
eor r1, r0, r1
eor r0, r1, r0
b _memcpy /* (PLT) */
+#endif
.size bcopy,.-bcopy