summaryrefslogtreecommitdiff
path: root/libc/string/arm/memset.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/arm/memset.S')
-rw-r--r--libc/string/arm/memset.S12
1 files changed, 10 insertions, 2 deletions
diff --git a/libc/string/arm/memset.S b/libc/string/arm/memset.S
index 476dad52a..16bfe0dc5 100644
--- a/libc/string/arm/memset.S
+++ b/libc/string/arm/memset.S
@@ -56,7 +56,11 @@ memset:
bge 1b
2:
movs a3, a3 @ anything left?
- moveq pc, lr @ nope
+#if defined(__USE_BX__)
+ bxeq lr
+#else
+ moveq pc, lr @ nope
+#endif
rsb a3, a3, $7
add pc, pc, a3, lsl $2
mov r0, r0
@@ -67,7 +71,11 @@ memset:
strb a2, [a4], $1
strb a2, [a4], $1
strb a2, [a4], $1
- mov pc, lr
+#if defined(__USE_BX__)
+ bx lr
+#else
+ mov pc, lr
+#endif
.size memset,.-memset