[llvm-commits] Segmented stacks, current status.
Sanjoy Das
sanjoy at playingwithpointers.com
Thu Jun 30 09:38:03 PDT 2011
Hi!
> but the function then looks for a callee saved register that is not live
> in. Can we be sure that one is always available? Looking at gold (if you
> plan to use it for linking segmented and non segmented code), it looks
> like it assumes r10 or r11 is used.
I've changed the code to use R10 as the scratch register.
> You are computing "stacklimit + size" and comparing rsp with it. Looks
> like gold assume a lea NN(%rs) to compute rs-size and that then gets
> compared with stacklimit. That also saves one instruction, no?
Done.
> The comment is stale :-)
Also done.
>
> Dose __morestack_allocate_stack_space takes care of linking the memory
> so that when this function is called again we don't allocate another
> lange block?
>
Yes, it maintains a free list; which it tries to re-use if possible.
I'll now try to implement varargs, and see how it goes.
PS: The corrected code is on github.
--
Sanjoy Das
http://playingwithpointers.com
More information about the llvm-commits
mailing list