diff options
author | Manoj Gupta <manojgupta@google.com> | 2017-10-02 20:56:49 +0000 |
---|---|---|
committer | Manoj Gupta <manojgupta@google.com> | 2017-10-02 20:56:49 +0000 |
commit | 4ce970d8622ec09b3b4b30c77800198221c75b85 (patch) | |
tree | 23cc7667e33deedfa8649e6a99a643f3a32a7210 /lib/builtins/assembly.h | |
parent | 3ce56013ccfd444b11b2d5b4769c006fc9517682 (diff) |
[builtins] ARM: Reland fix for assembling builtins in thumb state.
Summary:
clang does not assemble files in thumb mode unless .thumb declaration
is present. Add .thumb/.arm decl to _FUNCTION macros to ensure that
files are assembled correctly.
Also add a fix to ensure that armv7k-watchos can assemble the
aeabi_c{f|d}cmp.S files.
Fixes PR 34715.
Reviewers: compnerd, peter.smith, srhines, weimingz, rengolin, efriedma, t.p.northover, fjricci
Reviewed By: compnerd
Subscribers: aemerson, javed.absar, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D38390
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/assembly.h')
-rw-r--r-- | lib/builtins/assembly.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/builtins/assembly.h b/lib/builtins/assembly.h index 58116114a..3f5e59b25 100644 --- a/lib/builtins/assembly.h +++ b/lib/builtins/assembly.h @@ -75,7 +75,7 @@ * - for '-mthumb -march=armv7' compiler defines '__thumb__' and '__thumb2__' */ #if defined(__thumb2__) || defined(__thumb__) -#define DEFINE_CODE_STATE .thumb +#define DEFINE_CODE_STATE .thumb SEPARATOR #define DECLARE_FUNC_ENCODING .thumb_func SEPARATOR #if defined(__thumb2__) #define USE_THUMB_2 @@ -89,7 +89,7 @@ #define ITE(cond) #endif // defined(__thumb__2) #else // !defined(__thumb2__) && !defined(__thumb__) -#define DEFINE_CODE_STATE .arm +#define DEFINE_CODE_STATE .arm SEPARATOR #define DECLARE_FUNC_ENCODING #define IT(cond) #define ITT(cond) @@ -132,6 +132,7 @@ #endif #else // !defined(__arm) #define DECLARE_FUNC_ENCODING +#define DEFINE_CODE_STATE #endif #define GLUE2(a, b) a##b @@ -146,6 +147,7 @@ #endif #define DEFINE_COMPILERRT_FUNCTION(name) \ + DEFINE_CODE_STATE \ FILE_LEVEL_DIRECTIVE SEPARATOR \ .globl SYMBOL_NAME(name) SEPARATOR \ SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \ @@ -154,6 +156,7 @@ SYMBOL_NAME(name): #define DEFINE_COMPILERRT_THUMB_FUNCTION(name) \ + DEFINE_CODE_STATE \ FILE_LEVEL_DIRECTIVE SEPARATOR \ .globl SYMBOL_NAME(name) SEPARATOR \ SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \ @@ -162,6 +165,7 @@ SYMBOL_NAME(name): #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ + DEFINE_CODE_STATE \ FILE_LEVEL_DIRECTIVE SEPARATOR \ .globl SYMBOL_NAME(name) SEPARATOR \ SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \ @@ -170,6 +174,7 @@ SYMBOL_NAME(name): #define DEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(name) \ + DEFINE_CODE_STATE \ .globl name SEPARATOR \ SYMBOL_IS_FUNC(name) SEPARATOR \ HIDDEN(name) SEPARATOR \ |