[llvm-commits] Segmented stacks, current status.

Sanjoy Das sanjoy at playingwithpointers.com
Thu Jun 30 20:18:12 PDT 2011


Hi!

> R10 is used for 'nest' parameters, so IIUC it can be live-in. (See
> lib/Target/X86/X86CallingConv.td)
> R11 is probably a better choice.

If R10 is not available, currently, segmented stacks cannot be used at
all - both R10 and R11 are used to pass information to the stack
allocation routine in libgcc.

In fact GCC complains when segmented stacks are enabled in a function
that uses nest parameters. I had let the thing slide initially because I
was not clear on what a `nest parameter' was.

This limitation can be worked on if and when we implement our own stack
handling runtime - perhaps by pushing the parameters in both 32 and 64
bit architectures.

-- 
Sanjoy Das
http://playingwithpointers.com



More information about the llvm-commits mailing list