[cfe-commits] Alignment of return from __builtin_alloca
chandlerc at google.com
Thu Jun 7 17:52:02 PDT 2012
On Thu, Jun 7, 2012 at 5:22 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:
> On Jun 7, 2012, at 4:33 PM, Chandler Carruth <chandlerc at google.com> wrote:
> However, it does seem like this should be no more than an 'and'
> instruction in the worst case (we don't have known alignment of the stack).
> Realigning the stack requires the function to have a frame pointer, so
> frame pointer elimination is no longer possible. If you have dynamically
> sized allocas, a reserved base pointer register is also necessary.
Yes, but we don't need to re-align the stack AFAICT. We can just alloca
some padding, and and off the low bits of the pointer. We still need the
base pointer register in order to handle the dynamically sized alloca, but
the stack can be at any alignment it pleases. Maybe I'm missing something?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits