From b14ef0e24bcb70d70360690130b2bf2a0c8f8d33 Mon Sep 17 00:00:00 2001 From: Edmund Grimley Evans Date: Fri, 13 Feb 2015 18:58:31 +0000 Subject: Add arm64 (AArch64) as a target architecture. --- libtcc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libtcc.c') diff --git a/libtcc.c b/libtcc.c index 01497b2..c68221e 100644 --- a/libtcc.c +++ b/libtcc.c @@ -45,6 +45,9 @@ ST_DATA struct TCCState *tcc_state; #ifdef TCC_TARGET_ARM #include "arm-gen.c" #endif +#ifdef TCC_TARGET_ARM64 +#include "arm64-gen.c" +#endif #ifdef TCC_TARGET_C67 #include "c67-gen.c" #endif @@ -959,6 +962,8 @@ LIBTCCAPI TCCState *tcc_new(void) #else s->float_abi = ARM_SOFTFP_FLOAT; #endif +#elif defined(TCC_TARGET_ARM64) + tcc_define_symbol(s, "__aarch64__", NULL); #endif #ifdef TCC_TARGET_PE @@ -1560,7 +1565,7 @@ static int tcc_set_linker(TCCState *s, const char *option) } else if (link_option(option, "oformat=", &p)) { #if defined(TCC_TARGET_PE) if (strstart("pe-", &p)) { -#elif defined(TCC_TARGET_X86_64) +#elif defined(TCC_TARGET_ARM64) || defined(TCC_TARGET_X86_64) if (strstart("elf64-", &p)) { #else if (strstart("elf32-", &p)) { -- cgit v1.3.1