aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-12-03 10:31:31 +0200
committerMartin Storsjö <martin@martin.st>2020-12-03 15:31:06 +0200
commitd3fef7a7c25eba804f5e75b0bb352ed0aaa7c057 (patch)
tree150aed81d652578a4997255dd9173570dd89fdcd
parent7d30df7b59973a42a93c86cb501bd3d0fbb07404 (diff)
downloadllvm-d3fef7a7c25eba804f5e75b0bb352ed0aaa7c057.zip
llvm-d3fef7a7c25eba804f5e75b0bb352ed0aaa7c057.tar.gz
llvm-d3fef7a7c25eba804f5e75b0bb352ed0aaa7c057.tar.bz2
[compiler-rt] Fix building the aarch64 out-of-line atomics assembly for non-ELF platforms
Move the two different definitions of FUNC_ALIGN out of the ELF specific block. Add the missing CFI_END in END_COMPILERRT_OUTLINE_FUNCTION, to go with the corresponding CFI_START in DEFINE_COMPILERRT_OUTLINE_FUNCTION_UNMANGLED. Differential Revision: https://reviews.llvm.org/D92549
-rw-r--r--compiler-rt/lib/builtins/assembly.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h
index 3b7f592..66625a9 100644
--- a/compiler-rt/lib/builtins/assembly.h
+++ b/compiler-rt/lib/builtins/assembly.h
@@ -37,12 +37,8 @@
#define FILE_LEVEL_DIRECTIVE
#if defined(__arm__) || defined(__aarch64__)
#define SYMBOL_IS_FUNC(name) .type name,%function
-#define FUNC_ALIGN \
- .text SEPARATOR \
- .balign 16 SEPARATOR
#else
#define SYMBOL_IS_FUNC(name) .type name,@function
-#define FUNC_ALIGN
#endif
#define CONST_SECTION .section .rodata
@@ -69,6 +65,14 @@
#endif
+#if defined(__arm__) || defined(__aarch64__)
+#define FUNC_ALIGN \
+ .text SEPARATOR \
+ .balign 16 SEPARATOR
+#else
+#define FUNC_ALIGN
+#endif
+
// BTI and PAC gnu property note
#define NT_GNU_PROPERTY_TYPE_0 5
#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000
@@ -270,7 +274,8 @@
.size SYMBOL_NAME(name), . - SYMBOL_NAME(name)
#else
#define END_COMPILERRT_FUNCTION(name)
-#define END_COMPILERRT_OUTLINE_FUNCTION(name)
+#define END_COMPILERRT_OUTLINE_FUNCTION(name) \
+ CFI_END
#endif
#endif // COMPILERRT_ASSEMBLY_H