IainS <develo...@sandoe-acoustics.co.uk> writes: > On 28 Sep 2010, at 17:29, Ian Lance Taylor wrote: > >> Jack Howarth <howa...@bromo.med.uc.edu> writes: >> >>> Does the new split stack feature in gcc trunk absolutely require >>> additional >>> libc support to function or can it be made to work on other targets >>> like >>> darwin with just changes to libgcc? Thanks in advance for any >>> clarifications. >> >> The additional support that it needs is a thread local place to store >> the stack bound which can be accessed efficiently. On GNU/Linux I'm >> using a word in the thread block--I've actually stolen a word which >> was >> reserved for transactional memory but which RTH says he doesn't need. >> This can be accessed as an offset from %fs or %gs. To make this >> functionality work on Darwin, you need something similar. I don't >> know >> how thread local storage works on Darwin, so I don't know if you can >> do >> something similar. > > We have emulated TLS (Richard's new code) .
If I understand correctly how that works, that would be a heavy performance penalty for something like -fsplit-stack. >> I list some other options at http://gcc.gnu.org/wiki/SplitStacks under >> "Possible strategies. > > > I sincerely doubt something this involved can be accommodated in the > remaining time of stage 1 > (unless we magic some additional Darwin devs from somewhere ;-)) If a good strategy can be chosen, the actual changes are probably fairly small. But of course it's up to you. Ian