From owner-p4-projects@FreeBSD.ORG Mon Apr 15 14:21:14 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 51D41ADA; Mon, 15 Apr 2013 14:21:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0FBE8AD8 for ; Mon, 15 Apr 2013 14:21:14 +0000 (UTC) (envelope-from prw35@FreeBSD.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id 022992A8 for ; Mon, 15 Apr 2013 14:21:14 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r3FELDxT014039 for ; Mon, 15 Apr 2013 14:21:13 GMT (envelope-from prw35@FreeBSD.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r3FELDAg014036 for perforce@freebsd.org; Mon, 15 Apr 2013 14:21:13 GMT (envelope-from prw35@FreeBSD.org) Date: Mon, 15 Apr 2013 14:21:13 GMT Message-Id: <201304151421.r3FELDAg014036@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to prw35@FreeBSD.org using -f From: Philip Withnall Subject: PERFORCE change 227731 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2013 14:21:14 -0000 http://p4web.freebsd.org/@@227731?ac=10 Change 227731 by prw35@pwithnall_zenith on 2013/04/15 14:20:28 Force 32-byte stack alignment in GCC on MIPS This is necessary for CHERI, where capabilities must be 32-byte aligned, so the stack must always be 32-byte aligned to allow capabilities to be stored there. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/contrib/gcc/config/mips/mips.h#2 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/contrib/gcc/config/mips/mips.h#2 (text+ko) ==== @@ -2000,9 +2000,10 @@ #define EPILOGUE_USES(REGNO) ((REGNO) == 31) /* Treat LOC as a byte offset from the stack pointer and round it up - to the next fully-aligned offset. */ -#define MIPS_STACK_ALIGN(LOC) \ - (TARGET_NEWABI ? ((LOC) + 15) & -16 : ((LOC) + 7) & -8) + to the next fully-aligned offset. + For CHERI, this has to be 32 bytes to allow capabilities to be + stored on the stack. */ +#define MIPS_STACK_ALIGN(LOC) (((LOC) + 31) & -32) /* Implement `va_start' for varargs and stdarg. */