summaryrefslogtreecommitdiff
path: root/lib/builtins/arm/aeabi_uidivmod.S
diff options
context:
space:
mode:
authorWeiming Zhao <weimingz@codeaurora.org>2017-08-14 20:48:47 +0000
committerWeiming Zhao <weimingz@codeaurora.org>2017-08-14 20:48:47 +0000
commit4ae44f4ac154fc0bb0458f33c4c6bef0837d9fa8 (patch)
treee1d0dbf8dc534e91857e245b9217deba48bef6a4 /lib/builtins/arm/aeabi_uidivmod.S
parent435b4b3eb8f094a9ccb434b23aa87b1e56055dac (diff)
downloadcompiler-rt-4ae44f4ac154fc0bb0458f33c4c6bef0837d9fa8.tar.gz
[builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA
Summary: Value of __ARM_ARCH_ISA_THUMB isn't based on the actual compilation mode (-mthumb, -marm), it reflect's capability of given CPU. Due to this: •use tbumb and thumb2 insteand of __ARM_ARCH_ISA_THUMB •use '.thumb' directive consistently in all affected files •decorate all thumb functions using DEFINE_COMPILERRT_THUMB_FUNCTION() (This is based off Michal's patch https://reviews.llvm.org/D30938) Reviewers: dim, rengolin, compnerd, strejda Reviewed By: compnerd Subscribers: peter.smith, kubamracek, mgorny, javed.absar, kristof.beyls, jamesduley, aemerson, llvm-commits Differential Revision: https://reviews.llvm.org/D31220 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/arm/aeabi_uidivmod.S')
-rw-r--r--lib/builtins/arm/aeabi_uidivmod.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/builtins/arm/aeabi_uidivmod.S b/lib/builtins/arm/aeabi_uidivmod.S
index a627fc740..88a4a6d8b 100644
--- a/lib/builtins/arm/aeabi_uidivmod.S
+++ b/lib/builtins/arm/aeabi_uidivmod.S
@@ -21,9 +21,11 @@
#endif
.syntax unified
+ .text
+ DEFINE_CODE_STATE
.p2align 2
DEFINE_COMPILERRT_FUNCTION(__aeabi_uidivmod)
-#if __ARM_ARCH_ISA_THUMB == 1
+#if defined(USE_THUMB_1)
cmp r0, r1
bcc LOCAL_LABEL(case_denom_larger)
push {r0, r1, lr}
@@ -36,7 +38,7 @@ LOCAL_LABEL(case_denom_larger):
movs r1, r0
movs r0, #0
JMP (lr)
-#else
+#else // defined(USE_THUMB_1)
push { lr }
sub sp, sp, #4
mov r2, sp