diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2017-03-24 17:08:35 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2017-03-24 17:08:35 +0000 |
commit | 9736f90434cf210271d30af6972075ac4b36694f (patch) | |
tree | a205776d5b57d1bbfff45409138b0a6038d78588 /lib/builtins/arm/udivsi3.S | |
parent | c651b5d41839aae2711af96c24b19949a1f38014 (diff) |
Revert "builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA."
This reverts commit c3709191b6d36c4c936173f4a9a29a734b12cb15.
(commit by mistake)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/arm/udivsi3.S')
-rw-r--r-- | lib/builtins/arm/udivsi3.S | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lib/builtins/arm/udivsi3.S b/lib/builtins/arm/udivsi3.S index 2a0209927..fcc472b4f 100644 --- a/lib/builtins/arm/udivsi3.S +++ b/lib/builtins/arm/udivsi3.S @@ -16,7 +16,8 @@ .syntax unified .text -#if defined(USE_THUMB_PROLOGUE) + +#if __ARM_ARCH_ISA_THUMB == 2 .thumb #endif @@ -26,7 +27,7 @@ DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3) @ unsigned int __udivsi3(unsigned int divident, unsigned int divisor) @ Calculate and return the quotient of the (unsigned) division. -#if defined(USE_THUMB_PROLOGUE) +#if __ARM_ARCH_ISA_THUMB == 2 DEFINE_COMPILERRT_THUMB_FUNCTION(__udivsi3) #else DEFINE_COMPILERRT_FUNCTION(__udivsi3) @@ -39,7 +40,7 @@ DEFINE_COMPILERRT_FUNCTION(__udivsi3) #else cmp r1, #1 bcc LOCAL_LABEL(divby0) -#if defined(USE_THUMB_1) +#if __ARM_ARCH_ISA_THUMB == 1 bne LOCAL_LABEL(num_neq_denom) JMP(lr) LOCAL_LABEL(num_neq_denom): @@ -48,7 +49,7 @@ LOCAL_LABEL(num_neq_denom): JMPc(lr, eq) #endif cmp r0, r1 -#if defined(USE_THUMB_1) +#if __ARM_ARCH_ISA_THUMB == 1 bhs LOCAL_LABEL(num_ge_denom) movs r0, #0 JMP(lr) @@ -80,7 +81,7 @@ LOCAL_LABEL(num_ge_denom): clz r3, r1 /* r0 >= r1 implies clz(r0) <= clz(r1), so ip <= r3. */ sub r3, r3, ip -# if defined(USE_THUMB_2) +# if __ARM_ARCH_ISA_THUMB == 2 adr ip, LOCAL_LABEL(div0block) + 1 sub ip, ip, r3, lsl #1 # else @@ -91,17 +92,17 @@ LOCAL_LABEL(num_ge_denom): mov r3, #0 bx ip # else /* No CLZ Feature */ -# if defined(USE_THUMB_2) +# if __ARM_ARCH_ISA_THUMB == 2 # error THUMB mode requires CLZ or UDIV # endif -# if defined(USE_THUMB_1) +# if __ARM_ARCH_ISA_THUMB == 1 # define BLOCK_SIZE 10 # else # define BLOCK_SIZE 12 # endif mov r2, r0 -# if defined(USE_THUMB_1) +# if __ARM_ARCH_ISA_THUMB == 1 mov ip, r0 adr r0, LOCAL_LABEL(div0block) adds r0, #1 @@ -110,7 +111,7 @@ LOCAL_LABEL(num_ge_denom): # endif lsrs r3, r2, #16 cmp r3, r1 -# if defined(USE_THUMB_1) +# if __ARM_ARCH_ISA_THUMB == 1 blo LOCAL_LABEL(skip_16) movs r2, r3 subs r0, r0, #(16 * BLOCK_SIZE) @@ -122,7 +123,7 @@ LOCAL_LABEL(skip_16): lsrs r3, r2, #8 cmp r3, r1 -# if defined(USE_THUMB_1) +# if __ARM_ARCH_ISA_THUMB == 1 blo LOCAL_LABEL(skip_8) movs r2, r3 subs r0, r0, #(8 * BLOCK_SIZE) @@ -134,7 +135,7 @@ LOCAL_LABEL(skip_8): lsrs r3, r2, #4 cmp r3, r1 -# if defined(USE_THUMB_1) +# if __ARM_ARCH_ISA_THUMB == 1 blo LOCAL_LABEL(skip_4) movs r2, r3 subs r0, r0, #(4 * BLOCK_SIZE) @@ -146,7 +147,7 @@ LOCAL_LABEL(skip_4): lsrs r3, r2, #2 cmp r3, r1 -# if defined(USE_THUMB_1) +# if __ARM_ARCH_ISA_THUMB == 1 blo LOCAL_LABEL(skip_2) movs r2, r3 subs r0, r0, #(2 * BLOCK_SIZE) @@ -157,7 +158,7 @@ LOCAL_LABEL(skip_2): # endif /* Last block, no need to update r2 or r3. */ -# if defined(USE_THUMB_1) +# if __ARM_ARCH_ISA_THUMB == 1 lsrs r3, r2, #1 cmp r3, r1 blo LOCAL_LABEL(skip_1) @@ -190,7 +191,7 @@ LOCAL_LABEL(divby0): JMP(lr) -#if defined(USE_THUMB_1) +#if __ARM_ARCH_ISA_THUMB == 1 #define block(shift) \ lsls r2, r1, IMM shift; \ cmp r0, r2; \ |