<div class="gmail_quote">On Thu, Jun 7, 2012 at 5:22 PM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk" target="_blank">stoklund@2pi.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div class="im"><br><div><div>On Jun 7, 2012, at 4:33 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>> wrote:</div><br><blockquote type="cite">
<span style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">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).</span></blockquote>
</div><br></div><div>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.</div>
</div></blockquote><div><br></div><div>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?</div>
</div>