Date: Mon, 15 Apr 2013 14:21:13 GMT From: Philip Withnall <prw35@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 227731 for review Message-ID: <201304151421.r3FELDAg014036@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304151421.r3FELDAg014036>