[llvm-commits] [PATCH] va_arg alignment type

David Meyer pdox at google.com
Wed Oct 13 19:21:58 PDT 2010


Rafael,

I'm afraid not. <2 x i64> is aligned to 8-bytes on X86-64, both ABI and
stack.

I'm not sure there's any way to "test" this change... it may have no
external effects (except for Native Client). All major architectures have
stack alignment the same as ABI alignment. In principle, however, I think
this change is correct.

- David M

On Wed, Oct 13, 2010 at 1:09 PM, Rafael Espindola <espindola at google.com>wrote:

> On 13 October 2010 15:02, David Meyer <pdox at google.com> wrote:
> > Rafael,
> > The default on X86-32 is 4-byte alignment for doubles and long long (both
> in
> > structs and on the stack).
> > (gcc has the flag -malign-double to increase alignment to 8-bytes).
>
> Yes, just realized that. One case that you can use for testing this
> patch is  "<2 x i64>". Without your patch it should be aligned to 16
> bytes, but with your patch it will be aligned to 8 on x86-64.
>
> Also note that adding s:32 to your target description will align
> everything on the call frame to 32 bits. I hope that is what you want.
> If so I will commit your patch with a test using <2 x i64>.
>
> > - David M
>
> Cheers,
> --
> Rafael Ávila de Espíndola
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101013/e35f5a10/attachment.html>


More information about the llvm-commits mailing list