This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [split] Add x86 support
- From: Ian Lance Taylor <iant at google dot com>
- To: Ross Ridge <rridge at csclub dot uwaterloo dot ca>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 25 Sep 2009 21:41:35 -0700
- Subject: Re: [split] Add x86 support
- References: <20090926030857.A098173F83@caffeine.csclub.uwaterloo.ca>
On Fri, Sep 25, 2009 at 8:08 PM, Ross Ridge <rridge@csclub.uwaterloo.ca> wrote:
> Ian Lance Taylor writes:
>>This adds x86-specific support for -fsplit-stack. ?This uses the stack
>>protector field in the TCB.
>
> You should be able to simplify things creating an unspec almost exactly
> like UNSPEC_TP and using that as a part of a memory operand with the
> existing compare instructions, rather than defining new insns with
> UNSPEC_STACK_CHECK.
I suppose, but it doesn't seem too major. The current approach seems fairly
clear to me--everything is in one place.
> I'm not sure if this is something you're concerned with at this point,
> but munging the return address in __morestack will totally invalidate
> the processor's return stack branch predictor. ?You can avoid that by
> generating code something like (in Intel syntax):
Yes, I've done something very similar in my x86 runtime routines, which I will
commit shortly.
Thanks for the comments.
Ian