summaryrefslogtreecommitdiff
path: root/libc/string/arm/strncmp.S
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-31 01:41:16 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-31 01:41:16 +0000
commitded219589f184b296190aebcba56b57564f5f337 (patch)
treee6bb727254e9bf591aad23c7c4ea1fdecf408cbf /libc/string/arm/strncmp.S
parent5093fcf1205133dff7181b5d5d12da8db6a724a9 (diff)
Khem Raj says:
add support for using BX instruction for THUMB aware architectures
Diffstat (limited to 'libc/string/arm/strncmp.S')
-rw-r--r--libc/string/arm/strncmp.S10
1 files changed, 9 insertions, 1 deletions
diff --git a/libc/string/arm/strncmp.S b/libc/string/arm/strncmp.S
index 82d45e8f3..d6b36312a 100644
--- a/libc/string/arm/strncmp.S
+++ b/libc/string/arm/strncmp.S
@@ -40,7 +40,11 @@ strncmp:
/* if (len == 0) return 0 */
cmp r2, #0
moveq r0, #0
+#if defined(__USE_BX__)
+ bxeq lr
+#else
moveq pc, lr
+#endif
subs r2, r2, #1
/* ip == last src address to compare */
@@ -53,7 +57,11 @@ strncmp:
cmpcs r2, r3
beq 1b
sub r0, r2, r3
- mov pc, lr
+#if defined(__USE_BX__)
+ bx lr
+#else
+ mov pc, lr
+#endif
.size strncmp,.-strncmp