RFC Patchset: Segmented stacks

Hi all!

Attached a three part series which implements the very first bits of my
GSoC proposal (full proposal is here http://pastebin.com/e9JMZNCE), for
some preliminary review.

0001-Adds-relevant-command-line-options.patch (1.97 KB)

0002-Creates-space-for-code-to-be-added-next.patch (6.77 KB)

0003-X86-specific-code-to-support-segmented-stacks.patch (6.47 KB)

Nice!

Just some quick comments:

In the Interoperability section it looks like you want to implement something that is compatible with gcc. This is a great thing to have, but it might be possible to implement something that is not linker dependent if you wish to.

Instead of having split stacks be a per compilation unit thing, it can be a characteristic of each function (using a new calling convention for example). The compiler option then becomes "mark all functions in this compilation unit as split stacks").

A function that calls functions without this mark will get a large stack block in the prologue. When doing LTO regular functions can be optimized to split stacks.

This might also be handy for handling "hard" (vargs, dynamic stack allocation) functions: just don't mark them.

Again, just some toughs. Looks great as is too!

Cheers,
Rafael