diff options
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, |