[PATCH] Add a "no-split-stack" function attribute.

Joerg Sonnenberger joerg at britannica.bec.de
Sun Oct 13 07:13:05 PDT 2013


On Sat, Oct 12, 2013 at 12:23:31PM -0700, Luqman Aden wrote:
> On Sat, Oct 12, 2013 at 5:26 AM, Joerg Sonnenberger
> <joerg at britannica.bec.de> wrote:
> > On Fri, Oct 11, 2013 at 06:17:35PM -0700, Luqman Aden wrote:
> >> This disable emission of segmented-stack prologues on a per-function
> >> basis, even if segmented stacks are turned on globally.
> >
> > This sounds quite wrong without any further comment. What ensurse that
> > the function will find enough stack space for example?
> >
> > Joerg
> 
> It's not supposed to guarantee any function tagged with it will have
> enough stack space. In terms of use case (from #rust-internals on
> Mozilla):
> 
> acrichto> I've been using it a lot where we're managing the stack
> limits ourselves
> acrichto> so during a context switch I need no_split_stack
> acrichto> also the starting function for a thread
> acrichto> basically the edge cases around setting up the state of the
> world for functions with __morestack

I would expect either case to be implemented in assembler for natural
reasons, so I don't really like this attribute in the current form.

Joerg



More information about the llvm-commits mailing list