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

Eric Christopher echristo at gmail.com
Mon Sep 22 11:34:37 PDT 2014


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.

Thanks.

-eric



More information about the cfe-commits mailing list