arm: Emit .thumb_func directives

Prior to Xcode 9.3, the clang built-in assembler didn't support
altmacro, and gas-preprocessor was used for assembling for arm/darwin.

For thumb functions, gas-preprocessor took care of adding the .thumb_func
directives, but when now being able to assemble without gas-preprocessor,
we need to add these directives ourselves.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2018-10-12 13:29:51 +03:00
parent 04e8b8b053
commit 5584abf69d
1 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,12 @@
# define FPU @ # define FPU @
#endif #endif
#if CONFIG_THUMB && defined(__APPLE__)
# define TFUNC
#else
# define TFUNC @
#endif
#if HAVE_AS_ARCH_DIRECTIVE #if HAVE_AS_ARCH_DIRECTIVE
#if HAVE_NEON #if HAVE_NEON
.arch armv7-a .arch armv7-a
@ -98,10 +104,12 @@ FUNC .endfunc
.global EXTERN_ASM\name .global EXTERN_ASM\name
ELF .type EXTERN_ASM\name, %function ELF .type EXTERN_ASM\name, %function
FUNC .func EXTERN_ASM\name FUNC .func EXTERN_ASM\name
TFUNC .thumb_func EXTERN_ASM\name
EXTERN_ASM\name: EXTERN_ASM\name:
.else .else
ELF .type \name, %function ELF .type \name, %function
FUNC .func \name FUNC .func \name
TFUNC .thumb_func \name
\name: \name:
.endif .endif
.endm .endm