From owner-svn-src-projects@FreeBSD.ORG Fri Aug 15 09:10:18 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D6AEAE4; Fri, 15 Aug 2014 09:10:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 692A92E2D; Fri, 15 Aug 2014 09:10:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7F9AIno041317; Fri, 15 Aug 2014 09:10:18 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7F9AHhZ041308; Fri, 15 Aug 2014 09:10:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201408150910.s7F9AHhZ041308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 15 Aug 2014 09:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r270012 - in projects/arm64: contrib/gcc gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcc/arm64 X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2014 09:10:18 -0000 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 /lib/CodeGen/RegisterScavenging.cpp, line 415. Stack dump: 0. Program arguments: 1. parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 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"