[compiler-rt] r213309 - Revert Thumb-2 conversion of some ARM builtins.
Stephen Hines
srhines at google.com
Thu Jul 17 13:41:01 PDT 2014
Author: srhines
Date: Thu Jul 17 15:41:01 2014
New Revision: 213309
URL: http://llvm.org/viewvc/llvm-project?rev=213309&view=rev
Log:
Revert Thumb-2 conversion of some ARM builtins.
The udivmodsi4/modsi3/umodsi3 code computes jump targets based on ARM encodings
(if CLZ is present and IDIV is not present).
Reverts parts of r211032 and r211035.
Modified:
compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S
compiler-rt/trunk/lib/builtins/arm/udivsi3.S
compiler-rt/trunk/lib/builtins/arm/umodsi3.S
Modified: compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S?rev=213309&r1=213308&r2=213309&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S Thu Jul 17 15:41:01 2014
@@ -16,9 +16,6 @@
.syntax unified
.text
-#if __ARM_ARCH_ISA_THUMB == 2
- .thumb
-#endif
.p2align 2
DEFINE_COMPILERRT_FUNCTION(__udivmodsi4)
@@ -99,16 +96,9 @@ DEFINE_COMPILERRT_FUNCTION(__udivmodsi4)
#define IMM #
-#if __ARM_ARCH_ISA_THUMB == 2
-#define ITT itt
-#else
-#define ITT @
-#endif
-
-#define block(shift) \
- cmp r0, r1, lsl IMM shift; \
- ITT hs; \
- addhs r3, r3, IMM (1 << shift); \
+#define block(shift) \
+ cmp r0, r1, lsl IMM shift; \
+ addhs r3, r3, IMM (1 << shift); \
subhs r0, r0, r1, lsl IMM shift
block(31)
Modified: compiler-rt/trunk/lib/builtins/arm/udivsi3.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/udivsi3.S?rev=213309&r1=213308&r2=213309&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/udivsi3.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/udivsi3.S Thu Jul 17 15:41:01 2014
@@ -16,17 +16,6 @@
.syntax unified
.text
-#if __ARM_ARCH_ISA_THUMB == 2
- .thumb
-#endif
-
-#if __ARM_ARCH_ISA_THUMB == 2
-#define IT it
-#define ITT itt
-#else
-#define IT @
-#define ITT @
-#endif
.p2align 2
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3)
@@ -40,12 +29,9 @@ DEFINE_COMPILERRT_FUNCTION(__udivsi3)
bx lr
#else
cmp r1, #1
- IT cc
bcc LOCAL_LABEL(divby0)
- IT eq
JMPc(lr, eq)
cmp r0, r1
- ITT cc
movcc r0, #0
JMPc(lr, cc)
/*
@@ -108,10 +94,9 @@ DEFINE_COMPILERRT_FUNCTION(__udivsi3)
#define IMM #
-#define block(shift) \
- cmp r0, r1, lsl IMM shift; \
- ITT hs; \
- addhs r3, r3, IMM (1 << shift); \
+#define block(shift) \
+ cmp r0, r1, lsl IMM shift; \
+ addhs r3, r3, IMM (1 << shift); \
subhs r0, r0, r1, lsl IMM shift
block(31)
Modified: compiler-rt/trunk/lib/builtins/arm/umodsi3.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/umodsi3.S?rev=213309&r1=213308&r2=213309&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/umodsi3.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/umodsi3.S Thu Jul 17 15:41:01 2014
@@ -16,17 +16,6 @@
.syntax unified
.text
-#if __ARM_ARCH_ISA_THUMB == 2
- .thumb
-#endif
-
-#if __ARM_ARCH_ISA_THUMB == 2
-#define IT it
-#define ITT itt
-#else
-#define IT @
-#define ITT @
-#endif
.p2align 2
DEFINE_COMPILERRT_FUNCTION(__umodsi3)
@@ -41,11 +30,9 @@ DEFINE_COMPILERRT_FUNCTION(__umodsi3)
#else
cmp r1, #1
bcc LOCAL_LABEL(divby0)
- ITT eq
moveq r0, #0
JMPc(lr, eq)
cmp r0, r1
- IT cc
JMPc(lr, cc)
/*
* Implement division using binary long division algorithm.
@@ -103,9 +90,8 @@ DEFINE_COMPILERRT_FUNCTION(__umodsi3)
#define IMM #
-#define block(shift) \
- cmp r0, r1, lsl IMM shift; \
- IT hs; \
+#define block(shift) \
+ cmp r0, r1, lsl IMM shift; \
subhs r0, r0, r1, lsl IMM shift
block(31)
More information about the llvm-commits
mailing list