diff options
author | Tim Northover <tnorthover@apple.com> | 2014-10-08 17:28:37 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-10-08 17:28:37 +0000 |
commit | c1bdff019f0b948d949e535ebd91586f95ef7c42 (patch) | |
tree | a28ec708f2a3eebf8abc6444da4425af597c011c /lib/builtins | |
parent | 7f8371a90e00394baad495acebb65184de8f563d (diff) |
AArch64: add support for ARM64 iOS versions of compiler-rt.
Just a dummy directory and a few sane choices in the Darwin SDK.
rdar://problem/18575597
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins')
-rw-r--r-- | lib/builtins/Makefile.mk | 3 | ||||
-rw-r--r-- | lib/builtins/arm64/Makefile.mk | 20 | ||||
-rw-r--r-- | lib/builtins/arm64/dummy.c | 13 | ||||
-rw-r--r-- | lib/builtins/gcc_personality_v0.c | 2 |
4 files changed, 37 insertions, 1 deletions
diff --git a/lib/builtins/Makefile.mk b/lib/builtins/Makefile.mk index 4dbadd0bf..00e2f53fc 100644 --- a/lib/builtins/Makefile.mk +++ b/lib/builtins/Makefile.mk @@ -13,6 +13,9 @@ SubDirs := # Add arch specific optimized implementations. SubDirs += i386 ppc x86_64 arm armv6m +# Add ARM64 dir. +SubDirs += arm64 + # Define the variables for this specific directory. Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file))) ObjNames := $(Sources:%.c=%.o) diff --git a/lib/builtins/arm64/Makefile.mk b/lib/builtins/arm64/Makefile.mk new file mode 100644 index 000000000..7f7e38661 --- /dev/null +++ b/lib/builtins/arm64/Makefile.mk @@ -0,0 +1,20 @@ +#===- lib/builtins/arm64/Makefile.mk -----------------------*- Makefile -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +ModuleName := builtins +SubDirs := +OnlyArchs := arm64 + +AsmSources := $(foreach file,$(wildcard $(Dir)/*.S),$(notdir $(file))) +Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file))) +ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o) +Implementation := Optimized + +# FIXME: use automatic dependencies? +Dependencies := $(wildcard lib/*.h $(Dir)/*.h) diff --git a/lib/builtins/arm64/dummy.c b/lib/builtins/arm64/dummy.c new file mode 100644 index 000000000..76bec3048 --- /dev/null +++ b/lib/builtins/arm64/dummy.c @@ -0,0 +1,13 @@ +/* ===---------- dummy.c - Implements dummy function, for bringup -----------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + */ + +static void dummy(void) __attribute__((used)); + +static void dummy(void) {} diff --git a/lib/builtins/gcc_personality_v0.c b/lib/builtins/gcc_personality_v0.c index 91a77f444..869f4178e 100644 --- a/lib/builtins/gcc_personality_v0.c +++ b/lib/builtins/gcc_personality_v0.c @@ -180,7 +180,7 @@ static uintptr_t readEncodedPointer(const uint8_t** data, uint8_t encoding) * on each frame as the stack is unwound during a C++ exception * throw through a C function compiled with -fexceptions. */ -#if __arm__ +#if __USING_SJLJ_EXCEPTIONS__ // the setjump-longjump based exceptions personality routine has a different name COMPILER_RT_ABI _Unwind_Reason_Code __gcc_personality_sj0(int version, _Unwind_Action actions, |