builtins: rework use of DEFINE_COMPILERRT_THUMB_FUNCTION
This is simply to help clarity of the code. The functions are built as thumb
only if Thumb2 is available (__ARM_ARCH_ISA_THUMB == 2). Sink the selection
into the location of the definition and make DEFINE_COMPILERRT_THUMB_FUNCTION
always define a thumb function while DEFINE_COMPILERRT_FUNCTION always selects
the default.
Since the .thumb_func directive is always available (at least on Linux, Windows,
and BSD), sinking the macro right into the macro works just as well.
No functional change intended.
llvm-svn: 219182
diff --git a/compiler-rt/lib/builtins/arm/udivsi3.S b/compiler-rt/lib/builtins/arm/udivsi3.S
index 93279b6..165b2b5 100644
--- a/compiler-rt/lib/builtins/arm/udivsi3.S
+++ b/compiler-rt/lib/builtins/arm/udivsi3.S
@@ -27,7 +27,11 @@
@ unsigned int __udivsi3(unsigned int divident, unsigned int divisor)
@ Calculate and return the quotient of the (unsigned) division.
+#if __ARM_ARCH_ISA_THUMB == 2
DEFINE_COMPILERRT_THUMB_FUNCTION(__udivsi3)
+#else
+DEFINE_COMPILERRT_FUNCTION(__udivsi3)
+#endif
#if __ARM_ARCH_EXT_IDIV__
tst r1, r1
beq LOCAL_LABEL(divby0)