<div dir="ltr"><div dir="ltr">On Wed, Mar 10, 2021 at 6:35 AM Momchil Velikov <<a href="mailto:momchil.velikov@gmail.com">momchil.velikov@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Just to be clear, the suggestion is to introduce `alignstack` to<br>
affect argument alignment, while retaining<br>
the current semantics for `align`?<br>
<br>
Thus, a pointer argument having both `align(A)` and `alignstack(B)`<br>
would itself be allocated at B boundary (if it happens to be passed in<br>
memory),<br>
while it would contain an A-aligned address?<br></blockquote><div><br></div><div>Yes, that's the proposal as I understand it.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> Using alignstack for byval would also eliminate the special rule (for<br>
> align) there I guess.<br>
<br>
So, `byval` arguments adopt the `stackalign` attribute with the same<br>
semantics as the current `align`<br>
and then `align` is invalid for `byval` arguments ?<br></blockquote><div><br></div><div>I think there is a backwards compatibility consideration here. It also seems reasonable to allow `align` to appear with `byval` as an optimization hint: the optimizer can assume the low bits of such a pointer are zero.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Looks good to me.<br>
<br>
-- <br>
Compiler scrub, Arm<br>
</blockquote></div></div>