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

Brian Anderson banderson at mozilla.com
Thu Jan 5 15:54:21 PST 2012


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.

Regards,
Brian Anderson

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Explicitly-set-the-scale-to-1-on-some-segstack-prolo.patch
Type: text/x-patch
Size: 1686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Use-unsigned-comparison-in-segmented-stack-prologue.patch
Type: text/x-patch
Size: 2571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Generate-the-segmented-stack-prologue-differently-fo.patch
Type: text/x-patch
Size: 2687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Split-segmented-stacks-tests-into-tests-for-static-a.patch
Type: text/x-patch
Size: 4163 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Support-segmented-stacks-on-mac.patch
Type: text/x-patch
Size: 5398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Make-segmented-stack-prologues-work-with-fastcc-on-3.patch
Type: text/x-patch
Size: 4066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Support-segmented-stacks-on-win32.patch
Type: text/x-patch
Size: 3190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Support-segmented-stacks-on-64-bit-FreeBSD.patch
Type: text/x-patch
Size: 2276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-Add-tests-for-mac-segmented-stacks.patch
Type: text/x-patch
Size: 9968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-Add-tests-for-win32-segmented-stacks.patch
Type: text/x-patch
Size: 3224 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-Add-tests-for-FreeBSD-segmented-stacks.patch
Type: text/x-patch
Size: 3459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120105/9281d4ed/attachment-0010.bin>


More information about the llvm-commits mailing list