summaryrefslogtreecommitdiff
path: root/libc/string/arm/bzero.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/arm/bzero.S')
-rw-r--r--libc/string/arm/bzero.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/string/arm/bzero.S b/libc/string/arm/bzero.S
index ee49cf560..e576a12e9 100644
--- a/libc/string/arm/bzero.S
+++ b/libc/string/arm/bzero.S
@@ -38,6 +38,7 @@
*/
#include <features.h>
+#include <bits/arm_asm.h>
#ifdef __UCLIBC_SUSV3_LEGACY__
@@ -46,10 +47,21 @@
.type bzero,%function
.align 4
+#if defined(__thumb__) && !defined(__thumb2__)
+.thumb_func
+bzero:
+ push {r2, lr}
+ mov r2, r1
+ mov r1, #0
+ bl HIDDEN_JUMPTARGET(memset)
+ POP_RET
+#else
+
bzero:
mov r2, r1
mov r1, #0
b HIDDEN_JUMPTARGET(memset)
+#endif
.size bzero,.-bzero