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

Eric Christopher echristo at gmail.com
Mon Sep 22 14:50:26 PDT 2014


On Mon, Sep 22, 2014 at 2:46 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
>
> 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
>

Heh. So it does. I blame the easy readability of the mips isa for this :)

-eric



More information about the cfe-commits mailing list