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.

llvm-svn: 213309
This commit is contained in:
Stephen Hines 2014-07-17 20:41:01 +00:00
parent b9574aceae
commit 31a38cc32f
3 changed files with 8 additions and 47 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)