summaryrefslogtreecommitdiff
path: root/lib/builtins/assembly.h
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
commitd87d6b7cab967c9b871dd05d0ccdcf60efd80ce1 (patch)
treec5553086f0ef3df681a8f15c09bf263fd8775e51 /lib/builtins/assembly.h
parent50dd381613a818bc44d809d057d2f5dcb02ee0f3 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/assembly.h')
-rw-r--r--lib/builtins/assembly.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/builtins/assembly.h b/lib/builtins/assembly.h
index 2828b156a..3b0da228d 100644
--- a/lib/builtins/assembly.h
+++ b/lib/builtins/assembly.h
@@ -28,15 +28,11 @@
// tell linker it can break up file at label boundaries
#define FILE_LEVEL_DIRECTIVE .subsections_via_symbols
#define SYMBOL_IS_FUNC(name)
-#if __ARM_ARCH_ISA_THUMB == 2
-#define THUMB_FUNC .thumb_func
-#endif
#elif defined(__ELF__)
#define HIDDEN(name) .hidden name
#define LOCAL_LABEL(name) .L_##name
-#define THUMB_FUNC
#define FILE_LEVEL_DIRECTIVE
#if defined(__arm__)
#define SYMBOL_IS_FUNC(name) .type name,%function
@@ -48,13 +44,13 @@
#define HIDDEN_DIRECTIVE(name)
#define LOCAL_LABEL(name) .L ## name
+#define FILE_LEVEL_DIRECTIVE
#define SYMBOL_IS_FUNC(name) \
.def name SEPARATOR \
.scl 2 SEPARATOR \
.type 32 SEPARATOR \
.endef
-#define THUMB_FUNC
-#define FILE_LEVEL_DIRECTIVE
+
#endif
#if defined(__arm__)
@@ -110,9 +106,9 @@
#define DEFINE_COMPILERRT_THUMB_FUNCTION(name) \
FILE_LEVEL_DIRECTIVE SEPARATOR \
.globl SYMBOL_NAME(name) SEPARATOR \
- THUMB_FUNC \
SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \
- DECLARE_SYMBOL_VISIBILITY(name) \
+ DECLARE_SYMBOL_VISIBILITY(name) SEPARATOR \
+ .thumb_func \
SYMBOL_NAME(name):
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \