diff options
author | Manoj Gupta <manojgupta@google.com> | 2017-09-27 09:33:14 +0000 |
---|---|---|
committer | Manoj Gupta <manojgupta@google.com> | 2017-09-27 09:33:14 +0000 |
commit | 979ca65606f617f75c2b512eb1a1dfe0c32eb687 (patch) | |
tree | 4bec1f5697b98de9a8d8face8870e4d377f62bf2 /lib/builtins/assembly.h | |
parent | 6605057457b9799788dd125ec92930f0057f088f (diff) |
[Builtins] ARM: Fix assembling files in thumb mode.
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.
Fixes PR 34715.
Reviewers: compnerd, peter.smith, srhines, weimingz, rengolin
Reviewed By: compnerd
Subscribers: aemerson, javed.absar, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D38227
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/assembly.h')
-rw-r--r-- | lib/builtins/assembly.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/builtins/assembly.h b/lib/builtins/assembly.h index 58116114a..8695075b6 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) @@ -146,6 +146,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 +155,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 +164,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 +173,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 \ |