[llvm-commits] [PATCH] Segmented stack fixes, support for Mac, Win32, FreeBSD

Chris Lattner clattner at apple.com
Fri Jan 6 11:08:19 PST 2012


On Jan 5, 2012, at 3:54 PM, Brian Anderson wrote:

> This series provides fixes to segmented stacks and adds support for x86 32-bit and 64-bit Mac, 32-bit Win32 and 64-bit FreeBSD. It builds on the __morestack mechanism implemented for Linux by gcc and LLVM.
> 
> For each platform I had to pick a slot in the TCB to store the stack boundary. This is a difficult decision since that is precious real estate. On Win32 I am using the pvArbitrary slot, which is reserved for application use. On FreeBSD it uses tcb_spare.
> 
> On Mac I have provisionally picked slot 90, which appears to already be reserved for JavaScript Core. I welcome any suggestions for a better location to store the stack boundary.
> 
> The new operating systems only support frames of static size, as that is all that is needed by the Rust language.

I did a brief scan of the patches and they seem reasonable to me.  If Rafael has reviewed them in depth, then I'm ok with them.  Using a slot reserved for JS Core seems grungy, but I don't have a better suggestion and we can always change it in the future if there is a problem.

-Chris

> 
> Regards,
> Brian Anderson
> 
> <0001-Explicitly-set-the-scale-to-1-on-some-segstack-prolo.patch><0002-Use-unsigned-comparison-in-segmented-stack-prologue.patch><0003-Generate-the-segmented-stack-prologue-differently-fo.patch><0004-Split-segmented-stacks-tests-into-tests-for-static-a.patch><0005-Support-segmented-stacks-on-mac.patch><0006-Make-segmented-stack-prologues-work-with-fastcc-on-3.patch><0007-Support-segmented-stacks-on-win32.patch><0008-Support-segmented-stacks-on-64-bit-FreeBSD.patch><0009-Add-tests-for-mac-segmented-stacks.patch><0010-Add-tests-for-win32-segmented-stacks.patch><0011-Add-tests-for-FreeBSD-segmented-stacks.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list