svn commit: r270012 - in projects/arm64: contrib/gcc gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcc/arm64
Andrew Turner
andrew at FreeBSD.org
Fri Aug 15 09:10:18 UTC 2014
Author: andrew
Date: Fri Aug 15 09:10:17 2014
New Revision: 270012
URL: http://svnweb.freebsd.org/changeset/base/270012
Log:
Port the GNU parts of CSU and libgcc_s to arm64. Unfortunately
execute_cfa_program causes the following with clang. As the backend
has changed significantly in 3.5 no effort to diagnose or fix the
problem will take place.
Assertion failed: (Scavenged[SI].FrameIndex >= 0 &&
"Cannot scavenge register without an emergency spill slot!"),
function scavengeRegister, file
<llvm location>/lib/CodeGen/RegisterScavenging.cpp, line 415.
Stack dump:
0. Program arguments: <compiler command>
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module <file location>
4. Running pass 'Prologue/Epilogue Insertion & Frame Finalization'
on function '@execute_cfa_program'
Added:
projects/arm64/gnu/lib/libgcc/arm64/
projects/arm64/gnu/lib/libgcc/arm64/arm64.h
projects/arm64/gnu/lib/libgcc/arm64/freebsd.h
Modified:
projects/arm64/contrib/gcc/unwind-dw2.c
projects/arm64/gnu/lib/csu/Makefile
projects/arm64/gnu/lib/libgcc/Makefile
Modified: projects/arm64/contrib/gcc/unwind-dw2.c
==============================================================================
--- projects/arm64/contrib/gcc/unwind-dw2.c Fri Aug 15 07:30:14 2014 (r270011)
+++ projects/arm64/contrib/gcc/unwind-dw2.c Fri Aug 15 09:10:17 2014 (r270012)
@@ -849,6 +849,8 @@ execute_cfa_program (const unsigned char
struct _Unwind_Context *context,
_Unwind_FrameState *fs)
{
+ abort();
+#if 0 /* Broken woth clang 3.4 for arm64 */
struct frame_state_reg_info *unused_rs = NULL;
/* Don't allow remember/restore between CIE and FDE programs. */
@@ -1082,6 +1084,7 @@ execute_cfa_program (const unsigned char
gcc_unreachable ();
}
}
+#endif
}
/* Given the _Unwind_Context CONTEXT for a stack frame, look up the FDE for
Modified: projects/arm64/gnu/lib/csu/Makefile
==============================================================================
--- projects/arm64/gnu/lib/csu/Makefile Fri Aug 15 07:30:14 2014 (r270011)
+++ projects/arm64/gnu/lib/csu/Makefile Fri Aug 15 09:10:17 2014 (r270012)
@@ -20,7 +20,7 @@ CFLAGS+= -fno-inline-functions -fno-exce
-fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \
-fno-omit-frame-pointer
CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \
- -I${CCDIR}/cc_tools
+ -I${CCDIR}/cc_tools -I${.CURDIR}/../libgcc
CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
MKDEP= -DCRT_BEGIN
Modified: projects/arm64/gnu/lib/libgcc/Makefile
==============================================================================
--- projects/arm64/gnu/lib/libgcc/Makefile Fri Aug 15 07:30:14 2014 (r270011)
+++ projects/arm64/gnu/lib/libgcc/Makefile Fri Aug 15 09:10:17 2014 (r270012)
@@ -25,7 +25,8 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F
-DHAVE_GTHR_DEFAULT \
-I${GCCLIB}/include \
-I${GCCDIR}/config -I${GCCDIR} -I. \
- -I${.CURDIR}/../../usr.bin/cc/cc_tools
+ -I${.CURDIR}/../../usr.bin/cc/cc_tools \
+ -I${.CURDIR}
LDFLAGS+= -nodefaultlibs
LDADD+= -lc
@@ -55,7 +56,8 @@ LIB2FUNCS+= _fixuns${mode}si
.endfor
# Likewise double-word routines.
-.if ${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no"
+.if (${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no") && \
+ ${TARGET_CPUARCH} != "arm64"
# These are implemented in an ARM specific file but will not be filtered out
.for mode in sf df xf tf
LIB2FUNCS+= _fix${mode}di _fixuns${mode}di
Added: projects/arm64/gnu/lib/libgcc/arm64/arm64.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/arm64/gnu/lib/libgcc/arm64/arm64.h Fri Aug 15 09:10:17 2014 (r270012)
@@ -0,0 +1,3 @@
+
+/* Mostly made up */
+#define FIRST_PSEUDO_REGISTER 96
Added: projects/arm64/gnu/lib/libgcc/arm64/freebsd.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/arm64/gnu/lib/libgcc/arm64/freebsd.h Fri Aug 15 09:10:17 2014 (r270012)
@@ -0,0 +1,5 @@
+
+#undef INIT_SECTION_ASM_OP
+#undef FINI_SECTION_ASM_OP
+#define INIT_ARRAY_SECTION_ASM_OP "\t.section\t.init_array,\"aw\",%init_array"
+#define FINI_ARRAY_SECTION_ASM_OP "\t.section\t.fini_array,\"aw\",%fini_array"
More information about the svn-src-projects
mailing list