diff options
author | andrew <andrew@FreeBSD.org> | 2013-01-18 22:52:59 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2013-01-18 22:52:59 +0000 |
commit | 1503599bdce0b577ceb27d1332e6ac5e586389f9 (patch) | |
tree | d700fc7bf0c3bb2f309e25c1cec8bcdb4e60f832 /contrib/compiler-rt/lib/arm/udivsi3.S | |
parent | d0b9f3f9cfbe900c3fad63d0186d237e265b69f5 (diff) | |
download | FreeBSD-src-1503599bdce0b577ceb27d1332e6ac5e586389f9.zip FreeBSD-src-1503599bdce0b577ceb27d1332e6ac5e586389f9.tar.gz |
Import compiler-rt r172839.
This brings in __aeabi_lcmp and __aeabi_ulcmp. It also fixes the spelling
of __aeabi_f2lz. Both changes originated on the arm_eabi project branch.
Diffstat (limited to 'contrib/compiler-rt/lib/arm/udivsi3.S')
-rw-r--r-- | contrib/compiler-rt/lib/arm/udivsi3.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/compiler-rt/lib/arm/udivsi3.S b/contrib/compiler-rt/lib/arm/udivsi3.S index 6d89665..28979fe 100644 --- a/contrib/compiler-rt/lib/arm/udivsi3.S +++ b/contrib/compiler-rt/lib/arm/udivsi3.S @@ -33,6 +33,15 @@ // Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine. DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3) DEFINE_COMPILERRT_FUNCTION(__udivsi3) +#if __ARM_ARCH_7S__ + tst r1,r1 + beq LOCAL_LABEL(divzero) + udiv r0, r0, r1 + bx lr + LOCAL_LABEL(divzero): + mov r0,#0 + bx lr +#else // We use a simple digit by digit algorithm; before we get into the actual // divide loop, we must calculate the left-shift amount necessary to align // the MSB of the divisor with that of the dividend (If this shift is @@ -78,3 +87,4 @@ LOCAL_LABEL(return): // Move the quotient to r0 and return. mov r0, q CLEAR_FRAME_AND_RETURN +#endif |