summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/arm/bswapdi2.S
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-10-07 02:39:13 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-10-07 02:39:13 +0000
commit48d4e4dd3582e9b480a1969cb554437f071b57bc (patch)
tree18617f04bae1630f3af5946c4d1c99969c8618ca /compiler-rt/lib/builtins/arm/bswapdi2.S
parent59cca5dc2976cb16693fb3b7dfa7aee576837501 (diff)
downloadbcm5719-llvm-48d4e4dd3582e9b480a1969cb554437f071b57bc.tar.gz
bcm5719-llvm-48d4e4dd3582e9b480a1969cb554437f071b57bc.zip
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
Diffstat (limited to 'compiler-rt/lib/builtins/arm/bswapdi2.S')
-rw-r--r--compiler-rt/lib/builtins/arm/bswapdi2.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/arm/bswapdi2.S b/compiler-rt/lib/builtins/arm/bswapdi2.S
index 33797ec64df..86f3bba8c29 100644
--- a/compiler-rt/lib/builtins/arm/bswapdi2.S
+++ b/compiler-rt/lib/builtins/arm/bswapdi2.S
@@ -21,7 +21,11 @@
// Reverse all the bytes in a 64-bit integer.
//
.p2align 2
+#if __ARM_ARCH_ISA_THUMB == 2
DEFINE_COMPILERRT_THUMB_FUNCTION(__bswapdi2)
+#else
+DEFINE_COMPILERRT_FUNCTION(__bswapdi2)
+#endif
#if __ARM_ARCH < 6
// before armv6 does not have "rev" instruction
// r2 = rev(r0)
OpenPOWER on IntegriCloud