diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2016-12-05 21:40:36 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2016-12-05 21:40:36 +0000 |
commit | adf4258f50f79c4fad8ac3b7bb73f7235556b6c8 (patch) | |
tree | e6fbd9c3df047e0ddea5fb80a2aa5ba8add04eb7 /compiler-rt/lib/builtins/assembly.h | |
parent | 6ad7b9f83712f171acec4d55c3b295c15cb3037c (diff) | |
download | bcm5719-llvm-adf4258f50f79c4fad8ac3b7bb73f7235556b6c8.tar.gz bcm5719-llvm-adf4258f50f79c4fad8ac3b7bb73f7235556b6c8.zip |
builtins: Add ARM Thumb1 implementation for uidiv and uidivmod
Summary:
The current uidiv supports archs without clz. However, the asm is for thumb2/arm.
For uidivmod, the existing code calls the C version of uidivmodsi4, which then calls uidiv. The extra push/pop/bl makes it less efficient.
Reviewers: jmolloy, jroelofs, joerg, compnerd, rengolin
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D27309
llvm-svn: 288710
Diffstat (limited to 'compiler-rt/lib/builtins/assembly.h')
-rw-r--r-- | compiler-rt/lib/builtins/assembly.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h index 5e36b5a5edf..377b3ea0861 100644 --- a/compiler-rt/lib/builtins/assembly.h +++ b/compiler-rt/lib/builtins/assembly.h @@ -71,7 +71,8 @@ #define ARM_HAS_BX #endif #if !defined(__ARM_FEATURE_CLZ) && \ - (__ARM_ARCH >= 6 || (__ARM_ARCH == 5 && !defined(__ARM_ARCH_5__))) + ((__ARM_ARCH >= 6 && __ARM_ARCH_PROFILE != 'M') || \ + (__ARM_ARCH == 5 && !defined(__ARM_ARCH_5__))) #define __ARM_FEATURE_CLZ #endif |