summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/arm/divmodsi4.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
commit8bf15723ae9cf59a7171981b1b0257de4d48e344 (patch)
tree239923199dc4dec95310bbaeb4f0e6e7f411d9e9 /compiler-rt/lib/builtins/arm/divmodsi4.S
parentb52b141dd06a24b9f04a57f94b0ed7177de88bbc (diff)
downloadbcm5719-llvm-8bf15723ae9cf59a7171981b1b0257de4d48e344.tar.gz
bcm5719-llvm-8bf15723ae9cf59a7171981b1b0257de4d48e344.zip
[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 llvm-svn: 310884
Diffstat (limited to 'compiler-rt/lib/builtins/arm/divmodsi4.S')
-rw-r--r--compiler-rt/lib/builtins/arm/divmodsi4.S8
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler-rt/lib/builtins/arm/divmodsi4.S b/compiler-rt/lib/builtins/arm/divmodsi4.S
index 999c310ec8a..8a027b741ef 100644
--- a/compiler-rt/lib/builtins/arm/divmodsi4.S
+++ b/compiler-rt/lib/builtins/arm/divmodsi4.S
@@ -23,20 +23,14 @@
.syntax unified
.text
-#if __ARM_ARCH_ISA_THUMB == 2
- .thumb
-#endif
+ DEFINE_CODE_STATE
@ int __divmodsi4(int divident, int divisor, int *remainder)
@ Calculate the quotient and remainder of the (signed) division. The return
@ value is the quotient, the remainder is placed in the variable.
.p2align 3
-#if __ARM_ARCH_ISA_THUMB == 2
-DEFINE_COMPILERRT_THUMB_FUNCTION(__divmodsi4)
-#else
DEFINE_COMPILERRT_FUNCTION(__divmodsi4)
-#endif
#if __ARM_ARCH_EXT_IDIV__
tst r1, r1
beq LOCAL_LABEL(divzero)
OpenPOWER on IntegriCloud