diff options
author | Steven Wu <stevenwu@apple.com> | 2014-10-04 00:18:59 +0000 |
---|---|---|
committer | Steven Wu <stevenwu@apple.com> | 2014-10-04 00:18:59 +0000 |
commit | 1dcfa4d85264a1dcc8617705f7268d53d54361f7 (patch) | |
tree | 1afb9c3dabf29c5749900045ab6b95b69c4929e1 /lib/builtins/assembly.h | |
parent | 079fed4c6737cf3dba06a9964cdbafc511c16b78 (diff) |
Fix the armv7 thumb builtins on darwin
The arm builtins converted into thumb in r213481 are not working
on darwin. On apple platforms, .thumb_func directive is required
to generated correct symbols for thumb functions.
<rdar://problem/18523605>
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/assembly.h')
-rw-r--r-- | lib/builtins/assembly.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/builtins/assembly.h b/lib/builtins/assembly.h index 6dbb6ed62..466d777d3 100644 --- a/lib/builtins/assembly.h +++ b/lib/builtins/assembly.h @@ -28,6 +28,10 @@ // tell linker it can break up file at label boundaries #define FILE_LEVEL_DIRECTIVE .subsections_via_symbols #define SYMBOL_IS_FUNC(name) +// rdar://problem/18523605 +#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 @@ -98,6 +102,14 @@ DECLARE_SYMBOL_VISIBILITY(name) \ SYMBOL_NAME(name): +#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) \ + SYMBOL_NAME(name): + #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ FILE_LEVEL_DIRECTIVE SEPARATOR \ .globl SYMBOL_NAME(name) SEPARATOR \ |