This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [split] Add x86 support


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]