r218248 - [mips] Correct alignment of vectors passed in varargs for the O32 ABI.

Sean Silva chisophugis at gmail.com
Mon Sep 22 14:46:36 PDT 2014


On Mon, Sep 22, 2014 at 11:34 AM, Eric Christopher <echristo at gmail.com>
wrote:

> In addition to what Chandler has said:
>
> > +// Vectors are 16-byte aligned, however the O32 ABI has a maximum
> alignment of
> > +// 8-bytes since the base of the stack is 8-byte aligned.
> > +// O32:   %1 = add i32 %0, 7
> > +// O32:   %2 = and i32 %1, -8
> > +//
> > +// N32:   %1 = add i32 %0, 15
> > +// N32:   %2 = and i32 %1, -16
> > +//
> > +// N64:   %1 = add i64 %0, 15
> > +// N64:   %2 = and i64 %1, -16
> > +//
>
> No asm in tests in clang. This part needs to be reverted.
>
> You should be able to do this by checking the IR, it should have the
> correct alignment on instructions with just plain code generation.
> None of the -O3 or asm tests should be required.
>

That looks like IR to me... Also the test has -emit-llvm

-- Sean Silva


>
> Thanks.
>
> -eric
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140922/a80a3fc3/attachment.html>


More information about the cfe-commits mailing list