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 | 84610ba9b38d917317ac997074acacd99962d767 (patch) | |
tree | adf2c8bbd9c73ee388f4c49f7fe7a2b1068807df /compiler-rt/lib/builtins/assembly.h | |
parent | 09d00bb4d7e7d9242d90ab03a383af9626e66255 (diff) | |
download | bcm5719-llvm-84610ba9b38d917317ac997074acacd99962d767.tar.gz bcm5719-llvm-84610ba9b38d917317ac997074acacd99962d767.zip |
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>
llvm-svn: 219040
Diffstat (limited to 'compiler-rt/lib/builtins/assembly.h')
-rw-r--r-- | compiler-rt/lib/builtins/assembly.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h index 6dbb6ed6219..466d777d3e3 100644 --- a/compiler-rt/lib/builtins/assembly.h +++ b/compiler-rt/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 \ |